@charset "UTF-8";
/*
 * famloop.us
 *
 * Tokens are copied from the app's design system — AppColors.swift and the
 * "Design Tokens" section of design_handoff_famloop/README.md — so the site and
 * the product look like the same thing. Don't introduce ad-hoc hex here; add a
 * token, as the app does.
 */

/* ============================================================ tokens */
:root {
    /* Evergreen is the ink and the dark surface both. */
    --evergreen: #16302B;
    --paper: #F4F2EC;
    --sheet: #FAF8F3;
    --card: #FFFFFF;
    --map-paper: #ECE9DE;

    --text: #16302B;
    --text-dim: #5B6660;
    --text-on-dark: #F4F2EC;
    --text-on-dark-dim: rgba(244, 242, 236, .72);

    /* Amber is reserved for interactive/CTA, never decoration. */
    --amber: #E8A13D;
    --amber-text: #C77E1F;
    --amber-deep: #8A5A10;
    --amber-icon: #B06E0E;
    --amber-tint: rgba(232, 161, 61, .14);

    --signal-green: #2F9E63;
    --signal-green-text: #1F7A47;
    --signal-amber: #DB8A1F;
    --signal-grey: #8A938E;
    /* SOS red is reserved strictly for SOS, matching the app. */
    --sos: #D5453C;

    --hairline: rgba(22, 48, 43, .08);
    --hairline-strong: rgba(22, 48, 43, .14);
    --card-shadow: 0 1px 5px rgba(22, 48, 43, .07);
    --card-shadow-lift: 0 6px 24px rgba(22, 48, 43, .10);
    --cta-shadow: 0 4px 14px rgba(232, 161, 61, .35);

    /* 20px gutters, 14–18px between cards, per the handoff's spacing scale. */
    --gutter: 20px;
    --radius-card: 16px;
    --radius-cta: 18px;
    --radius-sheet: 24px;
    --measure: 68ch;
    --wrap: 1140px;

    --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
}

/*
 * Dark mode follows the OS. The app's dark palette is reused verbatim; amber
 * is unchanged across modes by design, and signal green brightens.
 */
@media (prefers-color-scheme: dark) {
    :root {
        --paper: #141D19;
        --sheet: #1A2620;
        --card: #1A2620;
        --map-paper: #2A3833;

        --text: #E9EFEA;
        --text-dim: #9BA8A1;

        --amber-text: #F0C376;
        --amber-deep: #F0C376;
        --amber-icon: #E8A13D;

        --signal-green: #3FBF77;
        --signal-green-text: #5FC98F;
        --signal-amber: #F0C376;
        --signal-grey: #77837C;

        --hairline: rgba(233, 239, 234, .10);
        --hairline-strong: rgba(233, 239, 234, .16);
        --card-shadow: 0 1px 5px rgba(0, 0, 0, .35);
        --card-shadow-lift: 0 6px 24px rgba(0, 0, 0, .45);
    }
}

/* ============================================================ reset */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--text);
    font: 400 17px/1.65 var(--font);
    /* Opt out of synthetic bolding on the display weights. */
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; vertical-align: middle; }
a { color: var(--amber-text); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--amber-deep); }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.02em; line-height: 1.15; font-weight: 700; }
p { margin: 0; }
ul { margin: 0; padding: 0; }

:focus-visible {
    outline: 3px solid var(--amber);
    outline-offset: 3px;
    border-radius: 4px;
}

.visually-hidden {
    position: absolute; width: 1px; height: 1px;
    margin: -1px; padding: 0; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
    position: absolute; left: var(--gutter); top: -100px;
    z-index: 100; padding: 12px 18px;
    background: var(--amber); color: var(--evergreen);
    font-weight: 700; border-radius: 0 0 12px 12px;
    transition: top .15s ease;
}
.skip-link:focus { top: 0; }

/* ============================================================ layout */
.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: var(--gutter);
}
.wrap--narrow { max-width: 820px; }

section { padding-block: clamp(56px, 8vw, 104px); }
.section-head { max-width: var(--measure); margin-bottom: clamp(32px, 4vw, 52px); }
.section-head--center { margin-inline: auto; text-align: center; }

