:root {
  color-scheme: dark;
  --bg: #0a1219;
  --surface: #0f1a24;
  --surface-2: #152433;
  --surface-3: #1a2f42;
  --ink: #f0f7ff;
  --muted: #9bb4c9;
  --dim: #6b8499;
  --accent: #3b82f6;
  --accent-deep: #1d4ed8;
  --accent-bright: #60a5fa;
  --sky: #38bdf8;
  --gold: #f0c28a;
  --lime: #a7f36b;
  --red: #ff647c;
  --amber: #ffbf5b;
  --line: rgba(96, 165, 250, .14);
  --line-hot: rgba(59, 130, 246, .55);
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 12%, rgba(59, 130, 246, .28), transparent 31rem),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(255,255,255,.012) 4px);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
.is-hidden { display: none !important; }
.skip-link {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 2000;
  padding: 10px 14px;
  background: var(--gold);
  color: var(--bg);
  transform: translateY(-180%);
}
.skip-link:focus { transform: none; }

.language-switcher {
  display: flex;
  align-items: center;
  padding: 3px;
  border: 1px solid rgba(242,238,228,.18);
  background: rgba(255,255,255,.03);
}
.language-switcher button {
  width: 31px;
  height: 29px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #9b978d;
  font: 750 9px/1 ui-monospace, monospace;
  cursor: pointer;
}
.language-switcher button:hover,
.language-switcher button:focus-visible { color: #f2eee4; }
.language-switcher button[aria-pressed="true"] {
  background: #3b82f6;
  color: #0a1219;
}

main, .site-footer {
  width: min(calc(100% - 32px), var(--max));
  margin-inline: auto;
}
.exam-shell {
  position: relative;
  min-height: 620px;
  padding: clamp(44px, 7vw, 86px) clamp(20px, 5vw, 68px) 54px;
  overflow: hidden;
  border-inline: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(10,18,25,.97), rgba(8,14,22,.98));
  isolation: isolate;
}
.exam-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, transparent 49.9%, rgba(59,130,246,.12) 50%, transparent 50.1%),
    radial-gradient(circle at 50% 5%, rgba(56,189,248,.24), transparent 27rem);
}
.ambient-grid {
  position: absolute;
  z-index: -1;
  left: -25%;
  right: -25%;
  bottom: -20%;
  height: 52%;
  opacity: .45;
  transform: perspective(350px) rotateX(62deg);
  transform-origin: center bottom;
  background-image:
    linear-gradient(rgba(59,130,246,.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,.22) 1px, transparent 1px);
  background-size: 54px 34px;
  mask-image: linear-gradient(to bottom, transparent, #000 28%);
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(250px, .55fr);
  gap: clamp(34px, 7vw, 88px);
  align-items: center;
}
.hero > *, .hero-copy { min-width: 0; }
.system-line {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 54px;
  color: var(--muted);
  font: 700 10px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.system-line b { margin-left: auto; color: var(--dim); font-weight: 700; }
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 14px var(--lime);
}
.kicker {
  margin: 0 0 12px;
  color: var(--gold);
  font: 750 11px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .17em;
  text-transform: uppercase;
}
.hero h1 {
  margin: 0;
  text-transform: uppercase;
}
.hero h1 span {
  display: block;
  color: var(--ink);
  font: 900 clamp(60px, 10vw, 128px)/.8 Arial Black, Impact, sans-serif;
  letter-spacing: -.08em;
  text-shadow: 0 5px 0 rgba(29,78,216,.42), 0 0 30px rgba(96,165,250,.22);
}
.hero h1 em {
  display: block;
  margin-top: 12px;
  color: transparent;
  -webkit-text-stroke: 1px rgba(224,242,254,.78);
  font: 300 clamp(29px, 5.7vw, 68px)/.9 Arial, sans-serif;
  letter-spacing: .13em;
  font-style: normal;
}
.hero-lede {
  max-width: 61ch;
  margin: 28px 0 0;
  color: #c7bdd1;
  font-size: clamp(15px, 1.5vw, 18px);
}
.start-actions, .results-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 30px;
}
.button {
  min-height: 52px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  border: 1px solid var(--line-hot);
  color: var(--ink);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.button b { font-size: 18px; font-weight: 400; }
.button:hover, .button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 9px 30px rgba(59, 130, 246, .28);
  border-color: var(--accent-bright);
}
.button:disabled { opacity: .38; cursor: not-allowed; transform: none; box-shadow: none; }
.button-primary { background: linear-gradient(115deg, #1d4ed8, #3b82f6); }
.button-secondary { background: rgba(255,255,255,.035); }
.study-link {
  padding: 8px 0;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 750;
}
.study-link:hover, .study-link:focus-visible { color: var(--gold); border-color: currentColor; }
.mission-panel {
  position: relative;
  min-height: 360px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--line-hot);
  background: linear-gradient(150deg, rgba(15, 40, 70, .88), rgba(8, 16, 28, .94));
  box-shadow: 14px 14px 0 rgba(29, 78, 216, .22), 0 0 50px rgba(59, 130, 246, .14);
}
.mission-panel::before, .question-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  pointer-events: none;
  border: 1px solid rgba(255,255,255,.05);
}
.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font: 700 9px/1 ui-monospace, monospace;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.panel-head b { color: var(--lime); }
.panel-number {
  margin: 28px 0 22px;
  color: rgba(186,230,253,.08);
  font: 900 116px/.7 Arial Black, sans-serif;
  letter-spacing: -.1em;
}
.mission-panel dl { position: relative; z-index: 1; margin: 0; }
.mission-panel dl > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.mission-panel dt { color: var(--muted); }
.mission-panel dd { margin: 0; color: var(--ink); font-weight: 800; }
.domain-deck {
  position: relative;
  margin-top: clamp(52px, 9vw, 104px);
  border-top: 1px solid var(--line);
}
.deck-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 0;
  color: var(--dim);
  font: 700 9px/1 ui-monospace, monospace;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.domain-chips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 0;
  padding: 1px;
  list-style: none;
  background: var(--line);
}
.domain-chips li {
  min-height: 100px;
  padding: 16px;
  background: rgba(8,16,26,.92);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}
