/* ── royerramirez.com composition components ──────────────────────────────
   Tokens (--ink, --paper, --yellow …) come from neo-theme.css :root.
   `.rr*` rules are scoped under a `.rr` ancestor so they never collide with
   Bootstrap or the global theme. Interior helpers (.neo-h1, .neo-kicker) are
   safe to apply to bare elements anywhere — they style typography only and do
   not touch descendant links. */

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

/* Header ---------------------------------------------------------------- */
.rr-header {
    align-items: center;
    border-bottom: 2px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    gap: 16px 28px;
    justify-content: space-between;
    padding: 20px clamp(18px, 3vw, 42px) 18px;
}

.rr-brand {
    display: inline-grid;
    gap: 3px;
    grid-template-columns: repeat(6, clamp(34px, 3.3vw, 46px));
    grid-template-rows: repeat(2, clamp(34px, 3.3vw, 46px));
    transform: rotate(-1deg);
}

.rr-tile {
    align-items: center;
    background: var(--ink);
    border: 2px solid var(--ink);
    color: var(--paper);
    display: grid;
    font-size: clamp(1.1rem, 2vw, 1.55rem);
    font-weight: 900;
    justify-items: center;
    letter-spacing: -0.06em;
    line-height: 1;
    place-items: center;
}
.rr-tile--orange { background: var(--orange); color: var(--ink); }
.rr-tile--yellow { background: var(--yellow); color: var(--ink); }
.rr-tile--blue   { background: var(--blue);   color: #fff; }
.rr-tile--green  { background: var(--green);  color: var(--ink); }

.rr-skill {
    font-family: var(--font-mono);
    font-size: clamp(0.62rem, 1vw, 0.78rem);
    letter-spacing: 0.02em;
}

.rr-tile--status { background: var(--field); color: var(--ink); gap: 4px; }
.rr-status-dot {
    animation: rr-pulse 1.4s ease-in-out infinite;
    background: var(--green);
    border: 2px solid var(--ink);
    border-radius: 50%;
    height: 14px; width: 14px;
}
.rr-status-label {
    font-family: var(--font-mono);
    font-size: 0.48rem;
    font-weight: 900;
    letter-spacing: 0.04em;
}
@keyframes rr-pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(0.72); }
}

/* Nav ------------------------------------------------------------------- */
.rr-nav {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    font-size: clamp(0.9rem, 1.15vw, 1.05rem);
    font-weight: 700;
    gap: 4px 2px;
    justify-content: flex-end;
    row-gap: 8px;
}
.rr-nav a {
    border: 2px solid transparent;
    border-radius: 999px;
    padding: 8px 14px;
    transition: background .15s ease, border-color .15s ease;
}
.rr-nav a:hover { background: var(--field); border-color: var(--ink); }
.rr-nav a[aria-current="page"] {
    background: var(--paper);
    border-color: var(--ink);
    box-shadow: 3px 3px 0 var(--orange);
}
/* --- Navigation -----------------------------------------------------------
   Desktop: the bar sits inline, the Menu wrapper is transparent, and only the
   Data group is a real dropdown. Mobile: everything collapses behind Menu, so
   links are never hidden off-screen in a scrolling strip.
   Both use native <details>, so this degrades to plain expanded lists. */

/* --- Navigation -----------------------------------------------------------
   .rr-nav is a plain wrapper; .rr-nav-items is the bar. flex:1 because the bar
   is right-aligned inside the header's space-between layout.

   The mobile toggle is a checkbox, not <details>: Chrome does not paint a
   closed <details>'s contents even when author CSS overrides display, which
   left every desktop link laid out but invisible and unclickable. Links now
   live outside any collapsible element. */
.rr-nav { display: block; flex: 1 1 auto; }

/* Visually hidden but focusable, so the menu opens from the keyboard. */
.rr-nav-checkbox {
    height: 1px;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    width: 1px;
}
.rr-nav-toggle { display: none; }

.rr-nav-items {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 2px;
    justify-content: flex-end;
}

.rr-nav-group { position: relative; }
.rr-nav-group > summary {
    border: 2px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    list-style: none;
    padding: 8px 14px;
    transition: background .15s ease, border-color .15s ease;
    white-space: nowrap;
}
.rr-nav-group > summary::-webkit-details-marker { display: none; }
.rr-nav-group > summary::after {
    content: "";
    border-left: .3em solid transparent;
    border-right: .3em solid transparent;
    border-top: .34em solid currentColor;
    display: inline-block;
    margin-left: .45em;
    vertical-align: .12em;
}
.rr-nav-group > summary:hover { background: var(--field); border-color: var(--ink); }
.rr-nav-group[open] > summary { background: var(--field); border-color: var(--ink); }
.rr-nav-group > summary[aria-current="true"] { background: var(--yellow); border-color: var(--ink); }

.rr-nav-sub {
    background: var(--paper);
    border: var(--border-default);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 190px;
    padding: 8px;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 60;
}
.rr-nav-sub a { border-radius: 8px; white-space: nowrap; }

/* 959px: the widest viewport at which the eight-item bar still wraps to a
   second row beside the brand. Above it the bar fits on one line. */
@media (max-width: 959px) {
    .rr-nav { position: relative; }
    .rr-nav-toggle {
        align-items: center;
        border: var(--border-default);
        border-radius: 999px;
        box-shadow: 3px 3px 0 var(--ink);
        cursor: pointer;
        display: inline-flex;
        gap: 8px;
        min-height: 44px;
        padding: 8px 16px;
        user-select: none;
    }
    .rr-nav-toggle-bars {
        background: currentColor;
        box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor;
        display: block;
        height: 2px;
        width: 18px;
    }
    .rr-nav-checkbox:checked ~ .rr-nav-toggle { background: var(--yellow); }
    .rr-nav-checkbox:focus-visible ~ .rr-nav-toggle { outline: 3px solid var(--blue); outline-offset: 2px; }

    .rr-nav-items { display: none; }
    .rr-nav-checkbox:checked ~ .rr-nav-items {
        align-items: stretch;
        background: var(--paper);
        border: var(--border-default);
        box-shadow: var(--shadow-lg);
        display: flex;
        flex-direction: column;
        gap: 2px;
        /* Anchored left, not right: the bar is left-aligned at this
           breakpoint, so right:0 pushed a 220px panel off-screen and clipped
           the links. max-width keeps it inside whichever side it lands on. */
        left: 0;
        right: auto;
        max-width: calc(100vw - 24px);
        min-width: 220px;
        padding: 10px;
        position: absolute;
        top: calc(100% + 10px);
        z-index: 60;
    }
    .rr-nav-items > a,
    .rr-nav-group > summary { align-items: center; border-radius: 10px; display: flex; min-height: 44px; }

    /* Nested group opens in flow rather than as a floating card. */
    .rr-nav-sub {
        border: 0;
        border-left: 2px solid var(--ink);
        box-shadow: none;
        margin: 2px 0 2px 12px;
        padding: 0 0 0 10px;
        position: static;
    }
}

.rr-nav-sep {
    background: var(--orange);
    border: 2px solid var(--ink);
    border-radius: 50%;
    flex-shrink: 0;
    height: 10px; width: 10px;
    margin: 0 10px;
}

.rr main { overflow: hidden; display: block; }

/* Hero ------------------------------------------------------------------ */
.rr-hero {
    display: grid;
    gap: clamp(30px, 6vw, 88px);
    grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1fr);
    align-items: center;
    min-height: 63vh;
    padding: clamp(52px, 9vw, 118px) clamp(32px, 6vw, 110px) clamp(28px, 5vw, 60px) clamp(18px, 3vw, 42px);
    position: relative;
}
.rr-hero::before, .rr-hero::after {
    border: 2px solid var(--ink);
    content: "";
    position: absolute;
    z-index: -1;
}
.rr-hero::before {
    background: var(--orange);
    border-radius: 50%;
    height: clamp(72px, 11vw, 130px); width: clamp(72px, 11vw, 130px);
    left: clamp(18px, 5vw, 72px);
    top: clamp(36px, 8vw, 96px);
    opacity: .92;
    transform: rotate(6deg);
}
.rr-hero::after {
    background: transparent;
    border: 3px solid var(--orange);
    border-radius: 50%;
    height: clamp(64px, 9vw, 118px); width: clamp(64px, 9vw, 118px);
    bottom: clamp(24px, 6vw, 88px);
    right: clamp(14px, 7vw, 100px);
    opacity: .88;
    transform: rotate(-5deg);
}

.rr-portrait {
    background: var(--orange);
    border: 2px solid var(--ink);
    box-shadow: 12px 12px 0 var(--ink);
    margin: 0;
    max-width: 360px;
    padding: 14px;
    position: relative;
    transform: rotate(-3deg);
}
.rr-portrait img {
    aspect-ratio: 1;
    border: 2px solid var(--ink);
    display: block;
    filter: saturate(1.08) contrast(1.04);
    object-fit: cover;
    width: 100%;
}
.rr-portrait-status {
    background: var(--yellow);
    border: 2px solid var(--ink);
    bottom: -20px; left: 26px;
    font-family: var(--font-mono);
    font-size: clamp(0.68rem, 1.6vw, 0.82rem);
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1.2;
    padding: 8px 10px;
    position: absolute;
    transform: rotate(4deg);
    white-space: nowrap;
}
.rr-portrait--fill {
    align-self: stretch;
    display: flex;
    max-width: none;
}
.rr-portrait--fill img {
    aspect-ratio: auto;
    flex: 1;
    height: 100%;
    min-height: 0;
    object-position: center 22%;
}
/* Hero: don't stretch to the full copy column — keep a controlled portrait
   shape so the photo height reads aligned with the title block. */
.rr-hero .rr-portrait--fill {
    align-self: center;
    display: block;
    max-width: 460px;
}
.rr-hero .rr-portrait--fill img {
    aspect-ratio: 5 / 4;
    flex: none;
    height: auto;
}
.rr-status--coffee { display: none; }
.rr-portrait:has(img:hover) .rr-status--ready,
.rr-portrait:focus-within .rr-status--ready { display: none; }
.rr-portrait:has(img:hover) .rr-status--coffee,
.rr-portrait:focus-within .rr-status--coffee { display: inline; }
.rr-portrait:has(img:hover) .rr-portrait-status,
.rr-portrait:focus-within .rr-portrait-status { background: var(--green); }

