:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --text: #15202b;
  --muted: #5f6b76;
  --line: #d9e0e6;
  --accent: #175cd3;
  --accent-dark: #0f45a3;
  --danger: #b42318;
  --success: #067647;
  --shadow: 0 10px 30px rgba(19, 33, 68, .08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif; }
.container { width: min(980px, calc(100% - 32px)); margin: 0 auto; }
.site-header { background: #0b1f3a; color: #fff; border-bottom: 4px solid #2e90fa; }
.header-inner { min-height: 118px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.eyebrow { color: #84caff; font-size: .78rem; font-weight: 800; letter-spacing: .12em; }
h1 { margin: 4px 0 0; font-size: clamp(1.35rem, 3vw, 2rem); line-height: 1.2; }
h2 { margin-top: 0; }
.main-content { padding: 32px 0 56px; }
.panel, .question-card, .submit-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.panel { max-width: 700px; margin: 36px auto; padding: 32px; }
.start-panel form { display: grid; gap: 12px; margin-top: 24px; }
label { font-weight: 700; }
input[type="text"] { width: 100%; border: 1px solid #aeb8c2; border-radius: 9px; padding: 13px 14px; font: inherit; background: #fff; }
input[type="text"]:focus, input[type="radio"]:focus, input[type="checkbox"]:focus { outline: 3px solid rgba(46, 144, 250, .22); border-color: var(--accent); }
.primary-button, .secondary-button { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 9px; padding: 13px 20px; font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; }
.primary-button { background: var(--accent); color: #fff; }
.primary-button:hover { background: var(--accent-dark); }
.primary-button:disabled { cursor: not-allowed; opacity: .65; }
.secondary-button { border: 1px solid var(--line); color: var(--text); background: #fff; }
.danger { background: var(--danger); }
.rules { padding-left: 22px; color: var(--muted); }
.alert { padding: 12px 14px; border-left: 4px solid var(--danger); background: #fff1f0; border-radius: 7px; color: #7a271a; }
.timer-card { min-width: 128px; padding: 10px 16px; text-align: center; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); border-radius: 10px; }
.timer-card span { display: block; font-size: .78rem; color: #cfe5ff; }
.timer-card strong { display: block; font-size: 1.55rem; font-variant-numeric: tabular-nums; }
.timer-card .urgent { color: #fda29b; }
.candidate-bar { position: sticky; top: 0; z-index: 10; margin-bottom: 20px; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 12px 16px; background: rgba(255,255,255,.96); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 5px 18px rgba(15,23,42,.08); }
.candidate-bar span:last-child { margin-left: auto; color: var(--muted); }
.question-card { padding: 24px; margin: 18px 0; }
.question-meta { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.question-number { font-weight: 900; color: var(--accent); }
.question-type { padding: 3px 9px; border-radius: 999px; background: #eff8ff; color: #175cd3; font-size: .8rem; font-weight: 800; }
.instruction { margin: 0 0 12px; color: var(--muted); font-size: .92rem; }
.prompt { white-space: pre-line; font-weight: 650; margin-bottom: 16px; }
.options { display: grid; gap: 10px; }
.option-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font-weight: 500; cursor: pointer; }
.option-row:hover { border-color: #84adff; background: #f5f8ff; }
.option-row input { margin-top: 4px; transform: scale(1.15); }
.fill-input { max-width: 680px; }
.submit-panel { margin-top: 28px; padding: 24px; text-align: center; }
.footer { padding: 0 0 30px; text-align: center; color: var(--muted); font-size: .9rem; }
.success-panel { text-align: center; }
.success-icon { width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; background: #ecfdf3; color: var(--success); font-size: 2rem; font-weight: 900; }
.overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: rgba(7, 15, 28, .76); }
.overlay[hidden] { display: none; }
.overlay-card { width: min(420px, calc(100% - 32px)); background: #fff; padding: 30px; border-radius: 14px; text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 640px) {
  .header-inner { min-height: 145px; align-items: flex-start; padding: 22px 0; }
  .timer-card { min-width: 100px; }
  .panel, .question-card { padding: 20px; }
  .candidate-bar span:last-child { width: 100%; margin-left: 0; }
}
