/* ==========================================================================
   learlabs.xyz · site.css
   Brand: docs/design/FINAL_brand.md ("True to the drawings", direction A, quiet luxury editorial).
   Layout: tech plan §6.1 (CSS sticky, no pin). Two presentations:
     - Tier D (default, JS off, reduced motion, no WebGL): normal flow, posters + text.
     - Live (html[data-tier=A|B|C], set by js/core/tier.js): fixed stage, tall
       sections (data-len × --u), sticky copy panels, bottom sheets on phones.
   No style="" attributes in the HTML (CSP has no 'unsafe-inline' for styles);
   per-element numbers come from data-* attribute selectors below.
   ========================================================================== */

/* Metric-matched local fallbacks (brand §3.1): the page keeps its line breaks when the web fonts swap in (CLS).
   Measured in Chrome 2026-11-28 by canvas width of the same sentences (Newsreader / Georgia: roman 1.003, italic 300
   0.865, italic 400 0.913; Hanken Grotesk / Arial 0.998) and fontBoundingBox ascent/descent (Newsreader 0.74/0.27,
   Hanken 1.00/0.30 em); overrides are divided by size-adjust. */
@font-face { font-family: "Newsreader Fallback"; src: local("Georgia"); size-adjust: 100.3%; ascent-override: 73.8%; descent-override: 26.9%; line-gap-override: 0%; }
@font-face { font-family: "Newsreader Fallback"; src: local("Georgia Italic"), local("Georgia"); font-style: italic; font-weight: 100 349; size-adjust: 86.5%; ascent-override: 85.5%; descent-override: 31.2%; line-gap-override: 0%; }
@font-face { font-family: "Newsreader Fallback"; src: local("Georgia Italic"), local("Georgia"); font-style: italic; font-weight: 350 900; size-adjust: 91.3%; ascent-override: 81%; descent-override: 29.6%; line-gap-override: 0%; }
@font-face { font-family: "Hanken Fallback"; src: local("Arial"), local("Helvetica Neue"), local("Helvetica"); size-adjust: 99.8%; ascent-override: 100.2%; descent-override: 30.1%; line-gap-override: 0%; }
/* First-visit quick fix 8 (2026-11-30): the web fonts are self-hosted (fonts/, OFL licences beside them). The same
   files Google Fonts served for this page: the Latin subsets of Newsreader (weight 300-500 and the optical-size axis,
   which `font-optical-sizing: auto` uses from 15 px captions to the 70 px headline, so it is kept) and Hanken Grotesk
   (400-600), with Google's own unicode-range. index.html preloads the roman headline face only. */
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 300 500; font-display: swap;
  src: url("../fonts/Newsreader-normal-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Newsreader"; font-style: italic; font-weight: 300 500; font-display: swap;
  src: url("../fonts/Newsreader-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("../fonts/HankenGrotesk-normal-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* First-visit quick fix 9: lenis@1.3.27/dist/lenis.css, inlined (it was a render-blocking stylesheet on cdn.jsdelivr.net) */
html.lenis, html.lenis body { height: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent], .lenis [data-lenis-prevent-wheel], .lenis [data-lenis-prevent-touch],
.lenis [data-lenis-prevent-vertical], .lenis [data-lenis-prevent-horizontal] { overscroll-behavior: contain; }
.lenis.lenis-smooth iframe { pointer-events: none; }
.lenis.lenis-autoToggle { transition-property: overflow; transition-duration: 1ms; transition-behavior: allow-discrete; }

:root {
  /* Grounds: limestone, lime wash, plaster */
  --limestone:   #F3EFE7;
  --limewash:    #FBF9F5;
  --travertine:  #E9E2D6;
  --paper:       #F7F4EE;
  --plaster:     #E4DED3;
  --clay:        #EFEAE2;

  /* Ink */
  --ink:         #1D1A16;
  --ink-soft:    #4F463D;
  --muted:       #665C51;
  --line:        #D8D0C2;
  --line-strong: #80766A;

  /* Accent: bronze, from the window frames (MT-01) */
  --bronze:      #7A5533;
  --bronze-ink:  #6B4A2C;

  /* The architect's pens */
  --draft:       #2F4B6C;
  --redline:     #A3412A;
  --redline-3d:  #C25A3C;
  --moss:        #4C5838;

  /* Dusk and night */
  --dusk:        #1A1C22;
  --dusk-2:      #121317;
  --ink-deep:    #15130F;
  --chalk:       #F2EDE4;
  --muted-dark:  #A59D92;
  --lamp:        #D6B383;
  --draft-light: #93ABC8;
  --line-dark:   rgba(242, 237, 228, .14);

  /* Blueprint (promise band only) */
  --blueprint:       #1F3349;
  --blueprint-grid:  rgba(147, 171, 200, .14);
  --blueprint-muted: #B6C4D4;

  /* Status on dark */
  --pass-dark:    #9FB08A;
  --flagged-dark: #E08A6E;

  /* Swatch colour */
  --buff:        #D9CAB0;

  /* Panel glass */
  --glass-light: rgba(251, 249, 245, .92);
  --glass-dark:  rgba(18, 19, 23, .72);

  --shadow-soft: 0 1px 2px rgba(29, 26, 22, .04), 0 12px 32px -14px rgba(29, 26, 22, .16);
  --shadow-lift: 0 30px 60px -40px rgba(29, 26, 22, .28);
  --sec-pad: clamp(96px, 11vw, 168px);          /* after-story section rhythm */

  --f-display: "Newsreader", "Newsreader Fallback", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --f-body:    "Hanken Grotesk", "Hanken Fallback", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --f-data:    var(--f-body);
  --f-mono:    var(--f-data);                    /* alias: ".mono" now means "data style" */

  --r-card: 4px;
  --r-panel: 4px;
  --r-pill: 2px;
  --r-img: 2px;
  --gutter: 16px;
  --maxw: 1280px;
  --bar-h: 64px;

  /* MOTION LANGUAGE: one curve, three durations, one stagger step. Every text reveal on the page (headings word by
     word, line by line; copy blocks; panel items; cards) rises by --rise and fades in over --d-reveal on --ease-out. */
  --ease-out: cubic-bezier(.16, 1, .3, 1);      /* expo.out: everything that arrives */
  --ease-io: cubic-bezier(.45, 0, .55, 1);      /* power2.inOut: things that travel (sheets, dialogs) */
  --ease-in: cubic-bezier(.5, 0, .75, 0);       /* things that leave */
  --d-fast: .22s;                               /* hover, press, colour */
  --d-ui: .5s;                                  /* state changes: dialogs, accordions, chips */
  --d-reveal: .9s;                              /* copy and media arriving */
  --stagger: 70ms;                              /* between lines, items and cards */
  --rise: 16px;                                 /* how far a copy block rises as it arrives */
  --rise-word: .42em;                           /* how far a heading line rises */

  --u: 1vh;                                      /* one storyboard vh (0.7 on phones) */
  --panel-top: 20vh;
  color-scheme: light;

  /* aliases for one release (brand §2.1); remove once grep shows no use */
  --blue: var(--draft);
  --blue-tint: var(--travertine);
  --lilac: var(--lamp);
  --mist: var(--limewash);
  --sheet: var(--paper);
  --studio: var(--plaster);
  --grey-600: var(--ink-soft);
  --grey-500: var(--muted);
  --amber: var(--redline-3d);
  --hair: rgba(29, 26, 22, .12);
  --hair-soft: rgba(29, 26, 22, .07);
  --hair-ink: var(--line-dark);
}

@media (min-width: 768px) { :root { --gutter: 32px; } }
@media (min-width: 1280px) { :root { --gutter: 48px; } }
@media (max-width: 767px) {
  :root { --u: .7vh; --bar-h: 56px; }
  #ch-08 { --u: .8vh; }
}

/* lengths (vh) and track offsets, by attribute (see header) */
[data-len="72"]  { --len: 72; }   /* #prologue (story edit 2026-11-29) */
[data-len="80"]  { --len: 80; }
[data-len="100"] { --len: 100; }
[data-len="120"] { --len: 120; }
[data-len="140"] { --len: 140; }
[data-len="160"] { --len: 160; }
[data-len="200"] { --len: 200; }
.track[data-from="0"]   { --from: 0; }
.track[data-from="150"] { --from: 150; }

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: var(--bar-h); }
body {
  margin: 0;
  background: var(--limestone);
  color: var(--ink);
  font: 400 17px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-kerning: normal;
  overflow-x: clip;
}
@media (min-width: 1024px) { body { font-size: 18px; } }
::selection { background: #E6D9C3; color: var(--ink); }
img, video, canvas, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
strong, b { font-weight: 600; }

/* type scale (brand §3.2) */
h1, h2, h3, .h2 {
  font-family: var(--f-display); font-weight: 400; font-optical-sizing: auto; font-variant-numeric: lining-nums;
  margin: 0 0 .5em; text-wrap: balance;
}
h1 { font-size: clamp(2.75rem, 1.6rem + 4.6vw, 6rem); line-height: 1; letter-spacing: -.022em; }
h2, .h2 { font-size: clamp(2rem, 1.2rem + 2.9vw, 3.75rem); line-height: 1.06; letter-spacing: -.015em; max-width: 16em; }
.chapter h2, .chapter .h2 { font-size: clamp(1.875rem, 1.3rem + 1.9vw, 3rem); line-height: 1.08; letter-spacing: -.012em; }
h3 { font-size: clamp(1.375rem, 1.15rem + .6vw, 1.75rem); line-height: 1.2; letter-spacing: -.005em; }
em.turn { font-style: italic; font-weight: 300; color: inherit; }
p { margin: 0 0 1em; }
.lead { font: 400 clamp(1.0625rem, 1rem + .35vw, 1.25rem)/1.55 var(--f-body); color: var(--ink-soft); max-width: 34em; text-wrap: pretty; }
[data-theme="dark"] .lead, .on-ink .lead { color: rgba(242, 237, 228, .82); }
.mono { font-family: var(--f-data); font-weight: 500; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.meta, .caption, .source { font-size: 13px; line-height: 1.5; letter-spacing: .005em; color: var(--muted); }
.caption em { font: italic 400 15px/1.4 var(--f-display); letter-spacing: 0; }
[data-theme="dark"] .meta, [data-theme="dark"] .caption { color: var(--muted-dark); }
.wrap { width: min(100% - 2 * var(--gutter), var(--maxw)); margin-inline: auto; }

.sr-only {
  position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 12px; top: -100px; z-index: 100;
  background: var(--ink); color: var(--limewash); padding: 12px 18px; border-radius: var(--r-pill); text-decoration: none;
  font: 500 15px/1 var(--f-body);
}
.skip-link:focus { top: 12px; }

/* Developer-only text (placeholders, work-package notes): visible only with ?debug (boot.js sets html.debug).
   Claim slots whose fallback is empty leave their wrapper empty (comments only): hide those wrappers. */
.dev-only { display: none !important; }
html.debug .dev-only { display: revert !important; outline: 1px dashed var(--redline); outline-offset: 2px; }
.badge:empty, .cmp__tag:empty, .compare__label:empty, .corner-label:empty, .caption:empty, .hero__tag:empty { display: none !important; }

/* focus (brand §4.22): 2 px Prussian ink on light, lamplight on dark; square corners, never colour alone */
:focus-visible { outline: 2px solid var(--draft); outline-offset: 2px; border-radius: 0; }
[data-theme="dark"] :focus-visible, .footer :focus-visible, .lightbox :focus-visible, .explore-bar :focus-visible { outline-color: var(--lamp); }

.link { color: var(--bronze-ink); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; transition: text-decoration-thickness var(--d-fast); }
.link:hover { text-decoration-thickness: 2px; }
[data-theme="dark"] .link { color: var(--lamp); }

sup.fn { font-size: .55em; line-height: 0; vertical-align: super; font-family: var(--f-body); font-weight: 500; }
sup.fn a { text-decoration: none; color: inherit; padding: 0 1px; }

/* ------------------------------------------------------------------ eyebrows, buttons, tags, status */
/* label style: Hanken 500 12 px, uppercase by CSS, 0.14em */
.eyebrow {
  display: block; margin: 0 0 14px;
  font: 500 12px/1.2 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--bronze-ink);
}
.eyebrow .mono { font: inherit; letter-spacing: inherit; font-variant-numeric: tabular-nums; }
[data-theme="dark"] .eyebrow, .eyebrow--lilac, .eyebrow--white { color: var(--lamp); }
.eyebrow--gap { margin-top: clamp(80px, 9vw, 128px); }

.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 48px; padding: 0 24px;
  border-radius: var(--r-pill); border: 1px solid transparent; font: 500 15px/1 var(--f-body); letter-spacing: .01em;
  text-decoration: none; white-space: nowrap; cursor: pointer; background: none; color: inherit;
  transition: background-color var(--d-fast), color var(--d-fast), border-color var(--d-fast), transform var(--d-fast) var(--ease-out);
}
.pill--lg { min-height: 56px; padding: 0 28px; font-size: 16px; }
/* primary: ink on light, chalk on dark; hover bronze / lamplight; lifts 1 px, no glow */
.pill--primary, .pill--blue { background: var(--ink); color: var(--limewash); }
.pill--primary:hover, .pill--blue:hover { background: var(--bronze); color: #fff; transform: translateY(-1px); }
.pill--primary:active, .pill--blue:active { transform: none; }
[data-theme="dark"] .pill--primary, [data-theme="dark"] .pill--blue, .pill--white { background: var(--chalk); color: var(--ink); }
[data-theme="dark"] .pill--primary:hover, [data-theme="dark"] .pill--blue:hover, .pill--white:hover { background: var(--lamp); color: var(--ink); transform: translateY(-1px); }
.pill[disabled], .pill--primary[disabled], .pill--blue[disabled] { opacity: .4; cursor: default; transform: none; }
.pill[disabled]:hover { background: inherit; }
[data-theme="dark"] .pill--primary[disabled]:hover, [data-theme="dark"] .pill--blue[disabled]:hover { background: var(--chalk); color: var(--ink); }
/* ghost: hairline outline in the section's ink */
.pill--ghost { border-color: rgba(242, 237, 228, .45); color: var(--chalk); }
.pill--ghost:hover { background: rgba(242, 237, 228, .08); }
.pill--ghost-ink { border-color: var(--line-strong); color: var(--ink); }
.pill--ghost-ink:hover { background: var(--travertine); }
/* chips (tags, not lozenges): ch-01 inputs, ch-07 outputs, deliverables */
.pill--tint, .pill--onink {
  min-height: 0; padding: 6px 10px; border-radius: var(--r-pill); cursor: default;
  font: 500 12px/1.2 var(--f-body); letter-spacing: .12em; text-transform: uppercase;
  background: transparent; border: 1px solid var(--line-strong); color: var(--ink);
}
.pill--onink { border-color: rgba(242, 237, 228, .30); color: var(--chalk); }
/* gallery caption plate */
.pill--cap {
  position: absolute; left: 12px; bottom: 12px; min-height: 0; padding: 6px 10px; gap: 8px; border-radius: var(--r-pill);
  background: rgba(251, 249, 245, .94); color: var(--ink); font: 500 14px/1.2 var(--f-body); letter-spacing: 0; cursor: inherit;
}
.cap__i { font: italic 400 14px/1 var(--f-display); color: var(--muted); font-variant-numeric: lining-nums; }

.pills { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }

.status {
  display: inline-block; border-radius: var(--r-pill); padding: 4px 7px; white-space: nowrap;
  font: 600 12px/1.2 var(--f-body); letter-spacing: .1em; text-transform: uppercase; border: 1px solid transparent;
}
.status--pass { color: var(--moss); border-color: var(--moss); background: var(--limewash); }
.status--caught { background: var(--draft); color: #fff; }
.status--flagged { color: var(--redline); border-color: var(--redline); background: var(--limewash); }
.status--planted, .status--seeded { color: var(--muted); border-color: var(--line-strong); background: transparent; }
[data-theme="dark"] .status--pass { color: var(--pass-dark); border-color: var(--pass-dark); background: transparent; }
[data-theme="dark"] .status--caught { background: var(--draft-light); color: var(--ink); }
[data-theme="dark"] .status--flagged { color: var(--flagged-dark); border-color: var(--flagged-dark); background: transparent; }
[data-theme="dark"] .status--planted { color: var(--muted-dark); border-color: var(--muted-dark); }

.iconbtn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-pill);
  border: 1px solid var(--line-strong); background: transparent; color: var(--ink); cursor: pointer; font: 400 20px/1 var(--f-body);
  transition: background-color var(--d-fast), border-color var(--d-fast);
}
.iconbtn:hover { background: var(--travertine); }
.iconbtn svg { fill: none; stroke: currentColor; stroke-width: 1.4; }
.iconbtn--ink { background: transparent; color: var(--chalk); border-color: rgba(242, 237, 228, .3); }
.iconbtn--ink:hover { background: rgba(242, 237, 228, .08); }

/* segmented control (radio buttons or role=radio buttons): squared tabs, hairline outline, active ink fill */
.seg { display: inline-flex; flex-wrap: wrap; align-items: stretch; gap: 0; padding: 0; border: 1px solid var(--line-strong); margin: 0; border-radius: var(--r-pill); background: transparent; }
.seg > button, .seg > label {
  border: 0; background: none; border-radius: 0; padding: 0 14px; min-height: 34px; display: inline-flex; align-items: center;
  font: 500 13px/1.2 var(--f-body); letter-spacing: .01em; cursor: pointer; color: var(--ink-soft);
  transition: background-color var(--d-fast), color var(--d-fast);
}
.seg > button + button, .seg > label + input + label, .seg > input + label + input + label { border-left: 1px solid var(--line-strong); }
.seg > button:hover, .seg > label:hover { background: var(--travertine); }
.seg > button[aria-checked="true"], .seg > input:checked + label { background: var(--ink); color: var(--limewash); }
.seg > input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.seg > input:focus-visible + label { outline: 2px solid var(--draft); outline-offset: 2px; }
.seg--ink { border-color: rgba(242, 237, 228, .45); }
.seg--ink > button { color: rgba(242, 237, 228, .8); }
.seg--ink > button + button { border-left-color: rgba(242, 237, 228, .45); }
.seg--ink > button:hover { background: rgba(242, 237, 228, .08); }
.seg--ink > button[aria-checked="true"] { background: var(--chalk); color: var(--ink); }
.seg--mini > button { padding: 0 8px; min-height: 26px; font-size: 12px; }

/* wordmark */
.wordmark { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: inherit; margin: 0; }
.wordmark__logo { height: 34px; width: auto; }
.wordmark__logo--ink { display: none; }
.topbar[data-on="light"] .wordmark__logo--ink { display: block; }
.topbar[data-on="light"] .wordmark__logo--white { display: none; }
.wordmark--foot .wordmark__logo { height: 40px; }

/* ------------------------------------------------------------------ top bar (brand §4.1) */
.topbar { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--bar-h); color: var(--chalk); transition: transform .35s var(--ease-out), background-color .25s, color .25s, box-shadow .25s; }
.topbar__in { height: 100%; width: min(100% - 2 * var(--gutter), 1440px); margin-inline: auto; display: flex; align-items: center; gap: 24px; }
.topbar__links { display: none; margin: 0 auto; gap: 32px; font: 500 14px/1 var(--f-body); letter-spacing: .01em; }
.topbar__links a { text-decoration: none; opacity: .9; padding: 8px 0; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.topbar__links a:hover, .topbar__links a[aria-current] { opacity: 1; text-decoration: underline; text-decoration-color: var(--lamp); }
.topbar[data-on="light"] .topbar__links a:hover, .topbar[data-on="light"] .topbar__links a[aria-current] { text-decoration-color: var(--bronze); }
.topbar__cta { margin-left: auto; min-height: 40px; padding: 0 18px; font-size: 14px; background: var(--chalk); color: var(--ink); }
.topbar__cta:hover { background: var(--lamp); color: var(--ink); transform: none; }
.topbar[data-on="light"] .topbar__cta { background: var(--ink); color: var(--limewash); }
.topbar[data-on="light"] .topbar__cta:hover { background: var(--bronze); color: #fff; }
@media (min-width: 900px) { .topbar__links { display: flex; } .topbar__cta { margin-left: 0; } }
@media (max-width: 420px) { .topbar__cta { font-size: 13px; padding: 0 14px; min-height: 36px; } }
.topbar[data-on="light"] { color: var(--ink); background: rgba(243, 239, 231, .86); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 1px 0 var(--line); }
.topbar.is-hidden { transform: translateY(-100%); }
.topbar__progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; opacity: 0; transition: opacity .3s; }
.topbar__progress span { display: block; height: 100%; width: 100%; background: var(--lamp); transform-origin: 0 50%; transform: scaleX(0); }
.topbar[data-on="light"] .topbar__progress span { background: var(--bronze); }
.topbar.in-story .topbar__progress { opacity: 1; }
.mprog {
  position: absolute; left: var(--gutter); top: calc(100% + 8px); border: 0; padding: 6px 10px; border-radius: var(--r-pill);
  font: 500 12px/1.3 var(--f-data); letter-spacing: .02em; font-variant-numeric: tabular-nums;
  background: rgba(18, 19, 23, .72); color: var(--chalk); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); cursor: pointer;
}
.topbar[data-on="light"] .mprog { background: rgba(243, 239, 231, .86); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }

