/* Fonts are loaded via <link> in index.html <head> with preconnect — see
   that file. CSS @import was blocking the render thread for ~2.1s on
   mobile (per Lighthouse), since the import isn't discovered until
   main.css itself has been fetched and parsed. */

* { margin: 0; padding: 0; box-sizing: border-box; }

/* ════════════════════════════════════════════════════════════════════════
   DESIGN TOKENS — single source of truth.
   Palette: warm yellow primary + cobalt blue accent on cream bg.
   Type: Inter for body, Fraunces for display, JetBrains Mono for accent.
   ════════════════════════════════════════════════════════════════════════ */
:root {
  /* ── Color: surfaces ───────────────────────────────────────────────── */
  --color-bg:        #FAF7F0;  /* cream / ivory page bg */
  --color-bg-soft:   #F4EFE3;  /* slightly deeper cream for striping */
  --color-surface:   #FFFFFF;  /* card surface */
  --color-surface-alt:#FFFBEC; /* warm-white card variant */

  /* ── Color: lines ──────────────────────────────────────────────────── */
  --color-line:      #E4DFCE;  /* visible divider */
  --color-line-soft: #EFEBDA;  /* subtle divider */

  /* ── Color: text ───────────────────────────────────────────────────── */
  /* Verified against --color-bg #FAF7F0:
       text   #1A1A1F  →  ~17 : 1  (AAA)
       dim    #5A5A66  →  ~ 7 : 1  (AAA)
       faint  #6B6B78  →  ~ 5 : 1  (AA — was #9A9AA5 / 2.7:1, failed) */
  --color-text:      #1A1A1F;  /* primary ink */
  --color-text-dim:  #5A5A66;  /* secondary */
  --color-text-faint:#6B6B78;  /* tertiary / meta — AA on cream + white */

  /* ── Color: brand ──────────────────────────────────────────────────── */
  --color-yellow:        #F5C518;  /* warm yellow primary */
  --color-yellow-soft:   #FFE56B;  /* highlight bg, status pills */
  --color-yellow-glow:   #FFEFA8;  /* very light wash */
  --color-blue:          #2347D9;  /* cobalt — links, primary CTAs */
  --color-blue-soft:     #DDE4FF;  /* tint for blue surfaces */
  --color-blue-deep:     #1832A6;  /* hover / pressed */
  /* Used as small text on a tinted-white background (e.g. card-impact
     green pill: rgba(47,158,85,0.10) wash on white card). The brighter
     #2F9E55 / #D97706 tones were ~3.0:1 — failed AA 4.5:1 for normal
     text. Darkened to land at AA on the tinted bg while keeping
     enough chroma to read as "green good" / "orange in-progress". */
  --color-success:       #1F7A3F;  /* shipped status */
  --color-warn:          #A55300;  /* now status */

  /* ── Aliases (legacy/short) ────────────────────────────────────────── */
  --color-accent: var(--color-blue);

  /* ── Type families ─────────────────────────────────────────────────── */
  --font-mono:  'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --font-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* ── Type — size scale ─────────────────────────────────────────────── */
  --fs-10:      10px;
  --fs-11:      11px;
  --fs-12:      12px;
  --fs-13:      13px;
  --fs-14:      14px;
  --fs-15:      15px;
  --fs-16:      16px;
  --fs-17:      17px;
  --fs-19:      19px;
  --fs-22:      22px;
  --fs-28:      28px;
  --fs-display: clamp(40px, 6vw, 64px);

  /* ── Type — weights ────────────────────────────────────────────────── */
  --fw-regular: 400;
  --fw-medium:  500;
  --fw-semibold:600;

  /* ── Type — line heights ───────────────────────────────────────────── */
  --lh-tight:   1.05;
  --lh-snug:    1.35;
  --lh-base:    1.55;
  --lh-relaxed: 1.7;

  /* ── Type — tracking ───────────────────────────────────────────────── */
  --tracking-tight: -0.02em;
  --tracking-wide:  0.06em;

  /* ── Spacing ───────────────────────────────────────────────────────── */
  --sp-4:   4px;
  --sp-6:   6px;
  --sp-8:   8px;
  --sp-10:  10px;
  --sp-12:  12px;
  --sp-14:  14px;
  --sp-16:  16px;
  --sp-20:  20px;
  --sp-24:  24px;
  --sp-32:  32px;
  --sp-40:  40px;
  --sp-48:  48px;
  --sp-64:  64px;
  --sp-80:  80px;
  --sp-100: 100px;

  /* ── Layout ────────────────────────────────────────────────────────── */
  --w-page:  1280px;
  --w-prose: 640px;

  /* ── Borders & radii ───────────────────────────────────────────────── */
  --bw:       1px;
  --bw-thick: 1.5px;
  --r-sm:     6px;
  --r-md:     10px;
  --r-lg:     14px;

  /* ── Motion ────────────────────────────────────────────────────────── */
  --dur-quick:  0.15s;
  --dur-base:   0.25s;
  --dur-slow:   0.45s;
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:cubic-bezier(0.65, 0, 0.35, 1);

  /* ── Effects ───────────────────────────────────────────────────────── */
  --shadow-card:       0 1px 2px rgba(20, 20, 30, 0.04), 0 4px 12px rgba(20, 20, 30, 0.04);
  --shadow-card-hover: 0 2px 4px rgba(20, 20, 30, 0.06), 0 12px 24px rgba(20, 20, 30, 0.08);
  --shadow-cta:        0 2px 0 var(--color-blue-deep);

  color-scheme: light;
}

/* ── Dark theme ───────────────────────────────────────────────────────
   <html data-theme="dark"> is set by the inline <head> script (from a
   localStorage override, or — with none — the OS preference; render.js's
   matchMedia listener keeps "auto" live). Re-pointing the colour/shadow
   custom properties is enough — the rest of the stylesheet reads them. Warm
   dark, to mirror the warm-cream light theme. The "soft" tints flip to
   *dark* tints (they're used as backgrounds behind --color-text, which is
   now light); the accents brighten a touch for legibility on dark. */
:root[data-theme="dark"] {
  --color-bg:        #14130D;  /* warm near-black */
  --color-bg-soft:   #1C1A12;
  --color-surface:   #201E15;  /* a hair lighter than bg — cards/panels */
  --color-surface-alt:#262213;
  --color-line:      #3B382A;
  --color-line-soft: #2A2820;
  --color-text:      #F1EEE3;  /* warm off-white */
  --color-text-dim:  #B7B2A1;
  --color-text-faint:#8D8979;
  --color-yellow:        #F3C622;
  --color-yellow-soft:   #4A3D11;  /* dark amber — tinted bg behind light text */
  --color-yellow-glow:   #31290C;
  --color-blue:          #8DA2FF;  /* links / accent — legible on dark */
  --color-blue-soft:     #20274C;  /* dark navy tint */
  --color-blue-deep:     #B4C1FF;  /* hover / pressed — brighter on dark */
  --color-success:       #4FC074;
  --color-warn:          #E89D40;
  --shadow-card:       0 1px 2px rgba(0, 0, 0, 0.45), 0 6px 18px rgba(0, 0, 0, 0.40);
  --shadow-card-hover: 0 2px 6px rgba(0, 0, 0, 0.55), 0 16px 32px rgba(0, 0, 0, 0.50);
  --shadow-cta:        0 2px 0 rgba(0, 0, 0, 0.55);

  color-scheme: dark;
}
/* dark equivalents of the timeline category tints — the bright ones are
   hardcoded hexes in the Timeline section (not custom properties). */
:root[data-theme="dark"] .vt-tone-3 { --tone-fill: #163420; }   /* mint-green */
:root[data-theme="dark"] .vt-tone-4 { --tone-fill: #3B2A12; }   /* amber      */
:root[data-theme="dark"] .vt-tone-0 { --tone-fill: #2A271C; }   /* neutral    */

/* ════════════════════════════════════════════════════════════════════════
   BASE
   ════════════════════════════════════════════════════════════════════════ */
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--sp-24);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html, body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--fs-14);
  line-height: var(--lh-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

::selection {
  background: var(--color-yellow-soft);
  color: var(--color-text);
}

/* ── A11y: focus rings ─────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--color-blue);
  outline-offset: 2px;
  border-radius: 3px;
}
button:focus-visible,
.cta:focus-visible,
.filter-chip:focus-visible,
.view-tab:focus-visible {
  outline-offset: 3px;
}

/* ── A11y: skip-to-content ─────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -40px;
  left: var(--sp-12);
  z-index: 100;
  padding: var(--sp-8) var(--sp-12);
  background: var(--color-blue);
  color: var(--color-bg);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  border-radius: var(--r-sm);
  transition: top var(--dur-quick);
}
.skip-link:focus { top: var(--sp-12); }

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

/* ════════════════════════════════════════════════════════════════════════
   PAGE LAYOUT
   ════════════════════════════════════════════════════════════════════════ */
.page {
  max-width: var(--w-page);
  margin: 0 auto;
  padding: var(--sp-48) var(--sp-32) var(--sp-100);
}

/* ════════════════════════════════════════════════════════════════════════
   TOP NAV
   ════════════════════════════════════════════════════════════════════════ */
.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-64);
  font-family: var(--font-mono);
  font-size: var(--fs-13);
  color: var(--color-text-dim);
}
.topnav .brand {
  font-weight: var(--fw-semibold);
  color: var(--color-text);
  letter-spacing: var(--tracking-tight);
}
/* The brand mark — a "doodle": a crescent moon by default (celestial, like the
   name / "a star to ship by"), which scripts/doodle.js turns into tonight's
   actual lunar phase, or a special-day emoji on holidays / a birthday / a
   project ship-iversary. It's an inline <svg> so colour comes from a token and
   the glow follows the shape via drop-shadow. Moon glyph (the no-JS default)
   adapted from Feather Icons (feathericons.com, MIT). */
