:root {
  --paper: #f3f0e7;
  --paper-warm: #e9e3d5;
  --paper-pale: #faf8f2;
  --ink: #16231f;
  --ink-soft: #48554f;
  --ink-faint: #7b837d;
  --line: #cec9ba;
  --line-dark: #a9aa9e;
  --moss: #264a3d;
  --moss-pale: #dbe4d8;
  --signal: #e46137;
  --signal-pale: #f7dfd3;
  --glass: #dbe7e2;
  --cladding: #aa7b4e;
  --cladding-line: #775f46;
  --roof: #303a36;
  --roof-line: #131c18;
  --joinery: #202821;
  --door: #8b4c34;
  --deck: #b28052;
  --house-scale: 1;
  --house-shift: 0px;
  --site-light: 1;
  --font-sans: "Manrope", "Avenir Next", sans-serif;
  --font-serif: "Newsreader", Georgia, serif;
  --font-mono: "DM Mono", ui-monospace, monospace;
  --shadow: 0 18px 60px rgba(27, 38, 31, 0.15);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-sans);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

.app-shell {
  display: grid;
  grid-template:
    "topbar topbar topbar" 74px
    "workflow workspace catalogue" minmax(0, 1fr) /
    224px minmax(540px, 1fr) 376px;
  height: 100dvh;
  background: var(--paper);
}

.topbar {
  z-index: 20;
  grid-area: topbar;
  display: grid;
  grid-template-columns: 224px minmax(240px, 1fr) auto auto;
  align-items: stretch;
  min-width: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(243, 240, 231, 0.94);
  backdrop-filter: blur(18px);
}

.wordmark {
  display: grid;
  grid-template-columns: 25px auto 1fr;
  gap: 9px;
  align-items: center;
  padding: 0 18px;
  text-align: left;
  background: transparent;
  border-right: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.wordmark small {
  align-self: end;
  margin-bottom: 20px;
  color: var(--ink-faint);
  font: 400 8px/1 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.wordmark-mark {
  display: inline-grid;
  grid-template-columns: repeat(3, 5px);
  gap: 2px;
  align-items: end;
  width: 19px;
  height: 26px;
  transform: skewY(-18deg);
}

.wordmark-mark i {
  display: block;
  height: 65%;
  background: var(--moss);
}

.wordmark-mark i:nth-child(2) {
  height: 100%;
}

.wordmark-mark i:nth-child(3) {
  height: 78%;
  background: var(--signal);
}

.project-crumb {
  display: flex;
  gap: 17px;
  align-items: center;
  min-width: 0;
  padding: 0 22px;
}

.eyebrow {
  color: var(--ink-faint);
  font: 500 9px/1.2 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.project-switcher {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 9px 11px;
  background: transparent;
  border-radius: 5px;
  transition: background 160ms ease;
}

.project-switcher:hover {
  background: var(--paper-warm);
}

.project-switcher strong {
  overflow: hidden;
  max-width: 220px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.project-switcher span {
  padding-left: 12px;
  color: var(--ink-faint);
  border-left: 1px solid var(--line);
  font: 400 9px/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-switcher svg,
.button svg,
.icon-button svg,
.view-tab svg,
.search-box svg,
.filter-button svg,
.plan-pill svg,
.workflow-step svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.project-switcher svg {
  width: 16px;
  height: 16px;
}

.save-state {
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 0 16px;
  color: var(--ink-faint);
  font: 400 9px/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.save-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4a8a5e;
  box-shadow: 0 0 0 3px rgba(74, 138, 94, 0.12);
}

.save-state.saving .save-dot {
  background: var(--signal);
  box-shadow: none;
  animation: pulse 900ms ease infinite;
}

@keyframes pulse {
  50% { opacity: 0.35; }
}

.top-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 0 12px;
}

.button,
.icon-button,
.tool-button,
.filter-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  background: transparent;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.button:hover,
.icon-button:hover,
.tool-button:hover,
.filter-button:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}

.button svg {
  width: 17px;
  height: 17px;
}

.button-quiet {
  border-color: transparent;
}

.button-ink {
  color: var(--paper-pale);
  border-color: var(--ink);
  background: var(--ink);
}

.button-ink:hover {
  color: white;
  background: var(--moss);
}

.button-paper {
  background: var(--paper-pale);
}

.button-count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  margin-left: 4px;
  color: var(--ink);
  background: var(--paper);
  border-radius: 50%;
  font: 500 9px/1 var(--font-mono);
}

.icon-button {
  width: 40px;
  padding: 0;
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

.workflow {
  grid-area: workflow;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: var(--paper);
}

.workflow-intro {
  padding: 26px 22px 21px;
  border-bottom: 1px solid var(--line);
}

.workflow-intro > strong {
  display: block;
  margin-top: 10px;
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.035em;
}

.workflow-intro p {
  margin: 7px 0 0;
  color: var(--ink-faint);
  font-size: 11px;
  line-height: 1.55;
}

.workflow-nav {
  padding: 8px 0;
}

.workflow-step {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 30px;
  gap: 7px;
  align-items: center;
  width: 100%;
  min-height: 66px;
  padding: 10px 14px 10px 18px;
  text-align: left;
  background: transparent;
  border-left: 3px solid transparent;
  transition: background 160ms ease, border 160ms ease;
}

.workflow-step::after {
  position: absolute;
  right: 14px;
  bottom: 0;
  left: 53px;
  height: 1px;
  content: "";
  background: rgba(206, 201, 186, 0.55);
}

.workflow-step:hover {
  background: rgba(233, 227, 213, 0.6);
}

.workflow-step.active {
  border-left-color: var(--signal);
  background: var(--paper-warm);
}

.step-index {
  align-self: start;
  padding-top: 3px;
  color: var(--ink-faint);
  font: 400 9px/1 var(--font-mono);
}

.step-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 3px;
}

.step-copy strong {
  font-size: 12px;
}

.step-copy small {
  overflow: hidden;
  color: var(--ink-faint);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.step-state {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 50%;
  font: 500 9px/1 var(--font-mono);
}

.step-state.complete {
  color: var(--paper-pale);
  border-color: var(--moss);
  background: var(--moss);
}

.step-state svg {
  width: 13px;
  height: 13px;
}

.step-state.arrow {
  border: 0;
  font-size: 17px;
}

.workflow-foot {
  margin-top: auto;
  padding: 22px 20px 20px;
  border-top: 1px solid var(--line);
  background: rgba(233, 227, 213, 0.48);
}

.brief-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  font-size: 10px;
}

.brief-line span {
  color: var(--ink-faint);
}

.brief-line strong {
  font-size: 10px;
  font-weight: 600;
}

.text-button {
  display: inline-flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
  padding: 0 0 3px;
  color: var(--moss);
  border-bottom: 1px solid currentColor;
  background: transparent;
  font-size: 10px;
  font-weight: 700;
}

.workspace {
  grid-area: workspace;
  min-width: 0;
  min-height: 0;
  background: #e2ded2;
}

.workspace-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  height: 62px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-pale);
}

.view-tabs {
  display: flex;
  height: 40px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
}

.view-tab {
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 0 11px;
  color: var(--ink-faint);
  border-radius: 2px;
  background: transparent;
  font-size: 10px;
  font-weight: 700;
}

.view-tab svg {
  width: 16px;
  height: 16px;
}

.view-tab.active {
  color: var(--ink);
  background: white;
  box-shadow: 0 1px 6px rgba(29, 40, 34, 0.08);
}

