/* Round 7 copy of round 6 site/public/site.css (unchanged rules; the source of truth for inner routes). Home adds journey.css. */
/* Parallel, round 6. Tokens first: docs/parallel-implementation-handoff.md maps each one to the app.
   System rule: state is shown with words, weight and position, never with status dots, rings, glows or pills.
   Circles remain only where they are functional: graph points, the selected graph point, radio inputs and focus. */
@font-face { font-family: "Instrument Serif"; src: url("assets/fonts/instrument-serif-regular.woff2") format("woff2"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("assets/fonts/instrument-serif-italic.woff2") format("woff2"); font-style: italic; font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist"; src: url("assets/fonts/geist-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("assets/fonts/geist-mono-var.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }

:root {
  /* colour */
  --bg: #090b0b;
  --bg-2: #0e1212;
  --bg-3: #141a1a;
  --fg: #eef1ee;
  --fg-2: #b3bdba;
  --fg-3: #7c8b88;
  --hair: rgba(238, 241, 238, 0.11);
  --hair-2: rgba(238, 241, 238, 0.2);
  --light: #5cf2d6;            /* emitted light and the primary action only */
  --light-rgb: 92, 242, 214;
  --review: #e3b56f;           /* local review layer only; never in public output */
  --review-missing: #f2917c;
  /* type */
  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --fs-name: clamp(40px, calc(3.6vw + 8px), 60px);       /* Andrew's name, once, on Home */
  --fs-display: clamp(44px, calc(4.4vw + 10px), 80px);   /* section titles and route titles */
  --fs-title: clamp(28px, calc(1.5vw + 14px), 38px);     /* company and item titles */
  --fs-lede: clamp(18px, calc(0.5vw + 13px), 21px);
  --fs-body: 17px;
  --fs-small: 15px;
  --fs-caption: 13px;
  --fs-label: 12px;
  --fs-tag: 10.5px;
  /* space and shape */
  --pad: clamp(22px, 7.2vw, 128px);
  --gutter: calc(var(--pad) * 0.42);
  --masthead-h: 68px;
  --section-y: clamp(76px, 10.5svh, 128px);
  --r-media: 14px;
  --r-tab: 16px;
  --r-panel: 22px;
  --ease: cubic-bezier(0.22, 0.7, 0.12, 1);
  --take-pos: 20% 50%;          /* desktop crop of the 16:9 take: keeps the lamp left of centre, Andrew right */
  --grade: contrast(1.07) saturate(0.93) brightness(0.9);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); color: var(--fg); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--masthead-h) + 8px); }
body { display: flex; flex-direction: column; min-height: 100svh; margin: 0; font: 400 var(--fs-body)/1.55 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip; }
main { flex: 1 0 auto; }
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
::selection { background: rgba(var(--light-rgb), 0.3); }
:focus-visible { outline: 2px solid var(--light); outline-offset: 3px; border-radius: 4px; }
q { quotes: "\201C" "\201D"; }
code { font: 500 0.88em var(--mono); }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; top: -80px; left: 16px; z-index: 100; padding: 12px 16px; border-radius: 10px; background: var(--light); color: #03201b; font-weight: 600; text-decoration: none; }
.skip:focus { top: 16px; }

/* ---------------------------------------------------------------- views
   Review (default) shows the local review layer. ?view=clean and ?view=publish never show it.
   The publishable view leaves out whatever the build marked; nothing is replaced by a placeholder. */
[data-mode="clean"] [data-review], [data-mode="publish"] [data-review] { display: none !important; }
[data-mode="publish"] [data-publish="omit"] { display: none !important; }
:root:not([data-mode="publish"]) [data-publish-only] { display: none !important; }
[data-mode="publish"] [data-publish-show] { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; white-space: normal; }
.no-js [data-open-review] { display: none !important; }

/* ---------------------------------------------------------------- masthead */
.masthead { position: fixed; inset: 0 0 auto; z-index: 40; display: flex; align-items: center; gap: 24px; height: var(--masthead-h); padding: 0 var(--pad); border-bottom: 1px solid transparent; transition: background 0.4s, border-color 0.4s, backdrop-filter 0.4s; }
.masthead.is-scrolled { background: rgba(9, 11, 11, 0.82); border-color: var(--hair); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); }
.wordmark { font: 400 21px/1 var(--serif); letter-spacing: 0.005em; text-decoration: none; white-space: nowrap; transition: opacity 0.35s var(--ease); }
/* Home announces the name once, in the opening. The masthead name returns once that heading has scrolled away. */
[data-page="home"] .masthead:not(.show-name) .wordmark { opacity: 0; visibility: hidden; transition: opacity 0.25s var(--ease), visibility 0s linear 0.25s; }
.nav { margin-left: auto; }
.nav ul { display: flex; gap: clamp(18px, 2.2vw, 32px); margin: 0; padding: 0; list-style: none; }
.nav a { display: inline-block; padding: 6px 0; color: var(--fg-2); font-size: 14px; font-weight: 500; text-decoration: none; transition: color 0.2s; }
.nav a:hover { color: var(--fg); }
.nav a[aria-current="page"] { color: var(--fg); text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: var(--hair-2); text-underline-offset: 8px; }
.nav-toggle { display: none; }
/* Local review entry: plain text after a hairline. Not part of the site's navigation, never in public output. */
.review-link { flex: none; margin: 0; padding: 6px 0 6px clamp(14px, 1.6vw, 22px); border: 0; border-left: 1px solid var(--hair-2); border-radius: 0; background: none; color: var(--fg-2); font: 500 13px/1 var(--sans); white-space: nowrap; cursor: pointer; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55); transition: color 0.2s; }
.review-link:hover { color: var(--fg); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.review-count { color: var(--fg); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- buttons and links */
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px; border: 1px solid transparent; border-radius: 999px; font: 600 15px/1.1 var(--sans); text-decoration: none; white-space: nowrap; cursor: pointer; transition: background 0.25s, border-color 0.25s, color 0.25s; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn .ext { width: 11px; height: 11px; }
.btn-primary { background: var(--light); color: #03201b; }
.btn-primary:hover { background: #93f8e6; }
.btn-quiet { border-color: var(--hair-2); background: transparent; color: var(--fg); font-weight: 500; }
.btn-quiet:hover { border-color: rgba(var(--light-rgb), 0.55); }
.btn .meta { color: var(--fg-3); font-weight: 500; font-variant-numeric: tabular-nums; }
.link { color: var(--fg); text-decoration: none; border-bottom: 1px solid var(--hair-2); transition: border-color 0.2s; }
.link:hover { border-color: var(--light); }
.link .ext { display: inline-block; width: 10px; height: 10px; margin-left: 5px; vertical-align: 0.05em; }
.source { color: var(--fg-3); font-size: var(--fs-caption); text-decoration: none; white-space: nowrap; border-bottom: 1px solid var(--hair); transition: color 0.2s, border-color 0.2s; }
.source:hover { color: var(--fg-2); border-color: var(--fg-3); }
.kicker { margin: 0 0 16px; color: var(--fg-3); font: 600 var(--fs-label)/1.2 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; }
.display { margin: 0; font: 400 var(--fs-display)/0.96 var(--serif); letter-spacing: -0.012em; }

/* ---------------------------------------------------------------- review tags (local review only) */
.note { display: inline; margin: 0 0 0 0.45em; padding: 0; border: 0; background: none; color: var(--review); font: 600 var(--fs-tag)/1 var(--sans); letter-spacing: 0.11em; text-transform: uppercase; vertical-align: 0.14em; white-space: nowrap; cursor: pointer; text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: rgba(227, 181, 111, 0.35); text-underline-offset: 3px; }
.note:hover, .note[aria-expanded="true"] { text-decoration-color: currentColor; }
.note:focus-visible { outline-offset: 2px; }
.note[data-status="missing"] { color: var(--review-missing); text-decoration-color: rgba(242, 145, 124, 0.35); }
.note-text { margin-left: 0.55em; color: var(--review); font: 600 var(--fs-tag)/1 var(--sans); letter-spacing: 0.11em; text-transform: uppercase; white-space: nowrap; }
.note-text[data-status="missing"] { color: var(--review-missing); }
.plate-meta .note, .still figcaption .note, .ph-cap .note, .appear-art figcaption .note { margin: 0; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9); }

/* ---------------------------------------------------------------- 1. opening */
.opening { position: relative; display: flex; align-items: flex-end; min-height: max(640px, 100svh); padding: calc(var(--masthead-h) + 48px) var(--pad) clamp(36px, 6.5svh, 80px); isolation: isolate; }
/* The take fills the opening. Its first frame paints first; the whole film (1:10) then plays over it, muted, and holds
   its last frame. Listen turns the sound on. Where the film cannot play the last frame cross-fades in instead. */
.plate { position: absolute; inset: 0; z-index: -1; margin: 0; overflow: hidden; background: #0b1010; }
.plate img, .plate video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--take-pos); }
.plate-film, .plate-end { opacity: 0; transition: opacity 0.6s var(--ease); }
.plate.is-film .plate-film, .plate.is-end .plate-end { opacity: 1; }
/* Legibility for the copy over the piano, and for the navigation over the wall. */
.plate::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background:
  linear-gradient(90deg, rgba(9, 11, 11, 0.86) 0%, rgba(9, 11, 11, 0.55) 22%, rgba(9, 11, 11, 0) 50%),
  linear-gradient(0deg, var(--bg) 0%, rgba(9, 11, 11, 0.7) 14%, rgba(9, 11, 11, 0) 40%),
  linear-gradient(180deg, rgba(9, 11, 11, 0.6) 0%, rgba(9, 11, 11, 0) 15%); }
.plate-meta { position: absolute; right: 18px; bottom: 16px; z-index: 2; }
.opening-copy { position: relative; z-index: 2; width: min(100%, 600px); }
.name { margin: 0; font: 400 var(--fs-name)/1.04 var(--serif); letter-spacing: -0.01em; text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35); }
.name-text { display: inline-block; }
.positioning { max-width: 34ch; margin: clamp(16px, 2.2svh, 22px) 0 0; color: var(--fg-2); font-size: var(--fs-lede); line-height: 1.5; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-top: clamp(22px, 3.4svh, 32px); }
/* The companies, named by their own marks: large enough to read as the four things he builds, not as a footnote. */
.opening-cos { width: max-content; max-width: calc(100vw - 2 * var(--pad)); margin-top: clamp(26px, 4svh, 40px); padding-top: clamp(18px, 2.6svh, 26px); border-top: 1px solid var(--hair); }
.opening-cos ul { display: flex; flex-wrap: wrap; gap: 8px clamp(24px, 2.8vw, 44px); margin: 0; padding: 0; list-style: none; }
.opening-cos a { display: inline-flex; align-items: center; gap: 12px; min-height: 52px; color: var(--fg); font-size: clamp(16px, calc(0.45vw + 11px), 18px); font-weight: 500; letter-spacing: -0.005em; text-decoration: none; white-space: nowrap; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.55); }
.opening-cos .oc-mark { width: 40px; height: 40px; transition: transform 0.35s var(--ease), filter 0.35s var(--ease); }
.opening-cos a:hover .oc-mark { transform: translateY(-2px); filter: drop-shadow(0 6px 14px rgba(var(--accent-rgb), 0.35)); }
.opening-cos a:hover .oc-name { text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: rgba(var(--accent-rgb), 0.8); text-underline-offset: 5px; }
.oc-mark { display: grid; place-items: center; width: 24px; height: 24px; flex: none; }
.oc-mark img { width: 100%; height: 100%; object-fit: contain; }

