/*
  Styles of the pages NOT YET rebuilt as legacy screens (R2-R5 in docs/launch-plan.md section 8). The legacy look
  (fonts, base, grid, navbar, footer, buttons with a variant, tables, popups) is in legacy.css, loaded first.
  Colors ONLY through tokens (tokens.css; enforced by tests). Each block goes when its page is rebuilt.
*/

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- buttons (real <button> or <a class="btn">), 44px touch target ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--rc-space-2);
    min-height: var(--rc-touch);
    padding: 0 var(--rc-space-4);
    border: 1px solid var(--rc-border);
    border-radius: var(--rc-radius);
    background: var(--rc-surface);
    color: var(--rc-text);
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.btn:hover {
    color: var(--rc-text);
    border-color: var(--rc-muted);
}

.btn-accent {
    border-color: var(--rc-accent);
    background: var(--rc-accent);
    color: var(--rc-on-accent);
}

.btn-accent:hover {
    border-color: var(--rc-accent-hover);
    background: var(--rc-accent-hover);
    color: var(--rc-on-accent);
}

.link-button {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: var(--rc-link);
    text-decoration: underline;
    text-decoration-color: var(--rc-link-underline);
    text-decoration-thickness: var(--rc-link-underline-width);
    cursor: pointer;
}

.inline-form {
    display: inline;
    margin: 0;
}

/* ---------- chips (pill links, e.g. positions); active = filled accent ---------- */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--rc-space-2);
    margin: 0;
    padding: 0;
    list-style: none;
}

.chip {
    display: inline-flex;
    align-items: center;
    min-height: var(--rc-touch);
    padding: 0 var(--rc-space-4);
    border: 1px solid var(--rc-border);
    border-radius: var(--rc-radius-pill);
    background: var(--rc-surface);
    color: var(--rc-text);
    font-size: var(--rc-font-size-sm);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.chip:hover {
    color: var(--rc-text);
    border-color: var(--rc-muted);
}

.chip[aria-current="page"] {
    border-color: var(--rc-accent);
    background: var(--rc-accent);
    color: var(--rc-on-accent);
}

/* ---------- card ---------- */
.card {
    background: var(--rc-surface);
    border: 1px solid var(--rc-border);
    border-radius: var(--rc-radius-lg);
}

/* ---------- pills (small status badges, e.g. IL-15) ---------- */
.pill {
    display: inline-block;
    padding: 0 var(--rc-space-2);
    border-radius: var(--rc-radius-pill);
    background: var(--rc-badge-bg);
    color: var(--rc-badge-text);
    font-size: var(--rc-font-size-xs);
    font-weight: 600;
    line-height: 1.6;
    white-space: nowrap;
    vertical-align: middle;
}

/* ---------- data tables: numbers use tabular figures, right-aligned ---------- */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: var(--rc-font-size-sm);
}

.data-table th,
.data-table td {
    padding: var(--rc-space-2) var(--rc-space-3);
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid var(--rc-border);
}

.data-table thead th {
    background: var(--rc-table-header);
    color: var(--rc-muted);
    font-weight: 600;
}

.data-table tbody tr:nth-child(even) td {
    background: var(--rc-row-stripe);
}

.data-table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* ---------- account pages (login, register, password reset) ---------- */
.account-page {
    max-width: 24rem;
}

.account-page .field {
    display: flex;
    flex-direction: column;
    gap: var(--rc-space-1);
    margin-bottom: var(--rc-space-4);
}

.account-page .field-check {
    display: flex;
    align-items: center;
    gap: var(--rc-space-2);
    min-height: var(--rc-touch);
    margin-bottom: var(--rc-space-4);
}

.account-page input[type=text],
.account-page input[type=password],
.account-page input[type=email],
.account-page input:not([type]) {
    min-height: var(--rc-touch);
    padding: 0 var(--rc-space-3);
    border: 1px solid var(--rc-border);
    border-radius: var(--rc-radius);
    background: var(--rc-surface);
    color: var(--rc-text);
    font: inherit;
}

.account-page button[type=submit] {
    min-height: var(--rc-touch);
    padding: 0 var(--rc-space-5);
    border: 1px solid var(--rc-accent);
    border-radius: var(--rc-radius);
    background: var(--rc-accent);
    color: var(--rc-on-accent);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.account-page button[type=submit]:hover {
    border-color: var(--rc-accent-hover);
    background: var(--rc-accent-hover);
}

/* T-323 (7) (owner 2026-12-02): ONE form message style for every account page, the purchase page and any form-level
   message: errors light red, dark red text, a red left border, normal weight (never the button blue); successes the
   light green equivalent. Tokens: --rc-msg-* (tokens.css, light + dark). */
.msg-error, .account-error, .purchase .promo-result.form-error {
    margin: var(--rc-space-2) 0;
    padding: var(--rc-space-2) var(--rc-space-4);
    color: var(--rc-msg-error-text);
    font-weight: 400;
    background: var(--rc-msg-error-bg);
    border: 1px solid color-mix(in srgb, var(--rc-msg-error-border) 35%, transparent);
    border-left: 4px solid var(--rc-msg-error-border);
    border-radius: var(--rc-radius);
}
.msg-success, .account-info, .purchase .promo-result.form-note {
    margin: var(--rc-space-2) 0;
    padding: var(--rc-space-2) var(--rc-space-4);
    color: var(--rc-msg-success-text);
    font-weight: 400;
    background: var(--rc-msg-success-bg);
    border: 1px solid color-mix(in srgb, var(--rc-msg-success-border) 35%, transparent);
    border-left: 4px solid var(--rc-msg-success-border);
    border-radius: var(--rc-radius);
}
.validation-message { color: var(--rc-msg-error-text); }

.invalid {
    outline: 1px solid var(--rc-badge-text);
}


/* ---------- progressive enhancement: selects that submit on change (site.js) ---------- */
.autosubmit-ready .autosubmit-go {
    display: none;
}

/* ---------- placeholder pages (e.g. My Leagues until the sales content exists) ---------- */
.page-intro {
    max-width: 48rem;
}

.page-intro .lead {
    color: var(--rc-muted);
    font-size: var(--rc-font-size-lg);
}

.provider-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
    gap: var(--rc-space-3);
    margin: var(--rc-space-4) 0;
    padding: 0;
    list-style: none;
}

