/* --------------------------------------------------
   WEEK OVERVIEW
-------------------------------------------------- */

.week-overview {
    background: var(--surface-primary);
    border-bottom: 1px solid var(--border-primary);
}

.week-overview__top {
    min-height: 112px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 40px;
}

.week-overview h1 {
    margin: 0 0 5px;

    color: var(--heading-color);

    font-size: 2.15rem;
    line-height: 1;
}

.week-overview__dates {
    margin: 0;

    color: var(--text-secondary);

    font-size: 0.85rem;
}


/* --------------------------------------------------
   SEASON / WEEK SELECTORS
-------------------------------------------------- */

.week-selectors {
    display: flex;
    align-items: flex-end;
    gap: 14px;
}

.week-selector {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.week-selector label {
    color: var(--text-secondary);

    font-size: 0.67rem;
    font-weight: 800;

    letter-spacing: 0.1em;

    text-transform: uppercase;
}

.week-selector select {
    min-width: 125px;

    padding: 9px 32px 9px 11px;

    border: 1px solid var(--border-primary);

    background: var(--surface-secondary);
    color: var(--text-primary);

    font-size: 0.82rem;
    font-weight: 700;

    cursor: pointer;
}


/* --------------------------------------------------
   WEEK DAYS
-------------------------------------------------- */

.week-days {
    display: flex;

    border-top: 1px solid var(--border-secondary);
}

.week-days button {
    min-width: 145px;

    padding: 11px 22px;

    border: 0;
    border-right: 1px solid var(--border-secondary);

    background: transparent;
    color: var(--text-primary);

    font-size: 0.78rem;
    font-weight: 700;

    cursor: pointer;
}

.week-days button:first-child {
    border-left: 1px solid var(--border-secondary);
}

.week-days button span {
    display: block;

    margin-top: 3px;

    color: var(--text-muted);

    font-size: 0.68rem;
    font-weight: 500;
}

.week-days button:hover {
    background: var(--surface-secondary);
}

.week-days button.is-active {
    background: var(--3ng-navy);
    color: var(--3ng-white);
}

.week-days button.is-active span {
    color: var(--3ng-silver);
}


/* --------------------------------------------------
   FEATURED MATCHUPS
-------------------------------------------------- */

.featured-matchups {
    padding: 42px 0 52px;

    border-bottom: 1px solid var(--border-secondary);
}

.featured-matchups__grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 20px;
}

.matchup-card {
    overflow: hidden;

    background: var(--surface-primary);

    border: 1px solid var(--border-primary);
    border-top: 3px solid var(--3ng-crimson);
}

.matchup-card__meta {
    padding: 11px 18px;

    background: var(--surface-secondary);

    border-bottom: 1px solid var(--border-secondary);

    color: var(--text-secondary);

    font-size: 0.67rem;
    font-weight: 800;

    letter-spacing: 0.08em;

    text-transform: uppercase;
}

.matchup-card__teams {
    display: grid;

    grid-template-columns:
        1fr auto 1fr;

    align-items: center;

    gap: 20px;

    padding: 24px 20px 17px;
}

.matchup-team:last-child {
    text-align: right;
}

.matchup-team__rank {
    margin-bottom: 5px;

    color: var(--accent-color);

    font-size: 0.72rem;
    font-weight: 900;
}

.matchup-team__name {
    color: var(--heading-color);

    font-size: 1.55rem;
    font-weight: 800;

    line-height: 1;
}

.matchup-team__record {
    margin-top: 6px;

    color: var(--text-secondary);

    font-size: 0.76rem;
    font-weight: 600;
}

.matchup-card__versus {
    color: var(--text-muted);

    font-size: 0.65rem;
    font-weight: 800;

    letter-spacing: 0.1em;
}

.matchup-card__venue {
    padding: 0 20px 18px;

    color: var(--text-secondary);

    font-size: 0.75rem;

    text-align: center;
}


/* --------------------------------------------------
   HOME RANKINGS + SCHEDULE
-------------------------------------------------- */

.home-grid-section {
    padding: 42px 0 48px;
    border-bottom: 1px solid var(--border-secondary);
}

.home-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 56px;
}

.home-panel {
    min-width: 0;
}


/* --------------------------------------------------
   3NG RATINGS
-------------------------------------------------- */

.ratings-section {
    padding: 42px 0 48px;
    border-bottom: 1px solid var(--border-secondary);
}

.ratings-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

.rating-group {
    min-width: 0;
}

