:root {
    --bg-black: #050807;
    --glass: rgba(14, 20, 18, 0.74);
    --glass-soft: rgba(24, 31, 28, 0.62);
    --glass-strong: rgba(11, 16, 14, 0.90);

    --border: rgba(255,255,255,0.09);
    --border-bright: rgba(255,255,255,0.16);

    --text: #f4f7f5;
    --muted: #98a49f;
    --muted-2: #66716c;

    --green: #53e27c;
    --green-soft: rgba(83,226,124,0.12);
    --green-glow: rgba(83,226,124,0.24);

    --red: #ff6159;
    --red-soft: rgba(255,97,89,0.12);

    --amber: #ffb94a;
    --amber-soft: rgba(255,185,74,0.12);

    --blue: #69a7ff;

    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 10px;

    --shadow:
        0 24px 80px rgba(0,0,0,.36);

    --mono:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        Menlo,
        monospace;

    --ui:
        -apple-system,
        BlinkMacSystemFont,
        "SF Pro Display",
        "SF Pro Text",
        "Helvetica Neue",
        Arial,
        sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

[hidden] {
    display: none !important;
}

/* ============================================================
   WEEKLY PLAYS LANDING
   ============================================================ */

.plays-shell {
    width: min(920px, calc(100% - 36px));
    margin: 0 auto;
    padding: clamp(42px, 8vw, 82px) 0 40px;
}

.plays-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 34px;
}

.plays-live {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--green);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .14em;
}

.plays-live span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 14px var(--green-glow);
}

.plays-heading h1 {
    margin: 13px 0 5px;
    font-size: clamp(52px, 9vw, 88px);
    line-height: .9;
    letter-spacing: -.055em;
}

.plays-heading p,
.plays-season {
    color: var(--muted);
    font-size: 12px;
}

.plays-season {
    padding-bottom: 5px;
    font-weight: 750;
    letter-spacing: .1em;
}

.plays-panel {
    padding: clamp(20px, 4vw, 34px);
    border: 1px solid rgba(105, 167, 255, .22);
    border-radius: 26px;
    background: rgba(4, 10, 18, .83);
    box-shadow: 0 28px 90px rgba(0, 0, 0, .4);
    backdrop-filter: blur(24px);
}

.plays-panel-title,
.play-card-top,
.advanced-launch {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.plays-panel-title {
    margin-bottom: 18px;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: .08em;
}

.plays-panel-title small {
    color: var(--muted-2);
    font-size: 9px;
    letter-spacing: .12em;
}

.plays-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.play-card {
    min-height: 250px;
    display: flex;
    flex-direction: column;
    padding: 24px;
    border: 1px solid rgba(105, 167, 255, .38);
    border-radius: 21px;
    background: linear-gradient(145deg, rgba(18, 31, 49, .95), rgba(7, 15, 27, .96));
}

.play-card-type {
    color: #55d9ff;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .1em;
}

.play-card-signal {
    padding: 7px 10px;
    border: 1px solid rgba(83, 226, 124, .42);
    border-radius: 999px;
    background: var(--green-soft);
    color: var(--green);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .08em;
}

.play-card-matchup {
    margin-top: 30px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .05em;
}

.play-card-main {
    margin: 10px 0 22px;
    font-size: clamp(34px, 6vw, 58px);
    font-weight: 900;
    line-height: .95;
    letter-spacing: -.045em;
}

.play-card-meta {
    margin-top: auto;
    padding-top: 17px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.play-card-pass,
.play-card-not-ready {
    border-color: rgba(255, 255, 255, .12);
    background: rgba(12, 19, 29, .78);
}

.play-card-pass .play-card-signal {
    border-color: rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .05);
    color: var(--muted);
}

.play-card-not-ready .play-card-signal {
    border-color: rgba(255, 185, 74, .35);
    background: var(--amber-soft);
    color: var(--amber);
}

.play-card-not-ready .play-card-main {
    font-size: clamp(27px, 4.5vw, 43px);
}

.plays-explanation {
    margin-top: 18px;
    padding: 18px 20px;
    border: 1px solid rgba(85, 217, 255, .22);
    border-radius: 16px;
    background: rgba(85, 217, 255, .055);
}

.plays-explanation-label {
    color: #55d9ff;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .13em;
}

.plays-explanation p {
    margin: 9px 0 0;
    color: #d5dbe5;
    font-size: 13px;
    line-height: 1.6;
}

.plays-disclaimer {
    margin: 20px 0;
    color: var(--muted);
    font-size: 11px;
    text-align: center;
}

.advanced-launch {
    width: 100%;
    padding: 17px 20px;
    border: 1px solid rgba(85, 217, 255, .64);
    border-radius: 14px;
    background: linear-gradient(135deg, #078fd5, #1463ba);
    color: white;
    font: inherit;
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .08em;
    cursor: pointer;
}

.plays-mobile-nav {
    display: none;
}

.pbp-fallback-note {
    margin: 0 0 14px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 185, 74, .24);
    border-radius: 10px;
    background: rgba(255, 185, 74, .08);
    color: var(--amber);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .05em;
}

@media (max-width: 720px) {
    body.plays-active .main-tabs {
        display: none;
    }

    .plays-shell {
        width: min(100% - 24px, 520px);
        padding: 36px 0 92px;
    }

    .plays-heading {
        display: block;
        margin-bottom: 25px;
    }

    .plays-heading h1 {
        font-size: clamp(48px, 17vw, 72px);
    }

    .plays-season {
        margin-top: 16px;
    }

    .plays-panel {
        padding: 16px;
        border-radius: 20px;
    }

    .plays-panel-title small {
        display: none;
    }

    .plays-grid {
        grid-template-columns: 1fr;
    }

    .play-card {
        min-height: 224px;
        padding: 21px;
    }

    .plays-mobile-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 45;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        padding: 9px max(8px, env(safe-area-inset-left)) calc(9px + env(safe-area-inset-bottom));
        border-top: 1px solid rgba(255, 255, 255, .1);
        background: rgba(3, 8, 15, .96);
        backdrop-filter: blur(20px);
    }

    .plays-mobile-nav button {
        min-height: 42px;
        border: 0;
        background: transparent;
        color: var(--muted);
        font: inherit;
        font-size: 11px;
    }

    .plays-mobile-nav button.active {
        color: #55d9ff;
        font-weight: 800;
    }
}

