/* ── Sport editorial design system (green accent) ── */
:root {
    --paper: #f0f0eb;
    --surface: #ffffff;
    --surface-muted: #f7f7f3;
    --ink: #1a1a18;
    --ink-muted: #5c5c56;
    --ink-faint: #8a8a82;
    --border: #d9d9d2;
    --border-strong: #c4c4bc;
    --accent: #00e5a0;
    --accent-dark: #00a870;
    --accent-soft: #e6faf3;
    --live: #dc2626;
}

body {
    background: var(--paper);
    color: var(--ink);
}

/* ── Layout blocks ── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 1px 0 rgba(26, 26, 24, 0.04);
}

.card-header {
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: var(--surface-muted);
}

.section-kicker {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-dark);
}

.section-title {
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--ink);
}

.hero-editorial {
    background: var(--surface);
    border-bottom: 3px solid var(--accent);
}

.hero-editorial-inner {
    border-bottom: 1px solid var(--border);
}

.hero-editorial-grid {
    display: grid;
    gap: 1.5rem;
    align-items: start;
}

.hero-copy-intro .section-title {
    margin-bottom: 0;
}

@media (max-width: 767px) {
    .hero-editorial-grid {
        grid-template-columns: 1fr;
    }

    .hero-copy-intro {
        order: 1;
    }

    .hero-visual-wrap {
        order: 2;
    }

    .hero-copy-rest {
        order: 3;
    }

    .hero-visual {
        max-width: 280px;
        min-height: 280px;
    }
}

@media (min-width: 768px) {
    .hero-editorial-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 2.5rem;
        align-items: stretch;
    }

    .hero-copy-intro {
        grid-column: 1;
        grid-row: 1;
    }

    .hero-copy-rest {
        grid-column: 1;
        grid-row: 2;
    }

    .hero-visual-wrap {
        grid-column: 2;
        grid-row: 1 / span 2;
        align-self: center;
        justify-self: end;
    }

    .hero-copy-intro .section-title {
        margin-bottom: 1.25rem;
    }
}

/* ── Navigation ── */
.site-nav {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 0 rgba(26, 26, 24, 0.03);
}