.rating-group h3 {
    margin: 0;
    padding: 12px 14px;

    background: var(--surface-primary);
    border-top: 2px solid var(--3ng-crimson);
    border-bottom: 1px solid var(--border-primary);

    color: var(--text-primary);

    font-size: 0.82rem;
    font-weight: 800;

    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.rating-group ol {
    margin: 0;
    padding: 0;

    list-style: none;

    counter-reset: rating-rank;
}

.rating-group li {
    min-height: 42px;

    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;

    padding-right: 14px;

    border-bottom: 1px solid var(--border-secondary);

    counter-increment: rating-rank;
}

.rating-group li::before {
    content: counter(rating-rank);

    color: var(--accent-color);

    font-size: 0.76rem;
    font-weight: 800;

    text-align: center;
}

.rating-group li span {
    color: var(--text-primary);

    font-size: 0.84rem;
    font-weight: 700;
}

.rating-group li strong {
    color: var(--text-secondary);

    font-size: 0.76rem;
    font-weight: 700;

    font-variant-numeric: tabular-nums;
}

.rating-group li:hover {
    background: var(--surface-primary);
}


/* --------------------------------------------------
   PREDICTION PERFORMANCE
-------------------------------------------------- */

.prediction-performance {
    padding: 46px 0 52px;

    background: var(--surface-primary);

    border-top: 1px solid var(--border-secondary);
    border-bottom: 1px solid var(--border-secondary);
}

.performance-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));

    border-top: 1px solid var(--border-primary);
    border-bottom: 1px solid var(--border-primary);
}

.performance-stat {
    min-height: 125px;

    display: flex;
    flex-direction: column;
    justify-content: center;

    padding: 20px 24px;

    border-right: 1px solid var(--border-primary);
}

.performance-stat:last-child {
    border-right: 0;
}