/* stage rail (brand §4.11): a hairline spine with ticks; the active tick is bronze */
.rail { position: fixed; right: 20px; top: 50%; transform: translateY(-50%); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .3s; }
.rail.is-on { opacity: 1; pointer-events: auto; }
.rail ol { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 0; justify-items: end; position: relative; }
.rail ol::after { content: ""; position: absolute; right: 0; top: 12px; bottom: 12px; width: 1px; background: var(--line-strong); opacity: .7; }
.rail a { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-height: 26px; padding: 0 0 0 8px; text-decoration: none; color: var(--ink); }
.rail__tick { display: block; width: 12px; height: 1px; background: var(--line-strong); transition: width .3s var(--ease-out), background-color .3s; }
.rail a.is-past .rail__tick { width: 16px; background: var(--ink); }
.rail a[aria-current="step"] .rail__tick { width: 28px; height: 1px; background: var(--bronze); box-shadow: 0 0 0 .5px var(--bronze); }
.rail__label {
  order: -1; opacity: 0; transform: translateX(6px); transition: opacity .2s, transform .2s var(--ease-out); white-space: nowrap;
  padding: 4px 7px; border-radius: var(--r-pill); background: rgba(251, 249, 245, .88); color: var(--ink);
  font: 500 12px/1.2 var(--f-body); letter-spacing: .1em; text-transform: uppercase; font-variant-numeric: tabular-nums;
}
.rail a:hover .rail__label, .rail a:focus-visible .rail__label, .rail a[aria-current="step"] .rail__label { opacity: 1; transform: none; }
.rail__skip {
  display: block; width: fit-content; margin-left: auto; text-align: right; color: var(--ink); text-decoration: underline;
  text-underline-offset: 4px; text-decoration-thickness: 1px; padding: 4px 7px; border-radius: var(--r-pill);
  font: 500 12px/1.2 var(--f-body); background: rgba(251, 249, 245, .88);
}
.rail__skip:hover { text-decoration-thickness: 2px; }
.rail[data-on="dark"] ol::after, .rail[data-on="dark"] .rail__tick { background: rgba(242, 237, 228, .35); }
.rail[data-on="dark"] a.is-past .rail__tick { background: rgba(242, 237, 228, .8); }
.rail[data-on="dark"] a[aria-current="step"] .rail__tick { background: var(--lamp); box-shadow: 0 0 0 .5px var(--lamp); }
.rail[data-on="dark"] .rail__label, .rail[data-on="dark"] .rail__skip { color: var(--chalk); background: rgba(18, 19, 23, .72); }

/* chapter sheet (mobile) */
.sheet-dialog { border: 0; padding: 0; margin: auto 0 0; width: 100%; max-width: 100%; max-height: 80svh; border-radius: 12px 12px 0 0; background: var(--limewash); color: var(--ink); }
.sheet-dialog::backdrop { background: rgba(21, 19, 15, .5); }
.sheet-dialog__in { padding: 14px var(--gutter) calc(22px + env(safe-area-inset-bottom)); }
.sheet-dialog__in::before { content: ""; display: block; width: 36px; height: 3px; margin: 0 auto 18px; border-radius: 2px; background: var(--line-strong); }
.sheet-list { list-style: none; padding: 0; margin: 0 0 12px; }
.sheet-list a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; font: 400 20px/1.25 var(--f-display); }
.sheet-list a[aria-current="step"] { color: var(--bronze-ink); }
.sheet-list .mono { color: var(--muted); margin-right: 10px; font: 500 12px/1 var(--f-data); letter-spacing: .02em; }

/* ------------------------------------------------------------------ hero (brand §4.2) */
.hero { position: relative; min-height: 100vh; min-height: 100svh; background: var(--dusk-2); color: #F7F4EE; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; }
.still-layer { position: absolute; inset: 0; z-index: 0; }
.still-layer picture, .still-layer img { width: 100%; height: 100%; }
.still-layer img { object-fit: cover; object-position: 50% 50%; }
.hero__scrim { position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(18, 19, 23, .78) 0%, rgba(18, 19, 23, .45) 45%, rgba(18, 19, 23, 0) 75%),
              linear-gradient(0deg, rgba(18, 19, 23, .55) 0%, rgba(18, 19, 23, 0) 50%),
              linear-gradient(180deg, rgba(18, 19, 23, .42) 0, rgba(18, 19, 23, 0) 24%); }
