/* cockpit-theme.css — THE Jarvis 2.0 design kit (2026-08-07 bright redesign).
   connects_to: brain_4.7/brain_server.py via GET /cockpit-theme.css
   Chris's orders encoded here:
   - BRIGHT, not dim. Two themes: dark (default) + light, html[data-theme="light"].
   - NUMBER HIERARCHY (non-negotiable): ONE hero number per screen, 56-72px
     JetBrains Mono tabular-nums w600, color IS meaning (blue=up/gain,
     red=down/loss, white/ink=neutral), count-up ticks. Tier-2 24-28px mono.
     Labels 11-13px muted uppercase ABOVE the number. 4:1 squint rule.
   - ONE TRUTH ON GREEN (final): ZERO green anywhere — the 2026-08-04 zero-green
     lock stands; the brief 08-07 "green reinstated" note is dead. Neon #ccff00
     is BRAND, not green (brand / active-nav / section-icons only). Blue =
     accent/interactive + up-moves, red = down, never green for P&L. */

:root{
  /* DARK theme (applies when data-theme="dark") — Chris 2026-08-25 repalette:
     grey-blue base (NOT pure black), light/dark blue accents, PURPLE + PINK as
     pops, green=up / red=down. Lime is retired. Light/cream is the default
     (see cockpit-theme.js default "light"). */
  --bg:#13171d; --surface:#1b212a; --surface-flat:#232b35;
  --text:#e9e5da; --sub:#9aa6b2; --faint:#697480;
  --line:rgba(255,255,255,.09); --line-soft:rgba(255,255,255,.05);
  --accent:#7fb0c9; --accent-glow:rgba(127,176,201,.16);   /* light blue = interactive */
  --accent2:#4f8cae; --accent2-glow:rgba(79,140,174,.14);  /* dark-ish blue */
  --up:#3fb872;     --up-glow:rgba(63,184,114,.14);         /* green up */
  --down:#e0594a;   --down-glow:rgba(224,89,74,.16);        /* red down */
  --brand:#9b83d6;  --brand-glow:rgba(155,131,214,.22); --brand-ink:#b6a3e6; /* purple = brand pop */
  --pop:#ff4d94;    --pop-glow:rgba(255,77,148,.20);        /* hot pink = spark pop */
  --warn:#f0a53d;   /* amber = stale/warning ONLY */
  --chip-ink:#12161c;
  --hero-neutral:#e9e5da;
  --shadow-card:0 1px 0 rgba(255,255,255,.03) inset, 0 8px 24px rgba(0,0,0,.40);
}
html[data-theme="light"]{
  /* LIGHT theme (DEFAULT) — grey-light-tan / greige base, grey-blue text,
     dark-blue interactive + light-blue secondary, purple + pink pops. */
  --bg:#e8e2d6; --surface:#f7f4ee; --surface-flat:#ddd6c7;
  --text:#202a34; --sub:#5f6b78; --faint:#9298a0;
  --line:rgba(32,42,52,.13); --line-soft:rgba(32,42,52,.06);
  --accent:#20496b; --accent-glow:rgba(32,73,107,.12);     /* dark blue = interactive */
  --accent2:#7ea9c2; --accent2-glow:rgba(126,169,194,.14); /* light blue */
  --up:#2f8f52;     --up-glow:rgba(47,143,82,.12);
  --down:#c1452f;   --down-glow:rgba(193,69,47,.12);
  --brand:#6d5aa0;  --brand-glow:rgba(109,90,160,.16); --brand-ink:#574385; /* purple pop */
  --pop:#c9186a;    --pop-glow:rgba(201,24,106,.12);       /* hot pink pop */
  --warn:#b45309;
  --chip-ink:#ffffff;
  --hero-neutral:#202a34;
  --shadow-card:0 1px 2px rgba(32,42,52,.05), 0 10px 28px rgba(32,42,52,.10);
}
html[data-theme="dark"]{ color-scheme:dark }

*{box-sizing:border-box;margin:0;padding:0}
html{color-scheme:dark} html[data-theme="light"]{color-scheme:light}
body{background:var(--bg);color:var(--text);font-family:Inter,sans-serif;font-size:14px;
     transition:background .25s ease,color .25s ease}
h1,h2,h3,.sora{font-family:Sora,sans-serif;letter-spacing:-.01em}
a{color:inherit}
.mono{font-family:"JetBrains Mono",ui-monospace,Consolas,monospace;font-variant-numeric:tabular-nums}

/* ---- header (shared grammar) ---- */
.jz-header{background:var(--surface);border-bottom:1px solid var(--line);padding:11px 22px;
  display:flex;align-items:center;gap:20px;flex-wrap:wrap}
