/* =============================================================================
   TRENDING PAGE
   Measured 24-hour chart: featured #1, positions 2 to 10, positions 11 to 20.
   ============================================================================= */

.tnd-page {
    width: min(100%, 1180px);
    margin: 0 auto;
    padding-bottom: 40px;
}

/* ── Page head ───────────────────────────────────────────────────────────── */
.tnd-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 28px;
}

.tnd-head h1 {
    margin: 0 0 8px;
    color: var(--clr-text-primary);
    font-family: var(--font-display);
    font-size: clamp(3.1rem, 5vw, 4.3rem);
    font-weight: 800;
    line-height: .86;
    letter-spacing: -.025em;
}

.tnd-head__copy p {
    max-width: 610px;
    margin: 0;
    color: var(--clr-text-muted);
    font-size: 15px;
    line-height: 1.55;
}

.tnd-head__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    padding-bottom: 4px;
    color: var(--clr-text-muted);
    font-size: 11px;
    line-height: 1.5;
    text-align: right;
    white-space: nowrap;
}

.tnd-head__meta strong {
    color: var(--clr-text-secondary);
    font-weight: 600;
}

/* ── Featured story and top rail ─────────────────────────────────────────── */
.tnd-chart-top {
    display: grid;
    grid-template-columns: minmax(0, 1.94fr) minmax(0, 1fr);
    gap: 22px;
    align-items: stretch;
}

.tnd-chart-top--lead-only {
    grid-template-columns: minmax(0, 1fr);
}

.tnd-lead {
    display: flex;
    min-width: 0;
}

.tnd-lead-card {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    background: var(--clr-bg-raised);
    text-decoration: none;
    transition: border-color .2s ease, background .2s ease;
}

.tnd-lead-card:hover {
    border-color: var(--clr-border-strong);
    background: var(--clr-bg-hover);
}

.tnd-lead-card__media {
    position: relative;
    overflow: hidden;
    background: var(--clr-bg-elevated);
}

.tnd-lead-card__media::after {
    position: absolute;
    inset: auto 0 0;
    height: 32%;
    content: "";
    background: linear-gradient(transparent, rgba(0, 0, 0, .44));
    pointer-events: none;
}

.tnd-lead-card__media img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    transition: transform .7s var(--ease-out);
}

.tnd-lead-card:hover .tnd-lead-card__media img {
    transform: scale(1.025);
}

.tnd-lead-card__body {
    display: grid;
    grid-template-columns: 66px minmax(0, 1fr);
    align-items: center;
    gap: 20px;
    flex: 1;
    padding: 22px 26px 25px;
}

.tnd-rank-mark {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
}

.tnd-rank-mark__number {
    color: var(--clr-brand-text);
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 800;
    line-height: .72;
    letter-spacing: -.025em;
}

.tnd-rank-mark__rule {
    width: 27px;
    height: 2px;
    background: var(--clr-brand);
}

.tnd-lead-card__copy {
    min-width: 0;
}

.tnd-category {
    display: block;
    color: var(--clr-text-muted);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.4;
}

.tnd-lead-card__title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    margin: 6px 0 12px;
    color: var(--clr-text-primary);
    font-family: var(--font-display);
    font-size: clamp(2rem, 2.6vw, 2.65rem);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -.012em;
    text-wrap: balance;
}

.tnd-byline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0;
    color: var(--clr-text-muted);
    font-size: 11px;
    line-height: 1.45;
}

.tnd-byline__dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--clr-border-strong);
}

.tnd-top-list {
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    background: var(--clr-bg-raised);
    list-style: none;
}

.tnd-top-list__item {
    flex: 1 1 0;
    min-width: 0;
    border-bottom: 1px solid var(--clr-border);
}

.tnd-top-list__item:last-child {
    border-bottom: 0;
}

.tnd-top-list__link {
    display: grid;
    grid-template-columns: 30px 50px minmax(0, 1fr);
    gap: 9px;
    align-items: center;
    height: 100%;
    min-height: 58px;
    padding: 5px 10px 5px 9px;
    text-decoration: none;
    transition: background .15s ease;
}

