/* Editorial navigation: warm brown, pale gold, fine rules, quiet motion. */
:root { --rail-width: 88px; --editorial-ease: cubic-bezier(.22, .68, 0, 1); }
body { padding-left: var(--rail-width); }
.button { border-radius: 2px; border-width: 1px; gap: 16px; font-weight: 500; box-shadow: none; }
.button--primary { background: var(--color-gold-light); box-shadow: none; }
.button:hover { transform: none; background-color: var(--color-gold); }
.button--outline:hover { color: var(--color-gold-light); background: #302115; }
.site-header, body:not(.template-homepage):not(.template-section-index) .site-header {
    position: fixed; inset: 0 auto 0 0; width: var(--rail-width); height: 100dvh;
    background: #160f0a; border-right: 1px solid #665038; z-index: 100;
}
.site-header__inner { width: 100%; height: 100%; min-height: 0; display: flex; flex-direction: column; gap: 0; padding: 20px 10px; }
.site-header__brand { flex-shrink: 0; }
.site-header__brand img { width: 66px; height: 66px; }
.menu-button { display: flex; flex-direction: column; gap: 12px; justify-content: center; align-items: center; width: 66px; min-height: 70px; margin-top: clamp(64px, 15vh, 165px); padding: 8px 0; color: #f5eee5; border: 0; background: none; font-size: 13px; cursor: pointer; }
.menu-button__icon { width: 26px; height: 20px; display: flex; flex-direction: column; justify-content: space-between; }
.menu-button__icon i { display: block; width: 100%; height: 1px; background: var(--color-gold-light); transition: transform 300ms ease, opacity 200ms ease; }
.site-header--menu-open .menu-button__icon i:first-child { transform: translateY(9.5px) rotate(45deg); }
.site-header--menu-open .menu-button__icon i:nth-child(2) { opacity: 0; }
.site-header--menu-open .menu-button__icon i:last-child { transform: translateY(-9.5px) rotate(-45deg); }
.primary-nav { position: fixed; z-index: 101; top: 0; bottom: 0; left: var(--rail-width); width: min(580px, calc(100vw - var(--rail-width))); padding: clamp(28px, 5vh, 60px) clamp(24px, 4vw, 60px); display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 0; background: #160f0a; border-right: 1px solid #665038; overflow-y: auto; overscroll-behavior: contain; counter-reset: menu; }
.primary-nav__heading { margin: 0 0 36px; font-size: 12px; letter-spacing: .15em; text-transform: uppercase; color: #c8bba9; }
.primary-nav__link { display: flex; align-items: baseline; gap: 22px; flex-shrink: 0; padding: 18px 0; border-bottom: 1px solid #493626; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(26px, 2.7vw, 40px); line-height: 1.2; white-space: normal; transition: color 200ms ease, padding-left 300ms ease; }
.primary-nav__link::before { counter-increment: menu; content: '0' counter(menu); font: 12px Inter, Arial, sans-serif; letter-spacing: .08em; color: #c4a97e; }
.primary-nav__link::after { display: none; }
.primary-nav__link:hover, .primary-nav__link:focus-visible { color: var(--color-gold-light); padding-left: 8px; }
[data-nav-ready] .primary-nav { visibility: hidden; transform: translateX(-20px); opacity: 0; transition: transform 450ms var(--editorial-ease), opacity 300ms ease, visibility 450ms; }
[data-nav-ready].site-header--menu-open .primary-nav { visibility: visible; transform: none; opacity: 1; }
.site-header:not([data-nav-ready]) .menu-button { display: none; }
.site-header:not([data-nav-ready]) .primary-nav { position: absolute; top: 100px; bottom: auto; left: 0; width: var(--rail-width); padding: 6px; border: 0; }
.site-header:not([data-nav-ready]) .primary-nav__heading, .site-header:not([data-nav-ready]) .primary-nav__link::before { display: none; }
.site-header:not([data-nav-ready]) .primary-nav__link { font: 12px/1.5 Inter, sans-serif; overflow-wrap: anywhere; padding: 12px 0; }
.menu-backdrop { position: fixed; inset: 0; z-index: 90; border: 0; background: rgb(0 0 0 / 55%); backdrop-filter: blur(5px); }
.menu-backdrop[hidden] { display: none; }
html.menu-is-open { overflow: hidden; }
.home-masthead { position: absolute; z-index: 6; top: 28px; left: calc(var(--rail-width) + var(--page-pad)); right: var(--page-pad); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.home-masthead__name { color: var(--color-gold-light); font: 22px Georgia, serif; letter-spacing: .28em; text-transform: uppercase; text-decoration: none; }
.home-masthead .button { min-height: 48px; font-size: 14px; padding: 12px 20px; }
.template-homepage { --page-pad: clamp(24px, 4.2vw, 64px); }
.template-homepage .hero { min-height: max(780px, 94svh); background: #160f0a; }
.template-homepage .hero__inner { min-height: max(780px, 94svh); padding-top: clamp(150px, 18vh, 195px); grid-template-columns: 1.05fr 1fr; align-items: center; }
.template-homepage .hero__copy { align-self: center; padding: 0 0 150px; }
.template-homepage .hero .eyebrow { color: #e3d8c8; font-size: 14px; font-weight: 400; letter-spacing: .14em; text-transform: none; margin-bottom: 22px; }
.template-homepage .hero h1 { font: 400 clamp(46px, 4.35vw, 72px)/1.04 Georgia, 'Times New Roman', serif; letter-spacing: -.035em; max-width: 750px; }
.template-homepage .hero__lead { max-width: 570px; font-size: 18px; line-height: 1.65; margin: 28px 0 32px; }
.template-homepage .hero-search { grid-template-columns: 42px minmax(0, 1fr) 166px; max-width: 660px; }
.template-homepage .hero-search__icon, .template-homepage .hero-search input, .template-homepage .hero-search__submit { height: 62px; }
.template-homepage .hero-search__icon { border-radius: 2px 0 0 2px; }
.template-homepage .hero-search__icon svg { width: 22px; height: 22px; }
.template-homepage .hero-search input { font-size: 14px; border-radius: 0 2px 2px 0; }
.template-homepage .hero-search__submit { margin-left: 8px; padding: 12px; font: 20px Georgia, serif; }
.template-homepage .hero__art { width: min(60vw, 920px); right: -70px; bottom: 0; }
.hero__scroll { position: absolute; left: var(--page-pad); bottom: 30px; z-index: 6; display: inline-flex; gap: 18px; align-items: center; color: #ece0cf; font-size: 12px; letter-spacing: .08em; text-decoration: none; min-height: 44px; }
.hero__scroll span { font-size: 24px; color: var(--color-gold-light); transition: transform 300ms ease; }
.hero__scroll:hover span { transform: translateY(5px); }
.template-homepage .hero__motion-toggle { border: 0; border-radius: 0; background: rgb(22 15 10 / 75%); font-size: 12px; bottom: 30px; }.template-homepage .section-heading h2, .template-homepage .literacy h2 { font-family: Georgia, 'Times New Roman', serif; font-weight: 400; letter-spacing: -.025em; }
.template-homepage .feature-card, .template-homepage .scheme-card, .template-homepage .resource-panel, .template-homepage .video-card, .template-homepage .literacy__visual { border-radius: 3px; box-shadow: none; }
.template-homepage .scheme-card { border-top: 1px solid #b49052; }
.template-homepage .text-link { font-weight: 500; text-decoration-thickness: 1px; }
[data-chapter] { scroll-margin-top: 24px; }
.chapter-nav { position: fixed; right: 12px; top: 50%; transform: translateY(-50%); z-index: 30; width: 36px; color: #ffe18a; --chapter-ink: #ffe18a; --chapter-track: #8e7854; }
.chapter-nav[hidden] { display: none; }
.chapter-nav[data-on-light] { --chapter-ink: #704400; --chapter-track: #b6a488; color: #704400; }
.chapter-nav__number, .chapter-nav__total { display: block; text-align: center; font-size: 11px; font-variant-numeric: tabular-nums; padding: 10px 0; }
.chapter-nav ol { position: relative; list-style: none; margin: 0; padding: 0; }
.chapter-nav a { position: relative; width: 36px; height: 42px; display: grid; place-items: center; text-decoration: none; }
.chapter-nav a::after { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--chapter-ink); outline: 3px solid transparent; outline-offset: 4px; transition: outline-color 250ms ease, transform 250ms ease; }
.chapter-nav a[aria-current]::after { outline: 1px solid var(--chapter-ink); transform: scale(1.3); }
.chapter-nav a span { position: absolute; right: 43px; top: 50%; transform: translate(6px, -50%); opacity: 0; visibility: hidden; padding: 6px 12px; border: 1px solid #75603e; color: #ffe9b6; background: #160f0a; white-space: nowrap; font-size: 12px; transition: opacity 200ms ease, transform 200ms ease, visibility 200ms; }
.chapter-nav a:hover span, .chapter-nav a:focus-visible span { opacity: 1; visibility: visible; transform: translate(0, -50%); }
.chapter-nav__track { position: absolute; top: 54px; bottom: 54px; left: 17.5px; width: 1px; background: var(--chapter-track); }
.chapter-nav__fill { display: block; width: 100%; height: 100%; background: var(--chapter-ink); transform: scaleY(var(--reading-progress, 0)); transform-origin: top; }
@media (min-width: 961px) {
    .template-homepage .emergency__grid { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 40px; }
    .template-homepage .literacy__grid { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 48px; }
}
@media (max-width: 1150px) and (min-width: 961px) {
    .template-homepage .hero h1 { font-size: 50px; }
    .template-homepage .hero__inner { grid-template-columns: 1.15fr 1fr; }
    .template-homepage .hero-search { grid-template-columns: 36px minmax(0, 1fr) 125px; }
    .template-homepage .hero-search__submit { font-size: 18px; }
    .template-homepage .emergency__grid { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
    :root { --rail-width: 0px; }
    body { padding-left: 0; }
    .site-header, body:not(.template-homepage):not(.template-section-index) .site-header { width: 100%; height: 78px; bottom: auto; border-right: 0; border-bottom: 1px solid #665038; }
    .site-header__inner { flex-direction: row; justify-content: space-between; padding: 10px 20px; }
    .site-header__brand img { width: 56px; height: 56px; }
    .menu-button { flex-direction: row; width: auto; min-height: 44px; margin: 0; padding: 8px; }
    .menu-button__icon { width: 23px; height: 16px; }
    .site-header--menu-open .menu-button__icon i:first-child { transform: translateY(7.5px) rotate(45deg); }
    .site-header--menu-open .menu-button__icon i:last-child { transform: translateY(-7.5px) rotate(-45deg); }
    .primary-nav { inset: 78px auto 0 0; width: min(580px, 100%); padding: 28px; justify-content: flex-start; }
    .primary-nav__heading { margin-bottom: 20px; }
    .primary-nav__link { font-size: clamp(26px, 5vw, 36px); padding: 17px 0; }
    .home-masthead { top: 100px; left: var(--page-pad); right: var(--page-pad); }
    .home-masthead__name { font-size: 18px; }
    .home-masthead .button { font-size: 12px; padding: 10px 12px; min-height: 44px; }
    .template-homepage .hero, .template-homepage .hero__inner { min-height: 0; }
    .template-homepage .hero__inner { display: block; padding-top: 190px; }
    .template-homepage .hero__copy { padding-bottom: 0; }
    .template-homepage .hero h1 { font-size: clamp(40px, 7vw, 64px); max-width: 710px; }
    .template-homepage .hero__lead { max-width: 660px; }
    .template-homepage .hero__art { position: relative; right: auto; width: 100%; height: auto; aspect-ratio: 3 / 2; margin: 32px auto 0; }
    .hero__scroll { display: none; }
    .template-homepage .hero__motion-toggle { bottom: 12px; }
    .chapter-nav { top: 78px; right: 0; left: 0; width: auto; height: 2px; transform: none; }
    .chapter-nav ol, .chapter-nav__number, .chapter-nav__total { display: none; }
    .chapter-nav__track { inset: 0; width: 100%; background: transparent; }
    .chapter-nav__fill { background: #f5bf36; transform: scaleX(var(--reading-progress, 0)); transform-origin: left; }
    [data-chapter] { scroll-margin-top: 100px; }
    .site-header:not([data-nav-ready]) { height: auto; position: relative; }
    .site-header:not([data-nav-ready]) .site-header__inner { display: block; }
    .site-header:not([data-nav-ready]) .primary-nav { position: static; width: 100%; display: flex; flex-flow: row wrap; gap: 12px; }
}
@media (max-width: 620px) {
    .home-masthead__name { display: none; }
    .home-masthead { justify-content: flex-end; }
    .template-homepage .hero .eyebrow { font-size: 12px; letter-spacing: .07em; }
    .template-homepage .hero__lead { font-size: 16px; margin: 24px 0; }
    .template-homepage .hero-search { grid-template-columns: 38px minmax(0, 1fr); gap: 0; }
    .template-homepage .hero-search input { font-size: 13px; }
    .template-homepage .hero-search__submit { grid-column: 1 / -1; width: 100%; margin: 10px 0 0; height: 54px; }
    .template-homepage .hero__art { width: 138%; margin-left: -19%; margin-right: -19%; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: 0s !important; }
}
html:has([data-motion-disabled]) { scroll-behavior: auto; }
[data-motion-disabled] .hero__scroll span { transition: none; }
/* A welcome comes first; practical tools begin in their own next chapter. */
.template-homepage .hero h1 { font-size: clamp(54px, 5vw, 80px); line-height: 1.06; }
.template-homepage .hero__copy { padding-bottom: 110px; }
.template-homepage .hero__lead { max-width: 470px; }
.hero__welcome { max-width: 480px; margin: 22px 0 34px; font-size: 17px; color: #e3d8c8; }
@media (max-width: 1150px) and (min-width: 961px) {
    .template-homepage .hero h1 { font-size: clamp(50px, 5vw, 58px); }
    .template-homepage .hero__lead { max-width: 400px; }
}
@media (max-width: 960px) {
    .template-homepage .hero__inner { padding-top: 160px; }
    .template-homepage .hero h1 { font-size: clamp(54px, 9vw, 80px); }
    .template-homepage .hero__copy { padding-bottom: 0; }
    .home-masthead__name { display: inline; }
    .home-masthead { justify-content: flex-start; }
    .template-homepage .hero__lead { max-width: 620px; }
    .hero__welcome { font-size: 16px; }
}
@media (max-width: 620px) {
    .template-homepage .hero__inner { padding-top: 158px; }
    .template-homepage .hero h1 { font-size: clamp(45px, 11.8vw, 64px); }
    .template-homepage .hero__lead { margin: 22px 0; }
    .hero__welcome { margin: 18px 0 24px; }
}
/* Opening visibility is immediate so keyboard focus can enter the drawer. */
[data-nav-ready].site-header--menu-open .primary-nav { transition: transform 450ms var(--editorial-ease), opacity 300ms ease; }
.primary-nav { border-radius: 0; box-shadow: none; }
.site-header:not([data-nav-ready]) .primary-nav { opacity: 1; visibility: visible; transform: none; }
@media (max-width: 1150px) and (min-width: 961px) {
    .template-homepage .hero__lead, .hero__welcome { max-width: 380px; }
}
@media (max-width: 620px) {
    .search-page h1 { font-size: clamp(32px, 8.5vw, 42px); overflow-wrap: anywhere; }
}
