@font-face {
  font-family: "Vesta Pro";
  src: url("assets/fonts/VestaPro-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Vesta Pro";
  src: url("assets/fonts/VestaPro-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Vesta Pro";
  src: url("assets/fonts/VestaPro-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --red: #c8102e;
  --red-bright: #ef2345;
  --black: #000;
  --panel: #0c0c0e;
  --panel-2: #151518;
  --grey: #898d8d;
  --line: #343437;
  --white: #fff;
  --safe-top: max(18px, env(safe-area-inset-top));
  --safe-bottom: max(18px, env(safe-area-inset-bottom));
  font-family: "Vesta Pro", "Helvetica Neue", Arial, sans-serif;
  color: var(--white);
  background: var(--black);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; background: var(--black); }
body { min-width: 320px; overflow-x: hidden; }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--white); outline-offset: 3px; }

.app-shell { min-height: 100svh; background: var(--black); }
.screen { position: relative; min-height: 100svh; padding: var(--safe-top) clamp(18px, 5vw, 36px) var(--safe-bottom); overflow: hidden; isolation: isolate; }
.screen[hidden] { display: none !important; }
.screen.is-active { animation: screen-in .42s ease both; }

.brand-bar { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 18px; width: 100%; max-width: 1100px; margin: 0 auto; padding-bottom: 16px; border-bottom: 1px solid rgba(200, 16, 46, .75); }
.lockup { font-size: .84rem; font-weight: 400; letter-spacing: .12em; white-space: nowrap; }
.lockup span { color: var(--red); }
.lockup--small { font-size: .72rem; }
.prototype-tag { color: #b7b8b8; font-size: .68rem; font-weight: 700; letter-spacing: .13em; }
.text-button { border: 0; background: transparent; color: #c7c8c8; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }

.idle-screen { display: flex; flex-direction: column; background: radial-gradient(circle at 50% 38%, rgba(200,16,46,.16), transparent 28%), #000; }
.ambient-grid { position: absolute; inset: 0; z-index: -1; opacity: .18; background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(to bottom, transparent 0, #000 25%, #000 75%, transparent); }
.idle-content { width: min(100%, 1000px); flex: 1; display: grid; align-content: center; gap: 28px; margin: 0 auto; padding: 42px 0 26px; }
.idle-copy { max-width: 560px; }
.kicker, .step-label { margin: 0 0 10px; color: var(--red-bright); font-size: .78rem; font-weight: 700; letter-spacing: .17em; text-transform: uppercase; }
.idle-copy h1 { margin: 0; font-size: clamp(3rem, 14vw, 5.6rem); line-height: .83; letter-spacing: -.055em; text-transform: uppercase; white-space: pre-line; }
.idle-copy p:last-child { max-width: 430px; margin: 20px 0 0; color: #c8c9c9; font-size: 1rem; line-height: 1.5; }

.campaign-device { position: relative; border: 1px solid rgba(200,16,46,.62); background: linear-gradient(135deg, rgba(200,16,46,.13), rgba(255,255,255,.02)); box-shadow: 0 0 65px rgba(200,16,46,.14), inset 0 0 28px rgba(200,16,46,.08); }
.campaign-device--hero { min-width: 0; overflow: hidden; padding: 20px 18px 15px; }
.campaign-device::before, .campaign-device::after { content: ""; position: absolute; width: 18px; height: 18px; border-color: var(--red); }
.campaign-device::before { top: -1px; left: -1px; border-top: 2px solid; border-left: 2px solid; }
.campaign-device::after { right: -1px; bottom: -1px; border-right: 2px solid; border-bottom: 2px solid; }
.signal-label { margin-bottom: 10px; color: #d6d7d7; font-size: .62rem; letter-spacing: .19em; text-align: center; }
.campaign-digits { display: flex; align-items: flex-start; justify-content: center; gap: clamp(7px, 3vw, 20px); color: var(--red-bright); text-shadow: 0 0 16px rgba(239,35,69,.7); }
.campaign-digits div { display: grid; text-align: center; }
.campaign-digits strong { font-family: "SFMono-Regular", Consolas, monospace; font-size: clamp(2.25rem, 12vw, 5.1rem); font-weight: 400; letter-spacing: -.08em; line-height: .95; font-variant-numeric: tabular-nums; }
.campaign-digits i { margin-top: .08em; font-family: monospace; font-size: clamp(2rem, 10vw, 4.4rem); font-style: normal; line-height: 1; }
.campaign-digits span { margin-top: 7px; color: #a7a9a9; font-size: .56rem; letter-spacing: .14em; text-shadow: none; }
.signal-status { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 13px; color: #929494; font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; }
.signal-status span { width: 6px; height: 6px; border-radius: 50%; background: var(--red-bright); box-shadow: 0 0 10px var(--red-bright); animation: blink 1.35s ease-in-out infinite; }

.primary-button, .secondary-button { width: 100%; min-height: 58px; border: 0; border-radius: 0; cursor: pointer; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; transition: transform .16s ease, background .16s ease; }
.primary-button { position: relative; padding: 16px 22px; background: var(--red); box-shadow: 0 12px 35px rgba(200,16,46,.22); }
.primary-button:hover { background: #e01236; }
.primary-button:active, .secondary-button:active { transform: translateY(2px); }
.primary-button small { display: block; margin-top: 4px; color: rgba(255,255,255,.74); font-size: .64rem; font-weight: 400; letter-spacing: .05em; text-transform: none; }
.pulse-button::after { content: ""; position: absolute; inset: -1px; border: 1px solid var(--red); animation: pulse-ring 2s ease-out infinite; pointer-events: none; }
.secondary-button { border: 1px solid #57575a; background: transparent; color: #d8d9d9; }
.screen-footer { display: flex; justify-content: space-between; gap: 16px; color: #6f7171; font-size: .62rem; letter-spacing: .11em; text-transform: uppercase; }

.setup-screen { display: flex; flex-direction: column; background: linear-gradient(155deg, #000 50%, #110307); }
.setup-card { width: min(100%, 520px); margin: auto; padding: 42px 0; }
.setup-card h2 { margin: 0; font-size: clamp(2.4rem, 10vw, 4rem); line-height: .95; letter-spacing: -.035em; text-transform: uppercase; }
.setup-card > p:not(.step-label) { color: #aaa; line-height: 1.5; }
#playerForm { display: grid; gap: 12px; margin: 34px 0 28px; }
#playerForm label { color: #c6c7c7; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
#playerForm input { width: 100%; min-height: 58px; border: 1px solid #515153; border-radius: 0; background: #0b0b0d; color: #fff; padding: 0 16px; font-size: 1.08rem; }
#playerForm input::placeholder { color: #686a6a; }
.mechanic-note { display: flex; align-items: center; gap: 14px; padding: 16px 0; border-top: 1px solid #2f3032; border-bottom: 1px solid #2f3032; }
.mechanic-icon { display: grid; place-items: center; flex: 0 0 46px; height: 46px; border: 2px solid var(--red); border-radius: 50%; color: var(--red-bright); font-family: monospace; }
.mechanic-note strong, .mechanic-note small { display: block; }
.mechanic-note small { margin-top: 4px; color: #888a8a; line-height: 1.35; }

.quiz-screen { max-width: 1180px; margin: 0 auto; }
.quiz-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding-bottom: 14px; border-bottom: 1px solid rgba(200,16,46,.7); }
.campaign-mini { display: grid; justify-items: end; color: var(--red-bright); text-align: right; }
.campaign-mini span, .campaign-mini small { color: #9a9c9c; font-size: .48rem; letter-spacing: .12em; }
.campaign-mini strong { margin: 2px 0; font-family: monospace; font-size: .95rem; font-weight: 400; letter-spacing: .05em; text-shadow: 0 0 9px rgba(239,35,69,.5); }
.campaign-mini b { font-weight: 400; }
.progress-panel { margin: 20px 0 24px; }
.progress-copy { display: flex; justify-content: space-between; color: #9b9d9d; font-size: .67rem; letter-spacing: .12em; }
.progress-copy strong { color: #fff; }
.pathway { display: flex; align-items: center; margin-top: 11px; }
.path-node { flex: 0 0 10px; height: 10px; border: 2px solid #606163; border-radius: 50%; background: #000; transition: border-color .25s, background .25s, box-shadow .25s; }
.path-node.is-complete { border-color: var(--red); background: var(--red); box-shadow: 0 0 11px rgba(200,16,46,.6); }
.path-node.is-current { border-color: #fff; background: #fff; box-shadow: 0 0 10px rgba(255,255,255,.5); }
.path-line { flex: 1; height: 1px; background: #494a4c; }
.path-line.is-complete { background: var(--red); }
.path-end { margin-left: 10px; color: #b4b5b5; font-size: .55rem; letter-spacing: .11em; white-space: nowrap; }
.path-end.is-complete { color: #fff; text-shadow: 0 0 12px rgba(239,35,69,.9); }

.question-card { max-width: 760px; margin: 0 auto; padding-bottom: 30px; }
.question-topline { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.question-eyebrow { color: var(--red-bright); font-size: .74rem; font-weight: 700; letter-spacing: .16em; }
.answer-timer { display: flex; align-items: center; gap: 8px; border-left: 1px solid #46474a; padding-left: 12px; }
.answer-timer span { color: #8f9191; font-size: .5rem; letter-spacing: .1em; }
.answer-timer strong { display: grid; place-items: center; width: 42px; height: 42px; border: 2px solid var(--red); border-radius: 50%; color: #fff; font-family: monospace; font-size: 1.1rem; box-shadow: inset 0 0 12px rgba(200,16,46,.25); }
.answer-timer.is-low strong { color: var(--red-bright); animation: blink .75s ease-in-out infinite; }
.question-card h2 { margin: 22px 0 28px; font-size: clamp(1.85rem, 7.5vw, 3.4rem); line-height: 1.04; letter-spacing: -.028em; }
.question-notice { margin: -10px 0 22px; border-left: 3px solid var(--red); background: #151518; padding: 12px 14px; color: #c7c8c8; font-size: .82rem; line-height: 1.42; }
.question-notice[hidden] { display: none; }
.answer-options { display: grid; gap: 11px; }
.answer-option { display: grid; grid-template-columns: 36px 1fr; align-items: center; gap: 12px; width: 100%; min-height: 66px; border: 1px solid #393a3d; background: #0c0c0e; padding: 11px 14px; color: #f6f6f6; text-align: left; cursor: pointer; transition: border-color .18s, background .18s, transform .18s; }
.answer-option:hover { border-color: #858788; transform: translateX(3px); }
.answer-option .option-letter { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid #55575a; color: #aaa; font-size: .74rem; font-weight: 700; }
.answer-option:disabled { cursor: default; opacity: .6; transform: none; }
.answer-option.is-correct { border-color: #fff; background: #f7f7f7; color: #050505; opacity: 1; }
.answer-option.is-correct .option-letter { border-color: var(--red); background: var(--red); color: #fff; }
.answer-option.is-wrong { border-color: var(--red); background: rgba(200,16,46,.17); opacity: 1; }
.answer-option[aria-pressed="true"] { border-color: var(--red); background: rgba(200,16,46,.14); }
.answer-option.is-correct[aria-pressed="true"] { border-color: #fff; background: #f7f7f7; color: #050505; }
.answer-option.is-correct[aria-pressed="true"] .option-letter { border-color: var(--red); background: var(--red); color: #fff; }
.answer-submit { margin-top: 6px; }
.open-text-answer { width: 100%; min-height: 130px; resize: vertical; border: 1px solid #393a3d; border-radius: 0; background: #0c0c0e; color: #fff; padding: 15px; font: inherit; line-height: 1.45; }
.open-text-answer::placeholder { color: #767878; }

.feedback-panel { margin-top: 20px; border-left: 3px solid var(--red); background: #141416; padding: 18px; animation: reveal-up .3s ease both; }
.feedback-result { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
.feedback-result span { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: var(--red); font-size: .75rem; font-weight: 700; }
.feedback-result strong { font-size: .84rem; letter-spacing: .08em; text-transform: uppercase; }
.feedback-result b { color: var(--red-bright); font-size: .78rem; }
.feedback-panel p { margin: 14px 0 18px; color: #c5c6c6; line-height: 1.52; }
.feedback-panel .correct-answer { display: grid; gap: 3px; margin-bottom: -4px; padding-top: 12px; border-top: 1px solid #343437; }
.feedback-panel .correct-answer[hidden] { display: none; }
.correct-answer strong { color: #8f9191; font-size: .65rem; letter-spacing: .12em; text-transform: uppercase; }
.correct-answer span { color: #fff; font-weight: 700; }
.feedback-panel .primary-button { min-height: 50px; }

.result-screen { background: radial-gradient(circle at 50% 30%, rgba(200,16,46,.19), transparent 32%), #000; }
.result-flare { position: absolute; top: 15%; left: 50%; z-index: -1; width: 300px; height: 300px; transform: translateX(-50%); border-radius: 50%; border: 1px solid rgba(200,16,46,.26); box-shadow: 0 0 90px rgba(200,16,46,.15), inset 0 0 90px rgba(200,16,46,.1); }
.result-content { width: min(100%, 600px); margin: 48px auto 20px; text-align: center; }
.result-content h2 { margin: 0 0 28px; font-size: clamp(2.1rem, 8vw, 3.7rem); line-height: .9; letter-spacing: -.045em; text-transform: uppercase; }
.score-orbit { position: relative; display: grid; place-items: center; width: 212px; height: 212px; margin: 0 auto; border: 1px solid rgba(200,16,46,.65); border-radius: 50%; box-shadow: 0 0 48px rgba(200,16,46,.17); }
.score-orbit::after { content: ""; position: absolute; inset: 10px; border: 1px dashed #444; border-radius: 50%; animation: rotate 18s linear infinite; }
.score-orbit span, .score-orbit small { color: #8e9090; font-size: .58rem; letter-spacing: .15em; z-index: 1; }
.score-orbit strong { align-self: end; color: #fff; font-family: monospace; font-size: 3.3rem; letter-spacing: -.08em; line-height: .8; z-index: 1; }
.score-orbit small { align-self: start; }
.rank-line { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 3px 16px; margin: 28px 0 20px; border-top: 1px solid #3a3b3d; border-bottom: 1px solid #3a3b3d; padding: 14px 0; text-align: left; }
.rank-line span { color: #909292; font-size: .63rem; letter-spacing: .15em; }
.rank-line strong { grid-row: 1 / 3; grid-column: 2; color: var(--red-bright); font-size: 2.1rem; }
.rank-line small { color: #fff; }
.leaderboard-card { border: 1px solid #333437; background: #0b0b0d; padding: 18px; text-align: left; }
.leaderboard-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.leaderboard-heading h3 { margin: 0; font-size: .86rem; letter-spacing: .05em; text-transform: uppercase; }
.leaderboard-heading span { color: #767878; font-size: .57rem; letter-spacing: .12em; }
#leaderboardList { list-style: none; margin: 0; padding: 0; }
#leaderboardList li { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid #28292b; font-size: .9rem; }
#leaderboardList li:first-child { border-top: 0; }
#leaderboardList li.is-player { color: #fff; font-weight: 700; }
#leaderboardList li.is-player .leaderboard-rank { color: var(--red-bright); }
.leaderboard-rank { color: #777979; font-family: monospace; }
.leaderboard-score { color: #bcbebe; font-family: monospace; }
.result-actions { display: grid; gap: 10px; margin-top: 18px; }
.next-action-card { margin-top: 18px; border: 1px dashed #4a4b4d; padding: 16px; color: #8d8f8f; text-align: left; }
.next-action-card p { margin: 0 0 5px; color: #fff; font-size: .68rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.next-action-card span { font-size: .82rem; line-height: 1.4; }
.prototype-note { margin: 20px auto 0; color: #777979; font-size: .7rem; line-height: 1.45; }

@keyframes screen-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes reveal-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: .28; } }
@keyframes pulse-ring { 0% { opacity: .65; transform: scale(1); } 80%,100% { opacity: 0; transform: scale(1.045,1.16); } }
@keyframes rotate { to { transform: rotate(360deg); } }

@media (min-width: 760px) {
  .idle-content { grid-template-columns: minmax(0, 1.12fr) minmax(360px, .88fr); align-items: center; column-gap: 46px; }
  .campaign-device--hero .campaign-digits strong { font-size: clamp(3rem, 4.4vw, 4rem); }
  .campaign-device--hero { grid-column: 2; grid-row: 1 / span 2; }
  .idle-copy { grid-column: 1; grid-row: 1; align-self: end; }
  .pulse-button { grid-column: 1; grid-row: 2; align-self: start; }
  .quiz-screen { padding-inline: clamp(40px, 7vw, 86px); }
  .result-actions { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 380px) {
  .lockup { font-size: .7rem; }
  .prototype-tag { font-size: .55rem; }
  .campaign-mini span, .campaign-mini small { display: none; }
  .question-card h2 { font-size: 1.7rem; }
  .answer-option { min-height: 60px; font-size: .91rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