.topnav .brand .dot {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 15px; height: 15px;
  margin-right: var(--sp-8);
  vertical-align: -2px;
  color: var(--color-yellow);
  filter: drop-shadow(0 0 4px var(--color-yellow-glow));
  transition: filter var(--dur-quick);
}
.topnav .brand .dot svg { display: block; width: 100%; height: 100%; }
/* on a special day the mark is an emoji (set by doodle.js) — no yellow glow */
.topnav .brand .dot.doodle-on { filter: none; font-size: 13px; line-height: 1; }
.topnav .meta { color: var(--color-text-faint); font-size: var(--fs-12); }
.topnav-end { display: flex; align-items: center; gap: var(--sp-12); }
/* Theme toggle — cycles auto → light → dark; the visible glyph (◐ ☀ ☾) is
   picked by [data-theme-mode] on <html> (set by the inline <head> script /
   render.js). Before either runs, default to ◐ (auto). */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  padding: 0;
  border: var(--bw) solid var(--color-line);
  border-radius: var(--r-sm);
  background: var(--color-surface);
  color: var(--color-text-dim);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: border-color var(--dur-quick), color var(--dur-quick), background var(--dur-quick);
}
.theme-toggle:hover { border-color: var(--color-text-faint); color: var(--color-text); }
.theme-toggle .tt-icon { display: none; }
:root:not([data-theme-mode]) .theme-toggle .tt-auto,
:root[data-theme-mode="auto"]  .theme-toggle .tt-auto  { display: inline; }
:root[data-theme-mode="light"] .theme-toggle .tt-light { display: inline; }
:root[data-theme-mode="dark"]  .theme-toggle .tt-dark  { display: inline; }

/* ════════════════════════════════════════════════════════════════════════
   HERO
   ════════════════════════════════════════════════════════════════════════ */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: var(--sp-48);
  margin-bottom: var(--sp-64);
  padding-bottom: var(--sp-48);
  border-bottom: var(--bw) solid var(--color-line-soft);
}
/* ── Hero left: avatar + text inline ────────────────────────────────── */
.hero-left {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-24);
  min-width: 0;
}
.hero-text { min-width: 0; flex: 1; }

/* ── Hero avatar — pure line-art on cream, no halo ──────────────────── */
.hero-avatar {
  flex: 0 0 auto;
  width: 120px;
  height: 120px;
  margin-top: -8px;        /* nudge up so it baselines with the display name */
  padding: 0;
  border: none;
  background: transparent;
  display: grid;
  place-items: center;
  position: relative;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--dur-base) var(--ease-out);
}
.hero-avatar:hover { transform: scale(1.03); }
.hero-avatar:active { transform: scale(0.98); }

.avatar-img {
  position: absolute;
  width: 120px;
  height: 120px;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-out);
}
.avatar-talking { opacity: 0; }
.hero-avatar:hover         .avatar-talking,
.hero-avatar:focus-visible .avatar-talking,
.hero-avatar.is-talking    .avatar-talking { opacity: 1; }
.hero-avatar:hover         .avatar-calm,
.hero-avatar:focus-visible .avatar-calm,
.hero-avatar.is-talking    .avatar-calm { opacity: 0; }

.hero-name {
  font-family: var(--font-serif);
  font-size: var(--fs-display);
  font-weight: var(--fw-regular);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--sp-20);
  text-wrap: balance;
}
.hero-name em {
  font-style: italic;
  color: var(--color-blue);
  font-weight: var(--fw-regular);
}
.hero-name .accent-yellow {
  background: linear-gradient(180deg, transparent 60%, var(--color-yellow-soft) 60%);
  padding: 0 4px;
}
.hero-slogan {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--fs-22);
  color: var(--color-text-dim);
  margin-bottom: var(--sp-24);
  max-width: var(--w-prose);
}
.hero-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-14);
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  color: var(--color-text-dim);
  overflow-wrap: anywhere;
}
.hero-meta .pill {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-6);
  padding: var(--sp-4) var(--sp-10);
  background: var(--color-blue-soft);
  border-radius: 999px;
  color: var(--color-blue-deep);
  font-weight: var(--fw-medium);
}
.hero-meta .now-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-6);
}
.hero-meta .pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--color-success);
  animation: pulse 2s var(--ease-in-out) infinite;
}
.hero-meta .sep { color: var(--color-text-faint); }
/* "résumé ↓" — a quiet text link in the meta row (shown only if profile.resume is set) */
.hero-meta .hero-resume {
  color: var(--color-blue);
  font-weight: var(--fw-medium);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  white-space: nowrap;
}
.hero-meta .hero-resume:hover { color: var(--color-blue-deep); }

/* ── Hero "ask this portfolio" bar ────────────────────────────────────
   Spans the full hero width, below the name/meta and the CTAs. A grounded
   Q&A: with the antares-qa Worker (content/site.json → qa.workerUrl) it
   shows a generated answer inline; without one it opens the ⌘K palette
   pre-filled with the question. Wired in scripts/render.js (wireHeroAsk). */
.hero-ask {
  grid-column: 1 / -1;
  margin-top: var(--sp-24);
}
.hero-ask-form {
  display: flex;
  align-items: center;
  gap: var(--sp-10);
  padding: var(--sp-8) var(--sp-12);
  background: var(--color-surface);
  border: var(--bw) solid var(--color-line);
  border-radius: var(--r-md);
  transition: border-color var(--dur-quick);
}
.hero-ask-form:focus-within { border-color: var(--color-blue); }
.hero-ask-prompt {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: var(--fs-14);
  color: var(--color-text-faint);
  user-select: none;
}
.hero-ask-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  font-family: var(--font-mono);
  font-size: var(--fs-13);
  color: var(--color-text);
  padding: var(--sp-4) 0;
}
.hero-ask-input::placeholder { color: var(--color-text-faint); }
.hero-ask-input:focus { outline: none; }
.hero-ask-go {
  flex: 0 0 auto;
  padding: var(--sp-6) var(--sp-14);
  border: var(--bw) solid var(--color-line);
  border-radius: var(--r-sm);
  background: var(--color-surface-alt);
  color: var(--color-text-dim);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color var(--dur-quick), color var(--dur-quick), background var(--dur-quick);
}
.hero-ask-go:hover { border-color: var(--color-blue); color: var(--color-blue); }
.hero-ask-hint {
  margin-top: var(--sp-6);
  font-family: var(--font-mono);
  font-size: var(--fs-10);
  letter-spacing: var(--tracking-wide);
  color: var(--color-text-faint);
}

/* ── Ask Antares — the multi-turn chat panel the hero "ask" bar opens ──
   A centred modal (same family as the ⌘K palette / card-detail panel). It's
   a transcript, not a chat-bubble UI; the persistent note labels it as an AI.
   Wired in scripts/render.js (wireAskPanel). Colours are token-driven, so
   light/dark both adapt; full-screen on narrow viewports. */
.ask-panel-backdrop {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(8, 8, 12, 0.62);
  backdrop-filter: blur(2px);
  opacity: 0; transition: opacity var(--dur-base);
}
.ask-panel-backdrop.is-open { opacity: 1; }
.ask-panel {
  position: fixed; z-index: 91;
  left: 50%; top: 50%;
  transform: translate(-50%, -48%) scale(0.985);
  width: min(720px, 92vw);
  max-height: min(80vh, 720px);
  display: flex; flex-direction: column;
  background: var(--color-surface);
  border: var(--bw) solid var(--color-line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card-hover);
  opacity: 0; transition: opacity var(--dur-base), transform var(--dur-base) var(--ease-out);
}
.ask-panel.is-open { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.ask-panel-head {
  display: flex; align-items: center; gap: var(--sp-10);
  padding: var(--sp-12) var(--sp-16);
  border-bottom: var(--bw) solid var(--color-line-soft);
  font-family: var(--font-mono); font-size: var(--fs-13);
}
.ask-panel-title { display: inline-flex; align-items: center; gap: var(--sp-8); font-weight: var(--fw-semibold); color: var(--color-text); margin-right: auto; }
.ask-panel-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--color-yellow); box-shadow: 0 0 0 3px var(--color-yellow-glow); }
.ask-panel-ai {
  font-size: var(--fs-10); letter-spacing: var(--tracking-wide); font-weight: var(--fw-medium);
  color: var(--color-text-faint); border: var(--bw) solid var(--color-line); border-radius: var(--r-sm);
  padding: 1px var(--sp-6); cursor: help;
}
.ask-panel-clear, .ask-panel-close {
  background: none; border: var(--bw) solid var(--color-line); border-radius: var(--r-sm);
  color: var(--color-text-faint); font: inherit; font-size: var(--fs-11);
  padding: var(--sp-4) var(--sp-8); cursor: pointer;
  transition: border-color var(--dur-quick), color var(--dur-quick);
}
.ask-panel-clear:hover, .ask-panel-close:hover { border-color: var(--color-text-faint); color: var(--color-text); }
.ask-panel-log {
  flex: 1 1 auto; overflow-y: auto;
  padding: var(--sp-16);
  display: flex; flex-direction: column; gap: var(--sp-16);
}
.ask-panel-log:focus { outline: none; }
.ask-panel-empty { color: var(--color-text-faint); font-size: var(--fs-13); }
.ask-msg-label {
  font-family: var(--font-mono); font-size: var(--fs-10); letter-spacing: var(--tracking-wide);
  text-transform: uppercase; color: var(--color-text-faint); margin-bottom: var(--sp-4);
}
.ask-msg-text { font-size: var(--fs-14); line-height: var(--lh-base); color: var(--color-text); white-space: pre-wrap; }
.ask-msg-you { align-self: flex-end; max-width: 88%; text-align: right; }
.ask-msg-you .ask-msg-text {
  display: inline-block; text-align: left;
  background: var(--color-blue-soft); color: var(--color-text);
  padding: var(--sp-8) var(--sp-12); border-radius: var(--r-md);
}
.ask-msg-bot .ask-msg-text { color: var(--color-text-dim); }
.ask-msg-bot.is-thinking .ask-msg-text { color: var(--color-text-faint); font-style: italic; }
.ask-panel-form {
  display: flex; align-items: center; gap: var(--sp-10);
  padding: var(--sp-10) var(--sp-12);
  border-top: var(--bw) solid var(--color-line-soft);
}
.ask-panel-input {
  flex: 1 1 auto; min-width: 0; border: 0; background: transparent;
  font-family: var(--font-mono); font-size: var(--fs-13); color: var(--color-text);
  padding: var(--sp-6) var(--sp-4);
}
.ask-panel-input::placeholder { color: var(--color-text-faint); }
.ask-panel-input:focus { outline: none; }
.ask-panel-send {
  flex: 0 0 auto; padding: var(--sp-6) var(--sp-14);
  border: var(--bw) solid var(--color-line); border-radius: var(--r-sm);
  background: var(--color-surface-alt); color: var(--color-text-dim);
  font-family: var(--font-mono); font-size: var(--fs-12); letter-spacing: var(--tracking-wide); text-transform: uppercase;
  cursor: pointer; transition: border-color var(--dur-quick), color var(--dur-quick), background var(--dur-quick);
}
.ask-panel-send:hover { border-color: var(--color-blue); color: var(--color-blue); }
.ask-panel-send:disabled, .ask-panel-input:disabled { opacity: 0.55; cursor: default; }
body.ask-panel-open { overflow: hidden; }
@media (max-width: 560px) {
  .ask-panel { left: 0; top: 0; width: 100vw; height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; transform: none; }
  .ask-panel.is-open { transform: none; }
}

