:root {
  --voter-ink: #10231d;
  --voter-muted: #4d655d;
  --voter-canvas: #eaf3ef;
  --voter-glass: rgb(255 255 255 / 82%);
  --voter-line: rgb(21 105 78 / 16%);
  --voter-mint: #196848;
  --voter-mint-bright: #16c784;
  --voter-cyan: #087f9a;
  --voter-focus: #006fd6;
  --voter-danger: #b42318;
  --voter-shadow: 0 28px 90px rgb(14 52 39 / 14%);
}

.voter-ambient { position: fixed; z-index: 0; inset: 0; overflow: hidden; background: linear-gradient(145deg, #f6fbf9 0%, var(--voter-canvas) 52%, #e4f0f1 100%); pointer-events: none; }
.voter-ambient::before { position: absolute; inset: 0; background-image: linear-gradient(rgb(8 122 85 / 4%) 1px, transparent 1px), linear-gradient(90deg, rgb(8 122 85 / 4%) 1px, transparent 1px); background-size: 34px 34px; content: ""; mask-image: linear-gradient(to bottom, black, transparent 72%); }
.voter-ambient span { position: absolute; width: 300px; height: 300px; border-radius: 50%; filter: blur(12px); }
.voter-ambient span:first-child { top: -160px; left: -110px; background: rgb(22 199 132 / 16%); }
.voter-ambient span:last-child { right: -170px; bottom: -180px; background: rgb(8 127 154 / 13%); }
.voter-brandbar { position: relative; z-index: 1; display: flex; width: min(1100px, calc(100% - 32px)); min-height: 84px; align-items: center; justify-content: space-between; gap: 16px; margin: 0 auto; }
.voter-brand { display: flex; align-items: center; gap: 11px; color: var(--voter-ink); text-decoration: none; }
.voter-brand > span:last-child { display: grid; }
.voter-brand__logo { width: 50px; height: 32px; flex: 0 0 50px; object-fit: contain; filter: drop-shadow(0 7px 13px rgb(25 104 72 / 16%)); }
.voter-brand strong { font: 800 19px/1 "Aptos Display", "Segoe UI Variable Display", sans-serif; letter-spacing: -.03em; }
.voter-brand small { margin-top: 4px; color: var(--voter-muted); font-size: 10px; }
.voter-secure { display: inline-flex; min-height: 36px; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--voter-line); border-radius: 999px; background: rgb(255 255 255 / 58%); color: #275d4b; font-size: 11px; font-weight: 800; backdrop-filter: blur(12px); }
.voter-secure > span { width: 7px; height: 7px; border-radius: 50%; background: var(--voter-mint-bright); box-shadow: 0 0 12px var(--voter-mint-bright); }
.voter-shell { position: relative; z-index: 1; display: grid; min-height: calc(100vh - 142px); place-items: center; padding: 28px 16px 48px; }
.voter-messages { position: fixed; z-index: 20; top: 90px; left: 50%; width: min(calc(100% - 32px), 570px); transform: translateX(-50%); }
.inactivity-warning { position: fixed; z-index: 50; display: grid; inset: 0; place-items: center; padding: 16px; background: rgb(4 20 15 / 58%); backdrop-filter: blur(8px); }
.inactivity-warning[hidden] { display: none; }
.inactivity-warning > div { width: min(100%, 480px); padding: 28px; border: 1px solid rgb(255 255 255 / 72%); border-radius: 22px; background: #f8fcfa; box-shadow: 0 28px 90px rgb(0 0 0 / 28%); }
.inactivity-warning h2 { color: var(--voter-ink); font-size: clamp(1.65rem, 7vw, 2.2rem); }
.inactivity-warning p { color: var(--voter-muted); }
.voter-card { width: min(100%, 570px); padding: clamp(25px, 6vw, 48px); border: 1px solid rgb(255 255 255 / 86%); border-radius: 28px; background: var(--voter-glass); box-shadow: var(--voter-shadow), inset 0 0 0 1px var(--voter-line); backdrop-filter: blur(22px); }
.voter-card--wide { width: min(100%, 720px); }
.voter-card h1 { margin: 0 0 14px; color: var(--voter-ink); font: 780 clamp(2rem, 8vw, 3rem)/1.02 "Aptos Display", "Segoe UI Variable Display", sans-serif; letter-spacing: -.045em; }
.voter-lead { margin-bottom: 28px; color: var(--voter-muted); font-size: 16px; line-height: 1.58; }
.voter-step-label { margin-bottom: 12px; color: var(--voter-mint); font: 750 11px/1 "Cascadia Code", Consolas, monospace; letter-spacing: .1em; text-transform: uppercase; }
.voter-pulse { display: grid; grid-template-columns: 9px 1fr 9px 1fr 9px; align-items: center; gap: 6px; margin-bottom: 28px; color: var(--voter-mint-bright); }
.voter-pulse span { width: 9px; height: 9px; border: 2px solid currentcolor; border-radius: 50%; background: white; }
.voter-pulse span:first-child { background: currentcolor; box-shadow: 0 0 14px rgb(22 199 132 / 60%); }
.voter-pulse i { height: 1px; background: rgb(8 122 85 / 18%); }
.voter-form { display: grid; gap: 20px; }
.voter-field { display: grid; gap: 8px; }
.voter-field label { color: var(--voter-ink); font-size: 14px; font-weight: 800; }
.voter-field input { width: 100%; min-height: 54px; padding: 0 15px; border: 1px solid #abc5bb; border-radius: 13px; background: rgb(255 255 255 / 88%); color: var(--voter-ink); font: 650 16px/1.2 "Aptos", "Segoe UI", sans-serif; box-shadow: inset 0 1px 2px rgb(13 52 39 / 5%); transition: border-color 180ms ease, box-shadow 180ms ease; }
.voter-field input:focus-visible { outline: 3px solid rgb(0 111 214 / 23%); outline-offset: 2px; border-color: var(--voter-focus); box-shadow: 0 0 0 1px var(--voter-focus), 0 0 22px rgb(0 111 214 / 10%); }
.voter-field small { color: var(--voter-muted); font-size: 12px; line-height: 1.4; }
.voter-error { color: var(--voter-danger); font-size: 13px; font-weight: 700; }
.voter-form-alert { padding: 13px 14px; border: 1px solid rgb(180 35 24 / 22%); border-radius: 12px; background: #fff3f1; color: var(--voter-danger); font-size: 13px; font-weight: 750; line-height: 1.45; }
.voter-primary { display: flex; width: 100%; min-height: 54px; align-items: center; justify-content: space-between; margin-top: 4px; padding: 0 18px; border: 0; border-radius: 14px; background: linear-gradient(105deg, #124b35, #196848 58%, #167052); box-shadow: 0 13px 30px rgb(25 104 72 / 22%), inset 0 1px rgb(255 255 255 / 22%); color: white; cursor: pointer; font-size: 16px; font-weight: 850; transition: filter 180ms ease, box-shadow 180ms ease; }
.voter-primary:hover { filter: brightness(1.07); box-shadow: 0 15px 34px rgb(8 122 85 / 28%), inset 0 1px rgb(255 255 255 / 26%); }
.voter-primary:active { filter: brightness(.96); }
.voter-primary:disabled { cursor: wait; filter: saturate(.6); opacity: .78; }
.voter-primary--link { text-decoration: none; }
.voter-primary--confirm { background: linear-gradient(105deg, #064f39, #087a55 58%, #07916f); }
.voter-trust-note { display: grid; grid-template-columns: 29px 1fr; gap: 11px; margin-top: 24px; padding-top: 21px; border-top: 1px solid var(--voter-line); }
.voter-trust-note > span { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: #dff5ea; color: var(--voter-mint); font-weight: 900; }
.voter-trust-note p { margin: 0; color: var(--voter-muted); font-size: 12px; line-height: 1.55; }
.voter-trust-note strong { color: var(--voter-ink); }
.voter-summary { display: grid; gap: 1px; margin: 0 0 22px; overflow: hidden; border: 1px solid var(--voter-line); border-radius: 16px; background: var(--voter-line); }
.voter-summary div { padding: 14px 16px; background: rgb(255 255 255 / 86%); }
.voter-summary dt { margin-bottom: 4px; color: var(--voter-muted); font-size: 11px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.voter-summary dd { margin: 0; color: var(--voter-ink); font-size: 15px; font-weight: 800; }
.voter-privacy { margin-bottom: 20px; padding: 16px; border: 1px solid rgb(8 127 154 / 15%); border-radius: 15px; background: rgb(8 127 154 / 6%); }
.voter-privacy strong { color: var(--voter-cyan); font-size: 13px; }
.voter-privacy p { margin: 6px 0 0; color: var(--voter-muted); font-size: 13px; line-height: 1.5; }
.voter-privacy a { display: inline-block; margin-top: 8px; color: var(--voter-cyan); font-size: 12px; font-weight: 800; }
.privacy-document { width: min(100%, 760px); }
.privacy-document h2 { margin-top: 26px; color: var(--voter-ink); font-size: 1.35rem; }
.privacy-document p { color: var(--voter-muted); font-size: 15px; line-height: 1.68; }
.voter-secondary { display: grid; min-height: 48px; place-items: center; margin-top: 10px; color: var(--voter-mint); font-size: 14px; font-weight: 800; text-decoration: none; }
.voter-check { display: grid; min-height: 48px; grid-template-columns: 24px 1fr; align-items: center; gap: 10px; color: var(--voter-ink); font-size: 13px; font-weight: 700; cursor: pointer; }
.voter-check input { width: 22px; height: 22px; accent-color: var(--voter-mint); }
.voter-context { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; margin-bottom: 22px; padding-bottom: 14px; border-bottom: 1px solid var(--voter-line); color: var(--voter-muted); font-size: 11px; font-weight: 750; }
.ballot-form { display: grid; gap: 20px; }
.candidate-list { display: grid; gap: 12px; min-width: 0; margin: 0; padding: 0; border: 0; }
.candidate-card { position: relative; display: grid; min-height: 108px; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 12px; padding: 16px; border: 1px solid #b7cbc4; border-radius: 17px; background: rgb(255 255 255 / 78%); cursor: pointer; transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease; }
.candidate-card:has(.candidate-card__photo) { grid-template-columns: 28px 64px minmax(0, 1fr); }
.candidate-card__photo { width: 64px; height: 64px; border: 1px solid var(--voter-line); border-radius: 14px; object-fit: cover; }
.candidate-card:hover { border-color: #6ba991; background: white; }
.candidate-card:has(input:checked) { border-color: var(--voter-mint); background: #f0fbf6; box-shadow: 0 0 0 2px rgb(8 122 85 / 13%), 0 12px 30px rgb(8 122 85 / 10%); }
.candidate-card input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.candidate-card:has(input:focus-visible) { outline: 3px solid rgb(0 111 214 / 24%); outline-offset: 2px; }
.candidate-card__indicator { display: grid; width: 24px; height: 24px; place-items: center; border: 2px solid #78978b; border-radius: 50%; }
.candidate-card:has(input:checked) .candidate-card__indicator { border: 7px solid var(--voter-mint); }
.candidate-card__content { display: grid; gap: 3px; min-width: 0; }
.candidate-card__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.candidate-card strong { color: var(--voter-ink); font-size: 17px; }
.candidate-card b { padding: 5px 8px; border-radius: 8px; background: #e3f3ec; color: var(--voter-mint); font: 750 11px "Cascadia Code", monospace; }
.candidate-card span, .candidate-card small { color: var(--voter-muted); font-size: 13px; }
.candidate-card em { margin-top: 6px; color: var(--voter-mint); font-size: 11px; font-style: normal; font-weight: 800; }
.candidate-card:has(input:checked) em { font-size: 0; }
.candidate-card:has(input:checked) em::after { font-size: 11px; content: "Candidato selecionado ✓"; }
.candidate-card--blank { min-height: 88px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.review-choice { display: grid; gap: 6px; margin-bottom: 22px; padding: 22px; border: 1px solid rgb(8 122 85 / 24%); border-radius: 18px; background: linear-gradient(145deg, rgb(240 251 246 / 92%), rgb(237 248 248 / 88%)); box-shadow: inset 4px 0 var(--voter-mint); }
.review-choice small, .receipt-code small { color: var(--voter-muted); font-size: 11px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.review-choice strong { color: var(--voter-ink); font-size: 22px; }
.review-choice span { color: var(--voter-muted); font-size: 13px; }
.receipt-success { display: grid; width: 70px; height: 70px; place-items: center; margin-bottom: 24px; border: 1px solid rgb(22 199 132 / 35%); border-radius: 50%; background: #e7f9f0; box-shadow: 0 0 0 9px rgb(22 199 132 / 7%), 0 0 34px rgb(22 199 132 / 18%); color: var(--voter-mint); font-size: 28px; font-weight: 900; }
.receipt-code { display: grid; gap: 7px; margin-top: 20px; padding: 20px; border: 1px solid rgb(8 127 154 / 21%); border-radius: 17px; background: rgb(8 127 154 / 6%); text-align: center; }
.receipt-code strong { color: #075f56; font: 800 clamp(1.45rem, 7vw, 2rem)/1.2 "Cascadia Code", Consolas, monospace; letter-spacing: .08em; overflow-wrap: anywhere; }
.receipt-code span { color: var(--voter-muted); font-size: 12px; }
.voter-pulse .is-current { background: currentcolor; box-shadow: 0 0 14px rgb(22 199 132 / 60%); }
.voter-footer { position: relative; z-index: 1; display: flex; width: min(1100px, calc(100% - 32px)); min-height: 58px; align-items: center; justify-content: space-between; gap: 16px; margin: 0 auto; border-top: 1px solid var(--voter-line); color: var(--voter-muted); font-size: 11px; }

@media (max-width: 520px) {
  .voter-brandbar { min-height: 74px; }
  .voter-brand small { display: none; }
  .voter-secure { padding: 0 10px; }
  .voter-shell { min-height: calc(100vh - 126px); padding-top: 14px; }
  .voter-card { border-radius: 22px; }
  .voter-footer { min-height: 52px; }
  .voter-footer span:first-child { display: none; }
  .voter-footer { justify-content: center; }
  .candidate-card:has(.candidate-card__photo) { grid-template-columns: 24px 52px minmax(0, 1fr); }
  .candidate-card__photo { width: 52px; height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  .voter-primary, .voter-field input { transition: none; }
}