.nav-link {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ink-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-link:hover {
    color: var(--ink);
}

.nav-link-active {
    color: var(--accent-dark);
    border-bottom-color: var(--accent);
}

/* ── Buttons & filters ── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    padding: 0.625rem 1.25rem;
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--ink);
    background: var(--accent);
    border: 2px solid var(--accent);
    transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-primary:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: #fff;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    padding: 0.625rem 1.25rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--ink);
    background: var(--surface);
    border: 2px solid var(--border-strong);
    transition: border-color 0.15s ease, color 0.15s ease;
}

.btn-secondary:hover {
    border-color: var(--accent-dark);
    color: var(--accent-dark);
}

.btn-compact {
    padding: 0.45rem 1rem;
    font-size: 0.8125rem;
}

.btn-match-cta {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-dark);
    background: var(--accent-soft);
    border: 1px solid rgba(0, 168, 112, 0.35);
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-match-cta:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--ink);
}

.hero-next-match-card {
    position: relative;
    padding: 1rem 1.125rem;
    border: 1px solid var(--border);
    background: var(--surface);
}

.hero-world-champion-card {
    position: relative;
    padding: 1rem 1.125rem;
    border: 1px solid rgba(176, 138, 42, 0.28);
    background: linear-gradient(145deg, #f3e4bc 0%, #fffdf8 42%, #f8efd6 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.hero-world-champion-card .section-kicker {
    color: #8a6b1f;
}

.hero-next-match-cta {
    position: absolute;
    top: 1rem;
    right: 1.125rem;
    z-index: 1;
}

.hero-next-match-kicker {
    margin-bottom: 0.5rem;
    padding-right: 10.5rem;
}

.hero-next-match-header {
    padding-right: 10.5rem;
}

.hero-next-game {
    max-width: none;
}

.hero-next-match-main .consensus-bar-meta-block,
.hero-next-match-card .consensus-bar-meta-block {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem 0.625rem;
    margin-top: 0.5rem;
}

.hero-next-match-main .consensus-bar-meta,
.hero-next-match-card .consensus-bar-meta {
    margin: 0;
}

.hero-next-match-main .model-logos-strip,
.hero-next-match-card .model-logos-strip {
    margin-top: 0;
    gap: 0.2rem;
}

@media (min-width: 768px) {
    .hero-next-match-card .consensus-score {
        text-align: left;
    }

    .hero-next-match-card .consensus-score-heading {
        justify-content: flex-start;
    }

    .hero-next-match-card .consensus-score .score-display {
        font-size: 1.75rem;
    }
}

.filter-tab {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ink-muted);
    background: var(--surface);
    border: 1px solid var(--border);
}

.filter-tab:hover {
    border-color: var(--border-strong);
    color: var(--ink);
}

.filter-tab-active {
    color: var(--accent-dark);
    background: var(--accent-soft);
    border-color: var(--accent);
}

/* ── Horizontal table scroll hint ── */
.table-scroll-wrap {
    position: relative;
}

.table-scroll-area {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

.table-scroll-wrap.is-scrollable::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 2.75rem;
    pointer-events: none;
    background: linear-gradient(to left, var(--surface) 20%, transparent);
    opacity: 1;
    transition: opacity 0.2s ease;
    z-index: 4;
}

.table-scroll-wrap.is-at-end::after {
    opacity: 0;
}

/* ── Tables (league-table feel) ── */
.table-editorial thead tr {
    background: var(--surface-muted);
    border-bottom: 2px solid var(--border-strong);
}

.table-editorial thead th {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.table-editorial tbody tr {
    border-bottom: 1px solid var(--border);
}

.table-row-hover:hover {
    background: var(--accent-soft);
}

.ranking-row-leader {
    background: var(--accent-soft);
}

.ranking-row-leader td:first-child {
    box-shadow: inset 3px 0 0 var(--accent);
}

@media (max-width: 767px) {
    .ranking-table-main {
        font-size: 0.8125rem;
    }

    .ranking-table-main .ranking-chevron {
        display: none;
    }

    .ranking-table-main .ranking-col-place {
        width: 2rem;
        max-width: 2.5rem;
        padding-right: 0.25rem;
    }

    .ranking-table-main .ranking-place-num {
        font-size: 0.8125rem;
        gap: 0;
    }

    .ranking-table-main .ranking-place-rank--with-medal {
        display: none;
    }

    .ranking-table-main .sticky-col {
        position: sticky;
        left: 0;
        z-index: 2;
        background: var(--surface);
        box-shadow: 4px 0 8px -4px rgba(26, 26, 24, 0.08);
        max-width: 8.5rem;
    }

    .ranking-table-main thead .sticky-col {
        background: var(--surface-muted);
        z-index: 3;
    }

    .ranking-table-main .table-row-hover:hover .sticky-col,
    .ranking-table-main .ranking-row-leader .sticky-col {
        background: var(--accent-soft);
    }

    .ranking-table-main .ranking-row-leader td:first-child {
        box-shadow: none;
    }

    .ranking-table-main .ranking-row-leader .sticky-col {
        box-shadow:
            inset 3px 0 0 var(--accent),
            4px 0 8px -4px rgba(26, 26, 24, 0.08);
    }

    .ranking-table-main .ranking-model-name {
        font-size: 0.8125rem;
    }

    .ranking-table-main .provider-logo {
        width: 16px !important;
        height: 16px !important;
    }

    .ranking-table-main .ranking-league-badge {
        display: none;
    }

    .ranking-table-main .ranking-points {
        font-size: 1rem;
    }

    .ranking-table-main .btn-match-cta {
        padding: 0.25rem 0.45rem;
        font-size: 0.6875rem;
    }

    .ranking-table-main .ranking-col-cta {
        width: 4.25rem;
    }

    .ranking-table-main .match-pred-detail td {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .ranking-table-main .ranking-provider-sub {
        display: none;
    }

    .ranking-table-main .ranking-cta-label--long {
        display: none;
    }

    .ranking-table-main .ranking-cta-label--short {
        display: inline;
    }
}

.ranking-cta-label--short {
    display: none;
}

.ranking-cta-label--long {
    display: inline;
}

@media (min-width: 768px) {
    .ranking-table-main .ranking-provider-sub {
        display: block;
    }

    .matches-match-compact {
        display: none;
    }

    .matches-match-full {
        display: block;
    }
}

.matches-match-compact {
    display: none;
}

.matches-match-full {
    display: block;
}

@media (max-width: 767px) {
    .matches-table {
        font-size: 0.8125rem;
    }

    .matches-table .model-date-cell {
        width: 3.25rem;
        max-width: 3.5rem;
        padding-right: 0.35rem;
    }

    .matches-table .sticky-col {
        position: sticky;
        left: 0;
        z-index: 2;
        background: var(--surface);
        box-shadow: 4px 0 8px -4px rgba(26, 26, 24, 0.08);
        max-width: 8.5rem;
    }

    .matches-table thead .sticky-col {
        background: var(--surface-muted);
        z-index: 3;
    }

    .matches-table .table-row-hover:hover .sticky-col {
        background: var(--accent-soft);
    }

    .matches-match-compact {
        display: flex;
    }

    .matches-match-full {
        display: none;
    }

    .matches-table .matches-col-round {
        max-width: 5.5rem;
        font-size: 0.75rem;
        line-height: 1.3;
    }

    .matches-table .matches-best-tip-detail,
    .matches-table .matches-best-tip-pending {
        display: none;
    }

    .matches-table .btn-match-cta {
        padding: 0.25rem 0.45rem;
        font-size: 0.6875rem;
    }

    .matches-table .matches-col-cta {
        width: 4.25rem;
    }

    .matches-table .meta-tag {
        font-size: 0.625rem;
        padding: 0.2rem 0.45rem;
    }
}

/* ── Scores & points ── */
.points-big {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-dark);
    letter-spacing: 0.02em;
}

.points-pill {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.2rem 0.5rem;
    background: var(--accent-soft);
    color: var(--accent-dark);
    border: 1px solid rgba(0, 229, 160, 0.35);
}

.score-display {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: 0.06em;
}

.text-accent {
    color: var(--accent-dark);
}

.text-ink {
    color: var(--ink);
}

.text-ink-muted {
    color: var(--ink-muted);
}

.link-accent {
    color: var(--accent-dark);
    font-weight: 600;
}

.link-accent:hover {
    text-decoration: underline;
}

/* ── Leader banner ── */
.leader-banner {
    border-left: 4px solid var(--accent);
    background: var(--surface);
}

/* ── League badges ── */
.league-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 2px 7px;
    font-family: ui-monospace, monospace;
}

.league-badge-flagship {
    background: var(--accent-soft);
    color: var(--accent-dark);
    border: 1px solid rgba(0, 229, 160, 0.35);
}

.league-badge-mini {
    background: #eef6f2;
    color: #3d7a62;
    border: 1px solid #c5ddd2;
}

.league-section-flagship {
    border-left: 4px solid var(--accent);
}

.league-section-mini {
    border-left: 4px solid #3d7a62;
}

/* ── Hero: floating tip cards around trophy ── */
.hero-visual-wrap {
    min-height: 0;
}

.hero-visual {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 3 / 4;
    min-height: 320px;
}

.hero-trophy {
    width: 58%;
    max-width: 200px;
    animation: hero-float 6s ease-in-out infinite;
}

.hero-prediction {
    position: absolute;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.5rem 0.65rem;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    box-shadow: 0 2px 8px rgba(26, 26, 24, 0.06);
    animation: hero-float 5s ease-in-out infinite;
}

.hero-pred-score {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.04em;
    color: var(--accent-dark);
}

.hero-pred-1 { top: 10%; left: 0; z-index: 25; animation-delay: 0s; }
.hero-pred-2 { top: 14%; right: -2%; z-index: 8; animation-delay: 1.2s; }
.hero-pred-3 { bottom: 28%; left: 8%; z-index: 25; animation-delay: 2.4s; }
.hero-pred-4 { bottom: 22%; right: -4%; z-index: 8; animation-delay: 1.8s; }
.hero-pred-5 { top: 42%; right: 12%; z-index: 25; animation-delay: 3s; }

@media (min-width: 640px) {
    .hero-visual {
        max-width: 360px;
        min-height: 360px;
    }

    .hero-pred-score {
        font-size: 1.35rem;
    }

    .hero-pred-1 { top: 8%; left: 2%; }
    .hero-pred-2 { top: 12%; right: 0; }
    .hero-pred-3 { bottom: 26%; left: 12%; }
    .hero-pred-4 { bottom: 20%; right: -2%; }
    .hero-pred-5 { top: 40%; right: 14%; }
}

@media (min-width: 768px) {
    .hero-visual-wrap {
        align-self: stretch;
    }

    .hero-visual {
        max-width: 380px;
        min-height: 100%;
        aspect-ratio: auto;
        height: 100%;
    }

    .hero-trophy {
        width: 62%;
        max-width: 240px;
    }

    .hero-prediction {
        padding: 0.55rem 0.7rem;
    }

    .hero-pred-score {
        font-size: 1.35rem;
    }
}

@media (min-width: 1024px) {
    .hero-visual {
        max-width: 420px;
        min-height: 460px;
    }

    .hero-trophy {
        width: 64%;
        max-width: 260px;
    }

    .hero-prediction {
        padding: 0.55rem 0.75rem;
    }

    .hero-pred-score {
        font-size: 1.4rem;
    }
}

@keyframes hero-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* ── Consensus prediction bar (all models) ── */
.consensus-score {
    text-align: center;
}

.consensus-score .score-display {
    line-height: 1.1;
}

.consensus-bar {
    margin-top: 0.25rem;
}

.consensus-bar-track {
    display: flex;
    height: 0.75rem;
    width: 100%;
    background: var(--border);
    overflow: hidden;
}

.consensus-bar-seg {
    height: 100%;
    min-width: 2px;
    flex-shrink: 0;
    transition: width 0.5s ease;
}

.consensus-bar-home {
    background: var(--accent);
}

.consensus-bar-draw {
    background: var(--ink-faint);
}

.consensus-bar-away {
    background: var(--ink-muted);
}

.consensus-bar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin-top: 0.625rem;
    font-size: 0.75rem;
    color: var(--ink-muted);
}