/* ── Hero CTAs (3 audience entries) ───────────────────────────────────── */
.hero-ctas {
  display: flex;
  flex-direction: column;
  gap: var(--sp-10);
  min-width: 240px;
}
.cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-14);
  padding: var(--sp-12) var(--sp-16);
  background: var(--color-surface);
  border: var(--bw) solid var(--color-line);
  border-radius: var(--r-md);
  font-family: var(--font-mono);
  font-size: var(--fs-13);
  color: var(--color-text);
  cursor: pointer;
  transition: transform var(--dur-quick), box-shadow var(--dur-quick), border-color var(--dur-quick);
}
.cta:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--color-blue);
}
.cta .cta-label { color: var(--color-text-faint); font-size: var(--fs-11); letter-spacing: var(--tracking-wide); text-transform: uppercase; }
.cta .cta-text  { font-weight: var(--fw-medium); }
.cta .cta-arrow { color: var(--color-blue); font-family: var(--font-mono); }

/* ════════════════════════════════════════════════════════════════════════
   BOARD SECTION — toolbar + filters + columns
   ════════════════════════════════════════════════════════════════════════ */
.board-section {
  margin-bottom: var(--sp-80);
}

/* ── Toolbar: board name + view tabs + meta ────────────────────────── */
.board-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-20);
  padding: var(--sp-12) var(--sp-16);
  background: var(--color-surface);
  border: var(--bw) solid var(--color-line);
  border-radius: var(--r-md) var(--r-md) 0 0;
  border-bottom: none;
  flex-wrap: wrap;
}
.board-toolbar-left {
  display: flex;
  align-items: center;
  gap: var(--sp-24);
  min-width: 0;
}
.board-name {
  font-family: var(--font-mono);
  font-size: var(--fs-13);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-tight);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-8);
  color: var(--color-text);
}
.board-icon {
  display: inline-grid;
  place-items: center;
  width: 22px; height: 22px;
  background: var(--color-yellow-soft);
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--color-text);
}

.board-views {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-4);
  padding: 2px;
  background: var(--color-bg-soft);
  border-radius: var(--r-sm);
}
.view-tab {
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  padding: var(--sp-6) var(--sp-12);
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border: none;
  background: transparent;
  color: var(--color-text-dim);
  border-radius: 4px;
  cursor: pointer;
  transition: background var(--dur-quick), color var(--dur-quick);
}
.view-tab:hover:not(.is-disabled) {
  color: var(--color-text);
  background: var(--color-surface);
}
.view-tab.is-active {
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: 0 1px 2px rgba(20,20,30,0.06);
}
.view-tab.is-disabled {
  color: var(--color-text-faint);
  cursor: not-allowed;
}

.board-toolbar-right {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-10);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  color: var(--color-text-dim);
}
.board-stat strong {
  color: var(--color-text);
  font-weight: var(--fw-semibold);
}
.board-stat.sep { color: var(--color-text-faint); }

/* Audience lens — small <select> in the board toolbar. Re-orders cards
   for a particular reader (HR / founders / collaborators); "For everyone"
   is the default no-op. Behaviour: scripts/render.js. */
.audience-lens {
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  color: var(--color-text-dim);
  background: var(--color-bg-soft);
  border: var(--bw) solid var(--color-line);
  border-radius: var(--r-sm);
  padding: 3px var(--sp-6);
  cursor: pointer;
}
.audience-lens:hover { border-color: var(--color-blue); color: var(--color-text); }

/* ── Filter chips ──────────────────────────────────────────────────── */
.board-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-6);
  padding: var(--sp-10) var(--sp-16);
  background: var(--color-surface);
  border-left: var(--bw) solid var(--color-line);
  border-right: var(--bw) solid var(--color-line);
  border-bottom: var(--bw) solid var(--color-line);
}
.filter-chip {
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  /* Bumped padding-y so the touch target hits 24×24 minimum without
     visually fattening the chip — Lighthouse's touch-target audit was
     failing on the previous 4px-y padding. */
  padding: var(--sp-6) var(--sp-12);
  min-height: 28px;
  background: var(--color-bg-soft);
  border: var(--bw) solid transparent;
  border-radius: 999px;
  color: var(--color-text-dim);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: background var(--dur-quick), color var(--dur-quick), border-color var(--dur-quick);
}
.filter-chip:hover { color: var(--color-text); border-color: var(--color-line); }
.filter-chip.is-active {
  background: var(--color-text);
  color: var(--color-bg);
  border-color: var(--color-text);
}

/* ── Kanban grid ───────────────────────────────────────────────────── */
.board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  background: var(--color-bg-soft);
  border: var(--bw) solid var(--color-line);
  border-top: none;
  border-radius: 0 0 var(--r-md) var(--r-md);
  padding: var(--sp-12);
  column-gap: var(--sp-12);
}
.column {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: var(--bw) solid var(--color-line-soft);
  border-radius: var(--r-md);
  padding: 0 var(--sp-10) var(--sp-12);
  min-height: 360px;
  position: relative;
  overflow: hidden;
}
.column::before {
  content: '';
  display: block;
  height: 3px;
  margin: 0 calc(-1 * var(--sp-10)) var(--sp-12);
  border-radius: var(--r-md) var(--r-md) 0 0;
}
.col-shipped::before { background: var(--color-success); }
.col-now::before     { background: var(--color-warn); }
.col-next::before    { background: var(--color-blue); }
.col-later::before   { background: var(--color-text-faint); }

.col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 var(--sp-4) var(--sp-12);
}
.col-head .col-title {
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: var(--sp-8);
}
.col-head .col-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}
.col-shipped .col-dot { background: var(--color-success); }
.col-now     .col-dot { background: var(--color-warn); }
.col-next    .col-dot { background: var(--color-blue); }
.col-later   .col-dot { background: var(--color-text-faint); }

.col-head .col-count {
  font-family: var(--font-mono);
  font-size: var(--fs-10);
  font-weight: var(--fw-semibold);
  color: var(--color-text-dim);
  background: var(--color-bg-soft);
  padding: 1px var(--sp-6);
  border-radius: 999px;
  min-width: 18px;
  text-align: center;
}

.col-cards {
  display: flex;
  flex-direction: column;
  gap: var(--sp-10);
}
.col-empty {
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  color: var(--color-text-faint);
  text-align: center;
  padding: var(--sp-32) var(--sp-12);
  border: var(--bw) dashed var(--color-line);
  border-radius: var(--r-md);
}

/* ── Table view ───────────────────────────────────────────────────────
   Alternate "view mode" for the board: the same cards as a sortable,
   filterable table. Switched in via .board-views; the kanban (#board)
   stays the prerendered default. Markup built by scripts/render.js. */
/* `.board { display: grid }` would otherwise win over the UA [hidden] rule,
   so toggling `hidden` on the kanban needs this to actually take effect. */
.board[hidden] { display: none; }
.board-table-view {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.board-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-13);
}
.board-table th,
.board-table td {
  text-align: left;
  padding: var(--sp-8) var(--sp-10);
  border-bottom: var(--bw) solid var(--color-line-soft);
  vertical-align: top;
}
.board-table thead th {
  position: sticky;
  top: 0;
  background: var(--color-bg);
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-faint);
  white-space: nowrap;
  border-bottom-color: var(--color-line);
}
.board-table th button {
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
}
.board-table th button:hover { color: var(--color-text); }
.board-table th[aria-sort="ascending"] button,
.board-table th[aria-sort="descending"] button { color: var(--color-text); }
.board-table th .sort-arrow { font-size: var(--fs-10); opacity: 0.75; }
.board-table tbody tr {
  cursor: pointer;
  transition: background var(--dur-quick);
}
.board-table tbody tr:hover { background: var(--color-bg-soft); }
.board-table tbody tr:focus-visible {
  outline: 2px solid var(--color-blue);
  outline-offset: -2px;
}
.board-table tbody tr.is-filtered { display: none; }
.board-table .tt-title  { font-weight: var(--fw-medium); color: var(--color-text); }
.board-table .tt-status {
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--color-text-dim);
  white-space: nowrap;
}
.board-table .tt-tags   { font-family: var(--font-mono); font-size: var(--fs-10); color: var(--color-text-faint); }
.board-table .tt-impact { color: var(--color-blue); font-size: var(--fs-11); }
.board-table .tt-updated{ font-family: var(--font-mono); font-size: var(--fs-11); color: var(--color-text-faint); white-space: nowrap; }
.board-table .tt-links a { color: var(--color-blue); white-space: nowrap; }
.board-table .tt-links a + a { margin-left: var(--sp-8); }
.board-table .table-empty {
  padding: var(--sp-24);
  text-align: center;
  color: var(--color-text-faint);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
}

