/* The digest's covers lead; the archive reads as a small, quiet stack. */
.digest-showcase {
    max-width: 1240px;
    margin: 4rem auto 4.5rem;
    padding: 0 clamp(1.5rem, 4vw, 2.5rem);
    scroll-margin-top: 100px;
    color: var(--tm-ink);
}

.digest-showcase-heading {
    margin-bottom: 2rem;
    text-align: center;
}

.digest-showcase-heading .section-eyebrow {
    justify-content: center;
}

.digest-showcase-heading h2 {
    margin: 0 0 0.7rem;
    color: var(--tm-ink);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(1.8rem, 2.6vw, 2.4rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.035em;
}

.digest-showcase-heading > p {
    margin: 0;
    color: var(--tm-slate);
    font-size: 1rem;
    line-height: 1.6;
}

.digest-showcase-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
    align-items: stretch;
    gap: clamp(1.75rem, 3.6vw, 3rem);
    padding-top: 1rem;
}

.digest-showcase-grid--single {
    grid-template-columns: minmax(0, 560px);
}

.digest-showcase-divider {
    background: #dedfdc;
    margin: 0.25rem 0;
}

.digest-card {
    position: relative;
    display: block;
    min-width: 0;
    color: var(--tm-ink);
    text-decoration: none;
    border-radius: 18px;
    isolation: isolate;
    transition: transform 220ms ease;
}

.digest-card-surface {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--tm-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(22, 36, 61, 0.025);
    transition: border-color 220ms ease, box-shadow 220ms ease;
}

.digest-card-media {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    flex-shrink: 0;
    border-bottom: 1px solid var(--tm-line);
    background: #e9eeeb;
}

.digest-card-media picture,
.digest-card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.digest-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: clamp(1.25rem, 2vw, 1.65rem);
}

.digest-card-label {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 0.8rem;
    color: #586674;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    line-height: 1.5;
    text-transform: uppercase;
}

.digest-edition-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--tm-teal);
}

.digest-card-body h3 {
    margin: 0 0 0.7rem;
    color: var(--tm-ink);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(1.2rem, 1.7vw, 1.45rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.35;
}

.digest-card-summary {
    margin: 0 0 1.6rem;
    color: var(--tm-slate);
    font-size: 0.94rem;
    line-height: 1.65;
}

.digest-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: auto;
    color: var(--tm-ink);
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.5;
}

.digest-card-footer svg {
    flex-shrink: 0;
    color: var(--tm-teal);
    transition: transform 220ms ease;
}

.digest-archive {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 0.8rem;
    min-width: 0;
}

.digest-archive-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
}

