/* ====================================================================================================
   ACCESSIBILITY FOUNDATION & CORE VARIABLES (WCAG 2.0 AA COMPLIANT / WCAG 3.0 APCA TARGETED)
   ==================================================================================================== */
:root {
    --bg: #ffffff;
    --ink: #0f1b33;            /* Deep navy ink - APCA optimal readability profile */
    --muted: #4a5874;          /* Accessible secondary description standard output */
    --line: #e3e9f3;           /* Soft UI borders */
    /* The brand navy, for text, icons, and borders. dark-mode.css turns it into a pale navy that
       reads on dark backgrounds, so filled buttons use the --button-* colors instead. */
    --brand: #1b315c;          /* navy-800 */
    --brand-hover: #233e72;    /* navy-700 */
    --brand-soft: #eef3fa;     /* navy-50: safe tone containers */
    --accent: #f8c14a;         /* gold-400: small highlights on navy backgrounds only, never on white */
    --focus: #2d4d8a;          /* navy-600 focus ring */
    --button-bg: #1b315c;
    --button-bg-hover: #233e72;
    --button-text: #ffffff;
    --white: #ffffff;
    --eg-surface: #ffffff;     /* Cards and panels */
    --eg-raised: #f5f8fc;      /* Panels that sit on a card */
    --shadow-sm: 0 4px 12px rgba(16, 24, 40, 0.02);
    --shadow-md: 0 12px 32px rgba(16, 24, 40, 0.04);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* Anti-FOUC cloak: the page stays hidden until its HTML has been read, then fades in. The inline
   script in the head of base.html adds .styles-loaded; without JavaScript a <noscript> style
   there lifts the cloak. The animation is a last resort that needs no script at all: whatever
   goes wrong, the page shows after two seconds. */
html {
    visibility: hidden;
    opacity: 0;
    animation: eg-reveal 0s 2s forwards;
}

html.styles-loaded {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.15s ease-out;
}

@keyframes eg-reveal {
    to {
        visibility: visible;
        opacity: 1;
    }
}

/* Accessible focus ring indicators for keyboard navigation controls */
*:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

/* The navy ring would sink into these navy areas, so it turns gold there (dark mode's --focus
   is gold already). */
.eg-footer :focus-visible,
.cta-banner-card :focus-visible {
    outline-color: var(--accent);
}

/* Hidden accessible link mechanism for assistive software skipping navigation anchors */
.skip-link {
    position: absolute;
    top: -100px;
    inset-inline-start: 20px;
    background: var(--button-bg);
    color: var(--button-text);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    z-index: 1000;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 20px;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

/* ====================================================================================================
   HEADER & NAVIGATION
   ==================================================================================================== */
/* The header scrolls away with the page, so in-page links (a contents rail, #section anchors)
   never land under it. */
.site-header {
    position: relative;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 0.75rem;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
}

@media (min-width: 640px) {
    .site-header {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (min-width: 1280px) {
    .site-header {
        padding-left: 4rem;
        padding-right: 4rem;
    }
}

/* Up to 1439px the menu is tight beside the brand; take the room from the side padding. */
@media (min-width: 1280px) and (max-width: 1439px) {
    .site-header {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

.brand {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
    /* The goat's height and the title's size; the title is centered on his body. */
    --mark-h: 4.5rem;
    /* 72px mobile */
    --title-size: 1.96875rem;
}

.brand-mark {
    color: var(--brand);
    display: grid;
    place-items: center;
    height: var(--mark-h);
    /* Push the goat right until the middle of his body (58% across the
       picture, which is 0.75 times as wide as it is tall) sits under the
       middle of the title (about 4 title-heights wide). */
    margin-left: max(0px, calc(var(--title-size) * 2.03 - var(--mark-h) * 0.433));
}

.brand-title {
    color: var(--brand);
    font-family: "League Spartan", "Inter", system-ui, sans-serif;
    font-size: var(--title-size);
    font-weight: 700;
    letter-spacing: -0.02em;
    white-space: nowrap;
    /* Trim the line box to cap height and baseline, so centering it
       lines the lettering up with the goat in any font or size. */
    text-box: trim-both cap alphabetic;
    /* Laid over the goat, centered on his body (53% of the way down). */
    position: absolute;
    z-index: 1;
    left: 0;
    top: calc(var(--mark-h) * 0.532);
    transform: translateY(-50%);
    text-shadow: 0 0 4px var(--bg), 0 0 10px var(--bg), 0 0 16px var(--bg);
}

@media (min-width: 640px) {
    .brand {
        --mark-h: 6.25rem;
        /* 100px */
        --title-size: 2.34375rem;
    }
}

@media (min-width: 1280px) {
    .brand {
        gap: 0.75rem;
        /* 12px */
        --mark-h: 7.5rem;
        /* 120px */
        --title-size: 2.8125rem;
    }
}

.header-navigation-wrapper {
    display: flex;
    align-items: center;
    gap: 40px;
}

/* Below 1280px the menu lives behind the hamburger button (site.js toggles .is-open). */
@media (max-width: 1279px) {
    #nav-menu-wrapper:not(.is-open) {
        display: none !important;
    }

    #nav-menu-wrapper.is-open {
        display: flex !important;
    }
}

@media (min-width: 1280px) {
    #nav-menu-wrapper {
        display: flex !important;
    }
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--ink);
}

/* The section you are in (a top-level link such as Blog): aria-current="page" on the section's
   own page, "true" on the pages inside it. A group's button (Learn) is marked the same way while
   one of its pages is (is-current, from base.html); the page's own link inside the panel carries
   the aria-current. The header prefix outranks the text-gray-700 utility and its dark-mode
   override. */
.site-header .nav-links > a[aria-current],
.site-header .nav-group.is-current > button {
    color: var(--brand);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 6px;
}

/* A menu group with nothing in it yet: only its label, set like the links beside it but inert
   (no button, no panel, not focusable). */
.nav-label {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    color: var(--color-gray-700, #364153);
    font-size: 1rem;
    line-height: 1.5rem;
    font-weight: 500;
    white-space: nowrap;
    cursor: default;
}

@media (min-width: 1280px) {
    .nav-label {
        padding: 1rem 0;
    }
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-action.primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    /* Forces consistent text size */
    line-height: 1.25rem;
    white-space: nowrap;
}

/* Button & Action Pill Component Classes */
.header-action,
.button {
    display: inline-flex;
    min-height: 40px;
    padding: 0 18px;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.header-action.secondary {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--line);
}

.header-action.secondary:hover {
    color: var(--ink);
    border-color: var(--ink);
}

.header-action.primary,
.button-primary {
    background: var(--button-bg);
    color: var(--button-text);
}

.header-action.primary:hover,
.button-primary:hover {
    background: var(--button-bg-hover);
}

/* ====================================================================================================
   DROPDOWN MENUS (GLASS PANELS WITH A POINTER)
   ==================================================================================================== */

/* A group's panel. site.js flips its button's aria-expanded on click and the panel follows:
   below 1280px it opens in place, as an accordion in the mobile menu; from 1280px it floats
   under the button, and hovering the group opens it too. */
.dropdown-container {
    display: none;
    width: 100%;
    padding-top: 0.75rem;
    z-index: 50;
    /* Compact Drop Shadow & Translucent Glass Effect */
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.15)) drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.nav-group > button[aria-expanded="true"] + .dropdown-container {
    display: block;
}

.nav-group > button svg {
    transition: transform 0.2s ease;
}

.nav-group > button[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

@media (min-width: 1280px) {
    .dropdown-container {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        width: 20rem;
        visibility: hidden;
        opacity: 0;
        transform: scale(0.95);
        transform-origin: top;
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    }

    /* The last group sits near the right edge, so its panel opens leftwards. */
    .dropdown-container.align-right {
        left: auto;
        right: 0;
        transform-origin: top right;
    }

    .nav-group:hover > .dropdown-container,
    .nav-group > button[aria-expanded="true"] + .dropdown-container {
        visibility: visible;
        opacity: 1;
        transform: scale(1);
    }

    .nav-group:hover > button svg {
        transform: rotate(180deg);
    }
}

.dropdown-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(229, 231, 235, 0.8);
}

/* Larger Triangle Pointer (32px by 16px) */
.dropdown-box::before {
    content: '';
    position: absolute;
    top: -14px;
    left: 32px;
    width: 32px;
    height: 16px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    z-index: 60;
}

/* Centered Triangle */
.dropdown-box.center-pointer::before {
    left: 50%;
    transform: translateX(-50%);
}

/* Right-aligned Triangle, for the last group's floating panel (in the mobile accordion every
   panel sits under its button's left edge, so the pointer stays left) */
@media (min-width: 1280px) {
    .dropdown-box.right-pointer::before {
        left: auto;
        right: 32px;
    }
}

/* The page you are on, inside a panel. */
.dropdown-box a[aria-current] {
    background: var(--brand-soft);
}

@media (prefers-reduced-motion: reduce) {
    /* In-page links (contents rails, #section anchors) jump instead of gliding. */
    html {
        scroll-behavior: auto;
    }

    .dropdown-container,
    .nav-group > button svg {
        transition: none;
    }
}

/* Without JavaScript the hamburger cannot open the menu, so below 1280px the menu is shown
   under the brand instead, and a group opens while focus is inside it. */
@media (max-width: 1279px) {
    html.no-js .site-header {
        flex-wrap: wrap;
    }

    html.no-js #mobile-menu-button {
        display: none;
    }

    html.no-js #nav-menu-wrapper {
        display: flex !important;
        position: static;
        padding: 16px 0 0;
        border: 0;
        box-shadow: none;
    }
}