.new-badge {
  margin-left: 2px;
  padding: 3px 5px;
  color: #8d3c24;
  border-radius: 2px;
  background: var(--signal-pale);
  font: 500 7px/1 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.plan-control {
  min-width: 0;
}

.plan-pill {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 18px;
  gap: 9px;
  align-items: center;
  min-width: 185px;
  height: 46px;
  padding: 4px 10px 4px 4px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
}

.plan-thumb {
  display: grid;
  place-items: center;
  width: 44px;
  height: 36px;
  background: var(--paper-warm);
}

.plan-thumb svg {
  width: 34px;
  height: 25px;
  stroke-width: 1.3;
}

.plan-pill > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.plan-pill small {
  color: var(--ink-faint);
  font: 400 8px/1.2 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plan-pill strong {
  overflow: hidden;
  margin-top: 3px;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-pill .chevron {
  width: 14px;
  height: 14px;
}

.drawing-tools {
  display: flex;
  align-items: center;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
}

.tool-button {
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  border: 0;
  border-radius: 0;
  font-size: 17px;
}

.tool-button:hover {
  transform: none;
  background: var(--paper-warm);
}

.drawing-tools > span {
  min-width: 45px;
  text-align: center;
  color: var(--ink-faint);
  font: 400 8px/1 var(--font-mono);
}

.fit-button {
  border-left: 1px solid var(--line);
}

.fit-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
}

.preview-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  height: calc(100% - 62px);
  min-height: 0;
  overflow: hidden;
  background: #dedacf;
}

.preview-stage::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  opacity: 0.38;
  background-image: radial-gradient(#8f9389 0.55px, transparent 0.55px);
  background-size: 7px 7px;
}

.drawing-meta {
  position: absolute;
  top: 18px;
  right: 20px;
  left: 20px;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
}

.drawing-meta > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--ink-soft);
  font: 500 8px/1.2 var(--font-mono);
  letter-spacing: 0.12em;
}

.drawing-meta small {
  color: var(--ink-faint);
  font-size: 7px;
}

.north-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--ink-soft);
  border: 1px solid var(--line-dark);
  border-radius: 50%;
  font: 500 8px/1 var(--font-mono);
}

.north-mark i {
  position: absolute;
  width: 1px;
  height: 40px;
  background: var(--line-dark);
  transform: translateY(20px);
}

.canvas-wrap {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  margin: 14px 16px 0;
  overflow: hidden;
  border: 1px solid rgba(169, 170, 158, 0.8);
  background: #f9f7f0;
  box-shadow: 0 5px 25px rgba(29, 40, 34, 0.08);
}

.three-stage {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  color: var(--paper-pale);
  background:
    radial-gradient(circle at 62% 19%, rgba(237, 221, 169, 0.28), transparent 26%),
    linear-gradient(180deg, #7f9893 0%, #aeb9a5 55%, #5f735e 100%);
  isolation: isolate;
}

.three-stage::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  opacity: 0;
  background: none;
}

#house3dCanvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

#house3dCanvas:active {
  cursor: grabbing;
}

#house3dCanvas.surface-hover {
  cursor: pointer;
}

.studio-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(15,28,23,.1), transparent 32%, transparent 72%, rgba(15,28,23,.06)),
    radial-gradient(circle at 18% 10%, rgba(11,25,19,.17), transparent 34%),
    linear-gradient(180deg, rgba(12,25,19,.025), transparent 42%, rgba(12,25,19,.14));
  box-shadow: inset 0 0 90px rgba(14,25,20,.08);
}

.studio-heading {
  position: absolute;
  top: 23px;
  left: 24px;
  z-index: 5;
  max-width: 290px;
  pointer-events: none;
  text-shadow: 0 2px 18px rgba(11,25,19,.35);
}

.model-state {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  padding: 6px 8px;
  color: rgba(255,255,255,.78);
  border: 1px solid rgba(255,255,255,.32);
  background: rgba(20,38,30,.28);
  backdrop-filter: blur(12px);
  font: 500 7px/1 var(--font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}

.model-state i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8bd091;
  box-shadow: 0 0 0 4px rgba(139,208,145,.13);
}

.studio-heading h2 {
  margin: 13px 0 0;
  font-family: var(--font-serif);
  font-size: clamp(31px, 4.4vw, 57px);
  font-weight: 400;
  line-height: .9;
  letter-spacing: -.045em;
}

.studio-heading p {
  margin: 7px 0 0;
  color: rgba(255,255,255,.76);
  font-size: 9px;
  font-weight: 600;
}

.studio-compass {
  position: absolute;
  top: 22px;
  right: 22px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255,255,255,.48);
  border-radius: 50%;
  background: rgba(18,35,28,.16);
  backdrop-filter: blur(10px);
  font: 500 9px/1 var(--font-mono);
}

