/* ─── Design tokens ─────────────────────────────────────────────────────── */
:root {
  --bg: #f0f2f5;
  --surface: #ffffff;
  --nav-bg: #1a2744;
  --nav-text: #e8ecf4;
  --ink: #111827;
  --muted: #6b7280;
  --accent: #00853d;        /* AFL green */
  --accent-warm: #e8531a;   /* used for medium confidence / close game */
  --red: #c0392b;
  --line: rgba(0, 0, 0, 0.09);
  --border: rgba(0, 0, 0, 0.09);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow: 0 2px 8px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.04);
  --radius: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
}

/* ─── Site header / nav ─────────────────────────────────────────────────── */
.site-header {
  background: var(--nav-bg);
  border-bottom: 3px solid var(--accent);
}

.site-header-inner {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  gap: 1rem;
}

.site-brand {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--nav-text);
  text-decoration: none;
  padding: 0.35rem 0.85rem;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 500;
  transition: background 0.15s;
}

.site-nav a:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.site-nav a.is-active {
  background: rgba(255,255,255,0.16);
  color: #fff;
}

/* ─── Main content ───────────────────────────────────────────────────────── */
.site-main {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 3rem;
}

/* ─── Page hero strip ───────────────────────────────────────────────────── */
.hero {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.4rem;
  margin-bottom: 1.25rem;
}

.hero-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}

.umpire-subnav {
  justify-content: flex-end;
}

/* ─── Buttons ───────────────────────────────────────────────────────────── */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
}

.button:hover { opacity: 0.88; }

.button-secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
}

.button-secondary:hover {
  background: var(--bg);
}

/* ─── General panels ────────────────────────────────────────────────────── */
.panel {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.2rem 1.3rem;
}

/* ─── Round grid ────────────────────────────────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.round-hero {
  padding: 1.25rem 1.4rem;
  max-width: 960px;
  margin-inline: auto;
}

.round-hero-copy {
  display: grid;
  gap: 0.5rem;
}

.round-hero-title-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.round-page-title {
  margin: 0;
  font-size: 2.2rem;
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.round-selector {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.round-selector-chip,
.round-selector-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.35rem 0.72rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.round-selector-chip {
  background: rgba(241, 245, 249, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.16);
  color: #0f172a;
}

.round-selector-nav {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.16);
  color: #475569;
}

.round-selector-nav:hover {
  background: rgba(248, 250, 252, 0.98);
}

.round-hero-controls {
  justify-content: flex-end;
  gap: 0.75rem;
}

.round-view-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.25rem;
  border-radius: 999px;
  background: rgba(241, 245, 249, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.round-view-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.1rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  color: #64748b;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 700;
}

.round-view-option.is-active {
  background: rgba(255, 255, 255, 0.98);
  color: #0f172a;
  box-shadow: var(--shadow-sm);
}

.round-action-cluster {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.round-button-primary,
.round-button-quiet {
  min-height: 2.4rem;
  border-radius: 999px;
}

.round-button-primary {
  padding-inline: 1.05rem;
  box-shadow: 0 10px 20px rgba(0, 133, 61, 0.16);
}

.round-button-quiet {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #475569;
}

.round-button-quiet:hover {
  background: rgba(248, 250, 252, 0.94);
}

.round-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin: -0.15rem auto 1.15rem;
  max-width: 960px;
}

.round-highlight {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(247,249,252,0.96) 100%);
  box-shadow: var(--shadow-sm);
}

.round-highlight-roughie {
  background: linear-gradient(180deg, rgba(255,250,245,0.98) 0%, rgba(255,246,240,0.96) 100%);
}

.round-highlight-confidence {
  background: linear-gradient(180deg, rgba(246,255,249,0.98) 0%, rgba(242,250,245,0.96) 100%);
}

.round-highlight-closest {
  background: linear-gradient(180deg, rgba(248,250,252,0.98) 0%, rgba(242,245,249,0.96) 100%);
}

.round-highlight-label {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #64748b;
}

.round-highlight strong {
  font-size: 1rem;
  line-height: 1.28;
  color: #0f172a;
}

.round-highlight p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #475569;
}

.round-highlight-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.round-highlight-mini {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.14);
  color: #475569;
  font-size: 0.76rem;
  font-weight: 700;
}

.round-grid {
  grid-template-columns: 1fr;
  gap: 0.9rem;
  max-width: 960px;
  margin-inline: auto;
}

@media (min-width: 640px) {
  .round-grid {
    gap: 1.1rem;
  }

  .round-card-body {
    padding: 1.35rem 1.5rem;
  }
}

/* ─── Match card ────────────────────────────────────────────────────────── */
.match-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-top: 4px solid var(--team-color, var(--line));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.match-card.confidence-high   { border-top-color: var(--accent); }
.match-card.confidence-medium { border-top-color: var(--accent-warm); }
.match-card.confidence-coin-toss { border-top-color: var(--muted); }

.card-body {
  padding: 0.9rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.round-match-card {
  border-top-width: 1px;
  border-top-color: rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.99) 0%, rgba(248,250,252,0.97) 100%);
  box-shadow:
    0 12px 28px rgba(15, 23, 42, 0.06),
    0 0 0 1px rgba(148, 163, 184, 0.12);
}

.round-match-card.confidence-high {
  border-top-color: rgba(0, 133, 61, 0.18);
}

.round-match-card.confidence-medium {
  border-top-color: rgba(232, 83, 26, 0.2);
}

.round-match-card.confidence-coin-toss,
.round-match-card.confidence-unavailable {
  border-top-color: rgba(100, 116, 139, 0.18);
}

.round-card-body {
  padding: 1.1rem 1.15rem;
}

.round-card-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  align-items: start;
}