body {
    font-family: var(--ui);
    color: var(--text);
    background: var(--bg-black);
    -webkit-font-smoothing: antialiased;
}


/* ============================================================
   STADIUM ENVIRONMENT
   ============================================================ */

.field-environment {
    position: fixed;
    inset: 0;
    z-index: -3;

    background:
        radial-gradient(
            ellipse at 50% 14%,
            rgba(68, 130, 84, .20) 0%,
            rgba(8, 18, 12, .38) 34%,
            rgba(3, 7, 5, .88) 78%
        ),
        linear-gradient(
            180deg,
            rgba(5, 13, 9, .26),
            rgba(3, 7, 5, .84)
        ),
        url("/static/img/stadium-bg.jpg")
        center center / cover no-repeat;

    transform: scale(1.02);
}

.field-environment::after {
    content: "";
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            180deg,
            rgba(0,0,0,.10),
            rgba(0,0,0,.36) 42%,
            rgba(0,0,0,.70)
        );

    pointer-events: none;
}

.stadium-haze {
    position: absolute;
    inset: 0;
    z-index: 1;

    background:
        radial-gradient(
            circle at 10% 8%,
            rgba(255,255,255,.30),
            rgba(255,255,255,.10) 8%,
            transparent 19%
        ),
        radial-gradient(
            circle at 90% 8%,
            rgba(255,255,255,.28),
            rgba(255,255,255,.09) 8%,
            transparent 19%
        ),
        radial-gradient(
            ellipse at 50% 28%,
            rgba(83,226,124,.10),
            transparent 44%
        );

    filter: blur(20px);
    opacity: .72;
}

.field-lines {
    position: absolute;
    z-index: 2;

    left: 0;
    right: 0;
    bottom: -8vh;

    height: 62vh;

    opacity: .18;

    background:
        repeating-linear-gradient(
            90deg,
            transparent 0,
            transparent calc(10% - 1px),
            rgba(255,255,255,.13) calc(10% - 1px),
            rgba(255,255,255,.13) 10%
        ),
        repeating-linear-gradient(
            0deg,
            transparent 0,
            transparent 44px,
            rgba(255,255,255,.08) 44px,
            rgba(255,255,255,.08) 46px
        );

    transform:
        perspective(600px)
        rotateX(55deg)
        scale(1.35);

    transform-origin: center bottom;
}


/* ============================================================
   GLASS
   ============================================================ */

.glass {
    background: var(--glass);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);

    backdrop-filter: blur(26px) saturate(140%);
    -webkit-backdrop-filter: blur(26px) saturate(140%);
}

.glass-soft {
    background: var(--glass-soft);
    border: 1px solid var(--border);

    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}


/* ============================================================
   NAV
   ============================================================ */