.consensus-bar-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.consensus-bar-legend-item strong {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    color: var(--ink);
    font-weight: 700;
}

.consensus-bar-dot {
    width: 0.5rem;
    height: 0.5rem;
    flex-shrink: 0;
}

.consensus-bar-meta {
    margin-top: 0;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.consensus-bar-meta-block {
    margin-top: 0.5rem;
}

.model-logos-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.375rem;
}

.model-logos-strip-item {
    display: inline-flex;
    align-items: center;
    line-height: 0;
    transition: opacity 0.15s ease;
}

.model-logos-strip-item.is-pending {
    opacity: 0.3;
    filter: grayscale(0.6);
}

.model-logos-strip-item .provider-logo {
    display: inline-block;
    padding: 0;
    background-color: var(--ink-faint);
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

.provider-logo {
    background-color: var(--ink-faint);
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

.provider-logo-fallback {
    filter: grayscale(1) brightness(0.55);
    opacity: 0.9;
}

.prob-bar-stacked-wrap {
    min-width: 140px;
    max-width: 240px;
}

.prob-bar-stacked-compact {
    height: 0.625rem;
}

.prob-bar-stacked-labels {
    display: flex;
    justify-content: space-between;
    gap: 0.25rem;
    margin-top: 0.25rem;
    font-size: 0.625rem;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    color: var(--ink-faint);
}

.match-predictions-table td {
    vertical-align: middle;
}

.match-pred-pending td {
    background: color-mix(in srgb, #f7f7f3 75%, transparent);
}

.model-schedule-round-row td {
    letter-spacing: 0.06em;
}

.model-date-stack {
    display: none;
}

.model-date-full {
    display: inline;
}

@media (max-width: 767px) {
    .match-predictions-table {
        font-size: 0.8125rem;
    }

    .match-predictions-table .match-pred-chevron-col {
        display: none;
    }

    .model-date-stack {
        display: block;
    }

    .model-date-full {
        display: none;
    }

    .match-predictions-table .model-date-cell {
        width: 3.25rem;
        max-width: 3.5rem;
        padding-right: 0.35rem;
    }

    .match-predictions-table .sticky-col {
        position: sticky;
        left: 0;
        z-index: 2;
        background: var(--surface);
        box-shadow: 4px 0 8px -4px rgba(26, 26, 24, 0.08);
        max-width: 8.5rem;
    }

    .match-predictions-table thead .sticky-col {
        background: var(--surface-muted);
        z-index: 3;
    }

    .match-predictions-table .table-row-hover:hover .sticky-col,
    .match-predictions-table .match-pred-toggle.is-open .sticky-col {
        background: var(--accent-soft);
    }

    .match-predictions-table .match-pred-pending .sticky-col {
        background: color-mix(in srgb, #f7f7f3 75%, transparent);
    }

    .match-predictions-table .model-forecast-col {
        min-width: 5.5rem;
        max-width: 6.5rem;
    }

    .match-predictions-table .model-pred-points {
        font-size: 1rem;
    }

    .match-predictions-table .btn-match-cta {
        padding: 0.25rem 0.45rem;
        font-size: 0.6875rem;
    }

    .match-predictions-table .model-pred-cta-col {
        width: 4.25rem;
    }

    .match-predictions-table .match-pred-detail td {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .match-detail-predictions-table .match-pred-rank-col .match-pred-chevron {
        display: none;
    }

    /* Model schedule: horizontal scroll like match detail — full forecast bar, no sticky squeeze */
    .model-schedule-predictions-table .sticky-col {
        position: static;
        left: auto;
        z-index: auto;
        max-width: none;
        box-shadow: none;
        background: transparent;
    }

    .model-schedule-predictions-table thead .sticky-col,
    .model-schedule-predictions-table .table-row-hover:hover .sticky-col,
    .model-schedule-predictions-table .match-pred-toggle.is-open .sticky-col,
    .model-schedule-predictions-table .match-pred-pending .sticky-col {
        background: transparent;
    }

    .model-schedule-predictions-table .model-forecast-col {
        min-width: 8.75rem;
        max-width: none;
        width: auto;
        overflow: visible;
        padding-right: 1rem;
    }

    .model-schedule-predictions-table .model-forecast-col .prob-bar-stacked-wrap {
        min-width: 8.75rem;
        max-width: 15rem;
        width: 8.75rem;
    }

    .model-schedule-predictions-table .model-pred-points-col {
        min-width: 2.75rem;
        width: auto;
        padding-left: 0.75rem;
        white-space: nowrap;
    }
}

.match-pred-toggle:focus-visible,
.ranking-row-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.match-pred-toggle.is-open,
.ranking-row-toggle.is-open {
    background: var(--accent-soft);
}

.match-pred-toggle.is-open .match-pred-chevron,
.ranking-row-toggle.is-open .match-pred-chevron {
    color: var(--accent-dark);
}

.match-pred-detail td {
    background: var(--surface-muted);
    vertical-align: top;
    overflow: visible;
}

.match-pred-chevron {
    display: inline-block;
    width: 0.75rem;
    margin-right: 0.25rem;
    font-size: 0.625rem;
    transition: transform 0.15s ease;
}

.match-pred-toggle.is-open .match-pred-chevron,
.ranking-row-toggle.is-open .match-pred-chevron {
    transform: rotate(90deg);
}

/* ── Schedule scroll ── */
.schedule-scroll {
    scrollbar-width: thin;
    scrollbar-color: var(--accent-dark) var(--border);
}

.schedule-scroll::-webkit-scrollbar {
    width: 6px;
}

.schedule-scroll::-webkit-scrollbar-track {
    background: var(--surface-muted);
}

.schedule-scroll::-webkit-scrollbar-thumb {
    background: var(--accent-dark);
}

.schedule-day-label {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-dark);
    padding: 0.25rem 0;
    border-bottom: 2px solid var(--accent);
    margin-bottom: 0.5rem;
}

.schedule-item {
    display: block;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--border);
    background: var(--surface);
    transition: border-color 0.15s ease, background 0.15s ease;
}

.schedule-item:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.schedule-item-cta {
    font-weight: 700;
    color: var(--accent-dark);
    white-space: nowrap;
    transition: color 0.15s ease;
}

.schedule-item:hover .schedule-item-cta {
    color: var(--ink);
}

.leaderboard-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--border);
    background: var(--surface);
    transition: border-color 0.15s ease, background 0.15s ease;
}

.leaderboard-row:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}