.tnd-top-list__link:hover {
    background: var(--clr-bg-hover);
}

.tnd-top-list__rank {
    align-self: start;
    padding-top: 3px;
    color: var(--clr-brand-text);
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    line-height: .75;
    letter-spacing: -.025em;
}

.tnd-top-list__thumb {
    display: block;
    width: 50px;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: var(--clr-bg-elevated);
}

.tnd-top-list__thumb--empty,
.tnd-chart-row__thumb--empty {
    background: linear-gradient(135deg, var(--clr-bg-elevated), var(--clr-bg-surface));
}

.tnd-top-list__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s var(--ease-out);
}

.tnd-top-list__link:hover .tnd-top-list__thumb img {
    transform: scale(1.035);
}

.tnd-top-list__copy {
    min-width: 0;
    align-self: center;
}

.tnd-top-list__title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    margin-top: 1px;
    color: var(--clr-text-primary);
    font-family: var(--font-display);
    font-size: 1.04rem;
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -.005em;
}

.tnd-top-list__link:hover .tnd-top-list__title {
    color: var(--clr-brand-text);
}

.tnd-top-list .tnd-category {
    font-size: 10px;
    line-height: 1.3;
}

/* ── Positions 11 to 20 ──────────────────────────────────────────────────── */
.tnd-more {
    margin-top: 42px;
}

.tnd-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 12px;
}

.tnd-section-head h2 {
    margin: 0;
    color: var(--clr-text-primary);
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    line-height: .95;
    letter-spacing: -.01em;
}

.tnd-section-head p {
    margin: 0;
    color: var(--clr-text-muted);
    font-size: 11px;
    line-height: 1.5;
}

.tnd-more-list {
    margin: 0;
    padding: 0;
    column-count: 2;
    column-gap: 34px;
    list-style: none;
}

.tnd-chart-row {
    break-inside: avoid;
    border-bottom: 1px solid var(--clr-border);
}

.tnd-more-list .tnd-chart-row:last-child {
    border-bottom: 0;
}

.tnd-chart-row__link {
    display: grid;
    grid-template-columns: 40px 64px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-height: 82px;
    padding: 12px 0;
    text-decoration: none;
    transition: background .15s ease;
}

.tnd-chart-row__link:hover {
    background: var(--clr-bg-hover);
}

.tnd-chart-row__rank {
    color: var(--clr-brand-text);
    font-family: var(--font-display);
    font-size: 1.65rem;
    font-weight: 800;
    line-height: .8;
    letter-spacing: -.02em;
}

.tnd-chart-row__thumb {
    display: block;
    width: 64px;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: var(--clr-bg-elevated);
}

.tnd-chart-row__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s var(--ease-out);
}

.tnd-chart-row__link:hover .tnd-chart-row__thumb img {
    transform: scale(1.035);
}

.tnd-chart-row__copy {
    min-width: 0;
}

.tnd-chart-row__title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    margin-top: 3px;
    color: var(--clr-text-primary);
    font-family: var(--font-display);
    font-size: 1.16rem;
    font-weight: 700;
    line-height: 1.05;
}

.tnd-chart-row__link:hover .tnd-chart-row__title {
    color: var(--clr-brand-text);
}

.tnd-chart-row .tnd-category {
    font-size: 10px;
}

/* ── Empty state ─────────────────────────────────────────────────────────── */
.tnd-empty {
    max-width: 760px;
    margin: 8px auto 0;
    padding: 32px;
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    background: var(--clr-bg-raised);
}