/* Listen: the film plays muted; this turns the sound on (and off), and stays at hand, docked in the corner, while the
   film plays on behind the journey. A slow teal halo is the prompt; it stops once the sound is on. */
.listen { position: absolute; right: var(--pad); bottom: clamp(36px, 6.5svh, 80px); z-index: 3; display: inline-flex; align-items: center; gap: 11px; min-height: 46px; padding: 0 18px 0 15px; border: 1px solid rgba(238, 241, 238, 0.24); border-radius: 999px; background: rgba(9, 11, 11, 0.46); color: var(--fg); font: 500 15px/1 var(--sans); cursor: pointer; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: border-color 0.25s, background 0.25s, opacity 0.4s var(--ease), transform 0.4s var(--ease); }
.listen:hover { border-color: rgba(var(--light-rgb), 0.7); background: rgba(9, 11, 11, 0.66); }
.listen-icon { display: inline-flex; align-items: center; gap: 2.5px; width: 18px; height: 16px; }
.listen-icon i { width: 2.5px; height: 5px; border-radius: 2px; background: currentColor; transform-origin: 50% 50%; transition: height 0.3s var(--ease), background 0.3s; }
.listen-icon i:nth-child(2) { height: 9px; } .listen-icon i:nth-child(3) { height: 12px; } .listen-icon i:nth-child(4) { height: 7px; }
.listen[data-state="on"] .listen-icon i { background: var(--light); animation: listen-eq 1.15s ease-in-out infinite; }
.listen[data-state="on"] .listen-icon i:nth-child(2) { animation-delay: -0.35s; } .listen[data-state="on"] .listen-icon i:nth-child(3) { animation-delay: -0.7s; } .listen[data-state="on"] .listen-icon i:nth-child(4) { animation-delay: -0.15s; }
.listen-meta { color: var(--fg-3); font-variant-numeric: tabular-nums; }
.listen[data-state="on"] .listen-meta { color: var(--light); }
.listen[data-state="muted"]::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; animation: listen-prompt 2.8s var(--ease) infinite; }
/* Once the reader has turned the sound on, a compact control in the masthead keeps it at hand through the journey. */
.sound-dock { display: inline-flex; align-items: center; gap: 9px; min-height: 34px; padding: 0 13px 0 11px; border: 1px solid rgba(var(--light-rgb), 0.45); border-radius: 999px; background: rgba(var(--light-rgb), 0.07); color: var(--fg); font: 500 13px/1 var(--sans); white-space: nowrap; cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.sound-dock[hidden] { display: none; }
.sound-dock:hover { border-color: var(--light); background: rgba(var(--light-rgb), 0.14); }
.sound-dock[data-state="on"] .listen-icon i { background: var(--light); animation: listen-eq 1.15s ease-in-out infinite; }
.sound-dock[data-state="on"] .listen-icon i:nth-child(2) { animation-delay: -0.35s; } .sound-dock[data-state="on"] .listen-icon i:nth-child(3) { animation-delay: -0.7s; } .sound-dock[data-state="on"] .listen-icon i:nth-child(4) { animation-delay: -0.15s; }
.sound-dock:not([hidden]) + .review-link { margin-left: 0; }
@keyframes listen-prompt { 0% { box-shadow: 0 0 0 0 rgba(var(--light-rgb), 0.5); } 70% { box-shadow: 0 0 0 14px rgba(var(--light-rgb), 0); } 100% { box-shadow: 0 0 0 0 rgba(var(--light-rgb), 0); } }
@keyframes listen-eq { 0%, 100% { transform: scaleY(0.45); } 50% { transform: scaleY(1.15); } }
.no-js .listen { display: none; }
/* Clicking the film itself also turns the sound on. */
.js .opening.can-listen { cursor: pointer; }
.js .opening.can-listen .opening-copy { cursor: auto; }
/* Without an approved still the opening is typographic and there is no light path. */
[data-mode="publish"] .opening[data-publish-variant="text"] { min-height: 0; padding-top: calc(var(--masthead-h) + clamp(96px, 18svh, 180px)); }
[data-mode="publish"] .opening[data-publish-variant="text"] .opening-copy { width: auto; max-width: 760px; }

/* ---------------------------------------------------------------- 2. case study */
.case { position: relative; padding: clamp(56px, 8svh, 96px) var(--pad) clamp(56px, 8svh, 96px); }
.case-grid { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(300px, 0.8fr); grid-template-rows: auto 1fr; grid-template-areas: "stage head" "stage steps"; column-gap: clamp(28px, 3.6vw, 64px); align-items: start; }
.case-head { grid-area: head; }
.case-title { display: flex; align-items: center; gap: 0.22em; }
.case-mark { display: grid; place-items: center; width: 0.62em; height: 0.62em; flex: none; margin-top: 0.06em; }
.case-mark img { width: 100%; height: 100%; }
.case-role { margin: 18px 0 0; color: var(--fg); }
.role-label { display: block; margin-bottom: 4px; color: var(--fg-3); font-size: var(--fs-label); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.case-dek { margin: 14px 0 0; color: var(--fg-2); font-size: var(--fs-small); line-height: 1.5; }
.stage { position: relative; grid-area: stage; margin: 0; }
.case-steps { grid-area: steps; margin-top: clamp(20px, 3svh, 32px); }
.frame { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 16px; background: #0b1111; box-shadow: 0 0 0 1px var(--hair), 0 50px 90px -50px rgba(0, 0, 0, 0.95); touch-action: pan-y; }
.shot { position: absolute; top: 0; left: 0; transform-origin: 0 0; opacity: 0; transition: opacity 0.7s var(--ease), transform 1.1s var(--ease); }
.shot.is-active { opacity: 1; }
.shot img { width: 100%; height: 100%; }
.shot-marks { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.shot-marks .dim { fill: rgba(3, 7, 7, 0.58); opacity: 0; transition: opacity 0.8s var(--ease); }
.shot-marks .ring, .shot-marks .trace { fill: none; stroke: var(--light); stroke-width: var(--sw, 3px); stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 0.9s var(--ease); }
.shot-marks .trace { stroke-linecap: round; opacity: 0.85; }
.shot-marks.is-on .dim { opacity: 1; }
.shot-marks.is-on .ring, .shot-marks.is-on .trace { stroke-dashoffset: 0; }
.frame-shade { position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(238, 241, 238, 0.05), inset 0 -60px 60px -60px rgba(0, 0, 0, 0.6); border-radius: inherit; }
.stage-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-top: 16px; }
.stage-caption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 4px; margin-top: 10px; color: var(--fg-3); font-size: var(--fs-caption); }
.stage-count { color: var(--fg-2); font-variant-numeric: tabular-nums; }
.stage-count b { color: var(--fg); font-weight: 600; }
.steps { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--hair); }
.step { position: relative; border-bottom: 1px solid var(--hair); }
.step-btn { display: flex; align-items: baseline; gap: 14px; width: 100%; padding: 17px 0; border: 0; background: none; color: var(--fg-3); font-size: var(--fs-body); font-weight: 500; line-height: 1.3; text-align: left; cursor: pointer; transition: color 0.3s; }
.step-btn:hover { color: var(--fg-2); }
.step-n { min-width: 14px; color: var(--fg-3); font: italic 400 23px/1 var(--serif); transition: color 0.3s; }
.step.is-current .step-btn { color: var(--fg); }
.step.is-current .step-n { color: var(--light); }
.step-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.6s var(--ease); }
.step-inner { min-height: 0; overflow: hidden; }
.step.is-current .step-body, .no-js .step-body, [data-mode="publish"] .case[data-publish-variant="text"] .step-body { grid-template-rows: 1fr; }
.step-why { margin: 0 0 18px 28px; color: var(--fg-2); font-size: 16px; line-height: 1.5; }
.step-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; overflow: hidden; }
.step-progress i { display: block; height: 100%; background: var(--light); transform: scaleX(0); transform-origin: left; }
.case.is-playing .step.is-current .step-progress i { animation: progress var(--step-ms, 6800ms) linear forwards; }
.case.is-held .step.is-current .step-progress i { animation-play-state: paused; }
@keyframes progress { to { transform: scaleX(1); } }
.case-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.ctl { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 15px; border: 1px solid var(--hair-2); border-radius: 999px; background: transparent; color: var(--fg); font-size: 14px; font-weight: 500; cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.ctl svg { width: 13px; height: 13px; }
.ctl:hover:not(:disabled) { border-color: rgba(var(--light-rgb), 0.55); }
.ctl:disabled { opacity: 0.38; cursor: default; }
.no-js .case-controls, .no-js .stage-count { display: none; }
.no-js .shot-first { opacity: 1; width: 100% !important; height: auto !important; }
.no-js .shot-first img { width: 100%; height: auto; }
[data-mode="publish"] .case[data-publish-variant="text"] .case-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "steps"; max-width: 760px; }
.case-foot { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(300px, 0.8fr); align-items: start; gap: 20px clamp(28px, 3.6vw, 64px); margin-top: clamp(28px, 4svh, 44px); }
.gap { max-width: 64ch; padding: 2px 0 2px 18px; border-left: 1px solid rgba(242, 145, 124, 0.45); color: var(--fg-2); font-size: var(--fs-small); }
.gap p { margin: 0; }
.gap-label { margin-bottom: 6px !important; color: var(--review-missing); font-size: var(--fs-label); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.case-outcome { margin: 0; color: var(--fg-2); }
.case-links { margin: 8px 0 0; }

/* ---------------------------------------------------------------- 3. companies */
.chapters { position: relative; padding: var(--section-y) var(--pad) clamp(56px, 8svh, 96px); }
.chapters-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 0.55fr); align-items: end; gap: 24px 48px; }
.chapters-head .display .line { display: block; }
.chapters-side { display: grid; gap: 12px; margin-bottom: 8px; }
.chapters-intro { max-width: 36ch; margin: 0; color: var(--fg-2); }
/* All four companies stay visible at once: the tab row is the overview. */
.co-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: clamp(48px, 7svh, 76px); }
.co-tab { position: relative; display: grid; align-content: start; gap: 12px; min-width: 0; padding: 22px 22px 24px; border: 1px solid var(--hair); border-radius: var(--r-tab); background: var(--bg-2); color: var(--fg-2); text-align: left; cursor: pointer; transition: border-color 0.3s, background-color 0.3s; }
/* The selected tab carries a 2px rule in the company's colour, joined by the light path above it. */
.co-tab::before { content: ""; position: absolute; top: -1px; left: 22px; right: 22px; height: 2px; background: var(--accent); opacity: 0; transition: opacity 0.3s; }
.co-tab:hover { border-color: var(--hair-2); }
.co-tab[aria-selected="true"] { border-color: rgba(var(--accent-rgb), 0.5); background: var(--bg-3); color: var(--fg); }
.co-tab[aria-selected="true"]::before { opacity: 1; }
.co-mark { display: grid; place-items: center; width: 40px; height: 40px; }
.co-mark img { width: 100%; height: 100%; object-fit: contain; }
.co-tab-name { color: var(--fg); font: 400 clamp(26px, calc(1.2vw + 12px), 34px)/1.05 var(--serif); }
.co-tab-desc { display: grid; gap: 10px; font-size: 14px; line-height: 1.45; }
.co-tab-line { color: var(--fg-2); }
.co-tab-rel { color: var(--fg-3); font-size: var(--fs-caption); font-weight: 500; }
.co-tab[aria-selected="true"] .co-tab-rel { color: var(--fg-2); }
.co-credit { margin: 22px 0 0; color: var(--fg-3); font-size: var(--fs-caption); }
.co-panels { position: relative; min-width: 0; margin-top: clamp(28px, 4svh, 40px); }
.co-panel { position: relative; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); align-items: start; gap: clamp(28px, 4vw, 72px); padding: clamp(22px, 3vw, 44px); border: 1px solid var(--hair); border-radius: var(--r-panel); background: var(--bg-2); outline: none; }
.js .co-panel[data-inactive] { display: none; }
.co-panel.is-entering { animation: panel-in 0.6s var(--ease); }
@keyframes panel-in { from { opacity: 0; transform: translateY(12px); } }
[data-mode="publish"] .co-panel[data-publish-variant="text"] { grid-template-columns: minmax(0, 1fr); }
[data-mode="publish"] .co-panel[data-publish-variant="text"] .co-body { max-width: 680px; }
.co-art { position: relative; margin: 0; min-width: 0; }
.co-art img { border-radius: var(--r-media); box-shadow: 0 0 0 1px var(--hair), 0 40px 80px -48px rgba(0, 0, 0, 0.95); }
.co-art figcaption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 4px; margin-top: 12px; color: var(--fg-3); font-size: var(--fs-caption); }
.co-art-video-frame img { width: 100%; height: auto; aspect-ratio: 5 / 4; object-fit: cover; object-position: 100% 50%; }
/* Round 7, Asyncly on /companies: the product at work. The Work Board plays large; one thread works in front of it. */
.co-art-composite .composite { position: relative; padding-bottom: 10%; }
.composite-main { position: relative; overflow: hidden; aspect-ratio: 16 / 10; border-radius: 14px; background: #0c1513; box-shadow: 0 0 0 1px rgba(238, 241, 238, 0.09), 0 60px 110px -50px rgba(0, 0, 0, 0.95), 0 0 140px -40px rgba(var(--accent-rgb), 0.38); }
.composite-inset { position: absolute; right: -5%; bottom: 0; width: 46%; overflow: hidden; aspect-ratio: 1040 / 836; border-radius: 12px; background: #0c1513; box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.38), 0 36px 70px -24px rgba(0, 0, 0, 0.95), 0 0 60px -12px rgba(var(--accent-rgb), 0.4); transition: transform 0.8s var(--ease); }
.composite-video { display: block; width: 100%; height: 100%; object-fit: cover; }
.co-art-composite:hover .composite-inset { transform: translate(-2%, -2%); }
.composite-toggle { position: absolute; left: 12px; bottom: calc(10% + 12px); z-index: 2; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid rgba(238, 241, 238, 0.22); border-radius: 50%; background: rgba(9, 11, 11, 0.6); color: var(--fg); cursor: pointer; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); opacity: 0.75; transition: opacity 0.2s, border-color 0.2s; }
.composite-toggle:hover, .composite-toggle:focus-visible { opacity: 1; border-color: rgba(var(--accent-rgb), 0.7); }
.composite-toggle svg { width: 13px; height: 13px; }
.composite-toggle .ct-play, .co-art-composite.is-playing .composite-toggle .ct-pause { display: block; }
.composite-toggle .ct-pause, .co-art-composite.is-playing .composite-toggle .ct-play { display: none; }
.no-js .composite-toggle { display: none; }
.co-art-phone { display: grid; justify-items: center; }
.co-art-phone img { width: auto; max-width: min(100%, 300px); height: auto; max-height: min(620px, 72svh); border-radius: 34px; }
.co-art-phone figcaption { justify-content: center; }
.screens { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.screens img { width: 100%; height: auto; border-radius: 10px; }
.screens .screen-1 { grid-column: 1 / -1; }
.emblem { display: grid; place-items: center; align-content: center; gap: 28px; aspect-ratio: 4 / 3; border-radius: 18px; background: #070808; box-shadow: 0 0 0 1px var(--hair); }
.emblem-mark { width: clamp(110px, 12vw, 170px); height: auto; box-shadow: none !important; border-radius: 0 !important; }
.emblem-word { width: min(62%, 300px); height: auto; mix-blend-mode: screen; box-shadow: none !important; border-radius: 0 !important; }
.co-body { display: grid; align-content: start; min-width: 0; }
/* Round 7: a company kept to one line (its mark, name and role). The role sits level with the mark, with no rule under it. */
.co-panel-oneline { align-items: center; }
.co-panel-oneline .co-head { padding-bottom: 0; border-bottom: 0; }
.co-head { display: grid; gap: 14px; padding-bottom: 22px; border-bottom: 1px solid var(--hair); }
.co-title { display: flex; align-items: center; margin: 0; min-height: 40px; font: 400 var(--fs-title)/1 var(--serif); }
.co-wordmark { width: auto; height: 38px; }
.co-wordmark[src*="asyncly-lockup"] { height: 34px; }
.co-wordmark-wordmark { height: 24px; }
.co-wordmark.blend-screen { height: 21px; mix-blend-mode: screen; }
.co-title-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.co-rel { margin: 0; font: 400 clamp(23px, calc(0.9vw + 13px), 29px)/1.2 var(--serif); }
.co-block { display: grid; gap: 10px; padding-top: 22px; }
.co-label { margin: 0; color: var(--fg-3); font: 600 var(--fs-label)/1.3 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; }
.co-text { margin: 0; color: var(--fg-2); font-size: 16px; line-height: 1.55; }
.co-lead { color: var(--fg); font-size: 18px; line-height: 1.5; }
.co-text q { color: var(--fg); }
.co-gap { margin: 2px 0 0; padding-left: 14px; border-left: 1px solid rgba(242, 145, 124, 0.45); color: var(--fg-2); font-size: 14px; }
.co-prompt-inline { margin: 0; color: var(--fg-3); font: italic 400 21px/1.3 var(--serif); }
.co-why { gap: 16px; }
.co-quote { display: grid; gap: 10px; margin: 0; padding-left: 18px; border-left: 2px solid var(--accent); }
.co-quote blockquote { margin: 0; }
.co-quote blockquote p { margin: 0; color: var(--fg); font: italic 400 clamp(22px, calc(0.8vw + 13px), 27px)/1.3 var(--serif); }
.co-quote figcaption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; color: var(--fg-3); font-size: var(--fs-caption); }
.co-quote-team { border-left-color: rgba(var(--accent-rgb), 0.45); }
.co-quote-team blockquote p { color: var(--fg-2); font-size: clamp(19px, calc(0.6vw + 12px), 23px); }
/* A place for Andrew's own words: a dashed rule marks it as unwritten. Shown in review and clean views only. */
.co-prompt { display: grid; gap: 8px; margin: 0; padding: 2px 0 2px 18px; border-left: 2px dashed rgba(var(--accent-rgb), 0.5); }
.co-prompt-lines { display: grid; gap: 4px; margin: 0; }
.co-prompt-lines span { color: var(--fg-3); font: italic 400 clamp(21px, calc(0.6vw + 14px), 25px)/1.3 var(--serif); }
.co-prompt-note { margin: 0; color: var(--fg-3); font-size: var(--fs-caption); }
.co-actions { display: grid; justify-items: start; gap: 14px; padding-top: 28px; }
.co-actions .btn { min-height: 46px; padding: 0 20px; font-size: 14px; }
.btn-site { border-color: rgba(var(--accent-rgb), 0.6); background: transparent; color: var(--fg); }
.btn-site:hover { background: rgba(var(--accent-rgb), 0.12); border-color: rgba(var(--accent-rgb), 0.9); }
.btn-site .ext { width: 10px; height: 10px; }
.co-more { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; font-size: 14px; }
.co-actions-gap { gap: 22px; justify-items: stretch; }
.co-site-gap { display: grid; gap: 6px; padding-left: 14px; border-left: 1px solid rgba(242, 145, 124, 0.45); }
.co-site-gap p { margin: 0; color: var(--fg-2); font-size: var(--fs-small); }
.co-filings { display: grid; }
.co-filings .co-label { margin-bottom: 8px; }
.filing { position: relative; display: grid; gap: 5px; padding: 16px 32px 16px 0; border-top: 1px solid var(--hair); text-decoration: none; transition: padding 0.4s var(--ease); }
.filing:last-child { border-bottom: 1px solid var(--hair); }
.filing:hover { padding-left: 8px; }
.filing-pub { color: var(--fg-3); font-size: var(--fs-label); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.filing-title { font: 400 clamp(21px, calc(0.6vw + 14px), 26px)/1.15 var(--serif); }
.filing-date { color: var(--fg-3); font-size: var(--fs-caption); }
.filing .ext { position: absolute; top: 20px; right: 4px; width: 12px; height: 12px; color: var(--fg-3); }
.co-step { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-top: 18px; }
.co-step-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px; border: 1px solid var(--hair-2); border-radius: 999px; background: transparent; color: var(--fg-3); font-size: 14px; cursor: pointer; transition: border-color 0.2s, color 0.2s; }
.co-step-btn:hover { border-color: rgba(var(--light-rgb), 0.55); color: var(--fg-2); }
.co-step-btn b { color: var(--fg); font-weight: 500; }
.co-step-btn svg { width: 13px; height: 13px; }
.co-step-count { color: var(--fg-2); font-size: 14px; font-variant-numeric: tabular-nums; }
.co-step-count b { color: var(--fg); font-weight: 600; }
/* One eligible company: no tablist, just its panel. */
.co-tabs[data-single], .co-step[data-single] { display: none; }
.no-js .co-panel + .co-panel { margin-top: 24px; }
.no-js .co-step { display: none; }

/* ---------------------------------------------------------------- 4. graph */
.threads { position: relative; padding: var(--section-y) var(--pad) clamp(40px, 6svh, 80px); }
.threads-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 0.62fr); align-items: end; gap: 24px 48px; }
.threads-head .display .line { display: block; }
.threads-intro { max-width: 40ch; margin: 0 0 18px; color: var(--fg-2); }
.legend { display: grid; gap: 8px; margin: 0 0 10px; padding: 0; list-style: none; color: var(--fg-3); font-size: var(--fs-caption); }
.legend li { display: flex; align-items: center; gap: 12px; }
.legend svg { width: 36px; height: 6px; overflow: visible; }
.legend path { fill: none; stroke-width: 1.3; }
.legend path[data-style="solid"] { stroke: var(--light); }
.legend path[data-style="dashed"] { stroke: var(--review); stroke-dasharray: 5 5; }
.legend path[data-style="dotted"] { stroke: var(--fg-2); stroke-dasharray: 0.5 5; stroke-linecap: round; stroke-width: 1.8; }
.map-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 320px); align-items: start; gap: clamp(28px, 3.4vw, 56px); margin-top: clamp(40px, 6svh, 64px); }
.map { position: relative; height: clamp(440px, 58svh, 580px); }
.map-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
/* Clean and public views draw one line style; review status changes line style only in the review view. */
.map-lines path { fill: none; stroke: rgba(238, 241, 238, 0.3); stroke-width: 1.2; transition: stroke 0.35s, opacity 0.5s var(--ease), stroke-width 0.35s; }
.js .map:not(.is-drawn) .map-lines path { opacity: 0; }
.map[data-focus] .map-lines path:not(.is-lit) { opacity: 0.32; }
.map-lines path.is-lit { stroke: var(--light); stroke-width: 1.6; }
[data-mode="review"] .map-lines path[data-style="dashed"] { stroke-dasharray: 5 5; }
[data-mode="review"] .map-lines path[data-style="dotted"] { stroke-dasharray: 0.5 5; stroke-linecap: round; stroke-width: 1.8; }
[data-mode="review"] .map-lines path.is-lit:is([data-status="pending"], [data-status="conflicting"]) { stroke: var(--review); }
[data-mode="review"] .map-lines path.is-lit[data-status="draft"] { stroke: var(--fg); }
.map-nodes { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; }
.mn { position: absolute; left: calc(var(--x) * 1%); top: calc(var(--y) * 1%); width: 0; height: 0; }
.mn-btn { position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 10px; padding: 6px 8px; border: 0; border-radius: 8px; background: none; color: var(--fg-2); font: 500 14px/1.2 var(--sans); white-space: nowrap; cursor: pointer; transform: translate(-19px, -50%); transition: color 0.3s, opacity 0.35s; }
.mn[data-side="left"] .mn-btn { flex-direction: row-reverse; transform: translate(calc(-100% + 19px), -50%); }
.mn[data-side="below"] .mn-btn { flex-direction: column; gap: 8px; transform: translate(-50%, -19px); }
.mn-label { padding: 2px 6px; border-radius: 6px; background: rgba(9, 11, 11, 0.78); }
/* Graph points are functional: each marks where lines meet. */
.mn-dot { position: relative; display: block; width: 22px; height: 22px; flex: none; }
.mn-dot::before { content: ""; position: absolute; inset: 7px; border: 1.5px solid var(--fg-3); border-radius: 50%; background: var(--bg); transition: border-color 0.3s, background-color 0.3s; }
.mn-person .mn-btn { color: var(--fg); font-size: 16px; }
.mn-person .mn-dot::before { inset: 5px; border: 0; background: var(--fg); }
.mn-logo { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 50%; background: #0c1010; box-shadow: 0 0 0 1px var(--hair-2); transition: box-shadow 0.3s; }
.mn-logo img { width: 24px; height: 24px; object-fit: contain; }
.mn-dot-alt { width: 38px; height: 38px; }
.mn-dot-alt::before { inset: 13px; }
.mn-company .mn-btn { transform: translate(-27px, -50%); color: var(--fg); font-size: 15px; }
.mn-company[data-side="left"] .mn-btn { transform: translate(calc(-100% + 27px), -50%); }
.mn-company[data-side="below"] .mn-btn { transform: translate(-50%, -27px); }
.mn-btn:hover, .mn.is-near .mn-btn, .mn.is-active .mn-btn { color: var(--fg); }
.map[data-focus] .mn:not(.is-active):not(.is-near) .mn-btn { opacity: 0.62; }
.mn.is-active .mn-dot::before { border-color: var(--light); background: var(--light); }
.mn-person.is-active .mn-dot::before { background: var(--fg); }
.mn.is-active .mn-logo { box-shadow: 0 0 0 1.5px var(--accent); }
.mn-btn[aria-pressed="true"] .mn-label { color: var(--fg); box-shadow: inset 0 -1px 0 var(--light); }
.mn-btn:focus-visible { outline-offset: 2px; }
.map-readout { display: grid; align-content: start; gap: 10px; min-height: 320px; padding-top: 18px; border-top: 1px solid var(--hair); }
.ro-kind { margin: 0; color: var(--fg-3); font-size: var(--fs-label); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.ro-title { margin: 0; font: 400 clamp(30px, calc(1.2vw + 16px), 40px)/1.04 var(--serif); }
.ro-fact { margin: 0 0 6px; color: var(--fg-2); }
.ro-list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.ro-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 8px 0; border-bottom: 1px solid var(--hair); color: var(--fg); font-size: 14px; }
.ro-list .note-text { margin-left: auto; }
.ro-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ro-actions .btn { min-height: 40px; padding: 0 16px; font-size: 14px; }
.ro-static .ro-list li { font-size: var(--fs-caption); }

/* ---------------------------------------------------------------- 5. photographs */
.gallery { position: relative; padding: var(--section-y) var(--pad) clamp(40px, 6svh, 80px); }
.gallery-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 0.6fr); align-items: end; gap: 24px 48px; margin-bottom: clamp(32px, 5svh, 56px); }
.gallery-head .display .line { display: block; }
.gallery-head .display .line + .line { font-style: italic; }
.gallery-intro { max-width: 40ch; margin: 0 0 8px; color: var(--fg-2); }
.strip { display: flex; gap: 10px; height: clamp(400px, 64svh, 600px); margin: 0; padding: 0; list-style: none; touch-action: pan-y; }
.ph { position: relative; flex: 1 1 0; min-width: 0; overflow: hidden; border-radius: 16px; background: var(--bg-2); transition: flex-grow 0.85s var(--ease); }
.ph.is-open { flex-grow: 5.2; }
.ph-fig { position: absolute; inset: 0; margin: 0; }
.ph-fig > img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focus, 50% 40%); filter: saturate(0.7) brightness(0.62); transform: scale(1.04); transition: filter 0.7s var(--ease), transform 1.2s var(--ease); }
.ph:hover .ph-fig > img { filter: saturate(0.9) brightness(0.8); }
.ph.is-open .ph-fig > img { filter: none; transform: none; }
.ph-cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 90px clamp(18px, 2vw, 28px) clamp(18px, 2vw, 26px); background: linear-gradient(0deg, rgba(4, 6, 6, 0.88), rgba(4, 6, 6, 0.5) 55%, rgba(4, 6, 6, 0)); opacity: 0; transform: translateY(14px); pointer-events: none; transition: opacity 0.45s, transform 0.6s var(--ease); }
.ph.is-open .ph-cap { opacity: 1; transform: none; pointer-events: auto; transition-delay: 0.25s; }
.ph-title { flex: 1 0 100%; font: 400 clamp(28px, calc(1.2vw + 14px), 40px)/1.04 var(--serif); }
.ph-meta { color: var(--fg-2); font-size: 14px; }
.ph-short { position: absolute; left: 50%; bottom: 22px; z-index: 2; color: var(--fg-2); font-size: var(--fs-label); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap; writing-mode: vertical-rl; transform: translateX(-50%) rotate(180deg); pointer-events: none; transition: opacity 0.3s; }
.ph.is-open .ph-short { opacity: 0; }
.ph-btn { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; padding: 0; border: 0; border-radius: inherit; background: none; cursor: pointer; }
.ph.is-open .ph-btn { cursor: default; }
.ph-btn:focus-visible { outline-offset: -4px; border-radius: 14px; }
.ph::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--hair); pointer-events: none; }
.ph.is-open::after { box-shadow: inset 0 0 0 1px rgba(238, 241, 238, 0.24); }
.strip-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-top: 16px; }
.no-js .strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); height: auto; }
.no-js .ph { aspect-ratio: 4 / 5; }
.no-js .ph-fig > img { filter: none; transform: none; }
.no-js .ph-cap { opacity: 1; transform: none; padding-top: 60px; }
.no-js .ph-short, .no-js .ph-btn, .no-js .strip-bar { display: none; }

