@font-face {
            font-family: 'Cormorant Garamond';
            src: url('../assets/fonts/cormorant-garamond/CormorantGaramond-latin.woff2') format('woff2');
            font-style: normal;
            font-weight: 300 500;
            font-display: block;
        }

@font-face {
            font-family: 'Outfit';
            src: url('../assets/fonts/outfit/Outfit-latin.woff2') format('woff2');
            font-style: normal;
            font-weight: 300 700;
            font-display: block;
        }

@font-face {
            font-family: 'JetBrains Mono';
            src: url('../assets/fonts/jetbrains-mono/JetBrainsMono-Medium.woff2') format('woff2');
            font-style: normal;
            font-weight: 500;
            font-display: block;
        }

@font-face {
            font-family: 'JetBrains Mono';
            src: url('../assets/fonts/jetbrains-mono/JetBrainsMono-SemiBold.woff2') format('woff2');
            font-style: normal;
            font-weight: 600;
            font-display: block;
        }

:root {
    --policy-anchor-clearance: 6.5rem;
    --bg: #F9F8F6;
    --text-main: #1C1B1A;
    --text-muted: #595856;
    --text-dim: #9A9895;
    --accent: #2563EB;
    --gold: #A36E32;
    --card-bg: #FFFFFF;
    --card-shadow: 0 16px 40px rgba(0, 0, 0, 0.04);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-synthesis: none; }
