:root {
  --navy: #0f2747;
  --blue: #1d5d9b;
  --yellow: #f3c52b;
  --red: #d63b3b;
  --green: #3a8f62;
  --ink: #1f2937;
  --muted: #64748b;
  --line: #dbe3ec;
  --surface: #ffffff;
  --background: #f4f7fb;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--background); }
a { color: var(--blue); }
.header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.header-inner { max-width: 1120px; margin: 0 auto; padding: 16px 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { width: min(330px, 55vw); height: auto; }
.timer-panel { text-align: right; min-width: 190px; }
.timer-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.timer { font-size: 24px; font-weight: 800; color: var(--navy); }
.timer.over { color: var(--red); }
.container { max-width: 1120px; margin: 0 auto; padding: 32px 24px 64px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 12px 30px rgba(15,39,71,.07); padding: 28px; }
.hero { display: grid; grid-template-columns: 1.25fr .75fr; gap: 28px; align-items: start; }
.eyebrow { font-size: 12px; font-weight: 800; color: var(--blue); text-transform: uppercase; letter-spacing: .12em; }
h1 { color: var(--navy); font-size: clamp(30px, 4vw, 48px); margin: 8px 0 12px; line-height: 1.08; }
h2 { color: var(--navy); margin: 0 0 12px; }
h3 { color: var(--navy); }
p { line-height: 1.6; }
.info-list { margin: 18px 0 0; padding-left: 20px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
label { font-weight: 700; font-size: 14px; }
input, select { width: 100%; border: 1px solid #cbd5e1; border-radius: 10px; padding: 12px 13px; font: inherit; background: #fff; }
input:focus, select:focus { outline: 3px solid rgba(29,93,155,.16); border-color: var(--blue); }
button { border: 0; border-radius: 10px; padding: 12px 18px; font: inherit; font-weight: 800; cursor: pointer; }
button.primary { background: var(--navy); color: #fff; }
button.secondary { background: #e9eff6; color: var(--navy); }
button.danger { background: var(--red); color: #fff; }
button:disabled { opacity: .55; cursor: not-allowed; }
.hidden { display: none !important; }
.assessment-top { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; margin-bottom: 18px; }
.progress-wrap { min-width: 260px; }
.progress-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 7px; }
.progress { height: 10px; background: #e7edf4; border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; background: var(--blue); width: 0; transition: width .25s ease; }
.question-card { padding: 26px; }
.meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 9px; background: #eef4fa; color: var(--blue); font-size: 12px; font-weight: 800; }
.question-text { font-size: 21px; line-height: 1.45; margin: 8px 0 20px; color: var(--navy); }
.options { display: grid; gap: 11px; }
.option { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; border: 1px solid var(--line); padding: 14px; border-radius: 12px; cursor: pointer; transition: .15s; }
.option:hover { border-color: var(--blue); background: #f8fbff; }
.option.selected { border-color: var(--blue); background: #eef6ff; box-shadow: 0 0 0 2px rgba(29,93,155,.12); }
.option input { margin-top: 4px; }
.confidence-row { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 18px; display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; }
.confidence-options { display: flex; flex-wrap: wrap; gap: 8px; }
.confidence-options label { border: 1px solid var(--line); border-radius: 999px; padding: 8px 11px; cursor: pointer; font-weight: 700; }
.confidence-options input { width: auto; margin-right: 5px; }
.review-box { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.review-box input { width: auto; }
.nav-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; }
.palette { display: grid; grid-template-columns: repeat(10, 1fr); gap: 8px; margin-top: 18px; }
.palette button { padding: 9px 4px; background: #e9eff6; color: var(--navy); }
.palette button.answered { background: #dff3e7; color: #1d6843; }
.palette button.review { box-shadow: inset 0 0 0 2px var(--yellow); }
.palette button.current { background: var(--navy); color: #fff; }
.warning { margin: 18px 0; border-left: 5px solid var(--yellow); background: #fff8d9; padding: 14px 16px; border-radius: 8px; color: #6d5812; }
.submit-bar { margin-top: 22px; display: flex; justify-content: flex-end; }
.success { max-width: 760px; margin: 50px auto; text-align: center; }
.reference { display: inline-block; font-size: 22px; font-weight: 900; color: var(--navy); background: #eef4fa; padding: 12px 18px; border-radius: 10px; letter-spacing: .04em; }
.admin-login { max-width: 460px; margin: 40px auto; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--navy); background: #f5f8fb; font-size: 13px; }
.score-good { color: var(--green); font-weight: 800; }
.score-warn { color: #9a6b00; font-weight: 800; }
.score-low { color: var(--red); font-weight: 800; }
.section-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 12px; margin: 18px 0; }
.section-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fff; }
.answer-review { display: grid; gap: 12px; }
.answer-item { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: #fff; }
.answer-item.correct { border-left: 5px solid var(--green); }
.answer-item.incorrect { border-left: 5px solid var(--red); }
.small { font-size: 13px; color: var(--muted); }
@media (max-width: 760px) {
  .hero, .form-grid, .assessment-top, .confidence-row { grid-template-columns: 1fr; }
  .timer-panel { display: none; }
  .palette { grid-template-columns: repeat(5, 1fr); }
  .header-inner { padding: 12px 16px; }
  .container { padding: 22px 14px 48px; }
  .card { padding: 20px; }
}
