:root {
  --ink: #252b29;
  --muted: #69706c;
  --line: #dedfd8;
  --bg: #f5f4ef;
  --panel: #fff;
  --brand: #294c40;
  --brand-dark: #1d382f;
  --accent: #294c40;
  --danger: #9a3931;
  --radius: 4px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-family: "Bahnschrift", "Trebuchet MS", sans-serif; color: var(--ink); background: var(--bg); line-height: 1.65; }
h1, h2, h3 { line-height: 1.3; font-weight: 500; }
h1 { font-family: Georgia, "Times New Roman", serif; font-size: 2.1rem; margin: 12px 0 20px; }
h2 { font-size: 1.1rem; margin: 28px 0 10px; }
p { margin: 12px 0; }
a { color: var(--brand); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; }
.topbar { background: #fff; border-bottom: 1px solid var(--line); padding: 20px max(24px, calc((100vw - 1120px) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.topbar .brand { color: var(--ink); font-weight: 600; text-decoration: none; }
.topbar .brand span { display: inline-block; color: var(--muted); font-weight: 400; margin-left: 18px; padding-left: 18px; border-left: 1px solid var(--line); font-size: .85rem; }
.header-note { font-size: .8rem; color: var(--muted); }
.topbar nav a, .topbar nav button { color: var(--brand); background: transparent; border: 1px solid var(--line); padding: 6px 12px; border-radius: 3px; text-decoration: none; }
.wrap { max-width: 1100px; margin: 48px auto; padding: 0 24px; }
.narrow { max-width: 680px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; margin-bottom: 24px; }
label { display: block; font-weight: 500; margin: 14px 0 6px; font-size: .92rem; }
input, select, textarea { width: 100%; padding: 11px 12px; border: 1px solid #c7ccc4; border-radius: 3px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 2px; }
textarea { resize: vertical; }
input[type="checkbox"], input[type="radio"] { width: 17px; height: 17px; accent-color: var(--brand); flex-shrink: 0; }
.btn { display: inline-block; background: var(--brand); color: #fff; border: 1px solid var(--brand); padding: 10px 20px; border-radius: 3px; font-size: .92rem; font-weight: 500; text-decoration: none; }
.btn:hover { background: var(--brand-dark); }
.btn.secondary { background: #fff; color: var(--ink); border-color: #c7ccc4; }
.btn.secondary:hover { background: #f1f2ec; }
.btn.block { width: 100%; }
.btn.small { padding: 6px 12px; font-size: .85rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.text-button { background: none; border: 0; color: var(--brand); padding: 4px 0; text-decoration: underline; text-underline-offset: 4px; font-size: .86rem; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.center { text-align: center; }
.row { display: flex; gap: 16px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 200px; }
.notice { border-left: 2px solid var(--brand); background: #f3f5ef; padding: 12px 16px; margin: 14px 0; font-size: .95rem; }
.notice.warn, .notice.danger { border-left-color: #a89670; background: #f5f3eb; }
.msg { padding: 12px 16px; border-radius: 3px; margin: 12px 0; display: none; font-size: .88rem; }
.msg.show { display: block; }
.msg.err { background: #f7ede9; color: #803c32; }
.msg.ok { background: #edf3ec; color: var(--accent); }
.eyebrow { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 0 0 14px; }
.intro-card { max-width: 730px; margin: 0 auto; padding: 40px 48px; }
.exam-facts { display: flex; flex-wrap: wrap; gap: 20px 36px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 22px 0; margin: 28px 0; }
.exam-facts dt { font-size: .75rem; color: var(--muted); }
.exam-facts dd { margin: 4px 0 0; font-size: .9rem; }
.integrity-label { display: flex; gap: 12px; align-items: flex-start; border-top: 1px solid var(--line); padding-top: 22px; margin-top: 28px; font-size: .9rem; font-weight: 400; }
.integrity-label input { margin-top: 6px; }
.begin-note { display: inline-block; margin-left: 14px; }
.exam-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-bottom: 24px; }
.exam-toolbar .eyebrow { margin-bottom: 4px; }
.clock { display: flex; flex-direction: column; align-items: flex-end; }
.timer { font-family: "Bahnschrift", "Trebuchet MS", sans-serif; font-variant-numeric: tabular-nums; font-size: 1.9rem; line-height: 1.2; color: var(--ink); }
.timer.low { color: var(--danger); }
.exam-layout { display: grid; grid-template-columns: 205px minmax(0, 1fr); border: 1px solid var(--line); background: #fff; border-radius: 4px; }
.question-nav { padding: 24px; border-right: 1px solid var(--line); background: #fafaf6; }
.question-nav h2 { font-size: .9rem; margin: 0; font-weight: 600; }
.question-nav #answer-count { margin-top: 4px; }
.question-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 24px; }
.question-number { min-height: 36px; border: 1px solid #d1d6cc; background: #fff; border-radius: 3px; color: var(--ink); font-size: .8rem; font-variant-numeric: tabular-nums; }
.question-number.answered { background: #e5eee4; border-color: #c6d4c3; color: #294c40; }
.question-number.current { background: var(--brand); color: #fff; border-color: var(--brand); outline: 2px solid var(--brand); outline-offset: 2px; }
.answered-dot { width: 9px; height: 9px; background: #c6d4c3; display: inline-block; border-radius: 50%; }
.grid-key { margin: 14px 0 30px; }
.question-nav .btn { width: 100%; padding: 10px 8px; }
.activity-count { margin: 18px 0 0; }
.question-sheet { padding: 28px 40px 32px; min-width: 0; }
.question-meta { display: flex; justify-content: space-between; gap: 12px; font-size: .75rem; }
.qprompt { font-size: 1.45rem; line-height: 1.55; margin: 26px 0; }
.qprompt:focus { outline: none; }
.options { display: grid; gap: 10px; border: 0; margin: 0; padding: 0; }
.opt { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 3px; cursor: pointer; margin: 0; font-weight: 400; font-size: .95rem; }
.opt:hover { background: #fafaf7; border-color: #a8b6a4; }
.opt:has(input:checked) { border-color: var(--brand); background: #f0f5ee; }
.opt input { margin: 0; }
.option-letter { color: var(--muted); font-size: .78rem; }
.hint-area { margin-top: 20px; }
.hint { border-left: 2px solid #b5c3ad; padding-left: 14px; color: #586651; font-size: .88rem; margin: 12px 0 0; }
.question-footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); }
.save-line { display: flex; gap: 12px; align-items: baseline; color: var(--muted); font-size: .8rem; margin-top: 16px; }
.result-box { padding: 22px 0; margin: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.result-box h2 { margin-top: 0; }
dialog { width: min(500px, calc(100% - 32px)); border: 1px solid var(--line); border-radius: 4px; padding: 28px; color: var(--ink); }
dialog::backdrop { background: rgb(25 30 26 / 35%); }
dialog h2 { margin-top: 0; font-family: Georgia, serif; font-size: 1.5rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: .9rem; vertical-align: top; }
th { color: var(--muted); font-size: .75rem; font-weight: 500; }
tr.clickable:hover { background: #f4f6f0; cursor: pointer; }
.pill { display: inline-block; padding: 2px 7px; border-radius: 3px; font-size: .78rem; background: #f0f1eb; color: #586651; }
.pill.ok { background: #edf3ec; color: var(--accent); }
.pill.flag { background: #f7ede9; color: var(--danger); }
.mark-ok { color: var(--accent); }
.mark-no { color: var(--danger); }
.proctor-img, .sheet-img { max-width: 100%; border: 1px solid var(--line); border-radius: 3px; }
.thumbs { display: flex; gap: 12px; flex-wrap: wrap; }
.thumbs img { max-width: 220px; }
.linkbox { display: block; width: 100%; font-family: Consolas, monospace; font-size: .85rem; padding: 10px 12px; border: 1px solid var(--line); border-radius: 3px; background: #fafaf6; word-break: break-all; margin-top: 8px; }
.footnote { color: var(--muted); font-size: .75rem; margin-top: 28px; }
.candidate-page .footnote { text-align: center; }
.table-scroll { overflow-x: auto; }
@media (max-width: 720px) {
  .topbar { padding: 16px 20px; }
  .topbar .brand span, .header-note { display: none; }
  .wrap { margin: 24px auto; padding: 0 16px; }
  h1 { font-size: 1.8rem; }
  .card, .intro-card { padding: 26px 24px; }
  .exam-layout { grid-template-columns: 1fr; }
  .question-nav { border-right: 0; border-bottom: 1px solid var(--line); padding: 20px; }
  .question-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); margin-top: 16px; gap: 7px; }
  .grid-key { display: inline-block; margin: 14px 16px 10px 0; }
  .question-nav .btn { width: auto; padding: 8px 18px; }
  .activity-count { display: inline-block; margin: 10px 0 0 16px; }
  .question-sheet { padding: 24px; }
  .question-meta { flex-wrap: wrap; }
  .qprompt { font-size: 1.3rem; }
  .exam-toolbar { gap: 16px; }
  .exam-toolbar #exam-track { font-size: .82rem; }
  .timer { font-size: 1.6rem; }
  .clock { flex-shrink: 0; }
  .begin-note { display: block; margin-left: 0; }
}
@media (prefers-reduced-motion: no-preference) { .opt, .question-number, .btn { transition: background-color .12s, border-color .12s; } }
