/* NFL Live Game viewer (D-030) */
.nlg-wrap { max-width: 1180px; margin: 0 auto; padding: 1rem 1rem 3rem; }
.nlg-livebadge { color: var(--color-live); font-weight: 800; font-size: 0.72rem; letter-spacing: 0.08em; animation: nlgpulse 1.4s ease-in-out infinite; }
@keyframes nlgpulse { 50% { opacity: 0.35; } }
.nlg-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; background: var(--bg-card); border: 1px solid var(--border-default); border-radius: var(--radius-lg); padding: 1.1rem 1rem; margin: 0.6rem 0 1rem; }
.nlg-team { display: flex; flex-direction: column; align-items: center; gap: 0.15rem; background: none; border: none; border-top: 3px solid var(--tc); cursor: pointer; color: var(--text-primary); border-radius: var(--radius-md); padding: 0.5rem 0.3rem; }
.nlg-team img { width: 52px; height: 52px; object-fit: contain; }
.nlg-team-abbr { font-weight: 800; font-size: 0.95rem; }
.nlg-team-name { font-size: 0.68rem; color: var(--text-muted); }
.nlg-team-rec { font-size: 0.66rem; color: var(--text-subtle); }
.nlg-team-score { font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.nlg-team-score--win { color: var(--accent); }
.nlg-center { text-align: center; }
.nlg-status { font-size: 0.8rem; font-weight: 700; color: var(--text-secondary); }
.nlg-status--live { color: var(--color-live); }
.nlg-vs { font-size: 0.7rem; color: var(--text-subtle); margin-top: 0.2rem; }
.nlg-situation { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; justify-content: center; background: color-mix(in srgb, var(--color-live) 8%, transparent); border: 1px solid color-mix(in srgb, var(--color-live) 30%, transparent); border-radius: var(--radius-md); padding: 0.5rem 0.8rem; margin-bottom: 1rem; font-size: 0.8rem; }
.nlg-poss { font-weight: 700; color: var(--text-primary); }
.nlg-dd { color: var(--text-secondary); }
.nlg-lastplay { width: 100%; text-align: center; font-size: 0.74rem; color: var(--text-muted); }
.nlg-card { background: var(--bg-card); border: 1px solid var(--border-default); border-radius: var(--radius-lg); margin-bottom: 1rem; overflow: hidden; }
.nlg-sum { cursor: pointer; padding: 0.6rem 1rem; font-weight: 800; font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-primary); list-style: none; display: flex; justify-content: space-between; align-items: center; }
.nlg-sum::-webkit-details-marker { display: none; }
.nlg-sum-teams { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--text-subtle); font-size: 0.7rem; }
.nlg-ls { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.nlg-ls th, .nlg-ls td { text-align: center; padding: 0.45rem 0.5rem; font-variant-numeric: tabular-nums; }
.nlg-ls thead th { color: var(--text-muted); font-size: 0.64rem; text-transform: uppercase; border-bottom: 1px solid var(--border-default); }
.nlg-ls-team { text-align: left !important; font-weight: 700; color: var(--text-primary); }
.nlg-ls-total { font-weight: 800; color: var(--text-primary); }
.nlg-plays { padding: 0 0.6rem 0.6rem; display: flex; flex-direction: column; gap: 0.3rem; }
.nlg-play { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.5rem; border-radius: var(--radius-sm); background: var(--bg-raised); font-size: 0.8rem; }
.nlg-play img { width: 18px; height: 18px; object-fit: contain; }
.nlg-play-when { font-size: 0.66rem; font-weight: 700; color: var(--text-subtle); min-width: 56px; }
.nlg-play-text { flex: 1; color: var(--text-secondary); }
.nlg-play-score { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text-primary); }
.nlg-ts { padding: 0.3rem 1rem 0.7rem; }
.nlg-ts-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0.6rem; padding: 0.35rem 0; border-bottom: 1px solid var(--border-subtle); font-size: 0.84rem; font-variant-numeric: tabular-nums; }
.nlg-ts-row:last-child { border-bottom: none; }
.nlg-ts-a { text-align: right; font-weight: 700; color: var(--text-primary); }
.nlg-ts-h { text-align: left; font-weight: 700; color: var(--text-primary); }
.nlg-ts-l { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-muted); }
.nlg-bx { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; padding: 0.4rem 0.8rem 0.8rem; }
.nlg-bx-team-title { font-weight: 800; font-size: 0.78rem; color: var(--accent); margin-bottom: 0.3rem; }
.nlg-bx-head { display: flex; gap: 0.25rem; font-size: 0.58rem; text-transform: uppercase; color: var(--text-subtle); padding: 0.3rem 0 0.15rem; border-bottom: 1px solid var(--border-subtle); margin-top: 0.4rem; }
.nlg-bx-row { display: flex; gap: 0.25rem; font-size: 0.72rem; padding: 0.2rem 0; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
/* Name gets a fixed floor instead of a flex ratio — at 7-8 stat columns (full
   box score, D-080 Phase 1) a proportional 1.5-of-N share truncated every
   name to 5-6 characters. Stat columns share what's left and may shrink
   evenly on narrow widths rather than starving the name column. */
.nlg-bx-head span:first-child, .nlg-bx-name { flex: 0 0 88px; min-width: 60px; }
.nlg-bx-head span:not(:first-child), .nlg-bx-row span:not(.nlg-bx-name) { flex: 1 1 0; min-width: 0; text-align: right; }
.nlg-bx-name { color: var(--text-primary); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
@media (min-width: 640px) { .nlg-bx-head span:first-child, .nlg-bx-name { flex-basis: 112px; } }
.nlg-loading, .nlg-empty { text-align: center; padding: 3rem 1rem; color: var(--text-muted); }

/* ── D-105: Live Field Viewer (Gamecast-style field position graphic) ──
   Team-color end zones, first-down marker, ball spot, red-zone shading,
   timeouts remaining. Sits above .nlg-situation in the live header; renders
   only while a real numeric situation is available (see _nlgFieldViewerHtml,
   js/nflLiveGame.js) -- absent for scheduled/final games or if the merged
   /scoreboard fetch fails, never a placeholder/guessed state. */
.field-viewer { margin: 0 0 0.9rem; }
.fv-topline { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.5rem; gap: 0.75rem; }
.fv-dd { font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--text-primary); }
.fv-poss { font-size: 0.68rem; font-weight: 700; color: var(--text-muted); display: flex; align-items: center; gap: 0.35rem; white-space: nowrap; }
.fv-poss-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.fv-field { position: relative; height: 42px; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-subtle); border: 1px solid var(--border-default); display: flex; }
.fv-endzone { width: 30px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; writing-mode: vertical-rl; text-orientation: mixed; font-family: var(--font-display); font-weight: 800; font-size: 0.6rem; letter-spacing: 1px; color: rgba(255,255,255,0.85); }
.fv-track { position: relative; flex: 1; background: repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0, rgba(255,255,255,0.05) 1px, transparent 1px, transparent 10%); }
.fv-redzone { position: absolute; top: 0; bottom: 0; background: var(--color-loss-subtle); border-left: 1px dashed var(--color-loss-border); border-right: 1px dashed var(--color-loss-border); }
.fv-firstdown { position: absolute; top: 0; bottom: 0; width: 3px; background: var(--color-first-down); box-shadow: 0 0 6px var(--color-first-down-glow); }
.fv-ball { position: absolute; top: 50%; width: 11px; height: 11px; border-radius: 50%; transform: translate(-50%,-50%); border: 2px solid var(--bg-card); box-shadow: 0 0 0 1px var(--border-strong), 0 0 8px rgba(0,0,0,0.5); z-index: 2; }
.fv-yardnums { display: flex; justify-content: space-between; padding: 0 30px; margin-top: 0.3rem; font-family: var(--font-mono); font-size: 0.56rem; color: var(--text-subtle); font-weight: 600; }
.fv-legend { display: flex; justify-content: space-between; align-items: center; margin-top: 0.6rem; gap: 0.5rem; flex-wrap: wrap; }
.fv-timeouts { display: flex; align-items: center; gap: 0.35rem; }
.fv-to-label { font-size: 0.58rem; font-weight: 700; color: var(--text-subtle); text-transform: uppercase; letter-spacing: 0.4px; }
.fv-to-dots { display: flex; gap: 3px; }
.fv-to-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--border-mid); }
.fv-to-dot--on { background: var(--text-secondary); }
.fv-key { display: flex; align-items: center; gap: 0.9rem; font-size: 0.6rem; color: var(--text-muted); font-weight: 700; }
.fv-key span { display: inline-flex; align-items: center; gap: 0.3rem; }
.fv-key i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
@media (max-width: 640px) { .fv-field { height: 36px; } .fv-endzone { width: 24px; font-size: 0.54rem; } }
/* Border = team identity, badge = state (D-038 K2) — live shows as glow + badge */
.game-card--live { box-shadow: var(--shadow-live); }
.nfl-gameday-head { grid-column: 1 / -1; display: flex; align-items: center; gap: 0.4rem; font-size: 0.74rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-live); margin: 0.2rem 0 0; }
.nfl-gameday-head--sub { color: var(--text-subtle); }
@media (max-width: 640px) { .nlg-bx { grid-template-columns: 1fr; } .nlg-team img { width: 42px; height: 42px; } .nlg-team-score { font-size: 1.6rem; } }


