/* =========================================================================
   SEIDR LABS — "Fable v2 · Atelier" redesign · 2026-07-12
   -------------------------------------------------------------------------
   Direction: LIGHT-FIRST, warm and premium. Cream paper + rich warm ink +
   deep FOREST GREEN as the primary + BRASS as the single accent. Airy,
   editorial, confident — the opposite of the rejected dark-navy v1 and the
   opposite of monotone: sections alternate cream / deep-green / sand bands.

   House-design standard, named on purpose (silence = slop):

   TYPE (two-font system, self-hosted — nginx CSP is font-src 'self';
   NEVER re-add Google Fonts <link> tags):
     display  Crimson Pro    variable 400–700 (+italic)  headlines, numerals
     body     Manrope        variable 400–700            everything readable
     mono     JetBrains Mono 400/500                     kickers, tags, data

   COLOUR ROLES (all AA-checked on their surfaces; names, never raw hex at
   call sites):
     paper       #faf6ee   page (warm cream)
     sand        #f1e9d7   alternate warm band
     card        #fffdf8   raised card surface
     ink         #23201a   body text        (15.1:1 on paper)
     ink-soft    #5d5545   secondary text   ( 6.8:1 on paper)
     line        #e5dcc6   hairlines
     line-strong #cabfa0   hover borders
     green       #1e4d38   PRIMARY — forest ( 9.0:1 on paper)
     green-bright#2c6a4d   hover / large accents
     green-deep  #12352a   dark band background
     on-green    #f6f1e3   cream text on green bands (11.8:1 on green-deep)
     on-green-mut#c2cdbd   muted text on green bands ( 6.9:1 on green-deep)
     brass       #8a5c14   ACCENT text — AA small on paper (5.3:1)
     brass-bright#c9963a   decorative only: ghost numerals, strokes, on-dark
     ok #1c7c4d · warn #a06414 · danger #b3352e  (status only, never decor)

   SPACING: one 8px scale — 4/8/12/16/24/32/48/64/80/96/128/160.
   RADIUS:  one system — sm 4 (inputs, chips) · md 8 (buttons, small cards) ·
            lg 16 (cards, panels) · pill (tags only).
   SHADOWS: named sm/md/lg — ONLY on the sticky header (sm), raised cards +
            panels (md), and the hero live-board / chat panel (lg). Nowhere else.
   ICONS:   inline stroke SVGs (Lucide-style, 1.75 stroke). Zero emoji-as-UI.
   MOTION:  hero wash drift, brass underline draw-in, live-dot pulse, reveal
            on scroll, card hover lift — every one disabled under
            prefers-reduced-motion.
   ========================================================================= */

/* ---------- fonts (latin subset, variable woff2, served from 'self') ---- */
@font-face {
    font-family: 'Crimson Pro';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/assets/fonts/crimson-pro-latin.woff2') format('woff2');
}
@font-face {
    font-family: 'Crimson Pro';
    font-style: italic;
    font-weight: 400 700;
    font-display: swap;
    src: url('/assets/fonts/crimson-pro-latin-italic.woff2') format('woff2');
}
@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/assets/fonts/manrope-latin.woff2') format('woff2');
}
@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 400 500;
    font-display: swap;
    src: url('/assets/fonts/jetbrains-mono-latin.woff2') format('woff2');
}

/* ---------- tokens ------------------------------------------------------ */
:root {
    color-scheme: only light;

    --paper:         #faf6ee;
    --sand:          #f1e9d7;
    --card:          #fffdf8;
    --ink:           #23201a;
    --ink-soft:      #5d5545;
    --line:          #e5dcc6;
    --line-strong:   #cabfa0;

    --green:         #1e4d38;
    --green-bright:  #2c6a4d;
    --green-deep:    #12352a;
    --green-ink:     #0d271f;
    --green-soft:    #e6eee1;
    --on-green:      #f6f1e3;
    --on-green-mut:  #c2cdbd;
    --line-on-green: rgba(246, 241, 227, 0.16);

    --brass:         #8a5c14;
    --brass-bright:  #c9963a;
    --brass-soft:    #f3e5c3;

    --ok:            #1c7c4d;
    --warn:          #a06414;
    --danger:        #b3352e;

    --space-1:  0.25rem;  /*   4px */
    --space-2:  0.5rem;   /*   8px */
    --space-3:  0.75rem;  /*  12px */
    --space-4:  1rem;     /*  16px */
    --space-6:  1.5rem;   /*  24px */
    --space-8:  2rem;     /*  32px */
    --space-12: 3rem;     /*  48px */
    --space-16: 4rem;     /*  64px */
    --space-20: 5rem;     /*  80px */
    --space-24: 6rem;     /*  96px */
    --space-32: 8rem;     /* 128px */
    --space-40: 10rem;    /* 160px */

    --radius-sm:   4px;
    --radius-md:   8px;
    --radius-lg:   16px;
    --radius-pill: 999px;

    --shadow-sm: 0 1px 2px rgba(35, 32, 26, 0.07);
    --shadow-md: 0 12px 32px -14px rgba(35, 32, 26, 0.22);
    --shadow-lg: 0 28px 64px -28px rgba(18, 53, 42, 0.38);

    --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-display: 'Crimson Pro', 'Iowan Old Style', 'Palatino Linotype', Palatino, serif;
    --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

    --header-h: 72px;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1.0625rem;        /* 17px — body never below 16px */
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; height: auto; }

a { color: var(--green); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { color: var(--green-bright); text-decoration-color: var(--brass-bright); }

:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 2px;
    border-radius: 2px;
}

::selection { background: var(--brass-soft); color: var(--ink); }

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    background: var(--green);
    color: var(--on-green);
    padding: var(--space-3) var(--space-4);
    border-radius: 0 0 var(--radius-md) 0;
    font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- type scale (12/17/19/24/32/44/64/96 rhythm) ------------------ */
h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.06;
    margin: 0 0 var(--space-6);
    letter-spacing: 0.002em;
    color: var(--ink);
}
h4, h5 { font-family: var(--font-body); font-weight: 700; margin: 0 0 var(--space-2); }

h1 { font-size: clamp(3rem, 7.4vw, 5.5rem); }
h2 { font-size: clamp(2.1rem, 4vw, 3.1rem); }
h3 { font-size: 1.65rem; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 var(--space-4); }
p:last-child { margin-bottom: 0; }

.lead {
    font-size: 1.2rem;
    line-height: 1.7;
    color: var(--ink-soft);
    max-width: 60ch;
}
.lead strong { color: var(--ink); }
.lead a { color: var(--green); }

.muted  { color: var(--ink-soft); }
.brass  { color: var(--brass); }
.serif-i { font-family: var(--font-display); font-style: italic; font-weight: 500; }

/* mono kicker — the editorial label above every section title */
.kicker {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--brass);
    margin-bottom: var(--space-6);
}
.kicker::before {
    content: "";
    display: inline-block;
    width: var(--space-8);
    height: 2px;
    background: var(--brass-bright);
}

/* brass underline flourish — one word per page, drawn in once */
.flourish { position: relative; display: inline-block; white-space: nowrap; }
.flourish svg {
    position: absolute;
    left: 0;
    bottom: -0.14em;
    width: 100%;
    height: 0.22em;
    overflow: visible;
    pointer-events: none;
}
.flourish svg path {
    fill: none;
    stroke: var(--brass-bright);
    stroke-width: 7;
    stroke-linecap: round;
    stroke-dasharray: 330;
    stroke-dashoffset: 330;
    animation: flourish-draw 900ms 450ms cubic-bezier(0.6, 0, 0.3, 1) forwards;
}
@keyframes flourish-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
    .flourish svg path { animation: none; stroke-dashoffset: 0; }
}

/* ---------- layout primitives ------------------------------------------ */
.container {
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: var(--space-8);
}

.section { padding-block: var(--space-32); }
.section-tight { padding-block: var(--space-24); }

