/* ==========================================================================
   Working Together / What to Expect: long read with sticky index
   ========================================================================== */

.wt {
    padding-top: clamp(2rem, 1.5rem + 2vw, 3.5rem);
}

/* ---------- Intro ---------- */
.wt-intro {
    max-width: 46rem;
    margin: 0 auto clamp(2.5rem, 2rem + 3vw, 4.5rem);
    text-align: center;
}

.wt-intro__title {
    margin-bottom: var(--space-md);
}

.wt-intro p {
    margin-inline: auto;
}

.wt-intro__lead {
    font-size: var(--text-lead);
}

/* ---------- Layout: index + body ---------- */
.wt__layout {
    display: grid;
    gap: var(--space-lg);
    align-items: start;
}

@media (min-width: 1024px) {
    .wt__layout {
        grid-template-columns: 17rem minmax(0, 1fr);
        gap: clamp(2.5rem, 2rem + 3vw, 5rem);
    }
}

.wt__body {
    max-width: 46rem;
}

/* ---------- "On this page" index ---------- */
.wt-toc__details {
    background: var(--color-surface);
    border: 1px solid color-mix(in srgb, var(--color-secondary) 40%, transparent);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
}

.wt-toc__summary {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 52px;
    padding: 0.5rem 1.1rem;
    list-style: none;
    cursor: pointer;
    font-weight: 500;
    color: var(--color-primary);
}

.wt-toc__summary::-webkit-details-marker {
    display: none;
}

.wt-toc__summary span {
    flex: 1;
}

.wt-toc__chevron {
    transition: transform 0.5s var(--ease-out);
}

.wt-toc__details[open] .wt-toc__chevron {
    transform: rotate(180deg);
}

.wt-toc__list {
    display: grid;
    gap: 0.1rem;
    margin: 0;
    padding: 0 0.6rem 0.8rem;
    list-style: none;
}

.wt-toc__list a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0.35rem 0.8rem;
    border-radius: var(--radius-sm);
    border-left: 2px solid transparent;
    color: var(--color-text-muted);
    font-size: 0.9375rem;
    line-height: 1.35;
    text-decoration: none;
    transition: background-color 0.4s var(--ease-out), color 0.4s var(--ease-out), border-color 0.4s var(--ease-out);
}

.wt-toc__list a:hover {
    color: var(--color-primary);
    background: var(--color-bg-alt);
}

.wt-toc__list a.is-active {
    color: var(--color-primary);
    background: var(--color-bg-alt);
    border-left-color: var(--color-secondary);
    font-weight: 500;
}

@media (max-width: 1023.98px) {
    .wt-toc {
        position: sticky;
        top: calc(var(--header-h) + 0.5rem);
        z-index: 15;
    }

    .wt-toc__list {
        max-height: 55vh;
        overflow-y: auto;
    }
}

@media (min-width: 1024px) {
    .wt-toc {
        position: sticky;
        top: calc(var(--header-h) + 1.5rem);
    }

    .wt-toc__details {
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .wt-toc__summary {
        min-height: 0;
        padding: 0 0.8rem 0.9rem;
        cursor: default;
        font-family: var(--font-heading);
        font-size: 1.35rem;
        pointer-events: none;
    }

    .wt-toc__summary .icon:first-child,
    .wt-toc__chevron {
        display: none;
    }

    .wt-toc__list {
        padding: 0;
        border-left: 1px solid color-mix(in srgb, var(--color-secondary) 45%, transparent);
    }

    .wt-toc__list a {
        border-left: 0;
        margin-left: -1px;
        border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
        box-shadow: inset 2px 0 0 transparent;
    }

    .wt-toc__list a.is-active {
        box-shadow: inset 2px 0 0 var(--color-secondary);
    }
}

/* ---------- Sections ---------- */
.wt-section {
    padding-block: clamp(1.75rem, 1.3rem + 2vw, 2.75rem);
    scroll-margin-top: calc(var(--header-h) + 5rem);
}

.wt-section + .wt-section {
    border-top: 1px solid color-mix(in srgb, var(--color-secondary) 30%, transparent);
}

.wt-section:first-child {
    padding-top: 0;
}

.wt-section__head {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.wt-section__icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--color-bg-alt);
    color: var(--color-primary);
}

.wt-section__icon .icon {
    width: 26px;
    height: 26px;
}

.wt-section__title {
    margin: 0;
    font-size: clamp(1.6rem, 1.4rem + 1vw, 2.2rem);
    line-height: 1.2;
}

.wt-section p strong {
    color: var(--color-primary);
    font-weight: 600;
}

.wt-section a {
    color: var(--color-primary);
    text-decoration: underline;
    text-decoration-color: var(--color-secondary);
    text-underline-offset: 0.2em;
}

/* ---------- "50 minutes" / "weekly, fortnightly or monthly" chips ---------- */
.wt-facts {
    display: grid;
    gap: var(--space-md);
    margin: 0 0 var(--space-lg);
    padding: 0;
    list-style: none;
}

@media (min-width: 640px) {
    .wt-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.wt-fact {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: var(--space-md) var(--space-lg);
    background: var(--color-surface);
    border: 1px solid color-mix(in srgb, var(--color-secondary) 50%, transparent);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
}

.wt-fact__icon {
    color: var(--color-secondary-text);
}

.wt-fact__icon .icon {
    width: 24px;
    height: 24px;
}

.wt-fact__value {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 1.3rem + 0.9vw, 1.9rem);
    font-weight: 600;
    line-height: 1.2;
    color: var(--color-primary);
}

.wt-fact__label {
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

/* ---------- Closing quote band ---------- */
.wt-closing {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding-block: clamp(3rem, 2.4rem + 3vw, 5rem);
    background: var(--color-primary);
    color: var(--color-bg);
    text-align: center;
}

.wt-closing__glow {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: -1;
    width: min(900px, 130vw);
    aspect-ratio: 2 / 1;
    translate: -50% -50%;
    border-radius: 50%;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--color-secondary) 24%, transparent), transparent);
}

.wt-closing__star {
    display: block;
    width: 22px;
    height: 22px;
    margin: 0 auto var(--space-md);
    fill: var(--color-secondary);
}

.wt-closing__quote {
    max-width: 40rem;
    margin: 0 auto var(--space-lg);
}

.wt-closing__quote p {
    max-width: none;
    margin: 0;
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 1.3rem + 1.5vw, 2.4rem);
    font-weight: 500;
    line-height: 1.3;
    color: var(--color-bg);
}

.wt-closing__actions {
    display: flex;
    justify-content: center;
}

.wt-closing .btn--primary {
    --btn-bg: var(--color-bg);
    --btn-fg: var(--color-primary);
    --btn-border: var(--color-bg);
}

@media (max-width: 479.98px) {
    .wt-closing__btn {
        white-space: normal;
    }
}