body {
    min-width: 0;
    overflow-anchor: none;
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    font-synthesis: none;
}
.skip-link {
    position: fixed; z-index: 200; top: 0.5rem; left: 0.5rem;
    padding: 0.7rem 1rem; background: #fffaf1; color: var(--text-main);
    border: 1px solid var(--gold); border-radius: 8px;
    transform: translateY(-180%);
}
.skip-link:focus { transform: none; }

        .top-bar {
            position: fixed; top: 0; left: 0; right: 0; z-index: 100;
            padding: 0.9rem 2.5rem;
            display: flex; justify-content: space-between; align-items: center;
            gap: 1rem;
            background: linear-gradient(to bottom, var(--bg) 70%, transparent);
            pointer-events: none;
        }
        .top-bar > * { pointer-events: auto; }
        .top-bar-brand {
            font-family: 'Outfit', sans-serif;
            font-size: 0.82rem; font-weight: 600;
            flex: 0 0 auto;
            color: #79552c;
            text-decoration: none; letter-spacing: 0.02em;
        }
        .story-parts {
            --story-nav-bg: rgba(255, 252, 247, 0.76);
            --story-nav-border: rgba(163, 110, 50, 0.32);
            --story-nav-divider: rgba(128, 92, 55, 0.18);
            --story-nav-part: rgba(96, 80, 64, 0.82);
            --story-nav-title: rgba(83, 65, 48, 0.74);
            --story-nav-active: #A36E32;
            --story-nav-active-bg: rgba(255, 250, 241, 0.92);
            display: flex;
            align-items: center;
            justify-content: flex-start;
            min-width: 0;
            max-width: min(76vw, 38rem);
            overflow-x: auto;
            scroll-padding-inline: 50%;
            padding: 0;
            border: 1px solid var(--story-nav-border);
            border-radius: 14px;
            background: var(--story-nav-bg);
            box-shadow: 0 14px 34px rgba(95, 65, 38, 0.07);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            scrollbar-width: none;
        }
        .story-parts::-webkit-scrollbar { display: none; }
        .story-parts__link {
            position: relative;
            flex: 0 0 auto;
            min-width: 9.25rem;
            min-height: 3.7rem;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            border: 1px solid transparent;
            border-radius: 13px;
            margin: -1px 0;
            padding: 0.72rem 1.35rem 0.68rem;
            font-family: 'JetBrains Mono', monospace;
            line-height: 1;
            color: var(--story-nav-title);
            text-decoration: none;
            text-transform: uppercase;
            letter-spacing: 0;
            text-align: center;
            opacity: 1;
            transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
        }
        .story-parts__link + .story-parts__link::before {
            content: "";
            position: absolute;
            left: 0;
            top: 50%;
            width: 1px;
            height: 1.8rem;
            background: var(--story-nav-divider);
            transform: translateY(-50%);
        }
        .story-parts__link[aria-current="page"]::before,
        .story-parts__link[aria-current="page"] + .story-parts__link::before {
            opacity: 0;
        }
        .story-parts__part,
        .story-parts__title {
            display: block;
            white-space: nowrap;
        }
        .story-parts__part {
            font-size: 0.62rem;
            font-weight: 500;
            color: var(--story-nav-part);
        }
        .story-parts__title {
            margin-top: 0.34rem;
            font-size: 0.72rem;
            font-weight: 600;
            color: var(--story-nav-title);
        }
        .story-parts__link:hover,
        .story-parts__link:focus-visible {
            background: rgba(255, 248, 238, 0.7);
            outline: none;
        }
        .story-parts__link:focus-visible {
            box-shadow: inset 0 0 0 1px var(--story-nav-active);
        }
        .story-parts__link[aria-current="page"] {
            z-index: 1;
            border-color: color-mix(in srgb, var(--story-nav-active) 72%, transparent);
            background: var(--story-nav-active-bg);
            box-shadow: 0 10px 26px rgba(112, 74, 38, 0.11);
        }
        .story-parts__link[aria-current="page"] .story-parts__part,
        .story-parts__link[aria-current="page"] .story-parts__title {
            color: var(--story-nav-active);
        }

        .hero {
            min-height: 100vh; display: flex; flex-direction: column;
            justify-content: center; align-items: center; text-align: center;
            padding: 2rem; padding-top: 4rem;
            position: relative;
            overflow: hidden;
            isolation: isolate;
            background:
                linear-gradient(180deg, #FFFCF7 0%, #FAF8F2 54%, var(--bg) 100%);
        }

        .hero h1 {
            font-family: 'Cormorant Garamond', Georgia, serif;
            font-size: clamp(3.2rem, 8vw, 6rem); font-weight: 300;
            letter-spacing: 0; line-height: 1.1; color: var(--text-main);
            margin-bottom: 1.05rem; position: relative; z-index: 1;
            opacity: 0; animation: fadeUp 0.9s 0.2s cubic-bezier(0.16,1,0.3,1) forwards;
        }
        .hero-divider {
            width: min(23rem, 58vw);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.75rem;
            margin: 0 0 1.55rem;
            position: relative;
            z-index: 1;
            opacity: 0;
            animation: fadeUp 0.9s 0.38s cubic-bezier(0.16,1,0.3,1) forwards;
        }
        .hero-divider::before,
        .hero-divider::after {
            content: "";
            height: 1px;
            flex: 1;
            background: linear-gradient(90deg, rgba(176, 132, 70, 0), rgba(176, 132, 70, 0.72));
        }
        .hero-divider::after {
            background: linear-gradient(90deg, rgba(176, 132, 70, 0.72), rgba(176, 132, 70, 0));
        }
        .hero-divider span {
            width: 0.72rem;
            height: 0.72rem;
            border: 1px solid rgba(176, 132, 70, 0.88);
            transform: rotate(45deg);
            position: relative;
            flex: 0 0 auto;
        }
        .hero-divider span::after {
            content: "";
            position: absolute;
            inset: 0.18rem;
            background: rgba(176, 132, 70, 0.42);
        }
        .hero-sub {
            font-family: 'Outfit', sans-serif;
            font-size: 1.22rem; font-weight: 300;
            color: #45423E; max-width: 690px; line-height: 1.82;
            text-wrap: balance;
            position: relative; z-index: 1;
            opacity: 0; animation: fadeUp 0.9s 0.56s cubic-bezier(0.16,1,0.3,1) forwards;
        }
        .scroll-cue {
            position: absolute; bottom: 2.5rem; z-index: 1;
            width: 44px; height: 44px; border-radius: 50%;
            background: var(--card-bg); box-shadow: var(--card-shadow);
            display: flex; align-items: center; justify-content: center;
            color: var(--accent); font-size: 1.1rem;
            opacity: 0; animation: fadeUp 0.8s 0.9s cubic-bezier(0.16,1,0.3,1) forwards;
        }
        .scroll-cue.bouncing { opacity: 1; animation: bounce 2.5s 2; }



.hero {
    --hero-bottom-padding: 2rem;
    --hero-cue-inset: 2.5rem;
    --hero-cue-space: max(0px, calc(var(--hero-cue-inset) + 44px + 1rem - var(--hero-bottom-padding)));
    min-height: 100svh;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(var(--hero-cue-space), 1fr) auto minmax(var(--hero-cue-space), 1fr);
    justify-items: center;
    padding-bottom: var(--hero-bottom-padding);
}
.hero-copy {
    grid-row: 2;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.scroll-cue { left: calc(50% - 22px); bottom: var(--hero-cue-inset); }
#policy-title, .policy-content h2[id], .policy-content h3[id] { scroll-margin-top: var(--policy-anchor-clearance); }
.policy-content h2, .policy-content h3 { overflow-wrap: anywhere; }
.scroll-cue { text-decoration: none; }
.scroll-cue:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.policy-content {
    width: min(48rem, calc(100% - 3rem));
    margin: 0 auto;
    padding: clamp(3rem, 6vw, 4.5rem) 0 2rem;
    scroll-margin-top: var(--policy-anchor-clearance);
}
.policy-content:focus { outline: none; }
.policy-intro { padding-bottom: 0.5rem; }
.policy-content h2 {
    margin: 0 0 1.35rem;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(2.6rem, 4.6vw, 3.6rem);
    font-weight: 400;
    line-height: 1.08;
}
.policy-content section { margin-top: 2rem; }
.policy-content h3 {
    margin: 0 0 0.8rem;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(1.85rem, 3vw, 2.2rem);
    font-weight: 400;
    line-height: 1.2;
    color: #684722;
}
.policy-content p {
    margin: 0 0 1rem;
    font-size: 1.0625rem;
    font-weight: 300;
    line-height: 1.78;
    color: var(--text-muted);
}
.policy-content .policy-date {
    margin-bottom: 1.2rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    font-weight: 500;
    line-height: 1.7;
    color: #79552c;
}
.policy-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    max-width: 100%;
    padding: 0.3rem 0;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.7;
    color: #79552c;
    overflow-wrap: anywhere;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}
.policy-link:hover { color: #4f351c; }
.policy-link:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 3px; }


.site-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 1.25rem 1.25rem 2.5rem;
}
.site-footer a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0.4rem 0.6rem;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.5;
    color: #79552c;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}
