/* Creago. Deep space: a near-black sky, a deep violet glow rising from below, a few faint stars. The interface is
   violet; Peek is the only pink thing (DESIGN.md, version 4, 14 Nov 2026). Every part of the page is still a panel
   (SPEC-2.md), only the colours, the fonts and the words changed. */

:root {
  --bg: #030108;                          /* the sky at its darkest, and the page under it */
  --s1: #0A0618;                          /* surfaces, darkest to lightest */
  --s2: #120A27;
  --s3: #1C1039;
  --glass: rgba(9, 5, 24, .66);           /* a panel: dark glass over the sky */
  --line: rgba(185, 160, 255, .10);
  --line2: rgba(185, 160, 255, .20);
  --t1: #FBF8FF;                          /* text: primary, secondary, muted */
  --t2: #BCB2D8;
  --t3: #9184B8;
  --accent: #8B5CF6;                      /* the interface accent: lines, the caret, the playhead, the focus ring */
  --accent-press: #5B2BD0;
  --accent-soft: #C2AEFF;                 /* accent as text on the dark */
  --on-accent: #FFFFFF;
  --accent-top: #8F66FF;                  /* the main button: a violet pill, lighter at the top */
  --accent-bottom: #5225D3;
  --peek: #FF2E97;                        /* Peek's own pink. Nothing else on the site is pink */
  --peek-glow: rgba(255, 46, 151, .13);
  --ok: #5BE08A;

  --display: "Outfit", "Segoe UI", system-ui, sans-serif;
  --text: "DM Sans", "Segoe UI", system-ui, sans-serif;

  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-back: cubic-bezier(.3, 1.4, .5, 1);
  --wipe: cubic-bezier(.6, 0, .2, 1);
  --fast: 150ms;
  --slow: 600ms;

  --top: 64px;      /* the bar at the top */
  --tl: 76px;       /* the timeline at the bottom: a ruler row and the scene blocks */
  --pad: 40px;
  --max: 1320px;
  --strip: 120px;   /* the film strip along the bottom of the hook */
}

* { box-sizing: border-box; }
/* The home page reserves the scroll bar's room (its body hides the scroll bar during the opening and while a style
   is open, and the page must not jump sideways then). The other pages do not: on a short page there is no scroll
   bar, and an empty reserved strip would show beside the sky */
