/* =========================================================
   WEBSITE 4.0 — EDITORIAL RIVER
   TYPOGRAPHY + VISUAL FOUNDATION
   ========================================================= */

:root {
    --river-display: Georgia, "Times New Roman", serif;
    --river-body: Georgia, "Times New Roman", serif;
    --river-interface: "Helvetica Neue", Arial, sans-serif;
    --river-type-display-xl: clamp(4rem, 9vw, 8.75rem);
    --river-type-display-lg: clamp(3.1rem, 6.5vw, 6.5rem);
    --river-type-display-md: clamp(2.35rem, 4.6vw, 4.5rem);
    --river-type-heading: clamp(1.75rem, 3vw, 2.75rem);
    --river-type-lead: clamp(1.2rem, 1.8vw, 1.5rem);
    --river-type-body: clamp(1.05rem, 1.15vw, 1.16rem);
    --river-leading-display: 0.94;
    --river-leading-heading: 1.04;
    --river-leading-body: 1.72;
    --river-tracking-display: -0.045em;
    --river-reading-width: 43rem;
}

/* Editorial identity */
.home-v4 h1,
.home-v4 h2,
.library-hero h1,
.content-entry__header h1,
.related-content__header h2,
.river-footer__statement h2 {
    font-family: var(--river-display);
    font-weight: 400;
    text-wrap: balance;
}

.home-v4 h1 {
    font-size: var(--river-type-display-xl);
    line-height: var(--river-leading-display);
    letter-spacing: var(--river-tracking-display);
}

.home-v4 h2 {
    font-size: var(--river-type-display-md);
    line-height: var(--river-leading-heading);
    letter-spacing: -0.035em;
}

.library-hero h1,
.content-entry__header h1 {
    font-size: var(--river-type-display-lg);
    line-height: 0.98;
    letter-spacing: -0.04em;
}

/* Reading voice */
.content-entry__description {
    max-width: 42rem;
    font-family: var(--river-body);
    font-size: var(--river-type-lead);
    line-height: 1.55;
}

.content-entry__body {
    font-family: var(--river-body);
    font-size: var(--river-type-body);
    line-height: var(--river-leading-body);
}

.content-entry__body > *,
.content-entry__body article > * {
    max-width: var(--river-reading-width);
}

.content-entry__body h2,
.content-entry__body h3 {
    font-family: var(--river-display);
    font-weight: 400;
    line-height: 1.12;
    letter-spacing: -0.025em;
}

.content-entry__body h2 {
    font-size: var(--river-type-heading);
}

.content-entry__body blockquote {
    font-family: var(--river-display);
    font-size: clamp(1.35rem, 2.2vw, 1.85rem);
    line-height: 1.45;
}

/* Interface voice */
.river-primary-nav,
.river-header__actions,
.eyebrow,
.section-label,
.content-type,
.content-entry__meta,
.library-collection-controls,
.library-collection-summary,
.button,
button,
input,
select {
    font-family: var(--river-interface);
}

/* Long-form polish */
.content-entry__body p {
    hanging-punctuation: first last;
}

.content-entry__body p + p {
    margin-top: 1.35em;
}

.content-entry__body strong {
    font-weight: 650;
}

@media (max-width: 760px) {
    :root {
        --river-type-display-xl: clamp(3.25rem, 15vw, 5.5rem);
        --river-type-display-lg: clamp(2.8rem, 12vw, 4.6rem);
        --river-type-display-md: clamp(2.15rem, 9vw, 3.6rem);
        --river-type-body: 1.05rem;
        --river-leading-body: 1.68;
    }
}

/* =========================================================
   WEBSITE 4.0 — MUTATION 002
   MAJOR HOMEPAGE COMPOSITION + TYPOGRAPHIC HIERARCHY
   ========================================================= */

:root {
    --river-ink: #18231d;
    --river-ink-soft: #435047;
    --river-paper: #f4f0e6;
    --river-paper-deep: #e9e1d2;
    --river-mist: #dce5dc;
    --river-green: #183f32;
    --river-green-deep: #102e25;
    --river-line: rgba(24, 35, 29, 0.16);
    --river-accent: #a46f3d;
    --river-shell: min(1180px, calc(100vw - 3rem));
    --river-section-space: clamp(5.5rem, 10vw, 10rem);
    --river-radius-card: 1.5rem;
    --river-shadow-soft: 0 24px 70px rgba(16, 46, 37, 0.10);
}

.home-v4 {
    background: var(--river-paper);
    color: var(--river-ink);
}

.home-v4 > section {
    position: relative;
    padding-block: var(--river-section-space);
}

.home-v4 :where(.home-shell, .home-hero-shell, .section-shell) {
    width: var(--river-shell);
    margin-inline: auto;
}

.home-v4 .home-hero {
    min-height: min(920px, calc(100svh - 4rem));
    display: grid;
    align-items: center;
    overflow: hidden;
    padding-block: clamp(6rem, 11vw, 10rem);
    background:
        radial-gradient(circle at 82% 18%, rgba(164, 111, 61, 0.16), transparent 30%),
        linear-gradient(145deg, var(--river-green-deep) 0%, var(--river-green) 58%, #285542 100%);
    color: #f7f2e8;
}

.home-v4 .home-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        repeating-linear-gradient(118deg, transparent 0 86px, rgba(255,255,255,0.028) 87px 88px),
        linear-gradient(90deg, rgba(255,255,255,0.04), transparent 38%);
}

.home-v4 .home-hero-shell {
    position: relative;
    z-index: 1;
}

.home-v4 .home-hero-content {
    max-width: 68rem;
}

.home-v4 .home-hero-eyebrow,
.home-v4 .section-label,
.home-v4 .home-kicker {
    font-family: var(--river-interface);
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.home-v4 .home-hero-eyebrow {
    color: rgba(247, 242, 232, 0.72);
    margin-bottom: clamp(1.5rem, 3vw, 2.75rem);
}

.home-v4 .home-hero h1 {
    max-width: 10.5ch;
    margin: 0;
    color: #fffaf0;
    font-size: clamp(4.25rem, 9.2vw, 9rem);
    line-height: 0.88;
    letter-spacing: -0.055em;
    text-wrap: balance;
}

.home-v4 .home-hero-lead {
    max-width: 37rem;
    margin-top: clamp(2rem, 4vw, 3.25rem);
    color: rgba(247, 242, 232, 0.82);
    font-family: var(--river-body);
    font-size: clamp(1.2rem, 1.8vw, 1.55rem);
    line-height: 1.55;
}

.home-v4 .home-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: clamp(2rem, 4vw, 3rem);
}

.home-v4 .home-hero-actions .button {
    min-height: 3.25rem;
    padding: 0.9rem 1.35rem;
    border-radius: 999px;
    letter-spacing: 0.02em;
}

.home-v4 .home-hero-compass {
    margin-top: clamp(3.5rem, 7vw, 6rem);
    color: rgba(247, 242, 232, 0.58);
}

.home-v4 .intro-section {
    background: var(--river-paper);
}

.home-v4 .intro-section .section-shell {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: clamp(2.5rem, 8vw, 8rem);
    align-items: start;
}

.home-v4 .intro-section h2,
.home-v4 .section-heading h2,
.home-v4 .mission-section h2,
.home-v4 .invitation-content h2 {
    margin: 0;
    color: var(--river-ink);
    font-size: clamp(2.8rem, 5.7vw, 6rem);
    line-height: 0.96;
    letter-spacing: -0.045em;
}

.home-v4 .intro-section p,
.home-v4 .mission-copy p,
.home-v4 .tributaries-section p,
.home-v4 .latest-section p {
    color: var(--river-ink-soft);
    font-size: clamp(1.05rem, 1.25vw, 1.2rem);
    line-height: 1.72;
}

.home-v4 .intro-section .intro-lead {
    color: var(--river-ink);
    font-family: var(--river-body);
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    line-height: 1.5;
}

.home-v4 .home-ecosystem,
.home-v4 .paths-section,
.home-v4 .tributaries-section,
.home-v4 .latest-section {
    border-top: 1px solid var(--river-line);
}

.home-v4 .section-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2rem;
    align-items: end;
    margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.home-v4 .home-ecosystem .pathway-grid,
.home-v4 .paths-section .path-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: clamp(1rem, 2vw, 1.5rem);
}

.home-v4 .home-ecosystem .pathway-card,
.home-v4 .paths-section .path-card {
    grid-column: span 6;
    min-height: 21rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: clamp(1.75rem, 3vw, 3rem);
    border: 1px solid var(--river-line);
    border-radius: var(--river-radius-card);
    background: rgba(255,255,255,0.34);
    box-shadow: none;
    transition: transform 220ms ease, box-shadow 220ms ease, background-color 220ms ease;
}

