:root{
  --red: #C4122F;
  --red-dark: #8E0C22;
  --ink: #14100F;
  --paper: #FAF9F6;
  --line: #E4DFD8;
  --slate: #6B655D;
  --green: #1E8E5A;
  --amber: #C4741E;
  --ink-panel: #1B1613;
  --ink-panel-line: #332B26;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --sans: 'Inter', system-ui, sans-serif;
  --radius: 2px;
}

*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{
  background:var(--paper);
  color:var(--ink);
  font-family:var(--sans);
  min-height:100vh;
  -webkit-font-smoothing:antialiased;
}
@media (prefers-reduced-motion: reduce){
  *{animation-duration:0.001ms !important; transition-duration:0.001ms !important;}
}

/* ---------- topbar ---------- */
.topbar{
  border-bottom:2px solid var(--ink);
  padding:18px 24px;
  background:var(--paper);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  position:sticky;
  top:0;
  z-index:10;
}
.brand{display:flex; align-items:baseline; gap:8px; flex-wrap:wrap;}
.brand-mark{
  font-family:var(--mono);
  font-weight:700;
  color:var(--red);
  font-size:1.1rem;
}
.brand-text{
  font-family:var(--mono);
  font-weight:700;
  font-size:1rem;
  letter-spacing:0.02em;
  display:flex;
  align-items:baseline;
  gap:8px;
  flex-wrap:wrap;
}
.brand-accent{color:var(--red);}
.brand-sub{
  display:block;
  width:100%;
  font-family:var(--sans);
  font-weight:600;
  font-size:0.6rem;
  letter-spacing:0.16em;
  color:var(--slate);
  margin-top:1px;
}
.topbar-cta{
  font-family:var(--sans);
  font-weight:700;
  font-size:0.82rem;
  color:#fff;
  background:var(--ink);
  padding:9px 16px;
  border-radius:var(--radius);
  text-decoration:none;
  white-space:nowrap;
  transition:background .15s ease;
}
.topbar-cta:hover{background:var(--red);}

/* ---------- layout ---------- */
#app{
  max-width:760px;
  margin:0 auto;
  padding:0 20px 80px;
}
.screen{width:100%;}

/* ---------- full-bleed photo hero (GoMyCode-style) ---------- */
.hero-photo{
  position:relative;
  left:50%;
  right:50%;
  margin-left:-50vw;
  margin-right:-50vw;
  width:100vw;
  min-height:560px;
  background-image:
    linear-gradient(100deg, rgba(20,16,15,0.88) 0%, rgba(20,16,15,0.62) 42%, rgba(20,16,15,0.18) 75%),
    url('https://images.unsplash.com/photo-1713947501966-34897f21162e?fm=jpg&q=80&w=2400&auto=format&fit=crop');
  background-size:cover;
  background-position:center 30%;
  display:flex;
  align-items:center;
}
.hero-photo-inner{
  max-width:760px;
  width:100%;
  margin:0 auto;
  padding:72px 20px;
  box-sizing:border-box;
}
.eyebrow--light{
  color:#FF4D5E;
  font-weight:800;
  font-size:0.8rem;
  text-shadow:0 1px 3px rgba(0,0,0,0.6);
}
.hero-photo h1{
  font-size:2.6rem;
  line-height:1.12;
  margin:0 0 18px;
  letter-spacing:-0.015em;
  color:#fff;
  max-width:16ch;
  text-shadow:0 2px 8px rgba(0,0,0,0.45);
}
.lede--light{
  color:#fff;
  font-weight:500;
  font-size:1.05rem;
  max-width:46ch;
  margin:0 0 30px;
  text-shadow:0 1px 4px rgba(0,0,0,0.75);
}
.hero-cta{
  display:inline-block;
  text-decoration:none;
  width:auto;
}
@media (max-width:640px){
  .hero-photo{min-height:0; background-position:center 20%;}
  .hero-photo-inner{padding:52px 20px 44px;}
  .hero-photo h1{font-size:2rem;}
}

/* ---------- hero (stats strip band under photo hero) ---------- */
.hero{
  padding:28px 0 8px;
  margin-bottom:8px;
}

