/* Screenplay — a film script printed on good paper.
   Paper document, cinema screen embedded in it. */

@font-face { font-family: 'Instrument Serif'; src: url('/fonts/instrument-serif-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url('/fonts/instrument-serif-400-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Newsreader'; src: url('/fonts/newsreader-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Newsreader'; src: url('/fonts/newsreader-400-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Newsreader'; src: url('/fonts/newsreader-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Newsreader'; src: url('/fonts/newsreader-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Courier Prime'; src: url('/fonts/courier-prime-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Courier Prime'; src: url('/fonts/courier-prime-700.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --paper: #f6f1e6;
  --paper-deep: #ede5d3;
  --paper-edge: #e3d9c2;
  --ink: #211b14;
  --ink-soft: #6b5f50;
  --ink-faint: rgba(33, 27, 20, .38);
  --rule: rgba(33, 27, 20, .16);
  --rule-soft: rgba(33, 27, 20, .09);
  --amber: #c46a1d;
  --amber-deep: #a5540f;
  --record: #b3301c;
  --screen: #131017;
  --screen-edge: #2a2433;
  --glow: rgba(196, 106, 29, .18);
  --serif-display: 'Instrument Serif', Georgia, serif;
  --serif-body: 'Newsreader', Georgia, serif;
  --mono: 'Courier Prime', 'Courier New', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif-body);
  font-size: 19px;
  line-height: 1.62;
  min-height: 100vh;
  /* faint paper grain */
  background-image:
    radial-gradient(1200px 500px at 50% -180px, rgba(196,106,29,.06), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .028 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: rgba(196, 106, 29, .26); }

a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.mono { font-family: var(--mono); }

/* ---------- masthead ---------- */

.masthead {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(20px, 4vw, 44px);
  border-bottom: 1px solid var(--rule-soft);
}
.wordmark {
  font-family: var(--mono); font-weight: 700; font-size: 13px;
  letter-spacing: .34em; text-transform: uppercase; text-decoration: none;
}
.wordmark .dot { color: var(--amber); }
.masthead nav { display: flex; gap: 22px; align-items: center; }
.masthead nav a {
  font-family: var(--mono); font-size: 12px; letter-spacing: .12em;
  text-transform: uppercase; text-decoration: none; color: var(--ink-soft);
}
.masthead nav a:hover { color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 13px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; text-decoration: none;
  padding: 13px 22px; border: 1.5px solid var(--ink);
  background: var(--ink); color: var(--paper);
  border-radius: 3px;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  box-shadow: 3px 3px 0 var(--glow);
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--glow); }
.btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--glow); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: none; }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.btn .rec-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--record); box-shadow: 0 0 0 0 rgba(179,48,28,.5); animation: pulse 2.2s infinite; }
.btn:not(.ghost) .rec-dot { background: #ff6b52; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(179,48,28,.45); } 70% { box-shadow: 0 0 0 8px rgba(179,48,28,0); } 100% { box-shadow: 0 0 0 0 rgba(179,48,28,0); } }

/* ---------- landing ---------- */

.hero { padding: clamp(56px, 10vw, 120px) clamp(20px, 4vw, 44px) 40px; max-width: 1060px; margin: 0 auto; text-align: center; }
.hero .slug {
  font-family: var(--mono); font-size: 13px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--amber-deep); margin-bottom: 26px;
}
.hero h1 {
  font-family: var(--serif-display); font-weight: 400;
  font-size: clamp(44px, 7.4vw, 92px); line-height: 1.02; letter-spacing: -.01em;
}
.hero h1 em { font-style: italic; color: var(--amber-deep); }
.hero .dek {
  font-size: clamp(19px, 2.2vw, 23px); color: var(--ink-soft);
  max-width: 700px; margin: 26px auto 0; line-height: 1.55;
}
.hero .cta-row { margin-top: 40px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.how {
  max-width: 1060px; margin: 40px auto 0; padding: 0 clamp(20px, 4vw, 44px) 30px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border-top: 1px solid var(--rule);
}
.how .step { padding: 30px 26px 36px; border-right: 1px solid var(--rule-soft); }
.how .step:last-child { border-right: 0; }
.how .num { font-family: var(--mono); font-size: 12px; letter-spacing: .18em; color: var(--amber-deep); text-transform: uppercase; }
.how h3 { font-family: var(--serif-display); font-weight: 400; font-size: 27px; margin: 12px 0 8px; }
.how p { font-size: 16.5px; color: var(--ink-soft); line-height: 1.55; }

.reel { max-width: 1060px; margin: 30px auto 80px; padding: 0 clamp(20px, 4vw, 44px); }
.reel .reel-head {
  display: flex; align-items: baseline; justify-content: space-between;
  border-top: 2px solid var(--ink); padding-top: 14px; margin-bottom: 24px;
}
.reel h2 { font-family: var(--mono); font-size: 13px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; }
.reel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 26px; }
.card { text-decoration: none; display: block; }
.card .thumb {
  aspect-ratio: 16/9; background: var(--screen); border-radius: 4px; overflow: hidden;
  border: 1px solid var(--paper-edge); position: relative;
  transition: transform .18s ease, box-shadow .18s ease;
}
.card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .92; }
.card:hover .thumb { transform: translateY(-3px); box-shadow: 0 14px 30px -14px rgba(33,27,20,.4); }
.card .thumb .dur {
  position: absolute; right: 8px; bottom: 8px; font-family: var(--mono); font-size: 11.5px;
  background: rgba(19,16,23,.82); color: #f2ead9; padding: 3px 7px; border-radius: 3px;
}
.card h3 { font-family: var(--serif-display); font-weight: 400; font-size: 23px; line-height: 1.18; margin-top: 12px; }
.card:hover h3 { color: var(--amber-deep); }
.card .meta { font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); margin-top: 6px; }