/* -- D-080 Phase 1: topbar, always-visible header, tabs, sidebar, game flow -- */
.nlg-topbar { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }
.nlg-header { margin: 0.6rem 0 1rem; }
.nlg-livebadge { margin-left: 0.5rem; }

.nlg-layout { display: grid; grid-template-columns: 1fr 300px; gap: 1rem; align-items: start; }
.nlg-main { min-width: 0; }
.nlg-side { display: flex; flex-direction: column; gap: 1rem; position: sticky; top: calc(var(--header-height) + var(--ticker-height) + var(--header-sub-h) + 1rem); }

/* Tabs — first tablist component in this codebase (checked: only .nav-tab
   exists elsewhere, an unrelated top-nav component). Brand orange reserved
   for the active tab only, per the "accent = brand only" invariant. */
.gv-tabs { display: flex; gap: 0.2rem; border-bottom: 1px solid var(--border-default); margin-bottom: 0.8rem; overflow-x: auto; }
.gv-tab { background: none; border: none; border-bottom: 2px solid transparent; color: var(--text-muted); font-weight: 700; font-size: 0.78rem; padding: 0.55rem 0.7rem; cursor: pointer; white-space: nowrap; }
.gv-tab:hover { color: var(--text-secondary); }
.gv-tab--active { color: var(--accent); border-bottom-color: var(--accent); }
.gv-tabpanel { min-height: 120px; }