.jz-brand{font-family:Sora,sans-serif;font-weight:800;font-size:16px}
.jz-brand span{color:var(--brand-ink);text-shadow:0 0 4px var(--brand-glow)}
.jz-nav{display:flex;gap:16px;flex-wrap:wrap}
.jz-nav a{color:var(--sub);text-decoration:none;font-size:12.5px;font-weight:600;font-family:Sora,sans-serif}
.jz-nav a:hover{color:var(--text)}
.jz-nav a.on{color:var(--brand-ink);text-shadow:0 0 6px var(--brand-glow)}
.theme-toggle{margin-left:auto;background:var(--surface-flat);border:1px solid var(--line);
  color:var(--sub);border-radius:9999px;padding:5px 12px;font-size:11.5px;font-weight:700;
  font-family:Sora,sans-serif;cursor:pointer;display:flex;align-items:center;gap:6px;
  transition:color .15s,border-color .15s}
.theme-toggle:hover{color:var(--text);border-color:var(--accent)}

/* ---- .site-head — THE canonical shared header (2026-08-09 design unify).
     Identical HTML on every page; styling lives ONLY here, pages delete their
     per-page header CSS. Only the a.on class moves from page to page. ---- */
.site-head{background:var(--surface);border-bottom:1px solid var(--line);padding:11px 22px;
  display:flex;align-items:center;gap:20px;flex-wrap:wrap}
.site-head .brand{font-family:Sora,sans-serif;font-weight:800;font-size:16px}
.site-head .brand span{color:var(--brand-ink);text-shadow:0 0 4px var(--brand-glow)}
.site-head nav{display:flex;gap:16px;flex-wrap:wrap}
.site-head nav a{color:var(--sub);text-decoration:none;font-size:12.5px;font-weight:600;
  font-family:Sora,sans-serif;padding:8px 2px}
.site-head nav a:hover{color:var(--text)}
.site-head nav a.on{color:var(--brand-ink);text-shadow:0 0 6px var(--brand-glow)}
.site-head .theme-toggle{margin-left:auto} /* inherits the kit .theme-toggle pill above */
/* 2026-08-25 repalette: the header now FOLLOWS the theme (cream in light with a
   purple wordmark, grey-blue panel in dark) — radintel-style cream header. */

/* ---- NUMBER HIERARCHY (Chris's law, verbatim rules) ---- */
.microlabel{display:block;font-size:11px;letter-spacing:.09em;text-transform:uppercase;
  color:var(--sub);font-weight:600;font-family:Sora,sans-serif;margin-bottom:2px}
.hero-num{font-family:"JetBrains Mono",ui-monospace,Consolas,monospace;
  font-variant-numeric:tabular-nums;font-weight:600;font-size:64px;line-height:1.04;
  color:var(--hero-neutral)}
.hero-num.up{color:var(--up);text-shadow:0 0 18px var(--up-glow)}
.hero-num.down{color:var(--down);text-shadow:0 0 18px var(--down-glow)}
.hero-sub{font-family:"JetBrains Mono",ui-monospace,monospace;font-variant-numeric:tabular-nums;
  font-weight:600;font-size:20px}
.hero-sub.up{color:var(--up)} .hero-sub.down{color:var(--down)}
.t2-num{font-family:"JetBrains Mono",ui-monospace,Consolas,monospace;
  font-variant-numeric:tabular-nums;font-weight:600;font-size:26px;line-height:1.1;
  color:var(--text)}
.t2-num.up{color:var(--up)} .t2-num.down{color:var(--down)}
.num-tick{animation:numtick .35s ease}
@keyframes numtick{0%{filter:brightness(1.6)}100%{filter:brightness(1)}}
@media (prefers-reduced-motion:reduce){.num-tick{animation:none}}
@media (max-width:760px){.hero-num{font-size:48px}.t2-num{font-size:22px}}

/* ---- cards — PREMIUM pass (Chris 2026-08-07: "the existing cards suck /
     looks cheap"). Layered depth, lime hairline signature, hover lift.
     Applies to EVERY page through this one class. ---- */
.card{background:linear-gradient(180deg,rgba(255,255,255,.025),rgba(255,255,255,0) 42px),var(--surface);
  border:1px solid var(--line);border-radius:12px;margin-bottom:12px;overflow:hidden;
  box-shadow:0 1px 0 rgba(255,255,255,.04) inset,0 1px 2px rgba(0,0,0,.4),0 12px 32px -12px rgba(0,0,0,.5);
  transition:border-color .18s,transform .18s,box-shadow .18s}
.card:hover{border-color:var(--brand-glow);transform:translateY(-1px);
  box-shadow:0 1px 0 rgba(255,255,255,.05) inset,0 2px 4px rgba(0,0,0,.4),0 18px 44px -14px rgba(0,0,0,.55)}
html[data-theme="light"] .card{background:var(--surface);
  box-shadow:0 1px 2px rgba(16,17,20,.05),0 10px 28px -12px rgba(16,17,20,.12)}