.digest-archive-heading h3 {
    margin: 0;
    color: var(--tm-ink);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.digest-archive-heading p {
    margin: 0;
    color: #687580;
    font-size: 0.75rem;
}

.digest-archive-hover-hint { display: none; }

.digest-archive-deck {
    display: flex;
    gap: 1rem;
    min-width: 0;
    margin: 0;
    padding: 0.5rem 0.25rem 1rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    list-style: none;
    scrollbar-width: thin;
    scrollbar-color: #c3cbc7 transparent;
}

.digest-history-item {
    flex: 0 0 min(82%, 300px);
    min-width: 0;
    scroll-snap-align: start;
}

.digest-history-card {
    display: block;
    height: 100%;
    color: var(--tm-ink);
    text-decoration: none;
    border-radius: 18px;
}

.digest-history-card .digest-card-body {
    padding: 1.1rem;
}

.digest-history-card h4 {
    margin: 0 0 0.65rem;
    color: var(--tm-ink);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.3;
}

.digest-history-card .digest-card-summary {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    margin-bottom: 1rem;
    font-size: 0.84rem;
    line-height: 1.55;
}

.digest-history-card .digest-card-label {
    margin-bottom: 0.45rem;
    font-size: 0.62rem;
}

.digest-history-card .digest-card-footer {
    font-size: 0.75rem;
}

.digest-archive-all {
    display: inline-flex;
    align-items: center;
    justify-self: end;
    gap: 0.75rem;
    min-height: 36px;
    color: var(--tm-ink);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
}

.digest-archive-all svg { color: var(--tm-teal); }

.digest-history-card:hover .digest-card-surface,
.digest-history-card:focus-visible .digest-card-surface {
    border-color: rgba(13, 148, 136, 0.4);
    box-shadow: 0 12px 28px -18px rgba(22, 36, 61, 0.32);
}

.digest-history-card:focus-visible,
.digest-archive-all:focus-visible {
    outline: 3px solid var(--tm-teal);
    outline-offset: 4px;
}

/* A fixed hover region keeps the fan open while moving between real links. */
@media (min-width: 960px) and (hover: hover) and (pointer: fine) {
    .digest-archive-hover-hint { display: inline; }
    .digest-archive-touch-hint { display: none; }

    .digest-archive-deck {
        position: relative;
        min-height: 390px;
        margin: 0 14px;
        padding: 0;
        overflow: visible;
        isolation: isolate;
    }

    .digest-history-card .digest-card-summary {
        -webkit-line-clamp: 2;
        margin-bottom: 0;
    }

    .digest-history-card .digest-card-footer {
        display: none;
    }

    .digest-history-item {
        position: absolute;
        top: 14px;
        left: 0;
        width: calc(100% - 16px);
        height: calc(100% - 28px);
        transition: width 360ms ease, left 360ms ease, top 360ms ease, transform 360ms ease;
        transform-origin: center 78%;
    }

    .digest-history-item:nth-child(1) {
        z-index: 3;
        --fan-x: 0%; --fan-y: 20px; --fan-angle: -5deg;
    }

    .digest-history-item:nth-child(2) {
        z-index: 2;
        transform: translate(7px, -7px) rotate(1.3deg);
        --fan-x: 19%; --fan-y: 0px; --fan-angle: 0deg;
    }

    .digest-history-item:nth-child(3) {
        z-index: 1;
        transform: translate(14px, -14px) rotate(2.6deg);
        --fan-x: 38%; --fan-y: 20px; --fan-angle: 5deg;
    }

    .digest-archive:is(:hover, :focus-within) .digest-history-item {
        top: var(--fan-y);
        left: var(--fan-x);
        width: 62%;
        transform: rotate(var(--fan-angle));
    }

    .digest-archive:is(:hover, :focus-within) .digest-history-item:nth-child(2) {
        z-index: 4;
    }

    .digest-archive:is(:hover, :focus-within) .digest-card-summary {
        -webkit-line-clamp: 3;
        margin-bottom: 1rem;
    }

    .digest-archive:is(:hover, :focus-within) .digest-card-footer {
        display: flex;
    }

    .digest-archive:is(:hover, :focus-within) .digest-history-item:is(:hover, :focus-within) {
        z-index: 10;
    }
}

.digest-cover-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    height: 100%;
    background: var(--tm-topo);
    color: var(--tm-ink);
    font-size: 1.4rem;
    font-weight: 700;
}

.digest-card:hover {
    transform: translateY(-3px);
    color: var(--tm-ink);
    text-decoration: none;
}

.digest-card:hover .digest-card-surface {
    border-color: rgba(13, 148, 136, 0.3);
    box-shadow: 0 10px 24px -16px rgba(22, 36, 61, 0.28);
}

.digest-card:hover .digest-card-footer svg {
    transform: translateX(3px);
}

.digest-card:focus-visible {
    outline: 3px solid var(--tm-teal);
    outline-offset: 6px;
}

@media (max-width: 959px) {
    .digest-showcase-grid,
    .digest-showcase-grid--single {
        grid-template-columns: minmax(0, 1fr);
        gap: 2rem;
    }

    .digest-showcase-divider {
        height: 1px;
        margin: 0.5rem 0 0.75rem;
    }

}

@media (max-width: 480px) {
    .digest-showcase {
        padding: 0 1rem;
        margin: 3rem auto 3.5rem;
    }

    .digest-showcase-heading > p {
        font-size: 0.94rem;
    }

    .digest-card-body {
        padding: 1.25rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .digest-card,
    .digest-card-surface,
    .digest-card-footer svg,
    .digest-history-item {
        transition: none;
    }

    .digest-card:hover,
    .digest-card:hover .digest-card-footer svg {
        transform: none;
    }
}
