:root {
  --color-background: #0f0f0f;
  --color-surface: #1a1a1a;
  --color-surface-2: #222222;
  --color-row-hover: #2a2a2a;
  --color-selected: #243056;
  --color-border: #2e2e2e;
  --color-foreground: #ffffff;
  --color-muted-foreground: #9a9a9a;
  --color-tertiary: #6b6b6b;
  --color-primary: #374df5;
  --color-on-primary: #ffffff;
  --color-live: #ff4e45;
  --color-strong: #0bb32a;
  --color-avoid: #e11d48;
  --color-warn: #f59e0b;
  --color-chip: #2a2a2a;
  --color-ring: #374df5;
  --space-xs: 2px;
  --space-sm: 4px;
  --space-md: 8px;
  --space-lg: 12px;
  --space-xl: 16px;
  --space-2xl: 24px;
  --font: "IBM Plex Sans", system-ui, sans-serif;
  --board-w: minmax(380px, 560px);
  --match-w: minmax(340px, 1fr);
  --ai-w: 340px;
  --topbar-h: 56px;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--color-background);
  color: var(--color-foreground);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.35;
}

button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

.topbar {
  position: sticky; top: 0; z-index: 30;
  min-height: var(--topbar-h);
  display: grid;
  grid-template-columns: minmax(140px, 200px) auto auto 1fr;
  gap: var(--space-lg);
  align-items: center;
  padding: 0 var(--space-xl);
  background: rgba(15, 15, 15, 0.94);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(8px);
}

.topbar__brand { display: flex; align-items: center; gap: var(--space-md); min-width: 0; }
.topbar__mark {
  width: 28px; height: 28px; border-radius: 8px; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--color-primary), #6b7cff);
}
.topbar__name { font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.topbar__sport { color: var(--color-muted-foreground); font-size: 12px; }

.sport-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 999px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.sport-nav::-webkit-scrollbar { display: none; }
.sport-nav__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--color-muted-foreground);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 150ms ease, color 150ms ease;
}
.sport-nav__item:hover { color: var(--color-foreground); background: var(--color-row-hover); }
.sport-nav__item.is-active {
  background: #ffffff;
  color: #111111;
}
.sport-nav__item.is-active:hover { background: #ffffff; color: #111111; }
.sport-nav__icon { flex: 0 0 auto; }
.sport-nav__item:focus-visible {
  outline: 2px solid var(--color-ring);
  outline-offset: 2px;
}

.date-nav { display: flex; align-items: center; gap: var(--space-sm); }
.date-nav__today {
  min-width: 118px; padding: 6px 10px;
  border: 1px solid var(--color-border); border-radius: 8px;
  background: var(--color-surface); font-variant-numeric: tabular-nums; font-weight: 600;
}

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border: 1px solid var(--color-border); border-radius: 8px;
  background: var(--color-surface); color: var(--color-foreground);
  transition: background 150ms ease;
}
.icon-btn:hover { background: var(--color-row-hover); }

.icon-btn:focus-visible,
.chip:focus-visible,
.filter-tabs__btn:focus-visible,
.match-tabs__btn:focus-visible,
.btn-primary:focus-visible,
.match-row:focus-visible,
.seg__side:focus-visible,
.seg__h2h:focus-visible {
  outline: 2px solid var(--color-ring);
  outline-offset: 2px;
}

.chip {
  border: 1px solid var(--color-border); background: var(--color-chip);
  color: var(--color-foreground); border-radius: 999px;
  padding: 6px 12px; font-size: 12px; font-weight: 600;
}

.topbar__actions {
  display: flex; align-items: center; justify-content: flex-end;
  gap: var(--space-lg); min-width: 0;
}

.search {
  display: flex; align-items: center; gap: var(--space-sm);
  min-width: 180px; max-width: 280px; flex: 1;
  padding: 0 10px; height: 34px;
  border: 1px solid var(--color-border); border-radius: 8px;
  background: var(--color-surface); color: var(--color-muted-foreground);
}
.search input { width: 100%; border: 0; background: transparent; outline: none; color: var(--color-foreground); }

