/* ==========================================================================
   SCL design system — light theme, mobile-first (Phase 1)
   Every class from the pre-redesign stylesheet still works; new components
   (toasts, drawer, bottom bar, stat tiles, quick actions, semantic chips)
   are additive.
   ========================================================================== */

:root {
  /* SCL brand palette */
  --scl-navy: #0B1E38;
  --scl-navy-dark: #131822;
  --scl-volt: #A3FF00;
  --scl-bg: #F7F7F2;
  --scl-slate: #8C939E;

  --bg: #F7F7F2;
  --surface: #ffffff;
  --surface-2: #eef0ec;
  --border: #dfe2dc;
  --text: #0B1E38;
  --muted: #6b7280;
  --primary: #0B1E38;
  --primary-2: #131822;
  --primary-soft: rgba(11, 30, 56, 0.08);
  --volt: #A3FF00;
  --danger: #d93025;
  --danger-soft: rgba(217, 48, 37, 0.08);
  --success: #1e8e5a;
  --success-soft: rgba(30, 142, 90, 0.08);
  --warn: #b45309;
  --warn-soft: rgba(180, 83, 9, 0.09);
  --gold: #d99a06;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(11, 30, 56, 0.10);
  --shadow-lg: 0 8px 28px rgba(11, 30, 56, 0.16);
  --nav-h: 60px;
  --bottom-bar-h: 58px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  padding-bottom: calc(var(--bottom-bar-h) + 24px); /* room for the mobile bottom bar */
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; }

/* --------------------------------------------------------------------------
   navbar (desktop row + mobile drawer trigger)
   -------------------------------------------------------------------------- */
.navbar {
  background: var(--scl-navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--nav-h);
  box-shadow: var(--shadow);
}
.nav-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: 100%;
  gap: 10px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 18px;
  color: #fff;
  letter-spacing: 0.5px;
  text-decoration: none;
  gap: 6px;
}
.brand:hover { text-decoration: none; }
.brand .brand-mark {
  height: 34px;
  width: auto;
  border-radius: 6px;
  display: inline-block;
}
.brand .brand-word {
  display: inline-block;
}
.brand .brand-volt { color: var(--scl-volt); }
.brand .brand-sponsor {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: rgba(255, 255, 255, 0.75);
  text-transform: uppercase;
  border-left: 1px solid rgba(255, 255, 255, 0.25);
  padding-left: 8px;
}
.nav-links { display: flex; gap: 4px; align-items: center; flex-wrap: nowrap; }
.nav-links a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
}
.nav-links a:hover { background: rgba(255, 255, 255, 0.10); text-decoration: none; color: #fff; }
.nav-links a.muted { color: rgba(255, 255, 255, 0.6); }
.nav-links .btn { margin-left: 6px; }
.nav-links .btn-primary { background: var(--scl-volt); border-color: var(--scl-volt); color: var(--scl-navy); }
.nav-links .btn-primary:hover { background: #b8ff45; border-color: #b8ff45; color: var(--scl-navy); }

/* "More" dropdown */
.nav-more { position: relative; }
.nav-more-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.85);
  font: inherit;
  font-size: 14px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
}
.nav-more-btn:hover { background: rgba(255, 255, 255, 0.10); color: #fff; }
.nav-more-btn[aria-expanded="true"] { background: rgba(255, 255, 255, 0.14); color: #fff; }
.nav-more-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 150px;
  background: var(--scl-navy-dark);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 6px;
  z-index: 60;
}
.nav-more-menu.open { display: flex; flex-direction: column; }
.nav-more-menu a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.nav-more-menu a:hover { background: rgba(255, 255, 255, 0.10); color: #fff; }

/* Pulsating "Live Auction" chip */
.nav-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: 6px;
  padding: 5px 12px !important;
  border-radius: 999px !important;
  background: var(--scl-volt);
  color: var(--scl-navy) !important;
  font-weight: 700;
  font-size: 13px;
  animation: nav-live-pulse 1.6s ease-in-out infinite;
}
.nav-live:hover { background: #b8ff45; color: var(--scl-navy) !important; }
.nav-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--scl-navy);
}
@keyframes nav-live-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(163, 255, 0, 0.55); }
  50% { box-shadow: 0 0 0 7px rgba(163, 255, 0, 0); }
}

/* hamburger (mobile only) */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  padding: 6px 10px;
  cursor: pointer;
}

