:root {
  --ink: #0f1620;
  --ink-soft: #1b2733;
  --paper: #eef2f5;
  --surface: #ffffff;
  --text: #18222e;
  --muted: #5d6b7a;
  --line: #e3e9ee;
  --signal: #0f8f87;
  --signal-dark: #0b6f69;
  --signal-wash: #e6f4f3;
  --danger: #b8372a;
  --danger-wash: #fae9e7;
  --ok: #1f8a4c;
  --radius: 10px;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Inter, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Secured-session bar — the signature element. Communicates the locked state. */
.session-bar {
  background: var(--ink);
  color: #cdd8e1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 22px;
  font-size: 13px;
}
.session-bar .brand {
  font-weight: 600;
  letter-spacing: 0.2px;
  color: #fff;
}
.session-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9fb0bd;
}
.session-chip .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 0 rgba(15, 143, 135, 0.6);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(15,143,135,.55); }
  70%  { box-shadow: 0 0 0 7px rgba(15,143,135,0); }
  100% { box-shadow: 0 0 0 0 rgba(15,143,135,0); }
}
@media (prefers-reduced-motion: reduce) {
  .session-chip .dot { animation: none; }
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 22px 80px;
}

h1 { font-size: 1.6rem; letter-spacing: -0.01em; margin: 0 0 6px; }
.lede { color: var(--muted); margin: 0 0 32px; font-size: 1.02rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 1px 2px rgba(16,30,45,0.04);
}
.card + .card { margin-top: 18px; }

label.field { display: block; margin-bottom: 18px; }
label.field span { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.95rem; }

input[type="text"] {
  width: 100%;
  font-family: var(--mono);
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfe;
  text-transform: uppercase;
}
input[type="text"]:focus-visible {
  outline: 3px solid var(--signal-wash);
  border-color: var(--signal);
}

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--signal);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 13px 22px;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--sans);
  cursor: pointer;
  text-decoration: none;
  transition: background .15s ease;
}
.btn:hover { background: var(--signal-dark); }
.btn:focus-visible { outline: 3px solid var(--signal-wash); outline-offset: 2px; }
.btn.secondary { background: var(--ink-soft); }
.btn.secondary:hover { background: var(--ink); }
.btn.block { width: 100%; justify-content: center; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 26px; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 16px 42px;
  color: var(--text);
}
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: -2px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--signal-wash); color: var(--signal-dark);
  font-family: var(--mono); font-size: 0.85rem; font-weight: 700;
  display: grid; place-items: center;
}

.notice {
  border-radius: 8px; padding: 12px 14px; font-size: 0.95rem;
  margin-bottom: 20px;
}
.notice.error { background: var(--danger-wash); color: var(--danger); }
.notice.muted { background: #f3f6f8; color: var(--muted); }

.q { padding: 22px 0; border-top: 1px solid var(--line); }
.q:first-of-type { border-top: 0; padding-top: 4px; }
.q .qhead { display: flex; gap: 10px; margin-bottom: 14px; }
.q .qnum { font-family: var(--mono); color: var(--signal-dark); font-weight: 700; font-size: 0.9rem; flex: none; }
.q .qprompt { font-weight: 600; }

.choice {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border: 1px solid var(--line); border-radius: 8px;
  margin-bottom: 9px; cursor: pointer; transition: border-color .12s, background .12s;
}
.choice:hover { border-color: #c7d2db; }
.choice:has(input:checked) { border-color: var(--signal); background: var(--signal-wash); }
.choice:has(input:focus-visible) { outline: 3px solid var(--signal-wash); }
.choice input { accent-color: var(--signal); width: 18px; height: 18px; flex: none; }

.score {
  font-family: var(--mono);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--ink);
}
.score small { font-size: 1.1rem; color: var(--muted); font-weight: 500; }

.foot { margin-top: 28px; color: var(--muted); font-size: 0.85rem; }
code.kbd { font-family: var(--mono); background: #f3f6f8; padding: 1px 6px; border-radius: 5px; }