.studio-compass::after {
  position: absolute;
  width: 2px;
  height: 14px;
  margin-top: -24px;
  content: "";
  background: var(--signal);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.studio-compass i {
  position: absolute;
  width: 1px;
  height: 38px;
  background: rgba(255,255,255,.28);
  transform: rotate(32deg);
}

.studio-compass small {
  position: absolute;
  top: 55px;
  width: 70px;
  color: rgba(255,255,255,.62);
  text-align: center;
  font: 400 6px/1 var(--font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.studio-controls {
  position: absolute;
  z-index: 6;
  right: 18px;
  bottom: 18px;
  left: 18px;
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 52px;
  padding: 6px;
  border: 1px solid rgba(255,255,255,.3);
  background: rgba(17, 34, 27, 0.72);
  box-shadow: 0 10px 30px rgba(10,20,16,.18);
  backdrop-filter: blur(18px);
}

.camera-presets {
  display: flex;
  gap: 3px;
  align-items: center;
}

.camera-preset {
  min-height: 38px;
  padding: 0 11px;
  color: rgba(255,255,255,.62);
  border: 1px solid transparent;
  border-radius: 2px;
  background: transparent;
  font-size: 8px;
  font-weight: 700;
  transition: color 160ms ease, border 160ms ease, background 160ms ease;
}

.camera-preset:hover {
  color: white;
  border-color: rgba(255,255,255,.25);
}

.camera-preset.active {
  color: var(--ink);
  border-color: var(--paper-pale);
  background: var(--paper-pale);
}

.studio-control-divider {
  width: 1px;
  height: 26px;
  margin: 0 3px;
  background: rgba(255,255,255,.18);
}

.studio-sun-control {
  display: grid;
  grid-template-columns: 74px minmax(70px, 1fr);
  gap: 8px;
  align-items: center;
  flex: 1;
  min-width: 130px;
  padding: 0 8px;
}

.studio-sun-control > span {
  display: flex;
  gap: 6px;
  align-items: center;
  color: rgba(255,255,255,.7);
  font: 500 7px/1 var(--font-mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.studio-sun-control svg,
.studio-icon-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.studio-sun-control input {
  width: 100%;
  height: 2px;
  accent-color: var(--signal);
}

.studio-icon-button {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  color: rgba(255,255,255,.72);
  border: 1px solid rgba(255,255,255,.17);
  border-radius: 2px;
  background: transparent;
}

.studio-icon-button:hover,
.studio-icon-button[aria-pressed="true"] {
  color: var(--ink);
  border-color: var(--paper-pale);
  background: var(--paper-pale);
}

.studio-gesture {
  position: absolute;
  z-index: 6;
  bottom: 84px;
  left: 22px;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 9px 11px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(20,38,30,.38);
  backdrop-filter: blur(11px);
  transition: opacity 300ms ease, transform 300ms ease;
}

.studio-gesture.dismissed {
  opacity: 0;
  transform: translateY(5px);
  pointer-events: none;
}

.gesture-orbit {
  position: relative;
  width: 25px;
  height: 25px;
  border: 1px dashed rgba(255,255,255,.58);
  border-radius: 50%;
}

.gesture-orbit::before {
  position: absolute;
  top: 4px;
  left: 9px;
  width: 6px;
  height: 10px;
  content: "";
  border: 1px solid rgba(255,255,255,.85);
  border-radius: 5px;
}

.studio-gesture > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.studio-gesture strong {
  font-size: 8px;
}

.studio-gesture small {
  color: rgba(255,255,255,.58);
  font-size: 7px;
}

.surface-tooltip {
  position: absolute;
  z-index: 9;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 140px;
  padding: 9px 11px;
  pointer-events: none;
  color: var(--paper-pale);
  border-left: 3px solid var(--signal);
  background: rgba(18,34,27,.86);
  box-shadow: 0 8px 25px rgba(10,20,16,.25);
  backdrop-filter: blur(12px);
  transform: translate(13px, 13px);
}

.surface-tooltip[hidden] {
  display: none;
}

.surface-tooltip span {
  color: rgba(255,255,255,.58);
  font: 400 6px/1 var(--font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.surface-tooltip strong {
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 400;
}

.surface-tooltip small {
  color: rgba(255,255,255,.52);
  font-size: 7px;
}

.drawing-mode .three-stage,
.property-mode .three-stage {
  display: none;
}

.studio-mode .house-drawing,
.studio-mode .drawing-meta {
  opacity: 0;
  pointer-events: none;
}

.app-shell:not([data-view="drawing"]) .drawing-tools {
  visibility: hidden;
}

.studio-fallback {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 250px;
  padding: 22px;
  text-align: center;
  color: var(--paper-pale);
  border: 1px solid rgba(255,255,255,.32);
  background: rgba(17,34,27,.72);
  transform: translate(-50%, -50%);
}

.studio-fallback strong {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 400;
}

.studio-fallback span {
  color: rgba(255,255,255,.62);
  font-size: 8px;
}

.house-drawing {
  display: block;
  width: 100%;
  height: 100%;
  color: #b9b7ad;
  transition: transform 240ms cubic-bezier(.2,.8,.2,1), opacity 180ms ease;
  transform: scale(var(--drawing-zoom, 1));
}

.drawing-grid {
  pointer-events: none;
}

.drawing-sheet {
  transform-origin: center center;
}

.plan-geometry[hidden] {
  display: none;
}

.house-wall,
.house-wall-fill {
  fill: var(--cladding);
  transition: fill 260ms ease;
}

.texture-line {
  fill: none;
  stroke: var(--cladding-line);
  stroke-width: 1.2;
  opacity: 0.62;
  transition: stroke 260ms ease;
}

.house-roof,
.house-roof-fill {
  fill: var(--roof);
  transition: fill 260ms ease;
}

.roof-line {
  fill: none;
  stroke: var(--roof-line);
  stroke-width: 1.1;
  opacity: 0.48;
}

.house-outline {
  fill: none;
  stroke: #273a31;
  stroke-width: 4;
  stroke-linecap: square;
  stroke-linejoin: bevel;
}

.joinery-frame,
.door-trim {
  fill: var(--joinery);
  transition: fill 260ms ease;
}

.glass {
  fill: var(--glass);
  stroke: #273a31;
  stroke-width: 1;
}

.joinery-detail {
  fill: none;
  stroke: var(--joinery);
  stroke-width: 4;
}

.house-door {
  fill: var(--door);
  transition: fill 260ms ease;
}

.door-handle {
  fill: #d9bd76;
  stroke: #3d382b;
  stroke-width: 1;
}

.house-deck {
  fill: var(--deck);
  stroke: #5c4635;
  stroke-width: 2;
  transition: fill 260ms ease;
}

.deck-line {
  fill: none;
  stroke: #5c4635;
  stroke-width: 1;
  opacity: 0.7;
}

.dimension-lines path {
  fill: none;
  stroke: #5a685f;
  stroke-width: 1.2;
}

.dimension-lines rect {
  fill: #f9f7f0;
}

.dimension-lines text,
.title-block text {
  fill: #314b3d;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
}

.title-block rect {
  fill: none;
  stroke: #859085;
  stroke-width: 1;
}

.title-block text {
  font-size: 8px;
}

.wall-pattern {
  opacity: 1;
}

.preview-stage[data-texture="horizontal"] .wall-vertical,
.preview-stage[data-texture="horizontal"] .wall-panel,
.preview-stage[data-texture="vertical"] .wall-horizontal,
.preview-stage[data-texture="vertical"] .wall-panel,
.preview-stage[data-texture="panel"] .wall-horizontal,
.preview-stage[data-texture="panel"] .wall-vertical {
  display: none;
}

.site-preview {
  position: absolute;
  inset: 0;
  display: none;
  overflow: hidden;
  background: #c4d3cd;
  isolation: isolate;
}

.property-mode .house-drawing,
.property-mode .drawing-meta {
  opacity: 0;
  pointer-events: none;
}

.property-mode .site-preview {
  display: block;
  animation: sceneIn 500ms cubic-bezier(.16,.8,.25,1) both;
}

@keyframes sceneIn {
  from { opacity: 0; transform: scale(1.025); }
  to { opacity: 1; transform: scale(1); }
}

.site-sky {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 68% 22%, rgba(255, 242, 197, 0.9) 0 4%, rgba(255, 242, 197, 0.22) 13%, transparent 25%),
    linear-gradient(180deg, #a9c3c0 0%, #dce1ce 58%, #c8c99e 100%);
  filter: brightness(var(--site-light));
  transition: filter 200ms ease;
}

.site-hill {
  position: absolute;
  right: -12%;
  bottom: -25%;
  left: -12%;
  height: 58%;
  border-radius: 50% 45% 0 0;
  filter: brightness(var(--site-light));
}

.hill-back {
  bottom: 8%;
  height: 38%;
  background: #71876f;
  transform: rotate(-4deg);
}

.hill-front {
  background:
    repeating-linear-gradient(18deg, rgba(255,255,255,.03) 0 1px, transparent 1px 10px),
    #495f4d;
  transform: rotate(3deg);
}

.site-photo-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  background-position: center;
  background-size: cover;
  transition: opacity 300ms ease;
}

.site-photo-layer.has-photo {
  opacity: 1;
}

.site-photo-layer.has-photo::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(22,35,31,.04), rgba(22,35,31,.24));
}

.site-house {
  position: absolute;
  inset: 2% 4% 0;
  z-index: 2;
  width: 92%;
  height: 96%;
  overflow: visible;
  transform: translateX(var(--house-shift)) scale(var(--house-scale));
  transform-origin: 50% 88%;
  transition: transform 160ms ease;
}

.site-wall {
  stroke: rgba(31, 47, 39, 0.48);
  stroke-width: 2;
}

.planting path {
  fill: none;
  stroke: #253e30;
  stroke-width: 9;
  stroke-linecap: round;
}

.planting path:last-child,
.planting .canopy {
  fill: #2e563d;
  stroke-width: 3;
}

.planting .trunk {
  fill: #5e4a35;
  stroke: #4c3b2d;
  stroke-width: 2;
}

.site-caption {
  position: absolute;
  right: 20px;
  bottom: 18px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px 15px;
  color: var(--paper-pale);
  border: 1px solid rgba(255,255,255,.38);
  background: rgba(22, 35, 31, 0.64);
  backdrop-filter: blur(10px);
}

.site-caption .eyebrow {
  color: rgba(255,255,255,.62);
}

.site-caption strong {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 400;
}

.site-controls {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 1fr);
  gap: 0;
  margin: 0 16px;
  border: 1px solid var(--line-dark);
  border-top: 0;
  background: var(--paper-pale);
}

.site-controls[hidden] {
  display: none;
}

.site-control-upload,
.range-control {
  min-width: 0;
  min-height: 56px;
  padding: 8px 12px;
  border-right: 1px solid var(--line);
}

.site-control-upload {
  display: flex;
  gap: 8px;
  align-items: center;
}

.site-control-upload .button {
  min-height: 34px;
  padding: 0 10px;
  white-space: nowrap;
}

.site-control-upload small {
  color: var(--ink-faint);
  font-size: 8px;
  line-height: 1.35;
}

.range-control {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 10px;
  align-items: center;
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 700;
}

.range-control input {
  grid-column: 1 / -1;
  width: 100%;
  height: 2px;
  accent-color: var(--signal);
}

.range-control output {
  color: var(--ink-faint);
  font: 400 8px/1 var(--font-mono);
}

.selection-strip {
  position: relative;
  z-index: 5;
  display: flex;
  flex: 0 0 70px;
  gap: 0;
  min-height: 70px;
  margin: 12px 16px 14px;
  overflow-x: auto;
  border: 1px solid var(--line-dark);
  background: var(--paper-pale);
  scrollbar-width: thin;
}

.selection-item {
  display: grid;
  grid-template-columns: 32px minmax(78px, 1fr);
  gap: 9px;
  align-items: center;
  flex: 1 0 128px;
  max-width: 190px;
  min-width: 0;
  padding: 9px 11px;
  text-align: left;
  border-right: 1px solid var(--line);
  background: transparent;
  transition: background 160ms ease;
}

.selection-item:hover,
.selection-item.active {
  background: var(--paper-warm);
}

.selection-item.active {
  box-shadow: inset 0 -3px var(--signal);
}

.selection-swatch,
.material-swatch,
.mini-swatch {
  position: relative;
  overflow: hidden;
  background-color: var(--swatch);
  background-image: var(--swatch-pattern, none);
}

.selection-swatch {
  width: 32px;
  height: 42px;
  border: 1px solid rgba(22,35,31,.18);
}

.selection-item > span:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 3px;
}

.selection-item small {
  color: var(--ink-faint);
  font: 400 7px/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.selection-item strong {
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalogue {
  grid-area: catalogue;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border-left: 1px solid var(--line);
  background: var(--paper-pale);
}

.catalogue-header {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-end;
  padding: 20px 18px 14px;
}

.catalogue-header h1 {
  margin: 5px 0 0;
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.035em;
}

.live-label {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 3px;
  color: var(--ink-faint);
  font: 400 8px/1 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.live-label i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #58a26d;
}

.mobile-close {
  display: none;
}

.category-scroller {
  display: flex;
  gap: 5px;
  padding: 0 18px 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-scroller::-webkit-scrollbar {
  display: none;
}

.category-tab {
  flex: 0 0 auto;
  padding: 7px 9px;
  color: var(--ink-faint);
  border: 1px solid var(--line);
  border-radius: 3px;
  background: transparent;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.category-tab:hover {
  border-color: var(--ink-soft);
}

.category-tab.active {
  color: var(--paper-pale);
  border-color: var(--moss);
  background: var(--moss);
}

.catalogue-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.search-box {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  height: 39px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper-pale);
}

.search-box:focus-within {
  border-color: var(--moss);
  box-shadow: 0 0 0 2px rgba(38, 74, 61, 0.12);
}

.search-box svg {
  width: 17px;
  height: 17px;
  color: var(--ink-faint);
}

.search-box input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 9px;
}

.search-box input::placeholder {
  color: #92978f;
}

.search-box kbd {
  padding: 3px 4px;
  color: var(--ink-faint);
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--paper);
  font: 400 7px/1 var(--font-mono);
}

.filter-button {
  min-width: 72px;
  min-height: 39px;
  padding: 0 9px;
  background: var(--paper-pale);
  font-size: 9px;
}

.filter-button svg {
  width: 15px;
  height: 15px;
}

.filter-button.active {
  color: var(--paper-pale);
  border-color: var(--moss);
  background: var(--moss);
}

.filter-button span {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  color: var(--ink);
  border-radius: 50%;
  background: var(--paper);
  font: 500 7px/1 var(--font-mono);
}

.filter-button span[hidden] {
  display: none;
}

.filter-panel {
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: #eeeadf;
}

.filter-panel[hidden] {
  display: none;
}

.filter-group + .filter-group {
  margin-top: 10px;
}

.filter-group > span {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-faint);
  font: 500 8px/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.filter-chips button {
  padding: 5px 7px;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-pale);
  font-size: 8px;
}

.filter-chips button.active {
  color: var(--paper-pale);
  border-color: var(--moss);
  background: var(--moss);
}

.catalogue-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px 7px;
  color: var(--ink-faint);
  font: 400 8px/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.catalogue-summary strong {
  color: var(--ink);
  font-weight: 500;
}

.sort-control {
  color: var(--ink-soft);
  background: transparent;
  font: inherit;
}

.material-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-height: 0;
  padding: 5px 18px 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--line-dark) transparent;
  scrollbar-width: thin;
}