html[data-theme="light"] .card:hover{box-shadow:0 2px 4px rgba(16,17,20,.06),0 16px 40px -14px rgba(16,17,20,.16)}
.card-head{padding:11px 16px;border-bottom:1px solid var(--line);display:flex;
  align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;position:relative}
.card-head:before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;
  background:linear-gradient(180deg,var(--brand),transparent);opacity:.85}
.card-head h2{font-size:13px;font-weight:800;display:flex;align-items:center;gap:8px;
  letter-spacing:.05em;text-transform:uppercase;font-family:Sora,sans-serif}
.card-head .sub{color:var(--sub);font-size:11px;font-weight:500;font-family:Inter,sans-serif;text-transform:none;letter-spacing:0}
.card-body{padding:13px 16px}

/* ---- movers strips (top-5 gainers / losers) ---- */
.movers-duo{display:grid;grid-template-columns:1fr 1fr;gap:10px}
@media (max-width:900px){.movers-duo{grid-template-columns:1fr}}
.mover-row{display:flex;align-items:baseline;gap:10px;padding:7px 10px;border-radius:.6rem;
  background:var(--surface-flat);border:1px solid var(--line-soft);margin-bottom:6px;cursor:default}
.mover-row:last-child{margin-bottom:0}
.mover-sym{font-family:Sora,sans-serif;font-weight:800;font-size:13.5px;min-width:52px}
.mover-px{font-family:"JetBrains Mono",monospace;font-variant-numeric:tabular-nums;
  font-size:13px;color:var(--sub);margin-left:auto}
.mover-chg{font-family:"JetBrains Mono",monospace;font-variant-numeric:tabular-nums;
  font-weight:700;font-size:15px;min-width:74px;text-align:right}
.mover-chg.up{color:var(--up)} .mover-chg.down{color:var(--down)}
.mover-rank{font-size:10px;color:var(--faint);font-family:Sora,sans-serif;font-weight:700}

/* ---- METRIC BOX (Chris 2026-08-07: "boxes like these" - EveryFeed-style
     clean stat card: icon top-right, small uppercase label, big bold number,
     minimal flat surface, subtle border. Reusable everywhere a KPI needs a
     box instead of floating text.) ---- */
.mbox{background:var(--surface);border:1px solid var(--line);border-radius:10px;
  padding:14px 16px;min-width:132px;flex:1}
.mbox-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}
.mbox-head .k{font-size:10.5px;text-transform:uppercase;letter-spacing:.08em;
  color:var(--sub);font-weight:700;font-family:Sora,sans-serif}
.mbox-icon{width:22px;height:22px;border-radius:6px;display:flex;align-items:center;
  justify-content:center;background:var(--surface-flat);color:var(--faint);flex-shrink:0}
.mbox-icon .material-symbols-outlined{font-size:14px;color:inherit}
.mbox-val{font-family:"JetBrains Mono",ui-monospace,Consolas,monospace;
  font-variant-numeric:tabular-nums;font-weight:700;font-size:26px;line-height:1.1;color:var(--text)}
.mbox-val.up{color:var(--up)} .mbox-val.down{color:var(--down)} .mbox-val.brand{color:var(--brand-ink)}
.mbox-sub{color:var(--faint);font-size:10.5px;margin-top:4px}
.mbox-row{display:flex;gap:12px;flex-wrap:wrap}
@media(max-width:640px){.mbox{min-width:120px}.mbox-val{font-size:22px}}

/* ---- chips / pills ---- */
.pill{display:inline-block;padding:2px 8px;border-radius:9999px;font-size:10px;font-weight:700;
  font-family:Sora,sans-serif;letter-spacing:.04em;text-transform:uppercase;white-space:nowrap}
.pill.up{background:var(--up-glow);color:var(--up)}
.pill.down{background:var(--down-glow);color:var(--down)}
.pill.brand{background:var(--brand-glow);color:var(--chip-ink)}
.pill.neutral{background:var(--line-soft);color:var(--sub)}
.pill.warn{background:var(--down-glow);color:var(--down)}

/* ---- tables ---- */
.jz-tbl{width:100%;border-collapse:collapse;font-size:12.5px}
.jz-tbl th{color:var(--sub);text-transform:uppercase;font-size:10.5px;letter-spacing:.06em;
  text-align:left;padding:8px 12px;border-bottom:1px solid var(--line);
  font-family:Sora,sans-serif;white-space:nowrap;position:sticky;top:0;background:var(--surface)}
.jz-tbl td{padding:8px 12px;border-bottom:1px solid var(--line-soft);vertical-align:top}
.jz-tbl tr:hover td{background:var(--line-soft)}
.jz-tbl .num{font-family:"JetBrains Mono",monospace;font-variant-numeric:tabular-nums}
.jz-tbl .num.up{color:var(--up)} .jz-tbl .num.down{color:var(--down)}

