/**
 * Dark public shell — env default or voter cookie (public_color_mode).
 * Active when html has data-public-shell="dark" / data-color-mode="dark".
 * Page-by-page text polish: adjust here, test each route before continuing.
 * See docs/THEME_PREFERENCE_SPEC.md.
 */

html[data-public-shell="dark"][data-ui-theme="custom"],
body.public-voter-shell-dark[data-ui-theme="custom"] {
  color-scheme: dark;
  background-color: #06060b !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body,
body.public-voter-shell-dark[data-ui-theme="custom"] {
  background:
    radial-gradient(circle at 20% 10%, rgba(37, 99, 235, 0.08), transparent 42%),
    radial-gradient(circle at 80% 30%, rgba(139, 92, 246, 0.06), transparent 38%),
    linear-gradient(180deg, #06060b 0%, #0a0a12 100%) !important;
  color: #e2e8f0;
  min-height: 100vh;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.voter-ballot-page,
html[data-public-shell="dark"][data-ui-theme="custom"] body.voter-search-page,
html[data-public-shell="dark"][data-ui-theme="custom"] body.home-page,
html[data-public-shell="dark"][data-ui-theme="custom"] body.premium-page,
body.public-voter-shell-dark[data-ui-theme="custom"].voter-ballot-page,
body.public-voter-shell-dark[data-ui-theme="custom"].voter-search-page,
body.public-voter-shell-dark[data-ui-theme="custom"].home-page,
body.public-voter-shell-dark[data-ui-theme="custom"].premium-page {
  background:
    radial-gradient(circle at 20% 10%, rgba(37, 99, 235, 0.08), transparent 42%),
    radial-gradient(circle at 80% 30%, rgba(139, 92, 246, 0.06), transparent 38%),
    linear-gradient(180deg, #06060b 0%, #0a0a12 100%) !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] .public-main,
body.public-voter-shell-dark[data-ui-theme="custom"] .public-main {
  background: transparent !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.premium-page .public-navbar,
body.public-voter-shell-dark[data-ui-theme="custom"].premium-page .public-navbar,
html[data-public-shell="dark"][data-ui-theme="custom"] body.voter-ballot-page .public-navbar,
html[data-public-shell="dark"][data-ui-theme="custom"] body.voter-search-page .public-navbar,
html[data-public-shell="dark"][data-ui-theme="custom"] body.home-page .public-navbar,
body.public-voter-shell-dark[data-ui-theme="custom"].voter-ballot-page .public-navbar,
body.public-voter-shell-dark[data-ui-theme="custom"].voter-search-page .public-navbar,
body.public-voter-shell-dark[data-ui-theme="custom"].home-page .public-navbar,
body.public-voter-shell-dark[data-ui-theme="custom"] .public-navbar {
  background: rgba(12, 12, 18, 0.96) !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

body.public-voter-shell-dark[data-ui-theme="custom"] .public-navbar .navbar-brand {
  color: #f8fafc;
}

body.public-voter-shell-dark[data-ui-theme="custom"] .public-navbar .btn-outline-light {
  border-color: rgba(148, 163, 184, 0.35);
  color: #e2e8f0;
}

body.public-voter-shell-dark[data-ui-theme="custom"] .public-navbar .btn-outline-light:hover {
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.45);
  color: #f8fafc;
}

body.public-voter-shell-dark[data-ui-theme="custom"] .public-main h1,
body.public-voter-shell-dark[data-ui-theme="custom"] .public-main h2,
body.public-voter-shell-dark[data-ui-theme="custom"] .vote-flow-title {
  color: #f8fafc;
}

body.public-voter-shell-dark[data-ui-theme="custom"] .text-muted {
  color: #94a3b8 !important;
}

/* Let section wrappers show the body canvas; do not clear body background */
html[data-public-shell="dark"][data-ui-theme="custom"] body.home-page .home-hero,
html[data-public-shell="dark"][data-ui-theme="custom"] body.home-page .home-portfolio,
html[data-public-shell="dark"][data-ui-theme="custom"] body.home-page .home-featured-live,
body.public-voter-shell-dark[data-ui-theme="custom"].home-page .home-hero,
body.public-voter-shell-dark[data-ui-theme="custom"].home-page .home-portfolio,
body.public-voter-shell-dark[data-ui-theme="custom"].home-page .home-featured-live {
  background: transparent !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] .ballot-main-card,
html[data-public-shell="dark"][data-ui-theme="custom"] .ballot-side-card,
html[data-public-shell="dark"][data-ui-theme="custom"] .vote-flow-entry-card,
html[data-public-shell="dark"][data-ui-theme="custom"] .vote-flow-panel,
html[data-public-shell="dark"][data-ui-theme="custom"] .public-main .card,
body.public-voter-shell-dark[data-ui-theme="custom"] .ballot-main-card,
body.public-voter-shell-dark[data-ui-theme="custom"] .ballot-side-card,
body.public-voter-shell-dark[data-ui-theme="custom"] .vote-flow-entry-card,
body.public-voter-shell-dark[data-ui-theme="custom"] .vote-flow-panel,
body.public-voter-shell-dark[data-ui-theme="custom"] .public-main .card {
  background: rgba(22, 22, 31, 0.92) !important;
  border: 1px solid rgba(148, 163, 184, 0.12) !important;
  color: #e2e8f0;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.32);
}

body.public-voter-shell-dark[data-ui-theme="custom"] .vote-flow-entry-body {
  background: transparent;
}

html[data-public-shell="dark"][data-ui-theme="custom"] .vote-flow-topbar,
html[data-public-shell="dark"][data-ui-theme="custom"] .vote-flow-panel-head,
html[data-public-shell="dark"][data-ui-theme="custom"] .vote-flow-entry-head,
body.public-voter-shell-dark[data-ui-theme="custom"] .vote-flow-topbar,
body.public-voter-shell-dark[data-ui-theme="custom"] .vote-flow-panel-head,
body.public-voter-shell-dark[data-ui-theme="custom"] .vote-flow-entry-head {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.08), transparent 34%),
    linear-gradient(135deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.98)) !important;
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: none;
  color: #f8fafc !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] .vote-flow-panel-head span,
html[data-public-shell="dark"][data-ui-theme="custom"] .vote-flow-topbar .vote-flow-title,
html[data-public-shell="dark"][data-ui-theme="custom"] .vote-flow-topbar .vote-flow-sub,
body.public-voter-shell-dark[data-ui-theme="custom"] .vote-flow-panel-head span,
body.public-voter-shell-dark[data-ui-theme="custom"] .vote-flow-topbar .vote-flow-title,
body.public-voter-shell-dark[data-ui-theme="custom"] .vote-flow-topbar .vote-flow-sub {
  color: #f8fafc !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] .vote-flow-topbar .vote-flow-sub strong,
body.public-voter-shell-dark[data-ui-theme="custom"] .vote-flow-topbar .vote-flow-sub strong {
  color: #ffffff !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] .vote-flow-entry-head,
body.public-voter-shell-dark[data-ui-theme="custom"] .vote-flow-entry-head {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.1), transparent 34%),
    linear-gradient(135deg, rgba(30, 41, 59, 0.98), rgba(29, 78, 216, 0.75)) !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] .home-page .home-election-card,
html[data-public-shell="dark"][data-ui-theme="custom"] .home-page .home-portfolio-card,
body.public-voter-shell-dark[data-ui-theme="custom"].home-page .home-election-card,
body.public-voter-shell-dark[data-ui-theme="custom"].home-page .home-portfolio-card {
  background: rgba(22, 22, 31, 0.92) !important;
  border: 1px solid rgba(148, 163, 184, 0.12) !important;
  color: #e2e8f0 !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] .home-page .home-election-card .text-muted,
body.public-voter-shell-dark[data-ui-theme="custom"].home-page .home-election-card .text-muted {
  color: #94a3b8 !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] .vote-steps,
body.public-voter-shell-dark[data-ui-theme="custom"] .vote-steps {
  background: rgba(22, 22, 31, 0.88) !important;
  border: 1px solid rgba(148, 163, 184, 0.14) !important;
  color: #94a3b8;
}

html[data-public-shell="dark"][data-ui-theme="custom"] .vote-steps li,
body.public-voter-shell-dark[data-ui-theme="custom"] .vote-steps li {
  color: #94a3b8;
}

html[data-public-shell="dark"][data-ui-theme="custom"] .vote-steps li.active,
body.public-voter-shell-dark[data-ui-theme="custom"] .vote-steps li.active {
  color: #93c5fd !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] .vote-steps li.done,
body.public-voter-shell-dark[data-ui-theme="custom"] .vote-steps li.done {
  color: #6ee7b7 !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] .vote-flow-summary-grid,
html[data-public-shell="dark"][data-ui-theme="custom"] .vote-flow-panel-body,
body.public-voter-shell-dark[data-ui-theme="custom"] .vote-flow-summary-grid,
body.public-voter-shell-dark[data-ui-theme="custom"] .vote-flow-panel-body {
  color: #e2e8f0;
}

html[data-public-shell="dark"][data-ui-theme="custom"] .vote-flow-summary-grid .text-muted,
html[data-public-shell="dark"][data-ui-theme="custom"] .vote-flow-summary-grid .small.text-muted,
html[data-public-shell="dark"][data-ui-theme="custom"] .vote-flow-hint,
html[data-public-shell="dark"][data-ui-theme="custom"] .vote-flow-nominee-meta .text-muted,
body.public-voter-shell-dark[data-ui-theme="custom"] .vote-flow-summary-grid .text-muted,
body.public-voter-shell-dark[data-ui-theme="custom"] .vote-flow-summary-grid .small.text-muted,
body.public-voter-shell-dark[data-ui-theme="custom"] .vote-flow-hint,
body.public-voter-shell-dark[data-ui-theme="custom"] .vote-flow-nominee-meta .text-muted {
  color: #b0bdd0 !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] .vote-flow-summary-grid strong,
body.public-voter-shell-dark[data-ui-theme="custom"] .vote-flow-summary-grid strong {
  color: #f8fafc;
}

html[data-public-shell="dark"][data-ui-theme="custom"] .text-primary,
body.public-voter-shell-dark[data-ui-theme="custom"] .text-primary {
  color: #60a5fa !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] .form-label,
html[data-public-shell="dark"][data-ui-theme="custom"] .form-label-sm,
body.public-voter-shell-dark[data-ui-theme="custom"] .form-label,
body.public-voter-shell-dark[data-ui-theme="custom"] .form-label-sm {
  color: #e2e8f0 !important;
}

body.public-voter-shell-dark[data-ui-theme="custom"] .vote-flow-sub {
  color: rgba(226, 232, 240, 0.82);
}

body.public-voter-shell-dark[data-ui-theme="custom"] .vote-flow-panel-head .position-number {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #e2e8f0;
}

body.public-voter-shell-dark[data-ui-theme="custom"] .vote-flow-entry-icon {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

body.public-voter-shell-dark[data-ui-theme="custom"] .voter-welcome-pill,
body.public-voter-shell-dark[data-ui-theme="custom"] .vote-flow-pill {
  background: rgba(37, 99, 235, 0.18);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #bfdbfe;
}

body.public-voter-shell-dark[data-ui-theme="custom"] .voter-dot {
  background: #34d399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.22);
}

body.public-voter-shell-dark[data-ui-theme="custom"] .voter-id-box,
body.public-voter-shell-dark[data-ui-theme="custom"] .vote-flow-code {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #e2e8f0;
}

body.public-voter-shell-dark[data-ui-theme="custom"] .vote-flow-code code {
  color: #93c5fd;
}

body.public-voter-shell-dark[data-ui-theme="custom"] .vote-flow-nominee-meta strong {
  color: #f8fafc;
}

body.public-voter-shell-dark[data-ui-theme="custom"] .vote-flow-photo {
  border-color: rgba(148, 163, 184, 0.28);
}

body.public-voter-shell-dark[data-ui-theme="custom"] .vote-flow-photo--placeholder {
  background: rgba(30, 41, 59, 0.85);
  color: #94a3b8;
  border: 2px solid rgba(148, 163, 184, 0.2);
}

body.public-voter-shell-dark[data-ui-theme="custom"] .form-label {
  color: #cbd5e1;
}

body.public-voter-shell-dark[data-ui-theme="custom"] .form-control,
body.public-voter-shell-dark[data-ui-theme="custom"] .form-select {
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(148, 163, 184, 0.22);
  color: #f1f5f9;
}

body.public-voter-shell-dark[data-ui-theme="custom"] .form-control::placeholder {
  color: #64748b;
}

body.public-voter-shell-dark[data-ui-theme="custom"] .form-control:focus,
body.public-voter-shell-dark[data-ui-theme="custom"] .form-select:focus {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(59, 130, 246, 0.55);
  color: #f8fafc;
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.15);
}

body.public-voter-shell-dark[data-ui-theme="custom"] .form-check-label {
  color: #cbd5e1;
}

body.public-voter-shell-dark[data-ui-theme="custom"] .btn-voter-primary,
body.public-voter-shell-dark[data-ui-theme="custom"] .btn-primary {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35);
}

body.public-voter-shell-dark[data-ui-theme="custom"] .btn-voter-primary:hover,
body.public-voter-shell-dark[data-ui-theme="custom"] .btn-primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

body.public-voter-shell-dark[data-ui-theme="custom"] .btn-outline-primary {
  border-color: rgba(59, 130, 246, 0.45);
  color: #93c5fd;
}

body.public-voter-shell-dark[data-ui-theme="custom"] .btn-outline-primary:hover {
  background: rgba(37, 99, 235, 0.16);
  border-color: rgba(59, 130, 246, 0.65);
  color: #dbeafe;
}

body.public-voter-shell-dark[data-ui-theme="custom"] .btn-outline-success {
  border-color: rgba(34, 197, 94, 0.45);
  color: #86efac;
}

body.public-voter-shell-dark[data-ui-theme="custom"] .btn-outline-success:hover {
  background: rgba(22, 163, 74, 0.16);
  border-color: rgba(34, 197, 94, 0.65);
  color: #dcfce7;
}

body.public-voter-shell-dark[data-ui-theme="custom"] .btn-outline-secondary {
  border-color: rgba(148, 163, 184, 0.35);
  color: #cbd5e1;
}

body.public-voter-shell-dark[data-ui-theme="custom"] .btn-outline-secondary:hover {
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.5);
  color: #f1f5f9;
}

body.public-voter-shell-dark[data-ui-theme="custom"] .btn-link {
  color: #93c5fd;
}

body.public-voter-shell-dark[data-ui-theme="custom"] a:not(.btn) {
  color: #93c5fd;
}

body.public-voter-shell-dark[data-ui-theme="custom"] a:not(.btn):hover {
  color: #bfdbfe;
}

body.public-voter-shell-dark[data-ui-theme="custom"] .alert-success,
html[data-public-shell="dark"][data-ui-theme="custom"] .alert-success {
  --bs-alert-bg: rgba(20, 83, 45, 0.92);
  --bs-alert-border-color: rgba(74, 222, 128, 0.45);
  --bs-alert-color: #ecfdf5;
  background: rgba(20, 83, 45, 0.92) !important;
  border-color: rgba(74, 222, 128, 0.45) !important;
  color: #ecfdf5 !important;
}

body.public-voter-shell-dark[data-ui-theme="custom"] .alert-success strong,
html[data-public-shell="dark"][data-ui-theme="custom"] .alert-success strong {
  color: #ffffff;
}

body.public-voter-shell-dark[data-ui-theme="custom"] .alert-success .alert-link,
html[data-public-shell="dark"][data-ui-theme="custom"] .alert-success .alert-link {
  color: #ffffff;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

body.public-voter-shell-dark[data-ui-theme="custom"] .alert-success .alert-link:hover,
html[data-public-shell="dark"][data-ui-theme="custom"] .alert-success .alert-link:hover {
  color: #dbeafe;
}

body.public-voter-shell-dark[data-ui-theme="custom"] .alert-danger,
html[data-public-shell="dark"][data-ui-theme="custom"] .alert-danger {
  --bs-alert-bg: rgba(127, 29, 29, 0.92);
  --bs-alert-border-color: rgba(248, 113, 113, 0.45);
  --bs-alert-color: #fee2e2;
  background: rgba(127, 29, 29, 0.92) !important;
  border-color: rgba(248, 113, 113, 0.45) !important;
  color: #fee2e2 !important;
}

body.public-voter-shell-dark[data-ui-theme="custom"] .alert-warning,
html[data-public-shell="dark"][data-ui-theme="custom"] .alert-warning {
  --bs-alert-bg: rgba(120, 53, 15, 0.92);
  --bs-alert-border-color: rgba(251, 191, 36, 0.45);
  --bs-alert-color: #fef3c7;
  background: rgba(120, 53, 15, 0.92) !important;
  border-color: rgba(251, 191, 36, 0.45) !important;
  color: #fef3c7 !important;
}

body.public-voter-shell-dark[data-ui-theme="custom"] .alert-info,
body.public-voter-shell-dark[data-ui-theme="custom"] .ballot-info-alert,
html[data-public-shell="dark"][data-ui-theme="custom"] .alert-info,
html[data-public-shell="dark"][data-ui-theme="custom"] .ballot-info-alert {
  --bs-alert-bg: rgba(30, 58, 138, 0.92);
  --bs-alert-border-color: rgba(96, 165, 250, 0.45);
  --bs-alert-color: #dbeafe;
  background: rgba(30, 58, 138, 0.92) !important;
  border-color: rgba(96, 165, 250, 0.45) !important;
  color: #dbeafe !important;
}

body.public-voter-shell-dark[data-ui-theme="custom"] .breadcrumb-item,
body.public-voter-shell-dark[data-ui-theme="custom"] .breadcrumb-item a {
  color: #94a3b8;
}

body.public-voter-shell-dark[data-ui-theme="custom"] .breadcrumb-item.active {
  color: #e2e8f0;
}

body.public-voter-shell-dark[data-ui-theme="custom"] .table {
  color: #e2e8f0;
}

body.public-voter-shell-dark[data-ui-theme="custom"] .table thead {
  background: rgba(30, 41, 59, 0.65);
  color: #94a3b8;
}

body.public-voter-shell-dark[data-ui-theme="custom"] .table tbody tr {
  border-color: rgba(148, 163, 184, 0.12);
}

body.public-voter-shell-dark[data-ui-theme="custom"] .table-success {
  --bs-table-bg: rgba(22, 101, 52, 0.28);
  --bs-table-color: #dcfce7;
}

body.public-voter-shell-dark[data-ui-theme="custom"] .nominee-avatar,
body.public-voter-shell-dark[data-ui-theme="custom"] .nominee-avatar-lg {
  border-color: rgba(148, 163, 184, 0.25);
}

body.public-voter-shell-dark[data-ui-theme="custom"] code {
  color: #93c5fd;
}

body.public-voter-shell-dark[data-ui-theme="custom"] hr {
  border-color: rgba(148, 163, 184, 0.16);
}

body.public-voter-shell-dark[data-ui-theme="custom"] .badge.bg-success {
  background: rgba(22, 163, 74, 0.85) !important;
}

body.public-voter-shell-dark[data-ui-theme="custom"] .public-foot,
body.public-voter-shell-dark[data-ui-theme="custom"] footer {
  color: #64748b;
}

body.public-voter-shell-dark[data-ui-theme="custom"] .vote-flow-hint {
  color: #94a3b8 !important;
}

/* —— Homepage (same dark canvas as vote flow) —— */

body.public-voter-shell-dark[data-ui-theme="custom"].home-page .home-hero {
  background: transparent !important;
  min-height: auto;
}

@media (min-width: 992px) {
  body.public-voter-shell-dark[data-ui-theme="custom"].home-page .home-hero {
    min-height: calc(100vh - 72px);
  }

  body.public-voter-shell-dark[data-ui-theme="custom"].home-page .public-navbar {
    position: relative !important;
  }
}

body.public-voter-shell-dark[data-ui-theme="custom"].home-page .home-portfolio,
body.public-voter-shell-dark[data-ui-theme="custom"].home-page .home-featured-live {
  background: transparent !important;
}

body.public-voter-shell-dark[data-ui-theme="custom"].home-page .home-title,
body.public-voter-shell-dark[data-ui-theme="custom"].home-page .home-info-panel h1 {
  color: #f8fafc;
}

body.public-voter-shell-dark[data-ui-theme="custom"].home-page .home-description {
  color: rgba(226, 232, 240, 0.88);
}

body.public-voter-shell-dark[data-ui-theme="custom"].home-page .home-trust-strip {
  color: #64748b;
}

body.public-voter-shell-dark[data-ui-theme="custom"].home-page .home-stat-card {
  background: rgba(22, 22, 31, 0.72) !important;
  border-color: rgba(148, 163, 184, 0.14) !important;
}

body.public-voter-shell-dark[data-ui-theme="custom"].home-page .home-stat-card h4,
body.public-voter-shell-dark[data-ui-theme="custom"].home-page .home-stat-card p {
  color: #e2e8f0;
}

body.public-voter-shell-dark[data-ui-theme="custom"].home-page .home-election-card {
  background: rgba(22, 22, 31, 0.92) !important;
  border: 1px solid rgba(148, 163, 184, 0.12) !important;
  color: #e2e8f0;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.32);
}

body.public-voter-shell-dark[data-ui-theme="custom"].home-page .home-election-card h2 {
  color: #f8fafc;
}

body.public-voter-shell-dark[data-ui-theme="custom"].home-page .home-election-card .btn-link {
  color: #93c5fd;
}

body.public-voter-shell-dark[data-ui-theme="custom"].home-page .home-portfolio-card {
  background: rgba(22, 22, 31, 0.92) !important;
  border: 1px solid rgba(148, 163, 184, 0.12);
  color: #e2e8f0;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

body.public-voter-shell-dark[data-ui-theme="custom"].home-page .home-portfolio-card h3,
body.public-voter-shell-dark[data-ui-theme="custom"].home-page .home-portfolio-card strong {
  color: #f8fafc;
}

body.public-voter-shell-dark[data-ui-theme="custom"].home-page .btn-outline-light {
  border-color: rgba(148, 163, 184, 0.35);
  color: #e2e8f0;
}

body.public-voter-shell-dark[data-ui-theme="custom"].home-page .btn-outline-light:hover {
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.45);
  color: #f8fafc;
}

/* —— Premium public pages (events, results, portfolio, nominate) —— */

html[data-public-shell="dark"][data-ui-theme="custom"] body.premium-page,
body.public-voter-shell-dark[data-ui-theme="custom"].premium-page {
  background:
    radial-gradient(circle at 20% 10%, rgba(37, 99, 235, 0.08), transparent 42%),
    radial-gradient(circle at 80% 30%, rgba(139, 92, 246, 0.06), transparent 38%),
    linear-gradient(180deg, #06060b 0%, #0a0a12 100%) !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] .premium-page .public-main .lead,
body.public-voter-shell-dark[data-ui-theme="custom"].premium-page .public-main .lead {
  color: rgba(226, 232, 240, 0.9);
}

html[data-public-shell="dark"][data-ui-theme="custom"] .premium-page .public-main strong,
body.public-voter-shell-dark[data-ui-theme="custom"].premium-page .public-main strong {
  color: #f8fafc;
}

html[data-public-shell="dark"][data-ui-theme="custom"] .premium-page .card,
html[data-public-shell="dark"][data-ui-theme="custom"] .premium-page .card-header,
body.public-voter-shell-dark[data-ui-theme="custom"].premium-page .card,
body.public-voter-shell-dark[data-ui-theme="custom"].premium-page .card-header {
  background: rgba(22, 22, 31, 0.92) !important;
  border: 1px solid rgba(148, 163, 184, 0.12) !important;
  color: #e2e8f0;
}

html[data-public-shell="dark"][data-ui-theme="custom"] .premium-page .card-body,
body.public-voter-shell-dark[data-ui-theme="custom"].premium-page .card-body {
  background: transparent;
  color: #e2e8f0;
}

html[data-public-shell="dark"][data-ui-theme="custom"] .premium-page .card-title,
html[data-public-shell="dark"][data-ui-theme="custom"] .premium-page .card-header,
body.public-voter-shell-dark[data-ui-theme="custom"].premium-page .card-title,
body.public-voter-shell-dark[data-ui-theme="custom"].premium-page .card-header {
  color: #f8fafc;
}

html[data-public-shell="dark"][data-ui-theme="custom"] .premium-page .table-light,
html[data-public-shell="dark"][data-ui-theme="custom"] .premium-page .table-light th,
body.public-voter-shell-dark[data-ui-theme="custom"].premium-page .table-light,
body.public-voter-shell-dark[data-ui-theme="custom"].premium-page .table-light th {
  --bs-table-bg: rgba(30, 41, 59, 0.65);
  --bs-table-color: #94a3b8;
  background: rgba(30, 41, 59, 0.65) !important;
  color: #94a3b8 !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] .premium-page .table-hover tbody tr:hover,
body.public-voter-shell-dark[data-ui-theme="custom"].premium-page .table-hover tbody tr:hover {
  --bs-table-hover-bg: rgba(37, 99, 235, 0.12);
  color: #e2e8f0;
}

html[data-public-shell="dark"][data-ui-theme="custom"] .premium-page .alert-secondary,
body.public-voter-shell-dark[data-ui-theme="custom"].premium-page .alert-secondary {
  --bs-alert-bg: rgba(51, 65, 85, 0.92);
  --bs-alert-border-color: rgba(148, 163, 184, 0.35);
  --bs-alert-color: #e2e8f0;
  background: rgba(51, 65, 85, 0.92) !important;
  border-color: rgba(148, 163, 184, 0.35) !important;
  color: #e2e8f0 !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] .premium-page .alert-secondary strong,
body.public-voter-shell-dark[data-ui-theme="custom"].premium-page .alert-secondary strong {
  color: #f8fafc;
}

html[data-public-shell="dark"][data-ui-theme="custom"] .premium-page .badge.bg-light,
body.public-voter-shell-dark[data-ui-theme="custom"].premium-page .badge.bg-light {
  background: rgba(30, 41, 59, 0.85) !important;
  color: #e2e8f0 !important;
  border-color: rgba(148, 163, 184, 0.25) !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] .premium-page .badge.bg-info,
body.public-voter-shell-dark[data-ui-theme="custom"].premium-page .badge.bg-info {
  background: rgba(14, 116, 144, 0.85) !important;
  color: #e0f2fe !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] .premium-page .badge.bg-warning,
body.public-voter-shell-dark[data-ui-theme="custom"].premium-page .badge.bg-warning {
  color: #1e293b !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] .premium-page .public-breadcrumb a,
body.public-voter-shell-dark[data-ui-theme="custom"].premium-page .public-breadcrumb a {
  color: #93c5fd;
}

html[data-public-shell="dark"][data-ui-theme="custom"] .premium-page .list-unstyled li,
body.public-voter-shell-dark[data-ui-theme="custom"].premium-page .list-unstyled li {
  color: #cbd5e1;
}

html[data-public-shell="dark"][data-ui-theme="custom"] .premium-page .shadow-sm,
body.public-voter-shell-dark[data-ui-theme="custom"].premium-page .shadow-sm {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28) !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] .premium-page .border-primary,
body.public-voter-shell-dark[data-ui-theme="custom"].premium-page .border-primary {
  border-color: rgba(59, 130, 246, 0.45) !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] .premium-page .card.border-primary,
body.public-voter-shell-dark[data-ui-theme="custom"].premium-page .card.border-primary {
  background: rgba(22, 22, 31, 0.95) !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] .premium-page textarea.form-control,
html[data-public-shell="dark"][data-ui-theme="custom"] .premium-page .form-control,
body.public-voter-shell-dark[data-ui-theme="custom"].premium-page textarea.form-control,
body.public-voter-shell-dark[data-ui-theme="custom"].premium-page .form-control {
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(148, 163, 184, 0.22);
  color: #f1f5f9;
}

html[data-public-shell="dark"][data-ui-theme="custom"] .premium-page .form-text,
body.public-voter-shell-dark[data-ui-theme="custom"].premium-page .form-text {
  color: #94a3b8 !important;
}

/* =============================================================================
   Page-by-page dark text polish (card surfaces unchanged).
   Test each route before adding the next section.
   ============================================================================= */

/* Page 1: Homepage (/) */

html[data-public-shell="dark"][data-ui-theme="custom"] body.home-page .home-election-card .text-muted,
html[data-public-shell="dark"][data-ui-theme="custom"] body.home-page .home-election-lead,
body.public-voter-shell-dark[data-ui-theme="custom"].home-page .home-election-card .text-muted,
body.public-voter-shell-dark[data-ui-theme="custom"].home-page .home-election-lead {
  color: #c4d0df !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.home-page .home-trust-strip,
body.public-voter-shell-dark[data-ui-theme="custom"].home-page .home-trust-strip {
  color: #a8b8ca;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.home-page .home-info-panel .home-description,
body.public-voter-shell-dark[data-ui-theme="custom"].home-page .home-info-panel .home-description {
  color: rgba(241, 245, 249, 0.92);
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.home-page .home-portfolio .home-description,
html[data-public-shell="dark"][data-ui-theme="custom"] body.home-page .home-featured-live .home-description,
body.public-voter-shell-dark[data-ui-theme="custom"].home-page .home-portfolio .home-description,
body.public-voter-shell-dark[data-ui-theme="custom"].home-page .home-featured-live .home-description {
  color: rgba(226, 232, 240, 0.88);
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.home-page .home-portfolio-card .text-muted,
body.public-voter-shell-dark[data-ui-theme="custom"].home-page .home-portfolio-card .text-muted {
  color: #b8c8da !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.home-page .home-portfolio-card p:not(.text-muted),
body.public-voter-shell-dark[data-ui-theme="custom"].home-page .home-portfolio-card p:not(.text-muted) {
  color: #d8e2ef;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.home-page .home-stat-card p,
body.public-voter-shell-dark[data-ui-theme="custom"].home-page .home-stat-card p {
  color: rgba(241, 245, 249, 0.88);
}

/* Page 2: Events listing (/events) */

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-events .public-main > .container > .mb-4 p.text-muted,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-events .public-main > .container > .mb-4 p.text-muted {
  color: #c4d0df !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-events .public-main .card-title,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-events .public-main .card-title {
  color: #f8fafc;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-events .public-main .card-text.text-muted,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-events .public-main .card-text.text-muted {
  color: #b8c8da !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-events .public-main .card-body,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-events .public-main .card-body {
  color: #d8e2ef;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-events .public-main .badge.bg-secondary,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-events .public-main .badge.bg-secondary {
  background: rgba(100, 116, 139, 0.85) !important;
  color: #f1f5f9 !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-events .public-main .badge.bg-info.text-dark,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-events .public-main .badge.bg-info.text-dark {
  color: #0f172a !important;
}

/* Page 3: Event detail (/events/:slug) */

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-event-detail .public-breadcrumb a,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-event-detail .public-breadcrumb a {
  color: #93c5fd;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-event-detail .public-breadcrumb .text-muted,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-event-detail .public-breadcrumb .text-muted {
  color: #b8c8da !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-event-detail .public-main .lead,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-event-detail .public-main .lead {
  color: rgba(241, 245, 249, 0.92);
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-event-detail .public-main .text-muted,
html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-event-detail .public-main .small.text-muted,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-event-detail .public-main .text-muted,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-event-detail .public-main .small.text-muted {
  color: #b8c8da !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-event-detail .public-main .card-header:not(.bg-primary),
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-event-detail .public-main .card-header:not(.bg-primary) {
  color: #f8fafc;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-event-detail .public-main .card-body,
html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-event-detail .public-main .card-body p,
html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-event-detail .public-main .card-body li,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-event-detail .public-main .card-body,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-event-detail .public-main .card-body p,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-event-detail .public-main .card-body li {
  color: #d8e2ef;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-event-detail .public-main .card-body strong,
html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-event-detail .public-main .list-group-item strong,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-event-detail .public-main .card-body strong,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-event-detail .public-main .list-group-item strong {
  color: #f8fafc;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-event-detail .public-main .list-group-item,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-event-detail .public-main .list-group-item {
  background: transparent;
  border-color: rgba(148, 163, 184, 0.14);
  color: #d8e2ef;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-event-detail .public-main .badge.bg-secondary,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-event-detail .public-main .badge.bg-secondary {
  background: rgba(100, 116, 139, 0.85) !important;
  color: #f1f5f9 !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-event-detail .public-main .badge.bg-light.text-dark,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-event-detail .public-main .badge.bg-light.text-dark {
  background: rgba(51, 65, 85, 0.9) !important;
  color: #e2e8f0 !important;
  border-color: rgba(148, 163, 184, 0.25) !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-event-detail .public-main .alert-success .alert-link,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-event-detail .public-main .alert-success .alert-link {
  color: #ffffff;
  font-weight: 600;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-event-detail .public-main .alert-warning,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-event-detail .public-main .alert-warning {
  --bs-alert-bg: rgba(120, 53, 15, 0.92);
  --bs-alert-border-color: rgba(251, 191, 36, 0.45);
  --bs-alert-color: #fef3c7;
  background: rgba(120, 53, 15, 0.92) !important;
  border-color: rgba(251, 191, 36, 0.45) !important;
  color: #fef3c7 !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-event-detail .public-main .card.border-primary .card-body code,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-event-detail .public-main .card.border-primary .card-body code {
  color: #93c5fd;
}

/* Page 4: Vote by code entry (/vote) */

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-entry .vote-steps li:not(.active):not(.done),
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-entry .vote-steps li:not(.active):not(.done) {
  color: #b8c8da !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-entry .vote-steps li.active,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-entry .vote-steps li.active {
  color: #bfdbfe !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-entry .vote-flow-entry-head .vote-flow-sub,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-entry .vote-flow-entry-head .vote-flow-sub {
  color: rgba(241, 245, 249, 0.9) !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-entry .vote-flow-entry-body .form-label,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-entry .vote-flow-entry-body .form-label {
  color: #e2e8f0 !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-entry .vote-flow-entry-body .form-control::placeholder,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-entry .vote-flow-entry-body .form-control::placeholder {
  color: #94a3b8;
  opacity: 1;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-entry .vote-flow-entry-body .text-muted,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-entry .vote-flow-entry-body .text-muted {
  color: #b8c8da !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-entry .vote-flow-entry-body .text-muted a,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-entry .vote-flow-entry-body .text-muted a {
  color: #93c5fd;
  font-weight: 600;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-entry .vote-flow-entry-body .text-muted a:hover,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-entry .vote-flow-entry-body .text-muted a:hover {
  color: #bfdbfe;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-entry .vote-flow-entry-body .alert-danger,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-entry .vote-flow-entry-body .alert-danger {
  --bs-alert-bg: rgba(127, 29, 29, 0.92);
  --bs-alert-border-color: rgba(248, 113, 113, 0.45);
  --bs-alert-color: #fee2e2;
  background: rgba(127, 29, 29, 0.92) !important;
  border-color: rgba(248, 113, 113, 0.45) !important;
  color: #fee2e2 !important;
}

/* Page 5: Ballot flow (/vote/:code, checkout, payment, standings) */

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-flow .vote-steps li:not(.active):not(.done),
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-flow .vote-steps li:not(.active):not(.done) {
  color: #b8c8da !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-flow .vote-steps li.active,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-flow .vote-steps li.active {
  color: #bfdbfe !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-flow .vote-flow-topbar .vote-flow-sub,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-flow .vote-flow-topbar .vote-flow-sub {
  color: rgba(241, 245, 249, 0.9) !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-flow .vote-flow-nominee-meta .text-muted,
html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-flow .vote-flow-code .text-muted,
html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-flow .vote-flow-summary-grid .text-muted,
html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-flow .vote-flow-summary-grid .small.text-muted,
html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-flow .vote-flow-hint,
html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-flow .form-label .text-muted,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-flow .vote-flow-nominee-meta .text-muted,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-flow .vote-flow-code .text-muted,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-flow .vote-flow-summary-grid .text-muted,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-flow .vote-flow-summary-grid .small.text-muted,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-flow .vote-flow-hint,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-flow .form-label .text-muted {
  color: #b8c8da !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-flow .vote-flow-summary-grid strong,
html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-flow .vote-flow-nominee-meta strong,
html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-flow .vote-flow-panel-body .form-check-label strong,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-flow .vote-flow-summary-grid strong,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-flow .vote-flow-nominee-meta strong,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-flow .vote-flow-panel-body .form-check-label strong {
  color: #f8fafc;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-flow .vote-flow-panel-body .form-label,
html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-flow .vote-flow-panel-body .form-check-label,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-flow .vote-flow-panel-body .form-label,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-flow .vote-flow-panel-body .form-check-label {
  color: #d8e2ef;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-flow .vote-flow-panel-head span:not(.position-number),
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-flow .vote-flow-panel-head span:not(.position-number) {
  color: #f8fafc;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-flow .public-main > .container .text-muted,
html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-flow .public-main > .container .small.text-muted,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-flow .public-main > .container .text-muted,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-flow .public-main > .container .small.text-muted {
  color: #b8c8da !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-flow .public-breadcrumb a,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-flow .public-breadcrumb a {
  color: #93c5fd;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-flow .public-breadcrumb .text-muted,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-flow .public-breadcrumb .text-muted {
  color: #b8c8da !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-flow .public-main .card-body,
html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-flow .public-main .card-body strong,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-flow .public-main .card-body,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-flow .public-main .card-body strong {
  color: #d8e2ef;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-flow .public-main .card-body strong,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-flow .public-main .card-body strong {
  color: #f8fafc;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-flow .table thead.table-light,
html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-flow .table thead.table-light th,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-flow .table thead.table-light,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-flow .table thead.table-light th {
  --bs-table-bg: rgba(30, 41, 59, 0.85);
  --bs-table-color: #b8c8da;
  background: rgba(30, 41, 59, 0.85) !important;
  color: #b8c8da !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-flow .table tbody td,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-flow .table tbody td {
  color: #d8e2ef;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-flow .table tbody tr.table-primary,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-flow .table tbody tr.table-primary {
  --bs-table-bg: rgba(37, 99, 235, 0.22);
  --bs-table-color: #f1f5f9;
  --bs-table-hover-bg: rgba(37, 99, 235, 0.28);
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-flow .table tbody tr.table-primary td,
html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-flow .table tbody tr.table-primary strong,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-flow .table tbody tr.table-primary td,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-flow .table tbody tr.table-primary strong {
  color: #f1f5f9;
}

/* Standings (/vote/:code/standings) */

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-standings .public-breadcrumb a,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-standings .public-breadcrumb a {
  color: #93c5fd;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-standings .public-breadcrumb .text-muted,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-standings .public-breadcrumb .text-muted {
  color: #b8c8da !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-standings .public-main h1,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-standings .public-main h1 {
  color: #f8fafc;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-standings .public-main .mb-4 .text-muted,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-standings .public-main .mb-4 .text-muted {
  color: #b8c8da !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-standings .public-main .card .table,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-standings .public-main .card .table {
  --bs-table-bg: transparent;
  --bs-table-color: #d8e2ef;
  --bs-table-border-color: rgba(148, 163, 184, 0.16);
  --bs-table-hover-bg: rgba(37, 99, 235, 0.12);
  --bs-table-hover-color: #f1f5f9;
  --bs-table-striped-bg: transparent;
  color: #d8e2ef;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-standings .public-main .card .table > :not(caption) > * > *,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-standings .public-main .card .table > :not(caption) > * > * {
  background-color: transparent !important;
  color: #d8e2ef;
  border-bottom-color: rgba(148, 163, 184, 0.16);
  box-shadow: inset 0 0 0 9999px transparent !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-standings .public-main .card .table thead.table-light > tr > th,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-standings .public-main .card .table thead.table-light > tr > th {
  --bs-table-bg: rgba(30, 41, 59, 0.95);
  --bs-table-color: #c4d0df;
  background-color: rgba(30, 41, 59, 0.95) !important;
  color: #c4d0df !important;
  border-bottom-color: rgba(148, 163, 184, 0.22) !important;
  font-weight: 600;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-standings .public-main .card .table tbody tr:hover > *,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-standings .public-main .card .table tbody tr:hover > * {
  background-color: rgba(37, 99, 235, 0.1) !important;
  color: #f1f5f9;
  box-shadow: inset 0 0 0 9999px rgba(37, 99, 235, 0.1) !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-standings .public-main .card .table tbody tr.table-primary > *,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-standings .public-main .card .table tbody tr.table-primary > * {
  --bs-table-bg: rgba(37, 99, 235, 0.32);
  --bs-table-color: #f8fafc;
  background-color: rgba(37, 99, 235, 0.32) !important;
  color: #f8fafc !important;
  box-shadow: inset 0 0 0 9999px rgba(37, 99, 235, 0.32) !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-standings .public-main .card .table tbody tr.table-primary strong,
html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-standings .public-main .card .table tbody tr.table-primary td,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-standings .public-main .card .table tbody tr.table-primary strong,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-standings .public-main .card .table tbody tr.table-primary td {
  color: #f8fafc !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-standings .public-main .card .table tbody strong,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-standings .public-main .card .table tbody strong {
  color: #f8fafc;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-standings .public-main .badge.bg-dark,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-standings .public-main .badge.bg-dark {
  background: rgba(226, 232, 240, 0.18) !important;
  color: #f1f5f9 !important;
  border: 1px solid rgba(226, 232, 240, 0.28);
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-vote-standings .public-main .badge.bg-primary,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-vote-standings .public-main .badge.bg-primary {
  background: rgba(37, 99, 235, 0.9) !important;
  color: #ffffff !important;
}

/* Event results (/events/:slug/results) — same table treatment as standings */

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-event-results .public-breadcrumb a,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-event-results .public-breadcrumb a {
  color: #93c5fd;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-event-results .public-breadcrumb .text-muted,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-event-results .public-breadcrumb .text-muted {
  color: #b8c8da !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-event-results .public-main h1,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-event-results .public-main h1 {
  color: #f8fafc;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-event-results .public-main .mb-4 .text-muted,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-event-results .public-main .mb-4 .text-muted {
  color: #b8c8da !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-event-results .public-main .mb-4 strong,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-event-results .public-main .mb-4 strong {
  color: #f8fafc;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-event-results .public-main .card-header,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-event-results .public-main .card-header {
  color: #f8fafc;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-event-results .public-main .card .table,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-event-results .public-main .card .table {
  --bs-table-bg: transparent;
  --bs-table-color: #d8e2ef;
  --bs-table-border-color: rgba(148, 163, 184, 0.16);
  --bs-table-hover-bg: rgba(37, 99, 235, 0.12);
  --bs-table-hover-color: #f1f5f9;
  --bs-table-striped-bg: transparent;
  color: #d8e2ef;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-event-results .public-main .card .table > :not(caption) > * > *,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-event-results .public-main .card .table > :not(caption) > * > * {
  background-color: transparent !important;
  color: #d8e2ef;
  border-bottom-color: rgba(148, 163, 184, 0.16);
  box-shadow: inset 0 0 0 9999px transparent !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-event-results .public-main .card .table thead.table-light > tr > th,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-event-results .public-main .card .table thead.table-light > tr > th {
  --bs-table-bg: rgba(30, 41, 59, 0.95);
  --bs-table-color: #c4d0df;
  background-color: rgba(30, 41, 59, 0.95) !important;
  color: #c4d0df !important;
  border-bottom-color: rgba(148, 163, 184, 0.22) !important;
  font-weight: 600;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-event-results .public-main .card .table tbody tr:hover > *,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-event-results .public-main .card .table tbody tr:hover > * {
  background-color: rgba(37, 99, 235, 0.1) !important;
  color: #f1f5f9;
  box-shadow: inset 0 0 0 9999px rgba(37, 99, 235, 0.1) !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-event-results .public-main .card .table tbody td,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-event-results .public-main .card .table tbody td {
  color: #d8e2ef;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-event-results .public-main .card .table tbody strong,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-event-results .public-main .card .table tbody strong {
  color: #f8fafc;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-event-results .public-main .badge.bg-light.text-dark,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-event-results .public-main .badge.bg-light.text-dark {
  background: rgba(51, 65, 85, 0.9) !important;
  color: #e2e8f0 !important;
  border: 1px solid rgba(148, 163, 184, 0.25) !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-event-results .public-main .badge.bg-primary,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-event-results .public-main .badge.bg-primary {
  background: rgba(37, 99, 235, 0.9) !important;
  color: #ffffff !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-event-results .public-main .alert-secondary strong,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-event-results .public-main .alert-secondary strong {
  color: #f8fafc;
}

/* Page 6: Portfolio, nominate, nominees (premium-content) */

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-premium-content .public-breadcrumb a,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-premium-content .public-breadcrumb a {
  color: #93c5fd;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-premium-content .public-breadcrumb .text-muted,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-premium-content .public-breadcrumb .text-muted {
  color: #b8c8da !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-premium-content .public-main > .container > .mb-4 p.text-muted,
html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-premium-content .public-main .mb-4 p.text-muted,
html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-premium-content .public-main .row .mb-4 p.text-muted,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-premium-content .public-main > .container > .mb-4 p.text-muted,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-premium-content .public-main .mb-4 p.text-muted,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-premium-content .public-main .row .mb-4 p.text-muted {
  color: #b8c8da !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-premium-content .public-main .mb-4 strong,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-premium-content .public-main .mb-4 strong {
  color: #f8fafc;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-premium-content .public-main .card-header,
html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-premium-content .public-main .card-title,
html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-premium-content .public-main .card h2,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-premium-content .public-main .card-header,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-premium-content .public-main .card-title,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-premium-content .public-main .card h2 {
  color: #f8fafc;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-premium-content .public-main .card-body,
html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-premium-content .public-main .card-body p,
html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-premium-content .public-main .card-body li,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-premium-content .public-main .card-body,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-premium-content .public-main .card-body p,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-premium-content .public-main .card-body li {
  color: #d8e2ef;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-premium-content .public-main .card-body .text-muted,
html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-premium-content .public-main .card-text.text-muted,
html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-premium-content .public-main .small.text-muted,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-premium-content .public-main .card-body .text-muted,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-premium-content .public-main .card-text.text-muted,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-premium-content .public-main .small.text-muted {
  color: #b8c8da !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-premium-content .public-main .card-body strong,
html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-premium-content .public-main .list-group-item strong,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-premium-content .public-main .card-body strong,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-premium-content .public-main .list-group-item strong {
  color: #f8fafc;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-premium-content .public-main .list-group-item,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-premium-content .public-main .list-group-item {
  background: transparent;
  border-color: rgba(148, 163, 184, 0.14);
  color: #d8e2ef;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-premium-content .public-main .list-unstyled li,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-premium-content .public-main .list-unstyled li {
  color: #d8e2ef;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-premium-content .public-main .list-group-item .small:not(.text-muted),
html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-premium-content .public-main .list-group-item code,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-premium-content .public-main .list-group-item .small:not(.text-muted),
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-premium-content .public-main .list-group-item code {
  color: #d8e2ef;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-premium-content .public-main .table thead.table-light,
html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-premium-content .public-main .table thead.table-light th,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-premium-content .public-main .table thead.table-light,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-premium-content .public-main .table thead.table-light th {
  --bs-table-bg: rgba(30, 41, 59, 0.85);
  --bs-table-color: #b8c8da;
  background: rgba(30, 41, 59, 0.85) !important;
  color: #b8c8da !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-premium-content .public-main .table tbody td,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-premium-content .public-main .table tbody td {
  color: #d8e2ef;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-premium-content .public-main .table tbody strong,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-premium-content .public-main .table tbody strong {
  color: #f8fafc;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-premium-content .public-main .badge.bg-light.text-dark,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-premium-content .public-main .badge.bg-light.text-dark {
  background: rgba(51, 65, 85, 0.9) !important;
  color: #e2e8f0 !important;
  border-color: rgba(148, 163, 184, 0.25) !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-premium-content .public-main .form-label,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-premium-content .public-main .form-label {
  color: #e2e8f0 !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-premium-content .public-main .form-text,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-premium-content .public-main .form-text {
  color: #b8c8da !important;
}

html[data-public-shell="dark"][data-ui-theme="custom"] body.public-page-premium-content .public-main .alert-success strong,
body.public-voter-shell-dark[data-ui-theme="custom"].public-page-premium-content .public-main .alert-success strong {
  color: #ffffff;
}