.material-card {
  position: relative;
  min-width: 0;
  height: max-content;
  padding: 5px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: white;
  transition: border-color 170ms ease, transform 170ms ease, box-shadow 170ms ease;
}

.material-card:hover {
  z-index: 2;
  border-color: var(--ink-soft);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(22,35,31,.11);
}

.material-card.selected {
  border-color: var(--moss);
  box-shadow: 0 0 0 2px var(--moss);
}

.material-card.selected::after {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: white;
  border: 2px solid white;
  border-radius: 50%;
  content: "✓";
  background: var(--moss);
  font-size: 10px;
  box-shadow: 0 2px 7px rgba(22,35,31,.24);
}

.material-swatch {
  height: 90px;
  border-radius: 1px;
  transition: filter 180ms ease;
}

.material-card:hover .material-swatch {
  filter: saturate(1.05) brightness(1.02);
}

.material-swatch::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.42;
  background: linear-gradient(115deg, rgba(255,255,255,.28), transparent 36%, rgba(0,0,0,.09));
}

.material-badges {
  position: absolute;
  top: 9px;
  left: 9px;
  display: flex;
  gap: 3px;
}

.material-badge {
  padding: 4px 5px;
  color: var(--ink);
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 2px;
  background: rgba(250,248,242,.83);
  backdrop-filter: blur(7px);
  font: 500 6px/1 var(--font-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.material-info-button {
  position: absolute;
  top: 63px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  color: var(--ink);
  border: 1px solid rgba(22,35,31,.22);
  border-radius: 50%;
  background: rgba(250,248,242,.8);
  font: 500 9px/1 var(--font-serif);
}

.material-copy {
  display: flex;
  flex-direction: column;
  min-height: 64px;
  padding: 8px 5px 5px;
}

.material-copy small {
  color: var(--ink-faint);
  font: 400 7px/1.2 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.material-copy strong {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 4px;
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.06;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.material-copy span {
  margin-top: auto;
  padding-top: 6px;
  color: var(--ink-faint);
  font-size: 7px;
}

.empty-state {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 30px;
  text-align: center;
  border: 1px dashed var(--line-dark);
}

.empty-state strong {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 500;
}

.empty-state p {
  max-width: 220px;
  margin: 7px 0 15px;
  color: var(--ink-faint);
  font-size: 10px;
  line-height: 1.5;
}

.catalogue-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  min-height: 66px;
  padding: 10px 18px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.catalogue-footer .text-button {
  flex: 0 0 auto;
  margin: 0;
}

.provider-state {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.provider-state > span:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.provider-state strong {
  overflow: hidden;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.provider-state small {
  color: var(--ink-faint);
  font-size: 7px;
}

.provider-stack {
  display: flex;
  padding-left: 6px;
}

.provider-stack i {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  margin-left: -6px;
  color: var(--paper-pale);
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--moss);
  font: 500 7px/1 var(--font-mono);
  font-style: normal;
}

.provider-stack i:nth-child(2) { background: #8a5538; }
.provider-stack i:nth-child(3) { background: #707b6f; }
.provider-stack i:nth-child(4) { color: var(--ink); background: var(--paper-warm); }

.mobile-material-trigger {
  display: none;
}

.toast-region {
  position: fixed;
  z-index: 1000;
  right: 18px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  gap: 11px;
  align-items: center;
  width: min(340px, calc(100vw - 36px));
  padding: 13px 15px;
  color: var(--paper-pale);
  border-left: 3px solid var(--signal);
  background: var(--ink);
  box-shadow: var(--shadow);
  animation: toastIn 240ms ease both;
}

.toast.leaving {
  animation: toastOut 200ms ease both;
}

.toast > span:first-child {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  color: var(--ink);
  border-radius: 50%;
  background: var(--paper);
  font-size: 10px;
}

.toast strong {
  display: block;
  font-size: 10px;
}

.toast small {
  display: block;
  margin-top: 2px;
  color: rgba(255,255,255,.62);
  font-size: 8px;
}

@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(7px); } }

.modal {
  width: min(920px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  box-shadow: 0 30px 100px rgba(16,27,22,.32);
}

.modal::backdrop {
  background: rgba(13, 24, 19, 0.64);
  backdrop-filter: blur(5px);
}

.modal[open] {
  animation: modalIn 250ms cubic-bezier(.16,.8,.25,1) both;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(15px) scale(.99); }
}

.modal-frame {
  max-height: calc(100dvh - 34px);
  padding: 28px;
  overflow-y: auto;
}

.compact-frame {
  max-width: 680px;
  margin: 0 auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.modal-header h2,
.review-toolbar h2 {
  margin: 6px 0 0;
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.035em;
}

.modal-header p {
  max-width: 520px;
  margin: 8px 0 0;
  color: var(--ink-faint);
  font-size: 10px;
  line-height: 1.55;
}

.modal-close {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 400;
}

.modal-close:hover {
  color: white;
  border-color: var(--ink);
  background: var(--ink);
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.plan-card {
  padding: 6px;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--paper-pale);
  transition: transform 170ms ease, border 170ms ease, box-shadow 170ms ease;
}

.plan-card:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(22,35,31,.10);
}

.plan-card.selected {
  border-color: var(--moss);
  box-shadow: 0 0 0 2px var(--moss);
}

.plan-card-art {
  display: grid;
  place-items: center;
  height: 138px;
  color: #788279;
  background-color: #eeebe1;
  background-image: linear-gradient(rgba(80,100,88,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(80,100,88,.08) 1px, transparent 1px);
  background-size: 14px 14px;
}

.plan-card-art svg {
  width: 85%;
  height: 82%;
  fill: rgba(38,74,61,.08);
  stroke: var(--moss);
  stroke-width: 1.5;
}

.plan-card-copy {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px;
  padding: 12px 8px 9px;
}

.plan-card-copy strong {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
}

.plan-card-copy span {
  grid-row: 2;
  color: var(--ink-faint);
  font: 400 8px/1.3 var(--font-mono);
  letter-spacing: 0.04em;
}

.plan-card-copy i {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  color: white;
  border-radius: 50%;
  background: var(--moss);
  font-size: 10px;
  font-style: normal;
  opacity: 0;
}

.plan-card.selected .plan-card-copy i {
  opacity: 1;
}

.upload-plan-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-top: 18px;
  padding: 18px;
  border: 1px dashed var(--line-dark);
  background: rgba(233,227,213,.5);
}

.upload-plan-row > div {
  display: flex;
  gap: 14px;
  align-items: center;
}

.upload-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-dark);
  border-radius: 50%;
  font-size: 18px;
}

.upload-plan-row div > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.upload-plan-row strong {
  font-size: 11px;
}

.upload-plan-row small {
  max-width: 450px;
  color: var(--ink-faint);
  font-size: 8px;
  line-height: 1.45;
}

.project-list {
  border-top: 1px solid var(--line);
}

.project-row {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  gap: 14px;
  align-items: center;
  width: 100%;
  padding: 12px 8px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.project-row:hover,
.project-row.active {
  background: var(--paper-warm);
}

.project-row-art {
  display: grid;
  place-items: center;
  width: 58px;
  height: 45px;
  color: var(--moss);
  background: var(--paper-pale);
}

.project-row-art svg {
  width: 43px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
}

.project-row > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.project-row strong {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 500;
}

.project-row small,
.project-row > small {
  color: var(--ink-faint);
  font: 400 8px/1.2 var(--font-mono);
  letter-spacing: 0.04em;
}

.new-project-button {
  display: flex;
  gap: 13px;
  align-items: center;
  width: 100%;
  margin-top: 14px;
  padding: 13px;
  text-align: left;
  border: 1px dashed var(--line-dark);
  background: transparent;
}

.new-project-button > span:first-child {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--moss);
  color: white;
}

.new-project-button > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.new-project-button strong { font-size: 10px; }
.new-project-button small { color: var(--ink-faint); font-size: 8px; }

.review-modal {
  width: min(1180px, calc(100vw - 24px));
}

.review-frame {
  max-height: calc(100dvh - 26px);
  overflow-y: auto;
  background: #dfdbcf;
}

.review-toolbar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line-dark);
  background: rgba(243,240,231,.96);
  backdrop-filter: blur(15px);
}

.review-toolbar h2 {
  font-size: 27px;
}

.review-actions {
  display: flex;
  gap: 7px;
  align-items: center;
}

.review-actions .modal-close {
  margin-left: 8px;
}

.spec-sheet {
  width: min(1040px, calc(100% - 40px));
  min-height: 760px;
  margin: 28px auto 40px;
  padding: 34px;
  background: #fbf9f3;
  box-shadow: 0 12px 48px rgba(26,38,31,.15);
}

.spec-header {
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  gap: 28px;
  align-items: start;
  padding-bottom: 22px;
  border-bottom: 2px solid var(--ink);
}

.spec-brand {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12px;
}

.spec-brand .wordmark-mark {
  width: 18px;
  height: 24px;
}

.spec-title > span,
.spec-status span {
  color: var(--ink-faint);
  font: 500 8px/1 var(--font-mono);
  letter-spacing: .09em;
  text-transform: uppercase;
}

.spec-title h3 {
  margin: 5px 0 2px;
  font-family: var(--font-serif);
  font-size: 27px;
  font-weight: 500;
}

.spec-title p {
  margin: 0;
  color: var(--ink-faint);
  font: 400 8px/1.3 var(--font-mono);
}

.spec-status {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px 12px;
  border: 1px solid var(--moss);
  background: var(--moss-pale);
}

.spec-status strong {
  font-size: 10px;
}

.spec-hero {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line-dark);
}