/* the alternating band treatments — the anti-monotone system */
.band-sand { background: var(--sand); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band-dark {
    background:
        radial-gradient(60rem 30rem at 85% -20%, rgba(201, 150, 58, 0.14), transparent 60%),
        radial-gradient(50rem 30rem at 8% 120%, rgba(44, 106, 77, 0.5), transparent 65%),
        var(--green-deep);
    color: var(--on-green);
}
.band-dark h1, .band-dark h2, .band-dark h3 { color: var(--on-green); }
.band-dark .lead, .band-dark p { color: var(--on-green-mut); }
.band-dark .kicker { color: var(--brass-bright); }
.band-dark .kicker::before { background: var(--brass-bright); }
.band-dark a { color: var(--on-green); text-decoration-color: var(--brass-bright); }
.band-dark a:hover { color: #ffffff; }

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-8);
    margin-bottom: var(--space-16);
}
.section-head h2 { margin-bottom: 0; max-width: 24ch; }
.section-head .head-side { padding-bottom: var(--space-2); }

.arrow-link {
    font-weight: 700;
    color: var(--green);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    text-decoration: none;
}
.arrow-link svg { width: 17px; height: 17px; transition: transform 160ms ease; }
.arrow-link:hover { color: var(--green-bright); }
.arrow-link:hover svg { transform: translateX(4px); }

hr.rule { border: 0; border-top: 1px solid var(--line); margin: var(--space-12) 0; }

/* ---------- header ------------------------------------------------------ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(250, 246, 238, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}
.nav {
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: var(--space-8);
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-8);
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
}
.brand img { width: 32px; height: 32px; }
.brand .brand-labs { color: var(--green); }
.brand:hover { color: var(--ink); }

.nav-links { display: flex; align-items: center; gap: var(--space-8); }
.nav-links a {
    color: var(--ink-soft);
    font-size: 0.95rem;
    font-weight: 700;
    padding: var(--space-2) 0;
    text-decoration: none;
    border-bottom: 2px solid transparent;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.is-active { color: var(--green); border-bottom-color: var(--brass-bright); }
.nav-links .nav-cta {
    color: var(--on-green);
    background: var(--green);
    padding: var(--space-2) var(--space-6);
    border-radius: var(--radius-md);
    border-bottom: 0;
}
.nav-links .nav-cta:hover { background: var(--green-bright); color: var(--on-green); }
.nav-links a.nav-cta.is-active {
    color: var(--on-green);
    border-bottom: 0;
    outline: 2px solid var(--brass-bright);
    outline-offset: 2px;
}

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
    color: var(--ink);
    padding: var(--space-2) var(--space-3);
    cursor: pointer;
    /* measured 45x37 - under the 44px touch minimum, and this is the only way
       to open the menu on a phone. */
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
}
.nav-toggle svg { width: 20px; height: 20px; display: block; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

/* ---------- buttons ----------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-md);
    border: 1.5px solid var(--line-strong);
    background: transparent;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}
.btn:hover { border-color: var(--green); color: var(--green); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }

.btn-primary {
    background: var(--green);
    border-color: var(--green);
    color: var(--on-green);
    box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--green-bright); border-color: var(--green-bright); color: var(--on-green); box-shadow: var(--shadow-md); }

.btn-quiet { border-color: transparent; color: var(--green); padding-inline: var(--space-3); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.btn-quiet:hover { color: var(--green-bright); border-color: transparent; text-decoration-color: var(--brass-bright); }

/* buttons that sit on the dark green bands */
.band-dark .btn { border-color: var(--line-on-green); color: var(--on-green); }
.band-dark .btn:hover { border-color: var(--brass-bright); color: #ffffff; }
.band-dark .btn-primary { background: var(--on-green); border-color: var(--on-green); color: var(--green-deep); }
.band-dark .btn-primary:hover { background: #ffffff; border-color: #ffffff; color: var(--green-deep); }

.btn[disabled] { opacity: 0.55; cursor: default; }

.cta-row { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; }

/* ---------- tags / status ---------------------------------------------- */
.tag {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 3px var(--space-3);
    border-radius: var(--radius-pill);
    border: 1px solid var(--line-strong);
    color: var(--ink-soft);
    background: var(--paper);
}
.tag .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-soft); }
.tag-live   { color: var(--ok); border-color: rgba(28, 124, 77, 0.4); }
.tag-live .dot { background: var(--ok); }
.tag-field  { color: var(--brass); border-color: rgba(138, 92, 20, 0.4); }
.tag-field .dot { background: var(--brass-bright); }
.tag-dev    { color: var(--green-bright); border-color: rgba(44, 106, 77, 0.4); }
.tag-dev .dot { background: var(--green-bright); }
.tag-role   { color: var(--brass); border-color: rgba(138, 92, 20, 0.4); }
.tag-role .dot { background: var(--brass-bright); }
.tag-soon   { color: var(--ink-soft); }

.tag-row { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-4); }

/* ---------- hero -------------------------------------------------------- */
.hero {
    position: relative;
    overflow: hidden;
    padding-block: var(--space-32) var(--space-24);
    border-bottom: 1px solid var(--line);
    background: var(--paper);
}
/* two soft warm washes that drift very slowly — the "alive" paper */
.hero::before,
.hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(64px);
    pointer-events: none;
}
.hero::before {
    width: 52rem; height: 34rem;
    left: -14rem; top: -12rem;
    background: radial-gradient(closest-side, rgba(44, 106, 77, 0.13), transparent);
    animation: wash-drift-a 26s ease-in-out infinite alternate;
}
.hero::after {
    width: 46rem; height: 30rem;
    right: -12rem; top: 4rem;
    background: radial-gradient(closest-side, rgba(201, 150, 58, 0.16), transparent);
    animation: wash-drift-b 32s ease-in-out infinite alternate;
}
@keyframes wash-drift-a {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(4rem, 2rem, 0) scale(1.12); }
}
@keyframes wash-drift-b {
    from { transform: translate3d(0, 0, 0) scale(1.08); }
    to   { transform: translate3d(-4rem, 3rem, 0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
    .hero::before, .hero::after { animation: none; }
}
/* faint contour lines — the engineering-survey texture (inline svg) */
.hero-contour {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    color: var(--green);
    opacity: 0.055;
    pointer-events: none;
}
.hero > .container { position: relative; z-index: 1; }

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: var(--space-20);
    align-items: center;
}

.hero h1 { margin-bottom: var(--space-8); }
.hero h1 .h1-sub {
    display: block;
    font-size: 0.44em;
    font-style: italic;
    font-weight: 500;
    color: var(--green);
    margin-top: var(--space-4);
    line-height: 1.25;
}
.hero .lead { margin-bottom: var(--space-8); }

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3) var(--space-6);
    margin-top: var(--space-8);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    color: var(--ink-soft);
}
.hero-meta span { display: inline-flex; align-items: center; gap: var(--space-2); }
.hero-meta svg { width: 14px; height: 14px; color: var(--brass); }

/* the credential line — trust up front, right in the hero */
.hero-cred {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2) var(--space-3);
    margin-top: var(--space-6);
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--card);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    color: var(--ink-soft);
}
.hero-cred svg { width: 15px; height: 15px; color: var(--brass); flex: none; }
.hero-cred strong { color: var(--ink); font-weight: 500; }
.hero-cred .sep { color: var(--line-strong); }

