/* ─────────────────────────────────────────────────────────────────
   Predictions hubs — shared dark-themed styles  (Phase C, May 2026)
   Replaces ~1950 lines of inline <style> across:
     nba/predictions.html, football/predictions.html, tennis/predictions.html
   Sport accent is themed via [data-sport="nba|football|tennis"] on
   the prediction-container; defaults to NBA royal-blue.
   ───────────────────────────────────────────────────────────────── */

/* ── Per-sport accent scope ──────────────────────────────────── */
/* May-2026 restraint pass — feedback "sembra arlecchino": the
   previous palette painted home in royal blue, away in soft-white,
   draw in bright amber, goal in info-blue. Six+ hues per match card.
   New scheme: ONE primary data color (brand orange) for the leading
   side; neutral grey for the secondary; semantic green/red kept only
   for over/under + goal/no-goal (universal betting convention) but
   desaturated. Team names themselves go white — differentiation
   moves into the chip badge ("HOME" filled accent, "AWAY" outline). */
.prediction-container {
    --team-home:      var(--accent);
    --team-home-soft: var(--accent-soft);
    --team-away:      #6B7280;            /* neutral cool-grey */
    --team-away-soft: rgba(107,114,128,0.10);
    --hub-accent:     var(--accent);
    --hub-accent-soft: var(--accent-soft);
    --hub-accent-strong: var(--accent-hover);

    background: transparent;
    padding: 1.5rem 0;
}
.prediction-container[data-sport="nba"]      { /* defaults */ }
.prediction-container[data-sport="football"] { /* defaults */ }
.prediction-container[data-sport="tennis"]   { /* defaults */ }

/* ── Page H1 — used on every predictions hub ────────────────── */
/* Override Bootstrap .display-4 (3.5rem) — too dominant above the
   fold on the hub pages. Cap at 2.2rem on desktop, scale down on
   mobile. Tighter line-height so the page-title block consumes
   ~half the vertical space it did before. */
.prediction-container h1,
.prediction-container h1.display-4,
h1.prediction-hub-title {
    color: var(--text-primary);
    font-size: clamp(1.6rem, 2.6vw, 2.2rem) !important;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-align: center;
    margin-bottom: 1rem !important;
    line-height: 1.2;
}

/* ── Last-updated chip — replaces the dim "lead text-muted" line ── */
.prediction-container .lead.text-muted {
    text-align: center;
    margin: 0.25rem 0 1.5rem !important;
    font-size: 0.85rem !important;
    color: var(--text-muted) !important;
}
.prediction-container .lead.text-muted small {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.85rem;
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-pill);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: var(--fs-micro);
    letter-spacing: 0.04em;
}
.prediction-container .lead.text-muted small::before {
    content: "●";
    color: var(--positive);
    font-size: 0.55rem;
    line-height: 1;
}

/* ── Share row — tighten the gap; was 1rem+ before ─────────── */
.prediction-container .pred-share-cta {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: var(--fs-meta);
    border-top: 0;
    padding-top: 0;
    justify-content: center;
}
.prediction-container .pred-share-cta + .pred-share {
    margin-bottom: 0.5rem;
    justify-content: center;
}

