/* Flatmate site · the sentence is the layout. Sand paper and one cobalt; Libre Franklin over Source Serif 4. */
:root {
  --bg: #f7f7f5;
  --surface: #ebebe6;
  --ink: #062b8a;
  --muted: #3a5aa8;
  --accent: #062b8a;
  --accent-ink: #f7f7f5;
  --paper: #ffffff;
  --edge: clamp(20px, 3vw, 40px); /* the page's gutter */
  --wide: max(0px, (100vw - 1520px) / 2); /* past 1520 px the content stays 1440 px wide, centred; colour fields still run edge to edge */
  --margin: calc(var(--edge) + var(--wide));
  --step-small: 1rem;
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.5vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 2.2vw, 3.5rem);
  --step-display: clamp(3.25rem, 6.6vw, 6.5rem);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --display: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;
  --text: "Source Serif 4", Georgia, serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--step-body)/1.55 var(--text); -webkit-font-smoothing: antialiased; }
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 700; letter-spacing: -0.035em; line-height: 0.95; text-wrap: balance; }
p, figure, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
::selection { background: var(--ink); color: var(--bg); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }

/* the bar */
.bar { position: absolute; inset: 0 0 auto; z-index: 5; display: flex; justify-content: space-between; align-items: center; padding: 24px var(--margin); }
.house-page .bar { position: static; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font: 700 var(--step-lead)/1 var(--display); letter-spacing: -0.04em; text-decoration: none; }
.mark { display: block; }
.bar nav { display: flex; gap: 28px; align-items: center; font: 700 var(--step-small)/1 var(--display); letter-spacing: -0.01em; }
.bar nav a:not(.button) { text-decoration: none; }
.bar nav a:not(.button):hover { text-decoration: underline; text-underline-offset: 4px; }