.hero__copy { position: relative; z-index: 2; width: min(100% - 2 * var(--gutter), var(--maxw)); margin: 0 auto; padding: calc(var(--bar-h) + 48px) 0 128px; }
.hero__copy > * { max-width: 620px; }
@media (min-width: 1024px) { .hero__copy > * { max-width: calc(5 / 12 * 100% + 120px); } }
.hero .eyebrow { color: var(--lamp); margin-bottom: 22px; }
.hero h1 { margin: 0 0 26px; color: #F7F4EE; max-width: 11.5em; }
.hero h1 em.turn { color: #F7F4EE; }
.hero__sub { font: 400 clamp(1.0625rem, 1rem + .35vw, 1.25rem)/1.55 var(--f-body); color: rgba(247, 244, 238, .86); max-width: 30em; text-wrap: pretty; }
.hero__buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero__caption { position: absolute; z-index: 2; right: var(--gutter); bottom: 24px; margin: 0; text-align: right; color: rgba(247, 244, 238, .72); max-width: min(420px, calc(50vw - 110px)); }
.hero__caption em { font: italic 400 15px/1.4 var(--f-display); }
.hero__tag--ink { background: var(--limewash) !important; color: var(--ink-soft) !important; backdrop-filter: none !important; }
.hero__tag { display: inline-block; font: 500 12px/1.2 var(--f-body); letter-spacing: .1em; text-transform: uppercase; padding: 5px 8px; margin-right: 8px; border-radius: var(--r-pill); background: rgba(18, 19, 23, .72); color: var(--chalk); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); vertical-align: 1px; }
.hero__skip { position: absolute; z-index: 3; right: var(--gutter); top: calc(var(--bar-h) + 16px); font: 500 13px/1 var(--f-body); color: rgba(247, 244, 238, .86); text-underline-offset: 4px; text-decoration-thickness: 1px; }
.hero__cue { position: absolute; z-index: 2; left: 50%; bottom: 40px; transform: translateX(-50%); display: flex; align-items: flex-end; gap: 12px; color: rgba(247, 244, 238, .78); }
.hero__cue-label { font: 500 12px/1.2 var(--f-body); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.hero__cue-line { width: 1px; height: 48px; background: linear-gradient(var(--chalk), var(--chalk)) 0 0 / 1px 0 no-repeat, rgba(242, 237, 228, .22); animation: cue 1.8s var(--ease-io) 3 forwards; }
@keyframes cue { 0% { background-size: 1px 0; background-position: 0 0; } 60% { background-size: 1px 100%; background-position: 0 0; } 100% { background-size: 1px 100%; background-position: 0 48px; } }
.loadbar { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; height: 1px; }
.loadbar__bar { display: block; height: 100%; background: var(--lamp); transform-origin: 0 50%; transform: scaleX(var(--load, 0)); transition: transform .3s; }
.loadbar__label { position: absolute; right: var(--gutter); bottom: 8px; font: 500 12px/1.2 var(--f-data); letter-spacing: .02em; color: rgba(242, 237, 228, .72); font-variant-numeric: tabular-nums; }
@media (min-width: 768px) { .hero:has(.loadbar:not([hidden])) .hero__caption { bottom: 34px; } }

@media (max-width: 767px) {
  .hero { min-height: 0; justify-content: flex-start; }
  .still-layer { position: relative; height: 58svh; min-height: 300px; }
  .hero__scrim { background: linear-gradient(0deg, var(--dusk-2) 0, rgba(18, 19, 23, 0) 24%); bottom: auto; height: 58svh; min-height: 300px; }
  .hero__copy { padding: 8px 0 32px; }
  .hero .eyebrow { margin-bottom: 16px; }
  .hero h1 { margin-bottom: 18px; }
  .hero__buttons { flex-direction: column; align-items: stretch; margin-top: 24px; }
  .hero__buttons .pill { justify-content: center; }
  .hero__caption { position: relative; right: auto; bottom: auto; text-align: left; margin: 0 var(--gutter) 28px; max-width: none; }
  .hero__cue { display: none; }
  .hero__skip { top: calc(var(--bar-h) + 10px); text-shadow: 0 1px 8px rgba(0, 0, 0, .5); }
  .loadbar__label { bottom: 6px; }
}
@media (max-width: 380px) { .hero h1 { font-size: 2.5rem; } }

/* ------------------------------------------------------------------ tier D: section grounds and stacking (brand §2.3) */
[data-bg="paper"], [data-bg="sheet"] { background: var(--paper); }
[data-bg="studio"] { background: var(--plaster); }
[data-bg="sky"] { background: linear-gradient(180deg, #E3E6E8 0%, #F1EEE8 100%); }
[data-bg="dusk"] { background: linear-gradient(180deg, #1F2330 0%, #1A1C22 45%, #121317 100%); color: var(--chalk); }
[data-bg="ink"] { background: var(--ink-deep); color: var(--chalk); }
[data-bg="limestone"], [data-bg="white"] { background: var(--limestone); }
[data-bg="blueprint"], [data-bg="blue"] {
  background-color: var(--blueprint);
  background-image: linear-gradient(var(--blueprint-grid) 1px, transparent 1px), linear-gradient(90deg, var(--blueprint-grid) 1px, transparent 1px);
  background-size: 24px 24px; color: var(--chalk);
}

.stage { display: none; }
.pack-pill { display: none; }

.beatsec, .chapter { position: relative; padding: 96px 0; }
.beatsec > :not(.sr-only), .chapter > :not(.sr-only) { width: min(100% - 2 * var(--gutter), var(--maxw)); margin-inline: auto; }
.chapter { display: grid; gap: 40px 64px; align-items: start; }
@media (min-width: 1024px) {
  .chapter { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); width: min(100% - 2 * var(--gutter), var(--maxw)); margin-inline: auto; padding-inline: 0; }
  .chapter > :not(.sr-only) { width: auto; margin-inline: 0; }
  .chapter > .track { grid-column: 1; }
  .chapter > .posters, .chapter > .readout, .chapter > .buildlog, .chapter > .corner-label, .chapter > .bookend { grid-column: 2; }
  .chapter[data-side="right"] > .track { grid-column: 2; }
  .chapter[data-side="right"] > .posters { grid-column: 1; grid-row: 1 / span 4; }
  #ch-03 > .track[data-from="150"] { grid-column: 1 / -1; grid-row: 2; }
  #ch-03 > .posters { grid-row: 1; }
  .chapter { clip-path: inset(0 -100vmax); }
}
/* full-bleed grounds for the grid chapters (tier D desktop): paint with a spread shadow */
@media (min-width: 1024px) {
  .chapter[data-bg="paper"] { box-shadow: 0 0 0 100vmax var(--paper); }
  .chapter[data-bg="studio"] { box-shadow: 0 0 0 100vmax var(--plaster); }
  .chapter[data-bg="sky"] { box-shadow: 0 0 0 100vmax #E9E9E6; background: #E9E9E6; }
  .chapter[data-bg="dusk"] { box-shadow: 0 0 0 100vmax #1A1C22; background: #1A1C22; }
  .chapter[data-bg="ink"] { box-shadow: 0 0 0 100vmax var(--ink-deep); }
}
.chapter[data-theme="dark"] { color: var(--chalk); }

.posters { display: grid; gap: 24px; }
.poster { margin: 0; position: relative; }
.poster img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-img); background: var(--travertine); }
.poster figcaption, .poster figcaption em { font: italic 400 15px/1.4 var(--f-display); color: var(--muted); margin-top: 10px; }
.poster figcaption em { margin: 0; }
[data-theme="dark"] .poster figcaption, [data-theme="dark"] .poster figcaption em { color: var(--muted-dark); }
[data-theme="dark"] .poster img { background: #24221D; }
.poster-strip { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.poster-strip > .pill, .poster-strip > .caption { grid-column: 1 / -1; justify-self: start; }
.poster-strip--rooms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 599px) { .poster-strip--rooms { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 599px) { .poster-strip { grid-template-columns: 1fr; } }

/* panel contents (brand §4.6): eyebrow, 14, h2, 16, lead, 20, chips; .line under a hairline; .proof in data style */
.panel h2, .panel .h2, .problem__in h2 { margin-bottom: 16px; }
.panel .lead { margin-bottom: 20px; }
.panel .line, .line {
  font: italic 400 clamp(1.125rem, 1rem + .5vw, 1.375rem)/1.35 var(--f-display); letter-spacing: 0;
  margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--line); max-width: 30em; text-wrap: balance;
}
[data-theme="dark"] .line { border-top-color: var(--line-dark); }
.proof { display: block; font: 500 12.5px/1.45 var(--f-data); letter-spacing: .02em; color: var(--muted); margin: 14px 0 0; font-variant-numeric: tabular-nums; }
[data-theme="dark"] .proof { color: var(--muted-dark); }
.stat { font-size: 15px; color: var(--ink-soft); }
.buildclock { font: 500 12px/1.2 var(--f-data); color: var(--bronze-ink); letter-spacing: .1em; text-transform: uppercase; }
.swap { list-style: none; margin: 4px 0 0; padding: 0; font: 500 13px/1.45 var(--f-data); letter-spacing: .02em; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.swap li + li { margin-top: 4px; }
[data-theme="dark"] .swap { color: rgba(242, 237, 228, .78); }
.swap--captions { font: italic 400 15px/1.4 var(--f-display); letter-spacing: 0; margin-top: 12px; }
.swap--captions em { font: inherit; }
.badge { display: inline-block; font: 500 12px/1.2 var(--f-body); letter-spacing: .1em; text-transform: uppercase; padding: 4px 7px; border-radius: var(--r-pill); background: rgba(242, 237, 228, .1); color: rgba(242, 237, 228, .86); margin-left: 10px; vertical-align: 2px; font-style: normal; }
[data-theme="light"] .badge { background: var(--travertine); color: var(--ink-soft); }
/* readout plate (brand §4.7): uppercase labels, tabular values, hairline separators */
.readout {
  display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 0 10px; justify-self: start;
  padding: 10px 14px; border-radius: var(--r-pill); background: rgba(251, 249, 245, .88); border: 1px solid rgba(29, 26, 22, .08);
  font: 500 12px/1.3 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.readout [data-count] { font: 500 13px/1.2 var(--f-data); letter-spacing: .02em; color: var(--ink); text-transform: none; font-variant-numeric: tabular-nums; margin-left: .4em; }
.ro__sep { display: inline-block; width: 1px; height: 12px; background: var(--line-strong); opacity: .6; align-self: center; }
[data-theme="dark"] .readout { background: var(--glass-dark); border-color: var(--line-dark); color: var(--muted-dark); }
[data-theme="dark"] .readout [data-count] { color: var(--chalk); }
/* build log (brand §4.8) */
.buildlog { list-style: none; margin: 0; padding: 0; font: 400 11.5px/1.6 var(--f-data); letter-spacing: .02em; color: var(--muted); font-variant-numeric: tabular-nums; }
.buildlog li { position: relative; padding-left: 20px; }
.buildlog li::before { content: ""; position: absolute; left: 0; top: .8em; width: 12px; height: 1px; background: var(--bronze); }
.buildlog li.is-new { color: var(--ink); }
.corner-label { font: 500 12px/1.2 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: rgba(242, 237, 228, .78); }
.bookend { font: 400 clamp(2rem, 1.3rem + 2.8vw, 3.75rem)/1.1 var(--f-display); letter-spacing: -.012em; text-align: center; margin: 0; text-wrap: balance; }
.chapter > .bookend { grid-column: 1 / -1; order: 99; padding-top: 24px; }
/* tier D: the posters carry their own captions, so the live caption swaps are not repeated */
html:not(:is([data-tier="A"], [data-tier="B"], [data-tier="C"])) .swap--captions,
html.tier-d .swap--captions { display: none; }

/* prologue + problem (tier D) */
#prologue > .track { text-align: center; }
.prologue__h, .prologue__sub, .bridge {
  font: 400 clamp(2rem, 1.3rem + 2.8vw, 3.75rem)/1.1 var(--f-display); letter-spacing: -.012em; text-wrap: balance;
}
.prologue__h { margin: 0 auto; max-width: 18em; }
.prologue__sub { font-style: italic; font-weight: 300; color: var(--ink); margin: 0; }
.beatsec > .poster--wide { max-width: 1100px; margin: 32px auto 0; }
.cards { list-style: none; padding: 0; margin: 28px 0 24px; display: grid; gap: 0; border-top: 1px solid var(--line); }
@media (min-width: 768px) { .cards--2x2 { grid-template-columns: 1fr 1fr; } .cards--2x2 > .card:nth-child(odd) { border-right: 1px solid var(--line); } }
.card { padding: 22px 24px 24px 0; border-bottom: 1px solid var(--line); font-size: 16px; line-height: 1.55; color: var(--ink-soft); }
@media (min-width: 768px) { .cards--2x2 > .card:nth-child(even) { padding-left: 24px; padding-right: 0; } }
.card strong { color: var(--ink); font-weight: 600; }
.card .card__i { display: block; font: italic 300 28px/1 var(--f-display); letter-spacing: 0; color: var(--bronze-ink); margin-bottom: 12px; font-variant-numeric: lining-nums; }
.bridge { margin: 56px 0 0; }

/* QC (brand §4.9) */
.qc-catch { font-size: 14px; line-height: 1.55; margin-top: 18px; padding: 12px 14px; background: var(--limewash); border-left: 2px solid var(--redline); }
.qc-catch .status { margin-right: 6px; }
.qc-catch .mono { font: 500 12.5px/1.45 var(--f-data); letter-spacing: .02em; color: var(--ink); }
.qc-catch em { display: inline-block; margin-top: 6px; font: italic 400 15px/1.4 var(--f-display); color: var(--ink); }
.qc-catch .meta { display: inline-block; margin-top: 4px; }
.qc-toggle { margin-top: 22px; }
.qc-toggle .seg { display: flex; width: 100%; border: 0; padding: 0; border-radius: 0; }
.qc-toggle .seg > label { flex: 1 1 0; justify-content: center; border: 1px solid var(--line-strong); }
.qc-toggle .seg > input + label + input + label { border-left: 0; }
.qc-toggle .seg > input:checked + label { background: var(--ink); color: var(--limewash); border-color: var(--ink); }
.seg__pane { display: none; flex-basis: 100%; margin-top: 14px; }
#qc-src-house:checked ~ .seg__pane--house, #qc-src-pilot:checked ~ .seg__pane--pilot { display: block; }
.qc-table { width: 100%; border-collapse: collapse; font: 400 14px/1.4 var(--f-body); font-variant-numeric: tabular-nums; }
.qc-table caption { text-align: left; font: italic 400 15px/1.4 var(--f-display); color: var(--muted); padding-bottom: 8px; }
.qc-table th, .qc-table td { text-align: left; padding: 10px 10px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.qc-table thead th { font: 500 12px/1.2 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--ink); padding-top: 4px; }
.qc-table tbody th { font: 500 15px/1.3 var(--f-body); }
.qc-table td.mono { font: 500 13px/1.4 var(--f-data); color: var(--ink-soft); }
.qc-table--compact tbody th { font-size: 14px; }
.qc-table--compact td.mono { font-size: 12.5px; }
.qc-table .grp th { font: 500 12px/1.2 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); background: var(--travertine); padding: 9px 8px; border-bottom: 0; }
.qc-table td:last-child { text-align: right; padding-right: 0; }
.qc-table td:last-child .status + .status { margin-left: 4px; }
.qc-scroll { overflow-x: auto; }
/* ch-03 "Lear House 01": the full check log folds into a details element; only its body scrolls (data-lenis-prevent) */
.qc-more { margin-top: 4px; border: 1px solid var(--line-strong); border-radius: var(--r-pill); background: rgba(251, 249, 245, .7); }
.qc-more > summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; padding: 12px 40px 12px 14px; position: relative; font: 500 14px/1.35 var(--f-body); }
.qc-more > summary::-webkit-details-marker { display: none; }
.qc-more > summary::before, .qc-more > summary::after { content: ""; position: absolute; right: 16px; top: 50%; width: 12px; height: 1px; background: var(--bronze); transition: transform var(--d-ui) var(--ease-out); }
.qc-more > summary::after { transform: rotate(90deg); }
.qc-more[open] > summary::after { transform: rotate(0deg); }
.qc-more__k { font: 500 12px/1.3 var(--f-data); letter-spacing: .02em; color: var(--muted); font-variant-numeric: tabular-nums; }
.qc-more > .qc-scroll { max-height: min(30vh, 300px); overflow: auto; overscroll-behavior: contain; padding: 0 14px 10px; border-top: 1px solid var(--line); scrollbar-width: thin; }
.qc-more .qc-table caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.qc-more .qc-table thead th { position: sticky; top: 0; background: var(--limewash); z-index: 1; }
.panel--pilot { background: var(--limewash); color: var(--ink); border-radius: var(--r-panel); padding: clamp(24px, 2.4vw, 40px); box-shadow: var(--shadow-lift); border: 1px solid rgba(29, 26, 22, .08); }
.numerals { display: flex; flex-wrap: wrap; gap: 24px 48px; margin: 8px 0 20px; }
.numerals p { margin: 0; max-width: 300px; }
.numeral { display: block; font: 300 clamp(3.5rem, 2rem + 4vw, 6rem)/.95 var(--f-display); letter-spacing: -.03em; color: var(--ink); font-variant-numeric: lining-nums; margin-bottom: 8px; }
.numeral__l { font: italic 400 15px/1.4 var(--f-display); color: var(--ink-soft); }
.qc-key { display: grid; gap: 8px; margin: 18px 0; font-size: 14px; }
.qc-key > div { display: flex; gap: 10px; align-items: baseline; }
.qc-key dt { flex: none; width: 76px; }
.qc-key dd { margin: 0; color: var(--ink-soft); }
.qc-key dd em { font: italic 400 15px/1.4 var(--f-display); }
.source { margin-top: 12px; }

/* materials schedule (brand §4.10) */
.schedule { margin-top: 20px; background: var(--limewash); border: 1px solid rgba(29, 26, 22, .08); border-radius: var(--r-card); padding: 14px 14px 8px; }
.schedule__h { font: 500 12px/1.2 var(--f-body); color: var(--muted); margin: 0 0 6px 2px; letter-spacing: .1em; text-transform: uppercase; }
.schedule__rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.schedule__rows > li + li { border-top: 1px solid var(--line); }
.swatch { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; border: 0; background: none; padding: 8px 18px 8px 6px; border-radius: 0; cursor: pointer; transition: background-color var(--d-fast); }
.swatch .mono { font: 400 12.5px/1.4 var(--f-body); letter-spacing: 0; color: var(--ink-soft); }
.swatch .mono b { font: 600 12.5px/1.4 var(--f-data); letter-spacing: .02em; color: var(--ink); margin-right: 4px; font-variant-numeric: tabular-nums; }
.swatch:hover, .swatch[aria-pressed="true"] { background: var(--travertine); }
.swatch[aria-pressed="true"] .mono { color: var(--ink); }
.chip { flex: none; width: 14px; height: 14px; border-radius: 1px; box-shadow: inset 0 0 0 1px rgba(29, 26, 22, .15); }
.chip--br01 { background: linear-gradient(90deg, #b0a28e 0 45%, #cfc8bc 45% 50%, #a39684 50% 95%, #cfc8bc 95%); } /* final r2 S1-2: the re-graded brick */
.chip--br02 { background: #3d3e43; }
.chip--rf01 { background: #5e5f62; } /* final r2 S1-2: neutral natural slate */
.chip--st01 { background: #dcd5c6; }
.chip--mt01 { background: #3d352c; }
.chip--tm01 { background: #2a2623; }
.chip--tm02 { background: #9a7552; }
.chip--gl01 { background: linear-gradient(135deg, #a9bcc4, #dfe8ec); }

/* lighting dial + day/dusk (dial.js styles the live dial; CSS here is the static fallback) */
.dial { position: relative; width: 280px; height: 100px; color: var(--chalk); }
.dial__arc { display: block; width: 120px; height: 64px; margin: 0 auto; fill: none; stroke: rgba(242, 237, 228, .5); stroke-width: 1; }
.dial__knob { position: absolute; left: calc(50% - 60px); top: 54px; width: 14px; height: 14px; margin: -7px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #FFF2D6 0, #E9B872 45%, #C98A3E 80%); }
.dial__labels { display: flex; justify-content: space-between; gap: 14px; margin-top: 8px; font: 500 12px/1.2 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: rgba(242, 237, 228, .8); white-space: nowrap; }
.dial__labels > span { flex: 1 1 0; text-align: center; }
.dial__labels > span:first-child { text-align: left; }
.dial__labels > span:last-child { text-align: right; }
.dial__try { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font: italic 400 15px/1.2 var(--f-display); letter-spacing: 0; color: var(--lamp); white-space: nowrap; }

/* ch07 compare (live mount wired by compare.js; poster compare by js/ui/posters.js) */
.compare { position: relative; }
.compare__label { font: 500 12px/1.2 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--chalk); }
.cmp { position: relative; overflow: hidden; border-radius: var(--r-img); aspect-ratio: 16 / 9; --cut: 50%; }
.cmp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 0; aspect-ratio: auto; }
.cmp__b { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--cut)); }
.cmp__line { position: absolute; top: 0; bottom: 0; left: var(--cut); width: 1px; margin-left: -.5px; background: var(--chalk); box-shadow: 0 0 12px rgba(242, 237, 228, .35); }
.cmp__tag { position: absolute; top: 12px; font: 500 12px/1.2 var(--f-body); letter-spacing: .1em; text-transform: uppercase; padding: 6px 9px; border-radius: var(--r-pill); background: rgba(18, 19, 23, .72); color: var(--chalk); }
.cmp__tag--l { left: 12px; }
.cmp__tag--r { right: 12px; }
.cmp__range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.cmp__range:focus-visible ~ .cmp__line, .cmp:focus-within .cmp__line { width: 3px; margin-left: -1.5px; }
.cmp:not(.is-wired) .cmp__b { clip-path: inset(0 0 0 50%); }

/* deliverables (chips on dark) */
.deliverables { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.deliverable { padding: 6px 10px; border-radius: var(--r-pill); border: 1px solid rgba(242, 237, 228, .30); background: transparent; font: 500 12px/1.25 var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--chalk); }

/* ------------------------------------------------------------------ explore */
.explore { padding: var(--sec-pad) 0; }
.explore__in { display: grid; gap: 0 72px; }
.explore__in > .meta { margin-top: 14px; }
.explore__in > .lead { margin-bottom: 32px; }
.explore__poster { margin-top: 48px; }
.explore__poster img { border-radius: var(--r-img); }
@media (min-width: 1024px) {
  .explore__in { grid-template-columns: 5fr 7fr; align-items: center; }
  .explore__in > :not(.explore__poster) { grid-column: 1; }
  .explore__poster { grid-column: 2; grid-row: 1 / span 5; margin: 0; }
}
.explore__card { max-width: 560px; }
.explore__card > .meta { margin-top: 14px; }
.explore__card > .lead { margin-bottom: 32px; }
@media (min-width: 1024px) { .explore__in > .explore__card { grid-column: 1; grid-row: 1; align-self: center; } }
.explore-bar { position: fixed; z-index: 60; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r-panel); background: var(--glass-dark); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); color: var(--chalk); border: 1px solid var(--line-dark); max-width: calc(100% - 2 * var(--gutter)); }
.explore-bar__exit { min-height: 36px; padding: 0 16px; font-size: 14px; }
.explore-bar__exit .mono { font-weight: 400; opacity: .7; }
html[data-explore="open"] .topbar, html[data-explore="open"] .rail, html[data-explore="open"] main > :not(#explore), html[data-explore="open"] .footer, html[data-explore="open"] #explore > .wrap { visibility: hidden; }
/* :is([data-tier]):not(.tier-d) outranks the live-tier .stage rule below (0,3,1), so the canvas takes input */
html[data-explore="open"]:is([data-tier]):not(.tier-d) .stage { pointer-events: auto; z-index: 55; }
html[data-explore="open"] body { overflow: hidden; }
@media (pointer: coarse) {
  html[data-explore="open"] .explore-bar__exit { min-height: 52px; padding-inline: 26px; font-size: 17px; }
}

/* ------------------------------------------------------------------ the house (gallery, brand §4.15) */
.work { padding: var(--sec-pad) 0; }
.work .lead { margin-bottom: 0; }
.bento { list-style: none; padding: 0; margin: clamp(40px, 5vw, 64px) 0 clamp(40px, 5vw, 56px); display: grid; gap: 8px; }
@media (min-width: 768px) { .bento { gap: 16px; } }
.bento__item a { position: relative; display: block; overflow: hidden; border-radius: var(--r-img); background: var(--travertine); isolation: isolate; text-decoration: none; }
.bento__item img { width: 100%; height: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .9s var(--ease-out); }
.bento__item a:hover img { transform: scale(1.02); }
.bento__item a:hover .pill--cap { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.bento__item .pill--cap { left: 12px; bottom: 12px; }
@media (min-width: 768px) {
  .bento { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bento__item--lg { grid-column: span 2; grid-row: span 2; }
  .bento__item--lg img { aspect-ratio: auto; }
  .bento__item--lg a { height: 100%; }
}
@media (min-width: 768px) {
  /* the garden room spans two columns at the height of its row (the image adds no height) */
  .bento__item--wide { grid-column: span 2; }
  .bento__item--wide a { height: 100%; min-height: 120px; }
  .bento__item--wide img { position: absolute; inset: 0; aspect-ratio: auto; }
}
@media (max-width: 767px) {
  .bento { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 8px; margin-inline: calc(-1 * var(--gutter)); padding: 0 var(--gutter) 8px; scroll-padding-inline: var(--gutter); overscroll-behavior-x: contain; }
  .bento__item { flex: 0 0 86%; scroll-snap-align: start; }
}

/* lightbox + film dialog */
.lightbox, .film-dialog { border: 0; padding: 0; margin: auto; width: min(100vw - 32px, 1600px); max-width: none; max-height: calc(100vh - 32px); background: transparent; color: var(--chalk); overflow: visible; }
.lightbox::backdrop, .film-dialog::backdrop { background: rgba(21, 19, 15, .96); }
.lightbox__fig { margin: 0; }
/* the image keeps its own aspect inside both limits, so the caption and the bar centre under the picture,
   not under an empty letterbox */
.lightbox__img { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100vh - 150px); max-height: calc(100svh - 150px); margin: 0 auto; border-radius: var(--r-img); }
.lightbox__cap { margin-top: 12px; text-align: center; font: italic 400 18px/1.4 var(--f-display); color: var(--chalk); }
.lightbox__bar { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 12px; }
.lightbox__bar .mono { font: 500 13px/1 var(--f-data); color: var(--muted-dark); min-width: 5em; text-align: center; }
.lightbox__bar form { margin: 0; }
.lightbox .iconbtn, .film-dialog .iconbtn { background: transparent; color: var(--chalk); border-color: rgba(242, 237, 228, .3); }
.lightbox .iconbtn:hover, .film-dialog .iconbtn:hover { background: rgba(242, 237, 228, .08); }
.film-dialog__close { position: absolute; right: 0; top: -54px; }

/* ------------------------------------------------------------------ film (hidden by client decision) */
.film { padding: 112px 0; }
.film__frame { position: relative; width: min(100%, 84vw); margin: 32px auto 20px; border-radius: var(--r-img); overflow: hidden; background: #000; aspect-ratio: 16 / 9; }
.film__video { width: 100%; height: 100%; }
.film__play { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; border: 0; background: rgba(18, 19, 23, .25); color: var(--chalk); font-size: 16px; cursor: pointer; }
.film__disc { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: var(--chalk); color: var(--ink); font-size: 26px; }
.film.is-playing .film__play { display: none; }
.transcript summary { cursor: pointer; }
.transcript__list { list-style: none; padding: 0; color: rgba(242, 237, 228, .8); }
.transcript__list .mono { color: var(--lamp); margin-right: 10px; font-size: 13px; }

/* ------------------------------------------------------------------ the promise (blueprint field, brand §4.18) */
.promise { padding: var(--sec-pad) 0; min-height: 100vh; display: grid; align-items: center; position: relative; overflow: hidden; }
.promise > .wrap { position: relative; }
.promise .eyebrow { color: var(--lamp); }
.promise__n {
  position: relative; display: inline-block; max-width: none;
  font: 300 clamp(4rem, 1rem + 11vw, 11.5rem)/.95 var(--f-display); letter-spacing: -.03em; font-variant-numeric: lining-nums;
  margin: 0 0 56px; color: var(--chalk);
}
/* the dimension string under the numeral: a fine Prussian-light line with 45° end ticks (decorative) */
.promise__n::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -30px; height: 13px; pointer-events: none;
  background:
    linear-gradient(var(--draft-light), var(--draft-light)) 0 50% / 100% 1px no-repeat,
    linear-gradient(var(--draft-light), var(--draft-light)) 0 0 / 1px 100% no-repeat,
    linear-gradient(var(--draft-light), var(--draft-light)) 100% 0 / 1px 100% no-repeat,
    linear-gradient(45deg, transparent calc(50% - .75px), var(--draft-light) calc(50% - .75px), var(--draft-light) calc(50% + .75px), transparent calc(50% + .75px)) -6px 0 / 13px 13px no-repeat,
    linear-gradient(45deg, transparent calc(50% - .75px), var(--draft-light) calc(50% - .75px), var(--draft-light) calc(50% + .75px), transparent calc(50% + .75px)) calc(100% + 6px) 0 / 13px 13px no-repeat;
}
.promise__n:has([data-countup]) { font-size: clamp(120px, 20vw, 300px); }
.promise__line { font: italic 400 clamp(1.375rem, 1.15rem + .6vw, 1.75rem)/1.3 var(--f-display); color: var(--chalk); max-width: 26em; margin-bottom: 14px; }
.promise__line sup.fn a { color: var(--lamp); }
.promise__sub { font: 400 clamp(1.0625rem, 1rem + .35vw, 1.25rem)/1.55 var(--f-body); color: var(--blueprint-muted); max-width: 32em; }
.stats { list-style: none; padding: 32px 0 0; margin: clamp(48px, 6vw, 80px) 0 0; border-top: 1px solid rgba(182, 196, 212, .35); display: grid; gap: 24px; }
@media (min-width: 768px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.promise .stat { color: var(--chalk); }
.stat__n { display: block; font: 400 24px/1.2 var(--f-display); letter-spacing: -.005em; margin-bottom: 6px; color: var(--chalk); }
.stat__l { font: 400 15px/1.55 var(--f-body); color: var(--blueprint-muted); }

/* ------------------------------------------------------------------ who it's for, what you get, how, FAQ */
.how { padding: var(--sec-pad) 0; }
.how h2 { max-width: 16em; }
.cols { display: grid; gap: 40px clamp(32px, 4vw, 64px); margin-top: clamp(40px, 5vw, 64px); }
@media (min-width: 768px) { .cols { grid-template-columns: 1fr 1fr; } }
.col { border-top: 1px solid var(--ink); padding-top: 24px; display: flex; flex-direction: column; }
.col h3 { margin-bottom: 12px; }
.col p { color: var(--ink-soft); margin-bottom: 24px; max-width: 34em; }
.col p em, .step p em { font-style: normal; }
.col .ticks { margin-top: auto; padding-top: 20px; border-top: 1px solid var(--line); }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ticks li { position: relative; padding-left: 22px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .8em; width: 10px; height: 1px; background: var(--bronze); }
.ticks--ink li::before, [data-theme="dark"] .ticks li::before { background: var(--lamp); }
.h-sub { margin-top: clamp(80px, 9vw, 128px); }
.tiles { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 0; grid-template-columns: 1fr; border-top: 1px solid var(--line); }
@media (min-width: 600px) { .tiles { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { padding: 24px 24px 28px 0; font: 400 clamp(1.375rem, 1.15rem + .6vw, 1.75rem)/1.2 var(--f-display); letter-spacing: -.005em; border-bottom: 1px solid var(--line); text-wrap: balance; }
.tile + .tile { padding-left: 24px; }
@media (min-width: 600px) and (max-width: 1023px) { .tile:nth-child(odd) { padding-left: 0; } .tile:nth-child(odd) { border-right: 1px solid var(--line); } }
@media (min-width: 1024px) { .tile { border-bottom: 0; } .tile + .tile { border-left: 1px solid var(--line); } }
@media (max-width: 599px) { .tile + .tile { padding-left: 0; } }
.tile .mono, .step .step__n { display: block; font: italic 300 40px/1 var(--f-display); letter-spacing: 0; color: var(--bronze-ink); margin-bottom: 18px; font-variant-numeric: lining-nums; }
.tile sup.fn a { color: var(--bronze-ink); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 32px; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 3vw, 48px); } }
.step { border-top: 1px solid var(--ink); padding-top: 24px; }
.step h3 { margin: 0 0 10px; }
.step p { color: var(--ink-soft); }
.faq { margin-top: 24px; border-top: 1px solid var(--line); max-width: 880px; }
.faq details { border-bottom: 1px solid var(--line); transition: background-color var(--d-ui) var(--ease-out), padding var(--d-ui) var(--ease-out); }
.faq details[open] { background: var(--travertine); padding-inline: 20px; }
.faq summary { cursor: pointer; list-style: none; padding: 22px 48px 22px 0; position: relative; font: 400 clamp(1.25rem, 1.1rem + .4vw, 1.5rem)/1.3 var(--f-display); color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 1px; background: var(--bronze); transition: transform var(--d-ui) var(--ease-out); }
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq summary:hover { color: var(--bronze-ink); }
.faq details p { color: var(--ink-soft); padding-bottom: 22px; margin: 0; max-width: 40em; }

/* ------------------------------------------------------------------ design partners (brand §4.20) */
.partners { padding: var(--sec-pad) 0; min-height: 100vh; display: grid; align-items: center; }
.partners__grid { display: grid; gap: 56px; align-items: center; }
@media (min-width: 1024px) { .partners__grid { grid-template-columns: 5fr 6fr; gap: clamp(56px, 6vw, 96px); } }
.partners h2 em.turn, .partners h2 .lilac, .lilac { color: var(--chalk); font-style: italic; font-weight: 300; }
.partners .ticks { margin: 0 0 28px; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 32px; }
.cta .pill--lg { font: 500 16px/1 var(--f-body); letter-spacing: .01em; }
.copied { font: 500 12px/1.2 var(--f-body); color: var(--lamp); min-width: 4em; }
.signature { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line-dark); color: var(--muted-dark); font: 400 14px/1.5 var(--f-body); }
.signature strong { color: var(--chalk); font-weight: 600; }
.partners__frame { margin: 0; border-radius: var(--r-img); overflow: hidden; aspect-ratio: 16 / 10; background: #24221D; }
.partners__frame img { width: 100%; height: 100%; object-fit: cover; animation: kenburns 24s var(--ease-io) infinite alternate; }
@keyframes kenburns { from { transform: scale(1.02); } to { transform: scale(1.08); } }

/* ------------------------------------------------------------------ footer (brand §4.21) */
.footer {
  position: relative; z-index: 2; background: var(--ink-deep); color: var(--muted-dark);
  padding: clamp(72px, 8vw, 112px) 0 calc(44px + env(safe-area-inset-bottom)); font-size: 14px; border-top: 1px solid var(--line-dark);
}
.footer__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; color: var(--chalk); padding-bottom: 36px; border-bottom: 1px solid var(--line-dark); }
.footer__top .wordmark { margin: 0; }
.footer__tag { margin: 0; font: italic 400 20px/1.35 var(--f-display); color: var(--chalk); max-width: 30em; }
.footer__links { display: flex; flex-wrap: wrap; gap: 10px 32px; margin: 36px 0 20px; font: 400 14px/1.4 var(--f-body); }
.footer__links a { color: rgba(242, 237, 228, .8); text-decoration: none; transition: color var(--d-fast); text-underline-offset: 5px; text-decoration-thickness: 1px; }
.footer__links a:hover { color: var(--chalk); text-decoration: underline; }
.footer .link { color: var(--lamp); }
.notes { padding-left: 1.2em; font: 400 12.5px/1.55 var(--f-body); max-width: 70em; margin: 28px 0 0; color: var(--muted-dark); }
.notes li::marker { color: var(--lamp); }
.notes:not(:has(li:not([hidden]))) { display: none; }
.footer__credit, .footer__legal, .footer__privacy { font-size: 13px; line-height: 1.5; max-width: 70em; margin-bottom: .6em; }
.toggles { display: flex; flex-wrap: wrap; gap: 18px 32px; margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line-dark); }
.toggle { display: flex; align-items: center; gap: 12px; }
.toggle__l { font: 500 12px/1.2 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted-dark); }
.footer .seg--mini > button, .toggles .seg > button { min-height: 30px; font-size: 13px; }

/* ------------------------------------------------------------------ privacy and 404 pages */
.doc__bar { position: sticky; top: 0; z-index: 10; background: rgba(243, 239, 231, .86); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 1px 0 var(--line); }
.doc__bar-in { height: var(--bar-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.doc__bar .pill { min-height: 40px; padding: 0 18px; font-size: 14px; }
.doc__main { padding: 72px 0 96px; max-width: 760px; }
.doc__h1 { font-size: clamp(2.5rem, 1.6rem + 3vw, 4rem); line-height: 1.04; letter-spacing: -.018em; }
.doc__h2 { font-size: clamp(1.375rem, 1.15rem + .6vw, 1.75rem); margin-top: 48px; }
.doc__main p, .doc__main li { color: var(--ink-soft); }
.doc__main strong { color: var(--ink); }
.doc__list { padding-left: 1.2em; }
.doc__list li { margin-bottom: 10px; }
.doc__list li::marker { color: var(--bronze); }
.doc--404 { min-height: 100vh; display: grid; align-items: center; background: var(--ink-deep); color: var(--chalk); }
.doc404 { padding: 72px 0; }
.doc404 .wordmark { margin-bottom: 64px; color: var(--chalk); }
.doc404__code { color: var(--lamp); font: 500 12px/1.2 var(--f-body); letter-spacing: .14em; text-transform: uppercase; }
.doc404 h1 { font-size: clamp(2.5rem, 1.4rem + 4vw, 4.5rem); max-width: 14em; line-height: 1.04; letter-spacing: -.02em; }
.doc404 .lead { color: rgba(242, 237, 228, .82); }
.doc404__links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* ==================================================================
   LIVE TIERS (A, B, C): set by the engine on <html data-tier>.
   ================================================================== */
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) body { background: var(--dusk-2); }
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .stage { display: block; position: fixed; inset: 0; z-index: 0; height: 100vh; height: 100lvh; pointer-events: none; }
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .stage > canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) #leaders,
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) #ll-labels { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) main { position: relative; z-index: 2; }
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .still-layer { position: fixed; inset: 0; height: 100vh; height: 100lvh; z-index: 1; pointer-events: none; }

/* transparent story sections: the canvas is the background */
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) :is(.hero, .beatsec, .chapter, .explore)[data-canvas] { background: transparent; box-shadow: none; clip-path: none; }
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) :is(.beatsec, .chapter) {
  display: block; width: auto; max-width: none; margin: 0; padding: 0;
  height: calc(var(--len) * var(--u));
}
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) :is(.beatsec, .chapter) > :not(.sr-only) { width: auto; margin: 0; }
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) :is(.posters, .beatsec > .poster) { display: none; }
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .explore__poster { display: none; }
/* Explore is at least one screen tall, so the light section never rises under the ch-09 bookend */
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .explore { min-height: max(100vh, calc(80 * var(--u))); min-height: max(100svh, calc(80 * var(--u))); display: grid; align-items: center; padding: 0; }
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .explore__in { display: block; max-width: var(--maxw); }
/* the explore copy sits over the live canvas: on a dark glass panel */
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .explore__card {
  max-width: 30rem; padding: clamp(24px, 2.4vw, 40px); border-radius: var(--r-panel);
  background: var(--glass-dark); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--line-dark);
}
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .explore__card > :last-child { margin-bottom: 0; }

/* tracks: absolute blocks from data-from to the section end; panels stick inside */
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .track {
  position: absolute; left: 0; right: 0; bottom: 0; top: calc(var(--from, 0) * var(--u));
  pointer-events: none;
}
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .track > * { pointer-events: auto; }
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel,
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .problem__in {
  position: sticky; top: var(--panel-top);
  /* negative margin lets the sticky box stay pinned to the very end of its track (§6.1) */
  margin-bottom: -80vh;
  max-height: calc(100vh - var(--panel-top) - 24px); overflow: auto; overscroll-behavior: contain;
  scrollbar-width: thin;
}
/* panels size to their content: items that have not landed yet take no space (no empty panel area),
   then rise in when they do (@starting-style; older browsers simply show them) */
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) [data-panel] [data-in]:not(.is-in) { display: none; }
@starting-style {
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) [data-panel] [data-in].is-in { opacity: 0; transform: translateY(var(--rise)); }
}
@media (min-width: 768px) {
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) { --panel-top: 50vh; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel {
    /* vertically centred in the viewport (translate is separate from the reveal transform); the larger
       negative margin keeps a centred panel pinned until its track really ends */
    translate: 0 -50%;
    margin-bottom: -160vh;
    max-height: calc(100vh - 2 * var(--bar-h) - 24px);
    width: min(calc(100vw * 0.36), 30rem);
    margin-left: var(--gutter);
    padding: clamp(24px, 2.4vw, 40px); border-radius: var(--r-panel);
    background: var(--glass-light); backdrop-filter: blur(14px) saturate(1.05); -webkit-backdrop-filter: blur(14px) saturate(1.05);
    border: 1px solid rgba(29, 26, 22, .08);
    box-shadow: var(--shadow-lift);
  }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel > :last-child { margin-bottom: 0; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel .lead { font-size: clamp(1rem, .95rem + .25vw, 1.125rem); color: var(--ink-soft); }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) [data-side="right"] .panel { margin-left: auto; margin-right: calc(var(--gutter) + 44px); }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) [data-theme="dark"] .panel { background: var(--glass-dark); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); color: var(--chalk); border-color: var(--line-dark); box-shadow: none; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) [data-theme="dark"] .panel .lead { color: rgba(242, 237, 228, .82); }
  /* S1-4: during the clay / live divider (7a-7c, until the lead lands at 80 vh) the ch-07 panel is a
     slim caption card in the bottom-right corner (eyebrow + H2 + caption), clear of the pavilion and the pool */
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) #ch-07 .panel { transition: translate .7s var(--ease-out), width .7s var(--ease-out); }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) #ch-07 .panel:not(:has(.lead.is-in)) {
    width: min(calc(100vw * 0.28), 380px); padding: 22px 26px 20px;
    translate: 0 calc(50vh - 100% - 92px);
  }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) #ch-07 .panel:not(:has(.lead.is-in)) h2 { font-size: clamp(1.5rem, 1.1rem + 1vw, 2rem); margin-bottom: 4px; }
  /* S2-4: narrower, so the Pass tag clears the stage rail and the skip link */
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel--pilot {
    width: min(calc(54vw - 64px), 676px); margin-left: auto; margin-right: calc(var(--gutter) + 72px);
    background: var(--limewash); backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .problem__in {
    width: min(100% - 2 * var(--gutter), 1040px); margin-inline: auto; --panel-top: 50vh; top: 50vh; translate: 0 -50%;
    margin-bottom: -160vh;
    max-height: calc(100vh - 2 * var(--bar-h) - 24px);
    padding: clamp(28px, 3vw, 48px); border-radius: var(--r-panel);
    background: var(--glass-light); backdrop-filter: blur(14px) saturate(1.05); -webkit-backdrop-filter: blur(14px) saturate(1.05);
    border: 1px solid rgba(29, 26, 22, .08); box-shadow: var(--shadow-lift);
  }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .problem__in .cards { margin-bottom: 18px; }
}
/* phones: bottom sheet in the lower 42 %, 3D framed in the top 58 % (engine uses setViewOffset) */
@media (max-width: 767px) {
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) { --panel-top: 58svh; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel,
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .problem__in {
    top: 58svh; max-height: 42svh; margin: 0 8px -100svh; padding: 10px var(--gutter) 22px; /* S2-7: -100svh keeps the sheet pinned to the bottom until its section ends */
    border-radius: 12px 12px 0 0; background: rgba(251, 249, 245, .96);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 -12px 40px -16px rgba(29, 26, 22, .28); border: 1px solid rgba(29, 26, 22, .08); border-bottom: 0;
  }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) :is(.panel:not(.panel--pilot), .problem__in)::before {
    content: ""; display: block; width: 36px; height: 3px; margin: 0 auto 14px; border-radius: 2px; background: var(--line-strong); opacity: .7;
  }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) [data-theme="dark"] .panel { background: rgba(18, 19, 23, .92); color: var(--chalk); border-color: var(--line-dark); }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) [data-theme="dark"] .panel::before { background: rgba(242, 237, 228, .4); }
  /* S2-7: the sheet reaches the bottom of the screen */
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel:not(.panel--pilot) { min-height: 42svh; }
  /* S2-7: the ch-07 sheet fits without scrolling on phones (the output chips and caption swaps go) */
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) #ch-07 .panel .pills,
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) #ch-07 .panel .swap--captions { display: none; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel h2 { font-size: 1.75rem; margin-bottom: 10px; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel .eyebrow { margin-bottom: 10px; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel .lead { font-size: 16px; margin-bottom: 14px; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel .line { font-size: 1.0625rem; margin-top: 14px; padding-top: 12px; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel--pilot { top: calc(var(--bar-h) + 36px); max-height: calc(100svh - var(--bar-h) - 48px); border-radius: var(--r-panel); }
  /* the pilot sheet owns the screen; the readout and the chapter pill step aside */
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) #ch-03:has(.panel--pilot.is-in) .readout { opacity: 0 !important; }
  html:has(#ch-03 .panel--pilot.is-in) .mprog { opacity: 0; pointer-events: none; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .schedule { padding: 8px 8px 4px; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .problem__in h2 { font-size: 1.75rem; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .problem__in .card { padding: 14px 0 16px; font-size: 15px; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .problem__in .card .card__i { font-size: 22px; margin-bottom: 6px; }
}

