/* TrendBrief live scores — ESPN-style game cards (companion to scores.js).
   League panel chrome (.sb-league, .sb-grid, .sb-sub, .sb-none, .sb-foot)
   stays in styles.css; everything for the cards themselves lives here. */
.scoreboard { font-family: Helvetica, Arial, sans-serif; }
.sc-card { display: block; background: #fff; border: 1px solid #e2e5ea; border-radius: 10px; padding: 8px 11px 9px; margin: 8px 0; text-decoration: none; color: #14213d; }
.sc-card:hover { border-color: #fca311; box-shadow: 0 2px 8px rgba(20,33,61,.10); }
.sc-card.sc-is-live { border-left: 3px solid #dc2626; }
.sc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.sc-status { font-size: 11.5px; font-weight: 700; letter-spacing: .02em; color: #374151; white-space: nowrap; }
.sc-status.sc-live-t { color: #dc2626; }
.sc-tv { font-size: 11.5px; color: #6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-team { display: flex; align-items: center; gap: 6px; padding: 2.5px 0; min-height: 27px; min-width: 0; }
.sc-logo { width: 22px; height: 22px; object-fit: contain; flex: 0 0 22px; }
.sc-rank { font-size: 11px; color: #6b7280; width: 16px; text-align: right; flex: 0 0 16px; }
.sc-name { font-size: 14.5px; font-weight: 600; white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sc-poss { width: 7px; height: 7px; border-radius: 50%; background: #b45309; flex: 0 0 7px; }
.sc-score { margin-left: auto; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sc-rec { margin-left: auto; font-size: 13px; color: #6b7280; font-variant-numeric: tabular-nums; }
.sc-team.sc-dim { color: #6b7280; }
.sc-team.sc-dim .sc-name { font-weight: 400; }
.sc-team.sc-dim .sc-score { font-weight: 400; }
.sc-sit { border-top: 1px dashed #e2e5ea; margin-top: 5px; padding-top: 4px; font-size: 11.5px; color: #6b7280; }

/* Dark mode — mirrors the two trigger patterns used in styles.css */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sc-card { background: #1c2334; border-color: #2b344a; color: #e8ecf4; }
  :root:not([data-theme="light"]) .sc-card:hover { border-color: #fca311; }
  :root:not([data-theme="light"]) .sc-status { color: #c3cad8; }
  :root:not([data-theme="light"]) .sc-status.sc-live-t { color: #f87171; }
  :root:not([data-theme="light"]) .sc-tv, :root:not([data-theme="light"]) .sc-rank,
  :root:not([data-theme="light"]) .sc-rec, :root:not([data-theme="light"]) .sc-sit { color: #9aa3b5; }
  :root:not([data-theme="light"]) .sc-team.sc-dim { color: #9aa3b5; }
  :root:not([data-theme="light"]) .sc-sit { border-top-color: #2b344a; }
}
:root[data-theme="dark"] .sc-card { background: #1c2334; border-color: #2b344a; color: #e8ecf4; }
:root[data-theme="dark"] .sc-card:hover { border-color: #fca311; }
:root[data-theme="dark"] .sc-status { color: #c3cad8; }
:root[data-theme="dark"] .sc-status.sc-live-t { color: #f87171; }
:root[data-theme="dark"] .sc-tv, :root[data-theme="dark"] .sc-rank,
:root[data-theme="dark"] .sc-rec, :root[data-theme="dark"] .sc-sit { color: #9aa3b5; }
:root[data-theme="dark"] .sc-team.sc-dim { color: #9aa3b5; }
:root[data-theme="dark"] .sc-sit { border-top-color: #2b344a; }

/* Sports page sections (v2, Nov 9, 2026 rework). These classes are used
   only by the sports category pages: labeled sections for the scores
   board and the story grid, the desk panel that carries the category
   intro, and a JS-gated reveal. Colors use the site variables, so both
   themes are handled by the :root definitions in styles.css. */
.sp-sec { margin: 30px 0 6px; }
.sp-sec-head { display: flex; align-items: center; gap: 9px; border-bottom: 2px solid var(--ink); padding-bottom: 7px; margin-bottom: 6px; }
.sp-sec-head h2 { margin: 0; }
.sp-sub { color: var(--muted); font-size: .95rem; margin: 6px 0 2px; }
.sp-live-dot { width: 10px; height: 10px; border-radius: 50%; background: #dc2626; flex: 0 0 10px; }
@media (prefers-reduced-motion: no-preference) {
  .sp-live-dot { animation: sp-pulse 2s ease-in-out infinite; }
}
@keyframes sp-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.sp-desk { background: var(--wash); border: 1px solid var(--line); border-radius: 12px; padding: 6px 22px 14px; margin: 30px 0 8px; }
.sp-desk h2 { margin-top: 16px; }
.sc-card { transition: border-color .18s ease, box-shadow .18s ease; }

/* Section reveal: sections start hidden ONLY when the inline script on
   the sports pages has confirmed IntersectionObserver support and no
   reduced-motion preference (it adds .rv-on to <html>). Transform and
   opacity only; the scores section never carries .rv, so scores are
   never hidden, even briefly. */
html.rv-on .rv { opacity: 0; transform: translateY(10px); }
html.rv-on .rv.in { opacity: 1; transform: none; transition: opacity .5s ease, transform .5s ease; }
@media (prefers-reduced-motion: reduce) {
  html.rv-on .rv { opacity: 1 !important; transform: none !important; transition: none !important; }
  .sp-live-dot { animation: none !important; }
  .sc-card { transition: none !important; }
}

/* Compact phone board (v3, Nov 9, 2026): below 760px the board trades
   card chrome for density. League panels become slim ruled sections
   (small-caps header over a 2px rule) and each game becomes a tight
   block — one slim status line, two team rows, an optional situation
   line — separated by hairlines instead of boxed cards, so a full
   slate scans in a couple of screens. Desktop is unchanged. The .sb-*
   base chrome lives in styles.css, so the color-bearing overrides
   restate the site's two dark-mode trigger patterns at matching
   specificity; this file loads after styles.css on every board page. */
@media (max-width: 760px) {
  .sb-grid { gap: 20px; }
  .sb-league { background: transparent; border: none; border-radius: 0; padding: 0; }
  .sb-league h3 { background: transparent; border-radius: 0; margin: 0; padding: 1px 1px 5px; border-bottom: 2px solid var(--ink); }
  .sb-sub { margin: 9px 0 0; }
  .sc-card { background: transparent; border: none; border-bottom: 1px solid #e2e5ea; border-radius: 0; box-shadow: none; margin: 0; padding: 6px 2px 7px; }
  .sc-card:hover { box-shadow: none; }
  .sc-card.sc-is-live { border-left: 3px solid #dc2626; padding-left: 7px; }
  .sc-head { margin-bottom: 2px; }
  .sc-status, .sc-tv { font-size: 11px; }
  .sc-team { min-height: 22px; padding: 1px 0; gap: 5px; }
  .sc-logo { width: 19px; height: 19px; flex-basis: 19px; }
  .sc-rank { font-size: 10.5px; width: 14px; flex-basis: 14px; }
  .sc-name { font-size: 13.5px; }
  .sc-score { font-size: 14px; }
  .sc-rec { font-size: 12px; }
  .sc-sit { border-top: none; margin-top: 2px; padding-top: 0; font-size: 11px; }
}
@media (max-width: 760px) and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sb-league { background: transparent; }
  :root:not([data-theme="light"]) .sb-league h3 { background: transparent; }
  :root:not([data-theme="light"]) .sc-card { background: transparent; border-bottom-color: #2b344a; }
}
@media (max-width: 760px) {
  :root[data-theme="dark"] .sb-league { background: transparent; }
  :root[data-theme="dark"] .sb-league h3 { background: transparent; }
  :root[data-theme="dark"] .sc-card { background: transparent; border-bottom-color: #2b344a; }
}

/* Sports landing layout (v4, Nov 9, 2026): the sports category pages
   (EN + ES) wrap their content in .sp-layout — two scoreboard rails
   around the stories column. scores.js initializes each .scoreboard
   independently, so the rails are pure markup: left board
   data-leagues="nfl,ncaaf,nba", right board "nhl,mlb,mls"; combined
   they render exactly the six leagues the single board showed.
   At >=1200px the layout is three columns: sticky rails (~312px) that
   scroll internally with overscroll containment, stories in the
   center. Below 1200px it stacks: both boards above the stories, the
   board compacted in the same ruled language as the v3 phone pass.
   Every rule is scoped to .sp-layout / .sp-wrap, which only the sports
   category pages carry, so the world-series boards keep the standard
   card presentation, and the <=760px phone block above is untouched. */
.sp-vis { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.sp-layout { display: flex; flex-direction: column; margin-top: 28px; }
.sp-rail-l { order: 1; }
.sp-rail-r { order: 2; }
.sp-main { order: 3; min-width: 0; }
.sp-rail .sp-sec { margin-top: 0; }

/* Compact board, desktop + mid widths: ruled league sections and tight
   game rows, the v3 phone language carried up. Dark overrides restate
   the site's two trigger patterns, as in the phone block. */
@media (min-width: 761px) {
  .sp-layout .sb-grid { gap: 20px 28px; }
  .sp-layout .sb-league { background: transparent; border: none; border-radius: 0; padding: 0; }
  .sp-layout .sb-league h3 { background: transparent; border-radius: 0; margin: 0; padding: 1px 1px 5px; border-bottom: 2px solid var(--ink); }
  .sp-layout .sb-sub { margin: 9px 0 0; }
  .sp-layout .sc-card { background: transparent; border: none; border-bottom: 1px solid #e2e5ea; border-radius: 0; box-shadow: none; margin: 0; padding: 6px 4px 7px; transition: background .15s ease; }
  .sp-layout .sc-card:hover { background: rgba(20,33,61,.045); box-shadow: none; }
  .sp-layout .sc-card.sc-is-live { border-left: 3px solid #dc2626; padding-left: 8px; }
  .sp-layout .sc-head { margin-bottom: 2px; }
  .sp-layout .sc-status, .sp-layout .sc-tv { font-size: 11.5px; }
  .sp-layout .sc-team { min-height: 24px; padding: 1px 0; gap: 6px; min-width: 0; }
  .sp-layout .sc-logo { width: 20px; height: 20px; flex-basis: 20px; }
  .sp-layout .sc-name { font-size: 14px; }
  .sp-layout .sc-score { font-size: 14.5px; }
  .sp-layout .sc-sit { border-top: none; margin-top: 2px; padding-top: 0; font-size: 11px; }
}
@media (min-width: 761px) and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sp-layout .sb-league { background: transparent; }
  :root:not([data-theme="light"]) .sp-layout .sb-league h3 { background: transparent; }
  :root:not([data-theme="light"]) .sp-layout .sc-card { background: transparent; border-bottom-color: #2b344a; }
  :root:not([data-theme="light"]) .sp-layout .sc-card:hover { background: rgba(232,236,244,.05); }
}
@media (min-width: 761px) {
  :root[data-theme="dark"] .sp-layout .sb-league { background: transparent; }
  :root[data-theme="dark"] .sp-layout .sb-league h3 { background: transparent; }
  :root[data-theme="dark"] .sp-layout .sc-card { background: transparent; border-bottom-color: #2b344a; }
  :root[data-theme="dark"] .sp-layout .sc-card:hover { background: rgba(232,236,244,.05); }
}

/* Mid widths (1024-1199px): league sections run full width and the
   games inside each league flow in two columns. */
@media (min-width: 1024px) and (max-width: 1199px) {
  .sp-layout .sb-grid { grid-template-columns: 1fr; gap: 24px; }
  .sp-layout [data-league] { display: grid; grid-template-columns: 1fr 1fr; column-gap: 30px; align-items: start; }
  .sp-layout [data-league] > .sb-sub, .sp-layout [data-league] > .sb-none { grid-column: 1 / -1; }
}

/* Wide desktop (>=1200px): three columns, sticky internally-scrolling
   rails under the sticky masthead (same --hdr-h offset the article
   asides use), wider measure for the sports pages only. */
@media (min-width: 1200px) {
  .sp-wrap { max-width: 1500px; }
  .sp-layout { display: grid; grid-template-columns: 312px minmax(0, 1fr) 312px; gap: 30px; align-items: start; }
  .sp-rail-l { order: 0; grid-column: 1; grid-row: 1; }
  .sp-main { order: 0; grid-column: 2; grid-row: 1; }
  .sp-rail-r { order: 0; grid-column: 3; grid-row: 1; }
  .sp-rail { position: sticky; top: calc(var(--hdr-h, 130px) + 10px); max-height: calc(100vh - var(--hdr-h, 130px) - 30px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-bottom: 6px; }
  .sp-rail::-webkit-scrollbar { width: 8px; }
  .sp-rail::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
  .sp-rail-l { border-right: 1px solid var(--line); padding-right: 18px; }
  .sp-rail-r { border-left: 1px solid var(--line); padding-left: 18px; }
  .sp-layout .sb-grid { grid-template-columns: 1fr; gap: 22px; }
  .sp-main .sp-sec { margin-top: 0; }
  .sp-main .hub-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1560px) {
  .sp-main .hub-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .sp-layout .sc-card { transition: none !important; }
}