.top-nav {
    position: sticky;
    top: 0;
    z-index: 40;

    min-height: 74px;

    display: grid;
    grid-template-columns:
        minmax(230px, 1fr)
        auto
        minmax(310px, 1fr);

    align-items: center;

    padding: 12px 30px;

    border-left: none;
    border-right: none;
    border-top: none;

    box-shadow:
        0 10px 40px rgba(0,0,0,.22);
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 42px;
    height: 42px;

    border-radius: 11px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 12px;
    font-weight: 900;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.18),
            rgba(255,255,255,.04)
        );

    border: 1px solid var(--border-bright);
}

.brand-title {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .12em;
}

.brand-subtitle {
    margin-top: 2px;

    font-size: 10px;
    color: var(--muted);
    letter-spacing: .18em;
}

.main-tabs {
    display: flex;
    align-items: center;
    gap: 4px;

    padding: 4px;

    background: rgba(255,255,255,.04);
    border-radius: 13px;
}

.nav-tab {
    border: none;

    color: var(--muted);
    background: transparent;

    border-radius: 10px;

    padding: 10px 18px;

    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;

    cursor: pointer;
}

.nav-tab.active {
    color: var(--text);

    background:
        linear-gradient(
            180deg,
            rgba(255,255,255,.14),
            rgba(255,255,255,.07)
        );

    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,.09),
        0 5px 14px rgba(0,0,0,.20);
}

.nav-right {
    justify-self: end;

    display: flex;
    align-items: center;
    gap: 9px;
}

.viewport-toggle {
    display: flex;
    gap: 3px;

    padding: 3px;

    border-radius: 10px;

    background: rgba(255,255,255,.05);
    border: 1px solid var(--border);
}

.viewport-btn {
    border: 0;

    color: var(--muted);
    background: transparent;

    padding: 7px 10px;

    border-radius: 7px;

    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;

    cursor: pointer;
}

.viewport-btn.active {
    background: rgba(255,255,255,.11);
    color: var(--text);
}

.season-chip {
    padding: 9px 13px;

    border-radius: 10px;

    color: var(--text);

    background: rgba(255,255,255,.06);
    border: 1px solid var(--border);

    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
}


/* ============================================================
   PAGE
   ============================================================ */

.page-shell {
    max-width: 1500px;
    margin: 0 auto;

    padding: 38px 28px 80px;
}

.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;

    gap: 30px;

    margin-bottom: 24px;
}

.eyebrow {
    margin-bottom: 8px;

    font-size: 10px;
    font-weight: 800;

    color: var(--green);

    letter-spacing: .16em;
}

h1 {
    margin: 0;

    font-size: clamp(32px, 4vw, 48px);

    letter-spacing: -.045em;
    line-height: 1;
}

.page-heading p {
    margin: 11px 0 0;

    color: var(--muted);

    font-size: 14px;
}

.how-it-works {
    color: var(--text);

    padding: 10px 14px;

    border-radius: 12px;

    font-size: 10px;
    font-weight: 800;
    letter-spacing: .07em;

    cursor: pointer;
}


/* ============================================================
   KPI
   ============================================================ */

.kpi-grid {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 12px;

    margin-bottom: 14px;
}

.kpi-card {
    min-height: 125px;

    padding: 19px 20px;

    border-radius: var(--radius-md);

    position: relative;
    overflow: hidden;
}

.kpi-card.kpi-accent {
    border-color:
        rgba(83,226,124,.32);

    box-shadow:
        0 18px 45px rgba(0,0,0,.30),
        inset 0 0 40px rgba(83,226,124,.035);
}

.kpi-label {
    color: var(--muted);

    font-size: 10px;
    font-weight: 800;
    letter-spacing: .15em;
}

.kpi-value {
    margin-top: 8px;

    font-family: var(--mono);

    font-size: 35px;
    font-weight: 700;
    letter-spacing: -.05em;
}

.wager-number {
    color: var(--green);
}

.kpi-foot {
    margin-top: 4px;

    color: var(--muted);

    font-size: 11px;
}


/* ============================================================
   COMMAND BAR
   ============================================================ */

.command-bar {
    margin-bottom: 14px;

    padding: 10px;

    border-radius: var(--radius-md);

    display: flex;
    justify-content: space-between;
    gap: 14px;

    align-items: center;
}

.primary-filters,
.secondary-filters {
    display: flex;
    gap: 7px;
    align-items: center;

    flex-wrap: wrap;
}

.filter-pill {
    border: 1px solid transparent;

    padding: 9px 13px;

    color: var(--muted);
    background: transparent;

    border-radius: 10px;

    font-size: 10px;
    font-weight: 800;
    letter-spacing: .07em;

    cursor: pointer;
}

.filter-pill span:not(.filter-dot) {
    opacity: .62;
    margin-left: 4px;
}

.filter-pill.active {
    color: var(--text);

    background: rgba(255,255,255,.09);
    border-color: var(--border);
}

.filter-pill.wager-filter.active {
    background: var(--green-soft);
    border-color: rgba(83,226,124,.24);
}