/* ---------------------------------------------------------------- 6. interlude */
.interlude { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr); align-items: center; gap: clamp(36px, 7vw, 128px); padding: clamp(64px, 9svh, 120px) var(--pad); }
.still { position: relative; margin: 0; }
.still img { width: 100%; height: auto; max-height: 72svh; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 30%; border-radius: 3px; filter: var(--grade); }
.still figcaption { position: absolute; right: 14px; bottom: 12px; }
.interlude-copy { max-width: 560px; }
.quote { margin: 0; }
.quote p { margin: 0; font: italic 400 clamp(34px, calc(2.6vw + 14px), 54px)/1.06 var(--serif); letter-spacing: -0.008em; }
.quote footer { margin-top: 20px; color: var(--fg-3); font-size: 14px; }
.interlude-note { margin: clamp(28px, 5svh, 48px) 0 28px; color: var(--fg-2); }

/* ---------------------------------------------------------------- 7. contact */
.contact { position: relative; padding: clamp(32px, 5svh, 72px) var(--pad) clamp(88px, 12svh, 144px); }
.contact-route { position: relative; }
.contact-lead { max-width: 40ch; margin: 22px 0 34px; color: var(--fg-2); font-size: var(--fs-lede); }
.message { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 22px; max-width: 760px; margin-top: 34px; }
.contact-page .message { margin-top: 0; }
.contact-direct { margin: 26px 0 0; color: var(--fg-2); font-size: var(--fs-small); }
.preview-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.field { display: grid; gap: 8px; }
.field-wide, .route-row, .message-actions, .message-preview { grid-column: 1 / -1; }
.field label { color: var(--fg-2); font-size: 14px; font-weight: 500; }
.field .opt { color: var(--fg-3); font-weight: 400; }
.field input, .field textarea { width: 100%; padding: 13px 15px; border: 1px solid var(--hair-2); border-radius: 12px; background: var(--bg-2); color: var(--fg); font-size: 16px; line-height: 1.45; outline: none; transition: border-color 0.2s, box-shadow 0.2s; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: rgba(var(--light-rgb), 0.7); box-shadow: 0 0 0 4px rgba(var(--light-rgb), 0.12); }
.field [aria-invalid="true"] { border-color: var(--review-missing); }
.hint { margin: 0; color: var(--fg-3); font-size: var(--fs-caption); }
.route-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0; padding: 12px 0; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); color: var(--fg-2); font-size: var(--fs-small); }
.route-label { color: var(--fg-3); font-size: var(--fs-label); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.message-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.message-status { color: var(--fg-2); font-size: 14px; }
.message-preview { display: grid; gap: 14px; padding: 20px; border: 1px solid var(--hair); border-radius: var(--r-media); background: var(--bg-2); }
.preview-note { margin: 0; color: var(--fg-2); font-size: 14px; }
.preview-text { margin: 0; color: var(--fg); font: 400 14px/1.6 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.message-preview .btn { justify-self: start; min-height: 40px; font-size: 14px; }

/* ---------------------------------------------------------------- inner routes */
.page-head { padding: calc(var(--masthead-h) + clamp(64px, 11svh, 132px)) var(--pad) 0; }
.page-lede { max-width: 46ch; margin: 22px 0 0; color: var(--fg-2); font-size: var(--fs-lede); line-height: 1.5; }
.page-section-title { margin: 0 0 22px; color: var(--fg-3); font: 600 var(--fs-label)/1.3 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; }
.chapters-page { padding-top: clamp(40px, 6svh, 64px); padding-bottom: var(--section-y); }
.chapters-page .co-tabs { margin-top: 0; }
.empty { padding: clamp(36px, 6svh, 64px) var(--pad) var(--section-y); }
.empty-line { max-width: 30ch; margin: 0; padding-top: 22px; border-top: 1px solid var(--hair); color: var(--fg-2); font: 400 clamp(24px, calc(0.9vw + 14px), 30px)/1.3 var(--serif); }
.about-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr); align-items: start; gap: clamp(32px, 6vw, 112px); padding: clamp(44px, 7svh, 80px) var(--pad) var(--section-y); }
.about-block + .about-block { margin-top: 40px; padding-top: 26px; border-top: 1px solid var(--hair); }
.about-bio { max-width: 44ch; margin: 14px 0 0; color: var(--fg); font: 400 clamp(20px, calc(0.6vw + 13px), 24px)/1.45 var(--serif); }
.about-bio-p { display: block; }
.about-bio-p + .about-bio-p { margin-top: 0.8em; color: var(--fg-2); }
.about-topics { max-width: 52ch; margin: 18px 0 0; color: var(--fg-2); font-size: var(--fs-small, 15px); line-height: 1.55; }
.about-bg { max-width: 52ch; margin: 12px 0 0; color: var(--fg-2); }
.about-cos { display: grid; margin: 12px 0 0; padding: 0; list-style: none; }
.about-co { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: start; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--hair); }
.about-co-mark { display: grid; place-items: center; width: 32px; height: 32px; margin-top: 2px; }
.about-co-mark img { width: 100%; height: 100%; object-fit: contain; }
[data-mode="publish"] .about-co { grid-template-columns: minmax(0, 1fr); }
.about-co-name { color: var(--fg); font: 400 clamp(24px, calc(0.6vw + 16px), 28px)/1.1 var(--serif); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.about-co-name:hover { border-color: var(--hair-2); }
.about-co-rel { margin: 6px 0 0; color: var(--fg-2); font-size: var(--fs-small); }
/* Round 7: the approved records behind the biography (education, research, papers, the powerlifting record, contact). */
.about-facts, .about-pubs, .about-contact { display: grid; margin: 12px 0 0; padding: 0; list-style: none; }
.about-fact { display: grid; gap: 6px; padding: 16px 0; border-bottom: 1px solid var(--hair); }
.about-fact-name { color: var(--fg); font: 400 clamp(22px, calc(0.5vw + 16px), 26px)/1.15 var(--serif); }
.about-fact-line { max-width: 56ch; color: var(--fg-2); font-size: var(--fs-small); }
.about-pub { padding: 16px 0; border-bottom: 1px solid var(--hair); }
.about-pub-title { color: var(--fg); font: 400 clamp(20px, calc(0.4vw + 15px), 23px)/1.25 var(--serif); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.about-pub-title:hover { border-color: var(--hair-2); }
.about-pub-title .ext { display: inline-block; width: 10px; height: 10px; margin-left: 7px; color: var(--fg-3); vertical-align: 0.1em; }
.about-pub-meta { max-width: 60ch; margin: 8px 0 0; color: var(--fg-2); font-size: var(--fs-small); }
.about-pub-doi { display: block; margin-top: 4px; color: var(--fg-3); font-size: var(--fs-caption); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.about-more { margin: 14px 0 0; font-size: var(--fs-small); }
.about-contact { grid-auto-flow: column; justify-content: start; align-items: baseline; gap: 10px 28px; }
.about-contact .about-email { font: 400 clamp(20px, calc(0.4vw + 15px), 23px)/1.25 var(--serif); }
.about-portrait { position: sticky; top: calc(var(--masthead-h) + 32px); margin: 0; }
.about-portrait img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 3px; }
.about-portrait figcaption { margin-top: 12px; color: var(--fg-3); font-size: var(--fs-caption); }
.media-film, .media-appear { padding: clamp(44px, 7svh, 80px) var(--pad) 0; }
.media-films { display: grid; gap: clamp(40px, 6svh, 72px); }
.media-film-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; gap: clamp(28px, 5vw, 88px); }
.media-film-item:nth-child(2) { grid-template-columns: minmax(0, 0.55fr) minmax(0, 1fr); }
.media-film .still img { max-height: 72svh; aspect-ratio: 4 / 5; }
.media-film .still-wide img { aspect-ratio: 16 / 9; max-height: none; filter: none; }
.media-title { margin: 0; font: 400 var(--fs-title)/1.1 var(--serif); }
.media-meta { margin: 10px 0 22px; color: var(--fg-3); font-size: 14px; }
.appear { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr); align-items: center; gap: clamp(24px, 4vw, 64px); }
.appear-art { position: relative; margin: 0; }
.appear-art img { width: 100%; height: auto; aspect-ratio: 5 / 4; object-fit: cover; object-position: 100% 50%; border-radius: var(--r-media); box-shadow: 0 0 0 1px var(--hair); }
.appear-art figcaption { position: absolute; right: 14px; bottom: 12px; }
.gallery-page { padding: clamp(44px, 7svh, 80px) var(--pad) var(--section-y); }
.gallery-page .strip { height: clamp(420px, 64svh, 600px); }
.contact-page { padding: 24px var(--pad) var(--section-y); }

