/* ═══════════════════════════════════════════════════════════════════════
   BeeVote — LIGHT THEME OVERRIDE LAYER
   ───────────────────────────────────────────────────────────────────────
   Scoped entirely to html[data-theme="light"]. Nothing here applies until
   the theme toggle (partials/topbar.blade.php) sets that attribute, so the
   dark theme in beevote.css / style.css is untouched and cannot regress.

   WHY A SEPARATE SHEET AND NOT A VARIABLE REFACTOR
   beevote.css hardcodes 234 distinct colours across 758 declarations with
   445 !important flags and zero custom properties. Converting those in
   place would edit every colour rule in a 5,471-line sheet that 30 views
   depend on. This layer instead re-states only the surfaces that carry
   colour, additively.

   HOW THE SPECIFICITY WORKS — read before adding a rule
   The base rules are !important, so an override must ALSO be !important
   *and* out-specify them. `html[data-theme="light"] .bv-card` is (0,2,1)
   against `.bv-card` at (0,1,0), so it wins. Drop the `html` prefix or the
   !important and the rule silently loses. Every colour rule below is
   written that way on purpose.

   INLINE style="" ATTRIBUTES
   The views carry 182 inline colour declarations that no class selector
   can reach. An author !important DOES beat a non-important inline style,
   so section 12 catches the dangerous ones (white text, dark panels) by
   substring-matching the style attribute itself. That is a safety net for
   legibility, not a substitute for migrating those views to classes.

   DEPLOYING A CHANGE TO THIS FILE
   public/ is a named Docker volume (public_data) that Docker seeds only
   when empty, so an image rebuild will NOT refresh it. Ship edits with:
     docker compose stop app nginx
     docker volume rm beevote-deployment_public_data
     docker compose up -d
   The @versioned() directive handles the 30-day immutable cache header.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── 1. PALETTE ─────────────────────────────────────────────────────────
   Not an inversion of the dark values. Frosted glass over a dark field
   reads as depth; the same treatment over a light field reads as grey
   mud, so light mode trades translucency for real surfaces and hairlines.

   The brand gold #FFB400 scores ~1.9:1 on white and fails WCAG AA for
   text, so it survives only as a fill or border. Gold *text* uses
   --bvl-gold-ink (#8a5a00, ~6.4:1). Same reasoning for the status
   colours: every one of them gets an "ink" variant for use on type.     */

html[data-theme="light"] {
  --bvl-canvas:        #eef1f7;
  --bvl-surface:       #ffffff;
  --bvl-surface-2:     #f7f9fc;
  --bvl-surface-sunk:  rgba(15, 23, 42, 0.035);

  --bvl-ink:           #0f172a;
  --bvl-ink-2:         rgba(15, 23, 42, 0.72);
  --bvl-ink-muted:     rgba(15, 23, 42, 0.68);
  --bvl-ink-faint:     rgba(15, 23, 42, 0.62);

  --bvl-line:          rgba(15, 23, 42, 0.10);
  --bvl-line-soft:     rgba(15, 23, 42, 0.06);

  --bvl-gold:          #FFB400;
  --bvl-gold-ink:      #8a5a00;
  --bvl-blue:          #2563eb;
  --bvl-blue-ink:      #1d4ed8;
  --bvl-green-ink:     #166534;
  --bvl-red-ink:       #b91c1c;
  --bvl-amber-ink:     #92400e;

  --bvl-shadow-sm:     0 1px 2px rgba(15, 23, 42, 0.05);
  --bvl-shadow:        0 2px 4px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  --bvl-shadow-lg:     0 12px 40px rgba(15, 23, 42, 0.12);

  /* style.css drives a handful of components off its own :root variables,
     so remapping them here themes those without editing that sheet. */
  --bg-deep:        #eef1f7;
  --bg-main:        #eef1f7;
  --bg-color:       #eef1f7;
  --glass-bg:       rgba(15, 23, 42, 0.035);
  --glass-border:   rgba(15, 23, 42, 0.10);
  --glass-shadow:   0 2px 4px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  --text-primary:   #0f172a;
  --text-color:     #0f172a;
  --text-muted:     rgba(15, 23, 42, 0.68);
  --border-color:   rgba(15, 23, 42, 0.10);
  --border-main:    rgba(15, 23, 42, 0.10);
  --card-shadow:    0 12px 40px rgba(15, 23, 42, 0.12);
  --accent-success: #15803d;
  --accent-danger:  #b91c1c;

  color-scheme: light;
}

/* ── 2. PAGE CANVAS ─────────────────────────────────────────────────── */

html[data-theme="light"] body {
  background: var(--bvl-canvas) !important;
  background-image:
    radial-gradient(ellipse 1000px 600px at 20% 10%, rgba(37, 99, 235, 0.07) 0%, transparent 60%),
    radial-gradient(ellipse 800px 500px at 80% 90%, rgba(255, 180, 0, 0.09) 0%, transparent 60%),
    radial-gradient(ellipse 600px 400px at 60% 40%, rgba(56, 189, 248, 0.05) 0%, transparent 55%) !important;
  background-attachment: fixed !important;
  color: var(--bvl-ink) !important;
}

/* The two floating blobs are 450-550px of blurred colour at opacity .5.
   At the dark values they turn the light canvas muddy, so they stay as
   atmosphere but drop to a tint. */
html[data-theme="light"] .blob   { opacity: 0.35 !important; }
html[data-theme="light"] .blob-1 { background: rgba(37, 99, 235, 0.18) !important; }
html[data-theme="light"] .blob-2 { background: rgba(255, 180, 0, 0.20) !important; }

html[data-theme="light"] .bv-page-header h1,
html[data-theme="light"] .bv-page-heading { color: var(--bvl-ink) !important; }

html[data-theme="light"] .bv-page-header p,
html[data-theme="light"] .bv-page-subheading { color: var(--bvl-ink-2) !important; }   /* ink-muted measured 3.5:1 */

html[data-theme="light"] .bv-page-title { color: var(--bvl-gold-ink) !important; }

/* ── 3. CARDS ───────────────────────────────────────────────────────── */

html[data-theme="light"] .bv-card,
html[data-theme="light"] .glass-card,
html[data-theme="light"] .glass-panel,
html[data-theme="light"] .bv-card--lg {
  background: var(--bvl-surface) !important;
  /* No backdrop-filter: there is nothing dark behind it to frost, and the
     blur costs a compositor layer per card for no visual gain. */
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 1px solid var(--bvl-line) !important;
  border-top: 1px solid var(--bvl-line) !important;
  box-shadow: var(--bvl-shadow) !important;
}

html[data-theme="light"] .bv-card--accent {
  border-top: 2px solid var(--bvl-gold) !important;
}

html[data-theme="light"] .bv-minimal-card {
  background: var(--bvl-surface) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 1px solid var(--bvl-line) !important;
  border-top: 1px solid var(--bvl-line) !important;
  box-shadow: var(--bvl-shadow-lg) !important;
}

html[data-theme="light"] .bv-card__meta { color: var(--bvl-ink-faint) !important; }
html[data-theme="light"] .bv-card__title,
html[data-theme="light"] .bv-card__title-row .bv-card__title { color: var(--bvl-ink) !important; }
html[data-theme="light"] .bv-card__stat { color: var(--bvl-ink) !important; }
html[data-theme="light"] .bv-card__desc { color: var(--bvl-ink-2) !important; }   /* ink-muted measured 3.6:1 */
html[data-theme="light"] .bv-card__title-row { border-bottom-color: var(--bvl-line-soft) !important; }

html[data-theme="light"] .bv-card__icon {
  background: rgba(255, 180, 0, 0.14) !important;
  border-color: rgba(255, 180, 0, 0.45) !important;
  color: var(--bvl-gold-ink) !important;
}

/* Tinted icon chips: the 0.15-alpha fills vanish on white and the
   mid-saturation glyph colours drop below 3:1. Both are lifted here. */