/* S2-10: a native anchor jump lands on the story section's own top; main.js then moves deep links on to the first dwell */
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) :is(.beatsec, .chapter, .explore) { scroll-margin-top: calc(-1 * var(--bar-h)); }
/* "Live preview" plate on the images that are live captures (never over a photo) */
.media-chip { position: absolute; left: 12px; top: 12px; z-index: 2; margin: 0; pointer-events: none; background: rgba(18, 19, 23, .72); color: var(--chalk); }
.partners__frame, .explore__poster { position: relative; }

/* Chapter UI hooks (one empty .ch-ui[data-ui="<chapter>"] per story section, for chapter modules):
   a fixed full-viewport layer on live tiers; the layer never takes pointer events, its children may. */
.ch-ui { display: none; }
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .ch-ui { display: block; position: fixed; inset: 0; z-index: 3; pointer-events: none; }
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .ch-ui:empty { display: none; }
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .ch-ui > * { pointer-events: auto; }
/* labels gated on runtime media: the walkthrough label only while sequence.js draws real frames */
html:not(.seq-frames) [data-gate="seq"] { display: none !important; }

/* ==================================================================
   MOTION LANGUAGE (one for the whole page): copy rises by --rise and fades in over --d-reveal on --ease-out.
   Panel items follow scroll (panels.js .is-in). Headings rise line by line, word spans from js/ui/reveal.js
   (.rv-h .sw, --l = line index), a --stagger step per line; panel headings follow their panel, the others reveal
   once on entering the viewport. Copy groups (.rv-up, --i = order) rise one --stagger step apart.
   ================================================================== */