.round-card-match {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.round-card-kicker {
  margin-bottom: 0.1rem;
}

.round-card-matchup {
  margin-bottom: 0;
  gap: 0.75rem;
}

.round-card-match .team-badge {
  width: 46px;
  height: 46px;
}

.round-card-match .matchup-title {
  font-size: 1.22rem;
  line-height: 1.2;
  letter-spacing: -0.03em;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.round-card-venue {
  margin: 0.16rem 0 0;
  font-size: 0.84rem;
}

.round-card-tip-panel {
  display: grid;
  gap: 0.55rem;
  min-height: 100%;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(248, 250, 252, 0.9);
}

.round-card-tip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.round-card-tip-label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.round-card-confidence-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.75rem;
  min-height: 2.15rem;
  padding: 0.34rem 0.72rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  color: #334155;
  font-size: 1rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.round-card-tip-team {
  font-size: 1.42rem;
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: #0f172a;
}

.round-card-tip-team-missing {
  font-size: 1.12rem;
  letter-spacing: -0.02em;
}

.round-card-confidence-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  overflow: hidden;
}

.round-card-confidence-fill {
  height: 100%;
  border-radius: 999px;
  background: #94a3b8;
}

.round-match-card.confidence-high .round-card-confidence-pill {
  background: rgba(0, 133, 61, 0.12);
  color: #0f6f3c;
}

.round-match-card.confidence-high .round-card-confidence-fill {
  background: linear-gradient(90deg, #128148 0%, #31b366 100%);
}

.round-match-card.confidence-medium .round-card-confidence-pill {
  background: rgba(232, 83, 26, 0.12);
  color: #a53b10;
}

.round-match-card.confidence-medium .round-card-confidence-fill {
  background: linear-gradient(90deg, #d96a25 0%, #f19a55 100%);
}

.round-match-card.confidence-coin-toss .round-card-confidence-pill,
.round-match-card.confidence-unavailable .round-card-confidence-pill {
  background: rgba(71, 85, 105, 0.12);
  color: #475569;
}

.round-match-card.confidence-coin-toss .round-card-confidence-fill,
.round-match-card.confidence-unavailable .round-card-confidence-fill {
  background: linear-gradient(90deg, #64748b 0%, #94a3b8 100%);
}

.round-card-tip-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.65rem;
  margin: 0;
  font-size: 0.82rem;
  color: #64748b;
}

.round-card-tip-meta span {
  display: inline-flex;
  align-items: center;
}

.round-card-tip-meta-missing {
  color: #475569;
}

.round-card-support {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 100%;
  justify-content: space-between;
  min-width: 0;
}

.round-card-reason-list {
  display: grid;
  gap: 0.65rem;
}

.round-card-reason {
  position: relative;
  display: grid;
  gap: 0.12rem;
  min-width: 0;
  padding-left: 0.95rem;
}

.round-card-reason::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.6);
}

.round-card-reason-home::before {
  background: var(--home-color, var(--accent));
}

.round-card-reason-away::before {
  background: var(--away-color, #b91c1c);
}

.round-card-reason-neutral::before {
  background: rgba(100, 116, 139, 0.7);
}

.round-card-reason-label {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.round-card-reason strong {
  font-size: 0.94rem;
  line-height: 1.32;
  color: #0f172a;
}

.round-card-reason span {
  font-size: 0.81rem;
  line-height: 1.45;
  color: #64748b;
}

.round-card-support-empty {
  margin: 0;
  max-width: 28rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #64748b;
}

.round-card-footer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.round-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
}

.round-card-badges .badge {
  border-radius: 999px;
  padding: 0.18rem 0.58rem;
  font-size: 0.68rem;
}

.round-card-detail-link {
  margin-top: 0;
  padding-top: 0;
  font-size: 0.81rem;
  color: #64748b;
}

.round-card-detail-link:hover {
  color: #0f172a;
  text-decoration: none;
}

/* Match header row with logos */
.card-matchup {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.15rem;
}

.team-badge {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: block;
}

.team-logo {
  object-fit: contain;
}

.matchup-teams {
  flex: 1;
  min-width: 0;
}

.matchup-title {
  font-size: 0.98rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vs-sep {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.85em;
  margin: 0 0.15em;
}

.venue-meta {
  font-size: 0.76rem;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.eyebrow {
  margin: 0 0 0.38rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 600;
}

/* ─── Tip block ─────────────────────────────────────────────────────────── */
.tip-block {
  background: #f8f9fb;
  border-radius: 8px;
  padding: 0.6rem 0.8rem 0.5rem;
  margin-bottom: 0.7rem;
  border: 1px solid var(--line);
}

.tip-header-row {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin-bottom: 0.25rem;
}

.tip-label-tag {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 600;
  flex-shrink: 0;
}

.tip-team-name {
  font-weight: 700;
  font-size: 1rem;
  flex: 1;
  color: var(--ink);
}

.tip-prob-num {
  font-size: 1.05rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

/* Prob bar */
.prob-bar-wrap {
  height: 4px;
  background: var(--line);
  border-radius: 3px;
  margin: 0.25rem 0;
  overflow: hidden;
}

.prob-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--muted);
  transition: width 0.4s ease;
}

.confidence-high .prob-bar-fill       { background: var(--accent); }
.confidence-medium .prob-bar-fill     { background: var(--accent-warm); }
.confidence-coin-toss .prob-bar-fill  { background: var(--muted); }

.tip-sub-meta {
  font-size: 0.76rem;
  color: var(--muted);
  margin: 0.2rem 0 0;
}

/* Confidence badges */
.conf-badge {
  display: inline-block;
  padding: 0.08rem 0.45rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-right: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.conf-confidence-high    { background: rgba(0,133,61,0.1);  color: #005c2a; }
.conf-confidence-medium  { background: rgba(232,83,26,0.1); color: #a53b10; }
.conf-confidence-coin-toss { background: rgba(107,114,128,0.1); color: var(--muted); }
.conf-close              { background: rgba(232,83,26,0.12); color: #a53b10; }

/* ─── Explanation text ──────────────────────────────────────────────────── */
.card-explanation {
  font-size: 0.83rem;
  color: #4b5563;
  line-height: 1.55;
  margin: 0 0 0.65rem;
  padding-left: 0.6rem;
  border-left: 3px solid var(--accent);
}

.tip-factor-details {
  margin-top: 0.7rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.tip-factor-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  cursor: pointer;
  list-style: none;
}

.tip-factor-details summary::-webkit-details-marker {
  display: none;
}

.tip-factor-details summary::after {
  content: "Show";
  flex-shrink: 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tip-factor-details[open] summary::after {
  content: "Hide";
}

.tip-factor-details-preview {
  flex: 1;
  min-width: 0;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
}

.tip-factor-list {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.7rem;
}

.tip-factor-meter {
  margin: 0;
}

.factor-meter-labels span:nth-child(2) {
  color: #475569;
  letter-spacing: 0;
  text-transform: none;
  font-size: 0.72rem;
  font-weight: 600;
}

.tip-factor-empty {
  margin: 0.7rem 0 0;
  color: #475569;
  font-size: 0.77rem;
  line-height: 1.45;
}

.market-odds {
  display: grid;
  gap: 0.45rem;
}

.market-odds-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.market-odds-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.38rem;
}

.market-odds-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
  min-height: 34px;
  padding: 0.38rem 0.56rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.72);
  color: #0f172a;
  white-space: nowrap;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 1px 2px rgba(15, 23, 42, 0.05);
}

.market-odds-team {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #64748b;
  text-transform: uppercase;
}

.market-odds-pill strong {
  font-size: 0.88rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.market-line-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
  min-height: 34px;
  padding: 0.38rem 0.56rem;
  border-radius: 999px;
  background: rgba(233, 239, 246, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.22);
  font-size: 0.72rem;
  color: #334155;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 1px 2px rgba(15, 23, 42, 0.035);
}

.market-line-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
}

.market-line-pill strong {
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f172a;
}

/* ─── Match context (crew, movement, etc.) ──────────────────────────────── */
.match-context {
  font-size: 0.79rem;
  color: var(--muted);
  margin: 0.25rem 0;
  line-height: 1.5;
}

.roughie-callout {
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  background: rgba(232, 83, 26, 0.08);
  border: 1px solid rgba(232, 83, 26, 0.16);
  color: #8a3a18;
}

.analyst-insight {
  display: grid;
  gap: 0.22rem;
  padding: 0.58rem 0.72rem;
  border-radius: 8px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(241, 245, 249, 0.92);
  color: #334155;
}

.analyst-insight-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.analyst-angle {
  display: inline-flex;
  align-items: center;
  padding: 0.08rem 0.42rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: #475569;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.analyst-agree {
  background: rgba(0, 133, 61, 0.08);
  border-color: rgba(0, 133, 61, 0.16);
  color: #14532d;
}

.analyst-dissent {
  background: rgba(232, 83, 26, 0.08);
  border-color: rgba(232, 83, 26, 0.18);
  color: #9a3412;
}

.analyst-pass {
  background: rgba(71, 85, 105, 0.08);
  border-color: rgba(71, 85, 105, 0.16);
  color: #475569;
}

.analyst-detail {
  margin: 0.9rem 0 0.75rem;
}

.analyst-insight-meta,
.analyst-insight-headline,
.analyst-insight-rationale {
  margin: 0;
}

.analyst-insight-meta {
  font-size: 0.76rem;
  color: inherit;
  opacity: 0.9;
}

.analyst-insight-headline {
  font-size: 0.9rem;
  color: #0f172a;
}

.analyst-insight-rationale {
  font-size: 0.82rem;
  line-height: 1.5;
  color: #334155;
}

.rub-meter {
  display: grid;
  gap: 0.35rem;
  margin: 0 0 0.6rem;
  padding: 0.65rem 0.75rem;
  border-radius: 9px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.95) 0%, rgba(241, 245, 249, 0.95) 100%);
}

.rub-meter-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.rub-meter-summary {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
  text-align: right;
}

.rub-meter-scale {
  position: relative;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background:
    linear-gradient(90deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0.92) 50%, rgba(255,255,255,0.25) 100%),
    linear-gradient(90deg, var(--rub-home, #0f766e) 0%, #f8fafc 50%, var(--rub-away, #b91c1c) 100%);
}

.rub-meter-scale::after {
  content: "";
  position: absolute;
  top: -1px;
  bottom: -1px;
  left: 50%;
  width: 1px;
  background: rgba(15, 23, 42, 0.14);
}

.rub-meter-needle {
  position: absolute;
  top: -8px;
  width: 16px;
  height: 28px;
  pointer-events: none;
}

.rub-meter-needle::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 7px;
  bottom: 0;
  width: 3px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: var(--rub-needle, #475569);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.92);
}

.rub-meter-needle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 12px;
  height: 12px;
  transform: translateX(-50%) rotate(45deg);
  border-radius: 3px;
  background: var(--rub-needle, #475569);
  border: 2px solid rgba(255,255,255,0.95);
  box-shadow: 0 6px 12px rgba(15, 23, 42, 0.16);
}

.rub-meter-labels {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.rub-meter-labels span:nth-child(2) {
  text-align: center;
  color: #475569;
}

.rub-meter-labels span:last-child {
  text-align: right;
}

/* ─── Context badges strip (Step 8) ────────────────────────────────────── */
.card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0.4rem 0 0.2rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-neutral { background: rgba(71,85,105,0.08); color: #475569; border: 1px solid rgba(71,85,105,0.12); }
.badge-analyst-agree { background: rgba(0,133,61,0.08); color: #0f6f3c; border: 1px solid rgba(0,133,61,0.14); }
.badge-analyst-dissent { background: rgba(232,83,26,0.08); color: #a53b10; border: 1px solid rgba(232,83,26,0.14); }
.badge-injury  { background: rgba(192,57,43,0.1);  color: #8b2b1e; }
.badge-return  { background: rgba(47,95,130,0.1); color: #1d4e6e; }
.badge-weather { background: rgba(0,133,61,0.08);  color: #005c2a; }
.badge-form-home { background: rgba(0,133,61,0.1); color: #005c2a; }
.badge-form-away { background: rgba(192,57,43,0.1); color: #8b2b1e; }
.badge-bogey   {
  background: rgba(120, 53, 15, 0.14);
  color: #92400e;
  border: 1px solid rgba(146, 64, 14, 0.18);
}

/* Injury tags */
.injury-tag {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.74rem;
  margin: 0.1rem 0.12rem 0.1rem 0;
  font-family: var(--font);
  font-weight: 500;
}

.injury-tag.home { background: rgba(47,95,130,0.1); color: #1d4e6e; border: 1px solid rgba(47,95,130,0.2); }
.injury-tag.away { background: rgba(160,60,20,0.1); color: #7a280e; border: 1px solid rgba(160,60,20,0.2); }

.availability-stack {
  display: grid;
  gap: 0.35rem;
}

.availability-group {
  display: grid;
  gap: 0.2rem;
}

.availability-group strong {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.factor-status-note {
  display: grid;
  gap: 0.15rem;
  padding: 0.45rem 0.55rem;
  border-radius: 6px;
  background: rgba(107,114,128,0.08);
  border: 1px solid rgba(107,114,128,0.14);
}

.factor-status-note strong {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.factor-status-note span {
  font-size: 0.82rem;
  color: #374151;
  line-height: 1.45;
}

.factor-status-note-bogey {
  background: rgba(120, 53, 15, 0.08);
  border-color: rgba(146, 64, 14, 0.18);
}

.factor-status-note-bogey strong {
  color: #92400e;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.4rem;
  padding: 0.3rem 0.58rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-chip-in {
  background: rgba(0,133,61,0.12);
  color: #0f6f3c;
}

.status-chip-out,
.status-chip-unavailable {
  background: rgba(192,57,43,0.12);
  color: #8b2b1e;
}

.status-chip-test {
  background: rgba(180, 122, 18, 0.14);
  color: #8a5a06;
}

.status-chip-managed,
.status-chip-omitted {
  background: rgba(71,85,105,0.12);
  color: #475569;
}

.status-chip-late {
  background: rgba(14,116,144,0.12);
  color: #0f766e;
}

.status-chip-milestone {
  background: rgba(37,99,235,0.12);
  color: #1d4ed8;
}

.availability-panel {
  display: grid;
  gap: 1rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.985) 0%, rgba(246,248,251,0.98) 100%);
}

.availability-headline {
  margin: 0.25rem 0 0;
  font-size: 1.55rem;
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.availability-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.availability-team-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 0.9rem;
  min-width: 0;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid rgba(148,163,184,0.14);
  border-top: 3px solid var(--availability-team-color, #475569);
  background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(248,250,252,0.94) 100%);
}

.availability-team-head {
  display: grid;
  gap: 0.85rem;
}

.availability-impact-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.72rem 0.85rem;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 600;
}

.availability-impact-pill strong {
  font-size: 1.15rem;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.availability-impact-pill-clear {
  background: rgba(71,85,105,0.08);
  color: #475569;
}

.availability-impact-pill-minor {
  background: rgba(15,118,110,0.1);
  color: #0f766e;
}

.availability-impact-pill-moderate {
  background: rgba(180, 122, 18, 0.12);
  color: #8a5a06;
}

.availability-impact-pill-major {
  background: rgba(192,57,43,0.12);
  color: #8b2b1e;
}

.availability-card-section {
  display: grid;
  gap: 0.65rem;
}

.availability-card-section-watch {
  padding-top: 0.2rem;
}

.availability-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.availability-player-list {
  display: grid;
  gap: 0.7rem;
}

.availability-player-row {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
}

.availability-player-row + .availability-player-row {
  padding-top: 0.72rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.availability-player-copy,
.availability-technical-copy {
  display: grid;
  gap: 0.16rem;
  min-width: 0;
}

.availability-player-copy strong,
.availability-technical-copy strong {
  font-size: 0.9rem;
  line-height: 1.35;
}

.availability-player-copy span,
.availability-technical-copy span {
  color: #475569;
  font-size: 0.82rem;
  line-height: 1.45;
}

.availability-empty {
  margin: 0;
  color: #64748b;
  font-size: 0.88rem;
  line-height: 1.6;
}

.availability-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.availability-mini-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.36rem 0.58rem;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.16);
  background: rgba(255,255,255,0.92);
  color: #334155;
  font-size: 0.8rem;
  line-height: 1.2;
}

.availability-mini-pill-label {
  font-weight: 700;
}

.availability-mini-pill-test {
  border-color: rgba(180, 122, 18, 0.18);
  background: rgba(180, 122, 18, 0.08);
}

.availability-mini-pill-late {
  border-color: rgba(14,116,144,0.18);
  background: rgba(14,116,144,0.08);
}

.availability-footer {
  display: grid;
  gap: 0.45rem;
  padding-top: 0.95rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.availability-footer-item {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  color: #334155;
  font-size: 0.88rem;
  line-height: 1.45;
}

.availability-footer-label {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.availability-technical {
  margin-top: 0;
  padding-top: 0.95rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.availability-technical-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 0.9rem;
  margin-top: 0.8rem;
}

.availability-technical-card {
  display: grid;
  align-content: start;
  gap: 0.7rem;
  min-width: 0;
  padding: 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,0.14);
  background: rgba(255,255,255,0.92);
}

.availability-technical-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.availability-technical-head span {
  color: #64748b;
  font-size: 0.8rem;
}

.availability-technical-list {
  display: grid;
  gap: 0.6rem;
}

.availability-technical-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.availability-technical-row + .availability-technical-row {
  padding-top: 0.6rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.availability-technical-notes {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.8rem;
}

.movement { color: var(--accent-warm); font-weight: 600; }

/* ─── Detail link ───────────────────────────────────────────────────────── */
.detail-link {
  display: inline-block;
  margin-top: auto;
  padding-top: 0.7rem;
  font-size: 0.82rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.detail-link:hover { text-decoration: underline; }

.round-card-detail-link:hover {
  text-decoration: none;
}

@media (max-width: 1100px) {
  .round-highlights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .round-hero {
    align-items: flex-start;
  }

  .round-hero-controls {
    justify-content: flex-start;
  }

}


/* ─── Detail page two-column grid ───────────────────────────────────────── */
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 1rem;
  align-items: stretch;
  margin-bottom: 1rem;
}

.detail-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.detail-column > * {
  flex-shrink: 0;
}

.detail-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.detail-subsection {
  display: grid;
  gap: 0.7rem;
  margin-top: 1rem;
}

.detail-inline-note {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.6;
  color: #475569;
}

.match-summary-factor-list {
  margin-top: 0;
}

.detail-note-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.6rem;
}

.detail-umpire-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.15rem;
}

.detail-subsection-summary {
  margin-top: 0.9rem;
  padding-top: 0.95rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  gap: 0.35rem;
}

.umpire-crew-panel {
  padding: 1.35rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.985) 0%, rgba(246,248,251,0.985) 100%);
}

.umpire-crew-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.umpire-crew-section-head h2 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: #0f172a;
}

.umpire-crew-section-head p {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #64748b;
}

.umpire-crew-hero {
  display: grid;
  gap: 0.85rem;
  padding: 1.15rem 1.2rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(244,247,251,0.96) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.82),
    0 14px 32px rgba(15, 23, 42, 0.06);
}

.umpire-crew-hero-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.umpire-crew-hero-meta {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
}

.umpire-crew-hero h3 {
  margin: 0;
  font-size: clamp(1.28rem, 2vw, 1.8rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
  font-weight: 700;
  color: #0f172a;
}

.umpire-crew-hero-copy {
  margin: 0;
  max-width: 44rem;
  font-size: 0.98rem;
  line-height: 1.55;
  color: #475569;
}

.umpire-crew-advantage {
  display: grid;
  gap: 0.45rem;
}

.umpire-crew-advantage-bar {
  position: relative;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background:
    linear-gradient(90deg, rgba(255,255,255,0.72) 0%, rgba(255,255,255,0.16) 50%, rgba(255,255,255,0.72) 100%),
    linear-gradient(90deg, var(--umpire-home, #0f766e) 0%, #eef2ff 50%, var(--umpire-away, #1d4ed8) 100%);
}

.umpire-crew-advantage-bar::after {
  content: "";
  position: absolute;
  top: -1px;
  bottom: -1px;
  left: 50%;
  width: 1px;
  background: rgba(15, 23, 42, 0.16);
}

.umpire-crew-advantage-marker {
  position: absolute;
  top: 50%;
  left: calc(var(--umpire-position, 50%) - 12px);
  width: 24px;
  height: 24px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: rgba(255,255,255,0.94);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.umpire-crew-advantage-marker::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 999px;
  background: #64748b;
}

.umpire-crew-advantage-marker.is-active::before {
  background: var(--umpire-highlight, #334155);
}

.umpire-crew-advantage-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.72rem;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.umpire-crew-sample-note {
  margin: 0;
  font-size: 0.79rem;
  line-height: 1.55;
  color: #64748b;
}

.umpire-crew-list {
  gap: 0.9rem;
  margin-top: 1rem;
}

.umpire-crew-card {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.05rem;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(255,255,255,0.78);
  color: inherit;
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.78),
    0 10px 22px rgba(15, 23, 42, 0.04);
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease;
}

.umpire-crew-card:hover {
  transform: translateY(-1px);
  border-color: rgba(100, 116, 139, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.84),
    0 14px 26px rgba(15, 23, 42, 0.07);
}

.umpire-crew-card.is-primary {
  background: linear-gradient(180deg, rgba(255,255,255,0.94) 0%, rgba(248,250,252,0.94) 100%);
}

.umpire-crew-card-main {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
  flex: 0 1 13rem;
}

.umpire-crew-avatar {
  width: 66px;
  height: 66px;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
}

.umpire-crew-card-copy {
  display: grid;
  align-content: center;
  gap: 0.18rem;
  min-width: 0;
}

.umpire-crew-card-copy strong {
  font-size: 1.02rem;
  line-height: 1.14;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.umpire-crew-card-copy > span:last-child {
  font-size: 0.88rem;
  color: #64748b;
}

.umpire-crew-card-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  min-width: 0;
  flex: 1 1 28rem;
}

.umpire-stat-chip {
  display: grid;
  gap: 0.52rem;
  min-width: 0;
  padding: 0.9rem 0.95rem;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(255,255,255,0.88);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.86);
}

.umpire-stat-chip-positive {
  background: linear-gradient(180deg, rgba(236,253,245,0.9) 0%, rgba(255,255,255,0.9) 100%);
}

.umpire-stat-chip-negative {
  background: linear-gradient(180deg, rgba(254,242,242,0.92) 0%, rgba(255,255,255,0.9) 100%);
}

.umpire-stat-chip-neutral,
.umpire-stat-chip-muted {
  background: linear-gradient(180deg, rgba(248,250,252,0.96) 0%, rgba(255,255,255,0.92) 100%);
}

.umpire-stat-chip-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.umpire-stat-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.92);
}

.umpire-stat-logo {
  width: 20px;
  height: 20px;
  display: block;
}

.umpire-stat-team {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.86rem;
  font-weight: 700;
  color: #334155;
}

.umpire-stat-value {
  font-size: clamp(1.12rem, 1rem + 0.8vw, 1.5rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
  white-space: nowrap;
}

.umpire-stat-value-muted {
  color: #64748b;
  opacity: 0.76;
}

.umpire-stat-foot {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.umpire-stat-sample {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.48rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.05);
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.umpire-stat-sample.is-thin {
  background: rgba(245, 158, 11, 0.14);
  color: #92400e;
}

/* ─── Match detail header with logos ────────────────────────────────────── */
.detail-matchup-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0.5rem 0;
}

.detail-team-side {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.detail-team-side-away {
  justify-content: flex-end;
}

.detail-team-copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.detail-team-copy-away {
  align-items: flex-end;
  text-align: right;
}

.detail-team-name {
  display: block;
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.2;
}

.detail-team-ladder {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--muted);
}

.detail-vs {
  flex: 0 0 auto;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 600;
}

.team-badge-lg {
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  display: block;
}

/* ─── Win probability gauge ─────────────────────────────────────────────── */
.prob-gauge-wrap {
  margin: 1rem 0 0.5rem;
}

.prob-gauge-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.3rem;
}

.prob-gauge {
  display: flex;
  height: 28px;
  border-radius: 6px;
  overflow: hidden;
  font-size: 0.8rem;
  font-weight: 700;
  color: white;
}

.prob-gauge-home {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 0.6rem;
  white-space: nowrap;
  overflow: hidden;
  min-width: 2.5rem;
  background: var(--accent);
}

.prob-gauge-away {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 0.6rem;
  white-space: nowrap;
  overflow: hidden;
  min-width: 2.5rem;
  background: #374151;
}

.selection-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
  align-items: start;
}

.selection-team {
  display: grid;
  gap: 0.75rem;
}

.selection-team-header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.selection-team-logo {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: block;
}

.selection-team h3 {
  margin: 0;
}

.selection-block {
  display: grid;
  gap: 0.35rem;
  height: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fafafa;
}

.selection-row {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 0.55rem;
  font-size: 0.82rem;
  line-height: 1.5;
}

.selection-code {
  font-weight: 700;
  color: var(--muted);
}

.selection-copy {
  font-size: 0.82rem;
  line-height: 1.6;
  color: #374151;
}

.selection-panel {
  display: grid;
  gap: 1rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.985) 0%, rgba(246,248,251,0.98) 100%);
}

.selection-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.selection-side-card {
  display: grid;
  gap: 0.9rem;
  min-width: 0;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid rgba(148,163,184,0.14);
  background: rgba(255,255,255,0.88);
}

.selection-side-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.selection-team-header h3 {
  margin: 0;
}

.selection-side-note {
  margin: 0.18rem 0 0;
  color: #64748b;
  font-size: 0.84rem;
  line-height: 1.45;
}

.selection-status-section {
  display: grid;
  gap: 0.55rem;
}

.selection-side-card > .selection-status-section + .selection-status-section {
  padding-top: 0.85rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.selection-status-section-secondary {
  padding: 0.8rem 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,0.14);
  background: rgba(248,250,252,0.9);
}

.selection-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.selection-chip-row {
  display: grid;
  gap: 0.55rem;
}

.selection-chip-row-compact {
  gap: 0.45rem;
}

.selection-player-pill {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.78rem 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,0.14);
  background: rgba(255,255,255,0.96);
}

.selection-player-pill-in {
  border-color: rgba(0,133,61,0.16);
  background: rgba(0,133,61,0.04);
}

.selection-player-pill-out {
  border-color: rgba(192,57,43,0.16);
  background: rgba(192,57,43,0.04);
}

.selection-player-pill-managed,
.selection-player-pill-omitted {
  border-color: rgba(71,85,105,0.16);
  background: rgba(71,85,105,0.04);
}

.selection-player-pill-milestone {
  border-color: rgba(37,99,235,0.16);
  background: rgba(37,99,235,0.04);
}

.selection-player-copy {
  display: grid;
  gap: 0.14rem;
  min-width: 0;
}

.selection-player-copy strong {
  font-size: 0.88rem;
  line-height: 1.35;
}

.selection-player-copy span {
  color: #475569;
  font-size: 0.8rem;
  line-height: 1.45;
}

.selection-empty {
  margin: 0;
  color: #64748b;
  font-size: 0.86rem;
}

.selection-note-grid {
  display: grid;
  gap: 0.75rem;
}

.selection-lineup-details {
  margin-top: 0.1rem;
}

.selection-lineup-grid {
  display: grid;
  gap: 0.55rem;
  padding-top: 0.8rem;
}

.selection-lineup-row {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 0.55rem;
  font-size: 0.82rem;
  line-height: 1.55;
}

.performance-panel {
  display: grid;
  gap: 1rem;
}

.performance-section {
  display: grid;
  gap: 0.85rem;
}

.performance-section + .performance-section {
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}

.performance-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.performance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.performance-card {
  display: grid;
  gap: 0.9rem;
  min-width: 0;
  padding: 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(250, 250, 250, 0.98) 0%, rgba(245, 247, 250, 0.98) 100%);
}

.performance-card-season {
  align-content: start;
}

.performance-card-head {
  display: grid;
  gap: 0.75rem;
}

.performance-team {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  min-width: 0;
}

.performance-team-copy {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.performance-team-copy strong {
  font-size: 0.9rem;
  color: #0f172a;
  line-height: 1.25;
}

.performance-sample {
  font-size: 0.75rem;
  line-height: 1.4;
  color: #64748b;
}

.performance-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.performance-stat {
  display: grid;
  gap: 0.2rem;
  padding: 0.8rem 0.85rem;
  border-radius: 8px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.85);
}

.performance-stat-label {
  font-size: 0.7rem;
  line-height: 1.2;
  color: #64748b;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 700;
}

.performance-stat strong {
  font-size: 1.05rem;
  line-height: 1.1;
  color: #0f172a;
}

.performance-positive {
  color: #047857;
}

.performance-negative {
  color: #b91c1c;
}

.performance-game-list {
  display: grid;
  gap: 0.55rem;
}

.performance-game {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.7rem;
  align-items: start;
  padding: 0.75rem 0.85rem;
  border-radius: 8px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.82);
}

.performance-game-win {
  box-shadow: inset 3px 0 0 rgba(4, 120, 87, 0.45);
}

.performance-game-loss {
  box-shadow: inset 3px 0 0 rgba(185, 28, 28, 0.4);
}

.performance-game-draw {
  box-shadow: inset 3px 0 0 rgba(71, 85, 105, 0.35);
}

.performance-game-outcome {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.8rem;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-size: 0.74rem;
  line-height: 1;
  font-weight: 800;
}

.performance-game-win .performance-game-outcome {
  background: #047857;
}

.performance-game-loss .performance-game-outcome {
  background: #b91c1c;
}

.performance-game-copy {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.performance-game-copy strong {
  font-size: 0.85rem;
  line-height: 1.35;
  color: #0f172a;
}

.performance-game-copy span {
  font-size: 0.76rem;
  line-height: 1.4;
  color: #64748b;
}

.performance-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 5.5rem;
  padding: 1rem;
  color: #64748b;
  font-size: 0.84rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.72);
  border: 1px dashed rgba(100, 116, 139, 0.25);
  border-radius: 8px;
}

/* ─── Factor contribution bars (Step 7) ────────────────────────────────── */
.factor-section {
  margin-top: 1rem;
}

.factor-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.factor-section-copy {
  flex: 1 1 28rem;
  min-width: 0;
}

.tip-balance-meter {
  display: grid;
  gap: 0.55rem;
}

.tip-balance-scale {
  position: relative;
  height: 14px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.28) 0%, rgba(255,255,255,0.94) 50%, rgba(255,255,255,0.28) 100%),
    linear-gradient(90deg, var(--balance-home, #0f766e) 0%, #f8fafc 50%, var(--balance-away, #b91c1c) 100%);
  border: 1px solid var(--border);
  overflow: hidden;
}

.tip-balance-scale::after {
  content: "";
  position: absolute;
  top: -1px;
  bottom: -1px;
  left: 50%;
  width: 1px;
  background: rgba(17, 24, 39, 0.14);
}

.tip-balance-needle {
  position: absolute;
  top: -10px;
  width: 16px;
  height: 32px;
  pointer-events: none;
}

.tip-balance-needle::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 8px;
  bottom: 0;
  width: 4px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: var(--balance-needle, #111827);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.92);
}

.tip-balance-needle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 12px;
  height: 12px;
  transform: translateX(-50%) rotate(45deg);
  border-radius: 3px;
  background: var(--balance-needle, #111827);
  border: 2px solid rgba(255,255,255,0.96);
  box-shadow: 0 6px 12px rgba(15, 23, 42, 0.18);
}

.tip-balance-labels {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.6rem;
  font-size: 0.76rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.tip-balance-labels span:nth-child(2) {
  color: var(--ink);
  text-align: center;
}

.tip-balance-labels span:last-child {
  text-align: right;
}

.tip-reasons-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0 0.75rem;
}

.tip-reasons-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem;
  background: #fafafa;
}

.tip-reasons-card.home {
  box-shadow: inset 0 0 0 1px rgba(0, 133, 61, 0.05);
}

.tip-reasons-card.away {
  box-shadow: inset 0 0 0 1px rgba(185, 28, 28, 0.05);
}

.tip-reason-list {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.35rem;
  font-size: 0.84rem;
  line-height: 1.5;
  color: #374151;
}

.tip-context-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.technical-details {
  margin-top: 0.85rem;
}

.technical-details summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.technical-details[open] summary {
  margin-bottom: 0.55rem;
}

/* ─── Raw values table (hidden by default) ──────────────────────────────── */
.feature-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  display: none;
}

.feature-table.visible { display: table; }

.feature-table th,
.feature-table td {
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.feature-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.feature-table td:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 0.83rem;
}

.feature-table td:nth-child(2),
.feature-table td:nth-child(3) {
  font-size: 0.76rem;
  white-space: nowrap;
}

.umpire-inline-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.umpire-inline-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: #334155;
  font-size: 0.78rem;
  font-weight: 600;
}

