/* ─────────────────────────────────────────────────────────────────
   Article styles — dark-mode tokens   (Phase E.3 + E.4, May 2026)
   Used by:
     - Game analysis pages: nba_game_analysis.html, football_game_analysis.html,
       tennis_game_analysis.html
     - Blog articles: blog/{elo_*, glicko2_*, distribution_curve,
       how_to_use_prediction_data, nba_evolution, nba_player_projections,
       predixsport_in_claude, tennis_indices, tennis_predictions_telegram}.html
   Replaces ~12k lines of inline <style> across 14 templates.
   ───────────────────────────────────────────────────────────────── */

/* ── Wrappers ───────────────────────────────────────────────────── */
.article-container,
.blog-post-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.25rem;
}

/* ── Game header (top of game-analysis articles) ────────────────── */
.game-header {
    padding: 1.75rem 1.5rem 1.5rem;
    background: linear-gradient(160deg, var(--surface-1) 0%, var(--surface-2) 100%);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    margin-bottom: 2.5rem;
    text-align: center;
}

/* Tournament / location / surface / phase chips (tennis + football) */
.tournament-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.45rem;
    margin-bottom: 1rem;
}
.tournament-badge,
.location-badge,
.surface-badge,
.tournament-type-badge,
.match-phase-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-pill);
    font-size: var(--fs-micro);
    font-weight: 700;
    background: var(--surface-3);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-family: var(--font-mono);
}
.surface-badge.hard,
.surface-badge--hard {
    background: rgba(91, 179, 255, 0.10);
    color: var(--sport-nba);
    border-color: rgba(91, 179, 255, 0.35);
}
.surface-badge.clay,
.surface-badge--clay {
    background: var(--sport-tennis-soft);
    color: var(--sport-tennis);
    border-color: rgba(242, 120, 75, 0.35);
}
.surface-badge.grass,
.surface-badge--grass {
    background: var(--sport-football-soft);
    color: var(--sport-football);
    border-color: rgba(67, 193, 138, 0.35);
}

.match-title,
.game-title {
    font-size: clamp(1.3rem, 2.4vw, 1.7rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    letter-spacing: -0.015em;
    line-height: 1.25;
}

/* Team / player name in matchup row */
.teams-matchup,
.players-matchup {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}
.team-name,
.player-name {
    font-size: clamp(1.05rem, 2.2vw, 1.5rem);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.01em;
}
/* Home / away (NBA + football) and player-one / player-two (tennis) are
   set via EXPLICIT modifier classes added in the templates. Positional
   selectors (:first-child) don't work here because each name lives in
   its own Bootstrap column with multiple siblings — both names end up
   matching :first-child of their respective parent. */
.team-name.home-team,
.player-name.player-one        { color: var(--sport-nba); }
.team-name.away-team,
.player-name.player-two        { color: #CFD7E3; }   /* soft-white — tennis overrides to terracotta */

/* Football article: home team reads as football green, away stays soft-white.
   Without this scope, the global rule above would render every football
   home team in NBA royal blue. */
.article-container[data-sport="football"] .team-name.home-team,
[data-sport="football"] .team-name.home-team {
    color: var(--sport-football);
}

/* Tennis article: player-two reads as terracotta to match the brand sport accent */
.article-container[data-sport="tennis"] .player-name.player-two,
[data-sport="tennis"] .player-name.player-two {
    color: var(--sport-tennis);
}

/* VS badge between two team / player names */
.vs-badge {
    background: var(--surface-3);
    border: 1px solid var(--border-default);
    color: var(--text-muted);
    width: 44px;
    height: 44px;
    line-height: 1;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.game-date {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: var(--fs-micro);
    text-transform: uppercase;
    letter-spacing: 0.10em;
    margin-bottom: 0.85rem;
}
.season-badge {
    display: inline-block;
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid var(--accent-soft-strong);
    border-radius: var(--radius-pill);
    padding: 0.2rem 0.75rem;
    font-size: var(--fs-micro);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-family: var(--font-mono);
}

/* Win probability headline / games-prediction / prediction-result chips */
.win-probability,
.games-prediction,
.prediction-result {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--surface-2);
    border: 1px solid var(--border-default);
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius-md);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0.35rem;
}
.win-probability {
    font-family: var(--font-mono);
    font-feature-settings: "tnum" 1;
    color: var(--accent);
    font-size: 1.2rem;
}
.prediction-label {
    color: var(--text-muted);
    margin-right: 0.4rem;
    font-weight: 500;
    font-size: 0.92rem;
}
.prediction-value {
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-mono);
}
.prediction-value.winner { color: var(--positive); }
.probabilities-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    margin-top: 1.5rem;
}

/* Football-specific predictions strip: Draw / Over-Under / Goal-NG / Expected props */
.draw-probability {
    display: inline-flex;
    align-items: baseline;
    gap: 0.5rem;
    background: var(--surface-3);
    border: 1px solid rgba(255, 194, 59, 0.30);
    border-radius: var(--radius-pill);
    padding: 0.4rem 1.1rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
}
.draw-probability::before {
    content: '◆';
    color: #FFC23B;
    font-size: 0.78rem;
}
.draw-probability strong,
.draw-probability span {
    color: #FFC23B;
    font-family: var(--font-mono);
    font-weight: 800;
}

.goals-probability,
.props-expected-values {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}
.over-under-item,
.expected-value-item {
    display: inline-flex;
    align-items: baseline;
    gap: 0.45rem;
    background: var(--surface-3);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-pill);
    padding: 0.4rem 1.05rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}
.over-under-label,
.expected-label {
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: var(--fs-micro);
    letter-spacing: 0.06em;
    font-weight: 700;
}
.over-under-value,
.expected-value {
    font-family: var(--font-mono);
    font-feature-settings: "tnum" 1;
    font-weight: 800;
    color: var(--text-primary);
    font-size: 0.98rem;
}