/* ── Prediction CARD (one per match) ─────────────────────────── */
.prediction-card,
.seo-content-section .prediction-card {
    background: var(--surface-1);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    backdrop-filter: none;
    box-shadow: var(--shadow-1);
    transition: transform var(--t-base), border-color var(--t-base),
                box-shadow var(--t-base);
    overflow: hidden;
    height: 100%;
}
.prediction-card:hover {
    transform: translateY(-3px);
    border-color: var(--hub-accent);
    box-shadow: var(--shadow-2);
}
.prediction-card .card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    color: var(--text-primary);
}
.prediction-card .card-header {
    background: var(--surface-2);
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ── Teams / players inside a card ───────────────────────────── */
.teams-container,
.players-container {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 0.5rem;
    min-height: 90px;
    padding: 0.5rem 0;
}
.team-name,
.player-name {
    flex: 1;
    text-align: center;
    font-weight: 700;
    font-size: 1.02rem;
    color: var(--text-primary);
    line-height: 1.3;
    min-height: 2.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.25rem;
}
/* Both team names render in primary white inside prediction hubs.
   Differentiation moves to the HOME/AWAY chip (filled accent vs.
   outline grey) and the win-probability bars below — fewer hues,
   stronger hierarchy. Tennis ARTICLE pages keep their per-player
   color override (article.css [data-sport="tennis"] scope), so the
   player_one (blue) / player_two (terracotta) signal still works
   where the 1-vs-1 differentiation actually matters. */
.prediction-container .team-name,
.prediction-container .player-name {
    color: var(--text-primary);
}

.vs-badge {
    position: relative;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0 0.75rem;
    white-space: nowrap;
}
.vs-badge::before,
.vs-badge::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 18px;
    height: 1px;
    background: var(--border-strong);
}
.vs-badge::before { right: 100%; }
.vs-badge::after  { left: 100%; }