.button { display: inline-flex; align-items: center; min-height: 52px; padding: 0 24px; background: var(--ink); color: var(--bg); font: 700 var(--step-small)/1 var(--display); letter-spacing: -0.01em; text-decoration: none; border: 0; transition: transform 140ms, background 160ms; }
.button:hover { background: #0a3cb8; }
.button:active { transform: scale(0.97); }
.button-small { min-height: 44px; padding: 0 18px; }
.button-invert { background: var(--bg); color: var(--ink); }
.button-invert:hover { background: var(--paper); }
.text-link { font: 700 var(--step-small)/1.2 var(--display); text-underline-offset: 5px; }

/* ---------- hero: the pitch beside the picture, on cobalt ---------- */
.hero { background: var(--ink); color: #fff; padding: 136px var(--margin) 0; display: grid; gap: 56px; }
.hero-top { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: center; }
.hero-text { grid-column: 1 / span 6; display: grid; gap: 24px; justify-items: start; }
.hero-pic { grid-column: 7 / -1; margin: 0; }
.hero-pic img { display: block; width: 100%; aspect-ratio: 1600 / 901; object-fit: cover; }
.hero-title { font-size: clamp(3rem, 5.4vw, 5.5rem); line-height: 0.9; text-wrap: nowrap; letter-spacing: -0.04em; text-transform: uppercase; }
.hero-title .hl { display: block; }
.hero-say { max-width: 40ch; color: var(--bg); font-size: var(--step-body); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; margin: 0; }
.hero-actions .text-link { color: #fff; }
/* the app's window, whole: it starts on the blue and ends on the page */
.hero-window { margin: 0 0 -96px; background: var(--paper); }
.hero-window img { display: block; width: 100%; }
.hero-watch { position: relative; display: block; }
.hero-play { position: absolute; left: 50%; top: 50%; width: 112px; height: 112px; margin: -56px 0 0 -56px; display: grid; place-items: center; background: var(--ink); color: #fff; opacity: 0; transform: scale(0.92); transition: opacity 160ms, transform 200ms var(--ease-out); }
.hero-play svg { margin-left: 4px; }
.hero-watch:hover .hero-play, .hero-watch:focus-visible .hero-play { opacity: 1; transform: none; }
@media (hover: none) { .hero-play { opacity: 1; transform: none; width: 72px; height: 72px; margin: -36px 0 0 -36px; } }

/* ---------- day and night: one plan, a switch, three numbers ---------- */
.daynight { padding: 216px var(--margin) 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 24px; align-items: end; }
.dn-head { grid-column: 1 / span 6; font-size: var(--step-head); max-width: 12ch; }
.dn-say { grid-column: 8 / -1; max-width: 44ch; }
.dn-fig { grid-column: 1 / -1; justify-self: center; width: min(100%, 800px); margin-top: 56px; position: relative; background: var(--paper); }
.dn-plan { display: block; width: 100%; transition: opacity 200ms; }
.dn-switch { position: absolute; left: 50%; bottom: 0; transform: translate(-50%, 50%); display: flex; background: var(--bg); padding: 6px; gap: 6px; }
.dn-switch button { min-width: 96px; min-height: 48px; padding: 0 22px; border: 0; background: transparent; color: var(--ink); font: 700 var(--step-small)/1 var(--display); cursor: pointer; }
.dn-switch button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
html:not(.js) .dn-switch { display: none; }
.dn-facts { grid-column: 1 / -1; justify-self: center; width: min(100%, 800px); margin: 72px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; text-align: center; }
.dn-facts dt { font: 700 clamp(1.5rem, 1.2rem + 1vw, 2.125rem)/1 var(--display); letter-spacing: -0.03em; }
.dn-facts dd { margin: 10px 0 0; font-size: var(--step-small); color: var(--muted); }

/* ---------- Claude: the pitch beside what a session looks like ---------- */
.claude { padding: 140px var(--margin) 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 48px 24px; align-items: center; }
.claude-text { grid-column: 1 / span 5; display: grid; gap: 28px; }
.claude-text h2 { font-size: var(--step-head); max-width: 11ch; }
.claude-text p { max-width: 40ch; }
.term { grid-column: 7 / -1; background: #0b1533; color: #fff; padding: 36px 40px; }
.term code { display: block; font: 400 0.98rem/1.6 ui-monospace, "SF Mono", Menlo, Consolas, monospace; } /* taste-skill-ignore: tool calls are literal code */
.term-ask { padding-left: 1.4em; text-indent: -1.4em; }
.term-ask::before { content: "› "; color: #8fb0ff; }
.term-ask:not(:first-child) { margin-top: 1.6em; }
.term-tools { color: #9aa6c7; }
.term-done { color: #9fe3b4; }
.term-done::before { content: "\2713\00a0"; }
.home .bar .wordmark, .home .bar nav a:not(.button) { color: #fff; }
.home .bar .button { background: #fff; color: var(--ink); }


/* ---------- one piece: its shape on the plan, its height in the panel, both in 3D, at one height ---------- */
.piece { padding: 120px var(--margin) 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 24px; align-items: end; }
.piece-head { grid-column: 1 / span 6; font-size: var(--step-head); max-width: 14ch; }
.piece-say { grid-column: 8 / -1; max-width: 44ch; font-size: var(--step-body); }
/* each picture grows by its width-to-height ratio, so the three stand at the same height */
.piece-row { grid-column: 1 / -1; margin-top: 56px; display: flex; gap: 24px; align-items: flex-start; }
.piece-fig { flex: 1 1 0; min-width: 0; }
.piece-fig-plan { flex-grow: 1.293; }
.piece-fig-panel { flex-grow: 0.582; }
.piece-fig-3d { flex-grow: 1.053; }
.piece-fig img { width: 100%; background: var(--paper); }
.piece-fig figcaption { padding-top: 14px; font-size: var(--step-small); max-width: 32ch; }
.piece-fig strong { font-family: var(--display); }

/* ---------- drag through the stages ---------- */
.stages { margin-top: 120px; display: grid; grid-template-columns: calc(var(--wide) + (100% - 2 * var(--wide)) * 5 / 12) minmax(0, 1fr); grid-template-rows: auto auto; } /* the split stays at 5 : 7 of the content width */
.stage-left { background: var(--ink); color: var(--bg); padding: 56px var(--edge) 56px var(--margin); display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.stage-clause { font-size: var(--step-head); max-width: 11ch; transition: opacity 200ms; }
.stage-note { max-width: 36ch; transition: opacity 200ms; }
.stage-right { background: var(--paper); display: grid; place-items: center; padding: 32px var(--margin) 32px var(--edge); }
.stage-pair { display: grid; grid-template-columns: 3fr 2fr; gap: 24px; align-items: center; width: 100%; }
.stage-plan { width: 100%; transition: opacity 200ms; }
.stage-3d { width: 100%; transition: opacity 200ms; }
.stage-track { grid-column: 1 / -1; background: var(--surface); padding: 18px var(--margin) 14px; }
.stage-track input { display: block; width: 100%; margin: 8px 0; appearance: none; -webkit-appearance: none; height: 4px; outline: none; background: linear-gradient(var(--ink), var(--ink)) 0 0 / var(--fill, 0%) 100% no-repeat, var(--bg); cursor: pointer; } /* taste-skill-ignore: a two-tone slider track, flat colours */
.stage-track input::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; background: var(--ink); border: 3px solid var(--surface); }
.stage-track input:focus-visible::-webkit-slider-thumb { border-color: var(--muted); }
.stage-track input::-moz-range-thumb { width: 14px; height: 14px; background: var(--ink); border: 3px solid var(--surface); border-radius: 0; }
.stage-names { margin-top: 6px; display: grid; grid-template-columns: repeat(4, 1fr); }
.stage-names li:nth-child(2) { text-align: center; padding-right: 14%; }
.stage-names li:nth-child(3) { text-align: center; padding-left: 14%; }
.stage-names li:last-child { text-align: right; }
.stage-names button { border: 0; background: none; padding: 6px 0; font: 700 var(--step-small)/1 var(--display); color: var(--ink); cursor: pointer; }
.stage-names .is-on button { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 3px; }

/* ---------- trace a plan picture: the sample plan opens the video ---------- */
.trace { padding: 140px var(--margin) 140px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 24px; align-items: center; }
.trace-text { grid-column: 1 / span 5; display: grid; gap: 28px; justify-items: start; }
.trace-text h2 { font-size: var(--step-head); max-width: 12ch; }
.trace-text p { max-width: 40ch; }
.trace-pic { grid-column: 6 / span 7; position: relative; display: block; background: var(--paper); cursor: pointer; }
.trace-pic img { width: 100%; transition: opacity 200ms; }
.trace-pic:hover img { opacity: 0.88; }
.trace-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 10px; min-height: 64px; padding: 0 26px 0 20px; background: var(--ink); color: var(--bg); font: 700 var(--step-lead)/1 var(--display); letter-spacing: -0.02em; transition: transform 160ms var(--ease-out); }
.trace-pic:hover .trace-play { transform: translate(-50%, -50%) scale(1.06); }
.trace-pic:active .trace-play { transform: translate(-50%, -50%) scale(0.97); }
.watch { width: min(1200px, calc(100vw - 2 * var(--edge))); max-width: none; padding: 0; border: 0; background: var(--ink); color: var(--bg); }
.watch::backdrop { background: rgb(6 43 138 / 0.85); }
.watch video { width: 100%; background: var(--paper); }
.watch form { display: flex; justify-content: flex-end; padding: 10px 12px; }
.watch-close { min-height: 44px; padding: 0 18px; border: 0; background: var(--bg); color: var(--ink); font: 700 var(--step-small)/1 var(--display); cursor: pointer; }

/* ---------- rows with margin pictures, on the cobalt field ---------- */
.features { background: var(--ink); color: var(--bg); padding: 120px var(--margin); display: grid; grid-template-columns: 35% minmax(0, 1fr); row-gap: 0; }
.features-head { grid-column: 1; grid-row: 1 / span 2; align-self: start; font-size: var(--step-head); } /* the title takes the left column, its rows the right */
.rows, .every { grid-column: 2; }
.rows { display: grid; gap: 80px; }
.row { position: relative; display: grid; grid-template-columns: minmax(0, 34ch) 1fr; grid-template-rows: auto 1fr; column-gap: 0; align-items: start; }
.row h3 { grid-column: 1; font-size: var(--step-lead); letter-spacing: -0.03em; }
.row p { grid-column: 1; margin-top: 18px; }
.row-pic { grid-column: 2; grid-row: 1 / span 2; justify-self: end; }
.row-pic img, .row-pic video { width: 100%; object-fit: cover; }
.row-pic { width: 380px; } .row-pic :is(img, video) { aspect-ratio: 16 / 10; background: var(--paper); } /* every row the same size and shape, so they line up */
.every { margin-top: 120px; }
.every-title { font-size: var(--step-lead); letter-spacing: -0.02em; }
.every-cols { margin-top: 36px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 48px; }
.every-col h4 { font-size: var(--step-small); letter-spacing: -0.01em; line-height: 1.3; }
.every-col ul { margin-top: 12px; display: grid; gap: 6px; }

/* ---------- small homes, with photographs ---------- */

/* ---------- the houses, by name ---------- */
.houses { padding: 140px var(--margin) 0; }
.houses h2 { font-size: var(--step-head); margin-bottom: 40px; }
.names { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 40px 24px; }
.card { display: grid; gap: 6px; color: var(--ink); text-decoration: none; }
.card-pic { display: block; margin-bottom: 10px; background: var(--paper); overflow: clip; }
.card-pic img { display: block; width: 100%; aspect-ratio: 6 / 5; object-fit: cover; transition: transform 400ms var(--ease-out); }
.card:is(:hover, :focus-visible) .card-pic img { transform: scale(1.05); }
.card-name { font-family: var(--display); font-weight: 700; font-size: var(--step-lead); letter-spacing: -0.03em; line-height: 1.15; }
.card:is(:hover, :focus-visible) .card-name { text-decoration: underline; text-underline-offset: 0.18em; }
.card-facts { font-size: var(--step-small); color: var(--muted); }
.names-note { margin-top: 48px; font-size: var(--step-body); max-width: 60ch; }

/* ---------- the idea again, inverted ---------- */
.close { margin-top: 140px; background: var(--ink); color: var(--bg); padding: 120px var(--margin) 96px; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px 64px; align-items: center; }
.close-title, .close-foot { grid-column: 1; }
.close-title { align-self: end; } .close-foot { align-self: start; }
.close-pic { grid-column: 2; grid-row: 1 / span 2; background: var(--paper); }
.close-pic img { display: block; width: 100%; aspect-ratio: 6 / 5; object-fit: cover; }
.close-title { font-size: var(--step-display); line-height: 0.9; text-transform: uppercase; letter-spacing: -0.045em; }
.close-title span { display: block; }
.close-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 24px 40px; }
.close-foot p { max-width: 30ch; font-size: var(--step-lead); line-height: 1.35; }
.close-foot .button { min-height: 56px; }

/* ---------- the footer, the command as the line ---------- */
.foot { background: var(--ink); color: var(--bg); padding: 72px var(--margin) 28px; display: grid; gap: 56px; }
.foot-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 16px 48px; font-size: var(--step-body); }
.foot-top strong { font-family: var(--display); font-weight: 700; letter-spacing: -0.03em; margin-right: 0.6em; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 28px; font: 700 var(--step-small)/1.3 var(--display); }
.foot-links a { text-decoration: none; }
.foot-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.foot-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: var(--step-small); opacity: 0.75; }

/* ---------- a house ---------- */
.house-top { padding: 72px var(--margin) 0; }
.house-name { font-size: var(--step-display); line-height: 0.9; letter-spacing: -0.045em; }
.house-line { margin-top: 28px; max-width: 34ch; font-size: var(--step-lead); line-height: 1.35; }
.facts { margin-top: 56px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.facts dt { font: 700 var(--step-small)/1.3 var(--display); }
.facts dd { margin-top: 4px; }
.house-actions { margin-top: 48px; display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.house-pair { padding: 120px var(--margin) 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: center; }
.pair-title { grid-column: 1 / -1; font-size: var(--step-head); margin-bottom: 24px; max-width: 16ch; }
.pair-plan { grid-column: 1 / span 7; background: var(--paper); padding: 24px; }
.pair-3d { grid-column: 8 / span 5; }
.pair-plan img, .pair-3d img { width: 100%; }
.house-film { margin-top: 160px; background: var(--ink); color: var(--bg); padding: 120px var(--margin); }
.house-film h2 { font-size: var(--step-head); margin-bottom: 48px; max-width: 16ch; }
.film { width: 100%; background: var(--paper); }
.house-shows { padding: 160px var(--margin) 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 24px; }
.house-shows h2 { grid-column: 1 / -1; font-size: var(--step-head); margin-bottom: 48px; }
.shows { grid-column: 1 / span 7; display: grid; gap: 22px; }
.shows li { display: grid; grid-template-columns: 38% 1fr; gap: 24px; }
.s-what { font: 700 var(--step-body)/1.35 var(--display); letter-spacing: -0.01em; }
.rooms { grid-column: 9 / span 4; align-self: start; border-collapse: collapse; width: 100%; }
.rooms caption { text-align: left; font: 700 var(--step-small)/1.3 var(--display); padding-bottom: 12px; }
.rooms th { text-align: left; font-weight: 400; padding: 8px 0; }
.rooms td { text-align: right; padding: 8px 0; font-variant-numeric: tabular-nums; }
.rooms tr:nth-child(odd) { background: var(--surface); }
.rooms tr:nth-child(odd) th { padding-left: 10px; }
.rooms tr:nth-child(odd) td { padding-right: 10px; }
.house-finishes { padding: 160px var(--margin) 0; }
.house-finishes h2 { font-size: var(--step-head); margin-bottom: 48px; }
.finishes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.finishes figure { background: var(--paper); }
.finishes img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.finishes figcaption { padding: 14px 18px; font: 700 var(--step-small)/1.3 var(--display); background: var(--bg); }
.house-turn { padding: 160px var(--margin) 0; }
.house-turn h2 { font-size: var(--step-head); margin-bottom: 48px; }
.turns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.turns.one { grid-template-columns: 1fr; }
.turns figure { background: var(--paper); }
.turns video { width: 100%; aspect-ratio: 984 / 700; object-fit: contain; }
.turns figcaption { padding: 14px 18px; font: 700 var(--step-small)/1.3 var(--display); background: var(--bg); }
.house-next { padding: 160px var(--margin) 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.house-next a { background: var(--surface); padding: 32px 28px; text-decoration: none; font: 700 var(--step-lead)/1.1 var(--display); letter-spacing: -0.03em; display: grid; gap: 10px; transition: background 160ms; }
.house-next a:hover { background: var(--ink); color: var(--bg); }
.house-next a span { font-size: var(--step-small); letter-spacing: 0; }
.house-next a:last-child { text-align: right; }
.house-page .foot { margin-top: 160px; }


/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .hero-title .hl { animation: rise 1000ms var(--ease-out) backwards; }
  .js .hero-title .hl + .hl { animation-delay: 120ms; }
  .js .hero-say { animation: fade 800ms var(--ease-out) 600ms backwards; }
  .js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out); transition-delay: calc(var(--d, 0) * 80ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js .row-pic { clip-path: inset(0 0 100% 0); transition: clip-path 900ms var(--ease-out) 150ms; }
  .js .row.is-in .row-pic { clip-path: inset(0); }
  .js .every-col, .js .shows li, .js .names li { opacity: 0; transform: translateY(16px); transition: opacity 600ms var(--ease-out), transform 800ms var(--ease-out), color 160ms; transition-delay: calc(var(--k, 0) * 70ms); }
  .js .is-in .every-col, .js .is-in li { opacity: 1; transform: none; }
  .js .close-title span { opacity: 0; transform: translateY(40px); transition: opacity 800ms var(--ease-out), transform 1000ms var(--ease-out); }
  .js .close.is-in .close-title span { opacity: 1; transform: none; }
  .js .close.is-in .close-title span + span { transition-delay: 120ms; }
}
@keyframes rise { from { opacity: 0; transform: translateY(0.25em); } }
@keyframes fade { from { opacity: 0; } }
@keyframes settle { from { transform: scale(1.06); } }
@keyframes field { from { transform: scaleY(0.6); } }

/* ---------- tablet ---------- */
@media (max-width: 1100px) {
  .piece-head, .piece-say { grid-column: 1 / -1; }
  .piece-say { margin-top: 24px; }
  .stages { grid-template-columns: 1fr; }
  .stage-right { order: -1; }
  .stage-left { padding-top: 56px; }
  .stage-track { order: 0; }
  .hero { padding-top: 120px; gap: 40px; }
  .hero-text, .hero-pic { grid-column: 1 / -1; }
  .hero-title { font-size: var(--step-display); }
  .hero-window { margin-bottom: -56px; }
  .daynight { padding-top: 152px; }
  .dn-head, .dn-say { grid-column: 1 / -1; }
  .dn-say { margin-top: 24px; }
  .claude-text, .term { grid-column: 1 / -1; }
  .trace { grid-template-columns: 1fr; gap: 48px; }
  .trace-text, .trace-pic { grid-column: 1 / -1; }
  .names { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .close { grid-template-columns: minmax(0, 1fr); }
  .close-pic { grid-column: 1; grid-row: auto; }
  .features { grid-template-columns: minmax(0, 1fr); padding-top: 100px; }
  .features-head { grid-row: auto; margin-bottom: 56px; }
  .rows, .every { grid-column: 1; }
  .row { grid-template-columns: minmax(0, 1fr) auto; column-gap: 32px; }
  .row h3, .row p { grid-column: 1; }
  .row-pic { grid-column: 2; }
  .house-pair { grid-template-columns: 1fr; }
  .pair-plan, .pair-3d { grid-column: 1 / -1; }
  .house-shows { grid-template-columns: 1fr; }
  .shows, .rooms { grid-column: 1 / -1; }
  .rooms { margin-top: 48px; }
  .facts { grid-template-columns: 1fr 1fr; }
}

/* ---------- phone ---------- */
@media (max-width: 700px) {
  :root { --step-display: 12vw; }
  .bar { padding: 18px 20px; }
  .bar nav { gap: 16px; }
  .bar nav a:not(.button) { display: none; }

  .piece { padding-top: 140px; }
  .piece-row { flex-direction: column; gap: 40px; margin-top: 40px; }
  .piece-fig { flex: none; width: 100%; }
  .piece-fig-panel { width: min(100%, 300px); }
  .stages { margin-top: 100px; }
  .stage-pair { grid-template-columns: 1fr; justify-items: center; }
  .stage-3d { width: 60%; }

  .stage-names { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stage-names li:nth-child(n) { text-align: left; padding: 0; }
  .hero-window { margin-bottom: -32px; }
  .daynight { padding-top: 112px; }
  .dn-facts { grid-template-columns: 1fr; gap: 28px; margin-top: 64px; }
  .term { padding: 24px 20px; }
  .term code { font-size: 0.86rem; }
  .trace { padding: 100px 20px; }
  .trace-play { min-height: 52px; padding: 0 20px 0 14px; font-size: var(--step-body); }
  .trace-text .button { width: 100%; justify-content: center; }
  .rows { gap: 64px; }
  .row { grid-template-columns: 1fr; }

  .row-pic { grid-column: 1; grid-row: auto; margin-top: 24px; justify-self: start; width: 100% !important; }
  .every-cols { grid-template-columns: 1fr; }
  .houses { padding-top: 140px; }
  .names { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 16px; }
  .close { margin-top: 96px; padding: 72px 20px 64px; }

  .close-foot .button { width: 100%; justify-content: center; }


  .facts { grid-template-columns: 1fr 1fr; gap: 16px; }
  .shows li { grid-template-columns: 1fr; gap: 4px; }
  .turns { grid-template-columns: 1fr; }
  .finishes { grid-template-columns: 1fr; }
  .house-next { grid-template-columns: 1fr; }
  .house-next a:last-child { text-align: left; }
}