/* the live board — systems this studio runs, right now */
.ops-panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.ops-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-4) var(--space-6);
    background: var(--green-deep);
    color: var(--on-green);
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
.ops-head .live-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #4fbe8a;
    animation: live-pulse 2.4s ease-out infinite;
}
@keyframes live-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(79, 190, 138, 0.55); }
    70%  { box-shadow: 0 0 0 9px rgba(79, 190, 138, 0); }
    100% { box-shadow: 0 0 0 0 rgba(79, 190, 138, 0); }
}
@media (prefers-reduced-motion: reduce) {
    .ops-head .live-dot { animation: none; }
}
.ops-list { list-style: none; margin: 0; padding: var(--space-2) 0; }
.ops-list li {
    display: grid;
    grid-template-columns: 14px 1fr auto;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-6);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
}
.ops-list li + li { border-top: 1px solid var(--line); }
.ops-list .sys { color: var(--ink); font-weight: 500; }
.ops-list .sys small { display: block; color: var(--ink-soft); font-weight: 400; font-size: 0.6875rem; margin-top: 1px; letter-spacing: 0.02em; }
.ops-list .st { font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 500; }
.ops-list .st-live  { color: var(--ok); }
.ops-list .st-field { color: var(--brass); }
.ops-list .st-dev   { color: var(--green-bright); }
.ops-list .odot { width: 7px; height: 7px; border-radius: 50%; justify-self: center; }
.ops-list .odot-live  { background: var(--ok); }
.ops-list .odot-field { background: var(--brass-bright); }
.ops-list .odot-dev   { background: var(--green-bright); }
.ops-foot {
    padding: var(--space-3) var(--space-6) var(--space-4);
    border-top: 1px solid var(--line);
    background: var(--paper);
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.06em;
    color: var(--ink-soft);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}
.ops-foot svg { width: 13px; height: 13px; color: var(--brass); flex: none; }

/* page hero (inner pages) — same warm washes, tighter */
.page-hero { padding-block: var(--space-24) var(--space-20); }
.page-hero h1 { margin-bottom: var(--space-6); }

/* ---------- proof band (deep green, credibility front and centre) -------- */
.proof-band { padding-block: var(--space-20); }
.proof-lead {
    max-width: 30ch;
    margin-bottom: var(--space-12);
}
.proof-lead h2 { margin-bottom: var(--space-3); }
.proof-lead p { max-width: 44ch; }
.proof-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-8);
}
.proof-item {
    padding-top: var(--space-6);
    border-top: 1px solid var(--line-on-green);
}
.proof-item svg { width: 26px; height: 26px; color: var(--brass-bright); margin-bottom: var(--space-4); }
.proof-item strong { display: block; font-size: 1.05rem; color: var(--on-green); margin-bottom: var(--space-1); }
.proof-item span { display: block; color: var(--on-green-mut); font-size: 0.9rem; }

/* ---------- offer lanes (what I do — numbered editorial rows) ----------- */
.lanes { border-top: 1px solid var(--line); }
.lane {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr) auto;
    gap: var(--space-12);
    align-items: center;
    padding: var(--space-16) 0;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
    color: inherit;
    transition: background 200ms ease;
}
a.lane:hover { background: rgba(241, 233, 215, 0.5); color: inherit; }
.lane-num {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 4.5rem;
    font-weight: 500;
    /* WCAG AA: --brass-bright at 0.55 measured 1.60:1 on --paper (needs 3:1 for
       large text). --brass at 0.8 measures 3.6:1 and keeps the numerals soft. */
    color: var(--brass);
    opacity: 0.8;
    line-height: 1;
}
.lane h3 { margin-bottom: var(--space-3); font-size: 1.9rem; }
.lane p { color: var(--ink-soft); max-width: 62ch; margin-bottom: 0; }
.lane p strong { color: var(--ink); }
.lane p .brass { color: var(--brass); font-weight: 700; }
.lane .lane-tags {
    margin-top: var(--space-4);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--ink-soft);
}
.lane .lane-tags span { border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 2px var(--space-2); background: var(--card); }
.lane-go {
    width: 52px; height: 52px;
    border: 1.5px solid var(--line-strong);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-soft);
    background: var(--card);
    transition: border-color 160ms ease, color 160ms ease, transform 160ms ease, background 160ms ease;
}
.lane-go svg { width: 20px; height: 20px; }
a.lane:hover .lane-go { border-color: var(--green); color: var(--on-green); background: var(--green); transform: translateX(4px); }

/* ---------- work cards (featured + catalogue) ---------------------------- */
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: var(--space-12);
    box-shadow: var(--shadow-md);
    transition: border-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}
.card h3 { margin-bottom: var(--space-3); }
.card > p { color: var(--ink-soft); }
.card p strong { color: var(--ink); }

a.card-link { display: block; color: inherit; text-decoration: none; }
a.card-link:hover { color: inherit; }
a.card-link:hover .card,
a.card-link:focus-visible .card {
    border-color: var(--line-strong);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}
@media (prefers-reduced-motion: reduce) {
    a.card-link:hover .card, a.card-link:focus-visible .card { transform: none; }
}

/* home: one wide feature + a 2×2 of generous cards — NOT a crammed bento */
.work-feature .card {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: var(--space-12);
    align-items: center;
}
.work-feature .card-media {
    align-self: stretch;
    border-radius: var(--radius-md);
    background:
        radial-gradient(24rem 16rem at 80% 0%, rgba(201, 150, 58, 0.28), transparent 60%),
        var(--green-deep);
    border: 1px solid var(--line);
    min-height: 260px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}
.work-feature .card-media svg.media-mark { position: absolute; inset: auto -10% -18% auto; width: 65%; height: auto; color: var(--brass-bright); opacity: 0.5; }
.work-feature .card-media .media-label {
    position: relative;
    padding: var(--space-4) var(--space-6);
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--on-green);
}
.work-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
    margin-top: var(--space-8);
}
.work-grid .card { height: 100%; display: flex; flex-direction: column; }
.work-grid .card .card-foot { margin-top: auto; padding-top: var(--space-8); }

.card-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    color: var(--ink-soft);
}

/* key-value spec list on project cards */
.kv {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: var(--space-2) var(--space-6);
    margin: var(--space-8) 0 0;
    padding-top: var(--space-6);
    border-top: 1px solid var(--line);
    font-size: 0.9rem;
}
.kv dt {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brass);
    padding-top: 2px;
}
.kv dd { margin: 0; color: var(--ink-soft); }
.kv dd strong { color: var(--ink); }

/* find-links row on project cards */
.find-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3) var(--space-8);
    margin-top: var(--space-8);
}
.find-links a {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    color: var(--green);
}
.find-links a:hover { color: var(--green-bright); }
.find-links svg { width: 15px; height: 15px; }

.feat-list { margin: 0 0 var(--space-4); padding-left: 1.2rem; color: var(--ink-soft); }
.feat-list li { margin-bottom: var(--space-3); }
.feat-list li::marker { color: var(--brass-bright); }
.feat-list strong { color: var(--ink); }

/* ---------- project catalogue groups ------------------------------------ */
.proj-jump {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-top: var(--space-8);
}
.proj-jump a {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: var(--green);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-pill);
    padding: var(--space-2) var(--space-4);
    text-decoration: none;
    background: var(--card);
}
.proj-jump a:hover { color: var(--on-green); border-color: var(--green); background: var(--green); }

.proj-group { padding-block: var(--space-20); }
.proj-group + .proj-group { border-top: 1px solid var(--line); }
.proj-group-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-6);
    margin-bottom: var(--space-12);
}
.proj-group-head h2 { margin: 0; font-size: 2rem; }
.proj-group-head h2 .group-num {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 500;
    /* was --brass-bright: measured 2.20-2.46:1 on --paper/--sand, under the 3:1
       large-text floor. --brass clears it on both band backgrounds. */
    color: var(--brass);
    margin-right: var(--space-3);
}
.proj-group-head .group-note { color: var(--ink-soft); font-size: 0.9rem; font-family: var(--font-mono); letter-spacing: 0.04em; }
.proj-group .card + .card { margin-top: var(--space-12); }

.video-wrap { margin: var(--space-8) 0; }
.video-wrap video {
    width: 100%;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: var(--green-deep);
}
.video-wrap figcaption { font-size: 0.85rem; margin-top: var(--space-3); }

