﻿/* Pit Board â€” the comp-facing skin for every surface outside the bracket board.
   Ported from .impeccable/sketches/pit-board-kit/kit.css and written against the
   app's existing classes and ids, so renderer changes stay minimal.
   Loaded after redesign.css and bracket-race.css.

   ACCENT: polished chrome in the Prodigy theme (owner pick 2026-11-22, replaces
   the yellow); RÃªve D keeps its red/black/white. Fills always use --live-fill so
   every chrome surface shares one gradient. */

:root {
  --live-fill: linear-gradient(180deg, var(--live), color-mix(in srgb, var(--live) 84%, #000));
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --sheen: rgba(255, 255, 255, .16);
}

:root[data-theme="prodigy"] {
  --live: #e9edf5;
  --live-ink: #0b0b0c;
  --live-shadow: #7d8594;
  --live-fill: linear-gradient(180deg, #ffffff 0%, #e3e7ef 38%, #aeb5c2 62%, #e7ebf2 100%);
}

:root[data-theme="reve-d"] {
  --live: #CF0B23;
  --live-ink: #ffffff;
  --live-shadow: #6d0613;
}

/* ---------- ALIGNMENT ----------
   The blanket `text-align: center !important` rules are gone. Centred now means
   exactly this: a label inside a button or a tag, a bar title, a stat value, a
   number/seed block, a single-column empty state and a numeric cell. Every other
   part of a multi-part row or card sits on the shared left edge. */
.button, .micro-button, .mode-tab, .race-programme-status, .status-pill,
.driver-status-chip, .streamer-status-pill, .competition-vote-pill,
.qp-status-compact, .results-event-badge {
  text-align: center !important;
}
.notice, .toast, .sync-recovery-notice, .empty-state { text-align: center !important; }
.panel-header h2, .panel-header h3 { text-align: left !important; }
th { text-align: left !important; }
.helper-text, .streamer-section-copy, .command-center-note,
.panel-intro, .self-register-copy, .qualifying-live-note,
.race-programme-name, .race-programme-copy,
.results-event-name, .self-register-status, .self-register-status small {
  text-align: left !important;
}
label, .field-label, .search-field > span { text-align: left !important; }
td:not(.num):not(.numeric) { text-align: left !important; }
td.num, td.numeric, th.num, th.numeric { text-align: right !important; }

/* =================== 2. PANELS ===================
   The pit board is a dark raised slab on carbon. No white or cream anywhere
   outside the bracket cards themselves (supersedes D-07). The Prodigy theme's
   own token names are re-pointed here, so every legacy rule that spends
   --c-card or --c-ink inherits the dark world without being rewritten. */
:root[data-theme="prodigy"] {
  --panel-top: #222226;
  --panel-bot: #141416;
  --edge: #34343a;
  --row: #1f1f23;
  --row-live-a: #3d0b11;
  --plate-a: #2d2d32;
  --plate-b: #232327;
  --plate-edge: #4c4c54;
  --seed: #0b0b0c;
  --brand-hi: #e0283a;
  --danger-text: #ff7680;
  --rail: #3b3d38;
  --app-text: #f2efe6;
  --app-muted: #b3afa4;
  --app-dim: #8a877f;

  --c-card: #1f1f23;
  --c-ink: #f2efe6;
  --c-ink-soft: #c9c6bd;
  --c-muted: #b3afa4;
  --c-rule: rgba(255, 255, 255, .13);
  --c-line-strong: #4c4c54;
  --c-bar: #0b0b0c;
  --c-bar-text: #ffffff;
  --c-block: #0b0b0c;
  --c-block-text: #ffffff;
  --c-text-on-bar: #ffffff;
  --c-on-dark-text: #f2efe6;
  --c-on-dark-muted: #b3afa4;
  --c-line-strong: #4c4c54;
  --c-kerb-a: #b0121f;
  --c-kerb-b: #f4f1e6;
  --border-box: 1px solid var(--edge);
  --shadow-card:
    inset 0 1px 0 rgba(255, 255, 255, .07),
    0 22px 44px -22px rgba(0, 0, 0, .85),
    0 2px 0 rgba(0, 0, 0, .5);
  color-scheme: dark;
}

:root[data-theme="reve-d"] {
  --panel-top: #18181b;
  --panel-bot: #0e0e10;
  --edge: #2e2e33;
  --row: #161619;
  --row-live-a: #4a0610;
  --plate-a: #232327;
  --plate-b: #1a1a1d;
  --plate-edge: #45454d;
  --seed: #000000;
  --brand-hi: #ff2a43;
  --danger-text: #ff7a88;
  --rail: #3b3d38;
  --app-text: #ffffff;
  --app-muted: #b9b9bf;
  --app-dim: #8d8d94;
  --shadow-card:
    inset 0 1px 0 rgba(255, 255, 255, .07),
    0 22px 44px -22px rgba(0, 0, 0, .85),
    0 2px 0 rgba(0, 0, 0, .5);
}

.panel, .modal-card, .modal-content, .command-center,
.streamer-hero-panel {
  position: relative;
  background: linear-gradient(180deg, var(--panel-top), var(--panel-bot)) !important;
  border: 1px solid var(--edge) !important;
  border-radius: 4px !important;
  box-shadow: var(--shadow-card) !important;
  color: var(--app-text) !important;
  overflow: hidden;
}
.hero, .hero-simple {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
.panel { container-type: inline-size; padding: 0; margin-bottom: 16px; }
.panel::after { display: none !important; }
.panel .panel, .panel .modal-card { box-shadow: none !important; }

/* Head: the slanted black tab, an optional tag on the right, then the rule. */
.panel-header, .streamer-section-head, .command-center-head {
  position: relative !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px 12px !important;
  min-height: 0 !important;
  padding: 16px 18px 0 !important;
  background: transparent !important;
  border: 0 !important;
  text-align: left !important;
}
.panel-header::after {
  content: "" !important;
  flex: 0 0 100% !important;
  height: 3.5px;
  margin-top: 6px;
  background: var(--c-brand);
}
.panel-header > div:first-child { display: flex !important; flex: 0 1 auto !important; justify-content: flex-start !important; min-width: 0; }
.panel-header h2, .panel-header h3,
.streamer-section-head h2, .command-center-head h2,
.panel-header .streamer-panel-kicker {
  position: static !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 0 22px 0 18px !important;
  background: #0b0b0c !important;
  color: #fff !important;
  font-family: var(--font-body) !important;
  font-weight: 800 !important;
  font-style: italic !important;
  text-transform: uppercase;
  font-size: 17px !important;
  line-height: 1 !important;
  letter-spacing: .02em !important;
  white-space: nowrap;
  clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
}
.panel-header h2::before, .panel-header h3::before,
.streamer-section-head h2::before {
  content: "//";
  color: var(--brand-hi);
  letter-spacing: -.12em;
  font-size: 19px;
  font-style: italic;
}
.panel-header h2 span, .panel-header h3 span, .streamer-section-head h2 span {
  color: #fff !important;
  background: transparent !important;
  min-height: 0;
  padding: 0 !important;
  font: inherit !important;
}
.panel-header .status-pill, .panel-header .micro-button,
.panel-header > .button, .panel-header .button-row {
  position: static !important;
  margin-left: auto !important;
  right: auto !important;
}
.panel-body, .panel > :not(.panel-header) { padding: 16px 18px 18px !important; }
.panel > .table-wrap { padding: 0 !important; }
.panel-foot, .panel-footer, .panel-actions {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px 18px;
  border-top: 1px solid var(--edge);
}
.panel-foot .grow, .panel-actions .grow { flex: 1; }

/* ---------- TAG: the LIVE-tag shape, every status ----------
   Replaces every pill and chip. live = chrome fill, done = brand + the authored
   SVG check (no unicode tick), next = black inside a light inset outline. */
.race-programme-status, .judge-lane-status-pill, .competition-vote-pill,
.status-pill, .qp-status-compact, .driver-status-chip, .streamer-status-pill,
.topbar-inline-pill, .results-event-badge, .hero-meta-pill {
  position: relative;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 28px;
  min-width: 88px;
  max-width: 100%;
  padding: 0 14px 0 12px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #2c2c31 !important;
  color: #d9d6cc !important;
  font-family: var(--font-body);
  font-weight: 800 !important;
  font-style: italic;
  font-size: 12.5px !important;
  line-height: 1;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap !important;
  box-shadow: none !important;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}
.race-programme-status.live, .judge-lane-status-pill.is-live, .status-pill.live,
.streamer-status-pill.live, .competition-vote-pill.is-lead, .results-event-badge.is-live {
  background: var(--live-fill) !important;
  color: var(--live-ink) !important;
}
.race-programme-status.done, .status-pill.done, .judge-lane-status-pill.is-submitted,
.competition-vote-pill.is-done {
  background: var(--c-brand) !important;
  color: #fff !important;
}
.race-programme-status.live::after,
.judge-lane-status-pill.is-live::after,
.results-event-badge.is-live::after {
  content: "//";
  order: -1;
  color: currentColor;
  opacity: .55;
  letter-spacing: -.15em;
  margin-right: -2px;
}
.race-programme-status.done::after, .judge-lane-status-pill.is-submitted::after,
.status-pill.done::after {
  content: "";
  width: 11px;
  height: 11px;
  order: -1;
  margin-right: 1px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 8.6l3.4 3.3L13.5 4.2' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='square'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 8.6l3.4 3.3L13.5 4.2' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='square'/%3E%3C/svg%3E") center / contain no-repeat;
}
.race-programme-status.next, .status-pill.next {
  isolation: isolate;
  background: #d9d6cc !important;
  color: #fff !important;
}
.race-programme-status.next::before, .status-pill.next::before {
  content: "";
  position: absolute;
  inset: 1.5px;
  z-index: -1;
  background: #0b0b0c;
  clip-path: polygon(7px 0, 100% 0, calc(100% - 7px) 100%, 0 100%);
}
.race-programme-status.active, .status-pill.active, .race-programme-status.pending {
  background: #0b0b0c !important;
  color: #fff !important;
  box-shadow: inset 0 0 0 1.5px #55555c !important;
}
.race-programme-status.warn, .status-pill.warn {
  background: var(--c-brand) !important;
  color: #fff !important;
}

/* ---------- BUTTON: slanted, labels centred, never moves on hover ---------- */
.button, .micro-button, .btn {
  position: relative;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  height: 42px;
  min-height: 42px;
  min-width: 120px;
  padding: 0 22px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #2e2e33;
  color: var(--app-text);
  font-family: var(--font-body) !important;
  font-weight: 800 !important;
  font-style: italic !important;
  font-size: 13.5px !important;
  line-height: 1 !important;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  transition: transform .08s ease, filter .15s ease, background-color .15s ease;
}
.button-accent, .button-primary, .btn.primary {
  background: var(--live-fill) !important;
  color: var(--live-ink) !important;
  border: 0 !important;
  box-shadow: inset 0 -3px 0 var(--live-shadow) !important;
}
.button-secondary, .btn.ghost, .micro-button {
  isolation: isolate;
  background: #6a6a72 !important;
  color: var(--app-text) !important;
}
.button-secondary::before, .btn.ghost::before, .micro-button::before {
  content: "";
  position: absolute;
  inset: 1.5px;
  z-index: -1;
  background: linear-gradient(180deg, #2e2e33, #222226);
  clip-path: polygon(9px 0, 100% 0, calc(100% - 9px) 100%, 0 100%);
}
.button-danger, .btn.danger {
  isolation: isolate;
  background: var(--c-brand) !important;
  color: var(--danger-text) !important;
}
.button-danger::before, .btn.danger::before {
  content: "";
  position: absolute;
  inset: 1.5px;
  z-index: -1;
  background: #17171a;
  clip-path: polygon(9px 0, 100% 0, calc(100% - 9px) 100%, 0 100%);
}
.micro-button { height: 34px; min-height: 34px; min-width: 84px; padding: 0 14px !important; font-size: 12px !important; }
.button[disabled], .button[aria-disabled="true"], .micro-button[disabled] { opacity: .45 !important; cursor: not-allowed; }
.button:active:not([disabled]), .micro-button:active:not([disabled]) { transform: translateY(2px); }
.button-accent:active:not([disabled]) { box-shadow: inset 0 -1px 0 var(--live-shadow) !important; }
.button:focus-visible, .micro-button:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--live) !important;
  outline-offset: 3px !important;
  box-shadow: none !important;
}

/* =================== STEPS: the event programme ===================
   A slanted 64 px number block, the copy, then an action group of a 96 px tag
   and a 150 px button, joined by a 4.5 px rail that is never dashed. */
.race-programme {
  display: grid;
  gap: 10px;
  border: 0;
  background: transparent;
  box-shadow: none;
  position: relative;
  counter-reset: step;
}
.race-programme::before {
  content: "";
  position: absolute;
  left: 30px;
  top: 30px;
  bottom: 30px;
  width: 4.5px;
  background: var(--rail);
  z-index: 0;
}
.race-programme-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0 16px;
  min-height: 78px;
  padding: 0;
  border: 1px solid var(--edge);
  border-radius: 3px;
  background: var(--row);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 6px 14px -8px rgba(0, 0, 0, .7);
  text-align: left;
}
.race-programme-row:nth-child(even) { background: var(--row); }
.race-programme-row:last-child { border-bottom: 1px solid var(--edge); }
.race-programme-step {
  align-self: stretch;
  display: grid;
  place-items: center;
  height: auto;
  min-height: 78px;
  padding-right: 8px;
  background: #0b0b0c;
  color: #fff;
  font-size: 26px;
  font-weight: 800;
  font-style: italic;
  clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
}
.race-programme-txt { min-width: 0; padding: 12px 0; }
.race-programme-name {
  padding: 0;
  font-weight: 800;
  font-style: italic;
  text-transform: uppercase;
  font-size: 20px;
  line-height: 1.05;
  letter-spacing: .01em;
  color: var(--app-text);
}
.race-programme-copy {
  margin-top: 4px;
  padding: 0;
  color: var(--app-muted);
  font-size: 14.5px;
  line-height: 1.35;
}
.race-programme-action {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 14px 0 0;
  justify-content: flex-end;
}
.race-programme-action .race-programme-status { width: 96px; min-width: 96px; }
.race-programme-action .button { width: 150px; min-width: 0; padding: 0 12px !important; }
.race-programme-row.is-live {
  background: linear-gradient(90deg, color-mix(in srgb, var(--live) 16%, var(--row)), var(--row) 70%);
  border: 1.5px solid var(--live);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 8px 22px -10px color-mix(in srgb, var(--live) 45%, transparent);
}
.race-programme-row.is-live .race-programme-step { background: var(--live-fill); color: var(--live-ink); }
.race-programme-row.is-done .race-programme-step { background: var(--c-brand); }
.race-programme-row.is-later { opacity: .92; }
.race-programme-row.is-later .race-programme-name { color: #d9d6cc; }
.race-home-primary .button { min-width: 220px; }

/* =================== 3. TABLES ===================
   A score table is still a table, but it lives on the same dark slab. */
table, .table-wrap { background: transparent !important; }
thead, .table-wrap thead { background: #0b0b0c !important; }
th { background: #0b0b0c !important; color: #fff !important; border-bottom: 1.6px solid var(--edge) !important; }
td { background: transparent !important; color: var(--app-text) !important; border-bottom: 1px solid var(--edge) !important; }
tbody tr:nth-child(even) td { background: rgba(255, 255, 255, .022) !important; }
tbody tr:hover td { background: color-mix(in srgb, var(--row) 82%, var(--c-brand)) !important; }
tbody tr.is-current-driver td, tr[aria-selected="true"] td { background: color-mix(in srgb, var(--row-live-a) 55%, transparent) !important; }

/* judge plate seed block */
.competition-vote-option > .seed {
  grid-column: 1; grid-row: 1 / span 2; align-self: stretch;
  display: grid; place-items: center;
  background: var(--seed); color: #fff;
  font-weight: 800; font-style: italic; font-size: 21px;
  box-shadow: inset -1.6px 0 0 var(--plate-edge);
}
/* =================== 4. PLATE: every driver row outside the bracket =================== */
.mobile-driver-card, .registration-card, .podium-card, .role-admin-card,
.result-item, .match-card, .summary-card, .page-handoff, .public-event-card,
.results-event-card, .streamer-help-card, .judge-lane-shell, .judge-score-card,
.competition-score-stage-card, .competition-score-lock-card, .judge-lane-note {
  position: relative;
  background: linear-gradient(180deg, var(--plate-a), var(--plate-b)) !important;
  border: 1.6px solid var(--plate-edge) !important;
  border-radius: 4px !important;
  color: var(--app-text) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .07),
    0 4px 10px -4px rgba(0, 0, 0, .6),
    0 12px 22px -14px rgba(0, 0, 0, .85),
    0 6px 26px -6px transparent !important;
}
.mobile-driver-card.is-current-driver, .registration-card.is-current-driver {
  background: linear-gradient(180deg, color-mix(in srgb, var(--row-live-a) 60%, var(--plate-a)), var(--plate-b)) !important;
  border-color: color-mix(in srgb, var(--brand-hi) 60%, var(--plate-edge)) !important;
}
.mobile-driver-name, .registration-card-title strong, .event-card-head strong, .podium-card strong {
  color: #fff !important;
  font-weight: 600 !important;
}
.mobile-driver-name {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mobile-driver-subline, .mobile-driver-reg, .plate-meta {
  display: block;
  color: var(--app-muted) !important;
  font-size: 12.5px !important;
  letter-spacing: .02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mobile-seed-index {
  background: var(--seed) !important;
  color: #fff !important;
  font-weight: 800 !important;
  font-style: italic !important;
  font-size: 21px !important;
  box-shadow: inset -1.6px 0 0 var(--plate-edge) !important;
}
.registration-roster-count, .qualifying-live-progress {
  background: var(--seed) !important;
  color: #fff !important;
  font-weight: 800 !important;
  font-style: italic !important;
}

/* =================== 5. FORM =================== */
label, .field-label, .search-field > span {
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: .12em !important;
  text-transform: uppercase !important;
  color: var(--app-muted) !important;
}
input, select, textarea {
  background: #0f0f11 !important;
  color: var(--app-text) !important;
  border: 1.5px solid #3c3c42 !important;
  border-radius: 2px !important;
  min-height: 44px;
  padding: 0 12px !important;
  font-family: var(--font-body) !important;
  font-weight: 500 !important;
  font-size: 16px !important;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .5) !important;
}
input:focus, select:focus, textarea:focus {
  outline: none !important;
  border-color: var(--live) !important;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .5), 0 0 0 3px color-mix(in srgb, var(--live) 25%, transparent) !important;
}
input::placeholder, textarea::placeholder { color: #6f6f77 !important; }
option { background: #0f0f11; color: var(--app-text); }
::selection { background: var(--c-brand) !important; color: #fff !important; }
input, textarea { caret-color: var(--live); }
.field, .form-field, .input-group { display: grid; gap: 6px; }
.registration-form-grid, .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 760px) { .registration-form-grid, .form-grid { grid-template-columns: 1fr; } }

/* =================== 6. EVENT ENTRIES: Manage events ===================
   A hairline-separated list, not a card inside a card. */
.event-card, .results-event-card {
  background: transparent !important;
  border: 0 !important;
  border-top: 1px solid var(--edge) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}
.event-card:first-child, .results-event-card:first-child { border-top: 0 !important; }
.event-card.is-active, .event-card.is-current, .results-event-card.is-active {
  background: linear-gradient(90deg, color-mix(in srgb, var(--row-live-a) 70%, transparent), transparent 75%) !important;
}
.event-card-head, .event-card-actions {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 16px 16px 0;
}
.event-card-meta, .event-card-summary { padding: 4px 16px 0; color: var(--app-muted) !important; font-size: 14px; }
.event-card-grid, .event-card-overview {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px; margin: 14px 16px 0; background: var(--edge); border: 1px solid var(--edge);
}
.event-card-grid > *, .event-card-overview > * { background: #121214; padding: 10px 12px; }
.event-card-actions { padding: 14px 16px 16px; justify-content: flex-end; }

/* =================== 7. JUDGE VOTE ===================
   LEAD / CHASE are dark plates; the selected one is brand-outlined with a check.
   OMT is the striped button. The tally is a 3-cell strip. */
.judge-lane-shell, .competition-judge-card { border: 0 !important; background: transparent !important; box-shadow: none !important; }
.judge-lane-toolbar { display: grid; gap: 10px; padding: 0 0 14px; border-bottom: 1px solid var(--edge); }
.judge-lane-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.judge-lane-meta strong, .judge-lane-progress {
  color: #fff !important;
  font-weight: 800 !important;
  font-style: italic !important;
  text-transform: uppercase !important;
  font-size: 20px !important;
  line-height: 1 !important;
}
.judge-lane-progress { font-size: 11.5px !important; letter-spacing: .14em !important; color: var(--app-muted) !important; }
.judge-lane-status-row { display: flex; flex-wrap: wrap; gap: 8px; }
.judge-lane-note { margin: 0; padding: 10px 0 0; color: var(--app-muted) !important; font-size: 13px; border: 0 !important; background: transparent !important; box-shadow: none !important; }
.competition-vote-grid { display: grid; gap: 12px; margin-top: 14px; }
.competition-vote-option {
  position: relative !important;
  display: grid !important;
  grid-template-columns: 52px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 0 12px !important;
  width: 100% !important;
  min-height: 64px !important;
  padding: 0 !important;
  text-align: left !important;
  background: linear-gradient(180deg, var(--plate-a), var(--plate-b)) !important;
  border: 1.6px solid var(--plate-edge) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  clip-path: none !important;
  isolation: isolate;
  overflow: hidden;
  transition: border-color .18s ease, outline-color .18s ease, box-shadow .18s ease;
}
.competition-vote-option > span:not(.seed):not(.sweep):not(.pit-check) {
  grid-column: 2;
  color: var(--app-muted) !important;
  font-size: 11.5px !important;
  letter-spacing: .14em !important;
  text-transform: uppercase !important;
  font-weight: 600 !important;
  text-align: left !important;
}
.competition-vote-option > strong {
  grid-column: 2;
  color: var(--app-text) !important;
  font-size: 22px !important;
  font-weight: 600 !important;
  font-style: normal !important;
  line-height: 1.1 !important;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.competition-vote-option::before {
  content: "";
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(90deg, var(--row-live-a), var(--plate-b) 70%);
  opacity: 0; transition: opacity .18s ease;
}
.competition-vote-option > * { position: relative; z-index: 1; }
.competition-vote-option[data-side="omt"] {
  grid-template-columns: minmax(0, 1fr) auto !important;
  min-height: 52px !important;
  justify-items: center;
  background: repeating-linear-gradient(135deg, rgba(176, 18, 31, .14) 0 10px, transparent 10px 20px) !important;
  border: 0 !important;
  box-shadow: inset 0 0 0 2px var(--brand-hi) !important;
}
.competition-vote-option[data-side="omt"] > span:not(.seed):not(.sweep):not(.pit-check) { grid-column: 1; text-align: center !important; }
.competition-vote-option[data-side="omt"] > strong { grid-column: 1; text-align: center !important; font-size: 18px !important; }
.competition-vote-option.selected, .competition-vote-option[aria-pressed="true"] {
  border-color: var(--c-brand) !important;
  outline: 2px solid var(--c-brand);
  outline-offset: 0;
  box-shadow: 0 6px 26px -6px color-mix(in srgb, var(--c-brand) 80%, transparent) !important;
}
.competition-vote-option.selected::before { opacity: 1; }
.competition-vote-option:focus-visible { outline: 2px solid var(--live) !important; outline-offset: 3px !important; }
.competition-vote-tally, .tally, .competition-score-summary {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px; margin-top: 14px; background: var(--edge);
  border: 1px solid var(--edge);
}
.competition-vote-tally .competition-vote-pill, .competition-score-summary .competition-vote-pill {
  clip-path: none !important;
  height: auto;
  min-width: 0;
  min-height: 52px;
  padding: 8px 10px !important;
  display: grid !important;
  place-items: center;
  background: #121214 !important;
  color: var(--app-text) !important;
  font-size: 11.5px !important;
  letter-spacing: .14em !important;
  text-transform: uppercase !important;
  text-align: center !important;
  line-height: 1.25 !important;
  white-space: normal !important;
}
.competition-vote-tally .competition-vote-pill.is-lead { background: #121214 !important; color: var(--live) !important; }

/* =================== 8. LIVE card =================== */
.native-live-stage-card {
  background: #0b0b0c !important;
  border: 1px solid var(--edge) !important;
  border-radius: 4px !important;
  box-shadow: var(--shadow-card) !important;
}
.native-live-status-row { border-top: 1px solid var(--edge) !important; background: transparent !important; }
.native-live-status { color: var(--app-muted) !important; }
.native-live-offline { background: transparent !important; color: var(--app-muted) !important; }
.native-live-offline strong { color: #fff !important; font-weight: 800 !important; font-style: italic !important; text-transform: uppercase; }
.native-live-sidebar { background: linear-gradient(180deg, var(--panel-top), var(--panel-bot)) !important; }
.streamer-panel-kicker { display: none !important; }
.race-home-pane { border: 1px solid var(--edge) !important; box-shadow: var(--shadow-card) !important; }
.qualifying-race-pane { border: 1px solid var(--edge) !important; background: linear-gradient(110deg, #1c0d10, var(--panel-bot) 78%) !important; }

/* =================== 9. MODALS =================== */
.modal-card, .modal-content { background: linear-gradient(180deg, var(--panel-top), var(--panel-bot)) !important; border: 1px solid var(--edge) !important; }
.modal-card h2, .modal-card h3, .modal-card p, .modal-content h2 { color: var(--app-text) !important; }
.modal-overlay { background: rgba(4, 4, 5, .78) !important; }

/* =================== 10. GROUND (ambient) ===================
   Fixed haze, edge streaks and a sheen sweep: transform/opacity only, paused
   while the tab is hidden. Off on judge routes and the streamer scene/board. */
.fx { display: none; position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
body:not([data-role^="j"]):not([data-host-route^="judge"]):not([data-active-view="streamer-scene"]):not([data-active-view="streamer-library"]):not([data-active-view="streamer-board"]) .fx { display: block; }
.fx-haze {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 60% at 50% 115%, color-mix(in srgb, var(--c-brand) 30%, transparent), transparent 60%),
    radial-gradient(60% 40% at 0% 0%, rgba(255, 255, 255, .05), transparent 70%);
  animation: pb-haze 7s ease-in-out infinite alternate;
}
.fx-streaks {
  position: absolute; inset: -10% -50%;
  background: repeating-linear-gradient(180deg, transparent 0 37px, rgba(255, 255, 255, .055) 37px 38px, transparent 38px 91px, color-mix(in srgb, var(--c-brand) 40%, transparent) 91px 92px, transparent 92px 140px);
  -webkit-mask: linear-gradient(90deg, #000 0, transparent 18%, transparent 82%, #000 100%), repeating-linear-gradient(90deg, #000 0 160px, transparent 160px 420px);
  -webkit-mask-composite: source-in;
  mask: linear-gradient(90deg, #000 0, transparent 18%, transparent 82%, #000 100%), repeating-linear-gradient(90deg, #000 0 160px, transparent 160px 420px);
  mask-composite: intersect;
  animation: pb-streak 2.6s linear infinite;
  opacity: .9;
}
.fx-sheen::before {
  content: "";
  position: absolute; top: -30%; bottom: -30%; left: 0; width: 34vw;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .05) 45%, rgba(255, 255, 255, .085) 50%, rgba(255, 255, 255, .05) 55%, transparent);
  transform: translateX(-60vw) skewX(-18deg);
  animation: pb-sweep 11s var(--ease-out) infinite;
}
@keyframes pb-haze { from { opacity: .55 } to { opacity: 1 } }
@keyframes pb-streak { from { transform: translateX(0) } to { transform: translateX(-420px) } }
@keyframes pb-sweep { 0% { transform: translateX(-60vw) skewX(-18deg) } 38%, 100% { transform: translateX(130vw) skewX(-18deg) } }
body.pit-paused .fx, body.pit-paused .fx * { animation-play-state: paused !important; }
@media (max-width: 600px) {
  .fx-streaks, .fx-sheen { display: none; }
}

/* =================== 11. MOTION: the panel boot ===================
   One authored moment, on first mount of a view only. The rows are the only
   thing that replays, and only while .pit-boot is set; the class is removed on
   the last row's animationend so a live-sync re-render never boots again. */
@keyframes pb-rule-draw { from { transform: scaleX(0) } to { transform: none } }
@keyframes pb-tab-in { from { clip-path: polygon(0 0, 0 0, 0 100%, 0 100%) } to { clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%) } }
@keyframes pb-row-in { from { opacity: 0; transform: translateX(-22px) } to { opacity: 1; transform: none } }
@keyframes pb-fade-in { from { opacity: 0 } to { opacity: 1 } }
.pit-boot .panel-header::after { transform-origin: left; animation: pb-rule-draw .7s var(--ease-out) both; }
.pit-boot .panel-header h2, .pit-boot .panel-header h3 { animation: pb-tab-in .5s var(--ease-out) both; }
.pit-boot .panel-header .tag, .pit-boot .panel-header .race-programme-status { animation: pb-fade-in .4s ease-out .25s both; }
.pit-boot .race-programme-row, .pit-boot .event-card, .pit-boot #mobileDriversList > .mobile-driver-card,
.pit-boot #competitionJudgePanel .competition-vote-option, .pit-boot .native-live-sidebar > * {
  animation: pb-row-in .55s var(--ease-out) both;
}
.pit-boot .race-programme-row:nth-child(1) { animation-delay: .18s }
.pit-boot .race-programme-row:nth-child(2) { animation-delay: .24s }
.pit-boot .race-programme-row:nth-child(3) { animation-delay: .3s }
.pit-boot .race-programme-row:nth-child(n+4) { animation-delay: .36s }
.pit-boot .race-programme::before { animation: pb-fade-in .35s ease-out .3s both; }

/* Live step: the looping light pass. The LIVE tag slashes tick. */
.race-programme-row.is-live::after {
  content: "";
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, color-mix(in srgb, var(--live) 30%, transparent) 50%, transparent 65%);
  animation: pb-live-pass 3.4s var(--ease-out) infinite;
}
@keyframes pb-live-pass { 0% { transform: translateX(-110%) } 45%, 100% { transform: translateX(110%) } }
.race-programme-status.live::after, .judge-lane-status-pill.is-live::after { display: inline-block; animation: pb-tick .9s linear infinite; }
@keyframes pb-tick { from { transform: translateX(-4px) } to { transform: translateX(2px) } }

/* Hover: a game-menu selection. The element never moves; a child carries the light. */
.race-programme-row, .mobile-driver-card, .event-card, .competition-vote-option {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease, outline-color .18s ease;
}
.race-programme-row::after, .mobile-driver-card::after, .event-card::after {
  content: "";
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, var(--sheen) 48%, transparent 66%);
  transform: translateX(-110%);
  opacity: 0;
}
.race-programme-step, .mobile-seed-index { transition: background-color .18s ease, color .18s ease; }
@media (hover: hover) {
  .race-programme-row:hover, .mobile-driver-card:hover, .competition-vote-option:hover {
    border-color: color-mix(in srgb, var(--brand-hi) 80%, var(--edge)) !important;
  }
  .event-card:hover { background-color: rgba(255, 255, 255, .025) !important; }
  .race-programme-row:hover::after, .mobile-driver-card:hover::after, .event-card:hover::after {
    opacity: 1;
    transform: translateX(110%);
    transition: transform .45s cubic-bezier(.45, 0, .25, 1), opacity .1s;
  }
  .race-programme-row:not(.is-live):hover .race-programme-step,
  .mobile-driver-card:hover .mobile-seed-index { background: var(--c-brand); color: #fff; }
  .button-accent:hover, .button-primary:hover { filter: brightness(1.07) saturate(1.05); }
  .button-secondary:hover, .micro-button:hover { background: var(--live) !important; }
  .button-secondary:hover::before, .micro-button:hover::before { background: linear-gradient(180deg, #34343a, #27272b); }
  .button-danger:hover::before { background: color-mix(in srgb, var(--c-brand) 22%, #17171a); }
}
.button::after, .micro-button::after {
  content: "";
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(105deg, transparent 25%, rgba(255, 255, 255, .3) 47%, transparent 62%);
  transform: translateX(-120%);
}
@media (hover: hover) {
  .button:not([disabled]):hover::after, .micro-button:not([disabled]):hover::after {
    transform: translateX(120%);
    transition: transform .4s cubic-bezier(.45, 0, .25, 1);
  }
}

/* Judge lock-in: the tint, the outline, the check slam, the one-shot sweep. */
.competition-vote-option.sel::before, .competition-vote-option.locked::before { opacity: 1; }
.competition-vote-option .pit-check {
  grid-column: 3; grid-row: 1 / span 2;
  width: 28px; height: 28px; display: grid; place-items: center;
  background: var(--c-brand); color: #fff;
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
  opacity: 0; transform: scale(.6);
  transition: opacity .12s ease-out, transform .12s ease-out;
}
.competition-vote-option.sel .pit-check, .competition-vote-option.locked .pit-check { opacity: 1; transform: none; }
.competition-vote-option.locked .pit-check { animation: pb-slam .42s cubic-bezier(.2, 1.4, .3, 1) both; }
@keyframes pb-slam { from { transform: scale(1.5); opacity: 0; filter: blur(5px) } to { transform: none; opacity: 1; filter: none } }
.competition-vote-option .sweep {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, var(--sheen) 48%, transparent 66%);
  transform: translateX(-110%);
}
.competition-vote-option.locked .sweep { animation: pb-lock-sweep .45s cubic-bezier(.4, 0, .2, 1) both; }
@keyframes pb-lock-sweep { from { transform: translateX(-110%) } to { transform: translateX(110%) } }

/* =================== 12. CONTAINER QUERIES =================== */
@container (max-width: 560px) {
  .race-programme-row { grid-template-columns: 52px minmax(0, 1fr); grid-template-rows: auto auto; min-height: 0; gap: 0 12px; }
  .race-programme-step { grid-row: 1 / 3; min-height: 0; font-size: 22px; }
  .race-programme-txt { padding: 12px 12px 0 0; }
  .race-programme-name { font-size: 18px; }
  .race-programme-action { grid-column: 2; grid-row: 2; justify-content: space-between; gap: 10px; padding: 10px 12px 12px 0; }
  .race-programme-action .race-programme-status { width: 88px; min-width: 88px; flex: none; }
  .race-programme-action .button { width: auto; flex: 1 1 0; min-width: 0; max-width: 170px; height: 40px; padding: 0 12px !important; }
  .race-programme::before { left: 24px; }
  .panel-body, .panel > :not(.panel-header) { padding: 14px 12px !important; }
  .panel-header { padding: 14px 12px 0 !important; }
  .panel-header h2, .panel-header h3 { font-size: 15px !important; min-height: 36px !important; }
  .mobile-driver-name { font-size: 17px; }
}
@container (max-width: 440px) {
  .panel-foot, .panel-actions { flex-direction: column-reverse; align-items: stretch; gap: 10px; }
  .panel-foot .grow, .panel-actions .grow { display: none; }
  .panel-foot .button, .panel-actions .button { width: 100%; }
  .event-card-head { align-items: flex-start; }
  .event-card-grid, .event-card-overview { grid-template-columns: 1fr; }
  .event-card-grid > *, .event-card-overview > * { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 12px; }
}
@container (max-width: 320px) {
  .race-programme-action { flex-wrap: wrap; }
  .race-programme-action .button { flex: 1 1 100%; max-width: none; }
  .competition-vote-option > strong { font-size: 19px !important; }
}

/* =================== 13. REDUCED MOTION =================== */
@media (prefers-reduced-motion: reduce) {
  .fx-streaks, .fx-sheen { display: none; }
  .fx-haze { animation: none; opacity: .8; }
  .pit-boot .panel-header::after, .pit-boot .panel-header h2, .pit-boot .panel-header h3 { animation: none; }
  .pit-boot .panel-header .tag, .pit-boot .race-programme-row,
  .pit-boot .event-card, .pit-boot .mobile-driver-card { animation: pb-fade-in .2s ease-out both; animation-delay: 0s !important; }
  .pit-boot .race-programme::before { animation: pb-fade-in .2s ease-out both; }
  .race-programme-row.is-live::after { display: none; }
  .race-programme-status.live::after, .judge-lane-status-pill.is-live::after { animation: none; }
  .race-programme-row::after, .mobile-driver-card::after, .event-card::after,
  .button::after, .micro-button::after { display: none; }
  .competition-vote-option.locked .pit-check { animation: pb-fade-in .15s ease-out both; }
  .competition-vote-option .pit-check { transition: opacity .12s ease-out; transform: none; }
  .competition-vote-option.locked .sweep { display: none; }
  .button:active, .micro-button:active { transform: none; }
}

/* =================== 14. G9 PASSES ===================
   Nothing paints a background above 0.5 luminance outside the bracket cards.
   The chrome surfaces use --live-fill (a gradient), the NEXT tag's outline is an
   inset shadow instead of a light plate, and the empty state is a dark slab. */
.main-topbar .mode-tab.is-active {
  background-color: transparent !important;
  background-image: var(--live-fill) !important;
  color: var(--live-ink) !important;
}
.main-topbar .mode-tab:hover { background-image: none !important; }
.race-dot { background: var(--live-fill) !important; box-shadow: 0 0 12px color-mix(in srgb, var(--live) 55%, transparent) !important; }
.race-programme-status.next, .status-pill.next {
  background: #0b0b0c !important;
  color: #fff !important;
  box-shadow: inset 0 0 0 1.5px #d9d6cc !important;
}
.race-programme-status.next::before, .status-pill.next::before { content: none !important; display: none !important; }
.empty-state {
  background: var(--row) !important;
  border: 1px solid var(--edge) !important;
  border-radius: 4px !important;
  color: var(--app-muted) !important;
  padding: 28px;
}
.race-seg.is-done { background: var(--live-fill) !important; border-color: var(--live) !important; color: var(--live-ink) !important; }
.gss-seg.done { background: var(--live-fill) !important; border-color: var(--live) !important; }
#view-bracket.race-bracket-active .bracket-alert-banner::after { background: var(--live-fill) !important; }
#view-bracket.race-bracket-active .bracket-alert-banner { border-left-color: var(--live) !important; }
#view-bracket.race-bracket-active .bracket-alert-banner strong { color: var(--live) !important; }

/* Containers: the rows and the programme are queried, not the viewport. */
.race-home-main, .race-home-pane, #competitionJudgePanel, #competitionDecisionPanel,
.qualifying-race-pane, .native-live-sidebar, #mobileDriversList, #view-website-admin .panel {
  container-type: inline-size;
}

/* =================== 15. COMPONENT FIXES =================== */
/* A driver plate is a seed block, the name column and the end action. */
.mobile-driver-card {
  display: grid !important;
  grid-template-columns: 52px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 0 12px !important;
  padding: 0 !important;
  min-height: 52px;
  overflow: hidden;
}
.mobile-driver-card > .mobile-seed-index {
  align-self: stretch; display: grid; place-items: center;
  min-height: 52px; padding: 0;
}
.mobile-driver-card > div { min-width: 0; padding: 8px 0; }
.mobile-driver-card > .micro-button, .mobile-driver-card > .button, .mobile-driver-card > .mobile-driver-actions { margin-right: 10px; }
.mobile-driver-card > .mobile-driver-actions { display: flex; gap: 8px; align-items: center; }
.mobile-driver-card .micro-button { height: 30px; min-height: 30px; min-width: 0; padding: 0 12px !important; font-size: 11.5px !important; }

/* The authored check: the same path as the sketch, masked so it carries currentColor. */
.competition-vote-option .pit-check { color: #fff; }
.competition-vote-option .pit-check::before {
  content: "";
  width: 15px; height: 15px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 8.6l3.4 3.3L13.5 4.2' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='square'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 8.6l3.4 3.3L13.5 4.2' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='square'/%3E%3C/svg%3E") center / contain no-repeat;
}
.competition-vote-option .seed { position: relative; z-index: 2; }

/* Form labels and their text sit on the left edge, above the field. */
label, .field > span, .field-label, .search-field > span,
.registration-form-grid label span, .form-grid label span {
  text-align: left !important;
  display: block;
}
.field { display: grid; gap: 6px; }

/* The judge vote panel is a pit board like every other panel. */
.judge-vote-panel { container-type: inline-size; }
.judge-vote-panel .panel-body { padding: 16px 18px 18px !important; }
.judge-vote-panel .judge-lane-toolbar { padding-top: 0; }

/* The judge battle card carries the vote grid, not a driver-row plate. */
.mobile-driver-card.competition-judge-battle-card {
  display: block !important;
  padding: 14px !important;
  min-height: 0;
}
.mobile-driver-card.competition-judge-battle-card > .competition-vote-grid,
.mobile-driver-card.competition-judge-battle-card > .competition-vote-tally { width: 100%; }

/* A plate's seed block keeps its white numerals even on a chrome-faced button. */
.competition-vote-option > .seed { color: #fff !important; }
.competition-vote-option > strong { font-size: clamp(18px, 5.4cqi, 22px) !important; }
.judge-lane-meta { flex-wrap: wrap; }
.mobile-driver-reg { color: var(--app-muted) !important; font-size: 12px !important; }
@container (max-width: 440px) {
  .event-card-actions { flex-wrap: wrap !important; gap: 8px !important; }
  .event-card-actions .button { flex: 1 1 calc(50% - 4px); min-width: 0; }
  .event-card-actions .button-danger { flex-basis: 100%; order: 9; }
  .event-card-actions .button-accent { flex-basis: 100%; order: -1; }
}

/* Legacy judge rules are ID-scoped, so the pit board answers in kind. */
#competitionJudgePanel .competition-vote-option > span.seed { color: #fff !important; opacity: 1 !important; }
#competitionJudgePanel .competition-vote-option > span:not(.seed):not(.sweep):not(.pit-check) {
  color: var(--app-muted) !important;
  letter-spacing: .14em !important;
}
#competitionJudgePanel .competition-vote-option > strong { color: var(--app-text) !important; }
#competitionJudgePanel .competition-vote-option.locked > strong,
#competitionJudgePanel .competition-vote-option.selected > strong { color: #fff !important; }
#competitionJudgePanel .competition-vote-tally .competition-vote-pill {
  background: #121214 !important;
  color: var(--app-text) !important;
  border: 0 !important;
  border-radius: 0 !important;
  display: grid !important;
  place-items: center !important;
  min-width: 0 !important;
}
#competitionJudgePanel .judge-lane-status-row .judge-lane-status-pill { min-width: 84px !important; }
#competitionJudgePanel .judge-lane-shell.competition-judge-card { background: transparent !important; }
#competitionJudgePanel .panel-header h2 { color: #fff !important; }

/* =================== 2026-11-22 review fixes ===================
   R2 programme panel, R3 live side card, R4 bracket controls, R5 contrast. */
.race-programme-panel { padding: 0 !important; }
.race-programme-panel > .race-home-primary[hidden] { display: none !important; }
.race-programme-panel > .race-programme { padding: 16px 18px 18px !important; }
.race-programme-panel .panel-header #raceProgrammeModeTag[hidden] { display: none !important; }
.race-programme-row.is-live .race-programme-step { background: var(--live-fill) !important; color: var(--live-ink) !important; }
.race-programme-row.is-done .race-programme-step { background: var(--c-brand) !important; color: #fff !important; }
@media (hover: hover) {
  .race-programme-row:not(.is-live):hover .race-programme-step,
  .mobile-driver-card:hover .mobile-seed-index { background: var(--c-brand) !important; color: #fff !important; }
}
.race-programme-action .button[aria-disabled="true"] { opacity: .5; cursor: default; pointer-events: none; }

/* R3: the live page side card is one panel: no inner card, one left edge, real tags */
#nativeLiveEventSummary { background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 6px 16px 16px !important; text-align: left !important; }
#nativeLiveEventSummary .streamer-status-kicker { display: none !important; }
#nativeLiveEventSummary strong { display: block; text-align: left !important; font-weight: 800; font-style: italic; text-transform: uppercase; font-size: 18px; line-height: 1.1; color: #f2efe6; }
#nativeLiveEventSummary p { text-align: left !important; margin: 6px 0 0 !important; color: #b3afa4 !important; font-size: 14.5px; line-height: 1.4; }
#nativeLiveEventSummary .streamer-chip-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-start !important; }
#nativeLiveEventSummary .streamer-chip {
  display: inline-flex !important; align-items: center; justify-content: center; height: 28px; min-width: 84px; padding: 0 14px 0 12px !important;
  border: 0 !important; border-radius: 0 !important; background: #2c2c31 !important; color: #d9d6cc !important;
  font-weight: 800; font-style: italic; font-size: 12px !important; letter-spacing: .08em; text-transform: uppercase;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}
#nativeLiveEventSummary .streamer-chip.accent { background: var(--live-fill) !important; color: var(--live-ink) !important; }

/* R4: hidden bracket tabs stay hidden; the return-to-admin buttons are admin-only */
#view-bracket #competitionBracketTabs.hidden { display: none !important; }
body:not([data-role="admin"]) #backToQualifyingBtn,
body:not([data-role="admin"]) #mobileBackToQualifyingBtn,
body:not([data-role="admin"]) #inlineBackToQualifyingBtn { display: none !important; }

/* R5: readable placeholders (4.5:1 on the dark inputs) */
input::placeholder, textarea::placeholder { color: #8e8e97 !important; }

/* =================== Admin surfaces: no light boxes (owner screenshots, 2026-11-22 12:30) ===================
   Legacy inline rules paint these containers cream/white; the Pit Board text on
   them is light, so they read white-on-white. Every one becomes a dark surface. */
.qualifying-live-card, .bracket-stage-card, .event-admin-panel, .modal-panel,
.website-admin-card, .role-admin-toolbar, .role-admin-card, .invite-code-box,
.admin-lock-note, .qr-share-card, .mobile-score-card, .hero-stat,
.website-admin-banner-tools {
  background: linear-gradient(180deg, #1f1f23, #18181b) !important;
  color: #f2efe6 !important;
  border: 1px solid #34343a !important;
  box-shadow: none !important;
}
.hero-card, .hero-card-grid { background: transparent !important; box-shadow: none !important; border-color: #34343a !important; }
.website-admin-banner-preview { background: #0f0f11 !important; border: 1px dashed #4c4c54 !important; }
.hero-stat, .hero-stat strong { text-align: left !important; }
.hero-stat .hero-stat-label { color: #b3afa4 !important; }
.hero-stat strong { color: #f2efe6 !important; }
.event-admin-panel label, .event-switcher label, .helper-text, .website-admin-banner-empty,
.invite-code-label, .role-admin-title small { color: #b3afa4 !important; }
.role-admin-title strong { color: #f2efe6 !important; font-weight: 800; font-style: italic; text-transform: uppercase; font-size: 18px; }
.invite-code-box { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px !important; }
.invite-code-value { flex: 1 1 auto; min-width: 0; background: transparent !important; border: 0 !important; color: #f2efe6 !important;
  font-size: 14px !important; letter-spacing: normal !important; text-transform: none !important; overflow-wrap: anywhere; }
a.route-link-value, .route-link-value { color: #cfd6e4 !important; text-decoration: underline; text-underline-offset: 3px; }
select, .event-switcher select { background: #0f0f11 !important; color: #f2efe6 !important; border: 1.5px solid #3c3c42 !important; }
option { background: #0f0f11 !important; color: #f2efe6 !important; }
/* registration status pills under the competition format become dark tags */
.admin-alert-pill {
  background: #2c2c31 !important; color: #d9d6cc !important; border: 0 !important; box-shadow: none !important;
  font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: .06em; font-size: 12px !important;
}
.admin-alert-pill.is-warning, .admin-alert-pill.is-warn, .admin-alert-pill.is-danger { background: #b0121f !important; color: #fff !important; }
.admin-alert-pill.is-success { background: #e9edf5 !important; color: #0b0b0c !important; }
.admin-alert-pill { border-radius: 0 !important; clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); padding: 0 16px !important; min-height: 32px !important; }
.admin-alert-pill strong { color: inherit !important; }
/* the QR image keeps its white quiet zone; its card is dark */
.qr-share-card img { background: #fff; padding: 8px; }

/* =================== Dialogs: readable headings, dark venue box, Save always on screen ===================
   (owner screenshot of Edit Event, 2026-11-22) */
.modal-content h3, .modal-content h4, .modal-section-header h4, .modal-hero h3 {
  color: #f2efe6 !important; font-family: "Kanit", sans-serif !important; font-weight: 800 !important;
  font-style: italic !important; letter-spacing: .01em !important; text-align: left !important;
}
.modal-hero h3 { font-size: 26px !important; margin: 0 !important; }
.modal-section-header h4 { font-size: 18px !important; }
.modal-section-header, .modal-section-header p, .modal-hero, .modal-hero p, .modal-copy { text-align: left !important; }
.modal-section-header p, .modal-hero p, .modal-copy { color: #b3afa4 !important; font-weight: 600 !important; font-size: 14.5px !important; }
.modal-section { border-top-color: #34343a !important; }
.modal-field, .modal-field > span, .modal-content label > span { color: #b3afa4 !important; text-align: left !important; }
.venue-profile-bar {
  background: #161619 !important; border: 1px solid #34343a !important; border-radius: 3px !important; box-shadow: none !important;
}
.venue-profile-bar .modal-field > span { color: #b3afa4 !important; }
/* the dialog scrolls inside itself; the action bar stays pinned to its bottom edge */
.modal-content { overflow-y: auto !important; max-height: calc(100dvh - 40px) !important; }
.modal-content .modal-actions-bar {
  position: sticky; bottom: -20px; z-index: 5;
  margin: 8px -20px -20px !important; padding: 14px 20px 18px !important;
  background: linear-gradient(180deg, rgba(20, 20, 22, .92), #141416 40%) !important;
  border-top: 1px solid #34343a !important;
  justify-content: flex-end !important;
}
@media (max-width: 720px) {
  .modal-content { max-height: 100dvh !important; }
  .modal-content .modal-actions-bar { bottom: calc(-22px - env(safe-area-inset-bottom)); margin: 8px -16px calc(-22px - env(safe-area-inset-bottom)) !important; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)) !important; }
  .modal-content .modal-actions-bar .button { flex: 1 1 0; }
}
.venue-location-feedback, .venue-manual-backup, .venue-manual-backup summary {
  background: #161619 !important; color: #d9d6cc !important; border: 1px solid #34343a !important; box-shadow: none !important; border-radius: 3px !important;
}
.venue-location-feedback *, .venue-manual-backup * { color: inherit; }

/* =================== Bracket fullscreen (projector) ===================
   Owner screenshot 2026-11-22: the race board sat small at the top of a white
   projector ground. The ground is now the dark carbon world and the board is
   scaled to fill the screen, centred (JS sets --fs-scale in fitBracketBoard). */
body.bracket-fullscreen .fullscreen-arena-bg { background: #0b0b0c !important; }
body.bracket-fullscreen .arena-layer-base { background: radial-gradient(120% 90% at 50% 40%, #1d1d21 0%, #0b0b0c 75%) !important; }
body.bracket-fullscreen .arena-layer-aurora,
body.bracket-fullscreen .arena-layer-grid { display: none !important; }
body.bracket-fullscreen .arena-layer-vignette { background: radial-gradient(125% 105% at 50% 42%, transparent 58%, rgba(0, 0, 0, .55) 100%) !important; }
body.bracket-fullscreen .race-board-canvas.race-fullscreen-fit {
  position: fixed !important; left: 50% !important; top: 50% !important; margin: 0 !important; zoom: 1 !important;
  transform: translate(-50%, -50%) scale(var(--fs-scale, 1)); transform-origin: center center; z-index: 3;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .7);
}
body.bracket-fullscreen .bracket-fullscreen-exit-control {
  z-index: 10 !important; background: #141416 !important; color: #f2efe6 !important; border: 1px solid #4c4c54 !important; box-shadow: none !important;
}
body.bracket-fullscreen .bracket-fullscreen-exit-control:hover,
body.bracket-fullscreen .bracket-fullscreen-exit-control:focus-visible { border-color: var(--live, #e9edf5) !important; background: #1f1f23 !important; }
/* the fullscreen element itself is dark too (legacy white projector ground) */
body.bracket-fullscreen #view-bracket.is-active,
#view-bracket:fullscreen { background-color: #0b0b0c !important; background-image: none !important; }
#view-bracket:fullscreen::backdrop { background: #0b0b0c !important; }

/* =================== CENTRED LAYOUT (owner direction, 2026-11-22) ===================
   "look for all of the elements on the web app that are not centered and center
   them. including the navigation bar on the top. being centered is more
   presentable and professional." Groups, titles, banners, nav and table cells
   centre; structured rows (programme steps, driver plates, the bracket) keep
   their internal grid but centre their headings. */
/* top navigation: the visible tabs sit centred as one group */
.main-topbar .mode-tabs { display: flex !important; justify-content: center !important; flex-wrap: wrap; }
.main-topbar .mode-tabs .mode-tab { flex: 0 1 180px; }
/* page headers */
.hero, .hero-copy-block, .hero-copy, .hero h1, .hero .eyebrow { text-align: center !important; }
.hero-copy-block { display: flex !important; flex-direction: column; align-items: center !important; margin-inline: auto !important; }
.hero-copy { margin-inline: auto !important; max-width: 70ch; }
/* every row of buttons, chips and meta pills */
.hero-actions, .hero-meta-inline, .hero-stat-row, .button-row, .bracket-header-actions, .bracket-inline-actions,
.registration-form-actions, .venue-profile-actions, .role-admin-actions, .qa-tools-row, .modal-actions-bar,
.panel-foot, .acts, .streamer-chip-row, .driver-status-row, .role-admin-toolbar {
  justify-content: center !important; flex-wrap: wrap;
}
.hero-actions, .hero-meta-inline { display: flex !important; gap: 10px; margin-inline: auto !important; }
/* panel titles centre over their panel */
.panel-header, .streamer-section-head, .command-center-head { justify-content: center !important; text-align: center !important; }
.panel-header > div:first-child { justify-content: center !important; }
.panel-header h2, .panel-header h3, .modal-hero h3, .modal-section-header h4 { text-align: center !important; }
.modal-section-header, .modal-section-header p, .modal-hero, .modal-hero p, .modal-copy { text-align: center !important; }
/* status banners and helper copy */
.qualifying-live-shell { display: flex; justify-content: center; }
.qualifying-live-card { margin-inline: auto !important; text-align: center !important; display: grid; justify-items: center; }
.qualifying-live-card .qualifying-live-driver, .qualifying-live-card .qualifying-live-note { text-align: center !important; }
.helper-text, .empty-state, .registration-form-note, .admin-lock-note { text-align: center !important; }
/* tables: every cell centred; driver names larger and readable */
th, td { text-align: center !important; vertical-align: middle !important; }
td.num, td.numeric, th.num, th.numeric { text-align: center !important; }
.driver-meta { justify-items: center !important; text-align: center !important; }
.driver-meta strong { font-size: 20px !important; font-weight: 800 !important; font-style: italic; letter-spacing: .01em; line-height: 1.1; color: #f2efe6 !important; }
.driver-meta small { font-size: 13.5px !important; color: #b3afa4 !important; }
.driver-meta .driver-name-input { font-size: 18px !important; font-weight: 700 !important; text-align: center !important; }
.driver-status-row { display: flex; gap: 6px; }
/* no white or grey table stripes, no white judge-progress cells */
tbody tr:nth-child(even) { background: transparent !important; }
tbody tr:nth-child(even) td { background: rgba(255, 255, 255, .03) !important; }
.qp-progress { background: #0f0f11 !important; border: 1px solid #3c3c42 !important; border-radius: 3px !important; color: #f2efe6 !important; }
.qp-progress-label { color: #f2efe6 !important; font-weight: 800; }
.qp-progress-seg { background: #3c3c42 !important; }
.qp-progress-seg.is-in { background: var(--live-fill, #e9edf5) !important; }
/* centred dialogs: their pinned action bar centres too */
.modal-content .modal-actions-bar { justify-content: center !important; }
.hero-stat, .hero-stat strong, .hero-stat .hero-stat-label { text-align: center !important; }
#nativeLiveEventSummary, #nativeLiveEventSummary strong, #nativeLiveEventSummary p { text-align: center !important; }
#nativeLiveEventSummary .streamer-chip-row { justify-content: center !important; }
.form .field span, .modal-field > span, .field-label, label > span { text-align: center !important; }
.event-card .nm, .event-card .mt, .ecard .nm, .ecard .mt { text-align: center !important; }
.registration-admin-tools, .self-register-profile-bar { display: flex !important; justify-content: center !important; flex-wrap: wrap; gap: 10px; }

/* =================== Stream overlay (drawn over the live video) ===================
   The overlay panels were cream with the Pit Board's light text on them, so the
   Starting Soon / battle / results scenes were unreadable once the stream ran.
   Both themes: dark translucent panels, light text, dark tags. */
.native-broadcast-layout {
  background: linear-gradient(180deg, rgba(0, 0, 0, .45), rgba(0, 0, 0, .05) 24%, rgba(0, 0, 0, .05) 68%, rgba(0, 0, 0, .5)) !important;
  color: #f2efe6 !important;
}
.native-broadcast-head, .native-broadcast-foot, .native-broadcast-card, .native-broadcast-driver {
  background: rgba(14, 14, 16, .88) !important; color: #f2efe6 !important; border: 1px solid #3c3c42 !important; box-shadow: 0 10px 26px -12px rgba(0, 0, 0, .8) !important;
}
.native-broadcast-pill {
  background: #2c2c31 !important; color: #f2efe6 !important; border: 0 !important; border-radius: 0 !important;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); padding-inline: 14px 12px !important;
  font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: .06em;
}
.native-broadcast-title, .native-broadcast-card h2, .native-broadcast-driver strong, .native-broadcast-row strong,
.native-broadcast-video-frame strong, .native-broadcast-layout strong { color: #f2efe6 !important; }
.native-broadcast-meta, .native-broadcast-kicker, .native-broadcast-card p, .native-broadcast-driver small,
.native-broadcast-row span, .native-broadcast-rank, .native-broadcast-layout p, .native-broadcast-layout span { color: #d9d6cc !important; }
.native-broadcast-vs { color: #ff6b78 !important; }
.native-broadcast-video-region, .native-broadcast-video-frame {
  background: linear-gradient(180deg, rgba(14, 14, 16, .55), rgba(14, 14, 16, .8)) !important; border-color: #3c3c42 !important;
}
.native-broadcast-video-region::before { opacity: .25 !important; }

/* =================== Minimum readable size (legibility audit, 2026-11-22) ===================
   Nothing a visitor needs to read drops below 12px. */
.results-event-date, .results-event-champion small, .results-event-places span,
.results-event-meta span, .results-event-meta b { font-size: 12px !important; }
.native-broadcast-meta, .native-broadcast-pill, .native-broadcast-foot > span { font-size: 11.5px !important; }

/* =================== Bracket video: projector-bright (owner, comp day) ===================
   "the video in the background is too dim to see on a projector". The ink veil
   drops from .86 to .55 (.40 in fullscreen and on the streamer scene) and the
   reel is lifted; labels and pending lines get a shadow / lighter stroke so they
   still read over the brighter picture. Cards are opaque, so they are unaffected. */
:root[data-theme] .race-paper { background: rgba(18, 20, 17, .5) !important; }
:root[data-theme="reve-d"] .race-paper { background: rgba(10, 10, 11, .5) !important; }
:root[data-theme] body.bracket-fullscreen .race-paper, :root[data-theme] body.streamer-scene-mode .race-paper { background: rgba(14, 14, 15, .36) !important; }
/* no CSS filter on the video itself: filtering a full-screen video every frame
   made it stutter on projector laptops. Brightness comes from the lighter veil. */
.race-bg-media video { filter: none !important; }
.race-bg-media img { filter: brightness(1.12) contrast(1.06) !important; }
/* the ambient ground layers never run behind the bracket: the video is the motion */
body:has(#view-bracket.is-active) .fx, body.bracket-fullscreen .fx { display: none !important; }
.race-match-label { text-shadow: 0 2px 4px rgba(0, 0, 0, .95), 0 0 14px rgba(0, 0, 0, .85) !important; }
.race-connectors path.is-pending, [data-theme="reve-d"] .race-connectors path.is-pending {
  stroke: rgba(233, 237, 245, .62) !important; stroke-width: 2.6 !important; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .9));
}

/* =================== Winner reveal: one calm, smooth sequence (owner, comp day) ===================
   The card is built once per result (renderCompetitionDecisionPanel guard). Here
   the motion is simplified to what draws cheaply over the bracket video:
   opacity + transform only; no backdrop blur, no blur-in, no spinning conic
   border trace. Scrim fades, card glides up, content follows, one soft sweep. */
#competitionDecisionPanel.competition-decision-panel { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
#competitionDecisionPanel.competition-decision-panel::before,
#competitionDecisionPanel.competition-decision-panel::after { animation: competitionRevealBackdropIn .42s ease-out both !important; }
#competitionDecisionPanel .competition-result-reveal {
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important; filter: none !important;
  animation: pb-reveal-in .62s cubic-bezier(.16, 1, .3, 1) .08s both !important;
}
@keyframes pb-reveal-in {
  from { opacity: 0; transform: translateY(28px) scale(.965); }
  55% { opacity: 1; }
  to { opacity: 1; transform: none; }
}
#competitionDecisionPanel .competition-result-reveal::before { animation: none !important; opacity: 0 !important; }
#competitionDecisionPanel .competition-result-reveal-glow { display: none !important; }
#competitionDecisionPanel .competition-result-reveal-head,
#competitionDecisionPanel .competition-result-matchup,
#competitionDecisionPanel .competition-result-context,
#competitionDecisionPanel .competition-result-reveal .competition-decision-copy,
#competitionDecisionPanel .competition-result-reveal .competition-vote-tally,
#competitionDecisionPanel .competition-result-reveal .competition-decision-actions {
  animation: pb-reveal-item .5s cubic-bezier(.16, 1, .3, 1) both !important;
}
#competitionDecisionPanel .competition-result-reveal-head { animation-delay: .2s !important; }
#competitionDecisionPanel .competition-result-matchup { animation-delay: .27s !important; }
#competitionDecisionPanel .competition-result-context { animation-delay: .31s !important; }
#competitionDecisionPanel .competition-result-reveal .competition-decision-copy { animation-delay: .35s !important; }
#competitionDecisionPanel .competition-result-reveal .competition-vote-tally { animation-delay: .4s !important; }
#competitionDecisionPanel .competition-result-reveal .competition-decision-actions { animation-delay: .45s !important; }
@keyframes pb-reveal-item { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
#competitionDecisionPanel .competition-result-reveal::after { animation: race-result-sweep 1.4s .5s cubic-bezier(.45, 0, .25, 1) both !important; }
#competitionDecisionPanel .competition-result-smoke span { animation-duration: 2.6s !important; animation-timing-function: cubic-bezier(.16, 1, .3, 1) !important; }
.competition-decision-panel.is-exiting .competition-result-reveal,
#competitionDecisionPanel.is-exiting .competition-decision-card.is-review-hold {
  animation: pb-reveal-out .32s cubic-bezier(.4, 0, 1, 1) both !important;
}
@keyframes pb-reveal-out { to { opacity: 0; transform: translateY(14px) scale(.98); } }
@media (prefers-reduced-motion: reduce) {
  #competitionDecisionPanel .competition-result-reveal { animation: competitionRevealBackdropIn .2s ease-out both !important; }
  #competitionDecisionPanel .competition-result-reveal-head,
  #competitionDecisionPanel .competition-result-matchup,
  #competitionDecisionPanel .competition-result-context,
  #competitionDecisionPanel .competition-result-reveal .competition-decision-copy,
  #competitionDecisionPanel .competition-result-reveal .competition-vote-tally,
  #competitionDecisionPanel .competition-result-reveal .competition-decision-actions,
  #competitionDecisionPanel .competition-result-reveal::after,
  #competitionDecisionPanel .competition-result-smoke span { animation: none !important; }
  .competition-decision-panel.is-exiting .competition-result-reveal { animation: competitionRevealCardOut .2s ease both !important; }
}