/* ── Probability bars ── */
.prob-bar {
    height: 5px;
    background: var(--border);
    overflow: hidden;
}

.prob-bar-fill {
    height: 100%;
    transition: width 0.4s ease;
}

/* ── Metric hints ── */
.metric-hint {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    color: var(--ink-muted);
    cursor: help;
    vertical-align: middle;
}

.metric-hint-icon {
    display: block;
    width: 0.875rem;
    height: 0.875rem;
}

.metric-hint:hover,
.metric-hint:focus-visible {
    color: var(--accent-dark);
}

.metric-hint-tooltip {
    position: absolute;
    z-index: 50;
    top: calc(100% + 0.45rem);
    right: 0;
    width: max-content;
    max-width: 14rem;
    padding: 0.5rem 0.65rem;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    color: var(--ink-muted);
    font-size: 0.7rem;
    font-weight: 400;
    line-height: 1.4;
    text-transform: none;
    letter-spacing: normal;
    box-shadow: 0 4px 12px rgba(26, 26, 24, 0.08);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.metric-hint:hover .metric-hint-tooltip,
.metric-hint:focus-visible .metric-hint-tooltip {
    opacity: 1;
    visibility: visible;
}

.match-pred-detail .metric-hint-tooltip,
.calibration-stats .metric-hint-tooltip,
.model-stats-hints .metric-hint-tooltip {
    top: auto;
    bottom: calc(100% + 0.45rem);
    left: 0;
    right: auto;
}

.bonus-col-hint .metric-hint-tooltip {
    max-width: 20rem;
    text-align: left;
}

.bonus-table {
    width: fit-content;
    min-width: 100%;
}

.bonus-table .metric-hint-tooltip {
    width: 18rem;
    max-width: min(18rem, 80vw);
}

.calibration-stats .metric-hint-tooltip,
.match-pred-detail .metric-hint-tooltip {
    max-width: 18rem;
    text-align: left;
    white-space: normal;
}

.bonus-table .sticky-col {
    background: var(--surface);
}

@media (min-width: 640px) {
    .bonus-table .sticky-col {
        position: sticky;
        left: 0;
        z-index: 2;
        box-shadow: 4px 0 8px -4px rgba(26, 26, 24, 0.06);
    }
}

/* ── Logo ── */
.site-brand {
    gap: 0.375rem;
}

.site-logo-icon {
    width: 1.625rem;
    height: 1.625rem;
    flex-shrink: 0;
    display: block;
}

.site-logo {
    font-family: 'Oswald', sans-serif;
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--ink);
    transition: color 0.15s ease;
}