.umpire-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 0.75rem;
  width: 100%;
}

.umpire-card {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,250,252,0.98) 100%);
  color: inherit;
  text-decoration: none;
}

.umpire-card-detail {
  align-items: stretch;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0.95rem;
}

.umpire-card:hover {
  border-color: rgba(15, 23, 42, 0.18);
}

.umpire-card-main {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  flex: 0 1 210px;
}

.umpire-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #dbeafe 0%, #e2e8f0 100%);
  color: #1e3a8a;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.umpire-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.umpire-card-copy {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.umpire-card-copy strong {
  font-size: 0.83rem;
  color: #0f172a;
}

.umpire-card-copy span {
  font-size: 0.74rem;
  color: #64748b;
}

.umpire-card-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  min-width: 0;
  flex: 1 1 300px;
  padding-left: 1rem;
  border-left: 1px solid rgba(15, 23, 42, 0.08);
}

.umpire-lean-stat {
  min-width: 0;
  align-content: start;
  justify-items: start;
  gap: 0.28rem;
  padding: 0.75rem 0.8rem;
}

.umpire-lean-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 20px;
  width: 100%;
}

.umpire-lean-head .team-logo {
  object-fit: contain;
}

.umpire-lean-head svg {
  display: block;
}

.umpire-lean-logo {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: block;
}