.provider-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--rc-space-2);
    min-height: var(--rc-touch);
    padding: var(--rc-space-3) var(--rc-space-4);
    font-weight: 600;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--rc-space-2);
}

.page-intro h2 {
    margin-top: var(--rc-space-6);
}

/* Safety net: the page itself never scrolls sideways (wide content scrolls inside its own container).
   overflow-x: clip does not create a scroll container, so sticky table headers still stick to the window. */
.site-main {
    overflow-x: clip;
}

/* ---------- Purchase (Components/Pages/Purchase.razor; docs/paypal.md) ---------- */
.purchase-card {
    max-width: 34rem;
    padding: var(--rc-space-4);
}

.purchase .price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--rc-space-2);
    margin: 0 0 var(--rc-space-1);
}

.purchase .price-regular {
    color: var(--rc-muted);
    font-size: var(--rc-font-size-lg);
}

.purchase .price-now {
    font-size: var(--rc-font-size-xl);
}

.purchase .price-note {
    color: var(--rc-accent);
    font-weight: 600;
}

.purchase .promo-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--rc-space-2);
    margin: var(--rc-space-3) 0;
}

.purchase .promo-form input {
    width: 12rem;
    max-width: 100%;
}

/* T-305 (7): the promo box and Apply are as tall as the site's other text boxes (account pages: --rc-touch). */
.purchase .promo-form input,
.purchase .promo-form .btn {
    min-height: var(--rc-touch);
    box-sizing: border-box;
}

.purchase .promo-form input {
    padding: 0 var(--rc-space-3);
    border: 1px solid var(--rc-border);
    border-radius: var(--rc-radius);
    background: var(--rc-surface);
    color: var(--rc-text);
    font: inherit;
}

/* T-305 (8): every Apply highlights its result for a moment (also when the message did not change). */
/* T-323 (2): a repeat Apply refreshes the message visibly (a short pulse of its own colour, never a grey highlight). */
@keyframes rc-promo-flash {
    0% { opacity: 0.25; transform: translateY(-3px); }
    100% { opacity: 1; transform: none; }
}
.purchase .promo-result.promo-flash { animation: rc-promo-flash 0.45s ease-out 1; }
@media (prefers-reduced-motion: reduce) { .purchase .promo-result.promo-flash { animation: none; } }

/* Two clear, separate choices: PayPal, and a card without a PayPal account. */
.purchase .pay-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: var(--rc-space-2);
}

.purchase .pay-buttons .btn {
    width: 100%;
    min-height: var(--rc-touch);
}

.purchase .paypal-buttons {
    max-width: 26rem;
}

.purchase .pay-sdk-button + .pay-sdk-button {
    margin-top: var(--rc-space-2);
}

.purchase .pay-fallback[hidden] {
    display: none;
}

/* Owner 2026-11-21: data credits (Retrosheet, Chadwick register) under the footer row: small and quiet. */
.footer-credits { margin-top: 6px; font-size: 11px; color: var(--rc-muted); }

/* T-155 (owner privacy decision 7, 2026-11-25): the register page's legal notice under Create account (every look). */
.account-page .register-consent {
    max-width: 420px;
    margin: var(--rc-space-2) 0 var(--rc-space-4);
    font-size: 12px;
    line-height: 1.4;
    color: var(--rc-muted);
    text-align: center;
}

/* ---------- T-054a: /privacy and /contact (legacy PrivacyPolicy / ContactUs pages; every look via tokens) ---------- */
.legal-page {
    max-width: 860px;
    padding-bottom: 24px;
    line-height: 1.55;
}

.legal-page h2 {
    margin-top: 8px;
}

.legal-page h3 {
    margin-top: 26px;
    font-size: var(--rc-font-size-lg);
    font-weight: 600;
}

.legal-page h4 {
    margin-top: 18px;
    font-size: var(--rc-font-size-md);
    font-weight: 600;
}

.legal-page ul {
    padding-left: 22px;
}

.legal-page li {
    margin-bottom: 4px;
}

.legal-page code {
    font-size: 0.9em;
    padding: 0 3px;
    border-radius: var(--rc-radius-sm);
    background: var(--rc-well-bg);
    color: var(--rc-text);
}

/* h3 anchors (the extension opens #league-sync) clear the fixed navbar. */
.legal-page [id] {
    scroll-margin-top: 80px;
}

.legal-table {
    overflow-x: auto;
    margin: 8px 0 14px;
}

.legal-table table {
    border-collapse: collapse;
    width: 100%;
}

.legal-table th,
.legal-table td {
    border: 1px solid var(--rc-table-border);
    padding: 6px 8px;
    text-align: left;
    vertical-align: top;
}

.legal-table th {
    background: var(--rc-table-header);
}