a.site-brand:hover .site-logo {
    color: var(--accent);
}

/* ── Footer ── */
.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    color: var(--ink-muted);
}

.site-footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

@media (min-width: 768px) {
    .site-footer-inner {
        flex-direction: row;
    }
}

.site-footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    column-gap: 1.25rem;
    row-gap: 0.5rem;
}

.site-footer-lang {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.site-footer-sep {
    color: var(--ink-faint);
    user-select: none;
}

@media (min-width: 640px) {
    .site-footer-sep--pipe {
        display: inline;
    }
}

@media (max-width: 639px) {
    .site-footer-sep--pipe {
        display: none;
    }
}

/* ── Admin overlay (keep functional) ── */
.admin-generate-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(26, 26, 24, 0.55);
}

.admin-generate-overlay[hidden] {
    display: none;
}

.admin-spinner {
    width: 2.5rem;
    height: 2.5rem;
    margin: 0 auto;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: admin-spin 0.75s linear infinite;
}

.meta-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.25rem 0.625rem;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    color: var(--ink-muted);
    vertical-align: middle;
}

.meta-tag.badge-scheduled,
.meta-tag.badge-finished {
    font-weight: 400;
}

.meta-tag.badge-finished {
    background: var(--accent-soft);
    color: var(--accent-dark);
    border-color: rgba(0, 229, 160, 0.35);
}