/* mobile drawer */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, 0.4);
  z-index: 49;
}
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(300px, 82vw);
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 50;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateX(102%);
  transition: transform 0.22s ease;
}
.drawer.open { transform: translateX(0); }
.drawer-inner { padding: 16px; display: flex; flex-direction: column; gap: 2px; }
.drawer-inner a {
  color: var(--text);
  font-size: 15px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
}
.drawer-inner a:hover { background: var(--surface-2); text-decoration: none; }
.drawer-inner a.muted { color: var(--muted); }
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 4px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.drawer-head .brand-mark {
  height: 28px;
  width: auto;
  border-radius: 5px;
  display: inline-block;
}
.drawer-head .brand-sponsor {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: var(--muted);
  text-transform: uppercase;
}
.drawer-close {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--muted);
  padding: 2px 8px;
}

/* mobile bottom action bar */
.bottom-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 35;
  height: var(--bottom-bar-h);
}
.bottom-bar-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  height: 100%;
}
.bottom-bar a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
}
.bottom-bar a .bb-icon { font-size: 18px; line-height: 1; }
.bottom-bar a.active { color: var(--primary); }

/* --------------------------------------------------------------------------
   layout
   -------------------------------------------------------------------------- */
.container { max-width: 1000px; margin: 0 auto; padding: 20px 16px 24px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { margin: 0 0 4px; font-size: 24px; }
.page-head .page-sub { color: var(--muted); margin: 0; }
.page-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .grid { grid-template-columns: 1fr; } }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 760px) { .grid-3 { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   cards
   -------------------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.card h2 { margin-top: 0; font-size: 16px; }
.card h3 {
  font-size: 13px;
  margin: 16px 0 6px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }

/* empty states */
.empty {
  text-align: center;
  color: var(--muted);
  padding: 26px 12px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  margin: 10px 0;
}
.empty .empty-title { font-weight: 700; color: var(--text); margin-bottom: 4px; }
.board-section { margin: 18px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); }
.board-section-row td { background: var(--surface-2, #f4f5f7); }

/* stat tiles */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat-tile {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
}
.stat-tile .stat-label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.4px; }
.stat-tile .stat-value { font-size: 22px; font-weight: 800; margin-top: 2px; }

/* compact stats strip inside the auction lot box */
.lot-stats { margin: 12px 0 2px; }
.lot-stats .stat-tile { padding: 7px 10px; }
.lot-stats .stat-value { font-size: 15px; font-weight: 700; }

/* quick actions */
.quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.quick-actions a {
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}
.quick-actions a:hover { border-color: var(--primary); background: var(--primary-soft); }
.quick-actions a .qa-sub { font-weight: 400; font-size: 12.5px; color: var(--muted); }

/* hero */
.hero { text-align: center; padding: 34px 16px 22px; }
.hero h1 { font-size: 30px; margin: 0 0 8px; }
.hero .hero-sub { color: var(--muted); margin: 0 0 18px; }
.hero-actions { display: flex; gap: 10px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }

/* SCL brand band (home hero + docs header) */
.brand-band {
  position: relative;
  background: var(--scl-navy);
  color: #fff;
  border-radius: var(--radius);
  padding: 26px 20px 22px;
  margin-bottom: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.brand-band::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: var(--scl-volt);
}
.brand-band .band-mark {
  max-height: 64px;
  max-width: 220px;
  display: block;
  margin-bottom: 10px;
  border-radius: 8px;
}
.brand-band h1 { color: #fff; margin: 0 0 6px; }
.brand-band .band-sub { color: rgba(255, 255, 255, 0.75); margin: 0 0 16px; }
.brand-band .band-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.brand-band .btn { background: rgba(255, 255, 255, 0.10); border-color: rgba(255, 255, 255, 0.25); color: #fff; }
.brand-band .btn:hover { background: rgba(255, 255, 255, 0.18); border-color: #fff; }
.brand-band .btn-primary { background: var(--scl-volt); border-color: var(--scl-volt); color: var(--scl-navy); }
.brand-band .btn-primary:hover { background: #b8ff45; border-color: #b8ff45; color: var(--scl-navy); }

/* --------------------------------------------------------------------------
   buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-block;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  line-height: 1.35;
}
.btn:hover { border-color: var(--primary); text-decoration: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-2); border-color: var(--primary-2); }
.btn-volt { background: var(--scl-volt); border-color: var(--scl-volt); color: var(--scl-navy); font-weight: 700; }
.btn-volt:hover { background: #b8ff45; border-color: #b8ff45; color: var(--scl-navy); }
.btn-secondary { background: var(--surface); border-color: var(--primary); color: var(--primary); }
.btn-secondary:hover { background: var(--primary-soft); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #b3261e; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: var(--surface-2); }
.btn-small { padding: 4px 9px; font-size: 13px; }
.btn-block { display: block; width: 100%; }

/* --------------------------------------------------------------------------
   forms
   -------------------------------------------------------------------------- */
label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; font-weight: 600; }
input, select, textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  font-size: 14px;
  margin: 2px 0;
  width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
input[type="checkbox"] { width: auto; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 6px 0; }
.row input, .row select { width: auto; }
.checkbox-label { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-size: 14px; }
.field-hint { color: var(--muted); font-size: 12.5px; margin: 2px 0 0; }
label.field { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); }
label.field select, label.field input { width: auto; min-width: 110px; }

/* margin calculator tables */
.mc-table td, .mc-table th { font-size: 12.5px; padding: 5px 8px; }
.mc-table tr.nrr-good { background: var(--success-soft, #eafaf1); }
.mc-table .nrr-good td:first-child { font-weight: 700; }

/* per-match 'what's at stake' */
.stakes-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.stake-box { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; background: var(--surface); }

/* --------------------------------------------------------------------------
   tables
   -------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.4px; }

/* --------------------------------------------------------------------------
   tags, chips, feeds
   -------------------------------------------------------------------------- */
.tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
  margin: 2px;
  font-weight: 600;
}
.tag-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.tag-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.tag-success { background: var(--success); border-color: var(--success); color: #fff; }
.tag-warn { background: var(--warn); border-color: var(--warn); color: #fff; }
.tag-info { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.chip {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 12.5px;
  margin: 2px;
}
.chip-bench { opacity: 0.6; }
.chip-success { background: var(--success-soft); border-color: rgba(30, 142, 90, 0.35); color: var(--success); }
.chip-warn { background: var(--warn-soft); border-color: rgba(180, 83, 9, 0.35); color: var(--warn); }
.chip-danger { background: var(--danger-soft); border-color: rgba(217, 48, 37, 0.35); color: var(--danger); }
.chip-info { background: var(--primary-soft); border-color: rgba(47, 111, 237, 0.35); color: var(--primary); }
.chips { margin: 6px 0; }

.season-switch { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.season-switch a {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.season-switch a:hover { border-color: var(--primary); }
.season-switch a.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.season-list { list-style: none; padding: 0; margin: 0; }
.season-list li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.season-list li:last-child { border-bottom: none; }

/* --------------------------------------------------------------------------
   auction bits (restyled for light theme)
   -------------------------------------------------------------------------- */
.lot-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; }
.lot-name { font-size: 20px; font-weight: 700; }
.lot-bid { margin-top: 6px; font-size: 16px; }
.lot-base { color: var(--muted); font-size: 13px; }
.bid-controls { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.team-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; margin: 10px 0; }
.team-box.team-takeover { border-color: var(--danger); }
.team-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.team-stats { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 13px; margin: 6px 0; }
.team-stats strong { color: var(--text); }

.feed { list-style: none; margin: 0; padding: 0; max-height: 320px; overflow-y: auto; }
.feed li { padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.feed li:last-child { border-bottom: none; }

.balance-row { display: flex; gap: 12px; margin-bottom: 10px; }
.balance-box { flex: 1; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; }
.balance { font-size: 26px; font-weight: 800; }

/* wager pool bars */
.pool-bar, .pool-bar-lg {
  display: flex;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
  margin: 8px 0;
}
.pool-bar-lg { height: 18px; }
.pool-yes { background: var(--primary); }
.pool-no { background: var(--danger); }

/* ledger feed (public finances) */
.ledger-feed li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; }
.ledger-icon { flex: none; font-size: 15px; width: 22px; text-align: center; }
.ledger-body { flex: 1; }
.ledger-amount { flex: none; font-weight: 700; }

/* tabs (leaderboards) — pure CSS, radio-driven */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.tab-input { position: absolute; opacity: 0; pointer-events: none; }
.tab-label {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin: 0;
}
.tab-input:checked + .tab-label { background: var(--primary); border-color: var(--primary); color: #fff; }
.tab-panel { display: none; width: 100%; }
.tab-panel-visible { display: block; }
#lb-bat:checked ~ #panel-bat,
#lb-bowl:checked ~ #panel-bowl,
#lb-sixes:checked ~ #panel-sixes,
#lb-sr:checked ~ #panel-sr,
#lb-econ:checked ~ #panel-econ { display: block; }
#balls-tab-1:checked ~ #panel-1,
#balls-tab-2:checked ~ #panel-2,
#balls-tab-3:checked ~ #panel-3 { display: block; }

/* ball-by-ball over grid */
.balls-grid { display: flex; flex-direction: column; gap: 14px; }
.over-block { }
.over-head { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; letter-spacing: .04em; }
.over-balls { display: flex; flex-wrap: wrap; gap: 6px; }
.ball {
  flex: none;
  font-size: 13px; font-weight: 700;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  min-width: 30px; text-align: center;
  padding: 0;
}
.ball summary { list-style: none; cursor: pointer; padding: 6px 8px; }
.ball summary::-webkit-details-marker { display: none; }
.ball[open] { border-color: var(--primary); }
.ball-wkt { background: var(--danger-soft, #fdecec); border-color: var(--danger); color: var(--danger); }
.ball-four { background: var(--primary-soft, #e8f0fe); border-color: var(--primary); color: var(--primary); }
.ball-six { background: var(--gold); border-color: var(--gold); color: #fff; }
.ball-extra { border-style: dashed; color: var(--muted); }
.ball-detail { border-top: 1px solid var(--border); padding: 6px 8px; font-size: 12px; min-width: 180px; }
.ball-detail p { margin: 0 0 4px; }
.ball-detail p:last-child { margin-bottom: 0; }
.podium-list li { display: flex; gap: 10px; align-items: center; }
.rank-badge {
  display: inline-block;
  width: 24px; height: 24px;
  line-height: 24px;
  text-align: center;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 700;
  flex: none;
}
.podium-list li.podium { background: var(--surface-2); border-radius: var(--radius-sm); padding: 8px 10px; margin: 2px -10px; border: 1px solid var(--border); }
.podium-list li.podium:nth-child(1) .rank-badge { background: var(--gold); border-color: var(--gold); color: #fff; }
.podium-list li.podium:nth-child(2) .rank-badge { background: #9aa3af; border-color: #9aa3af; color: #fff; }
.podium-list li.podium:nth-child(3) .rank-badge { background: #c98a4b; border-color: #c98a4b; color: #fff; }

/* league table zones */
.table-standings td { vertical-align: middle; }
.rank-cell { width: 34px; }
.rank-cell b { display: inline-block; width: 22px; height: 22px; line-height: 22px; text-align: center; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); font-size: 12px; }
.zone-champion { background: var(--warn-soft); }
.zone-champion .rank-cell b { background: var(--gold); border-color: var(--gold); color: #fff; }
.zone-qualify { background: var(--primary-soft); }
.zone-qualify .rank-cell b { background: var(--primary); border-color: var(--primary); color: #fff; }
.nrr-cell { font-weight: 700; }

/* phase stepper (live board) */
.stepper { overflow-x: auto; }
.stepper ol { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.stepper li { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.stepper li + li::before { content: "›"; color: var(--border); margin: 0 2px; }
.step-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); display: inline-block; }
.stepper li.done { color: var(--muted); }
.stepper li.done .step-dot { background: var(--success); border-color: var(--success); }
.stepper li.current { color: var(--text); font-weight: 700; }
.stepper li.current .step-dot { background: var(--primary); border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }

/* result cards (home latest results) */
.result-card { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); margin-bottom: 10px; }
.result-card .rc-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.result-card .rc-title { font-weight: 700; }
.result-card .rc-meta { color: var(--muted); font-size: 12.5px; }
.result-card .rc-line { font-size: 13.5px; color: var(--text); }
.result-card .rc-line b { font-weight: 700; }
.result-card .rc-result { font-size: 13px; font-weight: 600; }

/* --------------------------------------------------------------------------
   toasts (flash -> toast)
   -------------------------------------------------------------------------- */
.toast-wrap {
  position: fixed;
  top: calc(var(--nav-h) + 10px);
  right: 14px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(360px, calc(100vw - 28px));
}
.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--muted);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 11px 14px;
  font-size: 14px;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.toast-success { border-left-color: var(--success); }
.toast.toast-error { border-left-color: var(--danger); }
.toast.toast-info { border-left-color: var(--primary); }
.toast.toast-warning { border-left-color: var(--warn); }
@media (min-width: 761px) {
  .flash-wrap { max-width: 1000px; margin: 12px auto 0; padding: 0 16px; }
}
.flash { padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 8px; font-size: 14px; border: 1px solid var(--border); }
.flash-success { background: var(--success-soft); border-color: rgba(30, 142, 90, 0.35); color: var(--success); }
.flash-error { background: var(--danger-soft); border-color: rgba(217, 48, 37, 0.35); color: var(--danger); }
.flash-info { background: var(--primary-soft); border-color: rgba(47, 111, 237, 0.35); color: var(--primary); }

/* --------------------------------------------------------------------------
   misc
   -------------------------------------------------------------------------- */
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.error-text { color: var(--danger); font-size: 13px; min-height: 18px; display: block; margin-top: 4px; }
.banner { padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 14px; font-weight: 600; font-size: 14px; }
.banner-danger { background: var(--danger-soft); border: 1px solid rgba(217, 48, 37, 0.4); color: var(--danger); }
.banner-success { background: var(--success-soft); border: 1px solid rgba(30, 142, 90, 0.4); color: var(--success); }
.banner-warn { background: var(--warn-soft); border: 1px solid rgba(180, 83, 9, 0.4); color: var(--warn); }
.banner-info { background: var(--primary-soft); border: 1px solid rgba(47, 111, 237, 0.4); color: var(--primary); }
.auth-card { max-width: 420px; margin: 30px auto; }
.auth-card .auth-brand { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.auth-card .auth-sub { color: var(--muted); margin: 0 0 6px; }
details { margin: 6px 0; }
summary { cursor: pointer; color: var(--primary); font-weight: 600; }
.inline-details { display: inline-block; }

/* --------------------------------------------------------------------------
   responsive: mobile nav + bottom bar
   -------------------------------------------------------------------------- */
@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-block; }
  .bottom-bar { display: block; }
  body { padding-bottom: calc(var(--bottom-bar-h) + 20px); }
  .hero h1 { font-size: 25px; }
  .page-head h1 { font-size: 21px; }
}

/* team branding assets */
.team-logo {
  display: inline-block;
  border-radius: 8px;
  background: var(--surface-2);
  object-fit: contain;
  vertical-align: middle;
}
.team-banner {
  display: block;
  width: 100%;
  max-width: 100%;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border);
}
.team-logo-sm {
  display: inline-block;
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: 4px;
  vertical-align: -5px;
  background: var(--surface);
  margin-right: 5px;
}

/* rendered documents (docs + changelog) */
.doc-body .doc-figure { margin: 1em 0; text-align: center; }
.doc-body .doc-figure img { max-width: 100%; max-height: 220px; border-radius: 8px; border: 1px solid var(--line, #e5e7eb); }
.doc-body { line-height: 1.55; }
.doc-body h1, .doc-body h2, .doc-body h3 { color: var(--scl-navy, #18857c); margin: 0.9em 0 0.35em; }
.doc-body h1 { font-size: 22px; }
.doc-body h2 { font-size: 18px; border-bottom: 2px solid var(--volt, #a3ff00); padding-bottom: 4px; }
.doc-body h3 { font-size: 15px; }
.doc-body p { margin: 0.5em 0; }
.doc-body ul, .doc-body ol { margin: 0.5em 0 0.5em 1.4em; }
.doc-body li { margin: 0.25em 0; }
.doc-body blockquote { border-left: 3px solid var(--volt, #a3ff00); margin: 0.6em 0; padding: 0.1em 0 0.1em 0.9em; color: var(--muted, #6b7280); }
.doc-body code { background: var(--bg-soft, #f3f4f6); padding: 1px 5px; border-radius: 4px; font-size: 0.92em; }
.doc-body hr { border: none; border-top: 1px solid var(--line, #e5e7eb); margin: 1em 0; }
.doc-body table { width: 100%; border-collapse: collapse; margin: 0.6em 0; }
.doc-body th, .doc-body td { border: 1px solid var(--line, #e5e7eb); padding: 6px 9px; text-align: left; font-size: 0.94em; }
.doc-body th { background: var(--bg-soft, #f3f4f6); }
.doc-body table thead th { background: var(--scl-navy); color: #fff; }
.doc-body table tr:nth-child(even) td { background: var(--bg-soft, #f3f4f6); }