html.js:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) [data-in] { opacity: 0; transform: translateY(var(--rise)); transition: opacity var(--d-reveal) var(--ease-out), transform var(--d-reveal) var(--ease-out); }
html.js:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) [data-in].is-in { opacity: 1; transform: none; }
html.js:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) [data-swap] > [data-in] { display: none; }
html.js:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) [data-swap] > [data-in].is-current { display: list-item; list-style: none; }

html.rv-on .rv-h .sw { display: inline-block; opacity: 0; transform: translateY(var(--rise-word)); transition: opacity var(--d-reveal) var(--ease-out), transform var(--d-reveal) var(--ease-out); transition-delay: calc(var(--l, 0) * var(--stagger) + 60ms); }
html.rv-on .rv-h.is-revealed .sw { opacity: 1; transform: none; }
html.rv-on:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) :is([data-panel], [data-in]) .rv-h .sw { opacity: 0; transform: translateY(var(--rise-word)); }
html.rv-on:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) :is([data-panel], [data-in]).is-in .rv-h .sw { opacity: 1; transform: none; }
html.rv-on .rv-up { opacity: 0; transform: translateY(var(--rise)); transition: opacity var(--d-reveal) var(--ease-out), transform var(--d-reveal) var(--ease-out); transition-delay: calc(var(--i, 0) * var(--stagger)); }
html.rv-on .rv-up.is-revealed { opacity: 1; transform: none; }