.home-v4 .home-ecosystem .pathway-card:nth-child(1),
.home-v4 .home-ecosystem .pathway-card:nth-child(4),
.home-v4 .paths-section .path-card-featured {
    grid-column: span 7;
}

.home-v4 .home-ecosystem .pathway-card:nth-child(2),
.home-v4 .home-ecosystem .pathway-card:nth-child(3) {
    grid-column: span 5;
}

.home-v4 :where(.pathway-card, .path-card):hover {
    transform: translateY(-6px);
    background: rgba(255,255,255,0.58);
    box-shadow: var(--river-shadow-soft);
}

.home-v4 :where(.pathway-card, .path-card) h3,
.home-v4 .home-tributary-card h3,
.home-v4 .latest-card h3 {
    font-family: var(--river-display);
    font-weight: 400;
    font-size: clamp(1.8rem, 3vw, 3rem);
    line-height: 1.02;
    letter-spacing: -0.035em;
}

.home-v4 .mission-section {
    overflow: hidden;
    background: var(--river-green-deep);
    color: #f7f2e8;
}

.home-v4 .mission-section::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 12% 30%, rgba(164,111,61,0.18), transparent 32%);
}

.home-v4 .mission-layout {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(17rem, 0.85fr);
    gap: clamp(3rem, 9vw, 9rem);
    align-items: start;
}

.home-v4 .mission-section h2,
.home-v4 .mission-section p {
    color: inherit;
}

.home-v4 .mission-copy p {
    color: rgba(247,242,232,0.76);
}

.home-v4 .mission-principles {
    border-top: 1px solid rgba(247,242,232,0.22);
}

.home-v4 .mission-principles > * {
    padding-block: 1.15rem;
    border-bottom: 1px solid rgba(247,242,232,0.16);
}

.home-v4 .tributaries-section .tributary-grid,
.home-v4 .latest-section .latest-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: clamp(1rem, 2vw, 1.5rem);
}

.home-v4 .home-tributary-card {
    grid-column: span 4;
    min-height: 19rem;
    padding: clamp(1.5rem, 2.5vw, 2.25rem);
    border-top: 2px solid var(--river-green);
    background: transparent;
}

.home-v4 .latest-card {
    grid-column: span 4;
    min-height: 22rem;
    padding: clamp(1.5rem, 2.5vw, 2.25rem);
    border: 1px solid var(--river-line);
    border-radius: var(--river-radius-card);
    background: #faf7ef;
}

.home-v4 .latest-card:first-child {
    grid-column: span 8;
}

.home-v4 .invitation-section {
    overflow: hidden;
    background: var(--river-paper-deep);
    border-top: 1px solid var(--river-line);
}

.home-v4 .invitation-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(18rem, 0.9fr);
    gap: clamp(3rem, 8vw, 8rem);
    align-items: end;
}

.home-v4 .join-form {
    padding: clamp(1.5rem, 3vw, 2.5rem);
    border: 1px solid var(--river-line);
    border-radius: var(--river-radius-card);
    background: rgba(255,255,255,0.42);
}

.home-v4 .join-form input {
    min-height: 3.25rem;
}

.home-v4 .join-form button {
    min-height: 3.25rem;
}

@media (max-width: 900px) {
    .home-v4 .intro-section .section-shell,
    .home-v4 .mission-layout,
    .home-v4 .invitation-layout {
        grid-template-columns: 1fr;
    }

    .home-v4 .home-ecosystem .pathway-card,
    .home-v4 .home-ecosystem .pathway-card:nth-child(1),
    .home-v4 .home-ecosystem .pathway-card:nth-child(2),
    .home-v4 .home-ecosystem .pathway-card:nth-child(3),
    .home-v4 .home-ecosystem .pathway-card:nth-child(4),
    .home-v4 .paths-section .path-card,
    .home-v4 .paths-section .path-card-featured {
        grid-column: span 12;
        min-height: 17rem;
    }

    .home-v4 .home-tributary-card,
    .home-v4 .latest-card,
    .home-v4 .latest-card:first-child {
        grid-column: span 6;
    }
}

@media (max-width: 640px) {
    :root {
        --river-shell: min(100% - 2rem, 1180px);
        --river-section-space: clamp(4.25rem, 18vw, 6rem);
    }

    .home-v4 .home-hero {
        min-height: auto;
        padding-block: 6rem 5rem;
    }

    .home-v4 .home-hero h1 {
        max-width: 11ch;
        font-size: clamp(3.45rem, 16vw, 5.25rem);
    }

    .home-v4 .section-heading {
        grid-template-columns: 1fr;
    }

    .home-v4 .home-tributary-card,
    .home-v4 .latest-card,
    .home-v4 .latest-card:first-child {
        grid-column: span 12;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-v4 :where(.pathway-card, .path-card) {
        transition: none;
    }

    .home-v4 :where(.pathway-card, .path-card):hover {
        transform: none;
    }
}

/* =========================================================
   WEBSITE 4.0 — MUTATION 003
   GLOBAL SHELL + LONG-FORM READING SYSTEM
   ========================================================= */

:root {
    --river-reading-wide: 66rem;
    --river-reading-narrow: 39rem;
    --river-rule: rgba(24, 35, 29, 0.14);
    --river-rule-light: rgba(247, 242, 232, 0.18);
    --river-interface-small: 0.78rem;
    --river-interface-tracking: 0.12em;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--river-paper);
    color: var(--river-ink);
}

/* Global interface voice */
.river-primary-nav,
.river-header__actions,
.content-entry__meta,
.content-type,
.eyebrow,
.section-label {
    font-family: var(--river-interface);
}

.river-primary-nav {
    letter-spacing: 0.01em;
}

.river-primary-nav a,
.river-header__actions a,
.river-header__actions button {
    text-underline-offset: 0.24em;
}

.eyebrow,
.section-label,
.content-type {
    font-size: var(--river-interface-small);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: var(--river-interface-tracking);
    text-transform: uppercase;
}

/* Footer becomes editorial, not utility-heavy */
.river-footer__statement {
    border-top: 1px solid var(--river-rule);
}

.river-footer__statement h2 {
    max-width: 11ch;
    font-size: clamp(3rem, 7vw, 7.25rem);
    line-height: 0.9;
    letter-spacing: -0.05em;
    font-weight: 400;
}

/* Library / collection opening */
.library-hero {
    padding-block: clamp(5.5rem, 10vw, 10rem) clamp(4rem, 7vw, 7rem);
    border-bottom: 1px solid var(--river-rule);
}

.library-hero h1 {
    max-width: 11ch;
    margin: 0;
    font-family: var(--river-display);
    font-size: clamp(3.5rem, 8vw, 8rem);
    line-height: 0.9;
    letter-spacing: -0.05em;
    font-weight: 400;
    text-wrap: balance;
}

.library-hero p {
    max-width: 42rem;
    margin-top: clamp(1.5rem, 3vw, 2.5rem);
    font-family: var(--river-body);
    font-size: clamp(1.15rem, 1.65vw, 1.45rem);
    line-height: 1.58;
}

/* Long-form entry opening */
.content-entry__header {
    max-width: var(--river-reading-wide);
    margin-inline: auto;
    padding-block: clamp(5.5rem, 10vw, 9rem) clamp(3rem, 6vw, 5.5rem);
}

.content-entry__header h1 {
    max-width: 12ch;
    margin: 0;
    font-size: clamp(3.25rem, 7vw, 7.4rem);
    line-height: 0.92;
    letter-spacing: -0.05em;
}

.content-entry__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 1rem;
    margin-bottom: clamp(1.4rem, 3vw, 2.4rem);
    font-size: 0.78rem;
    line-height: 1.35;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.content-entry__description {
    max-width: 40rem;
    margin-top: clamp(1.75rem, 3vw, 2.75rem);
    color: var(--river-ink-soft);
    font-size: clamp(1.25rem, 1.9vw, 1.6rem);
    line-height: 1.52;
}

/* Reading column */
.content-entry__body {
    width: min(100% - 2rem, var(--river-reading-wide));
    margin-inline: auto;
    padding-bottom: clamp(6rem, 12vw, 11rem);
    font-family: var(--river-body);
    font-size: clamp(1.06rem, 1.15vw, 1.18rem);
    line-height: 1.78;
}

.content-entry__body > *,
.content-entry__body article > * {
    max-width: var(--river-reading-width);
    margin-inline: auto;
}

.content-entry__body p {
    text-wrap: pretty;
}

.content-entry__body p + p {
    margin-top: 1.45em;
}