/* ── Spec view ────────────────────────────────────────────────────────
   "Read the roadmap as a document" — every card with its `details`
   expanded, grouped by status. Built by scripts/render.js. Reads like a
   typeset spec sheet: status-dotted section heads, a status-tinted left
   rail per card, a prominent lead line, mono metadata, well-set detail
   prose. (No `display` set on .board-spec-view so the UA [hidden] rule
   still hides it.) */
.spec-doc { max-width: var(--w-prose); margin: 0 auto; padding-top: var(--sp-8); }
.spec-empty {
  padding: var(--sp-24);
  text-align: center;
  color: var(--color-text-faint);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
}

.spec-group { margin-bottom: var(--sp-48); }
.spec-group:last-child { margin-bottom: var(--sp-16); }
.spec-group-head {
  display: flex;
  align-items: baseline;
  gap: var(--sp-8);
  font-family: var(--font-mono);
  font-size: var(--fs-13);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-dim);
  padding-bottom: var(--sp-10);
  margin-bottom: var(--sp-20);
  border-bottom: var(--bw) solid var(--color-line);
}
.spec-group-dot {
  align-self: center;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--color-text-faint);
}
.spec-group-dot[data-status="shipped"] { background: var(--color-success); }
.spec-group-dot[data-status="now"]     { background: var(--color-warn); }
.spec-group-dot[data-status="next"]    { background: var(--color-blue); }
.spec-group-dot[data-status="later"]   { background: var(--color-text-faint); }
.spec-group-count {
  margin-left: auto;
  padding: 1px var(--sp-6);
  border-radius: var(--r-sm);
  background: var(--color-bg-soft);
  color: var(--color-text-faint);
  font-size: var(--fs-11);
  letter-spacing: 0;
  text-transform: none;
}

.spec-card {
  padding: var(--sp-24) 0 var(--sp-24) var(--sp-20);
  border-left: 3px solid var(--color-line-soft);
}
.spec-card + .spec-card { border-top: var(--bw) solid var(--color-line-soft); }
.spec-card[data-status="shipped"] { border-left-color: color-mix(in srgb, var(--color-success) 60%, var(--color-line-soft)); }
.spec-card[data-status="now"]     { border-left-color: color-mix(in srgb, var(--color-warn) 60%, var(--color-line-soft)); }
.spec-card[data-status="next"]    { border-left-color: color-mix(in srgb, var(--color-blue) 55%, var(--color-line-soft)); }
.spec-card > :last-child { margin-bottom: 0; }
.spec-card-id {
  font-family: var(--font-mono);
  font-size: var(--fs-10);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin-bottom: var(--sp-4);
}
.spec-card-title {
  font-family: var(--font-serif);
  font-size: var(--fs-22);
  font-weight: var(--fw-medium);
  line-height: var(--lh-snug);
  color: var(--color-text);
  margin-bottom: var(--sp-8);
}
.spec-card-summary {
  font-size: var(--fs-15);
  line-height: var(--lh-base);
  color: var(--color-text);
  margin-bottom: var(--sp-14);
}
.spec-card-tags { display: flex; flex-wrap: wrap; gap: var(--sp-6); margin-bottom: var(--sp-16); }
.spec-card-body {
  margin-bottom: var(--sp-16);
  color: var(--color-text-dim);
  line-height: var(--lh-base);
}
.spec-card-body:empty { display: none; }
.spec-card-body > :first-child { margin-top: 0; }
.spec-card-body > :last-child  { margin-bottom: 0; }
.spec-card-body h5, .spec-card-body h6 {
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  font-weight: var(--fw-medium);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin: var(--sp-20) 0 var(--sp-8);
}
.spec-card-body p  { margin-bottom: var(--sp-10); }
.spec-card-body ul { padding-left: var(--sp-20); margin-bottom: var(--sp-10); }
.spec-card-body li { margin-bottom: var(--sp-4); }
.spec-card-body strong { color: var(--color-text); font-weight: var(--fw-medium); }
.spec-card-body a { color: var(--color-blue); }
.spec-card-body a:hover { color: var(--color-blue-deep); }
.spec-card-body code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--color-bg-soft);
  padding: 1px var(--sp-4);
  border-radius: 3px;
}
.spec-card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-4) var(--sp-8);
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  color: var(--color-text-faint);
  margin-bottom: var(--sp-12);
}
.spec-card-sep { color: var(--color-line); }
.spec-card-impact { color: var(--color-blue); }
.spec-card-links { display: flex; flex-wrap: wrap; gap: var(--sp-6) var(--sp-16); }
.spec-card-links a { color: var(--color-blue); font-size: var(--fs-13); white-space: nowrap; }
.spec-card-links a:hover { color: var(--color-blue-deep); }

/* ════════════════════════════════════════════════════════════════════════
   BLOG  —  /blog/ index + /blog/<slug>/ post pages
   Standalone pages built by scripts/build-blog.js (from content/blog/*.md).
   They reuse this stylesheet + the topnav/footer chrome but ship no dashboard
   JS. Reading-first, Medium-ish: a narrow column, a serif body, a byline with
   avatar + read time, a top reading-progress bar. .prose is the long-form
   typography block (reusable).
   ════════════════════════════════════════════════════════════════════════ */

/* topnav: a text link (the blog) + the brand becomes a link on these pages */
.topnav-link {
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: var(--tracking-wide);
  color: var(--color-text-dim);
  text-decoration: none;
}
.topnav-link:hover { color: var(--color-text); }
.brand-link { color: inherit; text-decoration: none; }
.brand-link:hover .dot { filter: drop-shadow(0 0 8px var(--color-yellow-glow)) brightness(1.12); }

/* ── reading progress bar (post pages only) ───────────────────────────── */
.blog-progress { display: none; }
body.blog-post-page .blog-progress {
  display: block;
  position: fixed; inset: 0 0 auto 0;
  height: 3px; z-index: 200;
  background: transparent;
  pointer-events: none;
}
.blog-progress-bar {
  display: block; height: 100%;
  background: var(--color-yellow);
  transform-origin: left center;
  transform: scaleX(0);
  will-change: transform;
}

/* ── /blog/ index — a small "publication" masthead + a card per post ───── */
.blog-index { max-width: var(--w-prose); margin: 0 auto; }
.blog-index-head { margin-bottom: var(--sp-40); }
.blog-index-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 5vw, 34px);
  font-weight: var(--fw-medium);
  line-height: var(--lh-tight);
  color: var(--color-text);
}
.blog-index-sub {
  margin-top: var(--sp-10);
  font-size: var(--fs-15);
  color: var(--color-text-dim);
}
.blog-list { list-style: none; }
.blog-list-item { border-top: var(--bw) solid var(--color-line-soft); }
.blog-list-item:last-child { border-bottom: var(--bw) solid var(--color-line-soft); }
.blog-list-link {
  display: block;
  padding: var(--sp-32) var(--sp-4);
  color: inherit;
  text-decoration: none;
}
.blog-list-link:hover .blog-list-title { color: var(--color-blue); }
.blog-list-title {
  font-family: var(--font-serif);
  font-size: var(--fs-22);
  font-weight: var(--fw-medium);
  line-height: var(--lh-snug);
  color: var(--color-text);
  margin-bottom: var(--sp-8);
}
.blog-list-summary {
  font-size: var(--fs-17);
  line-height: var(--lh-base);
  color: var(--color-text-dim);
  margin-bottom: var(--sp-10);
}
.blog-list-meta {
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  color: var(--color-text-faint);
}
.blog-empty {
  padding: var(--sp-32) 0;
  font-family: var(--font-mono);
  font-size: var(--fs-13);
  color: var(--color-text-faint);
}

/* ── byline — avatar + name + (date · read time) ──────────────────────── */
.blog-byline { display: flex; align-items: center; gap: var(--sp-10); }
.blog-byline-avatar {
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
  background: var(--color-bg-soft);
}
.blog-byline-text { display: flex; flex-direction: column; line-height: var(--lh-snug); }
.blog-byline-name { font-size: var(--fs-14); font-weight: var(--fw-medium); color: var(--color-text); }
.blog-byline-meta { font-family: var(--font-mono); font-size: var(--fs-11); color: var(--color-text-faint); }
.blog-byline-lg { margin-top: var(--sp-20); }

/* ── /blog/<slug>/ post ───────────────────────────────────────────────── */
.blog-post { max-width: var(--w-prose); margin: 0 auto; }
.blog-post-back {
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  margin-bottom: var(--sp-24);
}
.blog-post-back a { color: var(--color-text-faint); text-decoration: none; }
.blog-post-back a:hover { color: var(--color-blue); }
.blog-post-head {
  padding-bottom: var(--sp-24);
  margin-bottom: var(--sp-32);
  border-bottom: var(--bw) solid var(--color-line-soft);
}
.blog-post-title {
  font-family: var(--font-serif);
  font-size: clamp(26px, 5.2vw, 36px);
  font-weight: var(--fw-medium);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text);
}
.blog-post-lead {
  margin-top: var(--sp-14);
  font-size: var(--fs-19);
  line-height: var(--lh-base);
  color: var(--color-text-dim);
}
.blog-post-rule { margin: var(--sp-48) 0 var(--sp-24); border: none; border-top: var(--bw) solid var(--color-line-soft); }
.blog-comments { margin-top: var(--sp-8); }
.blog-comments-off { font-family: var(--font-mono); font-size: var(--fs-12); color: var(--color-text-faint); }