.umpire-lean-stat strong {
  font-size: 1.45rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  min-width: 0;
}

.umpire-lean-sample {
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 721px) and (max-width: 1100px) {
  .umpire-lean-logo {
    display: none;
  }
}

@media (max-width: 720px) {
  .round-hero-title-row,
  .round-hero-controls,
  .round-action-cluster {
    width: 100%;
  }

  .round-page-title {
    font-size: 1.85rem;
  }

  .round-view-switch {
    width: 100%;
  }

  .round-view-option {
    flex: 1;
  }

  .round-action-cluster {
    flex-wrap: wrap;
  }

  .round-button-primary,
  .round-button-quiet {
    flex: 1 1 0;
  }

  .round-highlights {
    grid-template-columns: 1fr;
  }

  .round-card-match .team-badge {
    width: 40px;
    height: 40px;
  }

  .round-card-match .matchup-title {
    font-size: 1.04rem;
  }

  .tip-reasons-grid {
    grid-template-columns: 1fr;
  }

  .tip-factor-details summary {
    flex-direction: column;
    align-items: flex-start;
  }

  .market-odds {
    gap: 0.45rem;
  }

  .market-odds-row {
    gap: 0.34rem;
  }

  .tip-factor-details-preview {
    text-align: left;
  }

  .detail-note-grid {
    grid-template-columns: 1fr;
  }

  .performance-grid {
    grid-template-columns: 1fr;
  }

  .performance-stat-grid {
    grid-template-columns: 1fr;
  }

  .availability-grid,
  .availability-technical-grid,
  .selection-summary-grid,
  .selection-grid {
    grid-template-columns: 1fr;
  }

  .availability-headline {
    font-size: 1.35rem;
  }

  .tip-balance-labels {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .tip-balance-labels span:last-child,
  .tip-balance-labels span:nth-child(2) {
    text-align: left;
  }

  .umpire-crew-panel {
    padding: 1.1rem;
  }

  .umpire-crew-section-head h2 {
    font-size: 1.35rem;
  }

  .umpire-crew-section-head p {
    font-size: 0.88rem;
  }

  .umpire-crew-hero {
    padding: 1rem;
    border-radius: 16px;
  }

  .umpire-crew-hero-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .umpire-crew-hero-meta {
    text-align: left;
  }

  .umpire-crew-card {
    flex-direction: column;
    gap: 0.95rem;
    padding: 0.95rem;
  }

  .umpire-crew-card-main {
    flex-basis: auto;
  }

  .umpire-crew-card-stats {
    grid-template-columns: 1fr;
  }

  .umpire-stat-foot {
    align-items: flex-start;
  }

  .umpire-crew-advantage-labels {
    font-size: 0.68rem;
  }

  .umpire-card-detail {
    flex-direction: column;
  }

  .umpire-card-main {
    flex-basis: auto;
  }

  .umpire-card-stats {
    grid-template-columns: 1fr;
    padding-left: 0;
    padding-top: 0.75rem;
    border-left: none;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
  }

  .rub-meter-labels {
    grid-template-columns: 1fr;
  }

  .rub-meter-labels span:nth-child(2),
  .rub-meter-labels span:last-child {
    text-align: left;
  }
}

/* ─── Context rows (match detail) ───────────────────────────────────────── */
.context-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.86rem;
}