/* ── Predicted score / point-diff badges ────────────────────── */
.predicted-score {
    background: linear-gradient(135deg, var(--surface-3), var(--surface-2));
    border: 1px solid var(--border-default);
    color: var(--accent);
    font-family: var(--font-mono);
    font-weight: 700;
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-md);
    text-align: center;
    display: inline-block;
    font-size: 1.05rem;
    letter-spacing: 0.04em;
}
.point-diff {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ── Probability bars (football moneyline, over/under, goal/nogoal) ─
   Markup contract (football/predictions.html):
       .probability-row
         .probability-label
           span.team-label.text-{primary|warning|secondary|success|danger|info|dark}
         .probability-bar-container        ← contains BOTH bar + value
           .progress
             .progress-bar.bg-{primary|warning|secondary|success|danger|info|dark}
           .probability-value
   Bootstrap's .bg-* / .text-* semantic palette is the "source of truth"
   for which outcome maps to which color. We override those classes ONLY
   inside .prediction-container so the brand-orange .btn-primary etc.
   elsewhere on the page are untouched.                                  */
.probability-container {
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.9rem 1rem;
    margin-top: 0.5rem;
}
.probability-container > p {
    color: var(--text-secondary);
    font-size: var(--fs-micro);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    margin-bottom: 0.65rem !important;
}
.probability-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.45rem 0;
}
.probability-row + .probability-row { border-top: 1px solid var(--border-subtle); }
.probability-label {
    flex: 0 0 88px;
    min-width: 0;
}
.probability-label .team-label {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: -0.005em;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* Semantic colors for prediction rows. Restraint pass (May 2026):
   - home → orange (--team-home)
   - away → neutral grey (--team-away)
   - draw → muted amber (was #FFC23B neon)
   - over/under → keep green/red semantic (universal betting), muted
   - goal → green (was blue — over and goal both signal "more action")
   - no-goal → neutral grey */
.prediction-container .team-label.text-primary   { color: var(--team-home) !important; }
.prediction-container .team-label.text-warning   { color: #D9A24A !important; }
.prediction-container .team-label.text-secondary { color: var(--text-secondary) !important; }
.prediction-container .team-label.text-success   { color: var(--positive) !important; }
.prediction-container .team-label.text-danger    { color: var(--negative) !important; }
.prediction-container .team-label.text-info      { color: var(--positive) !important; }
.prediction-container .team-label.text-dark      { color: var(--text-secondary) !important; }

.probability-bar-container {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}
.prediction-container .progress {
    flex: 1;
    height: 8px;
    background-color: var(--surface-3) !important;
    border-radius: 999px;
    overflow: hidden;
}
.prediction-container .progress-bar {
    border-radius: 999px;
    transition: width var(--t-base);
}
/* Progress bars use the same restrained palette as team-labels. */
.prediction-container .progress-bar.bg-primary   { background-color: var(--team-home) !important; }
.prediction-container .progress-bar.bg-warning   { background-color: #D9A24A !important; }
.prediction-container .progress-bar.bg-secondary { background-color: var(--team-away) !important; }
.prediction-container .progress-bar.bg-success   { background-color: var(--positive) !important; }
.prediction-container .progress-bar.bg-danger    { background-color: var(--negative) !important; }
.prediction-container .progress-bar.bg-info      { background-color: var(--positive) !important; }
.prediction-container .progress-bar.bg-dark      { background-color: #6B7280 !important; }

.probability-value {
    flex: 0 0 52px;
    text-align: right;
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--text-primary) !important;
    font-size: 0.85rem;
    font-feature-settings: "tnum" 1;
    white-space: nowrap;
}

/* HOME / AWAY chips at the top of each card stay FILLED so they read
   at-a-glance as the primary side-identifier. HOME = orange filled,
   AWAY = neutral muted filled. */
.prediction-container .badge.bg-primary   { background-color: var(--team-home) !important; color: var(--surface-0) !important; }
.prediction-container .badge.bg-warning   { background-color: #D9A24A !important; color: var(--surface-0) !important; }
.prediction-container .badge.bg-secondary { background-color: var(--team-away) !important; color: var(--text-primary) !important; }
.prediction-container .badge.bg-success   { background-color: var(--positive) !important; color: var(--surface-0) !important; }
.prediction-container .badge.bg-danger    { background-color: var(--negative) !important; color: var(--text-primary) !important; }
.prediction-container .badge.bg-info      { background-color: var(--positive) !important; color: var(--surface-0) !important; }
.prediction-container .badge.bg-dark      { background-color: #6B7280 !important; color: var(--text-primary) !important; }

/* "Predicted Result" chip row at the bottom of football cards (Home /
   Over 2.5 / Goal) — previously a colored-chip soup competing with the
   bars above. Make them outline-only so they're quieter and the visual
   weight goes to the data bars, not the summary line. */
.prediction-container .predicted-results-container { display: inline-flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center; }
.prediction-container .predicted-results-container .badge {
    background: transparent !important;
    border: 1px solid var(--border-strong);
    padding: 0.3rem 0.65rem !important;
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.02em;
}
.prediction-container .predicted-results-container .badge.bg-primary   { color: var(--team-home) !important;        border-color: color-mix(in srgb, var(--team-home) 40%, transparent); }
.prediction-container .predicted-results-container .badge.bg-warning   { color: #D9A24A !important;                  border-color: rgba(217,162,74,0.40); }
.prediction-container .predicted-results-container .badge.bg-secondary { color: var(--text-secondary) !important;    border-color: var(--border-strong); }
.prediction-container .predicted-results-container .badge.bg-success,
.prediction-container .predicted-results-container .badge.bg-info      { color: var(--positive) !important;          border-color: color-mix(in srgb, var(--positive) 35%, transparent); }
.prediction-container .predicted-results-container .badge.bg-danger    { color: var(--negative) !important;          border-color: color-mix(in srgb, var(--negative) 35%, transparent); }
.prediction-container .predicted-results-container .badge.bg-dark      { color: var(--text-muted) !important;        border-color: var(--border-strong); }

/* ── Moneyline / result badges (football) ────────────────────── */
.moneyline-container {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0.5rem 0;
}
.moneyline-badge {
    background: var(--surface-3);
    border: 1px solid var(--border-default);
    color: var(--text-secondary);
    border-radius: var(--radius-pill);
    padding: 0.35rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ── AI predictions strip (NBA + Tennis) ─────────────────────── */
.ai-predictions-strip {
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    margin-top: 0.5rem;
}
.ai-predictions-title {
    color: var(--text-muted);
    font-size: var(--fs-micro);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    margin-bottom: 0.6rem;
    text-align: center;
}
.ai-predictions-divider {
    height: 1px;
    background: var(--border-subtle);
    border: 0;
    margin: 0.5rem 0;
}
.ai-stats-rows,
.ai-stats-row,
.ai-stat-row {
    display: flex;
    gap: 0.75rem;
    justify-content: space-around;
    align-items: center;
}
.ai-stat,
.ai-stat-row > div {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    text-align: center;
}
.ai-stat-icon {
    color: var(--accent);
    font-size: 0.95rem;
    line-height: 1;
}
.ai-stat-text,
.ai-stat-value {
    font-family: var(--font-mono);
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.95rem;
}
.ai-stat-label {
    color: var(--text-muted);
    font-size: var(--fs-micro);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.ai-extra-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.4rem 0;
    font-size: 0.88rem;
    border-top: 1px solid var(--border-subtle);
}
.ai-extra-row:first-child { border-top: 0; }
.ai-extra-label { color: var(--text-secondary); }
.ai-extra-value {
    font-family: var(--font-mono);
    color: var(--text-primary);
    font-weight: 700;
}
.ai-extra-prob {
    font-family: var(--font-mono);
    color: var(--hub-accent);
    font-weight: 700;
    margin-left: 0.35rem;
}

/* ── Match-analysis CTA + share-CTA strip ────────────────────── */
.btn-outline-primary {
    background: transparent;
    color: var(--hub-accent);
    border: 1.5px solid var(--hub-accent);
    border-radius: var(--radius-md);
    font-weight: 600;
    padding: 0.5rem 1rem;
    transition: background-color var(--t-base), color var(--t-base),
                transform var(--t-base);
}
.btn-outline-primary:hover {
    background: var(--hub-accent);
    color: var(--accent-on);
    transform: translateY(-1px);
}

.pred-share-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-subtle);
}
.pred-share {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted);
    font-size: var(--fs-micro);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}
.pred-share__btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--surface-3);
    border: 1px solid var(--border-default);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--t-quick), color var(--t-quick),
                transform var(--t-quick);
    font-size: 0.85rem;
}
.pred-share__btn:hover {
    background: var(--hub-accent);
    color: var(--accent-on);
    transform: translateY(-1px);
    border-color: var(--hub-accent);
}
/* Meet the 44px minimum tap target on touch devices */
@media (max-width: 768px) {
    .pred-share__btn {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }
}

/* ── SEO content section (the "below the cards" zone) ────────── */
.seo-content-section {
    margin-top: 3rem;
}
.seo-content-section h2 {
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.015em;
    margin-bottom: 1.25rem;
}
.seo-content-section .card,
.seo-content-section > .card {
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    transition: transform var(--t-base), border-color var(--t-base);
}
.seo-content-section .card:hover {
    transform: translateY(-2px);
    border-color: var(--border-default);
}
.seo-content-section .card .card-body { color: var(--text-secondary); }
.seo-content-section .card h3,
.seo-content-section .card h4,
.seo-content-section .card h5 {
    color: var(--text-primary);
}
.seo-content-section .text-muted { color: var(--text-muted) !important; }

/* "What's Inside Each Match Analysis" feature items */
.feature-item {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-subtle);
}
.feature-item:last-child { border-bottom: 0; }
.feature-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    border: 1px solid var(--accent-soft-strong);
    border-radius: var(--radius-md);
    color: var(--accent);
    font-size: 1.1rem;
}

