:root {
  color-scheme: light;
  --ink: #12243c;
  --muted: #627086;
  --line: #dce3ec;
  --paper: #ffffff;
  --wash: #f3f6fa;
  --blue: #075ba7;
  --blue-dark: #06477f;
  --ok: #157347;
  --bad: #b42318;
  --warn: #9a6700;
  font-family: Inter, system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--wash); line-height: 1.5; }
input, button { font: inherit; line-height: 1.5; height: 3rem; border: 1px solid #b9c5d3; border-radius: 8px; padding: 0 12px; background: white; color: inherit; min-width: 0; }
button { cursor: pointer; }
.shell { width: min(100% - 32px, 980px); margin-inline: auto; }
.hero { color: white; background: linear-gradient(125deg, #052b51, var(--blue) 55%, #0b8aa8); padding: 48px 0 65px; }
.hero h1 { margin: 0; font-size: clamp(2.25rem, 6vw, 4rem); letter-spacing: -.04em; }
.eyebrow, .step { font-size: .76rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.eyebrow { color: #b8eaf4; }
.panel { margin: -24px 0 24px; padding: clamp(22px, 4vw, 38px); border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: 0 12px 36px #193b5a12; }
h2 { margin-top: 0; }
.step { margin: 0; color: var(--blue); }
.counter { flex: none; padding: 6px 11px; border-radius: 999px; color: var(--blue-dark); background: #e6f4fa; font-size: .82rem; font-weight: 750; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
label { display: flex; flex-direction: column; gap: 7px; font-weight: 700; min-width: 0; }
input { width: 100%; }
input:focus, button:focus-visible { outline: 3px solid #0875c844; }
.actions { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; grid-column: 2; }
.primary { background: var(--blue); color: white; border-color: var(--blue); flex: 1; }
button:disabled { cursor: not-allowed; opacity: .55; }
.secondary { flex: 1 0 100%; min-height: 3rem; height: auto; padding: 10px 12px; color: var(--blue); border-color: var(--blue); }
.message { margin: 1em 0; }
.message:empty { display: none; }
.message.error { color: var(--bad); }
.results { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 28px; }
.score-card { display: flex; align-items: center; gap: 24px; padding: 22px; border-radius: 14px; background: #eef6fb; }
.score-card h3 { margin: 4px 0; font-size: 1.35rem; }
.score-card p { margin: 3px 0; }
.score-ring { --score-angle: 0deg; display: grid; place-content: center; flex: 0 0 116px; width: 116px; height: 116px; border-radius: 50%; background: radial-gradient(circle 46px, white 97%, transparent), conic-gradient(var(--blue) var(--score-angle), #cad6e2 0); text-align: center; }
.score-ring strong { font-size: 2rem; line-height: 1; }
.score-ring span { color: var(--muted); font-size: .72rem; }
.best { color: var(--blue-dark); font-size: .9rem; }
.checks { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 18px; }
.check { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start; padding: 14px; border: 1px solid var(--line); border-radius: 11px; }
.check-icon { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; color: white; background: var(--muted); font-weight: 900; }
.check.passed .check-icon { background: var(--ok); }
.check.failed .check-icon { background: var(--bad); }
.check.skipped .check-icon { background: var(--warn); }
.check h4 { margin: 1px 0 4px; font-size: .93rem; }
.check p { margin: 0; color: var(--muted); font-size: .79rem; }
.check-points { white-space: nowrap; color: var(--blue-dark); font-size: .82rem; font-weight: 800; }
.history-section { margin-top: 28px; }
.history-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.history-heading h3 { margin: 0; font-size: 1.15rem; }
.history { display: grid; gap: 8px; }
.attempt { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; padding: 11px 14px; border: 1px solid var(--line); border-radius: 9px; background: #fafbfd; }
.attempt time { color: var(--muted); font-size: .84rem; }
.attempt-score { min-width: 62px; color: var(--blue-dark); font-weight: 850; text-align: right; }
.footer { padding: 10px 0 32px; color: var(--muted); font-size: .88rem; text-align: center; }
[hidden] { display: none !important; }

@media (max-width: 650px) {
  .form-grid { grid-template-columns: 1fr; }
  .actions { grid-column: auto; align-items: stretch; }
  .score-card { align-items: flex-start; flex-direction: column; }
  .attempt { grid-template-columns: 1fr auto; }
}

.check p { overflow-wrap: anywhere; white-space: pre-line; }