.empty-reel {
  border: 1px dashed var(--rule); border-radius: 4px; padding: 48px 20px; text-align: center;
  color: var(--ink-soft); font-style: italic;
}

footer.site {
  border-top: 1px solid var(--rule-soft); padding: 26px clamp(20px, 4vw, 44px);
  display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint);
}
footer.site a { color: inherit; text-decoration: none; }
footer.site a:hover { color: var(--ink); }

/* fade-up entrance */
.rise { opacity: 0; transform: translateY(14px); animation: rise .7s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }

@media (max-width: 760px) {
  .how { grid-template-columns: 1fr; }
  .how .step { border-right: 0; border-bottom: 1px solid var(--rule-soft); }
  .how .step:last-child { border-bottom: 0; }
}

/* ---------- studio (record / upload) ---------- */

.studio { max-width: 860px; margin: 0 auto; padding: clamp(36px, 6vw, 70px) clamp(20px, 4vw, 44px) 90px; }
.studio h1 { font-family: var(--serif-display); font-weight: 400; font-size: clamp(36px, 5vw, 56px); line-height: 1.05; }
.studio .lede { color: var(--ink-soft); margin-top: 14px; max-width: 560px; }

.stage {
  margin-top: 34px; background: var(--screen); border-radius: 6px; overflow: hidden;
  border: 1px solid var(--screen-edge); aspect-ratio: 16/9; position: relative;
  box-shadow: 0 30px 60px -30px rgba(19,16,23,.55);
}
.stage video { width: 100%; height: 100%; object-fit: contain; display: block; background: var(--screen); }
.stage .stage-empty {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
  color: #8d8498; padding: 20px;
}
.stage .stage-empty .big { font-family: var(--serif-display); font-size: clamp(22px, 3vw, 32px); color: #d8d0c2; }
.stage .stage-empty p { font-size: 15px; margin-top: 10px; font-style: italic; }
.stage .rec-badge {
  position: absolute; top: 14px; left: 14px; display: none; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .14em;
  color: #ffd9d2; background: rgba(19,16,23,.72); padding: 6px 11px; border-radius: 4px;
}
.stage .rec-badge .dot { width: 9px; height: 9px; border-radius: 50%; background: #ff4d33; animation: pulse 1.6s infinite; }
.stage.recording .rec-badge { display: inline-flex; }

.deck { margin-top: 22px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.deck .spacer { flex: 1; }
.deck .hint { font-size: 15px; font-style: italic; color: var(--ink-faint); }
.mic-row { margin-top: 16px; display: flex; align-items: center; gap: 12px; font-size: 15.5px; color: var(--ink-soft); flex-wrap: wrap; }
.mic-row select {
  font: 15px var(--serif-body); padding: 7px 10px; border: 1px solid var(--rule);
  border-radius: 3px; background: var(--paper); color: var(--ink); max-width: 300px;
}
.level { width: 90px; height: 8px; border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; background: var(--paper-deep); }
.level i { display: block; height: 100%; width: 0; background: var(--amber); transition: width .08s linear; }

.dropzone {
  margin-top: 26px; border: 1.5px dashed var(--rule); border-radius: 6px; padding: 26px 22px;
  display: flex; align-items: center; gap: 16px; justify-content: center;
  color: var(--ink-soft); cursor: pointer; transition: border-color .15s, background .15s;
  font-size: 16px;
}
.dropzone:hover, .dropzone.drag { border-color: var(--amber-deep); background: rgba(196,106,29,.05); }
.dropzone input { display: none; }

.progress-panel { margin-top: 30px; display: none; }
.progress-panel.on { display: block; }
.bar { height: 10px; border: 1px solid var(--rule); border-radius: 5px; overflow: hidden; background: var(--paper-deep); }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--amber-deep), var(--amber)); transition: width .25s ease; }
.progress-panel .label { font-family: var(--mono); font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); margin-top: 10px; }