.meta-tag.badge-live {
    background: #fef2f2;
    color: var(--live);
    border-color: #fecaca;
    animation: badge-live-blink 1.5s ease-in-out infinite;
}

.meta-tag.badge-live::before {
    content: '';
    display: inline-block;
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
    background: var(--live);
    margin-right: 0.35rem;
    animation: badge-live-blink 1.5s ease-in-out infinite;
}

@keyframes badge-live-blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.45;
    }
}

.input-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 0.35rem;
}

.input-editorial {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: var(--ink);
}

.input-editorial:focus {
    outline: 2px solid var(--accent);
    outline-offset: 0;
    border-color: var(--accent);
}

textarea.input-editorial,
.input-editorial-textarea {
    min-height: 9rem;
    resize: vertical;
    line-height: 1.5;
}

.contact-form .select-editorial-wrap {
    width: 100%;
}

.contact-honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.contact-alert {
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-strong);
    font-size: 0.875rem;
    line-height: 1.5;
}

.contact-alert-success {
    background: var(--accent-soft);
    border-color: rgba(0, 168, 112, 0.35);
    color: var(--accent-dark);
}

.contact-alert-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.contact-alert-warning {
    background: var(--surface-muted);
    color: var(--ink-muted);
}

/* ── Admin (editorial, square corners) ── */
.admin-page .admin-subpanel {
    padding: 1rem;
    border: 1px solid var(--border);
    background: var(--surface-muted);
}