/* Semantic-tint each Over / Under / Goal / No-Goal chip */
.over-under-item:nth-of-type(1) { border-color: rgba(56,212,154,0.30); }
.over-under-item:nth-of-type(1) .over-under-value { color: var(--positive); }
.over-under-item:nth-of-type(2) { border-color: rgba(243,94,94,0.30); }
.over-under-item:nth-of-type(2) .over-under-value { color: var(--negative); }
.over-under-item:nth-of-type(3) { border-color: rgba(91,179,255,0.30); }
.over-under-item:nth-of-type(3) .over-under-value { color: #5BB3FF; }
.over-under-item:nth-of-type(4) { border-color: var(--border-default); }
.over-under-item:nth-of-type(4) .over-under-value { color: var(--text-secondary); }

.expected-value-item {
    border-color: var(--accent-soft-strong);
}
.expected-value-item .expected-value { color: var(--accent); }

/* Heading "Result | Under-Over 2.5 | Corners | Shots | Spread" */
.prediction-types {
    font-size: 0.92rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 1.25rem;
    letter-spacing: 0.04em;
    text-transform: none;
}

/* ── Section cards (the rest of game-analysis page + blog articles) ── */
.article-container .card,
.blog-post-container .card,
.article-container .section-card,
.article-section {
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-1);
    margin-bottom: 1.75rem;
    transition: transform var(--t-base), border-color var(--t-base);
}
.article-container .card:hover,
.blog-post-container .card:hover {
    transform: translateY(-2px);
    border-color: var(--border-default);
}
.article-container .card-body,
.blog-post-container .card-body {
    padding: 1.5rem 1.6rem;
    color: var(--text-secondary);
}

/* Sport-tinted left-border accents that classify content sections */
.prediction-summary,
.elo-progression,
.total-spread-analysis,
.match-analysis-promo,
.power-rankings-promo {
    border-left: 4px solid var(--accent);
}
.detailed-analysis        { border-left: 4px solid var(--sport-nba); }
.conclusion               { border-left: 4px solid var(--positive); }
.recent-form              { border-left: 4px solid var(--text-muted); }
.expected-values-summary  { border-left: 4px solid var(--accent); }

.section-title,
.subsection-title {
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0 0 1rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.section-title { font-size: 1.25rem; }
.subsection-title {
    font-size: 1.05rem;
    border-bottom: 0;
    padding-bottom: 0;
    margin-bottom: 0.65rem;
}
.subsection-icon { color: var(--accent); font-size: 1rem; }

/* ── Stat-cards (inside expected-values-summary, total-spread-analysis) ── */
/* Layout: icon on the left, .stat-info (label / value / mode) stacked on the
   right. All three spans inside .stat-info are display: block — the original
   inline-default span layout caused "EXPECTED TOTAL ACES 6.4 Most likely: 6"
   to render as a single squashed line. */
.stat-card {
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem 1.15rem;
    transition: transform var(--t-base), border-color var(--t-base);
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
}
.stat-card:hover { border-color: var(--border-default); transform: translateY(-2px); }
.stat-card.total-points-card { border-left: 3px solid var(--accent); }
.stat-card.spread-card        { border-left: 3px solid var(--sport-nba); }
.stat-card.games-card         { border-left: 3px solid var(--sport-tennis); }
.stat-card.aces-card          { border-left: 3px solid var(--accent); }
.stat-card.df-card            { border-left: 3px solid #C084FC; }
/* Scoped to .stat-card so the BIG presentation only fires on the
   total-points / spread / games / aces / df expected-value cards, NOT on
   .stat-badge chips (which have their own smaller treatment for player
   projections). */
.stat-card .stat-icon {
    color: var(--accent);
    font-size: 1.65rem;
    line-height: 1;
    margin: 0;
    flex-shrink: 0;
}
.stat-card .stat-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
    flex: 1;
}
.stat-card .stat-label {
    color: var(--text-muted);
    font-size: var(--fs-micro);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    display: block;
}
.stat-card .stat-value {
    color: var(--accent);
    font-family: var(--font-mono);
    font-feature-settings: "tnum" 1;
    font-weight: 800;
    font-size: 1.7rem;
    line-height: 1.1;
    display: block;
}
.stat-card .stat-mode {
    color: var(--text-muted);
    font-size: var(--fs-micro);
    font-style: italic;
    margin-top: 0.1rem;
    display: block;
}

/* ── Chart cards inside articles (props charts, distribution charts) ── */
.chart-card,
.chart-section {
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.1rem 1.25rem;
    margin-bottom: 1rem;
}
.chart-section-title,
.chart-title {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    letter-spacing: -0.005em;
}
.chart-subtitle {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-bottom: 0.85rem;
}
.chart-figure { margin: 0; }
.chart-figure figcaption {
    color: var(--text-muted);
    font-size: 0.78rem;
    text-align: center;
    margin-top: 0.55rem;
    font-style: italic;
}

/* Note: .chart-container (predictions hub canvas wrapper) is styled in
   predictions.css — don't re-define it here. Game-analysis canvases use
   the dedicated .props-charts grid + .chart-card. */
/* Single column so each .chart-section (e.g. Aces, Double Faults) stacks
   full-width; the 2-col Distribution + CDF split lives inside each section
   via its own Bootstrap row. The previous auto-fit layout double-nested
   the grids and rendered 4 ~25%-width tiles that were unreadable. */
.props-charts {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 1rem;
}
/* Game-analysis prop charts (aces, double faults, total games, spread)
   — give the canvas a real height. Without this, Chart.js inherits the
   wrapper's 0-height and renders postage-stamp axes. */
.chart-card .chart-container {
    position: relative;
    width: 100%;
    height: 260px;
}
.chart-card .chart-container canvas {
    max-height: 260px !important;
}

.chart-container--elo,
.chart-container--player-dist,
.chart-container--player-cdf {
    position: relative;
    width: 100%;
}
.chart-container--elo canvas       { max-height: 300px !important; }
.chart-container--player-dist canvas { max-height: 220px !important; }
.chart-container--player-cdf canvas  { max-height: 220px !important; }

/* Chart view toggle (Both / PDF / CDF) — re-used pattern */
.chart-view-toggle {
    display: inline-flex;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 0.85rem;
}
.toggle-btn {
    background: transparent;
    border: 0;
    border-right: 1px solid var(--border-default);
    color: var(--text-muted);
    padding: 0.35rem 0.85rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--t-quick), color var(--t-quick);
}
.toggle-btn:last-child { border-right: 0; }
.toggle-btn:hover { color: var(--text-primary); }
.toggle-btn.active { background: var(--accent); color: var(--accent-on); }

/* ── Recent-form section ────────────────────────────────────────── */
/* Grid so name+record sit on one row, badges row 2, table row 3.
   The previous `display:flex` collapsed all 4 children (name, record,
   badges, table) into narrow inline strips that overflowed the column. */