/* pinned lines (data-fix) and other fixed overlays */
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) [data-fix] { position: absolute; left: 0; right: 0; bottom: 0; margin: 0 auto; text-align: center; pointer-events: none; padding: 0 var(--gutter); }
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) [data-fix].is-fixed { position: fixed; top: 50%; bottom: auto; transform: translateY(-50%); z-index: 3; }
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .prologue__copy { color: var(--ink); }
/* statements over the drawing sheet: no box, a feathered paper halo keeps the linework off the words */
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .prologue__copy > *,
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .bridge {
  display: block; width: fit-content; max-width: min(92vw, 15em); margin-inline: auto; padding: .35em .8em;
  background: radial-gradient(closest-side, rgba(247, 244, 238, .96) 55%, rgba(247, 244, 238, 0));
}
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .prologue__copy > * + * { margin-top: 0; }
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .prologue__h { max-width: min(92vw, 16em); margin-bottom: 0; }
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .bridge { margin: 0 auto; }
/* the bookend on night: no box, chalk with a soft dark halo in case it meets the sheet */
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .chapter > .bookend.bookend.bookend {
  display: block; width: fit-content; max-width: min(92vw, 18em); margin-inline: auto; padding: .3em .8em;
  color: var(--chalk); font-size: clamp(1.625rem, 1.1rem + 1.6vw, 2.5rem);
  background: radial-gradient(closest-side, rgba(21, 19, 15, .72) 40%, rgba(21, 19, 15, 0));
  text-shadow: 0 1px 18px rgba(21, 19, 15, .6);
}
/* S2-3: the bookend line sits under the settled model, never across it */
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .chapter > .bookend.bookend.bookend.is-fixed { top: auto; bottom: 7vh; transform: none; }
@media (max-width: 767px) {
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .chapter > .bookend.bookend.bookend.is-fixed { bottom: auto; top: calc(58svh + 16px); font-size: 1.5rem; }
}
html.js:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) [data-fix]:not(.is-fixed) { opacity: 0; }
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .readout { position: fixed; right: 84px; bottom: 28px; z-index: 3; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0; transition: opacity .3s; }
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .chapter.is-active .readout { opacity: 1; }
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .buildlog { position: fixed; left: var(--gutter); bottom: 24px; z-index: 3; opacity: 0; padding: 12px 16px; border-radius: var(--r-pill); background: rgba(251, 249, 245, .88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(29, 26, 22, .08); }
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .chapter.is-active .buildlog { opacity: 1; }
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .corner-label { position: fixed; right: 84px; top: calc(var(--bar-h) + 20px); z-index: 3; }
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .dial { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 3; }
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .daydusk { position: fixed; left: 50%; top: calc(var(--bar-h) + 40px); transform: translateX(-50%); z-index: 3; }
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .compare { position: fixed; inset: 0; z-index: 2; pointer-events: none; }
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .compare > * { pointer-events: auto; }
@media (max-width: 767px) {
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .readout { right: auto; left: 16px; bottom: auto; top: calc(var(--bar-h) + 44px); padding: 7px 10px; font-size: 10px; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .readout [data-count] { font-size: 12px; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .buildlog,
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .corner-label { display: none; }
}

/* late pack: show the chapter's first poster full-bleed with the note (storyboard §11) */
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .chapter[data-late="true"] .posters { display: block; position: fixed; inset: 0; z-index: 1; pointer-events: none; }
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .chapter[data-late="true"] .posters > :not(:first-child),
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .chapter[data-late="true"] .poster figcaption { display: none; }
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .chapter[data-late="true"] .poster img { height: 100vh; aspect-ratio: auto; border-radius: 0; }
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .chapter[data-late="true"] .pack-pill { display: inline-block; position: fixed; left: 50%; top: calc(var(--bar-h) + 20px); transform: translateX(-50%); z-index: 4; font: 500 12px/1.2 var(--f-data); letter-spacing: .02em; padding: 7px 12px; border-radius: var(--r-pill); background: var(--glass-dark); color: var(--chalk); }

/* hero copy on live tiers lifts and fades (panels.js sets --hero-k) */
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) [data-hero-copy] { opacity: calc(1 - var(--hero-k, 0)); transform: translateY(calc(var(--hero-k, 0) * -40px)); }
/* S1-2 (final r1): the scrim lives in the fixed photo layer, so it never ends in a hard edge across the house,
   and it fades out with the copy over the first 40 vh (panels.js sets --hero-k on it too) */
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) :is(.hero__cue, .hero__caption) { opacity: calc(1 - 1.6 * var(--hero-k, 0)); }
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .hero__scrim { position: fixed; inset: 0 0 auto 0; height: 100vh; height: 100lvh; opacity: calc(1 - var(--hero-k, 0)); }
@media (max-width: 767px) {
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .still-layer { height: 58svh; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .hero { background: transparent; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .hero__scrim { height: 58svh; min-height: 300px; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .hero__copy { background: var(--dusk-2); margin-top: 58svh; padding-top: 24px; width: 100%; padding-inline: var(--gutter); }
}

/* ==================================================================
   MOTION: OS reduce (unless overridden "on") and the footer "Reduced" toggle
   ================================================================== */
@media (prefers-reduced-motion: reduce) {
  html:not([data-motion="on"]) *, html:not([data-motion="on"]) *::before, html:not([data-motion="on"]) *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
}
html[data-motion="reduced"] *, html[data-motion="reduced"] *::before, html[data-motion="reduced"] *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
html.lenis, html.lenis body { scroll-behavior: auto; }

/* ==================================================================
   PRINT: just the words and posters
   ================================================================== */
@media print {
  .topbar, .rail, .stage, .hero__cue, .loadbar, .toggles, .explore-bar { display: none !important; }
  .hero { min-height: 0; color: #000; background: none; }
  .hero__scrim { display: none; }
}

/* ------------------------------------------------------------------ ch-08 room photos over the live walk (ch08-inside.js)
   Live tiers only (the .ch-ui layer is hidden on tier D, where the same photos are the posters). Desktop: a framed card
   in the free columns beside the right-hand panel; phones: the photo fills the 3D frame (top 58 %). Plain room names. */
.ll-rooms, .ll-rooms * { pointer-events: none !important; } /* never take clicks: the .ch-ui layer is always on (z 3) */
.ll-rooms { position: absolute; inset: 0; }
.ll-room { position: absolute; left: clamp(20px, 4.2vw, 72px); bottom: clamp(72px, 11vh, 132px); width: min(36vw, 560px); margin: 0;
  opacity: 0; visibility: hidden; transform: translate3d(0, 10px, 0) scale(.985); transform-origin: 0 100%; will-change: opacity, transform; }
.ll-room.is-on { visibility: visible; }
.ll-room__img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-img); background: #24221D;
  box-shadow: 0 30px 70px -28px rgba(0, 0, 0, .75), 0 0 0 1px rgba(242, 237, 228, .1); }
.ll-room__cap { position: absolute; left: 12px; bottom: 12px; margin: 0; font: italic 400 15px/1.2 var(--f-display); letter-spacing: 0;
  color: var(--chalk); padding: 6px 10px; border-radius: var(--r-pill); background: rgba(18, 19, 23, .72);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.ll-rooms.is-mobile .ll-room { left: 0; right: 0; top: 0; bottom: auto; width: 100%; height: 58%; transform: none; }
.ll-rooms.is-mobile .ll-room__img { height: 100%; aspect-ratio: auto; border-radius: 0; box-shadow: none; }
.ll-rooms.is-mobile .ll-room__cap { left: 16px; bottom: 16px; font-size: 14px; }
@media (prefers-reduced-motion: reduce) { .ll-room { transform: none !important; } }

/* ------------------------------------------------------------------ brand pass: fit and collision fixes */
/* the active rail label steps aside while a right-hand panel holds the screen (hover or focus still shows it) */
html:has(.chapter[data-side="right"].is-active .panel.is-in) .rail a[aria-current="step"]:not(:hover):not(:focus-visible) .rail__label,
html:has(#ch-03 .panel--pilot.is-in) .rail a[aria-current="step"]:not(:hover):not(:focus-visible) .rail__label { opacity: 0; }
.numerals p { line-height: 1.4; }
/* short desktop viewports: the centred panels keep their contents in view, the build log steps aside */
@media (min-width: 768px) and (max-height: 820px) {
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .buildlog { display: none; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .problem__in { padding: 26px 36px 22px; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .problem__in h2 { font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem); }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .problem__in .cards { margin: 18px 0 14px; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .problem__in .card { padding-top: 14px; padding-bottom: 14px; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .problem__in .card .card__i { font-size: 22px; margin-bottom: 6px; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel { padding: 24px 28px; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .chapter .panel h2 { font-size: clamp(1.75rem, 1.2rem + 1.4vw, 2.5rem); }
}
/* the turn of the headline always starts its own line */
.hero h1 em.turn { display: block; }

/* launch QA: the pilot sheet fits a 1440 x 900 (and shorter) screen without an inner scroll. The numeral sits
   beside its label instead of above it, the heading is one step smaller and the table rows are tighter. */
@media (min-width: 768px) {
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel--pilot .h2 { font-size: clamp(1.75rem, 1.2rem + 1.2vw, 2.375rem); margin-bottom: 4px; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel--pilot .numerals { margin: 6px 0 14px; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel--pilot .numerals p { display: flex; align-items: center; gap: 20px; max-width: none; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel--pilot .numeral { flex: none; margin: 0; font-size: clamp(3rem, 1.6rem + 2.6vw, 4.5rem); }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel--pilot .numeral__l { max-width: 22em; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel--pilot .qc-table th,
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel--pilot .qc-table td { padding-top: 8px; padding-bottom: 8px; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel--pilot .qc-key { margin: 14px 0; gap: 6px; }
}
@media (min-width: 768px) and (max-height: 820px) {
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel--pilot .eyebrow { margin-bottom: 8px; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel--pilot .qc-table caption { padding-bottom: 4px; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel--pilot .qc-table th,
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel--pilot .qc-table td { padding-top: 6px; padding-bottom: 6px; }
}

/* ==================================================================
   FINAL REVIEW r1 (docs/REVIEW_final_r1.md)
   ================================================================== */
/* S3-8: the canvas fades out over the last 15 vh of #explore (panels.js sets --stage-out), so #work never
   slices the live house; explore mode keeps the stage fully visible */
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .stage { opacity: calc(1 - var(--stage-out, 0)); }
html[data-explore] .stage { opacity: 1 !important; }

/* S2-1: the room photo is the hero of each ch-08 room beat (about 58 % of the width, left of the panel); the live
   walk dims behind it (ch08-inside.js, in-scene overlay) */
.ll-room { width: min(58vw, calc(100vw - min(36vw, 30rem) - 2 * var(--gutter) - 44px - clamp(20px, 4.2vw, 72px) - 32px), 1080px);
  bottom: auto; top: 50%; translate: 0 -50%; }
.ll-room__cap { left: 16px; bottom: 16px; font-size: 16px; }
.ll-rooms.is-mobile .ll-room { translate: none; }

/* S2-3: on live tiers the room cards name each room, so the panel's caption list (which lagged the camera) goes */
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d):not(.seq-stage) #ch-08 .panel .swap--captions { display: none; }
/* sequences pass: no cards; the captions name each rest view, timed to it (index.html ch-08 data-in) */

/* S3-7: ch-06 panel in lime wash while the sun is up (panels.js toggles .is-day until 110 vh), then dark glass */
@media (min-width: 768px) {
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) #ch-06 .panel { transition: background-color .6s var(--ease-out), color .6s var(--ease-out), box-shadow .6s var(--ease-out); }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) #ch-06.is-day .panel { background: var(--glass-light); color: var(--ink); border-color: rgba(29, 26, 22, .08); box-shadow: var(--shadow-lift); }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) #ch-06.is-day .panel .lead { color: var(--ink-soft); }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) #ch-06.is-day .panel :is(h2, .eyebrow, .line) { color: inherit; }
}
@media (max-width: 767px) {
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) #ch-06.is-day .panel { background: rgba(251, 249, 245, .96); color: var(--ink); border-color: rgba(29, 26, 22, .08); }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) #ch-06.is-day .panel .lead { color: var(--ink-soft); }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) #ch-06.is-day .panel::before { background: var(--line-strong); }
  /* S3-9: the ch-07 sheet carries its lead from the start, so it is never an empty dark half-screen */
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) #ch-07 .panel .lead[data-in] { display: block; opacity: 1; transform: none; }
  /* S3-9: the hero copy overlaps the lawn at the foot of the photo on a soft fade, which lifts the CTA towards the fold */
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .hero__copy { margin-top: calc(58svh - 112px); padding-top: 64px;
    background: linear-gradient(rgba(18, 19, 23, 0), var(--dusk-2) 72px); }
  html:not(:is([data-tier="A"], [data-tier="B"], [data-tier="C"])) .hero__copy,
  html.tier-d .hero__copy { margin-top: -96px; padding-top: 56px; background: linear-gradient(rgba(18, 19, 23, 0), var(--dusk-2) 64px); }
  .hero__sub { font-size: 1rem; line-height: 1.5; }
}

/* S3-5: the partners CTA is a verb; the address sits beside it as text, with the copy button */
.cta__addr { font: 400 15px/1.2 var(--f-data); letter-spacing: .01em; color: rgba(242, 237, 228, .82); user-select: all; }

/* S3-10: on tier D the ch-04 readout no longer floats alone above an empty column */
html.tier-d .readout[data-readout="ch04"], html:not(:is([data-tier="A"], [data-tier="B"], [data-tier="C"])) .readout[data-readout="ch04"] { display: none; }

/* S2-4: compact desktop (a 1536 x 864 screen at 125 % is 1536 x 730): the ch-03 pilot sheet and the ch-04 schedule
   fit without an inner scroll */
@media (min-width: 1024px) and (max-height: 820px) {
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .chapter .panel h2,
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel--pilot .h2 { font-size: clamp(28px, 3vw, 40px); }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel .lead { margin-bottom: 14px; }
  /* the Caught / Flagged pills carry their own words; the separate legend goes */
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel--pilot .qc-key { display: none; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel--pilot .line { margin: 12px 0 8px; }
  /* the main ch-03 panel drops the duplicate five-row pilot summary (the pilot sheet follows at 150 vh) */
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) #ch-03 .qc-toggle .seg > :is(#qc-src-pilot, label[for="qc-src-pilot"]) { display: none; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) #ch-03 .qc-toggle .seg > label[for="qc-src-house"] { display: none; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) #ch-03 .qc-toggle #qc-src-pilot:checked ~ .seg__pane--pilot { display: none; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) #ch-03 .qc-toggle .seg__pane--house { display: block; margin-top: 0; }
  /* material chips in two columns */
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) #ch-04 .panel { width: min(calc(100vw * 0.44), 40rem); }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) #ch-04 .schedule__rows { grid-template-columns: 1fr 1fr; column-gap: 12px; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) #ch-04 .schedule__rows > li + li { border-top: 0; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) #ch-04 .schedule__rows > li { border-bottom: 1px solid var(--line); }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) #ch-04 .swatch { padding: 7px 18px 7px 4px; align-items: flex-start; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) #ch-04 .swatch .mono { font-size: 12.5px; line-height: 1.35; }
}
/* S3-9: on phones "True to the drawings." holds one line, which brings the CTA above the fold at 390 x 844 */
@media (max-width: 480px) { .hero h1 { font-size: clamp(2rem, 9.2vw, 2.3rem); letter-spacing: -.01em; } }
/* phones, live tiers: the hero caption sits on the ink ground below the copy, not on the lawn of the canvas */
@media (max-width: 767px) {
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .hero__caption { position: relative; z-index: 2; margin: 0; padding: 0 var(--gutter) 28px; background: var(--dusk-2); }
}

/* ==================================================================
   FINAL REVIEW r2 (docs/REVIEW_final_r2.md)
   ================================================================== */
.hero__br { display: none; }
/* S2-2: the headline no longer covers the house it sells. Desktop: the copy keeps to the left 44 % on a scrim
   that sits behind the copy only, and the photo sits right of centre (the gable and pavilion clear the type);
   it eases back to centre as the hero lifts (--hero-k), so the prologue dissolve still registers with the live
   model. Short screens drop the sub to its first sentence. */
@media (min-width: 1024px) {
  .hero__scrim { background:
      linear-gradient(90deg, rgba(21, 19, 15, .70) 0%, rgba(21, 19, 15, .38) 38%, rgba(21, 19, 15, 0) 62%),
      linear-gradient(0deg, rgba(21, 19, 15, .34) 0%, rgba(21, 19, 15, 0) 26%),
      linear-gradient(180deg, rgba(21, 19, 15, .30) 0, rgba(21, 19, 15, 0) 16%); }
  /* sequences pass: 20 % (was 62 %, which moved the house LEFT, under the copy, where the photo is cropped at the
     sides); eases to centre as the hero lifts. js/ui/seqstage.js draws the hero sequence with the same anchor. */
  #top .still-layer img { object-position: calc(20% + 30% * var(--hero-k, 0)) 50%; }
  .hero__copy > * { max-width: max(30rem, calc(44vw - (100vw - min(100vw - 2 * var(--gutter), var(--maxw))) / 2)); }
  /* the 15ch measure (9em of Newsreader) is set as explicit line breaks: a ch or em measure re-wrapped the
     headline when the web font replaced the fallback (CLS 0.23, then 0.05) */
  .hero h1 { font-size: clamp(48px, 5.6vw, 88px); max-width: none; }
  .hero__br { display: inline; }
}
@media (min-width: 1024px) and (max-height: 820px) {
  .hero h1 { font-size: clamp(44px, 4.4vw, 64px); }
  .hero__copy { padding-bottom: 104px; }
}
@media (max-height: 760px) { .hero__sub .hero__sub-2 { display: none; } }
/* Sequences pass: the headline one more step down, so the house reads (it hid about 60 % of the photo at 1536 x 674),
   and the sub sits on a calm soft-edged veil instead of straight on the pool and brick */
@media (min-width: 1024px) {
  .hero h1 { font-size: clamp(42px, 4.1vw, 70px); }
  .hero__copy > * { max-width: max(26rem, calc(36vw - (100vw - min(100vw - 2 * var(--gutter), var(--maxw))) / 2)); }
  .hero__sub { font-size: clamp(1rem, .9rem + .3vw, 1.1875rem); max-width: 23.5em; position: relative; isolation: isolate; }
  .hero__sub::before { content: ""; position: absolute; z-index: -1; inset: -16px -28px -16px -22px; pointer-events: none;
    background: radial-gradient(120% 140% at 20% 50%, rgba(21, 19, 15, .62) 0%, rgba(21, 19, 15, .40) 55%, rgba(21, 19, 15, 0) 100%);
    filter: blur(6px); }
}
@media (min-width: 1024px) and (max-height: 820px) {
  .hero h1 { font-size: clamp(36px, 3.2vw, 50px); margin-bottom: 20px; }
  .hero .eyebrow { margin-bottom: 16px; }
}

/* S2-6: the pilot numeral gets air under the heading (16 px on short desktop screens, where the sheet must fit) */
.numerals { margin-top: 20px; }
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel--pilot .numerals { margin-top: 20px; }
@media (min-width: 768px) and (max-height: 820px) {
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel--pilot .numerals { margin: 16px 0 8px; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel--pilot .h2 { margin-bottom: 0; }
}
/* the ch-04 sheet at 1440 x 900 (781 / 746 px): tighter schedule rows from 901 px tall down */
@media (min-width: 1024px) and (max-height: 960px) {
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) #ch-04 .swatch { padding-top: 6px; padding-bottom: 6px; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) #ch-04 .schedule { margin-top: 14px; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) #ch-04 .panel .lead { margin-bottom: 12px; }
}

/* S2-3: a second compact step for 1536 x 674 (a 1536 x 864 screen at 125 % with a bookmarks or download bar) and
   1366 x 600: the ch-03 pilot sheet and the ch-04 schedule fit without an inner scroll. The course note and the
   pilot source line go (the footer carries note 2). */
@media (min-width: 1024px) and (max-height: 700px) {
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .chapter .panel { max-height: calc(100vh - 120px); }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .chapter .panel h2,
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel--pilot .h2 { font-size: clamp(26px, 2.6vw, 34px); }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel { padding: 20px 24px; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel .eyebrow { margin-bottom: 8px; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel .lead { margin-bottom: 10px; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) #ch-04 .schedule { margin-top: 12px; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) #ch-04 .swatch { padding-block: 6px; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) #ch-04 .proof { margin-top: 10px; } /* shown whole (it fits: 1536 x 674) */
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel--pilot .source { display: none; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel--pilot .numerals { margin: 18px 0 10px; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel--pilot .numeral { font-size: clamp(2.5rem, 1.4rem + 2vw, 3.5rem); }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel--pilot .qc-table th,
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel--pilot .qc-table td { padding-top: 5px; padding-bottom: 5px; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel--pilot .line { margin: 8px 0 4px; }
}
@media (min-width: 1024px) and (max-height: 640px) {
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel--pilot .numerals { margin: 12px 0 6px; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel--pilot .numeral { font-size: 2.5rem; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel--pilot .line { display: none; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) #ch-04 .proof { display: none; } /* under 640 px tall only */
}

/* S2-5: the promise band's stats list is empty while C4 / C5 stay hidden: no stray rule under the promise */
.stats:not(:has(> li:not([hidden]))) { display: none; }


/* ================================================================== SEQUENCES (js/ui/seqstage.js)
   The realistic chapters are pre-rendered sequences on canvas#seq, resting on the finished views. While the
   canvas covers the stage (.stage.is-seq) the WebGL scene is idle and its projected labels are hidden. */
[data-len="300"] { --len: 300; }
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .stage > canvas#seq { background: #15130F; }
.stage.is-seq #leaders, .stage.is-seq #ll-labels { visibility: hidden; }
/* the ch-08 room cards belong to the live walk; the walk is now the sequence, resting on the room views */
html.seq-stage .ll-rooms { display: none; }
/* the ch-07 compare (z 1, a fixed layer inside #ch-07) takes clicks above the next section as it scrolls in;
   the chapter's own copy track stays above the compare */
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) #ch-07 > .track { z-index: 2; }
html.seq-stage #ch-08 .panel .swap--captions { min-height: 1.4em; } /* the panel keeps its height between rest views */


/* ================================================================== REVIEW_seq (docs/REVIEW_seq.md, 2026-11-29) */
/* S1-1: the hero photo holds through the hero with a slow push-in (seqstage.js sets the transform on the img) */
html.seq-stage #top .still-layer img { will-change: transform; }
/* S3-2: the ch-08 heading follows the rest views. Tier D and no-JS show the first heading only; live tiers show
   the current one ([data-swap] in panels.js) */
.h-swap > span + span { display: none; }
html.js:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .h-swap > [data-in].is-current { display: block; animation: ll-hswap .45s var(--ease-out, ease-out) both; }
@keyframes ll-hswap { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { html.js .h-swap > [data-in].is-current { animation: none; } }
/* S3-6: the dial's stops sit on the descending half of the arc (Day at the top, Sunset low, Dusk on the
   horizon); the label row sits under that half */
.dial.ll-dial.is-desc .dial__labels { padding-left: 38%; gap: 10px; }
/* S3-5: very wide, short desktop screens (1536 x 727 and wider than 2:1): the photo is cropped top and bottom,
   so its anchor cannot move the gable clear of the headline; the headline takes one step down there
   (seqstage.js also anchors the push-in left until the copy lifts) */
@media (min-width: 1024px) and (min-aspect-ratio: 39/20) {
  .hero h1 { font-size: clamp(34px, 2.95vw, 48px); }
  /* first-visit quick fix 6 (2026-11-30): the photo's starting push-in (seqstage.js _heroPhoto at the top of the page:
     scale 1.09, anchored left) from the first paint, so it no longer zooms and slides when the scripts start.
     seqstage.js writes the transform inline from then on ('none' once the copy has lifted); a page where the sequence
     stage never takes the photo (tier D, 3D off, no sequences: html.hero-free) keeps the plain photo. */
  html.js:not(.tier-d):not(.hero-free):not([data-3d="off"]) #top .still-layer img { transform: scale(1.09); transform-origin: 0% 50%; }
}

/* ================================================================== EFFORTLESS SCROLL round 1 (2026-11-29) */
/* feel B1: on touch screens a swipe that started on a copy sheet moved the page 0 px. Every .panel is a scroll
   container (overflow: auto) with overscroll-behavior: contain, so Chromium latched the touch scroll to the sheet
   and never chained it to the page, even when the sheet had nothing to scroll. On coarse pointers a sheet now
   hands the gesture to the page when it has nothing (more) to scroll. Faded panels (not .is-in) are invisible:
   they no longer catch touches, clicks or the wheel on any live tier. */
@media (pointer: coarse) {
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) :is(.panel, .problem__in) { overscroll-behavior: auto; }
}
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel[data-in]:not(.is-in) { pointer-events: none; }

/* ================================================================== PHONE SHEETS FIT (2026-11-29) */
/* Client: copy sheets on phones must not scroll inside themselves. Tighter type everywhere; the problem sheet
   takes the screen (its 3D is dimmed anyway); the long reference blocks (ch-04 schedule, ch-03 check browser,
   pilot source/key) are desktop-only, their content stays reachable on desktop and tier D. */
@media (max-width: 767px) {
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) :is(.panel, .problem__in) { padding-bottom: 14px; overflow: hidden; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) :is(.panel:not(.panel--pilot), .problem__in)::before { margin-bottom: 10px; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) :is(.panel, .problem__in) h2 { font-size: 1.5rem; line-height: 1.15; margin-bottom: 8px; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) :is(.panel, .problem__in) .eyebrow { margin-bottom: 6px; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel .lead { font-size: 15px; line-height: 1.45; margin-bottom: 10px; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel .line { font-size: 1rem; margin-top: 10px; padding-top: 8px; }
  /* problem: full-height sheet under the top bar, compact cards */
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .problem__in { top: calc(var(--bar-h) + 12px); max-height: calc(100svh - var(--bar-h) - 12px); }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .problem__in .cards { gap: 8px; margin-bottom: 10px; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .problem__in .card { padding: 10px 12px; font-size: 14px; line-height: 1.4; }
  /* ch-03: the full check browser and the demo note stay on desktop */
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) #ch-03 .panel:not(.panel--pilot) .qc-toggle,
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) #ch-03 .qc-catch .meta { display: none; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) #ch-03 .qc-catch { font-size: 14px; line-height: 1.4; margin: 8px 0 0; }
  /* pilot sheet: drop the source line and key, tighter numerals and rows */
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel--pilot :is(.source, .qc-key) { display: none; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel--pilot .numerals { margin: 8px 0; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel--pilot .numeral { font-size: 2.25rem; }
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .panel--pilot .qc-table :is(th, td) { padding-top: 4px; padding-bottom: 4px; font-size: 12.5px; }
  /* ch-04: the schedule list is desktop-only; the materials still name themselves in the swap line */
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) #ch-04 .panel .schedule { display: none; }
}

/* ================================================================== FIRST-VISIT QUICK FIX 11 (2026-11-30)
   Captions that moved while the visitor scrolled (layout shift, docs/PERF_first_visit.md problem 11) now keep their
   place; what changes is shown with opacity and transform only.
   - swapped caption lines (ch-07 / ch-08 / ch-09 [data-swap] lists) and the ch-08 heading: every line sits in the
     same grid cell, so the list or heading keeps the height of its tallest line and nothing under it moves when the
     current line changes; the current one fades and rises in (the panels.js .is-current switch is unchanged);
   - the problem cards keep their place while they wait to land (invisible), so the caption under them never jumps;
   - ch-03 (desktop): once the source toggle is in, the flagged-chimney note keeps its place above it until it lands,
     so the check log under it does not drop by the note's height. */
html.js:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .swap--captions[data-swap] { display: grid; }
html.js:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .swap--captions[data-swap] > [data-in] {
  display: list-item; list-style: none; grid-area: 1 / 1; visibility: hidden; opacity: 0; transform: translateY(var(--rise));
  transition: opacity var(--d-reveal) var(--ease-out), transform var(--d-reveal) var(--ease-out), visibility 0s linear var(--d-reveal); }
html.js:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .swap--captions[data-swap] > [data-in].is-current {
  visibility: visible; opacity: 1; transform: none; transition: opacity var(--d-reveal) var(--ease-out), transform var(--d-reveal) var(--ease-out), visibility 0s; }
html.js:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .h-swap { display: grid; }
html.js:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .h-swap > [data-in] { display: block; grid-area: 1 / 1; visibility: hidden; }
html.js:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) .h-swap > [data-in].is-current { visibility: visible; }
html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) [data-panel] .cards > .card[data-in]:not(.is-in) { display: list-item; visibility: hidden; }
@media (min-width: 768px) {
  html:is([data-tier="A"], [data-tier="B"], [data-tier="C"]):not(.tier-d) #ch-03 .panel:has(> .qc-toggle.is-in) > .qc-catch[data-in]:not(.is-in) { display: block; visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  html.js .swap--captions[data-swap] > [data-in] { transition: none; transform: none; }
}

/* ================================================================== CONTACT FORM (2026-11-30) */
.cta__or { color: var(--muted-dark); font: 400 14px/1.5 var(--f-body); }
.link--chalk { color: var(--chalk); text-decoration-color: rgba(242, 237, 228, .4); }
.contact { background: rgba(242, 237, 228, .04); border: 1px solid var(--line-dark); border-radius: var(--r-panel); padding: clamp(22px, 2.6vw, 40px); display: grid; gap: 16px; color: var(--chalk); }
.contact__h { font: 400 clamp(1.5rem, 1.1rem + 1vw, 2rem)/1.15 var(--f-display); margin: 0 0 4px; color: var(--chalk); }
.contact__row { display: grid; gap: 16px; }
@media (min-width: 640px) { .contact__row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 6px; }
.field__l { font: 500 12px/1.2 var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted-dark); }
.field__l em { font-style: normal; text-transform: none; letter-spacing: 0; opacity: .75; margin-left: 4px; }
.field__hint { color: var(--muted-dark); font: 400 13px/1.45 var(--f-body); }
.field input, .field select, .field textarea {
  width: 100%; box-sizing: border-box; font: 400 16px/1.4 var(--f-body); color: var(--chalk);
  background: rgba(18, 19, 23, .55); border: 1px solid rgba(242, 237, 228, .18); border-radius: var(--r-panel);
  padding: 12px 14px; transition: border-color var(--d-fast, .15s), box-shadow var(--d-fast, .15s);
}
.field textarea { resize: vertical; min-height: 112px; }
.field select { appearance: none; -webkit-appearance: none; padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, var(--lamp) 50%), linear-gradient(135deg, var(--lamp) 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.field select option { color: var(--ink); background: var(--limewash); }
.field ::placeholder { color: rgba(242, 237, 228, .38); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--lamp); box-shadow: 0 0 0 3px rgba(214, 179, 131, .22); }
.field [aria-invalid] { border-color: #D98A6F; }
.contact__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 4px; }
.contact__fine { margin: 0; color: var(--muted-dark); font: 400 13px/1.5 var(--f-body); }
.contact__status { margin: 0; min-height: 1.5em; font: 400 15px/1.5 var(--f-body); color: var(--lamp); }
.contact__status[data-kind="error"] { color: #E7A58E; }
.contact.is-sent .field, .contact.is-sent .contact__row { opacity: .5; }
