/* Jessbot's website: "Jess's day" (decision #249, docs/DESIGN.md → Website). The home page is a stage: Jess in front of
   her sky, lit by the hour (night, first light, day, dusk), and the page below it a cyclorama that runs from black
   through cobalt and rose to white day and back down to black. The guide, the gallery and the 404 are the same world
   with the house lights up: day white in the light theme, night in the dark one. Anybody for display, Hanken Grotesk
   for reading, Big Shoulders Stencil for cue labels and times. Logical properties throughout (right to left works). */

@font-face { font-family: Anybody; src: url(anybody.woff2) format("woff2"); font-weight: 100 900; font-stretch: 50% 150%; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url(hanken-grotesk.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Big Shoulders Stencil"; src: url(big-shoulders-stencil.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  /* The cyclorama */
  --cyc-black: #05060a; --night: #0a1240; --cobalt: #2238b0; --rose: #ec96a6; --day: #f5f6fa;
  --ink: #0b1030; --ink-2: #3b4166; --go: #33d17a; --go-ink: #04210f;
  /* Pages with the house lights up (light theme) */
  --page: var(--day); --page-ink: var(--ink); --page-ink-2: #474d72; --page-line: rgba(11, 16, 48, 0.14);
  --link: var(--cobalt); --surface: #ffffff; --code-bg: #e8eaf3; --mark: var(--cobalt);
  --shadow-lg: 0 40px 90px -40px rgba(11, 16, 48, 0.45), 0 2px 8px rgba(11, 16, 48, 0.08);
  --display: Anybody, "Arial Narrow", sans-serif;
  --body: "Hanken Grotesk", system-ui, sans-serif;
  --cue: "Big Shoulders Stencil", Anybody, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  --gutter: clamp(16px, 4.4vw, 64px); --wrap: calc(1600px - 2 * var(--gutter));
  /* One inline-start edge for every section: the gutter, inside a 1600 px column on very wide screens */
  --edge: max(var(--gutter), calc((100vw - 1600px) / 2 + var(--gutter)));
  /* Type roles (decision #250): one display step per job, weight 700 at most, tracking proportional to size */
  --h-display: 700 clamp(2.6rem, 4.6vw, 4.6rem)/0.94 var(--display);
  --h-section: 700 clamp(2.25rem, 4.2vw, 3.9rem)/0.96 var(--display);
  --h-band: 700 clamp(1.85rem, 3vw, 2.8rem)/1.02 var(--display);
  /* Motion: short and decelerating. Feedback 150 ms, a state 240 ms, her line 420 ms; only the lighting is slow. */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-ui: cubic-bezier(0.2, 0.8, 0.2, 1);
  --t-fast: 150ms; --t-state: 240ms; --t-line: 420ms; --t-light: 1200ms;
  /* Shape: controls 10, a control inside a field 6, pictures and the film 14 */
  --r-control: 10px; --r-inner: 6px; --r-media: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #070a1c; --page-ink: #eef0ff; --page-ink-2: #aeb4da; --page-line: rgba(238, 240, 255, 0.14);
    --link: #a9b8ff; --surface: #0e1330; --code-bg: #141a3c; --mark: #a9b8ff;
    --shadow-lg: 0 40px 90px -40px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(238, 240, 255, 0.08);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --page: #070a1c; --page-ink: #eef0ff; --page-ink-2: #aeb4da; --page-line: rgba(238, 240, 255, 0.14);
  --link: #a9b8ff; --surface: #0e1330; --code-bg: #141a3c; --mark: #a9b8ff;
  --shadow-lg: 0 40px 90px -40px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(238, 240, 255, 0.08);
  color-scheme: dark;
}

/* Which screenshot shows: the light one in light, the dark one in dark. */
.only-dark { display: none !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .only-dark { display: block !important; } :root:not([data-theme="light"]) .only-light { display: none !important; } }
:root[data-theme="dark"] .only-dark { display: block !important; }
:root[data-theme="dark"] .only-light { display: none !important; }
.when-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .when-dark { display: inline-flex; } :root:not([data-theme="light"]) .when-light { display: none; } }
:root[data-theme="dark"] .when-dark { display: inline-flex; }
:root[data-theme="dark"] .when-light { display: none; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-color: #3b4166 var(--cyc-black); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--page); color: var(--page-ink); font: 400 1.0625rem/1.6 var(--body); font-variant-numeric: tabular-nums; }
body.home { background: var(--cyc-black); color: #fff; }
img, video { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
  transition: color var(--t-fast) var(--ease-ui), text-decoration-color var(--t-fast) var(--ease-ui), opacity var(--t-fast) var(--ease-ui); }
a:hover { text-decoration-color: currentColor; }
code { font-family: var(--mono); font-size: 0.9em; }
::selection { background: var(--rose); color: var(--ink); }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; border-radius: 4px; }
.icon { width: 1.15em; height: 1.15em; flex: none; fill: currentColor; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; inset-inline-start: 8px; top: -60px; z-index: 50; background: #fff; color: var(--ink); padding: 8px 12px; border-radius: 6px; }
.skip-link:focus { top: 8px; }

/* Buttons (the 404 and the docs use them) */
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--r-control); border: 1px solid var(--page-line); background: var(--surface); color: var(--page-ink); font: 600 0.95rem/1 var(--body); text-decoration: none; cursor: pointer;
  transition: border-color var(--t-fast) var(--ease-ui), background-color var(--t-fast) var(--ease-ui), opacity var(--t-fast) var(--ease-ui), transform 100ms var(--ease-ui); }
