/* ══════════════════════════════════════════════════════════════════════
   NHL Section Theme — "Ice Sheet"
   Shared tokens + chrome for every page under /nhl/.
   Surfaces/text ALIAS the site's theme-aware tokens from home.css so the
   light/dim/dark toggle keeps working; only the glacier-cyan accent and the
   goal-light red are fixed brand colors layered on top (same pattern as the
   MLB lime and NFL violet sections). Plain CSS, no build step.
   ══════════════════════════════════════════════════════════════════════ */

:root {
  --ice:          #0891b2;
  --ice-2:        #0e7490;
  --ice-dim:      rgba(8,145,178,.12);
  --ice-line:     rgba(8,145,178,.35);
  --goal:         #dc2626;
  --goal-dim:     rgba(220,38,38,.12);
  --crease:       #2563eb;
  --pos-good:     #15803d;
  --pos-good-dim: rgba(21,128,61,.12);
  --pos-warn:     #b45309;
  --pos-warn-dim: rgba(180,83,9,.12);

  --ih-mono:      'JetBrains Mono', ui-monospace, monospace;
  --ih-sans:      'Archivo', system-ui, sans-serif;
  --ih-menu-h:    48px;
  --ih-chrome:    calc(var(--ticker-h, 0px) + var(--topbar-h, 36px) + var(--header-h, 64px));
  --ih-ease:      cubic-bezier(.2,.8,.2,1);
  --ih-fast:      140ms;

  --ih-rule:      rgba(15,23,42,.10);
  --ih-cell:      rgba(15,23,42,.035);
  --ih-shadow:    0 1px 2px rgba(15,23,42,.06), 0 8px 24px -12px rgba(15,23,42,.18);
}
html[data-theme="dark"],
html[data-theme="dim"] {
  --ice:          #22d3ee;
  --ice-2:        #67e8f9;
  --ice-dim:      rgba(34,211,238,.10);
  --ice-line:     rgba(34,211,238,.32);
  --goal:         #f87171;
  --goal-dim:     rgba(248,113,113,.13);
  --crease:       #60a5fa;
  --pos-good:     #4ade80;
  --pos-good-dim: rgba(74,222,128,.12);
  --pos-warn:     #fbbf24;
  --pos-warn-dim: rgba(251,191,36,.12);
  --ih-rule:      rgba(255,255,255,.07);
  --ih-cell:      rgba(255,255,255,.03);
  --ih-shadow:    0 1px 0 rgba(255,255,255,.03) inset, 0 12px 32px -16px rgba(0,0,0,.7);
}

/* ── Page shell ─────────────────────────────────────────────────────── */
.ih-page {
  font-family: var(--ih-sans);
  background: var(--bg-base);
  color: var(--text-1);
  margin-top: var(--ih-chrome);
  min-height: calc(100vh - var(--ih-chrome));
  padding-bottom: 72px;
  position: relative;
}
/* Faint rink markings: blue line + center red line, fixed behind content. */
.ih-page::before {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), var(--goal-dim) calc(50% - 1px), var(--goal-dim) calc(50% + 1px), transparent calc(50% + 1px)),
    radial-gradient(70% 55% at 50% 0%, var(--ice-dim), transparent 70%);
  opacity: .55;
  pointer-events: none;
  z-index: 0;
}
.ih-page > * { position: relative; z-index: 1; }

