:root {
  --ink: #1d232b;
  --muted: #5b6470;
  --paper: #f6f4ef;
  --card: #ffffff;
  --line: #dcd8cf;
  --accent: #1f3a5f;
  --accent-ink: #ffffff;
  --accent-soft: #e7edf5;
  --ok: #1d6b45;
  --bad: #a3271f;
  --bad-soft: #fbecea;
  --warn: #8a5a00;
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e9ecf0; --muted: #a5adb8; --paper: #14181d; --card: #1c2229; --line: #313a44;
    --accent: #8fb3e0; --accent-ink: #0f1a28; --accent-soft: #223246; --ok: #63c08f;
    --bad: #f08c82; --bad-soft: #3a2220; --warn: #e2b04a;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
a { color: var(--accent); }
.top { background: var(--ink); color: var(--paper); }
@media (prefers-color-scheme: dark) { .top { background: #0b0e12; color: var(--ink); } }
.top-inner { max-width: 680px; margin: 0 auto; padding: 14px 16px; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
.top-inner.wide, main.wide { max-width: 1200px; }
.mark { font-family: Georgia, "Times New Roman", serif; font-size: 20px; letter-spacing: .02em; }
.sub { font-size: 13px; opacity: .75; letter-spacing: .04em; text-transform: uppercase; }
main { max-width: 680px; margin: 0 auto; padding: 24px 16px 56px; }
h1 { font-family: Georgia, "Times New Roman", serif; font-weight: 600; font-size: 30px; line-height: 1.2; margin: 0 0 8px; }
.lede { color: var(--muted); margin: 0 0 14px; font-weight: 600; }
.intro p { margin: 0 0 12px; }
.note { background: var(--accent-soft); border-radius: var(--radius); padding: 12px 14px; font-size: 14.5px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 20px 20px; margin-top: 18px; }
.center { text-align: center; padding: 28px 20px; }
fieldset { border: 0; border-top: 1px solid var(--line); margin: 0; padding: 18px 0 6px; }
fieldset:first-of-type { border-top: 0; }
legend { font-weight: 700; font-size: 18px; padding: 0; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; float: left; width: 100%; }
legend + * { clear: both; }
.step { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 14px; }
.field { display: block; font-weight: 600; font-size: 14.5px; margin: 0 0 12px; }
.field input, select { display: block; width: 100%; margin-top: 6px; font: inherit; font-weight: 400; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--card); color: var(--ink); }
.field input:focus, .writein input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.field small, .radio small { color: var(--muted); font-weight: 400; }
.field.indent { margin-left: 30px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .row { grid-template-columns: 1fr; } h1 { font-size: 26px; } }
.check, .radio { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 12px; font-size: 15px; cursor: pointer; }
.check input, .radio input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--accent); }
.bad input { border-color: var(--bad); }
.err { color: var(--bad); font-size: 14px; margin: -6px 0 12px; font-weight: 600; }
.alert { background: var(--bad-soft); color: var(--bad); border-radius: var(--radius); padding: 12px 14px; margin-top: 16px; }
.help { color: var(--muted); font-size: 14.5px; margin: 0 0 12px; }
.choices { display: grid; gap: 8px; }
.choice { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: var(--card); }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice .box { width: 22px; height: 22px; border: 2px solid var(--muted); border-radius: 4px; flex: none; display: grid; place-items: center; }
.choice input:checked + .box { background: var(--accent); border-color: var(--accent); }
.choice input:checked + .box::after { content: "✕"; color: var(--accent-ink); font-size: 14px; font-weight: 700; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice input:focus-visible + .box { outline: 2px solid var(--accent); outline-offset: 2px; }
.choice.disabled { opacity: .45; cursor: not-allowed; }
.cand { font-weight: 600; }
.writeins { display: grid; gap: 8px; margin-top: 2px; }
.writein input { width: 100%; font: inherit; padding: 11px 12px; border: 1px dashed var(--line); border-radius: 10px; background: var(--card); color: var(--ink); }
.writein input:not(:placeholder-shown) { border-style: solid; border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.counter { font-weight: 700; margin: 12px 0; }
.counter.full { color: var(--ok); }
button, .button { display: inline-block; font: inherit; font-weight: 700; border-radius: 10px; padding: 13px 18px; border: 0; cursor: pointer; text-decoration: none; text-align: center; }
.primary { background: var(--accent); color: var(--accent-ink); width: 100%; font-size: 17px; margin-top: 6px; }
.secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.fine { color: var(--muted); font-size: 13.5px; }
.foot { color: var(--muted); font-size: 14px; margin-top: 18px; }
.ok { color: var(--ok); font-weight: 600; }
.big-icon { font-size: 40px; width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 10px; background: var(--accent-soft); color: var(--accent); }
.ok-icon { color: var(--ok); }
.inline { margin: 16px 0 6px; }
.hp, .sr { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
/* admin */
.admin-head h1 { margin-bottom: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 14px 0; }
.stats div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.stats b { display: block; font-size: 28px; font-family: Georgia, serif; }
.stats span { color: var(--muted); font-size: 13px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.actions .primary { width: auto; margin: 0; }
.filter select { width: auto; display: inline-block; }
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-top: 12px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
td small { color: var(--muted); }
.pill { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--accent-soft); color: var(--accent); }
.st-completed .pill { color: var(--ok); }
.st-expired .pill, .st-declined .pill { color: var(--bad); background: var(--bad-soft); }
tr.superseded { opacity: .6; }
.warn { color: var(--warn) !important; }
.links a { display: inline-block; margin-right: 10px; font-weight: 600; }
.empty { text-align: center; color: var(--muted); padding: 28px; }
.holder-note { border-top: 1px solid var(--line); padding: 16px 0 6px; }
.holder-note p { margin: 6px 0 0; color: var(--muted); font-size: 14.5px; }
