.standings-page {
    padding: 34px 18px 56px;
}

.standings-shell {
    width: min(1120px, 100%);
    margin: 0 auto;
}

.standings-heading {
    margin-bottom: 22px;
}

.standings-eyebrow {
    margin: 0 0 6px;
    color: #16813a;
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .12em;
}

.standings-heading h1 {
    margin: 0;
    color: #111827;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.05;
}

.standings-intro {
    margin: 10px 0 0;
    color: #667085;
    font-size: 1rem;
}

.standings-controls {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 14px;
}

.standings-filter-form {
    display: flex;
    align-items: end;
    gap: 12px;
    flex-wrap: wrap;
}

.standings-filter {
    display: grid;
    gap: 6px;
}

.standings-filter > span,
.standings-page-size span {
    color: #667085;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.standings-filter select,
.standings-page-size select {
    min-height: 42px;
    padding: 0 36px 0 12px;
    border: 1px solid #d7dce2;
    border-radius: 10px;
    background: #fff;
    color: #142033;
    font: inherit;
    font-size: .9rem;
    font-weight: 700;
}

.standings-filter select {
    min-width: 190px;
}

.standings-view-toggle {
    display: inline-flex;
    padding: 4px;
    border: 1px solid #dfe3e8;
    border-radius: 11px;
    background: #fff;
}

.standings-view-toggle a {
    padding: 9px 16px;
    border-radius: 8px;
    color: #667085;
    font-size: .86rem;
    font-weight: 800;
    text-decoration: none;
}

.standings-view-toggle a.is-active {
    background: #142033;
    color: #fff;
}

.standings-context {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    color: #667085;
    font-size: .88rem;
}

.standings-context strong {
    color: #142033;
}

.standings-card {
    overflow: hidden;
    border: 1px solid #e4e7ec;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .06);
}

.standings-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.standings-table {
    width: 100%;
    min-width: 760px;
    border-collapse: separate;
    border-spacing: 0;
    color: #263244;
    font-size: .9rem;
}

.standings-table th,
.standings-table td {
    padding: 13px 16px;
    border-right: 1px solid #edf0f2;
    border-bottom: 1px solid #edf0f2;
    text-align: right;
    white-space: nowrap;
}

.standings-table th {
    background: #f7f9f8;
    color: #667085;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.standings-table th a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: inherit;
    text-decoration: none;
}

.standings-table th a:hover {
    color: #16813a;
}

.standings-table th:last-child,
.standings-table td:last-child {
    border-right: 0;
}

.standings-table tbody tr:last-child td {
    border-bottom: 0;
}

.standings-table tbody tr:hover td {
    background-color: #fbfcfb;
}

.standings-table .col-rank {
    width: 76px;
    text-align: center;
    font-weight: 800;
}

.standings-table .col-player {
    min-width: 230px;
    text-align: left;
}

.standings-player-link {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
    color: #142033;
    font-weight: 800;
    text-decoration: none;
}

.standings-player-link:hover {
    color: #16813a;
}

.standings-player-photo {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 50%;
    object-fit: cover;
    background: #e9edf1;
}

.standings-player-name {
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-strong {
    color: #142033;
    font-weight: 800;
}

.stat-unqualified {
    color: #98a2b3;
}

.sort-indicator {
    color: #16813a;
    font-size: .82rem;
}

.mobile-label {
    display: none;
}

.standings-pagination {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
    align-items: center;
    padding: 15px 16px;
    border-top: 1px solid #edf0f2;
    background: #fff;
}

.standings-page-summary {
    color: #667085;
    font-size: .82rem;
}

.standings-page-summary strong {
    color: #344054;
}

.standings-page-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.page-button,
.page-number {
    display: grid;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    place-items: center;
    border: 1px solid #dfe3e8;
    border-radius: 8px;
    background: #fff;
    color: #344054;
    font-size: .82rem;
    font-weight: 800;
    text-decoration: none;
}

.page-number.is-current {
    border-color: #16813a;
    background: #16813a;
    color: #fff;
}

.page-button:hover,
.page-number:hover {
    border-color: #16813a;
    color: #16813a;
}

.page-number.is-current:hover {
    color: #fff;
}

.page-button.is-disabled {
    pointer-events: none;
    color: #c5cbd3;
}

.page-ellipsis {
    padding: 0 2px;
    color: #98a2b3;
}

.standings-page-size {
    justify-self: end;
}

.standings-page-size label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.standings-page-size select {
    min-height: 34px;
    padding-left: 9px;
    font-size: .82rem;
}

.standings-rate-note {
    margin: 10px 2px 0;
    color: #7a8493;
    font-size: .78rem;
}

.standings-empty {
    padding: 34px;
    border: 1px solid #e4e7ec;
    border-radius: 16px;
    background: #fff;
    color: #667085;
    text-align: center;
}

@media (max-width: 850px) {
    .standings-controls {
        align-items: stretch;
        flex-direction: column;
    }

    .standings-view-toggle {
        align-self: flex-start;
    }

    .standings-pagination {
        grid-template-columns: 1fr 1fr;
    }

    .standings-page-nav {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .standings-page-size {
        justify-self: end;
    }
}

@media (max-width: 760px) {
    .standings-page {
        padding: 24px 14px 44px;
    }

    .standings-filter-form {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .standings-filter select {
        width: 100%;
        min-width: 0;
    }

    .standings-view-toggle {
        width: 100%;
    }

    .standings-view-toggle a {
        flex: 1;
        text-align: center;
    }

    .standings-context {
        margin-bottom: 9px;
    }

    .standings-card {
        overflow: visible;
        border-radius: 13px;
    }

    .standings-table-scroll {
        border-radius: 13px 13px 0 0;
    }

    .standings-table {
        min-width: 410px;
        font-size: .76rem;
    }

    .standings-table th,
    .standings-table td {
        width: 44px;
        min-width: 44px;
        max-width: 44px;
        padding-left: 3px;
        padding-right: 3px;
        text-align: center;
    }

    .standings-table th {
        padding-top: 9px;
        padding-bottom: 9px;
        border-right: 1px solid #edf0f2;
    }

    .standings-table td {
        padding-top: 9px;
        padding-bottom: 9px;
        border-right: 1px solid #f0f2f4;
        line-height: 1.2;
    }

    .standings-table th:last-child,
    .standings-table td:last-child {
        border-right: 0;
    }

    .standings-table .col-rank {
        width: 42px !important;
        min-width: 42px !important;
        max-width: 42px !important;
        padding-left: 3px;
        padding-right: 3px;
        color: #16813a;
        font-weight: 500;
    }

    .standings-table thead .col-rank {
        color: #667085;
        font-weight: 800;
    }

    .standings-table th.col-player,
    .standings-table td.col-player {
        width: 104px !important;
        min-width: 104px !important;
        max-width: 104px !important;
        padding-left: 5px;
        padding-right: 5px;
    }

    .sticky-rank,
    .sticky-player {
        position: sticky;
        z-index: 2;
        background: #fff;
    }

    .sticky-rank {
        left: 0;
    }

    .sticky-player {
        left: 42px;
        box-shadow: 8px 0 10px -10px rgba(16, 24, 40, .55);
    }

    .standings-table thead .sticky-rank,
    .standings-table thead .sticky-player {
        z-index: 4;
        background: #f7f9f8;
    }

    .standings-table tbody tr:hover .sticky-rank,
    .standings-table tbody tr:hover .sticky-player {
        background: #fbfcfb;
    }

    .standings-table th.col-player,
    .standings-table td.col-player {
        text-align: left;
    }

    .standings-player-photo {
        display: none;
    }

    .standings-player-link {
        display: block;
        overflow: hidden;
        color: #16813a;
        font-size: .80rem;
        font-weight: 500;
        line-height: 1.2;
    }

    .standings-player-name {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .desktop-label {
        display: none;
    }

    .mobile-label {
        display: inline;
    }

    .standings-pagination {
        display: flex;
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .standings-page-nav {
        order: 1;
        max-width: 100%;
        overflow: hidden;
    }

    .standings-page-summary {
        order: 2;
        text-align: center;
    }

    .standings-page-size {
        order: 3;
        align-self: center;
    }

    .page-number:nth-of-type(n+7) {
        display: none;
    }
}

@media (max-width: 430px) {
    .standings-filter-form {
        grid-template-columns: 1fr;
    }

    .standings-heading {
        margin-bottom: 18px;
    }

    .standings-table {
        min-width: 410px;
    }

    .page-button,
    .page-number {
        min-width: 31px;
        height: 31px;
        padding: 0 6px;
    }

    .standings-page-size label {
        flex-direction: column;
        gap: 5px;
    }
}


/* =========================================================
   Mobile standings pagination — compact layout
   ========================================================= */
@media (max-width: 640px) {
    .standings-pagination {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "nav nav"
            "summary size";
        align-items: center;
        gap: 12px 10px;
        padding: 14px 10px 16px;
    }

    .standings-page-nav {
        grid-area: nav;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 4px;
        width: 100%;
        min-width: 0;
        overflow: visible;
    }

    .standings-page-nav .page-first,
    .standings-page-nav .page-last {
        display: none;
    }

    .standings-page-nav .page-button,
    .standings-page-nav .page-number {
        width: 34px;
        min-width: 34px;
        height: 34px;
        padding: 0;
        border-radius: 9px;
        font-size: .78rem;
        line-height: 32px;
        text-align: center;
    }

    .standings-page-nav .page-ellipsis {
        width: 18px;
        min-width: 18px;
        padding: 0;
        font-size: .78rem;
        text-align: center;
    }

    .standings-page-summary {
        grid-area: summary;
        margin: 0;
        font-size: .76rem;
        line-height: 1.2;
        white-space: nowrap;
        text-align: left;
    }

    .standings-page-summary::first-letter {
        text-transform: none;
    }

    .standings-page-size {
        grid-area: size;
        margin: 0;
    }

    .standings-page-size label {
        display: flex;
        align-items: center;
        gap: 5px;
        margin: 0;
    }

    .standings-page-size label > span {
        font-size: 0;
        line-height: 1;
    }

    .standings-page-size label > span::after {
        content: "Rows:";
        font-size: .72rem;
        font-weight: 700;
        color: #667085;
    }

    .standings-page-size select {
        width: 58px;
        min-width: 58px;
        height: 32px;
        padding: 0 20px 0 8px;
        border-radius: 8px;
        font-size: .76rem;
        font-weight: 700;
    }
}

@media (max-width: 390px) {
    .standings-page-nav {
        gap: 3px;
    }

    .standings-page-nav .page-button,
    .standings-page-nav .page-number {
        width: 31px;
        min-width: 31px;
        height: 31px;
        border-radius: 8px;
        font-size: .74rem;
        line-height: 29px;
    }

    .standings-pagination {
        gap: 10px 6px;
        padding-left: 7px;
        padding-right: 7px;
    }

    .standings-page-summary {
        font-size: .71rem;
    }

    .standings-page-size label > span::after {
        font-size: .68rem;
    }

    .standings-page-size select {
        width: 54px;
        min-width: 54px;
        height: 30px;
        font-size: .72rem;
    }
}
/* =========================================================
   STAT GLOSSARY V3
   Desktop remains unchanged; mobile is intentionally compact.
   Replace the previous STAT GLOSSARY CSS block with this block.
   ========================================================= */

.glossary-mobile-text {
    display: none;
}

.standings-glossary {
    margin: 0 0 14px;
    border: 1px solid #e2e7ea;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.standings-glossary summary {
    padding: 11px 14px;
    cursor: pointer;
    color: var(--navy, #102636);
    font-size: .88rem;
    font-weight: 700;
    user-select: none;
}

.standings-glossary[open] summary {
    border-bottom: 1px solid #edf0f2;
}

.standings-glossary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 28px;
    padding: 10px 14px 14px;
}

.standings-glossary-grid > div {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    column-gap: 16px;
    align-items: start;
    padding: 7px 0;
    border-bottom: 1px solid #f1f3f4;
    font-size: .82rem;
    line-height: 1.35;
}

.standings-glossary-grid strong,
.standings-glossary-ff strong,
.standings-glossary-note strong {
    color: var(--navy, #102636);
}

.standings-glossary-grid span,
.standings-glossary-ff,
.standings-glossary-note {
    color: #58656d;
}

.standings-glossary-ff {
    margin: 12px 14px 0;
    padding: 13px 14px;
    border-radius: 8px;
    background: #f5f8f6;
    font-size: .8rem;
    line-height: 1.45;
}

.standings-glossary-subhead {
    display: block;
    margin-bottom: 8px;
    font-size: .84rem;
}

.standings-glossary-ff p {
    margin: 5px 0;
}

.standings-glossary-note {
    margin: 14px;
    font-size: .76rem;
    line-height: 1.45;
}

@media (max-width: 760px) {
    .glossary-desktop-text {
        display: none;
    }

    .glossary-mobile-text {
        display: inline;
    }

    .standings-glossary {
        margin-bottom: 10px;
    }

    .standings-glossary summary {
        padding: 9px 10px;
        font-size: .82rem;
    }

    .standings-glossary-grid {
        display: block;
        padding: 5px 10px 7px;
    }

    .standings-glossary-grid > div {
        display: block;
        padding: 4px 0;
        border-bottom: 0;
        font-size: .76rem;
        line-height: 1.3;
    }

    .standings-glossary-grid > div strong {
        display: inline;
        margin-right: 5px;
    }

    .standings-glossary-grid > div strong::after {
        content: " —";
        font-weight: 400;
        color: #7a858c;
    }

    .standings-glossary-grid > div span {
        display: inline;
    }

    .standings-glossary-ff {
        margin: 8px 10px 0;
        padding: 9px 10px;
        font-size: .74rem;
        line-height: 1.35;
    }

    .standings-glossary-subhead {
        margin-bottom: 4px;
        font-size: .77rem;
    }

    .standings-glossary-ff p {
        margin: 3px 0;
    }

    .standings-glossary-note {
        margin: 8px 10px 10px;
        font-size: .7rem;
        line-height: 1.35;
    }
}
/* =========================================================
   MY STANDINGS ROW
   Highlights the logged-in player's row without changing layout.
   ========================================================= */

.standings-table tbody tr.standings-my-row > td {
    background: #f1faee;
}

.standings-table tbody tr.standings-my-row > td:first-child {
    box-shadow: inset 3px 0 0 var(--dttf-green, #7bdc5c);
}

/* Sticky mobile cells need their own background so the highlight
   remains intact while the stat columns scroll underneath. */
@media (max-width: 760px) {
    .standings-table tbody tr.standings-my-row > .sticky-rank,
    .standings-table tbody tr.standings-my-row > .sticky-player {
        background: #f1faee;
    }
}