/* T-187 (owner 2026-11-27): /contact centered in a card like the rest of the site; the two addresses in a small box. */
.contact-page {
    max-width: 680px;
    margin: 16px auto 0;
}

.contact-card {
    padding: 24px 32px 20px;
}

.contact-card h2 {
    margin-top: 0;
}

.contact-addresses {
    list-style: none;
    margin: 12px 0 4px;
    padding: 10px 14px;
    border: 1px solid var(--rc-border);
    border-radius: var(--rc-radius);
    background: var(--rc-well-bg);
}

.legal-page .contact-addresses {
    padding-left: 14px;
}

.legal-page .contact-address {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 12px;
    align-items: baseline;
    margin: 2px 0;
}

.contact-address a {
    font-weight: 600;
    min-width: 190px;
}

.contact-address span {
    color: var(--rc-muted);
}

.contact-form {
    max-width: none;
}


.contact-field {
    margin-bottom: 12px;
}

.contact-field label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
}

.contact-field input,
.contact-field select,
.contact-field textarea {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--rc-input-border);
    border-radius: var(--rc-radius);
    background: var(--rc-input-bg);
    color: var(--rc-text);
    font: inherit;
}

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

.contact-note {
    margin-top: 8px;
    font-size: var(--rc-font-size-sm);
    color: var(--rc-muted);
}

.contact-sent {
    padding: 10px 12px;
    border-radius: var(--rc-radius);
    background: color-mix(in srgb, var(--rc-success) 14%, transparent);
}

.contact-error {
    padding: 10px 12px;
    border-radius: var(--rc-radius);
    background: color-mix(in srgb, var(--rc-danger) 12%, transparent);
    color: var(--rc-text);
}

@media (max-width: 767px) {
    .contact-page {
        margin-top: 8px;
    }

    .contact-card {
        padding: 16px;
    }

    .contact-address a {
        min-width: 0;
    }
}

/* ---------- T-196 S1: legacy SideMenu (right sidebar of the public baseball pages; hidden below md like legacy) ---------- */
.page-with-side {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
}

@media (min-width: 992px) {
    .page-with-side {
        grid-template-columns: minmax(0, 3fr) minmax(240px, 1fr);
    }
}

.page-main {
    min-width: 0;
}

.side-menu-panel {
    margin-bottom: 20px;
    border: 1px solid var(--rc-border);
    border-radius: var(--rc-radius);
    background: var(--rc-surface);
    overflow: hidden;
}

.side-menu-panel .panel-heading {
    padding: 8px 12px;
    background: var(--rc-primary);
    color: var(--rc-on-accent);
}

.side-menu-panel .panel-title {
    margin: 0;
    font-size: var(--rc-font-size-md);
    font-weight: 600;
    color: inherit;
}

.side-menu-panel .panel-body {
    padding: 10px 12px;
}

.side-menu-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 12px;
}

.side-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.side-menu li {
    margin: 2px 0;
}

.side-menu-custom {
    display: block;
    margin-top: 10px;
    padding: 6px 8px;
    border: 1px solid var(--rc-border);
    border-radius: var(--rc-radius);
    background: var(--rc-well-bg);
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

/* ---------- T-196 S3: legacy button row (Projection System / Position Rankings / MLB Lineups) ---------- */
.bnav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0 12px;
}

.bnav-menu {
    position: relative;
}

.bnav-menu > summary {
    list-style: none;
    cursor: pointer;
}

.bnav-menu > summary::-webkit-details-marker {
    display: none;
}

.bnav-list {
    max-width: calc(100vw - 24px);
    position: absolute;
    z-index: 30;
    top: 100%;
    left: 0;
    min-width: 170px;
    max-height: 70vh;
    overflow-y: auto;
    margin: 2px 0 0;
    padding: 5px 0;
    list-style: none;
    border: 1px solid var(--rc-border);
    border-radius: var(--rc-radius);
    background: var(--rc-surface);
    box-shadow: var(--rc-dropdown-shadow);
}

.bnav-list a {
    display: block;
    padding: 3px 16px;
    white-space: nowrap;
    color: var(--rc-text);
    text-decoration: none;
}

.bnav-list a:hover,
.bnav-list a:focus,
.bnav-list a[aria-current="page"] {
    background: var(--rc-well-bg);
}

/* T-279: a coming-soon projection system (plain text, not a link). */
.bnav-soon {
    display: block;
    padding: 3px 16px;
    white-space: nowrap;
    color: var(--rc-muted);
    font-style: italic;
    cursor: not-allowed;
}

.bnav-group {
    padding: 4px 16px 2px;
    font-size: 11px;
    font-weight: 700;
    color: var(--rc-muted);
}

.bnav-divider {
    height: 1px;
    margin: 5px 0;
    background: var(--rc-border);
}

.bnav-teams {
    min-width: 280px;
    padding: 6px 4px;
}

.bnav-teams ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Owner 2026-11-27 polish: the team lists of the MLB Lineups menu AND the sidebar: "AL" / "NL" columns, bold
   "AL East" ... headers with a thin divider under each. T-222: no "AL" / "NL" heading above the columns. */
.team-leagues {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 14px;
}

.team-division {
    margin: 10px 0 4px;
    padding-bottom: 2px;
    border-bottom: 1px solid var(--rc-border);
    font-size: var(--rc-font-size-md);
    font-weight: 700;
    color: var(--rc-text);
}

.team-league > .team-division:first-child {
    margin-top: 2px;
}