.btn:hover { border-color: currentColor; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--page-ink); color: var(--page); border-color: transparent; }
.btn-primary:hover { opacity: 0.88; }

/* ---------- Header: on the stage it takes the cue's light; elsewhere it's the black board ---------- */
.site-head { position: relative; z-index: 10; background: var(--cyc-black); color: #fff; }
.site-head::after { content: ""; display: block; height: 4px; background: linear-gradient(90deg, var(--night), var(--cobalt) 35%, var(--rose) 70%, var(--day)); }
.site-head-in { display: flex; align-items: center; gap: clamp(14px, 3vw, 36px); padding: 16px var(--gutter); max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; }
.home .site-head { position: absolute; inset: 0 0 auto 0; background: none; color: var(--fg, #fff); transition: color 600ms var(--ease); }
.home .site-head::after { display: none; }
.home .site-head-in { padding-top: 20px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 1.15rem/1 var(--display); font-stretch: 92%; letter-spacing: -0.01em; }
.brand img { border-radius: 50%; }
.site-nav { display: flex; gap: clamp(12px, 2.2vw, 30px); margin-inline-start: auto; font-size: 0.95rem; }
/* Nav: quiet until pointed at; the underline fades in rather than snapping on */
.site-nav a { text-decoration: underline transparent; opacity: 0.8; white-space: nowrap; padding-block: 6px; }
.site-nav a:hover { opacity: 1; text-decoration-color: color-mix(in srgb, currentColor 55%, transparent); }
.site-nav a[aria-current="page"] { opacity: 1; text-decoration-color: currentColor; }
.site-tools { display: flex; align-items: center; gap: 8px; }
.icon-btn, .gh { height: 40px; border-radius: var(--r-control); border: 1px solid color-mix(in srgb, currentColor 24%, transparent); background: transparent; color: inherit;
  transition: border-color var(--t-fast) var(--ease-ui), background-color var(--t-fast) var(--ease-ui); }
.icon-btn { display: inline-grid; place-items: center; width: 40px; cursor: pointer; }
.home .icon-btn { display: none; }
.gh { display: inline-flex; align-items: center; gap: 7px; padding: 0 14px; text-decoration: none; font-size: 0.92rem; font-weight: 500; }
.icon-btn:hover, .gh:hover { border-color: color-mix(in srgb, currentColor 60%, transparent); background: color-mix(in srgb, currentColor 8%, transparent); }
@media (max-width: 760px) {
  .site-nav a:not([data-keep]) { display: none; }
  .gh span { display: none; }
}

/* ---------- Footer: blackout ---------- */
.site-foot { background: var(--cyc-black); color: rgba(255, 255, 255, 0.72); padding: 40px var(--gutter) 32px; font-size: 0.92rem; }
.site-foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px 48px; max-width: var(--wrap); margin: 0 auto; }
.foot-brand { display: flex; gap: 14px; align-items: flex-start; max-width: 40ch; }
.foot-brand img { border-radius: 50%; }
.foot-brand strong { color: #fff; font: 700 1.1rem/1.3 var(--display); font-stretch: 92%; }
.site-foot nav { display: flex; gap: 48px; flex-wrap: wrap; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-foot a { text-decoration: underline transparent; }
.site-foot a:hover { color: #fff; text-decoration-color: color-mix(in srgb, currentColor 55%, transparent); }
.foot-note { max-width: var(--wrap); margin: 28px auto 0; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.1); font-size: 0.82rem; color: rgba(255, 255, 255, 0.55); }

/* ================= Home: the stage ================= */
.stage {
  --fg: #fff; --fg-2: rgba(255, 255, 255, 0.8); --field: rgba(5, 6, 10, 0.5); --field-line: rgba(255, 255, 255, 0.22);
  --rim: rgba(80, 110, 255, 0.4); --wrap-light: rgba(60, 90, 220, 0.6);
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-rows: 1fr auto;
  min-height: max(100svh, 700px);
  color: var(--fg); transition: color 600ms var(--ease);
}
.stage[data-cue="dawn"], .stage[data-cue="day"] { --fg: var(--ink); --fg-2: var(--ink-2); --field: rgba(255, 255, 255, 0.62); --field-line: rgba(11, 16, 48, 0.18); }
.stage[data-cue="dawn"] { --rim: rgba(255, 170, 150, 0.45); --wrap-light: rgba(255, 190, 200, 0.7); }
.stage[data-cue="day"] { --rim: rgba(255, 255, 255, 0.55); --wrap-light: rgba(170, 210, 255, 0.75); }
.stage[data-cue="dusk"] { --rim: rgba(255, 120, 80, 0.5); --wrap-light: rgba(255, 140, 110, 0.6); }
body:has(.stage[data-cue="dawn"]) .site-head, body:has(.stage[data-cue="day"]) .site-head { --fg: var(--ink); }

/* The sky: four scenes, the one for this cue lit. They are 1024 px paintings, so they sit behind a lens: a touch of
   depth-of-field blur and film grain that also covers Jess, which keeps wide screens from showing upscaling. */
.cyc { position: absolute; inset: 0; z-index: -2; background: var(--cyc-black); overflow: hidden; }
.sky { position: absolute; inset: -2%; width: 104%; height: 104%; max-width: none; object-fit: cover; object-position: 50% 72%; opacity: 0; filter: blur(1.6px) saturate(1.04); transition: opacity var(--t-light) var(--ease); }
.stage[data-cue="night"] .sky[data-sky="night"], .stage[data-cue="dawn"] .sky[data-sky="dawn"],
.stage[data-cue="day"] .sky[data-sky="day"], .stage[data-cue="dusk"] .sky[data-sky="dusk"] { opacity: 1; }
.wash { position: absolute; inset: 0; transition: background var(--t-light) var(--ease); }
.stage[data-cue="night"] .wash { background: linear-gradient(180deg, var(--cyc-black) 0%, rgba(5, 6, 10, 0.55) 34%, rgba(10, 18, 64, 0.1) 70%), linear-gradient(90deg, rgba(5, 6, 10, 0.62), transparent 58%); }
.stage[data-cue="dawn"] .wash { background: linear-gradient(90deg, rgba(245, 240, 255, 0.55), rgba(245, 240, 255, 0.1) 55%, transparent); }
.stage[data-cue="day"] .wash { background: linear-gradient(90deg, rgba(246, 250, 255, 0.6), rgba(246, 250, 255, 0.12) 55%, transparent); }
.stage[data-cue="dusk"] .wash { background: linear-gradient(180deg, rgba(10, 8, 40, 0.65) 0%, transparent 50%), linear-gradient(90deg, rgba(14, 8, 40, 0.62), transparent 58%); }
.grain { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0.09; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1.2 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.vignette { position: absolute; inset: 0; background: radial-gradient(120% 90% at 66% 100%, transparent 50%, rgba(5, 6, 10, 0.35)); }


/* Jess: lit by the cue, with a back light, the sky's colour wrapping her edges, and haze where she meets the stage */
.actor { position: absolute; z-index: -1; margin: 0; inset-inline-end: max(-2vw, -40px); bottom: 0; height: min(100%, 860px); aspect-ratio: 1; pointer-events: none; }
.actor::before { content: ""; position: absolute; inset: 4% 14% 30%; border-radius: 50%; background: radial-gradient(closest-side, var(--rim), transparent); filter: blur(30px); transition: background var(--t-light) var(--ease), opacity var(--t-light) var(--ease); }
.face { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; opacity: 0;
  -webkit-mask-image: linear-gradient(180deg, #000 70%, rgba(0, 0, 0, 0.55) 92%, transparent); mask-image: linear-gradient(180deg, #000 70%, rgba(0, 0, 0, 0.55) 92%, transparent);
  transition: opacity 900ms var(--ease), filter var(--t-light) var(--ease); }
.stage[data-cue="night"] .face[data-face="night"], .stage[data-cue="dawn"] .face[data-face="dawn"],
.stage[data-cue="day"] .face[data-face="day"], .stage[data-cue="dusk"] .face[data-face="dusk"] { opacity: 1; }
.stage[data-cue="night"] .face { filter: brightness(0.68) saturate(0.78) contrast(1.04) drop-shadow(0 0 1.5px var(--wrap-light)) drop-shadow(-18px -4px 40px rgba(70, 100, 255, 0.38)); }
.stage[data-cue="dawn"] .face { filter: brightness(1.02) sepia(0.06) drop-shadow(0 0 1.5px var(--wrap-light)) drop-shadow(-14px 0 40px rgba(255, 170, 150, 0.4)); }
.stage[data-cue="day"] .face { filter: contrast(1.02) drop-shadow(0 0 1.5px var(--wrap-light)) drop-shadow(0 20px 40px rgba(20, 40, 90, 0.22)); }
.stage[data-cue="dusk"] .face { filter: brightness(0.9) saturate(1.05) drop-shadow(0 0 1.5px var(--wrap-light)) drop-shadow(16px -6px 44px rgba(255, 110, 70, 0.5)); }
/* The lights come up on each picture as it arrives, not on a timer: until a sky or a portrait has loaded it stays
   dark, then fades up with the cue's own transition. Nothing else on the stage waits for it; the words are there
   from the first frame. (The head script sets data-fade, so without JavaScript the noscript sky shows as is.) */
.stage[data-fade] .sky:not([data-ready]), .stage[data-fade] .face:not([data-ready]) { opacity: 0; }
/* Her back light comes up with her (it's a large blur, so it also stays out of the first frame). */
.stage[data-fade] .actor:not(:has(.face[data-ready]))::before { opacity: 0; }
/* Between a tablet and a laptop the stage is too narrow for Jess at full height beside the words: she steps back and
   a little out of frame, so the headline and the lead never sit on her. */
@media (min-width: 901px) and (max-width: 1180px) { .actor { height: min(100%, 860px, 72vw); inset-inline-end: -12vw; } }
/* Her presence, as in the app: a slow breath. The sky holds still (it changes with the cue, that is its motion). */
@media (prefers-reduced-motion: no-preference) {
  .actor { animation: breathe 9s ease-in-out infinite alternate; }
}
@keyframes breathe { from { transform: translateY(0) scale(1); } to { transform: translateY(-0.5%) scale(1.008); } }

.pitch { position: relative; z-index: 2; align-self: center; padding: 92px var(--gutter) 28px; padding-inline-start: var(--edge); max-width: calc(min(860px, 60vw) + var(--edge) - var(--gutter)); }
.pitch h1 { margin: 0 0 0.4em; max-width: 9.6em; font: var(--h-display); font-stretch: 76%; letter-spacing: -0.02em; }
.pitch .lead { margin: 0 0 1.75rem; max-width: 48ch; font-size: clamp(1.05rem, 1.2vw, 1.175rem); line-height: 1.6; color: var(--fg-2); transition: color 600ms var(--ease); }
.install-field label, .field-label { display: block; font-weight: 600; font-size: 0.875rem; letter-spacing: 0.01em; margin-bottom: 0.5rem; }
.cmd { display: flex; align-items: stretch; max-width: 560px; min-height: 52px; background: var(--field); border: 1px solid var(--field-line); border-radius: var(--r-control); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: background-color 600ms var(--ease), border-color 600ms var(--ease); }
.cmd[hidden] { display: none; }
.cmd input { flex: 1; min-width: 0; border: 0; background: none; color: inherit; font: 500 0.875rem/1 var(--mono); padding: 0 16px; text-overflow: ellipsis; direction: ltr; }
.cmd input:focus-visible { outline: none; }
.cmd:focus-within { outline: 2px solid var(--rose); outline-offset: 2px; }
.copy-btn { border: 0; margin: 5px; padding: 0 16px; min-width: 5.75rem; border-radius: var(--r-inner); cursor: pointer; background: var(--fg, #fff); color: var(--cyc-black); font: 600 0.9rem/1 var(--body);
  transition: background-color var(--t-state) var(--ease-ui), color var(--t-state) var(--ease-ui), opacity var(--t-fast) var(--ease-ui), transform 100ms var(--ease-ui); }
.stage[data-cue="dawn"] .copy-btn, .stage[data-cue="day"] .copy-btn { color: #fff; }
.copy-btn:hover { opacity: 0.86; }
.copy-btn:active { transform: scale(0.97); }
.copy-btn[data-done] { background: var(--go); color: var(--go-ink); }
.after { margin: 0.85rem 0 0; font-size: 0.875rem; line-height: 1.6; color: var(--fg-2); max-width: 60ch; }
.pitch .after a { color: var(--fg); }

/* Surtitles: what she's doing at this cue, in her words, on the black board under the stage */
.surtitles { position: relative; z-index: 3; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 48px; align-items: end; padding: 20px var(--edge) 18px; background: rgba(5, 6, 10, 0.9); color: #fff; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.cue-label { margin: 0 0 0.45rem; font: 700 0.9rem/1 var(--cue); letter-spacing: 0.1em; text-transform: uppercase; color: var(--rose); }
.cue-label span + span::before { content: "· "; color: rgba(255, 255, 255, 0.4); }
/* Her line keeps two lines of room (three on phones) and the beat under it one button's height, so a cue never moves
   the stage; the day cue's Send it / Not now sit on the beat's row, beside the state. */
.line { margin: 0; font: 500 clamp(1.15rem, 1.6vw, 1.45rem)/1.32 var(--body); letter-spacing: -0.005em; max-width: 50ch; text-wrap: balance; min-height: calc(2em * 1.32); }
.beat { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; min-height: 40px; margin-top: 0.45rem; }
.state { margin: 0; font-size: 0.9rem; color: rgba(255, 255, 255, 0.72); }
/* A new cue arrives the way a message does: the line rises a little and settles, the state follows a beat later,
   then the buttons. 420 ms, decelerating; no blur. */
.line-wrap.swap .line { animation: line-in var(--t-line) var(--ease-ui) both; }
.line-wrap.swap .state { animation: fade-in 320ms var(--ease-ui) 160ms both; }
.line-wrap.swap .ask { animation: line-in 360ms var(--ease-ui) 260ms both; }
@keyframes line-in { from { opacity: 0; transform: translateY(0.35em); } }
@keyframes fade-in { from { opacity: 0; } }
.ask { display: flex; gap: 8px; }
.ask[hidden] { display: none; }
/* Where the state and the buttons can't share a row, the buttons' row is kept (empty and hidden) on every cue, so the
   day cue doesn't push the stage or the page down. */
.line-wrap { container-type: inline-size; }
@container (max-width: 640px) {
  .beat { flex-direction: column; align-items: flex-start; }
  .ask[hidden] { display: flex; visibility: hidden; }
}
@container (max-width: 440px) { .state { min-height: calc(2 * 1.6em); } }
.go, .hold { min-height: 40px; border-radius: var(--r-control); padding: 0 18px; font: 600 0.92rem/1 var(--body); cursor: pointer;
  transition: background-color var(--t-fast) var(--ease-ui), border-color var(--t-fast) var(--ease-ui), transform 100ms var(--ease-ui); }
.go:active, .hold:active { transform: scale(0.97); }
.go { background: var(--go); color: var(--go-ink); border: 0; }
.go:hover { background: #4ee08e; }
.hold { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, 0.35); }
.hold:hover { border-color: #fff; background: rgba(255, 255, 255, 0.06); }
.board { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 132px)); gap: 6px; }
.board button { position: relative; width: 100%; text-align: start; cursor: pointer; display: grid; grid-template-columns: auto 1fr; gap: 0 8px; background: rgba(255, 255, 255, 0.04); color: rgba(255, 255, 255, 0.66); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px; padding: 10px 10px 12px; font: 400 0.8rem/1.2 var(--body); overflow: hidden;
  transition: color var(--t-fast) var(--ease-ui), border-color var(--t-fast) var(--ease-ui), background-color var(--t-fast) var(--ease-ui); }
.board button:hover { color: #fff; border-color: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.07); }
.board .q { font: 700 1.15rem/1 var(--cue); grid-row: span 2; color: rgba(255, 255, 255, 0.5); }
.board .t { font: 700 0.95rem/1 var(--cue); letter-spacing: 0.05em; }
.board .n { font-size: 0.78rem; }
.board i { position: absolute; inset-inline-start: 0; bottom: 0; height: 2px; width: 100%; background: var(--rose); transform: scaleX(0); transform-origin: left; }
[dir="rtl"] .board i { transform-origin: right; }
.board button[aria-pressed="true"] { background: rgba(255, 255, 255, 0.1); color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.board button[aria-pressed="true"] .q { color: var(--rose); }
.board button[aria-pressed="true"] i { transform: scaleX(1); }
.stage.playing .board button[aria-pressed="true"] i { animation: run var(--cue-ms, 6000ms) linear forwards; }
@keyframes run { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.demo-note { grid-column: 1 / -1; margin: 0; font-size: 0.78rem; color: rgba(255, 255, 255, 0.62); }

@media (max-width: 900px) {
  .stage { grid-template-rows: auto auto auto; min-height: 0; }
  .actor { position: relative; inset-inline-end: auto; justify-self: center; grid-row: 1; height: auto; width: min(100%, 520px); aspect-ratio: 1 / 0.78; overflow: hidden; margin-top: 54px; }
  .face { object-position: 50% 0; }
  .pitch { grid-row: 2; max-width: none; padding-top: 4px; padding-bottom: 8px; }
  .surtitles { grid-template-columns: 1fr; }
  .line { min-height: calc(3em * 1.32); }
  .board { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .board .n { display: none; }
  .stage[data-cue="night"] .wash, .stage[data-cue="dusk"] .wash { background: linear-gradient(180deg, rgba(5, 6, 10, 0.85) 0%, rgba(5, 6, 10, 0.45) 45%, rgba(5, 6, 10, 0.1)); }
  .stage[data-cue="dawn"] .wash, .stage[data-cue="day"] .wash { background: linear-gradient(180deg, rgba(246, 248, 255, 0.7) 0%, rgba(246, 248, 255, 0.35) 45%, transparent); }
}

/* ================= Home: the lights rise ================= */
.day { overflow-x: clip; background: linear-gradient(180deg, var(--cyc-black) 0%, var(--night) 18%, #1a2c96 34%, var(--cobalt) 42%, #7d63c0 54%, var(--rose) 66%, #f6cfd2 80%, var(--day) 96%); }
.band { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px; align-items: center; padding: clamp(80px, 12vh, 136px) var(--gutter); min-height: 80vh; max-width: 1600px; margin: 0 auto; }
.band .copy { grid-column: 1 / span 5; }
.band .shot { grid-column: 6 / span 7; margin: 0; position: relative; }
.band:nth-child(odd of .band) .copy { grid-column: 8 / span 5; grid-row: 1; }
.band:nth-child(odd of .band) .shot { grid-column: 1 / span 7; grid-row: 1; }
.b-night, .b-dawn { color: #fff; }
.b-morning, .b-noon { color: var(--ink); }
.band .time { display: block; font: 700 clamp(3.25rem, 6.4vw, 5rem)/0.86 var(--cue); font-stretch: normal; letter-spacing: 0.01em; margin-bottom: 0.22em; }
.band h2 { margin: 0 0 1rem; font: var(--h-band); font-stretch: 82%; letter-spacing: -0.015em; }
.band p { max-width: 44ch; line-height: 1.65; }
.b-night p, .b-dawn p { color: rgba(255, 255, 255, 0.84); }
.b-morning p, .b-noon p { color: var(--ink); }
.said { font-style: italic; }
.band .shot img { border-radius: var(--r-media); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.65), 0 2px 8px rgba(0, 0, 0, 0.2); }
.band .shot::before { content: ""; position: absolute; inset: -18% -10%; z-index: -1; background: radial-gradient(closest-side, rgba(255, 255, 255, 0.14), transparent); }
.b-morning .shot::before, .b-noon .shot::before { background: radial-gradient(closest-side, rgba(255, 255, 255, 0.5), transparent); }
@media (max-width: 900px) {
  .band { grid-template-columns: 1fr; min-height: 0; gap: 28px; }
  .band .copy, .band .shot, .band:nth-child(odd of .band) .copy, .band:nth-child(odd of .band) .shot { grid-column: 1; grid-row: auto; }
}

/* ================= Home: house lights (a real run, then the rest) ================= */
.house { background: var(--day); color: var(--ink); padding: clamp(64px, 10vh, 120px) var(--gutter); }
.house > * { max-width: var(--wrap); margin-inline: auto; }
.house-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px 32px; margin-bottom: clamp(32px, 4vw, 48px); }
.house-head h2 { grid-column: 1 / span 7; margin: 0; font: var(--h-section); font-stretch: 76%; letter-spacing: -0.02em; }
.house-head p { grid-column: 9 / span 4; align-self: end; margin: 0; line-height: 1.65; color: var(--ink-2); }
.run { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr); gap: clamp(20px, 3vw, 40px); align-items: start; margin-bottom: clamp(72px, 12vh, 140px); }
.film { margin: 0; position: relative; border-radius: var(--r-media); overflow: hidden; background: var(--cyc-black); box-shadow: 0 40px 90px -40px rgba(11, 16, 48, 0.45); }
.film video { width: 100%; aspect-ratio: 1280 / 800; }
.film-toggle { position: absolute; inset-inline-end: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; background: rgba(5, 6, 10, 0.78); color: #fff; border: 1px solid rgba(255, 255, 255, 0.22); border-radius: var(--r-control); padding: 0 14px; font: 600 0.85rem/1 var(--body); cursor: pointer;
  transition: background-color var(--t-fast) var(--ease-ui), border-color var(--t-fast) var(--ease-ui); }
.film-toggle:hover { background: rgba(5, 6, 10, 0.92); border-color: rgba(255, 255, 255, 0.5); }
.film-toggle[hidden] { display: none; }
.timetable { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.timetable li { display: grid; grid-template-columns: 3.4rem 1fr; gap: 14px; padding: 13px 0; border-bottom: 1px solid rgba(11, 16, 48, 0.14); line-height: 1.5; color: #5d6386; transition: color var(--t-state) var(--ease-ui); }
.timetable time { font: 700 1.2rem/1.25 var(--cue); color: inherit; transition: color var(--t-state) var(--ease-ui); }
.timetable li.past { color: var(--ink-2); }
.timetable li.on { color: var(--ink); }
.timetable li.on time { color: var(--cobalt); }
.run-note { margin: 10px 0 0; font-size: 0.85rem; color: var(--ink-2); }
.wide-shot { margin: 0 0 56px; }
.wide-shot img { width: 100%; border-radius: var(--r-media); box-shadow: 0 40px 90px -40px rgba(11, 16, 48, 0.45); }
.cue-sheet { width: 100%; border-collapse: collapse; }
.cue-sheet thead th { text-align: start; font: 700 0.85rem/1 var(--cue); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); padding: 0 0 12px; border-bottom: 2px solid var(--ink); }
.cue-sheet td, .cue-sheet tbody th { padding: 18px 16px 18px 0; border-bottom: 1px solid rgba(11, 16, 48, 0.14); vertical-align: baseline; text-align: start; }
.cue-sheet tbody th { font: 700 1.2rem/1.2 var(--display); font-stretch: 88%; width: 32%; }
.cue-sheet td { line-height: 1.6; }
.cue-sheet td:last-child { color: var(--ink-2); }
.cue-sheet a { color: var(--cobalt); }
@media (max-width: 900px) { .run { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
  .house-head { grid-template-columns: 1fr; }
  .house-head h2, .house-head p { grid-column: 1; }
  .cue-sheet thead { display: none; }
  .cue-sheet tr { display: grid; padding: 14px 0; border-bottom: 1px solid rgba(11, 16, 48, 0.14); }
  .cue-sheet td, .cue-sheet tbody th { border: 0; padding: 2px 0; width: auto; }
}

/* ================= Home: standby (the lights go down again) ================= */
.standby { background: linear-gradient(180deg, var(--day) 0%, #7d88d0 5%, var(--cobalt) 18%, var(--night) 100%); color: #fff; padding: clamp(120px, 18vh, 200px) var(--gutter) clamp(72px, 10vh, 120px); }
.standby > * { max-width: var(--wrap); margin-inline: auto; }
.standby h2 { margin-block: 0; font: var(--h-section); font-stretch: 76%; letter-spacing: -0.02em; }
.sb-lead { font-size: 1.175rem; line-height: 1.6; color: rgba(255, 255, 255, 0.84); margin-block: 1.1rem clamp(40px, 5vw, 56px); }
.rules { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 80px); }
.rule-k { margin: 0 0 0.6rem; font: 700 1.2rem/1 var(--cue); letter-spacing: 0.1em; text-transform: uppercase; padding-bottom: 0.8rem; border-bottom: 2px solid currentColor; }
.rule-col:first-child .rule-k { color: var(--go); }
.rule-col:last-child .rule-k { color: var(--rose); }
.rules ul { list-style: none; padding: 0; margin: 0; }
.rules li { font: 600 clamp(1.1rem, 1.45vw, 1.35rem)/1.3 var(--display); font-stretch: 92%; padding: 0.8rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.16); }
.note { color: rgba(255, 255, 255, 0.76); font-size: 0.95rem; line-height: 1.6; max-width: 50ch; }
.note a { color: #fff; }
@media (max-width: 760px) { .rules { grid-template-columns: 1fr; } }

.leaves { background: linear-gradient(180deg, var(--night), var(--cyc-black)); color: #fff; padding: clamp(72px, 10vh, 120px) var(--gutter); }
.leaves > * { max-width: var(--wrap); margin-inline: auto; }
.leaves h2 { margin-block: 0 1.1rem; font: var(--h-section); font-stretch: 76%; letter-spacing: -0.02em; }
.leaves > p { color: rgba(255, 255, 255, 0.82); line-height: 1.65; }
.exits { list-style: none; counter-reset: x; padding: 0; margin-block: 2rem 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid rgba(255, 255, 255, 0.18); }
.exits li { counter-increment: x; padding: 20px 24px 8px 0; color: rgba(255, 255, 255, 0.76); }
.exits li + li { padding-inline-start: 24px; border-inline-start: 1px solid rgba(255, 255, 255, 0.18); }
.exits span { display: block; width: fit-content; color: #fff; font: 700 1.2rem/1.2 var(--display); font-stretch: 90%; margin-bottom: 0.3rem; padding-top: 0.6rem; border-top: 3px solid var(--go); }
@media (max-width: 760px) { .exits { grid-template-columns: 1fr; } .exits li + li { padding-inline-start: 0; border: 0; border-top: 1px solid rgba(255, 255, 255, 0.18); } }

/* ================= Home: the curtain ================= */
.curtain { position: relative; overflow: hidden; background: var(--cyc-black); color: #fff; padding: clamp(80px, 14vh, 160px) var(--edge); min-height: 80vh; display: grid; align-items: center; }
.sleep { position: absolute; z-index: 0; inset-inline-end: -4vw; bottom: 0; width: min(62vw, 760px); max-width: none; filter: brightness(0.7) saturate(0.7) contrast(1.05); -webkit-mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent), linear-gradient(180deg, #000 62%, transparent 96%); -webkit-mask-composite: source-in; mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent), linear-gradient(180deg, #000 62%, transparent 96%); mask-composite: intersect; pointer-events: none; }
.curtain::before, .notfound::before { content: ""; position: absolute; z-index: 0; inset-inline-end: 4vw; bottom: 8%; width: min(46vw, 560px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, rgba(80, 110, 255, 0.38), rgba(80, 110, 255, 0.1) 60%, transparent); filter: blur(20px); pointer-events: none; }
.curtain-copy { position: relative; z-index: 1; max-width: 640px; }
.curtain h2 { margin: 0 0 1.5rem; font: var(--h-display); font-stretch: 76%; letter-spacing: -0.02em; }
.tabs { display: flex; gap: 4px; margin-bottom: 10px; }
.tabs [role="tab"] { min-height: 36px; background: none; border: 1px solid transparent; color: rgba(255, 255, 255, 0.72); padding: 0 14px; border-radius: var(--r-control); font: 600 0.92rem/1 var(--body); cursor: pointer;
  transition: color var(--t-fast) var(--ease-ui), border-color var(--t-fast) var(--ease-ui), background-color var(--t-fast) var(--ease-ui); }
.tabs [role="tab"]:hover { color: #fff; }
.tabs [role="tab"][aria-selected="true"] { color: #fff; border-color: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.06); }
.cmd.big { max-width: 640px; background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.18); }
.cmd.big .copy-btn { background: #fff; color: var(--cyc-black); }
.curtain .after { color: rgba(255, 255, 255, 0.74); }
.curtain .after a, .curtain .after strong { color: #fff; }
@media (max-width: 760px) { .sleep { opacity: 0.45; width: 100vw; inset-inline-end: -20vw; } }

/* ================= The guide ================= */
.docs-wrap { display: grid; grid-template-columns: 220px minmax(0, 1fr) 210px; gap: clamp(24px, 4vw, 56px); max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: clamp(32px, 6vh, 64px) var(--gutter) 96px; align-items: start; }
.docs-menu, .doc-toc { position: sticky; top: 24px; font-size: 0.93rem; }
.docs-menu-h { margin: 0 0 10px; font: 700 0.9rem/1 var(--cue); letter-spacing: 0.12em; text-transform: uppercase; color: var(--mark); }
.docs-menu ul, .doc-toc ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.docs-menu a, .doc-toc a { display: block; padding: 6px 10px; border-radius: var(--r-inner); text-decoration: none; color: var(--page-ink-2);
  transition: color var(--t-fast) var(--ease-ui), background-color var(--t-fast) var(--ease-ui); }
.docs-menu a:hover, .doc-toc a:hover { color: var(--page-ink); background: color-mix(in srgb, var(--page-ink) 6%, transparent); }
.docs-menu a[aria-current="page"] { color: var(--page-ink); font-weight: 600; background: color-mix(in srgb, var(--mark) 12%, transparent); }
.doc-toc a { padding-block: 4px; font-size: 0.88rem; }
@media (max-width: 1100px) { .docs-wrap { grid-template-columns: 200px minmax(0, 1fr); } .doc-toc { display: none; } }
@media (max-width: 760px) {
  .docs-wrap { grid-template-columns: 1fr; }
  .docs-menu { position: static; order: 2; border-top: 1px solid var(--page-line); padding-top: 24px; }
}

.prose { min-width: 0; max-width: 70ch; line-height: 1.7; }
.prose h1 { margin: 0 0 0.55em; font: var(--h-section); font-stretch: 76%; letter-spacing: -0.02em; }
.prose h2 { margin: 2.2em 0 0.55em; font: 700 clamp(1.6rem, 2.4vw, 2rem)/1.08 var(--display); font-stretch: 86%; letter-spacing: -0.012em; }
.prose h3 { margin: 1.8em 0 0.4em; font: 700 1.25rem/1.2 var(--display); font-stretch: 92%; }
.prose p, .prose ul, .prose ol { margin: 0 0 1em; }
.prose > p:first-of-type { font-size: 1.175rem; line-height: 1.65; color: var(--page-ink-2); }
.prose li { margin: 0.3em 0; }
.prose li::marker { color: var(--mark); }
.prose a { color: var(--link); }
.prose img { border-radius: var(--r-control); margin: 1.4em 0; box-shadow: var(--shadow-lg); }
.prose img[src*="-phone-"] { max-width: 300px; }
.prose code { background: var(--code-bg); padding: 0.12em 0.36em; border-radius: 4px; }
.prose pre { background: var(--cyc-black); color: #e9ecff; padding: 16px 18px; border-radius: var(--r-control); overflow-x: auto; font-size: 0.9rem; line-height: 1.55; direction: ltr; text-align: left; }
.prose pre code { background: none; padding: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 0.95rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--page-line); vertical-align: top; }
.prose th { font-weight: 700; border-bottom: 2px solid var(--page-ink); }
.prose blockquote { margin: 1.4em 0; padding: 4px 0; padding-inline-start: 18px; border-inline-start: 1px solid var(--page-ink); color: var(--page-ink-2); }
.prose blockquote p { margin: 0.4em 0; }
.prose hr { border: 0; height: 4px; margin: 2.4em 0; background: linear-gradient(90deg, var(--night), var(--cobalt) 35%, var(--rose) 70%, transparent); border-radius: 2px; }
.prose h2[id], .prose h3[id] { scroll-margin-top: 24px; }
.doc-source { margin-top: 3em; padding-top: 1.2em; border-top: 1px solid var(--page-line); font-size: 0.92rem; }
.doc-source a { display: inline-flex; align-items: center; gap: 6px; color: var(--page-ink-2); }

/* ================= Gallery and 404 ================= */
.page-head { max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: clamp(40px, 8vh, 80px) var(--gutter) 24px; }
.page-head h1 { margin: 0 0 0.45em; font: var(--h-section); font-stretch: 76%; letter-spacing: -0.02em; }
.page-head p { max-width: 68ch; line-height: 1.65; color: var(--page-ink-2); }
.gallery-page { padding-bottom: 96px; }
.gallery-page > h2 { max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 48px auto 18px; padding: 0 var(--gutter); font: 700 0.95rem/1 var(--cue); letter-spacing: 0.12em; text-transform: uppercase; color: var(--mark); }
.shots { display: grid; gap: 28px 24px; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.shots-desktop { grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); }
.shots-phone { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.shot { margin: 0; }
.shot a { display: block; border-radius: var(--r-control); overflow: hidden; box-shadow: var(--shadow-lg); outline: 2px solid transparent; outline-offset: 3px; transition: outline-color var(--t-fast) var(--ease-ui); }
.shot a:hover { outline-color: var(--mark); }
.shot figcaption { margin-top: 10px; font-size: 0.92rem; color: var(--page-ink-2); }

.notfound { position: relative; isolation: isolate; overflow: hidden; display: grid; align-content: center; min-height: 72vh; max-width: none; padding: 80px var(--gutter); background: var(--cyc-black); color: #fff; }
.notfound { background: var(--cyc-black) url(../images/sky-night.webp) 50% 70% / cover; }
.notfound::before { z-index: -1; }
.notfound::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(90deg, rgba(5, 6, 10, 0.85), rgba(5, 6, 10, 0.2) 70%); }
.notfound > * { max-width: 560px; }
.notfound h1 { margin-bottom: 0.3em; }
.notfound p { margin: 0 0 1rem; color: rgba(255, 255, 255, 0.82); }
.notfound p:has(.btn) { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.25rem; }
.notfound .btn { background: rgba(255, 255, 255, 0.08); color: #fff; border-color: rgba(255, 255, 255, 0.3); margin-block-start: 8px; }
.notfound .btn-primary { background: #fff; color: var(--cyc-black); }
.notfound .sleeping { position: absolute; inset-inline-end: -2vw; bottom: 0; z-index: -1; width: min(52vw, 620px); max-width: none; filter: brightness(0.78) saturate(0.75) contrast(1.05); -webkit-mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent), linear-gradient(180deg, #000 62%, transparent 96%); -webkit-mask-composite: source-in; mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent), linear-gradient(180deg, #000 62%, transparent 96%); mask-composite: intersect; }
.lost .icon-btn { display: none; }
@media (max-width: 700px) { .notfound .sleeping { opacity: 0.4; width: 90vw; } }

/* Reduced motion: nothing moves through space and nothing plays by itself (the cues wait for a click, site.js). A
   picked cue still changes its light, in a short fade; hovers and presses keep their colour changes, not the press. */
@media (prefers-reduced-motion: reduce) {
  .sky, .face, .wash, .actor::before { transition: opacity 200ms linear !important; }
  .stage, .site-head, .pitch .lead, .cmd { transition: none !important; }
  .actor { animation: none !important; }
  .line-wrap.swap .line, .line-wrap.swap .state, .line-wrap.swap .ask, .stage.playing .board button[aria-pressed="true"] i { animation: none !important; }
  .btn:active, .copy-btn:active, .go:active, .hold:active { transform: none; }
}

/* ---- The lightbox (Vitrine, website/vitrine/vitrine.css: its look from these properties) -----------------------------------
   The house lights go down: the stage's black behind the picture in both themes, nearly opaque over a blur of the page
   (solid with reduced motion or transparency), so the picture is all there is. Cue type for the count, the pictures'
   own corners, the site's decelerating motion. */
:root {
  --vitrine-font: var(--body); --vitrine-ease: var(--ease); --vitrine-dur: 300ms; --vitrine-dur-out: 240ms; --vitrine-dur-fast: var(--t-fast);
  --vitrine-focus: var(--mark);
  --vitrine-scrim: rgb(5 6 10 / 0.94); --vitrine-scrim-solid: rgb(5 6 10 / 0.985); --vitrine-blur: 20px;
  --vitrine-fg: #eef0ff; --vitrine-fg-2: #aeb4da;
  --vitrine-btn: rgba(238, 240, 255, 0.1); --vitrine-btn-hover: rgba(238, 240, 255, 0.18);
  --vitrine-btn-radius: var(--r-control); --vitrine-media-radius: var(--r-media);
  --vitrine-media-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(238, 240, 255, 0.08);
  --vitrine-cap-size: 0.98rem;
}
.vitrine-count { font-family: var(--cue); font-size: 1.15rem; font-weight: 600; letter-spacing: 0.04em; }