.context-row:last-child { border-bottom: none; }

.context-label {
  min-width: 7rem;
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  flex-shrink: 0;
}

/* ─── Probability badge (detail page) ──────────────────────────────────── */
.prob-badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 5px;
  background: var(--accent);
  color: white;
  font-size: 0.9rem;
  font-weight: 700;
}

/* ─── Explanation text (detail page) ───────────────────────────────────── */
.explanation-text {
  font-size: 0.88rem;
  color: #374151;
  border-left: 3px solid var(--accent);
  padding-left: 0.75rem;
  margin: 0.75rem 0;
  line-height: 1.6;
}

/* ─── Tip line (detail page) ────────────────────────────────────────────── */
.tip-line { font-size: 1.15rem; font-weight: 700; }

/* ─── Breakdown tables ──────────────────────────────────────────────────── */
.breakdown-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  margin: 0.75rem 0;
}

.breakdown-table th {
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-bottom: 2px solid var(--line);
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.breakdown-table td {
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid var(--line);
}

.breakdown-table tbody tr:last-child td { border-bottom: none; }

/* ─── Status / chip ─────────────────────────────────────────────────────── */
.chip {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  background: rgba(0,0,0,0.06);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-ok      { color: var(--accent); }
.status-error   { color: var(--accent-warm); }
.status-unknown { color: var(--muted); }

/* ─── Umpire analytics pages ───────────────────────────────────────────── */
.analytics-hero-copy {
  margin: 0.35rem 0 0;
  max-width: 60ch;
}

.analytics-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.analytics-summary-card h3 {
  margin: 0 0 0.3rem;
}

.analytics-summary-card p:last-child {
  margin-bottom: 0;
}

.analytics-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.analytics-filter-copy h3 {
  margin: 0 0 0.3rem;
}

.analytics-filter-copy p:last-child {
  margin-bottom: 0;
}

.analytics-toggle-form {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.analytics-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
}

.analytics-switch-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.analytics-switch-track {
  position: relative;
  width: 3rem;
  height: 1.7rem;
  border-radius: 999px;
  background: #cbd5e1;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
  transition: background 0.18s ease;
}

.analytics-switch-track::after {
  content: "";
  position: absolute;
  top: 0.18rem;
  left: 0.18rem;
  width: 1.34rem;
  height: 1.34rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18);
  transition: transform 0.18s ease;
}

.analytics-switch-input:checked + .analytics-switch-track {
  background: var(--accent);
}

.analytics-switch-input:checked + .analytics-switch-track::after {
  transform: translateX(1.3rem);
}

.analytics-switch-copy {
  color: #0f172a;
  font-size: 0.88rem;
  font-weight: 600;
}

.analytics-sort-form {
  display: flex;
  align-items: end;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.analytics-sort-label {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.analytics-select {
  min-width: 15rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.analytics-board-grid {
  display: grid;
  gap: 1rem;
}

.analytics-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.analytics-table-wrap {
  overflow-x: auto;
}

.analytics-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.analytics-table th,
.analytics-table td {
  padding: 0.6rem 0.55rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.analytics-table th {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.analytics-table tbody tr:last-child td {
  border-bottom: none;
}

.analytics-row-muted {
  opacity: 0.72;
}

.analytics-team-cell {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.analytics-team-badge {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: block;
}

.analytics-team-badge-lg {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: block;
}

.analytics-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-left: 0.4rem;
}

.analytics-chip-muted {
  background: rgba(107, 114, 128, 0.12);
  color: #4b5563;
}

.analytics-chip-retired {
  background: rgba(148, 163, 184, 0.18);
  color: #475569;
}

.analytics-metric {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.analytics-metric-positive {
  color: #146534;
}

.analytics-metric-negative {
  color: #9f1239;
}

.analytics-metric-neutral {
  color: #475569;
}

.analytics-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.analytics-directory-table td {
  vertical-align: top;
}

.analytics-umpire-cell {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 15rem;
}

.analytics-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #dbeafe 0%, #e2e8f0 100%);
  color: #1e3a8a;
  font-size: 0.78rem;
  font-weight: 800;
}

.analytics-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.analytics-umpire-copy {
  display: grid;
  gap: 0.15rem;
}

.analytics-umpire-copy strong {
  color: #0f172a;
}

.analytics-umpire-copy span {
  color: #64748b;
  font-size: 0.74rem;
}

.analytics-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.analytics-pill-list-tight {
  margin-bottom: 0.8rem;
}

.analytics-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}

.analytics-pill small {
  font-size: 0.68rem;
  font-weight: 600;
}

.analytics-pill-positive {
  background: rgba(22, 101, 52, 0.1);
  color: #166534;
}

.analytics-pill-negative {
  background: rgba(159, 18, 57, 0.1);
  color: #9f1239;
}

.analytics-pill-neutral {
  background: rgba(71, 85, 105, 0.12);
  color: #475569;
}

.analytics-pill-muted {
  opacity: 0.72;
}

.analytics-bias-cell {
  display: grid;
  gap: 0.15rem;
}

.analytics-club-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
}

.analytics-club-card {
  display: grid;
  gap: 0.9rem;
}

.analytics-club-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.analytics-alert {
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  font-size: 0.83rem;
  line-height: 1.5;
}

.analytics-alert-positive {
  background: rgba(22, 101, 52, 0.08);
  border: 1px solid rgba(22, 101, 52, 0.14);
  color: #166534;
}

.analytics-alert-negative {
  background: rgba(159, 18, 57, 0.08);
  border: 1px solid rgba(159, 18, 57, 0.14);
  color: #9f1239;
}

.analytics-upcoming-note {
  margin: 0;
}

.analytics-club-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 0.55rem 0.9rem;
}

.analytics-list-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0.7rem 0.8rem;
  background: #fafafa;
}

.analytics-list-card-empty {
  justify-content: center;
}

.analytics-list-card p:last-child {
  margin-bottom: 0;
}

.analytics-list-meta {
  margin-top: 0.45rem;
}

.analytics-list-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.2rem;
}

.analytics-list-head strong {
  color: #0f172a;
  flex: 1;
}

.analytics-club-column-heading {
  margin-bottom: 0;
}

.analytics-list-slot {
  min-height: 0;
}

/* ─── Helpers ───────────────────────────────────────────────────────────── */
.meta { color: var(--muted); }

h1, h2, h3, p { margin-top: 0; }

h2 { font-size: 1.4rem; font-weight: 800; }
h3 { font-size: 1.05rem; font-weight: 700; }

code {
  font-family: "SFMono-Regular", Menlo, monospace;
  font-size: 0.88em;
  background: rgba(0,0,0,0.05);
  padding: 0.1em 0.3em;
  border-radius: 3px;
}

/* ─── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .hero           { flex-direction: column; align-items: stretch; }
  .detail-grid    { grid-template-columns: 1fr; }
  .factor-row     { grid-template-columns: 8rem 1fr 3rem; }
  .context-label  { min-width: 5.5rem; }
  .detail-matchup-header { gap: 0.75rem; }
  .detail-team-side { gap: 0.5rem; }
  .detail-team-name { font-size: 1rem; }
  .detail-team-ladder { font-size: 0.72rem; }
  .analytics-filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .analytics-sort-form {
    align-items: stretch;
  }
  .analytics-toggle-form {
    justify-content: space-between;
  }
  .analytics-select {
    min-width: 0;
    width: 100%;
  }
  .analytics-summary-grid,
  .analytics-club-columns {
    grid-template-columns: 1fr;
  }
}