/* ── .prose — long-form reading typography (blog bodies; reusable) ────── */
.prose {
  font-family: var(--font-serif);
  font-size: var(--fs-19);
  line-height: var(--lh-relaxed);
  color: var(--color-text);
}
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose p { margin: 0 0 var(--sp-20); }
.prose h2, .prose h3, .prose h4 {
  font-family: var(--font-serif);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text);
}
.prose h2 { font-size: var(--fs-22); margin: var(--sp-48) 0 var(--sp-12); }
.prose h3 { font-size: var(--fs-19); margin: var(--sp-32) 0 var(--sp-10); }
.prose h4 { font-size: var(--fs-17); margin: var(--sp-24) 0 var(--sp-8); }
.prose ul, .prose ol { margin: 0 0 var(--sp-20); padding-left: var(--sp-24); }
.prose li { margin-bottom: var(--sp-8); }
.prose li > ul, .prose li > ol { margin: var(--sp-8) 0 0; }
.prose blockquote {
  margin: var(--sp-24) 0;
  padding-left: var(--sp-20);
  border-left: 3px solid var(--color-yellow);
  font-style: italic;
  color: var(--color-text-dim);
}
.prose blockquote p { margin-bottom: var(--sp-8); }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose a { color: var(--color-blue); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover { color: var(--color-blue-deep); }
.prose strong { font-weight: var(--fw-semibold); color: var(--color-text); }
.prose em { font-style: italic; }
/* code & preformatted stay mono — a deliberate break from the serif body */
.prose code {
  font-family: var(--font-mono);
  font-size: 0.82em;
  background: var(--color-bg-soft);
  padding: 1px var(--sp-4);
  border-radius: 3px;
}
.prose pre {
  margin: var(--sp-24) 0;
  padding: var(--sp-16) var(--sp-20);
  background: var(--color-bg-soft);
  border: var(--bw) solid var(--color-line-soft);
  border-radius: var(--r-md);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: var(--fs-13);
  line-height: var(--lh-base);
}
.prose pre code { background: none; padding: 0; font-size: inherit; }
.prose hr { margin: var(--sp-40) 0; border: none; border-top: var(--bw) solid var(--color-line-soft); }
.prose img {
  display: block;
  max-width: 100%; height: auto;
  margin: var(--sp-24) auto;
  border-radius: var(--r-md);
}

@media (max-width: 600px) {
  .blog-list-link { padding: var(--sp-24) 0; }
  .prose { font-size: var(--fs-17); }
  .prose h2 { font-size: var(--fs-19); }
}

/* ── 404 page (static 404.html) ───────────────────────────────────────── */
.notfound {
  max-width: var(--w-prose);
  margin: 0 auto;
  padding: var(--sp-80) 0;
  text-align: center;
}
.notfound-code {
  font-family: var(--font-mono);
  font-size: var(--fs-13);
  letter-spacing: var(--tracking-wide);
  color: var(--color-text-faint);
  margin-bottom: var(--sp-16);
}
.notfound-title {
  font-family: var(--font-serif);
  font-size: clamp(26px, 5vw, 34px);
  font-weight: var(--fw-medium);
  line-height: var(--lh-tight);
  color: var(--color-text);
  margin-bottom: var(--sp-12);
}
.notfound-msg { color: var(--color-text-dim); margin-bottom: var(--sp-24); }
.notfound-links { font-family: var(--font-mono); font-size: var(--fs-13); }
.notfound-links a { color: var(--color-blue); }
.notfound-links a:hover { color: var(--color-blue-deep); }

/* ── Timeline view ────────────────────────────────────────────────────
   Roadmap → Timeline is an interactive timeline rendered by the vendored
   vis-timeline library (vendor/vis-timeline/, lazy-loaded by scripts/render.js
   → buildTimelineView). vis ships its own stylesheet (also lazy-loaded, so it
   lands *after* this file) — the `.vt-host …` overrides below win on
   specificity (the extra `.vt-host` class) and bend it to the site palette:
   pill range-bars / dot points, mono axis labels, a blue "today" line.
   (No `display` on .board-timeline-view, so the UA [hidden] rule still hides it.) */
.timeline-doc { padding-top: var(--sp-8); }
.timeline-head {
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-faint);
  padding-bottom: var(--sp-8);
  margin-bottom: var(--sp-16);
  border-bottom: var(--bw) solid var(--color-line);
}
.timeline-head-note { text-transform: none; letter-spacing: 0; }
.timeline-empty {
  padding: var(--sp-24);
  text-align: center;
  color: var(--color-text-faint);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
}
.tl-hint {
  margin-top: var(--sp-16);
  font-family: var(--font-mono);
  font-size: var(--fs-10);
  letter-spacing: var(--tracking-wide);
  color: var(--color-text-faint);
}
/* Category legend — one chip per palette tone (only shown when ≥2 categories).
   The tone vars cascade down to .vt-swatch from `.vt-legend-item.vt-tone-N`. */
.vt-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-8) var(--sp-16);
  margin-bottom: var(--sp-12);
}
.vt-legend-item {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-6);
  font-family: var(--font-mono);
  font-size: var(--fs-10);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-dim);
}
.vt-swatch {
  flex: 0 0 auto;
  width: 9px; height: 9px;
  border-radius: 999px;
  background: var(--tone-stroke, var(--color-yellow));
}
/* the "in progress" legend chip — a dashed ring, mirroring the dashed bars */
.vt-legend-now .vt-swatch { background: transparent; border: var(--bw-thick) dashed var(--color-text-dim); }
/* The element handed to vis.Timeline(). min-height keeps the layout from
   jumping while the ≈540 KB bundle loads ("loading…" sits here first). */
.vt-host {
  width: 100%;
  min-height: 140px;
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  color: var(--color-text-faint);
}

/* ── vis-timeline overrides — all scoped to .vt-host so they out-specify
   the library's own (later-loaded) stylesheet ─────────────────────────── */
.vt-host .vis-timeline {
  border: var(--bw) solid var(--color-line);
  border-radius: var(--r-md);
  background: var(--color-surface);
  font-family: var(--font-sans);
  font-size: var(--fs-13);
}
.vt-host .vis-panel.vis-bottom,
.vt-host .vis-panel.vis-center,
.vt-host .vis-panel.vis-left,
.vt-host .vis-panel.vis-right,
.vt-host .vis-panel.vis-top { border-color: var(--color-line); }
.vt-host .vis-foreground .vis-group { border-bottom: none; }
.vt-host .vis-labelset .vis-label { border-color: var(--color-line); }
/* time axis — mono, faint; the "major" tick (month / year) a touch stronger */
.vt-host .vis-time-axis .vis-text {
  color: var(--color-text-faint);
  font-family: var(--font-mono);
  font-size: var(--fs-10);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  padding: 4px 5px;
}
.vt-host .vis-time-axis .vis-text.vis-major { color: var(--color-text-dim); font-weight: var(--fw-semibold); }
.vt-host .vis-time-axis .vis-grid.vis-minor { border-color: var(--color-line-soft); }
.vt-host .vis-time-axis .vis-grid.vis-major { border-color: var(--color-line); }
/* the "today" line */
.vt-host .vis-current-time { background-color: var(--color-blue); width: var(--bw-thick); opacity: 0.6; }
/* Category tones — set as CSS vars on `.vt-tone-N` so both the timeline items
   (vis copies the item's className onto its dot too) and the legend swatches
   read them. Tones 1–4 from the site palette; tone 0 = the neutral "everything
   else" bucket. Assigned in first-seen order by scripts/render.js. */
.vt-tone-1 { --tone-fill: var(--color-yellow-soft); --tone-stroke: var(--color-yellow);  }
.vt-tone-2 { --tone-fill: var(--color-blue-soft);   --tone-stroke: var(--color-blue);    }
.vt-tone-3 { --tone-fill: #DCEFE3;                  --tone-stroke: var(--color-success);  }   /* soft mint / shipped-green */
.vt-tone-4 { --tone-fill: #FAE6CF;                  --tone-stroke: var(--color-warn);     }   /* soft amber / warn-orange  */
.vt-tone-0 { --tone-fill: #ECE8DB;                  --tone-stroke: #9C9580;               }   /* warm neutral              */
/* items — range pills + point dots, tinted per category */
.vt-host .vis-item {
  background-color: var(--tone-fill, var(--color-yellow-soft));
  border-color: var(--tone-stroke, var(--color-yellow));
  border-width: var(--bw);
  border-radius: var(--r-md);
  color: var(--color-text);
  cursor: pointer;
  transition: box-shadow var(--dur-quick), border-color var(--dur-quick);
}
.vt-host .vis-item.vis-range { border-radius: 999px; }
.vt-host .vis-item.vis-dot {
  background-color: var(--tone-stroke, var(--color-yellow));
  border-color: var(--tone-stroke, var(--color-yellow));
  border-width: 5px;
}
.vt-host .vis-item:hover { box-shadow: var(--shadow-card); border-color: var(--color-blue); }
.vt-host .vis-item.vis-selected,
.vt-host .vis-item.vis-point.vis-selected {
  background-color: var(--color-yellow-soft);
  border-color: var(--color-blue);
  box-shadow: var(--shadow-card-hover);
}
/* in-progress (status = now) — a dashed bar with a "▸ continuing" cap */
.vt-host .vis-item.vt-now.vis-range { border-style: dashed; border-width: var(--bw-thick); }
.vt-host .vis-item.vt-now .vis-item-content::after { content: " ▸"; opacity: 0.55; font-weight: var(--fw-semibold); }
/* let a narrow range bar's label spill out beside it instead of being clipped
   to "SH…" (vis clips it to .vis-item-overflow by default) */
.vt-host .vis-item .vis-item-overflow { overflow: visible; }
.vt-host .vis-item .vis-item-content { padding: 4px var(--sp-10); }
.vt-host .vis-item .vt-id {
  font-family: var(--font-mono);
  font-size: var(--fs-10);
  letter-spacing: var(--tracking-wide);
  color: var(--color-text-dim);
  margin-right: var(--sp-8);
}
/* drop the library's blue interaction glow */
.vt-host .vis-active { box-shadow: none; }
/* tooltip — match the site's dark-on-light chips */
.vt-host .vis-tooltip {
  background-color: var(--color-text);
  color: var(--color-bg);
  border: none;
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-card-hover);
  font-family: var(--font-sans);
  font-size: var(--fs-12);
  padding: var(--sp-6) var(--sp-10);
}

/* ── Card ─────────────────────────────────────────────────────────────── */
.card {
  /* Reset user-agent button styles (rendered as <button> for click + a11y) */
  font: inherit;
  color: inherit;
  text-align: left;
  width: 100%;
  display: block;

  background: var(--color-surface);
  border: var(--bw) solid var(--color-line);
  border-radius: var(--r-sm);
  padding: var(--sp-10) var(--sp-12) var(--sp-10);
  transition: transform var(--dur-quick), box-shadow var(--dur-quick), border-color var(--dur-quick);
  cursor: pointer;
  position: relative;
}
.card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--color-yellow);
}

