:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #607086;
  --line: #dbe2ea;
  --surface: #ffffff;
  --canvas: #f4f7fb;
  --accent: #2957c8;
  --accent-dark: #1c43a5;
  --accent-soft: #e9efff;
  --radius: 18px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background: linear-gradient(150deg, #edf2ff 0%, var(--canvas) 42%, #f8fafc 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button { font: inherit; }
button:focus-visible { outline: 3px solid #8aa8ff; outline-offset: 3px; }

.app-shell { width: min(100% - 32px, 780px); margin: 0 auto; padding: 64px 0; }
.site-header { margin-bottom: 28px; }
.eyebrow, .screen-label { margin: 0 0 8px; color: var(--accent); font-size: .76rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(1.7rem, 4vw, 2.35rem); line-height: 1.15; }
h2 { font-size: clamp(1.45rem, 3vw, 1.9rem); line-height: 1.28; }

.exam-card { min-height: 400px; background: var(--surface); border: 1px solid rgba(219, 226, 234, .9); border-radius: var(--radius); box-shadow: 0 18px 45px rgba(32, 53, 91, .1); }
.screen { padding: clamp(28px, 6vw, 52px); }
.start-screen, .results-screen { text-align: center; padding-block: 68px; }
.lead { max-width: 590px; margin: 0 auto; color: var(--muted); font-size: 1.03rem; line-height: 1.65; }

.rules { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin: 32px 0; }
.rules span { padding: 9px 13px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font-size: .9rem; }
.rules strong { color: var(--ink); }
.button { min-height: 46px; border: 0; border-radius: 10px; padding: 11px 19px; font-weight: 750; cursor: pointer; transition: background .15s ease, transform .15s ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .48; }
.button-primary { color: #fff; background: var(--accent); }
.button-primary:hover:not(:disabled) { background: var(--accent-dark); }

.question-meta, .question-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.question-meta { color: var(--muted); font-size: .88rem; font-weight: 700; }
.question-meta span:last-child { color: var(--accent); }
.progress-track { height: 8px; margin: 15px 0 34px; overflow: hidden; border-radius: 99px; background: #e8edf3; }
.progress-fill { height: 100%; border-radius: inherit; background: var(--accent); transition: width .25s ease; }
.question-prompt { margin-bottom: 28px; }
.answer-hint { margin: -14px 0 20px; color: var(--muted); font-size: .92rem; font-weight: 650; }
.choices { display: grid; gap: 12px; }
.choice { display: flex; align-items: center; width: 100%; min-height: 64px; gap: 14px; padding: 12px 15px; text-align: left; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.choice:hover { border-color: #8ba7ef; background: #f9fbff; }
.choice.is-selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.choice-letter { display: grid; width: 29px; height: 29px; flex: 0 0 29px; place-items: center; border: 1px solid #bdc9db; border-radius: 50%; color: var(--muted); font-size: .82rem; font-weight: 800; }
.is-selected .choice-letter { color: #fff; border-color: var(--accent); background: var(--accent); }
.choice-text { line-height: 1.35; }
.question-footer { display: flex; justify-content: flex-end; margin-top: 34px; }
.result-score { display: flex; align-items: baseline; justify-content: center; gap: 13px; margin: 22px 0 13px; }
.result-score strong { color: var(--accent); font-size: clamp(3.25rem, 12vw, 5rem); letter-spacing: -.07em; line-height: 1; }
.result-score span { color: var(--muted); font-size: 1.25rem; font-weight: 750; }
.results-screen .button { margin-top: 32px; }

@media (max-width: 520px) {
  .app-shell { width: min(100% - 20px, 780px); padding: 28px 0; }
  .screen { padding: 28px 20px; }
  .start-screen, .results-screen { padding-block: 46px; }
  .question-footer { align-items: stretch; flex-direction: column; }
  .question-footer .button { width: 100%; }
}