.eyebrow {
    display: inline-block;
    margin-bottom: 14px;
    font-size: 12.5px; font-weight: 700;
    letter-spacing: .09em; text-transform: uppercase;
    color: var(--amber-icon);
}
.eyebrow--on-dark { color: var(--amber); }

h1, .h1 { font-size: clamp(34px, 5.4vw, 58px); font-weight: 800; letter-spacing: -.035em; }
h2, .h2 { font-size: clamp(27px, 3.4vw, 40px); }
h3, .h3 { font-size: clamp(19px, 1.5vw, 22px); }

.lede {
    margin-top: 18px;
    font-size: clamp(17px, 1.5vw, 20px);
    line-height: 1.6;
    color: var(--text-dim);
    max-width: var(--measure);
}
.lede--on-dark { color: var(--text-on-dark-dim); }

.prose > * + * { margin-top: 18px; }
.prose { max-width: var(--measure); color: var(--text-dim); }
.prose strong { color: var(--text); font-weight: 650; }

/* ============================================================ buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 9px;
    padding: 15px 26px;
    border: 0; border-radius: var(--radius-cta);
    font: inherit; font-size: 16px; font-weight: 650;
    text-decoration: none; cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn--primary {
    background: var(--amber); color: var(--evergreen);
    box-shadow: var(--cta-shadow);
}
.btn--primary:hover { color: var(--evergreen); transform: translateY(-1px); box-shadow: 0 7px 20px rgba(232, 161, 61, .45); }
.btn--ghost {
    background: transparent; color: var(--text);
    box-shadow: inset 0 0 0 1.5px var(--hairline-strong);
}
.btn--ghost:hover { color: var(--text); background: var(--amber-tint); }
.btn--on-dark {
    background: rgba(244, 242, 236, .10); color: var(--text-on-dark);
    box-shadow: inset 0 0 0 1.5px rgba(244, 242, 236, .22);
}
.btn--on-dark:hover { color: var(--text-on-dark); background: rgba(244, 242, 236, .16); }
.btn[aria-disabled="true"] {
    cursor: default; background: var(--amber-tint);
    color: var(--amber-deep); box-shadow: none;
}
.btn[aria-disabled="true"]:hover { transform: none; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn-note { margin-top: 14px; font-size: 13.5px; color: var(--text-dim); }
.btn-note--on-dark { color: var(--text-on-dark-dim); }

/* ============================================================ header */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--hairline);
}
.site-header__bar {
    display: flex; align-items: center; gap: 20px;
    min-height: 68px;
}
.brand {
    display: inline-flex; align-items: center; gap: 10px;
    color: var(--text); text-decoration: none;
    font-size: 19px; font-weight: 750; letter-spacing: -.02em;
    margin-right: auto;
}
.brand:hover { color: var(--text); }
.brand__mark { width: 32px; height: 32px; border-radius: 8px; flex: none; }

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
    padding: 9px 13px; border-radius: 10px;
    color: var(--text-dim); text-decoration: none;
    font-size: 15px; font-weight: 550;
}
.site-nav a:hover { color: var(--text); background: var(--amber-tint); }
.site-nav a[aria-current="page"] { color: var(--text); font-weight: 650; }

.site-header .btn { padding: 11px 18px; font-size: 15px; }

/* The nav collapses to a details/summary disclosure under 860px — no JS. */
.nav-toggle { display: none; }

@media (max-width: 860px) {
    .site-header__bar { min-height: 60px; }
    .nav-toggle { display: block; margin-left: auto; }
    .nav-toggle > summary {
        list-style: none; cursor: pointer;
        display: inline-flex; align-items: center; justify-content: center;
        width: 42px; height: 42px; border-radius: 11px;
        box-shadow: inset 0 0 0 1.5px var(--hairline-strong);
        color: var(--text);
    }
    .nav-toggle > summary::-webkit-details-marker { display: none; }
    .nav-toggle[open] > summary { background: var(--amber-tint); }
    .nav-toggle__panel {
        position: absolute; left: var(--gutter); right: var(--gutter);
        margin-top: 10px; padding: 10px;
        background: var(--card); border: 1px solid var(--hairline);
        border-radius: var(--radius-card); box-shadow: var(--card-shadow-lift);
        display: grid; gap: 2px;
    }
    .nav-toggle__panel a {
        padding: 13px 14px; border-radius: 11px;
        color: var(--text); text-decoration: none; font-weight: 600;
    }
    .nav-toggle__panel a:hover { background: var(--amber-tint); }
    .nav-toggle__panel .btn { margin-top: 8px; width: 100%; }
    .site-header__bar > .site-nav,
    .site-header__bar > .btn { display: none; }
}