.bnav-teams .team-division {
    margin-left: 12px;
    margin-right: 4px;
}

.bnav-teams .team-leagues {
    gap: 0 4px;
}

.bnav-teams li a {
    padding: 2px 12px;
}

.side-menu-teams li {
    margin: 1px 0;
}

/* T-196 S4: legacy injury marker, a red cross after the name (tooltip = the injury). */
.injury-cross {
    margin-left: 4px;
    font-size: 10px;
    color: var(--rc-danger);
    cursor: default;
}

/* ---------- T-196 T1 / T2: legacy team menu (jump links) and the prospect lists ---------- */
.lu-team-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 4px 0 20px;
}

.lu-prospects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.lu-prospect-list h3 {
    margin: 0 0 6px;
    font-size: var(--rc-font-size-md);
    font-weight: 600;
}

.lu-prospect-list table {
    font-size: 11px;
}

/* ---------- T-196 S2: legacy "Search for Player" ---------- */
.player-search {
    position: relative;
    max-width: 320px;
    margin: 8px 0 4px;
}

.player-search input {
    width: 100%;
    padding: 4px 10px;
    border: 1px solid var(--rc-input-border);
    border-radius: var(--rc-radius);
    background: var(--rc-input-bg);
    color: var(--rc-text);
    font: inherit;
}

.player-search-results {
    position: absolute;
    z-index: 30;
    top: 100%;
    left: 0;
    right: 0;
    margin: 2px 0 0;
    padding: 4px 0;
    list-style: none;
    border: 1px solid var(--rc-border);
    border-radius: var(--rc-radius);
    background: var(--rc-surface);
    box-shadow: var(--rc-dropdown-shadow);
}

.player-search-results li {
    padding: 4px 10px;
    cursor: pointer;
}

.player-search-results li:hover,
.player-search-results li.active {
    background: var(--rc-well-bg);
}

/* ---------- T-196 R4 / S6: Classic = legacy's small logo above a 20px caption (the Modern looks keep their h1) ---------- */
.legacy-small-logo {
    display: none;
}

html[data-look="classic"] .legacy-small-logo {
    display: block;
    margin: 4px 0 2px;
}

html[data-look="classic"] .rk-intro h1,
html[data-look="classic"] .page-main > h1 {
    font-size: 20px;
    font-weight: normal;
}

/* ---------- T-190 B1: public Player page ---------- */
.pl-facts {
    margin: 0 0 8px;
    color: var(--rc-muted);
}

.pl-section {
    margin: 18px 0;
}

.pl-section h2 {
    margin: 0 0 6px;
    font-size: var(--rc-font-size-lg);
    font-weight: 600;
}

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

/* Owner 2026-11-27 polish: the projection and past-season tables use the content width; Games Played by Position and
   ADP sit side by side beneath them at their natural width (no wide empty columns), stacking on a narrow phone. */
.pl-table {
    width: 100%;   /* T-330: the size comes from the shared .data-table (the rankings' size) */
}

.pl-table th[scope="row"] {
    font-weight: 600;
    white-space: nowrap;
}

.pl-columns {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0 32px;
}

.pl-columns .pl-section {
    margin-top: 0;
}

.pl-columns .pl-table {
    width: auto;
    min-width: 180px;
}

/* T-330 (owner 2026-12-02): the player page's four tables use the rankings' shared table style (.data-table: alternating
   rows, borders, header, row height and padding) inside a card, like the rankings; T-317's separate sizing is gone. */
.pl-card { overflow-x: auto; margin: 0 0 var(--rc-space-3); }
.pl-card .data-table tbody tr:last-child > * { border-bottom: 0; }
.pl-table.data-table th[scope="row"] { font-weight: 600; }
.pl-table.data-table tbody tr:nth-child(even) > th { background: var(--rc-row-stripe); }   /* the row label stripes with its row */
.pl-columns .pl-card { display: inline-block; max-width: 100%; }   /* the small tables' card hugs the table (stripes reach the edge) */

/* ---------- T-190 B4: legacy ad slots (one top unit per size; the side slot) ---------- */
.rc-top-slot {
    text-align: center;
    margin: 0 0 8px;
}

.rc-slot {
    display: none;
    max-width: 100%;
    overflow: hidden;
}

/* T-255 (owner 2026-11-29, replaces "the space is kept" of 2026-11-27): the top row exists only where ads can load
   (TopAds); there it keeps its space while the ad loads, and collapses when AdSense reports no ad or the script is
   blocked. Neutral class names: ad blockers hide elements named "ad-row" / "ad-unit" / "side-ad", which hid the house
   ad too. */
.rc-slot-lg { min-height: 90px; }
.rc-slot-md { min-height: 60px; }
.rc-slot-xs { min-height: 100px; }

.rc-ads-blocked .rc-top-slot,
.rc-top-slot:has(ins[data-ad-status="unfilled"]) {   /* only the visible size is ever filled, so only it gets a status */
    display: none;
}

@media (max-width: 767px) {
    .rc-top-slot .rc-slot-xs { display: block; }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .rc-top-slot .rc-slot-md { display: block; }
}

@media (min-width: 1200px) {
    .rc-top-slot .rc-slot-lg { display: block; }
}

.rc-side-slot {
    margin-bottom: 20px;
}

.rc-side-slot [data-gslot]:not([hidden]) {
    display: block;
    text-align: center;
}

/* T-256 (owner 2026-11-29): the house ad title on ONE line; at the sidebar's narrowest width (240 px) it shrinks a
   little instead of wrapping. */
.rc-house {
    container-type: inline-size;
}