/* ---------------------------------------------------------------- footer */
.colophon { padding: 36px var(--pad) 44px; border-top: 1px solid var(--hair); color: var(--fg-3); font-size: var(--fs-caption); }
/* The footer repeats the routes, not the name: the header already carries it, and short pages would show it twice. */
.colophon-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 16px 32px; }
.colophon ul { display: flex; flex-wrap: wrap; gap: 8px 26px; margin: 0; padding: 0; list-style: none; }
.colophon nav a { color: var(--fg-3); font-size: var(--fs-caption); text-decoration: none; }
.colophon nav a:hover, .colophon nav a[aria-current="page"] { color: var(--fg-2); }
.colophon-profiles { margin-left: auto !important; }
.colophon-profile { color: var(--fg-3); font-size: var(--fs-caption); text-decoration: none; }
.colophon-profile:hover { color: var(--fg-2); }
.colophon-profile .ext { display: inline-block; width: 9px; height: 9px; margin-left: 5px; vertical-align: 0; }
.colophon-note { margin: 18px 0 0; }

/* ---------------------------------------------------------------- light path (home only) */
.light { position: absolute; top: 0; left: 0; z-index: 30; overflow: visible; pointer-events: none; }
.light path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.light .track { stroke: rgba(238, 241, 238, 0.08); stroke-width: 1; }
.light .halo { stroke: rgba(var(--light-rgb), 0.12); stroke-width: 6; }
.light .lit { stroke: var(--light); stroke-width: 1.35; }
.light .lit, .light .halo { transition: stroke-dashoffset 0.2s linear; }
.light .strand { stroke: rgba(238, 241, 238, 0.1); stroke-width: 1; transition: stroke 0.5s var(--ease); }
.light .strand.is-selected { stroke: rgba(var(--light-rgb), 0.85); }
.light .beam { stroke: var(--light); stroke-width: 1.2; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 0.75s var(--ease); }
.light .beam.is-on { stroke-dashoffset: 0; }

