/* ─────────────────────────────────────────────────────────────
   soz-terminal.css — the betting pages' skin.

   Takes the SOZ card from the homepage (css/homepage/league.css
   .soz-terminal) and stretches it over a whole page: green-black
   ground under graph paper, lime tape, condensed italic display
   type, hairline market rows.

   Loaded AFTER each page's inline <style>, so the token block and
   the component rules below win on source order.
   ───────────────────────────────────────────────────────────── */

:root {
    /* Ground */
    --bg: #070d0c;
    --bg-surface: #0f1a17;
    --bg-row-hover: rgba(186, 255, 85, 0.045);

    /* Tape */
    --green: #c4ff64;
    --green-dim: #8fd94a;
    --green-muted: rgba(186, 255, 85, 0.10);
    --red: #ff6f5f;
    --red-dim: #cf5a4f;
    --red-muted: rgba(255, 111, 95, 0.11);
    --gold: #ffd76b;
    --silver: #c3d2cb;
    --bronze: #cf8b4a;

    --text-primary: #e2eddf;
    --text-secondary: #9fb7ac;
    --text-tertiary: #6d8278;
    --border: rgba(133, 190, 122, 0.14);
    --border-green: rgba(186, 255, 85, 0.30);

    --display: 'Barlow Condensed', Impact, 'Arial Narrow', sans-serif;

    /* Panel recipe, straight off the card */
    --soz-panel: linear-gradient(155deg, #152523ee, #080f16f5 75%);
    --soz-panel-border: 1px solid rgba(120, 175, 110, 0.22);
    --soz-panel-shadow: 0 18px 40px rgba(0, 0, 0, 0.45), inset 0 1px rgba(213, 255, 163, 0.14);
}

body {
    background: #070d0c;
    color: var(--text-primary);
}

/* Graph paper + a lime bloom up top, faded out down the page. */
.bg-ambient {
    background:
        radial-gradient(900px 520px at 18% -4%, rgba(186, 255, 85, 0.07), transparent 62%),
        radial-gradient(760px 520px at 88% 8%, rgba(35, 191, 180, 0.05), transparent 60%),
        linear-gradient(rgba(150, 205, 130, 0.055) 1px, transparent 1px) 0 0 / 38px 38px,
        linear-gradient(90deg, rgba(150, 205, 130, 0.055) 1px, transparent 1px) 0 0 / 38px 38px;
    -webkit-mask-image: linear-gradient(#000 0%, #000 42%, rgba(0, 0, 0, 0.25) 78%, transparent 100%);
    mask-image: linear-gradient(#000 0%, #000 42%, rgba(0, 0, 0, 0.25) 78%, transparent 100%);
}

/* The CRT scanline was fighting the grid — keep it, barely. */
body::after {
    background: repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(0, 0, 0, 0.022) 3px, rgba(0, 0, 0, 0.022) 5px);
}

/* ── Panels ───────────────────────────────────────────────── */
.bars-wrap,
.chart-section,
.standings-table-wrap,
.hero-card,
.bet-history-section,
.insights-row {
    background: var(--soz-panel);
    border: var(--soz-panel-border);
    border-radius: 10px;
    box-shadow: var(--soz-panel-shadow);
}

.insights-row { gap: 1px; overflow: hidden; }
.insight-card { background: transparent; }
.insight-card + .insight-card { box-shadow: -1px 0 0 var(--border); }
.insight-card:hover { background: var(--bg-row-hover); }

.hero-card::before {
    background: linear-gradient(90deg, transparent, var(--green), transparent);
    opacity: 0.45;
}

/* ── Section + panel headers ──────────────────────────────── */
.bars-header,
.bet-history-header {
    background: rgba(177, 237, 112, 0.05);
    border-bottom: 1px solid rgba(82, 119, 108, 0.35);
}
.bars-header h2,
.section-header h2,
.chart-section h2 {
    font-size: 0.58rem;
    letter-spacing: 0.22em;
    color: #b9d4bb;
}
.bars-header img,
.section-header img { opacity: 0.55; }

/* ── The old text page header is replaced by <soz-hero> ───── */
.page-header { display: none; }

/* ── Pills: seasons, views ────────────────────────────────── */
.season-btn,
.view-tab {
    border-radius: 999px;
    border-color: transparent;
    font-family: var(--mono);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.62rem;
}
.season-btn:hover,
.view-tab:hover {
    color: var(--text-primary);
    border-color: rgba(133, 190, 122, 0.25);
    background: rgba(186, 255, 85, 0.04);
}
.season-btn.active,
.view-tab.active {
    color: #0b1408;
    background: linear-gradient(180deg, #d3ff7c, #a6ee4e);
    border-color: #baff55;
    font-weight: 800;
    box-shadow: 0 0 18px rgba(186, 255, 85, 0.22);
}

/* Slotted into the hero rail: pills sit tight against the tape. */
soz-hero .season-picker,
soz-hero .view-tabs { margin: 0; }

.page-header-links a,
.hero-profile-link {
    font-family: var(--mono);
    letter-spacing: 0.12em;
    color: var(--green-dim);
    border-radius: 999px;
}
.page-header-links a:hover { color: #0b1408; background: var(--green); border-color: var(--green); }

/* ── Ticker strip ─────────────────────────────────────────── */
.ticker-strip {
    background: linear-gradient(180deg, #101d19, #0a1210);
    border-bottom: 1px solid rgba(82, 119, 108, 0.4);
    box-shadow: inset 0 1px rgba(213, 255, 163, 0.08);
}
.ticker-label { letter-spacing: 0.18em; color: #7f9a8e; }
.ticker-value { color: var(--green); text-shadow: 0 0 14px rgba(186, 255, 85, 0.3); }
.ticker-separator { background: rgba(186, 255, 85, 0.35); }

/* ── Team bars: market rows with a lime fill ──────────────── */
.bar-row { padding-block: 7px; }
.bar-row + .bar-row,
.bar-drilldown + .bar-row { box-shadow: inset 0 1px 0 rgba(82, 119, 108, 0.18); }
.bar-row.expanded { background: rgba(186, 255, 85, 0.05); }

.bar-team { width: 164px; gap: 10px; }
.bar-team-name {
    min-width: 0;
    line-height: 1.15;
    font-family: var(--sans);
    font-weight: 800;
    letter-spacing: 0.06em;
    font-size: 0.74rem;
    color: #dde8e6;
}
.bar-team-sub {
    display: block;
    margin-top: 2px;
    font-family: var(--sans);
    font-size: 0.55rem;
    font-weight: 500;
    letter-spacing: 0;
    color: #8ba496;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bar-team-icon {
    background: none;
    border-radius: 0;
    padding: 0;
    width: 30px;
    height: 30px;
}
.bar-team-icon-ph {
    background: rgba(186, 255, 85, 0.07);
    color: var(--green-dim);
    border-radius: 6px;
}

.bar-track {
    background: rgba(255, 255, 255, 0.025);
    border-radius: 3px;
    height: 24px;
    box-shadow: inset 0 0 0 1px rgba(133, 190, 122, 0.08);
}
/* Same teal → lime ramp the tape line uses, capped with a bright tick. */
.bar-fill.positive {
    background: linear-gradient(90deg, rgba(35, 191, 180, 0.45), #a5ff62);
    border-right: 2px solid #eaffb8;
    box-shadow: 0 0 20px rgba(186, 255, 85, 0.22);
}
.bar-fill.negative {
    background: linear-gradient(90deg, rgba(255, 111, 95, 0.28), #ff6f5f);
    border-right: 2px solid #ffd2cb;
    box-shadow: 0 0 20px rgba(255, 111, 95, 0.16);
}

/* Profit reads like a price: mono, tight, big. */
.bar-value {
    font-size: 0.95rem;
    font-weight: 750;
    letter-spacing: -0.05em;
}
.bar-value.positive { color: var(--green); text-shadow: 0 0 13px rgba(186, 255, 85, 0.25); }
.bar-value.negative { color: var(--red); }
.bar-meta { color: #79908a; letter-spacing: 0.04em; }
.bar-row.expanded .bar-expand-arrow { color: var(--green); }

.bar-rank { font-family: var(--display); font-size: 1rem; font-weight: 700; font-style: italic; }
.bar-rank.rank-rest { color: #5f736a; }

/* ── Drill-down + tables ──────────────────────────────────── */
.bar-drilldown { background: rgba(8, 15, 13, 0.55); border-bottom-color: rgba(82, 119, 108, 0.25); }
.dd-table th,
.standings-table th {
    color: #8ba9a3;
    letter-spacing: 0.16em;
    border-bottom-color: rgba(82, 119, 108, 0.4);
}
.standings-table th { border-bottom: 1px solid rgba(186, 255, 85, 0.35); }
.dd-table td { border-bottom-color: rgba(82, 119, 108, 0.16); }
.standings-table td { border-bottom-color: rgba(82, 119, 108, 0.16); }
.standings-table tbody tr:hover,
.dd-table tbody tr:hover { background: var(--bg-row-hover); }
.standings-table tbody tr.is-you,
.standings-table tbody tr.is-focus {
    background: rgba(186, 255, 85, 0.06) !important;
    border-left-color: var(--green);
}
.standings-table tbody tr.is-you:hover,
.standings-table tbody tr.is-focus:hover { background: rgba(186, 255, 85, 0.1) !important; }
.you-badge { color: #0b1408; background: var(--green); border-color: var(--green); }

.player-avatar,
.player-avatar-initials,
.hero-avatar,
.hero-avatar-initials,
.spot-avatar,
.spot-avatar-initials { border-color: rgba(133, 190, 122, 0.3); }
.player-avatar-initials,
.hero-avatar-initials,
.spot-avatar-initials { background: rgba(186, 255, 85, 0.08); color: var(--green-dim); }

.profit-positive { color: var(--green) !important; }
.profit-negative { color: var(--red) !important; }
.win-pct-good { color: var(--green-dim); }
.win-pct-bad { color: var(--red-dim); }
.mvp-badge { background: rgba(255, 215, 107, 0.12); border-color: rgba(255, 215, 107, 0.3); color: var(--gold); }

/* ── Big numbers: condensed italic, like the wordmark ─────── */
.hero-stat-value,
.insight-value {
    font-family: var(--display);
    font-size: 2.1rem;
    font-weight: 800;
    font-style: italic;
    letter-spacing: -0.01em;
}
.hero-stat-value img,
.insight-value img { width: 18px; height: 18px; }
.hero-stat-label,
.insight-label,
.spot-title,
.hero-greeting { letter-spacing: 0.2em; color: #7f9a8e; }
.hero-stat { background: rgba(255, 255, 255, 0.018); border-radius: 6px; }
.val-green { color: var(--green); text-shadow: 0 0 16px rgba(186, 255, 85, 0.25); }
.val-red { color: var(--red); }
.hero-name { font-family: var(--display); font-size: 1.8rem; font-style: italic; letter-spacing: 0.01em; }

/* Section title above the league stats (inline-styled in the page). */
#league-stats-title {
    font-family: var(--display) !important;
    font-size: 1.65rem !important;
    font-style: italic;
    letter-spacing: 0.02em !important;
    color: #f2fbec !important;
}
.hero-login-cta a,
.bet-history-item .bet-matchup-inline .picked-team { color: var(--green); }

.spotlight-card { border-bottom-color: var(--border); }
.spotlight-card:nth-child(odd) { border-right-color: var(--border); }
.spot-name { font-size: 0.86rem; }

/* ── Chart panel ──────────────────────────────────────────── */
.chart-section { padding: 18px; }

/* ── Footer ───────────────────────────────────────────────── */
footer { border-top-color: rgba(82, 119, 108, 0.3); }

@media (max-width: 700px) {
    .hero-stat-value,
    .insight-value { font-size: 1.65rem; }
    .bar-value { font-size: 0.78rem; }
    .bar-team-sub { display: none; }
    .bar-team { width: 74px; gap: 7px; }
    .bar-team-name { font-size: 0.64rem; }
    .bar-team-icon { width: 24px; height: 24px; }
}

/* The acronym stays even on the narrowest phones — the crest alone isn't a label. */
@media (max-width: 430px) {
    .bar-team { width: 64px; gap: 6px; }
    .bar-team-name { display: block; font-size: 0.58rem; }
}

/* Once the league stats stack to one column they're a column of short numbers
   against a lot of empty right edge — center them, and turn the divider that
   separates the columns into the hairline between stacked rows. */
@media (max-width: 400px) {
    .insights-row { gap: 0; }
    .insight-card { text-align: center; padding: 18px 14px; }
    .insight-card + .insight-card { box-shadow: 0 -1px 0 var(--border); }
    #league-stats-title,
    #league-stats-title + p { text-align: center; }
}