.subsection-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
    margin: var(--space-8) 0;
}
.subsection {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: var(--space-8);
    background: var(--paper);
}
.subsection-head { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-3); }
.subsection-head svg { width: 20px; height: 20px; color: var(--green); }
.subsection-head h4 { margin: 0; }

/* ---------- demo (stock assistant mock) --------------------------------- */
.demo-wrap {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: var(--space-20);
    align-items: center;
}
.demo-copy .feat-list { margin-top: var(--space-6); }

.chat-panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.chat-title {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--green-deep);
    color: var(--on-green-mut);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
}
.chat-title .win-dots { display: inline-flex; gap: 5px; }
.chat-title .win-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-on-green); }
.chat-title .mock-badge {
    margin-left: auto;
    font-size: 0.625rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brass-bright);
    border: 1px solid rgba(201, 150, 58, 0.5);
    border-radius: var(--radius-pill);
    padding: 2px var(--space-2);
    white-space: nowrap;
}
.chat-log {
    padding: var(--space-6) var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    min-height: 320px;
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--line-strong) transparent;
    background: var(--paper);
}
.msg { display: flex; gap: var(--space-3); max-width: 88%; }
.msg-bot { align-self: flex-start; }
.msg-user { align-self: flex-end; flex-direction: row-reverse; }
.msg .who {
    flex: none;
    width: 28px; height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.625rem;
    letter-spacing: 0.04em;
}
.msg-bot .who { background: var(--green); color: var(--on-green); }
.msg-user .who { background: var(--sand); color: var(--ink-soft); border: 1px solid var(--line-strong); }
.msg .bubble {
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    line-height: 1.55;
}
.msg-bot .bubble { background: var(--card); border: 1px solid var(--line); border-top-left-radius: var(--radius-sm); box-shadow: var(--shadow-sm); }
.msg-user .bubble { background: var(--green-soft); border: 1px solid rgba(44, 106, 77, 0.25); border-top-right-radius: var(--radius-sm); }
.msg .bubble strong { color: var(--green); }
.msg .bubble .mono { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--brass); }
.msg .bubble .attach {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--green);
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-sm);
    padding: var(--space-1) var(--space-2);
    background: var(--card);
}
.msg .bubble .attach svg { width: 13px; height: 13px; }

.typing { display: inline-flex; gap: 4px; padding: var(--space-2) 0; }
.typing i {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--ink-soft);
    animation: typing-bounce 1.1s infinite ease-in-out;
}
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30% { transform: translateY(-4px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .typing i { animation: none; }
}

.chat-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    border-top: 1px solid var(--line);
    background: var(--card);
}
.chip {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--green);
    background: none;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-pill);
    padding: var(--space-2) var(--space-4);
    cursor: pointer;
    transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}
.chip:hover { border-color: var(--green); color: var(--on-green); background: var(--green); }
.chip[disabled] { opacity: 0.45; cursor: default; }
.chip[disabled]:hover { border-color: var(--line-strong); color: var(--green); background: none; }
.chat-note {
    padding: var(--space-3) var(--space-4);
    border-top: 1px solid var(--line);
    background: var(--card);
    font-size: 0.8125rem;
    color: var(--ink-soft);
}

/* ---------- services / offers ------------------------------------------- */
/*
 * A LONE FINAL CARD SPANS BOTH COLUMNS INSTEAD OF LEAVING A HOLE.
 * The grid is two columns, so an ODD number of products (three, since Virtual Doorbell
 * joined TradeJot and Werktyd) strands the last one beside an empty cell - which reads as a
 * layout that broke rather than a third product. `:last-child:nth-child(odd)` matches ONLY
 * when the final card is also odd-numbered, so this does nothing at all for an even count.
 */
.offer-grid > .offer-card:last-child:nth-child(odd) { grid-column: 1 / -1; }

@media (max-width: 860px) {
    /* Single column already - spanning is meaningless and would fight the stack. */
    .offer-grid > .offer-card:last-child:nth-child(odd) { grid-column: auto; }
}
.offer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
}
.offer-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: var(--space-12);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    transition: border-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}
.offer-card:hover { border-color: var(--line-strong); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
@media (prefers-reduced-motion: reduce) {
    .offer-card:hover { transform: none; }
}
.offer-head {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}
.offer-icon {
    flex: none;
    width: 52px; height: 52px;
    border-radius: var(--radius-md);
    background: var(--green-soft);
    border: 1px solid rgba(44, 106, 77, 0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--green);
}
.offer-icon svg { width: 25px; height: 25px; }
.offer-head h3 { margin: 0; font-size: 1.5rem; }
.offer-head .offer-sub { display: block; color: var(--ink-soft); font-size: 0.8125rem; margin-top: 2px; font-family: var(--font-mono); letter-spacing: 0.04em; }
.offer-card > p { color: var(--ink-soft); }
.offer-list {
    list-style: none;
    margin: var(--space-6) 0 var(--space-8);
    padding: 0;
    display: grid;
    gap: var(--space-3);
}
.offer-list li { display: flex; gap: var(--space-3); align-items: flex-start; color: var(--ink-soft); font-size: 0.95rem; }
.offer-list li svg { width: 17px; height: 17px; color: var(--ok); flex: none; margin-top: 4px; }
.offer-list li strong { color: var(--ink); }
.offer-cta { margin-top: auto; display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; padding-top: var(--space-4); }
.offer-fine {
    margin-top: var(--space-6);
    font-size: 0.85rem;
    color: var(--ink-soft);
    display: flex;
    gap: var(--space-2);
    align-items: flex-start;
}
.offer-fine svg { width: 15px; height: 15px; flex: none; margin-top: 3px; color: var(--brass); }

/* steps — how commissioning works */
.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-8);
    counter-reset: step;
}
.step {
    position: relative;
    border-top: 2px solid var(--line-strong);
    padding-top: var(--space-8);
}
.step::before {
    counter-increment: step;
    content: "0" counter(step);
    display: block;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 3.5rem;
    font-weight: 500;
    color: var(--brass-bright);
    opacity: 0.6;
    line-height: 1;
    margin-bottom: var(--space-6);
}
.step h4 { margin-bottom: var(--space-3); font-size: 1.15rem; }
.step p { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }

/* steps on the deep-green band (services · how commissioning works) */
.band-dark .step { border-top-color: var(--line-on-green); }
.band-dark .step::before { opacity: 0.8; }
.band-dark .step h4 { color: var(--on-green); }
.band-dark .step p { color: var(--on-green-mut); }

/* freelance profile cards */
.freelance-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-8); }
.freelance-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-6);
    border: 1.5px dashed var(--line-strong);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
    background: var(--paper);
}
.freelance-card .offer-icon { border-style: dashed; background: var(--card); }
.freelance-card > div { flex: 1 1 14rem; min-width: 0; }
.freelance-card strong { display: block; }
.freelance-card > div > span { display: block; color: var(--ink-soft); font-size: 0.875rem; margin-top: var(--space-1); }
.freelance-card .tag { margin-left: auto; flex: none; }

/* ---------- forms -------------------------------------------------------- */
.form-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: var(--space-12);
    box-shadow: var(--shadow-md);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--space-8); }
.form-grid .span-2 { grid-column: span 2; }