.at{color:var(--sub);font-weight:700}
::selection{background:var(--brand);color:var(--chip-ink)}

/* ---- VELOCITY additions (cleaned per Chris 2026-08-07: no dirty washes) ---- */
.display-velocity{font-family:Sora,sans-serif;font-weight:800;font-style:italic;
  letter-spacing:-.045em;
  background:linear-gradient(92deg,var(--text) 35%,var(--brand));
  -webkit-background-clip:text;background-clip:text;color:transparent}
.aurora{position:relative} /* washes KILLED — kept as a no-op so pages don't break */
.aurora:before{content:none}
.cta-velocity{background:var(--brand);color:#0b0b0b;
  font:800 14px Sora,sans-serif;padding:13px 28px;border:none;border-radius:9999px;
  cursor:pointer;box-shadow:0 0 8px var(--brand-glow);transition:box-shadow .2s}
.cta-velocity:hover{box-shadow:0 0 14px var(--brand-glow)}

/* ---- THE TICKER (Chris: "i want the ticker somewhere") ---- */
.jz-ticker{overflow:hidden;border-bottom:1px solid var(--line);background:var(--surface);
  white-space:nowrap;position:relative}
.jz-ticker-track{display:inline-flex;gap:34px;padding:8px 0;
  animation:jzticker 60s linear infinite;will-change:transform}
.jz-ticker:hover .jz-ticker-track{animation-play-state:paused}
@media (prefers-reduced-motion:reduce){.jz-ticker-track{animation:none}}
@keyframes jzticker{from{transform:translateX(0)}to{transform:translateX(-50%)}}
.jz-tick{display:inline-flex;align-items:baseline;gap:7px;font-family:"JetBrains Mono",monospace;
  font-variant-numeric:tabular-nums;font-size:12.5px}
.jz-tick .s{font-family:Sora,sans-serif;font-weight:800;font-size:11.5px;color:var(--sub)}
.jz-tick .p{color:var(--text);font-weight:600}
.jz-tick .c{font-weight:700}
.jz-tick .c.up{color:var(--up)} .jz-tick .c.down{color:var(--down)}

/* ============================================================================
   MOTION + HERO SIZES (Chris 2026-08-25: break the "bang bang bang" — give
   pages rhythm with reveal-on-scroll, staggered entrances, a live pulse, and
   big/medium/small hero numbers. All motion respects prefers-reduced-motion.
   ============================================================================ */
@media (prefers-reduced-motion:no-preference){
  [data-reveal]{opacity:0;transform:translateY(15px);
    transition:opacity .6s cubic-bezier(.2,.7,.3,1),transform .6s cubic-bezier(.2,.7,.3,1)}
  [data-reveal].in{opacity:1;transform:none}
  .stagger>*{opacity:0;animation:riseIn .55s cubic-bezier(.2,.7,.3,1) forwards}
  .stagger>*:nth-child(1){animation-delay:.04s}.stagger>*:nth-child(2){animation-delay:.10s}
  .stagger>*:nth-child(3){animation-delay:.16s}.stagger>*:nth-child(4){animation-delay:.22s}
  .stagger>*:nth-child(5){animation-delay:.28s}.stagger>*:nth-child(6){animation-delay:.34s}
  .stagger>*:nth-child(n+7){animation-delay:.40s}
  @keyframes riseIn{from{opacity:0;transform:translateY(13px)}to{opacity:1;transform:none}}
}
/* live "market open" pulse dot */
.livedot{width:8px;height:8px;border-radius:50%;background:var(--up);position:relative;display:inline-block;flex:0 0 auto}
.livedot::after{content:"";position:absolute;inset:-3px;border-radius:50%;border:2px solid var(--up);
  animation:jzping 1.9s cubic-bezier(0,0,.2,1) infinite;opacity:.55}
@keyframes jzping{75%,100%{transform:scale(2);opacity:0}}
@media (prefers-reduced-motion:reduce){.livedot::after{animation:none}}
/* HERO NUMBER SIZES — big / medium / small so sections have rhythm, not one flat wall */
.h-xl,.h-lg,.h-md,.h-sm{font-family:"JetBrains Mono",ui-monospace,Consolas,monospace;
  font-variant-numeric:tabular-nums;line-height:1;color:var(--hero-neutral)}
.h-xl{font-weight:700;font-size:84px;letter-spacing:-.02em}
.h-lg{font-weight:600;font-size:54px}
.h-md{font-weight:600;font-size:34px}
.h-sm{font-weight:600;font-size:22px;color:var(--text)}
.h-xl.up,.h-lg.up,.h-md.up,.h-sm.up{color:var(--up)}
.h-xl.down,.h-lg.down,.h-md.down,.h-sm.down{color:var(--down)}
.h-xl.brand,.h-lg.brand,.h-md.brand{color:var(--brand-ink)}
@media(max-width:760px){.h-xl{font-size:58px}.h-lg{font-size:42px}.h-md{font-size:28px}}
/* eyebrow label (small uppercase over a hero) */
.eyebrow{font-family:Sora,sans-serif;font-size:11px;font-weight:700;letter-spacing:.16em;
  text-transform:uppercase;color:var(--sub)}