html[data-theme="light"] .bv-card__icon--blue    { background: rgba(37,99,235,0.10) !important; border-color: rgba(37,99,235,0.35) !important; color: var(--bvl-blue-ink)  !important; }
html[data-theme="light"] .bv-card__icon--green   { background: rgba(21,128,61,0.10) !important; border-color: rgba(21,128,61,0.35) !important; color: var(--bvl-green-ink) !important; }
html[data-theme="light"] .bv-card__icon--red     { background: rgba(185,28,28,0.10) !important; border-color: rgba(185,28,28,0.35) !important; color: var(--bvl-red-ink)   !important; }
html[data-theme="light"] .bv-card__icon--amber   { background: rgba(180,83,9,0.10)  !important; border-color: rgba(180,83,9,0.35)  !important; color: var(--bvl-amber-ink) !important; }
html[data-theme="light"] .bv-card__icon--crimson { background: rgba(153,27,27,0.10) !important; border-color: rgba(153,27,27,0.35) !important; color: #991b1b              !important; }

/* Inline icon helper colours — same contrast problem, same remap. */
html[data-theme="light"] .bv-icon--gold   { color: var(--bvl-gold-ink)  !important; }
html[data-theme="light"] .bv-icon--green  { color: var(--bvl-green-ink) !important; }
html[data-theme="light"] .bv-icon--red    { color: var(--bvl-red-ink)   !important; }
html[data-theme="light"] .bv-icon--blue   { color: var(--bvl-blue-ink)  !important; }
html[data-theme="light"] .bv-icon--indigo { color: #4338ca              !important; }
html[data-theme="light"] .bv-icon--amber  { color: var(--bvl-amber-ink) !important; }
html[data-theme="light"] .bv-icon--muted  { opacity: 0.55               !important; }

/* ── 4. BUTTONS ─────────────────────────────────────────────────────── */

html[data-theme="light"] .bv-btn--primary,
html[data-theme="light"] .primary-yellow-btn {
  background: var(--bvl-blue) !important;
  border: 1px solid var(--bvl-blue-ink) !important;
  color: #ffffff !important;
  backdrop-filter: none !important;
  box-shadow: var(--bvl-shadow-sm) !important;
}
html[data-theme="light"] .bv-btn--primary:hover,
html[data-theme="light"] .primary-yellow-btn:hover {
  background: var(--bvl-blue-ink) !important;
  border-color: #1e40af !important;
}

html[data-theme="light"] .bv-btn--ghost {
  background: var(--bvl-surface) !important;
  border: 1px solid var(--bvl-line) !important;
  color: var(--bvl-ink-2) !important;
}
html[data-theme="light"] .bv-btn--ghost:hover {
  background: var(--bvl-surface-2) !important;
  border-color: rgba(15, 23, 42, 0.20) !important;
  color: var(--bvl-ink) !important;
}

html[data-theme="light"] .bv-btn--secondary { color: var(--bvl-ink-muted) !important; }
html[data-theme="light"] .bv-btn--secondary:hover { color: var(--bvl-ink) !important; }

html[data-theme="light"] .bv-btn--google {
  background: var(--bvl-surface) !important;
  border: 1px solid var(--bvl-line) !important;
  color: var(--bvl-ink-2) !important;
}
html[data-theme="light"] .bv-btn--google:hover {
  background: var(--bvl-surface-2) !important;
  border-color: rgba(15, 23, 42, 0.20) !important;
}

html[data-theme="light"] .bv-btn--logout { color: var(--bvl-ink-faint) !important; }
html[data-theme="light"] .bv-btn--logout:hover { color: var(--bvl-red-ink) !important; }

html[data-theme="light"] .bv-btn--danger {
  background: rgba(185, 28, 28, 0.08) !important;
  border: 1px solid rgba(185, 28, 28, 0.32) !important;
  color: var(--bvl-red-ink) !important;
}
html[data-theme="light"] .bv-btn--danger:hover { background: rgba(185, 28, 28, 0.16) !important; }

html[data-theme="light"] .bv-btn--signout {
  background: rgba(185, 28, 28, 0.06) !important;
  border: 1px solid rgba(185, 28, 28, 0.24) !important;
  color: var(--bvl-red-ink) !important;
}
html[data-theme="light"] .bv-btn--signout:hover {
  background: rgba(185, 28, 28, 0.14) !important;
  border-color: rgba(185, 28, 28, 0.45) !important;
}

html[data-theme="light"] .bv-btn--verify,
html[data-theme="light"] .bv-btn--create {
  background: var(--bvl-blue) !important;
  border: 1px solid var(--bvl-blue-ink) !important;
  color: #ffffff !important;
}
html[data-theme="light"] .bv-btn--verify:hover {
  background: var(--bvl-blue-ink) !important;
  box-shadow: 0 0 16px rgba(37, 99, 235, 0.25) !important;
}

html[data-theme="light"] .bv-btn--gold-sm {
  background: var(--bvl-blue) !important;
  border-color: var(--bvl-blue-ink) !important;
  color: #ffffff !important;
}
html[data-theme="light"] .bv-btn--gold-sm:hover {
  background: var(--bvl-blue-ink) !important;
  border-color: #1e40af !important;
}

/* The ballot submit and the receipt's two main buttons are primaries too. */
html[data-theme="light"] .bv-ballot-commit__btn:not(:disabled),
html[data-theme="light"] .bv-receipt-btn--print,
html[data-theme="light"] .bv-receipt-btn--image {
  background: var(--bvl-blue) !important;
  border: 1px solid var(--bvl-blue-ink) !important;
  color: #ffffff !important;
  box-shadow: var(--bvl-shadow-sm) !important;
}
html[data-theme="light"] .bv-ballot-commit__btn:hover:not(:disabled),
html[data-theme="light"] .bv-receipt-btn--print:hover,
html[data-theme="light"] .bv-receipt-btn--image:hover {
  background: var(--bvl-blue-ink) !important;
  border-color: #1e40af !important;
}

/* The deck's final submit is a primary; its two-tap confirm still turns red,
   which the light primary rule above would otherwise out-rank. */
html[data-theme="light"] .bv-review__submit.is-armed {
  background: #dc2626 !important;
  border-color: #b91c1c !important;
  color: #ffffff !important;
}

html[data-theme="light"] .bv-reveal-btn {
  border-color: rgba(138, 90, 0, 0.45) !important;
  color: var(--bvl-gold-ink) !important;
}
html[data-theme="light"] .bv-reveal-btn:hover {
  background: rgba(255, 180, 0, 0.14) !important;
  border-color: var(--bvl-gold-ink) !important;
}

/* ── 5. BADGES, ALERTS, DOTS ────────────────────────────────────────── */

/* #166534 rather than --bvl-green-ink: the Active badge is 11px text on a
   green tint, and green-ink measured 4.4:1 there. */
html[data-theme="light"] .bv-badge--green,
html[data-theme="light"] .bv-badge--vote-cast,
html[data-theme="light"] .bv-badge--active {
  background: rgba(21, 128, 61, 0.10) !important;
  border: 1px solid rgba(21, 128, 61, 0.35) !important;
  color: #166534 !important;
}

html[data-theme="light"] .bv-badge--gold,
html[data-theme="light"] .bv-badge--ballot-cast {
  background: rgba(255, 180, 0, 0.18) !important;
  border: 1px solid rgba(138, 90, 0, 0.35) !important;
  color: var(--bvl-gold-ink) !important;
}

html[data-theme="light"] .bv-badge--red {
  background: rgba(185, 28, 28, 0.10) !important;
  border: 1px solid rgba(185, 28, 28, 0.35) !important;
  color: var(--bvl-red-ink) !important;
}

/* #92400e rather than --bvl-amber-ink: amber-ink measured 4.1:1 at badge
   size on its own tint ("Simulated" on System Settings). */
html[data-theme="light"] .bv-badge--amber {
  background: rgba(180, 83, 9, 0.10) !important;
  border: 1px solid rgba(180, 83, 9, 0.35) !important;
  color: #92400e !important;
}

/* ink-2, not ink-muted: Concluded is a status someone reads, and ink-muted
   is under 4.5:1 at badge size. */
html[data-theme="light"] .bv-badge--outline {
  border: 1px solid rgba(15, 23, 42, 0.18) !important;
  color: var(--bvl-ink-2) !important;
}

html[data-theme="light"] .bv-alert--green {
  background: rgba(21, 128, 61, 0.08) !important;
  border: 1px solid rgba(21, 128, 61, 0.30) !important;
  color: var(--bvl-green-ink) !important;
}
html[data-theme="light"] .bv-alert--red {
  background: rgba(185, 28, 28, 0.07) !important;
  border: 1px solid rgba(185, 28, 28, 0.28) !important;
  color: var(--bvl-red-ink) !important;
}

html[data-theme="light"] .bv-dot--green { background: var(--bvl-green-ink) !important; }
html[data-theme="light"] .bv-dot--gold  { background: #d99a00 !important; }

html[data-theme="light"] .bv-stat--critical { color: var(--bvl-red-ink)   !important; }
html[data-theme="light"] .bv-stat--warning  { color: var(--bvl-amber-ink) !important; }
html[data-theme="light"] .bv-stat--normal   { color: var(--bvl-ink)       !important; }

/* ── 6. FORMS ───────────────────────────────────────────────────────── */

html[data-theme="light"] input,
html[data-theme="light"] textarea,
html[data-theme="light"] select,
html[data-theme="light"] .bv-input {
  background: var(--bvl-surface) !important;
  border: 1px solid var(--bvl-line) !important;
  color: var(--bvl-ink) !important;
  /* The base sheet forces color-scheme:dark here, which is what paints
     native date pickers and select arrows white-on-white in light mode. */
  color-scheme: light !important;
}

/* The rule above sets the `background` shorthand, which also clears the
   chevron the base sheet draws as a background-image -- and that sheet sets
   appearance:none, so a light-mode select had no arrow at all. */
html[data-theme="light"] select,
html[data-theme="light"] select.bv-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='rgba(15,23,42,0.72)' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  background-size: 16px 16px !important;
}

html[data-theme="light"] input:focus,
html[data-theme="light"] textarea:focus,
html[data-theme="light"] select:focus,
html[data-theme="light"] .bv-input:focus {
  border-color: var(--bvl-blue) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14) !important;
}

html[data-theme="light"] .bv-input::placeholder,
html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder { color: var(--bvl-ink-faint) !important; }

html[data-theme="light"] .bv-label { color: var(--bvl-ink-muted) !important; }
html[data-theme="light"] .bv-field-error { color: var(--bvl-red-ink) !important; }

/* ── 7. TABLES & PAGINATION ─────────────────────────────────────────── */

html[data-theme="light"] .bv-table th {
  color: var(--bvl-ink-faint) !important;
  border-bottom: 1px solid var(--bvl-line) !important;
}
html[data-theme="light"] .bv-table td {
  color: var(--bvl-ink-2) !important;
  border-bottom: 1px solid var(--bvl-line-soft) !important;
}
html[data-theme="light"] .bv-table tr:hover td { background: var(--bvl-surface-sunk) !important; }

/* Mirrors the base sheet's own selector list so every pagination variant
   is covered; the html[data-theme] prefix out-specifies each of them. */
html[data-theme="light"] .pagination .page-item,
html[data-theme="light"] [role="navigation"] nav a,
html[data-theme="light"] [role="navigation"] nav span,
html[data-theme="light"] nav[role="navigation"] a,
html[data-theme="light"] nav[role="navigation"] span,
html[data-theme="light"] .pagination li a,
html[data-theme="light"] .pagination li span {
  background: var(--bvl-surface) !important;
  border: 1px solid var(--bvl-line) !important;
  color: var(--bvl-ink-2) !important;
}

html[data-theme="light"] .pagination .page-item:hover,
html[data-theme="light"] [role="navigation"] nav a:hover {
  background: var(--bvl-surface-2) !important;
  border-color: rgba(15, 23, 42, 0.20) !important;
  color: var(--bvl-ink) !important;
}

/* Kept after the generic pagination rule on purpose: it ties on
   specificity, so source order is what makes the current page win. */
html[data-theme="light"] .pagination .page-item.active,
html[data-theme="light"] [role="navigation"] nav span[aria-current="page"],
html[data-theme="light"] [role="navigation"] nav .bg-blue-600 {
  background: var(--bvl-gold) !important;
  border-color: #d99a00 !important;
  color: #3d2800 !important;
  box-shadow: 0 2px 8px rgba(255, 180, 0, 0.35) !important;
}

html[data-theme="light"] [role="navigation"] div p,
html[data-theme="light"] .bv-table-pagination-meta { color: var(--bvl-ink-muted) !important; }

html[data-theme="light"] [role="navigation"] div p span,
html[data-theme="light"] .bv-table-pagination-meta span { color: var(--bvl-ink) !important; }

/* ── 8. SIDEBAR ─────────────────────────────────────────────────────── */

html[data-theme="light"] .bv-sidebar {
  background: rgba(255, 255, 255, 0.92) !important;
  border-right: 1px solid var(--bvl-line) !important;
}

/* The drawer shadow is set in beevote.css and light mode inherited it, so a
   white panel threw a hard black edge across a pale page. Same shape, tuned
   to the light canvas -- slate rather than pure black, and lighter, because
   there is far less contrast to fight here. Only applies where the drawer
   exists; above 1023px the sidebar is a static column with no shadow. */
@media (max-width: 1023.98px), (pointer: coarse) and (max-width: 1366px) {
  /* DRAWER condition -- see the top of beevote.css. A touch tablet held
     sideways gets the drawer too, and needs the same light-mode edge. */
  html[data-theme="light"] .bv-sidebar {
    box-shadow: 6px 0 20px rgba(15, 23, 42, 0.16) !important;
  }
}

html[data-theme="light"] .bv-sidebar__header,
html[data-theme="light"] .bv-sidebar__user,
html[data-theme="light"] .bv-sidebar__footer { border-color: var(--bvl-line-soft) !important; }

html[data-theme="light"] .bv-sidebar__user { background: var(--bvl-surface-sunk) !important; }
html[data-theme="light"] .bv-sidebar__brand,
html[data-theme="light"] .bv-sidebar__user-name { color: var(--bvl-ink) !important; }
html[data-theme="light"] .bv-sidebar__brand-v { color: var(--bvl-gold-ink) !important; }
/* Labels and items were ink-faint (0.38) and ink-muted (0.52), both under
   4.5:1 on white. Labels stay a step lighter than the items they head. */
html[data-theme="light"] .bv-sidebar__section-label { color: rgba(15, 23, 42, 0.62) !important; }

html[data-theme="light"] .bv-nav-item { color: var(--bvl-ink-2) !important; }
html[data-theme="light"] .bv-nav-item:hover {
  color: var(--bvl-ink) !important;
  background: var(--bvl-surface-sunk) !important;
  border-left-color: var(--bvl-line) !important;
}
html[data-theme="light"] .bv-nav-item--active {
  background: rgba(255, 180, 0, 0.16) !important;
  color: var(--bvl-gold-ink) !important;
  border-left: 3px solid var(--bvl-gold) !important;
}

html[data-theme="light"] .bv-sidebar__logout {
  color: var(--bvl-ink-2) !important;
  background: var(--bvl-surface) !important;
  border-color: var(--bvl-line) !important;
}
html[data-theme="light"] .bv-sidebar__logout:hover,
html[data-theme="light"] .bv-sidebar__logout:focus-visible {
  color: var(--bvl-red-ink) !important;
  background: rgba(185, 28, 28, 0.07) !important;
  border-color: rgba(185, 28, 28, 0.4) !important;
}
html[data-theme="light"] .bv-sidebar__logout:hover .bv-nav-item__icon,
html[data-theme="light"] .bv-sidebar__logout:focus-visible .bv-nav-item__icon { color: var(--bvl-red-ink) !important; }

/* Brand gold is ~1.9:1 on white, under the 3:1 a focus ring needs. */
html[data-theme="light"] .bv-nav-item:focus-visible,
html[data-theme="light"] .bv-sidebar__logout:focus-visible { outline-color: var(--bvl-gold-ink); }

html[data-theme="light"] .bv-sidebar__role-badge--admin   { background: rgba(185,28,28,0.10)  !important; color: var(--bvl-red-ink)  !important; border-color: rgba(185,28,28,0.30)  !important; }
html[data-theme="light"] .bv-sidebar__role-badge--comelec { background: rgba(255,180,0,0.18)  !important; color: var(--bvl-gold-ink) !important; border-color: rgba(138,90,0,0.30)   !important; }
html[data-theme="light"] .bv-sidebar__role-badge--voter   { background: rgba(37,99,235,0.10)  !important; color: var(--bvl-blue-ink) !important; border-color: rgba(37,99,235,0.30)  !important; }
html[data-theme="light"] .bv-sidebar__role-badge--judge   { background: rgba(109,40,217,0.10) !important; color: #6d28d9             !important; border-color: rgba(109,40,217,0.30) !important; }
html[data-theme="light"] .bv-sidebar__role-badge--organizer { background: rgba(5,150,105,0.10) !important; color: #047857 !important; border-color: rgba(5,150,105,0.30) !important; }

html[data-theme="light"] .bv-sidebar__nav { scrollbar-color: rgba(15,23,42,0.18) transparent; }
html[data-theme="light"] .bv-sidebar__nav::-webkit-scrollbar-thumb { background: rgba(15,23,42,0.18); }

html[data-theme="light"] .bv-sidebar-backdrop { background: rgba(15, 23, 42, 0.35) !important; }

/* ── 9. TOPBAR & FOOTER ─────────────────────────────────────────────── */

html[data-theme="light"] .bv-topbar {
  background: rgba(255, 255, 255, 0.82) !important;
  border-bottom: 1px solid var(--bvl-line) !important;
}
html[data-theme="light"] .bv-topbar-title { color: var(--bvl-gold-ink) !important; }
html[data-theme="light"] .bv-topbar__title { color: var(--bvl-ink-2) !important; }

/* Was an inline style on the <footer>; moved to a class in
   layouts/dashboard.blade.php so it could be themed at all. That layout's
   adjustFooter() still drives `left` inline, which is why only colour
   lives here — do not add positioning, the script would overwrite it. */
html[data-theme="light"] .bv-app-footer {
  color: var(--bvl-ink-faint) !important;
  background: rgba(255, 255, 255, 0.85) !important;
  border-top: 1px solid var(--bvl-line-soft) !important;
}

/* ── 10. MODALS, SECTIONS, MISC SURFACES ────────────────────────────── */

html[data-theme="light"] .bv-modal { background: rgba(15, 23, 42, 0.45) !important; }
html[data-theme="light"] .bv-modal__card {
  background: var(--bvl-surface) !important;
  border: 1px solid var(--bvl-line) !important;
  box-shadow: var(--bvl-shadow-lg) !important;
}
html[data-theme="light"] .bv-modal__title { color: var(--bvl-ink) !important; }
html[data-theme="light"] .bv-modal__close {
  background: var(--bvl-surface-sunk) !important;
  border: 1px solid var(--bvl-line) !important;
  color: var(--bvl-ink-2) !important;
}
html[data-theme="light"] .bv-modal__close:hover { background: rgba(15, 23, 42, 0.10) !important; }

html[data-theme="light"] .bv-section__heading,
html[data-theme="light"] .bv-section-heading {
  color: var(--bvl-ink-muted) !important;
  border-bottom: 1px solid var(--bvl-line-soft) !important;
}
html[data-theme="light"] .bv-section-label { color: var(--bvl-ink-faint) !important; }
html[data-theme="light"] .bv-divider { border-top: 1px solid var(--bvl-line) !important; }

html[data-theme="light"] .bv-hash { color: var(--bvl-ink-muted) !important; }

html[data-theme="light"] .bv-empty-state {
  background: var(--bvl-surface-sunk) !important;
  border: 1px dashed var(--bvl-line) !important;
}
html[data-theme="light"] .bv-empty-state p { color: var(--bvl-ink-muted) !important; }

/* Counterparts to the __icon and __title rules added in beevote.css. Without
   these the icon and heading keep their dark-theme rgba(255,255,255,...)
   values and go invisible on a light canvas. */
html[data-theme="light"] .bv-empty-state__icon {
  color: var(--bvl-ink-faint) !important;
  background: var(--bvl-surface) !important;
  border: 1px solid var(--bvl-line) !important;
}
html[data-theme="light"] .bv-empty-state__title { color: var(--bvl-ink) !important; }

html[data-theme="light"] .bv-public-anchors {
  background: var(--bvl-surface) !important;
  border: 1px solid var(--bvl-line) !important;
}
html[data-theme="light"] .bv-public-anchors__dot  { background: #d99a00 !important; }
html[data-theme="light"] .bv-public-anchors__text { color: var(--bvl-ink-muted) !important; }

html[data-theme="light"] .bv-verified-banner {
  background: var(--bvl-surface) !important;
  border: 1px solid var(--bvl-line) !important;
}
html[data-theme="light"] .bv-verified-banner > i { color: var(--bvl-gold-ink) !important; }
html[data-theme="light"] .bv-verified-banner__label { color: var(--bvl-ink-2) !important; }

html[data-theme="light"] .bv-candidate-card { border: 1px solid var(--bvl-line) !important; }

html[data-theme="light"] .bv-login-title { color: var(--bvl-ink) !important; }
html[data-theme="light"] .bv-login-subtitle,
html[data-theme="light"] .bv-login-divider-text,
html[data-theme="light"] .bv-login-footer { color: var(--bvl-ink-muted) !important; }
html[data-theme="light"] .bv-login-divider-line { background: var(--bvl-line) !important; }

/* ── 11. THE THEME TOGGLE ITSELF ────────────────────────────────────── */

/* Sized like the hamburger next to it. An explicit box is mandatory:
   .bv-btn is width:100%, so without this the button claims the whole
   topbar flex row and starves its siblings. */
.bv-theme-toggle {
  width: 40px;
  height: 40px;
  padding: 0;
  flex-shrink: 0;
  border-radius: 10px;
}

/* Only one of the two glyphs is ever shown. Both ship in the markup so
   the swap is a class change with no reflow and no icon-font refetch.
   fa-moon and fa-sun are both in the Font Awesome 6.4 FREE set — verified
   against the cdnjs all.min.css the layouts load. Do not substitute a Pro
   name here; it fails silently as blank space. */
.bv-theme-toggle__icon { font-size: 15px; line-height: 1; }
.bv-theme-toggle__icon--light { display: none; }
html[data-theme="light"] .bv-theme-toggle__icon--dark  { display: none; }
html[data-theme="light"] .bv-theme-toggle__icon--light { display: inline-block; }

html[data-theme="light"] .bv-theme-toggle { color: var(--bvl-amber-ink) !important; }

.bv-theme-toggle:focus-visible {
  outline: 2px solid #FFB400;
  outline-offset: 2px;
}

/* ── 12. INLINE-STYLE SAFETY NET ────────────────────────────────────── */
/* The views carry 182 inline colour declarations that predate this sheet
   and that no class selector can reach. An author !important outranks a
   non-important inline style, so these substring matchers rescue the
   combinations that would otherwise be unreadable — white text on a white
   card, a near-black panel floating on a light page.

   This is triage, not the fix. The real repair is migrating those
   attributes to bv-* classes, view by view; until then a page can still
   look flat in light mode, but it will never be invisible.

   Matching is on the raw attribute text, so every spacing variant that
   actually occurs in the views needs its own selector. Re-run
     grep -rohE 'style="[^"]*"' resources/views --include=*.blade.php \
       | grep -oiE '(color|background)\s*:\s*[^;"]+' | sort | uniq -c
   before adding to this list, rather than guessing at the formatting. */

html[data-theme="light"] [style*="color: white"],
html[data-theme="light"] [style*="color:white"],
html[data-theme="light"] [style*="color: #fff"],
html[data-theme="light"] [style*="color:#fff"],
html[data-theme="light"] [style*="color: rgba(255,255,255"],
html[data-theme="light"] [style*="color:rgba(255,255,255"],
html[data-theme="light"] [style*="color: rgba(255, 255, 255"],
html[data-theme="light"] [style*="color:rgba(255, 255, 255"] {
  color: var(--bvl-ink-2) !important;
}

/* Dark panels drawn with a black wash read as a hole punched in the page. */
html[data-theme="light"] [style*="background: rgba(0,0,0"],
html[data-theme="light"] [style*="background:rgba(0,0,0"],
html[data-theme="light"] [style*="background: rgba(0, 0, 0"],
html[data-theme="light"] [style*="background:rgba(0, 0, 0"],
html[data-theme="light"] [style*="background: rgba(15, 23, 42"],
html[data-theme="light"] [style*="background:rgba(15,23,42"] {
  background: var(--bvl-surface-sunk) !important;
}

/* Brand gold and the status colours as inline text: all below 3:1 on
   white. Remapped to their ink variants. */
html[data-theme="light"] [style*="color: #FFB400"],
html[data-theme="light"] [style*="color:#FFB400"],
html[data-theme="light"] [style*="color: #ffb400"],
html[data-theme="light"] [style*="color:#ffb400"] { color: var(--bvl-gold-ink) !important; }

html[data-theme="light"] [style*="color: #22c55e"],
html[data-theme="light"] [style*="color:#22c55e"],
html[data-theme="light"] [style*="color: #10b981"],
html[data-theme="light"] [style*="color:#10b981"] { color: var(--bvl-green-ink) !important; }

html[data-theme="light"] [style*="color: #3b82f6"],
html[data-theme="light"] [style*="color:#3b82f6"],
html[data-theme="light"] [style*="color: #818cf8"],
html[data-theme="light"] [style*="color:#818cf8"] { color: var(--bvl-blue-ink) !important; }

html[data-theme="light"] [style*="color: #ef4444"],
html[data-theme="light"] [style*="color:#ef4444"],
html[data-theme="light"] [style*="color: #ff6b6b"],
html[data-theme="light"] [style*="color:#ff6b6b"] { color: var(--bvl-red-ink) !important; }

html[data-theme="light"] [style*="color: #eab308"],
html[data-theme="light"] [style*="color:#eab308"],
html[data-theme="light"] [style*="color: #fbbf24"],
html[data-theme="light"] [style*="color:#fbbf24"] { color: var(--bvl-amber-ink) !important; }

html[data-theme="light"] [style*="color: #94a3b8"],
html[data-theme="light"] [style*="color:#94a3b8"] { color: var(--bvl-ink-muted) !important; }

/* ── 13. DERIVED OVERRIDES — the rest of beevote.css ────────────────────
   Sections 1-11 were hand-written against beevote.css as it stood at
   ~5,470 lines. The sheet has since grown past 6,390 lines: the ballot
   cards, results tables, event log, audit log, status rows, identity
   rows, pageant node builder, modal panels and pagers all arrived later
   and had NO light-mode rules at all, which is why parts of the UI stayed
   white-on-white after the toggle shipped.

   Rather than hand-write ~255 more blocks, these were derived from the
   dark sheets by rule. The mapping, so you can predict and extend it:

     color   on rgba(255,255,255,a)  -> an ink token chosen by alpha band
                                        (>=.85 ink, >=.60 ink-2, >=.40
                                        ink-muted, >=.25 ink-faint, else
                                        rgba(15,23,42,.28))
     color   on an accent (#FFB400, #4ade80, #fca5a5, #a5b4fc, ...)
                                     -> that hue's *-ink variant, since all
                                        of them fall under 3:1 on white
     background on translucent white -> surface-sunk (a<=.06) or
                                        rgba(15,23,42,.06)
     border*    on translucent white -> line (a>=.08) or line-soft

   Deliberately NOT remapped: gold, red and green FILLS and BORDERS. Those
   read correctly on a light ground, and repainting them would flatten the
   selected-ballot and active-state affordances that depend on them.

   Each declaration carries its original value in a trailing comment, so a
   wrong call is visible without diffing against beevote.css.

   Two traps this section had to dodge, both worth keeping in mind if you
   regenerate it:

   1. @media print is EXCLUDED (47 rules). The print stylesheet is already
      black-on-white; theming it would break every printed ballot, receipt
      and result sheet.
   2. The universal border rule below uses :where() so it keeps the ZERO
      specificity of the '*' rule it replaces, and takes no !important.
      Written as a plain descendant selector it would out-specify .bv-card
      and repaint every coloured border in the application.

   TO REGENERATE after beevote.css changes: re-derive from the two dark
   sheets, skipping any selector this file already handles in sections
   1-12, and append. The alternative — hand-auditing 6,400 lines for
   white-on-white — is how the gap appeared in the first place.
   ─────────────────────────────────────────────────────────────────────── */

html[data-theme="light"] .bv-avatar {
  color: var(--bvl-gold-ink) !important;   /* was rgba(255, 180, 0, 0.6) */
}

html[data-theme="light"] .bv-profile-avatar-placeholder {
  color: var(--bvl-gold-ink) !important;   /* was #FFB400 */
}

html[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.06) !important;   /* was rgba(255, 255, 255, 0.1) */
}

html[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 23, 42, 0.06) !important;   /* was rgba(255, 255, 255, 0.2) */
}

html[data-theme="light"] select.bv-input,
html[data-theme="light"] select.form-control {
  border: 1px solid var(--bvl-line) !important;   /* was 1px solid rgba(255, 255, 255, 0.08) !important */
  color: var(--bvl-ink) !important;   /* was white !important */
}

html[data-theme="light"] select option {
  color: var(--bvl-ink) !important;   /* was white !important */
}

html[data-theme="light"] select option:hover,
html[data-theme="light"] select option:checked {
  color: var(--bvl-ink) !important;   /* was white !important */
}

@media (max-width: 1023.98px) {
  html[data-theme="light"] .bv-table-container {
    background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.02) */
  }
}

html[data-theme="light"] nav[role="navigation"] a:hover {
  background: rgba(15, 23, 42, 0.06) !important;   /* was rgba(255, 255, 255, 0.1) !important */
  color: var(--bvl-ink) !important;   /* was white !important */
}

html[data-theme="light"] .bv-btn--secondary:hover:not(:disabled) {
  background: rgba(15, 23, 42, 0.06) !important;   /* was rgba(255, 255, 255, 0.1) !important */
  border-color: var(--bvl-line) !important;   /* was rgba(255, 255, 255, 0.2) !important */
  color: var(--bvl-ink) !important;   /* was white !important */
}

html[data-theme="light"] .bv-avatar-upload__initials {
  color: var(--bvl-gold-ink) !important;   /* was #FFB400 */
}

html[data-theme="light"] .bv-avatar-upload__overlay {
  color: var(--bvl-gold-ink) !important;   /* was #FFB400 */
}

html[data-theme="light"] .bv-id-row {
  border-bottom: 1px solid var(--bvl-line-soft) !important;   /* was 1px solid rgba(255, 255, 255, 0.05) */
}

html[data-theme="light"] .bv-id-row__icon {
  color: var(--bvl-gold-ink) !important;   /* was #FFB400 */
}

html[data-theme="light"] .bv-id-row__label {
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.35) */
}