/* processing steps — the "developing the film" sequence */
.develop { margin-top: 36px; display: none; }
.develop.on { display: block; }
.develop .frames { border-top: 2px solid var(--ink); }
.develop .frame {
  display: flex; align-items: baseline; gap: 18px; padding: 17px 4px;
  border-bottom: 1px solid var(--rule-soft); color: var(--ink-faint); transition: color .3s;
}
.develop .frame .fnum { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; width: 74px; }
.develop .frame .fname { font-family: var(--serif-display); font-size: 24px; }
.develop .frame .fstate { margin-left: auto; font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.develop .frame.active { color: var(--ink); }
.develop .frame.active .fstate { color: var(--amber-deep); }
.develop .frame.active .fstate::after { content: '…'; animation: dots 1.4s steps(4) infinite; }
.develop .frame.done { color: var(--ink-soft); }
.develop .frame.done .fstate { color: var(--ink-soft); }
@keyframes dots { 0% { content: ''; } }
.develop .fail {
  margin-top: 18px; padding: 16px 18px; border: 1px solid rgba(179,48,28,.4); border-radius: 4px;
  background: rgba(179,48,28,.06); color: #7c2114; display: none;
}
.develop .fail.on { display: block; }

/* ---------- watch (the artifact) ---------- */

.watch-masthead { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px); }

.artifact { max-width: 1140px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 44px); }

.art-head { padding: clamp(30px, 5vw, 60px) 0 26px; max-width: 780px; }
.art-head .kicker { font-family: var(--mono); font-size: 12.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--amber-deep); margin-bottom: 18px; }
.art-head h1 { font-family: var(--serif-display); font-weight: 400; font-size: clamp(36px, 5.6vw, 64px); line-height: 1.04; letter-spacing: -.005em; }
.art-head .dek { font-size: clamp(19px, 2.1vw, 22px); font-style: italic; color: var(--ink-soft); margin-top: 16px; line-height: 1.5; }
.art-head .byline {
  margin-top: 22px; display: flex; gap: 20px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint);
}

/* the screen */
.screen-wrap { position: relative; margin: 8px 0 14px; }
.screen {
  position: relative; display: flex; flex-direction: column;
  background: var(--screen); border-radius: 8px; overflow: hidden;
  border: 1px solid var(--screen-edge);
  box-shadow: 0 40px 80px -40px rgba(19,16,23,.6), 0 0 0 6px rgba(33,27,20,.04);
}
.screen video { display: block; width: 100%; aspect-ratio: var(--ar, 16/9); max-height: min(70vh, 620px); object-fit: contain; background: var(--screen); margin-inline: auto; }