/* Prediction type badges (gradient chips listing what we predict) */
.prediction-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--surface-2);
    border: 1px solid var(--border-default);
    color: var(--text-secondary);
    padding: 0.5rem 0.95rem;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0.25rem;
    transition: background-color var(--t-quick), color var(--t-quick),
                border-color var(--t-quick);
}
.prediction-type-badge:hover {
    background: var(--surface-3);
    color: var(--text-primary);
    border-color: var(--hub-accent);
}
.prediction-type-badge i { color: var(--hub-accent); }

/* ── KPI badges (historical stats) ───────────────────────────── */
.kpi-badge {
    background: linear-gradient(135deg, var(--surface-2), var(--surface-1));
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 1.1rem 0.85rem;
    text-align: center;
    transition: transform var(--t-base), border-color var(--t-base);
}
.kpi-badge:hover {
    transform: translateY(-2px);
    border-color: var(--hub-accent);
}
.kpi-value {
    font-family: var(--font-mono);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--hub-accent);
    line-height: 1.1;
    margin-bottom: 0.2rem;
    font-feature-settings: "tnum" 1;
}
.kpi-label {
    color: var(--text-muted);
    font-size: var(--fs-micro);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

/* ── Chart containers ────────────────────────────────────────── */
/* Sizing strategy matches the original light-mode CSS (now archived
   in git): cap the CANVAS height via `max-height`, NOT the container.
   With Chart.js `maintainAspectRatio: true` the canvas attributes are
   sized to the container's width × default aspect-ratio; CSS then
   scales the displayed canvas down to <=300px. Putting the cap on the
   container with overflow:hidden silently truncates the bottom of the
   chart (was the May-25 regression). */
.chart-container {
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem 1.25rem;
    margin-bottom: 1rem;
    position: relative;
    width: 100%;
}
.chart-container canvas {
    background: transparent;
    max-height: 300px;
    width: 100% !important;
}
.chart-container-timeline {
    min-height: 280px;
}
.chart-container-timeline canvas {
    max-height: 320px;
}

/* ── Telegram + Download CTA bands (was bright blue / orange) ─ */
.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;
}
.bg-gradient-telegram h3, .bg-gradient-telegram h4,
.bg-gradient-telegram strong { color: var(--text-primary) !important; }
.bg-gradient-telegram p { color: var(--text-secondary) !important; }
.bg-gradient-telegram .btn,
.bg-gradient-telegram .btn-light {
    background: #229ED9 !important;
    color: #ffffff !important;
    border: 0 !important;
    border-radius: var(--radius-md);
    font-weight: 600;
    padding: 0.55rem 1.15rem;
    transition: background-color var(--t-base), transform var(--t-base),
                box-shadow var(--t-base);
}
.bg-gradient-telegram .btn:hover {
    background: #0088cc !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 136, 204, 0.30);
}

