:root {
  --bg: #090b10;
  --panel: #121720;
  --panel-2: #1a2029;
  --ink: #f5f1e8;
  --muted: #a8a39a;
  --line: #363a40;
  --red: #d63b35;
  --red-dark: #741b1e;
  --cyan: #55cfce;
  --acid: #c6d36d;
  --amber: #e3af55;
}

* { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
body {
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.012) 1px, transparent 1px),
    radial-gradient(circle at 12% 0, rgba(214,59,53,.18), transparent 31rem),
    radial-gradient(circle at 100% 18%, rgba(85,207,206,.08), transparent 28rem),
    var(--bg);
  background-size: 4px 4px, 4px 4px, auto, auto, auto;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
[hidden] { display: none !important; }

.home-link {
  position: fixed;
  z-index: 20;
  top: 14px;
  left: max(14px, env(safe-area-inset-left));
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 13px;
  color: var(--ink);
  background: rgba(9,11,16,.88);
  border: 1px solid var(--line);
  border-radius: 6px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 850;
  backdrop-filter: blur(12px);
}
.home-link:hover { border-color: var(--cyan); }

.shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 76px 0 54px;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 950; }
.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid #ff6f64;
  border-radius: 5px;
  background: linear-gradient(145deg, #dc4339, #64171b);
  box-shadow: 7px 7px 0 #212c31;
  font-size: 22px;
}
.top-note {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  text-align: right;
}
.stage {
  position: relative;
  min-height: 620px;
  padding: clamp(24px, 5vw, 58px) 0 0;
}
.stage::before {
  position: absolute;
  z-index: -1;
  inset: 22px 0 auto;
  height: 5px;
  content: "";
  background: repeating-linear-gradient(90deg, var(--red) 0 42px, #15191e 42px 84px);
  opacity: .45;
}
.screen { animation: tracking .26s steps(2, end); }
@keyframes tracking {
  0% { transform: translateX(-2px); opacity: .4; filter: contrast(1.4); }
  55% { transform: translateX(2px); }
  100% { transform: none; opacity: 1; filter: none; }
}

.kicker {
  margin: 0 0 14px;
  color: var(--cyan);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(42px, 7vw, 82px);
  line-height: .98;
  letter-spacing: 0;
  text-wrap: balance;
}
.red-text { color: #ff5c51; text-shadow: 3px 3px 0 #42161a; }
.lead {
  max-width: 760px;
  margin: 20px 0 0;
  color: #c8c2b8;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.62;
}
.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 430px);
  gap: clamp(26px, 5vw, 62px);
  align-items: start;
}
.vhs-figure {
  margin: 0;
  border: 1px solid #484644;
  border-radius: 6px;
  background: #050607;
  box-shadow: 12px 12px 0 #241114;
  overflow: hidden;
}
.vhs-figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #050607;
}
.vhs-figure figcaption {
  padding: 10px 12px;
  color: #95918b;
  border-top: 1px solid #3d3b39;
  font: 11px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace;
}
.warning {
  max-width: 820px;
  margin-top: 28px;
  padding: 19px 20px;
  border: 1px solid #a73531;
  border-left: 7px solid var(--red);
  border-radius: 4px;
  background: rgba(117,24,27,.25);
  color: #f4d7d3;
  line-height: 1.55;
}
.warning strong { display: block; margin-bottom: 5px; color: #ff766c; }
.age-check {
  display: flex;
  max-width: 820px;
  align-items: flex-start;
  gap: 12px;
  margin: 18px 0 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  cursor: pointer;
  line-height: 1.45;
}
.age-check input {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  margin: 0;
  accent-color: var(--red);
}
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.button {
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 5px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}
.button:hover:not(:disabled) { transform: translateY(-2px); }
.button:disabled { cursor: not-allowed; opacity: .38; }
.button-primary { color: #fff; background: var(--red); border-color: #ef665e; box-shadow: 5px 5px 0 #51171b; }
.button-secondary { color: var(--ink); background: #20252d; border-color: #4a4e54; }

.progress-shell { margin-bottom: 34px; }
.progress-meta { display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font: 12px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; }
.progress {
  height: 8px;
  margin-top: 9px;
  overflow: hidden;
  border: 1px solid #46494e;
  background: #080a0d;
}
.progress > div { height: 100%; background: linear-gradient(90deg, var(--red), var(--amber), var(--cyan)); transition: width .22s ease; }
.question-labels { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.question-labels span {
  padding: 6px 8px;
  border: 1px solid #4c4d4b;
  border-radius: 3px;
  color: var(--acid);
  background: #15191e;
  font: 11px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace;
  text-transform: uppercase;
}
.question-visual {
  width: min(880px, 100%);
  margin: 0 0 22px;
  overflow: hidden;
  border: 1px solid #444950;
  border-radius: 5px;
  background: #050607;
}
.question-visual[hidden] { display: none; }
.question-visual img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 430px;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #050607;
}
.question-visual figcaption {
  padding: 8px 11px;
  color: var(--muted);
  border-top: 1px solid #30353b;
  font: 11px/1.35 ui-monospace, SFMono-Regular, Consolas, monospace;
}
.question {
  max-width: 940px;
  margin: 0 0 26px;
  font-size: clamp(27px, 4vw, 47px);
  line-height: 1.13;
  letter-spacing: 0;
  text-wrap: balance;
}
.answers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.answer {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  min-height: 78px;
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  border: 1px solid #3d4249;
  border-radius: 5px;
  background: var(--panel);
  text-align: left;
  cursor: pointer;
}
.answer:hover:not(:disabled) { border-color: var(--cyan); background: #172027; }
.answer > span { display: grid; height: 100%; place-items: center; color: var(--cyan); border-right: 1px solid #3d4249; background: #0e1217; font: 800 13px ui-monospace, SFMono-Regular, Consolas, monospace; }
.answer b { align-self: center; padding: 15px 16px; font-size: 15px; line-height: 1.35; }
.answer.is-correct { border-color: #75bb86; background: #14271c; }
.answer.is-wrong { border-color: #f16056; background: #341719; }
.feedback {
  display: grid;
  gap: 5px;
  margin-top: 14px;
  padding: 16px 18px;
  border: 1px solid #464a4f;
  border-radius: 4px;
  background: #11161d;
  line-height: 1.45;
}
.feedback.is-correct { border-left: 6px solid #75bb86; }
.feedback.is-wrong { border-left: 6px solid var(--red); }
.feedback span { color: var(--muted); font-size: 14px; }
.quiz-nav { display: flex; justify-content: flex-end; margin-top: 18px; }

.watched-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.watched-head h2, .result-title {
  max-width: 860px;
  margin: 0;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.03;
  letter-spacing: 0;
}
.watch-counter { color: var(--cyan); font: 12px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: nowrap; }
.watched-list { display: grid; gap: 8px; }
.watch-card {
  display: grid;
  grid-template-columns: minmax(220px, .75fr) minmax(0, 1.25fr);
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid #353a41;
  border-radius: 5px;
  background: rgba(18,23,32,.9);
}
.watch-copy { display: grid; gap: 4px; min-width: 0; }
.watch-copy b { font-size: 16px; }
.watch-copy span { color: var(--muted); font-size: 12px; line-height: 1.4; }
.watch-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.watch-options button {
  min-height: 42px;
  padding: 8px;
  color: #c2beb7;
  border: 1px solid #3e434b;
  border-radius: 4px;
  background: #171c23;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.watch-options button:hover { border-color: var(--cyan); }
.watch-options button.is-selected { color: #fff; border-color: #e85b52; background: #722127; }
.watched-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }

.result-hero {
  display: grid;
  grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
  gap: clamp(26px, 5vw, 58px);
  align-items: start;
}
.result-score {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid #85342f;
  border-radius: 6px;
  color: #ff6c61;
  background:
    repeating-linear-gradient(0deg, transparent 0 4px, rgba(255,255,255,.025) 4px 5px),
    radial-gradient(circle, #311416 0, #11151b 70%);
  box-shadow: 12px 12px 0 #211416;
  font: 950 clamp(68px, 11vw, 132px)/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}
.result-level { margin-bottom: 12px; color: var(--cyan); font: 12px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; text-transform: uppercase; }
.result-description { margin-top: 22px; color: #c9c3b9; font-size: 16px; line-height: 1.65; }
.result-description p { margin: 0 0 13px; }
.result-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 26px; }
.result-stats div { min-height: 98px; padding: 15px; border: 1px solid #373c43; border-radius: 5px; background: #131820; }
.result-stats strong { display: block; color: var(--amber); font: 900 25px/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.result-stats span { display: block; margin-top: 9px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.recommendation-section { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
.section-title { margin: 0 0 18px; font-size: clamp(28px, 4vw, 44px); }
.recommendations { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.recommendation {
  padding: 20px;
  border: 1px solid #3c4148;
  border-radius: 5px;
  background: var(--panel);
}
.recommendation-head { display: flex; align-items: start; justify-content: space-between; gap: 15px; }
.recommendation-head h3 { margin: 5px 0 4px; font-size: 22px; line-height: 1.15; }
.severity { color: var(--cyan); font: 10px/1.3 ui-monospace, SFMono-Regular, Consolas, monospace; text-transform: uppercase; }
.credits { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.level { display: grid; width: 48px; height: 40px; flex: 0 0 48px; place-items: center; color: #1a1310; border-radius: 3px; background: var(--amber); font: 900 13px ui-monospace, SFMono-Regular, Consolas, monospace; }
.blurb { margin: 17px 0 9px; line-height: 1.5; }
.reason { margin: 0; color: #c0bbb2; font-size: 13px; line-height: 1.5; }
.warnings { margin-top: 15px; padding-top: 12px; color: #df9d97; border-top: 1px dashed #5b3536; font-size: 11px; line-height: 1.45; }
.all-seen { grid-column: 1 / -1; padding: 24px; border: 1px solid #7d3733; border-radius: 5px; background: #291518; color: #ffd0cb; font-size: 18px; font-weight: 800; line-height: 1.5; }
.result-actions { margin-top: 24px; }
.source-note { margin-top: 32px; color: #807c75; font-size: 11px; line-height: 1.55; }
.source-note a { color: #9abfbe; }
.toast {
  position: fixed;
  z-index: 30;
  right: 16px;
  bottom: 16px;
  max-width: calc(100% - 32px);
  padding: 13px 16px;
  border: 1px solid #638f8e;
  border-radius: 4px;
  background: #102322;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: .2s ease;
}
.toast.is-visible { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .intro-grid, .result-hero { grid-template-columns: 1fr; }
  .vhs-figure { max-width: 680px; }
  .result-score { width: min(100%, 360px); }
  .watch-card { grid-template-columns: 1fr; }
  .result-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .shell { width: min(100% - 16px, 1180px); padding-top: 68px; }
  .topbar { align-items: flex-start; }
  .top-note { max-width: 155px; }
  .stage { min-height: 0; padding-top: 38px; }
  h1 { font-size: 44px; }
  .question-visual img { max-height: 300px; }
  .answers, .recommendations { grid-template-columns: 1fr; }
  .answer { min-height: 68px; }
  .watched-head { display: block; }
  .watch-counter { display: block; margin-top: 10px; }
  .watch-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .watch-options button { min-height: 46px; }
}

@media (max-width: 420px) {
  .home-link { top: 8px; left: 8px; }
  .shell { width: min(100% - 12px, 1180px); padding-top: 62px; }
  .top-note { display: none; }
  .brand-mark { width: 42px; height: 42px; }
  h1 { font-size: 39px; }
  .lead { font-size: 16px; }
  .warning, .age-check { padding: 14px; }
  .question-visual { margin-bottom: 18px; }
  .question-visual img { max-height: 230px; }
  .question { font-size: 28px; }
  .answer { grid-template-columns: 36px minmax(0, 1fr); }
  .answer b { padding: 12px; font-size: 14px; }
  .result-stats { gap: 6px; }
  .result-stats div { min-height: 88px; padding: 12px; }
  .result-stats strong { font-size: 21px; }
  .watched-nav, .result-actions { display: grid; grid-template-columns: 1fr; }
  .watched-nav .button, .result-actions .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
