/* Phase 1T.5.83 - public overflow parity with the existing operations shell.
 * Document remains the vertical scroller. Specialized bracket/nav scrollers
 * retain their own responsive geometry, panning and print behavior. */
html:has(body.pems-public-body) {
    overflow-x: clip;
    scrollbar-color: #b89532 #f1ebe7;
    scrollbar-width: thin;
}
body.pems-public-body,
body.pems-public-body #pems-public-main {
    max-width: 100%;
    min-width: 0;
}
body.pems-public-body :is(
    .pems-table-overflow-shell,
    .pems-public-main .overflow-x-auto,
    .pems-public-main .overflow-y-auto
) {
    scrollbar-color: #b89532 #f2ede8;
    scrollbar-width: thin;
    overscroll-behavior: contain;
}
body.pems-public-body .pems-table-overflow-shell {
    max-width: 100%;
    max-height: min(34rem, calc(100dvh - 15rem));
    overflow-x: auto !important;
    overflow-y: auto !important;
    scrollbar-gutter: stable both-edges;
}
body.pems-public-body .pems-table-overflow-shell > table:is(.pems-table,.pems-table-gradient) thead {
    position: sticky; top: 0; z-index: 8;
}
@media (max-width: 640px) {
    body.pems-public-body .pems-table-overflow-shell {
        max-height: min(26rem, calc(100dvh - 12rem));
    }
}
/* No override for .pems-public-bracket-scroll, .pems-round-robin-scroll,
 * .pems-public-nav or fullscreen/print: their dedicated styles win. */
.pems-season-quote-strip {
    border-bottom: 1px solid color-mix(in srgb, var(--pems-season-accent, #d7aa1d) 55%, white);
    background: #fffaf0; color: #673d18;
    padding: 8px max(16px, calc((100% - 1240px)/2));
    text-align: center; font-size: 13px; line-height: 1.55;
    overflow-wrap: anywhere;
}
.pems-season-quote-strip strong { color: var(--pems-season-primary, #760000); }

/* Public official standings and archive history were using raw overflow-x-auto,
 * outside the pems-table selector; adopt identical bounded shell semantics. */
body.pems-public-body .pems-public-table-overflow-shell {
    max-width: 100%;
    max-height: min(34rem, calc(100dvh - 15rem));
    overflow-x: auto !important;
    overflow-y: auto !important;
    scrollbar-color: #b89532 #f2ede8;
    scrollbar-gutter: stable both-edges;
    overscroll-behavior: contain;
}
body.pems-public-body .pems-public-table-overflow-shell table > thead {
    position: sticky; top: 0; z-index: 8;
}
body.pems-public-body .pems-public-table-overflow-shell .pems-history-standings-grid-head {
    position: sticky; top: 0; z-index: 8;
}
@media (max-width: 640px) {
    body.pems-public-body .pems-public-table-overflow-shell {
        max-height: min(26rem, calc(100dvh - 12rem));
    }
}