.nlg-side-card { background: var(--bg-card); border: 1px solid var(--border-default); border-radius: var(--radius-lg); padding: 0.8rem 0.9rem; }
.nlg-side-title { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); margin: 0 0 0.5rem; }
.nlg-leader-team { margin-bottom: 0.5rem; }
.nlg-leader-team:last-child { margin-bottom: 0; }
.nlg-leader-team-title { font-size: 0.7rem; font-weight: 800; color: var(--accent); margin-bottom: 0.15rem; }
.nlg-leader-row { display: grid; grid-template-columns: auto 1fr auto; gap: 0.5rem; align-items: baseline; padding: 0.2rem 0; font-size: 0.76rem; }
.nlg-leader-cat { color: var(--text-subtle); font-size: 0.66rem; text-transform: uppercase; }
.nlg-leader-name { color: var(--text-primary); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nlg-leader-val { font-family: var(--font-display); font-weight: 700; color: var(--text-primary); font-variant-numeric: tabular-nums; }

.nlg-flow-svg { width: 100%; height: 56px; display: block; }
.nlg-flow-legend { display: flex; justify-content: space-between; font-size: 0.66rem; font-weight: 700; margin-top: 0.2rem; }

.nlg-wp-svg { width: 100%; height: 56px; display: block; }
.nlg-wp-legend { display: flex; justify-content: space-between; align-items: baseline; font-size: 0.66rem; font-weight: 700; margin-top: 0.2rem; }
.nlg-wp-legend > span:first-child { font-family: var(--font-display); font-size: 0.78rem; font-weight: 800; }

.nlg-empty-tab { text-align: center; padding: 2.5rem 1rem; color: var(--text-muted); background: var(--bg-card); border: 1px solid var(--border-default); border-radius: var(--radius-lg); }
.nlg-empty-tab-title { font-weight: 700; color: var(--text-secondary); margin-bottom: 0.3rem; }

/* Play-by-Play */
.nlg-pbp-plays { padding: 0 0.6rem 0.6rem; display: flex; flex-direction: column; gap: 0.25rem; }
.nlg-pbp-play { display: grid; grid-template-columns: auto 1fr auto; gap: 0.5rem; align-items: baseline; padding: 0.3rem 0.5rem; border-radius: var(--radius-sm); font-size: 0.78rem; }
.nlg-pbp-play--score { background: color-mix(in srgb, var(--color-live) 8%, transparent); }
.nlg-pbp-dd { font-size: 0.64rem; font-weight: 700; color: var(--text-subtle); min-width: 84px; }
.nlg-pbp-text { color: var(--text-secondary); }
.nlg-pbp-score { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text-primary); }

/* Box Score tab — full groups, denser than the old 2-column preview */
.nlg-bx--full { grid-template-columns: 1fr 1fr; }