.side-menu-panel .rc-house-title {
    white-space: nowrap;
    font-size: min(var(--rc-font-size-md), calc((100cqi - 26px) / 16));
}

.rc-house-body {
    text-align: center;
    font-size: 12px;
}

.rc-house-body ul {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
    text-align: left;
}

.rc-house-cta {
    display: block;
    margin: 6px 0;
    font-size: 14px;
    text-decoration: none;
}

.rc-house-footer {
    padding: 8px 12px;
    text-align: center;
}

/* The last menus of the row open leftward so they never run past the right edge (phones; runner 2026-11-27). */
.bnav-menu:nth-last-child(-n+2) .bnav-list {
    left: auto;
    right: 0;
}

/* ---------- T-198 (owner 2026-11-27): public stat tables on phones (site.js adds the classes) ---------- */
/* Pinned first columns ([data-pin]) while the table scrolls sideways; the last pinned one gets a divider. */
.pin-col {
    position: sticky;
    z-index: 1;
    background: var(--rc-surface);
}

thead .pin-col {
    z-index: 3;
}

.pin-last {
    box-shadow: inset -1px 0 0 var(--rc-border);
}

/* A fade at the right edge while more columns are hidden there ([data-fade] scroll boxes). The mask uses only
   transparency, so currentColor is just "opaque". */
[data-fade].fade-more {
    -webkit-mask-image: linear-gradient(to right, currentColor calc(100% - 28px), transparent);
    mask-image: linear-gradient(to right, currentColor calc(100% - 28px), transparent);
}

/* Smaller page titles on phones (team, rankings and Player pages; every look). */
@media (max-width: 767.98px) {
    .page-main h1 {
        font-size: 1.3rem;
        line-height: 1.25;
    }

    html[data-look="classic"] .page-main h1 {
        font-size: 18px;
    }
}

/* ---------- T-205 (owner 2026-11-27): one page frame for the plain public pages (every look) ----------
   Content centered with real margins, like the /contact card: no text jammed against the top-left, no small card
   floating in a big empty area. Account pages (log in, create, forgot / reset, manage), purchase (both states),
   privacy, 404 and error. /contact keeps its own wrapper + card. */
.account-page,
.legal-page:not(.contact-page),
.error-page {
    margin: 24px auto 32px;
    padding: 24px 32px;
    background: var(--rc-surface);
    border: 1px solid var(--rc-border);
    border-radius: var(--rc-radius-lg);
}

.account-page {
    max-width: 30rem;
}

.account-page.manage-account {
    max-width: 44rem;
}

.error-page {
    max-width: 36rem;
    text-align: center;
}

.error-page h1 {
    margin-top: 0;
}

.error-page .button-row {
    justify-content: center;
    margin-top: var(--rc-space-4);
}

.page-intro.purchase {
    max-width: 40rem;
    margin: 24px auto 32px;
}

.page-intro.purchase .purchase-card {
    max-width: none;
    padding: 24px 32px;
}

@media (max-width: 575.98px) {
    .account-page,
    .legal-page:not(.contact-page),
    .error-page,
    .page-intro.purchase .purchase-card {
        margin-top: 12px;
        padding: 16px;
    }
}

/* ---------- T-217 (owner review 2026-11-28; the approved account-page exception: ONE design for EVERY look, light and
   dark, desktop and phone): Log in, Create account, Forgot / Reset password. A centered card (title, a short welcome
   line, full-width equal fields with a soft focus ring, show / hide password, a full-width primary button, a divider to
   the other page) and, on wide screens, a side panel with the selling points. ---------- */
.auth-shell { display: grid; grid-template-columns: minmax(0, 30rem); justify-content: center; gap: 24px; margin: 24px auto 40px; padding: 0 12px; }
.auth-shell.auth-has-side { grid-template-columns: minmax(0, 30rem) minmax(0, 20rem); align-items: start; }
.auth-shell .auth-card.account-page { max-width: none; margin: 0; padding: 28px 32px; box-shadow: var(--rc-panel-shadow); }
.auth-title { margin: 0 0 6px; font-size: 26px; font-weight: 700; }
.auth-lead { margin: 0 0 18px; color: var(--rc-muted); }
.auth-card .field { margin-bottom: 14px; }
.auth-card .field label { font-weight: 600; font-size: 14px; }
.auth-card .field-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.auth-card .field-aside { font-size: 13px; }
.auth-card input[type=text], .auth-card input[type=password], .auth-card input[type=email], .auth-card input:not([type]) {
    width: 100%; min-height: 44px; border-radius: 8px; transition: border-color .15s, box-shadow .15s; }
.auth-card input:focus { outline: none; border-color: var(--rc-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--rc-accent) 22%, transparent); }
.auth-card .field-help { color: var(--rc-muted); font-size: 12.5px; }
.auth-card .field-help.is-ok { color: var(--rc-success); }
.auth-card .field-help.is-bad { color: var(--rc-danger); font-weight: 600; }
.pw-field { position: relative; width: 100%; align-self: stretch; }   /* T-323 (4): never shrinks to its content in the flex column */
/* T-323 (4) (owner 2026-12-02): every account input is border-box, so a password box is exactly as wide as the Username /
   Email box; the eye icon sits inside it at the right. */