/* bento grid helpers */
.bento{display:grid;grid-template-columns:repeat(12,1fr);gap:14px;align-items:start}
.bento .col-3{grid-column:span 3}.bento .col-4{grid-column:span 4}.bento .col-5{grid-column:span 5}
.bento .col-6{grid-column:span 6}.bento .col-7{grid-column:span 7}.bento .col-8{grid-column:span 8}
.bento .col-12{grid-column:span 12}
@media(max-width:980px){.bento .col-3,.bento .col-4,.bento .col-5,.bento .col-6,.bento .col-7,.bento .col-8{grid-column:span 12}}

/* ============================================================================
   A33 DEPTH + TACTILE LAYER (Chris 2026-09-15: "buttons not being flat",
   "go ahead have fun", "make sure i get results that show up on the page",
   "detailed work no half ass").

   connects_to: every brain_4.7 page via <link href="/cockpit-theme.css">

   ADDITIVE ONLY per A26. Nothing above line 255 was edited or deleted. Every
   rule below is appended, so it wins on source order at equal specificity and
   loses to any page rule that is more specific. Zero new hex values: the whole
   layer is built from the existing palette variables, so whichever way Chris
   rules on the open Loomi-vs-cockpit palette question, the depth follows the
   palette automatically and A33 rule 11 stays satisfied.

   Grammar is taken from Chris's approved DESIGN.md, which specifies "pressable
   keys with inset highlights, grounded shadows and a depressed active state"
   and requires reduced motion to be honored. Its PALETTE is deliberately not
   taken, because that document explicitly does not authorize restyling the
   JARVIS cockpit.

   The physical model, applied consistently:
     RAISED   = you can click it        (buttons, toggles, action chips)
     RECESSED = the machine reports out (readouts, chart tracks, wells)
     QUIET    = containers              (cards keep their existing material)
   One light source, top-left, everywhere. Boldness is spent in exactly one
   place: the press.
   ============================================================================ */

:root{
  /* grounded shadows, dark theme. Stacked so the near edge reads tight and the
     cast shadow reads soft, which is how a real object sits on a surface. */
  --elev-1:0 1px 2px rgba(0,0,0,.42);
  --elev-2:0 2px 3px rgba(0,0,0,.40), 0 6px 14px -6px rgba(0,0,0,.55);
  --elev-3:0 3px 5px rgba(0,0,0,.42), 0 12px 26px -10px rgba(0,0,0,.60);
  /* inset highlight along the lit (top) edge of a key */
  --key-lit:inset 0 1px 0 rgba(255,255,255,.11);
  /* the depressed state: light is occluded, shadow moves inside */
  --key-pressed:inset 0 2px 5px rgba(0,0,0,.46), inset 0 -1px 0 rgba(255,255,255,.05);
  /* a recessed well, for surfaces the machine reports INTO */
  --well:inset 0 2px 5px rgba(0,0,0,.34), inset 0 -1px 0 rgba(255,255,255,.04);
  /* the material a key is cut from */
  --key-face:linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,0) 58%), var(--surface-flat);
  --press-in:90ms cubic-bezier(.3,.7,.4,1);
  --press-out:180ms cubic-bezier(.2,.7,.3,1);
}
html[data-theme="light"]{
  /* Light is the DEFAULT theme here, so these are the values most people see.
     Shadows are tinted from the ink colour rather than neutral grey, which is
     what stops a cream interface looking dirty. */
  --elev-1:0 1px 2px rgba(32,42,52,.11);
  --elev-2:0 2px 3px rgba(32,42,52,.10), 0 6px 14px -6px rgba(32,42,52,.16);
  --elev-3:0 3px 5px rgba(32,42,52,.11), 0 12px 26px -10px rgba(32,42,52,.20);
  --key-lit:inset 0 1px 0 rgba(255,255,255,.90);
  --key-pressed:inset 0 2px 5px rgba(32,42,52,.20), inset 0 -1px 0 rgba(255,255,255,.55);
  --well:inset 0 2px 5px rgba(32,42,52,.13), inset 0 -1px 0 rgba(255,255,255,.60);
  --key-face:linear-gradient(180deg, rgba(255,255,255,.85), rgba(255,255,255,0) 58%), var(--surface-flat);
}

/* ---- THE KEY. Every button on every page becomes a physical object. --------
   The bare element selector is intentional and is the lowest possible
   specificity, so any page that already styles its own button keeps its look
   and only inherits the press physics below. */