.bg-gradient-download {
    background:
        radial-gradient(ellipse at 0% 50%, var(--accent-soft-strong) 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 var(--accent);
    border-radius: var(--radius-lg);
    color: var(--text-primary) !important;
    padding: 1.5rem 1.75rem;
}
.bg-gradient-download h3, .bg-gradient-download h4,
.bg-gradient-download strong { color: var(--text-primary) !important; }
.bg-gradient-download p { color: var(--text-secondary) !important; }
.bg-gradient-download .btn,
.bg-gradient-download .btn-light {
    background: var(--accent) !important;
    color: var(--accent-on) !important;
    border: 0 !important;
    border-radius: var(--radius-md);
    font-weight: 600;
    padding: 0.55rem 1.15rem;
}
.bg-gradient-download .btn:hover {
    background: var(--accent-hover) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-pop);
}

/* ── Match-analysis promo / power-rankings promo ─────────────── */
.match-analysis-promo,
.power-rankings-promo,
.player-projections-promo {
    background: var(--surface-1);
    border: 1px solid var(--border-default);
    border-left: 3px solid var(--hub-accent);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.4rem;
    margin: 1rem 0;
    transition: border-left-color var(--t-base), background-color var(--t-base);
}
.match-analysis-promo:hover,
.power-rankings-promo:hover,
.player-projections-promo:hover {
    background: var(--surface-2);
}
.pr-icon-wrap,
.pp-icon-wrap {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    border: 1px solid var(--accent-soft-strong);
    border-radius: var(--radius-md);
    color: var(--accent);
    font-size: 1.4rem;
}
.pp-icon-wrap { /* cyan flavor for player projections */
    background: var(--sport-nba-soft);
    border-color: rgba(91,179,255,0.35);
    color: var(--sport-nba);
}