.stats-strip{
  display:grid;
  grid-template-columns:repeat(3, auto);
  gap:32px;
  border-top:2px solid var(--ink);
  padding-top:18px;
}
@media (max-width:560px){
  .stats-strip{grid-template-columns:1fr; gap:14px;}
}
.stat{display:flex; flex-direction:column; gap:2px;}
.stat-num{
  font-family:var(--mono);
  font-weight:800;
  font-size:1.7rem;
  color:var(--red);
  line-height:1;
}
.stat-label{
  font-size:0.8rem;
  color:var(--slate);
  font-weight:600;
}

.eyebrow{
  font-family:var(--mono);
  font-size:0.72rem;
  letter-spacing:0.18em;
  color:var(--red);
  font-weight:700;
  margin:0 0 10px;
}

/* ---------- start screen ---------- */
.start-card{padding-top:24px;}
.start-card h1{
  font-size:2.1rem;
  line-height:1.15;
  margin:0 0 12px;
  letter-spacing:-0.01em;
  max-width:14ch;
}
.lede{
  color:var(--slate);
  font-size:1.02rem;
  max-width:44ch;
  margin:0 0 32px;
}

.mode-select{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  margin-bottom:28px;
}
@media (max-width:560px){
  .mode-select{grid-template-columns:1fr;}
}
.mode-card{
  text-align:left;
  background:#fff;
  border:2px solid var(--line);
  border-radius:var(--radius);
  padding:18px 16px;
  cursor:pointer;
  display:flex;
  flex-direction:column;
  gap:6px;
  transition:border-color .15s ease, box-shadow .15s ease;
  font-family:var(--sans);
}
.mode-card:hover{border-color:var(--ink);}
.mode-card:focus-visible{outline:3px solid var(--red); outline-offset:2px;}
.mode-card[aria-pressed="true"]{
  border-color:var(--red);
  box-shadow:3px 3px 0 var(--red);
}
.mode-num{
  font-family:var(--mono);
  font-size:0.72rem;
  color:var(--red);
  font-weight:700;
}
.mode-title{font-weight:700; font-size:1.02rem;}
.mode-desc{font-size:0.86rem; color:var(--slate); line-height:1.4;}

.btn-primary{
  background:var(--red);
  color:#fff;
  border:none;
  border-radius:var(--radius);
  font-family:var(--sans);
  font-weight:700;
  font-size:1rem;
  padding:15px 28px;
  cursor:pointer;
  transition:background .15s ease, transform .1s ease;
}
.btn-primary:hover{background:var(--red-dark);}
.btn-primary:active{transform:translateY(1px);}
.btn-primary:focus-visible{outline:3px solid var(--ink); outline-offset:2px;}
.btn-primary:disabled{background:var(--line); color:var(--slate); cursor:not-allowed;}

.qcount{
  font-family:var(--mono);
  font-size:0.78rem;
  color:var(--slate);
  margin-top:14px;
}

/* ---------- quiz hud ---------- */
.quiz-hud{margin-bottom:22px;}
.progress-track{
  height:4px;
  background:var(--line);
  border-radius:2px;
  overflow:hidden;
  margin-bottom:14px;
}
.progress-fill{
  height:100%;
  background:var(--red);
  width:0%;
  transition:width .3s ease;
}
.hud-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.q-position{
  font-family:var(--mono);
  font-weight:700;
  font-size:0.88rem;
  letter-spacing:0.03em;
}
.score-live{
  font-family:var(--mono);
  font-size:0.82rem;
  color:var(--slate);
}
.score-live strong{color:var(--ink);}

.timer{position:relative; width:44px; height:44px;}
.timer-ring{width:44px; height:44px; transform:rotate(-90deg);}
.timer-ring-bg{fill:none; stroke:var(--line); stroke-width:3;}
.timer-ring-fg{
  fill:none;
  stroke:var(--red);
  stroke-width:3;
  stroke-linecap:round;
  stroke-dasharray:106.8;
  stroke-dashoffset:0;
  transition:stroke-dashoffset 1s linear, stroke .2s ease;
}
#timer-num{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-family:var(--mono);
  font-weight:700;
  font-size:0.82rem;
}
.timer.warn #timer-num{color:var(--amber);}
.timer.warn .timer-ring-fg{stroke:var(--amber);}
.timer.danger #timer-num{color:var(--red);}
.timer.danger{animation:pulse 1s ease-in-out infinite;}
@keyframes pulse{0%,100%{opacity:1;} 50%{opacity:.55;}}