/* Fantasy */
.nlg-fantasy-header { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.6rem; }
.nlg-fantasy-chips { display: flex; gap: 0.3rem; }
.nlg-fantasy-chip { background: var(--bg-raised); border: 1px solid var(--border-default); border-radius: var(--radius-full); color: var(--text-muted); font-size: 0.68rem; font-weight: 700; padding: 0.25rem 0.6rem; cursor: pointer; }
.nlg-fantasy-chip--active { background: var(--accent-subtle); border-color: var(--accent-border); color: var(--accent); }
.nlg-fantasy-list { display: flex; flex-direction: column; gap: 0.15rem; }
.nlg-fantasy-row { display: grid; grid-template-columns: 1.5rem 1fr auto auto; gap: 0.5rem; align-items: center; padding: 0.35rem 0.5rem; border-radius: var(--radius-sm); font-size: 0.8rem; }
.nlg-fantasy-row:nth-child(odd) { background: var(--bg-raised); }
.nlg-fantasy-rank { color: var(--text-subtle); font-weight: 700; }
.nlg-fantasy-name { color: var(--text-primary); font-weight: 600; }
.nlg-fantasy-team { color: var(--text-muted); font-size: 0.68rem; }
.nlg-fantasy-pts { font-family: var(--font-display); font-weight: 800; color: var(--text-primary); font-variant-numeric: tabular-nums; }

.nlg-venue-caption { margin-top: 0.5rem; }

@media (max-width: 900px) {
  .nlg-layout { grid-template-columns: 1fr; }
  .nlg-side { position: static; }
}

/* -- D-081 Phase 3a: Success Rate + Drive Efficiency (Analytics tab) -- */
.nlg-an-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; padding: 0.4rem 0.8rem 0.8rem; }
.nlg-an-headline { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; color: var(--text-primary); margin: 0.15rem 0 0.4rem; font-variant-numeric: tabular-nums; }
.nlg-an-val { font-weight: 700; color: var(--text-primary); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .nlg-an-grid { grid-template-columns: 1fr; } }

/* -- Unused-data surfacing: injuries, NFL news, broadcast/odds caption,
   -- standings context. All read fields already present in fetchNFLSummary's
   -- response — no new fetch, no new endpoint. -- */
.nlg-inj { padding: 0 0.6rem 0.6rem; display: flex; flex-direction: column; gap: 0.6rem; }
.nlg-inj-row { display: grid; grid-template-columns: 1.7rem 1fr auto 1fr; gap: 0.5rem; align-items: baseline; padding: 0.2rem 0; font-size: 0.78rem; }
.nlg-inj-status { font-weight: 800; color: var(--text-secondary); background: var(--bg-raised); border-radius: var(--radius-sm); text-align: center; font-size: 0.66rem; padding: 0.1rem 0; }
.nlg-inj-name { color: var(--text-primary); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nlg-inj-pos { color: var(--text-subtle); font-size: 0.68rem; }
.nlg-inj-detail { color: var(--text-muted); font-size: 0.72rem; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nlg-news { padding: 0 0.6rem 0.6rem; display: flex; flex-direction: column; gap: 0.3rem; }
.nlg-news-row { display: flex; flex-direction: column; gap: 0.1rem; padding: 0.4rem 0.5rem; border-radius: var(--radius-sm); background: var(--bg-raised); color: inherit; text-decoration: none; }
.nlg-news-row:hover { background: var(--bg-card-hover); }
.nlg-news-headline { color: var(--text-primary); font-weight: 600; font-size: 0.8rem; }
.nlg-news-meta { color: var(--text-subtle); font-size: 0.66rem; }

.nlg-st-group { margin-bottom: 0.6rem; }
.nlg-st-group:last-child { margin-bottom: 0; }
.nlg-st-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 0.5rem; align-items: baseline; padding: 0.15rem 0; font-size: 0.76rem; font-variant-numeric: tabular-nums; }
/* Border = identity (D-038 K2) — the playing team's row is marked by its own
   team color on the border, matching .nlg-team's --tc pattern, not accent. */
.nlg-st-row--playing { border-left: 2px solid var(--tc); margin-left: -0.4rem; padding-left: 0.4rem; background: var(--bg-raised); border-radius: var(--radius-sm); }
.nlg-st-row--playing .nlg-st-team { font-weight: 800; }
.nlg-st-team { font-weight: 700; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nlg-st-rec { color: var(--text-secondary); text-align: right; }
.nlg-st-pct { color: var(--text-subtle); text-align: right; }
