    /* Brain tokens. Light is primary here, matching the live hub; dark
       still resolves via prefers-color-scheme and an explicit toggle. */
    :root {
      --font-sans: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', 'Segoe UI', sans-serif;
      --font-mono: ui-monospace, 'SF Mono', 'JetBrains Mono', 'Fira Code', Menlo, monospace;
      --radius: 10px; --radius-lg: 14px; --radius-sm: 6px; --radius-pill: 999px;
      --accent: #2d9cdb; --accent-soft: rgba(45,156,219,0.10);
      --bg: #ffffff;
      --bg-gradient: radial-gradient(140% 110% at 50% -10%, #fff 0%, #fafbfc 50%, #f4f5f7 100%);
      --surface: rgba(255,255,255,0.95); --surface-solid: #ffffff;
      --surface2: #f6f7f9; --surface-hover: #eef0f3;
      --border: #e5e7eb; --border-strong: #d1d5db; --border-hover: #cfd3d9;
      --text: #00314f; --text-muted: #6b7280; --text-light: #9ca3af;
      --grid-line: rgba(0,0,0,0.035);
      --cyan: #2d6f98; --green: #059669; --amber: #d18021; --violet: #7c3aed;
      color-scheme: light;
    }
    [data-theme="dark"] {
      --bg: #1c2030;
      --bg-gradient: radial-gradient(120% 90% at 50% -10%, #2d3245 0%, #23273a 45%, #171926 100%);
      --surface: rgba(40,44,60,0.68); --surface-solid: #242837;
      --surface2: rgba(52,57,76,0.55); --surface-hover: rgba(48,52,70,0.85);
      --border: rgba(255,255,255,0.10); --border-strong: rgba(255,255,255,0.17);
      --border-hover: rgba(255,255,255,0.17);
      --text: #e8eaf0; --text-muted: #8a92a5; --text-light: #5e6578;
      --grid-line: rgba(255,255,255,0.028);
      --cyan: #5cebe1; --green: #6dd98f; --amber: #f4b942; --violet: #b48eff;
      --accent-soft: rgba(45,156,219,0.15);
      color-scheme: dark;
    }
        * { box-sizing: border-box; }
    body {
      margin: 0; font-family: var(--font-sans);
      font-size: 15.5px; line-height: 1.6;
      background: var(--bg); background-image: var(--bg-gradient);
      color: var(--text); min-height: 100vh; -webkit-font-smoothing: antialiased;
    }
    body::before {
      content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
      background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
      background-size: 64px 64px;
      mask-image: radial-gradient(ellipse at 50% 0%, rgba(0,0,0,0.75), rgba(0,0,0,0) 70%);
    }
    .page { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; padding: 0 48px; }
    a { color: var(--accent); text-decoration: none; }

    .label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--text-light); }
    .mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

    .chip {
      display: inline-flex; align-items: center; gap: 6px;
      font-size: 11.5px; font-weight: 500; white-space: nowrap;
      padding: 3px 10px; border-radius: var(--radius-pill);
    }
    .chip-agent { background: rgba(124,58,237,0.10); border: 1px solid rgba(124,58,237,0.35); color: var(--violet); }
    .chip-done  { background: rgba(5,150,105,0.10);  border: 1px solid rgba(5,150,105,0.35);  color: var(--green); }
    .chip-att   { background: rgba(209,128,33,0.10); border: 1px solid rgba(209,128,33,0.35); color: var(--amber); }
    .chip-fly   { background: rgba(45,111,152,0.10); border: 1px solid rgba(45,111,152,0.35); color: var(--cyan); }

    .card {
      background: var(--surface2); border: 1px solid var(--border);
      border-radius: var(--radius); padding: 24px;
      transition: border-color .14s, background .14s;
    }
    a.card:hover { border-color: var(--border-hover); background: var(--surface-hover); }
    .ph { border-bottom: 1px dashed var(--text-light); color: var(--text-light); font-style: italic; }
    .rule { border-top: 1px solid var(--border); }

    @media (max-width: 760px) { .page { padding: 0 22px; } }

