/* ── Shared sport header: slates | games | tools ─────────────────
   Same three rows for every sport. Tokens are declared locally so the block
   works whether or not it sits inside a .nopt shell. */
.sph {
  --s-accent: #3b82f6;
  --s-panel:  #ffffff;
  --s-bg2:    #eef2f9;
  --s-line:   #d7dfec;
  --s-text:   #16203a;
  --s-text2:  #5b6b88;
  --s-text3:  #7d8fad;
  --s-sans:   'Archivo', var(--font, sans-serif);
  --s-mono:   'JetBrains Mono', ui-monospace, monospace;
  position: sticky; top: calc(var(--ticker-h) + var(--topbar-h) + var(--header-h));
  z-index: 45; background: var(--s-panel);
  box-shadow: 0 6px 14px -10px rgba(0,0,0,.5);
}
.sph.is-standalone { margin-top: calc(var(--ticker-h) + var(--topbar-h) + var(--header-h)); }
:root[data-theme="dark"] .sph {
  --s-panel: #13233b; --s-bg2: #0f1c2f; --s-line: #21344f; --s-text: #e8eefb; --s-text2: #9fb0cc;
}

/* Row 1 — slates */
.sph-slates { display: flex; align-items: center; gap: 14px; padding: 9px 16px;
  background: linear-gradient(180deg, var(--s-bg2), var(--s-panel)); border-bottom: 1px solid var(--s-line); }
.sph-brand { display: flex; align-items: center; }
.sph-league { width: 34px; height: 34px; object-fit: contain; }
.sph-controls { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.sph-sel { display: flex; flex-direction: column; gap: 3px; }
.sph-sel > span { font: 700 9px var(--s-sans); letter-spacing: .09em; text-transform: uppercase; color: var(--s-text3); }
.sph-sel select, .sph-sel input {
  font: 600 12.5px var(--s-sans); color: var(--s-text); background: var(--s-panel);
  border: 1px solid var(--s-line); border-radius: 7px; padding: 6px 9px; min-width: 150px; }
.sph-sel select:hover, .sph-sel input:hover { border-color: var(--s-accent); }
.sph-site { display: inline-flex; background: var(--s-panel); border: 1px solid var(--s-line);
  border-radius: 7px; overflow: hidden; align-self: flex-end; }
.sph-site button { appearance: none; border: 0; background: none; cursor: pointer;
  font: 700 12px var(--s-sans); color: var(--s-text2); padding: 7px 13px; }
.sph-site button.active { background: var(--s-accent); color: #fff; }
.sph-meta { margin-left: auto; font: 600 11px var(--s-mono); color: var(--s-text3); }

/* Row 2 — games */
.sph-games-wrap { display: flex; align-items: stretch; background: var(--s-bg2); border-bottom: 1px solid var(--s-line); }
.sph-games-toggle { display: flex; flex-direction: column; justify-content: center; padding: 0 14px;
  border-right: 1px solid var(--s-line); font: 700 10px var(--s-sans); letter-spacing: .07em;
  text-transform: uppercase; color: var(--s-text3); white-space: nowrap; }
.sph-games-toggle i { font-style: normal; color: var(--s-accent); font-size: 11px; }
.sph-games { display: flex; gap: 8px; padding: 8px 12px; overflow-x: auto; flex: 1; }
.sph-game { flex: none; min-width: 116px; background: var(--s-panel); border: 1px solid var(--s-line);
  border-radius: 7px; padding: 6px 9px; cursor: pointer; }
.sph-game:hover { border-color: var(--s-accent); }
.sph-game.is-on { border-color: var(--s-accent); box-shadow: inset 0 0 0 1px var(--s-accent); }
.sph-g-row { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font: 700 12px var(--s-mono); color: var(--s-text); }
.sph-g-row b { font-weight: 600; color: var(--s-text2); font-size: 11px; }
.sph-g-when { margin-top: 3px; font: 500 9.5px var(--s-mono); color: var(--s-text3); text-align: center; }
.sph-loading { padding: 14px; font: 500 12px var(--s-sans); color: var(--s-text3); }

/* Row 3 — tools */
.sph-tools { display: flex; align-items: stretch; gap: 2px; padding: 0 12px;
  background: var(--s-panel); border-bottom: 1px solid var(--s-line); flex-wrap: wrap; }
.sph-tools a, .sph-tools span {
  font: 700 13px var(--s-sans); color: var(--s-text3); text-decoration: none;
  padding: 11px 16px; border-bottom: 3px solid transparent; display: inline-flex; align-items: center; }
.sph-tools a:hover { color: var(--s-text); background: var(--s-bg2); }
.sph-tools a.active { color: var(--s-accent); border-bottom-color: var(--s-accent); background: rgba(59,130,246,.10); }
.sph-tools .is-soon { opacity: .38; cursor: not-allowed; }

@media (max-width: 900px) {
  .sph-slates { flex-wrap: wrap; gap: 9px; }
  .sph-meta { margin-left: 0; }
}

/* team art in the games row — sized off the row text so it scales with the
   card rather than needing its own breakpoint */
.sph-g-logo { width: 16px; height: 16px; object-fit: contain; flex: 0 0 16px; }
.sph-g-row  { display: flex; align-items: center; gap: 6px; }
.sph-g-row span { flex: 1 1 auto; }
.sph-g-row b    { flex: 0 0 auto; }

/* The tool pages each carry their own margin-top to clear the fixed site
   chrome. When the standalone header runs above them it already does that, so
   without this every page opens with a header-sized gap of dead space. */
.sph.is-standalone ~ .mu-page,
.sph.is-standalone ~ .rk-page,
.sph.is-standalone ~ .prof-page,
.sph.is-standalone ~ .nx-page { margin-top: 0; }