.filter-tabs {
  display: flex; gap: 2px; padding: 2px; border-radius: 8px;
  background: var(--color-surface); border: 1px solid var(--color-border);
}
.filter-tabs__btn {
  border: 0; background: transparent; color: var(--color-muted-foreground);
  padding: 6px 10px; border-radius: 6px; font-size: 12px; font-weight: 600;
  transition: background 150ms ease, color 150ms ease;
}
.filter-tabs__btn.is-active,
.filter-tabs__btn:hover {
  background: var(--color-row-hover); color: var(--color-foreground);
}

/* SofaScore-like shell: board | match | AI — always open */
.shell {
  display: grid;
  grid-template-columns: var(--board-w) var(--match-w) var(--ai-w);
  min-height: calc(100vh - var(--topbar-h));
}

.board {
  overflow: auto;
  max-height: calc(100vh - var(--topbar-h));
  background: var(--color-background);
  border-right: 1px solid var(--color-border);
}

.board__status { padding: var(--space-2xl); color: var(--color-muted-foreground); }

.league-block { margin-bottom: var(--space-md); }
.league-head {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: var(--space-md);
  min-height: 48px; padding: 8px var(--space-xl);
  background: #151515;
  border-bottom: 1px solid var(--color-border);
  border-top: 1px solid var(--color-border);
}
.league-head__logo { width: 22px; height: 22px; object-fit: contain; flex: 0 0 auto; }
.league-head__text { min-width: 0; flex: 1; }
.league-head__name {
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.league-head__country {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  color: var(--color-muted-foreground);
  font-size: 11px;
  font-weight: 500;
}
.league-head__country img {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}
.league-head__meta { margin-left: auto; color: var(--color-tertiary); font-size: 12px; font-weight: 500; }

.match-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto 36px;
  gap: 8px;
  align-items: center;
  min-height: 56px; width: 100%;
  padding: 8px 12px;
  border: 0; border-bottom: 1px solid var(--color-border);
  background: transparent; text-align: left;
  transition: background 150ms ease;
}
.match-row:hover { background: var(--color-row-hover); }
.match-row.is-active { background: var(--color-selected); }