.field { display: block; margin-bottom: var(--space-6); }
.field > span {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-bottom: var(--space-2);
}
.field > span em { font-style: normal; color: var(--brass); letter-spacing: 0.06em; }
.field input,
.field select,
.field textarea {
    width: 100%;
    background: var(--paper);
    color: var(--ink);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    padding: var(--space-3) var(--space-4);
    font: inherit;
    font-size: 1rem;
}
.field input::placeholder, .field textarea::placeholder { color: #8d8471; }
.field select { appearance: none; -webkit-appearance: none; }
.select-wrap { position: relative; display: block; }
.select-wrap::after {
    content: "";
    position: absolute;
    right: var(--space-4);
    top: 50%;
    width: 8px; height: 8px;
    border-right: 1.5px solid var(--ink-soft);
    border-bottom: 1.5px solid var(--ink-soft);
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: 2px solid var(--green);
    outline-offset: 1px;
    border-color: var(--green);
}
.field textarea { min-height: 170px; resize: vertical; }

.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.form-msg {
    border-radius: var(--radius-sm);
    padding: var(--space-3) var(--space-4);
    margin-bottom: var(--space-6);
    font-size: 0.95rem;
}
.form-msg.ok  { background: var(--green-soft); border: 1px solid rgba(28, 124, 77, 0.5); color: #14563a; }
.form-msg.err { background: #f9e5e2; border: 1px solid var(--danger); color: #7c241f; }

.after-send { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-6); }
.after-send li { display: flex; gap: var(--space-4); align-items: flex-start; color: var(--ink-soft); font-size: 0.95rem; }
.after-send svg { width: 19px; height: 19px; color: var(--brass); flex: none; margin-top: 2px; }
.after-send strong { color: var(--ink); }

/* ---------- about page --------------------------------------------------- */
.split {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
    gap: var(--space-20);
    align-items: start;
}
.split h2 { font-size: 1.9rem; margin-top: var(--space-16); }
.split h2:first-child { margin-top: 0; }
.split p { color: var(--ink-soft); max-width: 66ch; }
.split p strong { color: var(--ink); }

.portrait {
    position: sticky;
    top: calc(var(--header-h) + var(--space-6));
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: var(--space-8);
    text-align: center;
}
.avatar {
    width: 92px; height: 92px;
    margin: 0 auto var(--space-4);
    border-radius: 50%;
    background: var(--green-deep);
    border: 2px solid var(--brass-bright);
    color: var(--on-green);
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}
.portrait-name { margin-bottom: var(--space-1); font-size: 1.4rem; }
.portrait-role { font-size: 0.9rem; margin-bottom: 0; }
.portrait .divider { border: 0; border-top: 1px solid var(--line); margin: var(--space-6) 0; }
.portrait .kv { border-top: 0; padding-top: 0; margin-top: 0; grid-template-columns: 1fr; gap: var(--space-1); text-align: left; }
.portrait .kv dt { margin-top: var(--space-3); }
.portrait .kv dt:first-child { margin-top: 0; }
.side-label {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--brass);
    margin: 0 0 var(--space-3);
    text-align: left;
}
.cred-list { list-style: none; margin: 0; padding: 0; text-align: left; color: var(--ink-soft); font-size: 0.9rem; display: grid; gap: var(--space-2); }
.cred-list li { display: flex; gap: var(--space-2); align-items: center; }
.cred-list svg { width: 15px; height: 15px; color: var(--brass-bright); flex: none; }

.principles { list-style: none; margin: var(--space-8) 0 0; padding: 0; display: grid; gap: var(--space-6); }
.principles li { display: flex; gap: var(--space-4); align-items: flex-start; }
.principles svg { width: 22px; height: 22px; color: var(--green); flex: none; margin-top: 3px; }
.principles strong { display: block; color: var(--ink); }
.principles span { color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- CTA band (deep green again — the closing chord) --------------- */
.cta-band { border-top: 1px solid var(--line); }
.cta-band .inner {
    padding-block: var(--space-24);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-12);
    align-items: center;
}
.cta-band h2 { margin-bottom: var(--space-3); }
.cta-band p { margin: 0; max-width: 52ch; }

/* ---------- 404 ----------------------------------------------------------- */
.err-hero { position: relative; }
.err-code {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 500;
    font-size: clamp(7rem, 22vw, 15rem);
    line-height: 1;
    color: var(--brass-bright);
    opacity: 0.28;
    display: block;
    margin-bottom: calc(-1 * var(--space-8));
    user-select: none;
}

/* ---------- footer (warm near-black — third band colour) ------------------ */
.site-footer {
    background: var(--ink);
    color: #d8d1bf;
    padding-block: var(--space-20) var(--space-8);
    font-size: 0.9rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 4fr) repeat(2, minmax(0, 2.5fr));
    gap: var(--space-12);
    padding-bottom: var(--space-12);
    border-bottom: 1px solid rgba(216, 209, 191, 0.16);
}
.footer-brand .brand { font-size: 1.25rem; color: #f4efe2; }
.footer-brand .brand:hover { color: #ffffff; }
.footer-brand .brand .brand-labs { color: var(--brass-bright); }
.footer-brand p { color: #b3ab97; margin: var(--space-4) 0; max-width: 30ch; font-size: 0.9rem; }
.footer-col h4 {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--brass-bright);
    margin-bottom: var(--space-4);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.footer-col a { color: #b3ab97; text-decoration: none; }
.footer-col a:hover { color: #f4efe2; }
.footer-col .soon { color: #b3ab97; }
.footer-col .soon small {
    font-family: var(--font-mono);
    /* was 0.625rem/10px at 0.8 opacity = 4.42:1, just under the 4.5:1 floor.
       11px at full opacity clears it and stops the label reading as a smudge. */
    font-size: 0.6875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--brass-bright);
    margin-left: var(--space-2);
}
.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding-top: var(--space-8);
    color: #b3ab97;
    font-size: 0.85rem;
}
.runic { color: var(--brass-bright); display: inline-flex; align-items: center; gap: var(--space-3); }
.rune-word { height: 14px; width: auto; }

/* ---------- reveal on scroll --------------------------------------------- */
.reveal { opacity: 0; transform: translateY(16px); }
.reveal.is-in {
    opacity: 1;
    transform: none;
    transition: opacity 520ms ease, transform 520ms ease;
}
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; }
    .reveal.is-in { transition: none; }
    .card, a.card-link:hover .card, .btn, .lane-go, .offer-card { transition: none; transform: none; }
}

/* ---------- breakpoints --------------------------------------------------- */
@media (max-width: 1020px) {
    .hero-grid { grid-template-columns: 1fr; gap: var(--space-12); }
    .ops-panel { max-width: 640px; }
    .demo-wrap { grid-template-columns: 1fr; gap: var(--space-12); }
    .split { grid-template-columns: 1fr; gap: var(--space-12); }
    .portrait { position: static; max-width: 480px; }
    .proof-grid { grid-template-columns: 1fr 1fr; gap: var(--space-8); }
    .work-feature .card { grid-template-columns: 1fr; }
    .work-feature .card-media { min-height: 200px; order: -1; }
}

@media (max-width: 760px) {
    .section { padding-block: var(--space-20); }
    .section-tight { padding-block: var(--space-16); }
    .hero { padding-block: var(--space-20) var(--space-16); }
    .page-hero { padding-block: var(--space-16) var(--space-12); }

    .nav-toggle { display: inline-flex; }
    .nav-links {
        position: absolute;
        top: var(--header-h);
        left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--paper);
        border-bottom: 1px solid var(--line);
        padding: var(--space-2) var(--space-8) var(--space-8);
        display: none;
        box-shadow: var(--shadow-md);
    }
    .nav-links.is-open { display: flex; }
    .nav-links a { padding: var(--space-4) 0; border-bottom: 1px solid var(--line); }
    .nav-links a.is-active { border-bottom-color: var(--brass-bright); }
    .nav-links .nav-cta { margin-top: var(--space-4); text-align: center; }

    .work-grid { grid-template-columns: 1fr; }
    .card { padding: var(--space-8); }
    .work-feature .card { gap: var(--space-8); }

    .lane { grid-template-columns: 1fr; gap: var(--space-4); padding: var(--space-12) 0; }
    .lane-num { font-size: 2.75rem; }
    .lane-go { display: none; }

    .offer-grid, .freelance-grid { grid-template-columns: 1fr; }
    .offer-card { padding: var(--space-8); }
    .steps { grid-template-columns: 1fr; gap: var(--space-12); }
    .subsection-grid { grid-template-columns: 1fr; }
    .form-card { padding: var(--space-8); }
    .form-grid { grid-template-columns: 1fr; }
    .form-grid .span-2 { grid-column: span 1; }

    .section-head { flex-direction: column; align-items: flex-start; gap: var(--space-3); margin-bottom: var(--space-12); }
    .cta-band .inner { grid-template-columns: 1fr; padding-block: var(--space-20); }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-8); }
    .footer-brand { grid-column: span 2; }
}

