/* Shared page geometry. Theme colours and card internals belong to each site. */
:root { --site-content-width: 1320px; --site-page-gutter: 20px; }
html body main.container.site-content:not(:has(> .fpp26-home)) {
    width: calc(100% - 2 * var(--site-page-gutter)) !important;
    max-width: var(--site-content-width) !important;
    margin-inline: auto !important;
    padding-inline: 0 !important;
    box-sizing: border-box;
    min-width: 0;
}
/* Page wrappers supply vertical spacing; only the shared container sets width. */
html body main.container.site-content > :is(.page-shell, .page-wrapper, .betslip-generator-shell, .basic-stats-page, .bet-tracker-shell, .inplay-page, .fvr-main, .fv-main, .rr-page, .value-bets-container, .model-report-page, .factory-page, .staking-page-shell, .statspro-filter-page, .custom-filter-results-page, .preset-alerts-page, .stats-grid-page, .fixture-details-shell, .historic-fixture-page, .statspro-preview-page, .preset-staking-confirm-shell),
html body main.container.site-content :has(> .page-hero) {
    width: 100% !important;
    max-width: none !important;
    margin-inline: 0 !important;
    padding-inline: 0 !important;
    box-sizing: border-box;
    min-width: 0;
}
html body main.container.site-content .page-hero {
    width: 100% !important;
    max-width: none !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    box-sizing: border-box;
}
html body main.container.site-content :is(.page-league-filter-host, .shared-league-filter-shell, .value-bets-preset-wrap:has(.shared-league-filter-shell), .betslip-generator-premium-page, .betslip-generator-premium-column, .betslip-generator-controls-panel, .betslip-generator-market-section) {
    width: 100%;
    max-width: none;
    margin-inline: 0;
    box-sizing: border-box;
    min-width: 0;
}
@media (max-width: 640px) {
    :root { --site-page-gutter: 12px; }
}

/* Grid tracks must shrink around scrollable tables instead of widening the page. */
html body main.container.site-content :is(.basic-stats-page, .basic-stats-shell) {
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
}
html body main.container.site-content .fvr-main > .vs-backtest {
    width: 100%;
    max-width: none;
    margin-inline: 0;
    box-sizing: border-box;
}

/* Country headers and fixture tables share the same page edges. */
html body main.container.site-content .fixtures-page-wrap { --fixtures-content-width: 100%; }