button, .btn{
  position:relative;
  background:var(--key-face);
  color:var(--text);
  border:1px solid var(--line);
  border-radius:10px;
  padding:9px 16px;
  font-family:Sora,sans-serif;
  font-size:13px;
  font-weight:700;
  letter-spacing:.01em;
  cursor:pointer;
  box-shadow:var(--key-lit), var(--elev-2);
  transition:box-shadow var(--press-out), transform var(--press-out),
             border-color var(--press-out), background-color var(--press-out);
}
button:hover, .btn:hover{
  border-color:var(--accent);
  box-shadow:var(--key-lit), var(--elev-3);
  transform:translateY(-1px);
}
/* The press. Transform and box-shadow are almost never set inline or by the
   pages, so this reaches every button in the cockpit including the 11 that
   carry inline colour styling. */
button:active, .btn:active{
  transform:translateY(1px);
  box-shadow:var(--key-pressed);
  transition-duration:var(--press-in);
}
button:disabled, .btn:disabled{
  opacity:.45; cursor:not-allowed; transform:none;
  box-shadow:var(--elev-1);
}
/* Keyboard users get the same affordance as mouse users. */
button:focus-visible, .btn:focus-visible, a:focus-visible,
select:focus-visible, input:focus-visible, [tabindex]:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:2px;
  border-radius:10px;
}

/* ---- Keyed variants, so an action's colour says what it does -------------- */
.btn-primary{background:linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,0) 58%), var(--brand);
  color:var(--chip-ink); border-color:transparent}
.btn-up{background:linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,0) 58%), var(--up);
  color:var(--chip-ink); border-color:transparent}
.btn-down{background:linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,0) 58%), var(--down);
  color:var(--chip-ink); border-color:transparent}
.btn-quiet{background:transparent; box-shadow:none; border-color:var(--line)}
.btn-quiet:hover{background:var(--surface-flat); box-shadow:var(--key-lit), var(--elev-1)}
.btn-lg{padding:13px 26px; font-size:15px; border-radius:12px}
.btn-sm{padding:6px 11px; font-size:11.5px; border-radius:8px}

/* ---- The theme toggle is a key too, not a flat outline ------------------- */
.theme-toggle{
  background:var(--key-face);
  box-shadow:var(--key-lit), var(--elev-1);
  transition:box-shadow var(--press-out), transform var(--press-out),
             color var(--press-out), border-color var(--press-out);
}
.theme-toggle:hover{box-shadow:var(--key-lit), var(--elev-2); transform:translateY(-1px)}
.theme-toggle:active{transform:translateY(1px); box-shadow:var(--key-pressed);
  transition-duration:var(--press-in)}

/* ---- The one existing CTA gains real material instead of a flat glow ----- */
.cta-velocity{
  background:linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,0) 55%), var(--brand);
  box-shadow:var(--key-lit), var(--elev-3);
  transition:box-shadow var(--press-out), transform var(--press-out);
}
.cta-velocity:hover{transform:translateY(-1px);
  box-shadow:var(--key-lit), var(--elev-3), 0 0 16px var(--brand-glow)}
.cta-velocity:active{transform:translateY(1px); box-shadow:var(--key-pressed);
  transition-duration:var(--press-in)}

/* ---- Chips sit ON the surface rather than being painted onto it ---------- */
.pill{box-shadow:var(--key-lit), var(--elev-1); border:1px solid var(--line-soft)}
/* A chip that is actually clickable earns the full press. */
a .pill, button .pill, .pill[role="button"], .pill.is-action{cursor:pointer;
  transition:transform var(--press-out), box-shadow var(--press-out)}
.pill.is-action:hover{transform:translateY(-1px); box-shadow:var(--key-lit), var(--elev-2)}
.pill.is-action:active{transform:translateY(1px); box-shadow:var(--key-pressed);
  transition-duration:var(--press-in)}

/* ---- RECESSED. Surfaces the machine reports into, cut below the panel. ---- */
.well, .readout{
  background:var(--surface-flat);
  border:1px solid var(--line-soft);
  border-radius:10px;
  box-shadow:var(--well);
  padding:12px 14px;
}
/* A hero number reads better sitting in a recess than floating on a card. */
.readout .hero-num, .readout .h-xl, .readout .h-lg{display:block}

/* ============================================================================
   CHART PRIMITIVES (A33: "graphs, charts, bar graphs, pie charts").
   Pure CSS, no library, no canvas, theme-driven. Every one is driven by a
   single custom property so a page can render live data with an inline style.
   Recessed track, raised fill: the data is the object sitting in the channel.
   ============================================================================ */

/* Horizontal bar rows. Usage:
   <div class="bars">
     <div class="bar-row"><span class="bar-k">NQ</span>
       <span class="bar-track"><span class="bar-fill up" style="--v:72%"></span></span>
       <span class="bar-v">72%</span></div>
   </div>                                                                      */