.filter-dot,
.legend-dot {
    display: inline-block;

    width: 7px;
    height: 7px;

    border-radius: 50%;
}

.green {
    background: var(--green);
}

.red {
    background: var(--red);
}

.gray {
    background: #7e8984;
}

.filter-select,
.search-box {
    height: 34px;

    padding: 0 11px;

    border-radius: 9px;

    color: var(--text);
    background: rgba(255,255,255,.055);

    border: 1px solid var(--border);

    font-family: inherit;
    font-size: 11px;

    outline: none;
}

.search-box {
    width: 150px;
}

.search-box::placeholder {
    color: var(--muted-2);
}


/* ============================================================
   BOARD
   ============================================================ */

.board {
    overflow: hidden;

    border-radius: var(--radius-lg);
}

.board-header {
    min-height: 68px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 15px 18px;

    border-bottom: 1px solid var(--border);
}

.board-title {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
}

.board-status {
    margin-top: 4px;

    color: var(--muted);

    font-size: 11px;
}

.board-legend {
    display: flex;
    gap: 15px;

    color: var(--muted);

    font-size: 10px;
}

.board-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.table-scroll {
    overflow-x: auto;
}

.prediction-table {
    width: 100%;
    min-width: 1180px;

    border-collapse: collapse;
}

.prediction-table th {
    padding: 12px 13px;

    color: var(--muted);

    background: rgba(255,255,255,.025);

    border-bottom: 1px solid var(--border);

    font-size: 9px;
    font-weight: 800;

    text-transform: uppercase;
    letter-spacing: .12em;

    white-space: nowrap;
}

.prediction-table td {
    padding: 13px;

    border-bottom:
        1px solid rgba(255,255,255,.045);

    font-size: 12px;

    vertical-align: middle;
}

.prediction-table tbody tr {
    transition:
        background .16s ease,
        transform .16s ease;
}

.prediction-table tbody tr:hover {
    background: rgba(255,255,255,.045);
}

.prediction-table tbody tr.row-wager {
    background:
        linear-gradient(
            90deg,
            rgba(83,226,124,.075),
            transparent 55%
        );
}

.prediction-table tbody tr.row-wager td:first-child {
    box-shadow:
        inset 3px 0 0 var(--green);
}

.matchup-cell strong {
    display: block;

    font-size: 13px;
    letter-spacing: -.015em;
}

.market-line {
    font-family: var(--mono);

    font-size: 12px;
    font-weight: 700;
}

.model-cell {
    min-width: 105px;
}

.model-pick {
    font-family: var(--mono);

    font-size: 11px;
    font-weight: 700;
}

.model-prob {
    margin-left: 4px;

    color: var(--text);

    font-family: var(--mono);
}

.elo-history {
    margin-top: 4px;

    color: var(--muted);

    font-size: 9px;

    white-space: nowrap;
}

.panel-pill,
.referee-pill,
.price-pill,
.decision-pill {
    display: inline-flex;
    align-items: center;

    border-radius: 8px;

    padding: 6px 9px;

    white-space: nowrap;

    font-size: 9px;
    font-weight: 800;
    letter-spacing: .04em;
}

.panel-pill {
    background: rgba(255,255,255,.07);
}

.referee-pill {
    background: rgba(105,167,255,.10);
    color: #a7c7ff;
}

.price-favorable {
    background: var(--green-soft);
    color: var(--green);
}

.price-acceptable {
    background: rgba(255,255,255,.09);
    color: #d5d9d7;
}

.price-marginal {
    background: var(--amber-soft);
    color: var(--amber);
}

.price-overpriced {
    background: var(--red-soft);
    color: var(--red);
}

.price-none {
    background: rgba(255,255,255,.05);
    color: var(--muted);
}

.decision-head {
    text-align: right;
}

.decision-cell {
    text-align: right;
}

.decision-wager {
    color: #07120a;

    background:
        linear-gradient(
            135deg,
            #69f08f,
            #3fd76a
        );

    box-shadow:
        0 8px 24px var(--green-glow);
}

.decision-pass {
    color: var(--muted);

    background: rgba(255,255,255,.06);
}

.decision-pass-alert {
    color: var(--red);

    background: var(--red-soft);
}

.decision-sub {
    display: block;

    margin-left: 6px;

    font-family: var(--mono);

    font-size: 8px;

    opacity: .82;
}


/* ============================================================
   MOBILE CARDS
   ============================================================ */

.mobile-board {
    display: none;

    padding: 12px;

    gap: 12px;
}

.mobile-game-card {
    border-radius: 18px;

    padding: 15px;

    background:
        rgba(14,20,18,.78);

    border:
        1px solid var(--border);

    box-shadow:
        0 16px 38px rgba(0,0,0,.28);

    backdrop-filter: blur(20px);
}