.performance-stat__label {
    margin-bottom: 10px;

    color: var(--text-secondary);

    font-size: 0.68rem;
    font-weight: 800;

    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.performance-stat strong {
    color: var(--text-primary);

    font-size: 1.7rem;
    font-weight: 800;

    letter-spacing: -0.035em;

    font-variant-numeric: tabular-nums;
}

.performance-stat__value {
    margin-top: 4px;

    color: var(--accent-color);

    font-size: 0.82rem;
    font-weight: 800;

    font-variant-numeric: tabular-nums;
}

.performance-stat:hover {
    background: var(--surface-secondary);
}


/* --------------------------------------------------
   NATIONAL STATISTICAL LEADERS
-------------------------------------------------- */

.stat-leaders {
    padding: 46px 0 54px;
    border-bottom: 1px solid var(--border-secondary);
}

.stat-leaders__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

.stat-leader-group {
    min-width: 0;
}

.stat-leader-group h3 {
    margin: 0;
    padding: 12px 14px;

    background: var(--surface-primary);

    border-top: 2px solid var(--3ng-crimson);
    border-bottom: 1px solid var(--border-primary);

    color: var(--text-primary);

    font-size: 0.82rem;
    font-weight: 800;

    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.stat-leader-group ol {
    margin: 0;
    padding: 0;

    list-style: none;
    counter-reset: stat-rank;
}

.stat-leader-group li {
    min-height: 46px;

    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;

    padding-right: 14px;

    border-bottom: 1px solid var(--border-secondary);

    counter-increment: stat-rank;
}

.stat-leader-group li::before {
    content: counter(stat-rank);

    color: var(--accent-color);

    font-size: 0.76rem;
    font-weight: 800;

    text-align: center;
}

.stat-leader-group li:hover {
    background: var(--surface-primary);
}

.stat-leader-team {
    color: var(--text-primary);

    font-size: 0.84rem;
    font-weight: 700;
}

.stat-leader-value {
    color: var(--text-secondary);

    font-size: 0.75rem;
    font-weight: 700;

    font-variant-numeric: tabular-nums;
}


/* --------------------------------------------------
   POWER RANKINGS
-------------------------------------------------- */

.ranking-list {
    border-top: 1px solid var(--border-primary);
}

.ranking-row {
    min-height: 42px;

    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;

    border-bottom: 1px solid var(--border-secondary);
}

.ranking-position {
    color: var(--accent-color);

    font-size: 0.82rem;
    font-weight: 800;

    text-align: center;
}

.ranking-team {
    color: var(--text-primary);

    font-size: 0.88rem;
    font-weight: 700;
}

.ranking-record {
    padding-right: 12px;

    color: var(--text-secondary);

    font-size: 0.76rem;
    font-weight: 600;

    text-align: right;
}

.ranking-row:hover {
    background: var(--surface-primary);
}


/* --------------------------------------------------
   THIS WEEK'S GAMES
-------------------------------------------------- */

.schedule-list {
    border-top: 1px solid var(--border-primary);
}

.schedule-row {
    min-height: 52px;

    display: grid;
    grid-template-columns: 105px minmax(0, 1fr);
    align-items: center;

    border-bottom: 1px solid var(--border-secondary);
}

.schedule-time {
    padding-left: 12px;

    color: var(--text-secondary);

    font-size: 0.73rem;
    font-weight: 700;
}

.schedule-game {
    color: var(--text-primary);

    font-size: 0.88rem;
    font-weight: 700;
}

.schedule-row:hover {
    background: var(--surface-primary);
}


/* --------------------------------------------------
   HOME PANEL HEADING
-------------------------------------------------- */

.home-panel .section-heading {
    min-height: 48px;
    margin-bottom: 14px;
}

.home-panel .section-heading h2 {
    font-size: 1.35rem;
}

.home-panel .section-link {
    white-space: nowrap;
}


/* --------------------------------------------------
   MATCHUP PREDICTION
-------------------------------------------------- */

.matchup-card__prediction {
    display: grid;

    grid-template-columns:
        1fr 1fr;

    background: var(--surface-secondary);

    border-top: 1px solid var(--border-secondary);
    border-bottom: 1px solid var(--border-secondary);
}

.matchup-card__prediction > div {
    padding: 15px 18px;
}

.matchup-card__prediction > div + div {
    border-left: 1px solid var(--border-primary);
}

.prediction-label {
    display: block;

    margin-bottom: 5px;

    color: var(--text-muted);

    font-size: 0.62rem;
    font-weight: 800;

    letter-spacing: 0.07em;

    text-transform: uppercase;
}

.matchup-card__prediction strong {
    color: var(--text-primary);

    font-size: 0.86rem;
}

.matchup-card__link {
    display: block;

    padding: 12px 18px;

    color: var(--accent-color);

    font-size: 0.68rem;
    font-weight: 900;

    letter-spacing: 0.06em;

    text-align: right;
    text-transform: uppercase;
}

.matchup-card__link:hover {
    background: var(--surface-secondary);
}


/* --------------------------------------------------
   HOMEPAGE NUMBER ALIGNMENT
-------------------------------------------------- */

.ranking-row,
.schedule-row,
.matchup-card__prediction {
    font-variant-numeric: tabular-nums;
}


/* --------------------------------------------------
   RESPONSIVE
-------------------------------------------------- */

@media (max-width: 900px) {

    .featured-matchups__grid,
    .home-grid,
    .ratings-grid,
    .stat-leaders__grid {
        grid-template-columns: 1fr;
    }

    .performance-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .performance-stat:nth-child(2) {
        border-right: 0;
    }

    .performance-stat:nth-child(-n + 2) {
        border-bottom: 1px solid var(--border-primary);
    }

}

@media (max-width: 700px) {

    .week-overview__top {
        min-height: auto;
        padding: 25px 0;
        align-items: flex-start;
        flex-direction: column;
    }

    .week-selectors {
        width: 100%;
    }

    .week-selector {
        flex: 1;
    }

    .week-selector select {
        width: 100%;
    }

    .week-days {
        overflow-x: auto;
    }

    .week-days button {
        min-width: 120px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 9px;
    }

    .matchup-card__teams {
        gap: 10px;
        padding-inline: 16px;
    }

    .matchup-team__name {
        font-size: 1.25rem;
    }

    .matchup-card__prediction {
        grid-template-columns: 1fr;
    }

    .matchup-card__prediction > div + div {
        border-top: 1px solid var(--border-primary);
        border-left: 0;
    }

    .performance-grid {
        grid-template-columns: 1fr;
    }

    .performance-stat,
    .performance-stat:nth-child(2) {
        border-right: 0;
        border-bottom: 1px solid var(--border-primary);
    }

    .performance-stat:last-child {
        border-bottom: 0;
    }

}


/* --------------------------------------------------
   HOME DYNAMIC LINKS / EMPTY STATES
-------------------------------------------------- */

.week-days a {
    flex: 0 0 145px;
    padding: 12px 18px;
    border: 1px solid var(--border-primary);
    background: transparent;
    color: var(--text-primary);
    font: inherit;
    font-size: 0.76rem;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.week-days a span {
    display: block;
    margin-top: 3px;
    color: var(--text-secondary);
    font-size: 0.68rem;
    font-weight: 500;
}

.week-days a.is-active {
    background: var(--nav-active-bg);
    border-color: var(--nav-active-bg);
}

.matchup-team__name a,
.ranking-team,
.rating-group a,
.stat-leader-team {
    color: inherit;
    text-decoration: none;
}

.matchup-team__name a:hover,
.ranking-team:hover,
.rating-group a:hover,
.stat-leader-team:hover {
    text-decoration: underline;
}

.home-empty-state {
    grid-column: 1 / -1;
    padding: 28px 20px;
    color: var(--text-secondary);
    border: 1px solid var(--border-primary);
    text-align: center;
}
