:root {
  color-scheme: dark;
  --paper: #e9e6d9;
  --ink: #111713;
  --grey: #8f988e;
  --red: #b84444;
  --cyan: #6cb9bf;
  --line: rgba(233, 230, 217, 0.28);
}

* { box-sizing: border-box; }
body { min-width: 320px; min-height: 100svh; margin: 0; overflow-x: hidden; background: var(--ink); color: var(--paper); font-family: Arial, Helvetica, sans-serif; }
button { font: inherit; }
.assessment { position: relative; isolation: isolate; min-height: 100svh; overflow-x: hidden; background: radial-gradient(circle at 78% 18%, rgba(108, 185, 191, .13), transparent 28rem), linear-gradient(135deg, #141b16, #0d110e 72%); }
.scan-lines { position: absolute; z-index: -1; inset: 0; opacity: .21; background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(233, 230, 217, .06) 3px 4px); pointer-events: none; }
.system-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 24px 0; border-bottom: 1px solid var(--line); color: #d4d8cf; font-family: "Courier New", monospace; font-size: .72rem; font-weight: 700; letter-spacing: .09em; }
.system-header p { margin: 0; }
.header-actions { display: flex; align-items: center; gap: 15px; }
.system-state { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.system-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.sound-toggle, .text-size-toggle { padding: 5px 7px; border: 1px solid rgba(233, 230, 217, .32); background: rgba(10, 18, 15, .65); color: #cdd4ca; font-family: "Courier New", monospace; font-size: .66rem; font-weight: 700; letter-spacing: .07em; cursor: pointer; }
.text-size-toggle { min-width: 2.45rem; }
.sound-toggle:hover, .sound-toggle:focus-visible, .sound-toggle[aria-pressed="true"], .text-size-toggle:hover, .text-size-toggle:focus-visible, .text-size-toggle[aria-pressed="true"] { border-color: var(--cyan); color: var(--cyan); outline: none; }
.screen { display: flex; flex-direction: column; justify-content: center; width: min(900px, calc(100% - 48px)); min-height: calc(100svh - 73px); margin: 0 auto; padding: 62px 0 112px; }
.hidden { display: none; }
.intro-screen { position: relative; }
.viewfinder { position: absolute; top: -24px; right: 0; width: 175px; height: 175px; opacity: .75; border: 1px solid rgba(233, 230, 217, .24); }
.viewfinder span { position: absolute; width: 25px; height: 25px; border-color: var(--paper); border-style: solid; }
.viewfinder span:nth-child(1) { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.viewfinder span:nth-child(2) { top: -1px; right: -1px; border-width: 2px 2px 0 0; }
.viewfinder span:nth-child(3) { bottom: -1px; left: -1px; border-width: 0 0 2px 2px; }
.viewfinder span:nth-child(4) { right: -1px; bottom: -1px; border-width: 0 2px 2px 0; }
.viewfinder b { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -54%); color: var(--red); font-family: Georgia, serif; font-size: 2.7rem; font-weight: 400; }
.pixel-scene { position: relative; height: clamp(180px, 23vw, 280px); margin: 0 0 36px; overflow: hidden; border: 1px solid var(--line); background: #111713; }
.pixel-scene img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 68%; image-rendering: pixelated; animation: scene-drift 12s ease-in-out infinite alternate; }
.pixel-scene::before { position: absolute; inset: 0; z-index: 1; content: ""; background: linear-gradient(90deg, rgba(17, 23, 19, .46), transparent 46%, rgba(17, 23, 19, .12)); pointer-events: none; }
.scene-scan { position: absolute; z-index: 2; top: 0; bottom: 0; left: -14%; width: 11%; background: linear-gradient(90deg, transparent, rgba(108, 185, 191, .24), transparent); transform: skewX(-20deg); animation: scan-sweep 4s ease-in-out infinite; }
.scene-label { position: absolute; z-index: 3; right: 13px; bottom: 11px; color: rgba(233, 230, 217, .88); font-family: "Courier New", monospace; font-size: .62rem; font-weight: 700; letter-spacing: .09em; }
.drone-light { position: absolute; z-index: 3; width: 5px; height: 5px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red); animation: drone-pulse 1.1s ease-in-out infinite; }
.drone-light-one { top: 22%; left: 26%; }
.drone-light-two { top: 16%; right: 19%; animation-delay: .55s; }
@keyframes scene-drift { from { transform: scale(1.01) translateX(-.4%); } to { transform: scale(1.06) translateX(.5%); } }
@keyframes scan-sweep { 0%, 15% { left: -14%; opacity: 0; } 30% { opacity: 1; } 76%, 100% { left: 106%; opacity: 0; } }
@keyframes drone-pulse { 50% { opacity: .28; transform: scale(.7); } }
.eyebrow, .question-topline p, .result-status { margin: 0 0 22px; color: var(--cyan); font-family: "Courier New", monospace; font-size: .73rem; font-weight: 700; letter-spacing: .13em; }
h1, h2 { max-width: 780px; margin: 0; font-family: Georgia, "Times New Roman", serif; font-weight: 400; letter-spacing: -.055em; text-wrap: balance; }
h1:focus-visible, h2:focus-visible { outline: 2px solid var(--cyan); outline-offset: 8px; }
h1 { font-size: clamp(3rem, 8.7vw, 7.4rem); line-height: .84; }
h2 { font-size: clamp(2.4rem, 6vw, 5.3rem); line-height: .9; }
.deck, .result-copy { max-width: 620px; margin: 42px 0 0; color: #d4d8cf; font-size: clamp(1.08rem, 1.8vw, 1.35rem); line-height: 1.55; }
.intro-preface { max-width: 600px; margin: 18px 0 0; color: #b8c0b6; font-size: clamp(.98rem, 1.45vw, 1.14rem); line-height: 1.55; }
.briefing { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 36px 0 32px; color: var(--paper); font-family: "Courier New", monospace; font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; }
.briefing span::before { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 10px 1px 0; background: var(--red); }
.primary-button, .secondary-button, .answer-button { border-radius: 0; cursor: pointer; }
.primary-button { padding: 16px 18px; border: 1px solid var(--paper); background: var(--paper); color: var(--ink); font-size: .78rem; font-weight: 800; letter-spacing: .1em; transition: background .2s, color .2s, transform .2s; }
.primary-button span { margin-left: 18px; color: var(--red); font-size: 1rem; }
.primary-button:hover, .primary-button:focus-visible { background: transparent; color: var(--paper); transform: translateY(-2px); }
.microcopy, .trailer-note { margin: 20px 0 0; color: #9da69b; font-family: "Courier New", monospace; font-size: .72rem; line-height: 1.6; }
.question-topline { display: grid; grid-template-columns: max-content 1fr; align-items: center; gap: 24px; margin-bottom: 74px; }
.question-topline p { margin: 0; white-space: nowrap; }
.progress-track { height: 1px; background: var(--line); }
.progress-track span { display: block; width: 0; height: 100%; background: var(--red); transition: width .4s ease; }
.question-screen h2 { max-width: 760px; }
.question-instruction { margin: 28px 0 30px; color: #b8c0b6; font-size: 1rem; }
.answer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; max-width: 780px; }
.answer-button { min-height: 120px; padding: 20px; border: 1px solid var(--line); background: rgba(233, 230, 217, .03); color: var(--paper); text-align: left; font-size: 1rem; line-height: 1.45; transition: border-color .2s, background .2s, transform .2s; }
.answer-button::before { display: block; margin-bottom: 18px; color: var(--cyan); content: attr(data-option); font-family: "Courier New", monospace; font-size: .7rem; font-weight: 700; letter-spacing: .12em; }
.answer-button:hover, .answer-button:focus-visible { border-color: var(--paper); background: rgba(233, 230, 217, .1); transform: translateY(-2px); }
.result-status { color: var(--red); }
.approval-record { position: relative; display: grid; grid-template-columns: minmax(142px, 29%) minmax(0, 1fr); width: min(100%, 720px); min-height: 220px; margin: 1.8rem 0 0; overflow: hidden; border: 1px solid rgba(108, 185, 191, .72); background: #d8d8cd; color: #111713; }
.approval-record.hidden { display: none; }
.approval-record::before { position: absolute; top: 0; left: 0; width: 42%; height: 10px; content: ""; background: var(--cyan); }
.approval-portrait-frame { min-height: 220px; padding: 18px 0 0 18px; background: #9eb9bb; }
.approval-portrait-frame img { display: block; width: 100%; height: 100%; min-height: 202px; object-fit: cover; object-position: 50% 22%; image-rendering: pixelated; filter: saturate(.82) contrast(1.04); }
.approval-record figcaption { position: relative; display: flex; flex-direction: column; align-items: flex-start; padding: 28px 24px 22px; }
.approval-record figcaption > span, .approval-record figcaption > small, .approval-record figcaption > i { font-family: "Courier New", monospace; font-size: .67rem; font-style: normal; font-weight: 700; letter-spacing: .09em; }
.approval-record figcaption > span { color: #38565a; }
.approval-record figcaption > strong { margin: 10px 0 2px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.8rem, 4.5vw, 3rem); font-weight: 400; letter-spacing: -.04em; }
.approval-record figcaption > small { color: #52615a; }
.approval-record figcaption > b { position: absolute; top: 76px; right: 18px; display: inline-flex; flex-direction: column; gap: 3px; padding: 8px 10px 7px; border: 3px solid var(--red); color: var(--red); font-family: Arial, Helvetica, sans-serif; font-size: .88rem; font-weight: 900; letter-spacing: .1em; line-height: .9; text-align: center; transform: rotate(-7deg); }
.approval-record figcaption > b em { font-size: .58rem; font-style: normal; letter-spacing: .08em; }
.approval-record figcaption > i { margin-top: auto; color: #38565a; }
.expulsion-scene { position: relative; overflow: hidden; width: min(100%, 720px); margin: 1.8rem 0 0; border: 1px solid rgba(184, 68, 68, .72); background: #07100d; aspect-ratio: 16 / 7; }
.expulsion-terminal { display: block; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; animation: terminal-drift 8s ease-in-out infinite alternate; }
.expulsion-scene::after { position: absolute; z-index: 2; inset: 0; content: ""; background: linear-gradient(90deg, rgba(4, 10, 9, .18), transparent 48%, rgba(4, 10, 9, .5)); pointer-events: none; }
.expulsion-scene figcaption { position: absolute; z-index: 4; top: .75rem; left: .8rem; padding: .35rem .48rem; border: 1px solid rgba(233, 230, 217, .46); background: rgba(7, 13, 11, .78); color: var(--paper); font-family: "Courier New", monospace; font-size: .68rem; font-weight: 700; letter-spacing: .1em; }
@keyframes terminal-drift { from { transform: scale(1.02) translateX(-.35%); } to { transform: scale(1.07) translateX(.45%); } }
.result-notice { max-width: 600px; margin-top: 38px; padding: 20px 0; border-top: 1px solid rgba(184, 68, 68, .8); border-bottom: 1px solid rgba(184, 68, 68, .8); font-family: "Courier New", monospace; }
.result-notice span { display: block; color: #d6aba8; font-size: .7rem; font-weight: 700; letter-spacing: .12em; }
.result-notice strong { display: block; margin: 8px 0; color: var(--red); font-size: 1.18rem; letter-spacing: .14em; }
.result-notice p { margin: 0; color: #d4d8cf; font-size: .78rem; }
.result-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(100%, 720px); margin-top: 1.1rem; border-top: 1px solid rgba(108, 185, 191, .42); border-bottom: 1px solid rgba(108, 185, 191, .42); }
.result-metrics > div { min-width: 0; padding: .9rem .7rem .86rem; border-right: 1px solid rgba(108, 185, 191, .27); }
.result-metrics > div:last-child { border-right: 0; }
.result-metrics span, .result-metrics strong { display: block; font-family: "Courier New", monospace; }
.result-metrics span { min-height: 2.2em; color: #9eb9bb; font-size: .62rem; font-weight: 700; letter-spacing: .09em; line-height: 1.25; }
.result-metrics strong { margin-top: .25rem; color: var(--paper); font-size: clamp(1.35rem, 3vw, 2rem); font-weight: 400; letter-spacing: -.04em; }
.result-book-bridge { max-width: 600px; margin: 1.35rem 0 0; color: #cfd5ca; font-size: .96rem; line-height: 1.55; }
.result-book-bridge em { color: var(--paper); }
.result-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.secondary-button { display: inline-flex; align-items: center; justify-content: center; padding: 15px 18px; border: 1px solid var(--line); background: transparent; color: var(--paper); font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-decoration: none; }
.secondary-button:hover, .secondary-button:focus-visible { border-color: var(--cyan); color: var(--cyan); }
.character-screen { max-width: 920px; }
.character-screen h2 { max-width: 16ch; }
.character-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin: 2rem 0 1.2rem; }
.character-card { display: grid; grid-template-columns: 104px minmax(0, 1fr); min-height: 152px; padding: 0; overflow: hidden; border: 1px solid rgba(222, 237, 219, .22); background: rgba(10, 18, 15, .75); color: var(--paper); text-align: left; cursor: pointer; transition: transform 160ms ease, border-color 160ms ease, background 160ms ease; }
.character-card:hover, .character-card:focus-visible { outline: none; transform: translateY(-2px); border-color: var(--cyan); background: rgba(16, 35, 31, .9); }
.character-card.route-pending { opacity: .45; cursor: not-allowed; }
.character-card.route-pending:hover { transform: none; border-color: rgba(222, 237, 219, .22); background: rgba(10, 18, 15, .75); }
.character-portrait { width: 104px; height: 100%; min-height: 152px; object-fit: cover; object-position: 50% 23%; image-rendering: pixelated; filter: saturate(.92) contrast(1.04); transition: transform 240ms ease, filter 240ms ease; }
.character-card:hover .character-portrait, .character-card:focus-visible .character-portrait { transform: scale(1.055); filter: saturate(1.06) contrast(1.08); }
.character-copy { display: flex; flex-direction: column; justify-content: center; padding: 1rem; }
.character-card strong, .character-card small { display: block; }
.character-card strong { margin: 0 0 .42rem; font-family: Georgia, "Times New Roman", serif; font-size: 1.45rem; font-weight: 400; letter-spacing: .04em; }
.character-card small { max-width: 29ch; color: #b8c0b6; font-size: .91rem; line-height: 1.35; }
.back-button { margin-top: .35rem; }
.question-scene { position: relative; overflow: hidden; width: min(100%, 640px); margin: .9rem 0 1rem; border: 1px solid rgba(222, 237, 219, .25); background: #09100d; aspect-ratio: 4 / 3; }
.question-scene::after { position: absolute; inset: 0; content: ""; background: linear-gradient(90deg, rgba(4, 8, 7, .43), transparent 35%, rgba(4, 8, 7, .2)); pointer-events: none; }
.question-scene img { display: block; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; animation: scene-drift 12s ease-in-out infinite alternate; }
.question-scene figcaption { position: absolute; z-index: 1; top: .75rem; left: .85rem; padding: .34rem .48rem; border: 1px solid rgba(222, 237, 219, .42); background: rgba(6, 13, 11, .78); color: var(--paper); font-family: "Courier New", monospace; font-size: .72rem; letter-spacing: .08em; }
.site-footer { position: absolute; right: 24px; bottom: 16px; left: 24px; color: #7f887e; font-family: "Courier New", monospace; font-size: .66rem; letter-spacing: .04em; line-height: 1.45; text-align: center; }
.site-footer a { color: #aeb7ac; text-decoration: none; }
.site-footer a:hover, .site-footer a:focus-visible { color: var(--cyan); outline: none; }
.passed-notice { border-color: rgba(94, 215, 180, .7); }

/* Opt-in reading aid. This preference remains only in the visitor's browser. */
body.large-text .deck, body.large-text .result-copy { max-width: 680px; font-size: clamp(1.3rem, 2.15vw, 1.65rem); line-height: 1.62; }
body.large-text .intro-preface { max-width: 660px; font-size: clamp(1.16rem, 1.75vw, 1.4rem); line-height: 1.62; }
body.large-text h1 { font-size: clamp(3.45rem, 9.8vw, 8.35rem); line-height: .88; }
body.large-text h2 { font-size: clamp(2.75rem, 6.8vw, 6.15rem); line-height: .94; }
body.large-text .eyebrow, body.large-text .question-topline p, body.large-text .result-status { font-size: .84rem; }
body.large-text .question-instruction { font-size: 1.2rem; line-height: 1.55; }
body.large-text .answer-button { min-height: 142px; padding: 24px; font-size: 1.23rem; line-height: 1.52; }
body.large-text .answer-button::before { font-size: .78rem; }
body.large-text .character-card small { font-size: 1.06rem; line-height: 1.45; }
body.large-text .character-card strong { font-size: 1.7rem; }
body.large-text .briefing, body.large-text .microcopy, body.large-text .trailer-note { font-size: .85rem; line-height: 1.7; }
body.large-text .primary-button, body.large-text .secondary-button { font-size: .9rem; line-height: 1.35; }
body.large-text .question-scene figcaption, body.large-text .expulsion-scene figcaption { font-size: .82rem; line-height: 1.35; }
body.large-text .result-book-bridge { font-size: 1.14rem; line-height: 1.62; }
body.large-text .result-notice span { font-size: .8rem; }
body.large-text .result-notice strong { font-size: 1.35rem; }
body.large-text .result-notice p { font-size: .94rem; line-height: 1.5; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }

@media (max-width: 640px) {
  .system-header { display: grid; grid-template-columns: 1fr; width: min(100% - 32px, 1180px); padding: 18px 0; font-size: .62rem; }
  .system-header p { max-width: 170px; line-height: 1.4; }
  .header-actions { justify-content: flex-start; flex-wrap: wrap; gap: 8px; }
  .sound-toggle, .text-size-toggle { padding: 4px 5px; font-size: .58rem; }
  .screen { width: min(100% - 32px, 900px); padding: 48px 0 92px; }
  .viewfinder { top: -20px; width: 112px; height: 112px; }
  .viewfinder b { font-size: 2rem; }
  .pixel-scene { height: 178px; margin-bottom: 30px; }
  h1 { max-width: 310px; font-size: clamp(3.3rem, 17vw, 4.8rem); }
  .deck { margin-top: 32px; }
  .intro-preface { margin-top: 16px; }
  .question-topline { grid-template-columns: 1fr; gap: 14px; margin-bottom: 44px; }
  .character-grid { grid-template-columns: 1fr; }
  .character-card { grid-template-columns: 96px minmax(0, 1fr); min-height: 126px; }
  .character-portrait { width: 96px; min-height: 126px; }
  .expulsion-scene { margin-top: 1.35rem; aspect-ratio: 16 / 8.5; }
  .approval-record { grid-template-columns: 116px minmax(0, 1fr); min-height: 178px; margin-top: 1.35rem; }
  .approval-portrait-frame { min-height: 178px; padding: 12px 0 0 12px; }
  .approval-portrait-frame img { min-height: 166px; }
  .approval-record figcaption { padding: 22px 14px 16px; }
  .approval-record figcaption > strong { margin-top: 8px; font-size: clamp(1.6rem, 9vw, 2.3rem); }
  .approval-record figcaption > b { top: 62px; right: 10px; padding: 6px 7px 5px; border-width: 2px; font-size: .67rem; }
  .approval-record figcaption > b em { font-size: .48rem; }
  .approval-record figcaption > span, .approval-record figcaption > small, .approval-record figcaption > i { font-size: .57rem; }
  .question-scene { width: 100%; margin: .72rem 0 .85rem; aspect-ratio: 4 / 3; }
  .question-instruction { margin: 18px 0 20px; }
  .answer-grid { grid-template-columns: 1fr; }
  .answer-button { min-height: 96px; }
  .result-metrics > div { padding: .78rem .46rem .72rem; }
  .result-metrics span { font-size: .54rem; }
  .site-footer { right: 16px; bottom: 12px; left: 16px; font-size: .6rem; }
  body.large-text h1 { max-width: 340px; font-size: clamp(3.65rem, 18vw, 5.3rem); }
  body.large-text h2 { font-size: clamp(2.7rem, 13.5vw, 4.25rem); }
  body.large-text .deck, body.large-text .result-copy { font-size: clamp(1.28rem, 6.2vw, 1.56rem); }
  body.large-text .intro-preface { font-size: clamp(1.13rem, 5.2vw, 1.35rem); }
  body.large-text .answer-button { min-height: 124px; padding: 22px; font-size: clamp(1.18rem, 5.35vw, 1.48rem); }
  body.large-text .character-card { grid-template-columns: 108px minmax(0, 1fr); min-height: 144px; }
  body.large-text .character-portrait { width: 108px; min-height: 144px; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition-duration: 0s !important; animation-duration: 0s !important; } }