.mobile-game-card.mobile-wager {
    border-color:
        rgba(83,226,124,.32);

    box-shadow:
        0 16px 42px rgba(0,0,0,.30),
        inset 3px 0 0 var(--green);
}

.mobile-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 12px;
}

.mobile-matchup {
    font-size: 18px;
    font-weight: 800;

    letter-spacing: -.03em;
}

.mobile-market {
    margin-top: 4px;

    color: var(--muted);

    font-family: var(--mono);

    font-size: 12px;
}

.mobile-final {
    flex-shrink: 0;
}

.mobile-model-grid {
    margin-top: 15px;

    display: grid;
    grid-template-columns:
        repeat(3, minmax(0,1fr));

    gap: 8px;
}

.mobile-model-box {
    padding: 10px;

    border-radius: 12px;

    background: rgba(255,255,255,.045);

    border: 1px solid rgba(255,255,255,.04);
}

.mobile-model-label {
    color: var(--muted);

    font-size: 8px;
    font-weight: 800;
    letter-spacing: .12em;
}

.mobile-model-main {
    margin-top: 5px;

    font-family: var(--mono);

    font-size: 13px;
    font-weight: 800;
}

.mobile-history {
    margin-top: 6px;

    color: var(--muted);

    font-size: 8px;
    line-height: 1.3;
}

.mobile-detail-row {
    margin-top: 11px;

    display: grid;
    grid-template-columns:
        repeat(2, minmax(0,1fr));

    gap: 8px;
}

.mobile-detail-box {
    padding: 10px;

    border-radius: 12px;

    background: rgba(255,255,255,.035);

    border: 1px solid rgba(255,255,255,.04);
}

.mobile-detail-label {
    color: var(--muted);

    font-size: 8px;
    font-weight: 800;

    letter-spacing: .11em;
}

.mobile-detail-value {
    margin-top: 4px;

    font-size: 11px;
    font-weight: 800;
}

.mobile-expand {
    margin-top: 12px;

    width: 100%;

    border: 1px solid var(--border);

    background: rgba(255,255,255,.045);

    color: var(--text);

    border-radius: 11px;

    padding: 10px;

    font-family: inherit;

    font-size: 9px;
    font-weight: 800;

    letter-spacing: .08em;

    cursor: pointer;
}


/* ============================================================
   MODAL
   ============================================================ */

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;

    display: none;

    align-items: center;
    justify-content: center;

    background: rgba(0,0,0,.62);

    backdrop-filter: blur(15px);
}

.modal-backdrop.open {
    display: flex;
}

.info-modal {
    width: min(650px, calc(100vw - 32px));

    border-radius: 22px;

    padding: 26px;

    position: relative;
}

.info-modal h2 {
    margin: 0 0 12px;

    font-size: 25px;
}

.info-modal p {
    color: var(--muted);

    line-height: 1.6;

    font-size: 13px;
}

.modal-close {
    position: absolute;

    top: 14px;
    right: 15px;

    width: 32px;
    height: 32px;

    border: none;
    border-radius: 50%;

    color: var(--text);
    background: rgba(255,255,255,.08);

    cursor: pointer;
}

.instruction-flow {
    margin: 22px 0;

    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 7px;
}

.instruction-flow span {
    padding: 7px 9px;

    background: rgba(255,255,255,.06);

    border-radius: 8px;

    font-size: 10px;
    font-weight: 800;
}

.instruction-flow .instruction-final {
    background: var(--green-soft);
    color: var(--green);
}


/* ============================================================
   FORCED MOBILE DEVELOPMENT MODE
   ============================================================ */

body.force-mobile .page-shell {
    max-width: 430px;

    padding-left: 12px;
    padding-right: 12px;
}

body.force-mobile .top-nav {
    grid-template-columns: 1fr auto;

    padding-left: 14px;
    padding-right: 14px;
}

body.force-mobile .main-tabs {
    position: fixed;
    z-index: 1000;
    right: 8px;
    bottom: 8px;
    left: 8px;
    display: flex;
    gap: 2px;
    overflow-x: auto;
    padding: 5px;
    border: 1px solid var(--border-bright);
    background: rgba(8, 13, 11, .96);
    box-shadow: 0 12px 38px rgba(0,0,0,.55);
}

body.force-mobile .season-chip {
    display: flex;
    width: 100%;
}

body.force-mobile .top-nav {
    grid-template-columns: 1fr;
    gap: 10px;
}

body.force-mobile .nav-right {
    width: 100%;
}

body.force-mobile .season-week-field {
    flex: 1;
}

body.force-mobile .season-week-field select {
    width: 100%;
}