html[data-theme="light"] .bv-id-row__value {
  color: var(--bvl-ink) !important;   /* was #ffffff */
}

html[data-theme="light"] .bv-id-status {
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.03) */
}

html[data-theme="light"] .bv-id-status > i {
  color: var(--bvl-gold-ink) !important;   /* was #FFB400 */
}

html[data-theme="light"] .bv-id-status__label {
  color: var(--bvl-gold-ink) !important;   /* was #FFB400 */
}

html[data-theme="light"] .bv-id-status__value {
  color: var(--bvl-ink) !important;   /* was #ffffff */
}

:where(html[data-theme="light"]) *,
:where(html[data-theme="light"]) ::before,
:where(html[data-theme="light"]) ::after {
  border-color: var(--bvl-line);   /* was rgba(255, 255, 255, 0.08) */
}

html[data-theme="light"] .border-white\/5 {
  border-color: var(--bvl-line-soft) !important;   /* was rgba(255, 255, 255, 0.05) !important */
}

html[data-theme="light"] .border-white\/10 {
  border-color: var(--bvl-line) !important;   /* was rgba(255, 255, 255, 0.10) !important */
}

html[data-theme="light"] .border-white\/20 {
  border-color: var(--bvl-line) !important;   /* was rgba(255, 255, 255, 0.20) !important */
}

html[data-theme="light"] .border-gray-100,
html[data-theme="light"] .border-gray-200,
html[data-theme="light"] .border-gray-300 {
  border-color: var(--bvl-line) !important;   /* was rgba(255, 255, 255, 0.12) !important */
}

html[data-theme="light"] .border-gray-700,
html[data-theme="light"] .border-gray-800 {
  border-color: var(--bvl-line) !important;   /* was rgba(255, 255, 255, 0.09) !important */
}

html[data-theme="light"] .bv-ballot-photo {
  border: 1px solid var(--bvl-line) !important;   /* was 1px solid rgba(255, 255, 255, 0.08) */
}

html[data-theme="light"] .bv-ballot-photo__initials {
  color: var(--bvl-ink-2) !important;   /* was rgba(255, 255, 255, 0.72) */
}

html[data-theme="light"] .bv-ballot-name {
  color: var(--bvl-ink) !important;   /* was #ffffff */
}

html[data-theme="light"] .bv-ballot-party {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.42) */
}

html[data-theme="light"] .bv-ballot-check {
  border: 2px solid var(--bvl-line) !important;   /* was 2px solid rgba(255, 255, 255, 0.45) */
}

html[data-theme="light"] .bv-section__heading.bv-ballot-headline h2 {
  color: var(--bvl-ink-2) !important;   /* was rgba(255, 255, 255, 0.72) */
}

html[data-theme="light"] .bv-results-heading {
  border-bottom: 1px solid var(--bvl-line-soft) !important;   /* was 1px solid rgba(255, 255, 255, 0.06) */
}

html[data-theme="light"] .bv-results-heading__title {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.55) */
}

html[data-theme="light"] .bv-results-heading__total {
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.3) */
}

html[data-theme="light"] .bv-results-heading__total strong {
  color: var(--bvl-gold-ink) !important;   /* was #FFB400 */
}

html[data-theme="light"] .bv-results-college__label {
  color: #4338ca !important;   /* was #94a3b8 */
}

html[data-theme="light"] .bv-results-footer {
  border-top: 1px solid var(--bvl-line-soft) !important;   /* was 1px solid rgba(255, 255, 255, 0.05) */
}

html[data-theme="light"] .bv-results-empty p {
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.35) */
}

html[data-theme="light"] .bv-card__share {
  color: var(--bvl-ink-2) !important;   /* was rgba(255, 255, 255, 0.75) */
}

html[data-theme="light"] .bv-results-college__total {
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.3) */
}

html[data-theme="light"] .bv-results-college__total strong {
  color: var(--bvl-gold-ink) !important;   /* was #FFB400 */
}

html[data-theme="light"] .bv-result-avatar--text {
  color: var(--bvl-gold-ink) !important;   /* was rgba(255, 180, 0, 0.7) */
}

html[data-theme="light"] .bv-badge--yellow {
  color: var(--bvl-gold-ink) !important;   /* was #fbbf24 !important */
}

html[data-theme="light"] .bv-field-label {
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.32) */
}

html[data-theme="light"] .bv-note {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.4) */
}

html[data-theme="light"] .bv-note i {
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.25) */
}

html[data-theme="light"] .bv-identity__name {
  color: var(--bvl-ink) !important;   /* was #ffffff */
}

html[data-theme="light"] .bv-identity__email {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.42) */
}

html[data-theme="light"] .bv-detail-row {
  border-bottom: 1px solid var(--bvl-line-soft) !important;   /* was 1px solid rgba(255, 255, 255, 0.05) */
}

html[data-theme="light"] .bv-detail-row__label {
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.3) */
}

html[data-theme="light"] .bv-detail-row__value {
  color: var(--bvl-ink) !important;   /* was rgba(255, 255, 255, 0.92) */
}

html[data-theme="light"] .bv-event {
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.035) */
  border: 1px solid var(--bvl-line-soft) !important;   /* was 1px solid rgba(255, 255, 255, 0.05) */
}

html[data-theme="light"] .bv-event__action {
  color: var(--bvl-ink) !important;   /* was rgba(255, 255, 255, 0.9) */
}

html[data-theme="light"] .bv-event__time {
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.3) */
}

html[data-theme="light"] .bv-event__detail {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.5) */
}

html[data-theme="light"] .bv-event-empty {
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.28) */
}

html[data-theme="light"] .bv-event-empty i {
  color: rgba(15, 23, 42, 0.62) !important;   /* was rgba(255, 255, 255, 0.15) */
}

html[data-theme="light"] .bv-callout__text {
  color: #4338ca !important;   /* was rgba(147, 197, 253, 0.85) */
}

html[data-theme="light"] .bv-card-heading {
  color: var(--bvl-ink) !important;   /* was #ffffff */
}

html[data-theme="light"] .bv-hash-block {
  border: 1px solid var(--bvl-line-soft) !important;   /* was 1px solid rgba(255, 255, 255, 0.05) */
}

html[data-theme="light"] .bv-hash-block code {
  color: #4338ca !important;   /* was #a5b4fc */
}

html[data-theme="light"] .bv-btn--danger-ghost:hover {
  color: var(--bvl-red-ink) !important;   /* was #fca5a5 !important */
}

/* Warning text that kept its dark-theme #f87171 - about 2.5:1 on the
   light canvas. No light rule named these, so they were never mapped. */
html[data-theme="light"] .bv-btn--danger-ghost,
html[data-theme="light"] .bv-builder__summary--warn,
html[data-theme="light"] .bv-award__tied,
html[data-theme="light"] .bv-review__warn,
html[data-theme="light"] .bv-node__btn--remove:hover {
  color: var(--bvl-red-ink) !important;
}

html[data-theme="light"] .bv-btn--success {
  color: var(--bvl-green-ink) !important;   /* was #4ade80 !important */
}

html[data-theme="light"] .bv-btn--success:hover {
  color: var(--bvl-green-ink) !important;   /* was #86efac !important */
}

html[data-theme="light"] .bv-live__stamp {
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.3) */
}

html[data-theme="light"] .bv-log-scroll {
  border: 1px solid var(--bvl-line-soft) !important;   /* was 1px solid rgba(255, 255, 255, 0.05) */
}

html[data-theme="light"] .bv-log-time span {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.4) */
}

html[data-theme="light"] .bv-log-actor__name {
  color: var(--bvl-ink) !important;   /* was rgba(255, 255, 255, 0.88) */
}

html[data-theme="light"] .bv-log-actor__id {
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.28) */
}

html[data-theme="light"] .bv-log-actor__anon {
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.3) */
}

html[data-theme="light"] .bv-log-details {
  color: var(--bvl-ink-2) !important;   /* was rgba(255, 255, 255, 0.6) */
}

html[data-theme="light"] .bv-status-row {
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.035) */
  border: 1px solid var(--bvl-line-soft) !important;   /* was 1px solid rgba(255, 255, 255, 0.06) */
}

html[data-theme="light"] .bv-status-row__title {
  color: var(--bvl-ink) !important;   /* was rgba(255, 255, 255, 0.92) */
}

html[data-theme="light"] .bv-status-row__desc {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.42) */
}

html[data-theme="light"] .bv-status-row__desc code {
  color: #4338ca !important;   /* was #a5b4fc */
}

html[data-theme="light"] .bv-status-source {
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.3) */
}

html[data-theme="light"] .bv-status-source i {
  color: rgba(15, 23, 42, 0.62) !important;   /* was rgba(255, 255, 255, 0.22) */
}

html[data-theme="light"] .bv-modal-panel__head {
  border-bottom: 1px solid var(--bvl-line-soft) !important;   /* was 1px solid rgba(255, 255, 255, 0.06) */
}

html[data-theme="light"] .bv-modal-panel__title {
  color: var(--bvl-ink) !important;   /* was #ffffff */
}

html[data-theme="light"] .bv-modal-panel__foot {
  border-top: 1px solid var(--bvl-line-soft) !important;   /* was 1px solid rgba(255, 255, 255, 0.06) */
}

html[data-theme="light"] .bv-modal-close {
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.04) */
  border: 1px solid var(--bvl-line) !important;   /* was 1px solid rgba(255, 255, 255, 0.08) */
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.55) */
}

html[data-theme="light"] .bv-modal-close:hover {
  background: rgba(15, 23, 42, 0.06) !important;   /* was rgba(255, 255, 255, 0.08) */
  color: var(--bvl-ink) !important;   /* was #ffffff */
}

html[data-theme="light"] .bv-builder__title {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.55) */
}

html[data-theme="light"] .bv-builder__hint {
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.38) */
}

html[data-theme="light"] .bv-node__row:hover {
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.03) */
}

html[data-theme="light"] .bv-node__row:focus-within {
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.04) */
}

html[data-theme="light"] .bv-node--parent > .bv-node__row {
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.035) */
  border-color: var(--bvl-line-soft) !important;   /* was rgba(255, 255, 255, 0.06) */
}

html[data-theme="light"] .bv-node__grip {
  color: rgba(15, 23, 42, 0.62) !important;   /* was rgba(255, 255, 255, 0.18) */
}

html[data-theme="light"] .bv-node--parent > .bv-node__row .bv-node__grip {
  color: var(--bvl-gold-ink) !important;   /* was rgba(255, 180, 0, 0.5) */
}

html[data-theme="light"] .bv-node__unit {
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.25) */
}

html[data-theme="light"] .bv-node__btn {
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.04) */
  border: 1px solid var(--bvl-line) !important;   /* was 1px solid rgba(255, 255, 255, 0.08) */
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.5) */
}

html[data-theme="light"] .bv-node__btn:hover {
  background: rgba(15, 23, 42, 0.06) !important;   /* was rgba(255, 255, 255, 0.09) */
  color: var(--bvl-ink) !important;   /* was #ffffff */
}

html[data-theme="light"] .bv-node__btn--add:hover {
  color: var(--bvl-gold-ink) !important;   /* was #FFB400 */
}

html[data-theme="light"] .bv-node__tally {
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.05) */
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.35) */
}

html[data-theme="light"] .bv-node__tally--ok {
  color: var(--bvl-green-ink) !important;   /* was #4ade80 */
}

html[data-theme="light"] .bv-builder__summary--ok {
  color: var(--bvl-green-ink) !important;   /* was #4ade80 */
}

html[data-theme="light"] .bv-builder__empty {
  border: 1px dashed var(--bvl-line) !important;   /* was 1px dashed rgba(255, 255, 255, 0.1) */
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.3) */
}

html[data-theme="light"] .bv-node__add {
  color: var(--bvl-gold-ink) !important;   /* was #FFB400 */
}

html[data-theme="light"] .bv-tab-sub {
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.28) */
}

/* ink-faint measured 2.4:1 here; the same strength as the sidebar labels. */
html[data-theme="light"] .bv-pager__meta {
  color: rgba(15, 23, 42, 0.62) !important;   /* was rgba(255, 255, 255, 0.35) */
}

html[data-theme="light"] .bv-pager__meta span {
  color: var(--bvl-ink) !important;   /* was rgba(255, 255, 255, 0.85) */
}

html[data-theme="light"] .bv-pager__link {
  border: 1px solid var(--bvl-line) !important;   /* was 1px solid rgba(255, 255, 255, 0.1) */
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.05) */
  color: var(--bvl-ink-2) !important;   /* was rgba(255, 255, 255, 0.65) */
}

html[data-theme="light"] a.bv-pager__link:hover {
  background: rgba(15, 23, 42, 0.06) !important;   /* was rgba(255, 255, 255, 0.1) */
  border-color: var(--bvl-line) !important;   /* was rgba(255, 255, 255, 0.2) */
  color: var(--bvl-ink) !important;   /* was #ffffff */
}

html[data-theme="light"] .bv-pager__gap {
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.3) */
}

html[data-theme="light"] .bv-dropzone__icon {
  color: var(--bvl-gold-ink) !important;   /* was #FFB400 */
}

html[data-theme="light"] .bv-dropzone__title {
  color: var(--bvl-ink) !important;   /* was rgba(255, 255, 255, 0.92) */
}

html[data-theme="light"] .bv-dropzone__link {
  color: var(--bvl-gold-ink) !important;   /* was #FFB400 */
}

html[data-theme="light"] .bv-dropzone__hint {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.42) */
}

html[data-theme="light"] .bv-chip {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.45) */
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.04) */
  border: 1px solid var(--bvl-line) !important;   /* was 1px solid rgba(255, 255, 255, 0.08) */
}

html[data-theme="light"] .bv-filecard__icon {
  color: var(--bvl-green-ink) !important;   /* was #4ade80 */
}

html[data-theme="light"] .bv-filecard__name {
  color: var(--bvl-ink) !important;   /* was rgba(255, 255, 255, 0.92) */
}

html[data-theme="light"] .bv-filecard__meta {
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.35) */
}

html[data-theme="light"] .bv-filecard__remove {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.5) */
  border: 1px solid var(--bvl-line) !important;   /* was 1px solid rgba(255, 255, 255, 0.12) */
}

html[data-theme="light"] .bv-spec {
  border: 1px solid var(--bvl-line-soft) !important;   /* was 1px solid rgba(255, 255, 255, 0.07) */
}

html[data-theme="light"] .bv-spec code {
  color: var(--bvl-gold-ink) !important;   /* was #FFB400 */
}

html[data-theme="light"] .bv-spec__example {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.55) */
}

html[data-theme="light"] .bv-judge-head {
  border-bottom: 1px solid var(--bvl-line-soft) !important;   /* was 1px solid rgba(255, 255, 255, 0.06) */
}

html[data-theme="light"] .bv-judge-back {
  color: var(--bvl-ink-2) !important;   /* was rgba(255, 255, 255, 0.6) */
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.04) */
  border: 1px solid var(--bvl-line) !important;   /* was 1px solid rgba(255, 255, 255, 0.08) */
}

html[data-theme="light"] .bv-judge-back:hover {
  color: var(--bvl-ink) !important;   /* was #fff */
  background: rgba(15, 23, 42, 0.06) !important;   /* was rgba(255, 255, 255, 0.08) */
  border-color: var(--bvl-line) !important;   /* was rgba(255, 255, 255, 0.16) */
}

html[data-theme="light"] .bv-seg {
  border: 1px solid var(--bvl-line-soft) !important;   /* was 1px solid rgba(255, 255, 255, 0.06) */
}

html[data-theme="light"] .bv-seg__item {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.45) */
}

html[data-theme="light"] .bv-seg__item:hover {
  color: var(--bvl-ink) !important;   /* was #fff */
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.06) */
}

html[data-theme="light"] .bv-judge-context {
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.035) */
  border: 1px solid var(--bvl-line-soft) !important;   /* was 1px solid rgba(255, 255, 255, 0.07) */
}

html[data-theme="light"] .bv-judge-context__eyebrow {
  color: var(--bvl-gold-ink) !important;   /* was rgba(255, 180, 0, 0.6) */
}

