/* ==========================================================================
   League Tables Hub
   Desktop-first responsive: base → 1279px → 767px → 599px
   ========================================================================== */

#league-tables-hub {
    margin-bottom: 0;
}

#rankings {
    scroll-margin-top: calc(var(--spacer_top) + var(--spacer_top_eyebrow, 0) + 24px);
}

#league-tables-hub *,
#league-tables-hub *::before,
#league-tables-hub *::after {
    box-sizing: border-box;
}

/* ==========================================================================
   .lth-hero
   ========================================================================== */

.lth-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: var(--blue-700);
}

.lth-hero__overlay {
    --lth-hero-poster: url(../images/hero.webp); /* Overwritten by [style] attr when ACF poster is set */
    --lth-hero-lqip: url(../images/hero.webp);   /* Overwritten by [style] attr when a poster is available */
    position: absolute;
    inset: 0;
    background: var(--lth-hero-poster) 50% 50% / cover no-repeat;
    z-index: 1;
    transition: none;
}

@media (prefers-reduced-motion: no-preference) {
    .lth-hero--has-video .lth-hero__overlay {
        --lth-hero-poster: var(--lth-hero-lqip) !important;
    }
}

.lth-hero__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

@media (prefers-reduced-motion: reduce) {
    .lth-hero__video {
        display: none;
    }
}

.lth-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--blue-600);
    mix-blend-mode: color;
    z-index: 2;
    pointer-events: none;
}

.lth-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(8, 52, 155, 0.72) 0%, rgba(3, 18, 53, 0.72) 100%);
    z-index: 3;
    pointer-events: none;
}

.lth-hero__wrap {
    position: relative;
    z-index: 4;
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 44px 150px;
    gap: 40px;
}

.lth-hero__content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 683px;
}

.lth-hero__meta {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lth-hero__meta svg {
    fill: white;
    width: 14px;
    height: 14px;
}

.lth-hero__date {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: rgba(255, 255, 255, 0.68);
    white-space: nowrap;
}

.lth-hero__date svg {
    flex-shrink: 0;
}

.lth-hero__date-only {
    display: none;
}

.lth-hero__heading {
    color: white;
    margin: 0;
}

.lth-hero__description {
    color: white;
    opacity: 0.8;
    margin: 0;
}

.lth-hero__actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.lth-hero__btn {
    white-space: nowrap;
}

/* ==========================================================================
   .lth-page-content
   ========================================================================== */

.lth-page-content {
    background: var(--grey-25);
}

/* ==========================================================================
   .lth-stats
   ========================================================================== */

.lth-stats {
    padding: 40px 0 24px;
}

.lth-stats__wrap {
    max-width: 1140px;
    margin: 0 auto;
    display: flex;
    gap: 24px;
    padding: 0 150px;
}

/* Override padding — use max-width centering instead */
.lth-stats__wrap {
    padding: 0;
    max-width: 1140px;
}

.lth-stats__tile {
    flex: 1 1 0;
    background: white;
    border: 1px solid var(--grey-200);
    border-radius: 16px;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.lth-stats__tile-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.lth-stats__tile-label {
    text-transform: uppercase;
    color: var(--grey-500);
    padding: 0 8px;
}

.lth-stats__tile-value-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 8px;
}

.lth-stats__tile-value {
    color: var(--grey-800);
}

.lth-stats__tile-change {
    color: var(--green-500);
}

.lth-stats__tile-icon.icon-ring1 {
    position: absolute;
    top: 23px;
    right: 23px;
}

/* ==========================================================================
   .lth-rankings-section
   ========================================================================== */

.lth-rankings-section {
    padding: 0 0 24px;
}

.lth-rankings-section__wrap {
    max-width: 1140px;
    margin: 0 auto;
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

/* ==========================================================================
   .lth-rankings (left column)
   ========================================================================== */

.lth-rankings {
    flex: 0 1 720px;
    min-width: 0;
    border-radius: var(--radius-16);
    border: 1px solid var(--border-02);
    overflow: hidden; /* Clip background inside border-radius */
}

.lth-rankings__header {
    background: white;
    padding: 24px 0 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lth-rankings__header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
}

.lth-rankings__title {
    color: var(--grey-800);
    margin: 0;
}


.lth-rankings__tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--grey-200);
    padding: 8px 8px 0;
}

.lth-rankings__tab {
    padding: 6px 8px 14px;
    border: none;
    background: transparent;
    font-family: inherit;
    color: var(--grey-500);
    cursor: pointer;
    position: relative;
    white-space: nowrap;
}

.lth-rankings__tab:hover {
    color: var(--grey-600);
}

.lth-rankings__tab:hover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--grey-150);
    border-radius: 2px 2px 0 0;
}

.lth-rankings__tab.-active {
    color: var(--brand-primary);
}