.form-team-block {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
        "name record"
        "badges badges"
        "table table";
    align-items: baseline;
    column-gap: 0.75rem;
    row-gap: 0.45rem;
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem 1.15rem;
}
.form-team-name {
    grid-area: name;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.05rem;
    margin: 0;
}
.form-record {
    grid-area: record;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-feature-settings: "tnum" 1;
    font-size: 0.9rem;
}
.form-badges {
    grid-area: badges;
    display: flex;
    gap: 0.3rem;
    margin: 0.15rem 0 0.25rem;
}
.form-badge {
    width: 22px;
    height: 22px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--surface-0);
}
.form-badge--w { background: var(--positive); }
.form-badge--l { background: var(--negative); }
.form-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}
.form-dot--w { background: var(--positive); }
.form-dot--l { background: var(--negative); }

/* Form table (NBA game analysis recent games) */
.form-table {
    grid-area: table;
}
.form-table,
.elo-detail-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
    font-size: 0.88rem;
}
.form-table th,
.elo-detail-table th {
    background: var(--surface-3);
    color: var(--text-secondary);
    font-size: var(--fs-micro);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    padding: 0.55rem 0.7rem;
    text-align: left;
    border-bottom: 1px solid var(--border-default);
}
.form-table td,
.elo-detail-table td {
    padding: 0.55rem 0.7rem;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}
.form-table tr:hover td,
.elo-detail-table tr:hover td { background: var(--surface-2); }
.form-opponent { color: var(--text-secondary); }
.elo-date-cell { font-family: var(--font-mono); color: var(--text-muted); }
.elo-rating-cell {
    font-family: var(--font-mono);
    font-feature-settings: "tnum" 1;
    color: var(--accent);
    font-weight: 700;
}

/* ── ELO progression summary (chart card + summary stats) ───────── */
.elo-team-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 0.75rem;
}
.elo-team-name {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.95rem;
}
.elo-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.elo-current {
    color: var(--accent);
    font-family: var(--font-mono);
    font-feature-settings: "tnum" 1;
    font-weight: 800;
    font-size: 1.6rem;
}
.elo-delta {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.82rem;
}
.elo-delta--up   { color: var(--positive); }
.elo-delta--down { color: var(--negative); }
.elo-standings-cta {
    background: var(--surface-2);
    border: 1px dashed var(--accent);
    border-radius: var(--radius-md);
    padding: 0.85rem 1.1rem;
    color: var(--text-secondary);
    text-align: center;
    margin: 1rem 0;
}
.elo-standings-cta a { color: var(--accent); font-weight: 600; }

/* ── Player projections section (NBA game analysis only) ────────── */
.player-projections {
    background: linear-gradient(135deg, var(--surface-1) 0%, var(--surface-2) 100%);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-top: 1.5rem;
    color: var(--text-secondary);
}
.player-projections .section-title { color: var(--text-primary); border-bottom-color: var(--border-default); }

.player-card {
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin-bottom: 0.65rem;
    overflow: hidden;
}
.player-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.1rem;
    cursor: pointer;
    color: var(--text-primary);
}
.player-card__header:hover { background: var(--surface-3); }
.player-card__chevron {
    color: var(--text-muted);
    transition: transform var(--t-base);
}
.player-card[open] .player-card__chevron,
.player-card.show .player-card__chevron {
    transform: rotate(180deg);
    color: var(--accent);
}

/* Stat badges for player projections (PTS / REB / AST / 3PM).
   Markup contract:
       <span class="stat-badge stat-badge--pts">
         <span class="stat-label">PTS</span>
         <span class="stat-value">18.5</span>
       </span>
   We use column-reverse so the BIG mono value renders on top of the
   small uppercase label, regardless of source order. */
