/* eVote accessibility refinements. Keep voting state and authorization in JS/API. */
:root { --control-border: #687d8e; --focus-color: #003366; }
[hidden] { display: none !important; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 2000; transform: translateY(-160%); padding: 12px 18px; background: #fff; color: var(--brand); font-weight: 800; }
.skip-link:focus { transform: none; }
:root body :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--focus-color); outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--surface);
}
[tabindex="-1"], :is(input, select, textarea, button) { scroll-margin-block: 130px 24px; }
body .hero-panel .sf-eyebrow { color: var(--brand); }
body .hero-copy .sf-eyebrow, body .hero-copy button:focus-visible { --focus-color: var(--gold); }
body .portal-chrome :is(.portal-chrome__header, .portal-chrome__footer) { background: #f7fbff; backdrop-filter: none; }
body .portal-chrome .portal-chrome__footer { position: static; margin-top: 24px; }
:root body .portal-chrome .portal-chrome__footer-links a { color: #005a9c; }
body .feedback.success { color: #24634c; }
body .mini-metrics span, body .muted { color: var(--muted); }
body .field :is(input, select, textarea), body .staff-control-button { border-color: var(--control-border); }
body :is(.admin-icon-action, .dashboard-create-button, .admin-stepper button) { min-width: 44px; min-height: 44px; }
body .hero-info-button { min-height: 44px; }
dialog.platform-modal { margin: 0; width: 100%; height: 100%; max-width: none; max-height: none; border: 0; background: transparent; color: var(--ink); }
dialog.platform-modal:not([open]) { display: none; }
dialog.platform-modal::backdrop { background: transparent; }
body .platform-modal-card, body .modal-sticky-header { background: var(--surface); }
body .cycle-modal-actions { background: var(--surface); }
body .platform-modal-card { min-width: 0; }
body .modal-sticky-header h2 { font-size: clamp(1.4rem, 4vw, 2rem); line-height: 1.2; overflow-wrap: anywhere; }
body .candidate-option { cursor: default; }
body .candidate-option:hover { transform: none; }
body .candidate-avatar__initials { color: var(--brand); }
body .candidate-card-identity .party-pill { color: var(--brand); }
.candidate-select { position: relative; z-index: 1; width: 100%; min-height: 44px; margin-top: 18px; padding: 10px 14px; border: 1px solid var(--control-border); border-radius: 8px; background: var(--surface); color: var(--brand); font-weight: 750; }
.candidate-select[aria-pressed="true"] { background: var(--brand); color: var(--surface); border-color: var(--brand); }
body .candidate-option:has(.candidate-select:focus-visible) { border-color: var(--brand); }
body :is(.candidate-options, .candidate-card-shell, .candidate-card-body, .staff-workspace, .staff-screen, .result-card, .staff-grid) { min-width: 0; }
body :is(.candidate-option, .staff-workspace, .result-card, .detail-grid, .feedback) { overflow-wrap: anywhere; }
@media (max-width: 680px) {
  body .candidate-options { grid-template-columns: minmax(0, 1fr); }
  body .candidate-option { padding: 18px; }
  body .candidate-option strong { font-size: 1.35rem; }
  body .admin-form, body .modal-scroll-body { padding: 18px; }
  body .staff-section-nav { flex-wrap: wrap; }
}
@media (forced-colors: active) {
  :root body :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline-color: Highlight; box-shadow: none; }
  body :is(button, input, select, textarea), .candidate-option { border: 1px solid ButtonText; }
  .candidate-select[aria-pressed="true"], .candidate-option.ranked { border: 3px solid Highlight; }
  .progress-track, .result-bar { border: 1px solid CanvasText; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