.admin-page .admin-subpanel-accent {
    border-color: rgba(0, 168, 112, 0.35);
    background: var(--accent-soft);
}

.admin-page .admin-details {
    border: 1px solid var(--border);
    background: var(--surface-muted);
}

.admin-page .admin-details summary {
    cursor: pointer;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ink-muted);
}

.admin-page .admin-details-body {
    padding: 0.25rem 1rem 1rem;
}

.admin-page .admin-action-card {
    width: 100%;
    text-align: left;
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--border);
    background: var(--surface);
    transition: border-color 0.15s ease, color 0.15s ease;
    cursor: pointer;
}

.admin-page .admin-action-card:hover {
    border-color: var(--accent);
}

.admin-page .admin-action-card-accent {
    border-left: 4px solid var(--accent);
}

.admin-page .admin-action-card-danger {
    border-color: rgba(220, 38, 38, 0.25);
}

.admin-page .admin-action-card-danger:hover {
    border-color: rgba(220, 38, 38, 0.45);
}

.admin-page .admin-status-tile {
    padding: 0.75rem;
    border: 1px solid var(--border);
    background: var(--surface-muted);
}

.admin-page .admin-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid var(--border-strong);
}

.admin-page .admin-badge-ok {
    color: var(--accent-dark);
    background: var(--accent-soft);
    border-color: rgba(0, 168, 112, 0.35);
}