body.force-mobile .plays-shell {
    width: min(100% - 24px, 430px);
    padding: 36px 0 92px;
}

body.force-mobile .plays-heading {
    display: block;
}

body.force-mobile .plays-grid {
    grid-template-columns: 1fr;
}

body.force-mobile.plays-active .main-tabs {
    display: none;
}

body.force-mobile .plays-mobile-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 9px 8px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    background: rgba(3, 8, 15, .96);
    backdrop-filter: blur(20px);
}

body.force-mobile .kpi-grid {
    grid-template-columns:
        repeat(2, minmax(0,1fr));
}

body.force-mobile .kpi-card {
    min-height: 102px;

    padding: 14px;
}

body.force-mobile .kpi-value {
    font-size: 29px;
}

body.force-mobile .command-bar {
    align-items: stretch;
    flex-direction: column;
}

body.force-mobile .secondary-filters {
    display: grid;

    grid-template-columns:
        1fr 1fr;
}

body.force-mobile .search-box {
    width: 100%;
}

body.force-mobile .desktop-board {
    display: none;
}

body.force-mobile .mobile-board {
    display: grid;
}

body.force-mobile .board-legend {
    display: none;
}

body.force-mobile .page-heading {
    align-items: flex-start;
    flex-direction: column;
}

body.force-mobile h1 {
    font-size: 34px;
}


/* ============================================================
   REAL MOBILE
   ============================================================ */

@media (max-width: 700px) {

    .page-shell {
        max-width: 430px;

        padding:
            24px 12px 70px;
    }

    .top-nav {
        grid-template-columns: 1fr;
        gap: 10px;

        padding:
            10px 14px;
    }

    .main-tabs {
        position: fixed;
        z-index: 1000;
        right: 8px;
        bottom: calc(8px + env(safe-area-inset-bottom));
        left: 8px;

        display: flex;
        gap: 2px;
        overflow-x: auto;

        padding: 5px;
        background: rgba(8, 13, 11, .96);
        border: 1px solid var(--border-bright);
        box-shadow: 0 12px 38px rgba(0,0,0,.55);
        -webkit-overflow-scrolling: touch;
    }

    .season-chip {
        display: flex;
        width: 100%;
    }

    .nav-right {
        width: 100%;
    }

    .season-week-selector {
        justify-content: stretch;
    }

    .season-week-field {
        flex: 1;
    }

    .season-week-field select {
        width: 100%;
    }

    .nav-tab {
        flex: 1 0 auto;
        min-width: 62px;
        padding: 10px 8px;
        font-size: 9px;
    }

    .viewport-toggle {
        display: none;
    }

    .brand-mark {
        width: 36px;
        height: 36px;
    }

    .brand-title {
        font-size: 12px;
    }

    .brand-subtitle {
        font-size: 8px;
    }

    .page-heading {
        align-items: flex-start;
        flex-direction: column;

        margin-bottom: 18px;
    }

    h1 {
        font-size: 34px;
    }

    .page-heading p {
        font-size: 12px;
    }

    .kpi-grid {
        grid-template-columns:
            repeat(2, minmax(0,1fr));
    }

    .kpi-card {
        min-height: 102px;

        padding: 14px;
    }

    .kpi-value {
        font-size: 29px;
    }

    .command-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .secondary-filters {
        display: grid;

        grid-template-columns:
            1fr 1fr;
    }

    .filter-select,
    .search-box {
        width: 100%;
    }

    .desktop-board {
        display: none;
    }

    .mobile-board {
        display: grid;
    }

    .board-legend {
        display: none;
    }

    .board-header {
        padding: 13px;
    }

}

/* PBP HOME LAUNCHER */

.pbp-launcher-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.72);
    display: grid;
    place-items: center;
    z-index: 9999;
    padding: 24px;
}

.pbp-launcher-card {
    width: min(760px, 96vw);
    max-height: 82vh;
    overflow: auto;
    background: #0d121a;
    border: 1px solid #273140;
    border-radius: 16px;
    padding: 18px;
}

.pbp-launcher-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
}

#pbpLauncherClose {
    border: 0;
    background: transparent;
    color: white;
    font-size: 26px;
    cursor: pointer;
}

.pbp-launcher-games {
    display: grid;
    gap: 8px;
}

.pbp-launcher-game {
    width: 100%;
    text-align: left;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #273140;
    background: #111823;
    color: #f3f6fb;
    cursor: pointer;
    font-weight: 700;
}

.pbp-launcher-game:hover {
    background: #182231;
}

/* ============================================================
   WEEKLY BLUF
   ============================================================ */