html { background: var(--bg); color: var(--t1); scroll-padding-top: var(--top); -webkit-text-size-adjust: 100%; color-scheme: dark; }
html.home { scrollbar-gutter: stable; }
body { margin: 0; font-family: var(--text); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; padding-bottom: var(--tl); overflow-x: hidden; background: transparent; }
body.booting, body.viewing { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img, video, canvas, svg { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 3px; border-radius: 8px; }
::selection { background: rgba(139, 92, 246, .55); color: #fff; }

/* ---------- the sky ----------
   One fixed layer behind everything, the same on every page: a near-black sky, a few faint stars in the upper part,
   a deep indigo-violet glow rising from below, and a very faint pink bloom low on the page, near where Peek stands.
   It is its own layer (position: fixed), so the browser moves the page over it without painting it again, phones
   included; a fixed background on the page itself would be painted again on every scroll and is ignored by iPhones.
   Every glow is sized in % of the screen, so it keeps its place on any size; the stars are 1 to 1.6 px dots.
   100lvh: the layer is as tall as the screen with the browser's bars hidden, so no strip opens up under it when a
   phone hides its address bar. */
body::before { content: ""; position: fixed; left: 0; right: 0; top: 0; height: 100vh; height: 100lvh; z-index: -1; pointer-events: none;
  background-color: var(--bg);
  background-repeat: no-repeat;
  background-image:
    radial-gradient(1.6px 1.6px at 12.3% 44.5%, rgba(214, 200, 255, .72) 50%, transparent 51%),
    radial-gradient(1px 1px at 72.6% 20.2%, rgba(214, 200, 255, .60) 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 46.8% 54.5%, rgba(255, 255, 255, .65) 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 27.3% 54.4%, rgba(214, 200, 255, .46) 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 36.6% 40.3%, rgba(190, 205, 255, .37) 50%, transparent 51%),
    radial-gradient(1px 1px at 65.9% 19.2%, rgba(255, 255, 255, .59) 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 59.1% 4.6%, rgba(214, 200, 255, .39) 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 40.8% 61.4%, rgba(255, 255, 255, .70) 50%, transparent 51%),
    radial-gradient(1px 1px at 85.8% 43.5%, rgba(190, 205, 255, .56) 50%, transparent 51%),
    radial-gradient(1px 1px at 62.8% 13.7%, rgba(214, 200, 255, .64) 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 51.3% 14.4%, rgba(214, 200, 255, .58) 50%, transparent 51%),
    radial-gradient(1px 1px at 78.6% 32.5%, rgba(255, 255, 255, .35) 50%, transparent 51%),
    radial-gradient(1px 1px at 28.7% 10.0%, rgba(255, 255, 255, .63) 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 67.9% 37.6%, rgba(190, 205, 255, .52) 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 18.2% 25.8%, rgba(214, 200, 255, .52) 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 42.1% 51.8%, rgba(255, 255, 255, .51) 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 45.1% 39.3%, rgba(255, 255, 255, .33) 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 48.9% 18.7%, rgba(190, 205, 255, .31) 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 37.3% 30.8%, rgba(255, 255, 255, .44) 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 6.1% 36.0%, rgba(255, 255, 255, .34) 50%, transparent 51%),
    radial-gradient(1px 1px at 5.3% 21.4%, rgba(214, 200, 255, .56) 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 52.1% 50.5%, rgba(255, 255, 255, .35) 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 76.4% 3.1%, rgba(214, 200, 255, .69) 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 19.5% 15.3%, rgba(214, 200, 255, .43) 50%, transparent 51%),
    radial-gradient(1px 1px at 5.0% 57.4%, rgba(255, 255, 255, .53) 50%, transparent 51%),
    radial-gradient(34% 24% at 34% 100%, var(--peek-glow), transparent 72%),
    radial-gradient(120% 85% at 50% 118%, rgba(104, 44, 232, .80) 0%, rgba(64, 14, 150, .64) 30%, rgba(34, 10, 92, .46) 55%, rgba(14, 6, 44, .22) 75%, transparent 90%),
    radial-gradient(70% 60% at 100% 0%, rgba(40, 16, 110, .58), transparent 70%),
    radial-gradient(50% 45% at 0% 30%, rgba(22, 10, 70, .46), transparent 70%),
    linear-gradient(180deg, #020105 0%, #04020B 55%, #080418 100%); }

/* the scroll bar, dark like the page. Its track is the colour the page has along its right edge, top to bottom: the
   top bar, then the sky (measured on the page itself; the same at every screen size, because every glow is sized in
   % of the screen), so the bar sits in the sky with no strip beside it. On the home page the timeline is at the
   bottom, so its track ends with the timeline's colour */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
::-webkit-scrollbar-track { background: linear-gradient(180deg, #04020D 0, #05020F 64px, #140838 64px, #130832 12%, #11072C 16%, #0E0627 20%, #0C0521 24%, #0A051B 28%, #090417 32%, #070311 36%, #05030D 40%, #04020A 46%, #04020C 52%, #05020E 56%, #050311 60%, #070314 64%, #090319 68%, #0B0420 72%, #0E0526 76%, #10062B 80%, #110631 84%, #140736 88%, #17073D 92%, #1A0842 96%, #1C0848 100%); }
html.home ::-webkit-scrollbar-track { background: linear-gradient(180deg, #04020D 0, #05020F 64px, #140838 64px, #130832 12%, #11072C 16%, #0E0627 20%, #0C0521 24%, #0A051B 28%, #090417 32%, #070311 36%, #05030D 40%, #04020A 46%, #04020C 52%, #05020E 56%, #050311 60%, #070314 64%, #090319 68%, #0B0420 72%, #0E0526 76%, #10062B 80%, #110631 84%, #140736 88%, #16073B calc(100% - 76px), #2B2344 calc(100% - 76px), #2B2344 calc(100% - 75px), #080415 calc(100% - 75px), #080416 100%); }
::-webkit-scrollbar-corner { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(185, 160, 255, .26); border: 3px solid transparent; border-radius: 999px; background-clip: padding-box; min-height: 40px; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(185, 160, 255, .42); }
::-webkit-scrollbar-thumb:active { background-color: rgba(194, 174, 255, .58); }
@supports not selector(::-webkit-scrollbar) {
  html { scrollbar-color: rgba(185, 160, 255, .32) #08041A; }
}

/* ---------- type ---------- */
.display { font-family: var(--display); font-weight: 600; letter-spacing: -0.03em; line-height: 1.04; margin: 0; }
/* the headline follows the width and the height, so the whole hook fits above the timeline on short screens */
h1.display { font-size: min(clamp(42px, 5.7vw, 86px), 12vh); letter-spacing: -0.035em; line-height: 1.02; }
h2.display { font-size: clamp(34px, 4.4vw, 64px); max-width: 16ch; }
.display.sm { font-size: 28px; letter-spacing: -0.02em; line-height: 1.12; }
.display .ln { display: block; }
.lead { font-size: 19px; line-height: 1.55; color: var(--t2); margin: 0; max-width: 46ch; }
.caret { display: inline-block; width: .09em; height: .78em; margin-left: .07em; background: var(--accent); vertical-align: -0.06em; animation: caret 1.05s steps(1) infinite; border-radius: 1px; }
.caret.sm { width: 2px; height: 1.05em; vertical-align: -0.18em; margin-left: 2px; }
@keyframes caret { 50% { opacity: 0; } }

/* the section label: the section's name in a small pill, above its heading */
.slate { display: inline-flex; align-items: center; justify-self: start; width: fit-content; margin: 0; padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; line-height: 1.2; letter-spacing: .02em; color: var(--accent-soft); background: rgba(139, 92, 246, .14); box-shadow: 0 0 0 1px rgba(185, 160, 255, .22) inset; white-space: nowrap; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 26px; border-radius: 999px; font-weight: 600; font-size: 16px; white-space: nowrap; transition: background-color var(--fast), color var(--fast), transform var(--fast), box-shadow var(--fast), filter var(--fast); }
.btn.sm { height: 38px; padding: 0 18px; font-size: 15px; }
/* the main button: a violet pill with a soft glow under it */
.btn.primary { background: linear-gradient(180deg, var(--accent-top) 0%, var(--accent-bottom) 100%); color: var(--on-accent);
  box-shadow: 0 12px 34px -12px rgba(91, 31, 214, .95), inset 0 1px 0 rgba(255, 255, 255, .28); }
.btn.primary:hover { background: linear-gradient(180deg, #9A75FF 0%, #5A2CDE 100%); box-shadow: 0 14px 38px -12px rgba(110, 50, 235, 1), inset 0 1px 0 rgba(255, 255, 255, .32); }
.btn.primary:active { background: linear-gradient(180deg, #6E45E6 0%, var(--accent-press) 100%); box-shadow: 0 6px 20px -10px rgba(91, 31, 214, .9), inset 0 1px 0 rgba(255, 255, 255, .18); transform: scale(.98); }
.btn.quiet { color: var(--t1); background: rgba(255, 255, 255, .05); box-shadow: 0 0 0 1px var(--line2) inset; }
.btn.quiet:hover { background: rgba(185, 160, 255, .12); box-shadow: 0 0 0 1px rgba(185, 160, 255, .34) inset; }
.btn.quiet:active { background: rgba(185, 160, 255, .18); transform: scale(.98); }
.btn:focus-visible { outline-offset: 3px; border-radius: 999px; }

/* ---------- top bar ---------- */
.top { position: fixed; inset: 0 0 auto 0; height: var(--top); z-index: 40; display: flex; align-items: center; gap: 32px; padding: 0 var(--pad); background: linear-gradient(180deg, rgba(3, 1, 8, .9), rgba(3, 1, 8, .72)); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid transparent; transition: border-color var(--slow); }
.top.scrolled { border-bottom-color: var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 22px; font-weight: 600; letter-spacing: -0.03em; }
.brand b { font-weight: 600; }
.mark { border-radius: 8px; box-shadow: 0 0 0 1px var(--line2); }
.top-nav { display: flex; gap: 28px; font-size: 16px; color: var(--t2); }
.top-nav a { transition: color var(--fast); }
.top-nav a:hover, .top-nav a.on { color: var(--t1); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.top-link { font-size: 16px; color: var(--t2); transition: color var(--fast); }
.top-link:hover { color: var(--t1); }

/* =====================================================================
   The studio system (SPEC-2 section 1): panels, keycaps, flags, scene numerals, the cursor label, Peek's bubble
   ===================================================================== */

/* The panel: one look for every part of the page. Dark glass over the sky, a soft border, corner 24, a 44 px title
   bar with its name on the left and small facts on the right. Nothing else decorates a panel. */
.panel { position: relative; background: var(--glass); border: 1px solid rgba(185, 160, 255, .15); border-radius: 24px; overflow: hidden; -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.panel-bar { height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 500; line-height: 1.2; color: var(--t2); white-space: nowrap; }
.panel-name { flex: none; color: var(--t1); }
.panel-facts { display: flex; align-items: center; justify-content: flex-end; gap: 14px; min-width: 0; font-size: 13px; font-weight: 400; overflow: hidden; }

/* keycaps: keyboard keys drawn as small keys */
.keycap { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 7px; background: var(--s3); box-shadow: 0 0 0 1px var(--line2) inset, 0 1px 0 rgba(185, 160, 255, .14); font: 600 13px/1 var(--text); color: var(--t1); }

/* the approval flag: a tiny violet flag, "you approve here" */
.flag { flex: none; width: 10px; height: 12px; overflow: visible; }
.flag path:first-child { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; }
.flag path:last-child { fill: var(--accent); }

/* scene numerals: the scene's number as a huge outline behind the scene head, top right. app.js moves it 6% slower
   than the page. It sits only where the head leaves the right side free, never behind text */
.scene { isolation: isolate; }
.scene-head { position: relative; }
.scene-num { position: absolute; right: -0.02em; bottom: -0.06em; z-index: -1; font-family: var(--display); font-weight: 600; font-size: min(26vw, 400px); line-height: .8; letter-spacing: -0.05em; color: transparent; -webkit-text-stroke: 1px rgba(185, 160, 255, .07); pointer-events: none; user-select: none; will-change: transform; }

/* the cursor label: with a mouse, a small pill rides 16 px right of and below the pointer over anything with data-cursor */
.cursor-tag { position: fixed; left: 0; top: 0; z-index: 99; pointer-events: none; padding: 6px 12px; border-radius: 999px; background: rgba(12, 7, 30, .94); border: 1px solid var(--line2); font: 500 13px/1.3 var(--text); color: var(--t1); white-space: nowrap; opacity: 0; transition: opacity 120ms linear; will-change: transform, opacity; }
.cursor-tag.on { opacity: 1; }

/* Peek's speech bubble: above him, a small tail pointing down at him. app.js places it and sets --tail */
.bubble { position: fixed; left: 0; top: 0; z-index: 46; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity 200ms linear, visibility 0s linear 200ms; will-change: transform, opacity; }
.bubble.on { opacity: 1; visibility: visible; transition: opacity 200ms linear; }
.bubble-in { display: flex; align-items: center; gap: 6px; position: relative; padding: 9px 14px; border-radius: 14px; background: #160D30; border: 1px solid var(--line2); font: 500 14px/1.4 var(--text); color: var(--t1); white-space: nowrap; transform: translateY(6px); transition: transform 360ms var(--ease); }
.bubble.on .bubble-in { transform: none; }
.bubble-in::after { content: ""; position: absolute; left: var(--tail, 50%); bottom: -5px; width: 9px; height: 9px; margin-left: -4.5px; background: #160D30; border-right: 1px solid var(--line2); border-bottom: 1px solid var(--line2); transform: rotate(45deg); }
.bubble .keycap { height: 22px; min-width: 22px; font-size: 13px; }

/* ---------- scenes ---------- */
.scene { position: relative; padding: 120px var(--pad) 96px; max-width: calc(var(--max) + var(--pad) * 2); margin: 0 auto; }
.scene-head { display: grid; gap: 20px; margin-bottom: 48px; }
.rv { opacity: 0; transform: translateY(20px); transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.rv.in { opacity: 1; transform: none; }

/* =====================================================================
   Scene 01: the hook. Left the words; right the desk (the monitor over the console); the film strip along the bottom
   ===================================================================== */

/* The hook is the first screen exactly: from under the top bar to the top of the timeline, with the strip at its foot. */
.hook { max-width: none; min-height: calc(100svh - var(--tl)); padding: calc(var(--top) + 24px) 0 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; }
/* The words line up with the top of the desk; the room left under them is Peek's, in front of the strip */
.hook-grid { width: 100%; max-width: calc(var(--max) + var(--pad) * 2); margin: 0 auto; padding: 0 var(--pad) 24px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; align-items: start; }
.hook-copy { display: grid; gap: 24px; justify-items: start; padding-top: 10px; }
.hook-copy .lead { max-width: 44ch; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

/* The desk: two panels stacked 12 px apart (the preview over your request). Its width follows the height that is left between the top bar and
   the strip, so the preview never pushes the strip off the first screen. --desk-chrome is everything that is not
   picture: the preview's title bar and foot row, the gap, the request panel. */
.desk { --desk-chrome: 232px; --hook-gaps: 48px; justify-self: end; width: min(100%, max(360px, calc((100svh - var(--tl) - var(--top) - var(--strip) - var(--hook-gaps) - var(--desk-chrome)) * 16 / 9))); display: grid; gap: 12px; }

/* --- the monitor --- */
.mon-state { display: inline-flex; align-items: center; gap: 6px; color: var(--t2); }
.mon-state i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); transition: background-color var(--fast); }
.mon-state.busy i { background: var(--accent); }
.mon-res { color: var(--t3); }
.mon-screen { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; isolation: isolate; container-type: inline-size; --sh: calc(100cqw * 9 / 16); }
.mon-v { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }

/* A wipe layer. Hidden, the outer box sits one width to the left and the inner box one width to the right, so
   nothing shows. Wiping, both slide to zero together: the picture stands still and is revealed left to right, and
   the violet line on the outer box's right edge rides the reveal. Transform only. */
.wl { position: absolute; inset: 0; z-index: 2; overflow: hidden; visibility: hidden; transform: translateX(-100%); }
.wl-in { position: absolute; inset: 0; transform: translateX(100%); }
.wl.wiping, .wl.shown { visibility: visible; transform: none; }
.wl.wiping .wl-in, .wl.shown .wl-in { transform: none; }
.wl.wiping, .wl.wiping .wl-in { transition: transform 1100ms var(--wipe); }
.wl.wiping { z-index: 3; }
.wl::after { content: ""; position: absolute; top: 0; bottom: 0; right: 0; width: 2px; background: var(--accent); opacity: 0; transition: opacity 200ms linear; }
.wl.wiping::after { opacity: 1; transition: none; }

/* viewfinder corners; they step back while the monitor shows a tool view (the split, the three frames) */
.hud { position: absolute; width: 14px; height: 14px; border: 1.5px solid rgba(255, 255, 255, .7); pointer-events: none; z-index: 4; transition: opacity var(--slow) var(--ease); }
.hud.h-tl { left: 14px; top: 14px; border-right: 0; border-bottom: 0; }
.hud.h-tr { right: 14px; top: 14px; border-left: 0; border-bottom: 0; }
.hud.h-bl { left: 14px; bottom: 14px; border-right: 0; border-top: 0; }
.hud.h-br { right: 14px; bottom: 14px; border-left: 0; border-top: 0; }
.mon-screen[data-mode="split"] .hud, .mon-screen[data-mode="blank"] .hud { opacity: 0; }
.mon-open { position: absolute; inset: 0; z-index: 5; border-radius: 0; }
.mon-open:focus-visible { outline-offset: -3px; border-radius: 0; }
.mon-open[hidden] { display: none; }
.mon-foot { display: grid; grid-template-columns: minmax(0, 1fr) min(120px, 16%); gap: 16px; align-items: center; height: 44px; padding: 0 14px; border-top: 1px solid var(--line); }
.mon-name { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
/* when there is not room for both, the maker line gives way first, then the title */
.mon-name b { flex: 0 1 auto; min-width: 0; font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mon-name a { flex: 0 100 auto; min-width: 0; font-size: 14px; color: var(--t3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color var(--fast); }
.mon-name a[href]:hover { color: var(--t1); }
.mon-prog { height: 2px; border-radius: 2px; background: var(--s3); overflow: hidden; }
.mon-prog i { display: block; height: 100%; width: 100%; background: var(--t1); transform-origin: 0 50%; transform: scaleX(0); }

/* --- the monitor answering "your video": the reference on the left, the style card writing itself on the right.
   Every word in the card is 13 px. On a small monitor (480 px wide and under: a 1280 x 720 laptop, phones) the card's
   last text row gives way, so the rest stays that size and fits --- */
.split { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; background: #07040F; font-size: 13px; line-height: 1.35; --sp: clamp(10px, 2.8cqw, 16px); }
.split-half { position: relative; min-width: 0; overflow: hidden; }
.split-half + .split-half { border-left: 1px solid var(--line2); }
/* the reference fills its half (cropped to cover); its name and its file sit over it on small dark pills */
.split-ref video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.split-pill { position: absolute; left: var(--sp); z-index: 2; max-width: calc(100% - 2 * var(--sp)); padding: 4px 9px; border-radius: 999px; background: rgba(7, 4, 18, .84); box-shadow: 0 0 0 1px var(--line2) inset; font-size: 13px; font-weight: 500; line-height: 1.2; color: var(--t1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.split-pill-top { top: var(--sp); color: var(--t2); }
.split-pill-foot { bottom: var(--sp); }
/* the card is a small pane: its name sits top left, on the line of the reference's pill */
.split-card { display: grid; align-content: center; padding: calc(var(--sp) + 30px) var(--sp) var(--sp); }
.split-label { position: absolute; top: calc(var(--sp) + 4px); left: var(--sp); color: var(--t2); font-size: 13px; font-weight: 500; line-height: 1.2; }
/* the reading line: it sweeps across the reference once, with a faint trail */
.split-sweep { position: absolute; inset: 0; z-index: 1; transform: translateX(-100%); background: linear-gradient(90deg, rgba(139, 92, 246, 0) 72%, rgba(139, 92, 246, .2)); opacity: 0; }
.split-sweep i { position: absolute; top: 0; bottom: 0; right: 0; width: 2px; background: var(--accent); }
.split-sweep.run { opacity: 1; transform: translateX(0); transition: transform 2600ms cubic-bezier(.45, 0, .55, 1), opacity 160ms linear; }
.split-sweep.done { opacity: 0; transform: translateX(0); transition: opacity 300ms linear; }
.sc { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(5px, 1.6cqw, 12px); }
.sc-row { display: grid; gap: 3px; opacity: 0; transform: translateY(6px); transition: opacity 260ms linear, transform 420ms var(--ease); }
.sc-row.in { opacity: 1; transform: none; }
.sc-k { color: var(--t3); font-size: 13px; line-height: 1.2; }
.sc-v { color: var(--t1); line-height: 1.35; }
.sc-sw { display: flex; gap: 5px; }
.sc-sw i { width: clamp(14px, 3.2cqw, 20px); aspect-ratio: 1; border-radius: 4px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .16) inset; transform: scale(0); transition: transform 380ms var(--ease-back); }
.sc-row.in .sc-sw i { transform: none; }
.sc-row.in .sc-sw i:nth-child(2) { transition-delay: 70ms; }
.sc-row.in .sc-sw i:nth-child(3) { transition-delay: 140ms; }
.sc-row.in .sc-sw i:nth-child(4) { transition-delay: 210ms; }
.sc-row.in .sc-sw i:nth-child(5) { transition-delay: 280ms; }
.sc-saved { display: flex; align-items: center; gap: 7px; justify-self: start; margin-top: 2px; padding: 5px 11px 5px 9px; border-radius: 999px; background: var(--s2); box-shadow: 0 0 0 1px var(--line2) inset; color: var(--t1); font-size: 13px; font-weight: 500; line-height: 1.2; white-space: nowrap; }
.sc-saved i { width: 9px; height: 5px; margin-top: -3px; border-left: 1.5px solid #7FE3A4; border-bottom: 1.5px solid #7FE3A4; transform: rotate(-45deg); }
/* the monitor's own width decides (it is the container): 480 px and under, the spare row gives way */
@container (max-width: 480px) {
  .sc-spare { display: none; }
}
/* a phone's monitor: a little less room round the edges, so both pills keep their words whole */
@container (max-width: 400px) {
  .split { --sp: 8px; }
  .sc-saved { gap: 6px; padding: 5px 8px 5px 6px; }
}

/* --- the monitor answering "blank page": three tall frames fill one after another, then the pick lands on B --- */
.blank { position: absolute; inset: 0; display: flex; justify-content: center; align-items: center; gap: var(--bf-gap); background: #07040F;
  --bf-gap: clamp(10px, 3.4cqw, 26px);
  --bfw: min(calc((100cqw - 48px - 2 * var(--bf-gap)) / 3), calc((var(--sh) - 64px) * 9 / 16));
  --bfh: calc(var(--bfw) * 16 / 9); }
.bf { position: relative; display: grid; justify-items: center; gap: 12px; }
.bf-frame { position: relative; width: var(--bfw); height: var(--bfh); border-radius: 8px; overflow: hidden; border: 1px dashed rgba(185, 160, 255, .28); container-type: inline-size; transition: border-color 300ms linear; }
.bf.on .bf-frame { border-color: transparent; }
.bf-ground { position: absolute; inset: -1px; transform: scaleY(0); transform-origin: 50% 100%; transition: transform 640ms var(--ease); }
.bf-shape { position: absolute; opacity: 0; transform: scale(.6); transition: opacity 300ms linear 200ms, transform 520ms var(--ease-back) 200ms; }
.bf-aa { position: absolute; left: 0; right: 0; text-align: center; font-size: 36cqw; line-height: 1; opacity: 0; transform: translateY(10px); transition: opacity 300ms linear 380ms, transform 480ms var(--ease) 380ms; }
.bf.on .bf-ground { transform: none; }
.bf.on .bf-shape { opacity: 1; transform: none; }
.bf.on .bf-aa { opacity: 1; transform: none; }
.bf-tag { font-size: 13px; font-weight: 600; line-height: 1; color: var(--t2); }
/* A: paper, a brown line circle, Fraunces */
.bf-a .bf-ground { background: #F3E9D8; }
.bf-a .bf-shape { left: 17%; top: 16%; width: 66%; aspect-ratio: 1; border-radius: 50%; border: 2px solid #5B3A21; }
.bf-a .bf-aa { bottom: 13%; font-family: "Fraunces", Georgia, serif; font-weight: 600; color: #5B3A21; letter-spacing: -0.02em; }
/* B: near-black, a low orange glow, the display face at 700 in white */
.bf-b .bf-ground { background: #1A0F0A; }
.bf-b .bf-shape { left: -30%; right: -30%; bottom: -34%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, #FF8A2A, rgba(255, 138, 42, .55) 42%, rgba(255, 138, 42, 0)); }
.bf-b .bf-aa { top: 14%; font-family: var(--display); font-weight: 700; color: #fff; letter-spacing: -0.04em; }
/* C: peach, a cut-paper coral circle with a small soft shadow, the display face at 600 */
.bf-c .bf-ground { background: #FFD9C7; }
.bf-c .bf-shape { left: 20%; top: 18%; width: 60%; aspect-ratio: 1; border-radius: 50%; background: #FF7A59; box-shadow: 0 3px 0 rgba(122, 46, 29, .16), 0 8px 14px rgba(122, 46, 29, .2); }
.bf-c .bf-aa { bottom: 13%; font-family: var(--display); font-weight: 600; color: #7A2E1D; letter-spacing: -0.03em; }
/* the pick: a violet outline lands on B, and a small label */
.bf::before { content: ""; position: absolute; left: -5px; right: -5px; top: -5px; height: calc(var(--bfh) + 10px); border: 2px solid var(--accent); border-radius: 12px; opacity: 0; transform: scale(1.08); transition: opacity 200ms linear, transform 420ms var(--ease); pointer-events: none; }
.bf.picked::before { opacity: 1; transform: none; }
.bf-pick { position: absolute; left: 50%; top: -13px; transform: translate(-50%, 4px); padding: 3px 9px; border-radius: 999px; background: var(--s3); box-shadow: 0 0 0 1px var(--line2) inset; font-size: 13px; font-weight: 500; line-height: 1.2; color: var(--t1); white-space: nowrap; opacity: 0; transition: opacity 200ms linear 160ms, transform 360ms var(--ease) 160ms; }
.bf.picked .bf-pick { opacity: 1; transform: translate(-50%, 0); }

/* phones: a 4:3 screen, so the split and the three frames stay readable at 350 px wide. A wide clip is shown
   whole, with black bars, as a real monitor does */
@media (max-width: 720px) {
  .mon-screen { aspect-ratio: 4 / 3; --sh: calc(100cqw * 3 / 4); }
  .hud { width: 10px; height: 10px; }
  .hud.h-tl { left: 10px; top: 10px; }
  .hud.h-tr { right: 10px; top: 10px; }
  .hud.h-bl { left: 10px; bottom: 10px; }
  .hud.h-br { right: 10px; bottom: 10px; }
}

/* --- your request (the ask, and the three ways to start) --- */
.console .panel-bar { padding-right: 8px; }
.src-tabs { display: flex; align-self: stretch; gap: 2px; }
.src-tab { position: relative; height: 100%; padding: 0 9px; font-size: 14px; font-weight: 500; color: var(--t3); transition: color var(--fast); }
.src-tab:hover { color: var(--t1); }
.src-tab[aria-pressed="true"] { color: var(--accent-soft); }
.src-tab::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; border-radius: 1px; background: var(--accent); transform: scaleX(0); transition: transform 260ms var(--ease); }
.src-tab[aria-pressed="true"]::after { transform: none; }
.src-tab:focus-visible { outline-offset: -4px; }
.ask { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; min-height: calc(2 * 1.6em + 28px); padding: 14px 18px; font-size: 15px; line-height: 1.6; }
.ask-who { color: var(--accent-soft); font-weight: 600; }
.ask-text { margin: 0; color: var(--t1); overflow-wrap: anywhere; }
.ask-text em { font-style: normal; color: var(--t3); }
.ask.typing .caret.sm { animation: none; opacity: 1; }    /* the caret stays solid while the ask is being typed */
.ask-file { display: inline-flex; align-items: center; gap: 6px; height: 22px; margin-right: 8px; padding: 0 9px 0 3px; border-radius: 999px; background: var(--s3); box-shadow: 0 0 0 1px var(--line2) inset; font-size: 13px; line-height: 1; color: var(--t2); vertical-align: 1px; }
.ask-file[hidden] { display: none; }
.ask-file img { width: 22px; height: 14px; border-radius: 3px; object-fit: cover; }
.ask-file.pop { animation: pop 360ms var(--ease-back) both; }
@keyframes pop { from { opacity: 0; transform: scale(.7); } }

/* --- the film strip: every poster as a frame of film, sprocket holes above and below. It drifts left (app.js) --- */
.strip { position: relative; height: var(--strip); background: rgba(5, 3, 14, .86); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid var(--line); overflow: hidden; outline: none; }
.strip-track { position: absolute; left: 0; top: 0; bottom: 0; display: flex; will-change: transform; }
.strip-copy { display: contents; }     /* the second copy of the frames, only there for the endless loop */
.strip-f { flex: none; position: relative; width: 154px; height: 100%; padding: 18px 2px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='18'%3E%3Crect x='6' y='6' width='10' height='7' rx='2' fill='%231E1440'/%3E%3C/svg%3E") 0 0 / 22px 18px repeat-x,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='18'%3E%3Crect x='6' y='5' width='10' height='7' rx='2' fill='%231E1440'/%3E%3C/svg%3E") 0 100% / 22px 18px repeat-x; }
.strip-f img { width: 150px; height: 84px; border-radius: 3px; object-fit: cover; background: var(--s2); opacity: .5; transition: opacity var(--fast) linear; }
.strip-f:hover img, .strip-f:focus-visible img { opacity: 1; }
.strip-f:focus-visible { outline: none; }
.strip-f:focus-visible img { outline: 2px solid var(--accent); outline-offset: 2px; }
/* reduced motion: no drift; the strip scrolls sideways by hand instead */
.strip.still { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: var(--s3) transparent; }
.strip.still .strip-track { position: relative; height: 100%; }

/* =====================================================================
   Scene 02: three ways in. Markup and base layout only; js/ways.js and css/ways.css bring it to life.
   The section is tall and its content is pinned, like scene 04.
   ===================================================================== */
.scene.ways { height: 560vh; padding-top: 0; padding-bottom: 0; }   /* .scene.ways: the phone padding of .scene must not apply */
.ways-pin { position: sticky; top: var(--top); height: calc(100svh - var(--top) - var(--tl)); display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: 22px; padding: 28px 0 24px; }
.ways-head { display: grid; gap: 12px; }
.ways-head h2.display { font-size: clamp(30px, 3.4vw, 52px); max-width: none; }
.ways-head .slate { justify-self: start; }

/* the source switch: three large buttons in a row. The selected one carries violet (its number); the thin line
   under each fills as its chapter is scrubbed (ways.js sets the scale of .ways-bar i) */
.ways-switch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ways-src { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; row-gap: 2px; align-items: baseline; padding: 14px 20px 20px; text-align: left; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); transition: background-color var(--fast), border-color var(--fast); }
.ways-src:hover { background: rgba(28, 16, 57, .72); }
/* the number of each way, 1, 2, 3, in the display face */
.ways-num { grid-row: 1 / span 2; align-self: center; min-width: 1.4em; font-family: var(--display); font-weight: 600; font-size: 24px; line-height: 1; letter-spacing: -0.02em; color: var(--t3); transition: color var(--fast); }
.ways-name { font-weight: 600; font-size: 17px; line-height: 1.3; color: var(--t2); transition: color var(--fast); }
.ways-line { font-size: 14px; line-height: 1.35; color: var(--t3); }
.ways-bar { position: absolute; left: 18px; right: 18px; bottom: 9px; height: 2px; border-radius: 2px; background: var(--s3); overflow: hidden; }
.ways-bar i { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
.ways-src.on { background: rgba(28, 16, 57, .78); border-color: var(--line2); }
.ways-src.on .ways-num { color: var(--accent-soft); }
.ways-src.on .ways-name { color: var(--t1); }
.ways-src:focus-visible { outline-offset: 2px; border-radius: 18px; }

/* below: the chapter's text on the left (about 36%), the stage on the right */
.ways-body { display: grid; grid-template-columns: minmax(0, 36fr) minmax(0, 64fr); gap: 40px; min-height: 0; }
.ways-text { display: grid; align-content: center; min-height: 0; }
/* the three chapters share one place; the current one has .on */
.ways-ch { grid-area: 1 / 1; display: grid; gap: 14px; align-content: center; opacity: 0; visibility: hidden; }
.ways-ch.on { opacity: 1; visibility: visible; }
.ways-title { margin: 0; font-family: var(--display); font-weight: 600; font-size: 28px; letter-spacing: -0.02em; line-height: 1.12; }
.ways-ch p { margin: 0; color: var(--t2); font-size: 17px; line-height: 1.5; max-width: 40ch; }
.ways-facts { margin: 6px 0 0; display: grid; border-top: 1px solid var(--line); }
.ways-facts div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.4; }
.ways-facts dt { flex: none; color: var(--t3); }
.ways-facts dd { margin: 0; color: var(--t1); text-align: right; }
/* the stage keeps 16:9 and the largest size the box allows, both ways; when the height limits it, it sits in the
   middle of its column */
.ways-stage-box { min-height: 0; container-type: size; display: grid; place-items: center; }
.ways-stage { width: min(100cqw, calc((100cqh - 46px) * 16 / 9)); }
.ways-stage canvas { width: 100%; height: auto; aspect-ratio: 16 / 9; background: #07040F; }

/* =====================================================================
   Scene 03: the style library. Its panel, tool row and styles are in css/bin.css; the chip stays here, it is a
   general part
   ===================================================================== */
.chip { height: 34px; padding: 0 14px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--t2); box-shadow: 0 0 0 1px var(--line) inset; transition: background-color var(--fast), color var(--fast), box-shadow var(--fast); }
.chip:hover { color: var(--t1); background: rgba(185, 160, 255, .1); }
.chip.on { color: var(--t1); background: rgba(139, 92, 246, .24); box-shadow: 0 0 0 1px rgba(185, 160, 255, .34) inset; }

/* =====================================================================
   Scene 04: how it works (the scroll makes a small video, step by step). The chat and the canvas are panels
   ===================================================================== */
.scene.how { height: 560vh; padding-top: 0; padding-bottom: 0; }
/* 42 / 58 (version 1 was 40 / 60): the step list, now with its approval flags, stays on one line down to 1366 px */
.how-pin { position: sticky; top: var(--top); height: calc(100svh - var(--top) - var(--tl)); display: grid; grid-template-columns: minmax(0, 42fr) minmax(0, 58fr); gap: 48px; align-items: center; padding: 24px 0; }
.how-left { display: grid; gap: 18px; align-content: center; }
.how-left h2.display { font-size: clamp(30px, 3.4vw, 52px); }
.steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; flex-wrap: wrap; }
.steps li { display: flex; gap: 5px; align-items: baseline; height: 34px; padding: 6px 10px; border-radius: 999px; font-size: 14px; color: var(--t3); transition: color var(--fast), background-color var(--fast); }
.steps li b { font-weight: 600; font-size: 13px; }
.steps li .flag { align-self: center; margin-left: 1px; }
.steps li.done { color: var(--t2); }
.steps li.on { color: var(--t1); background: rgba(139, 92, 246, .24); }
.approve { margin: -4px 0 0; display: grid; gap: 2px; font-size: 15px; line-height: 1.45; color: var(--t1); max-width: 48ch; }
.approve span { color: var(--t3); }
.term-body { height: 232px; padding: 14px 18px; font-size: 14px; line-height: 1.6; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; }
.term-body p { margin: 0; display: grid; grid-template-columns: 56px 1fr; gap: 10px; color: var(--t2); }
.term-body p b { font-weight: 600; color: var(--t3); }
.term-body p.you b { color: var(--accent-soft); }
.term-body p.you span { color: var(--t1); }
.term-body p.ok span { color: #7FE3A4; }
.term-body p span { white-space: pre-wrap; overflow-wrap: anywhere; }   /* the hook list lines keep their double spaces */
.stage-screen { position: relative; background: #000; }
.stage-screen canvas { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.how-note { margin: 14px 2px 0; font-size: 16px; color: var(--t2); min-height: 24px; }

/* =====================================================================
   Scene 05: what you get. The timeline panel is at the end of this file, under "phase 2b"
   ===================================================================== */

/* =====================================================================
   Scene 06: plans. Two panels, in the owner's words: $10 a month, or $50 once. Both have every way in; they
   differ in the styles that come later. The same panels are used on the account page (signed in, no plan yet)
   ===================================================================== */
.plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; max-width: 920px; }
.plan-grid.one { grid-template-columns: minmax(0, 1fr); max-width: 480px; }
/* each panel is a column, so the spec rows and the buttons of the two panels line up */
.plan { display: flex; flex-direction: column; }
.plan.main { background: radial-gradient(60% 30% at 24% 0%, rgba(150, 110, 255, .30) 0%, transparent 72%), linear-gradient(180deg, rgba(74, 31, 201, .55) 0%, rgba(40, 14, 110, .40) 32%, rgba(9, 5, 24, .90) 66%); border-color: rgba(170, 140, 255, .34); }
.plan.main .panel-bar { border-bottom-color: var(--line2); }
.plan-body { flex: 1; display: flex; flex-direction: column; gap: 20px; padding: 24px 24px 28px; }
/* the price is the start of the owner's sentence: "$10 a month:" big, the rest of the sentence under it */
.plan-price { margin: 0; font-family: var(--display); font-weight: 500; font-size: 22px; letter-spacing: -0.02em; line-height: 1; color: var(--t2); }
.plan-price b { font-weight: 600; font-size: 56px; letter-spacing: -0.04em; color: var(--t1); margin-right: 2px; }
.plan-what { flex: 1; margin: -6px 0 0; color: var(--t2); font-size: 17px; max-width: 44ch; }
.plan-note { margin: 24px 2px 0; max-width: 64ch; color: var(--t2); font-size: 17px; }
.spec { margin: 0; display: grid; border-top: 1px solid var(--line); }
.spec div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.4; }
.spec dt { color: var(--t3); }
.spec dd { margin: 0; color: var(--t1); text-align: right; }
.plan .btn { align-self: flex-start; margin-top: 4px; }

/* =====================================================================
   Scene 07: credits
   ===================================================================== */
.roll { position: relative; height: 420px; overflow: hidden; border-radius: 24px; background: var(--glass); box-shadow: 0 0 0 1px rgba(185, 160, 255, .15) inset; mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent); }
.roll-in { position: absolute; left: 0; right: 0; top: 0; padding: 40px 0; display: grid; gap: 14px; will-change: transform; }
.roll-in a { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: baseline; padding: 0 24px; }
.roll-in a span { text-align: right; color: var(--t2); font-size: 15px; }
.roll-in a b { font-family: var(--display); font-weight: 500; font-size: 22px; letter-spacing: -0.02em; transition: color var(--fast); }
.roll-in a:hover b { color: var(--accent-soft); }
.takedown { margin: 20px 2px 0; color: var(--t2); font-size: 15px; }
.takedown a { color: var(--t2); text-decoration: underline; text-underline-offset: 3px; }
.faq { margin-top: 96px; max-width: 760px; display: grid; gap: 0; }
.faq h3 { margin-bottom: 16px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 0; font-size: 17px; font-weight: 500; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--t3); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 20px; color: var(--t2); max-width: 60ch; }
.last { margin-top: 120px; display: grid; gap: 28px; justify-items: start; }
.last h2.display { max-width: 12ch; }
.foot { margin-top: 120px; }
.foot-row { display: flex; gap: 24px; flex-wrap: wrap; font-size: 15px; color: var(--t2); padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.foot-row a:hover { color: var(--t1); }
.foot-row span { margin-left: auto; color: var(--t2); }
.wordmark { font-family: var(--display); font-weight: 600; font-size: clamp(120px, 27vw, 420px); letter-spacing: -0.06em; line-height: .78; color: rgba(139, 92, 246, .12); margin: 32px 0 -0.12em -0.03em; user-select: none; overflow: hidden; height: .62em; }

/* =====================================================================
   The page timeline: a ruler (a tick every 5 s of the 2 minute page) over one block per section
   ===================================================================== */
.tl { position: fixed; inset: auto 0 0 0; height: var(--tl); z-index: 50; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 20px; align-items: center; padding: 0 var(--pad); background: rgba(5, 3, 14, .9); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid var(--line2); }
.tl-play { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; box-shadow: 0 0 0 1px var(--line2) inset; transition: background-color var(--fast); }
.tl-play:hover { background: rgba(185, 160, 255, .12); }
.tl-play:focus-visible { border-radius: 50%; }
.tl-play:disabled { cursor: default; opacity: .5; }
.tl-play svg { width: 18px; height: 18px; fill: var(--t1); grid-area: 1 / 1; }
.tl-play .ic-pause { display: none; }
.tl-play[aria-pressed="true"] .ic-play { display: none; }
.tl-play[aria-pressed="true"] .ic-pause { display: block; }
.tl-track { position: relative; height: 50px; display: grid; grid-template-rows: 16px 30px; row-gap: 4px; }
.tl-ruler { position: relative; }
.tl-ruler i { position: absolute; bottom: 0; width: 1px; height: 4px; background: var(--t3); opacity: .7; }
.tl-ruler i.major { height: 8px; opacity: 1; }
.tl-scenes { position: relative; display: flex; gap: 3px; min-width: 0; }
.tl-scene { position: relative; height: 100%; border-radius: 6px; background: var(--s3); overflow: hidden; text-align: left; padding: 0 12px; font-size: 13px; font-weight: 500; color: var(--t3); white-space: nowrap; transition: background-color var(--fast), color var(--fast); min-width: 0; }
.tl-scene:hover { background: #2A1A55; color: var(--t1); }
.tl-scene.on { color: var(--t1); background: #36226E; }
.tl-scene.past { color: var(--t2); }
.tl-scene span { display: block; overflow: hidden; text-overflow: ellipsis; }
.tl-scene.short { padding: 0; text-align: center; }   /* narrower than 84 px: only its number (timeline.js sets .short) */
.tl-scene.short span { text-overflow: clip; }
.tl-head { position: absolute; top: -2px; bottom: -6px; left: 0; width: 2px; background: var(--accent); z-index: 2; pointer-events: none; will-change: transform; }
.tl-head::before { content: ""; position: absolute; left: -5px; top: -1px; border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 8px solid var(--accent); }
.tl-time { display: grid; justify-items: end; line-height: 1.25; }
.tl-time b { font-weight: 600; font-size: 16px; font-variant-numeric: tabular-nums; }
.tl-time span { font-size: 13px; color: var(--t3); font-variant-numeric: tabular-nums; }
.tl-keys { display: flex; gap: 14px; font-size: 13px; color: var(--t3); white-space: nowrap; }
.tl-keys > span { display: inline-flex; align-items: center; gap: 6px; }
.tl-keys > span .keycap + .keycap { margin-left: -3px; }

/* ---------- Peek ---------- */
.peek-rig { position: fixed; left: 0; bottom: var(--tl); width: 300px; z-index: 45; pointer-events: none; transform-origin: 50% 100%; will-change: transform; }
.peek { width: 100%; aspect-ratio: 400 / 320; }
.peek svg { width: 100%; height: 100%; overflow: visible; }
.pk-lid { transition: transform 90ms linear; }
.peek.pk-blink .pk-lid { transform: translateY(124px); }
.peek[data-mood="sleepy"] .pk-lid { transform: translateY(60px); transition-duration: 600ms; }
.pk-mouth { opacity: 0; transition: opacity 160ms; }
.peek[data-mood="happy"] .pk-mouth { opacity: 1; }
.pk-eye { transform-box: fill-box; transform-origin: center; transition: transform 200ms var(--ease); }
.peek[data-mood="wow"] .pk-eye { transform: scale(1.08); }
.pk-body { transform-box: fill-box; transform-origin: 50% 100%; }
.peek.pk-hop .pk-body { animation: hop 520ms var(--ease); }
@keyframes hop { 0% { transform: none; } 22% { transform: scale(1.06, .9); } 55% { transform: translateY(-9%) scale(.95, 1.08); } 100% { transform: none; } }
/* the happy face: the open eye fades out and a dark arc fades in, like ^ ^. The blush gets a little stronger */
.pk-open { transition: opacity 160ms; }
.peek[data-mood="happy"] .pk-open { opacity: 0; }
.pk-arc { opacity: 0; transition: opacity 160ms; }
.peek[data-mood="happy"] .pk-arc { opacity: 1; }
.pk-blush { transition: opacity 160ms; }
.peek[data-mood="happy"] .pk-blush { opacity: .8; }

/* ---------- the viewer and the inspector (the opened style): css/bin.css ---------- */
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(.985); } }

.toast { position: fixed; left: 50%; bottom: calc(var(--tl) + 24px); transform: translate(-50%, 16px); z-index: 90; padding: 11px 20px; border-radius: 999px; background: var(--t1); color: #170C33; font-size: 15px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity var(--fast), transform var(--fast); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- boot ---------- */
/* the opening screen: the dark sky with the violet glow low in the middle. The glow fades out before the right edge,
   so it meets the empty scroll-bar strip (the scroll bar is hidden while it shows) without a step */
.boot { position: fixed; inset: 0; z-index: 100; background: radial-gradient(75% 70% at 50% 112%, rgba(104, 44, 232, .62), rgba(34, 10, 92, .32) 45%, transparent 76%), var(--bg); display: grid; place-items: center; transition: transform 700ms cubic-bezier(.7, 0, .2, 1); }
.boot.out { transform: translateY(-100%); }
.boot-in { width: min(320px, 70vw); display: grid; grid-template-columns: 1fr auto; gap: 14px 16px; font-size: 16px; font-weight: 500; color: var(--t1); }
.boot-count { color: var(--t2); font-variant-numeric: tabular-nums; }
.boot-count b { font-weight: 500; }
.boot-bar { grid-column: 1 / -1; height: 4px; background: var(--s3); border-radius: 4px; overflow: hidden; }
.boot-bar i { display: block; height: 100%; width: 0; border-radius: 4px; background: linear-gradient(90deg, var(--accent-bottom), var(--accent-top)); }

/* =====================================================================
   Short desktop screens and narrow screens
   ===================================================================== */

/* Short desktop screens (under 820 px high): tighter gaps and a slimmer film strip (frames 64 px high instead of
   84), so the monitor keeps a useful size and the whole hook, strip included, fits above the timeline */
@media (min-width: 1101px) and (max-height: 819px) {
  :root { --strip: 96px; }
  .hook { padding-top: calc(var(--top) + 16px); }
  .hook-grid { padding-bottom: 16px; }
  .desk { --hook-gaps: 32px; }
  .hook-copy { gap: 16px; padding-top: 6px; }
  .hook-copy .lead { font-size: 17px; }
  .strip-f { width: 118px; padding: 16px 2px; background-size: 19.667px 16px, 19.667px 16px; }
  .strip-f img { width: 114px; height: 64px; }
}

/* the keycap hints mean nothing on a touch screen */
@media (pointer: coarse) {
  .tl-keys { display: none; }
  .tl { grid-template-columns: auto minmax(0, 1fr) auto; }
}

@media (max-width: 1100px) {
  /* the hook is one column: slate, headline, lead, the desk (monitor, console), the buttons, then the strip.
     .hook-copy steps out of the way (display: contents) so its pieces and the desk are items of one flex column */
  .hook { padding-top: calc(var(--top) + 32px); }
  .hook-grid { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; padding-bottom: 40px; }
  .hook-copy { display: contents; }
  .hook-copy > h1 { order: 2; }
  .hook-copy > .lead { order: 3; }
  .hook-grid > .desk { order: 4; align-self: stretch; width: auto; }
  .hook-copy > .actions { order: 5; }

  /* scene 02 keeps its two columns on tablets (the stage is bigger that way); only phones stack it */
  .ways-pin { gap: 18px; padding: 22px 0 18px; }
  .ways-body { gap: 28px; }
  .ways-title { font-size: 24px; }
  .ways-ch p { font-size: 15px; }

  .how-pin { grid-template-columns: 1fr; gap: 16px; align-content: center; }
  .how-left { order: 2; gap: 12px; }
  .how-left h2.display, .how-left .slate { display: none; }
  .term-body { height: 150px; }
  /* when the terminal is short, the line cut by its top edge fades instead of being sliced */
  .term-body { -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 26px); mask-image: linear-gradient(180deg, transparent 0, #000 26px); }
}

@media (max-width: 720px) {
  :root { --pad: 20px; --tl: 56px; }
  .top-nav, .top-link { display: none; }
  .scene { padding-top: 88px; padding-bottom: 72px; }
  .lead { font-size: 17px; }

  /* phones: slate, headline, lead, buttons, monitor, console, strip. The two buttons share one row in equal halves */
  .hook { padding-top: calc(var(--top) + 24px); }
  .hook-grid { padding-bottom: 32px; }
  .hook-copy > .actions { order: 4; flex-wrap: nowrap; width: 100%; }
  .hook-copy > .actions .btn { flex: 1 1 0; min-width: 0; padding: 0 12px; }
  .hook-grid > .desk { order: 5; }
  .mon-res { display: none; }
  /* the title and the maker each get their own line, so the credit is never cut; the progress line steps out */
  .mon-foot { height: auto; min-height: 58px; padding: 10px 14px; grid-template-columns: minmax(0, 1fr); }
  .mon-prog { display: none; }
  .mon-name { flex-direction: column; align-items: flex-start; gap: 2px; }
  .mon-name b, .mon-name a { max-width: 100%; }
  .ask { min-height: calc(3 * 1.6em + 28px); font-size: 14px; }
  .src-tab { padding: 0 6px; font-size: 13px; }
  .src-tab::after { left: 6px; right: 6px; }

  /* scene numerals sit in the top padding on phones, above the slate, where there is no text */
  .scene-num { bottom: auto; top: -0.94em; right: 0; font-size: 26vw; }

  /* phones: the stage at full width under the switch, the chapter's text under it, centred in the room left */
  .ways-pin { gap: 12px; padding: 14px 0 12px; }
  .ways-body { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); gap: 12px; }
  .ways-stage-box { order: -1; container-type: normal; display: block; }
  .ways-stage { width: 100%; }
  .ways-text { align-content: center; }
  .ways-ch { align-content: start; }
  .ways-ch p { max-width: none; }
  .ways-head .slate { display: none; }
  .ways-head h2.display { font-size: 26px; letter-spacing: -0.03em; }
  .ways-switch { gap: 6px; }
  .ways-src { grid-template-columns: 1fr; row-gap: 2px; padding: 9px 10px 14px; }
  .ways-num { grid-row: auto; font-size: 20px; }
  .ways-name { font-size: 14px; }
  .ways-line { display: none; }
  .ways-bar { left: 10px; right: 10px; bottom: 7px; }
  .ways-title { font-size: 20px; }
  .ways-ch { gap: 8px; }
  .ways-ch p { font-size: 15px; }
  .ways-facts { margin-top: 2px; }
  .ways-facts div { padding: 6px 0; font-size: 13px; }
  .ways-num { min-width: 0; }

  .plan-grid { grid-template-columns: 1fr; }
  .spec div { font-size: 14px; }
  .tl { gap: 12px; grid-template-columns: auto minmax(0, 1fr); }
  .tl-time, .tl-keys, .tl-ruler { display: none; }
  .tl-track { height: 36px; display: block; }
  .tl-scenes { position: absolute; inset: 6px 0; }
  .tl-head { top: -8px; bottom: -8px; }
  .peek-rig { width: 190px; }
  .roll-in a { grid-template-columns: 1fr; gap: 0; }
  .roll-in a span { text-align: left; }
  .steps li span { display: none; }
  .steps li.on span { display: inline; }
  /* on phones the stage's corner marks are smaller and closer in, so they stay clear of the film's headline and pills */
  .stage-screen .hud { width: 8px; height: 8px; }
  .stage-screen .hud.h-tl { left: 6px; top: 6px; }
  .stage-screen .hud.h-tr { right: 6px; top: 6px; }
  .stage-screen .hud.h-bl { left: 6px; bottom: 6px; }
  .stage-screen .hud.h-br { right: 6px; bottom: 6px; }
  /* room for two lines, so the film does not shift when the note changes length */
  .how-note { min-height: 48px; }
  .approve { font-size: 14px; }
}

/* short phones: the three facts of scene 02 give way, so the two sentences stay whole */
@media (max-width: 720px) and (max-height: 760px) {
  .ways-facts { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  .caret { animation: none; }
  .boot { display: none; }
  .wl.wiping, .wl.wiping .wl-in, .wl::after { transition: none; }
  .sc-row, .sc-sw i, .bf-ground, .bf-shape, .bf-aa, .bf::before, .bf-pick, .split-sweep, .src-tab::after, .ask-file.pop { transition: none; animation: none; }
  .bubble-in { transform: none; transition: none; }
  .scene-num { will-change: auto; }
}

/* phase 2b */
/* =====================================================================
   Scene 05: what you get, as a timeline panel. A ruler on top, six tracks, one playhead moved by the scroll.
   app.js lights what the playhead has passed (.lit), names the tracks it has reached (.on) and runs the timecode.
   (The bin and the inspector are in css/bin.css.)
   ===================================================================== */
.deck-tc { color: var(--t1); font-variant-numeric: tabular-nums; }
.deck-body { position: relative; display: grid; }
.track { display: grid; grid-template-columns: 120px minmax(0, 1fr) minmax(0, 380px); gap: 24px; align-items: center; padding: 18px 24px; border-top: 1px solid var(--line); }
.track-name { font-size: 14px; font-weight: 500; color: var(--t3); transition: color 300ms linear; }
.track.on .track-name { color: var(--t1); }
.track-copy { display: grid; gap: 4px; }
.track-copy b { font-weight: 600; font-size: 18px; letter-spacing: -0.01em; }
.track-copy span { color: var(--t2); font-size: 16px; }

/* the ruler: a tick every second of the 20 s film, a time every 5 s */
.deck-ruler-row { border-top: 0; padding-top: 12px; padding-bottom: 4px; }
.deck-ruler { position: relative; height: 22px; }
.deck-ruler i { position: absolute; bottom: 0; width: 1px; height: 4px; background: var(--t3); opacity: .55; }
.deck-ruler i.major { height: 8px; opacity: 1; }
.deck-ruler span { position: absolute; top: 0; font: 13px/1 var(--text); color: var(--t3); font-variant-numeric: tabular-nums; transform: translateX(-50%); }
.deck-ruler span:first-of-type { transform: none; }
.deck-ruler span:last-of-type { transform: translateX(-100%); }

/* the playhead: from the ruler to the last track, with the same head as the page timeline */
.deck-head { position: absolute; top: 8px; bottom: 0; left: 0; width: 2px; margin-left: -1px; background: var(--accent); z-index: 2; pointer-events: none; will-change: transform; }
.deck-head::before { content: ""; position: absolute; left: -5px; top: -1px; border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 8px solid var(--accent); }

.lane { position: relative; height: 44px; }
.lane i { position: absolute; top: 0; bottom: 0; left: calc(var(--x) * 1%); width: calc(var(--w) * 1%); border-radius: 8px; background: var(--s3); box-shadow: 0 0 0 1px var(--line) inset; transition: background-color 300ms linear; }
.lane i.lit { background: #2D1D5C; }
.lane.dots i { top: 16px; bottom: 16px; border-radius: 6px; }
.lane.thin i { top: 12px; bottom: 12px; border-radius: 6px; }
.lane u { position: absolute; top: 50%; left: calc(var(--x) * 1%); width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 2px; transform: rotate(45deg); background: var(--t3); transition: background-color 300ms linear; text-decoration: none; }
.lane u.lit { background: var(--t1); }
.lane.marks u { border-radius: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; transform: none; }

/* picture: each clip is a real poster repeated along it, like the thumbnails on a clip in an editor. It is held at
   35% brightness (a black layer at 65%) until the playhead passes its start */
.lane.pics i { overflow: hidden; background-color: var(--s2); background-repeat: repeat-x; background-size: auto 100%; }
.lane.pics i::after { content: ""; position: absolute; inset: 0; background: #000; opacity: .65; transition: opacity 420ms var(--ease); }
.lane.pics i.lit::after { opacity: 0; }

/* voice: real waveforms (app.js draws the bars). A white copy is revealed left to right as the playhead passes */
.lane.wave i { overflow: hidden; background: var(--s2); }
.lane.wave i.lit { background: #1D1240; }
.wv { position: absolute; inset: 0; width: 100%; height: 100%; }
.wv path { fill: none; stroke: #4A3D73; stroke-width: 2; stroke-linecap: round; }
.wv-lit { position: absolute; inset: 0; overflow: hidden; transform: translateX(-100%); }
.wv-lit > span { position: absolute; inset: 0; transform: translateX(100%); }
.wv-lit .wv path { stroke: var(--t1); }

/* you: a flag at each of the four stops, its name under it. Grey until the playhead reaches it, then violet */
.lane.flags u { top: 6px; width: auto; height: auto; margin: 0; border-radius: 0; background: none; transform: translateX(-50%); display: grid; justify-items: center; gap: 5px; font: 500 13px/1 var(--text); color: var(--t3); white-space: nowrap; transition: color 300ms linear; }
.lane.flags u .flag { width: 12px; height: 14px; }
.lane.flags u .flag path:first-child { stroke: var(--t3); transition: stroke 300ms linear; }
.lane.flags u .flag path:last-child { fill: var(--t3); transition: fill 300ms linear; }
.lane.flags u.lit { color: var(--t1); }
.lane.flags u.lit .flag path:first-child { stroke: var(--accent); }
.lane.flags u.lit .flag path:last-child { fill: var(--accent); }

@media (max-width: 1100px) {
  .track { grid-template-columns: 88px minmax(0, 1fr); }
  .deck { background: var(--s1); }
  .track-copy { grid-column: 1 / -1; position: relative; z-index: 3; background: var(--s1); }   /* the playhead does not run through the words */
}
@media (max-width: 720px) {
  .track { gap: 14px 16px; padding: 16px; }
  .deck-ruler-row { padding-top: 10px; padding-bottom: 2px; }
  .track-copy b { font-size: 17px; }
  .track-copy span { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .lane i, .lane u, .lane.pics i::after, .track-name, .lane.flags u, .lane.flags u .flag path { transition: none; }
}