html[data-theme="light"] .bv-judge-context__title {
  color: var(--bvl-ink) !important;   /* was #fff */
}

html[data-theme="light"] .bv-judge-context__value {
  color: var(--bvl-gold-ink) !important;   /* was #FFB400 */
}

html[data-theme="light"] .bv-score-head {
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.02) */
  border-bottom: 1px solid var(--bvl-line-soft) !important;   /* was 1px solid rgba(255, 255, 255, 0.06) */
}

html[data-theme="light"] .bv-score-num {
  color: var(--bvl-gold-ink) !important;   /* was #FFB400 */
}

html[data-theme="light"] .bv-score-avatar {
  color: var(--bvl-gold-ink) !important;   /* was #FFB400 */
}

html[data-theme="light"] .bv-score-name {
  color: var(--bvl-ink) !important;   /* was #fff */
}

html[data-theme="light"] .bv-score-meta {
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.35) */
}

html[data-theme="light"] .bv-score-meta__role {
  color: var(--bvl-gold-ink) !important;   /* was #FFB400 */
}

html[data-theme="light"] .bv-score-meta__dot {
  background: rgba(15, 23, 42, 0.06) !important;   /* was rgba(255, 255, 255, 0.2) */
}

html[data-theme="light"] .bv-score-item {
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.035) */
  border: 1px solid var(--bvl-line-soft) !important;   /* was 1px solid rgba(255, 255, 255, 0.06) */
}

html[data-theme="light"] .bv-score-item__name {
  color: var(--bvl-ink) !important;   /* was rgba(255, 255, 255, 0.94) */
}

html[data-theme="light"] .bv-score-item__share {
  color: var(--bvl-gold-ink) !important;   /* was #FFB400 */
}

html[data-theme="light"] .bv-score-input {
  border: 1px solid var(--bvl-line) !important;   /* was 1px solid rgba(255, 255, 255, 0.1) !important */
  color: var(--bvl-ink) !important;   /* was #fff !important */
}

html[data-theme="light"] .bv-score-input.is-locked {
  color: var(--bvl-green-ink) !important;   /* was #4ade80 !important */
}

html[data-theme="light"] .bv-score-item__max {
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.3) */
}

html[data-theme="light"] .bv-score-item__weighted {
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.3) */
}

html[data-theme="light"] .bv-score-item__weighted span {
  color: var(--bvl-ink-2) !important;   /* was rgba(255, 255, 255, 0.75) */
}

html[data-theme="light"] .bv-score-total {
  background: linear-gradient(135deg, rgba(255, 180, 0, 0.09) 0%, rgba(255, 180, 0, 0.02) 60%),
    var(--bvl-surface-sunk) !important;   /* was linear-gradient(135deg, rgba(255, 180, 0, 0.09) 0%, rgba(255, 180, 0, 0.02) 60%),
    rgba(255, 255, 255, 0.02) */
}

html[data-theme="light"] .bv-score-total__label {
  color: var(--bvl-gold-ink) !important;   /* was rgba(255, 180, 0, 0.75) */
}

html[data-theme="light"] .bv-score-total__value {
  color: var(--bvl-gold-ink) !important;   /* was #FFB400 */
}

html[data-theme="light"] .bv-score-total__max {
  color: var(--bvl-gold-ink) !important;   /* was rgba(255, 180, 0, 0.45) */
}

html[data-theme="light"] .bv-score-lock {
  color: var(--bvl-green-ink) !important;   /* was #4ade80 !important */
}

html[data-theme="light"] .bv-score-locked {
  color: var(--bvl-green-ink) !important;   /* was #4ade80 */
}

html[data-theme="light"] .bv-deck-back {
  color: var(--bvl-ink-2) !important;   /* was rgba(255, 255, 255, 0.6) */
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.04) */
  border: 1px solid var(--bvl-line-soft) !important;   /* was 1px solid rgba(255, 255, 255, 0.07) */
}

html[data-theme="light"] .bv-deck-back:hover {
  color: var(--bvl-gold-ink) !important;   /* was #FFB400 */
}

html[data-theme="light"] .bv-deck-stage {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.45) */
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.03) */
  border: 1px solid var(--bvl-line-soft) !important;   /* was 1px solid rgba(255, 255, 255, 0.07) */
}

html[data-theme="light"] .bv-deck-stage:hover {
  color: var(--bvl-ink-2) !important;   /* was rgba(255, 255, 255, 0.8) */
}

html[data-theme="light"] .bv-deck-stage.is-done {
  color: var(--bvl-green-ink) !important;   /* was #4ade80 */
}

html[data-theme="light"] .bv-deck-progress {
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.025) */
  border: 1px solid var(--bvl-line-soft) !important;   /* was 1px solid rgba(255, 255, 255, 0.06) */
}

html[data-theme="light"] .bv-deck-progress__stage {
  color: var(--bvl-ink) !important;   /* was #fff */
}

html[data-theme="light"] .bv-deck-progress__share {
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.35) */
}

html[data-theme="light"] .bv-deck-progress__count {
  color: var(--bvl-gold-ink) !important;   /* was #FFB400 */
}

html[data-theme="light"] .bv-deck-dot {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.4) */
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.03) !important */
  border: 1px solid var(--bvl-line) !important;   /* was 1px solid rgba(255, 255, 255, 0.08) !important */
}

html[data-theme="light"] .bv-deck-dot.is-done {
  color: var(--bvl-green-ink) !important;   /* was #4ade80 */
}

html[data-theme="light"] .bv-deck-dot--review {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.55) */
}

/* A contestant out of everything on stage. Left dashed, as in the dark theme:
   the shape carries the meaning and only the colours change here. */
html[data-theme="light"] .bv-deck-dot.is-locked {
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.25) */
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.015) !important */
}

/* The line a peek card carries. */
html[data-theme="light"] .bv-stage__track .bv-card.is-near-left .bv-card__state,
html[data-theme="light"] .bv-stage__track .bv-card.is-near-right .bv-card__state {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.5) */
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.05) */
  border-color: var(--bvl-line) !important;   /* was rgba(255, 255, 255, 0.08) */
}

html[data-theme="light"] .bv-stage__track .bv-card.is-done .bv-card__state {
  color: var(--bvl-green-ink) !important;   /* was #4ade80 */
}

html[data-theme="light"] .bv-stage__track .bv-card__save                     { color: var(--bvl-ink-muted) !important; }
html[data-theme="light"] .bv-stage__track .bv-card__save[data-state="saved"]  { color: var(--bvl-green-ink) !important; }
html[data-theme="light"] .bv-stage__track .bv-card__save[data-state="failed"] { color: var(--bvl-red-ink) !important; }

html[data-theme="light"] .bv-deck-sealed {
  color: var(--bvl-green-ink) !important;   /* was #4ade80 */
}

html[data-theme="light"] .bv-deck-panel {
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.025) */
  border: 1px solid var(--bvl-line-soft) !important;   /* was 1px solid rgba(255, 255, 255, 0.06) */
}

html[data-theme="light"] .bv-deck-photo--none {
  color: var(--bvl-gold-ink) !important;   /* was #FFB400 */
}

html[data-theme="light"] .bv-deck-number {
  color: var(--bvl-gold-ink) !important;   /* was #FFB400 */
}

html[data-theme="light"] .bv-deck-name {
  color: var(--bvl-ink) !important;   /* was #fff */
}

html[data-theme="light"] .bv-deck-meta {
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.35) */
}

html[data-theme="light"] .bv-deck-meta__dot {
  background: rgba(15, 23, 42, 0.06) !important;   /* was rgba(255, 255, 255, 0.2) */
}

html[data-theme="light"] .bv-deck-group {
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.35) */
}

html[data-theme="light"] .bv-deck-field {
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.03) */
  border: 1px solid var(--bvl-line-soft) !important;   /* was 1px solid rgba(255, 255, 255, 0.07) */
}

html[data-theme="light"] .bv-deck-field__name {
  color: var(--bvl-ink) !important;   /* was #fff */
}

html[data-theme="light"] .bv-deck-field__share {
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.3) */
}

html[data-theme="light"] .bv-deck-input {
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.05) !important */
  border: 1px solid var(--bvl-line) !important;   /* was 1px solid rgba(255, 255, 255, 0.1) !important */
}

html[data-theme="light"] .bv-deck-input[readonly] {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.55) !important */
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.02) !important */
}

html[data-theme="light"] .bv-deck-field__max {
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.3) */
}

html[data-theme="light"] .bv-deck-total__label {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.4) */
}

html[data-theme="light"] .bv-deck-total__value {
  color: var(--bvl-gold-ink) !important;   /* was #FFB400 */
}

html[data-theme="light"] .bv-deck-total__max {
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.3) */
}

html[data-theme="light"] .bv-deck-review-title {
  color: var(--bvl-ink) !important;   /* was #fff */
}

html[data-theme="light"] .bv-deck-review-sub {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.45) */
}

html[data-theme="light"] .bv-deck-review-row {
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.03) */
  border: 1px solid var(--bvl-line-soft) !important;   /* was 1px solid rgba(255, 255, 255, 0.07) */
}

html[data-theme="light"] .bv-deck-review-row:hover {
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.05) */
}

html[data-theme="light"] .bv-deck-review-row__num {
  color: var(--bvl-gold-ink) !important;   /* was #FFB400 */
}

html[data-theme="light"] .bv-deck-review-row__name {
  color: var(--bvl-ink) !important;   /* was #fff */
}

html[data-theme="light"] .bv-deck-review-row__score {
  color: var(--bvl-ink) !important;   /* was #fff */
}

html[data-theme="light"] .bv-deck-review-row__go {
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.25) */
}

html[data-theme="light"] .bv-deck-skipped {
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.02) */
  border: 1px dashed var(--bvl-line) !important;   /* was 1px dashed rgba(255, 255, 255, 0.1) */
}

html[data-theme="light"] .bv-deck-skipped__head {
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.35) */
}

html[data-theme="light"] .bv-deck-skipped__num {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.4) */
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.03) */
  border: 1px solid var(--bvl-line) !important;   /* was 1px solid rgba(255, 255, 255, 0.08) */
}

html[data-theme="light"] .bv-deck-skipped__name {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.55) */
}

html[data-theme="light"] .bv-deck-skipped__note {
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.35) */
}

html[data-theme="light"] .bv-deck-empty {
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.3) */
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.02) */
  border: 1px dashed var(--bvl-line) !important;   /* was 1px dashed rgba(255, 255, 255, 0.08) */
}

html[data-theme="light"] .bv-deck-final {
  color: var(--bvl-green-ink) !important;   /* was #4ade80 */
}

html[data-theme="light"] .bv-deck-submit.is-armed {
  color: var(--bvl-ink) !important;   /* was #fff !important */
}

html[data-theme="light"] .bv-deck-next:disabled {
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.3) !important */
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.04) !important */
  border-color: var(--bvl-line) !important;   /* was rgba(255, 255, 255, 0.08) !important */
}

html[data-theme="light"] .bv-judge-card__icon {
  color: var(--bvl-gold-ink) !important;   /* was #FFB400 */
}

html[data-theme="light"] .bv-judge-card__title {
  color: var(--bvl-ink) !important;   /* was #fff */
}

html[data-theme="light"] .bv-judge-card__desc {
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.35) */
}

html[data-theme="light"] .bv-judge-card__fact {
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.03) */
  border: 1px solid var(--bvl-line-soft) !important;   /* was 1px solid rgba(255, 255, 255, 0.06) */
}

html[data-theme="light"] .bv-judge-card__fact span {
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.3) */
}

html[data-theme="light"] .bv-judge-card__fact strong {
  color: var(--bvl-ink) !important;   /* was #fff */
}

html[data-theme="light"] .bv-judge-card__stage {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.4) */
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.03) */
  border: 1px solid var(--bvl-line-soft) !important;   /* was 1px solid rgba(255, 255, 255, 0.07) */
}

html[data-theme="light"] .bv-judge-card__stage.is-done {
  color: var(--bvl-green-ink) !important;   /* was #4ade80 */
}

html[data-theme="light"] .bv-judge-empty {
  border: 1px dashed var(--bvl-line) !important;   /* was 1px dashed rgba(255, 255, 255, 0.08) !important */
}

html[data-theme="light"] .bv-judge-empty .bv-card__body {
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.25) */
}

html[data-theme="light"] .bv-roster__intro {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.45) */
}

html[data-theme="light"] .bv-roster__intro strong {
  color: var(--bvl-gold-ink) !important;   /* was #FFB400 */
}

html[data-theme="light"] .bv-roster__tab {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.45) */
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.03) !important */
  border: 1px solid var(--bvl-line-soft) !important;   /* was 1px solid rgba(255, 255, 255, 0.07) !important */
}

html[data-theme="light"] .bv-roster__state {
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.02) */
  border: 1px solid var(--bvl-line-soft) !important;   /* was 1px solid rgba(255, 255, 255, 0.05) */
}

html[data-theme="light"] .bv-roster__state-note {
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.35) */
}

html[data-theme="light"] .bv-roster__row {
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.025) */
  border: 1px solid var(--bvl-line-soft) !important;   /* was 1px solid rgba(255, 255, 255, 0.06) */
}

html[data-theme="light"] .bv-roster__row.is-out {
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.012) */
}

html[data-theme="light"] .bv-roster__num {
  color: var(--bvl-gold-ink) !important;   /* was #FFB400 */
}

html[data-theme="light"] .bv-roster__row.is-out .bv-roster__num {
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.3) */
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.03) */
  border-color: var(--bvl-line-soft) !important;   /* was rgba(255, 255, 255, 0.07) */
}

html[data-theme="light"] .bv-roster__name {
  color: var(--bvl-ink) !important;   /* was #fff */
}

html[data-theme="light"] .bv-roster__row.is-out .bv-roster__name {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.4) */
}

html[data-theme="light"] .bv-roster__note {
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.3) */
}

html[data-theme="light"] .bv-roster__btn {
  color: var(--bvl-ink-2) !important;   /* was rgba(255, 255, 255, 0.6) */
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.04) !important */
  border: 1px solid var(--bvl-line) !important;   /* was 1px solid rgba(255, 255, 255, 0.09) !important */
}

html[data-theme="light"] .bv-roster__btn:hover {
  color: var(--bvl-ink) !important;   /* was #fff */
  border-color: var(--bvl-line) !important;   /* was rgba(255, 255, 255, 0.2) !important */
}

html[data-theme="light"] .bv-roster__btn.is-armed {
  color: var(--bvl-ink) !important;   /* was #fff !important */
}

html[data-theme="light"] .bv-deck-review-head {
  border-bottom: 1px solid var(--bvl-line-soft) !important;   /* was 1px solid rgba(255, 255, 255, 0.06) */
}

html[data-theme="light"] .bv-ballot-input:checked + .bv-ballot-card .bv-ballot-name {
  color: var(--bvl-gold-ink) !important;   /* was #FFB400 */
}

html[data-theme="light"] .bv-ballot-pool {
  color: var(--bvl-ink) !important;   /* was #fff */
}

html[data-theme="light"] .bv-ballot-session {
  color: var(--bvl-green-ink) !important;   /* was #4ade80 */
}

/* Ballot contrast pass (2026-09-15): ink-muted and ink-faint measured under
   4.5:1 on this page, so the count, the empty review, the warning and the
   disabled button's instruction all move to ink-2. */
html[data-theme="light"] .bv-ballot-count {
  color: var(--bvl-ink-2) !important;   /* was rgba(255, 255, 255, 0.45) */
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.04) */
  border: 1px solid var(--bvl-line) !important;   /* was 1px solid rgba(255, 255, 255, 0.08) */
}

html[data-theme="light"] .bv-ballot-count.is-done {
  color: #166534 !important;   /* was #4ade80 */
}

html[data-theme="light"] .bv-section__heading.bv-ballot-headline h2.bv-section-title {
  color: var(--bvl-ink) !important;
}

html[data-theme="light"] .bv-ballot-commit {
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.025) */
}

html[data-theme="light"] .bv-ballot-commit__eyebrow {
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.35) */
}

html[data-theme="light"] .bv-ballot-commit__empty {
  color: var(--bvl-ink-2) !important;   /* was rgba(255, 255, 255, 0.3) */
}

html[data-theme="light"] .bv-ballot-commit__pick-pos {
  color: var(--bvl-gold-ink) !important;
}

html[data-theme="light"] .bv-ballot-commit__pick-name {
  color: var(--bvl-ink) !important;   /* was #fff */
}

html[data-theme="light"] .bv-ballot-commit__warn {
  color: var(--bvl-ink-2) !important;   /* was rgba(255, 255, 255, 0.4) */
}

html[data-theme="light"] .bv-ballot-commit__warn i {
  color: var(--bvl-gold-ink) !important;   /* was #FFB400 */
}

/* Profile Settings (2026-09-15): counterparts to the .bv-profile-* and
   .bv-crop* rules in beevote.css. */
html[data-theme="light"] .bv-profile-hero__name,
html[data-theme="light"] .bv-profile-status__title { color: var(--bvl-ink) !important; }

html[data-theme="light"] .bv-profile-hero__email,
html[data-theme="light"] .bv-profile-details__summary,
html[data-theme="light"] .bv-profile-label,
html[data-theme="light"] .bv-profile-status__line,
html[data-theme="light"] .bv-profile-status__meta,
html[data-theme="light"] .bv-profile-hint,
html[data-theme="light"] .bv-crop__hint { color: var(--bvl-ink-2) !important; }

html[data-theme="light"] .bv-profile-divider { border-top-color: var(--bvl-line) !important; }
html[data-theme="light"] .bv-profile-photo__initials { color: var(--bvl-gold-ink) !important; }
html[data-theme="light"] .bv-crop__stage { background: var(--bvl-surface-sunk) !important; }
html[data-theme="light"] .bv-profile-photo input:focus-visible + .bv-profile-photo__change { outline-color: var(--bvl-gold-ink); }

/* Verify Your Ballot (2026-09-16): counterparts to .bv-verify* in beevote.css. */
html[data-theme="light"] .bv-verify__title,
html[data-theme="light"] .bv-verify-result__value { color: var(--bvl-ink) !important; }

html[data-theme="light"] .bv-verify__desc,
html[data-theme="light"] .bv-verify-result__text,
html[data-theme="light"] .bv-verify-result__label { color: var(--bvl-ink-2) !important; }