@media (max-width: 560px) {
    .container { padding-inline: var(--space-4); }
    .nav { padding-inline: var(--space-4); }
    .proof-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-brand { grid-column: span 1; }
    .kv { grid-template-columns: 1fr; gap: var(--space-1); }
    .kv dt { margin-top: var(--space-3); }
    .chat-log { min-height: 260px; }
    .hero-cred { font-size: 0.6875rem; }

    /* The badge is nowrap and margin-left:auto in a flex row that cannot shrink,
       so at 375px it ran 62px past the panel, which clips it (overflow:hidden)
       and sliced the word: "INTERACTIVE MOCK - SAMPLE DAT". Let the row wrap so
       the badge drops onto its own line instead of being cut. */
    .chat-title { flex-wrap: wrap; row-gap: var(--space-2); }
    .chat-title .mock-badge { margin-left: 0; }

    /* Kill orphaned separators: at this width the credential list wraps and left
       a dangling "-" at the end of a line. Facts stay whole, gap does the work. */
    .hero-cred { column-gap: var(--space-3); }
    .hero-cred .sep { display: none; }
}

/* =========================================================================
   RESEARCH / LONG-FORM ARTICLE — appended 2026-07-28 (lane seidr-research-page)
   -------------------------------------------------------------------------
   Extends the Fable v2 system to the research practice: /research.html and
   /research/quantum-brain-report.html. No token is redefined and no rule
   above this banner is modified — this block is PURELY ADDITIVE, so the six
   pages already live keep byte-identical styling and did not need a re-walk.

   Reused from the system above (deliberately, so the pages read as one site):
     .container .section .section-tight .band-sand .band-dark .kicker .lead
     .muted .brass .serif-i .card .btn .btn-primary .cta-row .tag .tag-*
     .kv .feat-list .section-head .reveal .site-header .site-footer

   New here, all verified collision-free against the rules above before use.
   NOTE: .divider is scoped to .portrait upstream, so long-form gets its own
   .rule element rather than silently rendering an unstyled <hr>.
   ========================================================================= */

/* ---------- study index: asymmetric, not a symmetric card grid ---------- */
.study-list {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: var(--space-8);
    align-items: start;
}
.study-link { text-decoration: none; color: inherit; display: block; }
.study-link:hover .card { border-color: var(--line-strong); transform: translateY(-2px); }
.study-card .tag { margin-bottom: var(--space-6); }
.study-card h3 { font-size: 1.9rem; }
.study-card.is-quiet {
    background: transparent;
    box-shadow: none;
    border-style: dashed;
}
.study-card.is-quiet h3 { font-size: 1.5rem; color: var(--ink-soft); }
.study-go {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-6);
    font-weight: 700;
    color: var(--green);
}
.study-go svg { width: 18px; height: 18px; }
.study-link:hover .study-go { color: var(--green-bright); }

/* ---------- the paper cover — a dark band gives the study a real opening */
.paper-head { max-width: 60rem; }
.paper-title {
    font-size: clamp(2.2rem, 4.4vw, 3.4rem);
    margin-bottom: var(--space-6);
}
.paper-sub {
    font-size: 1.15rem;
    line-height: 1.7;
    max-width: 62ch;
}
.paper-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: var(--space-6) var(--space-8);
    margin: var(--space-12) 0 0;
    padding-top: var(--space-8);
    border-top: 1px solid var(--line-on-green);
}
.paper-meta dt {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brass-bright);
    margin-bottom: var(--space-2);
}
.paper-meta dd { margin: 0; color: var(--on-green); font-size: 0.98rem; line-height: 1.55; }
.paper-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    margin-top: var(--space-12);
}

/* ---------- the prose column ------------------------------------------- */
.prose { max-width: 68ch; margin-inline: auto; }
.prose > h3 {
    font-size: 2rem;
    margin-top: var(--space-20);
    margin-bottom: var(--space-6);
}
.prose > h3:first-child { margin-top: 0; }
.prose > h4 { font-size: 1.1rem; margin-top: var(--space-12); }
.prose p { color: var(--ink-soft); }
.prose p strong { color: var(--ink); }
.prose em { color: var(--ink); }
.prose sup { font-size: 0.72em; line-height: 0; }

/* Horizontal rules: use the UPSTREAM `hr.rule` (line 305) -- do not redeclare
   a bare `.rule` here. `hr.rule` is (0,1,1) and would silently win over it, so
   the redeclaration is dead code that reads as if it were in force. Verified by
   rendering contact.html (which already uses <hr class="rule">) against both
   stylesheets: geometry and colour identical, so nothing live moved.
   `.divider` is a different thing -- it IS scoped to .portrait upstream and so
   renders unstyled outside it. Long-form uses hr.rule. */

/* ---------- findings ---------------------------------------------------- */
/* Deliberately NOT a thick coloured left border on a rounded card — that is
   the house-standard's named AI tell. The probe id does the labelling work. */
.findings { display: grid; gap: var(--space-8); margin: var(--space-12) 0; }
.finding {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: var(--space-12);
    box-shadow: var(--shadow-md);
}
.probe-id {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brass);
    background: var(--brass-soft);
    border-radius: var(--radius-sm);
    padding: 2px var(--space-2);
    margin-bottom: var(--space-4);
}
.finding h4 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--space-4);
    color: var(--ink);
}
.finding p { color: var(--ink-soft); }
.verdict {
    margin: var(--space-6) 0 0;
    padding-top: var(--space-6);
    border-top: 1px solid var(--line);
    color: var(--ink) !important;
    font-size: 0.98rem;
}
.verdict-label {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brass);
    margin-right: var(--space-3);
}

/* ---------- callout — sand panel, no coloured left bar ------------------ */
.callout {
    background: var(--sand);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
    font-size: 1.08rem;
    line-height: 1.7;
    color: var(--ink) !important;
}
.callout strong { color: var(--ink); }

/* ---------- tables ------------------------------------------------------ */
.table-wrap { overflow-x: auto; margin: var(--space-8) 0; }
.verdict-table, .data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    min-width: 34rem;
}
.verdict-table th, .data-table th {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brass);
    text-align: left;
    background: var(--sand);
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--line-strong);
}
.verdict-table td, .data-table td {
    padding: var(--space-4);
    border-bottom: 1px solid var(--line);
    color: var(--ink-soft);
    vertical-align: top;
}
.verdict-table td strong, .data-table td strong { color: var(--ink); }
.verdict-table tbody tr:last-child td,
.data-table tbody tr:last-child td { border-bottom: 0; }

/* ---------- references -------------------------------------------------- */
.refs { list-style: none; counter-reset: ref; margin: var(--space-8) 0 0; padding: 0; }
.refs li {
    counter-increment: ref;
    position: relative;
    padding-left: var(--space-12);
    padding-bottom: var(--space-4);
    margin-bottom: var(--space-4);
    border-bottom: 1px solid var(--line);
    color: var(--ink-soft);
    font-size: 0.95rem;
    line-height: 1.6;
}
.refs li:last-child { border-bottom: 0; }
.refs li::before {
    content: counter(ref);
    position: absolute;
    left: 0;
    top: 2px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--brass);
}
.refs em { color: var(--ink); font-style: italic; }
.venue { color: var(--ink); font-style: italic; }
.doi { font-family: var(--font-mono); font-size: 0.8rem; color: var(--ink-soft); }

/* ---------- provenance -------------------------------------------------- */
.provenance {
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--ink-soft);
    background: var(--sand);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
}
.provenance strong { color: var(--ink); }

/* =========================================================================
   TECHNICAL REPORT — /research/quantum-brain-report.html
   ========================================================================= */