.spec-elevation {
  display: grid;
  place-items: center;
  min-height: 245px;
  background-color: #f3f0e7;
  background-image: linear-gradient(rgba(80,100,88,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(80,100,88,.07) 1px, transparent 1px);
  background-size: 16px 16px;
}

.spec-elevation svg {
  width: 90%;
  max-height: 220px;
}

.spec-overview dl {
  margin: 12px 0 0;
}

.spec-overview dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  font-size: 9px;
}

.spec-overview dt {
  color: var(--ink-faint);
}

.spec-overview dd {
  margin: 0;
  font-weight: 700;
}

.spec-overview p {
  margin: 15px 0 0;
  color: var(--ink-faint);
  font-size: 8px;
  line-height: 1.55;
}

.spec-table-wrap {
  padding: 23px 0 10px;
}

.spec-section-head {
  display: flex;
  gap: 9px;
  align-items: center;
}

.spec-section-head > span {
  color: var(--signal);
  font: 500 8px/1 var(--font-mono);
}

.spec-section-head h4 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
}

.spec-section-head small {
  margin-left: auto;
  color: var(--ink-faint);
  font: 400 8px/1 var(--font-mono);
}

.spec-table {
  width: 100%;
  margin-top: 12px;
  border-collapse: collapse;
  font-size: 8px;
}

