*, *::before, *::after { box-sizing: border-box; }

:root {
  --navy: #1b2363;
  --navy-2: #283391;
  --blue: #2a8fd8;
  --sky: #eaf4fd;
  --gold: #c9a54c;
  --gold-2: #e6cf8e;
  --cream: #f6eed6;
  --ink: #141a3d;
  --muted: #646b86;
  --line: #e3e6ef;
  --bg: #f4f5fa;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(20,26,61,.04), 0 18px 40px -22px rgba(20,26,61,.28);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  background: var(--bg);
  position: relative;
}

/* Navy hero band behind the top of every page */
body::before {
  content: "";
  position: absolute; inset: 0 0 auto 0;
  height: 380px;
  z-index: -1;
  background:
    radial-gradient(700px 300px at 85% -10%, rgba(42,143,216,.55), transparent 70%),
    radial-gradient(500px 260px at 0% 110%, rgba(201,165,76,.22), transparent 70%),
    repeating-linear-gradient(135deg, rgba(255,255,255,.035) 0 2px, transparent 2px 22px),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
}
body.admin::before { height: 300px; }

.app { width: min(680px, 100%); margin: 0 auto; padding: 36px 16px 90px; }
.app.wide { width: min(1160px, 100%); }

/* ---------- Header ---------- */
.hero { text-align: center; color: #fff; margin-bottom: 26px; }
.crest {
  width: 104px; height: 104px; margin: 0 auto 16px;
  border-radius: 50%; background: #fff; padding: 6px;
  box-shadow: 0 0 0 3px var(--gold), 0 0 0 9px rgba(255,255,255,.12), 0 20px 40px -14px rgba(0,0,0,.5);
}
.crest img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; display: block; }
.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold-2);
}
.kicker::before, .kicker::after { content: ""; width: 22px; height: 1px; background: currentColor; opacity: .6; }
.hero h1 {
  margin: 8px 0 6px;
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(28px, 6vw, 38px); line-height: 1.1; letter-spacing: -0.01em;
}
.hero h1 .amp { color: var(--gold-2); font-style: italic; font-weight: 500; }
.hero .sub { margin: 0; color: rgba(255,255,255,.75); font-size: 15px; }

.countdown { display: inline-flex; gap: 8px; margin-top: 18px; }
.countdown .unit {
  min-width: 62px; padding: 8px 6px 6px;
  background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.16);
  border-radius: 12px; backdrop-filter: blur(4px);
}
.countdown .n { display: block; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.countdown .l { display: block; margin-top: 4px; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.6); }
.closes-note { margin: 10px 0 0; font-size: 12.5px; color: rgba(255,255,255,.65); }

/* ---------- Cards ---------- */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow); margin: 0 0 16px;
}
.card.center { text-align: center; padding: 36px 26px; }
.card h2, .h2 {
  margin: 0 0 6px; font-family: var(--serif); font-weight: 600;
  font-size: 22px; line-height: 1.25; letter-spacing: -0.005em;
}
.lede { margin: 0 0 20px; color: var(--muted); line-height: 1.55; }
.muted { color: var(--muted); }