.content-entry__body h2,
.content-entry__body h3,
.content-entry__body h4 {
    color: var(--river-ink);
    font-family: var(--river-display);
    font-weight: 400;
    text-wrap: balance;
}

.content-entry__body h2 {
    margin-top: clamp(3.5rem, 7vw, 6rem);
    margin-bottom: 1.15rem;
    font-size: clamp(2rem, 3.8vw, 3.35rem);
    line-height: 1.04;
    letter-spacing: -0.035em;
}

.content-entry__body h3 {
    margin-top: 3rem;
    margin-bottom: 0.9rem;
    font-size: clamp(1.55rem, 2.6vw, 2.2rem);
    line-height: 1.1;
    letter-spacing: -0.025em;
}

.content-entry__body ul,
.content-entry__body ol {
    padding-left: 1.4em;
}

.content-entry__body li + li {
    margin-top: 0.55em;
}

.content-entry__body a {
    text-decoration-thickness: 0.06em;
    text-underline-offset: 0.16em;
}

.content-entry__body blockquote {
    max-width: min(48rem, 100%);
    margin-block: clamp(3rem, 6vw, 5rem);
    padding: 0 0 0 clamp(1.25rem, 3vw, 2.25rem);
    border-left: 2px solid var(--river-accent);
    color: var(--river-green-deep);
    font-family: var(--river-display);
    font-size: clamp(1.45rem, 2.6vw, 2.2rem);
    line-height: 1.42;
    letter-spacing: -0.02em;
}

.content-entry__body hr {
    width: min(16rem, 55%);
    margin-block: clamp(4rem, 8vw, 7rem);
    border: 0;
    border-top: 1px solid var(--river-rule);
}

/* Let visual and technical material breathe beyond the prose measure */
.content-entry__body > :where(figure, picture, img, video, iframe, table, pre),
.content-entry__body article > :where(figure, picture, img, video, iframe, table, pre) {
    max-width: min(100%, var(--river-reading-wide));
}

.content-entry__body img,
.content-entry__body video {
    height: auto;
    border-radius: clamp(0.8rem, 1.6vw, 1.4rem);
}

.content-entry__body figure {
    margin-block: clamp(2.5rem, 5vw, 4.5rem);
}

.content-entry__body figcaption {
    max-width: var(--river-reading-width);
    margin: 0.8rem auto 0;
    color: var(--river-ink-soft);
    font-family: var(--river-interface);
    font-size: 0.82rem;
    line-height: 1.5;
}

.content-entry__body pre,
.content-entry__body table {
    overflow-x: auto;
}

.content-entry__body table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--river-interface);
    font-size: 0.94rem;
}

.content-entry__body th,
.content-entry__body td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--river-rule);
    text-align: left;
}

/* Related reading closes the essay like a journal, not a widget */
.related-content__header {
    padding-top: clamp(3rem, 6vw, 5rem);
    border-top: 1px solid var(--river-rule);
}

.related-content__header h2 {
    max-width: 12ch;
    margin: 0;
    font-family: var(--river-display);
    font-size: clamp(2.2rem, 4.4vw, 4.4rem);
    line-height: 1;
    letter-spacing: -0.04em;
    font-weight: 400;
}

/* Buttons stay interface-like against the editorial typography */
.button,
button {
    font-family: var(--river-interface);
    font-weight: 650;
    letter-spacing: 0.015em;
}

@media (max-width: 760px) {
    .library-hero {
        padding-block: 4.5rem 3.5rem;
    }

    .library-hero h1,
    .content-entry__header h1 {
        max-width: 12ch;
        font-size: clamp(3rem, 14vw, 5rem);
        line-height: 0.94;
    }

    .content-entry__header {
        padding-block: 4.5rem 3rem;
    }

    .content-entry__body {
        width: min(100% - 2rem, var(--river-reading-wide));
        font-size: 1.05rem;
        line-height: 1.72;
    }

    .content-entry__body h2 {
        margin-top: 3.5rem;
    }

    .content-entry__body blockquote {
        margin-block: 2.75rem;
    }

    .river-footer__statement h2 {
        font-size: clamp(2.8rem, 14vw, 4.9rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

/* ===================================================
   WEBSITE 4.0 - MUTATION 004
   NARRATIVE PATHWAYS + MAJOR PAGE-FAMILY EDITORIAL SYSTEM
   ======================================================== */

:root {
    --river-page-shell: min(1180px, calc(100vw - 3rem));
    --river-prose-shell: min(760px, calc(100vw - 3rem));
    --river-section-rule: rgba(24, 35, 29, 0.14);
}

/* Shared narrative-page opening */
:where(.headwaters-hero, .source-hero, .tributaries-hero, .current-hero, .journey-hero, .guides-hero) {
    position: relative;
    overflow: hidden;
    padding-block: clamp(6.5rem, 13vw, 12rem);
    background:
        radial-gradient(circle at 82% 18%, rgba(244, 240, 230, 0.10), transparent 28rem),
        linear-gradient(145deg, var(--river-green-deep), var(--river-green));
    color: var(--river-paper);
    border-bottom: 1px solid rgba(244, 240, 230, 0.12);
}

:where(.headwaters-hero, .source-hero, .tributaries-hero, .current-hero, .journey-hero, .guides-hero)::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, transparent 0 67%, rgba(244, 240, 230, 0.055) 67% 67.08%, transparent 67.08%);
}

:where(.page-hero-content, .source-hero-content, .tributaries-hero-content, .current-hero-content, .journey-hero-content, .guides-hero-content) {
    position: relative;
    z-index: 1;
    width: var(--river-page-shell);
    margin-inline: auto;
}

:where(.headwaters-hero, .source-hero, .tributaries-hero, .current-hero, .journey-hero, .guides-hero) h1 {
    max-width: 11ch;
    margin: 0;
    font-family: var(--river-display);
    font-size: clamp(4rem, 9vw, 9rem);
    font-weight: 400;
    line-height: 0.88;
    letter-spacing: -0.055em;
    text-wrap: balance;
}

:where(.page-hero-lead, .source-hero-lead, .tributaries-hero-lead, .current-hero-lead, .journey-hero-lead, .guides-hero-lead) {
    max-width: 38rem;
    margin-top: clamp(1.75rem, 4vw, 3rem);
    font-family: var(--river-body);
    font-size: clamp(1.2rem, 1.8vw, 1.55rem);
    line-height: 1.55;
    color: rgba(244, 240, 230, 0.84);
}

:where(.page-actions, .tributaries-hero-actions, .current-hero-actions, .journey-hero-actions, .guides-hero-actions) {
    margin-top: clamp(2rem, 4vw, 3.25rem);
}

/* Shared section rhythm and editorial headings */
:where(.story-section, .foundation-section, .river-philosophy-section, .source-introduction, .source-chapter, .tributaries-opening, .tributaries-map, .tributaries-principles, .tributaries-work, .tributaries-balance, .tributaries-connection, .current-opening, .current-workbench, .current-reality, .current-life, .current-commitments, .current-vision, .current-questions, .journey-opening, .journey-path-behind, .journey-direction, .journey-pillars, .journey-milestones, .journey-uncertainty, .journey-philosophy, .journey-follow, .guides-opening, .guides-library, .guides-philosophy, .guides-formats, .guides-standard, .guides-workbench, .guides-featured, .guides-recommendations, .guides-navigation) {
    padding-block: var(--river-section-space);
}

:where(.section-shell, .reading-shell, .chapter-shell) {
    width: var(--river-page-shell);
    margin-inline: auto;
}

:where(.centered-heading, .tributaries-section-heading, .current-workbench-heading, .current-reality-heading, .current-life-heading, .current-commitments-heading, .current-snapshot-heading, .current-questions-heading, .journey-section-heading, .journey-direction-heading, .journey-philosophy-heading, .guides-section-heading, .guides-standard-heading, .guides-featured-heading, .story-continues-heading) {
    max-width: 14ch;
    font-family: var(--river-display);
    font-size: clamp(2.7rem, 5.5vw, 5.8rem);
    font-weight: 400;
    line-height: 0.98;
    letter-spacing: -0.045em;
    text-wrap: balance;
}

/* Prose openings */
:where(.story-opening, .source-opening, .tributaries-opening-lead, .current-opening-lead, .journey-opening-lead, .guides-opening-lead) {
    max-width: 42rem;
    font-family: var(--river-body);
    font-size: clamp(1.25rem, 2vw, 1.65rem);
    line-height: 1.62;
}

/* Cards become quiet editorial surfaces */
:where(.contrast-card, .tributary-card, .tributaries-principle-card, .tributaries-work-card, .tributaries-navigation-card, .current-build-card, .current-life-card, .commitment-card, .workbench-card, .journey-past-card, .journey-pillar-card, .journey-follow-card, .guide-category-card, .guide-format-card, .guide-workbench-card, .published-guide-card, .guides-navigation-card, .featured-guide-card) {
    border: 1px solid var(--river-section-rule);
    border-radius: var(--river-card-radius);
    box-shadow: var(--river-card-shadow);
}

:where(.tributary-card, .tributaries-principle-card, .tributaries-work-card, .tributaries-navigation-card, .current-build-card, .current-life-card, .commitment-card, .workbench-card, .journey-past-card, .journey-pillar-card, .journey-follow-card, .guide-category-card, .guide-format-card, .guide-workbench-card, .published-guide-card, .guides-navigation-card, .featured-guide-card) {
    transition: transform 180ms ease, box-shadow 180ms ease;
}

:where(.tributary-card, .tributaries-navigation-card, .current-build-card, .workbench-card, .journey-pillar-card, .journey-follow-card, .guide-category-card, .published-guide-card, .guides-navigation-card):hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 60px rgba(16, 46, 37, 0.12);
}

