.folder-page,
[data-direct-homepage-shell] {
    width: 100%;
}

[data-direct-homepage-shell] {
    position: absolute;
    inset: 0 auto auto 0;
    visibility: hidden;
    pointer-events: none;
}

[data-direct-entry][data-direct-entry-enhanced] [data-direct-homepage-shell] {
    position: static;
    visibility: visible;
    pointer-events: auto;
}

.folder-page {
    min-height: 100svh;
    padding-block: clamp(28px, 6vw, 72px) clamp(72px, 12vw, 144px);
}

.folder-page__rail {
    display: grid;
    gap: clamp(36px, 7vw, 72px);
}

.folder-page__back {
    justify-self: start;
    font-size: 0.875rem;
    font-weight: 700;
}

.folder-page__header,
.case-study__header {
    display: grid;
    gap: 12px;
}

.folder-page__eyebrow,
.case-study__number,
.case-study__label {
    margin: 0;
    color: var(--secondary);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.folder-page h1,
.case-study h2,
.case-study h3,
.case-study p {
    margin-block: 0;
}

.folder-page h1 {
    max-width: 14ch;
    font-size: clamp(2.5rem, 8vw, 5.5rem);
    line-height: 0.96;
    letter-spacing: -0.055em;
}

.folder-page__navigation ol {
    display: grid;
    padding: 0;
    margin: 0;
    border-top: 1px solid var(--line);
    list-style: none;
}

.folder-page__navigation a {
    display: grid;
    grid-template-columns: 2.5rem 1fr;
    gap: 12px;
    padding: 14px 8px;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
}

.folder-page__navigation a:focus-visible {
    background: var(--hover);
}

.folder-page__navigation a:focus-visible,
.case-study:focus-visible,
.folder-page__back:focus-visible {
    outline: 2px solid var(--cursor-hover-color);
    outline-offset: 4px;
}

.folder-page__case-studies {
    display: grid;
    gap: clamp(64px, 12vw, 120px);
}

.case-study {
    display: grid;
    gap: 28px;
    padding: clamp(24px, 5vw, 48px);
    border: 1px solid var(--line);
    scroll-margin-top: 24px;
}

.case-study h2 {
    max-width: 21ch;
    font-size: clamp(1.75rem, 5vw, 3rem);
    line-height: 1.05;
    letter-spacing: -0.035em;
}

.case-study h3 {
    font-size: 1rem;
}

.case-study__hook {
    max-width: 56ch;
    color: var(--accent-ink);
    font-size: clamp(1.05rem, 2.5vw, 1.3rem);
    font-weight: 600;
    line-height: 1.45;
}

.case-study__body,
.case-study__subsection {
    display: grid;
    gap: 18px;
}

.case-study__body p {
    max-width: 68ch;
    line-height: 1.72;
}

.case-study__stack,
.case-study__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.case-study__stack li,
.case-study__tags li {
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.75rem;
}

@media (hover: hover) and (pointer: fine) {
    .folder-page__navigation a:hover {
        background: var(--hover);
    }
}

@media (max-width: 520px) {
    .folder-page__rail {
        width: min(calc(100% - 32px), var(--column));
    }

    .case-study {
        padding: 22px 18px;
    }
}