.bars{display:flex; flex-direction:column; gap:9px}
.bar-row{display:flex; align-items:center; gap:11px}
.bar-k{font-family:Sora,sans-serif; font-weight:700; font-size:12px; color:var(--sub);
  min-width:58px; flex:0 0 auto}
.bar-track{flex:1; height:15px; border-radius:8px; background:var(--surface-flat);
  box-shadow:var(--well); overflow:hidden; position:relative}
.bar-fill{display:block; height:100%; width:var(--v,0%); border-radius:8px;
  background:linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,0) 60%), var(--accent);
  box-shadow:var(--elev-1);
  transition:width .6s cubic-bezier(.2,.7,.3,1)}
.bar-fill.up{background:linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,0) 60%), var(--up)}
.bar-fill.down{background:linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,0) 60%), var(--down)}
.bar-fill.brand{background:linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,0) 60%), var(--brand)}
.bar-v{font-family:"JetBrains Mono",ui-monospace,Consolas,monospace;
  font-variant-numeric:tabular-nums; font-size:13px; font-weight:700; color:var(--text);
  min-width:62px; text-align:right; flex:0 0 auto}

/* Donut. A33 caps composition charts at 6 slices because past that a human
   cannot compare angles. Usage:
   <div class="donut" style="--a:42%;--b:71%;--c:88%"></div>                    */
.donut{width:132px; height:132px; border-radius:50%; position:relative;
  background:conic-gradient(var(--accent) 0 var(--a,25%),
                            var(--brand)  var(--a,25%) var(--b,50%),
                            var(--up)     var(--b,50%) var(--c,75%),
                            var(--surface-flat) var(--c,75%) 100%);
  box-shadow:var(--elev-2)}
.donut::after{content:""; position:absolute; inset:23%; border-radius:50%;
  background:var(--surface); box-shadow:var(--well)}
.donut-wrap{display:flex; align-items:center; gap:18px; flex-wrap:wrap}
.donut-key{display:flex; flex-direction:column; gap:7px}
.donut-key i{width:11px; height:11px; border-radius:3px; display:inline-block;
  margin-right:8px; box-shadow:var(--elev-1)}
.donut-key span{font-size:13px; color:var(--text); display:flex; align-items:center}

/* Sparkline frame for inline SVG, so a trend sits in a channel like the bars. */
.spark{display:block; width:100%; height:44px; border-radius:8px;
  background:var(--surface-flat); box-shadow:var(--well); padding:5px 7px}
.spark svg{width:100%; height:100%; overflow:visible}
.spark path{fill:none; stroke:var(--accent); stroke-width:2;
  stroke-linecap:round; stroke-linejoin:round}
.spark path.up{stroke:var(--up)} .spark path.down{stroke:var(--down)}

/* Column chart, for comparing a handful of periods side by side. */
.cols{display:flex; align-items:flex-end; gap:9px; height:118px; padding:10px 12px;
  background:var(--surface-flat); border-radius:10px; box-shadow:var(--well)}
.col{flex:1; height:var(--v,50%); border-radius:6px 6px 3px 3px;
  background:linear-gradient(180deg, rgba(255,255,255,.20), rgba(255,255,255,0) 60%), var(--accent);
  box-shadow:var(--elev-1); position:relative;
  transition:height .6s cubic-bezier(.2,.7,.3,1)}
.col.up{background:linear-gradient(180deg, rgba(255,255,255,.20), rgba(255,255,255,0) 60%), var(--up)}
.col.down{background:linear-gradient(180deg, rgba(255,255,255,.20), rgba(255,255,255,0) 60%), var(--down)}
.col-k{display:flex; gap:9px; padding:6px 12px 0}
.col-k span{flex:1; text-align:center; font-size:11px; color:var(--sub);
  font-family:Sora,sans-serif; font-weight:600}

/* ---- Motion discipline. Anyone who asks for less motion gets the depth
        without the movement, which keeps the affordance intact. ------------- */
@media (prefers-reduced-motion:reduce){
  button, .btn, .theme-toggle, .cta-velocity, .pill.is-action{transition:box-shadow .01ms}
  button:hover, .btn:hover, .theme-toggle:hover, .cta-velocity:hover,
  .pill.is-action:hover{transform:none}
  button:active, .btn:active, .theme-toggle:active, .cta-velocity:active,
  .pill.is-action:active{transform:none; box-shadow:var(--key-pressed)}
  .bar-fill, .col{transition:none}
}