.stat-badge {
    display: inline-flex;
    flex-direction: column-reverse;
    align-items: center;
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-md);
    margin-right: 0.4rem;
    background: var(--surface-3);
    border: 1px solid var(--border-subtle);
    min-width: 60px;
    line-height: 1.1;
    text-align: center;
}
.stat-badge .stat-value {
    font-family: var(--font-mono);
    font-feature-settings: "tnum" 1;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin: 0;
}
.stat-badge .stat-label {
    color: var(--text-muted);
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    margin-top: 0.15rem;
}
.stat-badge--pts .stat-value { color: var(--accent); }
.stat-badge--reb .stat-value { color: var(--sport-nba); }
.stat-badge--ast .stat-value { color: var(--positive); }
.stat-badge--3pm .stat-value { color: #C084FC; }

/* Player metric tab pills inside projection cards */
.player-metric-tabs .nav-link {
    background: var(--surface-3);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    padding: 0.35rem 0.85rem;
    font-weight: 600;
    margin-right: 0.3rem;
}
.player-metric-tabs .nav-link.active {
    background: var(--accent) !important;
    color: var(--accent-on) !important;
    border-color: var(--accent) !important;
}

/* ── Starting-five matchup (NBA) ─────────────────────────────────
   Per-row layout: [POS chip] [HOME player + 3 stat-bars] [VS] [AWAY player + 3 stat-bars]
   Markup:
       .position-row
         .position-badge "PG"
         .matchup-player.home-player
           .player-name "Cooper Flagg"
           .player-stats > .stat-row × 3
             .stat-label "OR"
             .stat-bar-container > .stat-bar.or-bar[data-value="..."]
             .stat-value "1.18"
         .matchup-vs "VS"
         .matchup-player.away-player ...                              */
.starting-five-matchup .matchup-positions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}
.starting-five-matchup .position-row {
    display: grid;
    grid-template-columns: 44px 1fr 32px 1fr;
    gap: 0.85rem;
    align-items: center;
    padding: 0.85rem 1rem;
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: border-color var(--t-base);
}
.starting-five-matchup .position-row:hover { border-color: var(--border-default); }
.position-badge {
    background: var(--surface-3);
    color: var(--text-secondary);
    padding: 0.3rem 0.55rem;
    border-radius: var(--radius-sm);
    font-size: var(--fs-micro);
    font-weight: 800;
    text-transform: uppercase;
    text-align: center;
    font-family: var(--font-mono);
    letter-spacing: 0.05em;
}
.matchup-player {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
}
.matchup-player.away-player { text-align: right; }
.matchup-player .player-name {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.95rem;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.matchup-player.home-player .player-name { color: var(--sport-nba); }
.matchup-player.away-player .player-name { color: #CFD7E3; }
.player-stats {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.stat-row {
    display: grid;
    grid-template-columns: 32px 1fr 42px;
    align-items: center;
    gap: 0.5rem;
}
.matchup-player.away-player .stat-row {
    grid-template-columns: 42px 1fr 32px;
    /* mirror: value on left, label on right for away column */
}
.matchup-player.away-player .stat-row .stat-label { order: 3; text-align: left; }
.matchup-player.away-player .stat-row .stat-bar-container { order: 2; }
.matchup-player.away-player .stat-row .stat-value { order: 1; text-align: left; }
.stat-row .stat-label {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-align: right;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.06em;
}
.stat-bar-container {
    height: 6px;
    background: var(--surface-3);
    border-radius: 999px;
    overflow: hidden;
}
.stat-bar {
    height: 100%;
    border-radius: 999px;
    transition: width var(--t-base);
    /* JS sets width via inline style or via data-value + a setup script */
    min-width: 4px;
}
.stat-bar.or-bar  { background: linear-gradient(90deg, var(--accent), var(--accent-hover)); }
.stat-bar.dr-bar  { background: linear-gradient(90deg, var(--sport-nba), #7BAFFF); }
.stat-bar.pts-bar { background: linear-gradient(90deg, var(--positive), #5FE5B2); }
.stat-row .stat-value {
    font-family: var(--font-mono);
    font-feature-settings: "tnum" 1;
    font-weight: 700;
    color: var(--text-primary);
    text-align: right;
    font-size: 0.82rem;
}
.matchup-vs {
    text-align: center;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.matchup-legend {
    color: var(--text-muted);
    margin-top: 1rem;
    text-align: center;
    font-size: var(--fs-micro);
}
.matchup-legend strong { color: var(--text-secondary); }

/* On mobile the 44px/1fr/32px/1fr grid can't survive — values wrap
   mid-decimal ("115.4" → "115."+"4"), bars compress to ~30px, names
   truncate. Switch to a stacked layout: badge top, home block, VS
   divider, away block. Drop the away-column "mirror" too so both
   players read left-to-right identically. */
@media (max-width: 540px) {
    .starting-five-matchup .position-row {
        grid-template-columns: 1fr;
        grid-template-areas:
            "badge"
            "home"
            "vs"
            "away";
        gap: 0.55rem;
        padding: 0.85rem 0.9rem;
    }
    .starting-five-matchup .position-badge {
        grid-area: badge;
        justify-self: flex-start;
        width: max-content;
    }
    .starting-five-matchup .matchup-player.home-player { grid-area: home; }
    .starting-five-matchup .matchup-vs {
        grid-area: vs;
        opacity: 0.6;
        padding: 0.15rem 0;
        border-top: 1px dashed var(--border-subtle);
        border-bottom: 1px dashed var(--border-subtle);
    }
    .starting-five-matchup .matchup-player.away-player {
        grid-area: away;
        text-align: left;
    }
    /* Reset the away mirror — both players use the same row direction */
    .starting-five-matchup .matchup-player.away-player .stat-row {
        grid-template-columns: 32px 1fr 48px;
    }
    .starting-five-matchup .matchup-player.away-player .stat-row .stat-label  { order: initial; text-align: right; }
    .starting-five-matchup .matchup-player.away-player .stat-row .stat-bar-container { order: initial; }
    .starting-five-matchup .matchup-player.away-player .stat-row .stat-value  { order: initial; text-align: right; }
    .matchup-player .player-name { font-size: 0.95rem; white-space: normal; overflow: visible; text-overflow: unset; }
    .stat-row { grid-template-columns: 32px 1fr 48px; gap: 0.5rem; }
    .stat-row .stat-label { font-size: 0.7rem; }
    .stat-row .stat-value { font-size: 0.82rem; }
}

/* ── "Help / methodology" inline links + boxes ──────────────────── */
.charts-help-link,
.help-link {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}
.charts-help-link:hover,
.help-link:hover { color: var(--accent-hover); text-decoration: underline; }
.help-box {
    background: var(--surface-2);
    border: 1px solid var(--border-default);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-md);
    padding: 0.95rem 1.1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 1rem 0;
}

/* ── Detailed analysis & conclusion body content ────────────────── */
.analysis-content,
.conclusion-content,
.prediction-content {
    color: var(--text-secondary);
    line-height: 1.75;
    font-size: 1rem;
}
.analysis-content p,
.conclusion-content p,
.prediction-content p { margin-bottom: 1rem; }
.analysis-content strong,
.conclusion-content strong,
.prediction-content strong { color: var(--text-primary); }

/* ── Telegram CTA (shared with game-analysis + blog) ────────────── */
.telegram-cta {
    margin: 2rem 0;
}
.telegram-cta .bg-gradient-telegram,
.bg-gradient-telegram {
    background:
        radial-gradient(ellipse at 0% 50%, rgba(34, 158, 217, 0.18) 0%, transparent 55%),
        linear-gradient(135deg, var(--surface-1) 0%, var(--surface-2) 100%) !important;
    border: 1px solid var(--border-default);
    border-left: 4px solid #229ED9;
    border-radius: var(--radius-lg);
    color: var(--text-primary) !important;
    padding: 1.5rem 1.75rem;
}
.telegram-cta h3, .telegram-cta h4,
.bg-gradient-telegram h3, .bg-gradient-telegram h4 { color: var(--text-primary) !important; }
.telegram-cta p, .bg-gradient-telegram p { color: var(--text-secondary) !important; }
.telegram-btn {
    background: #229ED9;
    color: #fff !important;
    border: 0;
    border-radius: var(--radius-md);
    padding: 0.6rem 1.4rem;
    font-weight: 600;
    transition: background-color var(--t-base), transform var(--t-base),
                box-shadow var(--t-base);
}
.telegram-btn:hover {
    background: #0088cc;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 136, 204, 0.30);
}

/* ── Blog article body typography (Group D) ─────────────────────── */
.blog-post-header {
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 2rem;
}
.blog-post-title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.blog-post-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
}
.blog-post-author { font-weight: 600; color: var(--text-secondary); }
.blog-post-content {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--text-secondary);
}
.blog-post-content h2 {
    font-size: clamp(1.35rem, 2.2vw, 1.7rem);
    color: var(--text-primary);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: -0.015em;
}
.blog-post-content h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-top: 1.75rem;
    margin-bottom: 0.85rem;
    font-weight: 700;
}
.blog-post-content h4 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-top: 1.25rem;
    margin-bottom: 0.65rem;
    font-weight: 700;
}
.blog-post-content p { margin-bottom: 1.25rem; }
.blog-post-content ul,
.blog-post-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}
.blog-post-content li { margin-bottom: 0.4rem; }
.blog-post-content strong { color: var(--text-primary); }
.blog-post-content em     { color: var(--text-primary); font-style: italic; }
.blog-post-content a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: var(--accent-soft-strong);
    text-underline-offset: 2px;
}
.blog-post-content a:hover { color: var(--accent-hover); }
.blog-post-content code {
    background: var(--surface-3);
    color: var(--accent);
    padding: 0.1em 0.4em;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.92em;
}
.blog-post-content pre {
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.88rem;
    line-height: 1.55;
    overflow-x: auto;
    margin: 1.25rem 0;
}
.blog-post-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    font-size: inherit;
}
.blog-post-content blockquote {
    border-left: 3px solid var(--accent);
    background: var(--surface-2);
    border-radius: var(--radius-md);
    padding: 0.85rem 1.25rem;
    margin: 1.25rem 0;
    color: var(--text-secondary);
    font-style: italic;
}
.blog-post-content blockquote p:last-child { margin-bottom: 0; }
.blog-post-content img,
.blog-post-content figure img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    margin: 1rem 0;
}