/* ---------- question card ---------- */
.question-card{
  background:#fff;
  border:2px solid var(--ink);
  border-radius:var(--radius);
  padding:28px 24px;
}
.select-two-hint{
  font-family:var(--mono);
  font-size:0.72rem;
  letter-spacing:0.1em;
  color:var(--red);
  font-weight:700;
  margin:0 0 10px;
}
.question-text{
  font-size:1.18rem;
  line-height:1.45;
  margin:0 0 22px;
  font-weight:600;
}
.question-text code{
  font-family:var(--mono);
  background:#F3EDE9;
  padding:1px 5px;
  border-radius:2px;
  font-size:0.92em;
}

.options-list{display:flex; flex-direction:column; gap:10px;}
.option{
  display:flex;
  align-items:flex-start;
  gap:14px;
  background:var(--paper);
  border:2px solid var(--line);
  border-radius:var(--radius);
  padding:14px 16px;
  cursor:pointer;
  text-align:left;
  width:100%;
  font-family:var(--sans);
  font-size:0.98rem;
  color:var(--ink);
  transition:border-color .12s ease, background .12s ease;
}
.option:hover:not(:disabled){border-color:var(--ink);}
.option:focus-visible{outline:3px solid var(--red); outline-offset:2px;}
.option-letter{
  font-family:var(--mono);
  font-weight:700;
  font-size:0.85rem;
  color:var(--slate);
  border:2px solid var(--line);
  border-radius:2px;
  width:26px;
  height:26px;
  min-width:26px;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:all .12s ease;
}
.option.selected{border-color:var(--ink); background:#fff;}
.option.selected .option-letter{border-color:var(--ink); background:var(--ink); color:#fff;}

.option.correct{border-color:var(--green); background:#F0F8F3;}
.option.correct .option-letter{background:var(--green); border-color:var(--green); color:#fff;}
.option.incorrect{border-color:var(--red); background:#FCEFEF;}
.option.incorrect .option-letter{background:var(--red); border-color:var(--red); color:#fff;}
.option:disabled{cursor:default;}

.feedback-banner{
  margin-top:18px;
  padding:12px 16px;
  border-radius:var(--radius);
  font-weight:700;
  font-family:var(--sans);
  font-size:0.94rem;
  display:flex;
  align-items:center;
  gap:8px;
}
.feedback-banner.correct{background:#F0F8F3; color:var(--green); border:2px solid var(--green);}
.feedback-banner.incorrect{background:#FCEFEF; color:var(--red); border:2px solid var(--red);}
.feedback-banner.timeout{background:#FCF3E9; color:var(--amber); border:2px solid var(--amber);}

.btn-submit{margin-top:18px; width:100%;}

/* ---------- results ---------- */
.results-card{padding-top:40px; text-align:center;}
.results-card .eyebrow{text-align:center;}
.results-score{
  font-family:var(--mono);
  font-size:4rem;
  margin:0 0 12px;
  letter-spacing:-0.02em;
}
.results-message{
  color:var(--slate);
  font-size:1.05rem;
  margin:0 0 32px;
}

/* ---------- section labels ---------- */
.section-label{
  font-family:var(--mono);
  font-size:0.72rem;
  letter-spacing:0.14em;
  color:var(--ink);
  font-weight:700;
  margin:26px 0 10px;
}

/* ---------- difficulty cards ---------- */
.diff-select{
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  gap:12px;
  margin-bottom:10px;
}
@media (max-width:640px){
  .diff-select{grid-template-columns:1fr;}
}
.diff-card{
  text-align:left;
  background:#fff;
  border:2px solid var(--line);
  border-radius:var(--radius);
  padding:16px 14px;
  cursor:pointer;
  display:flex;
  flex-direction:column;
  gap:6px;
  font-family:var(--sans);
  transition:border-color .15s ease, box-shadow .15s ease;
}
.diff-card:hover{border-color:var(--ink);}
.diff-card:focus-visible{outline:3px solid var(--red); outline-offset:2px;}
.diff-card[aria-pressed="true"]{
  border-color:var(--red);
  box-shadow:3px 3px 0 var(--red);
}
.diff-badge{
  font-family:var(--mono);
  font-size:0.68rem;
  font-weight:800;
  letter-spacing:0.08em;
  color:var(--red);
}
.diff-card--blitz .diff-badge{color:var(--amber);}
.diff-card--blitz[aria-pressed="true"]{border-color:var(--amber); box-shadow:3px 3px 0 var(--amber);}
.diff-time{
  font-family:var(--mono);
  font-weight:800;
  font-size:1.7rem;
  line-height:1;
}
.diff-time small{font-size:0.9rem; font-weight:700;}
.diff-desc{font-size:0.82rem; color:var(--slate); line-height:1.4;}

/* ---------- tier live badge in HUD ---------- */
.tier-live{
  font-family:var(--mono);
  font-size:0.72rem;
  font-weight:700;
  letter-spacing:0.06em;
  color:var(--slate);
  border:1px solid var(--line);
  border-radius:2px;
  padding:3px 8px;
}

/* ---------- secondary button ---------- */
.btn-secondary{
  background:#fff;
  color:var(--ink);
  border:2px solid var(--ink);
  border-radius:var(--radius);
  font-family:var(--sans);
  font-weight:700;
  font-size:0.95rem;
  padding:13px 24px;
  cursor:pointer;
  transition:background .15s ease;
}
.btn-secondary:hover{background:var(--paper);}
.btn-secondary:focus-visible{outline:3px solid var(--red); outline-offset:2px;}

.results-actions{
  display:flex;
  flex-direction:column;
  gap:12px;
  align-items:center;
}

/* ---------- feedback emoji ---------- */
.feedback-banner .fb-emoji{font-size:1.2rem;}

/* ---------- pricing band ---------- */
.pricing-band{
  margin-top:56px;
  padding:44px 32px;
  background:var(--ink-panel);
  color:#fff;
  border-radius:var(--radius);
  text-align:center;
}
.pricing-band .eyebrow{color:var(--red); text-align:center;}
.pricing-band h2{
  font-size:1.7rem;
  line-height:1.2;
  margin:0 0 14px;
  max-width:24ch;
  margin-left:auto;
  margin-right:auto;
}
.pricing-copy{
  color:#C9C2BA;
  font-size:0.98rem;
  max-width:46ch;
  margin:0 auto 32px;
  line-height:1.55;
}

.price-card{
  background:#fff;
  color:var(--ink);
  border-radius:var(--radius);
  padding:28px 26px;
  max-width:380px;
  margin:0 auto;
  text-align:left;
}
.price-card--paywall{margin-top:28px; margin-bottom:28px;}
.price-tag{
  display:flex;
  align-items:baseline;
  gap:6px;
  margin-bottom:18px;
  border-bottom:2px solid var(--line);
  padding-bottom:18px;
}
.price-amount{
  font-family:var(--mono);
  font-weight:800;
  font-size:2.4rem;
  color:var(--red);
  letter-spacing:-0.02em;
}
.price-period{
  font-size:0.95rem;
  color:var(--slate);
  font-weight:600;
}
.price-features{
  list-style:none;
  margin:0 0 22px;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.price-features li{
  font-size:0.92rem;
  padding-left:22px;
  position:relative;
}
.price-features li::before{
  content:"✓";
  position:absolute;
  left:0;
  color:var(--green);
  font-weight:800;
}
.btn-unlock{width:100%;}
.price-note{
  font-size:0.74rem;
  color:var(--slate);
  text-align:center;
  margin:12px 0 0;
}

/* ---------- footer ---------- */
.site-footer{
  margin-top:56px;
  padding-top:24px;
  border-top:2px solid var(--line);
  text-align:center;
}
.footer-brand{
  font-family:var(--mono);
  font-weight:700;
  font-size:0.88rem;
  margin:0 0 6px;
}
.footer-tag{
  font-size:0.8rem;
  color:var(--slate);
  margin:0 0 14px;
  max-width:44ch;
  margin-left:auto;
  margin-right:auto;
}
.footer-contact{
  font-family:var(--sans);
  font-weight:700;
  font-size:0.85rem;
  color:var(--red);
  text-decoration:none;
}
.footer-contact:hover{text-decoration:underline;}

/* ---------- paywall screen ---------- */
.paywall-card{padding-top:36px; text-align:center;}
.paywall-card .eyebrow{text-align:center;}
.paywall-headline{
  font-size:1.3rem;
  font-weight:700;
  margin:0 0 12px;
}
.paywall-copy{
  color:var(--slate);
  font-size:0.98rem;
  max-width:46ch;
  margin:0 auto;
  line-height:1.55;
}
.paywall-card .btn-secondary{margin-top:8px;}

.reserve-heading{
  font-size:1.5rem;
  line-height:1.3;
  margin:0 0 16px;
}