.site-footer a:hover { color: #4f351c; }
.site-footer a:focus-visible {
    outline: 2px solid #a36e32;
    outline-offset: 3px;
    border-radius: 3px;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes bounce { 0%,20%,50%,80%,100% { transform: translateY(0); } 40% { transform: translateY(-8px); } 60% { transform: translateY(-4px); } }

@media (max-width: 960px) {
    :root {
        --mobile-header-height: calc(6rem + env(safe-area-inset-top, 0px));
        --policy-anchor-clearance: calc(var(--mobile-header-height) + 1rem);
    }
    .top-bar {
        position: fixed;
        height: var(--mobile-header-height);
        background: linear-gradient(to bottom, var(--bg) 70%, transparent);
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: 1.125rem 3.25rem;
        justify-items: center;
        align-items: center;
        gap: 0.375rem;
        padding: calc(0.625rem + env(safe-area-inset-top, 0px))
            max(1rem, env(safe-area-inset-right, 0px)) 0.625rem
            max(1rem, env(safe-area-inset-left, 0px));
    }
    .top-bar-brand {
        font-size: 0.74rem;
        line-height: 1.125rem;
    }
    .story-parts {
        width: 100%;
        max-width: min(100%, 34rem);
        height: 3.25rem;
        margin: 0 auto;
        justify-content: flex-start;
        align-items: stretch;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-x: contain;
        border-radius: 12px;
        -webkit-overflow-scrolling: touch;
    }
    .story-parts__link {
        min-width: 8.9rem;
        min-height: 44px;
        margin: 0;
        padding: 0.58rem 0.9rem 0.55rem;
        border-radius: 11px;
    }
    .story-parts__link + .story-parts__link::before { height: 1.55rem; }
    .story-parts__part { font-size: 0.54rem; }
    .story-parts__title { margin-top: 0.24rem; font-size: 0.62rem; }
}


@media (max-width: 960px) {
    .hero { --hero-bottom-padding: 5.5rem; padding-top: calc(7rem + env(safe-area-inset-top, 0px)); }
    .hero-sub { font-size: 1.08rem; }
    .policy-content {
        width: min(40rem, calc(100% - 2.5rem));
        scroll-margin-top: var(--policy-anchor-clearance);
    }
    .policy-content p { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
    .hero h1, .hero-divider, .hero-sub, .scroll-cue, .scroll-cue.bouncing {
        animation: none; opacity: 1; transform: none;
    }
}


/* October 24: policy reading-paragraph alignment only. */
.policy-intro > p:not(.policy-date),
.policy-content > section > p {
    text-align: left;
}

@media (min-width: 961px) {
    .policy-intro > p:not(.policy-date),
    .policy-content > section > p {
        text-align: justify;
        text-align-last: start;
        text-justify: inter-word;
        hyphens: none;
    }
}
