:root {
  --ink: #e9eee8;
  --muted: #8e9a92;
  --dim: #526058;
  --black: #090c0d;
  --panel: #111617;
  --panel-2: #151b1b;
  --line: #2a3330;
  --acid: #c6ff3d;
  --acid-dim: #769726;
  --rust: #fa6b46;
  --paper: #d8d9ca;
  --mono: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--black); color: var(--ink); font-family: var(--sans); }
button, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: var(--acid); }

.noise { position: fixed; inset: 0; pointer-events: none; opacity: .035; z-index: 20; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E"); }
.site-header { height: 76px; padding: 0 clamp(20px, 4vw, 64px); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 5; }
.wordmark { color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 14px; font: 500 12px/1 var(--mono); letter-spacing: .1em; }
.wordmark-mark { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--acid); color: var(--acid); transform: rotate(-4deg); }
.header-actions { display: flex; align-items: center; gap: 28px; }
.live-count { font: 400 10px/1 var(--mono); letter-spacing: .08em; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.live-count i { width: 6px; height: 6px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 12px var(--acid); }
.text-button, .keyring-button { border: 0; background: none; font: 500 10px/1 var(--mono); letter-spacing: .1em; cursor: pointer; padding: 10px 0; }
.text-button:hover, .keyring-button:hover { color: var(--acid); }

main { min-height: calc(100vh - 126px); }
.screen { display: none; animation: reveal .45s ease both; }
.screen.is-active { display: block; }
@keyframes reveal { from { opacity: 0; transform: translateY(9px); } }
.hero-screen { padding: clamp(50px, 8vw, 112px) clamp(20px, 6vw, 92px) 0; }
.hero-grid { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 7vw; }
.eyebrow { color: var(--acid); font: 500 10px/1.4 var(--mono); letter-spacing: .16em; margin: 0 0 24px; }
h1, h2 { margin: 0; font-weight: 500; letter-spacing: -.045em; line-height: .99; }
h1 { font-size: clamp(48px, 7.2vw, 104px); max-width: 850px; }
h1 em, h2 em { color: var(--acid); font-style: normal; }
.hero-lede { color: var(--muted); font-size: clamp(16px, 1.5vw, 20px); line-height: 1.7; max-width: 650px; margin: 32px 0 38px; }
.primary-button, .secondary-button { min-height: 58px; border: 0; cursor: pointer; font: 600 11px/1 var(--mono); letter-spacing: .12em; display: inline-flex; align-items: center; justify-content: space-between; gap: 48px; padding: 0 22px; transition: transform .15s ease, background .15s ease; }
.primary-button { background: var(--acid); color: #10140c; min-width: 260px; }
.primary-button:hover { background: #d5ff70; transform: translateY(-2px); }
.primary-button:disabled { opacity: .4; cursor: wait; transform: none; }
.secondary-button { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.secondary-button:hover { border-color: var(--acid); color: var(--acid); }
.time-note, .privacy-line { color: var(--dim); font: 400 10px/1.6 var(--mono); margin-top: 18px; }

.lock-visual { aspect-ratio: 1; max-width: 540px; width: 100%; margin: auto; position: relative; display: grid; place-items: center; }
.lock-visual::before, .lock-visual::after { content: ''; position: absolute; background: var(--line); }
.lock-visual::before { width: 100%; height: 1px; }
.lock-visual::after { width: 1px; height: 100%; }
.orbit { position: absolute; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: start center; }
.orbit span { transform: translateY(-50%); background: var(--black); padding: 0 10px; color: var(--dim); font: 400 9px/1 var(--mono); letter-spacing: .15em; }
.orbit-one { width: 72%; height: 72%; animation: turn 28s linear infinite; }
.orbit-two { width: 94%; height: 94%; border-style: dashed; animation: turn 46s linear infinite reverse; }
@keyframes turn { to { transform: rotate(360deg); } }
.lock-core { width: 34%; height: 34%; border: 1px solid var(--acid); background: radial-gradient(circle, #222d18, #0b0e0f 68%); display: grid; place-items: center; clip-path: polygon(50% 0, 91% 24%, 91% 76%, 50% 100%, 9% 76%, 9% 24%); z-index: 1; }
.lock-core span { color: var(--acid); font: 300 clamp(48px, 8vw, 92px)/1 var(--mono); }
.coordinate { position: absolute; color: var(--dim); font: 400 8px/1 var(--mono); letter-spacing: .1em; }
.coordinate-a { top: 6%; left: 5%; }.coordinate-b { right: 2%; bottom: 18%; }.coordinate-c { bottom: 3%; left: 22%; }
.premise-strip { max-width: 1280px; margin: 80px auto 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 180px 1fr; gap: 30px; padding: 24px 0 32px; }
.premise-strip span { color: var(--acid); font: 500 9px/1.5 var(--mono); letter-spacing: .14em; }
.premise-strip p { margin: 0; color: var(--muted); max-width: 740px; line-height: 1.6; }

.profile-screen, .game-screen, .submit-screen, .result-screen { max-width: 1160px; margin: 0 auto; padding: clamp(48px, 7vw, 92px) 24px; }
.panel-heading { max-width: 760px; }
h2 { font-size: clamp(38px, 5vw, 70px); }
.panel-heading > p:last-child, .submit-grid > div > p:last-child { color: var(--muted); font-size: 17px; line-height: 1.7; max-width: 620px; }
.profile-form { margin-top: 54px; display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.profile-form label, fieldset { color: var(--muted); font: 500 10px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
select { appearance: none; width: 100%; margin-top: 10px; padding: 17px 42px 17px 16px; border: 1px solid var(--line); border-radius: 0; background: var(--panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23c6ff3d'/%3E%3C/svg%3E") no-repeat right 16px center; color: var(--ink); text-transform: none; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { margin-bottom: 10px; }
.scale { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.scale label { position: relative; }
.scale input { position: absolute; opacity: 0; }
.scale span { height: 52px; border: 1px solid var(--line); background: var(--panel); display: grid; place-items: center; color: var(--muted); cursor: pointer; }
.scale input:checked + span { border-color: var(--acid); color: var(--acid); background: #182014; }
.profile-form .primary-button { grid-column: 1 / -1; margin-top: 12px; }
.privacy-line { max-width: 800px; margin-top: 30px; }

.game-topline { display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.game-topline h2 { font-size: clamp(34px, 4.5vw, 60px); }
.keyring-button { border: 1px solid var(--line); padding: 13px 16px; white-space: nowrap; }
.progress-track { appearance: none; display: block; width: 100%; height: 2px; border: 0; background: var(--line); margin: 30px 0 44px; }
.progress-track::-webkit-progress-bar { background: var(--line); }
.progress-track::-webkit-progress-value { background: var(--acid); transition: width .35s ease; }
.progress-track::-moz-progress-bar { background: var(--acid); }
.fragments { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fragment { background: var(--paper); color: #1d211c; min-height: 270px; padding: clamp(22px, 3vw, 38px); position: relative; overflow: hidden; }
.fragment::after { content: attr(data-mark); position: absolute; right: 12px; bottom: -18px; color: rgba(20, 25, 20, .06); font: 700 92px/1 var(--mono); }
.fragment-head { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid rgba(20, 25, 20, .2); padding-bottom: 13px; margin-bottom: 22px; color: #50564d; font: 500 9px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.fragment blockquote { margin: 0; font: 400 clamp(14px, 1.35vw, 17px)/1.75 var(--mono); position: relative; z-index: 1; }
.question-panel { margin-top: 18px; border: 1px solid var(--line); background: var(--panel); padding: clamp(22px, 3vw, 38px); }
.step-index { color: var(--acid); font: 500 9px/1 var(--mono); letter-spacing: .14em; }
.question-panel h3 { font-size: clamp(22px, 2.4vw, 32px); margin: 12px 0 10px; font-weight: 500; }
.question-help { color: var(--muted); line-height: 1.6; margin: 0 0 26px; }
.choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; }
.choice span { min-height: 82px; height: 100%; border: 1px solid var(--line); padding: 14px; cursor: pointer; display: flex; flex-direction: column; gap: 7px; background: var(--panel-2); transition: border .15s ease, background .15s ease; }
.choice b { font-size: 13px; font-weight: 600; }.choice small { color: var(--muted); font: 400 9px/1.4 var(--mono); }
.choice input:checked + span { border-color: var(--acid); background: #182014; box-shadow: inset 3px 0 0 var(--acid); }
.choice input:focus-visible + span { outline: 2px solid var(--acid); outline-offset: 2px; }
.binary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.binary-question { border: 1px solid var(--line); padding: 18px; }
.binary-question > span { display: block; min-height: 42px; font-size: 13px; line-height: 1.5; }
.binary-options { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 12px; }
.binary-options label { position: relative; }.binary-options input { position: absolute; opacity: 0; }
.binary-options b { border: 1px solid var(--line); display: grid; place-items: center; padding: 10px; font: 500 10px/1 var(--mono); cursor: pointer; }
.binary-options input:checked + b { border-color: var(--acid); color: var(--acid); background: #182014; }
.verdict-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.confidence-row { margin-top: 24px; display: grid; grid-template-columns: 170px 1fr; align-items: center; gap: 16px; color: var(--muted); font: 500 10px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.note-field { display: block; margin-top: 20px; color: var(--muted); font: 500 10px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .08em; }
textarea { display: block; width: 100%; resize: vertical; min-height: 86px; margin-top: 9px; background: #0d1112; border: 1px solid var(--line); color: var(--ink); padding: 14px; font: 400 13px/1.5 var(--mono); }
.round-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; }
.round-actions .primary-button { margin-left: auto; }

.submit-grid, .result-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 8vw; align-items: center; min-height: 58vh; }
.seal-card { border: 1px solid var(--line); padding: 30px; background: var(--panel); }
.check-row { display: flex; align-items: flex-start; gap: 13px; color: var(--muted); line-height: 1.55; margin-bottom: 24px; }
.check-row input { accent-color: var(--acid); width: 18px; height: 18px; flex: 0 0 auto; }
.seal-card .primary-button { width: 100%; }
.form-error { min-height: 20px; color: var(--rust); font: 400 11px/1.5 var(--mono); }
.score-seal { position: relative; max-width: 420px; margin: auto; }
.score-seal svg { width: 100%; transform: rotate(-90deg); }
.score-track, .score-ring { fill: none; stroke-width: 3; }
.score-track { stroke: var(--line); }.score-ring { stroke: var(--acid); stroke-linecap: square; stroke-dasharray: 578; stroke-dashoffset: 578; transition: stroke-dashoffset 1.1s cubic-bezier(.2,.8,.2,1); }
.score-number { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.score-number strong { font: 300 clamp(70px, 10vw, 118px)/.9 var(--mono); letter-spacing: -.08em; }
.score-number span { color: var(--muted); font: 400 10px/1 var(--mono); margin-top: 12px; }
.result-copy h2 { font-size: clamp(36px, 4vw, 58px); }
.result-copy > p { color: var(--muted); line-height: 1.7; }
.score-breakdown { margin: 30px 0; border-top: 1px solid var(--line); }
.score-breakdown div { border-bottom: 1px solid var(--line); padding: 14px 0; display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; }
.score-breakdown strong { color: var(--ink); font: 500 13px/1 var(--mono); }
.caveat { font-size: 12px; border-left: 2px solid var(--rust); padding-left: 14px; }
.receipt { margin: 24px 0 12px; display: flex; gap: 12px; color: var(--dim); font: 400 9px/1.5 var(--mono); }
.receipt code { color: var(--muted); overflow-wrap: anywhere; }

footer { min-height: 50px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 0 clamp(20px, 4vw, 64px); color: var(--dim); font: 400 8px/1.4 var(--mono); letter-spacing: .12em; }
dialog { width: min(760px, calc(100% - 32px)); max-height: calc(100vh - 40px); padding: 0; border: 1px solid var(--line); background: var(--panel); color: var(--ink); box-shadow: 0 30px 100px #000; }
dialog::backdrop { background: rgba(0,0,0,.8); backdrop-filter: blur(5px); }
.dialog-head { position: sticky; top: 0; z-index: 1; background: var(--acid); color: #11150d; padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; font: 600 10px/1 var(--mono); letter-spacing: .1em; }
.dialog-head button { border: 0; background: none; color: inherit; font-size: 24px; cursor: pointer; }
.dialog-body { padding: clamp(24px, 5vw, 50px); color: var(--muted); line-height: 1.7; }
.dialog-body h2 { color: var(--ink); font-size: clamp(28px, 4vw, 44px); }.dialog-body h3 { color: var(--acid); font: 500 10px/1 var(--mono); letter-spacing: .12em; margin-top: 30px; }
.keyring-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 24px; }
.key-card { border: 1px solid var(--line); padding: 15px; }.key-card strong { display: block; color: var(--ink); font-size: 13px; }.key-card code { color: var(--acid); font-size: 9px; }.key-card p { font-size: 12px; margin: 8px 0 0; }

@media (max-width: 820px) {
  .hero-grid, .submit-grid, .result-grid { grid-template-columns: 1fr; }
  .lock-visual { max-width: 400px; margin-top: 45px; }
  .profile-form, .fragments { grid-template-columns: 1fr; }
  .choice-grid, .verdict-grid { grid-template-columns: 1fr 1fr; }
  .binary-grid { grid-template-columns: 1fr; }
  .fragment { min-height: auto; }
  .header-actions .text-button { display: none; }
}
@media (max-width: 520px) {
  .site-header { height: 64px; }.wordmark > span:last-child { display: none; }.live-count { font-size: 8px; }
  .hero-screen { padding-top: 48px; }.premise-strip { grid-template-columns: 1fr; margin-top: 52px; }
  .profile-form { gap: 20px; }.scale { grid-template-columns: 1fr 1fr; }
  .game-topline { align-items: start; }.keyring-button { font-size: 0; }.keyring-button span { font-size: 18px; }
  .choice-grid, .verdict-grid, .keyring-list { grid-template-columns: 1fr; }
  .confidence-row { grid-template-columns: 1fr; }
  .round-actions { flex-direction: column-reverse; }.round-actions button { width: 100%; }
  footer { padding-block: 16px; flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