.week-bluf-card {
    margin: 16px 0;
    padding: 18px 20px;
    border: 1px solid #293445;
    border-radius: 14px;
    background:
        linear-gradient(
            135deg,
            rgba(17,24,35,.98),
            rgba(11,16,24,.98)
        );
}

.week-bluf-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 10px;
}

.week-bluf-title {
    margin-top: 4px;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: .02em;
}

.week-bluf-status {
    flex: 0 0 auto;
    padding: 5px 9px;
    border-radius: 999px;
    border: 1px solid #334257;
    color: #9fb0c6;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .08em;
}

.week-bluf-text {
    max-width: 1100px;
    color: #d8e0ec;
    font-size: 14px;
    line-height: 1.65;
}

@media (max-width: 700px) {

    .week-bluf-card {
        padding: 15px;
    }

    .week-bluf-head {
        display: block;
    }

    .week-bluf-status {
        display: inline-block;
        margin-top: 8px;
    }

    .week-bluf-text {
        font-size: 13px;
    }
}


/* ============================================================
   HISTORY
   ============================================================ */

.history-view[hidden] {
    display: none !important;
}

.history-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.history-controls {
    margin-bottom: 18px;
}

.history-board {
    min-height: 520px;
}

.history-chart-shell {
    min-height: 430px;
    padding: 24px;
}

.history-chart-placeholder {
    min-height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed rgba(255,255,255,.14);
    border-radius: 14px;
    color: rgba(255,255,255,.42);
    font-size: 14px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

@media (max-width: 900px) {

    .history-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 560px) {

    .history-kpi-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .history-chart-shell {
        padding: 12px;
    }

}


.history-svg {
    width: 100%;
    height: auto;
    display: block;
}

.history-grid-line {
    stroke: rgba(255,255,255,.08);
    stroke-width: 1;
}

.history-axis-label {
    fill: rgba(220,228,240,.58);
    font-size: 12px;
}

.history-model-line {
    stroke-linecap: round;
    stroke-linejoin: round;
}

.history-point {
    stroke: #0b0f16;
    stroke-width: 2;
}

.history-vegas-line {
    stroke: rgba(255,255,255,.72);
    stroke-width: 3;
    stroke-dasharray: 3 8;
    stroke-linecap: round;
}

.history-vegas-point {
    fill: #fff;
    stroke: #0b0f16;
    stroke-width: 2;
}

.history-vegas-overall {
    stroke: rgba(255,255,255,.38);
    stroke-width: 2;
    stroke-dasharray: 10 7;
}

.history-vegas-label {
    fill: rgba(255,255,255,.60);
    font-size: 11px;
}

.history-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 18px;
    padding: 10px 10px 0;
    font-size: 11px;
    color: rgba(220,228,240,.72);
}

.history-legend span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.history-legend i {
    width: 18px;
    height: 3px;
    border-radius: 999px;
}

.history-vegas-key {
    background: repeating-linear-gradient(
        to right,
        rgba(255,255,255,.8) 0 3px,
        transparent 3px 7px
    ) !important;
}

.history-vegas-overall-key {
    background: repeating-linear-gradient(
        to right,
        rgba(255,255,255,.45) 0 8px,
        transparent 8px 13px
    ) !important;
}

@media (max-width: 650px) {

    .history-chart-shell {
        overflow-x: auto;
    }

    .history-svg {
        min-width: 760px;
    }

}


/* ============================================================
   HISTORY CERTAINTY MATRIX
   ============================================================ */

.history-matrix-board {
    margin-top: 18px;
}

.history-matrix-scroll {
    width: 100%;
    overflow-x: auto;
}

.history-matrix {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
}

.history-matrix th,
.history-matrix td {
    padding: 14px 10px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,.07);
}

.history-matrix thead th {
    color: rgba(220,228,240,.58);
    font-size: 10px;
    letter-spacing: .08em;
    font-weight: 700;
    white-space: nowrap;
}

.history-matrix tbody td {
    border-left: 1px solid rgba(255,255,255,.035);
}

.matrix-year-head,
.matrix-year {
    position: sticky;
    left: 0;
    z-index: 2;
}

.matrix-year-head {
    background: #111722;
}

.matrix-year {
    background: #111722;
    color: rgba(255,255,255,.80);
    font-size: 12px;
    font-weight: 700;
}

.matrix-accuracy {
    font-size: 15px;
    font-weight: 750;
}

.matrix-sample {
    margin-top: 3px;
    color: rgba(220,228,240,.42);
    font-size: 9px;
    font-weight: 600;
}

.matrix-elite {
    background: rgba(72, 210, 142, .16);
}

.matrix-elite .matrix-accuracy {
    color: #7ee2ad;
}

.matrix-strong {
    background: rgba(72, 210, 142, .09);
}

