@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

/* Minimal Dark Theme inspired by opencode.ai */
body {
    background-color: #0d1117;
    color: #e6edf3;
    font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    margin: 0;
    padding: 0;
}

/* FormForecast public shell. It extends the existing engine visual system. */
* { box-sizing: border-box; }
button { font: inherit; }
.site-header { position: sticky; top: 0; z-index: 20; }
.site-header-inner { min-height: 64px; padding-top: 10px; padding-bottom: 10px; }
.site-brand { border: 0; background: transparent; font-size: 18px; font-weight: 850; letter-spacing: -.03em; cursor: pointer; }
.site-brand span, .eyebrow { color: #d7a93b; }
.site-nav-link { border: 0; background: transparent; cursor: pointer; }
.btn-signin { border: 1px solid #30363d; border-radius: 8px; background: transparent; color: #e6edf3; padding: 8px 12px; font-size: 14px; font-weight: 650; cursor: pointer; }
.hero { border-bottom: 1px solid #30363d; background: #0d1117; padding: clamp(56px, 9vw, 112px) 0; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr); align-items: center; gap: clamp(40px, 8vw, 96px); }
.hero-inner.app-container { padding-top: 0; padding-bottom: 0; }
.eyebrow { font-size: 13px; font-weight: 800; letter-spacing: .16em; }
.hero h1 { margin: 12px 0 22px; max-width: 850px; font-size: clamp(48px, 7vw, 86px); line-height: .96; letter-spacing: -.06em; }
.hero-inner > div > p { max-width: 680px; color: #9da7b1; font-size: 20px; line-height: 1.6; }
.principle-card { border: 1px solid #30363d; border-radius: 12px; background: #161b22; padding: 28px; box-shadow: 0 24px 55px #0005; }
.principle-card > span { color: #d7a93b; font-size: 12px; font-weight: 800; letter-spacing: .13em; }
.principle-card strong { display: block; margin: 10px 0; font-size: 26px; }
.principle-card p { margin: 0; color: #9da7b1; line-height: 1.6; }
.page-content.app-container { padding-top: 56px; padding-bottom: 80px; }
.section-title { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-title h2 { margin: 6px 0 0; font-size: clamp(32px, 5vw, 48px); letter-spacing: -.045em; }
.section-title > time, .section-copy { color: #8b949e; }
.section-copy { margin: -10px 0 24px; line-height: 1.6; }
.fixture-list, .data-card { overflow: hidden; border: 1px solid #30363d; border-radius: 10px; background: #161b22; }
.data-state { border: 1px dashed #30363d; border-radius: 10px; padding: 40px 20px; color: #8b949e; text-align: center; }
.fixture-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 18px 20px; border-bottom: 1px solid #30363d; }
.fixture-row:last-child { border-bottom: 0; }
.fixture-row > time { font-weight: 800; font-variant-numeric: tabular-nums; }
.fixture-row > div { display: flex; min-width: 0; flex-direction: column; gap: 5px; }
.fixture-row small { color: #8b949e; }
.fixture-row strong span { margin: 0 4px; color: #8b949e; font-weight: 500; }
.locked { border: 1px solid #594c26; border-radius: 99px; background: #282315; color: #e5c35f; padding: 8px 11px; font-size: 13px; font-weight: 800; }
.unlock-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 18px; border: 1px solid #30363d; border-radius: 10px; background: #161b22; padding: 22px; }
.unlock-card div { display: flex; flex-direction: column; gap: 5px; }
.unlock-card div span { color: #8b949e; }
.unlock-card button, .modal-action { border: 0; border-radius: 7px; background: #d7a93b; color: #161b22; padding: 11px 15px; font-weight: 800; cursor: pointer; }
.history-row { display: grid; grid-template-columns: minmax(0, 1fr) 80px 90px; align-items: center; gap: 16px; padding: 16px 20px; border-bottom: 1px solid #30363d; }
.history-row:last-child { border-bottom: 0; }
.history-row.header { color: #8b949e; font-size: 13px; font-weight: 750; }
.history-row > span { display: flex; flex-direction: column; gap: 4px; }
.history-row > b { display: flex; flex-direction: column; gap: 3px; }
.history-row > b small { color: #8b949e; font-weight: 500; white-space: nowrap; }
.history-row small { color: #8b949e; }
.history-row em { width: max-content; border-radius: 99px; padding: 5px 9px; font-size: 13px; font-style: normal; font-weight: 800; }
.history-row .won { background: #143621; color: #56d364; }
.history-row .lost { background: #3b171b; color: #ff7b72; }
.history-row .void { background: #21262d; color: #8b949e; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stats-grid article { display: flex; flex-direction: column; gap: 7px; border: 1px solid #30363d; border-radius: 10px; background: #161b22; padding: 24px; }
.stats-grid small { color: #8b949e; font-size: 14px; font-weight: 700; }
.stats-grid strong { font-size: 38px; letter-spacing: -.04em; }
.stats-grid span { color: #8b949e; }
footer { border-top: 1px solid #30363d; padding: 24px 0; color: #8b949e; font-size: 13px; }
footer .app-container { display: flex; justify-content: space-between; gap: 20px; padding-top: 0; padding-bottom: 0; }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: #05080bcc; }
.modal-card { position: relative; width: min(460px, 100%); border: 1px solid #30363d; border-radius: 12px; background: #161b22; padding: 32px; box-shadow: 0 24px 90px #000b; }
.modal-card h2 { margin: 10px 0; font-size: 28px; }
.modal-card p { color: #9da7b1; line-height: 1.6; }
.modal-close { position: absolute; top: 12px; right: 14px; border: 0; background: transparent; color: #8b949e; font-size: 26px; cursor: pointer; }
@media (max-width: 720px) {
  .site-header-inner { flex-wrap: wrap; gap: 8px; }
  .site-nav { order: 3; flex-basis: 100%; overflow-x: auto; }
  .hero { padding: 58px 0; }
  .hero-inner { grid-template-columns: 1fr; }
  .principle-card { display: none; }
  .hero h1 { font-size: 48px; }
  .hero-inner > div > p { font-size: 17px; }
  .page-content.app-container { padding-top: 44px; padding-bottom: 60px; }
  .fixture-row { grid-template-columns: 52px minmax(0, 1fr); gap: 12px; padding: 16px; }
  .locked { grid-column: 2; width: max-content; }
  .unlock-card { align-items: flex-start; flex-direction: column; }
  .history-row { grid-template-columns: minmax(0, 1fr) 44px 64px; padding: 14px; }
  .stats-grid { grid-template-columns: 1fr; }
  footer .app-container { flex-direction: column; }
}

.app-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 24px 16px;
}

/* Probabilities on the pick/history grids: space values without any '/'
   separator; margin keeps them apart even when HTML whitespace collapses. */
.prob-val + .prob-val {
    margin-left: 6px;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #30363d;
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
}

.logo-dot {
    width: 8px;
    height: 8px;
    background-color: #238636;
    border-radius: 50%;
    display: inline-block;
}

.badge {
    font-size: 11px;
    background-color: #21262d;
    color: #8b949e;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #30363d;
}

.date-input {
    background-color: #161b22;
    color: #e6edf3;
    border: 1px solid #30363d;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    text-align: center;
}

.controls-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    margin-bottom: 20px;
    background-color: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.controls-bar > * + * {
    border-left: 1px solid #30363d;
}

.tabs {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 6px;
}

.tab-btn,
.seg-btn {
    background: transparent;
    border: none;
    color: #8b949e;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    font-weight: 500;
    font-family: inherit;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.tab-btn:hover,
.seg-btn:hover {
    color: #e6edf3;
}

.tab-btn.active,
.seg-btn.active {
    background-color: #21262d;
    color: #e6edf3;
}

.controls-group {
    display: flex;
    flex-wrap: wrap;
    min-width: 0;
    align-items: center;
    margin-left: auto;
}

.controls-group .slider-group + .slider-group {
    border-left: 1px solid #30363d;
}

.slider-group {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    font-weight: 500;
    color: #e6edf3;
    padding: 8px 16px;
}

.slider-group label {
    color: #c9d1d9;
    line-height: 16px;
}

.slider-group label strong {
    color: #58a6ff;
}

.seg {
    display: flex;
    gap: 4px;
    align-items: center;
}

.table-card {
    background-color: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    overflow: hidden;
}

.state-msg {
    padding: 40px;
    text-align: center;
    color: #8b949e;
}

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

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

.data-table th {
    background-color: #21262d;
    color: #8b949e;
    font-weight: 600;
    padding: 10px 16px;
    border-bottom: 1px solid #30363d;
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #21262d;
    color: #c9d1d9;
}

.data-table tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.time-col {
    color: #8b949e;
    font-family: monospace;
}

.match-col {
    font-weight: 500;
}

.vs {
    color: #484f58;
    margin: 0 4px;
}

.probs-col {
    font-family: monospace;
}

.probs-col.muted {
    color: #8b949e;
}

.pick-badge {
    background-color: #21262d;
    color: #c9d1d9;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    border: 1px solid #30363d;
}

.pick-badge.fav {
    background-color: rgba(35, 134, 54, 0.15);
    color: #3fb950;
    border-color: rgba(35, 134, 54, 0.4);
}

.pick-badge.ht {
    color: #58a6ff;
    background-color: rgba(88, 166, 255, 0.1);
}

.pick-with-draw-trend {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.draw-trend-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    padding: 1px 5px;
    border: 1px solid rgba(210, 153, 34, 0.5);
    border-radius: 999px;
    background: rgba(210, 153, 34, 0.12);
    color: #e3b341;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.35;
    cursor: help;
    outline: none;
}

.draw-trend-badge:focus-visible {
    box-shadow: 0 0 0 2px rgba(227, 179, 65, 0.35);
}

.draw-trend-tooltip {
    position: absolute;
    z-index: 50;
    left: 50%;
    bottom: calc(100% + 7px);
    width: max-content;
    max-width: min(230px, 75vw);
    transform: translateX(-50%);
    padding: 6px 8px;
    border: 1px solid #8b6f25;
    border-radius: 6px;
    background: #1f1b12;
    color: #f0d58a;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.35;
    text-align: center;
    white-space: normal;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.12s ease;
}

.draw-trend-badge:hover .draw-trend-tooltip,
.draw-trend-badge:focus .draw-trend-tooltip,
.draw-trend-badge:focus-within .draw-trend-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Result tags and outcome colouring. */
.result-col {
    white-space: nowrap;
}

.res {
    display: inline-block;
    min-width: 22px;
    text-align: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    background-color: #21262d;
    color: #8b949e;
    border: 1px solid #30363d;
}

.res.won {
    background-color: rgba(35, 134, 54, 0.15);
    color: #3fb950;
    border-color: rgba(35, 134, 54, 0.45);
}

.res.lost {
    background-color: rgba(248, 81, 73, 0.12);
    color: #f85149;
    border-color: rgba(248, 81, 73, 0.45);
}

.res.void {
    background-color: rgba(139, 148, 158, 0.1);
    color: #8b949e;
}

.score {
    margin-left: 6px;
    font-family: monospace;
    color: #8b949e;
}

.data-table tr.row-won td:first-child {
    box-shadow: inset 3px 0 0 #238636;
}

.data-table tr.row-lost td:first-child {
    box-shadow: inset 3px 0 0 #f85149;
}

.data-table tr.row-void td:first-child {
    box-shadow: inset 3px 0 0 #6e7681;
}

/* Responsive layout & mobile tweaks */
@media (max-width: 768px) {
    .app-container {
        padding: 12px 8px;
    }

    .top-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding-bottom: 12px;
        margin-bottom: 14px;
    }

    .date-input {
        width: 100%;
        box-sizing: border-box;
        text-align: center;
        padding: 10px 12px;
    }

    .controls-bar {
        flex-direction: column;
        align-items: stretch;
        margin-bottom: 14px;
    }

    .controls-bar > * + * {
        border-left: none;
        border-top: 1px solid #30363d;
    }

    .controls-group {
        flex-direction: column;
        align-items: stretch;
        margin-left: 0;
    }

    .controls-group {
        margin-left: 0;
    }

    .controls-group .slider-group + .slider-group {
        border-left: none;
        border-top: 1px solid #30363d;
    }

    .tabs {
        width: 100%;
        display: flex;
    }

    .tab-btn {
        flex: 1;
        text-align: center;
        padding: 10px;
    }

    .slider-group {
        width: 100%;
        box-sizing: border-box;
        padding: 10px 14px;
    }

    .seg {
        width: 100%;
    }

    .seg-btn {
        flex: 1;
        text-align: center;
        padding: 8px 6px;
    }

    .data-table th,
    .data-table td {
        padding: 10px 12px;
        white-space: nowrap;
    }
}
.date-input:focus-visible {
    outline: 2px solid rgba(35, 134, 54, 0.45);
    outline-offset: 2px;
}

/* ---- Authentication chrome ---- */
.site-header {
    border-bottom: 1px solid #30363d;
    background-color: #0d1117;
}

.site-header-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-top: 12px;
    padding-bottom: 12px;
}

.site-brand {
    color: #e6edf3;
    text-decoration: none;
    white-space: nowrap;
}

.site-nav {
    display: flex;
    gap: 4px;
    flex: 1;
}

.site-nav-link {
    color: #8b949e;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
}

.site-nav-link:hover {
    color: #e6edf3;
    background-color: #21262d;
}

.site-nav-link.active {
    color: #e6edf3;
    background-color: #21262d;
}

.site-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.account-email {
    color: #8b949e;
    font-size: 13px;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.signout-form {
    margin: 0;
}

.btn-signout,
.btn-primary,
.btn-small {
    font-family: inherit;
    cursor: pointer;
    border-radius: 6px;
    border: 1px solid #30363d;
    background-color: #21262d;
    color: #e6edf3;
}

.btn-signout {
    font-size: 13px;
    font-weight: 500;
    padding: 6px 12px;
}

.btn-signout:hover,
.btn-small:hover {
    border-color: #8b949e;
}

.btn-primary {
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    background-color: #238636;
    border-color: #2ea043;
}

.btn-primary:hover {
    background-color: #2ea043;
}

.btn-primary:disabled,
.btn-small:disabled,
.btn-signout:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-small {
    font-size: 12px;
    padding: 4px 10px;
}

.btn-danger {
    color: #f85149;
    border-color: #6e2a26;
    background-color: #2d1517;
}

.btn-danger:hover {
    border-color: #f85149;
}

/* ---- Login page ---- */
.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 380px;
    background-color: #161b22;
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 32px 28px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.login-logo {
    margin-bottom: 22px;
}

.login-title {
    margin: 0 0 4px;
    font-size: 22px;
}

.login-sub {
    margin: 0 0 20px;
    color: #8b949e;
    font-size: 13px;
}

.login-btn {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    text-decoration: none;
    background-color: #238636;
    border: 1px solid #2ea043;
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    padding: 11px 16px;
    border-radius: 8px;
}

.login-btn:hover {
    background-color: #2ea043;
}

.login-alert {
    background-color: #2d1517;
    border: 1px solid #6e2a26;
    color: #ffb4ae;
    font-size: 13px;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.login-alert-warn {
    background-color: #2b2412;
    border-color: #6b5a1e;
    color: #e3b341;
}

/* ---- Admin users ---- */
.page-title {
    margin: 0;
    font-size: 20px;
}

/* Cards stack with a gap whether or not they are adjacent, since a controls row
   between two cards would otherwise leave them touching. */
.table-card {
    margin-bottom: 16px;
}

.panel-head {
    padding: 16px 16px 12px;
}

.panel-title {
    margin: 0;
    font-size: 15px;
}

.panel-sub {
    margin: 4px 0 0;
    color: #8b949e;
    font-size: 12px;
}

.invite-form {
    display: flex;
    gap: 10px;
    padding: 4px 16px 16px;
    flex-wrap: wrap;
}

.text-input {
    flex: 1;
    min-width: 200px;
    background-color: #0d1117;
    color: #e6edf3;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    font-family: inherit;
}

.text-input:focus {
    outline: none;
    border-color: #58a6ff;
}

.invite-result {
    padding: 0 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.invite-result label {
    color: #8b949e;
    font-size: 12px;
}

.status-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid #30363d;
}

.status-tag.is-active {
    color: #3fb950;
    border-color: #2ea043;
    background-color: #12261a;
}

.status-tag.is-revoked {
    color: #f85149;
    border-color: #6e2a26;
    background-color: #2d1517;
}

.muted-cell {
    color: #8b949e;
}

@media (max-width: 720px) {
    .site-header-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .site-nav {
        display: flex;
        overflow-x: auto;
        padding-bottom: 4px;
        gap: 6px;
    }

    .site-nav-link {
        padding: 10px 14px;
        font-size: 14px;
        min-height: 40px;
        display: inline-flex;
        align-items: center;
        white-space: nowrap;
    }

    .site-user {
        justify-content: space-between;
        border-top: 1px solid #21262d;
        padding-top: 8px;
    }

    .account-email {
        max-width: 200px;
    }
}

/* ---- History page ---- */
.history-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #c9d1d9;
}

.result-summary {
    font-size: 13px;
    color: #c9d1d9;
    white-space: nowrap;
}

.summary-sep {
    color: #30363d;
}

.date-col {
    white-space: nowrap;
    color: #8b949e;
}

.pick-col {
    white-space: nowrap;
}

.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 14px 16px;
    border-top: 1px solid #21262d;
}

.pager-btn {
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 16px;
    border-radius: 6px;
    border: 1px solid #30363d;
    background-color: #21262d;
    color: #e6edf3;
}

.pager-btn:hover:not(:disabled) {
    border-color: #8b949e;
}

.pager-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pager-status {
    font-size: 13px;
    color: #8b949e;
    min-width: 110px;
    text-align: center;
}

@media (max-width: 720px) {
    .history-summary {
        display: none;
    }

    .pager {
        gap: 10px;
    }

    .pager-btn {
        flex: 1;
    }
}

/* ---- Operations dashboard ---- */
.ops-banner {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
    border: 1px solid #30363d;
}

.ops-banner.ops-ok {
    background-color: #12261a;
    border-color: #2ea043;
    color: #3fb950;
}

.ops-banner.ops-warn {
    background-color: #2b2412;
    border-color: #6b5a1e;
    color: #e3b341;
}

.ops-banner.ops-fail {
    background-color: #2d1517;
    border-color: #6e2a26;
    color: #f85149;
}

.ops-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 4px 16px 16px;
}

.ops-stat {
    flex: 1;
    min-width: 120px;
    background-color: #0d1117;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ops-stat span {
    font-size: 12px;
    color: #8b949e;
}

.ops-stat strong {
    font-size: 18px;
}

.ops-stat strong.positive {
    color: #3fb950;
}

.ops-stat strong.negative {
    color: #f85149;
}

.news-review-summary {
    padding-top: 0;
}

.news-review-table td {
    vertical-align: top;
}

.news-risk {
    display: inline-block;
    min-width: 58px;
    margin-right: 6px;
    padding: 2px 7px;
    border: 1px solid #30363d;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
    text-transform: uppercase;
}

.news-risk-low {
    color: #3fb950;
    border-color: #2ea043;
    background: #12261a;
}

.news-risk-medium,
.news-risk-unknown {
    color: #e3b341;
    border-color: #6b5a1e;
    background: #2b2412;
}

.news-risk-high {
    color: #f85149;
    border-color: #6e2a26;
    background: #2d1517;
}

.news-review-details summary {
    color: #58a6ff;
    cursor: pointer;
    white-space: nowrap;
}

.news-review-details p,
.news-review-details ul {
    max-width: 620px;
    margin: 8px 0 0;
}

.news-review-details ul {
    padding-left: 18px;
}

.news-review-details li + li {
    margin-top: 6px;
}

.news-review-details li span {
    display: block;
    color: #8b949e;
    font-size: 11px;
}

.news-source-list a {
    color: #58a6ff;
    overflow-wrap: anywhere;
}

/* ---- Ops: league hit rate ---- */
.numeric-cell {
    text-align: right;
    white-space: nowrap;
}

.rate-good {
    color: #3fb950;
    font-weight: 600;
}

.rate-bad {
    color: #f85149;
    font-weight: 600;
}

.low-sample {
    margin-left: 6px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    color: #e3b341;
    border: 1px solid #6b5a1e;
    background-color: #2b2412;
    border-radius: 4px;
    padding: 1px 4px;
}

/* ---- Ops: API quota bar ---- */
.quota-bar {
    height: 8px;
    margin: 0 16px 16px;
    border-radius: 999px;
    background-color: #21262d;
    border: 1px solid #30363d;
    overflow: hidden;
}

.quota-bar-fill {
    height: 100%;
    background-color: #238636;
    transition: width 0.2s ease;
}

.quota-bar-fill.is-low {
    background-color: #f85149;
}

/* ---- Mobile cards ---- */
.grid-cards {
    display: none;
}

.pick-card {
    background-color: #161b22;
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
}

.pick-card.is-win {
    border-color: #2ea043;
}

.pick-card.is-loss {
    border-color: #f85149;
}

.pick-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.pick-status-placeholder {
    display: none;
}

.pick-league {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    min-width: 0;
    align-items: baseline;
    gap: 6px;
    color: #8b949e;
    font-size: 12px;
    text-align: right;
    margin-left: auto;
}

.pick-league-sep {
    color: #30363d;
    margin: 0 4px;
}

.pick-title-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.pick-match {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #e6edf3;
    line-height: 1.3;
}

.pick-match .vs {
    color: #6e7681;
    font-size: 12px;
    font-weight: 400;
    margin: 0 4px;
}

.pick-kickoff {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 0;
    color: #8b949e;
    font-size: 12px;
    white-space: nowrap;
}

.pick-kickoff .final-score {
    color: #e6edf3;
    font-weight: 600;
    font-family: monospace;
}

.pick-availability {
    margin: -2px 0 12px;
    padding: 9px 10px;
    border: 1px solid #30363d;
    border-radius: 8px;
    background: #0d1117;
    font-size: 12px;
}

.availability-heading,
.availability-side {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.availability-heading {
    justify-content: space-between;
    color: #8b949e;
    margin-bottom: 7px;
}

.availability-heading time { font-size: 10px; }
.availability-message { margin: 0; color: #8b949e; }
.availability-unavailable {
    margin: -2px 0 10px;
    color: #8b949e;
    font-size: 11px;
    line-height: 1.25;
}
.availability-unavailable span { margin-right: 3px; }
.availability-side + .availability-side { margin-top: 6px; }
.availability-side > strong { color: #c9d1d9; margin-right: 2px; }

.availability-player {
    padding: 3px 6px;
    border-radius: 999px;
    color: #c9d1d9;
    background: #21262d;
}

.availability-player b { font-weight: 600; }
.availability-player small { color: #8b949e; }
.availability-player.is-missing b { color: #f85149; }
.availability-player.is-questionable b { color: #d29922; }

.pick-availability.compact {
    margin: 7px 0 0;
    padding: 6px 7px;
    min-width: 260px;
    white-space: normal;
}

.pick-availability.compact .availability-heading { margin-bottom: 4px; }

.pick-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 0;
    background-color: #0d1117;
    border: 1px solid #21262d;
    border-radius: 8px;
    padding: 8px 10px;
    font-variant-numeric: tabular-nums;
    align-items: center;
}

.pick-stats.league-god-mode {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    row-gap: 8px;
}
.pick-stats.league-god-mode .stat-probs,
.pick-stats.league-god-mode .stat-mkt,
.pick-stats.league-god-mode .stat-pick { grid-column: span 2; }
.pick-stats.league-god-mode .stat-stab {
    grid-column: span 6;
    text-align: center;
    padding: 6px 0 0;
    border-left: none;
    border-top: 1px solid #21262d;
}

.pick-stats.without-god-mode {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pick-stats .stat {
    padding: 0 6px;
    min-width: 0;
}

.pick-stats .stat-probs {
    text-align: left;
    padding-left: 0;
}

.pick-stats .stat-mkt {
    text-align: center;
    border-left: 1px solid #21262d;
}

.pick-stats .stat-pick {
    text-align: center;
    border-left: 1px solid #21262d;
}

.pick-stats .stat-stab {
    text-align: right;
    padding-right: 0;
    border-left: 1px solid #21262d;
}

.market-pos {
    color: #3fb950;
}

.market-neg {
    color: #f85149;
}

.pick-stats .label {
    display: block;
    margin-bottom: 2px;
    color: #6e7681;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pick-stats strong {
    display: block;
    color: #e6edf3;
    font-size: 13px;
    font-weight: 600;
}

.stat-sep {
    color: #30363d;
    margin: 0 1px;
}

.stat-pct {
    color: #8b949e;
    font-size: 11px;
    font-weight: 400;
    margin-left: 3px;
}

.stat-pick-inner {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
}

.pick-badge-card {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #e6edf3;
    background-color: #21262d;
    border: 1px solid #30363d;
}

.pick-badge-card.fav {
    background-color: rgba(35, 134, 54, 0.15);
    color: #3fb950;
    border-color: rgba(35, 134, 54, 0.45);
}

@media (max-width: 768px) {
    .grid-desktop {
        display: none;
    }

    .grid-cards {
        display: grid;
        gap: 10px;
    }

    .table-card.cards {
        background-color: transparent;
        border: none;
    }

    .table-card.cards .table-responsive {
        display: none;
    }
}

/* ---- Mobile polish: touch targets, date centering, card flow ---- */
@media (max-width: 768px) {
    .top-bar {
        justify-content: center;
    }

    .date-input {
        width: auto;
        min-width: 200px;
        box-sizing: border-box;
        text-align: center;
        padding: 10px 18px;
        font-size: 15px;
    }

    .tab-btn,
    .seg-btn,
    .pager-btn {
        padding: 10px 16px;
        font-size: 14px;
        min-height: 40px;
    }

    .controls-bar {
        gap: 0;
    }

    .pick-card {
        padding: 16px;
    }

    .pick-top {
        align-items: flex-start;
        margin-bottom: 8px;
    }

    .pick-league {
        font-size: 11px;
        line-height: 1.4;
    }

    .pick-title-row {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        margin-bottom: 14px;
    }

    .pick-kickoff {
        justify-content: space-between;
        font-size: 13px;
        color: #8b949e;
        border-top: 1px solid #21262d;
        padding-top: 6px;
        margin-top: 4px;
    }

    .pick-stats {
        padding: 10px 12px;
    }

    .pick-stats strong,
    .pick-badge-card {
        font-size: 14px;
    }
}

/* ---- Mobile: every touch target is at least 44px tall ---- */
@media (max-width: 768px) {
    button,
    .login-btn,
    .site-nav-link,
    .pager-btn {
        min-height: 44px;
    }

    button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .tab-btn,
    .seg-btn,
    .btn-small {
        padding-top: 10px;
        padding-bottom: 10px;
    }
}

/* ---- Market reference columns ---- */
.edge-col,
.odds-col {
    white-space: nowrap;
}

.market-prob {
    color: #8b949e;
    font-size: 12px;
}

.edge-value {
    margin-left: 6px;
    font-weight: 600;
    font-size: 12px;
}

.edge-pos {
    color: #3fb950;
}

.edge-neg {
    color: #f85149;
}

.price {
    color: #e6edf3;
    font-weight: 600;
}

.odds-col .price {
    margin-right: 6px;
}

.closing {
    margin-left: 8px;
    font-size: 12px;
    color: #8b949e;
}

.clv-pos {
    color: #3fb950;
}

.clv-neg {
    color: #f85149;
}

/* ---- Country flags ---- */
.country-flag {
    display: inline-block;
    width: 22px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    vertical-align: -2px;
    align-self: center;
}

.country-name {
    color: #8b949e;
    font-size: 12px;
}

.pick-league .country-flag {
    width: 22px;
    height: 16px;
}

.pick-league .country-name {
    font-size: 12px;
}

/* The flag replaces the country text, so the header no longer needs its width. */
.country-col {
    width: 40px;
    text-align: center;
}
.quota-breakdown { padding: 0 16px 14px; color: #6e7681; font-size: 12px; word-break: break-word; }

/* A table directly under the panel heading needs the same breathing room the
   other blocks get from their own padding. */
.panel-head + .table-responsive {
    padding-top: 4px;
}

/* The price for the pick sits with the kickoff, right-aligned under the teams. */
.pick-kickoff .card-odds {
    color: #e6edf3;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* Keep the selected day visible and editable on mobile too. */
@media (max-width: 768px) {
    .date-picker-area {
        display: flex;
        justify-content: center;
    }

    .date-picker-area .date-input {
        min-width: 0;
        max-width: 100%;
    }
}

/* Inside a card the market value and edge follow the card's own type scale rather
   than the desktop column sizes, so every number in the panel reads the same. */
.pick-stats .market-prob,
.pick-stats .edge-value {
    font-size: inherit;
    font-weight: inherit;
}

.pick-stats .market-prob {
    color: #8b949e;
}

/* ---- Live fixture indicator ---- */
.live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #3fb950;
    flex: 0 0 auto;
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* ---- Venue match count ---- */
/* Small amber badge next to each team: how many matches at that venue its rating
   rests on. A thin number means a thin rating, which the probabilities alone hide. */
.venue-count {
    display: inline-block;
    margin-left: 5px;
    padding: 0 5px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    line-height: 15px;
    vertical-align: 1px;
    color: #e3b341;
    background-color: #2b2412;
    border: 1px solid #6b5a1e;
    font-variant-numeric: tabular-nums;
}
.division-transition {
    display: inline-block;
    margin-left: 5px;
    padding: 0 5px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    line-height: 15px;
    vertical-align: 1px;
    border: 1px solid currentColor;
    font-variant-numeric: tabular-nums;
}
.division-transition.promoted { color: #228653; }
.division-transition.relegated { color: #b46320; }

/* League grouping uses the existing compact table/card palette. */
.data-table .picks-league-group-row th {
    background: #161b22;
    padding: 9px 12px;
    text-align: left;
    border-top: 1px solid #30363d;
}
.picks-league-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    color: #8b949e;
    font-size: 12px;
    font-weight: 400;
}
.picks-league-name { color: #e6edf3; font-weight: 600; }
.picks-league-count { margin-left: auto; white-space: nowrap; }
.picks-league-group-mobile {
    grid-column: 1 / -1;
    padding: 9px 2px;
    margin-bottom: 6px;
    border-top: 1px solid #30363d;
}

/* Keep long mobile filter rows inside the card and swipe their options. */
@media (max-width: 768px) {
    .controls-bar,
    .controls-bar .controls-group,
    .controls-bar .slider-group {
        min-width: 0;
        max-width: 100%;
    }

    .controls-bar .slider-group > label {
        flex: 0 0 auto;
    }

    .controls-bar .slider-group > .seg {
        flex: 1 1 0;
        min-width: 0;
        width: auto;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
    }

    .controls-bar .slider-group > .seg > .seg-btn {
        flex: 0 0 auto;
        white-space: nowrap;
    }
}

/* One consistent label column, including the shared Division/Phase controls. */
@media (max-width: 768px) {
    .controls-bar .slider-group.slider-group {
        flex-wrap: nowrap;
        gap: 12px;
        padding: 12px 14px;
        min-height: 68px;
    }

    .controls-bar .slider-group > label {
        flex: 0 0 80px;
        width: 80px;
        font-size: 13px;
        font-weight: 500;
        line-height: 1.4;
    }

    .controls-bar .slider-group > label small {
        display: block;
        margin-top: 3px;
        color: #8b949e;
        font-size: 11px;
    }

    .controls-bar .controls-group .slider-group .seg,
    .controls-bar > .slider-group > .seg {
        flex-wrap: nowrap;
    }

    .controls-bar .slider-group > .seg > .seg-btn {
        min-width: 48px;
        padding: 10px 12px;
    }

    .controls-bar .tabs {
        width: auto;
        min-width: 0;
        gap: 4px;
        padding: 10px 14px;
    }

    .controls-bar .tabs > .tab-btn {
        white-space: nowrap;
        padding: 10px 8px;
    }
}