/* ============================================================ hero */
.hero {
    position: relative; overflow: hidden;
    background: var(--evergreen); color: var(--text-on-dark);
    padding-block: clamp(56px, 7vw, 92px) 0;
}
/* A soft amber bloom behind the device, so the dark panel is not flat. */
.hero::before {
    content: ""; position: absolute; pointer-events: none;
    width: 820px; height: 820px; right: -180px; top: -320px;
    background: radial-gradient(circle, rgba(232, 161, 61, .17), transparent 64%);
}
.hero__grid {
    position: relative;
    display: grid; gap: clamp(36px, 5vw, 60px);
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
}
.hero__copy { padding-bottom: clamp(40px, 6vw, 80px); }
.hero h1 { color: var(--text-on-dark); }
.hero .lede { color: var(--text-on-dark-dim); }
.hero__device { justify-self: center; }

@media (max-width: 980px) {
    .hero__grid { grid-template-columns: minmax(0, 1fr); }
    .hero__copy { padding-bottom: 0; }
    .hero__device { margin-top: 8px; }
}

/* Trust strip along the bottom of the hero. */
.hero__trust {
    position: relative;
    display: flex; flex-wrap: wrap; gap: 10px 26px;
    padding: 18px 0;
    border-top: 1px solid rgba(244, 242, 236, .12);
}
.hero__trust li {
    display: flex; align-items: center; gap: 8px;
    list-style: none;
    font-size: 14px; font-weight: 550;
    color: var(--text-on-dark-dim);
}
.hero__trust svg { flex: none; color: var(--amber); }

/* ============================================================ device frame */
/*
 * Holds one extracted 402x874 app mockup. The frame's own markup is absolutely
 * positioned and inline-styled, so it is scaled with a transform rather than
 * reflowed; the outer figure reserves the scaled box so layout is unaffected.
 */
.device {
    /* --dwn is the requested width as a unitless number, set inline by
       device_frame(). --dfit shrinks every frame together on small screens;
       everything else is derived, so the frame keeps its 402:874 ratio at any
       size and can never be wider than the phone it is being read on. */
    --dwn: 402;
    --dfit: 1;
    --dscale: calc(var(--dwn) * var(--dfit) / 402);

    position: relative; margin: 0; flex: none;
    width: calc(402px * var(--dscale));
    height: calc(874px * var(--dscale));
    border-radius: calc(54px * var(--dscale));
    /* Bezel + a hairline inner edge, echoing the handoff's device shell. */
    padding: calc(11px * var(--dscale));
    background: linear-gradient(170deg, #2A423C, #16302B 42%, #0E201C);
    box-shadow:
        0 calc(22px * var(--dscale)) calc(52px * var(--dscale)) rgba(10, 24, 20, .42),
        inset 0 0 0 1px rgba(244, 242, 236, .14);
}

/* A 320px-wide frame does not fit a 360px phone once gutters are taken out.
   Scaling the whole set keeps the proportions and the layout intact. */
@media (max-width: 560px) { .device { --dfit: .82; } }
@media (max-width: 420px) { .device { --dfit: .72; } }
.device__screen {
    position: relative; overflow: hidden;
    width: 100%; height: 100%;
    border-radius: calc(43px * var(--dscale));
    background: var(--map-paper);
}
/* The mockup is laid out at natural size, then scaled into the screen. */
.device__screen > div {
    width: 402px !important;
    height: 874px !important;
    transform: scale(var(--dscale));
    transform-origin: top left;
}

.device-row {
    display: flex; flex-wrap: wrap;
    gap: clamp(24px, 4vw, 52px);
    justify-content: center; align-items: flex-start;
}
.device-caption {
    max-width: 300px; margin: 18px auto 0;
    font-size: 14px; line-height: 1.55;
    color: var(--text-dim); text-align: center;
}
.device-caption strong { display: block; color: var(--text); font-size: 15px; font-weight: 650; }
.device-caption--on-dark { color: var(--text-on-dark-dim); }
.device-caption--on-dark strong { color: var(--text-on-dark); }

/* Horizontal scroll for a row of frames on narrow screens, so they stay
   legible instead of shrinking to nothing. */
.device-scroll {
    display: flex; gap: clamp(20px, 4vw, 44px);
    overflow-x: auto; scroll-snap-type: x proximity;
    padding: 4px var(--gutter) 24px;
    margin-inline: calc(var(--gutter) * -1);
    scrollbar-width: thin;
}
.device-scroll > * { scroll-snap-align: center; }
.device-scroll::after { content: ""; flex: 0 0 1px; }

/* ============================================================ cards & grids */
.grid { display: grid; gap: 18px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 286px), 1fr)); }