html[data-theme="light"] .bv-verify-result--found .bv-verify-result__title { color: #166534 !important; }
html[data-theme="light"] .bv-verify-result--missing .bv-verify-result__title { color: var(--bvl-red-ink) !important; }
html[data-theme="light"] .bv-verify-result--unavailable .bv-verify-result__title { color: var(--bvl-gold-ink) !important; }

html[data-theme="light"] .bv-verify-result__grid { background: var(--bvl-surface-sunk) !important; }
html[data-theme="light"] .bv-verify-result__code {
  background: var(--bvl-surface-sunk) !important;
  color: var(--bvl-red-ink) !important;
}

/* COMELEC pass (2026-09-16). The college colours stay on the tile edge;
   as text on white, yellow and silver do not read, so code and figure go
   to ink. */
html[data-theme="light"] .bv-turnout__tile .bv-turnout__code { color: var(--bvl-ink-2) !important; }
html[data-theme="light"] .bv-turnout__tile .bv-turnout__percent { color: var(--bvl-ink) !important; }
html[data-theme="light"] .bv-candidates-pager { border-top-color: var(--bvl-line-soft) !important; }
html[data-theme="light"] .bv-croster__sealed {
  color: var(--bvl-ink-2) !important;
  background: var(--bvl-surface-sunk) !important;
  border-color: var(--bvl-line) !important;
}

/* The light card rule sets the whole border, which painted over the tile's
   coloured leading edge -- the college colours, and the turnout bands before
   them, never showed in light mode. */
html[data-theme="light"] .bv-turnout__tile { border-left: 3px solid var(--bv-turnout-accent) !important; }

/* Measured 3.5:1 (position), 2.4:1 (total) and 3.6:1 (form labels). */
html[data-theme="light"] .bv-results-heading__title { color: var(--bvl-ink) !important; }
html[data-theme="light"] .bv-results-heading__total { color: var(--bvl-ink-2) !important; }
html[data-theme="light"] .bv-results-heading__total strong { color: var(--bvl-gold-ink) !important; }
html[data-theme="light"] .bv-label { color: var(--bvl-ink-2) !important; }

html[data-theme="light"] .bv-ballot-commit__btn:disabled {
  color: var(--bvl-ink-2) !important;   /* was rgba(255, 255, 255, 0.3) !important */
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.04) !important */
  border-color: var(--bvl-line) !important;   /* was rgba(255, 255, 255, 0.09) !important */
}

html[data-theme="light"] .bv-award-empty {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.4) */
}

html[data-theme="light"] .bv-award-empty i {
  color: var(--bvl-gold-ink) !important;   /* was #FFB400 */
}

html[data-theme="light"] .bv-award {
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.03) */
  border: 1px solid var(--bvl-line-soft) !important;   /* was 1px solid rgba(255, 255, 255, 0.07) */
}

html[data-theme="light"] .bv-award__name {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.5) */
}

html[data-theme="light"] .bv-award--decided .bv-award__name,
html[data-theme="light"] .bv-award--tied .bv-award__name {
  color: var(--bvl-gold-ink) !important;   /* was #FFB400 */
}

html[data-theme="light"] .bv-award__remove {
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.3) */
  border: 1px solid var(--bvl-line) !important;   /* was 1px solid rgba(255, 255, 255, 0.08) !important */
}

html[data-theme="light"] .bv-award__who {
  color: var(--bvl-ink) !important;   /* was #fff */
}

html[data-theme="light"] .bv-award__value {
  color: var(--bvl-ink) !important;   /* was #fff */
}

html[data-theme="light"] .bv-award__value span {
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.35) */
}

html[data-theme="light"] .bv-award__pending {
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.3) */
}

html[data-theme="light"] .bv-award__basis {
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.35) */
}

html[data-theme="light"] .bv-award-add {
  border-top: 1px solid var(--bvl-line-soft) !important;   /* was 1px solid rgba(255, 255, 255, 0.06) */
}

html[data-theme="light"] .bv-award-add__note {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.4) */
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.03) */
  border: 1px solid var(--bvl-line-soft) !important;   /* was 1px solid rgba(255, 255, 255, 0.06) */
}

html[data-theme="light"] .bv-award-add__note i {
  color: var(--bvl-gold-ink) !important;   /* was #FFB400 */
}

html[data-theme="light"] .glass-card-elevated {
  border: 1px solid var(--bvl-line) !important;   /* was 1px solid rgba(255, 255, 255, 0.12) */
}

html[data-theme="light"] .glass-panel:hover,
html[data-theme="light"] .glass-card:hover {
  background: rgba(15, 23, 42, 0.06) !important;   /* was rgba(255, 255, 255, 0.08) */
  border-color: var(--bvl-line) !important;   /* was rgba(255, 255, 255, 0.15) */
}

html[data-theme="light"] .btn-primary {
  color: var(--bvl-ink) !important;   /* was white */
}

html[data-theme="light"] .minimal-input {
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.03) !important */
  border: 1px solid var(--bvl-line-soft) !important;   /* was 1px solid rgba(255, 255, 255, 0.06) !important */
  border-top-color: var(--bvl-line) !important;   /* was rgba(255, 255, 255, 0.1) !important */
}

html[data-theme="light"] .minimal-label {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.4) */
}

html[data-theme="light"] .form-control {
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.05) !important */
  border: 1px solid var(--bvl-line) !important;   /* was 1px solid rgba(255, 255, 255, 0.12) !important */
  color: var(--bvl-ink) !important;   /* was #f1f5f9 !important */
}

html[data-theme="light"] .form-control:focus {
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.06) !important */
}

html[data-theme="light"] .form-control::placeholder {
  color: rgba(15, 23, 42, 0.62) !important;   /* was rgba(255, 255, 255, 0.2) */
}

html[data-theme="light"] .auth-left {
  color: var(--bvl-ink) !important;   /* was white */
}

/* ── 14. DERIVED OVERRIDES (second pass) ───────────────────────────────
   beevote.css grew again while section 13 was being written (6,397 ->
   6,587 lines) and brought the .bv-elist election-list component with it.
   Same derivation rules as section 13; see that header for the mapping and
   for how to regenerate. Kept as its own section rather than merged, so the
   sheet records that the base stylesheet is a moving target. */

html[data-theme="light"] .bv-elist__group td {
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.035) !important */
  border-bottom: 1px solid var(--bvl-line) !important;   /* was 1px solid rgba(255, 255, 255, 0.08) !important */
}

html[data-theme="light"] .bv-elist__group-label {
  color: var(--bvl-blue-ink) !important;   /* was #7dabff */
}

html[data-theme="light"] .bv-elist__group-label.is-pageant {
  color: var(--bvl-gold-ink) !important;   /* was #FFB400 */
}

html[data-theme="light"] .bv-elist__title {
  color: var(--bvl-ink) !important;   /* was #fff */
}

html[data-theme="light"] .bv-elist__sub {
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.3) */
}

html[data-theme="light"] .bv-elist__date {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.45) */
}

html[data-theme="light"] .bv-elist-icon {
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.04) !important */
  border: 1px solid var(--bvl-line) !important;   /* was 1px solid rgba(255, 255, 255, 0.09) !important */
}

html[data-theme="light"] .bv-elist-icon--gold {
  color: var(--bvl-gold-ink) !important;   /* was #FFB400 !important */
}

html[data-theme="light"] .bv-elist-icon:hover {
  background: rgba(15, 23, 42, 0.06) !important;   /* was rgba(255, 255, 255, 0.08) !important */
  border-color: var(--bvl-line) !important;   /* was rgba(255, 255, 255, 0.2) !important */
}

html[data-theme="light"] .bv-elist-empty__icon {
  color: rgba(15, 23, 42, 0.62) !important;   /* was rgba(255, 255, 255, 0.14) */
}

html[data-theme="light"] .bv-elist-empty__title {
  color: var(--bvl-ink) !important;   /* was #fff */
}

html[data-theme="light"] .bv-elist-empty__copy {
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.35) */
}

/* ── ACTIVITY LOG: SHARED FEED ────────────────────────────────────
   Counterparts for the classes the transparency-feed rebuild added
   on 2026-09-05. */
html[data-theme="light"] .bv-log-ago,
html[data-theme="light"] .bv-log-muted {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.28) / 0.25 */
}

/* .bv-log-time and .bv-log-ip predate this but had no light rule:
   they were only ever rendered on the SOC page. The feed puts them
   on three more dashboards, where #60a5fa and #818cf8 on white are
   too pale to read. */
html[data-theme="light"] .bv-log-time {
  color: #1d4ed8 !important;
}

html[data-theme="light"] .bv-log-ip {
  color: #4338ca !important;
}

/* ── TRANSPARENCY PORTAL: LEDGER ──────────────────────────────────
   Counterparts for the classes the portal rebuild added on 2026-09-05. */
html[data-theme="light"] .bv-ledger-election {
  color: var(--bvl-ink) !important;   /* was rgba(255, 255, 255, 0.88) */
}

html[data-theme="light"] .bv-tx-link {
  color: #1d4ed8 !important;
}

html[data-theme="light"] .bv-tx-link:hover {
  color: #1e3a8a !important;
}

/* .bv-log-scroll pins its header row and gives it an OPAQUE fill, so
   rows do not show through while the body scrolls. That fill is the
   dark theme's #192435 and nothing overrode it here, so in light mode
   the column names were dark ink on a dark strip -- effectively
   invisible. Surfaced when the transparency portal adopted the class
   on 2026-09-05; the SOC audit trail has had it all along. */
html[data-theme="light"] .bv-log-scroll .bv-table thead th {
  background: var(--bvl-surface) !important;
}

/* Judging portal row note. */
html[data-theme="light"] .bv-judge-row__note {
  color: var(--bvl-ink-faint) !important;
}

html[data-theme="light"] .bv-log-receipt {
  color: var(--bvl-gold-ink) !important;
  background: rgba(255, 180, 0, 0.16) !important;
  border-color: rgba(138, 90, 0, 0.35) !important;
}
html[data-theme="light"] .bv-log-receipt:hover {
  background: rgba(255, 180, 0, 0.26) !important;
  border-color: var(--bvl-gold-ink) !important;
}
html[data-theme="light"] .bv-log-receipt:focus-visible { outline-color: var(--bvl-gold-ink); }

/* ── Voter dashboard (2026-09-15) ───────────────────────────────────────── */
html[data-theme="light"] .bv-section-title { color: var(--bvl-ink) !important; }
html[data-theme="light"] .bv-open-ballot__date { color: var(--bvl-ink-2) !important; }

/* The blue segmented control had no light rule for its selected tab, so it
   kept white text on a pale fill -- unreadable on the booth and on this log.
   Unselected tabs move from ink-muted (under 4.5:1 here) to ink-2. */
html[data-theme="light"] .bv-seg { background: var(--bvl-surface-sunk) !important; }
html[data-theme="light"] .bv-seg__item { color: var(--bvl-ink-2) !important; }
html[data-theme="light"] .bv-seg--blue .bv-seg__item--on,
html[data-theme="light"] .bv-seg--blue .bv-seg__item--on:hover {
  color: var(--bvl-blue-ink) !important;
  background: rgba(37, 99, 235, 0.12) !important;
  border-color: rgba(37, 99, 235, 0.35) !important;
  box-shadow: none !important;
}
html[data-theme="light"] .bv-seg__count { background: rgba(15, 23, 42, 0.08) !important; }

/* .bv-badge--blue had no light rule; it is the Voted status now. */
html[data-theme="light"] .bv-badge--blue {
  background: rgba(37, 99, 235, 0.10) !important;
  border: 1px solid rgba(37, 99, 235, 0.35) !important;
  color: var(--bvl-blue-ink) !important;
}


/* ── Board of judges ────────────────────────────────────────────────────── */
html[data-theme="light"] .bv-panel-row {
  border-color: var(--bvl-line) !important;
  background: var(--bvl-surface) !important;
}

html[data-theme="light"] .bv-panel-row__name {
  color: var(--bvl-ink) !important;
}

html[data-theme="light"] .bv-panel-row__role {
  color: var(--bvl-ink-faint) !important;
}

/* Counterpart to the pager-summary reset in beevote.css. The light
   rules for the pager carry the theme prefix, so they out-specify an
   unprefixed reset no matter where it sits -- the box has to be
   removed again here or it survives in light mode alone. */
html[data-theme="light"] nav[role="navigation"] p span,
html[data-theme="light"] .bv-pager__meta span {
  min-width: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: none !important;
  border-radius: 0 !important;
}

html[data-theme="light"] .bv-pager__meta span {
  color: var(--bvl-ink) !important;
}

/* Tally card with no photo on file: the initials tile is the only
   part of that card the page theme reaches -- the scrim over a real
   photograph stays dark in both themes. */
html[data-theme="light"] .bv-tally__photo--text {
  background: linear-gradient(160deg, rgba(255, 180, 0, 0.16), rgba(15, 23, 42, 0.04));
  color: var(--bvl-gold-ink);
}

/* Counterparts to the .bv-turnout rules in beevote.css. */
html[data-theme="light"] .bv-turnout__name { color: var(--bvl-ink) !important; }
html[data-theme="light"] .bv-turnout__figures { color: var(--bvl-ink-muted) !important; }
html[data-theme="light"] .bv-turnout__figures--withheld { color: var(--bvl-ink-faint) !important; }
html[data-theme="light"] .bv-turnout__bar { background: var(--bvl-line-soft) !important; }

/* Counterparts to .bv-ballot-card--abstain in beevote.css. */
html[data-theme="light"] .bv-ballot-card--abstain { background: var(--bvl-surface-sunk) !important; }
html[data-theme="light"] .bv-ballot-card--abstain .bv-ballot-photo__initials { color: var(--bvl-ink-faint) !important; }
html[data-theme="light"] .bv-ballot-card--abstain .bv-ballot-name { color: var(--bvl-ink) !important; }
html[data-theme="light"] .bv-ballot-card--abstain .bv-ballot-party { color: var(--bvl-ink-muted) !important; }

/* Counterparts to the .bv-abstain rules in beevote.css. */
html[data-theme="light"] .bv-abstain { background: var(--bvl-surface-sunk) !important; border: 1px dashed var(--bvl-line) !important; }
html[data-theme="light"] .bv-abstain__label { color: var(--bvl-ink-muted) !important; }
html[data-theme="light"] .bv-abstain__figures { color: var(--bvl-ink-faint) !important; }
html[data-theme="light"] .bv-abstain__bar { background: var(--bvl-line-soft) !important; }
html[data-theme="light"] .bv-abstain__fill { background: var(--bvl-ink-faint) !important; }

/* ── ADD A JUDGE ──────────────────────────────────────────────────
   The credentials pane, both states. It was never themed, which did
   not show while it was hidden behind an attribute that did not work
   and rendered empty. Now that it has a resting state carrying real
   text, white-on-white would make that text invisible here. */
html[data-theme="light"] .bv-panel-new__result {
  background: var(--bvl-surface-sunk) !important;
  border: 1px dashed var(--bvl-line) !important;
}

html[data-theme="light"] .bv-panel-new__idle {
  color: var(--bvl-ink-faint) !important;
}

/* Filled. Solid and gold rather than dashed and grey, so a pane
   holding a password that will never be shown again does not read
   as an empty one. */
html[data-theme="light"] .bv-panel-new__result.is-filled {
  background: rgba(255, 180, 0, 0.10) !important;
  border: 1px solid var(--bvl-gold) !important;
}

html[data-theme="light"] .bv-panel-new__result.is-filled strong,
html[data-theme="light"] .bv-panel-new__creds {
  color: var(--bvl-ink) !important;
}

html[data-theme="light"] .bv-panel-new__warn {
  color: var(--bvl-ink-muted) !important;
}

/* ── ROUND SCOPE ──────────────────────────────────────────────────
   The tabulation's round filter. Its labels are white-on-dark by
   default, which is unreadable on paper-coloured card. */
html[data-theme="light"] .bv-scope__item {
  color: var(--bvl-ink-muted) !important;
}

html[data-theme="light"] .bv-scope__item--stage {
  color: var(--bvl-gold-ink) !important;
}

html[data-theme="light"] .bv-scope__note {
  color: var(--bvl-amber-ink) !important;
}

/* Criteria sit two levels in and were --bvl-ink-faint, which is 38% ink: fine
   as a caption under something, too light for a label you are meant to read
   and then click. Muted keeps them quieter than their segment without making
   them furniture. */
html[data-theme="light"] .bv-scope__item--leaf {
  color: var(--bvl-ink-muted) !important;
}

/* The round filter's drawn checkboxes, on paper-coloured card. */
/* The unchecked box needs a real edge here. --bvl-line is 10% ink, which is
   right for a rule between rows and invisible as the outline of a 15px control
   on white -- the filter read as a column of labels with nothing to click. */
html[data-theme="light"] .bv-scope__item input {
  border-color: rgba(15, 23, 42, 0.30) !important;
  background: #fff !important;
}

html[data-theme="light"] .bv-scope__item input:checked {
  background: var(--bvl-gold) !important;
  border-color: var(--bvl-gold) !important;
}

html[data-theme="light"] .bv-scope__item:hover {
  background: var(--bvl-surface-sunk);
  color: var(--bvl-ink) !important;
}

html[data-theme="light"] .bv-scope__item:has(input:checked) {
  color: var(--bvl-ink) !important;
}

html[data-theme="light"] .bv-scope__item--stage:has(input:checked) {
  color: var(--bvl-gold-ink) !important;
}

html[data-theme="light"] .bv-scope__rule {
  background: var(--bvl-line-soft);
}

html[data-theme="light"] .bv-scope__working {
  color: var(--bvl-amber-ink) !important;
}

/* Collapsible rounds in the filter. */
html[data-theme="light"] .bv-scope__group {
  border-color: var(--bvl-line) !important;
  background: var(--bvl-surface-sunk) !important;
}

html[data-theme="light"] .bv-scope__panel {
  border-top-color: var(--bvl-line-soft) !important;
  background: var(--bvl-surface) !important;
}

html[data-theme="light"] .bv-scope__toggle {
  color: var(--bvl-ink-faint) !important;
}

html[data-theme="light"] .bv-scope__toggle:hover {
  color: var(--bvl-gold-ink) !important;
  background: var(--bvl-surface-sunk) !important;
}