/* ── Accordion (FAQ) ─────────────────────────────────────────── */
.accordion {
    --bs-accordion-bg: var(--surface-1);
    --bs-accordion-color: var(--text-primary);
    --bs-accordion-border-color: var(--border-subtle);
    --bs-accordion-active-bg: var(--surface-2);
    --bs-accordion-active-color: var(--accent);
    --bs-accordion-btn-color: var(--text-primary);
    --bs-accordion-btn-bg: var(--surface-1);
    --bs-accordion-btn-focus-border-color: var(--accent);
    --bs-accordion-btn-focus-box-shadow: 0 0 0 3px var(--accent-soft);
}
.accordion-item {
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md) !important;
    margin-bottom: 0.5rem;
    overflow: hidden;
}
.accordion-item:not(:first-of-type) { border-top: 1px solid var(--border-subtle); }
.accordion-button {
    background: var(--surface-1);
    color: var(--text-primary);
    font-weight: 600;
    padding: 1rem 1.2rem;
    border: 0;
    box-shadow: none;
}
.accordion-button:not(.collapsed) {
    background: var(--surface-2);
    color: var(--accent);
    box-shadow: inset 0 -1px 0 var(--border-subtle);
}
.accordion-button:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.accordion-button::after {
    filter: invert(60%) sepia(50%) saturate(800%) hue-rotate(360deg) brightness(110%);
}
.accordion-body {
    background: var(--surface-1);
    color: var(--text-secondary);
    padding: 1rem 1.2rem 1.25rem;
    line-height: 1.65;
}

/* ── Bootstrap tab pills (used on hub for date / model toggles) ─ */
.nav-pills .nav-link {
    background: var(--surface-2);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-weight: 600;
    padding: 0.45rem 0.9rem;
    margin-right: 0.4rem;
    transition: background-color var(--t-quick), color var(--t-quick),
                border-color var(--t-quick);
}
.nav-pills .nav-link:hover {
    background: var(--surface-3);
    color: var(--text-primary);
    border-color: var(--border-default);
}
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    background: var(--accent);
    color: var(--accent-on);
    border-color: var(--accent);
}

/* ── Tennis-specific overrides ───────────────────────────────── */
.tournament-info {
    color: var(--text-muted);
    font-size: var(--fs-micro);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    margin-bottom: 0.3rem;
    text-align: center;
}
.tournament-type-badge {
    color: var(--accent);
    font-weight: 700;
    font-size: var(--fs-micro);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: var(--accent-soft);
    border: 1px solid var(--accent-soft-strong);
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-sm);
    display: inline-block;
}
.location-info {
    text-align: center;
    margin: 0.4rem 0 0.6rem;
}
.location-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--surface-3);
    color: var(--text-secondary);
    padding: 0.25rem 0.7rem;
    border-radius: var(--radius-pill);
    font-size: var(--fs-micro);
    border: 1px solid var(--border-subtle);
}
.kpi-group {
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}
.kpi-group-title {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.05rem;
    padding-bottom: 0.65rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--hub-accent);
    letter-spacing: -0.005em;
}
.tournament-list {
    list-style: none;
    padding-left: 0;
    color: var(--text-secondary);
}
.tournament-list li {
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border-subtle);
}
.tournament-list li:last-child { border-bottom: 0; }