.card {
    padding: 26px;
    background: var(--card);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-card);
    box-shadow: var(--card-shadow);
}
.card h3 { margin-bottom: 9px; }
.card p { color: var(--text-dim); font-size: 15.5px; line-height: 1.6; }
.card__icon {
    display: grid; place-items: center;
    width: 44px; height: 44px; margin-bottom: 16px;
    border-radius: 13px;
    background: var(--amber-tint); color: var(--amber-icon);
}
.card--flush { background: transparent; border: 0; box-shadow: none; padding: 0; }

/* ============================================================ signal list */
/*
 * The six Signal states. Status is never conveyed by colour alone — each row
 * carries an icon and a text label, matching the app's accessibility rule.
 */
.signal-list { display: grid; gap: 12px; }
.signal {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px; align-items: start;
    padding: 16px 18px;
    background: var(--card);
    border: 1px solid var(--hairline);
    border-radius: 14px;
}
.signal__ring {
    position: relative; flex: none;
    width: 38px; height: 38px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--map-paper);
    color: var(--text-dim);
}
.signal__ring::after {
    content: ""; position: absolute; inset: 0;
    border-radius: 50%; border: 2.5px solid currentColor;
}
/* Live and fresh: solid green ring. Stale and permission: dashed amber —
   the dash is the non-colour cue, as in the app. */
.signal--live .signal__ring,
.signal--fresh .signal__ring { color: var(--signal-green); }
.signal--stale .signal__ring,
.signal--permission .signal__ring { color: var(--signal-amber); }
.signal--stale .signal__ring::after,
.signal--permission .signal__ring::after { border-style: dashed; }
.signal--offline .signal__ring,
.signal--paused .signal__ring { color: var(--signal-grey); }
.signal--offline .signal__ring { opacity: .75; }

/* Both are spans inside a span, so they need to be blocks explicitly —
   otherwise the description runs on from the label whenever it is short
   enough to fit the same line. */
.signal__label { display: block; font-size: 15.5px; font-weight: 650; }
.signal--live .signal__label { color: var(--signal-green-text); }
.signal--stale .signal__label { color: var(--amber-text); }
.signal__desc { display: block; margin-top: 3px; font-size: 14.5px; line-height: 1.55; color: var(--text-dim); }

/* The pulsing dot is decoration; it stops for reduced-motion users. */
.pulse-dot {
    display: inline-block; width: 8px; height: 8px;
    margin-right: 7px; border-radius: 50%;
    background: var(--signal-green);
    animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ============================================================ steps */
.steps { counter-reset: step; display: grid; gap: 18px; }
.step {
    position: relative;
    padding: 24px 26px 24px 74px;
    background: var(--card);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-card);
    box-shadow: var(--card-shadow);
}
.step::before {
    counter-increment: step; content: counter(step);
    position: absolute; left: 24px; top: 24px;
    display: grid; place-items: center;
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--evergreen); color: var(--text-on-dark);
    font-size: 15px; font-weight: 700;
}
.step h3 { margin-bottom: 7px; }
.step p { color: var(--text-dim); font-size: 15.5px; }