/* Source reads as a continuous memoir */
.source-introduction,
.source-chapter-light {
    background: var(--river-paper);
}

.source-chapter-warm {
    background: var(--river-paper-deep);
}

.source-chapter {
    border-top: 1px solid var(--river-section-rule);
}

.chapter-number,
.chapter-subtitle,
.chapter-transition {
    font-family: var(--river-interface);
}

.chapter-header h2,
.chapter-opening h2 {
    max-width: 13ch;
    font-family: var(--river-display);
    font-size: clamp(2.8rem, 5.5vw, 5.6rem);
    font-weight: 400;
    line-height: 0.98;
    letter-spacing: -0.045em;
    text-wrap: balance;
}

.chapter-body {
    max-width: 43rem;
    font-family: var(--river-body);
    font-size: clamp(1.05rem, 1.25vw, 1.16rem);
    line-height: 1.78;
}

/* Contrast fields create a recurring river cadence */
:where(.contrast-section, .tributaries-balance, .current-faith, .journey-invitation, .guides-philosophy, .guides-recommendations) {
    background: var(--river-green-deep);
    color: var(--river-paper);
}

:where(.story-quote, .source-quote, .tributaries-quote, .tributaries-balance-quote, .current-quote, .current-faith-quote, .journey-quote, .journey-uncertainty-quote, .journey-invitation-quote, .guides-philosophy-quote, .guides-recommendations-quote, .guides-final-quote) {
    font-family: var(--river-display);
    font-weight: 400;
    line-height: 1.12;
    letter-spacing: -0.025em;
}