/* Top row: ID badge + drag handle */
.card-meta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-6);
  font-family: var(--font-mono);
  font-size: var(--fs-10);
  letter-spacing: var(--tracking-wide);
}
.card-id {
  color: var(--color-text-faint);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
}
.card-handle {
  color: var(--color-line);
  font-size: 14px;
  line-height: 1;
  letter-spacing: -2px;
  opacity: 0;
  transition: opacity var(--dur-quick), color var(--dur-quick);
}
.card:hover .card-handle { opacity: 1; color: var(--color-text-faint); }

.card-title {
  font-family: var(--font-sans);
  font-size: var(--fs-14);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-snug);
  letter-spacing: -0.005em;
  margin-bottom: var(--sp-4);
  color: var(--color-text);
}
.card-summary {
  color: var(--color-text-dim);
  font-size: var(--fs-12);
  line-height: 1.5;
  margin-bottom: var(--sp-10);
}
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  margin-bottom: var(--sp-8);
}
.tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: var(--fw-medium);
  letter-spacing: var(--tracking-wide);
  padding: 2px 7px;
  background: var(--color-yellow-glow);
  color: var(--color-text);
  border-radius: 999px;
  text-transform: uppercase;
}
.tag.tag-blue {
  background: var(--color-blue-soft);
  color: var(--color-blue-deep);
}
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
  font-family: var(--font-mono);
  font-size: var(--fs-10);
  color: var(--color-text-faint);
  padding-top: var(--sp-6);
  border-top: var(--bw) solid var(--color-line-soft);
}
.card-footer-left {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-8);
}
.card-comments {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.card-comments::before {
  content: '◌';
  font-size: 11px;
  color: var(--color-text-faint);
}
.card-impact {
  color: var(--color-success);
  font-weight: var(--fw-semibold);
  background: rgba(47, 158, 85, 0.10);
  padding: 1px var(--sp-6);
  border-radius: var(--r-sm);
}
.card-links {
  display: flex;
  gap: var(--sp-8);
  margin-top: var(--sp-6);
}
.card-links a {
  font-family: var(--font-mono);
  font-size: var(--fs-10);
  color: var(--color-blue);
  text-decoration: none;
}
.card-links a:hover { color: var(--color-blue-deep); text-decoration: underline; }

/* Card filtered-out state */
.card.is-filtered { display: none; }

/* ════════════════════════════════════════════════════════════════════════
   CARD DETAIL PANEL — slides in from the right (Linear/Notion style)
   ════════════════════════════════════════════════════════════════════════ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 30, 0.18);
  z-index: 80;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-out);
}
.modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.card-modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  width: min(480px, 100vw);
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;            /* inner .panel-body scrolls */
  z-index: 90;
  padding: 0;
  background: var(--color-surface);
  border: none;
  border-left: var(--bw) solid var(--color-line);
  border-radius: 0;
  box-shadow: -16px 0 48px rgba(20,20,30,0.12);
  transform: translateX(100%);
  transition: transform var(--dur-base) var(--ease-out);
  display: flex;
  flex-direction: column;
  /* When closed: stays in DOM, visually offscreen, doesn't catch clicks. */
  pointer-events: none;
  visibility: hidden;
}
.card-modal.is-open {
  transform: translateX(0);
  pointer-events: auto;
  visibility: visible;
}

/* ── Panel header: prev/next + close ───────────────────────────────── */
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-12) var(--sp-16);
  border-bottom: var(--bw) solid var(--color-line-soft);
  background: var(--color-bg-soft);
  flex-shrink: 0;
}
.panel-nav-group {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-4);
}
.panel-nav {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border: var(--bw) solid var(--color-line);
  background: var(--color-surface);
  color: var(--color-text-dim);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background var(--dur-quick), color var(--dur-quick), border-color var(--dur-quick);
}
.panel-nav:hover:not(:disabled) {
  background: var(--color-yellow-glow);
  color: var(--color-text);
  border-color: var(--color-yellow);
}
.panel-nav:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.panel-position {
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  color: var(--color-text-faint);
  margin-left: var(--sp-8);
  letter-spacing: var(--tracking-wide);
}

.modal-close {
  width: 32px;
  height: 32px;
  border: var(--bw) solid transparent;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  color: var(--color-text-dim);
  cursor: pointer;
  border-radius: var(--r-sm);
  transition: background var(--dur-quick), color var(--dur-quick);
}
.modal-close:hover { background: var(--color-surface); color: var(--color-text); border-color: var(--color-line); }

/* ── Panel body: scrollable content ────────────────────────────────── */
.panel-body {
  padding: var(--sp-24) var(--sp-32) var(--sp-24);
  overflow-y: auto;
  flex: 1;
}

.modal-meta-top {
  display: flex;
  align-items: center;
  gap: var(--sp-10);
  margin-bottom: var(--sp-12);
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  letter-spacing: var(--tracking-wide);
  color: var(--color-text-faint);
}
.modal-id { font-weight: var(--fw-semibold); text-transform: uppercase; }
.modal-status {
  padding: 2px var(--sp-8);
  border-radius: 999px;
  font-size: var(--fs-10);
  text-transform: uppercase;
  font-weight: var(--fw-semibold);
}
.modal-status.s-shipped { background: rgba(47,158,85,0.12); color: var(--color-success); }
.modal-status.s-now     { background: rgba(217,119,6,0.12); color: var(--color-warn); }
.modal-status.s-next    { background: var(--color-blue-soft); color: var(--color-blue-deep); }
.modal-status.s-later   { background: var(--color-bg-soft); color: var(--color-text-dim); }

.modal-title {
  font-family: var(--font-serif);
  font-size: var(--fs-28);
  font-weight: var(--fw-medium);
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--sp-8);
}
.modal-summary {
  color: var(--color-text-dim);
  font-size: var(--fs-15);
  line-height: var(--lh-base);
  margin-bottom: var(--sp-16);
}
.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-6);
  margin-bottom: var(--sp-20);
}
.modal-details {
  color: var(--color-text);
  font-size: var(--fs-14);
  line-height: var(--lh-relaxed);
  padding: var(--sp-16) 0;
  border-top: var(--bw) solid var(--color-line-soft);
  border-bottom: var(--bw) solid var(--color-line-soft);
  margin-bottom: var(--sp-16);
}
.modal-details:empty { display: none; }
.modal-details h2, .modal-details h3 {
  font-family: var(--font-serif);
  font-size: var(--fs-15);
  font-weight: var(--fw-semibold);
  margin: var(--sp-12) 0 var(--sp-6);
  letter-spacing: var(--tracking-tight);
}
.modal-details p { margin-bottom: var(--sp-10); }
.modal-details ul { padding-left: var(--sp-20); margin-bottom: var(--sp-10); }
.modal-details li { margin-bottom: var(--sp-4); }
.modal-details code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--color-bg-soft);
  padding: 1px var(--sp-6);
  border-radius: var(--r-sm);
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  color: var(--color-text-faint);
  margin-bottom: var(--sp-12);
}
.modal-impact {
  background: rgba(47,158,85,0.10);
  color: var(--color-success);
  font-weight: var(--fw-semibold);
  padding: 2px var(--sp-8);
  border-radius: var(--r-sm);
}
.modal-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-10);
  padding-top: var(--sp-12);
  border-top: var(--bw) dashed var(--color-line-soft);
}
.modal-links:empty { display: none; }
.modal-links a {
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  color: var(--color-blue);
  border-bottom: var(--bw) solid var(--color-blue-soft);
  padding-bottom: 1px;
}
.modal-links a:hover { color: var(--color-blue-deep); border-color: var(--color-blue); }

/* When modal is open, lock body scroll */
body.modal-open { overflow: hidden; }

@media (max-width: 768px) {
  .card-modal { width: 100vw; border-left: none; }
  .panel-body { padding: var(--sp-20) var(--sp-20) var(--sp-24); }
  .modal-title { font-size: var(--fs-22); }
  .modal-backdrop { background: rgba(20, 20, 30, 0.4); }
}

/* ════════════════════════════════════════════════════════════════════════
   LENS — principles / how I think
   ════════════════════════════════════════════════════════════════════════ */