/* ============================================================ pricing */
.plans {
    display: grid; gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    align-items: start;
}
.plan {
    display: flex; flex-direction: column;
    padding: 30px;
    background: var(--card);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-sheet);
    box-shadow: var(--card-shadow);
}
.plan--featured {
    background: var(--evergreen); color: var(--text-on-dark);
    border-color: transparent;
    box-shadow: var(--card-shadow-lift);
}
.plan__name { font-size: 14px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--amber-icon); }
.plan--featured .plan__name { color: var(--amber); }
.plan__price { margin-top: 12px; font-size: 40px; font-weight: 800; letter-spacing: -.035em; }
.plan__price small { font-size: 16px; font-weight: 550; color: var(--text-dim); letter-spacing: 0; }
.plan--featured .plan__price small { color: var(--text-on-dark-dim); }
.plan__alt { margin-top: 8px; font-size: 14.5px; color: var(--text-dim); }
.plan--featured .plan__alt { color: var(--text-on-dark-dim); }
.plan__blurb { margin-top: 14px; font-size: 15.5px; color: var(--text-dim); }
.plan--featured .plan__blurb { color: var(--text-on-dark-dim); }
.plan__list { margin-top: 22px; display: grid; gap: 11px; }
.plan__list li {
    display: grid; grid-template-columns: auto minmax(0, 1fr);
    gap: 10px; align-items: start;
    list-style: none; font-size: 15.5px; line-height: 1.5;
}
.plan__list svg { margin-top: 4px; flex: none; color: var(--signal-green); }
.plan--featured .plan__list svg { color: var(--amber); }
.plan__cta { margin-top: 26px; }
.plan__cta .btn { width: 100%; }

.plan-footnote {
    margin-top: 26px;
    font-size: 13.5px; line-height: 1.6;
    color: var(--text-dim);
    max-width: var(--measure);
}

/* Comparison table */
.compare-wrap { overflow-x: auto; margin-top: 18px; }
.compare {
    width: 100%; min-width: 480px;
    border-collapse: collapse;
    font-size: 15.5px;
}
.compare caption { text-align: left; padding-bottom: 14px; color: var(--text-dim); font-size: 14.5px; }
.compare th, .compare td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--hairline); }
.compare thead th { font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--text-dim); }
.compare tbody th { font-weight: 600; }
.compare td { font-variant-numeric: tabular-nums; }
.compare .is-premium { color: var(--amber-text); font-weight: 650; }

/* ============================================================ dark panel */
.panel-dark {
    background: var(--evergreen); color: var(--text-on-dark);
}
.panel-dark h2, .panel-dark h3 { color: var(--text-on-dark); }
.panel-dark .lede, .panel-dark p { color: var(--text-on-dark-dim); }
.panel-dark .card {
    background: rgba(244, 242, 236, .06);
    border-color: rgba(244, 242, 236, .12);
    box-shadow: none;
}
.panel-dark .card h3 { color: var(--text-on-dark); }
.panel-dark .card p { color: var(--text-on-dark-dim); }
.panel-dark .card__icon { background: rgba(232, 161, 61, .16); color: var(--amber); }

/* ============================================================ callout */
.callout {
    display: grid; gap: 14px;
    padding: 24px 26px;
    border-left: 3px solid var(--amber);
    background: var(--amber-tint);
    border-radius: 0 var(--radius-card) var(--radius-card) 0;
}
.callout h3 { font-size: 17px; }
.callout p { font-size: 15.5px; color: var(--text-dim); }