.match-row__time {
  color: var(--color-muted-foreground);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  font-weight: 600;
  display: grid;
  gap: 2px;
  line-height: 1.2;
}
.match-row__clock { color: var(--color-muted-foreground); }
.match-row__status { color: var(--color-muted-foreground); font-weight: 700; }
.match-row__time.is-live {
  display: grid;
  gap: 2px;
  font-size: 11px;
}
.match-row__time.is-live .match-row__clock {
  color: var(--color-muted-foreground);
  font-weight: 500;
}
.match-row__live-clock {
  color: var(--color-live);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
@media (prefers-reduced-motion: reduce) {
  .match-row, .icon-btn, .filter-tabs__btn, .match-panel, .ai-panel { transition: none !important; }
}

.match-row__teams { display: grid; gap: 4px; min-width: 0; }
.match-row__team {
  display: flex; align-items: center; gap: var(--space-md); min-width: 0; font-weight: 500;
}
.match-row__team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.team-logo {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex: 0 0 auto;
  overflow: hidden;
  background: #111;
  border: 1px solid var(--color-border);
}
.team-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.team-logo__fb {
  display: none;
  font-size: 8px;
  font-weight: 700;
  color: var(--color-muted-foreground);
  line-height: 1;
}
.team-logo.is-fallback .team-logo__fb { display: inline; }
.team-logo.is-fallback img { display: none; }
.team-logo--lg { width: 40px; height: 40px; border-width: 2px; }
.team-logo--lg .team-logo__fb { font-size: 12px; }
.team-logo--hero { width: 56px; height: 56px; border-width: 2px; }
.team-logo--hero .team-logo__fb { font-size: 16px; }
.seg__side.is-active .team-logo,
.seg__side.is-active.seg__side--away .team-logo { border-color: var(--color-primary); }
.match-row__periods {
  display: grid;
  grid-template-columns: repeat(4, 22px);
  gap: 2px;
  justify-content: end;
}
.match-row__periods.is-empty {
  width: 0;
  overflow: hidden;
}
.match-row__period {
  display: grid;
  gap: 4px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
}
.match-row__period.is-empty { color: var(--color-tertiary); }
.match-row__period .is-win { color: var(--color-foreground); font-weight: 700; }
.match-row__period .is-lose { color: var(--color-tertiary); font-weight: 500; }
.match-row__period.is-live,
.match-row__period.is-live span {
  color: var(--color-live);
  font-weight: 700;
}

.match-row__scores {
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  display: grid;
  gap: 4px;
  font-size: 13px;
  line-height: 1.2;
}
.match-row__scores.is-muted { color: var(--color-tertiary); font-weight: 500; }
.match-row__scores .is-win { color: var(--color-foreground); }
.match-row__scores .is-lose { color: var(--color-tertiary); font-weight: 500; }
.match-row__scores.is-live,
.match-row__scores.is-live div {
  color: var(--color-live);
  font-weight: 700;
}

@media (max-width: 1280px) {
  .match-row {
    grid-template-columns: 58px minmax(0, 1fr) auto 32px;
  }
  .match-row__periods {
    grid-template-columns: repeat(4, 18px);
  }
  .match-row__period { font-size: 10px; }
}

/* Match detail panel */
.match-panel {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  max-height: calc(100vh - var(--topbar-h));
  overflow: hidden;
}

.match-panel__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--space-md); padding: var(--space-xl);
  border-bottom: 1px solid var(--color-border);
}
.match-panel__teams { flex: 1; min-width: 0; }
.match-hero {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-lg);
  align-items: center;
}
.match-hero__side { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.match-hero__side strong { font-size: 13px; line-height: 1.25; }
.match-hero__mid { text-align: center; color: var(--color-muted-foreground); font-size: 12px; }
.match-hero__mid .is-live-status { color: var(--color-live); font-weight: 700; margin-top: 4px; }
.match-hero__mid .score.is-live { color: var(--color-live); }
.match-hero__mid .score--kickoff { font-size: 14px; font-weight: 600; }
.match-hero__mid .score {
  color: var(--color-foreground); font-size: 22px; font-weight: 700;
  font-variant-numeric: tabular-nums; margin-top: 4px;
}
.match-hero__crumb { color: var(--color-tertiary); font-size: 11px; margin-bottom: 10px; }

.match-tabs {
  display: flex; gap: 0; padding: 0 var(--space-xl);
  border-bottom: 1px solid var(--color-border); overflow-x: auto;
}
.match-tabs__btn {
  border: 0; background: transparent; color: var(--color-muted-foreground);
  padding: 12px 14px; font-weight: 600; font-size: 13px;
  border-bottom: 2px solid transparent; white-space: nowrap;
}
.match-tabs__btn.is-active {
  color: var(--color-foreground);
  border-bottom-color: var(--color-primary);
}

.match-panel__body {
  flex: 1; overflow: auto; padding: var(--space-xl);
  background: var(--color-background);
}
.match-panel__loading { color: var(--color-muted-foreground); padding: var(--space-lg) 0; }
.tab-pane.is-active { display: block; }
.tab-pane[hidden] { display: none !important; }

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: var(--space-lg) var(--space-xl);
  margin-bottom: var(--space-lg);
}
.card--streaks { padding-bottom: var(--space-md); }
.card--details { padding: 14px 16px; }
.card__title {
  font-size: 13px; font-weight: 700; margin-bottom: var(--space-md);
}
.card__title--center { text-align: center; margin-bottom: 12px; }
.card__sub { color: var(--color-muted-foreground); font-size: 12px; margin-bottom: var(--space-md); }
.card__sub--center { text-align: center; margin-bottom: var(--space-lg); }

.details-odds__head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 12px;
}
.details-odds__book {
  color: var(--color-muted-foreground); font-size: 11px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.details-odds__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: 8px;
}
.details-odds__chip {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; border-radius: 8px;
  background: var(--color-surface-2); border: 1px solid var(--color-border);
  font-variant-numeric: tabular-nums;
}
.details-odds__chip span { color: var(--color-muted-foreground); font-size: 12px; font-weight: 600; }
.details-odds__chip strong { font-size: 14px; }