/* Hero image at the top of a blog article (between header and body) */
.blog-post-featured-image {
    display: block;
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    object-position: center;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    margin: 0 0 2rem;
}
@media (max-width: 768px) {
    .blog-post-featured-image { max-height: 220px; }
}
.blog-post-content figure { margin: 1.5rem 0; }
.blog-post-content figcaption {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
    margin-top: 0.55rem;
    font-style: italic;
}

/* ── Key-concept / elo-factor / professional-note callouts ──────── */
.key-concept {
    background: linear-gradient(135deg, var(--surface-1) 0%, var(--surface-2) 100%);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.4rem;
    margin: 1.5rem 0;
    color: var(--text-secondary);
}
.key-concept h4,
.key-concept h3 {
    color: var(--text-primary);
    margin: 0 0 0.7rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.key-concept h4 i,
.key-concept h3 i { color: var(--accent); }

.elo-factor {
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    border-left: 4px solid var(--accent);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: 1.1rem 1.25rem;
    margin: 1rem 0;
}
.elo-factor h4 {
    color: var(--accent);
    margin: 0 0 0.4rem;
    font-size: 1.05rem;
    font-weight: 700;
}
.elo-factor p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.professional-note {
    background: var(--accent-soft);
    border: 1px solid var(--accent-soft-strong);
    border-radius: var(--radius-md);
    padding: 1rem 1.2rem;
    color: var(--text-secondary);
    margin: 1.25rem 0;
}
.professional-note strong { color: var(--text-primary); }

/* ── Comparison grid (side-by-side compare boxes) ───────────────── */
.comparison-section {
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin: 1.75rem 0;
}
.comparison-section > h3,
.comparison-section > h4 { color: var(--text-primary); margin-top: 0; }
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-top: 1rem;
}
.comparison-box {
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.1rem 1.25rem;
    color: var(--text-secondary);
}
.comparison-box h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.85rem;
    font-size: 1.05rem;
    color: var(--text-primary);
}
.comparison-box.standings h4 { color: var(--text-muted); }
.comparison-box.elo h4       { color: var(--accent); }
.comparison-box ul {
    margin: 0;
    padding-left: 1.2rem;
}
.comparison-box li {
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}
.comparison-box.standings li::marker { color: var(--negative); }
.comparison-box.elo li::marker        { color: var(--positive); }
@media (max-width: 768px) {
    .comparison-grid { grid-template-columns: 1fr; gap: 1rem; }
}

/* ── Scenario boxes (illustrative example callouts) ─────────────── */
.scenario-box {
    background:
        radial-gradient(ellipse at 0% 0%, var(--accent-soft) 0%, transparent 55%),
        linear-gradient(135deg, var(--surface-1) 0%, var(--surface-2) 100%);
    border: 1px solid var(--accent-soft-strong);
    border-radius: var(--radius-lg);
    padding: 1.4rem 1.5rem;
    margin: 1.5rem 0;
    color: var(--text-secondary);
}
.scenario-box h4 {
    color: var(--text-primary);
    margin: 0 0 0.85rem;
}
.scenario-box .scenario-detail {
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.85rem 1.05rem;
    margin-top: 0.85rem;
}

/* ── Comparison tables ──────────────────────────────────────────── */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.25rem 0;
    font-size: 0.92rem;
    min-width: 500px;
}
.comparison-table th,
.comparison-table td {
    padding: 0.7rem 0.9rem;
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}
.comparison-table th {
    background: var(--surface-3);
    color: var(--text-secondary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: var(--fs-micro);
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--border-default);
}
.comparison-table tr:nth-child(even) { background: rgba(255,255,255,0.018); }
.comparison-table tr.highlight-row {
    background: var(--accent-soft);
    border-left: 3px solid var(--accent);
}
.comparison-table tr.highlight-row td {
    color: var(--text-primary);
    font-weight: 600;
}

/* ── CTA section at the bottom of articles ──────────────────────── */
.cta-section {
    background:
        radial-gradient(ellipse at 30% 50%, var(--accent-soft) 0%, transparent 60%),
        linear-gradient(135deg, var(--surface-1) 0%, var(--surface-2) 100%);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 2rem 2.25rem;
    margin: 2.5rem 0 1.5rem;
    color: var(--text-primary);
}
.cta-section h3,
.cta-section h2 {
    color: var(--text-primary);
    margin: 0 0 0.85rem;
    font-weight: 700;
    letter-spacing: -0.015em;
}
.cta-section p { color: var(--text-secondary); margin-bottom: 1.25rem; }
.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}
.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.65rem 1.4rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
    transition: transform var(--t-base), background-color var(--t-base),
                box-shadow var(--t-base);
}
.cta-btn-primary {
    background: var(--accent);
    color: var(--accent-on) !important;
    border: 0;
}
.cta-btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-pop);
    color: var(--accent-on) !important;
}
.cta-btn-secondary {
    background: transparent;
    color: var(--text-secondary) !important;
    border: 1.5px solid var(--border-strong);
}
.cta-btn-secondary:hover {
    background: var(--surface-2);
    color: var(--text-primary) !important;
    border-color: var(--text-secondary);
}