.tnd-empty h2 {
    margin: 0 0 10px;
    color: var(--clr-text-primary);
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.tnd-empty p {
    max-width: 520px;
    margin: 0 0 18px;
    color: var(--clr-text-muted);
    font-size: 14px;
    line-height: 1.6;
}

.tnd-empty__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    color: var(--clr-brand-text);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.tnd-empty__link:hover {
    color: var(--clr-text-primary);
}

.tnd-empty__link svg {
    width: 17px;
    height: 17px;
}

/* ── Explore footer ──────────────────────────────────────────────────────── */
.tnd-explore {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 38px;
    padding-top: 20px;
    border-top: 1px solid var(--clr-border);
}

.tnd-explore p {
    margin: 0;
    color: var(--clr-text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.tnd-explore nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 18px;
}

.tnd-explore a {
    color: var(--clr-text-secondary);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
}

.tnd-explore a:hover {
    color: var(--clr-brand-text);
}

/* ── Tablet ──────────────────────────────────────────────────────────────── */
@media (max-width: 1023px) {
    .tnd-chart-top {
        grid-template-columns: minmax(0, 1fr);
    }

    .tnd-lead-card__media img {
        height: clamp(340px, 40vw, 420px);
    }

    .tnd-top-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .tnd-top-list__item:nth-child(odd) {
        border-right: 1px solid var(--clr-border);
    }

    .tnd-top-list__item:last-child {
        grid-column: 1 / -1;
        border-right: 0;
        border-bottom: 0;
    }

    .tnd-top-list__link {
        min-height: 76px;
        padding: 10px 14px;
    }

    .tnd-more-list {
        column-count: 1;
    }
}

/* ── Mobile ──────────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
    .tnd-page {
        padding-bottom: 32px;
    }

    .tnd-head {
        display: block;
        margin-bottom: 20px;
    }

    .tnd-head h1 {
        margin-bottom: 10px;
        font-size: 3.35rem;
    }

    .tnd-head__copy p {
        font-size: 14px;
    }

    .tnd-head__meta {
        align-items: flex-start;
        margin-top: 14px;
        padding-bottom: 0;
        text-align: left;
    }

    .tnd-chart-top {
        gap: 14px;
    }

    .tnd-lead-card__body {
        grid-template-columns: 52px minmax(0, 1fr);
        gap: 14px;
        padding: 18px 18px 20px;
    }

    .tnd-lead-card__media img {
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .tnd-rank-mark__number {
        font-size: 2.9rem;
    }

    .tnd-rank-mark__rule {
        width: 22px;
    }

    .tnd-lead-card__title {
        -webkit-line-clamp: 4;
        font-size: 2rem;
    }

    .tnd-top-list {
        display: flex;
    }

    .tnd-top-list__item:nth-child(odd) {
        border-right: 0;
    }

    .tnd-top-list__item:last-child {
        grid-column: auto;
        border-bottom: 0;
    }

    .tnd-top-list__link {
        grid-template-columns: 32px 56px minmax(0, 1fr);
        min-height: 68px;
        padding: 8px 12px;
    }

    .tnd-top-list__rank {
        font-size: 1.65rem;
    }

    .tnd-top-list__thumb {
        width: 56px;
    }

    .tnd-top-list__title {
        font-size: 1.1rem;
    }

    .tnd-more {
        margin-top: 34px;
    }

    .tnd-section-head {
        align-items: end;
    }

    .tnd-section-head h2 {
        font-size: 1.85rem;
    }

    .tnd-chart-row__link {
        grid-template-columns: 36px 68px minmax(0, 1fr);
        gap: 11px;
        min-height: 86px;
    }

    .tnd-chart-row__rank {
        font-size: 1.5rem;
    }

    .tnd-chart-row__thumb {
        width: 68px;
    }

    .tnd-chart-row__title {
        font-size: 1.16rem;
    }

    .tnd-empty {
        padding: 24px;
    }

    .tnd-explore {
        display: block;
        margin-top: 32px;
    }

    .tnd-explore nav {
        margin-top: 10px;
    }
}

/* ── Narrow mobile ───────────────────────────────────────────────────────── */
@media (max-width: 479px) {
    .tnd-head h1 {
        font-size: 3.1rem;
    }

    .tnd-lead-card__title {
        font-size: 1.9rem;
    }

    .tnd-top-list__link {
        grid-template-columns: 31px 52px minmax(0, 1fr);
        gap: 9px;
    }

    .tnd-top-list__thumb {
        width: 52px;
    }

    .tnd-top-list__title {
        font-size: 1.06rem;
    }

    .tnd-chart-row__link {
        grid-template-columns: 33px 62px minmax(0, 1fr);
        gap: 10px;
    }

    .tnd-chart-row__thumb {
        width: 62px;
    }
}