.section {
  margin-bottom: var(--sp-80);
}
.sec-head {
  display: flex;
  align-items: baseline;
  gap: var(--sp-14);
  margin-bottom: var(--sp-24);
  padding-bottom: var(--sp-12);
  border-bottom: var(--bw) solid var(--color-line-soft);
}
.sec-cmd {
  font-family: var(--font-mono);
  color: var(--color-blue);
  font-size: var(--fs-12);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-wide);
}
.sec-title {
  font-family: var(--font-serif);
  font-weight: var(--fw-regular);
  font-size: var(--fs-22);
}
.sec-meta {
  margin-left: auto;
  font-family: var(--font-mono);
  color: var(--color-text-faint);
  font-size: var(--fs-11);
}

.lens {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--sp-16);
}
.lens-card {
  background: var(--color-surface-alt);
  border: var(--bw) solid var(--color-line-soft);
  border-radius: var(--r-md);
  padding: var(--sp-20);
  transition: border-color var(--dur-quick), transform var(--dur-quick);
}
.lens-card:hover {
  border-color: var(--color-yellow);
  transform: translateY(-1px);
}
.lens-num {
  font-family: var(--font-mono);
  color: var(--color-text-faint);
  font-size: var(--fs-11);
  margin-bottom: var(--sp-10);
  letter-spacing: var(--tracking-wide);
}
.lens-text {
  font-family: var(--font-serif);
  font-size: var(--fs-15);
  line-height: var(--lh-snug);
}
.lens-text em {
  display: block;
  font-style: italic;
  color: var(--color-text-dim);
  font-size: var(--fs-13);
  margin-top: var(--sp-8);
}

/* ════════════════════════════════════════════════════════════════════════
   CONTACT
   ════════════════════════════════════════════════════════════════════════ */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--sp-32);
  align-items: start;
}
.contact-intro {
  font-family: var(--font-serif);
  font-size: var(--fs-19);
  line-height: var(--lh-snug);
  color: var(--color-text);
}
.contact-intro em { color: var(--color-blue); font-style: italic; }
.contact-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-10);
  font-family: var(--font-mono);
  font-size: var(--fs-13);
}
.contact-list a {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-10);
  color: var(--color-text);
  border-bottom: var(--bw) dashed var(--color-line);
  padding-bottom: 2px;
  width: fit-content;
}
.contact-list a:hover {
  color: var(--color-blue);
  border-color: var(--color-blue);
}
.contact-list .key {
  color: var(--color-text-faint);
  font-size: var(--fs-11);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  min-width: 72px;
  display: inline-block;
}

/* ════════════════════════════════════════════════════════════════════════
   COMMAND PALETTE — Cmd+K overlay
   ════════════════════════════════════════════════════════════════════════ */
.palette-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 30, 0.32);
  backdrop-filter: blur(3px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease-out;
}
.palette-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.palette {
  position: fixed;
  top: 14vh;
  left: 50%;
  transform: translateX(-50%) scale(0.97);
  width: min(620px, calc(100vw - 32px));
  max-height: 70vh;
  z-index: 210;
  background: var(--color-surface);
  border: var(--bw) solid var(--color-line);
  border-radius: var(--r-lg);
  box-shadow: 0 8px 16px rgba(20,20,30,0.10), 0 24px 60px rgba(20,20,30,0.20);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.15s ease-out, transform 0.15s ease-out;
}
.palette.is-open {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

.palette-header {
  display: flex;
  align-items: center;
  gap: var(--sp-12);
  padding: var(--sp-14) var(--sp-16);
  border-bottom: var(--bw) solid var(--color-line-soft);
  background: var(--color-surface);
}
.palette-icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: var(--color-yellow-soft);
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-weight: var(--fw-semibold);
  color: var(--color-text);
}
.palette-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: var(--fs-15);
  color: var(--color-text);
  padding: 0;
}
.palette-input::placeholder { color: var(--color-text-faint); }
.palette-kbd {
  font-family: var(--font-mono);
  font-size: var(--fs-10);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  padding: 2px var(--sp-8);
  background: var(--color-bg-soft);
  border: var(--bw) solid var(--color-line);
  border-radius: var(--r-sm);
  color: var(--color-text-faint);
}

.palette-results {
  list-style: none;
  margin: 0;
  padding: var(--sp-6);
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.palette-result {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  gap: var(--sp-12);
  padding: var(--sp-8) var(--sp-10);
  border-radius: var(--r-sm);
  cursor: pointer;
  user-select: none;
}
.palette-result.is-selected {
  background: var(--color-yellow-glow);
}
.palette-result-icon {
  font-family: var(--font-mono);
  font-size: var(--fs-13);
  color: var(--color-text-dim);
  text-align: center;
}
.palette-result-body {
  min-width: 0;
}
.palette-result-label {
  font-family: var(--font-sans);
  font-size: var(--fs-13);
  color: var(--color-text);
  font-weight: var(--fw-medium);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.palette-result-desc {
  font-family: var(--font-mono);
  font-size: var(--fs-10);
  color: var(--color-text-faint);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  margin-top: 2px;
}
/* FAQ answer line under a "?" result — prose, not the uppercase meta style. */
.palette-result-answer {
  font-size: var(--fs-11);
  color: var(--color-text-dim);
  line-height: var(--lh-snug);
  margin-top: 3px;
}
.palette-result.is-selected .palette-result-answer { color: var(--color-text); }
.palette-result-meta {
  font-family: var(--font-mono);
  font-size: var(--fs-10);
  color: var(--color-text-faint);
}
.palette-result.is-selected .palette-result-icon { color: var(--color-text); }
.palette-result.is-selected .palette-result-meta { color: var(--color-text-dim); }

.palette-empty {
  text-align: center;
  padding: var(--sp-32) var(--sp-20);
  color: var(--color-text-faint);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
}

.palette-footer {
  display: flex;
  align-items: center;
  gap: var(--sp-14);
  padding: var(--sp-8) var(--sp-16);
  border-top: var(--bw) solid var(--color-line-soft);
  background: var(--color-bg-soft);
  font-family: var(--font-mono);
  font-size: var(--fs-10);
  color: var(--color-text-faint);
  letter-spacing: var(--tracking-wide);
}
.palette-footer kbd {
  font-family: inherit;
  font-size: inherit;
  padding: 1px var(--sp-6);
  background: var(--color-surface);
  border: var(--bw) solid var(--color-line);
  border-radius: 3px;
  color: var(--color-text-dim);
  margin-right: 4px;
}
.palette-spacer { flex: 1; }
.palette-hint { color: var(--color-text-faint); }

@media (max-width: 640px) {
  .palette { top: 5vh; max-height: 88vh; width: calc(100vw - 16px); }
  .palette-footer { flex-wrap: wrap; }
}

body.palette-open { overflow: hidden; }

/* Floating command-palette trigger (bottom-right). Also the visible cue that
   the ⌘K shortcut exists. Hidden while the palette is open; hidden on touch /
   narrow viewports (no physical keyboard — the palette's content is reachable
   through the visible UI there). */
.palette-fab {
  position: fixed;
  right: var(--sp-20);
  bottom: var(--sp-20);
  z-index: 150;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-8);
  padding: var(--sp-8) var(--sp-12);
  background: var(--color-surface);
  border: var(--bw) solid var(--color-line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.08));
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  color: var(--color-text-dim);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, transform 0.15s;
}
.palette-fab:hover,
.palette-fab:focus-visible {
  border-color: var(--color-blue);
  color: var(--color-text);
  transform: translateY(-1px);
}
.palette-fab-kbd {
  font-family: inherit;
  font-size: var(--fs-11);
  padding: 1px var(--sp-6);
  background: var(--color-bg-soft);
  border: var(--bw) solid var(--color-line);
  border-radius: var(--r-sm);
  color: var(--color-text-faint);
}
body.palette-open .palette-fab,
body.modal-open .palette-fab { opacity: 0; pointer-events: none; }

@media (max-width: 768px) {
  .palette-fab { display: none; }
}

/* ════════════════════════════════════════════════════════════════════════
   AGENT TERMINAL — embedded CLI (dark panel inside light page)
   ════════════════════════════════════════════════════════════════════════ */
.terminal-section { margin-bottom: var(--sp-80); }

.sec-head kbd {
  font-family: var(--font-mono);
  font-size: var(--fs-10);
  padding: 1px var(--sp-6);
  background: var(--color-yellow-glow);
  border-radius: var(--r-sm);
  color: var(--color-text);
}

.terminal {
  /* Inverted palette — dark warm canvas with cream/yellow text */
  --term-bg:     #1A1B26;
  --term-chrome: #25263A;
  --term-line:   #2E2F47;
  --term-text:   #E6E2CC;
  --term-dim:    #9A95B0;
  --term-prompt: #F5C518;
  --term-cmd:    #8AAEFF;
  --term-ok:     #A0E5A0;
  --term-warn:   #F5C518;
  --term-err:    #FF8A8A;

  background: var(--term-bg);
  border: var(--bw) solid var(--color-line);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(20,20,30,0.06), 0 12px 24px rgba(20,20,30,0.06);
  font-family: var(--font-mono);
  font-size: var(--fs-13);
  color: var(--term-text);
}