/* ── Tennis: Match Format Predictions (tiebreak likelihood + exact score) ── */
.match-format-predictions .prop-card {
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.2rem 1.35rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.match-format-predictions .col-lg-6:nth-child(1) .prop-card { border-left: 3px solid var(--accent); }
.match-format-predictions .col-lg-6:nth-child(2) .prop-card { border-left: 3px solid var(--sport-tennis); }

.prop-card-title {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}
.prop-card-format-tag {
    background: var(--surface-3);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-feature-settings: "tnum" 1;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
}
.prop-card-subtitle {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.45;
}

/* Headline metric strip (e.g. "35.9% / Predicted: No tiebreak") */
.prop-card .prop-card-stats {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.85rem;
    margin: 0.1rem 0 0.4rem;
}
.prop-card .prop-card-stats .stat-value {
    color: var(--accent);
    font-family: var(--font-mono);
    font-feature-settings: "tnum" 1;
    font-weight: 800;
    font-size: 1.55rem;
    line-height: 1.1;
    display: block;
}
.prop-card .prop-card-stats .stat-mode {
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-style: italic;
    display: block;
}

/* Yes / No probability bars (tiebreak block) */
.prop-bars {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 0.25rem;
}
.prop-bar-row {
    display: grid;
    grid-template-columns: 110px 1fr 60px;
    align-items: center;
    gap: 0.75rem;
}
.prop-bar-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}
.prop-bar-track {
    height: 10px;
    background: var(--surface-3);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}
.prop-bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width var(--t-base);
}
.prop-bar-fill-yes  { background: var(--accent); }
.prop-bar-fill-no   { background: var(--text-muted); }
.prop-bar-value {
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-feature-settings: "tnum" 1;
    font-weight: 700;
    font-size: 0.9rem;
    text-align: right;
}

/* Compact chart variant used inside the exact-score prop-card */
.chart-card-compact {
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.7rem 0.85rem;
    margin: 0;
}
.chart-container-compact {
    position: relative;
    width: 100%;
    height: 240px;
}
.chart-container-compact canvas {
    max-height: 240px !important;
}
@media (max-width: 480px) {
    .prop-bar-row { grid-template-columns: 90px 1fr 50px; gap: 0.5rem; }
    .prop-bar-label { font-size: 0.78rem; }
}

/* ── Blog: how-to-use-prediction-data — page-specific blocks ────── */
/* Download bar demo (mock of the real download bar) */
.download-bar-demo {
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem 1.15rem;
    margin: 1rem 0 1.25rem;
}
.download-bar-demo__icon {
    font-size: 1.3rem;
    color: var(--accent);
}
.download-bar-demo__title {
    color: var(--text-primary);
    font-size: 0.95rem;
    display: block;
}
.download-bar-demo__subtitle {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin: 0;
}
.btn-demo {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.85rem;
    background: var(--surface-3);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-family: var(--font-mono);
    font-weight: 600;
}

/* Code blocks (JSON / shell / Python examples) */
.blog-post-content .code-block {
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem 1.15rem;
    margin: 1rem 0 1.25rem;
    position: relative;
    overflow-x: auto;
}
.blog-post-content .code-block .code-label {
    position: absolute;
    top: 0.55rem;
    right: 0.85rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}
.blog-post-content .code-block pre {
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}
/* Syntax tokens */
.json-key     { color: #79B8FF; }   /* light blue — keys / keywords */
.json-string  { color: #9ECBFF; }   /* pale blue — strings */
.json-number  { color: #F2A65A; }   /* warm orange — numbers */
.json-comment { color: var(--text-muted); font-style: italic; }

/* Use case cards (1, 2, 3, 4) */
.blog-post-content .use-case {
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-md);
    padding: 1.4rem 1.5rem;
    margin: 1.5rem 0;
}
.blog-post-content .use-case h3 {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
}
.uc-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: var(--accent);
    color: var(--accent-on);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 1rem;
    flex-shrink: 0;
}

/* Step blocks inside use-cases */
.blog-post-content .step-block {
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.9rem 1.1rem;
    margin: 0.85rem 0;
}
.blog-post-content .step-block h4 {
    margin: 0 0 0.4rem;
    color: var(--accent);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.005em;
}
.blog-post-content .step-block p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.55;
}

/* Example prompt callout */
.blog-post-content .prompt-example {
    background: rgba(255,159,28,0.06);
    border: 1px solid rgba(255,159,28,0.22);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-sm);
    padding: 0.9rem 1.1rem;
    margin: 1rem 0;
}
.prompt-label {
    display: block;
    color: var(--accent);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    margin-bottom: 0.4rem;
}
.blog-post-content .prompt-text {
    color: var(--text-primary);
    font-style: italic;
    font-size: 0.95rem;
    line-height: 1.55;
    margin: 0;
}

/* ── Blog inline Telegram CTA (used by how_to_use_prediction_data) ── */
.blog-telegram-cta {
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
}
.blog-telegram-cta__text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0 0 0.65rem;
}
.blog-telegram-cta__btn,
.blog-post-content .blog-telegram-cta__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #0088cc;
    color: #fff !important;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.5rem 1.15rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: background-color var(--t-base), transform var(--t-base);
}
.blog-telegram-cta__btn:hover,
.blog-post-content .blog-telegram-cta__btn:hover {
    background: #0077b3;
    color: #fff !important;
    transform: translateY(-1px);
    text-decoration: none;
}

/* ── NBA: Player Projections team headers ──────────────────────────
   The template uses .team-header--home / .team-header--away with Bootstrap
   .badge.bg-warning (HOME) and .badge.bg-primary (AWAY). Both look orange
   here because our global --bs-primary remap forces .bg-primary to accent.
   Scope the chip + team-name colors so HOME reads blue (sport-nba) and
   AWAY reads lavender — matching the page-header team-name colors. */
