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

:root {
  --ink: #1A2403;
  --lime: #C8FF01;
  --yellow: #FFCE00;
  --white: #FFFFFF;
  --paper: #f5f6ec;
  --muted: #69715a;
  --line: rgba(26, 36, 3, 0.13);
  --soft-lime: #e9f7b5;
  --danger: #a24422;
  --shadow: 0 18px 45px rgba(26, 36, 3, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Manrope', Arial, sans-serif;
}
button, select { font: inherit; }
button { cursor: pointer; }
.site-shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px clamp(22px, 5vw, 72px);
  background: var(--ink);
  color: var(--white);
  border-bottom: 4px solid var(--lime);
}
.brand { color: var(--white); text-decoration: none; display: inline-flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 38px; height: 38px; display: grid; place-items: center;
  color: var(--ink); background: var(--lime); border-radius: 50%;
  font-family: Georgia, serif; font-size: 27px; font-style: italic; font-weight: 700;
}
.brand-copy { display: grid; gap: 2px; letter-spacing: .08em; }
.brand-copy strong { font-size: 13px; }
.brand-copy small { color: #cbd1bd; font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: .04em; text-transform: uppercase; }
.header-note { color: #dce1d4; font-size: 12px; display: inline-flex; align-items: center; gap: 9px; }
.status-dot { width: 8px; height: 8px; background: var(--yellow); border-radius: 50%; box-shadow: 0 0 0 4px rgba(255, 206, 0, .15); }
main { flex: 1; }
.container { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.hero { padding: clamp(52px, 8vw, 100px) 0 54px; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(280px, .88fr); gap: clamp(36px, 7vw, 100px); align-items: end; }
.eyebrow { margin: 0 0 16px; color: var(--muted); font-family: 'DM Mono', monospace; font-size: 11px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow::before { content: ''; display: inline-block; width: 28px; height: 2px; margin: 0 10px 3px 0; background: var(--yellow); }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 720px; margin-bottom: 20px; font-size: clamp(38px, 5.5vw, 72px); line-height: .98; letter-spacing: -.065em; }
h1 em { font-style: normal; color: #7b9c00; }
.lead { max-width: 620px; color: #4d5840; font-size: clamp(16px, 1.9vw, 19px); line-height: 1.65; }
.hero-side { border-top: 1px solid var(--line); padding-top: 18px; }
.hero-side p { color: var(--muted); font-size: 13px; line-height: 1.65; }
.meta-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 24px; }
.meta-pill { border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; color: var(--muted); font-size: 11px; font-family: 'DM Mono', monospace; }
.name-form { max-width: 650px; margin-top: 30px; padding: 18px 0 0; border-top: 1px solid var(--line); }
.field-label { display: block; margin-bottom: 10px; color: var(--ink); font-size: 13px; font-weight: 800; }
.name-row { display: flex; gap: 9px; }
.name-input { flex: 1; min-width: 0; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 2px; padding: 14px 15px; font-size: 13px; }
.name-input:focus { outline: 2px solid var(--lime); outline-offset: 2px; }
.form-note { margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.section-intro { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-intro h2 { margin-bottom: 5px; font-size: 25px; letter-spacing: -.04em; }
.section-intro p { margin-bottom: 0; color: var(--muted); font-size: 13px; }
.section-kicker { color: var(--muted); font-family: 'DM Mono', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: .11em; }
.section-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.section-card {
  position: relative; overflow: hidden; min-height: 228px; padding: 23px;
  color: var(--white); background: var(--ink); border-radius: 4px;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: var(--shadow);
}
.section-card::after { content: ''; position: absolute; width: 150px; height: 150px; right: -52px; bottom: -65px; border: 1px solid rgba(200,255,1,.27); border-radius: 50%; box-shadow: 0 0 0 20px rgba(200,255,1,.04), 0 0 0 40px rgba(200,255,1,.03); }
.section-card:nth-child(2) { background: #263207; }
.section-card:nth-child(3) { background: #334000; }
.card-index { color: var(--lime); font-family: 'DM Mono', monospace; font-size: 12px; }
.section-card h3 { position: relative; z-index: 1; max-width: 190px; margin: 18px 0 8px; font-size: 22px; letter-spacing: -.045em; }
.section-card p { position: relative; z-index: 1; max-width: 235px; margin: 0; color: #d7dec9; font-size: 12px; line-height: 1.55; }
.topic-list { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 5px; margin-top: 20px; }
.topic-list span { color: #e9f7b5; font-size: 10px; border-bottom: 1px solid rgba(200,255,1,.35); padding-bottom: 2px; }
.leaderboard-section { padding: 0 0 78px; }
.leaderboard-note { margin: -7px 0 20px; color: var(--muted); font-size: 12px; }
.leaderboard-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.leaderboard-card { min-width: 0; overflow: hidden; background: var(--white); border: 1px solid var(--line); border-radius: 3px; box-shadow: 0 9px 28px rgba(26,36,3,.06); }
.leaderboard-card-head { padding: 18px 17px 15px; background: var(--ink); color: var(--white); border-bottom: 3px solid var(--lime); }
.leaderboard-card-head .card-index { color: var(--lime); }
.leaderboard-card-head h3 { margin: 13px 0 0; font-size: 17px; letter-spacing: -.04em; }
.leaderboard-list { padding: 3px 14px 8px; }
.leaderboard-row { display: grid; grid-template-columns: 25px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.leaderboard-row:last-child { border-bottom: 0; }
.leaderboard-row.leader { background: #f3f8d9; margin: 0 -7px; padding-left: 9px; padding-right: 9px; }
.rank { grid-row: span 2; color: #8b9578; font-family: 'DM Mono', monospace; font-size: 10px; }
.leaderboard-row strong { min-width: 0; overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.leaderboard-points { color: #718e00; font-family: 'DM Mono', monospace; font-size: 11px; font-weight: 700; }
.leaderboard-detail { grid-column: 2 / 4; margin-top: 3px; color: var(--muted); font-family: 'DM Mono', monospace; font-size: 9px; }
.empty-board { margin: 0; padding: 22px 17px 25px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.result-leaderboards { margin-top: 40px; padding: 0; }
.cta-row { display: flex; align-items: center; gap: 18px; margin-top: 35px; }
.primary-btn, .secondary-btn {
  border: 0; border-radius: 2px; padding: 14px 19px; font-size: 13px; font-weight: 800; transition: transform .18s ease, background .18s ease, color .18s ease;
}
.primary-btn { color: var(--ink); background: var(--lime); }
.primary-btn:hover, .primary-btn:focus-visible { background: var(--yellow); transform: translateY(-2px); }
.secondary-btn { color: var(--ink); background: transparent; border: 1px solid var(--line); }
.secondary-btn:hover, .secondary-btn:focus-visible { border-color: var(--ink); }
.text-note { color: var(--muted); font-size: 12px; }
.content-block { padding: 0 0 76px; }
.picker-wrap { padding: clamp(55px, 8vw, 92px) 0 100px; }
.picker-head { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 34px; }
.picker-head h1 { max-width: 650px; margin-bottom: 15px; font-size: clamp(38px, 5vw, 62px); }
.picker-head .lead { margin-bottom: 0; }
.progress-summary { flex: 0 0 145px; padding: 16px; border-top: 3px solid var(--yellow); }
.progress-summary strong { display: block; font-size: 39px; line-height: .95; letter-spacing: -.08em; }
.progress-summary span { display: block; margin-top: 7px; color: var(--muted); font-family: 'DM Mono', monospace; font-size: 10px; text-transform: uppercase; }
.choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }
.choice-card { min-height: 305px; display: flex; flex-direction: column; padding: 22px; color: var(--white); background: var(--ink); border: 1px solid var(--ink); border-radius: 3px; box-shadow: var(--shadow); }
.choice-card:nth-child(2) { background: #263207; }
.choice-card:nth-child(3) { background: #334000; }
.choice-card.completed { border-color: var(--lime); }
.choice-card-top { display: flex; justify-content: space-between; align-items: center; }
.done-label { color: var(--ink); background: var(--lime); padding: 5px 7px; font-family: 'DM Mono', monospace; font-size: 9px; text-transform: uppercase; }
.choice-card h2 { max-width: 220px; margin: 29px 0 8px; font-size: 23px; letter-spacing: -.05em; }
.choice-card p { min-height: 40px; margin-bottom: 17px; color: #d7dec9; font-size: 12px; line-height: 1.55; }
.choice-card .choice-score { margin-top: auto; margin-bottom: 17px; padding-top: 13px; border-top: 1px solid rgba(200,255,1,.25); }
.choice-score strong { display: block; color: var(--lime); font-size: 22px; letter-spacing: -.05em; }
.choice-score span { display: block; margin-top: 4px; color: #d7dec9; font-family: 'DM Mono', monospace; font-size: 9px; }
.choice-card .primary-btn { align-self: flex-start; }
.progress-wrap { padding: 22px 0 26px; border-top: 1px solid var(--line); }
.progress-top { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-family: 'DM Mono', monospace; font-size: 11px; text-transform: uppercase; }
.progress-track { height: 8px; margin-top: 12px; overflow: hidden; background: #e1e5d2; border-radius: 99px; }
.progress-fill { width: 0; height: 100%; background: var(--lime); transition: width .35s ease; }
.quiz-layout { display: grid; grid-template-columns: 180px minmax(0, 700px); gap: clamp(32px, 8vw, 110px); padding: 44px 0 80px; }
.quiz-aside { border-top: 3px solid var(--yellow); padding-top: 16px; }
.quiz-aside h2 { margin-bottom: 8px; font-size: 20px; letter-spacing: -.04em; }
.quiz-aside p { color: var(--muted); font-size: 12px; line-height: 1.55; }
.question-meta { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.type-badge { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); background: var(--soft-lime); border-radius: 999px; padding: 8px 11px; font-family: 'DM Mono', monospace; font-size: 10px; text-transform: uppercase; }
.type-badge::before { content: '↳'; color: #7b9c00; font-size: 13px; }
.question-count { color: var(--muted); font-family: 'DM Mono', monospace; font-size: 11px; }
.question-card { background: var(--white); border: 1px solid var(--line); border-radius: 3px; padding: clamp(23px, 4vw, 38px); box-shadow: var(--shadow); }
.question-card h1 { max-width: 670px; margin-bottom: 28px; font-size: clamp(23px, 3vw, 33px); line-height: 1.13; letter-spacing: -.05em; }
.option-list { display: grid; gap: 9px; }
.option {
  width: 100%; display: flex; align-items: flex-start; gap: 12px; text-align: left;
  color: var(--ink); background: #fafbf5; border: 1px solid var(--line); border-radius: 2px; padding: 14px 15px; font-size: 13px; line-height: 1.45; transition: border .15s ease, background .15s ease, transform .15s ease;
}
.option:hover, .option:focus-visible { border-color: #8cad00; background: #f3f8d9; transform: translateX(2px); }
.option.selected { border: 2px solid #8cad00; padding: 13px 14px; background: #eff8bd; }
.option.correct { border-color: #668400; background: #eaf5b0; }
.option.incorrect { border-color: #d49a83; background: #fff1ec; }
.option-letter { flex: 0 0 24px; width: 24px; height: 24px; display: grid; place-items: center; color: #59651e; border: 1px solid #b6c777; border-radius: 50%; font-family: 'DM Mono', monospace; font-size: 10px; }
.feedback { display: grid; grid-template-columns: 28px 1fr; gap: 11px; margin-top: 23px; padding: 15px; border-left: 4px solid var(--lime); background: #f4f8dc; }
.feedback.is-wrong { border-color: var(--danger); background: #fff4ef; }
.feedback-icon { font-weight: 800; font-size: 18px; }
.feedback strong { display: block; margin-bottom: 4px; font-size: 13px; }
.feedback p { margin: 0; color: #55604c; font-size: 12px; line-height: 1.55; }
.action-row { display: flex; justify-content: flex-end; margin-top: 25px; }
.submit-btn { min-width: 150px; border: 0; border-radius: 2px; color: var(--ink); background: var(--yellow); padding: 13px 18px; font-size: 12px; font-weight: 800; }
.submit-btn:disabled { color: #8f947f; background: #e3e6d7; cursor: not-allowed; }
.submit-btn:not(:disabled):hover, .submit-btn:not(:disabled):focus-visible { background: var(--lime); }
.match-grid { display: grid; gap: 9px; }
.match-row { display: grid; grid-template-columns: minmax(120px, .7fr) minmax(190px, 1.3fr); gap: 13px; align-items: center; border-bottom: 1px solid var(--line); padding: 10px 0; }
.match-row strong { font-size: 12px; }
.match-row select { width: 100%; color: var(--ink); background: #fafbf5; border: 1px solid var(--line); border-radius: 2px; padding: 11px 10px; font-size: 11px; }
.match-row select:focus { outline: 2px solid var(--lime); outline-offset: 2px; }
.section-complete, .result-wrap { max-width: 720px; margin: 0 auto; padding: clamp(65px, 10vw, 120px) 0 100px; }
.complete-mark { width: 58px; height: 58px; display: grid; place-items: center; margin-bottom: 25px; color: var(--ink); background: var(--lime); border-radius: 50%; font-size: 28px; font-weight: 800; }
.section-complete h1, .result-wrap h1 { max-width: none; margin-bottom: 14px; font-size: clamp(37px, 5vw, 62px); }
.complete-copy, .result-copy { max-width: 570px; color: var(--muted); line-height: 1.7; font-size: 15px; }
.score-strip { display: flex; gap: 0; margin: 32px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.score-item { flex: 1; padding: 17px 13px; border-right: 1px solid var(--line); }
.score-item:last-child { border-right: 0; }
.score-item span { display: block; color: var(--muted); font-family: 'DM Mono', monospace; font-size: 10px; text-transform: uppercase; }
.score-item strong { display: block; margin-top: 6px; font-size: 23px; letter-spacing: -.05em; }
.score-item strong small { display: inline; margin-left: 3px; color: var(--muted); font-size: 11px; letter-spacing: 0; }
.result-intro { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.big-score { flex: 0 0 auto; color: #718e00; font-size: clamp(57px, 9vw, 100px); font-weight: 800; line-height: .8; letter-spacing: -.09em; }
.result-card-list { display: grid; gap: 8px; margin: 35px 0; }
.result-card { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 15px 17px; background: var(--white); border: 1px solid var(--line); }
.result-card small { color: var(--muted); font-family: 'DM Mono', monospace; font-size: 10px; }
.result-card strong { font-size: 14px; }
.result-card b { color: #718e00; font-family: 'DM Mono', monospace; font-size: 13px; }
.footer { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 19px clamp(22px, 5vw, 72px); color: #7b836d; background: #e7eadc; font-family: 'DM Mono', monospace; font-size: 9px; letter-spacing: .03em; }
.footer-rule { flex: 1; max-width: 160px; height: 1px; background: #cbd1bb; }
.fade-in { animation: appear .34s ease both; }
@keyframes appear { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 780px) {
  .topbar { align-items: flex-start; padding: 17px 20px; }
  .header-note { padding-top: 7px; font-size: 10px; text-align: right; }
  .container { width: min(100% - 32px, 650px); }
  .hero { grid-template-columns: 1fr; padding-top: 54px; gap: 30px; }
  .hero-side { max-width: 500px; }
  .section-cards { grid-template-columns: 1fr; }
  .section-card { min-height: 175px; }
  .leaderboard-grid { grid-template-columns: 1fr; }
  .leaderboard-card-head h3 { font-size: 19px; }
  .leaderboard-row { grid-template-columns: 30px minmax(0, 1fr) auto; }
  .picker-head { align-items: flex-start; flex-direction: column; }
  .progress-summary { flex-basis: auto; width: 145px; }
  .choice-grid { grid-template-columns: 1fr; }
  .choice-card { min-height: 245px; }
  .quiz-layout { grid-template-columns: 1fr; gap: 25px; padding-top: 27px; }
  .quiz-aside { max-width: 480px; }
  .footer { align-items: flex-start; flex-direction: column; gap: 7px; }
  .footer-rule { width: 50px; flex: 0 0 auto; }
}
@media (max-width: 470px) {
  .brand-copy strong { font-size: 11px; }
  .brand-copy small { font-size: 8px; }
  .header-note { max-width: 125px; }
  .cta-row { align-items: flex-start; flex-direction: column; gap: 12px; }
  .name-row { align-items: stretch; flex-direction: column; }
  .name-row .primary-btn { width: 100%; }
  .match-row { grid-template-columns: 1fr; gap: 7px; }
  .result-intro { align-items: flex-start; flex-direction: column-reverse; gap: 25px; }
  .score-strip { flex-wrap: wrap; }
  .score-item { min-width: 50%; }
  .score-item:nth-child(2) { border-right: 0; }
}