/* ============================================================ FAQ */
.faq { display: grid; gap: 10px; }
.faq__item {
    background: var(--card);
    border: 1px solid var(--hairline);
    border-radius: 14px;
    overflow: hidden;
}
.faq__item > summary {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; padding: 18px 20px;
    cursor: pointer; list-style: none;
    font-size: 16.5px; font-weight: 650;
}
.faq__item > summary::-webkit-details-marker { display: none; }
.faq__item > summary::after {
    content: ""; flex: none;
    width: 10px; height: 10px;
    border-right: 2px solid var(--amber-icon);
    border-bottom: 2px solid var(--amber-icon);
    transform: rotate(45deg) translateY(-2px);
    transition: transform .18s ease;
}
.faq__item[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.faq__item > summary:hover { background: var(--amber-tint); }
.faq__body { padding: 0 20px 20px; color: var(--text-dim); font-size: 15.5px; line-height: 1.65; }
.faq__body > * + * { margin-top: 12px; }

/* ============================================================ form */
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
.field > label { font-size: 14.5px; font-weight: 650; }
.field__hint { font-size: 13.5px; color: var(--text-dim); }
.field input, .field select, .field textarea {
    width: 100%; padding: 13px 15px;
    font: inherit; font-size: 16px; color: var(--text);
    background: var(--card);
    border: 1.5px solid var(--hairline-strong);
    border-radius: 12px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: var(--amber);
    box-shadow: 0 0 0 3px var(--amber-tint);
}
.field--error input, .field--error select, .field--error textarea { border-color: var(--sos); }
.field__error { font-size: 13.5px; font-weight: 600; color: var(--sos); }

/* The honeypot: off-screen rather than display:none, since some bots skip
   hidden inputs but not positioned ones. Hidden from AT and from tab order. */
.field--trap {
    position: absolute; left: -9999px;
    width: 1px; height: 1px; overflow: hidden;
}

.notice {
    display: grid; gap: 8px;
    padding: 18px 20px;
    border-radius: 14px;
    font-size: 15.5px; line-height: 1.6;
}
.notice strong { font-weight: 700; }
.notice--ok {
    background: rgba(47, 158, 99, .12);
    border: 1px solid rgba(47, 158, 99, .3);
    color: var(--signal-green-text);
}
.notice--error {
    background: rgba(213, 69, 60, .10);
    border: 1px solid rgba(213, 69, 60, .3);
    color: var(--sos);
}

/* ============================================================ footer */
.site-footer {
    padding-block: clamp(44px, 6vw, 72px) 32px;
    background: var(--evergreen); color: var(--text-on-dark-dim);
    font-size: 15px;
}
.site-footer a { color: var(--text-on-dark-dim); text-decoration: none; }
.site-footer a:hover { color: var(--text-on-dark); text-decoration: underline; }
/*
 * Explicit tracks and explicit breakpoints, deliberately not auto-fit.
 *
 * An earlier `minmax(240px, 1.4fr) repeat(auto-fit, minmax(150px, 1fr))` could
 * not fit four columns into a phone: the floors summed to 424px inside a 350px
 * container and put the whole document into horizontal scroll. Wrapping the
 * floors in `min(100%, …)` does not help here either — with a 350px container
 * `min(100%, 240px)` is still 240px. Fixed fractions that are told when to
 * stack cannot fail that way.
 */
.site-footer__grid {
    display: grid; gap: 34px;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    padding-bottom: 34px;
    border-bottom: 1px solid rgba(244, 242, 236, .12);
}
@media (max-width: 900px) {
    .site-footer__grid { grid-template-columns: 1fr 1fr; gap: 30px; }
    /* The brand blurb reads better full-width above the link columns. */
    .site-footer__grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 460px) {
    .site-footer__grid { grid-template-columns: 1fr; gap: 26px; }
}
.site-footer h2 {
    font-size: 12.5px; font-weight: 700;
    letter-spacing: .09em; text-transform: uppercase;
    color: var(--text-on-dark); margin-bottom: 14px;
}
.site-footer__links { display: grid; gap: 10px; }
.site-footer__links li { list-style: none; }
.site-footer .brand { color: var(--text-on-dark); margin: 0 0 12px; }
.site-footer .brand:hover { color: var(--text-on-dark); }
.site-footer__about { max-width: 34ch; line-height: 1.6; }
.site-footer__legal {
    display: flex; flex-wrap: wrap; gap: 8px 22px;
    padding-top: 26px;
    font-size: 13.5px;
}
.site-footer__legal p { color: rgba(244, 242, 236, .56); }
.site-footer__disclaimer {
    margin-top: 16px;
    font-size: 13px; line-height: 1.6;
    color: rgba(244, 242, 236, .50);
    max-width: 92ch;
}

/* ============================================================ blog */
/*
 * The blog reuses the tokens and components above — .card, .btn, .wrap,
 * .callout — and only adds what an article actually needs. No new colours.
 */

/* A shorter hero for index/author pages, which lead with text not a device. */
.hero--compact { padding-block: clamp(44px, 6vw, 72px); }
.hero--compact h1 { color: var(--text-on-dark); }
.hero--compact .lede { color: var(--text-on-dark-dim); }

/* ---------------------------------------------------- category bar */
.cat-bar {
    border-bottom: 1px solid var(--hairline);
    background: var(--sheet);
}
.cat-bar ul {
    display: flex; gap: 6px;
    overflow-x: auto; scrollbar-width: thin;
    padding-block: 12px;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
}
.cat-bar li { list-style: none; flex: none; }
.cat-bar a {
    display: block; padding: 8px 15px;
    border-radius: 999px;
    font-size: 14.5px; font-weight: 600;
    color: var(--text-dim); text-decoration: none;
    white-space: nowrap;
}
.cat-bar a:hover { color: var(--text); background: var(--amber-tint); }
.cat-bar a[aria-current="page"] {
    background: var(--evergreen); color: var(--text-on-dark);
}

/* ---------------------------------------------------- post cards */
.post-grid {
    display: grid; gap: 22px;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
}
.post-grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }

.post-card {
    display: flex; flex-direction: column;
    background: var(--card);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-card);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease;
}
.post-card:hover { transform: translateY(-2px); box-shadow: var(--card-shadow-lift); }
.post-card__media { display: block; aspect-ratio: 16 / 9; background: var(--map-paper); }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; }
.post-card__body { display: flex; flex-direction: column; gap: 9px; padding: 20px 22px 22px; }
.post-card__title { font-size: 19px; line-height: 1.3; }
.post-card__title a { color: var(--text); text-decoration: none; }
.post-card__title a:hover { color: var(--amber-text); }
.post-card__excerpt {
    font-size: 15px; line-height: 1.6; color: var(--text-dim);
    /* Two lines keeps every card the same height without clipping mid-word. */
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-card__meta {
    margin-top: auto; padding-top: 4px;
    display: flex; gap: 8px; flex-wrap: wrap;
    font-size: 13px; color: var(--text-dim);
    font-variant-numeric: tabular-nums;
}
.post-card--compact .post-card__title { font-size: 17px; }

/* ---------------------------------------------------- pagination */
.pager {
    display: flex; align-items: center; justify-content: center;
    flex-wrap: wrap; gap: 14px;
    margin-top: 40px;
}
.pager__state { font-size: 14.5px; color: var(--text-dim); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------- article */
.post__head { padding-block: clamp(34px, 5vw, 56px) 26px; }
.post__head h1 { font-size: clamp(30px, 4.4vw, 46px); margin-bottom: 4px; }

.crumbs { margin-bottom: 18px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13.5px; }
.crumbs li { list-style: none; color: var(--text-dim); }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--hairline-strong); }
.crumbs a { color: var(--text-dim); text-decoration: none; }
.crumbs a:hover { color: var(--amber-text); }

.byline {
    display: flex; gap: 14px; align-items: flex-start;
    margin-top: 26px; padding-top: 22px;
    border-top: 1px solid var(--hairline);
}
.byline__photo { width: 48px; height: 48px; border-radius: 50%; flex: none; object-fit: cover; }
.byline__text { display: grid; gap: 3px; }
.byline__who { font-size: 15.5px; font-weight: 600; }
.byline__who a { color: var(--text); text-decoration: none; border-bottom: 1.5px solid var(--amber); }
.byline__who a:hover { color: var(--amber-text); }
.byline__role { display: block; font-weight: 450; color: var(--text-dim); font-size: 14.5px; }
.byline__when { font-size: 13.5px; color: var(--text-dim); display: flex; flex-wrap: wrap; gap: 7px; }
.byline__review {
    display: flex; align-items: center; gap: 6px;
    margin-top: 5px;
    font-size: 13.5px; font-weight: 550;
    color: var(--signal-green-text);
}
.byline__review a { color: inherit; }

.post__cover {
    margin: 0 0 clamp(26px, 4vw, 40px);
    border-radius: var(--radius-card);
    overflow: hidden;
    background: var(--map-paper);
}
.post__cover img { width: 100%; height: auto; display: block; }

/* ---------------------------------------------------- article body */
/*
 * Editor-authored HTML. Everything here has to survive arbitrary (sanitized)
 * markup, so it is styled by element rather than by class.
 */