.player-projections .team-header {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 700;
    font-size: 1.05rem;
}
.player-projections .team-header--home { color: var(--sport-nba); }
.player-projections .team-header--away { color: #CFD7E3; }
.player-projections .team-header .badge {
    font-family: var(--font-mono);
    font-feature-settings: "tnum" 1;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    padding: 0.32em 0.6em;
    border-radius: var(--radius-sm);
    color: var(--surface-0) !important;
}
.player-projections .team-header--home .badge {
    background-color: var(--sport-nba) !important;
}
.player-projections .team-header--away .badge {
    background-color: #CFD7E3 !important;
}

/* ── Tennis: Ranking Trends (chip strip below the line chart) ───── */
.rankings-trends .player-ranking-details {
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.1rem 1.25rem;
    height: 100%;
}
.rankings-trends .col-md-6:nth-child(1) .player-ranking-details { border-left: 3px solid var(--sport-nba); }
.rankings-trends .col-md-6:nth-child(2) .player-ranking-details { border-left: 3px solid var(--sport-tennis); }
.rankings-trends .ranking-details-title {
    margin: 0 0 0.85rem;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.rankings-trends .col-md-6:nth-child(1) .ranking-details-title { color: var(--sport-nba); }
.rankings-trends .col-md-6:nth-child(2) .ranking-details-title { color: var(--sport-tennis); }
.rankings-trends .ranking-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.45rem;
}
.rankings-trends .ranking-item {
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.2rem;
    min-width: 0;
}
.rankings-trends .ranking-label {
    color: var(--text-muted);
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    white-space: nowrap;
}
.rankings-trends .ranking-value {
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-feature-settings: "tnum" 1;
    font-weight: 800;
    font-size: 1.15rem;
    line-height: 1.05;
}
.rankings-trends .ranking-date {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-feature-settings: "tnum" 1;
    font-size: 0.62rem;
    line-height: 1;
    white-space: nowrap;
}
/* Highlight the Current chip — it's the rank the rest of the article
   keys off, so it earns the accent border + value color. */
.rankings-trends .ranking-item:first-child {
    border-color: var(--accent);
    background: linear-gradient(180deg, rgba(255,159,28,0.08), var(--surface-2));
}
.rankings-trends .ranking-item:first-child .ranking-value { color: var(--accent); }
@media (max-width: 480px) {
    .rankings-trends .ranking-list { grid-template-columns: repeat(3, 1fr); }
}

/* ── Tennis: Player Metrics section ─────────────────────────────── */
/* Color the player-stats card based on column position (markup always
   puts player-one in col-md-6 #1, player-two in #2). Same trick is OK
   here because each player-stats has exactly ONE :nth-child(1) parent. */
.player-metrics .player-stats {
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.1rem 1.25rem;
    height: 100%;
}
.player-metrics .col-md-6:nth-child(1) .player-stats { border-left: 3px solid var(--sport-nba); }
.player-metrics .col-md-6:nth-child(2) .player-stats { border-left: 3px solid var(--sport-tennis); }
.player-metrics .player-stats-title {
    margin: 0 0 0.85rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}
.player-metrics .col-md-6:nth-child(1) .player-stats-title { color: var(--sport-nba); }
.player-metrics .col-md-6:nth-child(2) .player-stats-title { color: var(--sport-tennis); }
.player-metrics .metric-info-link {
    color: var(--text-muted);
    margin-left: 0.5rem;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color var(--t-base);
}
.player-metrics .metric-info-link:hover { color: var(--accent); }
.player-metrics .metric-info-link i { vertical-align: middle; }

.player-metrics .metrics-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
}
.player-metrics .metric-item {
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.7rem;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.player-metrics .metric-item .metric-label {
    color: var(--text-muted);
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}
.player-metrics .metric-item .metric-value {
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-feature-settings: "tnum" 1;
    font-weight: 700;
    font-size: 1rem;
}
.player-metrics .metric-item.surface-item {
    grid-column: 1 / -1;
    background: transparent;
    border: 0;
    padding: 0.2rem 0 0;
}
.player-metrics .metric-item.surface-item .metric-label {
    padding-left: 0.05rem;
    margin-bottom: 0.35rem;
}
.player-metrics .surface-strengths {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.45rem;
}
.player-metrics .surface-strength-item {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.5rem 0.6rem;
    background: var(--surface-3);
    border-radius: var(--radius-sm);
}
.player-metrics .surface-label {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
}
.player-metrics .surface-label.hard  { color: var(--sport-nba); }
.player-metrics .surface-label.clay  { color: var(--sport-tennis); }
.player-metrics .surface-label.grass { color: var(--positive); }
.player-metrics .surface-value {
    font-family: var(--font-mono);
    font-feature-settings: "tnum" 1;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.95rem;
}

/* ── Tennis: Recent Matches section ─────────────────────────────── */
.recent-matches .player-matches {
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.1rem 1.25rem;
    height: 100%;
}
.recent-matches .col-md-6:nth-child(1) .player-matches { border-left: 3px solid var(--sport-nba); }
.recent-matches .col-md-6:nth-child(2) .player-matches { border-left: 3px solid var(--sport-tennis); }
.recent-matches .player-matches-title {
    margin: 0 0 0.85rem;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
}
.recent-matches .player-matches-title .player-name { font-size: 1.1rem; }
.recent-matches .last-five-results {
    display: inline-flex;
    gap: 0.25rem;
    align-items: center;
}
.recent-matches .last-five-results .result-icon {
    width: 22px;
    height: 22px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0;          /* hide emoji glyph */
    line-height: 1;
    color: transparent;
    position: relative;
}
.recent-matches .last-five-results .result-icon.win  { background: var(--positive); }
.recent-matches .last-five-results .result-icon.loss { background: var(--negative); }
.recent-matches .last-five-results .result-icon::after {
    color: var(--surface-0);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 800;
}
.recent-matches .last-five-results .result-icon.win::after  { content: "W"; }
.recent-matches .last-five-results .result-icon.loss::after { content: "L"; }

.recent-matches .match-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.recent-matches .match-item {
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.7rem;
    display: grid;
    grid-template-columns: auto auto 1fr;
    align-items: start;
    gap: 0.55rem;
}
.recent-matches .match-item .match-label {
    color: var(--text-muted);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    padding-top: 0.15rem;
    white-space: nowrap;
}
.recent-matches .match-item .result-icon {
    width: 20px;
    height: 20px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    color: transparent;
    flex-shrink: 0;
}
.recent-matches .match-item .result-icon.win  { background: var(--positive); }
.recent-matches .match-item .result-icon.loss { background: var(--negative); }
.recent-matches .match-item .result-icon::after {
    color: var(--surface-0);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 800;
}
.recent-matches .match-item .result-icon.win::after  { content: "W"; }
.recent-matches .match-item .result-icon.loss::after { content: "L"; }
.recent-matches .match-item .match-details {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.45;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}
.recent-matches .match-item .match-score {
    font-family: var(--font-mono);
    font-feature-settings: "tnum" 1;
    color: var(--text-primary);
    font-weight: 700;
    background: var(--surface-3);
    padding: 0.1rem 0.45rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
}
.recent-matches .match-item .match-info {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-left: 0.15rem;
}
.recent-matches .surface-tag,
.recent-matches .tournament-tag,
.recent-matches .duration-tag {
    font-family: var(--font-mono);
    font-feature-settings: "tnum" 1;
    font-size: 0.7rem;
    padding: 0.1rem 0.45rem;
    border-radius: var(--radius-sm);
    background: var(--surface-3);
    color: var(--text-secondary);
    text-transform: lowercase;
    line-height: 1.5;
    border: 1px solid var(--border-subtle);
}
.recent-matches .surface-tag.hard  { color: var(--sport-nba); border-color: rgba(79,141,255,0.22); }
.recent-matches .surface-tag.clay  { color: var(--sport-tennis); border-color: rgba(242,120,75,0.22); }
.recent-matches .surface-tag.grass { color: var(--positive); border-color: rgba(56,212,154,0.22); }
.recent-matches .tournament-tag    { color: var(--text-primary); text-transform: none; }
.recent-matches .duration-tag      { color: var(--text-muted); }

/* Mobile: the 3-col grid (label | icon | details) cracks at ~390px —
   opponent names wrap awkwardly, score + tag chips overflow to a 3rd
   line. Switch to 2 rows: row 1 [label · icon · spacer], row 2 [details]
   spanning full width. */
@media (max-width: 540px) {
    .recent-matches .match-item {
        grid-template-columns: auto auto 1fr;
        grid-template-rows: auto auto;
        gap: 0.25rem 0.5rem;
        padding: 0.65rem 0.75rem;
        align-items: center;
    }
    .recent-matches .match-item .match-label {
        grid-column: 1; grid-row: 1;
        padding-top: 0;
        align-self: center;
    }
    .recent-matches .match-item > .result-icon {
        grid-column: 2; grid-row: 1;
        justify-self: flex-start;
    }
    .recent-matches .match-item .match-details {
        grid-column: 1 / -1; grid-row: 2;
        font-size: 0.85rem;
    }
}

/* ── Football: Recent Trends section ────────────────────────────── */
/* Same DOM shape as tennis Recent Matches but with W/D/L instead of W/L,
   and the items live under .team-trends instead of .player-matches. */
.recent-trends .team-trends {
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.1rem 1.25rem;
    height: 100%;
}
.recent-trends .col-md-6:nth-child(1) .team-trends { border-left: 3px solid var(--sport-football); }
.recent-trends .col-md-6:nth-child(2) .team-trends { border-left: 3px solid #CFD7E3; }
.recent-trends .team-trend-title {
    margin: 0 0 0.85rem;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
}
.recent-trends .team-trend-title .team-name { font-size: 1.1rem; }
.recent-trends .trend-symbols {
    display: inline-flex;
    gap: 0.25rem;
    align-items: center;
}
.recent-trends .trend-symbols .result-icon {
    width: 22px;
    height: 22px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--surface-0);
}
.recent-trends .trend-symbols .result-icon.win  { background: var(--positive); }
.recent-trends .trend-symbols .result-icon.loss { background: var(--negative); }
.recent-trends .trend-symbols .result-icon.draw { background: var(--warning, #f5a623); }

.recent-trends .match-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.recent-trends .match-item {
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.7rem;
    display: grid;
    grid-template-columns: auto auto 1fr;
    align-items: center;
    gap: 0.55rem;
}
.recent-trends .match-item .match-label {
    color: var(--text-muted);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    white-space: nowrap;
}
.recent-trends .match-item .result-icon {
    width: 20px;
    height: 20px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--surface-0);
    flex-shrink: 0;
}
.recent-trends .match-item .result-icon.win  { background: var(--positive); }
.recent-trends .match-item .result-icon.loss { background: var(--negative); }
.recent-trends .match-item .result-icon.draw { background: var(--warning, #f5a623); }
.recent-trends .match-item .match-details {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.45;
}
/* Keep "(Goals: X - Y)" as a single unbreakable unit so it either
   stays on the same line as the opponent name or wraps as a whole. */
.recent-trends .match-goals {
    white-space: nowrap;
    display: inline-block;
}

/* ── Football: Advanced Metrics section ─────────────────────────── */
.advanced-metrics .team-metrics {
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.1rem 1.25rem;
    height: 100%;
}
.advanced-metrics .col-md-6:nth-child(1) .team-metrics { border-left: 3px solid var(--sport-football); }
.advanced-metrics .col-md-6:nth-child(2) .team-metrics { border-left: 3px solid #CFD7E3; }
.advanced-metrics .team-metrics-title {
    margin: 0 0 0.85rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}
.advanced-metrics .col-md-6:nth-child(1) .team-metrics-title { color: var(--sport-football); }
.advanced-metrics .col-md-6:nth-child(2) .team-metrics-title { color: #CFD7E3; }
.advanced-metrics .metrics-list {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.55rem;
}
.advanced-metrics .metric-item {
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.advanced-metrics .metric-item .metric-label {
    color: var(--text-muted);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}
.advanced-metrics .metric-item .metric-value {
    color: var(--accent);
    font-family: var(--font-mono);
    font-feature-settings: "tnum" 1;
    font-weight: 800;
    font-size: 1.15rem;
}
@media (max-width: 480px) {
    .advanced-metrics .metrics-list { grid-template-columns: 1fr; }
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .article-container, .blog-post-container { padding: 1.5rem 1rem; }
    .game-header { padding: 1.4rem 1rem 1.25rem; margin-bottom: 1.75rem; }
    .article-container .card-body, .blog-post-container .card-body { padding: 1.2rem 1.1rem; }
    .chart-card .chart-container,
    .chart-card .chart-container canvas { height: 220px; max-height: 220px !important; }
    .stat-value { font-size: 1.25rem; }
    .cta-section { padding: 1.5rem 1.25rem; }
    .cta-buttons { flex-direction: column; }
    .cta-btn { width: 100%; justify-content: center; }
    .comparison-table { font-size: 0.85rem; }
    .blog-post-content { font-size: 0.98rem; }
}
@media (max-width: 480px) {
    .game-header { padding: 1.2rem 0.85rem 1.1rem; }
    .vs-badge { width: 38px; height: 38px; font-size: 0.78rem; }
    .win-probability, .games-prediction, .prediction-result { font-size: 0.95rem; padding: 0.45rem 0.95rem; }
}