.auth-card input, .manage-card input, .account-page input { box-sizing: border-box; max-width: none; }   /* legacy.css caps password (not untyped) inputs at 280px */
.manage-card .pw-field input { width: 100%; }
.pw-field input { padding-right: 44px !important; width: 100%; box-sizing: border-box; }
.pw-toggle { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; padding: 0; color: var(--rc-muted); background: none; border: 0; border-radius: 6px; cursor: pointer; }
.pw-toggle:hover { color: var(--rc-text); }
.pw-toggle .pw-eye-off, .pw-toggle[aria-pressed="true"] .pw-eye { display: none; }
.pw-toggle[aria-pressed="true"] .pw-eye-off { display: block; }
.pw-toggle:focus-visible { outline: 2px solid var(--rc-accent); }
.auth-card .auth-submit, .auth-card button.auth-submit { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 46px; margin-top: 6px;
    font-size: 16px; text-decoration: none; }
.auth-link-button { padding: 0 16px; border: 1px solid var(--rc-accent); border-radius: var(--rc-radius); background: var(--rc-accent); color: var(--rc-on-accent) !important; font-weight: 600; }
.auth-link-button:hover { background: var(--rc-accent-hover); text-decoration: none; }
.auth-divider { display: flex; align-items: center; gap: 10px; margin: 20px 0 10px; color: var(--rc-muted); font-size: 13px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1 1 auto; border-top: 1px solid var(--rc-border); }
.auth-secondary { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; font: inherit; font-weight: 600;
    color: var(--rc-text); background: var(--rc-surface); border: 1px solid var(--rc-border); border-radius: var(--rc-radius); text-decoration: none; cursor: pointer; }
.auth-secondary:hover { background: var(--rc-row-hover); text-decoration: none; }
/* T-325 (3) (owner 2026-12-02): ONE secondary button style on the account and purchase pages: a light blue tint (pale
   blue background, blue text, blue border), slightly darker on hover; primary buttons stay solid blue. Tokens
   --rc-btn2-* (tokens.css, light + dark). */
.auth-secondary, .plan-cta.plan-cta-secondary, .purchase-card .button-row .btn:not(.btn-accent), .purchase .promo-form .btn {
    color: var(--rc-btn2-text) !important; background: var(--rc-btn2-bg); border: 1px solid var(--rc-btn2-border); }
.auth-secondary:hover, .plan-cta.plan-cta-secondary:hover, .purchase-card .button-row .btn:not(.btn-accent):hover, .purchase .promo-form .btn:hover {
    color: var(--rc-btn2-text) !important; background: var(--rc-btn2-bg-hover); border-color: var(--rc-btn2-border); text-decoration: none; }
.auth-small { margin: 12px 0 0; text-align: center; font-size: 13px; }
.auth-notice { margin: 0 0 16px; padding: 12px 14px; color: var(--rc-text); background: var(--rc-surface); border: 1px solid var(--rc-border);
    border-left: 4px solid var(--rc-accent); border-radius: var(--rc-radius); }
.auth-side { padding: 24px; color: var(--rc-text); background: color-mix(in srgb, var(--rc-accent) 7%, var(--rc-surface)); border: 1px solid var(--rc-border); border-radius: var(--rc-radius-lg); }
.auth-side h2 { margin: 0 0 12px; font-size: 18px; font-weight: 700; }
.auth-side ul { margin: 0; padding-left: 18px; }
.auth-side li { margin-bottom: 10px; line-height: 1.45; }
@media (max-width: 860px) {
    .auth-shell.auth-has-side { grid-template-columns: minmax(0, 30rem); }
    .auth-side { display: none; }
}
@media (max-width: 575.98px) {
    .auth-shell { margin-top: 12px; padding: 0; }
    .auth-shell .auth-card.account-page { padding: 18px 16px; }
}

/* Owner review 2026-11-28 (sitewide): links inside notice / alert boxes are always readable (no dark blue on blue). */
.account-error a, .account-info a, .auth-notice a, .alert a, .notice a, [role=alert] a, [role=status] a {
    color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- T-219 / T-220 (owner review 2026-11-28, every look): purchase status cards: centered, an icon for the state,
   headline + one line, ONE big primary button and a quieter link. ---------- */
.purchase-card.status-card { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.status-card h2 { margin: 6px 0 2px; font-size: 22px; }
.status-card p { margin: 0; }
.status-icon { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 50%; font-size: 26px; font-weight: 700; }
.status-icon-good { color: var(--rc-btn-text); background: var(--rc-success); }
.status-icon-neutral { color: var(--rc-text); background: color-mix(in srgb, var(--rc-text) 10%, transparent); }
.status-card .status-primary { display: inline-flex; align-items: center; justify-content: center; min-width: 240px; min-height: 46px; margin-top: 12px; font-size: 16px; }
.status-card .status-secondary { margin-top: 8px; font-size: 14px; }
.status-card .status-note { margin-top: 10px; color: var(--rc-muted); }

/* ---------- T-216 (owner-approved mockup docs/reports/2026-11-28-purchase-mockup; build notes 2026-11-30; every look, light
   and dark, desktop and phone): the pricing cards. Both cards share ONE row grid (subgrid), so the prices, the "Get
   Standard" / "Get Premium" buttons and the terms sit level; on phones the cards stack. Border + padding is 25px on both
   cards (Premium: 2px border, 23px padding), so the buttons are the same size. Colors only through tokens. ---------- */
.page-intro.purchase.purchase-plans { max-width: 50rem; }
.plans-hero { max-width: 760px; margin: 0 auto 20px; text-align: center; }
.plans-hero h1 { margin: 0 0 8px; font-size: 34px; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; }
.plans-hero p { margin: 0; font-size: 17px; color: var(--rc-muted); }
.plans-ribbon { max-width: 760px; margin: 0 auto 24px; padding: 10px 16px; text-align: center; font-weight: 600;
    color: color-mix(in srgb, var(--rc-success) 55%, var(--rc-text)); background: color-mix(in srgb, var(--rc-success) 16%, var(--rc-surface));
    border-radius: var(--rc-radius-pill); }
.plans-message { max-width: 760px; margin: 0 auto 18px; text-align: center; }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 360px)); grid-template-rows: repeat(5, auto); justify-content: center; column-gap: 22px; }
.plan { position: relative; grid-row: span 5; display: grid; grid-template-rows: subgrid; row-gap: 0; min-width: 0; padding: 24px;
    color: var(--rc-text); background: var(--rc-surface); border: 1px solid var(--rc-border); border-radius: max(4px, var(--rc-radius-lg)); }
