.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-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 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: 450px;
        font-size: .76rem;
    }

    .standings-table th {
        min-width: 48px;
        padding: 9px 4px;
        border-right: 1px solid #edf0f2;
        text-align: center;
    }

    .standings-table td {
        min-width: 48px;
        padding: 9px 4px;
        border-right: 1px solid #f0f2f4;
        text-align: center;
        line-height: 1.2;
    }

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

    .standings-table .col-rank {
        width: 42px;
        min-width: 42px;
        max-width: 42px;
        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: 112px;
        min-width: 112px;
        max-width: 112px;
        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: 450px;
    }

    .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;
    }
}

/* ============================================================
   STANDINGS: MAIN EVENT / SECOND CHANCE MODE
   ============================================================ */

.standings-event-toggle {
    display: flex;
    width: 100%;
    margin: 0 0 18px;
    padding: 4px;
    border: 1px solid #dfe3e8;
    border-radius: 12px;
    background: #fff;
}

.standings-event-toggle a {
    flex: 1;
    padding: 10px 16px;
    border-radius: 9px;
    color: #667085;
    font-size: .9rem;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
}

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

.second-chance-info {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin: 0 0 22px;
    padding: 16px 18px;
    border: 1px solid #cfe8d5;
    border-radius: 14px;
    background: #eef9f0;
    color: #176b32;
}

.second-chance-info-icon {
    flex: 0 0 auto;
    font-size: 1.65rem;
    line-height: 1;
}

.second-chance-info strong {
    display: block;
    margin-bottom: 4px;
    color: #16813a;
    font-size: 1rem;
}

.second-chance-info p {
    margin: 0;
    font-size: .88rem;
    line-height: 1.5;
}

.standings-controls-second-chance {
    justify-content: flex-start;
}

.second-chance-glossary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.standings-second-chance-table {
    min-width: 610px;
}

.standings-second-chance-table .second-chance-medal-col {
    width: 76px;
    min-width: 76px;
    text-align: center;
}

.standings-second-chance-table .second-chance-medal-col a {
    display: block;
    font-size: 1.15rem;
    text-align: center;
}

@media (max-width: 760px) {
    .standings-event-toggle {
        margin-bottom: 14px;
    }

    .standings-event-toggle a {
        padding: 10px 8px;
        font-size: .84rem;
    }

    .second-chance-info {
        gap: 11px;
        margin-bottom: 18px;
        padding: 14px;
    }

    .second-chance-info-icon {
        font-size: 1.45rem;
    }

    .second-chance-info strong {
        font-size: .92rem;
    }

    .second-chance-info p {
        font-size: .79rem;
        line-height: 1.45;
    }

    .standings-controls-second-chance .standings-filter-form {
        grid-template-columns: 1fr;
    }

    .second-chance-glossary-grid {
        grid-template-columns: 1fr 1fr;
    }

    .standings-second-chance-table {
        min-width: 460px;
    }

    .standings-second-chance-table th,
    .standings-second-chance-table td {
        min-width: 54px;
    }

    .standings-second-chance-table th.col-player,
    .standings-second-chance-table td.col-player {
        width: 145px;
        min-width: 145px;
        max-width: 145px;
    }

    .standings-second-chance-table .second-chance-medal-col {
        width: 48px;
        min-width: 48px;
    }
}



/* Encoding-safe Second Chance award icons.
   Built entirely with HTML/CSS so CFML source encoding cannot corrupt them. */

.second-chance-trophy {
    position: relative;
    display: block;
    width: 25px;
    height: 22px;
    margin: 1px 3px 7px;
    border-radius: 3px 3px 10px 10px;
    background: #16813a;
}

.second-chance-trophy::before {
    content: "";
    position: absolute;
    top: 2px;
    left: -7px;
    width: 35px;
    height: 12px;
    border: 4px solid #16813a;
    border-top: 0;
    border-radius: 0 0 12px 12px;
    box-sizing: border-box;
}

.second-chance-trophy::after {
    content: "";
    position: absolute;
    left: 8px;
    bottom: -8px;
    width: 9px;
    height: 8px;
    border-bottom: 4px solid #16813a;
    box-sizing: border-box;
}

.second-chance-medal {
    display: inline-grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-size: .72rem;
    font-weight: 900;
    line-height: 1;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
    vertical-align: middle;
}

.medal-gold {
    background: #d9a300;
}

.medal-silver {
    background: #9aa3ad;
}

.medal-bronze {
    background: #a96324;
}

.standings-second-chance-table .second-chance-medal {
    width: 25px;
    height: 25px;
    font-size: .72rem;
}

@media (max-width: 760px) {
    .second-chance-medal {
        width: 22px;
        height: 22px;
        font-size: .67rem;
    }
}