.domain-chips li b {
  display: block;
  margin-bottom: 20px;
  color: var(--accent);
  font: 700 9px/1 ui-monospace, monospace;
}
.domain-chips li small { display: block; margin-top: 6px; color: var(--dim); font-weight: 650; }
.fineprint { margin: 16px 0 0; color: var(--dim); font-size: 11px; }

.exam-run { padding-top: clamp(36px, 5vw, 58px); }
.quiz-hud { margin-bottom: 22px; }
.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
  color: var(--muted);
  font: 700 10px/1 ui-monospace, monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
}
#progress-domain { color: var(--gold); text-align: right; }
.progress-track { height: 3px; overflow: hidden; background: rgba(255,255,255,.08); }
.progress-track i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent-bright), var(--gold));
  box-shadow: 0 0 14px var(--accent-bright);
  transition: width .25s ease;
}
.question-card {
  position: relative;
  width: 100%;
  margin-inline: auto;
  padding: clamp(26px, 5vw, 54px);
  border: 1px solid var(--line-hot);
  background: linear-gradient(150deg, rgba(14,28,44,.97), rgba(8,14,22,.98));
  box-shadow: 16px 16px 0 rgba(29,78,216,.19);
}
.question-code {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  color: var(--dim);
  font: 700 9px/1 ui-monospace, monospace;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.question-code b { color: var(--accent-bright); }
.question-topic {
  margin: 0 0 11px;
  color: var(--gold);
  font: 750 10px/1 ui-monospace, monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.question-card h2 {
  max-width: 58ch;
  margin: 0 0 30px;
  font: 650 clamp(20px, 2.8vw, 31px)/1.28 Inter, sans-serif;
  letter-spacing: -.025em;
  white-space: pre-line;
}
.choices { margin: 0; padding: 0; border: 0; display: grid; gap: 9px; }
.choice {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.025);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.choice:hover, .choice:focus-within {
  border-color: rgba(96,165,250,.68);
  background: rgba(59,130,246,.07);
  transform: translateX(3px);
}
.choice input {
  appearance: none;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  border: 1px solid var(--dim);
  border-radius: 0;
  background: transparent;
}
.choice input:checked { border-color: var(--accent-bright); box-shadow: inset 0 0 0 5px var(--surface), inset 0 0 0 10px var(--accent-bright); }
.choice span { color: #cfc6d7; font-size: 14px; line-height: 1.5; white-space: pre-line; }
.choice.is-selected { border-color: var(--accent-bright); background: rgba(59, 130, 246, .12); }
.choice.is-correct { border-color: var(--lime); background: rgba(167,243,107,.08); }
.choice.is-wrong { border-color: var(--red); background: rgba(255,100,124,.08); }
.question-actions { margin-top: 22px; display: flex; justify-content: flex-end; }
.explain {
  margin-top: 18px;
  padding: 16px 18px;
  border-left: 3px solid var(--lime);
  background: rgba(167,243,107,.075);
  color: #d9d2df;
  font-size: 13.5px;
  white-space: pre-line;
}
.explain.is-wrong-exp { border-left-color: var(--red); background: rgba(255,100,124,.075); }

.exam-results { padding-top: 42px; }
.score-hero {
  display: grid;
  grid-template-columns: minmax(180px, .55fr) minmax(0, 1.45fr);
  gap: 44px;
  align-items: end;
  padding: 14px 0 44px;
  border-bottom: 1px solid var(--line);
}
.score-label { margin: 0 0 8px; color: var(--muted); font: 700 10px/1 ui-monospace, monospace; letter-spacing: .13em; text-transform: uppercase; }
.score-value { margin: 0; font: 900 clamp(64px, 10vw, 112px)/.8 Arial Black, sans-serif; letter-spacing: -.08em; }
.score-value small { margin-left: 4px; color: var(--accent-bright); font-size: .3em; }
.score-sub { margin: 14px 0 0; color: var(--muted); font: 700 11px/1 ui-monospace, monospace; text-transform: uppercase; }
.score-verdict { max-width: 48ch; margin: 0; color: #cfc6d7; font-size: 17px; }
.results-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(32px, 6vw, 72px);
  margin: 52px 0;
}
.section-code { margin: 0 0 12px; color: var(--accent-bright); font: 700 9px/1 ui-monospace, monospace; letter-spacing: .15em; }
.results-grid h2, .missed h2 { margin: 0 0 9px; font-size: clamp(24px, 3vw, 35px); line-height: 1; letter-spacing: -.04em; }
.section-lede { margin: 0 0 22px; color: var(--muted); font-size: 13px; }
.domain-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.domain-bar-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; font-size: 12px; font-weight: 750; }
.domain-bar-head span:last-child { color: var(--muted); font: 700 10px/1 ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.bar { height: 7px; background: rgba(255,255,255,.07); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); }
.bar.is-ok i { background: var(--lime); }
.bar.is-mid i { background: var(--amber); }
.bar.is-low i { background: var(--red); }
.domain-note { margin: 6px 0 0; color: var(--dim); font-size: 10px; }
.improve-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.improve-list li, .missed-item { padding: 16px; border: 1px solid var(--line); background: rgba(255,255,255,.025); }
.improve-list strong { display: block; margin-bottom: 6px; font-size: 13px; }
.improve-list p { margin: 0; color: var(--muted); font-size: 12.5px; }
.improve-list .prio { display: inline-block; margin-bottom: 9px; color: var(--accent-bright); font: 700 9px/1 ui-monospace, monospace; letter-spacing: .09em; text-transform: uppercase; }
.missed { margin-bottom: 28px; }
.missed-item { margin-top: 10px; }
.missed-item h3 { margin: 0 0 8px; color: var(--gold); font-size: 12px; text-transform: uppercase; }
.missed-item p { margin: 0; color: var(--muted); font-size: 13px; }
.missed-item .explanation { margin-top: 8px; color: #cfc6d7; }
.site-footer {
  padding: 24px 0 34px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  color: var(--dim);
  font-size: 11px;
}
.footer-wordmark { color: var(--ink); font: 400 19px/1 Georgia, serif; letter-spacing: -.06em; }
.footer-wordmark span { color: #e96d45; }

@media (max-width: 820px) {
  .hero, .score-hero, .results-grid { grid-template-columns: 1fr; }
  .mission-panel { min-height: 300px; }
  .panel-number { font-size: 92px; }
  .domain-chips { grid-template-columns: repeat(2, 1fr); }
  .system-line { margin-bottom: 38px; }
}
@media (max-width: 720px) {
  main, .site-footer { width: min(calc(100% - 20px), var(--max)); }
  .language-switcher { margin-right: 2px; }
  .language-switcher button { width: 27px; }
  .exam-shell { padding-inline: 18px; }
  .hero h1 span { font-size: clamp(54px, 18vw, 82px); }
  .hero h1 em { font-size: clamp(25px, 8.2vw, 34px); letter-spacing: .08em; white-space: nowrap; }
  .hero, .hero-copy, .hero-lede, .mission-panel { width: 100%; max-width: 100%; }
  .hero-lede { overflow-wrap: anywhere; }
  .mission-panel dl > div { min-width: 0; }
  .mission-panel dt, .mission-panel dd { min-width: 0; }
  .mission-panel dd { overflow-wrap: anywhere; text-align: right; }
  .domain-chips { grid-template-columns: 1fr; }
  .domain-chips li { min-height: 82px; }
  .domain-chips li b { margin-bottom: 12px; }
  .question-card { padding: 26px 18px; box-shadow: 8px 8px 0 rgba(29,78,216,.19); }
  .progress-meta { align-items: flex-end; }
  .choice { grid-template-columns: 24px 1fr; padding: 13px 11px; }
  .choice span { font-size: 13.5px; }
  .score-hero { gap: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

