@font-face {
  font-family: Inter;
  src: url("/fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #111110;
  --bg-2: #191917;
  --line: rgba(239, 236, 228, 0.14);
  --ink: #efece4;
  --muted: #8d8a82;
  --faint: #5c5a55;
  --unsure: #e4ff4a;
  --hot: #ff5a36;
  --paper: #efece4;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  --sans: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
}
button, input, a { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }
::selection { background: var(--unsure); color: #111; }

.top {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 60px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(17, 17, 16, 0.92);
  backdrop-filter: blur(16px);
  z-index: 5;
}
.mark {
  text-decoration: none;
  letter-spacing: -0.04em;
  font-weight: 560;
  font-size: 16px;
}
.nav { display: flex; gap: 18px; }
.nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.nav a.is-on { color: var(--ink); }
.who {
  margin-left: auto;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  display: flex;
  gap: 16px;
  align-items: center;
}
.who button {
  background: none;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
}
.who button:hover { color: var(--ink); }

.gate, .score, .empty {
  width: min(1080px, calc(100% - 48px));
  margin: 0 auto;
  padding: 48px 0 80px;
}
.gate { width: min(440px, calc(100% - 48px)); padding-top: 12vh; }
.kicker {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
}
h1 {
  font-family: var(--serif);
  font-weight: 460;
  font-size: clamp(40px, 6vw, 64px);
  letter-spacing: -0.035em;
  line-height: 0.95;
  margin: 0 0 18px;
}
.lede { color: var(--muted); margin: 0 0 32px; max-width: 38em; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field span { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.field input {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 10px 0 12px;
  font-size: 18px;
  border-radius: 0;
}
.field input:focus { outline: none; border-bottom-color: var(--ink); }
.primary, .ghost, .export {
  border: 0;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.primary {
  background: var(--paper);
  color: #141412;
  height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 560;
}
.primary:disabled { opacity: 0.35; cursor: default; }
.primary:hover:not(:disabled) { background: white; }
.err { color: var(--hot); min-height: 1.4em; margin: 12px 0 0; }

.review {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 300px;
  gap: 28px;
  width: min(1280px, calc(100% - 48px));
  margin: 28px auto 48px;
  align-items: start;
}
.stage { position: sticky; top: 88px; }
.phone {
  width: 230px;
  height: 408px;
  border-radius: 32px;
  border: 1px solid var(--line);
  background: #070707;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.scene { position: absolute; inset: 0; }
.phone[data-bg="blur"] .scene {
  background:
    radial-gradient(circle at 30% 18%, #6a675f, transparent 42%),
    radial-gradient(circle at 72% 78%, #2e2c28, transparent 46%),
    #232220;
  filter: blur(6px) saturate(0.75);
  transform: scale(1.12);
}
.phone[data-bg="black"] .scene { background: #070707; }
.phone[data-bg="crop"] .scene { background: #141311; }
.board {
  position: absolute;
  left: 10%;
  right: 10%;
  top: 18%;
  bottom: 30%;
  border: 1px solid #3f6d56;
  background:
    linear-gradient(#2a4a3a, #2a4a3a) center/80% 1px no-repeat,
    linear-gradient(#2a4a3a, #2a4a3a) center/1px 70% no-repeat,
    #173528;
  border-radius: 6px;
}
.phone[data-bg="blur"] .board { filter: blur(2px); }
.person { position: absolute; inset: 0; }
.phone[data-bg="crop"] .person { transform: scale(1.55); transform-origin: 50% 16%; }
.face, .shoulders { position: absolute; left: var(--face-x); transform: translateX(-50%); background: #e7e2d6; }
.face { width: 78px; height: 78px; border-radius: 50%; top: var(--face-y); }
.shoulders {
  width: 124px;
  height: 86px;
  top: calc(var(--face-y) + 62px);
  border-radius: 64px 64px 18px 18px;
  background: #d4cec1;
}
.cap {
  position: absolute;
  left: 8%;
  width: 84%;
  top: var(--cap-y);
  text-align: center;
  font-weight: 720;
  font-size: 15px;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: white;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85);
  z-index: 2;
}
.time {
  position: relative;
  height: 54px;
  margin-top: 16px;
  width: 230px;
  background: #1b1b19;
  border-radius: 8px;
  overflow: hidden;
}
.time__hook {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  background: repeating-linear-gradient(-45deg, transparent, transparent 4px, rgba(228, 255, 74, 0.16) 4px, rgba(228, 255, 74, 0.16) 5px);
}
.time__word {
  position: absolute;
  top: 18px;
  height: 18px;
  background: var(--ink);
  border-radius: 3px;
  min-width: 3px;
}
.time__word.is-unsure { background: var(--unsure); }
.time__gap {
  position: absolute;
  top: 24px;
  height: 6px;
  background: var(--hot);
  opacity: 0.85;
}
.meta {
  margin-top: 14px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.script { padding-top: 12px; }
.script h2 {
  margin: 0 0 18px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.line {
  font-family: var(--serif);
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.32;
  letter-spacing: -0.03em;
  margin: 0;
}
.word, .chip, .hole {
  display: inline;
  border: 0;
  background: none;
  padding: 0 0.16em 0 0;
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
  border-radius: 4px;
}
.word.is-unsure { color: var(--unsure); box-shadow: inset 0 -2px 0 var(--unsure); }
.word.is-edited { box-shadow: inset 0 -2px 0 var(--ink); }
.word.is-on, .word:hover { background: var(--paper); color: #161614; box-shadow: none; }
.word input {
  font: inherit;
  letter-spacing: inherit;
  width: 8ch;
  min-width: 3ch;
  background: var(--paper);
  color: #161614;
  border: 0;
  padding: 0 0.12em;
  border-radius: 4px;
}
.chip, .hole { cursor: default; color: var(--faint); }
.chip { text-decoration: line-through; }
.hole {
  font-family: var(--mono);
  font-size: 0.38em;
  letter-spacing: 0.04em;
  vertical-align: middle;
  color: var(--hot);
  padding: 0 0.4em;
}
.hint { color: var(--muted); margin: 22px 0 0; font-size: 13px; }
.play {
  margin-top: 18px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  height: 34px;
  padding: 0 14px;
  cursor: pointer;
  color: var(--muted);
}
.play:hover { color: var(--ink); border-color: var(--ink); }
.play.is-on { color: #141412; background: var(--unsure); border-color: var(--unsure); }

.rail {
  position: sticky;
  top: 88px;
  border-left: 1px solid var(--line);
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rail h3 {
  margin: 8px 0 4px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.markbtn, .choice {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 8px 8px;
  cursor: pointer;
}
.markbtn:hover, .choice:hover { background: var(--bg-2); }
.markbtn.is-on { background: var(--bg-2); border-color: var(--line); }
.markbtn.is-on .keycap { background: var(--unsure); color: #141412; }
.keycap {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  flex: none;
}
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice { justify-content: center; border-color: var(--line); height: 42px; }
.choice.is-on { background: var(--paper); color: #141412; border-color: var(--paper); }
.reasons { display: flex; flex-wrap: wrap; gap: 6px; }
.choice.small { height: 34px; padding: 0 8px; font-size: 13px; }
.rail .primary { margin-top: 8px; width: 100%; }
.receipt {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.receipt p { margin: 0 0 10px; }
.receipt .ref {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: -0.03em;
  line-height: 1.3;
}
.miss { color: var(--hot); }
.keys {
  margin-top: 18px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.5;
}

.score h1 { font-size: clamp(64px, 9vw, 112px); margin: 0; }
.score .unit { font-family: var(--serif); font-size: 0.42em; letter-spacing: 0; }
.figures {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 36px 0;
}
.figure {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.figure b {
  display: block;
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 460;
  letter-spacing: -0.04em;
}
.figure span { color: var(--muted); font-size: 13px; }
.bars { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 28px; }
.bar { display: grid; grid-template-columns: 220px 1fr 28px; gap: 12px; align-items: center; }
.bar i {
  display: block;
  height: 8px;
  background: var(--bg-2);
  border-radius: 99px;
  overflow: hidden;
}
.bar i b { display: block; height: 100%; background: var(--paper); width: 0; }
.bar em { font-style: normal; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.reward, .exports {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 8px;
}
.exports { display: flex; flex-wrap: wrap; gap: 10px; }
.export {
  border: 1px solid var(--line);
  border-radius: 999px;
  height: 36px;
  padding: 0 14px;
  color: var(--ink);
  background: transparent;
}
.export:hover { background: var(--paper); color: #141412; }
.terms { margin: 8px 0 0; padding: 0; list-style: none; }
.terms li { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.terms .ready { color: var(--unsure); font-family: var(--mono); font-size: 12px; }

@media (max-width: 980px) {
  .review { grid-template-columns: 1fr; }
  .stage, .rail { position: static; }
  .rail { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 18px; }
  .figures, .bar { grid-template-columns: 1fr; }
  .top { padding: 0 16px; gap: 16px; }
  .review, .gate, .score { width: min(100% - 32px, 1280px); }
}

.watch {
  width: min(640px, calc(100% - 40px));
  margin: 36px auto 96px;
  display: grid;
  gap: 28px;
}
.watch.is-entering { animation: rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(32px); }
  to { opacity: 1; transform: none; }
}
.watch h2 { margin: 0 0 10px; font-size: 15px; font-weight: 560; letter-spacing: -0.02em; }
.clip-title { margin: 14px 0 0; font-size: 22px; font-weight: 560; letter-spacing: -0.03em; }
.player {
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 9 / 16;
  max-height: 68vh;
  margin: 0 auto;
}
.player video { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }
.trim { display: grid; gap: 10px; }
.film-row { position: relative; }
.film {
  position: relative;
  height: 52px;
  border-radius: 10px;
  background: #1c1c1a;
  touch-action: none;
}
.film__window {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(239, 236, 228, 0.14);
}
.film__mark {
  position: absolute;
  top: 10px;
  bottom: 10px;
  border-radius: 6px;
  background: rgba(255, 90, 54, 0.62);
  pointer-events: none;
}
.film__head {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: var(--unsure);
  pointer-events: none;
}
.handle {
  position: absolute;
  top: 6px;
  bottom: 6px;
  width: 12px;
  margin-left: -6px;
  border: 0;
  border-radius: 6px;
  background: var(--paper);
  cursor: ew-resize;
  transition: transform 0.18s ease, background 0.18s ease;
}
.handle:hover { transform: scaleY(1.08); background: #fff; }
.film-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.verdict, .script, .refs { display: grid; gap: 8px; }
.pair, .reasons, .ref-row { display: flex; flex-wrap: wrap; gap: 8px; }
.choice, .primary, .ghost, .drop {
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.choice:hover, .primary:hover, .ghost:hover, .drop:hover { transform: translateY(-2px); }
.choice.small { font-size: 13px; }
.drop {
  display: grid;
  place-items: center;
  min-height: 88px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: transparent;
  cursor: pointer;
}
.drop input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.drop.is-on { border-color: var(--ink); background: rgba(239, 236, 228, 0.04); }
.ref { margin: 0; display: grid; gap: 6px; }
.ref img { width: 120px; height: 160px; object-fit: cover; border-radius: 10px; background: #000; }
.ghost {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
}
.ghost.is-on { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .watch.is-entering { animation: none; }
  .choice:hover, .primary:hover, .ghost:hover, .drop:hover, .handle:hover { transform: none; }
}