.plan-featured { padding: 23px; border: 2px solid var(--rc-accent); box-shadow: 0 10px 30px color-mix(in srgb, var(--rc-accent) 16%, transparent); }
.plan-badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); padding: 3px 12px; font-size: 12px; font-weight: 700;
    letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; color: var(--rc-on-accent); background: var(--rc-accent); border-radius: var(--rc-radius-pill); }
.plan-head, .plan-price-block, .plan-features-wrap { min-width: 0; }
.plan h2 { margin: 4px 0 2px; font-size: 22px; font-weight: 700; }
.plan-tag { margin: 0 0 14px; color: var(--rc-muted); }
.plan-price-block { align-self: start; }
.plan-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin: 0; }
.plan-was { font-size: 22px; font-weight: 600; color: var(--rc-muted); }
.plan-amount { font-size: 44px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.plan-per { color: var(--rc-muted); }
.plan-why { margin: 4px 0 0; font-size: 13.5px; color: var(--rc-muted); }
.plan-why strong { color: var(--rc-success); }
.plan-same { display: inline-block; margin-top: 8px; padding: 4px 10px; font-size: 13px; font-weight: 700; color: var(--rc-accent);
    background: color-mix(in srgb, var(--rc-accent) 12%, var(--rc-surface)); border-radius: var(--rc-radius-pill); }
.plan-cta { display: flex; align-items: center; justify-content: center; box-sizing: border-box; width: 100%; min-height: 52px; margin-top: 16px;
    font-size: 17px; font-weight: 700; color: var(--rc-on-accent) !important; background: var(--rc-accent); border: 2px solid var(--rc-accent);
    border-radius: max(4px, var(--rc-radius-lg)); text-decoration: none !important; }
.plan-cta:hover { background: var(--rc-accent-hover, var(--rc-accent)); border-color: var(--rc-accent-hover, var(--rc-accent)); }
/* (T-325 (3): .plan-cta-secondary uses the shared secondary style above.) */

.plan-terms { margin: 14px 0 0; padding: 8px 10px; font-size: 13px; font-weight: 600; text-align: center; background: var(--rc-well-bg);
    border-radius: max(4px, var(--rc-radius)); }
.plan-features { margin: 18px 0 0; padding: 0; list-style: none; }
.plan-features li { display: flex; gap: 10px; margin: 0 0 10px; }
.plan-features li::before { content: "\2713"; flex: none; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px;
    margin-top: 1px; font-size: 12px; font-weight: 800; color: var(--rc-btn-text); background: var(--rc-success); border-radius: 50%; }
.plan-features li.plan-plus { font-weight: 600; }
.plan-later { font-size: 13px; font-weight: 400; color: var(--rc-muted); }
.plan-divider { margin: 18px 0 0; font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--rc-muted); }
.plan-divider + .plan-features { margin-top: 12px; }
.plans-trial { margin: 22px 0 0; text-align: center; font-size: 14px; }
.plans-trial a { font-weight: 600; }
.plans-back { margin: 0 0 8px; text-align: left; font-size: 14px; }   /* T-297: back to the app page the trial message came from (top left, owner 2026-12-01) */
.page-intro.purchase .plans-checkout { max-width: 36rem; margin: 26px auto 0; scroll-margin-top: 80px; }
.plans-checkout h2 { margin: 0 0 6px; font-size: 22px; font-weight: 700; }
.plans-checkout-note { margin: 0 0 12px; color: var(--rc-muted); }
.plans-fine { max-width: 760px; margin: 22px auto 0; text-align: center; font-size: 13.5px; color: var(--rc-muted); }
.plans-fine p { margin: 4px 0; }
.plans-code { display: inline-block; margin: 4px 0; padding: 4px 10px; color: var(--rc-text); background: var(--rc-surface);
    border: 1px dashed var(--rc-border); border-radius: max(4px, var(--rc-radius)); }
@media (max-width: 767.98px) {
    .plans { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; row-gap: 26px; }
    .plan { grid-row: auto; grid-template-rows: none; }
    .plans-hero h1 { font-size: 26px; }
    .plans-hero p { font-size: 15px; }
    .plans-ribbon { border-radius: max(4px, var(--rc-radius-lg)); font-size: 13.5px; }
}

/* ---------- T-218 (owner review 2026-11-28; the approved account-page exception, every look, light + dark, desktop +
   phone): Manage Account as cards (Profile, Display, Password, Subscription) with the same headings and spacing. ---------- */
.manage-shell { max-width: 46rem; margin: 24px auto 40px; padding: 0 12px; }
.manage-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.manage-head h1 { margin: 0; font-size: 26px; font-weight: 700; }
.manage-sub { margin: 2px 0 0; color: var(--rc-muted); }
.manage-back { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; font-weight: 600; color: var(--rc-on-accent) !important;
    background: var(--rc-accent); border-radius: var(--rc-radius); text-decoration: none; white-space: nowrap; }