/* ---------------------------------------------------------------- provenance card and review panel (local review only) */
.fact-pop { position: fixed; inset: auto; top: 0; left: 0; z-index: 70; width: min(360px, calc(100vw - 24px)); margin: 0; padding: 0; border: 0; background: transparent; overflow: visible; color: var(--fg); font: 400 14px/1.5 var(--sans); font-style: normal; letter-spacing: normal; text-align: left; text-transform: none; white-space: normal; vertical-align: baseline; }
.fact-pop-inner { padding: 16px 18px 18px; border: 1px solid var(--hair-2); border-radius: var(--r-media); background: #121818; box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.9); font-size: 14px; line-height: 1.5; }
.fp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.status-word { font-size: var(--fs-label); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--review); }
.status-word:is([data-status="approved"], [data-status="public"]) { color: var(--fg-2); }
.status-word[data-status="missing"] { color: var(--review-missing); }
.fp-label { margin: 0; color: var(--fg-3); font-size: var(--fs-label); }
.fp-text { margin: 4px 0 10px; color: var(--fg); font-size: var(--fs-small); }
.fp-block { margin: 10px 0 0; color: var(--fg-2); }
.fp-block b { display: block; color: var(--fg-3); font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.fp-sources { display: grid; gap: 6px; margin: 4px 0 0; padding: 0; list-style: none; }
.fp-sources a { color: var(--fg); text-decoration: none; border-bottom: 1px solid var(--hair-2); }
.fp-sources span { color: var(--fg-3); font-size: var(--fs-label); }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--hair-2); border-radius: 50%; background: transparent; color: var(--fg-2); cursor: pointer; }
.icon-btn svg { width: 13px; height: 13px; }
.icon-btn:hover { color: var(--fg); border-color: var(--fg-3); }
.review, .film { padding: 0; border: 0; background: transparent; color: var(--fg); }
.review::backdrop, .film::backdrop { background: rgba(3, 6, 6, 0.72); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.review { width: min(560px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0 0 0 auto; }
.review-inner { height: 100%; overflow-y: auto; padding: 22px 26px 40px; border-left: 1px solid var(--hair-2); background: #0d1212; }
.review-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.review-head h2 { margin: 0; font: 400 30px/1.1 var(--serif); }
.review-lede { color: var(--fg-2); font-size: 14px; }
.views { margin: 18px 0; padding: 4px 0 6px; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.views-title { margin: 12px 0 6px; color: var(--fg-3); font-size: var(--fs-label); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.view-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 16px; margin: 0; padding: 8px 0; font-size: var(--fs-small); }
.view-current { color: var(--fg); font-weight: 500; }
.view-desc { color: var(--fg-3); font-size: var(--fs-caption); }
.views-note { margin: 8px 0; color: var(--fg-3); font-size: var(--fs-caption); }
.review-counts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 12px; color: var(--fg-2); font-size: var(--fs-caption); }
.review-counts .status-word { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: var(--fs-caption); }
.review-group { margin-top: 22px; }
.review-group h3 { margin: 0 0 6px; color: var(--fg-3); font-size: var(--fs-label); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.review-item { padding: 12px 0; border-top: 1px solid var(--hair); font-size: 14px; }
.review-item .ri-top { display: flex; justify-content: space-between; gap: 12px; }
.review-item .ri-label { color: var(--fg); font-weight: 500; }
.review-item p { margin: 6px 0 0; color: var(--fg-2); }
.review-item .ri-src { color: var(--fg-3); font-size: var(--fs-label); }
.review-item .ri-src a { color: var(--fg-2); }
.review-empty { color: var(--fg-2); font-size: 14px; }

/* film dialog */
.film { width: min(760px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); }
.film-inner { display: grid; gap: 14px; padding: 18px 18px 20px; border: 1px solid var(--hair-2); border-radius: 18px; background: #0d1212; }
.film-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.film-head h2 { margin: 0; font: 400 26px/1.1 var(--serif); }
.film-stage { position: relative; display: grid; place-items: center; border-radius: 12px; background: #050808; overflow: hidden; }
.film-video { width: auto; height: min(68dvh, 800px); max-width: 100%; aspect-ratio: 3 / 4; background: #050808; }
.film[data-aspect="16 / 9"] { width: min(1120px, calc(100vw - 24px)); }
.film[data-aspect="16 / 9"] .film-video { width: 100%; height: auto; max-height: 72dvh; aspect-ratio: 16 / 9; }
.film-error { position: absolute; left: 12px; right: 12px; bottom: 12px; margin: 0; padding: 10px 12px; border-radius: 10px; background: rgba(9, 11, 11, 0.85); color: var(--fg-2); font-size: 14px; }
.film-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin: 0; color: var(--fg-3); font-size: var(--fs-caption); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 999px), (max-aspect-ratio: 4/5) {
  .listen { top: calc(var(--masthead-h) + 12px); bottom: auto; right: auto; left: var(--pad); min-height: 42px; padding: 0 15px 0 13px; font-size: 14px; }
  .sound-dock { padding: 0 10px; }
  .sound-dock-text { display: none; }
  .opening-cos .oc-mark { width: 34px; height: 34px; }
  /* The copy below the take sits on the page's own ground: on phones the world layer behind it shows the scene's first
     frame (the take in the studio window), which is too light for body text. */
  .opening { display: block; min-height: 0; padding: 0 0 clamp(36px, 7svh, 64px); background: var(--bg); }
  .plate { position: relative; inset: auto; z-index: 0; width: 100%; height: min(133.33vw, 72svh); }
  .plate img, .plate video { object-position: 50% 28%; }
  .plate::after { background:
    linear-gradient(0deg, var(--bg) 0%, rgba(9, 11, 11, 0.78) 14%, rgba(9, 11, 11, 0.25) 32%, rgba(9, 11, 11, 0) 44%),
    linear-gradient(180deg, rgba(9, 11, 11, 0.62) 0%, rgba(9, 11, 11, 0) 18%); }
  .plate-meta { right: 14px; bottom: auto; top: calc(var(--masthead-h) + 12px); }
  .opening-copy { width: auto; max-width: none; margin-top: calc(-1 * clamp(64px, 17vw, 140px)); padding: 0 var(--pad); }
  [data-mode="publish"] .opening[data-publish-variant="text"] .opening-copy { margin-top: 0; }
  .case { padding-top: clamp(72px, 10svh, 110px); }
  .case-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "head" "stage" "steps"; }
  .stage { margin-top: 28px; }
  .case-foot, .chapters-head, .threads-head, .gallery-head { grid-template-columns: minmax(0, 1fr); }
  .co-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; margin-top: 40px; }
  .co-tab { gap: 8px; padding: 14px 14px 16px; border-radius: 14px; }
  .co-tab::before { left: 14px; right: 14px; }
  .co-mark { width: 34px; height: 34px; }
  .co-tab-name { font-size: clamp(23px, 6vw, 30px); }
  .co-tab-line { display: none; }
  .co-tab .note-text { display: block; margin: 5px 0 0; }
  .co-panel { grid-template-columns: minmax(0, 1fr); gap: 26px; padding: 18px 16px 24px; border-radius: 18px; }
  .co-art-phone img { max-height: 460px; }
  .map-wrap { grid-template-columns: minmax(0, 1fr); }
  .map { height: clamp(520px, 150vw, 640px); }
  .mn { left: calc(var(--mx) * 1%); top: calc(var(--my) * 1%); }
  .mn[data-mside="right"] .mn-btn { flex-direction: row; transform: translate(-19px, -50%); }
  .mn[data-mside="left"] .mn-btn { flex-direction: row-reverse; transform: translate(calc(-100% + 19px), -50%); }
  .mn[data-mside="below"] .mn-btn { flex-direction: column; gap: 6px; transform: translate(-50%, -19px); }
  .mn-company[data-mside="below"] .mn-btn { transform: translate(-50%, -27px); }
  .mn-btn { font-size: 13px; padding: 4px; }
  .mn-person .mn-btn, .mn-company .mn-btn { font-size: 14px; }
  .map-readout { min-height: 0; }
  .strip, .gallery-page .strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); height: auto; gap: 6px; }
  .ph { aspect-ratio: 1; border-radius: 10px; }
  .ph.is-open { grid-column: 1 / -1; grid-row: 1; aspect-ratio: 4 / 5; border-radius: 16px; margin-bottom: 4px; }
  .ph-short { display: none; }
  .ph-fig > img { filter: saturate(0.85) brightness(0.8); }
  .interlude { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: 32px; }
  .still img { max-height: none; aspect-ratio: 4 / 5; }
  .about-grid { grid-template-columns: minmax(0, 1fr); }
  .about-contact { grid-auto-flow: row; }
  .colophon-profiles { margin-left: 0 !important; }
  .about-portrait { position: relative; top: auto; max-width: 420px; grid-row: 1; }
  .media-film-item, .media-film-item:nth-child(2), .appear { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  :root { --masthead-h: 60px; }
  .wordmark { font-size: 20px; }
  .masthead { gap: 14px; }
  .js .nav-toggle { display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; border: 0; background: none; color: var(--fg); font: 500 15px/1 var(--sans); cursor: pointer; }
  .js .nav-toggle[aria-expanded="true"] { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
  .js .nav ul { position: absolute; top: calc(100% + 6px); right: var(--pad); display: none; flex-direction: column; gap: 2px; min-width: 210px; padding: 8px; border: 1px solid var(--hair-2); border-radius: var(--r-media); background: #0f1414; box-shadow: 0 30px 60px -20px #000; }
  .js .nav.is-open ul { display: flex; }
  .js .nav ul a { display: block; padding: 11px 12px; border-radius: 8px; color: var(--fg); font-size: 16px; }
  .js .nav ul a[aria-current="page"] { text-underline-offset: 6px; }
  .no-js .masthead { position: absolute; height: auto; min-height: var(--masthead-h); flex-wrap: wrap; row-gap: 4px; padding-top: 10px; padding-bottom: 10px; }
  .no-js .nav ul { flex-wrap: wrap; gap: 4px 14px; }
  .no-js .nav { margin-left: 0; }
  .review-link { padding-left: 14px; font-size: 13px; }
  .actions { gap: 12px; }
  .actions .btn { padding: 0 18px; }
  .opening-cos { gap: 6px 14px; }
  .opening-cos ul { gap: 2px 14px; }
  .opening-cos a { min-height: 34px; font-size: 13px; gap: 7px; }
  .oc-mark { width: 21px; height: 21px; }
  .frame { aspect-ratio: 4 / 3.3; border-radius: 12px; }
  .co-step-dir { display: none; }
  .co-step-btn { padding: 0 14px; }
  .message { grid-template-columns: minmax(0, 1fr); }
  .review-inner { border-left: 0; padding: 18px 18px 40px; }
  .meta-extra { display: none; }
  .btn { white-space: normal; }
  .film-video { height: min(62dvh, 640px); }
  .film[data-aspect="16 / 9"] .film-video { height: auto; }
  .colophon { padding-bottom: 40px; }
  .colophon-row { display: grid; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; transition-delay: 0s !important; }
}