/* ── Menu bar (section nav + slate controls) ───────────────────────── */
.ih-menu {
  position: sticky; top: calc(var(--topbar-h) + var(--header-h)); z-index: 40;
  min-height: var(--ih-menu-h);
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 0 16px;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
}
.ih-brand {
  display: flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 15px; letter-spacing: .02em; color: #e8ecf2; white-space: nowrap;
}
.ih-brand-puck {
  width: 16px; height: 9px; border-radius: 50%;
  background: #0b0f1a; box-shadow: 0 2px 0 #1f2937, 0 0 0 1px #334155;
}
.ih-subnav { display: flex; align-self: stretch; }
.ih-subnav a {
  display: flex; align-items: center; padding: 0 13px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .03em;
  color: var(--nav-text-dim); text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color var(--ih-fast), border-color var(--ih-fast);
}
.ih-subnav a:hover { color: var(--nav-text); }
.ih-subnav a:focus-visible { outline: 2px solid var(--ice); outline-offset: -2px; }
.ih-subnav a.active { color: #67e8f9; border-bottom-color: #22d3ee; }

.ih-controls { margin-left: auto; display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.ih-select {
  background: var(--nav-surface); border: 1px solid var(--nav-border); color: var(--nav-text);
  font-family: var(--ih-mono); font-size: 12px; border-radius: 6px; padding: 6px 8px;
  max-width: 260px; color-scheme: dark;
}
.ih-select:focus-visible { outline: 2px solid #22d3ee; outline-offset: 1px; }
.ih-site { display: flex; border: 1px solid var(--nav-border); border-radius: 6px; overflow: hidden; }
.ih-site button {
  background: var(--nav-surface); color: var(--nav-text-dim); border: 0;
  font-family: var(--ih-mono); font-size: 11.5px; font-weight: 700; padding: 6px 12px; cursor: pointer;
  transition: background var(--ih-fast), color var(--ih-fast);
}
.ih-site button:hover { color: var(--nav-text); }
.ih-site button.active { background: rgba(34,211,238,.14); color: #67e8f9; }
.ih-site button:focus-visible { outline: 2px solid #22d3ee; outline-offset: -2px; }

/* ── Section heading ───────────────────────────────────────────────── */
.ih-wrap { max-width: 1440px; margin: 0 auto; padding: 0 20px; }
.ih-hero { padding: 28px 0 18px; display: flex; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.ih-kicker {
  font-family: var(--ih-mono); font-size: 11px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ice);
}
.ih-h1 { font-size: clamp(28px, 2.2vw + 14px, 44px); font-weight: 800; letter-spacing: -.02em; line-height: 1; margin: 6px 0 0; }
.ih-sub { color: var(--text-2); font-size: 14px; margin-top: 8px; max-width: 62ch; }
.ih-meta { margin-left: auto; display: flex; gap: 22px; flex-wrap: wrap; }
.ih-stat { text-align: right; }
.ih-stat b { display: block; font-family: var(--ih-mono); font-size: 22px; font-weight: 700; color: var(--text-1); }
.ih-stat span { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }

.ih-section-title {
  display: flex; align-items: baseline; gap: 12px;
  font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--text-2);
  margin: 26px 0 12px;
}
.ih-section-title::after { content: ''; flex: 1; height: 1px; background: var(--ih-rule); }
.ih-section-title small { font-family: var(--ih-mono); font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--text-3); }

/* ── Chips / filter row ────────────────────────────────────────────── */
.ih-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 14px; }
.ih-chip {
  background: var(--bg-card); border: 1px solid var(--border-card); color: var(--text-2);
  font-family: var(--ih-mono); font-size: 11.5px; font-weight: 600;
  border-radius: 999px; padding: 5px 12px; cursor: pointer;
  transition: color var(--ih-fast), border-color var(--ih-fast), background var(--ih-fast), transform var(--ih-fast);
}
.ih-chip:hover { color: var(--text-1); border-color: var(--text-3); }
.ih-chip:active { transform: translateY(1px); }
.ih-chip:focus-visible { outline: 2px solid var(--ice); outline-offset: 2px; }
.ih-chip.active { background: var(--ice-dim); border-color: var(--ice); color: var(--ice); }
.ih-chip img { display: inline-block; width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; object-fit: contain; }
.ih-spacer { flex: 1; }
.ih-search {
  background: var(--bg-card); border: 1px solid var(--border-card); color: var(--text-1);
  font-family: var(--ih-mono); font-size: 12px; border-radius: 999px; padding: 6px 14px; min-width: 200px;
}
.ih-search:focus-visible { outline: 2px solid var(--ice); outline-offset: 1px; }

/* ── Shared atoms ──────────────────────────────────────────────────── */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* ── Atoms ──────────────────────────────────────────────────── */
.ih-card {
  background: var(--bg-card); border: 1px solid var(--border-card); border-radius: 10px;
  box-shadow: var(--ih-shadow);
}
.ih-logo { width: 22px; height: 22px; object-fit: contain; flex: none; }
.ih-mono { font-family: var(--ih-mono); }
.ih-dim  { color: var(--text-3); }
.ih-pos {
  display: inline-block; min-width: 22px; text-align: center;
  font-family: var(--ih-mono); font-size: 10px; font-weight: 700; letter-spacing: .04em;
  padding: 2px 4px; border-radius: 4px; background: var(--ih-cell); color: var(--text-2);
}
.ih-pos.G { background: var(--goal-dim); color: var(--goal); }
.ih-pos.D { background: rgba(37,99,235,.12); color: var(--crease); }
.ih-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--ih-mono); font-size: 10px; font-weight: 700; letter-spacing: .06em;
  padding: 2px 7px; border-radius: 999px; text-transform: uppercase; white-space: nowrap;
}
.ih-badge.conf { background: var(--pos-good-dim); color: var(--pos-good); }
.ih-badge.prob { background: var(--pos-warn-dim); color: var(--pos-warn); }
.ih-badge.tbd  { background: var(--ih-cell); color: var(--text-3); }
.ih-badge.ice  { background: var(--ice-dim); color: var(--ice); }