.controls { display: flex; align-items: center; gap: 14px; padding: 10px 14px 12px; background: var(--screen); color: #e9e2d2; user-select: none; }
.controls .ctl { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 4px; color: #e9e2d2; opacity: .85; }
.controls .ctl:hover { opacity: 1; background: rgba(233,226,210,.08); }
.controls .ctl svg { width: 17px; height: 17px; fill: currentColor; }
.controls .time { font-family: var(--mono); font-size: 12.5px; color: #c9c0ae; min-width: 88px; }
.controls .time b { color: #f2ead9; font-weight: 400; }
.controls .speed { font-family: var(--mono); font-size: 12px; padding: 0 8px; width: auto; }

.seekbar { flex: 1; position: relative; height: 22px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.seekbar .track { position: relative; width: 100%; height: 5px; border-radius: 3px; background: rgba(233,226,210,.18); }
.seekbar .seg { position: absolute; top: 0; height: 100%; border-radius: 3px; background: rgba(233,226,210,.18); overflow: hidden; box-shadow: 1.5px 0 0 var(--screen); }
.seekbar .seg i { position: absolute; inset: 0; width: 0; background: var(--amber); }
.seekbar .head { position: absolute; top: 50%; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 2px var(--screen); left: 0; pointer-events: none; transition: opacity .15s; }
.seekbar:hover .track { transform: scaleY(1.5); }
.seekbar .tip {
  position: absolute; bottom: 22px; transform: translateX(-50%); white-space: nowrap;
  font-family: var(--mono); font-size: 11.5px; background: rgba(19,16,23,.92); color: #f2ead9;
  border: 1px solid var(--screen-edge); padding: 4px 8px; border-radius: 3px; display: none; pointer-events: none;
}
.seekbar:hover .tip { display: block; }

/* body: margin rail + prose */
.art-body { display: grid; grid-template-columns: 236px minmax(0, 720px); gap: clamp(28px, 5vw, 72px); padding: 34px 0 60px; }

.rail { position: sticky; top: 76px; align-self: start; display: flex; flex-direction: column; max-height: calc(100vh - 96px); }
.rail-list { overflow: auto; scrollbar-width: none; min-height: 0; -webkit-mask-image: linear-gradient(#000 calc(100% - 30px), transparent); mask-image: linear-gradient(#000 calc(100% - 30px), transparent); }
.rail-list::-webkit-scrollbar { display: none; }
.rail .rail-title { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-faint); border-top: 2px solid var(--ink); padding: 12px 0 4px; }
.rail a.ch {
  display: block; padding: 10px 2px 10px 0; text-decoration: none;
  border-bottom: 1px solid var(--rule-soft); transition: padding-left .18s ease;
}
.rail a.ch .t { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: var(--ink-dim); }
.rail a.ch .n { display: block; font-family: var(--serif-display); font-size: 18.5px; line-height: 1.2; margin-top: 3px; color: var(--ink-soft); text-wrap: balance; }
.rail a.ch:hover .n { color: var(--ink); }
.rail a.ch.active { padding-left: 10px; border-left: 2px solid var(--amber-deep); margin-left: -12px; }
.rail a.ch.active .n { color: var(--ink); }
.rail a.ch.active .t { color: var(--amber-deep); }
.rail .progress-line { flex: none; font-family: var(--mono); font-size: 11px; color: var(--ink-dim); padding-top: 12px; letter-spacing: .1em; border-top: 1px solid var(--rule-soft); margin-top: 12px; }

.prose { min-width: 0; }
.chapter { margin-bottom: 14px; }
.chapter:first-child .ch-head { margin-top: 0; }

.chapter .still {
  display: block; border-radius: 4px; border: 1px solid var(--paper-edge); cursor: pointer;
  transition: box-shadow .18s ease, transform .18s ease;
}
.chapter .still:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -12px rgba(33,27,20,.45); }

.prose p.block { position: relative; margin-bottom: 1.15em; cursor: pointer; border-radius: 3px; transition: background .25s; }
.prose p.block::before {
  content: attr(data-tc); position: absolute; left: -74px; top: .35em; width: 60px; text-align: right;
  font-family: var(--mono); font-size: 11px; color: var(--amber-deep); opacity: 0; transition: opacity .15s;
}
.prose p.block:hover::before { opacity: 1; }
.prose p.block:hover { background: rgba(196,106,29,.06); box-shadow: 0 0 0 6px rgba(196,106,29,.06); }
.prose p.block.live { background: rgba(196,106,29,.09); box-shadow: 0 0 0 6px rgba(196,106,29,.09); }
.prose p.block.live::before { opacity: 1; }

.prose blockquote.block {
  position: relative; margin: 1.6em 0; padding: .2em 0 .2em 26px; cursor: pointer;
  border-left: 2px solid var(--amber-deep);
  font-family: var(--serif-display); font-size: clamp(23px, 2.6vw, 28px); line-height: 1.3; font-style: italic;
}
.prose blockquote.block.live { color: var(--amber-deep); }

/* mini dock player */
.screen-wrap.docked .screen {
  position: fixed; right: 22px; bottom: 22px; width: min(400px, calc(100vw - 44px)); z-index: 60;
  box-shadow: 0 24px 60px -20px rgba(19,16,23,.7);
  animation: dock-in .28s cubic-bezier(.2,.7,.2,1);
}
@keyframes dock-in { from { transform: translateY(14px); opacity: 0; } }
.screen-wrap.docked .placeholder { display: grid; }
.screen-wrap .placeholder { display: none; aspect-ratio: var(--ar, 16/9); max-height: min(70vh, 620px); border-radius: 8px; border: 1px solid var(--rule-soft); background: var(--paper-deep); place-items: center; }
.screen-wrap .placeholder::after { content: 'Player docked \2198'; font-family: var(--mono); font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-faint); }
.screen .undock { display: none; position: absolute; top: 8px; right: 8px; z-index: 5; width: 30px; height: 30px; border-radius: 4px; background: rgba(19,16,23,.7); color: #e9e2d2; place-items: center; }
.screen-wrap.docked .undock { display: grid; }

/* transcript drawer */
.transcript {
  max-width: 720px; padding: 10px 0 80px; display: none;
  /* keeps the article's column so switching modes doesn't jump sideways */
  margin: 0 0 0 clamp(0px, calc(236px + clamp(28px, 5vw, 72px)), 308px);
}
body.mode-transcript .transcript { display: block; }
body.mode-transcript .art-body { display: none; }
.transcript .word { cursor: pointer; border-radius: 2px; }
.transcript .word:hover { background: rgba(196,106,29,.15); }
.transcript .word.now { background: var(--amber); color: var(--paper); }
.transcript p { color: var(--ink-dim); margin-bottom: 1.1em; transition: color .3s; }

.mode-toggle { display: inline-flex; border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; }
.mode-toggle button { font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; padding: 8px 14px; color: var(--ink-soft); }
.mode-toggle button.on { background: var(--ink); color: var(--paper); }

footer.colophon {
  border-top: 1px solid var(--rule-soft); margin-top: 20px; padding: 30px clamp(20px, 4vw, 44px) 50px;
  text-align: center; font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint);
}
footer.colophon a { color: var(--amber-deep); text-decoration: none; }

@media (max-width: 900px) {
  .art-body { grid-template-columns: 1fr; gap: 0; }
  .rail { position: static; max-height: none; display: flex; flex-direction: row; gap: 10px; overflow-x: auto; border-top: 2px solid var(--ink); padding: 12px 0; }
  .rail-list { display: flex; flex-direction: row; gap: 10px; overflow: visible; mask-image: none; -webkit-mask-image: none; }
  .rail .rail-title, .rail .progress-line { display: none; }
  .rail a.ch { border: 1px solid var(--rule); border-radius: 20px; padding: 7px 14px; white-space: nowrap; flex: 0 0 auto; }
  .rail a.ch .n { font-size: 15px; display: inline; margin: 0 0 0 8px; }
  .rail a.ch .t { display: inline; }
  .rail a.ch.active { margin-left: 0; padding-left: 14px; border-left: 1px solid var(--amber-deep); border-color: var(--amber-deep); background: rgba(196,106,29,.08); }
  .prose p.block::before { display: none; }
  .chapter .still { float: none; width: 100%; margin: 8px 0 14px; }
  .screen-wrap.docked .screen { width: min(300px, calc(100vw - 32px)); right: 14px; bottom: 14px; }
}

/* ---------- fixes: contrast, touch, fullscreen, dock, motion, print ---------- */

/* readable faint ink for real text (decorative faint stays via --ink-faint) */
:root { --ink-dim: rgba(33, 27, 20, .55); }
.card .meta, .art-head .byline, .rail a.ch .t, .rail .progress-line,
.controls .time, .develop .frame .fnum { color: var(--ink-dim); }
footer.site, footer.colophon { color: var(--ink-dim); }


/* fullscreen: let the video fill, keep the controls as an overlay */
.screen:fullscreen { display: flex; flex-direction: column; background: var(--screen); }
.screen:fullscreen video { flex: 1; min-height: 0; width: 100%; height: auto; aspect-ratio: auto; object-fit: contain; }

/* docked mini player: cap height so portrait recordings stay small */
.screen-wrap.docked .screen video { max-height: 38vh; object-fit: contain; }

/* visible keyboard focus everywhere, in brand amber */
:focus-visible { outline: 2px solid var(--amber-deep); outline-offset: 2px; border-radius: 2px; }
.ch-head:focus-visible h2 { color: var(--amber-deep); }

/* timecode gutter only when there is real margin for it */
@media (max-width: 1210px) {
  .prose p.block::before { display: none; }
}

/* narrow phones: masthead wraps instead of overflowing */
@media (max-width: 520px) {
  .masthead { flex-wrap: wrap; gap: 10px 14px; padding: 14px 16px; }
  .masthead nav { gap: 14px; flex-wrap: wrap; }
  .wordmark { letter-spacing: .22em; }
  .mode-toggle button { padding: 7px 10px; }
  .hero .cta-row .btn { width: 100%; justify-content: center; }
  .controls { flex-wrap: wrap; gap: 10px; }
  .controls .time { min-width: 0; }
  .seekbar { order: 3; flex: 1 0 100%; }
  .deck { flex-direction: column; align-items: stretch; }
  .deck .btn { justify-content: center; }
  .deck .hint { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .rise { animation: none; opacity: 1; transform: none; }
  .btn, .card .thumb, .chapter .still, .rail a.ch { transition: none; }
  .btn .rec-dot, .stage .rec-badge .dot { animation: none; }
  .screen-wrap.docked .screen { animation: none; }
  html { scroll-behavior: auto; }
}

@media print {
  .masthead, .screen-wrap, .rail, footer.colophon, .transcript,
  .how-to-read, .scene-link, .share-sheet { display: none !important; }
  .art-body { display: block; padding: 0; }
  body { background: #fff; font-size: 12pt; }
  .still-fig { float: none; width: 60%; margin: 8pt 0; break-inside: avoid; }
  .prose p.block::before, .prose p.block::after { display: none; }
  .chapter { break-inside: avoid-page; }
  .ch-head .scene-num .tc { color: #888; }
  .art-head h1 { font-size: 26pt; }
}

/* ---------- landing: quiet link, live demo, real empty state ---------- */

.hero .quiet-link {
  display: inline-block; margin-top: 24px; font-style: italic; font-size: 16.5px;
  color: var(--ink-dim); text-decoration: none; border-bottom: 1px solid var(--rule);
  padding-bottom: 2px; transition: color .15s, border-color .15s;
}
.hero .quiet-link:hover { color: var(--amber-deep); border-bottom-color: var(--amber-deep); }

.reel-sub { font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-dim); }
.empty-reel .er-line { font-family: var(--serif-display); font-size: 30px; color: var(--ink); font-style: normal; }
.empty-reel .er-sub { color: var(--ink-dim); font-style: italic; margin: 10px auto 24px; max-width: 380px; font-size: 16.5px; }

/* The landing demo: a working click-to-seek, in pure CSS. */
.demo { max-width: 1060px; margin: 6px auto 0; padding: 0 clamp(20px,4vw,44px) 54px; }
.demo-slug { font-family: var(--mono); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--amber-deep); text-align: center; margin-bottom: 20px; }
.demo-inner { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: clamp(24px,4vw,46px); align-items: start; position: relative; }
.demo-inner > input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.demo-screen { background: var(--screen); border: 1px solid var(--screen-edge); border-radius: 8px; overflow: hidden; box-shadow: 0 30px 60px -34px rgba(19,16,23,.6); }
.demo-frames { position: relative; aspect-ratio: 16/9; }
.df { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity .45s ease; }
.df1 { background: radial-gradient(120% 120% at 20% 0%, #241d2e, #131017 70%); }
.df2 { background: radial-gradient(120% 120% at 80% 10%, #1b2430, #131017 70%); }
.df3 { background: radial-gradient(120% 120% at 50% 100%, #2b1f1a, #131017 70%); }
.df-cap { font-family: var(--mono); font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase; color: #cfc6b4; }
.demo-bar { height: 4px; background: rgba(233,226,210,.18); position: relative; }
.demo-bar i { position: absolute; inset: 0 auto 0 0; background: var(--amber); width: 10%; transition: width .45s cubic-bezier(.3,.7,.2,1); }
.demo-prose { display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.dl {
  display: block; cursor: pointer; padding: 13px 14px; border-radius: 4px;
  font-size: 17px; line-height: 1.5; color: var(--ink-dim);
  transition: background .25s, color .25s, box-shadow .25s;
}
.dl b { display: block; font-family: var(--mono); font-size: 11.5px; font-weight: 400; letter-spacing: .1em; color: var(--ink-faint); margin-bottom: 4px; }
.dl:hover { color: var(--ink); background: rgba(196,106,29,.05); }
#dq1:checked ~ .demo-screen .df1, #dq2:checked ~ .demo-screen .df2, #dq3:checked ~ .demo-screen .df3 { opacity: 1; }
#dq1:checked ~ .demo-screen .demo-bar i { width: 10%; }
#dq2:checked ~ .demo-screen .demo-bar i { width: 40%; }
#dq3:checked ~ .demo-screen .demo-bar i { width: 68%; }
#dq1:checked ~ .demo-prose .dl1, #dq2:checked ~ .demo-prose .dl2, #dq3:checked ~ .demo-prose .dl3 {
  color: var(--ink); background: rgba(196,106,29,.1); box-shadow: inset 2px 0 0 var(--amber-deep);
}
#dq1:checked ~ .demo-prose .dl1 b, #dq2:checked ~ .demo-prose .dl2 b, #dq3:checked ~ .demo-prose .dl3 b { color: var(--amber-deep); }
.demo-note { text-align: center; margin-top: 24px; font-style: italic; font-size: 16px; color: var(--ink-dim); }

@media (max-width: 820px) {
  .demo-inner { grid-template-columns: 1fr; gap: 20px; }
}
@media (prefers-reduced-motion: reduce) { .df, .demo-bar i, .dl { transition: none; } }

/* ---------- artifact: teach the gesture, mark the margin ---------- */

.art-head .how-to-read {
  margin-top: 16px; font-family: var(--mono); font-size: 12.5px; line-height: 1.95;
  letter-spacing: .03em; color: var(--ink-dim); max-width: 60ch;
}
.art-head .how-to-read .key { color: var(--ink); border-bottom: 1px solid var(--amber); padding-bottom: 1px; }

/* Every paragraph carries a faint amber tick: the affordance is always visible,
   and the same tick becomes the playhead when that paragraph is live. */
.prose p.block::after {
  content: ''; position: absolute; left: -18px; top: .5em; bottom: .5em; width: 2px;
  border-radius: 2px; background: var(--amber); opacity: .16; transition: opacity .18s ease;
}
.prose p.block:hover::after { opacity: .5; }
.prose p.block.live::after { opacity: 1; }
@media (max-width: 700px) { .prose p.block::after { left: -12px; } }

/* ---------- studio: notes, slate, take review, wrap card, library ---------- */

.mic-row .lbl { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-dim); }

.notes { margin-top: 26px; max-width: 620px; border-left: 2px solid var(--amber-deep); padding: 4px 0 4px 20px; }
.notes .notes-head { font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--amber-deep); }
.notes ol { list-style: none; counter-reset: note; margin-top: 10px; }
.notes li { counter-increment: note; position: relative; padding-left: 28px; margin-top: 10px; font-size: 16.5px; line-height: 1.5; color: var(--ink-soft); }
.notes li::before { content: counter(note); position: absolute; left: 0; top: .15em; font-family: var(--mono); font-size: 12px; color: var(--ink-faint); }
.notes li b { color: var(--ink); font-weight: 600; }

/* three count so nobody narrates into the share picker */
.slate { position: absolute; inset: 0; display: none; place-items: center; background: rgba(19,16,23,.55); backdrop-filter: blur(2px); }
.slate.on { display: grid; }
.slate span {
  font-family: var(--serif-display); font-size: clamp(70px, 14vw, 150px); color: var(--paper);
  animation: slate-pop .8s cubic-bezier(.2,.7,.2,1);
}
@keyframes slate-pop { from { opacity: 0; transform: scale(1.5); } 60% { opacity: 1; } to { opacity: .35; transform: scale(1); } }

.develop .dev-note { margin-top: 16px; font-size: 15.5px; font-style: italic; color: var(--ink-dim); }

.develop .ready { display: none; margin-top: 26px; border-top: 2px solid var(--ink); padding-top: 18px; }
.develop .ready.on { display: block; animation: rise .5s cubic-bezier(.2,.7,.2,1) both; }
.ready .mono { font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--amber-deep); }
.ready h2 { font-family: var(--serif-display); font-weight: 400; font-size: clamp(28px, 4vw, 42px); line-height: 1.08; margin: 10px 0 6px; }
.ready p { color: var(--ink-soft); font-style: italic; }
.ready .btn { margin-top: 16px; }

.mine { margin-top: 56px; }
.mine .mine-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; border-top: 2px solid var(--ink); padding-top: 12px; }
.mine h2 { font-size: 13px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; }
.mine .note { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-dim); }
.mine ul { list-style: none; }
.mine li { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 13px 2px; border-bottom: 1px solid var(--rule-soft); }
.mine li a { font-family: var(--serif-display); font-size: 22px; text-decoration: none; }
.mine li a:hover { color: var(--amber-deep); }
.mine li span { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-dim); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) { .slate span, .develop .ready.on { animation: none; } }

/* ---------- the ending ---------- */

.end-card { margin-top: 56px; padding-top: 30px; border-top: 2px solid var(--ink); text-align: center; }
.end-card .fin { font-family: var(--serif-display); font-style: italic; font-size: 36px; line-height: 1; color: var(--amber-deep); }
.end-card p { color: var(--ink-soft); margin: 14px auto 26px; max-width: 48ch; }
.end-card p b { font-weight: 500; color: var(--ink); font-style: italic; }
.end-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
body.ended .end-card { box-shadow: 0 0 0 6px rgba(196,106,29,.07); border-radius: 4px; }
@media print { .end-actions, .end-card { display: none; } }

/* ---------- scene heads, stills as figures, volume, transcript head ---------- */

.ch-head { display: flex; align-items: baseline; gap: 12px; margin: 34px 0 14px; flex-wrap: wrap; }
.ch-head .scene-num {
  font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .16em;
  color: var(--amber-deep); cursor: pointer; white-space: nowrap;
}
.ch-head .scene-num .tc { font-weight: 400; color: var(--ink-dim); margin-left: 6px; }
.ch-head h2 { font-family: var(--serif-display); font-weight: 400; font-size: clamp(26px, 3.2vw, 34px); line-height: 1.12; cursor: pointer; }
.ch-head h2:hover, .ch-head .scene-num:hover { color: var(--amber-deep); }
.scene-link {
  margin-left: auto; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 4px;
  color: var(--ink-faint); opacity: 0; transition: opacity .15s, color .15s, background .15s;
}
.chapter:hover .scene-link, .scene-link:focus-visible { opacity: 1; }
.scene-link:hover { color: var(--amber-deep); background: rgba(196,106,29,.09); }
.scene-link.copied { opacity: 1; color: var(--amber-deep); }
.scene-link.copied::after {
  content: 'Link copied'; position: absolute; margin-top: -34px; margin-left: -34px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  background: var(--ink); color: var(--paper); padding: 4px 8px; border-radius: 3px; white-space: nowrap;
}

.still-fig { float: right; width: min(300px, 42%); margin: 6px 0 14px 22px; }
.still-fig .still { width: 100%; height: auto; }
.still-fig figcaption {
  margin-top: 7px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-dim); line-height: 1.5;
}

.controls .vol {
  width: 62px; height: 4px; -webkit-appearance: none; appearance: none; background: rgba(233,226,210,.22);
  border-radius: 2px; cursor: pointer; flex: none;
}
.controls .vol::-webkit-slider-thumb { -webkit-appearance: none; width: 11px; height: 11px; border-radius: 50%; background: #e9e2d2; cursor: pointer; }
.controls .vol::-moz-range-thumb { width: 11px; height: 11px; border: 0; border-radius: 50%; background: #e9e2d2; cursor: pointer; }

.transcript .tr-head { border-top: 2px solid var(--ink); padding-top: 12px; margin-bottom: 26px; }
.transcript .tr-head .mono { font-size: 12px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; }
.transcript .tr-head p { color: var(--ink-dim); font-style: italic; font-size: 16px; margin-top: 6px; }

@media (max-width: 900px) {
  .transcript { margin-left: 0; }
  .controls .vol { display: none; }
  .scene-link { opacity: 1; }
  .still-fig { float: none; width: 100%; margin: 8px 0 14px; }
}

/* ---------- embed ---------- */

body.embed { background: var(--paper); font-size: 17px; }
.em { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(200px, 1fr); height: 100vh; }
.em .screen { background: var(--screen); display: flex; flex-direction: column; justify-content: center; position: relative; border-radius: 0; border: 0; box-shadow: none; }
.em .screen video { width: 100%; height: auto; flex: 1; min-height: 0; max-height: none; aspect-ratio: auto; object-fit: contain; background: var(--screen); }
.em-side { display: flex; flex-direction: column; border-left: 1px solid var(--rule); min-height: 0; }
.em-title {
  font-family: var(--serif-display); font-size: 21px; line-height: 1.15; text-decoration: none;
  padding: 14px 16px 12px; border-bottom: 1px solid var(--rule-soft);
}
.em-title:hover { color: var(--amber-deep); }
.em-scenes { overflow: auto; flex: 1; min-height: 0; scrollbar-width: thin; }
.em-scene {
  display: block; width: 100%; text-align: left; padding: 11px 16px;
  border-bottom: 1px solid var(--rule-soft); transition: background .15s;
}
.em-scene .mono { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; color: var(--ink-dim); }
.em-scene .n { display: block; font-family: var(--serif-display); font-size: 17px; line-height: 1.2; margin-top: 2px; color: var(--ink-soft); }
.em-scene:hover { background: rgba(196,106,29,.06); }
.em-scene.active { background: rgba(196,106,29,.1); box-shadow: inset 2px 0 0 var(--amber-deep); }
.em-scene.active .n { color: var(--ink); }
.em-scene.active .mono { color: var(--amber-deep); }
.em-foot {
  padding: 11px 16px; border-top: 1px solid var(--rule); font-family: var(--mono);
  font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-dim); text-decoration: none;
}
.em-foot:hover { color: var(--amber-deep); }
@media (max-width: 620px) {
  .em { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .em-side { border-left: 0; border-top: 1px solid var(--rule); }
}

/* ---------- share sheet ---------- */

/* sticky already establishes a containing block; only a plain masthead needs it */
.masthead:not(.watch-masthead) { position: relative; }

.share-sheet {
  position: absolute; right: clamp(20px, 4vw, 44px); top: calc(100% - 6px); z-index: 70;
  background: var(--paper); border: 1px solid var(--rule); border-radius: 6px;
  box-shadow: 0 24px 50px -24px rgba(33,27,20,.5); padding: 12px; width: min(460px, calc(100vw - 32px));
  animation: rise .22s cubic-bezier(.2,.7,.2,1) both;
}
.ss-row { display: flex; align-items: center; gap: 9px; padding: 5px 0; }
.ss-row .mono { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-dim); width: 74px; flex: none; }
.ss-row .mono b { font-weight: 400; color: var(--amber-deep); }
.ss-row input {
  flex: 1; min-width: 0; font: 12.5px var(--mono); padding: 7px 9px; color: var(--ink-soft);
  background: var(--paper-deep); border: 1px solid var(--rule-soft); border-radius: 3px;
}
.ss-row button {
  font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: 7px 11px; border: 1px solid var(--ink); border-radius: 3px; flex: none; transition: background .15s, color .15s;
}
.ss-row button:hover { background: var(--ink); color: var(--paper); }
@media (prefers-reduced-motion: reduce) { .share-sheet { animation: none; } }

/* ---------- download page ---------- */

.studio.getapp { max-width: 940px; }
.ga-head { max-width: 640px; }
.ga-head .kicker { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--amber-deep); margin-bottom: 18px; }
.ga-head h1 { font-family: var(--serif-display); font-weight: 400; font-size: clamp(36px, 5vw, 56px); line-height: 1.05; }
.ga-head .cta-row { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; }
.ga-ver { margin-top: 14px; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-dim); }

.ga-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 56px; border-top: 1px solid var(--rule); }
.ga-card { padding: 26px 24px 30px; border-right: 1px solid var(--rule-soft); }
.ga-card:last-child { border-right: 0; }
.ga-card .num { font-size: 11.5px; letter-spacing: .2em; color: var(--amber-deep); }
.ga-card h3 { font-family: var(--serif-display); font-weight: 400; font-size: 24px; margin: 10px 0 8px; }
.ga-card p { font-size: 16px; line-height: 1.55; color: var(--ink-soft); }

.ga-note { margin-top: 44px; border-left: 2px solid var(--amber-deep); padding: 4px 0 4px 20px; max-width: 640px; }
.ga-note h2 { font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--amber-deep); }
.ga-note p { margin-top: 8px; color: var(--ink-soft); font-size: 16.5px; line-height: 1.55; }
.ga-note b { color: var(--ink); font-weight: 500; }

@media (max-width: 780px) {
  .ga-grid { grid-template-columns: 1fr; }
  .ga-card { border-right: 0; border-bottom: 1px solid var(--rule-soft); }
  .ga-card:last-child { border-bottom: 0; }
}

/* auto-edit disclosure in the byline */
.art-head .byline .edited { color: var(--amber-deep); }

/* studio: the automatic-edit toggle */
.opts { margin-top: 18px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.opts .lbl { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-dim); }
.opts .chip {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em;
  padding: 7px 13px; border-radius: 20px; border: 1px solid var(--rule);
  color: var(--ink-dim); transition: background .14s, color .14s, border-color .14s;
}
.opts .chip.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.opts .chip:hover { border-color: var(--ink); }
.opts .opt-note { font-size: 15px; font-style: italic; color: var(--ink-faint); }