.terminal-chrome {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  padding: var(--sp-10) var(--sp-14);
  background: var(--term-chrome);
  border-bottom: var(--bw) solid var(--term-line);
}
.terminal-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}
.terminal-dot.d-r { background: #FF5F56; }
.terminal-dot.d-y { background: #FFBD2E; }
.terminal-dot.d-g { background: #27C93F; }
.terminal-path {
  margin-left: var(--sp-12);
  color: var(--term-dim);
  font-size: var(--fs-11);
  letter-spacing: var(--tracking-wide);
}
.terminal-spacer { flex: 1; }
.terminal-action {
  font-family: var(--font-mono);
  font-size: var(--fs-10);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  background: transparent;
  border: var(--bw) solid var(--term-line);
  color: var(--term-dim);
  padding: var(--sp-6) var(--sp-10);
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: border-color var(--dur-quick), color var(--dur-quick);
}
.terminal-action:hover { color: var(--term-text); border-color: var(--term-text); }

.terminal-body {
  padding: var(--sp-16) var(--sp-20) var(--sp-20);
  min-height: 280px;
  max-height: 480px;
  overflow-y: auto;
  cursor: text;
  outline: none;
}
.terminal-body::-webkit-scrollbar { width: 8px; }
.terminal-body::-webkit-scrollbar-thumb {
  background: var(--term-line);
  border-radius: 4px;
}

.terminal-line {
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
.terminal-line + .terminal-line { margin-top: 2px; }

.term-prompt {
  color: var(--term-prompt);
  font-weight: var(--fw-semibold);
  margin-right: var(--sp-8);
  user-select: none;
}
.term-cmd  { color: var(--term-cmd); font-weight: var(--fw-medium); }
.term-out  { color: var(--term-text); }
.term-dim  { color: var(--term-dim); }
.term-ok   { color: var(--term-ok); }
.term-warn { color: var(--term-warn); }
.term-err  { color: var(--term-err); }
.term-key  { color: var(--term-prompt); font-weight: var(--fw-semibold); }

.term-prompt-line {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
}
.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--term-text);
  font-family: inherit;
  font-size: inherit;
  caret-color: var(--term-prompt);
  padding: 0;
}
/* Selection inside the terminal input doubles as the ghost-text rendering
   for live autocomplete suggestions: dim, no highlight, fading into bg.
   When the user accepts (Tab) or types another char, the selection
   collapses naturally. */
.terminal-input::selection {
  background: transparent;
  color: var(--term-dim);
}
.terminal-input::-moz-selection {
  background: transparent;
  color: var(--term-dim);
}

@media (max-width: 640px) {
  .terminal-body { padding: var(--sp-12) var(--sp-14) var(--sp-14); min-height: 240px; max-height: 360px; }
  .terminal { font-size: var(--fs-12); }
}

/* ════════════════════════════════════════════════════════════════════════
   /agents — explanation section for AI-friendly surfaces
   ════════════════════════════════════════════════════════════════════════ */
.agents-section { margin-bottom: var(--sp-80); }
.agents-intro {
  font-family: var(--font-serif);
  font-size: var(--fs-17);
  line-height: var(--lh-base);
  color: var(--color-text-dim);
  margin-bottom: var(--sp-24);
  max-width: var(--w-prose);
}
.agents-endpoints {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--sp-12);
  margin-bottom: var(--sp-24);
}
.agents-card {
  display: block;
  background: var(--color-surface);
  border: var(--bw) solid var(--color-line);
  border-radius: var(--r-md);
  padding: var(--sp-16);
  transition: border-color var(--dur-quick), transform var(--dur-quick), box-shadow var(--dur-quick);
}
.agents-card:hover {
  border-color: var(--color-blue);
  transform: translateY(-1px);
  box-shadow: var(--shadow-card-hover);
}
.agents-card-head {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  margin-bottom: var(--sp-10);
  font-family: var(--font-mono);
}
.agents-method {
  font-size: var(--fs-10);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-wide);
  color: var(--color-success);
  background: rgba(47, 158, 85, 0.10);
  padding: 2px var(--sp-6);
  border-radius: var(--r-sm);
}
.agents-path {
  font-size: var(--fs-13);
  color: var(--color-text);
  font-weight: var(--fw-medium);
}
.agents-card p {
  font-size: var(--fs-13);
  line-height: var(--lh-snug);
  color: var(--color-text-dim);
}
.agents-card a {
  color: var(--color-blue);
  border-bottom: var(--bw) dashed var(--color-blue);
}
.agents-card code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--color-bg-soft);
  padding: 1px var(--sp-6);
  border-radius: var(--r-sm);
  color: var(--color-text);
}

.agents-extras {
  list-style: none;
  padding: var(--sp-16) var(--sp-20);
  background: var(--color-surface-alt);
  border: var(--bw) dashed var(--color-line);
  border-radius: var(--r-md);
  font-size: var(--fs-13);
  line-height: var(--lh-base);
}
.agents-extras li { color: var(--color-text-dim); margin-bottom: var(--sp-6); }
.agents-extras li:last-child { margin-bottom: 0; }
.agents-extras strong { color: var(--color-text); font-weight: var(--fw-semibold); }
.agents-extras code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--color-bg);
  padding: 1px var(--sp-6);
  border-radius: var(--r-sm);
  color: var(--color-text);
}
.agents-extras a {
  color: var(--color-blue);
  border-bottom: var(--bw) dashed var(--color-blue);
}

/* ════════════════════════════════════════════════════════════════════════
   COMMENTS (Giscus mount point)
   ════════════════════════════════════════════════════════════════════════ */
.comments-section { margin-top: var(--sp-80); }
.comments-placeholder {
  padding: var(--sp-32) var(--sp-24);
  background: var(--color-surface-alt);
  border: var(--bw) dashed var(--color-line);
  border-radius: var(--r-md);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  color: var(--color-text-faint);
  text-align: center;
}
.comments-placeholder a {
  color: var(--color-blue);
  border-bottom: var(--bw) dashed var(--color-blue);
}

/* ════════════════════════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════════════════════════ */
.site-footer {
  margin-top: var(--sp-80);
  padding-top: var(--sp-24);
  border-top: var(--bw) solid var(--color-line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  color: var(--color-text-faint);
  font-size: var(--fs-11);
}
.site-footer a { border-bottom: var(--bw) dashed var(--color-line); padding-bottom: 1px; }
.site-footer a:hover { color: var(--color-blue); border-color: var(--color-blue); }

/* ════════════════════════════════════════════════════════════════════════
   ANIMATIONS
   ════════════════════════════════════════════════════════════════════════ */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.6; transform: scale(0.85); }
}
/* `rise` animates a small upward slide on first paint. We deliberately do
   NOT fade opacity from 0 — Lighthouse measures LCP at first paint, and
   an initial opacity:0 makes the candidate invisible at that moment,
   which is what triggered NO_LCP errors. Sliding 6px is enough texture
   to feel "settled in" without hiding the content. */
@keyframes rise {
  from { transform: translateY(6px); }
  to   { transform: translateY(0); }
}
.rise { animation: rise var(--dur-slow) var(--ease-out) both; }
.rise-1 { animation-delay: 0.05s; }
.rise-2 { animation-delay: 0.10s; }
.rise-3 { animation-delay: 0.15s; }
.rise-4 { animation-delay: 0.20s; }

/* ════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--sp-12); }
  .hero  { grid-template-columns: 1fr; }
  .hero-ctas { flex-direction: row; flex-wrap: wrap; min-width: 0; }
  .hero-ctas .cta { flex: 1 1 200px; }
}

@media (max-width: 768px) {
  /* Toolbar density: allow wrapping */
  .board-toolbar-left { flex-wrap: wrap; gap: var(--sp-12); }
  /* Make view tabs scrollable if cramped */
  .board-views { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .filter-chip { font-size: var(--fs-10); }
  /* Bigger tap targets on touch widths */
  .filter-chip { padding: var(--sp-6) var(--sp-12); min-height: 30px; }
  .view-tab    { padding: var(--sp-6) var(--sp-12); min-height: 32px; }
}

@media (max-width: 640px) {
  .page { padding: var(--sp-24) var(--sp-16) var(--sp-64); }
  .topnav { margin-bottom: var(--sp-32); }
  .topnav .meta { display: none; }
  .hero { gap: var(--sp-24); margin-bottom: var(--sp-40); padding-bottom: var(--sp-24); }
  .hero-name { font-size: clamp(34px, 9vw, 48px); }
  .hero-slogan { font-size: var(--fs-17); }
  .hero-left { gap: var(--sp-14); }
  .hero-avatar { width: 80px;  height: 80px;  margin-top: 0; }
  .avatar-img  { width: 80px;  height: 80px; }
  .board { grid-template-columns: 1fr; gap: var(--sp-10); padding: var(--sp-10); }
  .column { min-height: auto; }
  .contact { grid-template-columns: 1fr; gap: var(--sp-20); }
  .hero-ctas { flex-direction: column; }
  .hero-ctas .cta { flex: 1 1 auto; padding: var(--sp-14) var(--sp-16); }
  .board-toolbar { padding: var(--sp-10) var(--sp-12); }
  .board-toolbar-right { font-size: var(--fs-11); }
  /* On narrow screens always show drag handle since hover doesn't fire */
  .card-handle { opacity: 0.5; }
  .site-footer { flex-direction: column; gap: var(--sp-8); align-items: flex-start; }
}

/* Very small phones (≤ 380px: iPhone SE, older Androids) */
@media (max-width: 380px) {
  .page { padding: var(--sp-20) var(--sp-12) var(--sp-48); }
  .hero-left { flex-direction: column; gap: var(--sp-12); }
  .hero-avatar, .avatar-img { width: 64px; height: 64px; }
  .hero-meta { gap: var(--sp-8); font-size: var(--fs-11); }
  .hero-meta .sep { display: none; }
}

/* Touch devices: kill transform-on-hover effects that get "stuck" after tap.
   `hover: none` matches phones/tablets that have no fine pointer. */
@media (hover: none) {
  .cta:hover,
  .card:hover,
  .lens-card:hover,
  .agents-card:hover,
  .hero-avatar:hover { transform: none; box-shadow: none; }
  .cta:hover, .agents-card:hover { border-color: var(--color-line); }
  .lens-card:hover { border-color: var(--color-line-soft); }
}

/* ════════════════════════════════════════════════════════════════════════
   PRINT (for HR who prints to PDF)
   ════════════════════════════════════════════════════════════════════════ */
@media print {
  .hero-ctas, .topnav .meta, .site-footer { display: none; }
  .board { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card { box-shadow: none; }
  body { background: white; }
}