.ih-empty, .ih-loading {
  padding: 48px 20px; text-align: center; color: var(--text-2); font-size: 14px;
}
.ih-loading::before {
  content: ''; display: block; width: 26px; height: 26px; margin: 0 auto 12px; border-radius: 50%;
  border: 2px solid var(--ih-rule); border-top-color: var(--ice); animation: ih-spin .8s linear infinite;
}
@keyframes ih-spin { to { transform: rotate(360deg); } }
.ih-note { font-size: 12px; color: var(--text-3); margin-top: 10px; }
.ih-note b { color: var(--text-2); }

/* Model score bar (0–100) */
.ih-score { display: flex; align-items: center; gap: 8px; min-width: 110px; }
.ih-score-bar { flex: 1; height: 6px; border-radius: 3px; background: var(--ih-cell); overflow: hidden; }
.ih-score-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--ice-2), var(--ice)); border-radius: 3px; }
.ih-score b { font-family: var(--ih-mono); font-size: 13px; min-width: 32px; text-align: right; }

/* Reveal motion — transform/opacity only */
.ih-rise { animation: ih-rise .42s var(--ih-ease) both; }
@keyframes ih-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .ih-rise, .ih-loading::before { animation: none; }
}

@media (max-width: 860px) {
  .ih-menu { gap: 8px; padding: 6px 12px; }
  .ih-subnav { order: 3; width: 100%; overflow-x: auto; }
  .ih-subnav a { padding: 10px 12px; }
  .ih-controls { margin-left: 0; flex-wrap: wrap; }
  .ih-wrap { padding: 0 14px; }
  .ih-meta { margin-left: 0; }
  .ih-stat { text-align: left; }
  .ih-search { min-width: 0; width: 100%; }
}

/* ── WordPress (prod) chrome: the shared sport-header tools row sits above
   the page and already clears the fixed site header, and it is the section
   nav — so the page drops its own offset, sticky bar and sub-nav. ───────── */
.sph.is-standalone ~ .ih-page { margin-top: 0; min-height: 0; }
.sph ~ .ih-page .ih-menu { position: static; }
.sph ~ .ih-page .ih-subnav { display: none; }