html[data-theme="light"] .bv-scope__count {
  background: rgba(255, 180, 0, 0.20) !important;
  color: var(--bvl-gold-ink) !important;
}

/* ── SECURE HASH IDENTIFIER ───────────────────────────────────────
   The box is new: the Tailwind classes it replaced emitted nothing, so
   this panel had no background in either theme. Now that it has one, it
   needs a paper-coloured version rather than a black slab on white. */
html[data-theme="light"] .bv-hash {
  background: var(--bvl-surface-sunk) !important;
  border-color: var(--bvl-line) !important;
}

html[data-theme="light"] .bv-hash__mask {
  color: #4f46e5 !important;
}

html[data-theme="light"] .bv-hash__value {
  color: var(--bvl-ink-muted) !important;
}

html[data-theme="light"] .bv-panel-retired {
  color: var(--bvl-ink-faint) !important;
}

html[data-theme="light"] .bv-panel-retired:hover {
  color: var(--bvl-ink) !important;
}

/* The personal-address warning. --bvl-amber-ink rather than the dark
   sheet's #F59E0B, which is a mid amber and reads as decoration on a
   white ground. The field border needs !important for the same reason
   every field rule in this file does: the light input rule above is
   itself !important, and without it the warning would show a message
   beside a field that still looked untouched. */
html[data-theme="light"] .bv-mailwarn {
  background: rgba(180, 83, 9, 0.09) !important;
  border-color: rgba(180, 83, 9, 0.35) !important;
  color: var(--bvl-amber-ink) !important;
}

html[data-theme="light"] .bv-input--warn,
html[data-theme="light"] .bv-input--warn:focus {
  border-color: rgba(180, 83, 9, 0.7) !important;
  box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.14) !important;
}

/* ── TURNOUT BOARD ──────────────────────────────────────────────── */
html[data-theme="light"] .bv-turnout__label,
html[data-theme="light"] .bv-turnout__code,
html[data-theme="light"] .bv-turnout__count { color: var(--bvl-ink-faint) !important; }

html[data-theme="light"] .bv-turnout__empty { color: var(--bvl-ink-muted) !important; }

/* The meter's track is a white wash on the dark theme, which is
   invisible on paper. */
html[data-theme="light"] .bv-turnout__meter { background: rgba(15, 23, 42, 0.10) !important; }

/* Gold on white fails contrast at 12px and under. The band keeps its
   colour on the meter and the rank; only the small type darkens. */
html[data-theme="light"] .bv-turnout--mid .bv-turnout__rank { color: #a16207 !important; }

html[data-theme="light"] .bv-stage__track .bv-seg__skip { background: rgba(220, 38, 38, 0.06) !important; color: #b91c1c !important; }
html[data-theme="light"] .bv-stage__track .bv-seg__skip.is-armed { background: #dc2626 !important; color: #fff !important; }

/* ── Admin screens (2026-09-16) ─────────────────────────────────────────
   The audit tile had no light rules at all, so the Transparency Portal's
   tiles kept white text on a white card. */
html[data-theme="light"] .bv-audit-tile {
  background: var(--bvl-surface) !important;
  border-color: var(--bvl-line) !important;
}
html[data-theme="light"] .bv-audit-tile--accent { border-top-width: 3px !important; }
html[data-theme="light"] .bv-audit-tile--green  { border-top-color: #16a34a !important; }
html[data-theme="light"] .bv-audit-tile--red    { border-top-color: #dc2626 !important; }
html[data-theme="light"] .bv-audit-tile--gold   { border-top-color: #d99a00 !important; }
html[data-theme="light"] .bv-audit-tile--blue   { border-top-color: #2563eb !important; }
html[data-theme="light"] .bv-audit-tile--amber  { border-top-color: #d97706 !important; }
html[data-theme="light"] .bv-audit-tile--indigo { border-top-color: #4f46e5 !important; }

html[data-theme="light"] .bv-audit-tile__label,
html[data-theme="light"] .bv-audit-tile__note,
html[data-theme="light"] .bv-audit-tile__of { color: var(--bvl-ink-2) !important; }
html[data-theme="light"] .bv-audit-tile__value { color: var(--bvl-ink) !important; }
html[data-theme="light"] .bv-audit-tile__value.is-good { color: #166534 !important; }
html[data-theme="light"] .bv-audit-tile__value.is-bad,
html[data-theme="light"] .bv-audit-tile__note.is-warn { color: var(--bvl-red-ink) !important; }
html[data-theme="light"] .bv-audit-tile__value.is-warn { color: var(--bvl-gold-ink) !important; }
html[data-theme="light"] .bv-audit-tile__value.is-idle { color: var(--bvl-ink-muted) !important; }
html[data-theme="light"] .bv-audit-tile__icon { background: var(--bvl-surface-sunk) !important; border-color: var(--bvl-line) !important; }
html[data-theme="light"] .bv-audit-tile__icon--blue   { color: var(--bvl-blue-ink) !important; }
html[data-theme="light"] .bv-audit-tile__icon--green  { color: #166534 !important; }
html[data-theme="light"] .bv-audit-tile__icon--indigo { color: #4338ca !important; }

html[data-theme="light"] .bv-callout--blue .bv-callout__icon,
html[data-theme="light"] .bv-callout__link { color: var(--bvl-blue-ink) !important; }
html[data-theme="light"] .bv-callout--green .bv-callout__icon,
html[data-theme="light"] .bv-callout--green .bv-callout__text { color: #166534 !important; }
html[data-theme="light"] .bv-callout--red .bv-callout__icon,
html[data-theme="light"] .bv-callout--red .bv-callout__text { color: var(--bvl-red-ink) !important; }
html[data-theme="light"] .bv-callout--amber .bv-callout__icon,
html[data-theme="light"] .bv-callout--amber .bv-callout__text { color: var(--bvl-amber-ink) !important; }

html[data-theme="light"] .bv-user-cell__name,
html[data-theme="light"] .bv-health-event { color: var(--bvl-ink) !important; }
html[data-theme="light"] .bv-user-cell__email { color: var(--bvl-ink-2) !important; }
html[data-theme="light"] .bv-health-feed__bar,
html[data-theme="light"] .bv-health-feed__pager { border-color: var(--bvl-line-soft) !important; }

html[data-theme="light"] .bv-status-source,
html[data-theme="light"] .bv-status-row__desc,
html[data-theme="light"] .bv-live__stamp,
html[data-theme="light"] .bv-field-label,
html[data-theme="light"] .bv-dropzone__hint,
html[data-theme="light"] .bv-chip { color: var(--bvl-ink-2) !important; }
html[data-theme="light"] .bv-status-source code { color: var(--bvl-gold-ink) !important; }

/* ── ORGANIZER SCREENS (the beevote.css block of the same name) ── */
html[data-theme="light"] .bv-builder__hint,
html[data-theme="light"] .bv-panel-row__role { color: var(--bvl-ink-2) !important; }
html[data-theme="light"] .bv-guide__step { background: var(--bvl-surface-sunk) !important; border-color: var(--bvl-line-soft) !important; }
html[data-theme="light"] .bv-guide__title { color: var(--bvl-ink) !important; }
html[data-theme="light"] .bv-guide__text { color: var(--bvl-ink-2) !important; }
html[data-theme="light"] .bv-node__level--stage { color: var(--bvl-gold-ink) !important; background: rgba(255, 180, 0, 0.14) !important; border-color: rgba(161, 98, 7, 0.4) !important; }
html[data-theme="light"] .bv-node__level--segment { color: var(--bvl-blue-ink) !important; background: rgba(37, 99, 235, 0.08) !important; border-color: rgba(37, 99, 235, 0.32) !important; }
html[data-theme="light"] .bv-node__level--criterion { color: var(--bvl-green-ink) !important; background: rgba(22, 163, 74, 0.08) !important; border-color: rgba(22, 163, 74, 0.32) !important; }
html[data-theme="light"] .bv-node__level--item { color: var(--bvl-ink-2) !important; background: var(--bvl-surface-sunk) !important; border-color: var(--bvl-line) !important; }
html[data-theme="light"] .bv-node__btn.bv-node__btn--labeled { color: var(--bvl-gold-ink) !important; background: rgba(255, 180, 0, 0.12) !important; border-color: rgba(161, 98, 7, 0.35) !important; }
html[data-theme="light"] .bv-panel-add { border-top-color: var(--bvl-line-soft) !important; }
/* ink-faint measured 2.4:1 here. */
html[data-theme="light"] .bv-panel-new__idle { color: var(--bvl-ink-2) !important; }

/* ── 15. LIGHT MODE FIXES (third pass) ───────────────────────────────── */

/* ── Ballot Certification & Cryptographic Receipt (voter/receipt.blade.php) ──
   The receipt had zero light rules, leaving dark navy surfaces, faint white
   labels, and inline rgba(255,255,255,0.25) status lines. */
html[data-theme="light"] .bv-receipt-shell {
  background: var(--bvl-surface) !important;   /* was rgba(8, 16, 40, 0.95) */
  border-color: var(--bvl-line) !important;   /* was rgba(255, 180, 0, 0.35) */
  border-top-color: var(--bvl-gold) !important;   /* was rgba(255, 180, 0, 0.5) */
  box-shadow: var(--bvl-shadow-lg) !important;   /* was 0 0 60px ... */
}

html[data-theme="light"] .bv-receipt-header {
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255,255,255,0.02) */
  border-bottom-color: var(--bvl-line-soft) !important;   /* was rgba(255,255,255,0.05) */
}

html[data-theme="light"] .bv-receipt-header__label {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255,255,255,0.3) */
}

html[data-theme="light"] .bv-receipt-title {
  color: var(--bvl-ink) !important;   /* was white */
}

html[data-theme="light"] .bv-receipt-body {
  border-bottom-color: var(--bvl-line-soft) !important;   /* was rgba(255,255,255,0.05) */
}

html[data-theme="light"] .bv-receipt-row {
  border-bottom-color: var(--bvl-line-soft) !important;   /* was rgba(255,255,255,0.04) */
}

html[data-theme="light"] .bv-receipt-key {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255,255,255,0.3) */
}

html[data-theme="light"] .bv-receipt-val {
  color: var(--bvl-ink) !important;   /* was rgba(255,255,255,0.85) */
}

html[data-theme="light"] .bv-receipt-val--gold {
  color: var(--bvl-gold-ink) !important;   /* was #FFB400 */
}

html[data-theme="light"] .bv-receipt-row .bv-receipt-val[style*="color:rgba(255,255,255,0.5)"],
html[data-theme="light"] .bv-receipt-row .bv-receipt-val[style*="color: rgba(255, 255, 255, 0.5)"] {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255,255,255,0.5) */
}

html[data-theme="light"] .bv-receipt-copy {
  color: var(--bvl-gold-ink) !important;   /* was rgba(255, 255, 255, 0.4) */
  background: rgba(255, 180, 0, 0.12) !important;
  border: 1px solid rgba(138, 90, 0, 0.35) !important;
}

html[data-theme="light"] .bv-receipt-copy.is-done {
  color: var(--bvl-green-ink) !important;   /* was #22c55e */
  border-color: rgba(21, 128, 61, 0.35) !important;
}

html[data-theme="light"] .bv-receipt-anchor {
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255,255,255,0.02) */
  border-top-color: var(--bvl-line-soft) !important;   /* was rgba(255,255,255,0.05) */
  border-bottom-color: var(--bvl-line-soft) !important;   /* was rgba(255,255,255,0.05) */
}

html[data-theme="light"] .bv-receipt-anchor__status span {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255,255,255,0.25) */
}

html[data-theme="light"] .bv-receipt-anchor__badge {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255,255,255,0.55) */
}

html[data-theme="light"] .bv-receipt-anchor__badge--verified {
  color: var(--bvl-green-ink) !important;   /* was #22c55e */
}

/* The receipt marks this state --pending; --awaiting matched nothing, so
   the badge fell through to the grey rule above and lost its amber. */
html[data-theme="light"] .bv-receipt-anchor__badge--pending {
  color: var(--bvl-amber-ink) !important;   /* was #FFB400 */
}

html[data-theme="light"] .bv-receipt-anchor a {
  color: var(--bvl-green-ink) !important;   /* was #22c55e */
}

html[data-theme="light"] .bv-receipt-dot {
  background: var(--bvl-ink-muted) !important;   /* was rgba(255,255,255,0.35) */
}

html[data-theme="light"] .bv-receipt-dot--green {
  background: var(--bvl-green-ink) !important;   /* was #22c55e */
  box-shadow: 0 0 6px rgba(21, 128, 61, 0.35) !important;
}

html[data-theme="light"] .bv-receipt-dot--pulse {
  background: var(--bvl-amber-ink) !important;   /* was #FFB400 */
}

html[data-theme="light"] .bv-receipt-qr {
  border: 1px solid var(--bvl-line) !important;
}

html[data-theme="light"] .bv-receipt-notice {
  background: var(--bvl-surface-sunk) !important;   /* was rgba(0,0,0,0.2) */
  border-bottom-color: var(--bvl-line-soft) !important;   /* was rgba(255,255,255,0.04) */
  color: var(--bvl-ink-2) !important;   /* was rgba(255,255,255,0.4) */
}

html[data-theme="light"] .bv-receipt-notice strong {
  color: var(--bvl-ink) !important;   /* was rgba(255,255,255,0.7) */
}

/* Same as .bv-btn--ghost in light mode. */
html[data-theme="light"] .bv-receipt-btn--ghost {
  background: var(--bvl-surface) !important;
  border: 1px solid var(--bvl-line) !important;
  color: var(--bvl-ink-2) !important;
}

html[data-theme="light"] .bv-receipt-btn--ghost:hover {
  background: var(--bvl-surface-2) !important;
  border-color: rgba(15, 23, 42, 0.20) !important;
  color: var(--bvl-ink) !important;
}

/* Additional receipt inline style replacements */
html[data-theme="light"] .bv-receipt-sub {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255,255,255,0.5) */
}

html[data-theme="light"] .bv-receipt-anchor__label {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255,255,255,0.3) */
}

html[data-theme="light"] .bv-receipt-anchor__link {
  color: var(--bvl-green-ink) !important;   /* was #22c55e */
}

html[data-theme="light"] .bv-receipt-anchor__note {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255,255,255,0.25) */
}

html[data-theme="light"] .bv-receipt-dot--simulated {
  background: var(--bvl-ink-muted) !important;   /* was rgba(255,255,255,0.35) */
}

html[data-theme="light"] .bv-receipt-anchor__badge--offline {
  color: var(--bvl-ink-2) !important;   /* was rgba(255,255,255,0.55) */
}

html[data-theme="light"] .bv-receipt-qr__img {
  width: 88px !important;
  height: 88px !important;
  display: block !important;
  border-radius: 4px !important;
}

/* ── COMELEC & Distributed Ledger Audit (panel/blockchain, panel/ledger-sync) ──
   Provenance bar, anchor status cards, master audit ledger table, and ledger-sync
   verification boxes. */
html[data-theme="light"] .bv-verify {
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.025) */
  border-color: var(--bvl-line) !important;   /* was rgba(255, 255, 255, 0.08) */
}

html[data-theme="light"] .bv-verify.is-ok {
  background: rgba(21, 128, 61, 0.08) !important;   /* was rgba(34, 197, 94, 0.07) */
  border-color: rgba(21, 128, 61, 0.35) !important;   /* was rgba(34, 197, 94, 0.35) */
}

html[data-theme="light"] .bv-verify.is-bad {
  background: rgba(185, 28, 28, 0.08) !important;   /* was rgba(239, 68, 68, 0.07) */
  border-color: rgba(185, 28, 28, 0.35) !important;   /* was rgba(239, 68, 68, 0.4) */
}

html[data-theme="light"] .bv-verify.is-ok .bv-verify__icon {
  color: var(--bvl-green-ink) !important;   /* was #4ade80 */
}

html[data-theme="light"] .bv-verify.is-bad .bv-verify__icon {
  color: var(--bvl-red-ink) !important;   /* was #f87171 */
}

html[data-theme="light"] .bv-verify__meta {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.4) */
}

html[data-theme="light"] .bv-prov-bar {
  background: rgba(15, 23, 42, 0.08) !important;   /* was rgba(255, 255, 255, 0.04) */
}

html[data-theme="light"] .bv-prov-bar__band.is-pending,
html[data-theme="light"] .bv-prov-item__dot.is-pending {
  background: rgba(15, 23, 42, 0.25) !important;   /* was rgba(255, 255, 255, 0.28) */
}

html[data-theme="light"] .bv-prov-item__head {
  color: var(--bvl-ink-2) !important;   /* was rgba(255, 255, 255, 0.65) */
}

html[data-theme="light"] .bv-prov-item__head strong {
  color: var(--bvl-ink) !important;   /* was #fff */
}

html[data-theme="light"] .bv-prov-item__pct,
html[data-theme="light"] .bv-prov-item__note {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.35) */
}

html[data-theme="light"] .bv-anchor {
  background: var(--bvl-surface) !important;
  border-color: var(--bvl-line) !important;
}

html[data-theme="light"] .bv-anchor__block {
  color: var(--bvl-ink) !important;   /* was #fff */
}

html[data-theme="light"] .bv-anchor__state.is-onchain {
  color: var(--bvl-green-ink) !important;   /* was #4ade80 */
}

html[data-theme="light"] .bv-anchor__state.is-simulated {
  color: var(--bvl-red-ink) !important;   /* was #f87171 */
}

html[data-theme="light"] .bv-anchor__state.is-unknown {
  color: var(--bvl-amber-ink) !important;   /* was #eab308 */
}

html[data-theme="light"] .bv-anchor__hash {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.5) */
  background: var(--bvl-surface-sunk) !important;   /* was rgba(0, 0, 0, 0.25) */
  border-color: var(--bvl-line-soft) !important;   /* was rgba(255, 255, 255, 0.05) */
}

html[data-theme="light"] .bv-ledger__index {
  color: #4338ca !important;   /* was #818cf8 */
  background: rgba(99, 102, 241, 0.08) !important;   /* was rgba(99, 102, 241, 0.1) */
  border-color: rgba(99, 102, 241, 0.25) !important;
}

html[data-theme="light"] .bv-ledger__pool {
  color: var(--bvl-ink) !important;   /* was #fff */
}

html[data-theme="light"] .bv-ledger__hash {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.55) */
  background: var(--bvl-surface-sunk) !important;   /* was rgba(0, 0, 0, 0.25) */
}

