@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700&family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700&display=swap');

:root {
    color-scheme: dark;
    --forest: #101714;
    --panel: #19211d;
    --line: #334139;
    --muted: #94a198;
    --paper: #e7ece6;
    --signal: #d5f15d;
    --rust: #e18d5c;
    --danger: #ff9b8c;
    --display: 'Barlow Condensed', Impact, sans-serif;
    --body: 'Manrope', sans-serif;
    --mono: 'DM Mono', monospace;
}
.theme-light {
    color-scheme: light;
    --forest: #f3f5ef;
    --panel: #ffffff;
    --line: #cbd4ca;
    --muted: #657067;
    --paper: #172018;
    --rust: #b86435;
    --danger: #b4362a;
}

* { box-sizing: border-box; }
body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: var(--paper);
    background-color: var(--forest);
    background-image: linear-gradient(rgba(231, 236, 230, .025) 1px, transparent 1px), linear-gradient(90deg, rgba(231, 236, 230, .025) 1px, transparent 1px), radial-gradient(ellipse at 52% 20%, #26332b 0, transparent 54%);
    background-size: 36px 36px, 36px 36px, auto;
    background-position: center;
    background-attachment: fixed;
    background-repeat: repeat, repeat, no-repeat;
    background-size: 36px 36px, 36px 36px, cover;
    font-family: var(--body);
    animation: appear .55s ease-out both;
}
button, input { font: inherit; }
[hidden] { display: none !important; }
.topbar { height: 72px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 clamp(20px, 5vw, 76px); border-bottom: 1px solid rgba(231, 236, 230, .12); }
.wordmark { display: inline-flex; align-items: center; gap: 10px; width: max-content; color: var(--paper); font: 700 17px var(--display); text-decoration: none; }
.wordmark-mark { display: grid; width: 28px; aspect-ratio: 1; place-items: center; border: 1px solid var(--signal); color: var(--signal); font: 700 16px var(--display); }
.topbar-status, .admin-link, .eyebrow, .stage-counter, .route-label, .route-coordinates, .kicker, .panel-topline, .answer-form label, .answer-row button, .watch-status, .challenge-footer, .complete-stamp, .side-note { font-family: var(--mono); }
.topbar-status { display: flex; align-items: center; gap: 9px; color: #c6d0c8; font-size: 10px; }
.status-dot { width: 7px; aspect-ratio: 1; border-radius: 50%; background: var(--signal); box-shadow: 0 0 10px rgba(213, 241, 93, .6); }
.admin-link { justify-self: end; color: var(--muted); font-size: 10px; text-decoration: none; }
.admin-link:hover { color: var(--signal); }
.layout { width: min(760px, calc(100% - 40px)); min-height: calc(100vh - 72px); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; padding: 62px 0 32px; }
.route-index { display: none; padding-top: 10px; color: var(--muted); }
.route-label { color: var(--signal); font-size: 10px; line-height: 1.7; }
.route-line { display: flex; align-items: center; width: 88px; margin: 22px 0 16px; }
.route-line::before { content: ''; width: 27px; height: 1px; background: var(--line); }
.route-node { width: 8px; height: 8px; margin-left: 8px; border: 1px solid var(--muted); border-radius: 50%; }
.route-node:first-of-type { border-color: var(--signal); background: var(--signal); }
.route-coordinates { font-size: 9px; line-height: 1.8; }
.side-note { display: none; flex-direction: column; align-items: center; gap: 16px; padding-top: 10px; color: #78847c; font-size: 9px; line-height: 1.8; text-align: center; }
.side-note-line { width: 1px; height: 55px; background: var(--line); }
.side-note-mark { color: var(--rust); font-size: 16px; }
.challenge { min-width: 0; }
.challenge-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); }
.eyebrow, .stage-counter { font-size: 10px; }
.eyebrow { color: #bcc8bf; }
.meta-divider { padding: 0 7px; color: var(--rust); }
.stage-counter { color: var(--signal); white-space: nowrap; }
.progress-track, .watch-track { overflow: hidden; height: 2px; background: #39443d; }
.progress-track { margin-top: 13px; }
.progress-track span, .watch-track span { display: block; height: 100%; background: var(--signal); transition: width .35s ease; }
.intro-block { padding: 47px 0 28px; animation: rise .5s .08s both; }
.kicker { margin: 0 0 12px; color: var(--rust); font-size: 10px; }
h1, h2 { margin: 0; font-family: var(--display); font-weight: 600; }
h1 { max-width: 100%; font-size: clamp(54px, 10vw, 88px); line-height: .84; text-transform: uppercase; }
h1 em { color: var(--signal); font-style: normal; }
.intro-copy { max-width: 520px; margin: 17px 0 0; color: #aeb8b0; font-size: 13px; line-height: 1.8; }
.checker-create { margin-top: 24px; color: var(--paper); }
.create-checker-link { display: inline-flex; align-items: center; gap: 10px; margin-top: 9px; color: var(--signal); font: 10px var(--mono); text-decoration: none; }
.create-checker-link.is-prominent { margin-top: 18px; padding: 16px 18px; border: 1px solid var(--signal); background: rgba(213, 241, 93, .08); font-size: 13px; }
.landing-layout { min-height: calc(100vh - 72px); align-items: center; }
.landing-intro { padding-top: 70px; padding-bottom: 70px; }
.stage-panel { min-width: 0; padding: clamp(18px, 3vw, 24px); border: 1px solid var(--line); background: linear-gradient(135deg, rgba(32, 42, 37, .95), rgba(22, 30, 26, .97)); box-shadow: 0 12px 38px rgba(0, 0, 0, .14); animation: rise .5s .16s both; }
.theme-light .stage-panel { background: linear-gradient(135deg, rgba(248, 250, 244, .96), rgba(232, 237, 228, .96)); box-shadow: 0 12px 38px rgba(23, 32, 24, .12); }
.panel-topline { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; color: var(--muted); font-size: 9px; }
.theme-light .panel-topline { color: #465047; }
.panel-index { display: grid; width: 27px; aspect-ratio: 1; place-items: center; border: 1px solid var(--rust); color: var(--rust); }
.panel-tag { letter-spacing: 0; }
.stage-panel h2 { font-size: 24px; line-height: 1.05; }
.question-text { margin: 8px 0 18px; color: #c4cdc6; font-size: 14px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.theme-light .question-text, .theme-light .complete-view h2, .theme-light .previous-view h2 { color: #172018; }
.answer-form { margin-top: 18px; }
.answer-form label { display: block; margin-bottom: 9px; color: #aeb8b0; font-size: 10px; }
.theme-light .answer-form label { color: #465047; }
.multi-answer-form { display: grid; gap: 14px; }
.multi-question-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 10px; align-items: end; color: #c4cdc6; font-size: 14px; }
.theme-light .multi-question-row { color: #172018; }
.multi-question-row input, .multi-question-row img, .multi-question-row audio { grid-column: 1 / -1; }
.multi-question-row input { width: 100%; min-width: 0; height: 38px; padding: 0 11px; border: 1px solid #526057; color: var(--paper); background: #111915; }
.multi-question-row input.is-correct { border-color: #6fe28a; box-shadow: 0 0 0 1px rgba(111, 226, 138, .3); }
.multi-question-row input.is-wrong { border-color: var(--danger); box-shadow: 0 0 0 1px rgba(255, 155, 140, .24); }
.answer-feedback { font: 18px var(--mono); line-height: 1; }
.answer-feedback.is-correct { color: #6fe28a; }
.answer-feedback.is-wrong { color: var(--danger); }
.theme-light .multi-question-row input { color: #172018; background: #ffffff; border-color: #7b867d; }
.question-media-image { width: 96px; max-height: 72px; object-fit: cover; border: 1px solid var(--line); transition: transform .18s ease, box-shadow .18s ease; transform-origin: left top; }
.question-media-image:hover { position: relative; z-index: 3; transform: scale(2.5); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.question-media-audio { width: min(100%, 320px); height: 34px; }
.answer-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; }
.answer-row input { min-width: 0; height: 48px; padding: 0 13px; border: 1px solid #526057; border-radius: 0; outline: none; color: var(--paper); background: #111915; }
.theme-light .answer-row input { color: #172018; background: #ffffff; border-color: #7b867d; }
.theme-light .answer-row input::placeholder { color: #68736b; }
.answer-row input:focus { border-color: var(--signal); box-shadow: 0 0 0 2px rgba(213, 241, 93, .12); }
.answer-row button, .continue-button { display: inline-flex; min-width: 116px; align-items: center; justify-content: space-between; gap: 12px; padding: 0 14px; border: 0; color: #131912; background: var(--signal); cursor: pointer; font-family: var(--mono); font-size: 10px; font-weight: 500; }
.answer-row button { height: 48px; }
.answer-row button:hover, .continue-button:hover { filter: brightness(1.08); }
.answer-row button:disabled { opacity: .55; cursor: wait; }
.answer-row button span:last-child, .continue-button span { font: 18px var(--body); }
.continue-button { width: 100%; min-height: 46px; margin-top: 18px; }
.feedback { min-height: 18px; margin: 13px 0 0; color: var(--signal); font-size: 12px; line-height: 1.5; }
.feedback.is-error { color: var(--danger); }
.video-instruction, .empty-view p { color: #bac4bc; font-size: 13px; line-height: 1.75; }
.video-instruction strong { color: var(--signal); font-weight: 600; }
.player-frame { aspect-ratio: 16 / 9; margin-top: 18px; background: #080c0a; }
.player-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.watch-status { display: flex; justify-content: space-between; gap: 12px; margin: 14px 0 8px; color: var(--muted); font-size: 9px; }
.watch-percent { color: var(--signal); }
.watch-track { height: 3px; }
.watch-track span { background: var(--rust); }
.complete-stamp { margin: 10px 0 13px; color: var(--signal); font-size: 10px; }
.complete-view h2 { max-width: 520px; font-size: clamp(30px, 6vw, 52px); line-height: 1; overflow-wrap: anywhere; }
.final-value-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: stretch; margin-top: 19px; }
.final-value { margin: 0; padding: 15px; border-left: 2px solid var(--rust); color: var(--signal); background: rgba(213, 241, 93, .06); font-family: var(--mono); font-size: 15px; overflow-wrap: anywhere; }
.copy-button { min-width: 48px; border: 1px solid var(--line); color: var(--paper); background: rgba(25, 33, 29, .75); cursor: pointer; font-size: 18px; }
.theme-light .copy-button { color: #172018; background: #eef2e8; border-color: #9ea89f; }
.theme-light .final-value { color: #5b3f00; background: #fff8d8; border-left-color: var(--signal); }
.copy-button:hover { border-color: var(--signal); color: var(--signal); }
.final-image { display: block; width: min(100%, 560px); max-height: 360px; object-fit: cover; margin-top: 20px; border: 1px solid var(--line); }
.back-button { margin-top: 14px; padding: 0; border: 0; color: var(--muted); background: transparent; cursor: pointer; font: 10px var(--mono); }
.back-button:hover { color: var(--signal); }
.challenge-footer { display: flex; justify-content: space-between; gap: 15px; margin-top: 24px; color: #66736a; font-size: 8px; }
@keyframes appear { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 800px) {
    .layout { width: min(700px, calc(100% - 36px)); grid-template-columns: minmax(0, 1fr); padding-top: 42px; }
    .route-index, .side-note { display: none; }
}
@media (max-width: 520px) {
    .topbar { height: 60px; padding: 0 18px; }
    .topbar-status { font-size: 8px; }
    .admin-link { font-size: 9px; }
    .layout { min-height: calc(100vh - 60px); width: calc(100% - 32px); padding-top: 31px; }
    .intro-block { padding: 39px 0 28px; }
    h1 { font-size: 60px; }
    .intro-copy { font-size: 12px; }
    .stage-panel { padding: 20px 16px; }
    .answer-row { grid-template-columns: minmax(0, 1fr); }
    .answer-row button { height: 46px; }
    .challenge-footer { font-size: 7px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}