/* =========================================================================
   NIMCOS E-VOTING: institutional stylesheet
   Primary #207027 · Secondary #FFFFFF · neutral greys · restrained surfaces
   No external fonts or frameworks (strict CSP, no third-party requests).
   ========================================================================= */

:root {
  --green: #207027;
  --green-hover: #195a1f;
  --green-deep: #103d15;
  --green-ink: #0c2e10;
  --green-tint: #eef6ef;
  --green-tint-2: #dcecde;
  --white: #ffffff;

  --ink: #17201a;
  --ink-2: #3a453d;
  --muted: #5d6a61;
  --line: #dbe2dc;
  --line-strong: #c3cdc5;
  --bg: #f4f6f4;
  --surface: #ffffff;

  --info: #1f4e8c;   --info-bg: #edf3fb;
  --warn: #8a5100;   --warn-bg: #fff5e0;   --warn-line: #f0d29a;
  --error: #a4221a;  --error-bg: #fdf0ef;  --error-line: #efc0bb;
  --success: #1c6a24; --success-bg: #eaf5eb;

  --radius: 6px;
  --radius-lg: 10px;
  --focus: 0 0 0 3px #ffffff, 0 0 0 5px #1f4e8c;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
}
img { max-width: 100%; display: block; }
a { color: var(--green); text-underline-offset: 2px; }
a:hover { color: var(--green-hover); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5rem; color: var(--ink); }
h1 { font-size: 1.4rem; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; font-weight: 650; }
h3 { font-size: 1.05rem; font-weight: 650; }
p { margin: 0 0 1rem; }
small, .small { font-size: .875rem; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); letter-spacing: .02em; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.hidden { display: none !important; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip-link:focus { left: 1rem; top: 1rem; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 3px; }

/* National band: green-white-green hairline across the top of every page */
.band { height: 5px; background: linear-gradient(90deg, var(--green) 0 33.3%, #fff 33.3% 66.6%, var(--green) 66.6%); border-bottom: 1px solid var(--line); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: .6rem 1.1rem;
  font: inherit; font-weight: 600; font-size: .95rem; line-height: 1.2;
  border-radius: var(--radius); border: 1px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color .12s, border-color .12s, color .12s;
}
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-hover); color: #fff; }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--green-tint); border-color: var(--green); color: var(--green-ink); }
.btn-danger { background: var(--error); color: #fff; }
.btn-danger:hover { background: #861b14; color: #fff; }
.btn-ghost { background: transparent; color: var(--green); padding-left: .5rem; padding-right: .5rem; }
.btn-ghost:hover { background: var(--green-tint); }
.btn-lg { min-height: 52px; padding: .8rem 1.5rem; font-size: 1.05rem; }
.btn-sm { min-height: 34px; padding: .35rem .75rem; font-size: .85rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.btn-row.spread { justify-content: space-between; }
.inline-form { display: inline; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--green); text-decoration: underline; cursor: pointer; }
.link-button:disabled { color: var(--muted); text-decoration: none; cursor: not-allowed; opacity: .75; }

/* ---------- Forms ---------- */
.field { margin-bottom: 1.1rem; }
.field label, .label, fieldset.field > legend { display: block; font-weight: 600; margin-bottom: .35rem; color: var(--ink); }
.field .help { font-size: .85rem; color: var(--muted); margin-top: .3rem; }
.req { color: var(--error); }
.input, select.input, textarea.input {
  width: 100%; min-height: 44px; padding: .55rem .75rem;
  font: inherit; color: var(--ink); background: #fff;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
}
textarea.input { min-height: 110px; resize: vertical; }
.input:focus { border-color: var(--info); outline: none; box-shadow: 0 0 0 3px rgba(31, 78, 140, .2); }
.input[aria-invalid="true"] { border-color: var(--error); }
.input-lg { min-height: 56px; font-size: 1.2rem; letter-spacing: .04em; }
.error-text { color: var(--error); font-size: .88rem; margin-top: .35rem; font-weight: 500; }
.check { display: flex; gap: .6rem; align-items: flex-start; }
.check input { width: 20px; height: 20px; margin-top: .15rem; accent-color: var(--green); flex: none; }
.form-grid { display: grid; gap: 0 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .form-grid.two { grid-template-columns: 1fr 1fr; } .form-grid.three { grid-template-columns: repeat(3, 1fr); } }
.span-2 { grid-column: 1 / -1; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }

.otp-input { font-family: var(--mono); font-size: 1.8rem; text-align: center; letter-spacing: .5em; padding-left: .5em; max-width: 280px; }

/* ---------- Password visibility toggle ---------- */
.password-wrap { position: relative; display: flex; align-items: center; width: 100%; }
.password-wrap.w-auto { width: auto; display: inline-flex; }
.password-wrap .input { width: 100%; padding-right: 2.75rem; }
.password-toggle {
  position: absolute; right: 1px; top: 1px; bottom: 1px; width: 2.6rem;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: none; cursor: pointer; color: var(--muted);
  padding: 0; border-radius: 0 var(--radius) var(--radius) 0; transition: color .12s; z-index: 2;
}
.password-toggle:hover { color: var(--green); }
.password-toggle:focus-visible { outline: 2px solid var(--info); outline-offset: -2px; border-radius: var(--radius); }
.password-toggle svg { display: block; width: 20px; height: 20px; stroke: currentColor; }

/* ---------- Alerts ---------- */
.alert { padding: .85rem 1rem; border-radius: var(--radius); border: 1px solid; margin-bottom: 1.25rem; font-size: .95rem; }
.alert strong { display: block; margin-bottom: .15rem; }
.alert ul { margin: .25rem 0 0; padding-left: 1.2rem; }
.alert-success { background: var(--success-bg); border-color: #b8dcbb; color: var(--success); }
.alert-error { background: var(--error-bg); border-color: var(--error-line); color: var(--error); }
.alert-warning { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.alert-info { background: var(--info-bg); border-color: #c4d6ee; color: var(--info); }
.demo-banner { background: #fff5e0; border-bottom: 1px solid var(--warn-line); color: var(--warn); font-size: .85rem; text-align: center; padding: .4rem 1rem; font-weight: 600; }

/* ---------- Status labels ---------- */
[hidden] { display: none !important; }
.badge { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; font-weight: 600; padding: .2rem .6rem; border-radius: 4px; white-space: nowrap; line-height: 1.2; border: none; }
.badge-neutral { background: var(--line); color: var(--ink-2); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-live { background: var(--green-tint-2); color: var(--green-ink); font-weight: 700; }
.badge-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); flex: none; }
.badge-warning { background: var(--warn-bg); color: var(--warn); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-error { background: var(--error-bg); color: var(--error); }
.badge-muted { background: var(--bg); color: #777; border: 1px solid var(--line); }

/* ---------- Panels (bordered sections, used sparingly) ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.panel-body { padding: 1.25rem; }
.panel-head { padding: .9rem 1.25rem; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.panel-head h2, .panel-head h3 { margin: 0; }
.panel + .panel { margin-top: 1.25rem; }
@media (min-width: 720px) { .panel-body { padding: 1.5rem; } }

/* ---------- Definition list ---------- */
.dl { display: grid; grid-template-columns: minmax(110px, 32%) 1fr; gap: .55rem 1rem; margin: 0; }
.dl dt { color: var(--muted); font-size: .9rem; }
.dl dd { margin: 0; font-weight: 500; min-width: 0; overflow-wrap: anywhere; word-break: normal; }
.dl dd a { overflow-wrap: anywhere; word-break: break-all; }
@media (max-width: 520px) {
  .dl { display: flex; flex-direction: column; gap: .25rem; }
  .dl dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; margin-top: .4rem; }
  .dl dt:first-child { margin-top: 0; }
  .dl dd { margin: 0 0 .3rem 0; font-size: .95rem; }
}

/* =========================================================================
   VOTER INTERFACE: dedicated, calm, no navigation chrome
   ========================================================================= */
.voter-body { background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
.voter-header { background: #fff; border-bottom: 1px solid var(--line); }
.voter-header .inner { max-width: 960px; margin: 0 auto; padding: .7rem 16px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--ink); min-width: 0; }
.brand img { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); flex: none; }
.brand-name { font-weight: 800; font-size: 1.02rem; letter-spacing: .03em; color: var(--green-ink); line-height: 1.1; }
.brand-sub { font-size: .72rem; color: var(--muted); line-height: 1.25; }
.voter-main { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 1.5rem 16px 3rem; }
.voter-main.wide { max-width: 960px; }
.voter-footer { border-top: 1px solid var(--line); background: #fff; font-size: .8rem; color: var(--muted); }
.voter-footer .inner { max-width: 960px; margin: 0 auto; padding: 1rem 16px; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: center; }
.voter-footer a { color: var(--muted); }

.page-title { margin-bottom: .25rem; }
h1.page-title.danger, .page-title.danger { color: #a4221a !important; }
.lede { color: var(--muted); font-size: 1.02rem; margin-bottom: 1.5rem; }
.step-label { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--green); margin-bottom: .35rem; }

/* Entry page: photograph panel + form */
.entry { display: grid; gap: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.entry-photo { position: relative; min-height: 180px; background: var(--green-deep) center / cover no-repeat; }
.entry-photo.hq { background-image: url("../images/hq-evening.jpg"); }
.entry-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12, 46, 16, .05) 30%, rgba(12, 46, 16, .78)); }
.entry-photo .caption { position: absolute; left: 1.25rem; right: 1.25rem; bottom: 1rem; color: #fff; z-index: 1; }
.entry-photo .caption strong { display: block; font-size: 1.05rem; }
.entry-photo .caption span { font-size: .82rem; opacity: .9; }
.entry-form { padding: 1.5rem 1.25rem 1.75rem; }
.entry-seal { width: 88px; height: 88px; border-radius: 50%; border: 1px solid var(--line); margin-bottom: 1rem; }
@media (min-width: 860px) {
  .voter-main.entry-wrap { max-width: 1040px; padding-top: 2.5rem; }
  .entry { grid-template-columns: 1.05fr 1fr; min-height: 520px; }
  .entry-photo { min-height: 100%; }
  .entry-form { padding: 2.5rem 2.5rem; display: flex; flex-direction: column; justify-content: center; }
}

.election-card { border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; padding: 1.25rem; }
.election-card + .election-card { margin-top: 1rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin: 1.25rem 0; }
.fact { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem .85rem; }
.fact span { display: block; font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.fact strong { font-size: 1.05rem; }
.notice-list { margin: 0 0 1.5rem; padding: 0; list-style: none; }
.notice-list li { position: relative; padding-left: 1.6rem; margin-bottom: .6rem; }
.notice-list li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--green); font-weight: 800; }

/* ---------- Ballot ---------- */
.ballot-top { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--line); }
.ballot-top .inner { max-width: 960px; margin: 0 auto; padding: .55rem 16px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-size: .8rem; }
.progress { height: 6px; background: var(--green-tint-2); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; width: 0; background: var(--green); transition: width .2s; }
.ballot-layout { display: grid; gap: 1.5rem; }
@media (min-width: 900px) { .ballot-layout { grid-template-columns: 240px 1fr; align-items: start; } }
.ballot-index { display: none; }
@media (min-width: 900px) {
  .ballot-index { display: block; position: sticky; top: 70px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: .75rem; }
  .ballot-index ol { list-style: none; margin: 0; padding: 0; counter-reset: pos; }
  .ballot-index li a { display: flex; gap: .5rem; align-items: center; padding: .32rem .5rem; border-radius: var(--radius); text-decoration: none; color: var(--ink-2); font-size: .78rem; }
  .ballot-index li a:hover { background: var(--green-tint); }
  .ballot-index .dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-strong); flex: none; display: grid; place-items: center; font-size: .65rem; color: #fff; }
  .ballot-index li.done .dot { background: var(--green); border-color: var(--green); }
  .ballot-index li.done .dot::after { content: "✓"; }
  .ballot-index li.has-error a { color: var(--error); }
}

.position { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.15rem; scroll-margin-top: 80px; }
.position + .position { margin-top: 1.25rem; }
.position.has-error { border-color: var(--error-line); box-shadow: 0 0 0 1px var(--error-line); }
.position legend { padding: 0; margin-bottom: .2rem; width: 100%; }
.position-count { font-size: .7rem; color: var(--muted); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.position-name { display: block; font-size: 1.15rem; font-weight: 800; color: var(--green-ink); letter-spacing: .01em; margin-top: .1rem; }
.position-instruction { color: var(--muted); font-size: .82rem; margin: .15rem 0 .9rem; }

.options { display: grid; gap: .75rem; grid-template-columns: 1fr; }
@media (min-width: 560px) { .options { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .options { grid-template-columns: repeat(3, 1fr); } }
.option { position: relative; display: block; cursor: pointer; }
.option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.option-card {
  height: 100%; display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: .9rem .8rem .85rem; border: 2px solid var(--line); border-radius: var(--radius-lg); background: #fff;
  transition: border-color .12s, background-color .12s;
}
.option:hover .option-card { border-color: var(--line-strong); }
.option input:focus-visible + .option-card { box-shadow: var(--focus); }
.option input:checked + .option-card { border-color: var(--green); background: var(--green-tint); }
.candidate-photo { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); background: var(--green-tint-2); }
.candidate-initials { width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; font-size: 1.65rem; font-weight: 700; color: var(--green-ink); background: var(--green-tint-2); border: 1px solid var(--line); }
.candidate-no { font-size: .65rem; color: var(--muted); font-weight: 700; letter-spacing: .06em; margin-top: .5rem; }
.candidate-name { font-weight: 700; font-size: .92rem; line-height: 1.25; margin-top: .15rem; }
.candidate-meta { font-size: .78rem; color: var(--muted); margin-top: .15rem; }
.select-indicator {
  margin-top: .75rem; display: inline-flex; align-items: center; gap: .45rem; min-height: 34px; padding: .3rem .8rem;
  border: 1px solid var(--line-strong); border-radius: 999px; font-weight: 700; font-size: .78rem; color: var(--ink-2);
}
.select-indicator .ring { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--muted); display: grid; place-items: center; }
.option input[type="checkbox"] + .option-card .ring { border-radius: 3px; }
.option input:checked + .option-card .select-indicator { background: var(--green); border-color: var(--green); color: #fff; }
.option input:checked + .option-card .ring { border-color: #fff; background: #fff; }
.option input:checked + .option-card .ring::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.option input[type="checkbox"]:checked + .option-card .ring::after { border-radius: 1px; }
.select-indicator .when-on { display: none; }
.option input:checked + .option-card .when-on { display: inline; }
.option input:checked + .option-card .when-off { display: none; }
.clear-choice { margin-top: .75rem; font-size: .82rem; }

.ballot-nav { position: sticky; bottom: 0; z-index: 15; background: #fff; border-top: 1px solid var(--line); margin: 1.5rem -16px 0; padding: .75rem 16px calc(.75rem + env(safe-area-inset-bottom)); }
.ballot-nav .inner { max-width: 960px; margin: 0 auto; display: flex; gap: .75rem; align-items: center; justify-content: space-between; }
.ballot-nav .status { font-size: .78rem; color: var(--muted); text-align: center; flex: 1; }
.js-stepper .position:not(.is-current) { display: none; }
.js-stepper .position + .position { margin-top: 0; }

/* Review */
.review-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; }
.review-item { display: grid; grid-template-columns: 1fr; gap: .15rem; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); }
.review-item:last-child { border-bottom: 0; }
@media (min-width: 640px) { .review-item { grid-template-columns: 38% 1fr; align-items: center; } }
.review-pos { font-weight: 700; color: var(--green-ink); font-size: .92rem; text-transform: uppercase; letter-spacing: .02em; }
.review-choice { font-weight: 600; }
.review-choice .muted { font-weight: 400; }
.review-none { color: var(--warn); font-weight: 600; }

/* Receipt */
.receipt { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.receipt-head { background: var(--green); color: #fff; padding: 1.5rem 1.25rem; text-align: center; }
.receipt-head .tick { width: 56px; height: 56px; border-radius: 50%; background: #fff; color: var(--green); display: grid; place-items: center; font-size: 1.9rem; font-weight: 800; margin: 0 auto .75rem; }
.receipt-head h1 { color: #fff; font-size: 1.35rem; margin: 0; letter-spacing: .02em; }
.receipt-body { padding: 1.5rem 1.25rem; }
.reference { font-family: var(--mono); font-size: 1.45rem; font-weight: 700; letter-spacing: .06em; color: var(--green-ink); background: var(--green-tint); border: 1px dashed var(--green); padding: .6rem 1rem; border-radius: var(--radius); text-align: center; word-break: break-all; }

/* Modal dialog */
dialog.modal {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 0;
  width: min(440px, calc(100% - 24px));
  max-width: calc(100% - 24px);
  height: fit-content;
  max-height: calc(100dvh - 36px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
  color: var(--ink);
  background: #ffffff;
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: hidden;
  margin: auto;
  position: fixed;
  inset: 0;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}
dialog.modal:not([open]) {
  display: none !important;
}
dialog.modal[open] {
  display: flex;
  flex-direction: column;
}
dialog.modal::backdrop {
  background: rgba(10, 32, 14, .65);
  backdrop-filter: blur(3px);
}
.modal-head {
  padding: 1rem 1.15rem .75rem;
  border-bottom: 1px solid var(--line);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: .75rem;
  background: #ffffff;
  flex-shrink: 0;
  width: 100%;
}
.modal-head h2 {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--green-ink);
  line-height: 1.25;
}
.modal-head > div:not(.already-voted-badge) {
  flex: 1 1 auto;
  min-width: 0;
}
.modal-close {
  background: transparent;
  border: 0;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 0 .25rem;
  margin-left: auto;
  border-radius: var(--radius);
  flex-shrink: 0;
}
.modal-close:hover {
  color: var(--ink);
  background: var(--bg);
}
.modal-body {
  padding: .9rem 1.15rem 1rem;
  font-size: .95rem;
  line-height: 1.5;
  box-sizing: border-box;
  word-wrap: break-word;
  overflow-wrap: break-word;
  flex: 1 1 auto;
  width: 100%;
}
.modal-body p {
  margin: 0 0 .75rem;
}
.modal-body p:last-child {
  margin-bottom: 0;
}
.modal-body a {
  word-break: break-all;
  overflow-wrap: anywhere;
}
.modal-foot {
  padding: .85rem 1.15rem 1.15rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: .55rem;
  background: #fafbfa;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-sizing: border-box;
  flex-shrink: 0;
  width: 100%;
}
.modal-foot .btn,
.modal-foot button,
.modal-foot a {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
  margin: 0;
  padding: .72rem 1rem;
  font-size: .95rem;
  font-weight: 600;
}
.modal-summary { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; margin-bottom: 1rem; }

/* Already voted modal styling */
.already-voted-modal .modal-head {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.already-voted-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--green-tint);
  color: var(--green);
  border: 1px solid var(--green-tint-2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.already-voted-badge svg {
  width: 22px;
  height: 22px;
}
.already-voted-title {
  margin: 0;
  font-size: 1.15rem;
  color: var(--green-ink);
  font-weight: 700;
  line-height: 1.2;
}
.already-voted-lead {
  margin: 0 0 .75rem;
  font-size: .95rem;
  line-height: 1.5;
  color: var(--ink);
}
.already-voted-notice {
  background: #fff9e6;
  border: 1px solid #edd5a1;
  border-left: 4px solid #b8740c;
  border-radius: var(--radius);
  padding: .75rem .85rem;
  margin: 0;
  color: #694403;
  font-size: .88rem;
  line-height: 1.45;
  box-sizing: border-box;
  width: 100%;
}
.already-voted-notice strong {
  display: block;
  color: #4d3100;
  margin-bottom: .25rem;
  font-size: .9rem;
}
.already-voted-banner {
  margin-bottom: 1.25rem;
  border-left: 4px solid var(--amber);
}

@media (max-width: 480px) {
  dialog.modal {
    width: calc(100% - 24px);
    max-width: calc(100% - 24px);
    border-radius: var(--radius);
    inset: 0;
    margin: auto;
  }
  .modal-head {
    padding: .85rem .95rem .65rem;
  }
  .modal-body {
    padding: .75rem .95rem .85rem;
    font-size: .9rem;
  }
  .modal-foot {
    padding: .75rem .95rem 1rem;
    gap: .5rem;
  }
  .already-voted-title {
    font-size: 1.1rem;
  }
}

/* =========================================================================
   ADMINISTRATION
   ========================================================================= */
.admin-body { background: var(--bg); }
.admin-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); }
.admin-main { min-width: 0; }
@media (min-width: 1024px) { .admin-shell { grid-template-columns: 260px minmax(0, 1fr); } }

.sidebar { background: var(--green-deep); color: #dfeae0; position: fixed; inset: 0 auto 0 0; width: 280px; transform: translateX(-100%); transition: transform .2s; z-index: 60; display: flex; flex-direction: column; overflow-y: auto; }
.sidebar.open { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .35); }
@media (min-width: 1024px) { .sidebar { position: sticky; top: 0; height: 100vh; width: auto; transform: none; } }
.sidebar-brand { display: flex; align-items: center; gap: .7rem; padding: 1rem 1.1rem; border-bottom: 1px solid rgba(255, 255, 255, .1); text-decoration: none; color: #fff; }
.sidebar-brand img { width: 40px; height: 40px; border-radius: 50%; background: #fff; }
.sidebar-brand strong { display: block; font-size: .95rem; letter-spacing: .04em; }
.sidebar-brand span { font-size: .72rem; opacity: .75; }
.nav-group { padding: .9rem .6rem .2rem; }
.nav-group-title { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: #9fbca3; padding: 0 .6rem .35rem; font-weight: 700; }
.nav-link { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .5rem .65rem; border-radius: var(--radius); color: #e7efe8; text-decoration: none; font-size: .9rem; }
.nav-link:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav-link.active { background: #fff; color: var(--green-ink); font-weight: 650; }

/* Nav sections open and close in place: they never push the topbar, the page
   content or the rest of the sidebar's links around. The sidebar itself
   already scrolls independently of the main content (see .sidebar), so an
   accordion opening only ever grows inside that same scroll area. */
.nav-accordion { padding: .5rem .6rem 0; }
.nav-accordion > summary.nav-group-title { display: flex; align-items: center; justify-content: space-between; gap: .5rem; cursor: pointer; list-style: none; padding: .5rem .6rem; border-radius: var(--radius); }
.nav-accordion > summary.nav-group-title::-webkit-details-marker { display: none; }
.nav-accordion > summary.nav-group-title:hover { background: rgba(255, 255, 255, .06); color: #dfeae0; }
.nav-accordion > summary.nav-group-title::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform .15s; flex: none; }
.nav-accordion[open] > summary.nav-group-title::after { transform: rotate(45deg); }
.nav-accordion-body { display: flex; flex-direction: column; gap: .1rem; padding: .2rem .0 .5rem; }
.nav-count { background: #d23a2e; color: #fff; font-size: .7rem; font-weight: 700; border-radius: 999px; padding: .05rem .45rem; }
.sidebar-foot { margin-top: auto; padding: 1rem 1.1rem; font-size: .75rem; color: #9fbca3; border-top: 1px solid rgba(255, 255, 255, .1); }
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .4); z-index: 55; }

.topbar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.topbar .inner { display: flex; align-items: center; gap: .75rem; padding: .6rem 16px; min-height: 60px; }
@media (min-width: 720px) { .topbar .inner { padding: .6rem 28px; } }
.menu-toggle { display: inline-flex; }
@media (min-width: 1024px) { .menu-toggle { display: none; } }
.topbar-title { font-weight: 650; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; gap: .5rem; }
.user-menu { position: relative; }
.user-menu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .5rem; padding: .35rem .5rem; border-radius: var(--radius); }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover { background: var(--bg); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.user-menu .menu { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); min-width: 230px; box-shadow: 0 10px 30px rgba(0, 0, 0, .12); padding: .4rem; z-index: 50; }
.user-menu .menu a, .user-menu .menu button { display: block; width: 100%; text-align: left; padding: .5rem .7rem; border-radius: 4px; color: var(--ink); text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; }
.user-menu .menu a:hover, .user-menu .menu button:hover { background: var(--bg); }
.menu-meta { padding: .5rem .7rem; font-size: .8rem; color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: .3rem; }
.user-name-label { display: none; font-size: .9rem; font-weight: 600; }
@media (min-width: 720px) { .user-name-label { display: inline; } }

.content { padding: 1.25rem 16px 3rem; max-width: 1320px; width: 100%; }
@media (min-width: 720px) { .content { padding: 1.75rem 28px 3rem; } }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.page-head h1 { margin: 0; }
.page-head .sub { color: var(--muted); margin-top: .25rem; font-size: .95rem; }
.breadcrumb { font-size: .82rem; color: var(--muted); margin-bottom: .35rem; }
.breadcrumb a { color: var(--muted); }

.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; overflow-x: auto; }
.tabs a { padding: .6rem .9rem; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; font-weight: 600; font-size: .92rem; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a.active { color: var(--green-ink); border-bottom-color: var(--green); }

/* Stats: a single bordered strip, not a wall of cards */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); margin-bottom: 1.5rem; }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { padding: 1.1rem 1.25rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat:nth-child(2n) { border-right: 0; }
@media (min-width: 900px) { .stat { border-bottom: 0; } .stat:nth-child(2n) { border-right: 1px solid var(--line); } .stat:nth-child(4n) { border-right: 0; } }
.stat-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.stat-value { font-size: 1.4rem; font-weight: 600; letter-spacing: -.01em; color: var(--ink); line-height: 1.2; margin-top: .25rem; font-variant-numeric: tabular-nums; }
.stat-value.green { color: var(--green); }
.stat-note { font-size: .8rem; color: var(--muted); margin-top: .15rem; }

.grid-2 { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 1100px) { .grid-2 { grid-template-columns: 1.6fr 1fr; } .grid-2.even { grid-template-columns: 1fr 1fr; } }
.stack > * + * { margin-top: 1.25rem; }

.meter { height: 10px; background: var(--green-tint-2); border-radius: 999px; overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--green); width: 0; }

.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--line); font-size: .93rem; }
.checklist li:last-child { border-bottom: 0; }
.checklist .ok { color: var(--success); font-weight: 650; }
.checklist .bad { color: var(--error); font-weight: 650; }

/* Tables */
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; background: #fafbfa; padding: .7rem .9rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: .7rem .9rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fbfcfb; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .actions { text-align: right; white-space: nowrap; }
.table .winner td { background: var(--green-tint); }
.table-empty { padding: 2.5rem 1rem; text-align: center; color: var(--muted); }

.filters { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; margin-bottom: 1rem; }
.filters .field { margin: 0; min-width: 160px; flex: 1 1 160px; }
.filters .field.grow { flex: 2 1 240px; }
.filters .input { min-height: 40px; }

.pagination { display: flex; gap: .35rem; flex-wrap: wrap; margin-top: 1rem; align-items: center; }
.pagination a, .pagination span { padding: .35rem .7rem; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; font-size: .88rem; background: #fff; color: var(--ink); }
.pagination .current { background: var(--green); border-color: var(--green); color: #fff; }
.pagination .disabled { color: #aaa; }

.chart { width: 100%; min-height: 180px; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .bar { fill: var(--green); }
.chart .bar:hover { fill: var(--green-hover); }
.chart .axis { stroke: var(--line-strong); }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart-empty { color: var(--muted); font-size: .9rem; padding: 2rem 0; text-align: center; }

.hbar-list { list-style: none; margin: 0; padding: 0; }
.hbar-list li { padding: .45rem 0; }
.hbar-row { display: flex; justify-content: space-between; font-size: .88rem; margin-bottom: .25rem; gap: 1rem; }

.result-position { margin-bottom: 1.5rem; }
.tie-flag { display: inline-flex; gap: .4rem; align-items: center; background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn-line); padding: .25rem .6rem; border-radius: var(--radius); font-weight: 800; font-size: .8rem; letter-spacing: .06em; }

.workflow { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .5rem; counter-reset: wf; }
.workflow li { counter-increment: wf; border: 1px solid var(--line); background: #fff; border-radius: var(--radius); padding: .6rem .75rem; font-size: .85rem; color: var(--muted); }
.workflow li::before { content: counter(wf); display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--line); color: var(--ink-2); font-size: .72rem; font-weight: 700; margin-right: .45rem; }
.workflow li.done { border-color: #b8dcbb; color: var(--success); }
.workflow li.done::before { background: var(--green); color: #fff; content: "✓"; }
.workflow li.current { border-color: var(--green); color: var(--green-ink); font-weight: 650; box-shadow: inset 0 0 0 1px var(--green); }

.code-block { font-family: var(--mono); font-size: .8rem; background: #f6f8f6; border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem .7rem; overflow-x: auto; word-break: break-all; }
.meta-json { font-family: var(--mono); font-size: .75rem; color: var(--muted); max-width: 360px; white-space: pre-wrap; word-break: break-word; }
.thumb { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.thumb-initials { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--green-tint-2); color: var(--green-ink); font-weight: 700; font-size: .85rem; }
.person { display: flex; align-items: center; gap: .75rem; }

/* Admin login */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1fr; background: #fff; }
@media (min-width: 960px) { .auth-page { grid-template-columns: 1fr 1fr; } }
.auth-visual { display: none; background: var(--green-deep) url("../images/hq-atrium.jpg") center / cover no-repeat; position: relative; }
.auth-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(16, 61, 21, .15), rgba(16, 61, 21, .82)); }
.auth-visual .caption { position: absolute; left: 2rem; right: 2rem; bottom: 2rem; color: #fff; z-index: 1; }
@media (min-width: 960px) { .auth-visual { display: block; } }
.auth-panel { display: flex; flex-direction: column; justify-content: safe center; padding: 1.5rem 16px; max-width: 440px; width: 100%; margin: auto; box-sizing: border-box; }

/* Public results */
.public-results .position-result { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.1rem 1.25rem; margin-bottom: 1rem; }

/* Print: receipts and results print cleanly */
@media print {
  .band, .voter-header, .voter-footer, .legal-footer, .btn, .ballot-nav, .sidebar, .topbar, .no-print { display: none !important; }
  body { background: #fff; }
  .receipt, .panel { border-color: #999; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Spacing utilities (inline style attributes are blocked by the CSP) */
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.w-auto { width: auto; } .maxw-sm { max-width: 420px; } .maxw-md { max-width: 640px; }
.grow { flex: 1 1 auto; min-width: 0; }

/* Legend inside the card (fieldset legends otherwise sit on the border) */
.position legend { float: left; width: 100%; }
.position legend + * { clear: both; }

/* Phones: compact horizontal candidate rows so several choices fit on screen */
@media (max-width: 559px) {
  .option-card { flex-direction: row; align-items: center; text-align: left; gap: .85rem; padding: .75rem .85rem; }
  .option-card .candidate-photo, .option-card .candidate-initials { width: 64px; height: 64px; font-size: 1.25rem; flex: none; }
  .option-card .candidate-text { flex: 1; min-width: 0; }
  .option-card .candidate-no { margin-top: 0; }
  .option-card .select-indicator { margin-top: 0; padding: .35rem .6rem; flex: none; }
  .option-card .select-indicator .when-off, .option-card .select-indicator .when-on { font-size: .8rem; }
}
.candidate-text { display: flex; flex-direction: column; }
.brand > span { line-height: 1.25; }
.grid-2 > .panel + .panel, .grid-2 > * + .panel { margin-top: 0; }

/* ---------- Dashboard live vote count ---------- */
.h3 { font-size: 1.05rem; font-weight: 650; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.tally-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .tally-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1500px) { .tally-grid { grid-template-columns: repeat(3, 1fr); } }
.tally-position { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: .9rem 1rem; background: #fff; min-width: 0; }
.tally-head { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; margin-bottom: .6rem; padding-bottom: .5rem; border-bottom: 1px solid var(--line); }
.tally-head h3 { font-size: .98rem; }
.tally-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.tally-row { display: flex; align-items: center; gap: .7rem; padding: .4rem .5rem; border-radius: 10px; transition: background-color .3s; }
.tally-row.is-leading { background: var(--green-tint); }
.tally-row .thumb, .tally-row .thumb-initials { flex: none; }
.tally-body { flex: 1; min-width: 0; }
.tally-line { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; margin-bottom: .3rem; }
.tally-name { font-weight: 600; font-size: .92rem; min-width: 0; overflow-wrap: anywhere; }
.tally-name .badge { margin-left: .3rem; vertical-align: middle; }
.tally-votes { white-space: nowrap; text-align: right; }
.tally-votes strong { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.tally-row .meter { height: 7px; }
.tally-row .meter > span { transition: width .6s ease; }
.tally-row.bump strong[data-tally-votes] { color: var(--green); }
@media (prefers-reduced-motion: reduce) { .tally-row, .tally-row .meter > span { transition: none; } }

/* =========================================================================
   PUBLIC HOME PAGE (layout modelled on the NIS Landing & Exit Card portal)
   ========================================================================= */
:root { --accent: #f28c28; --home-tint: #eefaf5; --nav-bg: #f6f6f6; }
.home-body { background: #fff; }
.site-header { position: sticky; top: 0; z-index: 40; background: var(--nav-bg); border-bottom: 1px solid var(--line); }
.site-nav { position: relative; min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .5rem 5%; }
.site-brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--green-ink); }
.site-brand img { border-radius: 50%; }
.site-brand-name { display: block; font-weight: 800; font-size: 1rem; letter-spacing: .06em; line-height: 1.05; color: var(--green); }
.site-brand-sub { display: block; font-weight: 700; font-size: .72rem; letter-spacing: .18em; color: var(--green-ink); }
.site-links { display: flex; align-items: center; gap: clamp(0.65rem, 1.3vw, 1.6rem); font-size: .92rem; }
.site-links > a { color: var(--ink); text-decoration: none; font-weight: 500; padding: .3rem 0; border-bottom: 2px solid transparent; white-space: nowrap; }
.site-links > a:hover, .site-links > a[aria-current="page"] { color: var(--green); border-bottom-color: var(--green); }
.site-links-actions { display: flex; gap: .5rem; margin-left: clamp(0.5rem, 1vw, 1.25rem); }
.site-links-actions .btn { gap: .4rem; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: .4rem; color: var(--ink); cursor: pointer; }
@media (max-width: 1040px) {
  .nav-toggle { display: inline-flex; }
  .site-links { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(0, 0, 0, .08); padding: .5rem 5% 1rem; display: none; }
  .site-links.open { display: flex; }
  .site-links > a { padding: .8rem 0; border-bottom: 1px solid var(--line); }
  .site-links > a:hover, .site-links > a[aria-current="page"] { border-bottom-color: var(--line); }
  .site-links-actions { margin: 1rem 0 0; flex-wrap: wrap; }
  .site-links-actions .btn { flex: 1; }
}

.hero { position: relative; min-height: calc(100vh - 72px); display: flex; align-items: center; justify-content: center; text-align: center; color: #fff; padding: 4rem 5%;
  background: linear-gradient(180deg, rgba(8, 30, 12, .55), rgba(8, 30, 12, .78)), url("../images/hq-evening.jpg") center / cover no-repeat; }
.hero-inner { max-width: 820px; display: flex; flex-direction: column; align-items: center; gap: 1.75rem; }
.hero h1 { font-size: clamp(2.25rem, 3.6vw, 3rem); font-weight: 400; line-height: 1.15; margin: 0; letter-spacing: -.01em; color: #fff; }
.hero-accent { display: block; color: var(--accent); font-weight: 600; }
.hero-status { margin: 0; display: inline-flex; align-items: center; gap: .5rem; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .28); border-radius: 999px; padding: .4rem 1rem; font-size: .9rem; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 4px rgba(74, 222, 128, .25); flex: none; }
.hero-actions { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: center; }
.hero-action { display: flex; flex-direction: column; align-items: center; gap: .5rem; font-size: .88rem; }
.hero-action .btn-lg { min-width: 200px; }
.btn-light { background: #fff; color: #b8600c; border: 1px solid #fff; font-weight: 700; }
.btn-light:hover { background: #fff7ef; color: #96500c; }
.btn-outline-light { background: transparent; color: #fff; border: 1.5px solid #fff; gap: .35rem; }
.btn-outline-light:hover { background: rgba(255, 255, 255, .12); color: #fff; }
@media (prefers-reduced-motion: no-preference) { .live-dot { animation: pulse 2s ease-in-out infinite; } }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); } }

.home-section { padding: 5.5rem 5%; }
.home-band { padding: 5.5rem 5%; background: var(--home-tint); }
.home-title { text-align: center; font-size: clamp(1.35rem, 2.2vw, 1.6rem); font-weight: 800; margin: 0 0 2.75rem; color: var(--ink); }
.home-note { text-align: center; color: var(--muted); margin: -1.75rem 0 2.5rem; }
.home-note strong { color: var(--ink); }
.step-cards { list-style: none; margin: 0 auto; padding: 0; max-width: 1240px; display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .step-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1060px) { .step-cards { grid-template-columns: repeat(4, 1fr); } }
.step-card { border: 1px solid var(--line); border-radius: 12px; padding: 1.5rem; background: #fff; transition: box-shadow .2s, border-color .2s; }
.step-card:hover { border-color: var(--green-tint-2); box-shadow: 0 10px 28px rgba(16, 61, 21, .08); }
.step-icon { width: 44px; height: 44px; border-radius: 8px; background: var(--green-tint); color: var(--green); display: grid; place-items: center; margin-bottom: 1.1rem; }
.step-card h3 { font-size: 1.02rem; font-weight: 700; color: var(--green-ink); margin: 0 0 .6rem; }
.step-card p { font-size: .9rem; color: var(--muted); margin: 0; }

.req-grid { max-width: 1240px; margin: 0 auto; display: grid; gap: 2.5rem; grid-template-columns: 1fr; text-align: center; }
@media (min-width: 860px) { .req-grid { grid-template-columns: repeat(3, 1fr); } }
.req-icon { display: inline-block; margin-bottom: 1rem; }
.req-item h3 { color: var(--green-ink); font-size: 1.08rem; margin: 0 0 .6rem; }
.req-item p { color: var(--muted); font-size: .92rem; margin: 0 auto; max-width: 360px; }

.photo-cards { max-width: 1240px; margin: 0 auto; display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .photo-cards { grid-template-columns: repeat(3, 1fr); } }
.photo-card { background: var(--home-tint); border-radius: 14px; padding: 1.1rem 1.1rem 1.4rem; }
.photo-card img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 10px; margin-bottom: 1.1rem; }
.photo-card h3 { font-size: 1.02rem; color: var(--green-ink); margin: 0; line-height: 1.45; }

.site-footer { border-top: 1px solid var(--line); background: #fff; }
.site-footer-main { display: flex; justify-content: space-between; align-items: flex-start; gap: 2.5rem; flex-wrap: wrap; padding: 3.5rem 5%; }
.site-footer h2 { font-size: 1rem; margin: 1rem 0 .5rem; color: var(--ink); }
.site-footer-org { max-width: 420px; }
.site-footer-org p { font-size: .9rem; margin: 0 0 1rem; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; font-size: .9rem; color: var(--muted); }
.contact-list li { display: flex; align-items: center; gap: .6rem; }
.contact-list svg { color: var(--accent); flex: none; }
.contact-list a { color: var(--muted); }
.site-footer-links ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; font-size: .9rem; }
.site-footer-links h2 { margin-top: 0; color: var(--green-ink); }
.site-footer-links a { color: var(--ink-2); text-decoration: none; }
.site-footer-links a:hover { color: var(--green); text-decoration: underline; }
.site-footer-bar { background: var(--home-tint); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1.25rem 5%; font-size: .82rem; color: var(--muted); }

.legal-footer { margin: 0; padding: .85rem 16px; text-align: center; font-size: .78rem; color: var(--muted); border-top: 1px solid var(--line); background: #fff; }
.legal-footer-sep { margin: 0 .5rem; color: var(--line-strong); }
.admin-body .legal-footer { padding: .85rem 1.75rem; text-align: left; }
.auth-panel .legal-footer { border-top: 0; background: none; padding: .5rem 0 0; text-align: left; }

/* ---------- Announcements: scrolling ticker and pop-up ---------- */
.ticker { display: flex; align-items: stretch; background: var(--green-deep); color: #fff; font-size: .9rem; overflow: hidden; }
.ticker-important { background: #7a4a00; }
.ticker-urgent { background: var(--error); }
.ticker-label { flex: none; display: flex; align-items: center; gap: .4rem; padding: .55rem 1rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; font-size: .78rem; background: rgba(0, 0, 0, .22); }
.ticker-viewport { flex: 1; overflow: hidden; display: flex; align-items: center; min-width: 0; }
.ticker-track { display: flex; width: max-content; }
.ticker-items { list-style: none; margin: 0; padding: 0; display: flex; white-space: nowrap; }
.ticker-items li { padding: .55rem 2.5rem .55rem 0; }
.ticker-items li::before { content: "\2022"; margin-right: 1rem; opacity: .6; }
.ticker a { color: #fff; font-weight: 700; margin-left: .35rem; }
.ticker-toggle { flex: none; background: rgba(0, 0, 0, .22); color: #fff; border: 0; border-left: 1px solid rgba(255, 255, 255, .2); padding: 0 .9rem; font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer; }
.ticker-toggle:hover { background: rgba(0, 0, 0, .35); }
@media (prefers-reduced-motion: no-preference) {
  .ticker.is-moving .ticker-track { animation: ticker-scroll var(--ticker-duration, 40s) linear infinite; }
  .ticker.is-moving:hover .ticker-track, .ticker.is-moving:focus-within .ticker-track, .ticker.is-paused .ticker-track { animation-play-state: paused; }
}
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
/* Without motion (or before JS runs) the notices wrap as static text. */
.ticker:not(.is-moving) .ticker-items { white-space: normal; flex-wrap: wrap; }
.ticker:not(.is-moving) .ticker-items[aria-hidden="true"], .ticker:not(.is-moving) .ticker-toggle { display: none; }
.ticker:not(.is-moving) .ticker-items li { padding-left: 1rem; }

dialog.announce-modal { width: min(560px, calc(100vw - 32px)); }
.announce-modal .modal-head { border-top: 5px solid var(--green); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.announce-item { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.announce-item:last-child { border-bottom: 0; }
.announce-item h3 { margin: .35rem 0 .5rem; font-size: 1.08rem; color: var(--green-ink); }
.announce-item p { margin: 0 0 .75rem; }
.announce-urgent h3 { color: var(--error); }
.announce-static { background: var(--warn-bg); border-bottom: 1px solid var(--warn-line); padding: .75rem 5%; }
fieldset.field > legend { padding: 0; } fieldset.field .check { font-weight: 400; margin-bottom: .35rem; }
.input-with-button { display: flex; gap: .5rem; align-items: center; }
.input-with-button .input { flex: 1; }
.sn-lookup-msg { font-size: .85rem; margin-top: .35rem; line-height: 1.3; }
.sn-lookup-msg.success { color: var(--success); font-weight: 600; }
.sn-lookup-msg.info { color: var(--muted); }
.sn-lookup-msg.error { color: var(--error); font-weight: 500; }

/* ---------- "I am not a robot" check (voter sign-in) ---------- */
.human-check { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: .75rem .9rem; margin-bottom: 1.1rem; background: #fafbfa; }
.human-check.is-invalid { border-color: var(--error); background: var(--error-bg); }
.human-check-row { display: flex; gap: .6rem; align-items: center; margin: 0; font-weight: 600; cursor: pointer; }
.human-check-row input { width: 22px; height: 22px; accent-color: var(--green); flex: none; }
.human-check-question { margin-top: .7rem; padding-top: .7rem; border-top: 1px solid var(--line); }
.human-check-question label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .92rem; }
.human-check-question .input { max-width: 140px; }

/* ---------- Cloudflare Turnstile widget wrapper ---------- */
.turnstile-wrap { display: flex; justify-content: center; align-items: center; margin: 1rem 0; min-height: 65px; overflow-x: auto; }

/* ---------- QR Code Box & Utilities ---------- */
.text-center { text-align: center; }
.qr-box { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: #f8fafc; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 0.75rem; margin-bottom: 0.85rem; }
.qr-box img { background: #fff; padding: 0.25rem; border-radius: var(--radius-sm); border: 1px solid var(--line); max-width: 140px; width: 140px; height: 140px; display: block; margin: 0 auto; }

/* ---------- MFA Code Input (compact) ---------- */
.mfa-field { text-align: center; margin-bottom: 0.9rem; }
.mfa-field label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: .35rem; color: var(--ink-2); }
.mfa-input { font-family: var(--mono); font-size: 1.15rem; text-align: center; letter-spacing: .2em; padding: .45rem .6rem; max-width: 200px; width: 100%; margin: 0 auto; display: block; }
.mfa-input::placeholder { color: var(--muted); opacity: .5; letter-spacing: .2em; }

/* ---------- Official Results Header & Endorsement ---------- */
.results-header-center { text-align: center; margin-bottom: 2rem; }
.results-logo-wrap { display: flex; justify-content: center; margin-bottom: .85rem; }
.results-logo { border-radius: 50%; box-shadow: 0 4px 12px rgba(0,0,0,0.08); border: 2.5px solid var(--line-strong); width: 88px; height: 88px; object-fit: cover; }
.results-header-center .step-label { display: inline-block; text-align: center; margin-bottom: .35rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--green); font-size: .85rem; }
.results-header-center .page-title { margin: 0 0 .4rem; font-size: 1.95rem; font-weight: 800; color: var(--green-ink); letter-spacing: .01em; }
.results-header-center .lede { margin: 0; color: var(--muted); font-size: 1.05rem; }

.results-endorsement { margin-top: 2rem; margin-bottom: 2.5rem; }
.endorsement-card, .endorsement-box { width: 100%; border: 1.5px solid #207027; background: #ffffff; border-radius: var(--radius-md); box-shadow: 0 4px 14px rgba(32, 112, 39, 0.08); overflow: hidden; }
.endorsement-header { display: flex; align-items: center; justify-content: space-between; gap: .5rem; background: #f0f7f1; padding: .65rem 1rem; border-bottom: 1.5px solid #d1e7d4; font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #165b1c; }
.endorsement-header-left { display: flex; align-items: center; gap: .6rem; }
.endorsement-seal-img { border-radius: 50%; border: 1px solid #c2e0c7; flex: none; width: 28px; height: 28px; }
.endorsement-header-title { font-weight: 800; letter-spacing: .06em; }
.endorsement-body-horizontal { padding: 1rem 1.25rem; display: grid; grid-template-columns: 1fr 1.3fr 1fr; gap: 1.5rem; align-items: center; }
.endorsement-body-horizontal.endorsement-body-two-col { grid-template-columns: 1fr 1fr; }
.endorsement-col { display: flex; flex-direction: column; gap: .4rem; }
.endorsement-col:not(:last-child) { border-right: 1.5px solid #e0ede2; padding-right: 1.5rem; }
.endorsement-sub-item { display: flex; flex-direction: column; gap: .1rem; }
.endorsement-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.endorsement-value { font-size: 1.05rem; color: var(--ink); font-weight: 800; letter-spacing: .02em; }
.endorsement-col-signature { display: flex; flex-direction: column; gap: .3rem; align-items: flex-start; }
.endorsement-signature-frame, .endorsement-signature { background: #fafbfa; border: 1px dashed #b8dcbb; border-radius: var(--radius-sm); padding: .25rem .75rem; text-align: center; height: 52px; max-height: 52px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.signature-img, .endorsement-signature img { max-height: 48px; max-width: 140px; width: 140px; height: auto; display: block; margin: 0 auto; object-fit: contain; }
.endorsement-certified-item { margin-top: .4rem; }
.endorsement-date { font-size: .84rem; font-weight: 600; color: var(--ink-2); }
.endorsement-badge, .endorsement-seal { display: inline-flex; align-items: center; gap: .35rem; font-size: .72rem; color: #1b6823; font-weight: 700; background: #e8f5e9; border: 1px solid #c8e6c9; padding: .25rem .55rem; border-radius: 4px; }
@media (max-width: 768px) {
  .endorsement-body-horizontal { grid-template-columns: 1fr; gap: 1rem; }
  .endorsement-col:not(:last-child) { border-right: none; border-bottom: 1.5px solid #e0ede2; padding-right: 0; padding-bottom: 1rem; }
}

/* ---------- System Maintenance Mode ---------- */
.maintenance-banner { background: #fee2e2; border-bottom: 1px solid #f87171; color: #991b1b; font-size: .85rem; text-align: center; padding: .5rem 1rem; font-weight: 600; }
.maintenance-banner a { color: #991b1b; text-decoration: underline; margin-left: .5rem; font-weight: 700; }
.field-maintenance-toggle { background: #fff8e6; border: 1px solid #ffd591; border-radius: var(--radius); padding: .85rem 1rem; }
.maintenance-badge-wrap { margin-bottom: 1rem; }
.maintenance-actions { margin-top: 1.5rem; margin-bottom: 1rem; }
.admin-link-note { margin-top: 1.5rem; text-align: center; font-size: .82rem; color: var(--muted); }
.admin-link-note a { color: var(--muted); text-decoration: underline; }
.table .actions .actions-row { display: inline-flex; align-items: center; justify-content: flex-end; gap: .4rem; }
.table .actions form { display: inline-block; margin: 0; }

/* =========================================================================
   PUBLIC SCREENED CANDIDATES DIRECTORY (Institutional NIS/NIMCOS Styling)
   ========================================================================= */
.candidates-body { background: #f6f8f6; overflow-x: hidden; }

/* Hero section - Dignified institutional dark green gradient, no AI radial glow */
.candidates-hero {
  background: linear-gradient(180deg, #0c2e10 0%, #164f1d 100%);
  color: #fff;
  padding: 3rem 5% 4.25rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 3px solid var(--accent);
}
.candidates-hero-inner {
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.candidates-hero-seal-wrap {
  margin-bottom: 1.15rem;
}
.candidates-hero-seal {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  border: 3px solid #f5b041;
  box-shadow: 0 0 0 4px rgba(245, 176, 65, 0.25), 0 8px 20px rgba(0, 0, 0, 0.35);
  background: #fff;
  display: block;
}
/* Institutional masthead instead of pill shape */
.candidates-hero-masthead {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.55rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #e2f0e4;
  border-radius: 4px;
  padding: 0.35rem 0.95rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.95rem;
  max-width: 100%;
}
.candidates-hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.65rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.015em;
  margin: 0 0 0.75rem;
  line-height: 1.2;
  word-break: break-word;
}
.candidates-hero-sub {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.02rem;
  max-width: 720px;
  margin: 0 auto 1.75rem;
  line-height: 1.55;
}

/* Metrics strip in Hero */
.candidates-metrics-ribbon {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.85rem;
}
.candidates-metric-item {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  text-align: center;
  min-width: 0;
}
.candidates-metric-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.candidates-metric-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-width: 0;
}

/* Election pills in Hero */
.candidates-election-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1.25rem;
  max-width: 100%;
}
.candidates-election-pill {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  text-decoration: none;
  padding: 0.45rem 1.1rem;
  border-radius: 4px;
  font-size: 0.88rem;
  font-weight: 650;
  transition: all 0.15s ease;
  white-space: normal;
  text-align: center;
  max-width: 100%;
}
.candidates-election-pill:hover,
.candidates-election-pill.is-active {
  background: #fff;
  color: var(--green-ink);
  border-color: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

/* Main content wrapper */
.candidates-main-content {
  max-width: 1240px;
  margin: -2rem auto 4.5rem;
  padding: 0 5%;
  position: relative;
  z-index: 10;
}

/* Search and filter toolbar */
.candidates-toolbar {
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 0.85rem 1.15rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.candidates-search-wrap {
  position: relative;
  flex: 1 1 280px;
}
.candidates-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.candidates-search-input {
  width: 100%;
  padding: 0.6rem 0.85rem 0.6rem 2.45rem;
  border: 1.5px solid var(--line-strong);
  border-radius: 6px;
  font: inherit;
  font-size: 0.9rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.candidates-search-input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(32, 112, 39, 0.18);
}
.candidates-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.candidate-filter-btn {
  background: #fff;
  border: 1px solid var(--line-strong);
  color: var(--ink-2);
  padding: 0.4rem 0.85rem;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
  transition: all 0.12s ease;
}
.candidate-filter-btn:hover {
  background: var(--green-tint);
  border-color: var(--green);
  color: var(--green-ink);
}
.candidate-filter-btn.active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.candidates-count-tag {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
  padding: 0 0.4rem;
}

/* Position Section */
.position-showcase-panel {
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  margin-bottom: 2.25rem;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}
.position-showcase-header {
  background: linear-gradient(90deg, #f0f7f1 0%, #fafcfa 100%);
  border-bottom: 2px solid var(--green-tint-2);
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.position-showcase-title-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.position-index-badge {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--green);
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  display: grid;
  place-items: center;
  flex: none;
  box-shadow: 0 2px 5px rgba(32, 112, 39, 0.2);
}
.position-showcase-header h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--green-ink);
  margin: 0;
  letter-spacing: -0.01em;
}
.position-showcase-sub {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.15rem;
  font-weight: 500;
}
.position-showcase-body {
  padding: 1.5rem;
}

/* Candidates Grid */
.candidates-showcase-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .candidates-showcase-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px) {
  .candidates-showcase-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Individual Candidate Card (Executive Compact Redesign) */
.candidate-profile-card {
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  position: relative;
}
.candidate-profile-card:hover {
  transform: translateY(-3px);
  border-color: var(--green);
  box-shadow: 0 10px 24px rgba(16, 61, 21, 0.1);
}
.candidate-profile-top {
  background: linear-gradient(180deg, #f8faf8 0%, #ffffff 100%);
  padding: 1rem 1.15rem 0.85rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}
.candidate-badges-strip {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
}
.candidate-number-tag {
  background: #1e293b;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.22rem 0.55rem;
  border-radius: 3px;
}
/* Executive clearance badge - rectangular, dignified institutional clearance */
.candidate-clearance-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  background: #14532d;
  color: #dcfce7;
  border: 1px solid #166534;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.22rem 0.55rem;
  border-radius: 3px;
}
/* Compact avatar (86px down from 120px) */
.candidate-photo-frame {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  position: relative;
  margin-bottom: 0.65rem;
}
.candidate-photo-frame .candidate-photo,
.candidate-photo-frame .candidate-initials {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
  display: block;
}
.candidate-photo-frame .candidate-initials {
  display: grid;
  place-items: center;
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--green-ink);
  background: linear-gradient(135deg, #dcecde 0%, #c4dfc8 100%);
}
.candidate-profile-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 0.15rem;
  line-height: 1.25;
}
.candidate-contested-tag {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
}
.candidate-profile-body {
  padding: 0.95rem 1.15rem 1.05rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  justify-content: space-between;
}

/* Reduction Step 1: Sleek 2-column metadata strip (Rank & Command) */
.candidate-meta-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  background: #f7faf7;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.55rem 0.75rem;
}
.candidate-meta-cell {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}
.candidate-meta-label {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.candidate-meta-val {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Reduction Step 2: Sleek expandable manifesto or subtle placeholder */
.candidate-bio-accordion {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  transition: all 0.15s ease;
}
.candidate-bio-accordion[open] {
  border-color: var(--green);
  box-shadow: 0 2px 8px rgba(32, 112, 39, 0.08);
}
.candidate-bio-summary {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--green-ink);
  cursor: pointer;
  user-select: none;
  list-style: none;
}
.candidate-bio-summary::-webkit-details-marker {
  display: none;
}
.candidate-bio-summary:hover {
  background: #f4f8f4;
}
.candidate-bio-summary svg {
  color: var(--green);
  flex-shrink: 0;
}
.candidate-bio-content {
  padding: 0.65rem 0.75rem 0.75rem;
  border-top: 1px solid var(--line);
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--ink-2);
  max-height: 150px;
  overflow-y: auto;
}
.candidate-bio-placeholder {
  padding: 0.45rem 0.65rem;
  font-size: 0.76rem;
  color: var(--muted);
  background: #fafafa;
  border: 1px dashed var(--line);
  border-radius: 6px;
  text-align: center;
}

/* Executive Empty Notice Panel */
.electoral-notice-panel {
  background: #fff;
  border: 2px solid var(--green-tint-2);
  border-radius: 14px;
  padding: 3rem 2rem;
  text-align: center;
  max-width: 840px;
  margin: 0 auto 3rem;
  box-shadow: 0 8px 28px rgba(16, 61, 21, 0.06);
  position: relative;
}
.electoral-notice-seal {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  border: 3px solid #f5b041;
  box-shadow: 0 0 0 4px rgba(245, 176, 65, 0.25);
  margin: 0 auto 1.35rem;
  display: block;
}
.electoral-notice-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff8e6;
  border: 1px solid #ffd591;
  color: #925400;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35rem 0.95rem;
  border-radius: 4px;
  margin-bottom: 1.15rem;
}
.electoral-notice-panel h2 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 800;
  color: var(--green-ink);
  margin: 0 0 0.75rem;
}
.electoral-notice-desc {
  font-size: 1.02rem;
  color: var(--muted);
  max-width: 620px;
  margin: 0 auto 1.85rem;
  line-height: 1.6;
}
.electoral-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 0 auto 2rem;
  text-align: left;
}
.electoral-step {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.electoral-step.active {
  background: #f0f7f1;
  border-color: var(--green);
}
.electoral-step-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  flex: none;
  background: var(--line-strong);
  color: #fff;
}
.electoral-step.active .electoral-step-dot {
  background: var(--green);
}
.electoral-step.done .electoral-step-dot {
  background: var(--success);
}
.electoral-step-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.15rem;
}
.electoral-step-sub {
  font-size: 0.76rem;
  color: var(--muted);
}

/* Call to Action Footer Banner */
.candidates-cta-section {
  background: linear-gradient(135deg, #eaf5eb 0%, #f6faf6 100%);
  border: 2px solid var(--green-tint-2);
  border-radius: 12px;
  padding: 2rem 2.25rem;
  margin-top: 3rem;
  box-shadow: 0 4px 16px rgba(16, 61, 21, 0.05);
}
.candidates-cta-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.candidates-cta-flex h2 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--green-ink);
  margin-bottom: 0.3rem;
}
.candidates-cta-flex p {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0;
}

@media (max-width: 768px) {
  .candidates-hero { padding: 2.25rem 4% 3.25rem; }
  .candidates-hero h1 { font-size: 1.6rem; }
  .candidates-hero-masthead { font-size: 0.7rem; padding: 0.35rem 0.65rem; }
  .candidates-metrics-ribbon { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
  .candidates-metric-item { padding: 0.55rem 0.5rem; }
  .candidates-metric-label { font-size: 0.65rem; }
  .candidates-metric-val { font-size: 0.95rem; }
  .candidates-election-pills { gap: 0.35rem; }
  .candidates-election-pill { font-size: 0.78rem; padding: 0.35rem 0.75rem; }

  .candidates-main-content { margin-top: -1.5rem; padding: 0 12px; }
  .candidates-toolbar { flex-direction: column; align-items: stretch; padding: 0.85rem; }
  .candidates-search-wrap { flex: none; width: 100%; }
  .position-showcase-header { padding: 1rem 1.15rem; }
  .position-showcase-body { padding: 1.15rem 0.85rem; }
  .electoral-notice-panel { padding: 2.25rem 1.15rem; }
  .candidates-cta-section { padding: 1.35rem 1.15rem; }
  .candidates-cta-flex { flex-direction: column; align-items: stretch; text-align: center; }
  .candidates-cta-flex .btn { width: 100%; }
}

@media (max-width: 480px) {
  .candidates-hero { padding: 1.75rem 14px 2.5rem; }
  .candidates-hero h1 { font-size: 1.35rem; }
  .candidates-hero-sub { font-size: 0.85rem; margin-bottom: 1.25rem; }
  .candidates-hero-masthead { font-size: 0.65rem; padding: 0.3rem 0.5rem; letter-spacing: 0.04em; white-space: normal; }
  .candidates-metrics-ribbon { grid-template-columns: 1fr 1fr; gap: 0.45rem; }
  .candidates-metric-item { padding: 0.5rem 0.35rem; }
  .candidates-metric-label { font-size: 0.58rem; letter-spacing: 0.04em; }
  .candidates-metric-val { font-size: 0.82rem; flex-wrap: wrap; text-align: center; }
  .candidates-metric-val svg { width: 14px; height: 14px; }
  .candidates-election-pills { gap: 0.35rem; }
  .candidates-election-pill { font-size: 0.72rem; padding: 0.3rem 0.55rem; }
  .candidate-meta-strip { gap: 0.4rem; padding: 0.45rem 0.6rem; }
  .candidate-meta-val { font-size: 0.78rem; }
  .candidates-toolbar { padding: 0.65rem 0.75rem; }
  .candidate-filter-btn { font-size: 0.75rem; padding: 0.3rem 0.65rem; }
}

/* Voter updates callout banner */
.voter-updates-banner { background: #f0fdf4; border-bottom: 1px solid #bbf7d0; border-top: 1px solid #bbf7d0; padding: 1.5rem 5%; }
.voter-updates-inner { max-width: 1240px; margin: 0 auto; display: flex; flex-direction: column; gap: .75rem; }
.voter-updates-badge { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; font-size: .88rem; color: var(--green); text-transform: uppercase; letter-spacing: .05em; }
.voter-updates-content { display: grid; gap: .75rem; font-size: .92rem; color: var(--ink-2); line-height: 1.5; }
@media (min-width: 860px) {
  .voter-updates-content { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
}
.voter-update-item { background: #fff; border: 1px solid #dcfce7; border-radius: 8px; padding: 1rem 1.15rem; }
.voter-update-item strong { color: var(--green-ink); display: block; margin-bottom: .25rem; }
.voter-update-item a, .portal-link { color: var(--green); font-weight: 600; text-decoration: underline; }
.voter-update-item a:hover, .portal-link:hover { color: var(--green-ink); }