.seal {
  width: 68px; height: 68px; margin: 0 auto 14px; border-radius: 50%;
  display: grid; place-items: center; font-size: 30px;
  background: var(--cream); color: var(--navy);
  box-shadow: inset 0 0 0 2px var(--gold);
}
.seal.ok { background: linear-gradient(135deg, var(--gold), #b38a2e); color: #fff; box-shadow: 0 12px 24px -12px rgba(179,138,46,.9); }

.alert {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 0 0 16px; padding: 13px 16px; border-radius: 14px;
  background: #fff5f5; border: 1px solid #fecaca; color: #b91c1c;
  font-weight: 600; font-size: 14px; box-shadow: var(--shadow);
}

/* ---------- Forms ---------- */
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 600; color: #39405e; }
.input {
  width: 100%; padding: 13px 14px; font: inherit; color: inherit;
  background: #fbfcfe; border: 1px solid #d6dae6; border-radius: 12px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.input:focus { outline: none; background: #fff; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(42,143,216,.15); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 20px; font: inherit; font-weight: 700; font-size: 15px;
  color: #fff; cursor: pointer; text-decoration: none;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 55%, var(--blue) 140%);
  border: 0; border-radius: 12px;
  box-shadow: 0 12px 24px -14px rgba(27,35,99,.9);
  transition: transform .15s, box-shadow .15s, opacity .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 16px 28px -14px rgba(27,35,99,.9); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.block { width: 100%; }
.btn:focus-visible, .ghost:focus-visible, .link:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.ghost {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px; font: inherit; font-size: 13.5px; font-weight: 600;
  color: #fff; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22);
  border-radius: 10px; cursor: pointer; text-decoration: none;
}
.ghost:hover { background: rgba(255,255,255,.18); }

.link {
  padding: 0; font: inherit; font-size: 14px; font-weight: 600; color: var(--navy-2);
  background: none; border: none; cursor: pointer; text-decoration: underline;
  text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 4px;
}

/* ---------- Ballot ---------- */
.voter {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin-bottom: 16px; padding: 12px 16px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
  font-size: 14px; color: var(--muted);
}
.voter strong { color: var(--ink); word-break: break-all; }

fieldset.award { border: 1px solid var(--line); min-width: 0; padding: 22px; transition: border-color .2s, box-shadow .2s; }
fieldset.award.done { border-color: #cfe3f6; }
/* legend floated = renders inside the card like a normal block */
legend.award-head { float: left; width: 100%; padding: 0; display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
legend.award-head + .chips { clear: both; }
.award-title .h2, .award-title .award-status { display: block; }
.num {
  display: grid; place-items: center; flex: none; width: 34px; height: 34px;
  font-family: var(--serif); font-size: 15px; font-weight: 600;
  color: var(--navy); background: var(--cream); border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--gold);
  transition: background .2s, color .2s;
}
.award.done .num { background: var(--navy); color: var(--gold-2); box-shadow: none; }
.award-title { flex: 1; min-width: 0; }
.award-title .h2 { font-size: 19px; margin: 0; }
.award-status { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.award.done .award-status { color: var(--blue); font-weight: 600; }

.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.chip { position: relative; cursor: pointer; display: block; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip .body {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px 8px 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
  font-size: 14px; font-weight: 600;
  transition: background .15s, border-color .15s, color .15s, transform .15s;
}
.chip .av {
  display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%;
  font-size: 12px; font-weight: 700; letter-spacing: .02em;
  color: var(--navy); background: var(--sky);
  transition: background .15s, color .15s;
}
.chip .tick { margin-left: auto; opacity: 0; color: var(--gold-2); font-size: 14px; transition: opacity .15s; }
.chip:hover .body { border-color: #b9cbe6; background: #fafcff; }
.chip input:checked + .body { color: #fff; border-color: var(--navy); background: var(--navy); transform: translateY(-1px); }
.chip input:checked + .body .av { background: var(--gold); color: var(--navy); }
.chip input:checked + .body .tick { opacity: 1; }
.chip input:focus-visible + .body { outline: 2px solid var(--blue); outline-offset: 2px; }

.submit-bar {
  position: sticky; bottom: 14px; z-index: 5;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 12px 12px 18px; margin-top: 6px;
  background: rgba(255,255,255,.92); backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 22px 44px -18px rgba(20,26,61,.45);
}
.progress { flex: 1; min-width: 0; }
.progress-label { font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.segments { display: flex; gap: 4px; }
.segments i { flex: 1; height: 5px; border-radius: 99px; background: #e6e9f2; transition: background .2s; }
.segments i.on { background: linear-gradient(90deg, var(--navy-2), var(--blue)); }

/* Compact header once voting starts, so the ballot sits higher */
.hero.compact .crest { width: 76px; height: 76px; padding: 4px; margin-bottom: 12px; }
.hero.compact h1 { font-size: clamp(24px, 5vw, 30px); margin-top: 6px; }
.hero.compact .sub { display: none; }
.hero.compact .countdown { margin-top: 12px; }
.hero.compact .countdown .unit { min-width: 52px; padding: 6px 4px 5px; }
.hero.compact .countdown .n { font-size: 18px; }
.hero.compact .closes-note { display: none; }

/* Step navigation (JS wizard) */
.steps {
  position: sticky; top: 10px; z-index: 6;
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  margin: 0 0 14px; padding: 6px;
  background: rgba(255,255,255,.92); backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
}
.steps::-webkit-scrollbar { display: none; }
.step {
  flex: none; display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 6px; font: inherit; font-size: 13px; font-weight: 600;
  color: var(--muted); background: transparent; border: 0; border-radius: 11px; cursor: pointer;
  transition: background .15s, color .15s;
}
.step:hover:not(:disabled) { background: #f3f5fb; color: var(--ink); }
.step:disabled { opacity: .45; cursor: not-allowed; }
.step-n {
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  font-size: 12px; font-weight: 700; background: #eef0f6; color: var(--muted);
}
.step.done .step-n { background: var(--navy); color: var(--gold-2); }
.step.current { background: var(--sky); color: var(--navy); }
.step.current .step-n { background: var(--blue); color: #fff; }
.step:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }

.wizard fieldset.award { display: none; }
.wizard fieldset.award.current { display: block; animation: rise .28s ease-out; }
.wizard .review:not([hidden]) { animation: rise .28s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.review .summary { margin: 0; }

.btn-back {
  flex: none; width: 44px; height: 44px; font: inherit; font-size: 18px; font-weight: 700;
  color: var(--navy); background: #fff; border: 1px solid var(--line); border-radius: 12px; cursor: pointer;
}
.btn-back:hover { background: #f5f7fc; }
[hidden] { display: none !important; }

/* Done page ballot summary */
.summary { margin: 22px 0 18px; text-align: left; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.summary div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 16px; font-size: 14px; }
.summary div + div { border-top: 1px solid var(--line); }
.summary span { color: var(--muted); }
.summary strong { text-align: right; }

/* ---------- Admin ---------- */
.topbar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  color: #fff; margin-bottom: 22px;
}
.topbar .crest { width: 56px; height: 56px; margin: 0; padding: 3px; box-shadow: 0 0 0 2px var(--gold), 0 10px 20px -10px rgba(0,0,0,.5); }
.topbar h1 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 24px; line-height: 1.15; }
.topbar .meta { font-size: 13px; color: rgba(255,255,255,.7); margin-top: 2px; }
.topbar .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.topbar form { margin: 0; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; }
.pill.on { color: #065f46; background: #d1fae5; }
.pill.off { color: #991b1b; background: #fee2e2; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.on .dot { animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; box-shadow: var(--shadow); }
.stat-l { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.stat-n { margin-top: 6px; font-family: var(--serif); font-size: 32px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-n.sm { font-family: var(--sans); font-size: 18px; font-weight: 700; padding-top: 8px; }

.dash { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.voters { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; margin: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.grid .card { margin: 0; }
.zeros { margin-top: 10px; }
.zeros summary {
  cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--muted);
  list-style: none; padding: 6px 0;
}
.zeros summary::-webkit-details-marker { display: none; }
.zeros summary::before { content: "▸ "; }
.zeros[open] summary::before { content: "▾ "; }
.zeros .names { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 4px; }
.zeros .names span { font-size: 12.5px; padding: 4px 9px; border-radius: 99px; background: #f3f4f8; color: var(--muted); }
.vlist { list-style: none; margin: 0; padding: 0; }
.vlist li { display: flex; gap: 10px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.vlist li:last-child { border-bottom: 0; }
.vlist .i { color: var(--muted); width: 26px; flex: none; font-variant-numeric: tabular-nums; font-size: 12px; }
.vlist .em { flex: 1; min-width: 0; word-break: break-all; font-weight: 600; }
.vlist .t { color: var(--muted); font-size: 12px; white-space: nowrap; }
@media (max-width: 1000px) {
  .dash { grid-template-columns: 1fr; }
  .voters { position: static; max-height: none; }
}
.leader {
  display: flex; align-items: center; gap: 12px; margin: 12px 0 18px; padding: 12px 14px;
  background: linear-gradient(135deg, #fbf6e6, var(--cream)); border: 1px solid #ecdcae; border-radius: 14px;
}
.leader .crown { font-size: 20px; }
.leader .who { font-weight: 700; }
.leader .why { font-size: 12.5px; color: #7a6527; }
.leader.empty { background: #f7f8fb; border-color: var(--line); color: var(--muted); }

.row { margin-bottom: 11px; }
.row-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 5px; font-size: 13.5px; font-weight: 600; }
.row-head .n { font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.row.top .row-head .n { color: var(--navy); }
.bar { height: 7px; border-radius: 99px; background: #eef0f6; overflow: hidden; }
.fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, #9fb6e3, #8fc4ee); }
.row.top .fill { background: linear-gradient(90deg, var(--gold), #e2bd5e); }
.row.zero { opacity: .55; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); }
th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; }
tbody tr:hover { background: #fafbfe; }
td:first-child { color: var(--muted); width: 48px; font-variant-numeric: tabular-nums; }
td { word-break: break-word; }

.login { max-width: 420px; margin: 0 auto; }

.footnote { margin: 28px 0 0; text-align: center; font-size: 12px; color: #9ba1b8; letter-spacing: .02em; }

@media (max-width: 760px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .topbar .actions { margin-left: 0; width: 100%; }
}
@media (max-width: 520px) {
  .card, fieldset.award { padding: 20px 18px; }
  .chips { grid-template-columns: 1fr 1fr; }
  .chip .body { font-size: 13px; gap: 8px; padding: 7px 8px 7px 7px; }
  .chip .av { width: 28px; height: 28px; font-size: 11px; }
  .chip .tick { display: none; }
  .countdown .unit { min-width: 54px; }
  .grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition-duration: .01ms !important; animation: none !important; } }

/* =================== v3 additions =================== */
.alert.ok { background: #effaf4; border-color: #bbe6cc; color: #11643b; }
.alert.info { background: var(--sky); border-color: #cfe3f6; color: var(--navy); }
textarea.input { resize: vertical; min-height: 120px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13.5px; line-height: 1.6; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #646b86 50%), linear-gradient(135deg, #646b86 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }

.btn.outline { color: var(--navy); background: #fff; border: 1.5px solid #cdd3e6; box-shadow: none; }
.btn.outline:hover { border-color: var(--navy); background: #f8f9fd; }
.btn.gold { color: var(--navy); background: linear-gradient(135deg, var(--gold-2), var(--gold)); box-shadow: 0 12px 24px -14px rgba(201,165,76,.9); }
.btn.sm { padding: 9px 14px; font-size: 13.5px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 4px; }
.btn-row.left { justify-content: flex-start; }
.btn-row form { margin: 0; }

.seal.mail { background: var(--sky); color: var(--blue); box-shadow: inset 0 0 0 2px #bcdaf3; font-size: 28px; }
.card.center .summary { margin: 18px 0; }

.how { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 0; margin: 0 0 8px; }
.how li { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 14px 8px;
  font-size: 13px; font-weight: 600; color: #4a5170; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.how li span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  font-family: var(--serif); font-weight: 600; background: var(--cream); color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--gold); }

.reveal-note { display: flex; gap: 12px; align-items: center; padding: 14px 18px; margin: 0 0 16px;
  background: linear-gradient(135deg, #fbf6e6, var(--cream)); border: 1px solid #ecdcae; border-radius: 16px; font-size: 14px; color: #5d4b16; }
.reveal-note .ico { font-size: 22px; }
.reveal-left { color: #8a7333; font-variant-numeric: tabular-nums; }

.footnote span { color: #b3b8cb; }

/* Public winners */
.present-btn { margin-top: 18px; }
.winners { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.winner-card { margin: 0; text-align: center; padding: 28px 24px 24px; position: relative; overflow: hidden; }
.winner-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--gold), var(--gold-2), var(--gold)); }
.award-label { font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.trophy { font-size: 38px; margin: 12px 0 4px; }
.winner-name { font-family: var(--serif); font-size: 26px; font-weight: 600; line-height: 1.2; color: var(--navy); }
.winner-meta { margin-top: 6px; font-size: 13px; color: var(--muted); }
.runners { margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--line); text-align: left; }
.runners .row { margin-bottom: 9px; }

/* Presentation stage */
.stage { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; cursor: pointer; color: #fff; text-align: center; padding: 24px;
  background:
    radial-gradient(900px 500px at 50% 0%, rgba(42,143,216,.35), transparent 70%),
    radial-gradient(700px 400px at 50% 110%, rgba(201,165,76,.25), transparent 70%),
    linear-gradient(160deg, #121a52, #1b2363 50%, #232d85); }
.stage-x { position: absolute; top: 18px; right: 18px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08); color: #fff; font-size: 18px; cursor: pointer; }
.stage-hint { position: absolute; bottom: 18px; left: 0; right: 0; font-size: 12px; color: rgba(255,255,255,.45); }
.stage-slide { animation: stageIn .6s cubic-bezier(.2,.8,.2,1); }
@keyframes stageIn { from { opacity: 0; transform: translateY(18px) scale(.98); } }
.stage-crest { width: clamp(110px, 16vw, 180px); border-radius: 50%; background: #fff; padding: 6px; box-shadow: 0 0 0 4px var(--gold); margin-bottom: 28px; }
.stage-kicker { font-size: clamp(13px, 1.6vw, 18px); font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-2); margin-bottom: 18px; }
.stage-title { font-family: var(--serif); font-weight: 600; font-size: clamp(38px, 6.5vw, 88px); line-height: 1.08; }
.stage-sub { margin-top: 22px; font-size: clamp(18px, 2.4vw, 30px); color: rgba(255,255,255,.75); font-style: italic; font-family: var(--serif); }
.stage-trophy { font-size: clamp(60px, 9vw, 120px); margin-bottom: 8px; animation: pop .7s cubic-bezier(.2,1.4,.4,1) both; }
.stage-winner { font-family: var(--serif); font-weight: 600; font-size: clamp(44px, 8vw, 110px); line-height: 1.05; color: #fff;
  text-shadow: 0 6px 40px rgba(201,165,76,.45); animation: pop .8s .15s cubic-bezier(.2,1.2,.4,1) both; }
@keyframes pop { from { opacity: 0; transform: scale(.7); } }

/* Admin extras */
.pill.gold { color: #6b5212; background: var(--cream); margin-left: 4px; }
.stat-s { margin-top: 6px; font-size: 12px; color: var(--muted); }
.stat-n small { font-size: 18px; color: var(--muted); font-family: var(--sans); font-weight: 600; }
.topbar .actions { flex-wrap: wrap; }
.ballot-item { border-bottom: 1px solid var(--line); }
.ballot-item:last-of-type { border-bottom: 0; }
.ballot-item summary { display: flex; align-items: center; gap: 10px; padding: 11px 0; cursor: pointer; list-style: none; font-size: 13.5px; }
.ballot-item summary::-webkit-details-marker { display: none; }
.ballot-item summary:hover .em { color: var(--navy-2); }
.ballot-item .em { flex: 1; min-width: 0; word-break: break-all; font-weight: 600; }
.ballot-item .t { color: var(--muted); font-size: 12px; white-space: nowrap; }
.badge { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; font-size: 11px; font-weight: 800; }
.badge.ok { background: #d1fae5; color: #065f46; }
.badge.wait { background: #fef3c7; color: #92400e; }
.ballot-body { padding: 2px 0 14px 32px; font-size: 13px; }
.status-line { color: var(--muted); margin-bottom: 8px; font-size: 12.5px; }
.pick { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; }
.pick span { color: var(--muted); }
.danger { margin-top: 10px; padding: 7px 12px; font: inherit; font-size: 12.5px; font-weight: 700; color: #b91c1c;
  background: #fff5f5; border: 1px solid #fecaca; border-radius: 9px; cursor: pointer; }
.danger:hover { background: #fee2e2; }
.h3 { margin: 18px 0 8px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.names-list { display: flex; flex-wrap: wrap; gap: 6px; }
.names-list span { font-size: 12.5px; padding: 4px 9px; border-radius: 99px; background: #fef3c7; color: #92400e; word-break: break-all; }

.section-title { margin: 30px 0 14px; font-family: var(--serif); font-size: 24px; font-weight: 600; scroll-margin-top: 16px; }
#voters { scroll-margin-top: 16px; }
.settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.settings .card { margin: 0; }
.settings .h2 { font-size: 19px; }
.settings .lede { font-size: 14px; margin-bottom: 16px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.inline-form .field { margin: 0; flex: 1 1 130px; }
.inline-form .btn { flex: none; }
.setting-state { margin: 14px 0 10px; font-size: 13.5px; color: #4a5170; }
.smtp-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.smtp-form .field.wide, .smtp-form .btn { grid-column: 1 / -1; }
.smtp-form .field { margin-bottom: 12px; }
.test-form { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); }

@media (max-width: 520px) {
  .how li { font-size: 12px; padding: 12px 6px; }
  .smtp-form { grid-template-columns: 1fr; }
  .winner-name { font-size: 23px; }
}

/* v4 */
.okbtn { margin-top: 10px; padding: 7px 12px; font: inherit; font-size: 12.5px; font-weight: 700; color: #065f46;
  background: #effaf4; border: 1px solid #bbe6cc; border-radius: 9px; cursor: pointer; }
.okbtn:hover { background: #d1fae5; }
.confirm-mode { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: 0 0 16px; border-radius: 12px; font-size: 13px; }
.confirm-mode > div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.confirm-mode span { color: var(--muted); }
.confirm-mode.on { background: #effaf4; border: 1px solid #bbe6cc; }
.confirm-mode.off { background: #fff8eb; border: 1px solid #f5d9a3; }

/* v5 */
.mail-state { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 7px 14px; border-radius: 99px; font-size: 13px; font-weight: 600; }
.mail-state.ok { background: #effaf4; color: #11643b; }
.mail-state.wait { background: var(--sky); color: var(--navy); }
.mail-state.bad { background: #fff5f5; color: #b91c1c; border-radius: 12px; }
.spin { width: 13px; height: 13px; border-radius: 50%; border: 2px solid #bcd5ef; border-top-color: var(--blue); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.stat.warn { border-color: #f5d9a3; background: #fffbf2; }
.stat-toggle { margin: 6px 0 0; }
.linkbtn { padding: 0; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--navy-2); background: none; border: 0; cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }
.opt { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); }
.opt-row { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; font-size: 13.5px; }
.opt-row > div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.opt-row span { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.switch { position: relative; flex: none; width: 46px; height: 26px; padding: 0; border: 0; border-radius: 99px; background: #d5d9e5; cursor: pointer; transition: background .2s; }
.switch i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch.on { background: linear-gradient(135deg, var(--navy-2), var(--blue)); }
.switch.on i { transform: translateX(20px); }
.switch:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.queue { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 0 0 12px; padding: 10px 14px; background: #f7f8fc; border-radius: 12px; font-size: 13px; color: var(--muted); }
.queue strong { color: var(--ink); }
.queue .bad strong, .queue .bad { color: #b91c1c; }
.queue form { margin: 0 0 0 auto; }
.queue-err { margin: -4px 0 14px; font-size: 12px; color: #b91c1c; word-break: break-word; }