.spec-table th {
  padding: 8px 6px;
  text-align: left;
  color: var(--ink-faint);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  font: 500 7px/1 var(--font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.spec-table td {
  padding: 9px 6px;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
}

.spec-table td:first-child {
  color: var(--ink-faint);
  font: 500 7px/1 var(--font-mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.spec-product {
  display: flex;
  gap: 8px;
  align-items: center;
}

.mini-swatch {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(22,35,31,.18);
}

.spec-product strong {
  font-size: 9px;
}

.status-chip {
  display: inline-flex;
  padding: 5px 7px;
  border-radius: 2px;
  font: 500 7px/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.status-chip.selected,
.status-chip.ready {
  color: #27513c;
  background: #dcebdc;
}

.status-chip.live { color: #88401f; background: #f7dfd3; }
.status-chip.planned { color: #645b45; background: #e8e0c8; }

.spec-notes {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 28px;
  margin-top: 18px;
  padding-top: 20px;
  border-top: 1px solid var(--line-dark);
}

.spec-notes textarea {
  width: 100%;
  min-height: 104px;
  margin-top: 12px;
  padding: 11px;
  resize: vertical;
  border: 1px solid var(--line-dark);
  border-radius: 0;
  background: transparent;
  font-size: 9px;
  line-height: 1.5;
}

.spec-notes ul {
  margin: 12px 0 0;
  padding-left: 17px;
  color: var(--ink-soft);
  font-size: 8px;
  line-height: 1.9;
}

.spec-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 28px;
  padding-top: 10px;
  color: var(--ink-faint);
  border-top: 2px solid var(--ink);
  font: 400 7px/1 var(--font-mono);
  letter-spacing: .06em;
}

.material-detail-hero {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 22px;
  align-items: stretch;
}

.material-detail-swatch {
  min-height: 205px;
  border: 1px solid var(--line-dark);
}

.material-detail-copy {
  padding: 8px 0;
}

.material-detail-copy h2 {
  margin: 7px 0 4px;
  font-family: var(--font-serif);
  font-size: 31px;
  font-weight: 500;
  line-height: .98;
}

.material-detail-copy > p {
  margin: 12px 0 0;
  color: var(--ink-faint);
  font-size: 10px;
  line-height: 1.55;
}

.material-detail-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
  margin-top: 17px;
}

.material-detail-meta div {
  padding-top: 7px;
  border-top: 1px solid var(--line);
}

.material-detail-meta span {
  display: block;
  color: var(--ink-faint);
  font: 400 7px/1 var(--font-mono);
  text-transform: uppercase;
}

.material-detail-meta strong {
  display: block;
  margin-top: 4px;
  font-size: 9px;
}

.detail-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.provider-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.provider-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.provider-logo {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--paper-pale);
  background: var(--moss);
  font: 500 9px/1 var(--font-mono);
}

.provider-row > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.provider-row strong { font-size: 10px; }
.provider-row small { color: var(--ink-faint); font-size: 8px; line-height: 1.4; }

.modal-note {
  margin-top: 18px;
  padding: 14px;
  border-left: 3px solid var(--signal);
  background: var(--paper-warm);
}

.modal-note strong { font-size: 9px; }
.modal-note p { margin: 4px 0 0; color: var(--ink-faint); font-size: 8px; line-height: 1.5; }

.brief-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.brief-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--ink-faint);
  font: 500 8px/1 var(--font-mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.brief-form select {
  height: 42px;
  padding: 0 10px;
  color: var(--ink);
  border: 1px solid var(--line-dark);
  border-radius: 0;
  background: var(--paper-pale);
  font-family: var(--font-sans);
  font-size: 9px;
  text-transform: none;
}

.modal-submit {
  float: right;
  margin-top: 20px;
}

@media (max-width: 1220px) {
  .app-shell {
    grid-template-columns: 190px minmax(480px, 1fr) 340px;
  }

  .topbar {
    grid-template-columns: 190px minmax(210px, 1fr) auto auto;
  }

  .wordmark small,
  .save-state {
    display: none;
  }

  .wordmark {
    grid-template-columns: 25px auto;
  }

  .workflow-intro {
    padding-right: 18px;
    padding-left: 18px;
  }

  .workflow-intro > strong {
    font-size: 23px;
  }

  .workspace-toolbar {
    padding: 0 10px;
  }

  .view-tab {
    padding: 0 8px;
  }

  .new-badge,
  .drawing-tools > span {
    display: none;
  }

  .site-control-upload small {
    display: none;
  }

  .material-grid {
    gap: 7px;
    padding-right: 14px;
    padding-left: 14px;
  }

  .catalogue-header,
  .category-scroller,
  .catalogue-search,
  .filter-panel,
  .catalogue-summary,
  .catalogue-footer {
    padding-right: 14px;
    padding-left: 14px;
  }
}

@media (max-width: 1020px) {
  .app-shell {
    grid-template:
      "topbar topbar" 68px
      "workspace catalogue" minmax(0, 1fr) /
      minmax(480px, 1fr) 340px;
  }

  .topbar {
    grid-template-columns: 180px minmax(170px, 1fr) auto;
  }

  .workflow {
    display: none;
  }

  .top-actions .icon-button,
  .top-actions .button-quiet {
    display: none;
  }

  .plan-control {
    display: none;
  }

  .workspace-toolbar {
    justify-content: space-between;
  }

  .site-controls {
    grid-template-columns: 1.1fr repeat(2, 1fr);
  }

  .site-controls .range-control:last-child {
    display: none;
  }
}

@media (max-width: 760px) {
  body {
    overflow: hidden;
  }

  .app-shell {
    position: relative;
    display: grid;
    grid-template:
      "topbar" 60px
      "workspace" minmax(0, 1fr)
      "trigger" 64px /
      1fr;
  }

  .topbar {
    grid-template-columns: 132px minmax(0, 1fr) auto;
    height: 60px;
  }

  .wordmark {
    grid-template-columns: 20px auto;
    gap: 7px;
    padding: 0 12px;
    font-size: 11px;
  }

  .wordmark-mark {
    grid-template-columns: repeat(3, 4px);
    width: 16px;
    height: 22px;
  }

  .project-crumb {
    gap: 0;
    padding: 0 10px;
  }

  .project-crumb > .eyebrow,
  .project-switcher span,
  .project-switcher svg {
    display: none;
  }

  .project-switcher {
    width: 100%;
    padding: 8px;
  }

  .project-switcher strong {
    max-width: 100%;
    font-size: 10px;
  }

  .top-actions {
    padding: 0 9px;
  }

  .top-actions .button-ink {
    width: 38px;
    min-height: 38px;
    padding: 0;
    font-size: 0;
  }

  .button-count {
    margin: 0;
    font-size: 8px;
  }

  .workspace {
    min-width: 0;
  }

  .workspace-toolbar {
    height: 54px;
    padding: 0 9px;
  }

  .view-tabs {
    height: 37px;
  }

  .view-tab {
    padding: 0 7px;
    font-size: 9px;
  }

  .view-tab svg {
    width: 14px;
    height: 14px;
  }

  .drawing-tools {
    height: 36px;
  }

  .drawing-tools .tool-button:first-child,
  .drawing-tools .tool-button:nth-child(3) {
    display: none;
  }

  .drawing-tools .fit-button {
    border: 0;
  }

  .preview-stage {
    height: calc(100% - 54px);
  }

  .canvas-wrap {
    margin: 8px 8px 0;
  }

  .drawing-meta {
    top: 15px;
    right: 14px;
    left: 14px;
  }

  .north-mark {
    width: 27px;
    height: 27px;
  }

  .house-drawing {
    width: 145%;
    margin-left: -22.5%;
  }

  .studio-heading {
    top: 16px;
    left: 16px;
    max-width: 235px;
  }

  .model-state {
    padding: 5px 7px;
    font-size: 6px;
  }

  .studio-heading h2 {
    margin-top: 10px;
    font-size: 36px;
  }

  .studio-heading p {
    max-width: 220px;
    font-size: 8px;
  }

  .studio-compass {
    display: none;
  }

  .studio-controls {
    right: 9px;
    bottom: 9px;
    left: 9px;
    gap: 4px;
    min-height: 48px;
    padding: 5px;
  }

  .camera-presets {
    gap: 2px;
  }

  .camera-preset {
    min-height: 36px;
    padding: 0 8px;
    font-size: 7px;
  }

  .camera-preset[data-camera="rear"],
  .camera-preset[data-camera="top"] {
    display: none;
  }

  .studio-control-divider {
    height: 22px;
    margin: 0 1px;
  }

  .studio-sun-control {
    grid-template-columns: 18px minmax(45px, 1fr);
    gap: 5px;
    min-width: 78px;
    padding: 0 4px;
  }

  .studio-sun-control > span {
    gap: 0;
    overflow: hidden;
    width: 18px;
    font-size: 0;
  }

  .studio-icon-button {
    width: 35px;
    height: 35px;
  }

  #autoRotateButton {
    display: none;
  }

  .studio-gesture {
    bottom: 68px;
    left: 14px;
    padding: 7px 9px;
  }

  .gesture-orbit {
    width: 22px;
    height: 22px;
  }

  .studio-gesture small {
    display: none;
  }

  .surface-tooltip {
    min-width: 125px;
  }

  .selection-strip {
    flex: 0 0 62px;
    min-height: 62px;
    margin: 7px 8px 8px;
  }

  .selection-item {
    grid-template-columns: 26px minmax(70px, 1fr);
    flex-basis: 112px;
    padding: 7px 8px;
  }

  .selection-swatch {
    width: 26px;
    height: 35px;
  }

  .site-controls {
    grid-template-columns: 1fr 1fr;
    margin: 0 8px;
  }

  .site-controls .range-control:nth-of-type(2) {
    display: none;
  }

  .site-control-upload,
  .range-control {
    min-height: 50px;
  }

  .site-control-upload .button {
    width: 100%;
    font-size: 8px;
  }

  .site-caption {
    right: 12px;
    bottom: 11px;
  }

  .site-caption strong {
    font-size: 14px;
  }

  .catalogue {
    position: fixed;
    inset: 60px 0 0;
    z-index: 100;
    display: flex;
    border-left: 0;
    transform: translateY(105%);
    transition: transform 320ms cubic-bezier(.16,.8,.25,1);
  }

  .catalogue.mobile-open {
    transform: translateY(0);
  }

  .mobile-close {
    display: grid;
    position: absolute;
    top: 14px;
    right: 14px;
  }

  .live-label {
    margin-right: 45px;
  }

  .material-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .material-swatch {
    height: 112px;
  }

  .mobile-material-trigger {
    grid-area: trigger;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    padding: 0 14px;
    text-align: left;
    color: var(--paper-pale);
    background: var(--ink);
  }

  .mobile-material-trigger > span {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .mobile-material-trigger small {
    color: rgba(255,255,255,.55);
    font: 400 7px/1 var(--font-mono);
    letter-spacing: .08em;
    text-transform: uppercase;
  }

  .mobile-material-trigger strong {
    font-family: var(--font-serif);
    font-size: 17px;
    font-weight: 400;
  }

  .mobile-material-trigger > span:last-child {
    flex-direction: row;
    gap: 8px;
    align-items: center;
    font-size: 9px;
  }

  .mobile-material-trigger b {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    color: var(--ink);
    border-radius: 50%;
    background: var(--paper);
    font: 500 8px/1 var(--font-mono);
  }

  .modal {
    width: calc(100vw - 14px);
    max-height: calc(100dvh - 14px);
  }

  .modal-frame {
    max-height: calc(100dvh - 16px);
    padding: 19px;
  }

  .modal-header h2,
  .review-toolbar h2 {
    font-size: 28px;
  }

  .plan-grid {
    grid-template-columns: 1fr;
  }

  .plan-card {
    display: grid;
    grid-template-columns: 125px 1fr;
  }

  .plan-card-art {
    height: 100px;
  }

  .upload-plan-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .upload-plan-row .button {
    width: 100%;
  }

  .brief-form {
    grid-template-columns: 1fr;
  }

  .review-toolbar {
    align-items: flex-start;
    padding: 15px;
  }

  .review-toolbar > div:first-child {
    display: none;
  }

  .review-actions {
    width: 100%;
  }

  .review-actions .button {
    flex: 1;
    padding: 0 8px;
    font-size: 8px;
  }

  .spec-sheet {
    width: calc(100% - 14px);
    margin: 8px auto 20px;
    padding: 18px;
  }

  .spec-header {
    grid-template-columns: 1fr auto;
  }

  .spec-title {
    grid-row: 2;
    grid-column: 1 / -1;
  }

  .spec-hero,
  .spec-notes {
    grid-template-columns: 1fr;
  }

  .spec-table-wrap {
    overflow-x: auto;
  }

  .spec-table {
    min-width: 650px;
  }

  .material-detail-hero {
    grid-template-columns: 1fr;
  }

  .material-detail-swatch {
    min-height: 160px;
  }
}

@media (max-height: 720px) and (min-width: 761px) {
  .workflow-intro { padding-top: 18px; padding-bottom: 15px; }
  .workflow-intro > strong { font-size: 21px; }
  .workflow-step { min-height: 56px; }
  .workflow-foot { padding-top: 15px; }
  .material-swatch { height: 72px; }
  .material-copy { min-height: 56px; }
  .catalogue-header { padding-top: 14px; }
  .catalogue-header h1 { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Image-first style gallery */
.style-gallery {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: none;
  overflow: hidden;
  color: white;
  background: #2e3733;
  isolation: isolate;
}

.studio-mode .style-gallery {
  display: block;
}

.studio-mode .three-stage {
  display: none;
}

.scheme-hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.002);
  transition: opacity 220ms ease, transform 900ms cubic-bezier(.16,.8,.25,1);
}

.scheme-image-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10,18,15,.56) 0%, rgba(10,18,15,.2) 34%, transparent 66%),
    linear-gradient(180deg, rgba(8,14,12,.12), transparent 48%, rgba(8,14,12,.55));
}

.scheme-hero-copy {
  position: absolute;
  z-index: 2;
  top: 28px;
  left: 28px;
  max-width: 430px;
  text-shadow: 0 2px 20px rgba(7,14,11,.35);
}

.scheme-kicker {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  font: 500 7px/1 var(--font-mono);
  letter-spacing: .11em;
  text-transform: uppercase;
}

.scheme-kicker i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7ac58d;
  box-shadow: 0 0 0 4px rgba(122,197,141,.14);
}