.report-head { max-width: 62rem; }
.report-title { font-size: clamp(2.1rem, 4.2vw, 3.2rem); margin-bottom: var(--space-6); }
.report-byline {
    font-size: 0.98rem;
    color: var(--on-green-mut);
    margin-bottom: var(--space-8);
}
.report-byline strong { color: var(--on-green); }
.report-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: var(--space-6) var(--space-8);
    margin: 0;
    padding-top: var(--space-8);
    border-top: 1px solid var(--line-on-green);
}
.report-meta dt {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brass-bright);
    margin-bottom: var(--space-2);
}
.report-meta dd { margin: 0; color: var(--on-green); font-size: 0.95rem; line-height: 1.55; }

.abstract {
    background: var(--sand);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: var(--space-12);
    margin-bottom: var(--space-12);
}
.abstract h2 {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--brass);
    margin-bottom: var(--space-6);
}
.abstract p { color: var(--ink-soft); font-size: 1rem; }
.keywords {
    margin-top: var(--space-6);
    padding-top: var(--space-6);
    border-top: 1px solid var(--line);
    font-size: 0.88rem;
    color: var(--ink-soft);
}
.keywords strong {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brass);
}

/* table of contents */
.toc {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
    margin-bottom: var(--space-16);
}
.toc h2 {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--brass);
    margin-bottom: var(--space-6);
}
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; columns: 2; column-gap: var(--space-12); }
.toc li { counter-increment: toc; margin-bottom: var(--space-3); break-inside: avoid; }
@media (max-width: 640px) { .toc ol { columns: 1; } }
.toc li::before {
    content: counter(toc) ".";
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--brass);
    margin-right: var(--space-3);
}
.toc a { color: var(--ink); text-decoration-color: var(--line-strong); }
.toc a:hover { color: var(--green); }

/* numbered section headings */
.sec-no {
    font-family: var(--font-mono);
    font-size: 0.8em;
    color: var(--brass);
    margin-right: var(--space-3);
}

/* equations */
.eqn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-8);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: var(--space-6) var(--space-8);
    margin: var(--space-8) 0;
    overflow-x: auto;
}
.math {
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: var(--ink);
    white-space: nowrap;
}
.math .var { font-style: italic; }
.math .op { color: var(--ink-soft); margin: 0 0.25em; }
.math .n { font-family: var(--font-mono); font-size: 0.92em; }
.eqn-no { font-family: var(--font-mono); font-size: 0.8rem; color: var(--brass); flex: none; }

.fignote {
    font-size: 0.86rem;
    color: var(--ink-soft);
    margin-top: var(--space-3);
    padding-left: var(--space-4);
    border-left: 2px solid var(--line-strong);
}
/* limitations list — hairline rows with an en-dash marker, matching the
   original document's intent rather than turning candour into bullet points */
.lim-list { list-style: none; padding: 0; margin: var(--space-6) 0; }
.lim-list li {
    position: relative;
    padding: var(--space-3) 0 var(--space-3) var(--space-8);
    border-bottom: 1px solid var(--line);
    color: var(--ink-soft);
    font-size: 0.98rem;
    line-height: 1.6;
}
.lim-list li:last-child { border-bottom: 0; }
.lim-list li::before {
    content: "\2013";
    position: absolute;
    left: var(--space-2);
    color: var(--brass);
}
.lim-list li strong { color: var(--ink); }

/* ---------- in-prose technical typography ------------------------------- */
/* numbered section headings (the report uses h2 for sections) */
.prose > h2 {
    font-size: 2rem;
    margin-top: var(--space-20);
    margin-bottom: var(--space-6);
    scroll-margin-top: calc(var(--header-h) + var(--space-6));
}
.prose > h2:first-child { margin-top: 0; }

/* quantities and variables read as data, not prose */
.prose .num { font-family: var(--font-mono); color: var(--brass); font-size: 0.95em; white-space: nowrap; }
.prose var, .prose .v { font-family: var(--font-mono); color: var(--green); font-style: normal; font-size: 0.95em; }
.data-table td.n { font-family: var(--font-mono); color: var(--brass); white-space: nowrap; }

/* superscript in-text citation links */
.cite, a.cite {
    font-family: var(--font-mono);
    font-size: 0.72em;
    vertical-align: super;
    line-height: 0;
    color: var(--brass);
    text-decoration: none;
}
.cite:hover, a.cite:hover { color: var(--green); text-decoration: underline; }

.refs.numbered li { scroll-margin-top: calc(var(--header-h) + var(--space-6)); }
.refs.numbered li .doi { color: var(--brass); font-size: 0.85em; font-family: var(--font-mono); }

.data-table caption {
    caption-side: top;
    text-align: left;
    font-size: 0.88rem;
    color: var(--ink-soft);
    padding-bottom: var(--space-3);
}

/* ---------- research breakpoints --------------------------------------- */
@media (max-width: 1020px) {
    .study-list { grid-template-columns: 1fr; gap: var(--space-6); }
    .prose { max-width: none; }
}
@media (max-width: 720px) {
    .finding, .abstract, .toc { padding: var(--space-6); }
    .callout, .provenance { padding: var(--space-6); }
    .paper-meta, .report-meta { grid-template-columns: 1fr; gap: var(--space-6); }
    .paper-actions { flex-direction: column; align-items: stretch; }
    .paper-actions .btn { width: 100%; }
    .prose > h3 { margin-top: var(--space-16); font-size: 1.7rem; }
    .eqn { flex-direction: column; align-items: flex-start; gap: var(--space-3); }
    .refs li { padding-left: var(--space-8); }
}

/* =========================================================================
   PRINT / PDF DOCUMENT — /research/quantum-brain.html
   -------------------------------------------------------------------------
   Deliberately NOT branded. This page exists to be printed, and a printed
   paper should read as a paper: near-black on white, generous leading, page
   breaks respected. So the DOCUMENT stays print-neutral and only the CHROME
   (the print bar and its controls, which never appear on paper) moves onto
   the Fable v2 palette. Ported off css/seidr.css so the research pages no
   longer depend on the retired stylesheet.
   ========================================================================= */
.print-page { background: #ffffff; color: #1a1a1a; }
.print-page .container { max-width: 720px; }

/* chrome — on-brand, and @media print removes it entirely */
.print-page .print-bar {
    background: var(--sand);
    border-bottom: 1px solid var(--line);
    padding: var(--space-3) 0;
    margin-bottom: var(--space-8);
}
.print-page .print-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-4);
    flex-wrap: wrap;
    max-width: 720px;
}
.print-page .print-bar a { color: var(--green); }