/* Timeline and numbered systems */
:where(.foundation-number, .tributary-number, .current-card-number, .journey-card-number, .guide-category-number, .publication-number, .featured-guide-step) {
    font-family: var(--river-interface);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.journey-timeline {
    border-left: 1px solid var(--river-section-rule);
}

.journey-timeline-item {
    padding-block: clamp(1.25rem, 3vw, 2rem);
}

/* Final invitations feel conclusive */
:where(.headwaters-invitation, .tributaries-final, .journey-final, .guides-final, .story-continues) {
    padding-block: clamp(6rem, 12vw, 11rem);
    border-top: 1px solid var(--river-section-rule);
}

:where(.headwaters-invitation, .tributaries-final, .journey-final, .guides-final) h2 {
    max-width: 13ch;
    font-family: var(--river-display);
    font-size: clamp(3rem, 6vw, 6.4rem);
    font-weight: 400;
    line-height: 0.96;
    letter-spacing: -0.045em;
}

/* Directory pages: Series + Topics */
:where(.series-hero, .topics-hero) {
    padding-block: clamp(6rem, 11vw, 10rem);
    border-bottom: 1px solid var(--river-section-rule);
}

:where(.series-heading, .topics-hero h1) {
    max-width: 11ch;
    margin: 0;
    font-family: var(--river-display);
    font-size: clamp(4rem, 8vw, 8rem);
    font-weight: 400;
    line-height: 0.9;
    letter-spacing: -0.05em;
}

:where(.series-list, .topics-grid) {
    gap: clamp(1rem, 2vw, 1.5rem);
}

:where(.series-card, .topic-card) {
    border: 1px solid var(--river-section-rule);
    border-radius: var(--river-card-radius);
    background: rgba(255, 255, 255, 0.28);
    box-shadow: 0 12px 34px rgba(16, 46, 37, 0.06);
}

:where(.series-card, .topic-card) h2,
:where(.series-card, .topic-card) h3 {
    font-family: var(--river-display);
    font-weight: 400;
    letter-spacing: -0.025em;
}

/* Responsive editorial restraint */
@media (max-width: 900px) {
    :where(.headwaters-hero, .source-hero, .tributaries-hero, .current-hero, .journey-hero, .guides-hero) {
        padding-block: 6rem;
    }

    :where(.headwaters-hero, .source-hero, .tributaries-hero, .current-hero, .journey-hero, .guides-hero) h1 {
        font-size: clamp(3.6rem, 12vw, 6.5rem);
    }
}

@media (max-width: 640px) {
    :root {
        --river-page-shell: min(100% - 2rem, 1180px);
        --river-prose-shell: min(100% - 2rem, 760px);
    }

    :where(.headwaters-hero, .source-hero, .tributaries-hero, .current-hero, .journey-hero, .guides-hero) {
        padding-block: 4.75rem 5.5rem;
    }

    :where(.headwaters-hero, .source-hero, .tributaries-hero, .current-hero, .journey-hero, .guides-hero) h1 {
        max-width: 12ch;
        font-size: clamp(3.1rem, 15vw, 4.7rem);
        line-height: 0.92;
    }

    :where(.centered-heading, .tributaries-section-heading, .current-workbench-heading, .current-reality-heading, .current-life-heading, .current-commitments-heading, .current-snapshot-heading, .current-questions-heading, .journey-section-heading, .journey-direction-heading, .journey-philosophy-heading, .guides-section-heading, .guides-standard-heading, .guides-featured-heading, .story-continues-heading) {
        font-size: clamp(2.4rem, 11vw, 3.8rem);
    }

    .chapter-header h2,
    .chapter-opening h2 {
        font-size: clamp(2.4rem, 11vw, 3.8rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    :where(.tributary-card, .tributaries-navigation-card, .current-build-card, .workbench-card, .journey-pillar-card, .journey-follow-card, .guide-category-card, .published-guide-card, .guides-navigation-card) {
        transition: none;
    }

    :where(.tributary-card, .tributaries-navigation-card, .current-build-card, .workbench-card, .journey-pillar-card, .journey-follow-card, .guide-category-card, .published-guide-card, .guides-navigation-card):hover {
        transform: none;
    }
}


/* WEBSITE 4.0 - MUTATION 005 - UTILITY + CONVERSION + KNOWLEDGE EXPERIENCE */

:where(.contribute-page, .partner-page, .library-page, .knowledge-page, .saved-library-page) {
  --v4-utility-shell: min(1180px, calc(100vw - 3rem));
  --v4-utility-reading: min(760px, calc(100vw - 3rem));
}

.contribute-page .contribute-shell,
.library-page .library-shell,
.knowledge-page > *,
.saved-library__shell {
  width: var(--v4-utility-shell);
  margin-inline: auto;
}

.contribute-page .contribute-hero,
.library-page .library-hero,
.knowledge-hero,
.saved-library__hero {
  position: relative;
  overflow: hidden;
}

.contribute-page .contribute-hero h1,
.library-page .library-hero h1,
.knowledge-hero h1,
.saved-library__hero h1,
.letters-hero h1 {
  font-family: var(--river-display);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.contribute-page .contribute-hero h1,
.library-page .library-hero h1,
.knowledge-hero h1,
.saved-library__hero h1 {
  font-size: clamp(3.75rem, 8vw, 7.75rem);
}

:where(.contribute-page, .library-page, .knowledge-page, .saved-library-page) :where(.section-label, .eyebrow, .content-type, .knowledge-eyebrow, .saved-library__eyebrow) {
  font-family: var(--river-interface);
  font-size: var(--river-interface-small, 0.75rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.contribute-page :where(.contribute-options, .contribute-section),
.library-page .library-section,
.knowledge-section {
  padding-block: clamp(4.5rem, 8vw, 8rem);
}

.contribute-page :where(.contribution-card, .fund-card),
.library-page :where(.service-card, .product-card),
.knowledge-node,
.knowledge-connection,
.saved-library__grid > * {
  border-radius: var(--river-card-radius, 1.5rem);
}

.contribute-page .contribution-card h3,
.library-page :where(.service-card, .product-card) h3,
.knowledge-node h3,
.knowledge-connection h3,
.saved-library__grid h2,
.saved-library__grid h3 {
  font-family: var(--river-display);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.partner-page .contribute-hero {
  background: linear-gradient(145deg, var(--river-paper) 0%, var(--river-paper-deep) 100%);
}

.partner-page .contribute-options {
  background: var(--river-green-deep);
  color: var(--river-paper);
}

.partner-page .contribute-options :where(h2, h3, p, a) {
  color: inherit;
}

.knowledge-page {
  background: var(--river-paper);
  color: var(--river-ink);
}

.knowledge-hero {
  padding-block: clamp(6rem, 11vw, 11rem) clamp(4rem, 7vw, 7rem);
  border-bottom: 1px solid var(--river-line);
}

.knowledge-introduction {
  max-width: 42rem;
  font-family: var(--river-body);
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.6;
}

.knowledge-summary,
.knowledge-explorer-controls {
  border: 1px solid var(--river-line);
  border-radius: var(--river-card-radius, 1.5rem);
  background: rgba(255, 255, 255, 0.35);
}

.knowledge-card-grid,
.knowledge-connections {
  gap: clamp(1rem, 2vw, 1.75rem);
}

.knowledge-node,
.knowledge-connection {
  border: 1px solid var(--river-line);
  background: rgba(255, 255, 255, 0.42);
  box-shadow: 0 18px 50px rgba(16, 46, 37, 0.06);
}

.knowledge-explorer-field :where(label, select, input),
.saved-library__controls :where(label, select, input, button),
.reader-data-portability :where(button, input) {
  font-family: var(--river-interface);
}

.saved-library-page {
  background: var(--river-paper);
  color: var(--river-ink);
}

.saved-library__hero {
  padding-top: clamp(5rem, 9vw, 9rem);
}

.saved-library__privacy {
  max-width: 46rem;
  font-family: var(--river-body);
  line-height: 1.65;
}

.saved-library__controls,
.reader-data-portability {
  border: 1px solid var(--river-line);
  border-radius: var(--river-card-radius, 1.5rem);
  background: rgba(255, 255, 255, 0.38);
  box-shadow: 0 18px 50px rgba(16, 46, 37, 0.05);
}

.letters-hero {
  position: relative;
  overflow: hidden;
}

.letters-hero h1 {
  font-size: clamp(4.5rem, 10vw, 9rem);
}

.letters-opening h2,
.letters-featured-heading h2,
.letters-section-heading h2,
.letters-ordinary h2,
.letters-purpose-heading h2,
.letters-reader h2,
.letters-final h2 {
  font-family: var(--river-display);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.letter-collection-card h3,
.unwritten-letter-card h3,
.letters-navigation-card h3,
.letters-purpose-item h3 {
  font-family: var(--river-display);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.letters-opening :where(p, blockquote),
.letters-ordinary :where(p, blockquote),
.letters-reader :where(p, blockquote),
.letters-final :where(p, blockquote) {
  font-family: var(--river-body);
}

.letters-ordinary-quote,
.letters-reader-quote,
.letters-final-quote {
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.contribute-page :where(.contribution-card, .fund-card),
.library-page :where(.service-card, .product-card),
.knowledge-node,
.knowledge-connection,
.letter-collection-card,
.unwritten-letter-card,
.letters-navigation-card {
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.contribute-page :where(.contribution-card, .fund-card):hover,
.library-page :where(.service-card, .product-card):hover,
.knowledge-node:hover,
.knowledge-connection:hover,
.letter-collection-card:hover,
.unwritten-letter-card:hover,
.letters-navigation-card:hover {
  transform: translateY(-3px);
}

@media (max-width: 760px) {
  :where(.contribute-page, .partner-page, .library-page, .knowledge-page, .saved-library-page) {
    --v4-utility-shell: min(100% - 2rem, 1180px);
  }

  .contribute-page :where(.contribute-options, .contribute-section),
  .library-page .library-section,
  .knowledge-section {
    padding-block: 4rem;
  }

  .letters-hero h1 {
    font-size: clamp(3.5rem, 17vw, 6rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .contribute-page :where(.contribution-card, .fund-card),
  .library-page :where(.service-card, .product-card),
  .knowledge-node,
  .knowledge-connection,
  .letter-collection-card,
  .unwritten-letter-card,
  .letters-navigation-card {
    transition: none;
    transform: none;
  }
}


/* WEBSITE 4.0 - MUTATION 006 - LIBRARY + DISCOVERY EDITORIAL SYSTEM */
/* Shared publication discovery: hub, collections, search, related work. */

.library-page {
  --v4-library-shell: min(1180px, calc(100% - 48px));
  --v4-library-reading: 46rem;
  --v4-library-rule: rgba(28, 54, 43, 0.16);
  --v4-library-surface: rgba(255, 252, 244, 0.82);
  --v4-library-surface-strong: #fffdf7;
  --v4-library-ink: #17352b;
  --v4-library-muted: #65736b;
}

.library-page .library-shell {
  width: var(--v4-library-shell);
  margin-inline: auto;
}

.library-page .library-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(5.75rem, 9vw, 9rem) 0 clamp(4.5rem, 7vw, 7rem);
  border-bottom: 1px solid rgba(255,255,255,0.14);
}

.library-page .library-hero .library-shell {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: end;
  min-height: clamp(24rem, 52vw, 39rem);
}

.library-page .library-hero .eyebrow {
  margin-bottom: 1.35rem;
  font-family: var(--river-interface);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.3;
  text-transform: uppercase;
}

.library-page .library-hero h1 {
  max-width: 11ch;
  margin: 0;
  font-family: var(--river-display);
  font-size: clamp(3.75rem, 8.5vw, 8.6rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.88;
  text-wrap: balance;
}

.library-page .library-hero__lead {
  max-width: 42rem;
  margin: clamp(1.7rem, 3vw, 2.5rem) 0 0;
  font-family: var(--river-body);
  font-size: clamp(1.08rem, 1.7vw, 1.35rem);
  line-height: 1.7;
}

.library-page .library-section {
  padding: clamp(4.75rem, 8vw, 8rem) 0;
}

.library-page .library-section__heading {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(16rem, 0.75fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: end;
  padding-bottom: clamp(2rem, 4vw, 3.25rem);
  border-bottom: 1px solid var(--v4-library-rule);
}

.library-page .library-section__heading .section-label {
  margin-bottom: 1rem;
  font-family: var(--river-interface);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.library-page .library-section__heading h2 {
  max-width: 13ch;
  margin: 0;
  font-family: var(--river-display);
  font-size: clamp(2.45rem, 5vw, 5.25rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.96;
  text-wrap: balance;
}

.library-page .library-section__heading > p,
.library-page .library-section__heading > div + p {
  max-width: 34rem;
  margin: 0;
  font-family: var(--river-body);
  font-size: 1.03rem;
  line-height: 1.75;
}

.library-hub-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
  margin-top: clamp(2rem, 4vw, 3.5rem);
}

.library-hub-card {
  grid-column: span 6;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 25rem;
  padding: clamp(1.6rem, 3vw, 2.5rem);
  overflow: hidden;
  border: 1px solid var(--v4-library-rule);
  border-radius: var(--river-card-radius);
  background: var(--v4-library-surface);
  box-shadow: 0 18px 50px rgba(21,45,36,0.07);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.library-hub-card:nth-child(3n + 1) {
  grid-column: span 7;
}

.library-hub-card:nth-child(3n + 2) {
  grid-column: span 5;
}

.library-hub-card:hover {
  transform: translateY(-4px);
  border-color: rgba(28,54,43,0.28);
  box-shadow: 0 26px 64px rgba(21,45,36,0.11);
}

.library-hub-card .eyebrow,
.library-hub-card__meta {
  font-family: var(--river-interface);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.library-hub-card h3 {
  max-width: 12ch;
  margin: 1.1rem 0 0;
  font-family: var(--river-display);
  font-size: clamp(2rem, 3.5vw, 3.25rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1;
}

.library-hub-card__description {
  max-width: 38rem;
  margin: 1.35rem 0 0;
  font-family: var(--river-body);
  font-size: 1rem;
  line-height: 1.7;
}

.library-hub-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin-top: 1.5rem;
  color: var(--v4-library-muted);
}

.library-hub-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.4rem;
  align-items: center;
  margin-top: auto;
  padding-top: 2rem;
  border-top: 1px solid var(--v4-library-rule);
}

.library-hub-card__actions a {
  font-family: var(--river-interface);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.library-collection {
  margin-top: clamp(2rem, 4vw, 3.5rem);
}

.library-collection-controls {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(10rem, 0.7fr) minmax(10rem, 0.7fr);
  gap: 1rem;
  align-items: end;
  padding: clamp(1.2rem, 2.5vw, 1.8rem);
  border: 1px solid var(--v4-library-rule);
  border-radius: calc(var(--river-card-radius) - 4px);
  background: rgba(255,253,247,0.68);
  box-shadow: 0 14px 40px rgba(21,45,36,0.05);
}

.library-collection-search,
.library-collection-filter,
.library-collection-sort {
  min-width: 0;
}

.library-collection-controls label {
  display: block;
  margin-bottom: 0.55rem;
  font-family: var(--river-interface);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.3;
  text-transform: uppercase;
}

.library-collection-controls :where(input, select) {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.78rem 0.95rem;
  border: 1px solid rgba(28,54,43,0.2);
  border-radius: 10px;
  background: var(--v4-library-surface-strong);
  color: var(--v4-library-ink);
  font-family: var(--river-interface);
  font-size: 0.92rem;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.library-collection-controls :where(input, select):focus {
  border-color: rgba(28,54,43,0.62);
  box-shadow: 0 0 0 3px rgba(28,54,43,0.1);
}

.library-collection-summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  min-height: 3rem;
  padding: 1rem 0;
  color: var(--v4-library-muted);
  font-family: var(--river-interface);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.library-collection-summary button {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.22em;
  cursor: pointer;
}

.library-entry-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}

.library-entry-item {
  grid-column: span 4;
  min-width: 0;
}

.library-entry-item:nth-child(7n + 1),
.library-entry-item:nth-child(7n + 5) {
  grid-column: span 8;
}

.library-entry-item:nth-child(7n + 2),
.library-entry-item:nth-child(7n + 6) {
  grid-column: span 4;
}

.library-entry-item > article,
.library-entry-item .content-card {
  height: 100%;
}

.library-entry-item .content-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--v4-library-rule);
  border-radius: var(--river-card-radius);
  background: var(--v4-library-surface);
  box-shadow: 0 14px 42px rgba(21,45,36,0.055);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.library-entry-item .content-card:hover,
.library-entry-item .content-card:focus-within {
  transform: translateY(-4px);
  border-color: rgba(28,54,43,0.3);
  box-shadow: 0 24px 58px rgba(21,45,36,0.1);
}

.library-entry-item .content-card > a {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 22rem;
  padding: clamp(1.45rem, 2.6vw, 2.1rem);
  color: inherit;
  text-decoration: none;
}

.library-entry-item .content-card-meta,
.library-entry-item .content-tags,
.library-entry-item .content-card-footer {
  font-family: var(--river-interface);
}

.library-entry-item .content-type {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.library-entry-item .content-card h3 {
  max-width: 14ch;
  margin: 1.2rem 0 0;
  font-family: var(--river-display);
  font-size: clamp(1.65rem, 2.8vw, 2.55rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.04;
  text-wrap: balance;
}

.library-entry-item .content-description {
  margin: 1.15rem 0 0;
  font-family: var(--river-body);
  font-size: 0.98rem;
  line-height: 1.67;
}

.library-entry-item .content-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.25rem;
}

.library-entry-item .content-tags > * {
  padding: 0.3rem 0.55rem;
  border: 1px solid rgba(28,54,43,0.13);
  border-radius: 999px;
  font-size: 0.64rem;
  letter-spacing: 0.05em;
}

.library-entry-item .content-card-footer {
  margin-top: auto;
  padding-top: 1.6rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.library-entry-empty,
.library-collection-empty {
  padding: clamp(2.5rem, 6vw, 5rem);
  border: 1px dashed rgba(28,54,43,0.24);
  border-radius: var(--river-card-radius);
  background: rgba(255,253,247,0.55);
  text-align: center;
}

.library-entry-empty h3,
.library-collection-empty h3 {
  margin: 0.8rem auto 0;
  font-family: var(--river-display);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 400;
  letter-spacing: -0.04em;
}

.library-topics-callout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) auto;
  gap: 2rem;
  align-items: end;
  margin-top: clamp(4rem, 8vw, 7rem);
  padding: clamp(2rem, 5vw, 4.5rem);
  overflow: hidden;
  border-radius: var(--river-card-radius);
  background: var(--river-deep, #17352b);
  color: #f8f2e7;
}

.library-topics-callout h2 {
  max-width: 13ch;
  margin: 0;
  font-family: var(--river-display);
  font-size: clamp(2.35rem, 5vw, 4.8rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.library-topics-callout p {
  max-width: 42rem;
  font-family: var(--river-body);
  line-height: 1.7;
}

.library-topics-link {
  align-self: end;
  white-space: nowrap;
  font-family: var(--river-interface);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.related-content {
  margin-top: clamp(5rem, 9vw, 8rem);
  padding-top: clamp(3rem, 6vw, 5rem);
  border-top: 1px solid var(--v4-library-rule, rgba(28,54,43,0.16));
}

.related-content__header {
  max-width: 48rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.related-content__header h2 {
  margin: 0.8rem 0 0;
  font-family: var(--river-display);
  font-size: clamp(2.25rem, 4.5vw, 4.4rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1;
}

.related-content__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.related-content__recommendation {
  padding: clamp(1.4rem, 2.6vw, 2rem);
  border: 1px solid rgba(28,54,43,0.14);
  border-radius: var(--river-card-radius);
  background: rgba(255,253,247,0.7);
}

.related-content__reason {
  font-family: var(--river-interface);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
}

.river-search__dialog {
  backdrop-filter: blur(14px);
}

.river-search__panel {
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--river-card-radius);
  box-shadow: 0 32px 100px rgba(7,23,17,0.32);
}

.river-search__eyebrow,
.river-search__status,
.river-search__footer,
.river-search-result__route {
  font-family: var(--river-interface);
}

.river-search__header h2 {
  font-family: var(--river-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1;
}

.river-search__input {
  font-family: var(--river-interface);
  font-size: 1rem;
}

.river-search-result__link {
  border-radius: 12px;
  transition: background-color 150ms ease, transform 150ms ease;
}

.river-search-result__link:hover,
.river-search-result__link:focus-visible {
  transform: translateX(3px);
}

.river-search-result__title {
  font-family: var(--river-display);
  font-size: 1.15rem;
  font-weight: 400;
}

.river-search-result__excerpt {
  font-family: var(--river-body);
  line-height: 1.55;
}

@media (max-width: 900px) {
  .library-page {
    --v4-library-shell: min(100% - 32px, 1180px);
  }

  .library-page .library-section__heading {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .library-hub-card,
  .library-hub-card:nth-child(3n + 1),
  .library-hub-card:nth-child(3n + 2) {
    grid-column: span 6;
  }

  .library-entry-item,
  .library-entry-item:nth-child(7n + 1),
  .library-entry-item:nth-child(7n + 2),
  .library-entry-item:nth-child(7n + 5),
  .library-entry-item:nth-child(7n + 6) {
    grid-column: span 6;
  }

  .library-collection-controls {
    grid-template-columns: 1fr 1fr;
  }

  .library-collection-search {
    grid-column: 1 / -1;
  }

  .library-topics-callout {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .related-content__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .library-page {
    --v4-library-shell: min(100% - 24px, 1180px);
  }

  .library-page .library-hero {
    padding: 4.75rem 0 3.75rem;
  }

  .library-page .library-hero .library-shell {
    min-height: 21rem;
  }

  .library-page .library-hero h1 {
    font-size: clamp(3.25rem, 17vw, 5.2rem);
  }

  .library-page .library-section {
    padding: 4rem 0;
  }

  .library-hub-card,
  .library-hub-card:nth-child(3n + 1),
  .library-hub-card:nth-child(3n + 2),
  .library-entry-item,
  .library-entry-item:nth-child(7n + 1),
  .library-entry-item:nth-child(7n + 2),
  .library-entry-item:nth-child(7n + 5),
  .library-entry-item:nth-child(7n + 6) {
    grid-column: 1 / -1;
  }

  .library-hub-card {
    min-height: 22rem;
  }

  .library-collection-controls {
    grid-template-columns: 1fr;
  }

  .library-collection-search {
    grid-column: auto;
  }

  .library-collection-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .related-content__grid {
    grid-template-columns: 1fr;
  }

  .library-topics-link {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .library-hub-card,
  .library-entry-item .content-card,
  .river-search-result__link {
    transition: none;
  }

  .library-hub-card:hover,
  .library-entry-item .content-card:hover,
  .library-entry-item .content-card:focus-within,
  .river-search-result__link:hover,
  .river-search-result__link:focus-visible {
    transform: none;
  }
}

/* WEBSITE 4.0 - RESTART 003 - MOBILE READABILITY + PROPORTION REPAIR */

/* Homepage pathway cards: readable editorial surfaces at every viewport. */
.home-v4 .home-ecosystem .pathway-card,
.home-v4 .home-ecosystem .pathway-card:nth-child(1),
.home-v4 .home-ecosystem .pathway-card:nth-child(2),
.home-v4 .home-ecosystem .pathway-card:nth-child(3),
.home-v4 .home-ecosystem .pathway-card:nth-child(4) {
  background: rgba(255, 253, 247, 0.92);
  color: var(--river-ink);
}

.home-v4 .home-ecosystem .pathway-card :where(h2, h3, h4),
.home-v4 .home-ecosystem .pathway-card :where(h2, h3, h4) a {
  color: var(--river-green-deep) !important;
}

.home-v4 .home-ecosystem .pathway-card :where(p, li) {
  color: #46564e !important;
}

.home-v4 .home-ecosystem .pathway-card :where(.eyebrow, .pathway-number, .pathway-label) {
  color: #8a6845 !important;
}

.home-v4 .home-ecosystem .pathway-card :where(a, .pathway-link) {
  color: #694c2f;
}

/* Current invitation: never allow white copy to disappear into paper surfaces. */
.home-v4 .invitation-section,
.home-v4 .invitation-content,
.home-v4 .invitation-layout {
  color: var(--river-ink);
}

.home-v4 .invitation-section :where(h1, h2, h3) {
  color: var(--river-green-deep) !important;
}

.home-v4 .invitation-section :where(p, label) {
  color: #46564e !important;
}

.home-v4 .invitation-section :where(input, textarea) {
  color: #20352c !important;
  background: rgba(255, 253, 247, 0.96) !important;
  border-color: rgba(32, 53, 44, 0.22) !important;
}

.home-v4 .invitation-section :where(input, textarea)::placeholder {
  color: #69766f !important;
  opacity: 1;
}

/* Handbook part/chapter panels: explicit dark-surface contrast contract. */
.reading-body :where(.guide-part, .part-divider, .guide-part-divider, .chapter-divider, .guide-chapter-divider),
.content-body :where(.guide-part, .part-divider, .guide-part-divider, .chapter-divider, .guide-chapter-divider),
.guide-content :where(.guide-part, .part-divider, .guide-part-divider, .chapter-divider, .guide-chapter-divider) {
  color: #f8f2e7 !important;
}

.reading-body :where(.guide-part, .part-divider, .guide-part-divider, .chapter-divider, .guide-chapter-divider) :where(h1, h2, h3, h4, strong),
.content-body :where(.guide-part, .part-divider, .guide-part-divider, .chapter-divider, .guide-chapter-divider) :where(h1, h2, h3, h4, strong),
.guide-content :where(.guide-part, .part-divider, .guide-part-divider, .chapter-divider, .guide-chapter-divider) :where(h1, h2, h3, h4, strong) {
  color: #fffaf0 !important;
}

.reading-body :where(.guide-part, .part-divider, .guide-part-divider, .chapter-divider, .guide-chapter-divider) :where(p, li, blockquote, em),
.content-body :where(.guide-part, .part-divider, .guide-part-divider, .chapter-divider, .guide-chapter-divider) :where(p, li, blockquote, em),
.guide-content :where(.guide-part, .part-divider, .guide-part-divider, .chapter-divider, .guide-chapter-divider) :where(p, li, blockquote, em) {
  color: rgba(255, 250, 240, 0.88) !important;
}

.reading-body :where(.guide-part, .part-divider, .guide-part-divider, .chapter-divider, .guide-chapter-divider) :where(.eyebrow, .part-label, .chapter-label),
.content-body :where(.guide-part, .part-divider, .guide-part-divider, .chapter-divider, .guide-chapter-divider) :where(.eyebrow, .part-label, .chapter-label),
.guide-content :where(.guide-part, .part-divider, .guide-part-divider, .chapter-divider, .guide-chapter-divider) :where(.eyebrow, .part-label, .chapter-label) {
  color: #efc58f !important;
}

/* Mobile is content-first: no card or editorial panel should become a poster-sized viewport trap. */
@media (max-width: 760px) {
  .home-v4 .home-ecosystem .pathway-grid {
    gap: 1rem;
  }

  .home-v4 .home-ecosystem .pathway-card,
  .home-v4 .home-ecosystem .pathway-card:nth-child(1),
  .home-v4 .home-ecosystem .pathway-card:nth-child(2),
  .home-v4 .home-ecosystem .pathway-card:nth-child(3),
  .home-v4 .home-ecosystem .pathway-card:nth-child(4) {
    min-height: 0 !important;
    height: auto !important;
    aspect-ratio: auto !important;
    padding: clamp(1.5rem, 6vw, 2rem) !important;
  }

  .home-v4 .home-ecosystem .pathway-card :where(h2, h3) {
    font-size: clamp(2rem, 10vw, 3rem);
    line-height: 0.98;
  }

  .home-v4 .home-ecosystem .pathway-card p {
    font-size: clamp(1rem, 4.6vw, 1.16rem);
    line-height: 1.6;
  }

  .home-v4 .invitation-section,
  .home-v4 .invitation-layout,
  .home-v4 .invitation-content {
    min-height: 0 !important;
    height: auto !important;
  }

  .home-v4 .invitation-layout {
    gap: 1.5rem;
  }

  .home-v4 .invitation-section :where(input, textarea, button) {
    min-height: 3.25rem;
  }

  .reading-body :where(.guide-part, .part-divider, .guide-part-divider, .chapter-divider, .guide-chapter-divider),
  .content-body :where(.guide-part, .part-divider, .guide-part-divider, .chapter-divider, .guide-chapter-divider),
  .guide-content :where(.guide-part, .part-divider, .guide-part-divider, .chapter-divider, .guide-chapter-divider) {
    min-height: 0 !important;
    height: auto !important;
    aspect-ratio: auto !important;
  }
}

@media (max-width: 480px) {
  .home-v4 .home-ecosystem .pathway-card,
  .home-v4 .home-ecosystem .pathway-card:nth-child(1),
  .home-v4 .home-ecosystem .pathway-card:nth-child(2),
  .home-v4 .home-ecosystem .pathway-card:nth-child(3),
  .home-v4 .home-ecosystem .pathway-card:nth-child(4) {
    border-radius: 1.5rem;
  }
}


/* WEBSITE 4.0 - RESTART 004B - ORIENTATION + CONTINUITY */
.river-brand__words { display: inline-flex; align-items: center; }
.river-brand__name { font-family: var(--river-display); letter-spacing: -0.025em; }
.river-nav__start { font-weight: 700; }
.series-navigation__link, .series-navigation__boundary { min-height: 0; }
@media (max-width: 720px) { .series-navigation__link, .series-navigation__boundary { min-height: 0; padding: 16px; } }

/* WEBSITE 4.0 - 008B - DEFINITIVE FIRST-VISIT ORIENTATION */
.home-v4 .home-orientation { background: var(--river-paper, #f6f1e7); color: var(--river-ink, #18382f); scroll-margin-top: 7rem; }
.home-v4 .home-orientation__shell { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
.home-v4 .home-orientation__introduction { max-width: 42rem; }
.home-v4 .home-orientation__introduction h2 { max-width: 13ch; }
.home-v4 .home-orientation__introduction :where(p, .intro-lead) { color: #46564e; }
.home-v4 .home-orientation__paths { display: grid; gap: 1rem; }
.home-v4 .home-orientation__primary, .home-v4 .home-orientation__alternatives a { text-decoration: none; border: 1px solid rgba(24,56,47,.16); border-radius: 1.5rem; transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease; }
.home-v4 .home-orientation__primary { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 1.25rem; align-items: center; padding: clamp(1.5rem,3vw,2.25rem); background: #173d32; color: #fffaf0; box-shadow: 0 18px 48px rgba(20,48,40,.16); }
.home-v4 .home-orientation__number { font-family: var(--river-interface); font-size: .72rem; letter-spacing: .14em; opacity: .72; }
.home-v4 .home-orientation__path-copy { display: grid; gap: .45rem; }
.home-v4 .home-orientation__path-copy strong, .home-v4 .home-orientation__alternatives strong { font-family: var(--river-display); font-size: clamp(1.35rem,2.2vw,1.8rem); line-height: 1.08; }
.home-v4 .home-orientation__path-copy > span:last-child { color: rgba(255,250,240,.82); line-height: 1.55; }
.home-v4 .home-orientation__kicker { font-family: var(--river-interface); font-size: .72rem; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.home-v4 .home-orientation__primary .home-orientation__kicker { color: #efc58f; }
.home-v4 .home-orientation__arrow { font-size: 1.5rem; }
.home-v4 .home-orientation__alternatives { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.home-v4 .home-orientation__alternatives a { display: grid; gap: .55rem; padding: 1.5rem; background: #fffaf0; color: #18382f; }
.home-v4 .home-orientation__alternatives .home-orientation__kicker { color: #80603e; }
.home-v4 .home-orientation__alternatives a > span:last-child { color: #536159; line-height: 1.5; }
.home-v4 .home-orientation__primary:hover, .home-v4 .home-orientation__alternatives a:hover { transform: translateY(-2px); border-color: rgba(24,56,47,.3); }
.river-primary-nav > .river-nav__start { display: inline-flex; align-items: center; padding: .55rem .85rem; border-radius: 999px; background: rgba(239,197,143,.2); color: inherit; text-decoration: none; }
.river-mobile-nav .river-nav__start { font-weight: 700; }
@media (max-width: 900px) { .home-v4 .home-orientation__shell { grid-template-columns: 1fr; gap: 2rem; } .home-v4 .home-orientation__introduction h2 { max-width: 18ch; } }
@media (max-width: 640px) { .home-v4 .home-orientation__alternatives { grid-template-columns: 1fr; } .home-v4 .home-orientation__primary { grid-template-columns: 1fr auto; gap: 1rem; min-height: 0; height: auto; aspect-ratio: auto; } .home-v4 .home-orientation__number { grid-column: 1 / -1; } .home-v4 .home-orientation__alternatives a { min-height: 0; height: auto; aspect-ratio: auto; } }
@media (prefers-reduced-motion: reduce) { .home-v4 .home-orientation__primary, .home-v4 .home-orientation__alternatives a { transition: none; } }

/* WEBSITE 4.0 - 009B - NAVIGATION + RESPONSIVE SHELL */
.river-header { position: sticky; top: 0; z-index: 1000; width: 100%; }
.river-header__inner, .river-brand, .river-brand__words, .river-primary-nav { min-width: 0; }
.river-brand__name { line-height: 1.05; }
.river-primary-nav { align-items: center; }
.river-primary-nav a { white-space: nowrap; }
.river-primary-nav > .river-nav__start, .river-header__actions, .river-menu-toggle { flex: 0 0 auto; }
.river-primary-nav a:focus-visible, .river-header__actions a:focus-visible, .river-header__actions button:focus-visible, .river-menu-toggle:focus-visible, .river-mobile-nav a:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.river-mobile-nav[hidden] { display: none !important; }
.river-menu-open { overflow: hidden; }
.river-mobile-nav nav { display: grid; gap: .35rem; }
.river-mobile-nav__primary { min-height: 48px; }
@media (max-width: 1180px) { .river-primary-nav { gap: .55rem; } .river-primary-nav a { font-size: .92rem; } .river-header__actions { gap: .55rem; } }
@media (max-width: 980px) { .river-primary-nav, .river-header__actions { display: none; } .river-menu-toggle { display: inline-flex; } .river-header__inner { min-height: 72px; } .river-brand__name { font-size: clamp(1.05rem, 4vw, 1.35rem); } .river-brand__tagline { display: none; } .river-mobile-nav { max-height: calc(100dvh - 72px); overflow-y: auto; overscroll-behavior: contain; } .river-mobile-nav__inner { padding-bottom: max(2rem, env(safe-area-inset-bottom)); } }
@media (min-width: 981px) { .river-menu-toggle, .river-mobile-nav { display: none !important; } }
@media (max-width: 640px) { .river-header__inner { min-height: 64px; } .river-mobile-nav { max-height: calc(100dvh - 64px); } .river-mobile-nav__inner { padding-inline: 1rem; } .river-mobile-nav__primary { min-height: 52px; } }
@media (prefers-reduced-motion: reduce) { .river-primary-nav a, .river-header__actions a, .river-header__actions button, .river-menu-toggle, .river-mobile-nav a { transition: none !important; } }


/* WEBSITE 4.0 - 010C - MOBILE PROPORTION + READABILITY COMPLETION */
@media (max-width: 760px) {
  .library-page .library-hero .library-shell { min-height: 0; }
  .library-page .library-hero h1 { font-size: clamp(2.75rem, 13vw, 4.25rem); line-height: 0.96; }
  .library-page .library-hub-card { min-height: 0; }
  .library-page .library-section { padding-block: clamp(3rem, 10vw, 4rem); }
  .library-page .library-collection-controls :where(input, select), .saved-library__controls :where(input, select, button), .knowledge-explorer-field :where(input, select) { min-height: 3.25rem; font-size: 1rem; }
  .reading-page-shell .content-entry__header h1, .reading-page-shell .content-entry__body h1 { overflow-wrap: anywhere; }
  .reading-page-shell .content-entry__body :where(img, video, iframe, table, pre) { max-width: 100%; }
  .reading-page-shell .content-entry__body pre { overflow-x: auto; }
}
@media (max-width: 480px) {
  .library-page .library-hero h1 { font-size: clamp(2.5rem, 12vw, 3.5rem); }
  .library-page .library-hub-card, .library-page .library-entry-item .content-card { border-radius: 1.35rem; }
  .home-v4 .home-orientation__primary, .home-v4 .home-orientation__alternatives a { border-radius: 1.35rem; }
}


/* WEBSITE 4.0 - 011B - FINAL INTERACTION + ACCESSIBILITY COMPLETION */
.home-v4 .home-orientation__primary:focus-visible, .home-v4 .home-orientation__alternatives a:focus-visible, .library-page a:focus-visible, .reading-page-shell a:focus-visible, .series-navigation__link:focus-visible, .river-search-result__link:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; }
.library-page :where(input, select, button):focus-visible, .saved-library__controls :where(input, select, button):focus-visible, .knowledge-explorer-field :where(input, select, button):focus-visible, .home-v4 .invitation-section :where(input, textarea, button):focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
.library-page :where(input, textarea)::placeholder, .saved-library__controls :where(input, textarea)::placeholder, .knowledge-explorer-field :where(input, textarea)::placeholder { color: #69766f; opacity: 1; }
:where(button, input, select, textarea):disabled { cursor: not-allowed; opacity: .58; }
.library-page :where(button, input, select), .saved-library__controls :where(button, input, select), .knowledge-explorer-field :where(button, input, select), .home-v4 .invitation-section :where(button, input, textarea) { min-height: 3rem; }
.library-page, .reading-page-shell, .home-v4 { overflow-wrap: break-word; }
@media (max-width: 760px) {
  .home-v4 .home-orientation__primary, .home-v4 .home-orientation__alternatives a, .series-navigation__link, .river-mobile-nav__primary { min-height: 48px; }
  .library-page :where(button, input, select), .saved-library__controls :where(button, input, select), .knowledge-explorer-field :where(button, input, select), .home-v4 .invitation-section :where(button, input, textarea) { min-height: 3.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  .home-v4 .home-orientation__primary, .home-v4 .home-orientation__alternatives a, .library-page a, .reading-page-shell a, .series-navigation__link, .river-search-result__link { transition: none !important; transform: none !important; }
}
/* SITE-UX-022 - STICKY MOBILE SEARCH BESIDE HAMBURGER */
@media (max-width: 980px) {
    .river-header__actions {
        display: flex;
        align-items: center;
        gap: 0.55rem;
        margin-left: auto;
    }

    .river-header__actions > .river-header__utility,
    .river-header__actions > .river-header__cta {
        display: none;
    }

    .river-header__actions > .river-search {
        display: block;
        min-width: 0;
    }

    .river-search__trigger {
        display: inline-flex;
        min-height: 44px;
        padding: 0.65rem 0.8rem;
        align-items: center;
        gap: 0.45rem;
        border-radius: 999px;
        white-space: nowrap;
    }

    .river-search__shortcut {
        display: none;
    }

    .river-search__icon {
        width: 1.1rem;
        height: 1.1rem;
        flex: 0 0 auto;
    }

    .river-menu-toggle {
        display: inline-flex;
        flex: 0 0 auto;
    }

    .river-search__dialog {
        width: 100%;
        max-width: none;
        height: 100dvh;
        max-height: 100dvh;
        margin: 0;
        padding: 0;
        border: 0;
    }

    .river-search__panel {
        width: 100%;
        min-height: 100dvh;
        max-height: 100dvh;
        overflow-y: auto;
        border-radius: 0;
    }

    .river-search__input {
        min-height: 52px;
        font-size: 16px;
    }
}

@media (max-width: 430px) {
    .river-search__trigger {
        padding-inline: 0.7rem;
    }

    .river-search__trigger-label {
        font-size: 0.9rem;
    }
}