.manage-back:hover { background: var(--rc-accent-hover); text-decoration: none; }
.manage-card { margin-bottom: 16px; padding: 20px 24px; background: var(--rc-surface); border: 1px solid var(--rc-border); border-radius: var(--rc-radius-lg); }
.manage-card h2 { margin: 0 0 14px; font-size: 18px; font-weight: 700; }
.manage-facts { display: grid; grid-template-columns: 7rem 1fr; gap: 6px 12px; margin: 0 0 14px; }
.manage-facts dt { color: var(--rc-muted); font-weight: 600; }
.manage-facts dd { margin: 0; overflow-wrap: anywhere; }
.manage-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.manage-row input { flex: 1 1 14rem; }
.manage-card input[type=text], .manage-card input[type=password], .manage-card input[type=email], .manage-card input:not([type]) {
    min-height: 40px; padding: 0 10px; border: 1px solid var(--rc-border); border-radius: 8px; background: var(--rc-surface); color: var(--rc-text); font: inherit; }
.manage-card input:focus { outline: none; border-color: var(--rc-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--rc-accent) 22%, transparent); }
.manage-card .field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.manage-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 16px; font: inherit; font-weight: 600;
    color: var(--rc-text); background: var(--rc-surface); border: 1px solid var(--rc-border); border-radius: var(--rc-radius); cursor: pointer; text-decoration: none; }
.manage-btn:hover { background: var(--rc-row-hover); text-decoration: none; }
.manage-btn-primary { color: var(--rc-on-accent); background: var(--rc-accent); border-color: var(--rc-accent); }
.manage-btn-primary:hover { background: var(--rc-accent-hover); color: var(--rc-on-accent); }
.manage-more > summary { cursor: pointer; font-weight: 600; margin: 4px 0 10px; }
.manage-more > summary.manage-summary-btn { display: inline-flex; list-style: none; }
.manage-more > summary::-webkit-details-marker { display: none; }
.manage-saved { color: var(--rc-success); font-weight: 600; }
.manage-note { margin: 10px 0 0; color: var(--rc-muted); font-size: 13.5px; }
/* T-375: a requested email waits for its link: "Pending: ..." with Resend / Cancel. */
.manage-pending { margin: 12px 0; padding: 12px 14px; border: 1px solid var(--rc-border); border-left: 4px solid var(--rc-accent); border-radius: 6px; }
.manage-pending p { margin: 0 0 10px; overflow-wrap: anywhere; }
.manage-pending .manage-saved { margin-bottom: 10px; }
.manage-inline-form { margin: 0; }
.look-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.look-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 76px; padding: 12px; text-align: left;
    font: inherit; color: var(--rc-text); background: var(--rc-surface); border: 1px solid var(--rc-border); border-radius: 10px; cursor: pointer; }
.look-tile[aria-checked=true] { border-color: var(--rc-accent); box-shadow: inset 0 0 0 2px var(--rc-accent); background: color-mix(in srgb, var(--rc-accent) 8%, var(--rc-surface)); }
.look-tile[aria-checked=true] .look-option-name::after { content: " \2713"; color: var(--rc-accent); }
.look-tile .look-option-name { font-weight: 700; }
.look-tile .look-option-note { font-size: 12.5px; color: var(--rc-muted); }
.manage-theme { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.manage-theme-label { font-weight: 600; }
.manage-theme-note { font-size: 12.5px; color: var(--rc-muted); }
.theme-toggle.theme-switch { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 10px; font: inherit; color: var(--rc-text);
    background: none; border: 1px solid var(--rc-border); border-radius: 999px; cursor: pointer; }
html[data-look="classic"] .theme-toggle.theme-switch { display: inline-flex; }
.theme-switch:disabled { opacity: .5; cursor: not-allowed; }
.theme-switch-track { position: relative; width: 34px; height: 20px; background: var(--rc-border); border-radius: 999px; }
.theme-switch-thumb { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background: var(--rc-surface); border-radius: 50%; transition: left .15s; }
.theme-switch[aria-pressed=true] .theme-switch-track { background: var(--rc-accent); }
.theme-switch[aria-pressed=true] .theme-switch-thumb { left: 16px; }
.manage-sub-state { margin: 0 0 6px; font-weight: 600; }
.manage-sub-state.is-active { color: var(--rc-success); }
.manage-signout { text-align: center; }
.manage-link-btn { padding: 6px 10px; font: inherit; color: var(--rc-link, var(--rc-accent)); background: none; border: 0; text-decoration: underline; cursor: pointer; }
@media (max-width: 575.98px) {
    .manage-head { flex-direction: column; align-items: stretch; }
    .look-tiles { grid-template-columns: minmax(0, 1fr); }
    .manage-card { padding: 16px; }
    .manage-facts { grid-template-columns: 5.5rem 1fr; }
}

/* T-305 (2): the full logo above the headline; (3) the chosen plan on one line once the cards collapse. */
.plans-logo { display: block; width: 260px; max-width: 70%; height: auto; margin: 0 auto 14px; }
.plans-summary { max-width: 760px; margin: 0 auto 16px; padding: 10px 16px; text-align: center; font-size: 17px;
    background: var(--rc-surface); border: 1px solid var(--rc-border); border-radius: var(--rc-radius-lg); }
.plans-summary a { font-weight: 600; }