html.no-js .nav-group:focus-within > .dropdown-container {
    display: block;
    visibility: visible;
    opacity: 1;
    transform: none;
}

/* ====================================================================================================
   STRUCTURAL WORKSPACES & MAIN HERO SPLIT SYSTEM
   ==================================================================================================== */
.section {
    padding-right: clamp(20px, 5vw, 80px);
    padding-left: clamp(20px, 5vw, 80px);
    max-width: 1440px;
    margin: 0 auto;
}

.hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: clamp(40px, 5vw, 80px);
    align-items: center;
    min-height: calc(85vh - 74px);
    padding-top: 60px;
    padding-bottom: 60px;
}

.hero-label {
    display: block;
    font-weight: 600;
    color: var(--muted);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

h1, h2, h3, p {
    margin-top: 0;
}

h1 {
    font-size: clamp(2.8rem, 4.5vw, 4.2rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}

.hero-copy p {
    color: var(--muted);
    font-size: clamp(1.1rem, 1.3vw, 1.25rem);
    line-height: 1.6;
    margin-bottom: 36px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.button-secondary-outlined {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.button-secondary-outlined:hover {
    background: #f9fafb;
    border-color: var(--ink);
}

/* Container pod handling the visual illustration assets */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.visual-concept-pod {
    width: 100%;
    background: linear-gradient(135deg, #eef3fa 0%, #d8e3f3 100%);
    padding: 40px;
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
}

/* ====================================================================================================
   FEATURE GRID & METRIC ROW COMPONENT BLOCKS
   ==================================================================================================== */
.program-features {
    padding-top: 40px;
    padding-bottom: 60px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
    border-top: 1px solid var(--line);
    padding-top: 60px;
}

.feature-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-icon {
    color: var(--brand);
    width: 40px;
    height: 40px;
}

.feature-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.feature-card p {
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.5;
}

/* Flexible Dashboard Metrics Bar */
.metrics-banner {
    padding-top: 40px;
    padding-bottom: 40px;
}

.metrics-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 32px;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 32px 64px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.metric-item {
    display: flex;
    flex-direction: column;
}

.metric-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--brand);
    line-height: 1;
}

.metric-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 8px;
}

/* ====================================================================================================
   MISSION CORE & MAIN PROGRAM GRID ENVIRONMENT
   ==================================================================================================== */
h2 {
    font-size: clamp(2rem, 3vw, 2.6rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.badge {
    display: inline-block;
    background: var(--brand-soft);
    color: var(--brand);
    padding: 6px 14px;
    border-radius: 14px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.mission {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    padding-top: 80px;
    padding-bottom: 80px;
    border-top: 1px solid var(--line);
}

.mission-content p {
    font-size: 1.15rem;
    color: var(--muted);
    line-height: 1.7;
}

/* Centered Programs Hub Styling Header Layout rules */
.programs-hub {
    padding-top: 80px;
    padding-bottom: 80px;
}

.section-heading-centered {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 56px;
}

.section-heading-centered p {
    font-size: 1.15rem;
    color: var(--muted);
    margin-top: 12px;
}

/* Responsive 2x2 Platform Track Block Matrix */
.programs-modern-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
}

.program-modern-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.program-modern-card:hover {
    transform: translateY(-4px);
    border-color: var(--brand);
    box-shadow: var(--shadow-md);
}

.card-glow-icon {
    width: 44px;
    height: 44px;
    background: var(--brand-soft);
    color: var(--brand);
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.program-modern-card h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.program-modern-card p {
    color: var(--muted);
    font-size: 1rem;
    margin-bottom: 0;
}

/* ====================================================================================================
   IMPACT MATRIX & FULL COMPONENT CTA WRAPPERS
   ==================================================================================================== */
.impact {
    padding-top: 60px;
    padding-bottom: 80px;
}

.impact-panel-modern {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 32px;
    padding: 64px;
    align-items: center;
}

.impact-copy p {
    font-size: 1.1rem;
    color: var(--muted);
    margin-top: 16px;
}

.impact-interactive-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.list-item-ui {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: var(--white);
    padding: 20px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

.checkbox-icon {
    color: var(--brand);
    font-weight: 800;
    font-size: 1.1rem;
    line-height: 1;
}

.list-item-ui p {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
}

/* Bottom Structural Immersive CTA Callout */
.volunteer {
    padding-top: 40px;
    padding-bottom: 80px;
}

.cta-banner-card {
    background: linear-gradient(135deg, #1b315c 0%, #233e72 100%);
    color: var(--white);
    border-radius: 32px;
    padding: 64px;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.cta-banner-card h2 {
    margin-bottom: 16px;
}

.cta-banner-card p {
    max-width: 600px;
    margin: 0 auto 36px;
    color: #d8e3f3;
    font-size: 1.1rem;
}

.button-white {
    background: var(--white);
    color: var(--brand);
    font-weight: 700;
    min-height: 48px;
    padding: 0 28px;
    border-radius: 24px;
}

.button-white:hover {
    background: #f8fafc;
}

/* ====================================================================================================
   RESPONSIVE DESIGN ADAPTATION MATRIX (MEDIA BREAKPOINTS)
   ==================================================================================================== */
@media (max-width: 1024px) {
    .hero, .mission, .programs-modern-grid, .impact-panel-modern {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-visual {
        order: -1;
    }

    .metrics-container {
        padding: 32px;
    }
}

@media (max-width: 768px) {
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .metrics-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .impact-panel-modern, .cta-banner-card {
        padding: 40px 24px;
    }
}

/* Blog page layout */
.blog-layout {
    grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
    .blog-layout {
        grid-template-columns: 260px minmax(0, 1fr);
        gap: 2.5rem;
    }
}

.blog-page-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
}

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

/* Desktop */
@media (min-width: 1280px) {
    .blog-page-layout {
        grid-template-columns: 220px minmax(0, 1050px) 220px;
        justify-content: center;
        gap: 2rem;
    }

    /* The header scrolls away, so the filters only keep a little room above them. */
    .blog-filter-sidebar {
        position: sticky;
        top: 1.5rem;
    }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1279px) {
    .blog-post-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Mobile */
@media (max-width: 1279px) {
    .blog-filter-sidebar {
        position: static;
    }
}

@media (max-width: 767px) {
    .blog-post-grid {
        grid-template-columns: 1fr;
    }
}

.blog-shell {
    width: 100%;
    max-width: 1600px;
}

/* Author name in a blog post's byline, linking to their other posts. */
.author-link {
    color: var(--brand);
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
    text-underline-offset: 3px;
}

.author-link:hover {
    text-decoration-color: currentColor;
}

/* ====================================================================================================
   LONG-FORM TEXT PAGES (ACCESSIBILITY STATEMENT, POLICIES)
   ==================================================================================================== */

/* There is no Tailwind typography plugin, so long-form pages get their vertical rhythm here.
   Colors use the theme variables so dark mode follows. */
.longform {
    font-size: 1.0625rem;
    line-height: 1.75;
}

.longform > * + * {
    margin-top: 1.25rem;
}

.longform h2 {
    color: var(--ink);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

/* Breathing room above a new section, less below its heading. */
.longform > * + h2 {
    margin-top: 2.75rem;
}

.longform > h2 + * {
    margin-top: 0.75rem;
}

.longform h3 {
    color: var(--ink);
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
}

.longform > * + h3 {
    margin-top: 1.75rem;
}

.longform > h3 + * {
    margin-top: 0.5rem;
}

.longform ul {
    list-style: disc;
    padding-left: 1.5rem;
}

.longform li + li {
    margin-top: 0.5rem;
}

.longform strong {
    color: var(--ink);
    font-weight: 600;
}

/* Text links only: a button inside long-form text keeps its own colors. */
.longform a:where(:not(.button, .button-pill)) {
    color: var(--brand);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.longform a:where(:not(.button, .button-pill)):hover {
    color: var(--brand-hover);
}

/* ====================================================================================================
   RIGHT-TO-LEFT ADJUSTMENTS
   ==================================================================================================== */

/* Decorative arrows in links ("View all posts →"). They are literal glyphs,
   so mirror them alongside the text direction if the site is ever translated
   into a right-to-left language. The hero slider chevrons likewise. */
.dir-arrow {
    display: inline-block;
}

[dir="rtl"] .dir-arrow {
    transform: scaleX(-1);
}

[dir="rtl"] #prev-slide svg,
[dir="rtl"] #next-slide svg {
    transform: scaleX(-1);
}

/* ====================================================================================================
   LONG-FORM PAGE FURNITURE (HERO, CONTENTS RAIL, KEY POINTS, PANELS)
   ==================================================================================================== */

/* Built here rather than as Tailwind utilities, so the shared page furniture looks the same
   whichever template uses it. */

.page-hero {
    background: #142548;
    color: #ffffff;
    padding: 72px 0;
}

.page-hero-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

.page-hero .eyebrow {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
}

.page-hero h1 {
    margin: 14px 0 0;
    font-size: clamp(2.25rem, 5vw, 3.4rem);
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: #ffffff;
}

.page-hero .hero-lede {
    margin: 18px 0 0;
    max-width: 40em;
    font-size: 1.125rem;
    line-height: 1.65;
    color: #d8e3f3;
}

.page-hero .hero-meta {
    margin: 18px 0 0;
    font-size: 0.875rem;
    color: #b3c7e6;
}

/* Two-column shell with a contents rail. */
.with-toc {
    display: grid;
    grid-template-columns: 232px minmax(0, 1fr);
    gap: 48px;
    align-items: start;
}

/* The rail stays in view as the page scrolls. The header scrolls away, so it keeps only a
   little room above it; on a short screen the rail scrolls itself, with a thin navy scrollbar. */
.toc {
    position: sticky;
    top: 24px;
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--brand) 30%, transparent) transparent;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.toc:hover,
.toc:focus-within {
    scrollbar-color: color-mix(in srgb, var(--brand) 50%, transparent) transparent;
}

.toc-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 0 0 12px;
    padding-inline-start: 14px;
}

.toc a {
    font-size: 0.875rem;
    color: var(--muted);
    text-decoration: none;
    padding: 9px 14px;
    border-inline-start: 2px solid var(--line);
}

.toc a:hover,
.toc a:focus-visible {
    color: var(--brand);
    background: var(--brand-soft);
}

/* Inside the link: a scrolling rail clips anything drawn outside it. */
.toc a:focus-visible {
    outline-offset: -3px;
}

/* The "short version" band. */
.keypoints {
    background: #142548;
    border-radius: 20px;
    padding: 36px 40px;
    color: #ffffff;
}

.keypoints h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
}

.keypoints .keypoints-lede {
    margin: 6px 0 24px;
    max-width: 45em;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #d8e3f3;
}

.keypoint-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.keypoint-grid li {
    background: rgb(255 255 255 / .07);
    border: 1px solid rgb(255 255 255 / .14);
    border-radius: 14px;
    padding: 22px;
}

.keypoint-grid strong {
    display: block;
    margin: 12px 0 8px;
    font-size: 1rem;
    color: #ffffff;
}

.keypoint-grid span {
    font-size: 0.82rem;
    line-height: 1.55;
    color: #b3c7e6;
}

/* A bordered panel used for contact and accommodation blocks. */
.panel {
    background: var(--brand-soft);
    border: 1px solid #b3c7e6;
    border-radius: 16px;
    padding: 28px 32px;
}

.panel h2 {
    margin: 0 0 6px;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--ink);
}

.panel p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--muted);
}

.panel .button-pill {
    display: inline-block;
    margin-top: 16px;
    background: var(--button-bg);
    color: var(--button-text);
    font-size: 0.9375rem;
    font-weight: 600;
    padding: 12px 26px;
    border-radius: 999px;
    text-decoration: none;
}

.panel .button-pill:hover {
    background: var(--button-bg-hover);
    color: var(--button-text);
}

/* Checklist used for the accessibility feature list. */
.checklist {
    list-style: none;
    margin: 0;
    padding: 0 26px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 16px;
}

.checklist li {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 17px 0;
    border-bottom: 1px solid var(--line);
    font-size: 1rem;
    color: var(--ink);
}

.checklist li:last-child {
    border-bottom: 0;
}

.checklist svg {
    flex-shrink: 0;
    color: var(--brand);
}

@media (max-width: 900px) {
    .with-toc {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }

    .toc {
        position: static;
        max-height: none;
        overflow: visible;
    }
}

/* ====================================================================================================
   NEWSLETTER POPUP (templates/includes/newsletter_modal.html, driven by static/js/site.js)
   ==================================================================================================== */
.newsletter-modal {
    display: none;
}

.newsletter-modal.is-open {
    display: flex;
}

/* Without JavaScript the Subscribe links (href="#newsletter") open it as the URL's target,
   and its close links (href="#") take the target away again. */
html.no-js .newsletter-modal:target {
    display: flex;
}

/* The honeypot: kept off screen for people, still in the form for bots to fill. */
.newsletter-hp {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.newsletter-backdrop {
    cursor: default;
}

/* The success heading takes focus so screen readers announce it; it is not a control. */
#newsletter-success-title:focus {
    outline: none;
}

/* ====================================================================================================
   PRIVACY POLICY COOKIE TABLES (templates/privacy-policy.html)
   ==================================================================================================== */

/* Every cookie and browser storage entry, one per row. On a phone the table keeps a readable
   width and scrolls sideways inside its box, so the page itself never does. The box can take
   keyboard focus, so it can be scrolled with the arrow keys too. */
.cookie-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.cookie-table {
    width: 100%;
    min-width: 44rem;
    border-collapse: collapse;
    font-size: 0.9375rem;
    line-height: 1.55;
}

/* Each table's title sits above its box, outside the part that scrolls, so a phone shows it
   whole. The box and the table take their names from it (aria-labelledby). */
.cookie-table-title {
    color: var(--muted);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.5;
}

.longform > .cookie-table-title + .cookie-table-wrap {
    margin-top: 0.5rem;
}

.cookie-table th,
.cookie-table td {
    text-align: start;
    vertical-align: top;
    padding: 12px 16px;
    border-top: 1px solid var(--line);
}

.cookie-table thead th {
    background: var(--brand-soft);
    color: var(--ink);
    font-size: 0.8125rem;
    font-weight: 700;
    white-space: nowrap;
    /* The box's own border is the line above the header row. */
    border-top: 0;
}

.cookie-table code {
    font-size: 0.875em;
    color: var(--ink);
}

/* A name stays on one line, so it reads as the single word it is. */
.cookie-table td:first-child code {
    white-space: nowrap;
}

/* The admin pages' entries, which only the site's editors get: a step smaller. */
.cookie-table--compact {
    font-size: 0.875rem;
}

/* On a phone the Name column would take most of the box. There the table is narrower, a name
   may break after a dot (the <wbr> after each one in the template), and the headings wrap, so
   the first view shows more than the names and the text columns keep their width. */
@media (max-width: 640px) {
    .cookie-table {
        min-width: 38rem;
    }

    .cookie-table th,
    .cookie-table td {
        padding: 10px 12px;
    }

    .cookie-table thead th,
    .cookie-table td:first-child code {
        white-space: normal;
    }
}