.post__body { font-size: 17.5px; line-height: 1.75; color: var(--text); }
.post__body > * + * { margin-top: 1.15em; }
.post__body h2 {
    margin-top: 1.9em; font-size: clamp(23px, 2.6vw, 29px);
    scroll-margin-top: 90px;
}
.post__body h3 { margin-top: 1.6em; font-size: clamp(19px, 2vw, 22px); scroll-margin-top: 90px; }
.post__body h4 { margin-top: 1.5em; font-size: 17.5px; }
.post__body p { color: var(--text-dim); }
.post__body strong { color: var(--text); font-weight: 650; }
.post__body a { color: var(--amber-text); }
.post__body ul, .post__body ol { padding-left: 1.3em; color: var(--text-dim); }
.post__body li + li { margin-top: .5em; }
.post__body li::marker { color: var(--amber-icon); }
.post__body img { border-radius: 12px; }
.post__body figure { margin: 1.6em 0; }
.post__body figcaption {
    margin-top: 9px; font-size: 13.5px; color: var(--text-dim); text-align: center;
}
.post__body blockquote {
    margin: 1.6em 0; padding: 4px 0 4px 20px;
    border-left: 3px solid var(--amber);
    color: var(--text); font-size: 18px;
}
.post__body pre {
    padding: 18px 20px; border-radius: 12px;
    background: var(--evergreen); color: var(--text-on-dark);
    overflow-x: auto; font-size: 14px; line-height: 1.6;
}
.post__body code {
    font-size: .92em;
    background: var(--amber-tint); color: var(--amber-deep);
    padding: 2px 6px; border-radius: 5px;
}
.post__body pre code { background: none; color: inherit; padding: 0; }
.post__body hr { border: 0; border-top: 1px solid var(--hairline); margin: 2.2em 0; }
/* Tables can be wider than a phone; let them scroll rather than the page. */
.post__body table {
    width: 100%; border-collapse: collapse; font-size: 15.5px;
    display: block; overflow-x: auto;
}
.post__body th, .post__body td {
    padding: 11px 14px; text-align: left;
    border-bottom: 1px solid var(--hairline);
}
.post__body th { font-weight: 650; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 34px; }
.tags li {
    list-style: none; padding: 6px 12px;
    border-radius: 999px; background: var(--amber-tint);
    font-size: 13px; font-weight: 600; color: var(--amber-deep);
}

/* ---------------------------------------------------- E-E-A-T blocks */
.author-box {
    display: flex; gap: 18px; align-items: flex-start;
    margin-top: 40px; padding: 24px 26px;
    background: var(--card);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-card);
}
.author-box__photo { width: 72px; height: 72px; border-radius: 50%; flex: none; object-fit: cover; }
.author-box__name { font-size: 17px; font-weight: 700; }
.author-box__name a { color: var(--text); text-decoration: none; }
.author-box__name a:hover { color: var(--amber-text); }
.author-box__role { font-size: 14px; color: var(--amber-icon); font-weight: 600; margin-top: 2px; }
.author-box__bio { margin-top: 9px; font-size: 15px; line-height: 1.6; color: var(--text-dim); }
.author-box__topics { margin-top: 9px; font-size: 13.5px; color: var(--text-dim); }
.author-box__topics strong { color: var(--text); }

.policy {
    margin-top: 26px; padding: 22px 24px;
    border-left: 3px solid var(--signal-green);
    background: rgba(47, 158, 99, .07);
    border-radius: 0 var(--radius-card) var(--radius-card) 0;
}
.policy h2 { font-size: 15px; margin-bottom: 7px; }
.policy p { font-size: 14.5px; line-height: 1.65; color: var(--text-dim); }

.related { padding-block: clamp(44px, 6vw, 72px); background: var(--sheet); }
.related h2 { margin-bottom: 24px; font-size: clamp(22px, 2.6vw, 28px); }

/* ---------------------------------------------------- author page */
.author-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.author-head__photo {
    width: 112px; height: 112px; border-radius: 50%;
    object-fit: cover; flex: none;
    border: 3px solid rgba(244, 242, 236, .18);
}
.author-head h1 { color: var(--text-on-dark); font-size: clamp(29px, 4vw, 42px); }
.author-head__role { margin-top: 6px; font-size: 16px; font-weight: 600; color: var(--amber); }