/* ── Football-specific team-pill grid ────────────────────────── */
.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin: 1rem 0;
}
.team-pill {
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-pill);
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background-color var(--t-quick), color var(--t-quick);
}
.team-pill:hover {
    background: var(--surface-3);
    color: var(--text-primary);
    border-color: var(--border-default);
}
@media (max-width: 768px) {
    .team-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Off-season message ─────────────────────────────────────── */
.off-season-message,
.off-season-banner {
    background: var(--surface-1);
    border: 1px solid var(--border-default);
    border-left: 4px solid var(--warning);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    color: var(--text-secondary);
    margin: 1rem 0 2rem;
}
.off-season-message h2, .off-season-message h3,
.off-season-banner h2, .off-season-banner h3 { color: var(--text-primary); }

/* ── Mobile refinements ──────────────────────────────────────── */
@media (max-width: 768px) {
    .prediction-card .card-body { padding: 1rem; gap: 0.7rem; }
    /* Vertical rhythm comes from the flex gap alone on mobile — the
       template's mb-3/mt-3 utilities would otherwise STACK on top of
       the gap (~1.7rem between every block), making each match card
       span 1.5+ viewports. Direct children only, so spacing inside
       the probability/AI boxes is untouched. */
    .prediction-details { gap: 0.7rem; }
    .prediction-card .card-body > .mb-3,
    .prediction-card .card-body > .mt-3,
    .prediction-card .prediction-details > .mb-3,
    .prediction-card .prediction-details > .mt-3 { margin-top: 0 !important; margin-bottom: 0 !important; }
    .teams-container, .players-container { min-height: 0; padding: 0.25rem 0; }
    .location-info { margin: 0; }
    .probability-container, .ai-predictions-strip { margin-top: 0; }
    .probability-container { padding: 0.75rem 0.85rem; }
    .ai-predictions-strip { padding: 0.7rem 0.85rem; }
    .team-name, .player-name { font-size: 0.95rem; min-height: 2.4rem; }
    .predicted-score { font-size: 0.95rem; padding: 0.4rem 0.7rem; }
    .ai-stats-rows, .ai-stat-row { gap: 0.5rem; }
    .ai-stat-text, .ai-stat-value { font-size: 0.85rem; }
    .ai-stat-label { font-size: 0.7rem; }
    .kpi-value { font-size: 1.3rem; }
    .feature-item { padding: 0.6rem 0; }
    .feature-icon { width: 36px; height: 36px; font-size: 1rem; }
    .bg-gradient-telegram, .bg-gradient-download { padding: 1.25rem; }
    .accordion-button { padding: 0.85rem 1rem; font-size: 0.95rem; }
    .accordion-body { padding: 0.85rem 1rem 1rem; font-size: 0.92rem; }
    .nav-pills .nav-link { font-size: 0.85rem; padding: 0.35rem 0.7rem; }
}

@media (max-width: 480px) {
    .probability-row { grid-template-columns: 70px 1fr 50px; gap: 0.45rem; }
    .probability-label { font-size: 0.8rem; }
    .probability-value { font-size: 0.82rem; }
    .vs-badge { font-size: 0.7rem; padding: 0 0.45rem; }
    .vs-badge::before, .vs-badge::after { width: 12px; }
}

/* ─────────── Tennis AI tools strip (simulations + explainability) ───────────
   Two chips under the page header: one links to the Monte Carlo tournament
   simulations, one announces the explained-predictions layer inside each
   match analysis. Mobile: chips stack full-width. */
.tennis-feature-strip,
.nba-feature-strip {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}
.feature-chip {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1 1 340px;
    max-width: 460px;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-default);
    border-radius: 10px;
    background: var(--surface-2, rgba(255, 255, 255, 0.03));
    color: var(--text-primary);
    text-decoration: none;
}
a.feature-chip:hover {
    border-color: var(--sport-tennis, #e07a5f);
    color: var(--text-primary);
    text-decoration: none;
}
.feature-chip-icon { font-size: 1.25rem; color: var(--sport-tennis, #e07a5f); flex: 0 0 auto; }
.feature-chip-text { display: flex; flex-direction: column; min-width: 0; }
.feature-chip-text strong { font-size: 0.95rem; }
.feature-chip-sub { font-size: 0.8rem; color: var(--text-muted); }
.feature-chip-arrow { margin-left: auto; color: var(--text-muted); flex: 0 0 auto; }
@media (max-width: 575px) {
    .feature-chip { flex-basis: 100%; }
}