.period-table { display: grid; gap: 8px; text-align: center; font-variant-numeric: tabular-nums; }
.period-table__labs,
.period-table__row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.period-table__labs { color: var(--color-muted-foreground); font-size: 11px; font-weight: 600; }
.period-table__row { font-size: 14px; font-weight: 600; }
.period-table__row .is-win { color: var(--color-foreground); font-weight: 700; }
.period-table__row .is-lose { color: var(--color-tertiary); font-weight: 500; }
.period-table__row .is-live { color: var(--color-live); font-weight: 700; }

.shot-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
}
.shot-row:last-of-type { border-bottom: 0; }
.shot-row__label {
  text-align: center; color: var(--color-muted-foreground); font-size: 12px; font-weight: 600;
}
.shot-row__side { display: flex; align-items: center; gap: 8px; }
.shot-row__side--away { justify-content: flex-end; }
.shot-row__frac { font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 600; min-width: 36px; }

.stat-ring { width: 44px; height: 44px; }
.stat-ring__track {
  fill: none; stroke: #2a2a2a; stroke-width: 4;
}
.stat-ring__val {
  fill: none; stroke-width: 4; stroke-linecap: round;
}
.stat-ring--home .stat-ring__val { stroke: #7ac943; }
.stat-ring--away .stat-ring__val { stroke: #5b7cfa; }
.stat-ring text {
  fill: var(--color-foreground);
  font-size: 9px; font-weight: 700; font-family: var(--font);
}

.bar-stats { margin-top: 8px; display: grid; gap: 12px; }
.bar-stat__vals {
  display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; gap: 8px;
  margin-bottom: 4px; font-variant-numeric: tabular-nums;
}
.bar-stat__vals span { text-align: center; color: var(--color-muted-foreground); font-size: 12px; }
.bar-stat__tracks { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.bar-stat__track {
  height: 6px; border-radius: 999px; background: #2a2a2a; overflow: hidden;
}
.bar-stat__track--home { direction: rtl; }
.bar-stat__track i {
  display: block; height: 100%; border-radius: 999px;
}
.bar-stat__track--home i { background: #7ac943; }
.bar-stat__track--away i { background: #5b7cfa; }

.winprob {
  display: flex; align-items: stretch; gap: 4px;
  min-height: 44px; border-radius: 999px; overflow: hidden;
  background: var(--color-surface-2);
}
.winprob__home,
.winprob__away {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; min-width: 0; font-weight: 700; font-variant-numeric: tabular-nums;
}
.winprob__home { background: linear-gradient(90deg, #24301a, #2d3a22); justify-content: flex-start; }
.winprob__away { background: linear-gradient(90deg, #1e2744, #243056); justify-content: flex-end; }

.details-link {
  display: block; width: 100%; margin-top: 12px; padding: 8px;
  border: 0; background: transparent; color: var(--color-primary);
  font-weight: 600; font-size: 13px; text-align: center;
}
.details-link:hover { text-decoration: underline; }

.card--info { padding: 4px 8px; }
.info-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 16px;
  gap: 10px; align-items: center;
  padding: 12px 8px;
  border-bottom: 1px solid var(--color-border);
}
.info-row:last-child { border-bottom: 0; }
.info-row__icon { color: var(--color-muted-foreground); display: flex; align-items: center; justify-content: center; }
.info-row__label { color: var(--color-muted-foreground); font-size: 11px; margin-bottom: 2px; }
.info-row__value { font-size: 13px; font-weight: 600; line-height: 1.3; }
.info-row__chev { color: var(--color-primary); font-size: 18px; line-height: 1; }

.standings-table--compact th:nth-child(3),
.standings-table--compact td:nth-child(3) { text-align: center; }

.standings-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 12px;
}
.standings-pills {
  display: inline-flex; gap: 6px; flex-wrap: wrap;
}
.standings-pill {
  border: 0; border-radius: 999px;
  padding: 7px 14px;
  background: var(--color-chip);
  color: var(--color-muted-foreground);
  font-size: 12px; font-weight: 700;
}
.standings-pill.is-active {
  background: #fff; color: #111;
}
.standings-card { padding: 12px 12px 8px; overflow: hidden; }
.standings-league {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 13px; margin-bottom: 10px;
}
.standings-league img {
  width: 18px; height: 18px; object-fit: contain; border-radius: 4px;
}
.standings-wrap { position: relative; }
.standings-wrap.has-zone { padding-left: 22px; }
.standings-wrap.has-zone::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 30px;
  width: 3px;
  height: calc(var(--playoff-rows, 8) * 40px);
  background: var(--color-strong);
  border-radius: 2px;
  z-index: 0;
}
.standings-zone-lab {
  position: absolute;
  left: 0;
  top: 36px;
  width: 12px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-strong);
  line-height: 1;
  text-align: center;
  z-index: 1;
  pointer-events: none;
}

.stat-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-md); padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
}
.stat-row:last-child { border-bottom: 0; }
.stat-row__left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.stat-row__left img { width: 20px; height: 20px; border-radius: 50%; object-fit: contain; }
.stat-row__val { font-weight: 700; font-variant-numeric: tabular-nums; }

/* SofaScore-style streak metric rows */
.streak-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 8px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--color-border);
}
.streak-row:last-child { border-bottom: 0; }
.streak-row__logos {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 22px;
}
.streak-row__logos .team-logo,
.streak-row__logos img {
  width: 22px;
  height: 22px;
}
.streak-row__duo {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.streak-row__label {
  text-align: center;
  color: var(--color-muted-foreground);
  font-size: 13px;
  line-height: 1.2;
}
.streak-row__val {
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 15px;
}

.form-pills { display: flex; gap: 4px; flex-wrap: wrap; }
.pill {
  width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: #fff;
}
.pill--w { background: var(--color-strong); }
.pill--l { background: var(--color-avoid); }
.pill--d { background: var(--color-tertiary); }

.seg {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: var(--space-lg) 0;
}
.seg__side {
  display: inline-flex; align-items: center; gap: 8px;
  border: 0; background: transparent; padding: 4px; min-width: 0; flex: 1;
  color: var(--color-muted-foreground);
}
.seg__side--away { justify-content: flex-end; }
.seg__side.is-active { color: var(--color-foreground); }
.seg__name {
  font-size: 12px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 96px;
}
.seg__h2h {
  border: 0; border-radius: 999px; padding: 8px 16px; font-weight: 700;
  background: var(--color-chip); color: var(--color-muted-foreground); flex: 0 0 auto;
}
.seg__h2h.is-active { background: #fff; color: #111; }

.game-list-head {
  display: flex; align-items: center; gap: 8px;
  color: var(--color-muted-foreground); font-size: 12px; font-weight: 600;
  padding: 8px 4px;
}
.game-list-head img { width: 16px; height: 16px; object-fit: contain; }

.game-item { border-bottom: 1px solid var(--color-border); }
.game-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 40px 28px;
  gap: 8px; align-items: center;
  width: 100%;
  padding: 10px 8px;
  border: 0;
  background: transparent;
  text-align: left;
  transition: background 150ms ease;
}
.game-row--h2h { grid-template-columns: 52px minmax(0, 1fr) 40px; }
.game-row:hover:not(:disabled),
.game-item.is-open .game-row { background: var(--color-row-hover); }
.game-row:disabled { cursor: default; opacity: 1; }
.game-row__date { color: var(--color-muted-foreground); font-size: 11px; font-variant-numeric: tabular-nums; }
.game-row__teams { display: grid; gap: 4px; min-width: 0; }
.game-row__team { display: flex; align-items: center; gap: 8px; min-width: 0; }
.game-row__team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.game-row__scores { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; display: grid; gap: 4px; font-size: 13px; }
.game-row__scores .lose { color: var(--color-muted-foreground); font-weight: 500; }

.quarter-drop {
  margin: 0;
  padding: 12px 14px;
  border-radius: 0;
  background: #1c1c1c;
  border: 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  animation: dropIn 160ms ease-out;
}
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .quarter-drop { animation: none; }
}
.quarter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px 10px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.quarter-grid__lab {
  color: var(--color-muted-foreground);
  font-size: 11px;
  font-weight: 600;
}
.quarter-grid .is-muted { color: var(--color-muted-foreground); font-size: 13px; }
.quarter-grid .is-strong { color: var(--color-foreground); font-size: 13px; font-weight: 600; }

.standings-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.standings-table th, .standings-table td {
  padding: 8px 6px; border-bottom: 1px solid var(--color-border); text-align: left;
}
.standings-table th { color: var(--color-tertiary); font-weight: 600; font-size: 11px; }
.standings-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.standings-table .team { display: flex; align-items: center; gap: 8px; min-width: 0; }
.standings-table .team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.standings-table .team img { width: 18px; height: 18px; border-radius: 50%; }
.standings-table tr.is-focus { background: rgba(11, 179, 42, 0.12); }
.standings-table--sofa { table-layout: fixed; }
.standings-table--sofa th,
.standings-table--sofa td { border-bottom-color: #222; padding: 10px 6px; }
.standings-table--sofa .standings-rank {
  width: 28px; color: var(--color-muted-foreground); font-variant-numeric: tabular-nums;
}
.standings-table--sofa .standings-team { width: auto; }
.standings-table--sofa th.num,
.standings-table--sofa td.num { width: 52px; font-size: 12px; }
.standings-table--sofa th.num { color: var(--color-muted-foreground); }

.odds-card { padding: 14px 14px 10px; }
.odds-card__title {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 14px; font-weight: 700; margin-bottom: 12px;
}
.odds-live {
  color: #f5b942;
  font-size: 13px; font-weight: 700;
}
.odds-ft {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.odds-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 40px; padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface-2);
}
.odds-btn__lab { color: var(--color-muted-foreground); font-size: 12px; font-weight: 600; }
.odds-btn__odd {
  color: #f5d76e;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 14px;
}
.odds-spread__teams {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin: 0 0 10px 52px;
  color: var(--color-muted-foreground); font-size: 11px; font-weight: 600;
}
.odds-spread__teams span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.odds-spread__teams span:last-child { text-align: right; }
.odds-line-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 8px; align-items: center;
  margin-bottom: 8px;
}
.odds-line-row__line {
  font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13px;
}
.odds-line-row__btns {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.odds-footer {
  text-align: center;
  color: var(--color-tertiary);
  font-size: 11px;
  margin: 8px 0 0;
}

.empty-note { color: var(--color-muted-foreground); font-size: 13px; padding: 8px 0; }

/* AI panel */
.ai-panel {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  max-height: calc(100vh - var(--topbar-h));
  overflow: hidden;
}

.ai-panel__head {
  display: flex; justify-content: space-between; gap: var(--space-md);
  padding: var(--space-xl); border-bottom: 1px solid var(--color-border);
}
.panel__kicker {
  color: var(--color-primary); font-size: 11px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.panel__title { font-size: 15px; font-weight: 700; margin-top: 4px; }
.panel__meta { color: var(--color-muted-foreground); font-size: 12px; margin-top: 4px; }
.panel__match {
  padding: var(--space-lg) var(--space-xl);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-2);
  font-size: 12px; color: var(--color-muted-foreground);
}

.chat { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.chat__messages {
  flex: 1; overflow: auto; padding: var(--space-xl);
  display: flex; flex-direction: column; gap: var(--space-lg);
}
.msg { max-width: 100%; padding: 10px 12px; border-radius: 10px; white-space: pre-wrap; line-height: 1.45; }
.msg--assistant { background: var(--color-surface-2); border: 1px solid var(--color-border); }
.msg--user {
  align-self: flex-end;
  background: color-mix(in srgb, var(--color-primary) 28%, #1a1a1a);
  border: 1px solid color-mix(in srgb, var(--color-primary) 45%, #2e2e2e);
}
.msg--system {
  color: var(--color-muted-foreground); background: transparent;
  border: 1px dashed var(--color-border); font-size: 13px;
}
.verdict {
  display: inline-flex; margin-top: 8px; padding: 4px 8px; border-radius: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
}
.verdict--strong { background: color-mix(in srgb, var(--color-strong) 20%, #111); color: var(--color-strong); }
.verdict--lean { background: color-mix(in srgb, var(--color-warn) 20%, #111); color: var(--color-warn); }
.verdict--avoid { background: color-mix(in srgb, var(--color-avoid) 20%, #111); color: var(--color-avoid); }
.verdict--insufficient { background: #222; color: var(--color-muted-foreground); }
.evidence { margin-top: 10px; border-top: 1px solid var(--color-border); padding-top: 8px; font-size: 12px; color: var(--color-muted-foreground); }
.evidence summary { cursor: pointer; font-weight: 600; color: var(--color-foreground); }

.chat__form {
  border-top: 1px solid var(--color-border);
  padding: var(--space-lg) var(--space-xl) var(--space-xl);
  display: grid; gap: var(--space-md); background: var(--color-surface);
}
#chat-input {
  width: 100%; resize: vertical; min-height: 64px;
  border: 1px solid var(--color-border); border-radius: 10px;
  background: var(--color-background); padding: 10px 12px; outline: none;
}
#chat-input:focus { border-color: var(--color-primary); }
.btn-primary {
  border: 0; border-radius: 10px; background: var(--color-primary);
  color: var(--color-on-primary); font-weight: 700; padding: 10px 14px;
}
.btn-primary:hover { opacity: 0.92; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: #222; border: 1px solid var(--color-border); color: var(--color-foreground);
  padding: 10px 14px; border-radius: 10px; z-index: 50;
  max-width: min(520px, calc(100vw - 32px));
}

.panel-empty {
  padding: var(--space-2xl);
  color: var(--color-muted-foreground);
  font-size: 13px;
}

@media (max-width: 1100px) {
  .shell { grid-template-columns: 1fr; }
  .board { border-right: 0; max-height: 40vh; }
  .match-panel { border-right: 0; max-height: none; }
  .ai-panel { border-top: 1px solid var(--color-border); max-height: none; }
  .topbar {
    grid-template-columns: 1fr; height: auto;
    padding: 10px var(--space-xl); gap: var(--space-md);
  }
  .topbar__actions { justify-content: stretch; flex-wrap: wrap; }
  .search { max-width: none; }
}

/* —— Site footer (SofaScore-inspired structure) —— */
.site-footer {
  background: #0a0a0a;
  border-top: 1px solid var(--color-border);
  color: var(--color-muted-foreground);
  font-size: 13px;
  line-height: 1.5;
}
.site-footer__inner {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}
.site-footer__about {
  padding: 40px 0 32px;
  border-bottom: 1px solid var(--color-border);
  background: #0f0f0f;
}
.site-footer__about-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px 40px;
}
.site-footer__h {
  margin: 0 0 12px;
  color: var(--color-foreground);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.site-footer__h--spaced { margin-top: 24px; }
.site-footer__blurb {
  margin: 0 0 12px;
  color: #9a9a9a;
  font-size: 13px;
  line-height: 1.55;
  max-width: 62ch;
}
.site-footer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.site-footer__list a {
  color: #9a9a9a;
  text-decoration: none;
}
.site-footer__list a:hover { color: #fff; }

.site-footer__brand {
  padding: 28px 0;
  border-bottom: 1px solid var(--color-border);
}
.site-footer__brand-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) auto minmax(80px, 1fr);
  align-items: center;
  gap: 20px;
}
.site-footer__logo {
  color: #fff;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.03em;
  text-decoration: none;
}
.site-footer__logo:hover { color: #fff; }
.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 28px;
}
.site-footer__nav a {
  color: #cfcfcf;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.site-footer__nav a:hover { color: #fff; }
.site-footer__social {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.site-footer__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: #cfcfcf;
  background: #1a1a1a;
  border: 1px solid var(--color-border);
  text-decoration: none;
  transition: background 150ms ease, color 150ms ease;
}
.site-footer__social-link:hover { color: #fff; background: #222; }
.site-footer__social-link[aria-disabled="true"] { opacity: 0.55; cursor: default; }

.site-footer__meta { padding: 16px 0; border-bottom: 1px solid var(--color-border); }
.site-footer__rg { margin: 0; }
.site-footer__rg a {
  color: #9a9a9a;
  text-decoration: none;
  font-weight: 600;
}
.site-footer__rg a:hover { color: #fff; }

.site-footer__legal { padding: 18px 0 28px; }
.site-footer__legal-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}
.site-footer__copy { margin: 0; color: #6b6b6b; font-size: 12px; }
.site-footer__legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: flex-end;
}
.site-footer__legal-nav a {
  color: #9a9a9a;
  text-decoration: none;
  font-size: 12px;
}
.site-footer__legal-nav a:hover { color: #fff; }

@media (max-width: 900px) {
  .site-footer__about-grid { grid-template-columns: 1fr; gap: 28px; }
  .site-footer__brand-row {
    grid-template-columns: 1fr;
    justify-items: start;
  }
  .site-footer__nav { justify-content: flex-start; }
  .site-footer__social { justify-content: flex-start; }
  .site-footer__legal-nav { justify-content: flex-start; }
}

/* —— Static site pages —— */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-primary);
  color: #fff;
  padding: 8px 12px;
  z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

.site-page { background: var(--color-background); min-height: 100vh; }
.site-top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 0 24px;
  background: rgba(15, 15, 15, 0.94);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(8px);
}
.site-top__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}
.site-top__mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--color-primary), #6b7cff);
}
.site-top__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.site-top__nav a {
  color: var(--color-muted-foreground);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}
.site-top__nav a:hover { color: #fff; }

.site-main { padding: 40px 0 56px; }
.site-main__inner {
  width: min(720px, calc(100% - 48px));
  margin: 0 auto;
}
.site-hero__title {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 36px);
  letter-spacing: -0.03em;
  color: #fff;
}
.site-hero__sub {
  margin: 0;
  color: var(--color-muted-foreground);
  font-size: 15px;
  line-height: 1.5;
}
.site-hero__updated {
  margin: 10px 0 0;
  color: #6b6b6b;
  font-size: 12px;
}
.site-content { margin-top: 28px; }
.prose { color: #cfcfcf; line-height: 1.6; margin: 0 0 16px; }
.prose a { color: #9db0ff; }
.prose--muted { color: #9a9a9a; font-size: 13px; }
.legal-prose { color: #cfcfcf; line-height: 1.65; }
.legal-prose h2 {
  margin: 28px 0 10px;
  color: #fff;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.legal-prose p { margin: 0 0 14px; }
.legal-prose ul { margin: 0 0 14px; padding-left: 1.2em; }
.legal-prose li { margin: 0 0 6px; }
.legal-prose a { color: #9db0ff; }
.legal-prose code {
  font-size: 0.92em;
  padding: 1px 5px;
  border-radius: 4px;
  background: #1a1a1a;
  border: 1px solid var(--color-border);
}

.site-form {
  display: grid;
  gap: 14px;
  margin: 24px 0 28px;
  padding: 20px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface);
}
.site-form__row { display: grid; gap: 6px; }
.site-form__row label {
  font-size: 12px;
  font-weight: 600;
  color: #cfcfcf;
}
.site-form__row input,
.site-form__row textarea {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-background);
  color: var(--color-foreground);
  padding: 10px 12px;
  outline: none;
  font: inherit;
}
.site-form__row input:focus,
.site-form__row textarea:focus { border-color: var(--color-primary); }
.site-form__honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  pointer-events: none;
}
.site-form__status { margin: 0; font-size: 13px; }
.site-form__status.is-pending { color: var(--color-muted-foreground); }
.site-form__status.is-success { color: var(--color-strong); }
.site-form__status.is-error { color: var(--color-avoid); }

@media (max-width: 640px) {
  .site-top { flex-direction: column; align-items: flex-start; padding: 12px 16px; }
  .site-main__inner { width: calc(100% - 32px); }
}