html[data-theme="light"] .bv-ledger__tx {
  color: var(--bvl-gold-ink) !important;   /* was #FFB400 */
  border-bottom-color: rgba(138, 90, 0, 0.35) !important;   /* was rgba(255, 180, 0, 0.4) */
}

html[data-theme="light"] .bv-ledger__none {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.28) */
}

html[data-theme="light"] .bv-ledger__pager {
  border-top-color: var(--bvl-line-soft) !important;   /* was rgba(255, 255, 255, 0.05) */
}

html[data-theme="light"] .bv-ledger-election {
  color: var(--bvl-ink) !important;   /* was rgba(255, 255, 255, 0.88) */
}

html[data-theme="light"] .bv-archive-info__label {
  color: var(--bvl-ink-muted) !important;
}

html[data-theme="light"] .bv-archive-info__value {
  color: var(--bvl-ink) !important;
}

html[data-theme="light"] .bv-archive-info__hash {
  color: var(--bvl-ink-muted) !important;
  background: var(--bvl-surface-sunk) !important;
}

/* ── Voter Ballot Verification & Hash Display (voter/verify.blade.php) ──
   Hashes on the verification screen inherited faint 30% white text on white. */
html[data-theme="light"] .bv-hash {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.3) */
}

html[data-theme="light"] .bv-verify-result__hash {
  color: var(--bvl-ink-muted) !important;
}

html[data-theme="light"] .bv-verify-result__hash a {
  color: var(--bvl-blue-ink) !important;
}

html[data-theme="light"] .bv-hash-cell {
  color: var(--bvl-ink-muted) !important;
}

html[data-theme="light"] .bv-hash-block {
  background: var(--bvl-surface-sunk) !important;   /* was rgba(0, 0, 0, 0.25) */
}

/* ── Admin System Health & Logs (admin/errors.blade.php) ──
   Pre blocks had dark background un-overridden, and process names were faint. */
html[data-theme="light"] .bv-log-actor__id {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.28) */
}

html[data-theme="light"] .bv-log-actor__anon {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.3) */
}

html[data-theme="light"] .bv-log-details {
  background: var(--bvl-surface-sunk) !important;   /* was rgba(0, 0, 0, 0.25) */
  border: 1px solid var(--bvl-line-soft) !important;
}

html[data-theme="light"] .bv-event-empty {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.28) */
}

html[data-theme="light"] .bv-event-empty i {
  color: var(--bvl-ink-faint) !important;   /* was rgba(255, 255, 255, 0.15) */
}

/* ── Candidate Registry Roster (candidates/index.blade.php) ── */
html[data-theme="light"] .bv-croster-filter__clear {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.4) */
}

html[data-theme="light"] .bv-croster-filter__clear:hover {
  color: var(--bvl-gold-ink) !important;   /* was #FFB400 */
}

html[data-theme="light"] .bv-croster__num {
  color: var(--bvl-gold-ink) !important;   /* was #FFB400 */
  background: rgba(255, 180, 0, 0.12) !important;   /* was rgba(255, 180, 0, 0.09) */
  border-color: rgba(138, 90, 0, 0.3) !important;   /* was rgba(255, 180, 0, 0.2) */
}

html[data-theme="light"] .bv-croster__photo--none {
  color: var(--bvl-gold-ink) !important;   /* was #FFB400 */
  background: rgba(255, 180, 0, 0.10) !important;   /* was rgba(255, 180, 0, 0.08) */
}

html[data-theme="light"] .bv-croster__name {
  color: var(--bvl-ink) !important;   /* was #fff */
}

html[data-theme="light"] .bv-croster__role {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.32) */
}

html[data-theme="light"] .bv-croster__course {
  color: var(--bvl-ink-2) !important;   /* was rgba(255, 255, 255, 0.6) */
}

html[data-theme="light"] .bv-croster__meta {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.4) */
}

html[data-theme="light"] .bv-croster__locked {
  color: var(--bvl-green-ink) !important;   /* was #4ade80 */
  background: rgba(21, 128, 61, 0.08) !important;   /* was rgba(34, 197, 94, 0.1) */
  border-color: rgba(21, 128, 61, 0.28) !important;   /* was rgba(34, 197, 94, 0.28) */
}

/* ── ISO/IEC 25010 Quality Audit (admin/audit/iso.blade.php) ── */
html[data-theme="light"] .bv-iso-stamp {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.35) */
}

html[data-theme="light"] .bv-iso-stamp strong {
  color: var(--bvl-ink) !important;   /* was rgba(255, 255, 255, 0.7) */
}

html[data-theme="light"] .bv-iso-summary {
  background: var(--bvl-surface) !important;   /* was rgba(255, 255, 255, 0.03) */
  border-color: var(--bvl-line) !important;   /* was rgba(255, 255, 255, 0.07) */
  box-shadow: var(--bvl-shadow) !important;
}

html[data-theme="light"] .bv-iso-summary__label {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.35) */
}

html[data-theme="light"] .bv-iso-summary__ratio {
  color: var(--bvl-ink) !important;   /* was rgba(255, 255, 255, 0.85) */
}

html[data-theme="light"] .bv-iso-summary__note {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.4) */
}

html[data-theme="light"] .bv-iso-summary__divider {
  background: var(--bvl-line) !important;   /* was rgba(255, 255, 255, 0.08) */
}

html[data-theme="light"] .bv-iso-card__head {
  border-bottom-color: var(--bvl-line-soft) !important;   /* was rgba(255, 255, 255, 0.07) */
}

html[data-theme="light"] .bv-iso-card__name {
  color: var(--bvl-ink) !important;   /* was rgba(255, 255, 255, 0.94) */
}

html[data-theme="light"] .bv-iso-card__tally {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.4) */
}

html[data-theme="light"] .bv-iso-card__tally b {
  color: var(--bvl-ink) !important;   /* was rgba(255, 255, 255, 0.85) */
}

html[data-theme="light"] .bv-iso-check {
  color: var(--bvl-ink-2) !important;   /* was rgba(255, 255, 255, 0.72) */
}

html[data-theme="light"] .bv-iso-check + .bv-iso-check {
  border-top-color: var(--bvl-line-soft) !important;   /* was rgba(255, 255, 255, 0.04) */
}

html[data-theme="light"] .bv-iso-check__mark {
  color: var(--bvl-green-ink) !important;   /* was #4ade80 */
  background: rgba(21, 128, 61, 0.10) !important;   /* was rgba(34, 197, 94, 0.12) */
  border-color: rgba(21, 128, 61, 0.3) !important;   /* was rgba(34, 197, 94, 0.3) */
}

html[data-theme="light"] .bv-iso-check--fail {
  color: var(--bvl-red-ink) !important;   /* was #fecaca */
  background: rgba(185, 28, 28, 0.08) !important;   /* was rgba(239, 68, 68, 0.09) */
}

html[data-theme="light"] .bv-iso-check--fail .bv-iso-check__mark {
  color: var(--bvl-red-ink) !important;   /* was #f87171 */
  background: rgba(185, 28, 28, 0.12) !important;   /* was rgba(239, 68, 68, 0.14) */
  border-color: rgba(185, 28, 28, 0.35) !important;   /* was rgba(239, 68, 68, 0.4) */
}

html[data-theme="light"] .bv-iso-check__verdict {
  color: var(--bvl-red-ink) !important;   /* was #f87171 */
}

html[data-theme="light"] .bv-iso-measures {
  border-top-color: var(--bvl-line-soft) !important;   /* was rgba(255, 255, 255, 0.07) */
}

html[data-theme="light"] .bv-iso-measure__value {
  color: var(--bvl-ink) !important;   /* was rgba(255, 255, 255, 0.92) */
}

html[data-theme="light"] .bv-iso-measure__label {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.33) */
}

html[data-theme="light"] .bv-iso-foot {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.35) */
}

/* ── Fullscreen Judging Interface (layouts/judging.blade.php, judge/deck.blade.php) ── */
html[data-theme="light"] .bv-judging-body {
  background: var(--bvl-canvas) !important;
}

html[data-theme="light"] .bv-judging__top {
  background: var(--bvl-surface) !important;   /* was rgba(10, 18, 34, 0.86) */
  border-bottom-color: var(--bvl-line-soft) !important;   /* was rgba(255, 255, 255, 0.07) */
}

html[data-theme="light"] .bv-judging__back {
  border-color: var(--bvl-line) !important;   /* was rgba(255, 255, 255, 0.14) */
  color: var(--bvl-ink-2) !important;   /* was rgba(255, 255, 255, 0.7) */
  background: var(--bvl-surface) !important;
}

html[data-theme="light"] .bv-judging__back:hover {
  background: var(--bvl-surface-sunk) !important;
  color: var(--bvl-ink) !important;
}

html[data-theme="light"] .bv-judging__title {
  color: var(--bvl-gold-ink) !important;   /* was #fbbf24 */
}

html[data-theme="light"] .bv-judging__theme {
  border-color: var(--bvl-line) !important;   /* was rgba(255, 255, 255, 0.14) */
  background: var(--bvl-surface) !important;
  color: var(--bvl-ink-2) !important;   /* was rgba(255, 255, 255, 0.7) */
}

html[data-theme="light"] .bv-judging__theme-dark {
  display: none !important;
}

html[data-theme="light"] .bv-judging__theme-light {
  display: inline-block !important;
}

html[data-theme="light"] .bv-judging-wait__card {
  background: var(--bvl-surface) !important;   /* was rgba(255, 255, 255, 0.025) */
  border-color: var(--bvl-line) !important;   /* was rgba(255, 255, 255, 0.07) */
  box-shadow: var(--bvl-shadow) !important;
}

html[data-theme="light"] .bv-judging-wait__glyph {
  color: var(--bvl-gold-ink) !important;   /* was #fbbf24 */
}

html[data-theme="light"] .bv-judging-wait__title {
  color: var(--bvl-ink) !important;   /* was #fff */
}

html[data-theme="light"] .bv-judging-wait__lead {
  color: var(--bvl-ink-2) !important;   /* was rgba(255, 255, 255, 0.6) */
}

html[data-theme="light"] .bv-judging-wait__list {
  border-top-color: var(--bvl-line-soft) !important;   /* was rgba(255, 255, 255, 0.07) */
}

html[data-theme="light"] .bv-judging-wait__label,
html[data-theme="light"] .bv-judging-wait__note {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.38) */
}

html[data-theme="light"] .bv-rail {
  background: var(--bvl-surface) !important;   /* was rgba(8, 15, 30, 0.75) */
  border-right-color: var(--bvl-line-soft) !important;   /* was rgba(255, 255, 255, 0.07) */
  border-bottom-color: var(--bvl-line-soft) !important;
}

html[data-theme="light"] .bv-rail__row:hover {
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.04) */
}

html[data-theme="light"] .bv-rail__row.is-here {
  background: rgba(255, 180, 0, 0.12) !important;   /* was rgba(251, 191, 36, 0.09) */
  border-left-color: var(--bvl-gold) !important;
}

html[data-theme="light"] .bv-rail__rank {
  color: var(--bvl-gold-ink) !important;   /* was #fbbf24 */
}

html[data-theme="light"] .bv-rail__face {
  border-color: var(--bvl-line) !important;   /* was rgba(255, 255, 255, 0.12) */
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.05) */
}

html[data-theme="light"] .bv-rail__initials {
  color: var(--bvl-gold-ink) !important;   /* was #fbbf24 */
}

html[data-theme="light"] .bv-rail__who b {
  color: var(--bvl-ink) !important;
}

html[data-theme="light"] .bv-rail__who i {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.4) */
}

html[data-theme="light"] .bv-rail__score {
  color: var(--bvl-ink) !important;   /* was rgba(255, 255, 255, 0.85) */
}

html[data-theme="light"] .bv-rail__row.is-dim .bv-rail__rank {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.28) */
}

html[data-theme="light"] .bv-rail__row.is-dim .bv-rail__who b {
  color: var(--bvl-ink-2) !important;   /* was rgba(255, 255, 255, 0.62) */
}

html[data-theme="light"] .bv-rail__row.is-dim .bv-rail__score {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.38) */
}

html[data-theme="light"] .bv-rail__divider {
  border-top-color: var(--bvl-line-soft) !important;   /* was rgba(255, 255, 255, 0.07) */
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.3) */
}

html[data-theme="light"] .bv-rail__foot {
  border-top-color: var(--bvl-line-soft) !important;
}

html[data-theme="light"] .bv-stage__track .bv-card {
  background: var(--bvl-surface) !important;   /* was rgba(255, 255, 255, 0.025) */
  border-color: var(--bvl-line) !important;   /* was rgba(255, 255, 255, 0.06) */
  box-shadow: var(--bvl-shadow) !important;
}

html[data-theme="light"] .bv-stage__track .bv-card__id {
  border-color: var(--bvl-line) !important;   /* was rgba(251, 191, 36, 0.35) */
  background: var(--bvl-surface-sunk) !important;   /* was rgba(4, 9, 20, 0.55) */
}

html[data-theme="light"] .bv-stage__track .bv-card__photo--none {
  color: var(--bvl-gold-ink) !important;   /* was #fbbf24 */
}

html[data-theme="light"] .bv-stage__track .bv-card.is-near-left .bv-card__state,
html[data-theme="light"] .bv-stage__track .bv-card.is-near-right .bv-card__state {
  background: var(--bvl-surface-sunk) !important;
  border-color: var(--bvl-line) !important;
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.5) */
}

html[data-theme="light"] .bv-stage__track .bv-card.is-done .bv-card__state {
  color: var(--bvl-green-ink) !important;   /* was #4ade80 */
  background: rgba(21, 128, 61, 0.10) !important;
  border-color: rgba(21, 128, 61, 0.28) !important;
}

html[data-theme="light"] .bv-stage__track .bv-seg {
  border-color: var(--bvl-line-soft) !important;   /* was rgba(255, 255, 255, 0.07) */
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.02) */
}

html[data-theme="light"] .bv-stage__track .bv-seg--none {
  color: var(--bvl-ink-2) !important;   /* was rgba(255, 255, 255, 0.6) */
}

html[data-theme="light"] .bv-stage__track .bv-seg__name {
  color: var(--bvl-gold-ink) !important;   /* was #fbbf24 */
}

html[data-theme="light"] .bv-stage__track .bv-seg__group {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.4) */
}

html[data-theme="light"] .bv-field__name {
  color: var(--bvl-ink) !important;   /* was #fff */
}

html[data-theme="light"] .bv-field__share,
html[data-theme="light"] .bv-seg__weight,
html[data-theme="light"] .bv-field__max {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.4) */
}

html[data-theme="light"] .bv-field__input {
  background: var(--bvl-surface) !important;   /* was rgba(5, 12, 26, 0.7) */
  border-color: var(--bvl-line) !important;   /* was rgba(255, 255, 255, 0.12) */
  color: var(--bvl-ink) !important;   /* was #fff */
}

html[data-theme="light"] .bv-field__input:focus {
  border-color: var(--bvl-gold) !important;
  box-shadow: 0 0 0 3px rgba(255, 180, 0, 0.18) !important;
}

html[data-theme="light"] .bv-field__input[readonly] {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.55) */
  background: var(--bvl-surface-sunk) !important;
}

html[data-theme="light"] .bv-stage__hint { color: var(--bvl-red-ink) !important; }

html[data-theme="light"] .bv-field.is-missing .bv-field__input {
  border-color: var(--bvl-red-ink) !important;
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.16) !important;
}

/* ── Judge Review Panel (judge/review.blade.php) ── */
html[data-theme="light"] .bv-review__title {
  color: var(--bvl-ink) !important;   /* was #fff */
}

html[data-theme="light"] .bv-review__sub {
  color: var(--bvl-ink-2) !important;   /* was rgba(255, 255, 255, 0.55) */
}

html[data-theme="light"] .bv-review__seg {
  border-color: var(--bvl-line-soft) !important;   /* was rgba(255, 255, 255, 0.07) */
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.02) */
}

html[data-theme="light"] .bv-review__seg-name {
  color: var(--bvl-gold-ink) !important;   /* was #fbbf24 */
}

html[data-theme="light"] .bv-review__seg-count {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.5) */
}

html[data-theme="light"] .bv-review__row {
  background: var(--bvl-surface) !important;   /* was rgba(255, 255, 255, 0.02) */
  border-color: var(--bvl-line-soft) !important;   /* was rgba(255, 255, 255, 0.06) */
}

html[data-theme="light"] .bv-review__row:hover {
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.05) */
}

html[data-theme="light"] .bv-review__row-num {
  color: var(--bvl-gold-ink) !important;   /* was #fbbf24 */
}

html[data-theme="light"] .bv-review__row-name {
  color: var(--bvl-ink) !important;
}

html[data-theme="light"] .bv-review__row-score {
  color: var(--bvl-ink) !important;   /* was rgba(255, 255, 255, 0.8) */
}

html[data-theme="light"] .bv-review__row.is-missing .bv-review__row-score {
  color: var(--bvl-red-ink) !important;   /* was #f87171 */
}

html[data-theme="light"] .bv-review__row-go {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.25) */
}

html[data-theme="light"] .bv-review__skipped {
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.025) */
}

html[data-theme="light"] .bv-review__skipped-head {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.38) */
}

html[data-theme="light"] .bv-review__skipped-num,
html[data-theme="light"] .bv-review__skipped-name {
  color: var(--bvl-ink-2) !important;   /* was rgba(255, 255, 255, 0.5) */
}

html[data-theme="light"] .bv-review__empty {
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.03) */
  border-color: var(--bvl-line-soft) !important;   /* was rgba(255, 255, 255, 0.08) */
  color: var(--bvl-ink-2) !important;   /* was rgba(255, 255, 255, 0.82) */
}

html[data-theme="light"] .bv-review__done {
  color: var(--bvl-green-ink) !important;
}

/* ── Leaderboard & Stage Gates (elections/pageants.blade.php, panel/monitor.blade.php) ── */
html[data-theme="light"] .bv-board__row {
  background: var(--bvl-surface) !important;   /* was rgba(255, 255, 255, 0.02) */
  border-color: var(--bvl-line-soft) !important;   /* was rgba(255, 255, 255, 0.05) */
}