/* ============================================================================
   A33 PALETTE RULING (Chris, 2026-09-16)

   connects_to: every brain_4.7 page via <link href="/cockpit-theme.css">

   Chris, verbatim: "thats incorrect zero green" / "no purple or pink thats
   accurate that file must be old" / "blue cream, light pink ice pink, all ice
   colors" / "cockpit theme is god aweful hence why i have this new one".

   The "new one" is the live Loomi desk palette. These are not invented values.
   Every hex below except the two pinks is lifted straight from the :root block
   of loomi-site-merged/desk/index.html, so the cockpit and the site now speak
   the same colour language:
       --cream #F4F2ED   --paper-2 #EBE6DC   --ink #1E1D1B   --muted #6A6861
       --ice   #9FD4E8   --ice-mid #7FB2D4   --ice-deep #4E86A8
       plus the deep navy #16324A, the most-used hex on that page.

   THREE RULINGS ENCODED HERE:
   1. ZERO GREEN. The kit header always said "never green for P&L" while the
      tokens defined --up as green. Chris settled it: the header was right. Up
      is now ICE BLUE, down stays terracotta. The green is gone.
   2. NO PURPLE, NO HOT PINK. The 2026-08-25 repalette is retired.
   3. ICE AND CREAM throughout.

   ADDITIVE per A26. Nothing above is edited or deleted. This block simply
   comes later in the file, so it wins at equal specificity while the previous
   values stay in place as history. Reverting is deleting this block.

   The depth layer above needs no change at all: it was built with zero hex
   values, entirely on these variables, so it re-colours itself automatically.
   That was the point.

   ONE DRAFTED VALUE, FLAGGED HONESTLY: Chris asked for "light pink, ice pink".
   No pink exists anywhere in the Loomi site tokens or DESIGN.md, so --pop and
   --pop-soft below are drafted to sit harmoniously with the ice ramp. They are
   the only two values here not taken from his own files. Say the word and they
   change.
   ============================================================================ */

:root{
  /* DARK theme. Base is the site's own --dark #171816, warmed slightly so the
     cream text does not vibrate against it. */
  --bg:#171816; --surface:#20211E; --surface-flat:#2A2B26;
  --text:#F4F2ED; --sub:#A8A49A; --faint:#78756D;
  --line:rgba(244,242,237,.10); --line-soft:rgba(244,242,237,.05);

  --accent:#9FD4E8;  --accent-glow:rgba(159,212,232,.16);   /* ice, interactive */
  --accent2:#7FB2D4; --accent2-glow:rgba(127,178,212,.14);  /* ice mid          */

  --up:#7FB2D4;      --up-glow:rgba(127,178,212,.16);       /* BLUE = up. No green. */
  --down:#D9705C;    --down-glow:rgba(217,112,92,.16);      /* terracotta = down    */

  --brand:#9FD4E8;   --brand-glow:rgba(159,212,232,.20); --brand-ink:#BFE3F1;
  --pop:#E6B8C6;     --pop-glow:rgba(230,184,198,.20);      /* ice pink  (drafted) */
  --pop-soft:#F2D9E0;                                       /* light pink (drafted) */
  --warn:#E0A860;
  --chip-ink:#171816;
  --hero-neutral:#F4F2ED;
}

html[data-theme="light"]{
  /* LIGHT is the default theme, and it is now the site's cream paper exactly. */
  --bg:#F4F2ED; --surface:#FFFFFF; --surface-flat:#EBE6DC;
  --text:#1E1D1B; --sub:#6A6861; --faint:#9A968D;
  --line:rgba(30,29,27,.14); --line-soft:rgba(30,29,27,.06);

  --accent:#16324A;  --accent-glow:rgba(22,50,74,.12);      /* deep navy, interactive */
  --accent2:#4E86A8; --accent2-glow:rgba(78,134,168,.14);   /* ice deep               */

  --up:#4E86A8;      --up-glow:rgba(78,134,168,.14);        /* BLUE = up. No green. */
  --down:#C4543B;    --down-glow:rgba(196,84,59,.13);       /* terracotta = down    */

  --brand:#7FB2D4;   --brand-glow:rgba(127,178,212,.18); --brand-ink:#4E86A8;
  --pop:#D9A3B4;     --pop-glow:rgba(217,163,180,.18);      /* ice pink  (drafted) */
  --pop-soft:#F2D9E0;                                       /* light pink (drafted) */
  --warn:#B4762A;
  --chip-ink:#FFFFFF;
  --hero-neutral:#1E1D1B;
}

/* The site sets its type in Source Serif 4 and Jost. The cockpit keeps Sora and
   JetBrains Mono for dense operational data, which is a deliberate difference
   per Chris 2026-09-16: "every site is different and different themed". The
   GRAMMAR is shared, the theme is not. */

/* Pink earns a job rather than being decoration: it marks the one thing on a
   screen that is genuinely new since you last looked. */
.pill.new, .is-new{background:var(--pop-glow); color:var(--pop); border-color:var(--pop-glow)}
html[data-theme="light"] .pill.new, html[data-theme="light"] .is-new{color:#8A4A5C}
.bar-fill.pop{background:linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,0) 60%), var(--pop)}
.col.pop{background:linear-gradient(180deg, rgba(255,255,255,.20), rgba(255,255,255,0) 60%), var(--pop)}