.matrix-strong .matrix-accuracy {
    color: #a4e7c1;
}

.matrix-positive .matrix-accuracy {
    color: rgba(255,255,255,.86);
}

.matrix-neutral .matrix-accuracy {
    color: rgba(255,255,255,.64);
}

.matrix-negative {
    background: rgba(255, 92, 113, .07);
}

.matrix-negative .matrix-accuracy {
    color: #ff8798;
}

.matrix-empty {
    color: rgba(255,255,255,.25);
}


@media (max-width: 650px) {

    .history-matrix th,
    .history-matrix td {
        padding: 11px 8px;
    }

    .matrix-accuracy {
        font-size: 13px;
    }

}


/* ============================================================
   HISTORY HEADLINE
   ============================================================ */

.history-headline {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding: 24px 28px;
    margin-bottom: 18px;
}

.history-headline-value {
    margin-top: 5px;
    font-size: clamp(48px, 7vw, 82px);
    line-height: .95;
    font-weight: 900;
    letter-spacing: -.045em;
}

.history-headline-detail {
    margin-top: 10px;
    color: rgba(220,228,240,.70);
    font-size: 13px;
    font-weight: 650;
}

.history-headline-note {
    max-width: 260px;
    color: rgba(220,228,240,.45);
    font-size: 11px;
    line-height: 1.5;
    text-align: right;
    text-transform: uppercase;
    letter-spacing: .07em;
}


@media (max-width: 650px) {

    .history-headline {
        display: block;
        padding: 20px;
    }

    .history-headline-note {
        max-width: none;
        margin-top: 15px;
        text-align: left;
    }

}

/* ============================================================
   SEASON / WEEK SELECTOR
   ============================================================ */

.season-week-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.season-week-field {
    display: flex;
    align-items: center;
    gap: 6px;
}

.season-week-field span {
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .08em;
}

.season-week-field select {
    appearance: none;

    min-width: 62px;
    padding: 5px 22px 5px 8px;

    border: 1px solid var(--border);
    border-radius: 7px;

    background:
        rgba(255,255,255,.06);

    color: var(--text);

    font: inherit;
    font-size: 11px;
    font-weight: 700;

    cursor: pointer;
}

.season-week-field select:focus {
    outline: 1px solid rgba(255,255,255,.28);
    outline-offset: 1px;
}

/* ============================================================
   LOCKED TOTALS CHALLENGER
   ============================================================ */

.home-model-links {
    display: grid;
    margin-bottom: 18px;
}

.home-model-link {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 20px;
    color: var(--text);
    text-align: left;
    cursor: pointer;
}

.home-model-link small,
.home-model-link strong {
    display: block;
}

.home-model-link small {
    margin-bottom: 4px;
    color: var(--green);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .12em;
}

.home-model-link strong {
    font-size: 14px;
    letter-spacing: .05em;
}

.home-model-arrow {
    color: var(--green);
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.historical-result {
    margin-top: 5px;
    color: rgba(220,228,240,.58);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .04em;
    white-space: nowrap;
}

.totals-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    padding: 26px 30px;
    margin-bottom: 18px;
}

.totals-signal {
    margin-top: 6px;
    color: #f7fbff;
    font-size: clamp(42px, 6vw, 72px);
    font-weight: 900;
    line-height: .95;
    letter-spacing: -.04em;
}

.totals-signal-detail {
    margin-top: 12px;
    color: rgba(220,228,240,.72);
    font-size: 14px;
}

.totals-validation {
    display: grid;
    gap: 10px;
    color: rgba(220,228,240,.55);
    font-size: 10px;
    letter-spacing: .08em;
}

.totals-validation strong {
    display: block;
    margin-top: 3px;
    color: var(--text);
    font-size: 18px;
    letter-spacing: 0;
}

.totals-rule {
    color: rgba(220,228,240,.55);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .09em;
}

.totals-table td,
.totals-table th {
    white-space: nowrap;
}

.totals-selected {
    background: rgba(79, 209, 146, .10);
    box-shadow: inset 3px 0 0 rgba(79, 209, 146, .85);
}

.totals-decision {
    display: inline-flex;
    min-width: 58px;
    justify-content: center;
    padding: 6px 9px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 999px;
    color: rgba(220,228,240,.52);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
}

.totals-play {
    border-color: rgba(79, 209, 146, .45);
    background: rgba(79, 209, 146, .12);
    color: #8af1bc;
}

.totals-empty {
    padding: 48px 24px !important;
    color: rgba(220,228,240,.55);
    text-align: center;
}

@media (max-width: 760px) {
    .totals-hero {
        display: block;
        padding: 22px;
    }

    .totals-validation {
        grid-template-columns: 1fr 1fr;
        margin-top: 24px;
    }
}