html[data-theme="light"] .bv-board__row.is-lead {
  background: rgba(255, 180, 0, 0.08) !important;   /* was rgba(255, 180, 0, 0.07) */
  border-color: rgba(138, 90, 0, 0.3) !important;   /* was rgba(255, 180, 0, 0.3) */
}

html[data-theme="light"] .bv-board__rank {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.5) */
}

html[data-theme="light"] .bv-board__row.is-lead .bv-board__rank {
  color: var(--bvl-gold-ink) !important;   /* was #ffb400 */
}

html[data-theme="light"] .bv-board__photo {
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255, 255, 255, 0.04) */
  border-color: var(--bvl-line-soft) !important;   /* was rgba(255, 255, 255, 0.08) */
}

html[data-theme="light"] .bv-board__photo--none {
  color: var(--bvl-gold-ink) !important;   /* was rgba(255, 255, 255, 0.4) */
}

html[data-theme="light"] .bv-board__name {
  color: var(--bvl-ink) !important;
}

html[data-theme="light"] .bv-board__number {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.35) */
}

html[data-theme="light"] .bv-board__score {
  color: var(--bvl-ink) !important;
}

html[data-theme="light"] .bv-gate-row {
  background: var(--bvl-surface) !important;   /* was rgba(255, 255, 255, 0.02) */
  border-color: var(--bvl-line-soft) !important;   /* was rgba(255, 255, 255, 0.06) */
}

html[data-theme="light"] .bv-gate-row--open {
  background: rgba(255, 180, 0, 0.08) !important;   /* was rgba(255, 180, 0, 0.07) */
  border-color: rgba(138, 90, 0, 0.3) !important;   /* was rgba(255, 180, 0, 0.35) */
}

html[data-theme="light"] .bv-gate-row__order {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.35) */
}

html[data-theme="light"] .bv-gate-row--open .bv-gate-row__order {
  color: var(--bvl-gold-ink) !important;   /* was #ffb400 */
}

html[data-theme="light"] .bv-gate-row__name {
  color: var(--bvl-ink) !important;
}

html[data-theme="light"] .bv-gate-row__state {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.4) */
}

html[data-theme="light"] .bv-gate-row--open .bv-gate-row__state {
  color: var(--bvl-gold-ink) !important;   /* was rgba(255, 180, 0, 0.85) */
}

html[data-theme="light"] .bv-gate-row__stage {
  color: var(--bvl-ink-muted) !important;   /* was rgba(255, 255, 255, 0.28) */
}

/* ── Ballot Verification Page (ballot/verify.blade.php) ──
   This page uses inline styles extensively for its verification result cards.
   The section 12 safety net catches most, but specific card backgrounds need
   explicit overrides. */
html[data-theme="light"] [style*="background:rgba(8,16,40,0.95)"] {
  background: var(--bvl-surface) !important;   /* was rgba(8,16,40,0.95) */
  border-color: var(--bvl-line) !important;
}

html[data-theme="light"] [style*="background:rgba(8,16,40,0.7)"] {
  background: var(--bvl-surface-sunk) !important;   /* was rgba(8,16,40,0.7) */
  border-color: var(--bvl-line) !important;
}

html[data-theme="light"] [style*="background:rgba(34,197,94,0.06)"] {
  background: rgba(21, 128, 61, 0.08) !important;   /* was rgba(34,197,94,0.06) */
  border-color: rgba(21, 128, 61, 0.35) !important;
}

/* Owner-only card border on ballot verify page */
html[data-theme="light"] [style*="border-bottom:1px solid rgba(255,255,255,0.05)"] {
  border-bottom-color: var(--bvl-line-soft) !important;   /* was rgba(255,255,255,0.05) */
}

/* Profile Edit Page (profile/edit.blade.php) ──
   The student details form uses some inline styles that need handling. */
html[data-theme="light"] .bv-profile-details__summary {
  color: var(--bvl-ink-2) !important;
}

html[data-theme="light"] .bv-profile-details__form {
  color: var(--bvl-ink) !important;
}

/* Welcome Page (welcome.blade.php) ──
   Note: This page hardcodes dark theme and does not include theme-init.blade.php.
   These rules are provided for when theme-init is added, but will not take
   effect until the view is updated to include it. */
html[data-theme="light"] .bv-auth-page {
  background: var(--bvl-canvas) !important;
}

html[data-theme="light"] [style*="border-top: 2px solid rgba(255,180,0,0.4)"] {
  border-top-color: var(--bvl-gold) !important;   /* was rgba(255,180,0,0.4) */
}

html[data-theme="light"] [style*="color: #3b82f6"] {
  color: var(--bvl-blue-ink) !important;   /* was #3b82f6 */
}

html[data-theme="light"] [style*="border-color: rgba(59,130,246,0.3)"] {
  border-color: rgba(37, 99, 235, 0.35) !important;   /* was rgba(59,130,246,0.3) */
}

html[data-theme="light"] [style*="border: 1px solid rgba(255,255,255,0.1)"] {
  border-color: var(--bvl-line) !important;   /* was rgba(255,255,255,0.1) */
}

html[data-theme="light"] [style*="background: rgba(255,255,255,0.05)"] {
  background: var(--bvl-surface-sunk) !important;   /* was rgba(255,255,255,0.05) */
}

html[data-theme="light"] [style*="border-t border-white/5"] {
  border-top-color: var(--bvl-line-soft) !important;   /* was border-white/5 */
}

/* Ballot Lookup Page (ballot/lookup.blade.php) ──
   Has the same dark inline style as ballot verify. */
html[data-theme="light"] [style*="border:1px solid rgba(255,180,0,0.25)"] {
  border-color: rgba(138, 90, 0, 0.35) !important;   /* was rgba(255,180,0,0.25) */
}

/* Additional inline style patterns for safety */
html[data-theme="light"] [style*="border:1px solid rgba(239,68,68,0.35)"] {
  border-color: rgba(185, 28, 28, 0.35) !important;   /* was rgba(239,68,68,0.35) */
}

html[data-theme="light"] [style*="border-left:4px solid #ef4444"] {
  border-left-color: var(--bvl-red-ink) !important;   /* was #ef4444 */
}

html[data-theme="light"] [style*="border-left:4px solid #22c55e"] {
  border-left-color: var(--bvl-green-ink) !important;   /* was #22c55e */
}

html[data-theme="light"] [style*="border-left:4px solid #FFB400"] {
  border-left-color: var(--bvl-gold) !important;   /* was #FFB400 */
}

html[data-theme="light"] [style*="color:#ef4444"] {
  color: var(--bvl-red-ink) !important;   /* was #ef4444 */
}

html[data-theme="light"] [style*="color:#22c55e"] {
  color: var(--bvl-green-ink) !important;   /* was #22c55e */
}

html[data-theme="light"] [style*="color:#FFB400"] {
  color: var(--bvl-gold-ink) !important;   /* was #FFB400 */
}

html[data-theme="light"] [style*="color:#f87171"] {
  color: var(--bvl-red-ink) !important;   /* was #f87171 */
}

html[data-theme="light"] [style*="color:#4ade80"] {
  color: var(--bvl-green-ink) !important;   /* was #4ade80 */
}

html[data-theme="light"] [style*="color:#eab308"] {
  color: var(--bvl-amber-ink) !important;   /* was #eab308 */
}

/* ── 16. LIGHT MODE FIXES (mobile pass) ─────────────────────────────── */

/* ── Personal Electoral Log Table (voter/dashboard.blade.php) ──
   Mobile table scroll hint gradient fades to navy in dark mode, but
   needs to fade to the light card surface in light mode. The ::after
   pseudo-element is absolutely positioned inside the scrolling box,
   so it also scrolls into the middle. Fix: change gradient colors
   and ensure it stays at the right edge of the visible area. */
@media (max-width: 1023.98px) {
  html[data-theme="light"] .bv-table-container::after {
    background: linear-gradient(to right, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.12)) !important;   /* was rgba(10, 22, 40, 0), rgba(10, 22, 40, 0.85) */
  }
}

/* ── Pageant Ballot (voter/candidates.blade.php) ──
   Unselected choice circles should be empty with visible border in light mode,
   not solid dark grey. The check icon stays hidden until selected. */
html[data-theme="light"] .bv-ballot-check {
  background: var(--bvl-surface) !important;   /* was rgba(6, 16, 30, 0.65) */
  backdrop-filter: none !important;   /* was blur(4px) */
}

/* Selected state keeps gold fill as in dark mode */
html[data-theme="light"] .bv-ballot-input:checked + .bv-ballot-card .bv-ballot-check {
  background: var(--bvl-gold) !important;   /* was #FFB400 */
  border-color: var(--bvl-gold) !important;   /* was #FFB400 */
}

/* ── Topbar transparency fix ──
   Make the light topbar solid instead of translucent so content doesn't
   show through behind it. This affects all pages with a topbar. */
html[data-theme="light"] .bv-topbar {
  background: var(--bvl-surface) !important;   /* was rgba(255, 255, 255, 0.82) */
}

/* ── Ballot Commit Box and Abstain Card ──
   Give them clean light surfaces instead of muddy grey/beige. */
html[data-theme="light"] .bv-ballot-commit {
  background: var(--bvl-surface) !important;   /* was rgba(255, 255, 255, 0.025) */
  border-color: var(--bvl-line) !important;   /* was rgba(255, 180, 0, 0.28) */
}

html[data-theme="light"] .bv-ballot-card--abstain {
  background: var(--bvl-surface) !important;   /* was var(--bvl-surface-sunk) */
}

/* Selected Abstain card keeps gold border */
html[data-theme="light"] .bv-ballot-input:checked + .bv-ballot-card--abstain {
  border-color: var(--bvl-gold) !important;
}

/* ── My Profile - Secure Hash Identifier (profile/edit.blade.php) ──
   Fix the masked hash color from purple/indigo to readable ink-2. */
html[data-theme="light"] .bv-hash__mask {
  color: var(--bvl-ink-2) !important;   /* was #818cf8 */
}

/* Fix the reveal button layout: make it a 34x34 circle on the same row as the hash.
   The issue is the @media (max-width: 1400px) rule in beevote.css that wraps flex items.
   Override that for light mode to keep them on the same row. */
@media (max-width: 1400px) {
  html[data-theme="light"] .bv-hash {
    flex-wrap: nowrap !important;   /* was wrap */
  }

  html[data-theme="light"] .bv-hash__mask,
  html[data-theme="light"] .bv-hash__value {
    flex: 1 1 auto !important;   /* was 1 1 100% */
  }

  html[data-theme="light"] .bv-reveal-btn {
    flex-shrink: 0 !important;
    width: 34px !important;
    height: 34px !important;
  }
}

/* Ensure the revealed hash wraps inside the box and is readable */
html[data-theme="light"] .bv-hash__value {
  color: var(--bvl-ink) !important;   /* was rgba(255, 255, 255, 0.6) */
}

/* Hash container background in light mode */
html[data-theme="light"] .bv-hash {
  background: var(--bvl-surface-sunk) !important;   /* was rgba(0, 0, 0, 0.28) */
  border-color: var(--bvl-line) !important;   /* was rgba(255, 255, 255, 0.06) */
}

/* ── Mobile hash font size fix ──
   Ensure hash remains readable at mobile sizes */
@media (max-width: 1023.98px) {
  html[data-theme="light"] .bv-hash {
    font-size: 10px !important;   /* was 8px */
  }
}

/* ── 17. LIGHT MODE FIXES (unreadable-text sweep, 2026-09-28) ─────────
   Found by scanning every view in light mode for text under 2:1 against
   its own background. Each rule below had no light override, so it kept
   its dark-theme white (or gold) and vanished on the light canvas. */

/* Dropdown lists. The base sheet forces every <option> onto #0f1932 with
   !important; the light rule above repainted the text dark but left that
   navy fill, so an open dropdown was dark text on navy. */
html[data-theme="light"] select option {
  background: var(--bvl-surface) !important;   /* was #0f1932 */
}
html[data-theme="light"] select option:hover,
html[data-theme="light"] select option:checked {
  background: rgba(255, 180, 0, 0.22) !important;   /* was rgba(255,180,0,0.25) over navy */
}

/* Amber alert (2FA recovery codes, and wherever else it appears). */
html[data-theme="light"] .bv-alert--amber {
  background: rgba(180, 83, 9, 0.07) !important;
  border: 1px solid rgba(180, 83, 9, 0.28) !important;
  color: var(--bvl-amber-ink) !important;   /* was #F59E0B, 2.0:1 */
}

/* Election Results picker (results/index.blade.php, page-scoped <style>). */
html[data-theme="light"] .bv-result-picker__label { color: var(--bvl-ink-muted) !important; }   /* was rgba(255,255,255,0.35) */
html[data-theme="light"] .bv-result-pick {
  background: var(--bvl-surface) !important;   /* was rgba(255,255,255,0.05) */
  border-color: var(--bvl-line) !important;
  box-shadow: var(--bvl-shadow) !important;
}
html[data-theme="light"] .bv-result-pick:hover {
  border-color: rgba(138, 90, 0, 0.45) !important;
  background: #fffbf0 !important;
}
html[data-theme="light"] .bv-result-pick__title { color: var(--bvl-ink) !important; }   /* was #ffffff */
html[data-theme="light"] .bv-result-pick__facts { border-top-color: var(--bvl-line-soft) !important; }
html[data-theme="light"] .bv-result-pick__facts dt { color: var(--bvl-ink-muted) !important; }   /* was rgba(255,255,255,0.35) */
html[data-theme="light"] .bv-result-pick__facts dd { color: var(--bvl-ink) !important; }   /* was rgba(255,255,255,0.85) */
html[data-theme="light"] .bv-result-pick__cta { color: var(--bvl-gold-ink) !important; }   /* was #FFB400 */
html[data-theme="light"] .bv-results-note {
  border-color: rgba(15, 23, 42, 0.18) !important;
  color: var(--bvl-ink-2) !important;   /* was rgba(255,255,255,0.45) */
}
html[data-theme="light"] .bv-results-back { color: var(--bvl-gold-ink) !important; }   /* was rgba(255,255,255,0.45) */

/* Transparency Portal tabs (transparency/portal.blade.php, page-scoped <style>). */
html[data-theme="light"] .bv-tab-btn { color: var(--bvl-ink-muted) !important; }   /* was rgba(255,255,255,0.4) */
html[data-theme="light"] .bv-tab-btn:hover { color: var(--bvl-ink) !important; }
html[data-theme="light"] .bv-tab-btn.active { color: var(--bvl-gold-ink) !important; }   /* was #FFB400 */
html[data-theme="light"] .bv-tab-btn.active::after { box-shadow: none !important; }

/* Pageant criteria tree: the "N hidden" count on a collapsed row. */
html[data-theme="light"] .bv-node__count { color: var(--bvl-ink-muted) !important; }   /* was rgba(255,255,255,0.3) */

/* Sign-in and two-factor screens (layouts/bv-auth.blade.php, page-scoped
   <style>). Every text rule there is white on the dark card, so in light
   mode the 2FA lead line, the "Lost your authenticator device?" link and
   "Back to sign in" all disappeared, leaving blank gaps in the card. */
html[data-theme="light"] .bv-auth-lead { color: var(--bvl-ink-2) !important; }   /* was rgba(255,255,255,0.5) */
html[data-theme="light"] .bv-auth-hint { color: var(--bvl-ink-muted) !important; }   /* was rgba(255,255,255,0.25) */
html[data-theme="light"] .bv-auth-error { color: var(--bvl-red-ink) !important; }   /* was #ef4444 */
html[data-theme="light"] .bv-otp-input::placeholder { color: var(--bvl-ink-faint) !important; }   /* was rgba(255,255,255,0.14) */
html[data-theme="light"] .bv-auth-step__num {
  color: var(--bvl-blue-ink) !important;   /* was #fff */
  background: rgba(37, 99, 235, 0.10) !important;
  border-color: rgba(37, 99, 235, 0.35) !important;
}
html[data-theme="light"] .bv-auth-step__text { color: var(--bvl-ink-2) !important; }   /* was rgba(255,255,255,0.55) */
html[data-theme="light"] .bv-auth-qr { border: 1px solid var(--bvl-line) !important; }
html[data-theme="light"] .bv-auth-key {
  color: var(--bvl-ink) !important;   /* was rgba(255,255,255,0.75) */
  background: var(--bvl-surface-sunk) !important;
  border-color: var(--bvl-line) !important;
}
html[data-theme="light"] .bv-code-grid {
  background: var(--bvl-surface-sunk) !important;
  border-color: var(--bvl-line) !important;
}
html[data-theme="light"] .bv-code-grid__item { color: var(--bvl-ink) !important; }   /* was rgba(255,255,255,0.85) */
html[data-theme="light"] .bv-auth-link { color: var(--bvl-ink-2) !important; }   /* was rgba(255,255,255,0.45) */
html[data-theme="light"] .bv-auth-link:hover { color: var(--bvl-ink) !important; }
html[data-theme="light"] .bv-auth-alt { border-top-color: var(--bvl-line-soft) !important; }
html[data-theme="light"] .bv-auth-alt summary { color: var(--bvl-ink-2) !important; }   /* was rgba(255,255,255,0.4) */
html[data-theme="light"] .bv-auth-alt summary:hover,
html[data-theme="light"] .bv-auth-alt[open] summary { color: var(--bvl-ink) !important; }
html[data-theme="light"] .bv-auth-exit { border-top-color: var(--bvl-line-soft) !important; }
html[data-theme="light"] .bv-auth-exit__btn { color: var(--bvl-ink-2) !important; }   /* was rgba(255,255,255,0.28) */
html[data-theme="light"] .bv-auth-exit__btn:hover { color: var(--bvl-red-ink) !important; }
html[data-theme="light"] .bv-auth-exit__note { color: var(--bvl-ink-muted) !important; }   /* was rgba(255,255,255,0.2) */

/* The sideways-scroll edge fade on .bv-table-container (beevote.css,
   640px block) is navy for the dark card; on a light card that reads as
   a smudge. Same geometry, a soft grey shadow. */
@media (max-width: 640px) {
  @supports (animation-timeline: scroll()) {
    html[data-theme="light"] .bv-table-container {
      background-image:
        linear-gradient(to left, rgba(15, 23, 42, 0.14), rgba(15, 23, 42, 0)),
        linear-gradient(to right, rgba(15, 23, 42, 0.14), rgba(15, 23, 42, 0));
    }
  }
}