.lth-rankings__tab.-active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--brand-primary);
    border-radius: 2px 2px 0 0;
}

/* ==========================================================================
   .lth-table
   ========================================================================== */

.lth-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

thead tr.lth-table__head {
    background: var(--grey-50);
}

.lth-table__th {
    padding: 15px 16px;
    font-size: 14px;
    font-variation-settings: "slnt" 0, "wght" 584;
    line-height: 18px;
    letter-spacing: 0.16px;
    color: var(--grey-500);
    text-align: left;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 1px solid var(--grey-200);
    text-transform: uppercase;
}

.lth-table__th--rank {
    width: 94px;
}

.lth-table__th--joined {
    width: 84px;
}

.lth-table__th--hq {
    width: 192px;
}

.lth-table__sort-icon {
    vertical-align: middle;
    margin-left: 4px;
    fill: var(--dark);
    width: 16px;
    height: 16px;
    position: relative;
    top: -1px;
}

.lth-table__row {
    border-bottom: 1px solid var(--grey-100);
}

.lth-table__row:nth-child(odd) {
    background: var(--grey-25);
}

.lth-table__row:nth-child(even) {
    background: white;
}

.lth-table__td {
    padding: 17px 16px 16px;
    font-size: 16px;
    font-variation-settings: "slnt" 0, "wght" 400;
    line-height: 22px;
    color: var(--grey-800);
    vertical-align: middle;
}

.lth-table__td--rank {
    width: 94px;
}

.lth-table__td--firm {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lth-table__td--joined {
    width: 84px;
    font-size: 14px;
    line-height: 18px;
    letter-spacing: 0.16px;
}

.lth-table__td--hq {
    font-size: 14px;
    line-height: 18px;
    letter-spacing: 0.16px;
}

.lth-table__firm-link {
    color: var(--brand-primary);
    text-decoration: none;
    font-variation-settings: "slnt" 0, "wght" 584;
    font-size: 16px;
    line-height: 22px;
}

span.lth-table__firm-link {
    color: var(--text-secondary);
}

.lth-table__rank-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    background: var(--blue-50);
    border-radius: 4px;
}

.lth-table__rank-badge svg {
    fill: var(--brand-primary);
    width: 14px;
    height: 14px;
}

/* ==========================================================================
   .lth-sidebar (right column)
   ========================================================================== */