.scheme-count {
  display: block;
  margin-top: 28px;
  color: rgba(255,255,255,.7);
  font: 400 8px/1 var(--font-mono);
  letter-spacing: .12em;
}

.scheme-hero-copy h2 {
  max-width: 500px;
  margin: 9px 0 8px;
  font-family: var(--font-serif);
  font-size: clamp(38px, 5.8vw, 72px);
  font-weight: 400;
  line-height: .88;
  letter-spacing: -.05em;
}

.scheme-hero-copy p {
  max-width: 330px;
  margin: 0;
  color: rgba(255,255,255,.78);
  font-size: 11px;
  line-height: 1.5;
}

.scheme-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 16px;
}

.scheme-tags span {
  padding: 6px 8px;
  border: 1px solid rgba(255,255,255,.34);
  background: rgba(11,22,17,.22);
  backdrop-filter: blur(10px);
  font: 500 7px/1 var(--font-mono);
  letter-spacing: .05em;
  text-transform: uppercase;
}

.scheme-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  color: var(--ink);
  border: 0;
  background: rgba(255,255,255,.94);
  box-shadow: 0 12px 32px rgba(7,14,11,.14);
  font-size: 24px;
  transform: translateY(-50%);
  transition: background 160ms ease, transform 160ms ease;
}

.scheme-arrow:hover {
  background: white;
  transform: translateY(-50%) scale(1.04);
}

.scheme-arrow-prev { left: 0; }
.scheme-arrow-next { right: 0; }

.scheme-hero-actions {
  position: absolute;
  z-index: 2;
  right: 22px;
  bottom: 20px;
  left: 22px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-end;
  padding: 14px 15px;
  border: 1px solid rgba(255,255,255,.23);
  background: rgba(12,24,18,.58);
  box-shadow: 0 12px 30px rgba(6,13,10,.15);
  backdrop-filter: blur(16px);
}

.scheme-hero-actions > span {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.scheme-hero-actions strong { font-size: 10px; }
.scheme-hero-actions small { color: rgba(255,255,255,.58); font-size: 7px; }
.scheme-hero-actions > div { display: flex; gap: 6px; }

.scheme-button-light,
.scheme-button-white {
  min-height: 37px;
  padding: 0 12px;
  font-size: 8px;
}

.scheme-button-light {
  color: white;
  border-color: rgba(255,255,255,.4);
  background: transparent;
}

.scheme-button-white {
  color: var(--ink);
  border-color: white;
  background: white;
}

.scheme-panel {
  display: none;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.app-shell[data-view="studio"] .scheme-panel { display: flex; }

.app-shell[data-view="studio"] .category-scroller,
.app-shell[data-view="studio"] .catalogue-search,
.app-shell[data-view="studio"] .filter-panel,
.app-shell[data-view="studio"] .catalogue-summary,
.app-shell[data-view="studio"] .material-grid,
.app-shell[data-view="studio"] .catalogue-footer {
  display: none;
}

.scheme-filter-row {
  display: flex;
  gap: 5px;
  padding: 12px 16px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  scrollbar-width: none;
}

.scheme-filter-row button {
  flex: 0 0 auto;
  padding: 6px 9px;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper-pale);
  font-size: 8px;
}

.scheme-filter-row button.active {
  color: white;
  border-color: var(--moss);
  background: var(--moss);
}

.scheme-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-height: 0;
  padding: 12px 16px;
  overflow-y: auto;
}