/* The hero is a grid whose text column is minmax(0,1fr), so the column can be
   narrower than a 12ch display-size H1. Without these caps the copy block ran
   ~40px past the viewport at 1280-1440 and was clipped by .rr main's
   overflow:hidden. Capping at 100% wraps a word earlier instead of clipping. */
.rr-copy { margin-left: auto; max-width: min(980px, 100%); min-width: 0; }

.rr-kicker {
    background: var(--paper);
    border: 2px solid var(--ink);
    box-shadow: 5px 5px 0 var(--ink);
    display: inline-block;
    font-size: clamp(0.95rem, 1.4vw, 1.2rem);
    font-weight: 800;
    margin: 0 0 clamp(22px, 3vw, 34px);
    padding: 10px 14px;
    transform: rotate(1.5deg);
}
.rr-kicker--history { display: none; }
.rr-kicker:hover { background: var(--blue); color: #fff; }
.rr-kicker:hover .rr-kicker--current { display: none; }
.rr-kicker:hover .rr-kicker--history { display: inline; }

.rr-hero h1 {
    /* Largest scale at which the unbreakable word ENGINEERING fits its grid
       column at every desktop width. At 9.6vw its glyphs ran up to 40px past
       the viewport between 1280 and 1680 and were clipped by main's
       overflow:hidden; measured per-word with Range.getClientRects. */
    font-size: clamp(3rem, 9vw, 9.5rem);
    font-weight: 800;
    letter-spacing: -0.085em;
    line-height: 0.86;
    margin: 0;
    max-width: min(12ch, 100%);
    overflow-wrap: normal;
    word-break: normal;
}

.rr-intro {
    color: var(--ink);
    font-size: clamp(1.6rem, 3.2vw, 3.75rem);
    font-weight: 700;
    letter-spacing: -0.06em;
    line-height: 1.02;
    margin: clamp(28px, 5vw, 58px) 0 0 0;
    max-width: 900px;
    min-height: 1.1em;
}
.rr-intro .typist {
    animation: rr-caret 1s step-end infinite;
    border-right: 3px solid var(--ink);
    padding-right: 2px;
}
@keyframes rr-caret {
    0%, 100% { border-right-color: var(--ink); }
    50%      { border-right-color: transparent; }
}

.rr-stickers {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: clamp(28px, 4vw, 46px);
}
.rr-sticker {
    background: var(--paper);
    border: 2px solid var(--ink);
    border-radius: 999px;
    box-shadow: 4px 4px 0 var(--ink);
    display: inline-block;
    font-size: clamp(1.05rem, 1.5vw, 1.32rem);
    font-weight: 800;
    padding: 11px 17px;
}
.rr-sticker:nth-child(1) { background: var(--yellow); transform: rotate(-3deg); }
.rr-sticker:nth-child(2) { background: var(--blue); color: #fff; transform: rotate(2deg); }
.rr-sticker:nth-child(3) { background: var(--orange); transform: rotate(-1deg); }
.rr-sticker:nth-child(4) { background: var(--green); transform: rotate(1.5deg); }

/* Feature strip --------------------------------------------------------- */
.rr-strip {
    background: var(--ink);
    border-top: 2px solid var(--ink);
    border-bottom: 2px solid var(--ink);
    color: var(--paper);
    display: grid;
    gap: 2px;
    grid-template-columns: repeat(4, 1fr);
}
.rr-strip span {
    background: var(--paper);
    color: var(--ink);
    font-size: clamp(1.15rem, 2vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.05em;
    min-height: 120px;
    padding: clamp(18px, 3vw, 34px);
    display: flex;
    align-items: center;
}
.rr-strip span:nth-child(1) { background: var(--yellow); }
.rr-strip span:nth-child(2) { background: var(--orange); }
.rr-strip span:nth-child(3) { background: var(--blue); color: #fff; }
.rr-strip span:nth-child(4) { background: var(--green); }

/* Section / ConfigMap --------------------------------------------------- */
.rr-section {
    padding: clamp(54px, 8vw, 104px) clamp(18px, 3vw, 42px);
}
.rr-section-label {
    font-size: clamp(2.6rem, 7vw, 7rem);
    font-weight: 800;
    letter-spacing: -0.08em;
    line-height: 0.86;
    margin: 0 0 clamp(18px, 3vw, 34px);
}
.rr-about-grid {
    align-items: stretch;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(420px, 1.45fr) minmax(240px, 0.55fr);
}

/* About's portrait variant. Scoped to widths that can actually fit two tracks:
   the minmax floors need 360 + 260 + gap, so below that it must fall back to
   the single-column rule rather than force the document wider than the
   viewport. This lived as an inline style, which outranked every media query
   and made /about/ scroll sideways on phones. */
@media (min-width: 1181px) {
    .rr-about-grid--portrait {
        gap: clamp(28px, 4vw, 48px);
        grid-template-columns: minmax(360px, 1.3fr) minmax(260px, 0.7fr);
    }
}
.rr-configmap {
    align-content: start;
    background: var(--paper);
    border: 2px solid var(--ink);
    box-shadow: 10px 10px 0 var(--ink);
    display: grid;
    grid-template-rows: auto 1fr;
    font-family: var(--font-mono);
    font-size: clamp(0.82rem, 1.15vw, 1rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.35;
    margin: 0;
    overflow: hidden;
    transform: rotate(-0.4deg);
}
.rr-configmap-bar {
    align-items: center;
    background: var(--ink);
    color: var(--paper);
    display: flex;
    gap: 10px;
    justify-content: space-between;
    padding: 10px 14px;
}
.rr-configmap-title { font-size: clamp(0.95rem, 1.3vw, 1.15rem); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rr-configmap-badge {
    background: var(--green);
    border: 2px solid var(--paper);
    color: var(--ink);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    padding: 4px 7px;
    text-transform: uppercase;
    white-space: nowrap;
}
.rr-configmap-body { display: grid; grid-template-columns: auto 1fr; margin: 0; }
.rr-configmap-lines, .rr-configmap-code { padding: 18px 0; margin: 0; }
.rr-configmap-lines {
    background: var(--field);
    border-right: 2px solid var(--ink);
    color: var(--muted);
    padding-inline: 12px;
    text-align: right;
    user-select: none;
}
.rr-configmap-code { color: var(--ink); overflow-x: auto; padding-inline: 18px; white-space: pre; }
.rr-k { color: #9a4c00; }
.rr-v { color: #1f5f99; }
.rr-s { color: #316b1f; }
.rr-c { color: var(--muted); }

.rr-panel {
    background: rgba(247, 244, 239, 0.86);
    border: 2px solid var(--ink);
    box-shadow: 4px 4px 0 var(--ink);
    display: flex;
    flex-direction: column;
    gap: 16px;
    justify-content: center;
    padding: clamp(18px, 2vw, 26px);
}
.rr-panel p {
    font-size: clamp(1rem, 1.45vw, 1.35rem);
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 1.06;
    margin: 0;
}
.rr-panel p + p {
    color: var(--muted);
    font-size: clamp(0.9rem, 1.05vw, 1.05rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
}
.rr-chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.rr-chip {
    background: var(--yellow);
    border: 2px solid var(--ink);
    box-shadow: 2px 2px 0 var(--ink);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 900;
    padding: 5px 7px;
    text-transform: uppercase;
}
.rr-chip:nth-child(2) { background: var(--green); }
.rr-chip:nth-child(3) { background: var(--orange); }

/* Copy-panel accents (links + lead initial) ----------------------------- */
.rr-prose-section { padding-top: clamp(28px, 4vw, 52px); }
.rr-prose-section .rr-panel p {
    font-size: clamp(1.15rem, 1.7vw, 1.55rem);
    line-height: 1.12;
}
.rr-prose-section .rr-panel p + p {
    font-size: clamp(1.02rem, 1.3vw, 1.25rem);
    line-height: 1.32;
}
.rr-panel p > b:first-child {
    color: var(--orange);
    font-weight: 900;
}
.rr-panel a {
    background: linear-gradient(var(--yellow), var(--yellow)) no-repeat;
    background-position: 0 88%;
    background-size: 100% 36%;
    color: var(--ink);
    padding: 0 2px;
    text-decoration: none;
    transition: background-size 0.18s ease;
}
.rr-panel a:hover { background-size: 100% 100%; }

/* Load-more bar --------------------------------------------------------- */
.rr-loadmore {
    background: var(--orange);
    border-top: 2px solid var(--ink);
    border-bottom: 2px solid var(--ink);
    display: block;
    font-size: clamp(1.4rem, 2.2vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    padding: 18px clamp(18px, 3vw, 42px);
}
.rr-loadmore:hover { background: var(--yellow); }
.rr-loadmore::after { content: " ->"; }

/* Index notes [01]..[06] ------------------------------------------------ */
.rr-notes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}
.rr-note {
    background: rgba(247, 244, 239, 0.78);
    border-bottom: 2px solid var(--ink);
    border-right: 2px solid var(--ink);
    color: var(--ink);
    display: flex;
    flex-direction: column;
    min-height: 230px;
    padding: clamp(18px, 3vw, 38px);
    transition: background 180ms ease, transform 180ms ease;
}
.rr-note:nth-child(3n) { border-right: 0; }
.rr-note:hover { background: var(--yellow); transform: translateY(-6px); }
.rr-note:nth-child(3n+2):hover { background: var(--blue); color: #fff; }
.rr-note:nth-child(3n+2):hover p { color: #fff; }
.rr-note:nth-child(3n):hover { background: var(--green); }
.rr-note strong {
    display: block;
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    margin-bottom: auto;
}
.rr-note p {
    color: var(--muted);
    font-size: clamp(1rem, 1.5vw, 1.3rem);
    line-height: 1.2;
    margin: 28px 0 0;
}
.rr-note span { font-weight: 800; margin-top: 18px; }
.rr-note span::after { content: " ->"; }

/* Footer ---------------------------------------------------------------- */
.rr-footer {
    align-items: center;
    background: var(--ink);
    border-top: 2px solid var(--ink);
    color: var(--paper);
    display: flex;
    flex-wrap: wrap;
    gap: 18px 28px;
    justify-content: space-between;
    margin-top: auto;
    padding: 22px clamp(18px, 3vw, 42px);
}
.rr-footer a { color: var(--paper); text-decoration: none; }
.rr-footer-left { align-items: center; display: flex; gap: 18px; }
.rr-footer-mark {
    background: var(--yellow);
    border: 2px solid var(--paper);
    color: var(--ink);
    font-weight: 900;
    letter-spacing: -0.06em;
    padding: 4px 9px;
    transform: rotate(-3deg);
}
.rr-footer-socials { display: flex; gap: 14px; }
.rr-footer-socials a {
    align-items: center;
    display: inline-flex;
    line-height: 1;
    transition: color .15s ease, transform .15s ease;
    /* The icons are 20-22px, well under the 44px minimum touch target both
       Apple and Google specify. Grow the hit area without growing the icon;
       the flex centring keeps the glyph where it was. */
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
}
.rr-footer-socials a:hover { color: var(--yellow); transform: translateY(-2px); }
.rr-footer-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.rr-footer-email {
    border-bottom: 2px solid var(--yellow);
    font-weight: 800;
    font-size: clamp(1rem, 1.6vw, 1.3rem);
    letter-spacing: -0.03em;
}
.rr-footer-email:hover { color: var(--yellow); }
.rr-footer-meta { color: rgba(247, 244, 239, 0.62); font-size: 0.82rem; font-weight: 600; }

/* Document pages (resume / thesis PDF preview) -------------------------- */
.doc-page { --r-shadow: 0 12px 40px rgba(8, 8, 8, 0.12); }
.doc-page main {
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(20px, 4vw, 48px) clamp(18px, 3vw, 42px) 80px;
}
.doc-page .page-kicker {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
    margin: 0 0 8px;
}
.doc-page h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.15;
    margin: 0 0 12px;
    max-width: 24ch;
}
.doc-page .lede {
    font-size: clamp(1rem, 1.35vw, 1.15rem);
    color: var(--muted);
    max-width: 52ch;
    margin: 0 0 20px;
}
.doc-page .sticker-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}
.doc-page .sticker {
    border: 2px solid var(--ink);
    border-radius: 999px;
    box-shadow: 3px 3px 0 var(--ink);
    color: var(--ink);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 6px 12px;
}
.doc-page .sticker:nth-child(1) { background: var(--yellow); }
.doc-page .sticker:nth-child(2) { background: var(--orange); }
.doc-page .sticker:nth-child(3) { background: var(--blue); color: #fff; }
.doc-page .sticker:nth-child(4) { background: var(--green); }
.doc-page .layout {
    display: grid;
    gap: clamp(24px, 4vw, 40px);
    align-items: start;
}
@media (min-width: 900px) {
    .doc-page .layout {
        grid-template-columns: minmax(260px, 340px) 1fr;
        align-items: stretch;
    }
    .doc-page .preview-wrap { height: 100%; min-height: 0; }
    .doc-page .preview-body { min-height: 0; }
}
.doc-page .panel {
    background: #fff;
    border: 2px solid var(--ink);
    border-radius: 12px;
    box-shadow: var(--r-shadow);
    padding: clamp(18px, 2.5vw, 24px);
}
.doc-page .panel h2 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    margin: 0 0 14px;
    font-weight: 700;
}
.doc-page .panel p {
    font-size: 0.95rem;
    line-height: 1.55;
    margin: 0 0 14px;
}
.doc-page .panel p:last-of-type { margin-bottom: 24px; }
.doc-page .highlights {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
}
.doc-page .highlights li {
    position: relative;
    padding-left: 1.1em;
    margin-bottom: 10px;
    font-size: 0.95rem;
}
.doc-page .highlights li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 6px;
    height: 6px;
    background: var(--orange);
    border: 2px solid var(--ink);
    border-radius: 1px;
    transform: rotate(45deg);
}
.doc-page .actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.doc-page .rbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    padding: 14px 18px;
    border-radius: 10px;
    border: 2px solid var(--ink);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.doc-page .rbtn:active { transform: scale(0.98); }
.doc-page .rbtn-primary {
    background: var(--ink);
    color: var(--paper);
    box-shadow: 4px 4px 0 var(--yellow);
}
.doc-page .rbtn-primary:hover { box-shadow: 6px 6px 0 var(--orange); }
.doc-page .rbtn-secondary {
    background: var(--paper);
    color: var(--ink);
}
.doc-page .rbtn-secondary:hover { background: var(--field); }
.doc-page .hint {
    margin-top: 16px;
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.45;
}
.doc-page .preview-wrap {
    display: flex;
    flex-direction: column;
    min-height: min(72vh, 720px);
    background: var(--field);
    border: 2px solid var(--ink);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--r-shadow);
}
.doc-page .preview-chrome {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--ink);
    color: var(--paper);
    border-bottom: 2px solid var(--ink);
    flex-shrink: 0;
}
.doc-page .preview-dots { display: flex; gap: 6px; }
.doc-page .preview-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.35);
}
.doc-page .preview-dots span:nth-child(1) { background: #ff6b6b; }
.doc-page .preview-dots span:nth-child(2) { background: var(--yellow); }
.doc-page .preview-dots span:nth-child(3) { background: #82d173; }
.doc-page .preview-title {
    flex: 1;
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.doc-page .preview-badge {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: var(--blue);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
}
.doc-page .preview-body {
    position: relative;
    flex: 1;
    min-height: 400px;
    background: #e8e4dc;
}
.doc-page .preview-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: var(--field);
    z-index: 1;
    transition: opacity 0.35s ease;
}
.doc-page .preview-loading.hidden {
    opacity: 0;
    pointer-events: none;
}
.doc-page .spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--line);
    border-top-color: var(--ink);
    border-radius: 50%;
    animation: doc-spin 0.7s linear infinite;
}
@keyframes doc-spin { to { transform: rotate(360deg); } }
.doc-page .preview-body iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
}
.doc-page .sticky-actions { display: none; }
@media (max-width: 899px) {
    .doc-page .sticky-actions {
        display: flex;
        gap: 10px;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
        background: rgba(247, 244, 239, 0.92);
        backdrop-filter: blur(10px);
        border-top: 2px solid var(--ink);
        z-index: 10;
    }
    .doc-page .sticky-actions .rbtn {
        flex: 1;
        padding: 12px 14px;
        font-size: 0.9rem;
    }
    .doc-page main { padding-bottom: 100px; }
}
@media (prefers-reduced-motion: reduce) {
    .doc-page .rbtn,
    .doc-page .preview-loading { transition: none; }
    .doc-page .spinner {
        animation: none;
        border-top-color: var(--ink);
    }
}

/* ── Running dashboard (modeled on royerramirez.com/running) ───────────── */
.run-page {
    --run-mono: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;
}
.run-page main {
    overflow: hidden;
    background:
        radial-gradient(circle at 8% 18%, rgba(247, 216, 74, 0.55), transparent 18rem),
        radial-gradient(circle at 92% 12%, rgba(255, 107, 53, 0.38), transparent 16rem),
        radial-gradient(circle at 78% 88%, rgba(79, 124, 255, 0.26), transparent 20rem);
}

.run-page .running-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 360px);
    gap: clamp(28px, 5vw, 72px);
    align-items: center;
    padding: clamp(54px, 8vw, 104px) clamp(18px, 3vw, 42px);
    border-bottom: 2px solid var(--ink);
}
.run-page .running-copy { min-width: 0; }
.run-page .running-copy .kicker {
    display: inline-block;
    background: var(--green);
    border: 2px solid var(--ink);
    box-shadow: 4px 4px 0 var(--ink);
    font-family: var(--run-mono);
    font-size: 0.85rem;
    font-weight: 900;
    text-transform: uppercase;
    padding: 8px 10px;
    margin-bottom: 22px;
    transform: rotate(-1deg);
}
.run-page .running-copy h1 {
    font-size: clamp(3.3rem, 10vw, 9.4rem);
    font-weight: 800;
    letter-spacing: -0.09em;
    line-height: 0.84;
    margin: 0;
    max-width: 11ch;
}
.run-page .running-copy .intro {
    font-size: clamp(1.4rem, 3vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.06em;
    line-height: 1.02;
    margin: clamp(24px, 4vw, 44px) 0 0 auto;
    max-width: 900px;
}
.run-page .running-note {
    background: var(--paper);
    border: 2px solid var(--ink);
    box-shadow: 6px 6px 0 var(--ink);
    font-family: var(--run-mono);
    font-size: clamp(0.78rem, 1.3vw, 0.95rem);
    font-weight: 800;
    line-height: 1.45;
    padding: 14px 16px;
    margin-top: clamp(26px, 4vw, 42px);
    max-width: 760px;
}
.run-page .running-photo {
    background: var(--orange);
    border: 2px solid var(--ink);
    box-shadow: 10px 10px 0 var(--ink);
    padding: 12px;
    margin: 0;
    transform: rotate(2deg);
}
.run-page .running-photo img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border: 2px solid var(--ink);
    filter: saturate(1.08) contrast(1.04);
}
.run-page .running-photo figcaption {
    font-family: var(--run-mono);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-top: 10px;
}

.run-page .dashboard {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    background: var(--ink);
    border-bottom: 2px solid var(--ink);
}
.run-page .metric-card {
    background: var(--paper);
    min-height: 190px;
    padding: clamp(20px, 3vw, 34px);
}
.run-page .metric-card:nth-child(1) { background: var(--yellow); }
.run-page .metric-card:nth-child(2) { background: var(--orange); }
.run-page .metric-card:nth-child(3) { background: var(--blue); color: #fff; }
.run-page .metric-card:nth-child(4) { background: var(--green); }
.run-page .metric-label {
    display: block;
    font-family: var(--run-mono);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 18px;
}
.run-page .metric-value {
    display: block;
    font-size: clamp(2.7rem, 6vw, 6.6rem);
    font-weight: 900;
    letter-spacing: -0.09em;
    line-height: 0.86;
}
.run-page .metric-detail {
    display: block;
    font-size: 0.95rem;
    font-weight: 800;
    margin-top: 16px;
}

.run-page .trend-section {
    display: grid;
    grid-template-columns: minmax(240px, 0.45fr) minmax(0, 1fr);
    gap: clamp(24px, 4vw, 46px);
    padding: clamp(46px, 7vw, 92px) clamp(18px, 3vw, 42px);
}
.run-page .section-copy h2 {
    font-size: clamp(2.4rem, 6vw, 6rem);
    font-weight: 900;
    letter-spacing: -0.085em;
    line-height: 0.86;
    margin: 0;
}
.run-page .section-copy p {
    color: var(--muted);
    font-size: clamp(1rem, 1.5vw, 1.22rem);
    font-weight: 700;
    line-height: 1.45;
    margin: 22px 0 0;
}
.run-page .chart-card,
.run-page .records-card {
    background: var(--paper);
    border: 2px solid var(--ink);
    box-shadow: 8px 8px 0 var(--ink);
    padding: clamp(18px, 3vw, 30px);
}
.run-page .chart-card h3,
.run-page .records-card h3 {
    font-family: var(--run-mono);
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin: 0 0 18px;
}
.run-page .bar-list { display: grid; gap: 12px; }
.run-page .bar-row {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) 80px;
    align-items: center;
    gap: 12px;
}
.run-page .stand-chart .bar-row { grid-template-columns: 104px minmax(0, 1fr) 56px; }
/* Yearly mileage — append the year's most-run shoe under each bar. */
.run-page .year-chart .bar-row {
    grid-template-areas:
        "year track val"
        ".    shoe  shoe";
    row-gap: 7px;
}
.run-page .year-chart .bar-year { grid-area: year; }
.run-page .year-chart .bar-track { grid-area: track; }
.run-page .year-chart .bar-val { grid-area: val; }
.run-page .year-shoe {
    grid-area: shoe;
    font-family: var(--run-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: rgba(8, 8, 8, 0.55);
}
.run-page .year-shoe-tag {
    color: var(--orange);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-right: 6px;
}

/* Shoe rotation — stacked rows so long product names stay readable. */
.run-page .shoe-chart { gap: 0; }
.run-page .shoe-chart .bar-row {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    grid-template-areas:
        "rank name  miles"
        "rank meta  miles"
        "track track track";
    column-gap: 18px;
    row-gap: 10px;
    align-items: center;
    padding: 20px 0;
    border-bottom: 2px solid rgba(8, 8, 8, 0.1);
    transition: background 0.15s ease;
}
.run-page .shoe-chart .bar-row:hover { background: rgba(255, 107, 53, 0.05); }
.run-page .shoe-chart .bar-row:first-child { padding-top: 0; }
.run-page .shoe-chart .bar-row:last-child { padding-bottom: 0; border-bottom: 0; }
.run-page .shoe-rank {
    grid-area: rank;
    align-self: center;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    font-family: var(--run-mono);
    font-size: 0.98rem;
    font-weight: 900;
    color: var(--paper);
    background: var(--ink);
    border: 2px solid var(--ink);
}
.run-page .shoe-chart .bar-row:first-child .shoe-rank { background: var(--orange); }
.run-page .shoe-chart .shoe-name {
    grid-area: name;
    font-size: 1.32rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.2;
    text-transform: none;
}
.run-page .shoe-miles {
    grid-area: miles;
    align-self: center;
    justify-self: end;
    display: grid;
    justify-items: end;
    row-gap: 2px;
    white-space: nowrap;
}
.run-page .shoe-miles-fig {
    display: flex;
    align-items: baseline;
    gap: 5px;
    font-family: var(--run-mono);
}
.run-page .shoe-miles-fig strong {
    font-size: clamp(1.3rem, 2.2vw, 2.2rem);
    font-weight: 900;
    line-height: 0.85;
    letter-spacing: -0.03em;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}
.run-page .shoe-miles-unit {
    font-size: 0.86rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--orange);
}
.run-page .shoe-runs {
    font-family: var(--run-mono);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(8, 8, 8, 0.55);
}
.run-page .shoe-meta {
    grid-area: meta;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-family: var(--run-mono);
    font-size: 0.86rem;
    letter-spacing: 0.01em;
}
.run-page .shoe-type {
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink);
    background: var(--yellow);
    border: 2px solid var(--ink);
    padding: 3px 9px;
}
.run-page .shoe-spec {
    font-weight: 600;
    color: rgba(8, 8, 8, 0.6);
}
.run-page .shoe-spec + .shoe-spec::before {
    content: "\00b7";
    color: var(--orange);
    font-weight: 900;
    padding-right: 8px;
}
.run-page .shoe-chart .bar-track { grid-area: track; height: 20px; }
.run-page .bar-year,
.run-page .bar-val {
    font-family: var(--run-mono);
    font-size: 0.78rem;
    font-weight: 900;
}
.run-page .bar-track {
    background: var(--field);
    border: 2px solid var(--ink);
    height: 20px;
    overflow: hidden;
}
.run-page .bar-fill { display: block; background: var(--orange); height: 100%; min-width: 4px; }
.run-page .bar-year-star,
.run-page .spark-year--partial { color: var(--orange); }
.run-page .partial-note {
    margin: 14px 0 0;
    font-family: var(--run-mono);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: rgba(8, 8, 8, 0.55);
}
.run-page .section-copy .partial-note { margin-top: 16px; }
.run-page .insight-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 28px;
}
.run-page .insight {
    border: 2px solid var(--ink);
    min-height: 140px;
    padding: 18px;
}
.run-page .insight:nth-child(1) { background: var(--yellow); }
.run-page .insight:nth-child(2) { background: var(--blue); color: #fff; }
.run-page .insight:nth-child(3) { background: var(--green); }
.run-page .insight .insight-label {
    display: block;
    font-family: var(--run-mono);
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.run-page .insight .insight-value {
    display: block;
    font-size: clamp(1.6rem, 3vw, 3rem);
    font-weight: 900;
    letter-spacing: -0.07em;
    line-height: 0.95;
}
/* Conditions — 4-up climate stats + median-pace-by-feels-like-band chart. */
.run-page .wx-grid { grid-template-columns: repeat(4, 1fr); }
.run-page .wx-grid .insight { min-height: 116px; }
.run-page .wx-grid .insight:nth-child(4) { background: var(--orange); color: #fff; }
.run-page .wx-grid .insight-value { font-size: clamp(1.3rem, 2.3vw, 2.1rem); }
.run-page .insight-sub {
    font-family: var(--run-mono);
    font-size: 0.74rem;
    font-weight: 700;
    margin-top: 4px;
    opacity: 0.6;
}
.run-page .insight-grid + .chart-card { margin-top: clamp(26px, 4vw, 44px); }
.run-page .wx-chart .bar-row {
    grid-template-columns: 104px minmax(0, 1fr) 96px;
    padding: 9px 0;
}
.run-page .wx-band { display: flex; flex-direction: column; gap: 4px; }
.run-page .wx-best-tag {
    font-size: 0.56rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--green);
}
.run-page .wx-chart .is-best .bar-fill { background: var(--green); }
.run-page .wx-chart .bar-val {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.15;
}
.run-page .wx-band-n {
    font-size: 0.62rem;
    font-weight: 700;
    color: rgba(8, 8, 8, 0.5);
    margin-top: 3px;
}
/* Band sub-label (climb-per-mile range, time-of-day range). */
.run-page .wx-band-sub {
    font-family: var(--run-mono);
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: rgba(8, 8, 8, 0.45);
}

/* Conditions extras strip — dew point / AQI / headwind callouts. */
.run-page .wx-extras {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: clamp(18px, 3vw, 28px);
}
.run-page .wx-extras span {
    flex: 1 1 200px;
    background: var(--field);
    border: 2px solid var(--ink);
    box-shadow: 4px 4px 0 var(--ink);
    padding: 12px 14px;
    font-family: var(--run-mono);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.35;
}
.run-page .wx-extras strong {
    font-weight: 900;
    letter-spacing: -0.03em;
}

/* ACWR — training-load balance card with zone-colored header. */
.run-page .acwr-card { padding: clamp(20px, 3vw, 30px); }
.run-page .acwr-head {
    display: flex;
    align-items: baseline;
    gap: 14px;
    border-bottom: 3px solid var(--ink);
    padding-bottom: 12px;
    margin-bottom: 14px;
}
.run-page .acwr-ratio {
    font-size: clamp(2.6rem, 6vw, 4rem);
    font-weight: 900;
    letter-spacing: -0.06em;
    line-height: 0.9;
}
.run-page .acwr-zone {
    font-family: var(--run-mono);
    font-size: 0.86rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 5px 10px;
    border: 2px solid var(--ink);
    box-shadow: 3px 3px 0 var(--ink);
}
.run-page .acwr-detraining .acwr-zone { background: var(--blue); color: #fff; }
.run-page .acwr-balanced .acwr-zone { background: var(--green); }
.run-page .acwr-building .acwr-zone { background: var(--yellow); }
.run-page .acwr-spike .acwr-zone { background: var(--orange); color: #fff; }
.run-page .acwr-note {
    font-size: 1.02rem;
    line-height: 1.5;
    margin: 0 0 16px;
    max-width: 60ch;
}
.run-page .acwr-legs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 26px;
    font-family: var(--run-mono);
    font-size: 0.82rem;
    font-weight: 700;
    color: rgba(8, 8, 8, 0.6);
}
.run-page .acwr-legs strong {
    font-weight: 900;
    font-size: 1.04rem;
    color: var(--ink);
}

/* The Dead Ends — ruled-out ideas, deliberately muted vs the live charts. */
.run-page .nontrends-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
.run-page .nontrend {
    background: var(--field);
    border: 2px solid var(--ink);
    padding: 18px 18px 20px;
    position: relative;
}
.run-page .nontrend-tag {
    display: inline-block;
    font-family: var(--run-mono);
    font-size: 0.58rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--paper);
    background: var(--ink);
    padding: 3px 7px;
    margin-bottom: 10px;
}
.run-page .nontrend h4 {
    font-size: 1.12rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    margin: 0 0 8px;
    text-decoration: line-through;
    text-decoration-thickness: 2px;
    text-decoration-color: var(--orange);
}
.run-page .nontrend p {
    font-size: 0.92rem;
    line-height: 1.5;
    margin: 0;
    color: rgba(8, 8, 8, 0.72);
}

/* Watch + firmware timeline */
.run-page .watch-section {
    padding: clamp(34px, 5vw, 70px) clamp(18px, 3vw, 42px);
    border-top: 3px solid var(--ink);
    border-bottom: 3px solid var(--ink);
    background: var(--field);
}
.run-page .watch-head { max-width: 760px; margin: 0 0 clamp(30px, 4vw, 52px); }
.run-page .watch-kicker {
    display: inline-block;
    font-family: var(--run-mono);
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    background: var(--ink);
    color: var(--paper);
    padding: 5px 10px;
    margin-bottom: 16px;
}
.run-page .watch-head h2 {
    font-size: clamp(1.9rem, 4.5vw, 3.7rem);
    font-weight: 900;
    letter-spacing: -0.06em;
    line-height: 0.92;
    margin: 0;
}
.run-page .watch-head p {
    color: var(--muted);
    font-size: clamp(0.98rem, 1.4vw, 1.18rem);
    font-weight: 700;
    line-height: 1.45;
    margin: 18px 0 0;
}
.run-page .watch-timeline {
    background: var(--paper);
    border: 2px solid var(--ink);
    box-shadow: 8px 8px 0 var(--ink);
    padding: clamp(34px, 4vw, 48px) clamp(18px, 3vw, 36px) clamp(22px, 3vw, 32px);
}
.run-page .watch-axis {
    display: grid;
    grid-template-columns: minmax(150px, 200px) minmax(0, 1fr);
    gap: clamp(14px, 2vw, 28px);
    margin: 0 0 18px;
}
.run-page .watch-axis-track {
    grid-column: 2;
    position: relative;
    height: 18px;
    border-bottom: 2px dashed rgba(8, 8, 8, 0.25);
}
.run-page .watch-year {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    font-family: var(--run-mono);
    font-size: 0.66rem;
    font-weight: 900;
    color: var(--muted);
}
.run-page .watch-row {
    display: grid;
    grid-template-columns: minmax(150px, 200px) minmax(0, 1fr);
    gap: clamp(14px, 2vw, 28px);
    align-items: center;
    padding: clamp(18px, 2.4vw, 26px) 0;
    border-top: 2px solid rgba(8, 8, 8, 0.12);
}
.run-page .watch-meta { display: flex; flex-direction: column; gap: 4px; }
.run-page .watch-name {
    font-size: clamp(1.05rem, 1.7vw, 1.5rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1;
}
.run-page .watch-note {
    font-family: var(--run-mono);
    font-size: 0.66rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}
.run-page .watch-track { position: relative; }
.run-page .watch-bar {
    position: relative;
    height: 30px;
    border: 2px solid var(--ink);
    box-shadow: 3px 3px 0 var(--ink);
}
.run-page .watch-row:nth-child(2) .watch-bar { background: var(--blue); }
.run-page .watch-row:nth-child(3) .watch-bar { background: var(--yellow); }
.run-page .watch-row:nth-child(4) .watch-bar { background: var(--orange); }
.run-page .watch-row:nth-child(5) .watch-bar { background: var(--green); }
.run-page .watch-tick {
    position: absolute;
    top: -3px;
    bottom: -3px;
    width: 2px;
    margin-left: -1px;
    background: var(--ink);
}
.run-page .watch-tick:hover { width: 4px; margin-left: -2px; background: var(--paper); outline: 1px solid var(--ink); }
.run-page .watch-span-start,
.run-page .watch-span-end {
    position: absolute;
    top: -17px;
    font-family: var(--run-mono);
    font-size: 0.6rem;
    font-weight: 900;
    color: var(--ink);
    white-space: nowrap;
}
.run-page .watch-span-start { left: 0; }
.run-page .watch-span-end { right: 0; }
.run-page .watch-fw-count {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    font-family: var(--run-mono);
    font-size: 0.64rem;
    font-weight: 800;
    color: var(--muted);
    white-space: nowrap;
}

.run-page .records-card { margin-top: clamp(26px, 4vw, 44px); }
.run-page .records-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
.run-page .record {
    background: var(--field);
    border: 2px solid var(--ink);
    padding: 16px;
}
.run-page .record .record-month {
    display: block;
    font-family: var(--run-mono);
    font-size: 0.74rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.run-page .record .record-val {
    display: block;
    font-size: clamp(1.3rem, 2.2vw, 2.2rem);
    font-weight: 700;
    letter-spacing: -0.05em;
}
.run-page .updated {
    font-family: var(--run-mono);
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--muted);
    margin: 18px 0 0;
}

@media (max-width: 960px) {
    .run-page .running-hero,
    .run-page .trend-section { grid-template-columns: 1fr; }
    .run-page .running-photo { max-width: 320px; }
    .run-page .dashboard,
    .run-page .insight-grid,
    .run-page .wx-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .run-page .running-copy h1 { font-size: clamp(2.8rem, 14vw, 4.8rem); }
    .run-page .dashboard,
    .run-page .insight-grid,
    .run-page .wx-grid,
    .run-page .nontrends-grid,
    .run-page .records-list { grid-template-columns: 1fr; }
    .run-page .watch-row { grid-template-columns: 1fr; gap: 14px; align-items: stretch; }
    .run-page .watch-axis { grid-template-columns: 1fr; }
    .run-page .watch-axis-track { grid-column: 1; }
    .run-page .bar-row { grid-template-columns: 58px minmax(0, 1fr) 64px; }
    .run-page .shoe-chart .bar-row { grid-template-columns: 40px minmax(0, 1fr) auto; }
    .run-page .shoe-chart .shoe-name { font-size: 1.12rem; }
}

/* Project explainer dropdown — bump the slightly-small content text. */
.slidedownContent { font-size: 1.1rem; line-height: 1.6; }

@media (max-width: 640px) {
    .rr-footer { flex-direction: column; align-items: flex-start; gap: 16px; }
    .rr-footer-right { align-items: flex-start; text-align: left; }
}

/* ── Interior-page helpers (safe on bare elements, no `.rr` parent) ─────── */

/* Statement-style page title — drop-in replacement for Bootstrap .display-* */
.neo-h1 {
    font-size: clamp(2.6rem, 7vw, 6rem);
    font-weight: 800;
    letter-spacing: -0.075em;
    line-height: 0.88;
    color: var(--ink);
}

/* Mono eyebrow above a statement title */
.neo-kicker {
    background: var(--ink);
    color: var(--paper);
    display: inline-block;
    font-family: var(--font-mono);
    font-size: clamp(0.62rem, 1vw, 0.78rem);
    font-weight: 900;
    letter-spacing: 0.18em;
    padding: 6px 10px;
    text-transform: uppercase;
}

/* Page-head wrapper to give consistent vertical rhythm on interior pages */
.neo-pagehead { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }

/* Neo form — wrap a <form> in .neo-form to style its raw inputs */
.neo-form label { display: block; font-weight: 800; letter-spacing: -0.02em; margin: 18px 0 6px; }
.neo-form input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
.neo-form textarea,
.neo-form select {
    background: var(--paper);
    border: 2px solid var(--ink);
    border-radius: 0;
    box-shadow: 3px 3px 0 var(--ink);
    color: var(--ink);
    font-family: inherit;
    font-size: 1rem;
    padding: 11px 13px;
    width: 100%;
}
.neo-form textarea { min-height: 140px; resize: vertical; }
.neo-form input:focus, .neo-form textarea:focus, .neo-form select:focus {
    box-shadow: 3px 3px 0 var(--orange);
    outline: none;
}
.neo-form p { margin-bottom: 6px; }
.neo-form .helptext { color: var(--muted); display: block; font-size: 0.82rem; margin-top: 4px; }
.neo-btn,
.neo-form button[type="submit"],
.neo-form .btn {
    background: var(--yellow);
    border: 2px solid var(--ink);
    border-radius: 0;
    box-shadow: 4px 4px 0 var(--ink);
    color: var(--ink);
    cursor: pointer;
    display: inline-block;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-top: 24px;
    padding: 12px 22px;
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.neo-btn:hover,
.neo-form button[type="submit"]:hover {
    background: var(--orange);
    box-shadow: 6px 6px 0 var(--ink);
    transform: translate(-2px, -2px);
}

/* ── Activity page: multi-sport rollup + abstract GPS scatter ───────── */
.run-page .sport-chart .bar-row {
    grid-template-columns: auto auto 1fr;
    grid-template-areas:
        "name meta stat"
        "track track track";
    column-gap: 14px;
    row-gap: 7px;
    align-items: center;
    padding: 13px 0;
    border-bottom: 2px solid rgba(8, 8, 8, 0.1);
}
.run-page .sport-chart { gap: 0; }
.run-page .sport-chart .bar-row:first-child { padding-top: 0; }
.run-page .sport-chart .bar-row:last-child { padding-bottom: 0; border-bottom: 0; }
.run-page .sport-name {
    grid-area: name;
    font-size: 0.96rem;
    font-weight: 900;
    letter-spacing: 0.005em;
    text-transform: none;
}
.run-page .sport-stat {
    grid-area: stat;
    justify-self: end;
    white-space: nowrap;
    font-family: var(--run-mono);
    font-size: 0.78rem;
    font-weight: 500;
    color: rgba(8, 8, 8, 0.6);
}
.run-page .sport-stat strong { font-weight: 900; color: var(--ink); }
.run-page .sport-meta {
    grid-area: meta;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-family: var(--run-mono);
    font-size: 0.7rem;
    font-weight: 600;
}
.run-page .sport-spec {
    background: var(--field);
    border: 2px solid var(--ink);
    padding: 1px 6px;
    letter-spacing: 0.02em;
}
.run-page .sport-chart .bar-track { grid-area: track; height: 16px; }

.run-page .map-card { position: relative; }
.run-page .map-card .activity-maps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}
.run-page .map-panel {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.run-page .map-card .activity-map {
    position: relative;
    aspect-ratio: 1 / 1;
    border: 2px solid var(--ink);
    background:
        repeating-linear-gradient(0deg, transparent 0 39px, rgba(8, 8, 8, 0.06) 39px 40px),
        repeating-linear-gradient(90deg, transparent 0 39px, rgba(8, 8, 8, 0.06) 39px 40px),
        var(--field);
}
.run-page .activity-map svg {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
}
.run-page .activity-map .map-lines path {
    fill: none;
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.run-page .activity-map .map-lines .is-other { stroke: var(--ink); opacity: 0.4; }
.run-page .activity-map .map-lines .is-run { stroke: var(--orange); opacity: 0.55; }
.run-page .map-panel-label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    font-family: var(--run-mono);
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.run-page .map-panel-label span {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--orange);
}
.run-page .map-caption {
    display: inline-block;
    margin-top: 16px;
    background: var(--paper);
    border: 2px solid var(--ink);
    box-shadow: 3px 3px 0 var(--ink);
    font-family: var(--run-mono);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    padding: 5px 9px;
}
@media (max-width: 720px) {
    .run-page .map-card .activity-maps { grid-template-columns: 1fr; }
}

/* ── Health page: qualitative sparklines, stress mix, full-rest ring ── */
.run-page .spark-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}
.run-page .spark-card {
    display: grid;
    grid-template-columns: 168px minmax(0, 1fr);
    grid-template-areas:
        "title chart"
        "drift chart"
        "foot  chart";
    align-content: center;
    align-items: center;
    column-gap: clamp(18px, 3vw, 34px);
    row-gap: 12px;
    min-width: 0;
}
.run-page .spark-card h3 { grid-area: title; align-self: end; margin-bottom: 0; }
.run-page .spark-row {
    grid-area: chart;
    display: flex;
    align-items: flex-end;
    gap: clamp(5px, 1vw, 12px);
    height: 116px;
    padding: 8px 0 0;
    border-bottom: 2px solid var(--ink);
    min-width: 0;
}
.run-page .spark-col {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    height: 100%;
}
.run-page .spark-bar {
    width: 100%;
    background: var(--ink);
    border: 2px solid var(--ink);
    min-height: 6px;
}
.run-page .spark-col:last-child .spark-bar { background: var(--orange); }
.run-page .spark-year {
    font-family: var(--run-mono);
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.01em;
}
.run-page .spark-drift {
    grid-area: drift;
    justify-self: start;
    align-self: start;
    background: var(--yellow);
    border: 2px solid var(--ink);
    box-shadow: 3px 3px 0 var(--ink);
    font-family: var(--run-mono);
    font-size: 0.74rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 4px 9px;
}
.run-page .spark-foot {
    grid-area: foot;
    justify-self: start;
    font-family: var(--run-mono);
    font-size: 0.66rem;
    font-weight: 700;
    color: rgba(8, 8, 8, 0.55);
}

.run-page .stress-card .stress-bar {
    display: flex;
    height: 46px;
    border: 2px solid var(--ink);
    overflow: hidden;
}
.run-page .stress-seg { height: 100%; border-right: 2px solid var(--ink); }
.run-page .stress-seg:last-child { border-right: 0; }
.run-page .stress-seg--calm { background: var(--green); }
.run-page .stress-seg--moderate { background: var(--yellow); }
.run-page .stress-seg--high { background: var(--orange); }
.run-page .stress-key {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 16px;
}
.run-page .stress-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--run-mono);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.02em;
}
.run-page .stress-swatch {
    width: 14px;
    height: 14px;
    border: 2px solid var(--ink);
}
.run-page .stress-tag--calm .stress-swatch { background: var(--green); }
.run-page .stress-tag--moderate .stress-swatch { background: var(--yellow); }
.run-page .stress-tag--high .stress-swatch { background: var(--orange); }

.run-page .ring-card { text-align: left; }
.run-page .rest-ring {
    --pct: 0;
    display: grid;
    place-items: center;
    width: 188px;
    height: 188px;
    border: 2px solid var(--ink);
    border-radius: 50%;
    background:
        conic-gradient(var(--orange) calc(var(--pct) * 1%), var(--field) 0);
    box-shadow: 6px 6px 0 var(--ink);
    margin: 6px auto 4px;
}
.run-page .rest-ring::after {
    content: "";
    grid-area: 1 / 1;
    width: 128px;
    height: 128px;
    border: 2px solid var(--ink);
    border-radius: 50%;
    background: var(--paper);
}
.run-page .rest-ring-num {
    grid-area: 1 / 1;
    z-index: 1;
    display: flex;
    align-items: baseline;
    font-weight: 900;
    font-size: 3.1rem;
    letter-spacing: -0.04em;
    line-height: 1;
}
.run-page .rest-ring-pct { font-size: 1.3rem; margin-left: 2px; }
.run-page .rest-ring-cap {
    grid-area: 1 / 1;
    z-index: 1;
    margin-top: 70px;
    font-family: var(--run-mono);
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.run-page .ring-note {
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 700;
    text-align: center;
    margin: 14px 0 0;
}

@media (max-width: 880px) {
    .run-page .spark-card {
        grid-template-columns: 1fr;
        grid-template-areas: "title" "chart" "drift" "foot";
        align-content: start;
    }
    .run-page .spark-card h3 { align-self: start; }
}

@media (max-width: 1180px) {
    .rr-hero { grid-template-columns: minmax(220px, 320px) minmax(0, 1fr); min-height: auto; }
    .rr-about-grid { grid-template-columns: 1fr 1fr; }
    .rr-strip { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 880px) {
    .rr-header { flex-direction: column; align-items: flex-start; }
    .rr-nav { justify-content: flex-start; width: 100%; }
    .rr-hero { gap: 46px; grid-template-columns: 1fr; padding-top: 42px; }
    .rr-copy { margin-left: 0; }
    .rr-hero h1 { font-size: clamp(2.55rem, 12.5vw, 5.5rem); max-width: 12ch; }
    .rr-intro { font-size: clamp(1.2rem, 6vw, 2.2rem); }
    .rr-about-grid, .rr-notes { grid-template-columns: 1fr; }
    .rr-note { border-right: 0; }
    .rr-section-label { font-size: clamp(2.4rem, 12vw, 4.4rem); }
    .rr-hero::before, .rr-hero::after { opacity: .45; }
}

@media (max-width: 560px) {
    .rr-strip { grid-template-columns: 1fr; }
    .rr-nav { justify-content: flex-end; width: auto; }
    .rr-nav-sep { display: none; }
    .rr-portrait { max-width: min(280px, 86vw); }
}

@media (prefers-reduced-motion: reduce) {
    .rr-status-dot { animation: none; }
    .rr-note:hover, .rr-portrait { transform: none; }
}

/* ============================================================
   Today's Outlook  (.outlook-page)
   Predicted daily metrics with calibrated ranges + confidence.
   ============================================================ */
.outlook-page {
    --ol-mono: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;
}
.outlook-page main {
    overflow: hidden;
    background:
        radial-gradient(circle at 10% 12%, rgba(79, 124, 255, 0.30), transparent 20rem),
        radial-gradient(circle at 90% 16%, rgba(247, 216, 74, 0.50), transparent 18rem),
        radial-gradient(circle at 82% 92%, rgba(255, 107, 53, 0.28), transparent 20rem);
}
.ol-hero {
    padding: clamp(48px, 7vw, 96px) clamp(18px, 3vw, 42px) clamp(32px, 4vw, 52px);
    border-bottom: 2px solid var(--ink);
}
.outlook-page .kicker {
    display: inline-block;
    background: var(--blue, #4f7cff);
    color: var(--paper);
    border: 2px solid var(--ink);
    box-shadow: 4px 4px 0 var(--ink);
    font-family: var(--ol-mono);
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    padding: 7px 13px;
    margin-bottom: clamp(18px, 3vw, 30px);
}
.ol-hero h1 {
    font-size: clamp(3rem, 9vw, 8.4rem);
    font-weight: 800;
    letter-spacing: -0.09em;
    line-height: 0.84;
    margin: 0;
}
.ol-sub {
    font-size: clamp(1rem, 1.8vw, 1.35rem);
    font-weight: 500;
    line-height: 1.4;
    max-width: 60ch;
    margin: clamp(20px, 3vw, 34px) 0 0;
}

/* --- outlook cards grid --- */
.ol-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: clamp(16px, 2vw, 26px);
    padding: clamp(28px, 4vw, 52px) clamp(18px, 3vw, 42px);
}
.ol-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--paper);
    border: 2px solid var(--ink);
    box-shadow: 6px 6px 0 var(--ink);
    padding: clamp(20px, 2.4vw, 30px);
}
.ol-card-label {
    font-family: var(--ol-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
}
.ol-card-label em { font-style: normal; opacity: 0.55; font-weight: 500; }
.ol-value {
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 0.9;
}
.ol-range {
    font-family: var(--ol-mono);
    font-size: 0.86rem;
    opacity: 0.75;
}
.ol-card-foot {
    font-size: 0.82rem;
    line-height: 1.35;
    margin: 4px 0 0;
    opacity: 0.72;
}
.ol-cond { border-style: dashed; }

/* --- run headline card --- */
.ol-run {
    grid-column: span 2;
    background: var(--ink);
    color: var(--paper);
}
.ol-run.is-on { background: var(--green); color: var(--ink); }
.ol-run .ol-card-label { color: inherit; }
.ol-run-fig { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.ol-run-pct {
    font-size: clamp(3.6rem, 9vw, 6.4rem);
    font-weight: 800;
    letter-spacing: -0.06em;
    line-height: 0.85;
}
.ol-run-pct .ol-pct { font-size: 0.4em; margin-left: 2px; }
.ol-run-verdict {
    font-family: var(--ol-mono);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding-bottom: 8px;
}
.ol-run .ol-card-foot { opacity: 0.82; }

/* --- confidence pills --- */
.ol-conf {
    align-self: flex-start;
    font-family: var(--ol-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    border: 2px solid var(--ink);
    padding: 4px 9px;
}
.conf-high   { background: var(--green); color: var(--ink); }
.conf-medium { background: var(--yellow); color: var(--ink); }
.conf-low    { background: var(--orange); color: var(--ink); }

/* --- explainer + accuracy --- */
.ol-explain {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: clamp(28px, 4vw, 60px);
    padding: clamp(32px, 5vw, 64px) clamp(18px, 3vw, 42px) clamp(56px, 8vw, 96px);
    border-top: 2px solid var(--ink);
}
.ol-explain h2 {
    font-size: clamp(1.6rem, 3.4vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    margin: 0 0 clamp(16px, 2vw, 26px);
}
.ol-steps { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 12px; }
.ol-steps li { font-size: 0.98rem; line-height: 1.45; }
.ol-note { font-family: var(--ol-mono); font-size: 0.82rem; opacity: 0.7; margin: 0 0 16px; }
.ol-acc-card {
    background: var(--paper);
    border: 2px solid var(--ink);
    box-shadow: 5px 5px 0 var(--ink);
    padding: clamp(16px, 2vw, 24px);
    margin-bottom: 18px;
}
.ol-acc-card h3 {
    font-size: 1rem;
    font-weight: 800;
    margin: 0 0 14px;
    letter-spacing: -0.01em;
}
.ol-acc-row { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.ol-acc-row span { font-size: 0.9rem; }
.ol-acc-row b { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; display: block; }
.ol-acc-foot { font-family: var(--ol-mono); font-size: 0.78rem; opacity: 0.65; margin: 14px 0 0; }
.ol-acc-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.ol-acc-table th, .ol-acc-table td {
    text-align: left; padding: 7px 8px; border-bottom: 1px solid rgba(0,0,0,0.15);
}
.ol-acc-table th { font-family: var(--ol-mono); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.05em; }
.ol-acc-table tr:last-child td { border-bottom: none; }

@media (max-width: 640px) {
    .ol-run { grid-column: span 1; }
}

/* ============================================================= *
 *  FLIGHTS  (/smart/flights/)                                    *
 *  Neo-brutalist logbook: light page, one dramatic dark world    *
 *  map panel with glowing great-circle arcs. Tokens from         *
 *  neo-theme.css; bar primitives mirror the run/outlook pages.   *
 * ============================================================= */
.flights-page {
    --fl-mono: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;
}
.flights-page main { overflow: hidden; }

.fl-hero {
    padding: clamp(48px, 7vw, 96px) clamp(18px, 3vw, 42px) clamp(30px, 4vw, 48px);
    border-bottom: 2px solid var(--ink);
}
.flights-page .kicker {
    display: inline-block;
    background: var(--orange);
    color: var(--ink);
    border: 2px solid var(--ink);
    box-shadow: 4px 4px 0 var(--ink);
    font-family: var(--fl-mono);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 7px 13px;
    margin-bottom: clamp(18px, 3vw, 28px);
}
.fl-hero h1 {
    font-size: clamp(3rem, 11vw, 9.5rem);
    font-weight: 800;
    letter-spacing: -0.09em;
    line-height: 0.82;
    margin: 0;
}
.fl-sub {
    font-size: clamp(1rem, 1.8vw, 1.35rem);
    font-weight: 500;
    line-height: 1.42;
    max-width: 62ch;
    margin: clamp(20px, 3vw, 32px) 0 0;
}

/* Provenance line under a dashboard's intro. Quieter than the sub-text: it is
   there for a reader who wants to know where the numbers came from, not part
   of the pitch. */
.fl-source,
.air-source {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    margin: 10px 0 0;
    max-width: 62ch;
    opacity: 0.7;
}

/* --- stat tiles --- */
.fl-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-bottom: 2px solid var(--ink);
}
.fl-stat {
    padding: clamp(20px, 3vw, 36px) clamp(16px, 2vw, 28px);
    border-right: 2px solid var(--ink);
}
.fl-stat:last-child { border-right: none; }
.fl-stat:nth-child(1) { background: var(--yellow); }
.fl-stat:nth-child(2) { background: var(--orange); }
.fl-stat:nth-child(3) { background: var(--blue); color: #fff; }
.fl-stat:nth-child(4) { background: var(--green); }
.fl-stat-label {
    display: block;
    font-family: var(--fl-mono);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.fl-stat-value {
    display: block;
    font-size: clamp(2.2rem, 5vw, 4.4rem);
    font-weight: 900;
    letter-spacing: -0.06em;
    line-height: 0.86;
}
.fl-stat-detail {
    display: block;
    font-family: var(--fl-mono);
    font-size: 0.8rem;
    font-weight: 700;
    margin-top: 12px;
}

/* --- world map panel --- */
.fl-map-wrap { padding: clamp(30px, 5vw, 68px) clamp(18px, 3vw, 42px); }
.fl-map-head { max-width: 66ch; margin-bottom: clamp(20px, 3vw, 32px); }
.fl-map-head h2 {
    font-size: clamp(2.2rem, 6vw, 5.4rem);
    font-weight: 900;
    letter-spacing: -0.085em;
    line-height: 0.86;
    margin: 0;
}
.fl-map-head p {
    color: var(--muted, rgba(8, 8, 8, 0.62));
    font-size: clamp(1rem, 1.4vw, 1.18rem);
    font-weight: 700;
    line-height: 1.45;
    margin: 18px 0 0;
}
.fl-map-stage { position: relative; }
.fl-map {
    display: block;
    width: 100%;
    height: auto;
    background:
        radial-gradient(120% 90% at 30% 8%, rgba(79, 124, 255, 0.12), transparent 60%),
        var(--ink);
    border: 2px solid var(--ink);
    box-shadow: 10px 10px 0 var(--ink);
}
.fl-ocean { fill: transparent; }

/* graticule — the "chart" grid behind the land */
.fl-grid-lines line { stroke: rgba(247, 244, 239, 0.055); stroke-width: 0.5; }
.fl-grid-lines line.is-equator {
    stroke: rgba(255, 107, 53, 0.16);
    stroke-width: 0.7;
    stroke-dasharray: 3 3;
}
.fl-land {
    fill: rgba(247, 244, 239, 0.09);
    stroke: rgba(247, 244, 239, 0.28);
    stroke-width: 0.5;
    stroke-linejoin: round;
}

/* great-circle corridors — glow + staggered draw-in on load */
.fl-arcs { filter: drop-shadow(0 0 1.3px rgba(255, 107, 53, 0.5)); }
.fl-arcs path {
    fill: none;
    stroke: var(--orange);
    stroke-opacity: 0.55;
    stroke-linecap: round;
    stroke-dasharray: 1;
    stroke-dashoffset: 0;
}
@media (prefers-reduced-motion: no-preference) {
    .fl-arcs path { animation: fl-draw 1.15s cubic-bezier(0.4, 0, 0.2, 1) backwards; }
}
@keyframes fl-draw {
    from { stroke-dashoffset: 1; stroke-opacity: 0; }
    to { stroke-dashoffset: 0; stroke-opacity: 0.55; }
}

/* radar ping on the home node */
.fl-ping circle {
    fill: none;
    stroke: var(--orange);
    stroke-width: 1.4;
    stroke-opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
}
@media (prefers-reduced-motion: no-preference) {
    .fl-ping circle { animation: fl-ping 3s ease-out infinite; }
    .fl-ping circle:nth-child(2) { animation-delay: 1.5s; }
}
@keyframes fl-ping {
    0% { transform: scale(1); stroke-opacity: 0.75; }
    70% { stroke-opacity: 0; }
    100% { transform: scale(6); stroke-opacity: 0; }
}

.fl-node { fill: var(--yellow); }
.fl-node.is-home {
    fill: var(--orange);
    stroke: var(--paper);
    stroke-width: 1.6;
}
.fl-leaders line {
    stroke: rgba(247, 244, 239, 0.4);
    stroke-width: 0.5;
}
.fl-labels text {
    fill: var(--paper);
    font-family: var(--fl-mono);
    font-size: 11px;
    font-weight: 700;
    paint-order: stroke;
    stroke: var(--ink);
    stroke-width: 3px;
    stroke-linejoin: round;
}

/* --- brutalist technical chrome over the map --- */
.fl-map-stage > .fl-mark,
.fl-map-stage > .fl-anno,
.fl-map-stage > .fl-legend { position: absolute; pointer-events: none; }
.fl-mark { width: 15px; height: 15px; }
.fl-mark--tl { top: 12px; left: 12px; border-top: 2px solid rgba(247, 244, 239, 0.55); border-left: 2px solid rgba(247, 244, 239, 0.55); }
.fl-mark--tr { top: 12px; right: 12px; border-top: 2px solid rgba(247, 244, 239, 0.55); border-right: 2px solid rgba(247, 244, 239, 0.55); }
.fl-mark--bl { bottom: 12px; left: 12px; border-bottom: 2px solid rgba(247, 244, 239, 0.55); border-left: 2px solid rgba(247, 244, 239, 0.55); }
.fl-mark--br { bottom: 12px; right: 12px; border-bottom: 2px solid rgba(247, 244, 239, 0.55); border-right: 2px solid rgba(247, 244, 239, 0.55); }
.fl-anno {
    font-family: var(--fl-mono);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: rgba(247, 244, 239, 0.5);
}
.fl-anno--tl { top: 15px; left: 36px; }
.fl-anno--bl { bottom: 15px; left: 36px; }
.fl-legend {
    bottom: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 9px 11px;
    background: rgba(8, 8, 8, 0.5);
    border: 1px solid rgba(247, 244, 239, 0.22);
}
.fl-legend-row {
    display: flex;
    align-items: center;
    gap: 7px;
    font-family: var(--fl-mono);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(247, 244, 239, 0.8);
}
.fl-legend-dot { display: inline-block; border-radius: 50%; background: var(--yellow); }
.fl-legend-dot--home { width: 9px; height: 9px; background: var(--orange); box-shadow: 0 0 0 1.5px var(--paper); }
.fl-legend-dot--sm { width: 5px; height: 5px; }
.fl-legend-dot--lg { width: 11px; height: 11px; margin-left: -2px; }
@media (max-width: 620px) { .fl-anno, .fl-legend { display: none; } }

/* --- slice charts --- */
.fl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: clamp(18px, 2.5vw, 32px);
    padding: 0 clamp(18px, 3vw, 42px) clamp(30px, 5vw, 60px);
}
.flights-page .chart-card {
    background: var(--paper);
    border: 2px solid var(--ink);
    box-shadow: 8px 8px 0 var(--ink);
    padding: clamp(18px, 3vw, 30px);
}
.flights-page .chart-card h3 {
    font-family: var(--fl-mono);
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin: 0 0 18px;
}
.flights-page .bar-list { display: grid; gap: 11px; }
.flights-page .bar-row {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 44px;
    align-items: center;
    gap: 12px;
}
.flights-page .bar-row--wide { grid-template-columns: 148px minmax(0, 1fr) 44px; }
.flights-page .bar-year,
.flights-page .bar-val {
    font-family: var(--fl-mono);
    font-size: 0.78rem;
    font-weight: 900;
}
.flights-page .bar-row--wide .bar-year {
    font-size: 0.72rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.flights-page .bar-val { text-align: right; }
.flights-page .bar-track {
    background: var(--field);
    border: 2px solid var(--ink);
    height: 18px;
    overflow: hidden;
}
.flights-page .bar-fill { display: block; background: var(--orange); height: 100%; min-width: 4px; }
.flights-page .bar-year-star { color: var(--orange); }
.flights-page .partial-note {
    margin: 16px 0 0;
    font-family: var(--fl-mono);
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(8, 8, 8, 0.55);
}

/* --- footer callouts --- */
.fl-foot {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: clamp(18px, 2.5vw, 32px);
    padding: 0 clamp(18px, 3vw, 42px) clamp(48px, 7vw, 92px);
}
.fl-callout {
    border: 2px solid var(--ink);
    box-shadow: 8px 8px 0 var(--ink);
    padding: clamp(22px, 3vw, 34px);
}
.fl-callout--blue { background: var(--blue); color: #fff; }
.fl-callout--orange { background: var(--orange); color: var(--ink); }
.fl-callout-label {
    display: block;
    font-family: var(--fl-mono);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.fl-callout-value {
    display: block;
    font-size: clamp(2.4rem, 6vw, 4.6rem);
    font-weight: 900;
    letter-spacing: -0.06em;
    line-height: 0.9;
    margin: 12px 0;
}
.fl-callout p { font-size: 0.98rem; font-weight: 700; line-height: 1.45; margin: 0; }
.fl-callout--blue a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.fl-callout--orange a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 720px) {
    .fl-stats { grid-template-columns: repeat(2, 1fr); }
    .fl-stat:nth-child(2) { border-right: none; }
    .fl-stat:nth-child(1), .fl-stat:nth-child(2) { border-bottom: 2px solid var(--ink); }
}

/* ============================================================= *
 *  THE AIR I BREATHE  (/smart/air/)                             *
 *  Neo-brutalist, green-accented (living room / plants). Line   *
 *  charts + centre-origin correlation bars. Tokens from         *
 *  neo-theme.css.                                               *
 * ============================================================= */
.air-page {
    --air-mono: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;
    --air-green: #2f8f4e;
}
.air-page main { overflow: hidden; }

.air-hero {
    padding: clamp(48px, 7vw, 96px) clamp(18px, 3vw, 42px) clamp(30px, 4vw, 48px);
    border-bottom: 2px solid var(--ink);
}
.air-page .kicker {
    display: inline-block;
    background: var(--green);
    color: var(--ink);
    border: 2px solid var(--ink);
    box-shadow: 4px 4px 0 var(--ink);
    font-family: var(--air-mono);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 7px 13px;
    margin-bottom: clamp(18px, 3vw, 28px);
}
.air-hero h1 {
    font-size: clamp(3rem, 11vw, 9.5rem);
    font-weight: 800;
    letter-spacing: -0.09em;
    line-height: 0.82;
    margin: 0;
}
.air-sub {
    font-size: clamp(1rem, 1.8vw, 1.35rem);
    font-weight: 500;
    line-height: 1.42;
    max-width: 62ch;
    margin: clamp(20px, 3vw, 32px) 0 0;
}

.air-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-bottom: 2px solid var(--ink);
}
.air-stat {
    padding: clamp(20px, 3vw, 36px) clamp(16px, 2vw, 28px);
    border-right: 2px solid var(--ink);
}
.air-stat:last-child { border-right: none; }
.air-stat:nth-child(1) { background: var(--green); }
.air-stat:nth-child(2) { background: var(--yellow); }
.air-stat:nth-child(3) { background: var(--blue); color: #fff; }
.air-stat:nth-child(4) { background: var(--orange); }
.air-stat-label {
    display: block;
    font-family: var(--air-mono);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.air-stat-value {
    display: block;
    font-size: clamp(2.2rem, 5vw, 4.4rem);
    font-weight: 900;
    letter-spacing: -0.06em;
    line-height: 0.86;
}
.air-stat-detail {
    display: block;
    font-family: var(--air-mono);
    font-size: 0.78rem;
    font-weight: 700;
    margin-top: 12px;
}

/* blocks */
.air-block { padding: clamp(30px, 5vw, 64px) clamp(18px, 3vw, 42px); }
.air-block--split {
    display: grid;
    grid-template-columns: minmax(240px, 0.5fr) minmax(0, 1fr);
    gap: clamp(24px, 4vw, 52px);
    align-items: start;
}
.air-block-head { max-width: 66ch; margin-bottom: clamp(20px, 3vw, 30px); }
.air-block--split .air-block-head { margin-bottom: 0; }
.air-block-head h2 {
    font-size: clamp(2.1rem, 5.5vw, 4.8rem);
    font-weight: 900;
    letter-spacing: -0.085em;
    line-height: 0.86;
    margin: 0;
}
.air-block-head p {
    color: var(--muted, rgba(8, 8, 8, 0.62));
    font-size: clamp(1rem, 1.4vw, 1.18rem);
    font-weight: 700;
    line-height: 1.45;
    margin: 18px 0 0;
}

/* line charts */
.air-chart-card {
    background: var(--paper);
    border: 2px solid var(--ink);
    box-shadow: 8px 8px 0 var(--ink);
    padding: clamp(14px, 2vw, 24px);
}
.air-chart { display: block; width: 100%; height: auto; }
.air-ref { stroke: rgba(8, 8, 8, 0.16); stroke-width: 1; stroke-dasharray: 4 4; }
.air-ref-label {
    fill: rgba(8, 8, 8, 0.5);
    font-family: var(--air-mono);
    font-size: 10px;
    font-weight: 700;
}
.air-area { fill: rgba(47, 143, 78, 0.14); }
.air-poly { fill: none; stroke: var(--air-green); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.air-peak { fill: var(--orange); stroke: var(--ink); stroke-width: 1.5; }
.air-trough { fill: var(--blue); stroke: var(--ink); stroke-width: 1.5; }
.air-xtick {
    fill: rgba(8, 8, 8, 0.55);
    font-family: var(--air-mono);
    font-size: 10px;
    font-weight: 700;
    text-anchor: middle;
}

/* centre-origin correlation bars */
.cor-card { display: grid; gap: 13px; }
.cor-row {
    display: grid;
    grid-template-columns: minmax(120px, 0.9fr) minmax(0, 1.4fr) 48px;
    align-items: center;
    gap: 14px;
}
.cor-label {
    font-family: var(--air-mono);
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.2;
}
.cor-track {
    position: relative;
    height: 22px;
    background: var(--field);
    border: 2px solid var(--ink);
}
.cor-zero {
    position: absolute;
    left: 50%;
    top: -2px;
    bottom: -2px;
    width: 2px;
    background: var(--ink);
    transform: translateX(-1px);
}
.cor-fill { position: absolute; top: 0; bottom: 0; }
.cor-fill.is-pos { background: var(--green); }
.cor-fill.is-neg { background: var(--orange); }
.cor-val {
    font-family: var(--air-mono);
    font-size: 0.82rem;
    font-weight: 900;
    text-align: right;
}
.cor-axis {
    display: flex;
    justify-content: space-between;
    margin: 6px 2px 0;
    font-family: var(--air-mono);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(8, 8, 8, 0.45);
}

/* footer callouts */
.air-foot {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: clamp(18px, 2.5vw, 32px);
    padding: 0 clamp(18px, 3vw, 42px) clamp(48px, 7vw, 92px);
}
.air-callout {
    border: 2px solid var(--ink);
    box-shadow: 8px 8px 0 var(--ink);
    padding: clamp(22px, 3vw, 32px);
}
.air-callout--green { background: var(--green); color: var(--ink); }
.air-callout--ink { background: var(--ink); color: var(--paper); }
.air-callout-label {
    display: block;
    font-family: var(--air-mono);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.air-callout-value {
    display: block;
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 900;
    letter-spacing: -0.05em;
    margin-bottom: 12px;
}
.air-callout p { font-size: 0.98rem; font-weight: 700; line-height: 1.45; margin: 14px 0 0; }
.air-tert { width: 100%; border-collapse: collapse; font-family: var(--air-mono); }
.air-tert th, .air-tert td {
    text-align: right;
    padding: 7px 6px;
    font-size: 0.76rem;
    font-weight: 700;
    border-bottom: 1.5px solid rgba(8, 8, 8, 0.25);
}
.air-tert th:first-child, .air-tert td:first-child { text-align: left; }
.air-tert th { font-weight: 900; text-transform: uppercase; font-size: 0.66rem; letter-spacing: 0.03em; }
.air-tert tr:last-child td { border-bottom: none; }

@media (max-width: 760px) {
    .air-stats { grid-template-columns: repeat(2, 1fr); }
    .air-stat:nth-child(2) { border-right: none; }
    .air-stat:nth-child(1), .air-stat:nth-child(2) { border-bottom: 2px solid var(--ink); }
    .air-block--split { grid-template-columns: 1fr; gap: 22px; }
    .air-block--split .air-block-head { margin-bottom: 4px; }
}

/* occupancy strip under the season timeline */
.air-strip { display: block; width: 100%; height: auto; margin-top: 8px; overflow: visible; }
.air-strip-cap {
    fill: rgba(8, 8, 8, 0.5);
    font-family: var(--air-mono);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.12em;
}
.occ-home { fill: var(--field); stroke: var(--ink); stroke-width: 1; }
.occ-flight { fill: var(--blue); }
.occ-away { fill: var(--orange); }
.occ-flag { fill: var(--orange); stroke: var(--ink); stroke-width: 1; }
.occ-flag-label {
    fill: var(--ink);
    font-family: var(--air-mono);
    font-size: 9px;
    font-weight: 900;
    text-anchor: middle;
}
.occ-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin-top: 12px;
    font-family: var(--air-mono);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.occ-legend span { display: flex; align-items: center; gap: 7px; }
.occ-key { width: 15px; height: 11px; border: 2px solid var(--ink); display: inline-block; }
.occ-key--home { background: var(--field); }
.occ-key--flight { background: var(--blue); }
.occ-key--away { background: var(--orange); }
.air-find {
    margin-top: clamp(16px, 2.4vw, 26px);
    background: var(--yellow);
    border: 2px solid var(--ink);
    box-shadow: 6px 6px 0 var(--ink);
    padding: clamp(18px, 2.5vw, 28px);
}
.air-find-tag {
    display: block;
    font-family: var(--air-mono);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.air-find p { margin: 0; font-size: 1rem; font-weight: 700; line-height: 1.5; }

/* indoor-vs-outdoor temperature (dual line + shaded gap) */
.temp-band { fill: rgba(47, 143, 78, 0.11); }
.temp-in { fill: none; stroke: var(--air-green); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.temp-out { fill: none; stroke: var(--blue); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.temp-key--in { background: var(--air-green); }
.temp-key--out { background: var(--blue); }