/* the document itself */
.print-page .print-doc { padding-bottom: var(--space-16); }
.print-page .print-doc h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    color: #111;
    line-height: 1.15;
    margin: 0 0 0.5rem;
}
.print-page .print-doc h2 {
    font-family: var(--font-display);
    color: #1a1a1a;
    font-size: 1.4rem;
    margin: 2rem 0 0.6rem;
    border-bottom: 1px solid #ddd;
    padding-bottom: 0.3rem;
}
.print-page .print-doc h3 {
    font-family: var(--font-display);
    color: #222;
    font-size: 1.08rem;
    margin: 1.4rem 0 0.4rem;
}
.print-page .print-doc p,
.print-page .print-doc li { color: #222; font-size: 0.98rem; line-height: 1.6; }
.print-page .print-doc .lede { font-size: 1.08rem; color: #333; }
.print-page .print-doc .meta {
    color: #555;
    font-size: 0.85rem;
    margin: 0 0 1.5rem;
    border-bottom: 1px solid #ddd;
    padding-bottom: 1rem;
}
.print-page .print-doc table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin: 1rem 0;
    min-width: 0;
}
.print-page .print-doc th,
.print-page .print-doc td {
    border: 1px solid #ccc;
    padding: 0.5rem 0.7rem;
    text-align: left;
    vertical-align: top;
    color: #222;
    background: none;
    font-family: var(--font-body);
    font-size: 0.9rem;
    letter-spacing: normal;
    text-transform: none;
}
.print-page .print-doc th { background: #f3f3f3; color: #111; font-weight: 700; }
.print-page .print-doc em { color: #111; }
.print-page .print-doc strong { color: #000; }

/* references — override the brass counter treatment for paper */
.print-page .print-doc .refs li { color: #444; border-bottom: 1px solid #eee; padding-left: 2.2rem; }
.print-page .print-doc .refs li::before { color: #888; }
.print-page .print-doc .refs li em { color: #111; }
.print-page .print-doc .refs.numbered li { font-size: 0.85rem; color: #333; }
.print-page .print-doc .refs.numbered li .doi { color: #555; font-family: var(--font-mono); }
.print-page .print-doc .venue { color: #111; font-style: italic; }

/* report-specific print blocks */
.print-page .print-doc h1.report-h1 { font-size: 1.7rem; margin-bottom: 0.3rem; }
.print-page .print-doc .pmeta-grid {
    font-size: 0.82rem; color: #555; margin: 0 0 1.4rem;
    border-bottom: 1px solid #ddd; padding-bottom: 1rem;
}
.print-page .print-doc .pmeta-grid strong { color: #111; }
.print-page .print-doc .abstract-box {
    border: 1px solid #ccc; background: #fafafa;
    padding: 1rem 1.2rem; margin: 1.2rem 0 1.6rem; border-radius: var(--radius-sm);
}
.print-page .print-doc .abstract-box h2 {
    border: none; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em;
    margin: 0 0 0.5rem; color: #333; font-family: var(--font-mono);
}
.print-page .print-doc .abstract-box p { font-size: 0.92rem; }
.print-page .print-doc .eqn-print {
    background: #f6f6f6; border: 1px solid #ddd; border-radius: var(--radius-sm);
    padding: 0.7rem 1rem; margin: 0.9rem 0; font-family: var(--font-mono);
    font-size: 0.9rem; color: #111; overflow-x: auto;
    display: flex; justify-content: space-between; gap: 1rem;
}
.print-page .print-doc .eqn-print .eqn-no { color: #777; flex: none; font-family: var(--font-mono); }
.print-page .print-doc code, .print-page .print-doc .v {
    font-family: var(--font-mono); background: #f0f0f0; color: #111;
    padding: 0.05em 0.3em; border-radius: 3px; font-size: 0.9em;
}
.print-page .print-doc .toc-print { font-size: 0.88rem; color: #333; margin: 0 0 1.5rem; }
.print-page .print-doc .toc-print a { color: #222; }
/* warm neutral rather than the old palette's blue tint */
.print-page .print-doc .fignote {
    background: #faf7f2; border: 1px solid #e6e0d6; border-left: 1px solid #e6e0d6;
    color: #222; padding: 0.6rem 0.9rem; font-size: 0.88rem; margin: 0.9rem 0;
    border-radius: var(--radius-sm);
}
.print-page .print-doc .fignote strong { color: #000; }

@media print {
    .print-bar { display: none !important; }
    .print-page { background: #fff; }
    .print-page .print-doc { padding: 0; }
    a { color: #000; text-decoration: none; }
    .print-page .print-doc h2 { page-break-after: avoid; }
    .print-page .print-doc table, .print-page .print-doc h3 { page-break-inside: avoid; }
    .print-page .print-doc .eqn-print, .print-page .print-doc .abstract-box,
    .print-page .print-doc .fignote { page-break-inside: avoid; }
    .print-page .print-doc .refs.numbered li { page-break-inside: avoid; }
}

/* =========================================================================
   DISCLOSURE ("progressive disclosure") — 2026-08-02
   -------------------------------------------------------------------------
   WHY: measured on the live site, /research.html was 20 screens of scrolling
   on a 390px phone and /projects.html was 18. The cause was NOT padding
   (measured at 5-7% of page height) -- it was one enormous always-expanded
   block: 69% of research.html and 88% of projects.html. So the fix is to let
   the reader choose what to expand, NOT to delete content and NOT to squeeze
   spacing.

   Native <details>/<summary> on purpose: no JS needed to work, keyboard- and
   screen-reader-accessible for free, and the text stays IN THE DOM so search
   engines still index every word.

   Two skins share one base:
     .disclose--prose  long-form article sub-sections (research.html)
     .disclose--group  project category groups (projects.html)
   Both sit on --paper or --sand bands only; there is no dark-band variant
   because none is used. If you add one, check contrast on --green-deep first.
   ========================================================================= */

.disclose {
    border-top: 1px solid var(--line);
    /* a deep link must not land under the 72px sticky header -- same offset
       the site already uses for .refs.numbered li */
    scroll-margin-top: calc(var(--header-h) + var(--space-6));
}
.disclose + .disclose { margin-top: 0; }

/* Kill the native triangle in every engine, then supply our own chevron. */
.disclose > summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-6);
    padding: var(--space-8) 0;
    /* the whole row is the hit target, so make it feel like one */
    -webkit-tap-highlight-color: transparent;
}
.disclose > summary::-webkit-details-marker { display: none; }
.disclose > summary::marker { content: ''; }

.disclose > summary:hover .disclose-title { color: var(--green-bright); }
.disclose > summary:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 4px;
    border-radius: var(--radius-sm);
}

.disclose-title { margin: 0; transition: color 200ms ease; }

/* Right-hand cluster: the "what's inside" count + the chevron. The count is
   what makes a closed group honest -- the reader can see there are 4 projects
   in there without opening it. */
.disclose-meta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    flex: none;
    color: var(--ink-soft);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    white-space: nowrap;
}
.disclose-chevron {
    width: 20px;
    height: 20px;
    flex: none;
    stroke: var(--green);
    transition: transform 220ms ease;
}
.disclose[open] > summary .disclose-chevron { transform: rotate(180deg); }

.disclose-body { padding-bottom: var(--space-12); }

/* --- prose skin (research.html article sub-sections) ------------------- */
.disclose--prose .disclose-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.25;
}
.disclose--prose .disclose-body > *:first-child { margin-top: 0; }

/* --- group skin (projects.html categories) ----------------------------- */
.disclose--group > summary { padding: var(--space-6) 0 var(--space-8); }
.disclose--group .proj-group-head {
    margin-bottom: 0;
    /* must GROW, or its own space-between collapses and the note sits
       glued to the heading instead of at the far end of the row */
    flex: 1 1 auto;
    min-width: 0;
}
.disclose--group .disclose-body > .card:first-child { margin-top: 0; }

@media (max-width: 640px) {
    /* On a phone the group note under a heading costs a whole line of an
       already-tight summary row; stack instead of squeezing side by side. */
    .disclose > summary { align-items: center; gap: var(--space-4); }
    .disclose--prose .disclose-title { font-size: 1.3rem; }
    /* Keep the count on a phone. Hiding it (the first attempt) removed the
       one thing that makes a CLOSED group honest -- "3 projects" is how the
       reader knows there is something in there worth opening. Stack it above
       the chevron instead of dropping it. */
    .disclose-meta { flex-direction: column; align-items: flex-end; gap: var(--space-2); }
    .disclose--group .proj-group-head { display: block; }
    .disclose--group .proj-group-head .group-note { display: block; margin-top: var(--space-2); }
}

@media (prefers-reduced-motion: reduce) {
    .disclose-chevron { transition: none; }
    .disclose-title { transition: none; }
}

/* PRINT: a collapsed section must never silently drop content from a printed
   page. fable2.js also force-opens every <details> on beforeprint (belt and
   braces -- the browser hides closed content at the shadow-DOM slot level,
   which CSS alone cannot reliably override). */
@media print {
    .disclose > summary { padding: 0; }
    .disclose-chevron, .disclose-meta { display: none; }
    .disclose-body { padding-bottom: var(--space-6); }
}