.admin-page .admin-badge-error {
    color: #991b1b;
    background: #fef2f2;
    border-color: #fecaca;
}

.admin-page .admin-textarea-mono {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--ink-muted);
    background: var(--paper);
}

.admin-page .admin-file-input {
    font-size: 0.75rem;
    color: var(--ink-muted);
}

.admin-page .admin-file-input::file-selector-button {
    margin-right: 0.75rem;
    padding: 0.5rem 0.75rem;
    border: 0;
    background: var(--surface-muted);
    color: var(--ink);
    font-weight: 600;
    cursor: pointer;
}

.admin-page .admin-table-wrap {
    max-height: 24rem;
    overflow: auto;
}

.admin-page .admin-table thead {
    background: var(--surface-muted);
    position: sticky;
    top: 0;
}

.admin-page .admin-table tbody tr {
    border-bottom: 1px solid var(--border);
}

.admin-page .admin-table tbody tr.admin-table-row-error {
    background: #fef2f2;
}

.select-editorial-wrap {
    position: relative;
}

.select-editorial-wrap::after {
    content: '';
    pointer-events: none;
    position: absolute;
    top: 50%;
    right: 0.75rem;
    width: 1rem;
    height: 1rem;
    transform: translateY(-50%);
    background-color: var(--ink-faint);
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
}

.select-editorial {
    width: 100%;
    appearance: none;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    padding: 0.5rem 2.25rem 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.select-editorial:hover {
    border-color: var(--accent-dark);
}

.select-editorial:focus {
    outline: 2px solid var(--accent);
    outline-offset: 0;
    border-color: var(--accent);
}

/* ── Team picker (nation dropdown with flags) ── */
.team-picker {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.team-picker--block {
    display: block;
}

.team-picker--block .team-picker-inner {
    width: 100%;
}

.team-picker--block .team-picker-trigger {
    width: 100%;
    min-width: 0;
}

.team-picker-label-text {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-muted);
    white-space: nowrap;
}

.team-picker-inner {
    position: relative;
    min-width: 11rem;
}

.team-picker-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    min-width: 0;
    min-height: 2.375rem;
    padding: 0.4375rem 0.625rem;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.team-picker-trigger:hover {
    border-color: var(--accent-dark);
}

.team-picker-trigger:focus {
    outline: 2px solid var(--accent);
    outline-offset: 0;
    border-color: var(--accent);
}

.team-picker-trigger[aria-expanded="true"] {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}

.team-picker-flag {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    min-width: 1.25rem;
}

.team-picker-current {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.team-picker-chevron {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    color: var(--ink-faint);
    transition: transform 0.15s ease;
}

.team-picker-trigger[aria-expanded="true"] .team-picker-chevron {
    transform: rotate(180deg);
}

.team-picker-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 40;
    max-height: 16rem;
    overflow-y: auto;
    margin: 0;
    padding: 0.25rem;
    list-style: none;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    box-shadow: 0 8px 24px rgba(26, 26, 24, 0.12);
}

.team-picker-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.4375rem 0.5rem;
    border: none;
    background: transparent;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
}

.team-picker-option:hover,
.team-picker-option:focus {
    outline: none;
    background: var(--accent-soft);
}

.team-picker-option.is-selected {
    background: var(--surface-muted);
}

.match-scoreboard {
    border-top: 3px solid var(--accent);
    border-bottom: 1px solid var(--border);
}

.match-scoreboard .score-main {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: 0.08em;
    line-height: 1;
}

@media (min-width: 768px) {
    .match-scoreboard .score-main {
        font-size: 3.25rem;
    }
}

.rules-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--ink-muted);
}

.rules-row span:last-child {
    font-weight: 700;
    color: var(--accent-dark);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
}

.scoring-points {
    font-weight: 700;
    color: var(--accent-dark);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
}

@keyframes admin-spin {
    to { transform: rotate(360deg); }
}