.scheme-card {
  position: relative;
  min-height: 132px;
  overflow: hidden;
  color: white;
  border: 2px solid transparent;
  background: #506057;
  text-align: left;
}

.scheme-card.selected { border-color: var(--moss); }
.scheme-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scheme-card::after { position: absolute; inset: 0; content: ""; background: linear-gradient(180deg, transparent 32%, rgba(8,16,12,.78)); }
.scheme-card > span { position: absolute; z-index: 2; right: 9px; bottom: 9px; left: 9px; display: flex; flex-direction: column; gap: 3px; }
.scheme-card small { color: rgba(255,255,255,.65); font: 400 6px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.scheme-card strong { font-family: var(--font-serif); font-size: 15px; font-weight: 500; line-height: 1; }
.scheme-card .scheme-selected-mark { position: absolute; z-index: 3; top: 8px; right: 8px; display: grid; place-items: center; width: 21px; height: 21px; border-radius: 50%; background: white; color: var(--moss); font-size: 10px; }

.scheme-panel-note {
  margin-top: auto;
  padding: 14px 16px 17px;
  border-top: 1px solid var(--line);
  background: #ece8db;
}

.scheme-panel-note p {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 8px;
  line-height: 1.5;
}

/* Optional section and Site Check journey */
.site-journey-frame { width: min(960px, calc(100vw - 32px)); }
.site-path-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.site-path-card { display: grid; grid-template-columns: auto 1fr; gap: 13px; min-height: 135px; padding: 18px; text-align: left; border: 1px solid var(--line); background: var(--paper-pale); }
.site-path-card.featured { color: white; border-color: var(--moss); background: var(--moss); }
.site-path-number { color: var(--signal); font: 500 8px/1 var(--font-mono); }
.site-path-card span:nth-child(2) { display: flex; flex-direction: column; gap: 6px; }
.site-path-card strong { font-family: var(--font-serif); font-size: 22px; font-weight: 500; line-height: 1; }
.site-path-card small { max-width: 280px; color: var(--ink-faint); font-size: 9px; line-height: 1.45; }
.site-path-card.featured small { color: rgba(255,255,255,.65); }
.site-path-card i { grid-column: 2; font-size: 8px; font-style: normal; font-weight: 700; }

.environment-chooser { margin-top: 20px; }
.environment-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; margin-top: 8px; }
.environment-grid button { display: flex; flex-direction: column; gap: 4px; padding: 6px 6px 11px; text-align: left; border: 1px solid var(--line); background: var(--paper-pale); }
.environment-grid button.selected { border-color: var(--moss); box-shadow: inset 0 0 0 1px var(--moss); }
.environment-art { height: 74px; margin-bottom: 5px; background: linear-gradient(180deg,#b8c9c5 0 46%,#66785f 47%); }
.environment-art.coastal { background: linear-gradient(180deg,#b8d5df 0 48%,#d7cfab 49% 72%,#87966d 73%); }
.environment-art.rural { background: linear-gradient(165deg,#b8c8c3 0 44%,#899d70 45% 67%,#4e6749 68%); }
.environment-art.urban { background: linear-gradient(135deg,#ccd3d0 0 42%,#5e6863 43% 56%,#7f8b76 57%); }
.environment-grid strong { font-size: 9px; }
.environment-grid small { color: var(--ink-faint); font-size: 7px; line-height: 1.35; }

.site-check-entry { display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 14px; align-items: end; margin-top: 20px; padding: 16px; color: white; background: #13261e; }
.site-check-entry > span { display: flex; flex-direction: column; gap: 4px; }
.site-check-entry > span small { color: #8bb293; font: 500 7px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; }
.site-check-entry > span strong { font-family: var(--font-serif); font-size: 23px; font-weight: 500; }
.site-check-entry p { margin: 0; color: rgba(255,255,255,.58); font-size: 8px; line-height: 1.45; }
.site-check-entry label { display: flex; flex-direction: column; gap: 5px; color: rgba(255,255,255,.65); font: 500 7px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .06em; }
.site-check-entry input { height: 38px; padding: 0 10px; color: var(--ink); border: 1px solid rgba(255,255,255,.25); background: white; font: 400 9px/1 var(--font-sans); text-transform: none; letter-spacing: 0; }
.site-check-entry .button { min-height: 38px; color: var(--ink); border-color: var(--signal); background: var(--signal); }
.site-journey-boundary { margin: 11px 0 0; color: var(--ink-faint); font-size: 7px; line-height: 1.45; }

.site-preview[data-environment="coastal"] .site-sky { background: radial-gradient(circle at 70% 18%,rgba(255,248,207,.85),transparent 18%),linear-gradient(180deg,#acd0dc 0%,#e1ddc5 64%,#c5b98f 100%); }
.site-preview[data-environment="coastal"] .hill-back { background:#b8b28a; }
.site-preview[data-environment="coastal"] .hill-front { background:#77836a; }
.site-preview[data-environment="rural"] .hill-back { background:#80936c; }
.site-preview[data-environment="rural"] .hill-front { background:#405d43; }
.site-preview[data-environment="urban"] .hill-back { border-radius:0; background:#87918a; clip-path:polygon(0 44%,18% 44%,18% 10%,36% 10%,36% 53%,58% 53%,58% 22%,78% 22%,78% 46%,100% 46%,100% 100%,0 100%); }
.site-preview[data-environment="urban"] .hill-front { background:#52645b; }

@media (max-width: 1020px) {
  .scheme-hero-copy h2 { font-size: 48px; }
  .scheme-list { grid-template-columns: 1fr; }
  .scheme-card { min-height: 112px; }
  .environment-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .site-check-entry { grid-template-columns: 1fr 1fr; }
  .site-check-entry > span { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .scheme-hero-copy { top: 24px; left: 18px; max-width: calc(100% - 36px); }
  .scheme-count { margin-top: 18px; }
  .scheme-hero-copy h2 { max-width: 300px; font-size: 43px; }
  .scheme-hero-copy p { max-width: 270px; font-size: 9px; }
  .scheme-tags { display: none; }
  .scheme-arrow { top: 56%; width: 42px; height: 50px; font-size: 18px; }
  .scheme-hero-actions { right: 10px; bottom: 10px; left: 10px; padding: 10px; }
  .scheme-hero-actions > span small { display: none; }
  .scheme-hero-actions > div .scheme-button-light { display: none; }
  .scheme-button-white { min-height: 34px; padding: 0 9px; }
  .site-path-grid { grid-template-columns: 1fr; }
  .environment-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .site-check-entry { grid-template-columns: 1fr; }
  .site-check-entry > span { grid-column: auto; }
}

@media print {
  @page {
    size: A4 landscape;
    margin: 10mm;
  }

  body {
    overflow: visible;
    background: white;
  }

  body > *:not(.review-modal) {
    display: none !important;
  }

  .review-modal {
    position: static;
    display: block;
    width: auto;
    max-height: none;
    overflow: visible;
    border: 0;
    box-shadow: none;
  }

  .review-frame {
    max-height: none;
    overflow: visible;
    background: white;
  }

  .no-print {
    display: none !important;
  }

  .spec-sheet {
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    box-shadow: none;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .spec-elevation { min-height: 180px; }
  .spec-elevation svg { max-height: 165px; }
  .spec-notes textarea { min-height: 70px; }
}