/* ═══════════════ page ═══════════════ */
.page { max-width: 1240px; margin: 0 auto; padding: 0 48px; position: relative; z-index: 1; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 26px 0 0; flex-wrap: wrap; gap: 12px; }
.mark { display: flex; align-items: center; gap: 11px; }
.nav { display: flex; gap: 22px; flex-wrap: wrap; }
.nav a { color: var(--text-muted); font-size: 13.5px; transition: color .14s; }
.nav a:hover, .nav a:focus-visible { color: var(--text); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.huge { font-weight: 250; font-size: clamp(2.5rem, 6.4vw, 4.5rem); line-height: 1.04; letter-spacing: -.032em; margin: 0; max-width: 15ch; }
.big  { font-weight: 300; font-size: clamp(1.75rem, 3.6vw, 2.625rem); line-height: 1.14; letter-spacing: -.026em; margin: 0; }
.sect { font-weight: 400; font-size: clamp(1.4rem, 2.6vw, 1.875rem); letter-spacing: -.02em; margin: 0; }
.sec  { padding-top: clamp(76px, 9vw, 128px); }
.lede { margin: 32px 0 0; font-size: 19px; line-height: 1.6; color: var(--text-muted); max-width: 60ch; }

/* ═══════════════ work rail ═══════════════ */
.rail { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.railcard { scroll-snap-align: start; flex: 0 0 262px; background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px; display: flex; flex-direction: column; gap: 10px; min-height: 236px;
  transition: border-color .14s, background .14s; color: inherit; }
a.railcard:hover { border-color: var(--border-hover); background: var(--surface-hover); }
.railslot { aspect-ratio: 16/10; border-radius: var(--radius); background: var(--bg);
  border: 1px dashed var(--border-strong); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.railslot img { width: 100%; height: 100%; object-fit: cover; }

/* ═══════════════ hemispheres ═══════════════ */
.hemi { display: flex; align-items: baseline; gap: 13px; padding-bottom: 14px; border-bottom: 1px solid var(--border); margin-bottom: 42px; flex-wrap: wrap; }
.hemi .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.hemi .note { font-size: 15px; color: var(--text-muted); }
.proj { display: grid; grid-template-columns: minmax(0,1fr) 380px; gap: 48px; align-items: start; }
.proj + .proj { margin-top: 68px; }
.proj h3 { margin: 0 0 14px; font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.proj p { margin: 0 0 14px; font-size: 16px; line-height: 1.68; color: var(--text-muted); max-width: 54ch; }
.compact { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; margin-top: 26px; }

/* ═══════════════ demo panel ═══════════════ */
.demo { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-solid); }
.demo-bar { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-bottom: 1px solid var(--border); background: var(--surface2); }
.demo-bar .t { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-light); font-weight: 700; }
.demo-body { padding: 18px; }
.recrow { display: grid; grid-template-columns: 20px minmax(0,1fr) auto; gap: 11px; align-items: center;
  padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.recrow:last-child { border-bottom: 0; }

/* ═══════════════ approach / about / experience ═══════════════ */
.approach { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 44px 40px; }
.approach p { margin: 8px 0 0; font-size: 15.5px; line-height: 1.62; color: var(--text-muted); }
.approach strong { color: var(--text); font-weight: 600; }
.about { display: grid; grid-template-columns: 380px minmax(0,1fr); gap: 60px; align-items: start; }
.portrait { width: 100%; aspect-ratio: 4/5; border: 1px solid var(--border); border-radius: 26px;
  background: var(--surface2); object-fit: cover; display: block; }
.bullets { display: flex; flex-direction: column; gap: 13px; margin-top: 20px; max-width: 60ch; }
.bullets div { display: flex; gap: 12px; font-size: 16px; line-height: 1.6; color: var(--text-muted); }
.bullets .b { color: var(--accent); }
.role { display: grid; grid-template-columns: minmax(0,1fr) 190px; gap: 20px; align-items: baseline; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 44px; }
.scatter { display: flex; flex-wrap: wrap; gap: 8px; }

/* ═══════════════ contact ═══════════════ */
.contact { display: grid; grid-template-columns: 300px minmax(0,1fr); gap: 60px; align-items: start; }
.compose { background: var(--surface2); border: 1px solid var(--border); border-radius: 22px; padding: 12px 30px 30px; }
.field { display: grid; grid-template-columns: 92px minmax(0,1fr) auto; gap: 16px; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--border); }
.field .k { font-size: 14.5px; color: var(--text-muted); }
.field .v { font-size: 16px; color: var(--text); }
.field .v.dim { color: var(--text-light); }
.send { display: inline-flex; align-items: center; justify-content: center; padding: 11px 30px; border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong); font-size: 15px; color: var(--text); transition: border-color .14s, background .14s; }
.send:hover { border-color: var(--accent); background: var(--accent-soft); }

@media (max-width: 760px) {
  .page { padding: 0 22px; }
  .approach, .about, .proj, .two, .contact { grid-template-columns: 1fr; gap: 26px; }
  .role, .compact { grid-template-columns: 1fr; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ═══════════════ preview fragment components ═══════════════ */
.pcard { font-variant-emoji: text; font-family: 'DejaVu Sans', 'Segoe UI Symbol', var(--font-sans);
  width: 44px; height: 62px; border-radius: 6px; background: #fff; display: flex; flex-direction: column;
  align-items: center; justify-content: center; font-weight: 700; font-size: 17px; box-shadow: 0 2px 6px rgba(0,0,0,.28); }
.badge { width: 27px; height: 27px; border-radius: 7px; display: inline-flex; align-items: center;
  justify-content: center; font-size: 9.5px; font-weight: 800; letter-spacing: .02em; flex-shrink: 0; }
.tie { display: grid; grid-template-columns: 1fr 26px 1fr; align-items: center;
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.side { display: flex; align-items: center; gap: 9px; padding: 11px 12px; font-size: 12.5px; }
.side.won { background: var(--accent-soft); font-weight: 600; }
.rankpill { width: 21px; height: 21px; border-radius: 6px; background: rgba(5,150,105,.14);
  color: var(--green); font-size: 11px; font-weight: 700; display: inline-flex;
  align-items: center; justify-content: center; flex-shrink: 0; }

/* ═══════════════ real-app preview components ═══════════════ */
/* Values lifted from projects/poker-night/css/app.css and the Brain hub,
   not approximated. */

/* -- Nutmeg: the actual table -- */
.nm-felt { border-radius: 12px; padding: 18px 16px; position: relative; overflow: hidden;
  background: repeating-linear-gradient(90deg, #2e8b46 0 9.5%, #23763a 9.5% 19%); }
.nm-felt::before { content: ''; position: absolute; left: 50%; top: 50%; width: 110px; height: 110px;
  border: 2px solid rgba(255,255,255,.55); border-radius: 50%; transform: translate(-50%,-50%); pointer-events: none; }
.nm-felt::after { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px;
  background: rgba(255,255,255,.45); transform: translateX(-50%); pointer-events: none; }
.nm-pot { position: relative; z-index: 1; display: inline-flex; align-items: baseline; gap: 8px;
  background: #0c1322; border-radius: 8px; padding: 4px 11px; margin-bottom: 13px; }
.nm-pot .lbl { font-size: .6rem; letter-spacing: .18em; color: #8fa3c7; font-weight: 700; }
.nm-pot .amt { font-family: var(--font-mono); font-size: 15px; font-weight: 700; color: #ffd34d; }
.nm-board { position: relative; z-index: 1; display: flex; gap: 7px; justify-content: center; margin-bottom: 14px; }
.nmcard { width: 46px; height: 66px; border-radius: 6px; position: relative; flex: none;
  background: linear-gradient(160deg, #fffefa, #f6f4ec 60%, #edeadf);
  border: 1px solid #d9d4c6; box-shadow: 0 4px 10px rgba(0,0,0,.4);
  font-family: Georgia, 'Times New Roman', serif;
  font-variant-emoji: text; }
.nmcard.su-s { color: #1c2433; } .nmcard.su-h { color: #cf2b40; }
.nmcard.su-d { color: #1c5fce; } .nmcard.su-c { color: #177f3c; }
.nmcard .corner { position: absolute; top: 3px; left: 4px; display: flex; flex-direction: column;
  align-items: center; line-height: .92; font-weight: 700; }
.nmcard .corner b { font-size: 17px; letter-spacing: -.03em; }
.nmcard .corner i { font-style: normal; font-size: 12px; margin-top: 1px; }
.nmcard .big { position: absolute; left: 50%; top: 56%; transform: translate(-50%,-50%);
  font-size: 30px; line-height: 1; opacity: .92; }
.nm-row { position: relative; z-index: 1; display: flex; align-items: center;
  justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.nm-you { display: inline-flex; align-items: center; gap: 7px; background: rgba(0,0,0,.28);
  border-radius: 999px; padding: 4px 11px; font-size: 12px; color: #fff; }
.nm-you .dot { width: 15px; height: 15px; border-radius: 50%; background: #ffd34d; }
.nm-you .stack { font-family: var(--font-mono); font-size: 11.5px; color: rgba(255,255,255,.72); }
.nm-badge { font-size: 11px; font-weight: 700; color: #1d2b20; background: #ffd34d;
  border-radius: 999px; padding: 4px 11px; box-shadow: 0 2px 8px rgba(0,0,0,.35); }

/* -- Brain: the actual home -- */
.br-body { text-align: center; }
.br-word { font-weight: 250; font-size: 30px; letter-spacing: -.01em; color: var(--text); }
.br-rule { width: 74px; height: 2px; margin: 7px auto 9px; border-radius: 999px;
  background: linear-gradient(90deg, transparent, #2d9cdb, transparent); }
.br-tag { font-size: 9.5px; letter-spacing: .3em; color: var(--text-light); margin-bottom: 15px; }
.br-capture { display: flex; gap: 8px; align-items: stretch; margin-bottom: 14px; }
.br-input { flex: 1; display: flex; align-items: center; text-align: left; background: var(--surface-solid);
  border: 1px solid var(--border-strong); border-radius: 10px; padding: 9px 12px;
  font-size: 12.5px; color: var(--text-muted); overflow: hidden; white-space: nowrap; }
.br-type { display: inline-block; overflow: hidden; white-space: nowrap;
  border-right: 2px solid #2d9cdb; padding-right: 1px; }
.br-btn { display: inline-flex; align-items: center; background: #2d9cdb; color: #fff;
  border-radius: 10px; padding: 0 14px; font-size: 12px; font-weight: 600; }
.br-wrap { text-align: left; border: 1px solid var(--border); border-top: 2px solid transparent;
  border-radius: 10px; padding: 11px 14px; margin-bottom: 12px; background: var(--surface-solid);
  background-clip: padding-box; position: relative; }
.br-wrap::before { content: ''; position: absolute; top: -2px; left: 8px; right: 8px; height: 2px;
  border-radius: 2px; background: linear-gradient(90deg, #f4b942, #2d9cdb); }
.br-wrap b { display: block; font-size: 12.5px; line-height: 1.45; margin-top: 4px; }
.br-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.br-tile { border: 1px solid var(--border); border-radius: 10px; padding: 12px 10px;
  background: var(--surface-solid); }
.br-tile b { display: block; font-size: 12.5px; color: #2d6f98; margin-bottom: 3px; }
.br-tile span { font-family: var(--font-mono); font-size: 10px; color: var(--text-light); letter-spacing: .04em; }

/* -- Ladder Comp: the actual comp chrome -- */
.lc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 11px; }
.lc-title { font-size: 12px; font-weight: 800; letter-spacing: .12em; color: var(--text); }
.lc-full { font-size: 11px; font-weight: 600; color: #059669; }
.lc-tabs { display: inline-flex; gap: 2px; background: var(--surface2); border: 1px solid var(--border);
  border-radius: 10px; padding: 3px; margin-bottom: 13px; }
.lc-tab { font-size: 10.5px; color: var(--text-muted); padding: 4px 10px; border-radius: 7px; }
.lc-tab.on { background: var(--surface-solid); color: var(--text); font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,.08); border: 1px solid var(--border); }
.lc-seeds { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 13px; }
.lc-seed { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border);
  border-radius: 9px; padding: 3px 9px 3px 3px; font-size: 11px; font-weight: 600; background: var(--surface-solid); }
.lc-seed .n { width: 18px; height: 18px; border-radius: 5px; background: rgba(5,150,105,.14);
  color: #059669; font-size: 10px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }

/* ═══════════════ aliveness ═══════════════ */
/* Previews animate when scrolled into view; the observer in portfolio.js
   toggles .in-view so they replay. prefers-reduced-motion collapses all of
   this via the global reduce block. */
.anim .nmcard { opacity: 0; transform: translateY(10px) rotateY(88deg); }
.anim.in-view .nmcard { animation: nm-deal .45s cubic-bezier(.3,1.2,.3,1) forwards;
  animation-delay: calc(var(--i, 0) * .13s); }
@keyframes nm-deal { to { opacity: 1; transform: none; } }
.anim .nm-badge, .anim .nm-you { opacity: 0; }
.anim.in-view .nm-badge, .anim.in-view .nm-you { animation: rise-in .4s ease .85s forwards; }
@keyframes rise-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.anim .br-type { width: 0; }
.anim.in-view .br-type { animation: br-type 2s steps(30) .5s forwards, br-caret 1s step-end infinite; }
@keyframes br-type { to { width: 100%; } }
@keyframes br-caret { 50% { border-color: transparent; } }
.anim .br-wrap, .anim .br-tile { opacity: 0; }
.anim.in-view .br-wrap { animation: rise-in .45s ease 2.5s forwards; }
.anim.in-view .br-tile { animation: rise-in .45s ease forwards; }
.anim.in-view .br-tile:nth-child(1) { animation-delay: 2.8s; }
.anim.in-view .br-tile:nth-child(2) { animation-delay: 2.95s; }

.anim .rc-check { stroke-dasharray: 30; stroke-dashoffset: 30; }
.anim.in-view .rc-check { animation: draw .5s ease forwards; animation-delay: calc(var(--i, 0) * .5s); }
@keyframes draw { to { stroke-dashoffset: 0; } }
.anim .rc-held { opacity: 0; }
.anim.in-view .rc-held { animation: rise-in .45s ease 1.7s forwards; }
.anim .rc-verdict { opacity: 0; }
.anim.in-view .rc-verdict { animation: rise-in .45s ease 2.2s forwards; }

.anim .lc-tick { opacity: 0; transform: scale(.4); }
.anim.in-view .lc-tick { animation: pop .35s cubic-bezier(.3,1.4,.4,1) forwards;
  animation-delay: calc(.5s + var(--i, 0) * .45s); }
@keyframes pop { to { opacity: 1; transform: scale(1); } }
.anim .lc-score { opacity: 0; }
.anim.in-view .lc-score { animation: rise-in .4s ease forwards; animation-delay: calc(1.6s + var(--i, 0) * .15s); }

/* Coverage Scan: the sweep passes, every name resolves, the missed one re-runs */
.cv-row { display: grid; grid-template-columns: 20px minmax(0,1fr) auto; gap: 11px; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; min-height: 37px; }
.cv-row:last-of-type { border-bottom: 0; }
.cv-glass { color: var(--text-light); display: flex; }
.cv-name { display: block; width: 100%; height: 10px; border-radius: 999px;
  background: var(--surface-hover); border: 1px solid var(--border); }
.cv-status, .cv-re { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.cv-swap { display: grid; }
.cv-swap > * { grid-area: 1 / 1; justify-self: end; font-size: 12px; }
.cv-sweep { position: absolute; left: 0; right: 0; top: 0; height: 36px; pointer-events: none; opacity: 0;
  background: linear-gradient(180deg, rgba(45,156,219,0) 0%, rgba(45,156,219,.08) 65%, rgba(45,156,219,.30) 98%, rgba(45,156,219,.55) 100%); }
.anim.in-view .cv-sweep { animation: cv-sweep 2s ease-in-out .2s forwards; }
@keyframes cv-sweep { 0% { opacity: 1; transform: translateY(-36px); } 88% { opacity: 1; }
  100% { opacity: 0; transform: translateY(230px); } }
.anim .cv-row { opacity: 0; }
.anim.in-view .cv-row { animation: rise-in .35s ease forwards; animation-delay: calc(var(--i, 0) * .16s); }
.anim .cv-status { opacity: 0; }
.anim.in-view .cv-status { animation: rise-in .3s ease forwards; animation-delay: calc(.7s + var(--i, 0) * .32s); }
.anim .cv-miss { opacity: 0; }
.anim.in-view .cv-miss { animation: cv-hold 2.5s ease 1s forwards; }
@keyframes cv-hold { 0% { opacity: 0; } 12% { opacity: 1; } 82% { opacity: 1; } 100% { opacity: 0; } }
.anim .cv-re { opacity: 0; }
.anim.in-view .cv-re { animation: rise-in .4s ease 3.6s forwards; }
.anim .cv-verdict { opacity: 0; }
.anim.in-view .cv-verdict { animation: rise-in .45s ease 4.1s forwards; }

/* ═══════════════ rail vignettes: each card carries a piece of its app ═══ */
.railslot { height: 104px; aspect-ratio: auto; border: 1px solid var(--border);
  border-style: solid; background: var(--surface-solid); padding: 9px; display: block; }
.vg { height: 100%; position: relative; overflow: hidden; border-radius: 7px; }

/* Nutmeg: a strip of the pitch with a mini flop */
.vg-felt { height: 100%; display: flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 7px; background: repeating-linear-gradient(90deg, #2e8b46 0 12%, #23763a 12% 24%); }
.nmcard-sm { width: 30px; height: 43px; border-radius: 4px; position: relative; flex: none;
  background: linear-gradient(160deg, #fffefa, #f6f4ec 60%, #edeadf);
  border: 1px solid #d9d4c6; box-shadow: 0 2px 6px rgba(0,0,0,.35);
  font-family: Georgia, 'Times New Roman', serif; font-variant-emoji: text; }
.nmcard-sm .corner { position: absolute; top: 2px; left: 3px; display: flex; flex-direction: column;
  align-items: center; line-height: .9; font-weight: 700; }
.nmcard-sm .corner b { font-size: 11px; letter-spacing: -.03em; }
.nmcard-sm .corner i { font-style: normal; font-size: 8px; }
.nmcard-sm .big { position: absolute; left: 50%; top: 58%; transform: translate(-50%,-50%);
  font-size: 17px; line-height: 1; opacity: .92; }

/* Brain: wordmark and the capture bar in miniature */
.vg-brain { height: 100%; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 4px; }
.vg-brain .w { font-weight: 250; font-size: 17px; color: var(--text); }
.vg-brain .r { width: 44px; height: 2px; border-radius: 999px;
  background: linear-gradient(90deg, transparent, #2d9cdb, transparent); }
.vg-brain .cap { display: flex; gap: 5px; width: 88%; margin-top: 5px; }
.vg-brain .in { flex: 1; border: 1px solid var(--border-strong); border-radius: 6px;
  padding: 4px 7px; font-size: 9px; color: var(--text-light); text-align: left;
  overflow: hidden; white-space: nowrap; }
.vg-brain .bt { background: #2d9cdb; color: #fff; border-radius: 6px; padding: 4px 8px;
  font-size: 8.5px; font-weight: 700; display: flex; align-items: center; }

/* Close: the reduction bar, filling in */
.vg-close { height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 7px; padding: 0 4px; }
.vg-close .cap { font-size: 8.5px; letter-spacing: .14em; font-weight: 700; color: var(--text-light); }
.vg-segs { display: flex; gap: 3px; }
.vg-seg { height: 18px; border-radius: 4px; flex: 1; }
.vg-seg.g { background: rgba(5,150,105,.14); border: 1px solid rgba(5,150,105,.35); }
.vg-seg.a { background: rgba(209,128,33,.10); border: 1px solid rgba(209,128,33,.35); }
.anim .vg-seg { opacity: 0; }
.anim.in-view .vg-seg { animation: rise-in .3s ease forwards; animation-delay: calc(var(--i) * .09s); }

/* Ladder: one seeded tie in miniature */
.vg-lc { height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 0 2px; }
.vg-lc .cap { font-size: 8.5px; letter-spacing: .12em; font-weight: 800; color: var(--text-light); }
.vg-tie { display: grid; grid-template-columns: 1fr 18px 1fr; align-items: center;
  border: 1px solid var(--border); border-radius: 7px; overflow: hidden; background: var(--surface-solid); }
.vg-side { display: flex; align-items: center; gap: 5px; padding: 6px 7px; font-size: 9.5px; font-weight: 600; }
.vg-side.won { background: var(--accent-soft); }
.vg-badge { width: 17px; height: 17px; border-radius: 4px; display: inline-flex; align-items: center;
  justify-content: center; font-size: 6.5px; font-weight: 800; flex-shrink: 0; }

/* Forecasting: the cashflow fan, drawing itself */
.vg-chart { width: 100%; height: 100%; display: block; }
.vg-chart .ln { fill: none; stroke-linecap: round; }
.anim .vg-chart .actual { stroke-dasharray: 150; stroke-dashoffset: 150; }
.anim.in-view .vg-chart .actual { animation: draw-ln .9s ease .15s forwards; }
@keyframes draw-ln { to { stroke-dashoffset: 0; } }
.anim .vg-chart .fan { opacity: 0; }
.anim.in-view .vg-chart .fan { animation: fade-ln .5s ease 1s forwards; }
@keyframes fade-ln { to { opacity: 1; } }
.anim .vg-chart .mark { opacity: 0; }
.anim.in-view .vg-chart .mark { animation: pop .35s cubic-bezier(.3,1.4,.4,1) 1.35s forwards; }

/* Data apps: a sliver of the reconciliation grid */
.vg-rows { height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 0 2px; }
.vg-row { display: grid; grid-template-columns: 12px minmax(0,1fr) auto; gap: 7px; align-items: center;
  font-size: 9px; color: var(--text-muted); border: 1px solid var(--border); border-radius: 6px;
  padding: 4px 7px; background: var(--surface-solid); }
.vg-row .mono { font-size: 8.5px; }
.anim .vg-row { opacity: 0; }
.anim.in-view .vg-row { animation: rise-in .35s ease forwards; animation-delay: calc(var(--i) * .15s); }

/* Coverage Scan: skeleton names, a passing sweepline, every dot lands */
.vg-scan { height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 0 4px; }
.vg-scan .cap { font-size: 8.5px; letter-spacing: .14em; font-weight: 700; color: var(--text-light); }
.vg-scanrow { display: flex; align-items: center; gap: 7px; }
.vg-scanrow .nm { display: block; flex: 1; height: 6px; border-radius: 999px;
  background: var(--surface-hover); border: 1px solid var(--border); }
.vg-scanrow .dt { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.vg-scanrow .dt.g { background: var(--green); }
.vg-scanrow .dt.v { background: var(--violet); }
.vg-sweepline { position: absolute; left: 0; right: 0; top: 12px; height: 2px; opacity: 0;
  background: linear-gradient(90deg, transparent, var(--accent), transparent); }
.anim.in-view .vg-sweepline { animation: cv-sweep-sm 1.5s ease-in-out .3s forwards; }
@keyframes cv-sweep-sm { 0% { opacity: .9; transform: translateY(0); } 100% { opacity: 0; transform: translateY(72px); } }
.anim .vg-scanrow { opacity: 0; }
.anim.in-view .vg-scanrow { animation: rise-in .3s ease forwards; animation-delay: calc(var(--i) * .14s); }
.anim .vg-scanrow .dt { opacity: 0; transform: scale(.4); }
.anim.in-view .vg-scanrow .dt { animation: pop .3s cubic-bezier(.3,1.4,.4,1) forwards;
  animation-delay: calc(.7s + var(--i) * .25s); }
.anim .vg-scan-done { opacity: 0; }
.anim.in-view .vg-scan-done { animation: rise-in .4s ease 1.6s forwards; }

/* ═══════════════ theme toggle ═══════════════ */
.theme-toggle { position: fixed; right: 18px; bottom: 18px; z-index: 50;
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-solid); border: 1px solid var(--border-strong);
  color: var(--text-muted); transition: border-color .14s, color .14s; }
.theme-toggle:hover { border-color: var(--accent); color: var(--text); }
.theme-toggle .moon { display: block; }
.theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: block; }