.lth-sidebar {
    flex: 0 1 396px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.lth-sidebar__header {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lth-sidebar__header-spacer {
    display: none;
}

.lth-sidebar__title {
    color: var(--grey-800);
    margin: 0;
}

.lth-sidebar__subtitle {
    color: var(--grey-500);
    margin: 0;
}

/* sidebar card */

.lth-sidebar-card {
    border: 1px solid var(--grey-200);
    border-radius: 16px;
    overflow: hidden;
    background: white;
}

.lth-sidebar-card__header {
    padding: 24px 24px 16px;
}

.lth-sidebar-card__header-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lth-sidebar-card__title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.lth-sidebar-card__title {
    color: var(--grey-800);
}

.lth-sidebar-card__info-btn {
    margin: -16px 0;
    position: relative;
    top: 8px;
    right: -4px;
}

.lth-sidebar-card__subtitle {
    color: var(--grey-500);
}

.lth-sidebar-card__link {
    padding: 16px 24px;
    width: 100%;
}

.lth-sidebar-card__comps-img,
.lth-sidebar-card__breakdown,
.lth-sidebar-card__chart {
    max-width: 394px; /* Keep it no wider than displayed on desktop */
    margin: 0 auto;
}


/* deals chart */

.lth-sidebar-card__chart {
    padding: 0 24px 12px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.lth-sidebar-card__chart-area {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    height: 138px;
    padding: 0;
    background-image: repeating-linear-gradient(
        to top,
        var(--grey-100) 0,
        var(--grey-100) 1px,
        transparent 1px,
        transparent 48%
    );
}

.lth-sidebar-card__chart-bar {
    flex: 1;
    background: var(--grey-100);
    border-radius: 4px 4px 0 0;
    min-width: 0;
}

.lth-sidebar-card__chart-bar:nth-child(1) {
    background: var(--blue-100);
    height: 7%;
}

.lth-sidebar-card__chart-bar:nth-child(2) {
    background: var(--blue-200);
    height: 11%;
}

.lth-sidebar-card__chart-bar:nth-child(3) {
    background: var(--blue-300);
    height: 28%;
}

.lth-sidebar-card__chart-bar:nth-child(4) {
    background: var(--blue-400);
    height: 56%;
}

.lth-sidebar-card__chart-bar:nth-child(5) {
    background: var(--brand-primary);
    height: 92%;
}

.lth-sidebar-card__chart-bar:nth-child(6) {
    background: var(--blue-600);
    height: 98%;
}

.lth-sidebar-card__chart-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-variation-settings: "slnt" 0, "wght" 584;
    line-height: 16px;
    letter-spacing: 0.24px;
    color: var(--grey-500);
    text-align: center;
}

.lth-sidebar-card__chart-labels span {
    width: 14%;
    display: block;
}

.lth-sidebar-card__buttons {
    padding: 0 24px 12px;
}

/* industry breakdown */

.lth-sidebar-card__breakdown {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 24px 12px;
    margin: -8px auto 0;
}

.lth-sidebar-card__donut {
    flex-shrink: 0;
    position: relative;
    top: 4px;
}

.lth-sidebar-card__legend {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.lth-sidebar-card__legend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.lth-sidebar-card__legend-dot {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    flex-shrink: 0;
}

.lth-sidebar-card__legend-label {
    flex: 1;
    font-size: 14px;
    font-variation-settings: "slnt" 0, "wght" 400;
    line-height: 18px;
    letter-spacing: 0.16px;
    color: var(--grey-800);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lth-sidebar-card__legend-value {
    font-size: 14px;
    font-variation-settings: "slnt" 0, "wght" 400;
    line-height: 18px;
    letter-spacing: 0.16px;
    color: var(--grey-500);
}

/* valuation comps */

.lth-sidebar-card__comps-img {
    display: block;
    padding: 0 24px;
    margin: -12px auto 14px;
}

.lth-sidebar-card__comps-img div {
    padding-top: 100%;
    background: transparent 0 0 / cover no-repeat;
}

.lth-sidebar__more-btn {
    width: 100%;
    justify-content: center;
}

/* ==========================================================================
   .lth-methodology
   ========================================================================== */

.lth-methodology {
    padding: 0 0 24px;
}

.lth-methodology__wrap {
    max-width: 1140px;
    margin: 0 auto;
    background: white;
    border: 1px solid var(--grey-200);
    border-radius: 16px;
    padding: 24px;
}

.lth-methodology__heading {
    color: var(--grey-800);
    margin: 0 0 10px;
}

.lth-methodology__description {
    color: var(--grey-800);
    margin: 0 0 10px;
}

.lth-methodology__tiles {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.lth-methodology__tile {
    flex: 1 1 calc(50% - 8px);
    min-width: 280px;
    background: white;
    border: 1px solid var(--grey-200);
    border-radius: 16px;
    padding: 24px 24px 22px;
    position: relative;
    overflow: hidden;
}

.lth-methodology__tile-icon.icon-ring1 {
    position: absolute;
    top: 23px;
    right: 23px;
}

.lth-methodology__tile-title {
    color: var(--grey-800);
    margin: 0 0 8px;
}

.lth-methodology__tile-text {
    color: var(--grey-500);
    margin: 0;
    max-width: 85%;
}

/* ==========================================================================
   .lth-cta
   ========================================================================== */

.lth-cta {
    padding: 0;
}

.lth-cta__wrap {
    max-width: 1140px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    background: radial-gradient(ellipse at center bottom, #2249a6 0%, #16306c 50%, #10234e 75%, #0a1631 100%);
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 32px;
}

.lth-cta__heading {
    color: white;
    margin: 0;
}

.lth-cta__description {
    color: var(--blue-100);
    margin: 0;
    max-width: 800px;
}

.lth-cta__actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* ==========================================================================
   .lth-faq
   ========================================================================== */

.lth-faq {
    padding: 24px 0 40px;
}

.lth-faq__wrap {
    max-width: 1140px;
    margin: 0 auto;
    background: white;
    border: 1px solid var(--grey-200);
    border-radius: 16px;
    padding: 24px 24px 0;
    overflow: hidden;
}

.lth-faq__heading {
    color: var(--grey-800);
    margin: 0 0 10px;
}

.lth-faq__list {
    margin: 0;
}

.lth-faq__item:not(:first-child) {
    border-top: 1px solid var(--grey-200);
}

.lth-faq__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 19px 0 18px;
    border: none;
    background: none;
    cursor: pointer;
    gap: 16px;
    text-align: left;
    font-family: inherit;
}

.lth-faq__question {
    color: var(--grey-800);
}

.lth-faq__trigger svg {
    flex-shrink: 0;
    transition: transform 0.2s ease;
    position: relative;
    right: 4px;
}

.lth-faq__content {
    padding: 0 0 22px;
}

.lth-faq__content p {
    font-size: 14px;
    font-variation-settings: "slnt" 0, "wght" 400;
    line-height: 22px;
    letter-spacing: 0.16px;
    color: var(--grey-600);
    margin: 0 0 16px;
}

.lth-faq__content p:last-child {
    margin-bottom: 0;
}

.lth-faq__content ul {
    margin: 8px 0 16px;
    padding-left: 24px;
}

.lth-faq__content li {
    font-size: 14px;
    font-variation-settings: "slnt" 0, "wght" 400;
    line-height: 22px;
    letter-spacing: 0.16px;
    color: var(--grey-600);
    margin-bottom: 8px;
}

.lth-faq__content a {
    color: var(--brand-primary);
}

/* ==========================================================================
   TABLET: max-width 1279px
   ========================================================================== */

@media screen and (max-width: 1279px) {
    .lth-hero__wrap {
        flex-direction: column;
        align-items: center;
        padding: 40px 24px;
        gap: 32px;
    }

    .lth-hero__content {
        max-width: none;
        align-items: center;
        text-align: center;
    }

    .lth-hero__meta {
        justify-content: space-between;
        width: 100%;
    }

    .lth-hero__actions {
        width: 100%;
        flex-direction: row;
    }

    .lth-hero__btn {
        width: 100%;
        max-width: 779px;
        margin: 0 auto;
    }

    .lth-hero__updated {
        display: none;
    }

    .lth-hero__date-only {
        display: block;
    }

    .lth-stats {
        padding-bottom: 16px;
    }

    .lth-stats__wrap {
        max-width: none;
        padding: 0 16px;
        gap: 16px;
    }

    .lth-table__th--hq {
        width: 34%;
    }

    .lth-sidebar-card__chart {
        /* Designs use padding: 0 46px 12px 22px; */
        padding: 0 22px 12px;
        margin: -16px auto 0;
        gap: 24px;
    }

    .lth-sidebar-card__chart-area {
        height: 132px;
    }

    .lth-sidebar-card__breakdown {
        margin: -6px auto 0;
    }

    .lth-sidebar-card__comps-img {
        margin: -12px auto 12px;
    }

    .lth-rankings-section {
        padding: 0 0 16px;
    }

    .lth-rankings-section__wrap {
        max-width: none;
        padding: 0 16px;
        flex-direction: column;
    }

    .lth-rankings {
        flex: none;
        width: 100%;
    }

    .lth-sidebar {
        flex: none;
        width: 100%;
    }

    .lth-methodology {
        padding: 0 16px;
    }

    .lth-methodology__wrap {
        max-width: none;
    }

    .lth-methodology__tiles {
        gap: 14px 16px;
    }

    .lth-methodology__tile-icon.icon-ring1 {
        top: 14px;
        right: 16px;
    }

    .lth-methodology__tile-title {
        margin: 0 0 16px;
    }

    .lth-methodology__tile-text {
        max-width: none;
    }

    .lth-cta {
        padding: 16px;
    }

    .lth-cta__wrap {
        max-width: none;
    }

    .lth-faq {
        padding: 0 16px 40px;
    }

    .lth-faq__wrap {
        max-width: none;
    }

    .lth-faq__trigger {
        padding: 21px 0 20px;
    }

    /* Sidebar insight cards in a row on tablet */
    .lth-sidebar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .lth-sidebar__header-spacer {
        display: block;
    }

    .lth-sidebar__more-btn {
        grid-column: 1 / -1;
    }
}

/* ==========================================================================
   MOBILE: max-width 767px
   ========================================================================== */

@media screen and (max-width: 767px) {
    .lth-hero__wrap {
        padding: 50px 24px 40px;
        gap: 32px;
    }

    .lth-hero__actions {
        flex-direction: column;
    }

    .lth-stats {
        padding: 16px 0;
    }

    .lth-stats__wrap {
        flex-direction: column;
        padding: 0 16px;
    }

    .lth-stats__tile {
        flex: 1 1 auto;
    }

    .lth-rankings-section__wrap {
        padding: 0 16px;
    }

    .lth-rankings__header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .lth-rankings__tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .lth-table__th--joined,
    .lth-table__td--joined,
    .lth-table__th--hq,
    .lth-table__td--hq {
        display: none;
    }

    .lth-sidebar {
        grid-template-columns: 1fr;
    }

    .lth-sidebar__header-spacer {
        display: none;
    }

    .lth-sidebar-card__chart {
        padding: 0 14px 12px 22px;
    }

    .lth-methodology {
        padding: 0 16px;
    }

    .lth-methodology__tiles {
        flex-direction: column;
        gap: 10px;
    }

    .lth-methodology__tile {
        min-width: 0;
    }

    .lth-cta {
        padding: 16px;
    }

    .lth-cta__wrap {
        padding: 16px;
        gap: 10px;
    }

    .lth-cta__actions {
        flex-direction: column;
        width: 100%;
    }

    .lth-cta__btn {
        width: 100%;
        justify-content: center;
    }

    .lth-cta__actions {
        margin-top: 20px;
    }

    .lth-faq {
        padding: 0 16px;
    }

    .lth-faq__trigger {
        padding: 19px 0;
    }
}
