/* ==========================================================================
   TruScope — design tokens. THE single source of truth for the
   look of the whole product. Every view (Perps, Strategies, Portfolio,
   News, Coin Detail, Home, Account, modals) styles itself
   from these tokens — no one-off palettes, no view-specific button shapes,
   no hardcoded colours outside this file.
   Dark first; the light theme is the same tokens with different values
   under html[data-acct-theme="light"] (set by account.js from the server
   preference). House rules: MACHINE Labs gradient wordmark, tabular
   numerals on every price, green/red only for up/down.
   ========================================================================== */

:root{
  /* ---- fonts ---- */
  --font-head: "Space Grotesk","IBM Plex Sans",system-ui,sans-serif;
  --font-sans: "IBM Plex Sans",system-ui,sans-serif;
  --font-mono: "IBM Plex Mono",ui-monospace,SFMono-Regular,monospace;
  /* Aliases — the short names the stylesheets actually use. These MUST
     stay in sync with the --font-* names above: before this fix they did
     not exist, so every font-family on the site was invalid and fell
     back to the browser default serif. */
  --head: var(--font-head);
  --sans: var(--font-sans);
  --mono: var(--font-mono);

  /* ---- type scale (size / line-height) ----
     Aurora Midnight (VISUAL DESIGNER, 2026-11-27): the scale is the
     hierarchy — display 32, view titles 20, panel headings 15. Headings
     are sized to be found while scanning fast, not sized to fit quietly. */
  --fs-display: 32px;  --lh-display: 1.15;
  --fs-h1: 28px;       --lh-h1: 1.2;
  --fs-h2: 20px;       --lh-h2: 1.25;
  --fs-h3: 15px;       --lh-h3: 1.35;
  --fs-body: 14px;     --lh-body: 1.5;
  --fs-small: 13px;    --lh-small: 1.45;
  --fs-caption: 12.5px;--lh-caption: 1.45;
  --fs-micro: 11.5px;  --lh-micro: 1.4;
  --fs-label: 10.5px;  --lh-label: 1.4;

  /* ---- weights ---- */
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  /* ---- colours: dark (default) ----
     AURORA MIDNIGHT (VISUAL DESIGNER, 2026-11-27, full latitude from
     machine): deep space-violet, not flat black. The page is a very dark
     violet-black; every layer steps lighter and more violet as it rises
     (page -> panel fade -> inner card -> popover), borders are a vivid
     violet you can actually see, muted text is bright enough to read at
     a glance. Green/red are Spectra mint/red — the up/down colours.
     TONED DOWN (VISUAL DESIGNER, 2026-11-27, machine: "too bright, too
     bright blue"): the first pass was too bright and too blue — the
     vivid #7c6cff borders, the bright cyan/teal accents and the
     saturated violet panels glared on long sessions. Every blue is now
     deeper and muted, saturation pulled back across the board, borders
     a quiet violet-grey. Same heading system, same panel system, same
     hierarchy — recalibrated brightness, not a redesign.
     SUB PAGE (machine, 2026-11-27: "use the spectra sub page background
     on st page too"): the page itself is the Spectra SUB desk's blue
     #0e1626 (dashboard-live-sub/index.html) + its faint 40px purple
     grid (see styles.css) — the terminal and the sub desk now share
     one page look. */
  --bg: #0e1626;
  --panel: #0d0d14;
  --panel2: #131320;
  --surface-hover: #17171f;
  --surface-input: #101016;
  --canvas-bg: #0a0a10;
  --overlay: rgba(4,4,8,.72);
  --overlay-soft: rgba(4,4,8,.66);
  --text: #eceaf2;
  --text-inverse: #ffffff;
  --text-on-accent: #ffffff;
  /* Panel/widget headings: white in the dark theme (machine's call) —
     the same token everywhere a panel heading appears, so headings are
     consistent terminal-wide. Light theme keeps dark ink (white on
     light would be invisible). */
  --panel-head: #ffffff;
  --muted: #a8a3c4;
  /* --dim: tertiary meta text (metric sub-lines, "You ·" prefix, footer).
     Raised #6b6b74 -> #7a7a85 (visual pass, 2026-11-27), then -> #918ab8
     (Aurora Midnight): meta text must still read at a glance on the
     violet card surface. Still clearly a step below --muted. */
  --dim: #7e7999;
  --border: #262633;
  --border2: #1c1c26;
  /* ---- panel-contrast rule (machine, 2026-11-26; uniform, terminal-wide) ----
     LAYERING: every outer panel uses --panel-fade (a subtle gradient fade);
     every inner card / list item inside a panel uses --card-bg (a distinct
     SOLID surface, a clear step lighter than the fade in dark, a clear step
     darker/bluer in light); outlines use --border-strong, a 1px border with
     real contrast against BOTH the fade and the card — the old #26262B /
     #1C1C20 hairlines vanished against the panel and are the bug this
     fixes. No surface invents its own shade: outer = fade, inner = solid,
     border = strong. Same treatment on EVERY panel (Favorites rows are
     inner cards exactly like Market Details stat cards); tables are the
     only exemption (data grids, not panels). BOUNDARY (machine,
     2026-11-26 ~22:40, refined): CHART/HEATMAP panels are FULL-BLEED —
     the canvas fills the panel, no inner cards inside it; the containing
     panel still gets the fade + strong outer border. ANY panel with TEXT
     INFO gets panel-in-panel: every row/item is an inner card, uniformly.
     Edge case: a text/info strip under a chart (e.g. the onchain safety
     strip) is carded as an inner card while the chart above stays
     full-bleed. NEWS EXCEPTION (machine, 2026-11-26 ~22:40): the news
     feed is a flowing headline list and reads fine as plain rows — no
     inner cards on .news-row, by default; the news PANEL still gets the
     universal outer fade + strong border. If a screenshot ever shows the
     news list reading flat/muddy/broken without cards, card it and say
     why. This exception does not spread to any other list.
     SCROLLBARS: see the --scroll-* tokens — dark, thin, themed, never
     the default light browser bar (machine, 2026-11-26 ~22:41).
     Spectra family only. */
  --panel-fade: linear-gradient(180deg,rgba(139,124,196,.10),rgba(139,124,196,0) 30%),linear-gradient(180deg,#12121b,#0d0d14);
  --card-bg: #1a1a26;
  --card-border: var(--border-strong);
  --border-strong: #4a4468;
  --card-hi: rgba(255,255,255,.07);
  --panel-shadow: 0 10px 30px rgba(0,0,0,.55),0 0 0 1px rgba(139,124,196,.05);
  --card-shadow: 0 1px 4px rgba(0,0,0,.45);
  --track: #1c1c26;
  /* ---- panel-heading system (VISUAL DESIGNER, 2026-11-27) ----
     Every panel heading on every view is the same object: a tinted
     title BAR, not a line of text sitting on the panel. --head-bar is
     the bar's violet-to-cyan wash; --head-tick is the 4px gradient
     tick that leads every heading; --grad-accent is the signature
     violet -> cyan -> mint used for the tick, the top strip on Home
     panels, active tabs and primary buttons. One accent language,
     everywhere — the eye learns it once and finds headings instantly. */
  --head-bar: linear-gradient(90deg,rgba(139,124,196,.18),rgba(79,157,176,.08) 55%,rgba(63,174,140,.04));
  --head-tick: linear-gradient(180deg,#8f7fd0,#4f9db0);
  --grad-accent: linear-gradient(90deg,#7c6fc4,#4f9db0,#3fae8c);

  /* ---- brand + functional colour ---- */
  --grad: linear-gradient(90deg,#b7a8e0,#8b7cc8,#5fb3c4);
  --purple: #8b7cc8;
  --teal: #5fb3c4;
  --green: #2ee6a8;
  --red: #ff5d6c;
  --amber: #f5a524;
  --orange: #f76b15;
  --hot: #ff4d6d;
  --focus-ring: #8b7cc8;

  /* ---- Spectra family palette (pulled from the Spectra dashboard,
     ~/workspace/perp-watch/dashboard-live/index.html :root + sub desk).
     The terminal and Spectra are one family — same look. These are the
     source values; the squeeze tokens below point at them. LIVE mint
     #2ee6a8, cyan #22c3e6, blue #3B82F6, red #ff5d6c, amber #ffb454,
     violet #9b7cff / #b5a1ff; panels #100e1e over #151228, line #262040;
     sub desk page #0e1626 with a faint 40px purple grid. */
  --sp-mint: #2ee6a8;
  --sp-mint-dim: #123c30;
  --sp-cyan: #4fa8bd;
  --sp-cyan-dim: #0e2a33;
  --sp-blue: #5b7fb8;
  --sp-red: #ff5d6c;
  --sp-red-dim: #3d1620;
  --sp-amber: #ffb454;
  --sp-amber-dim: #3a2a12;
  --sp-violet: #8b7cc8;
  --sp-violet-soft: #a89fd6;
  --sp-panel: #0d0d16;
  --sp-panel2: #14141f;
  --sp-line: #262633;
  --sp-line-soft: #1c1c26;
  --sp-ink: #eceaf2;
  --sp-muted: #a8a3c4;
  --sp-faint: #7e7999;
  --sp-blue-page: #0b0e1c;
  --sp-scroll: #4a4468;
  /* ---- scrollbars (machine, 2026-11-26 ~22:41): dark, thin, blending —
     never the default light browser scrollbar. Matches Spectra
     (dashboard-live/index.html): 8px, dark track = page bg, muted
     grey-violet thumb (#4a4560), violet on hover. Global rules live in
     styles.css (html + ::-webkit-scrollbar); Firefox via scrollbar-color
     / scrollbar-width on html — both properties inherit, so every
     scrollable surface (Glizzy chat log, widget bodies, lists, modals,
     Coin Detail, onchain panels) gets the theme with no per-surface
     one-offs. Light theme: mid grey-violet thumb on the light page bg. */
  --scroll-thumb: #4a4468;
  --scroll-track: var(--bg);
  --scroll-thumb-hover: var(--purple);
  /* Spectra's own gradient bar (blue -> cyan -> mint) and panel gradient */
  --sp-grad-bar: linear-gradient(90deg,#5b7fb8,#4fa8bd,#2ee6a8);
  --sp-panel-grad: linear-gradient(180deg,#12121b,#0d0d14);
  /* Spectra TP/SL track: red -> amber -> mint */
  --sp-track-grad: linear-gradient(90deg,#ff5d6c,#ffb454,#2ee6a8);
  /* Sub desk faint purple grid, 40px */
  --sp-grid: linear-gradient(rgba(139,124,196,.10) 1px,transparent 1px),linear-gradient(90deg,rgba(139,124,196,.10) 1px,transparent 1px);
  --sp-grid-size: 40px 40px;

  /* ---- squeeze surfaces: Spectra panels, not violet washes ----
     Round 1 used low-alpha washes on a near-black surface — machine
     said not enough colour. Round 2 uses Spectra's own surfaces and
     dims: solid dim backgrounds per band, solid bright score pills in
     Spectra's mode-badge style (solid fill, dark text), and the sub
     desk's blue page + grid behind the heatmap. Band colours are band
     identity, not price direction: COLD is Spectra cyan (not green),
     so green/red stay reserved for up/down. */
  --sq-bg: var(--sp-panel);
  --sq-bg-hover: var(--sp-panel2);
  --sq-border: var(--sp-line);
  --sq-border-strong: #4a4468;
  /* solid band colours (identity, not up/down) */
  --sq-cold: var(--sp-cyan);
  --sq-warm: var(--sp-amber);
  --sq-watch: #f76b15;
  --sq-hot: var(--sp-red);
  /* solid dim band backgrounds */
  --sq-cold-bg: var(--sp-cyan-dim);
  --sq-warm-bg: var(--sp-amber-dim);
  --sq-watch-bg: #3d1e0c;
  --sq-hot-bg: var(--sp-red-dim);
  /* score-pill text on the solid fills (Spectra mode-badge style) */
  --sq-cold-ink: #04140c;
  --sq-warm-ink: #1c1200;
  --sq-watch-ink: #1c1200;
  --sq-hot-ink: #1c1200;
  /* ---- heatmap surround: the sub desk's blue page + its grid ---- */
  --hm-bg: var(--sp-blue-page);
  --hm-border: #4a4468;

  /* ---- buttons ---- */
  --btn-radius: 4px;
  --btn-pad: 5px 10px;
  --btn-pad-sm: 3px 8px;
  --btn-pad-lg: 8px 14px;
  --btn-fs: 13px;
  --btn-fs-sm: 12px;
  --btn-primary-bg: var(--purple);
  --btn-primary-border: var(--purple);
  --btn-primary-text: #ffffff;
  --btn-primary-hover: #9a8cd6;
  --btn-secondary-bg: var(--panel);
  --btn-secondary-border: var(--border);
  --btn-secondary-text: var(--muted);
  --btn-secondary-hover-text: var(--text);
  --btn-ghost-bg: transparent;
  --btn-ghost-border: transparent;
  --btn-danger-bg: transparent;
  --btn-danger-border: var(--red);
  --btn-danger-text: var(--red);
  --btn-disabled-opacity: .45;

  /* ---- inputs ---- */
  --input-bg: var(--surface-input);
  --input-border: var(--border);
  --input-radius: 4px;
  --input-pad: 5px 8px;

  /* ---- cards / tables / chips ----
     --card-bg / --card-border are the inner-card tokens defined with the
     panel-contrast rule above (NOT the panel colour). */
  --card-radius: 10px;
  --card-pad: 10px 12px;
  --table-row-h: 30px;
  --table-border: var(--border2);
  --chip-radius: 4px;
  --chip-pad: 2px 7px;

  /* ---- spacing scale ---- */
  --sp-1: 2px;
  --sp-2: 4px;
  --sp-3: 6px;
  --sp-4: 8px;
  --sp-5: 10px;
  --sp-6: 12px;
  --sp-7: 14px;
  --sp-8: 16px;

  /* ---- radius scale ---- */
  --r-sm: 3px;
  --r-md: 6px;
  --r-lg: 10px;
  --r-round: 50%;

  /* ---- numbers: tabular figures everywhere prices appear ---- */
  --num: var(--font-mono);
}

/* ---- terminal themes (VISUAL DESIGNER, 2026-11-27): 6 — and growing.
   Every theme ever made stays in the picker (machine: "save them all").
   One of them is the toned-down dark above (Midnight, the default).
   The picker lives in the header Theme popover; the choice is saved in
   localStorage (pt_ui_theme) and applied before first paint by the
   inline script in index.html. Each block overrides only the tokens
   that carry hue/brightness; green/red stay the up/down colours in
   every theme, and derived tokens (--sq-*, --hm-*) follow their bases.
   html[data-acct-theme] is kept in sync (dark for the darks,
   light for Daylight) so the existing dark/light rules still work. */

/* ---- Graphite: neutral charcoal, no hue — steel and ink only ---- */
html[data-term-theme="graphite"]{
  --bg: #0a0a0b;
  --panel: #131315;
  --panel2: #1b1b1e;
  --surface-hover: #202024;
  --surface-input: #17171a;
  --canvas-bg: #0e0e10;
  --overlay: rgba(5,5,6,.72);
  --overlay-soft: rgba(5,5,6,.66);
  --text: #f2f2f3;
  --panel-head: #ffffff;
  --muted: #a9a9b0;
  --dim: #7d7d86;
  --border: #2c2c31;
  --border2: #202024;
  --panel-fade: linear-gradient(180deg,rgba(255,255,255,.05),rgba(255,255,255,0) 30%),linear-gradient(180deg,#17171b,#131315);
  --card-bg: #1e1e22;
  --border-strong: #55555f;
  --card-hi: rgba(255,255,255,.08);
  --panel-shadow: 0 10px 30px rgba(0,0,0,.55),0 0 0 1px rgba(255,255,255,.04);
  --card-shadow: 0 1px 4px rgba(0,0,0,.45);
  --track: #202024;
  --head-bar: linear-gradient(90deg,rgba(148,163,184,.22),rgba(148,163,184,.08) 55%,rgba(148,163,184,.03));
  --head-tick: linear-gradient(180deg,#a8b2c4,#6b7d94);
  --grad-accent: linear-gradient(90deg,#9aa7ba,#7d8ea3,#5da88a);
  --grad: linear-gradient(90deg,#c9ced6,#9aa7ba,#7d8ea3);
  --purple: #9aa7ba;
  --teal: #8fb0bd;
  --focus-ring: #9aa7ba;
  --sp-cyan: #8fb0bd;
  --sp-cyan-dim: #16242a;
  --sp-blue: #7d8ea3;
  --sp-violet: #9aa7ba;
  --sp-violet-soft: #b6bfcc;
  --sp-panel: #131315;
  --sp-panel2: #1b1b1e;
  --sp-line: #2c2c31;
  --sp-line-soft: #202024;
  --sp-ink: #f2f2f3;
  --sp-muted: #a9a9b0;
  --sp-faint: #7d7d86;
  --sp-blue-page: #101216;
  --sp-scroll: #55555f;
  --scroll-thumb: #55555f;
  --scroll-thumb-hover: #9aa7ba;
  --sp-grad-bar: linear-gradient(90deg,#7d8ea3,#8fb0bd,#5da88a);
  --sp-panel-grad: linear-gradient(180deg,#17171b,#131315);
  --sp-grid: linear-gradient(rgba(255,255,255,.05) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.05) 1px,transparent 1px);
  --sq-border-strong: #55555f;
  --hm-bg: #101216;
  --hm-border: #55555f;
  --btn-primary-bg: #7d8ea3;
  --btn-primary-border: #7d8ea3;
  --btn-primary-hover: #8b9cb0;
}

/* ---- Ember: warm dark — candlelit browns, muted amber ---- */
html[data-term-theme="ember"]{
  --bg: #0c0908;
  --panel: #161009;
  --panel2: #211710;
  --surface-hover: #2a1e14;
  --surface-input: #1a130d;
  --canvas-bg: #100c09;
  --overlay: rgba(8,5,3,.72);
  --overlay-soft: rgba(8,5,3,.66);
  --text: #f7efe8;
  --panel-head: #fff8f0;
  --muted: #c4ab93;
  --dim: #8f7a68;
  --border: #38291d;
  --border2: #2a1e14;
  --panel-fade: linear-gradient(180deg,rgba(217,154,78,.12),rgba(217,154,78,0) 30%),linear-gradient(180deg,#1e150e,#161009);
  --card-bg: #2a1e13;
  --border-strong: #6b4e33;
  --card-hi: rgba(255,220,180,.07);
  --panel-shadow: 0 10px 30px rgba(10,4,0,.6),0 0 0 1px rgba(217,154,78,.05);
  --card-shadow: 0 1px 4px rgba(10,4,0,.5);
  --track: #2a1e14;
  --head-bar: linear-gradient(90deg,rgba(217,154,78,.22),rgba(217,154,78,.08) 55%,rgba(217,154,78,.03));
  --head-tick: linear-gradient(180deg,#e8b06a,#b0703a);
  --grad-accent: linear-gradient(90deg,#d99a4e,#c07a3e,#a85f2e);
  --grad: linear-gradient(90deg,#f0c48d,#d99a4e,#b0703a);
  --purple: #d99a4e;
  --teal: #c98a5a;
  --focus-ring: #d99a4e;
  --sp-cyan: #c98a5a;
  --sp-cyan-dim: #2a1d12;
  --sp-blue: #b0703a;
  --sp-violet: #d99a4e;
  --sp-violet-soft: #e8b06a;
  --sp-panel: #161009;
  --sp-panel2: #211710;
  --sp-line: #38291d;
  --sp-line-soft: #2a1e14;
  --sp-ink: #f7efe8;
  --sp-muted: #c4ab93;
  --sp-faint: #8f7a68;
  --sp-blue-page: #141009;
  --sp-scroll: #6b4e33;
  --scroll-thumb: #6b4e33;
  --scroll-thumb-hover: #d99a4e;
  --sp-grad-bar: linear-gradient(90deg,#b0703a,#d99a4e,#c98a5a);
  --sp-panel-grad: linear-gradient(180deg,#1e150e,#161009);
  --sp-grid: linear-gradient(rgba(217,154,78,.10) 1px,transparent 1px),linear-gradient(90deg,rgba(217,154,78,.10) 1px,transparent 1px);
  --sq-border-strong: #6b4e33;
  --hm-bg: #141009;
  --hm-border: #6b4e33;
  --btn-primary-bg: #b0703a;
  --btn-primary-border: #b0703a;
  --btn-primary-hover: #c07a3e;
}

/* ---- Abyss: true black — the OLED wall-monitor theme ----
   Pure-black page, near-black panels, maximum contrast. Built for the
   always-on second monitor: black saves OLED power and the bright
   mint/cyan numbers punch harder against it than against any grey.
   The accent language is Spectra mint -> cyan; violet only as a
   secondary. Primary buttons are solid mint with dark ink. */
html[data-term-theme="abyss"]{
  --bg: #000000;
  --panel: #050507;
  --panel2: #0c0c10;
  --surface-hover: #121218;
  --surface-input: #08080a;
  --canvas-bg: #000000;
  --overlay: rgba(0,0,0,.78);
  --overlay-soft: rgba(0,0,0,.70);
  --text: #f4f4f6;
  --panel-head: #ffffff;
  --muted: #b0b0bc;
  --dim: #888892;
  --border: #2a2a30;
  --border2: #1c1c22;
  --panel-fade: linear-gradient(180deg,rgba(255,255,255,.06),rgba(255,255,255,0) 30%),linear-gradient(180deg,#08080b,#050507);
  --card-bg: #101016;
  --border-strong: #55555f;
  --card-hi: rgba(255,255,255,.09);
  --panel-shadow: 0 10px 30px rgba(0,0,0,.70),0 0 0 1px rgba(255,255,255,.04);
  --card-shadow: 0 1px 4px rgba(0,0,0,.50);
  --track: #1c1c22;
  --head-bar: linear-gradient(90deg,rgba(46,230,168,.20),rgba(34,195,230,.10) 55%,rgba(46,230,168,.04));
  --head-tick: linear-gradient(180deg,#2ee6a8,#22c3e6);
  --grad-accent: linear-gradient(90deg,#2ee6a8,#22c3e6,#9b7cff);
  --grad: linear-gradient(90deg,#b5a1ff,#22c3e6,#2ee6a8);
  --purple: #b5a1ff;
  --teal: #22c3e6;
  --focus-ring: #2ee6a8;
  --sp-cyan: #22c3e6;
  --sp-cyan-dim: #0a2028;
  --sp-blue: #5b8fd6;
  --sp-violet: #b5a1ff;
  --sp-violet-soft: #cfc4ff;
  --sp-panel: #050507;
  --sp-panel2: #0c0c10;
  --sp-line: #2a2a30;
  --sp-line-soft: #1c1c22;
  --sp-ink: #f4f4f6;
  --sp-muted: #b0b0bc;
  --sp-faint: #888892;
  --sp-blue-page: #000000;
  --sp-scroll: #55555f;
  --scroll-thumb: #55555f;
  --scroll-thumb-hover: #2ee6a8;
  --sp-grad-bar: linear-gradient(90deg,#5b8fd6,#22c3e6,#2ee6a8);
  --sp-panel-grad: linear-gradient(180deg,#08080b,#050507);
  --sp-grid: linear-gradient(rgba(46,230,168,.06) 1px,transparent 1px),linear-gradient(90deg,rgba(46,230,168,.06) 1px,transparent 1px);
  --sq-border-strong: #55555f;
  --hm-bg: #000000;
  --hm-border: #55555f;
  --btn-primary-bg: #2ee6a8;
  --btn-primary-border: #2ee6a8;
  --btn-primary-text: #04140c;
  --btn-primary-hover: #5df0bd;
}

/* ---- Forest: deep green-black — calm, organic, easy on the eyes ----
   The same deep-dark structure as Midnight with the violet swapped for
   emerald: green-black page, sage text, emerald heading ticks. The
   quietest of the darks for long sessions — nothing glares. */
html[data-term-theme="forest"]{
  --bg: #060a07;
  --panel: #0d130e;
  --panel2: #131d16;
  --surface-hover: #1a271e;
  --surface-input: #0a100c;
  --canvas-bg: #080d09;
  --overlay: rgba(3,7,4,.75);
  --overlay-soft: rgba(3,7,4,.68);
  --text: #eef5ee;
  --panel-head: #ffffff;
  --muted: #a8bfa9;
  --dim: #7d937e;
  --border: #26382b;
  --border2: #1a271e;
  --panel-fade: linear-gradient(180deg,rgba(74,222,128,.10),rgba(74,222,128,0) 30%),linear-gradient(180deg,#101710,#0d130e);
  --card-bg: #16211a;
  --border-strong: #4a6b52;
  --card-hi: rgba(180,255,200,.06);
  --panel-shadow: 0 10px 30px rgba(0,5,2,.60),0 0 0 1px rgba(74,222,128,.04);
  --card-shadow: 0 1px 4px rgba(0,5,2,.50);
  --track: #1a271e;
  --head-bar: linear-gradient(90deg,rgba(74,222,128,.20),rgba(46,230,168,.08) 55%,rgba(74,222,128,.03));
  --head-tick: linear-gradient(180deg,#4ade80,#2ee6a8);
  --grad-accent: linear-gradient(90deg,#4ade80,#2ee6a8,#22c3e6);
  --grad: linear-gradient(90deg,#a7f3c9,#4ade80,#2ee6a8);
  --purple: #7ee2a8;
  --teal: #4ade80;
  --focus-ring: #4ade80;
  --sp-cyan: #5ec8a0;
  --sp-cyan-dim: #0f2a20;
  --sp-blue: #5a8a6b;
  --sp-violet: #7ee2a8;
  --sp-violet-soft: #a7f3c9;
  --sp-panel: #0d130e;
  --sp-panel2: #131d16;
  --sp-line: #26382b;
  --sp-line-soft: #1a271e;
  --sp-ink: #eef5ee;
  --sp-muted: #a8bfa9;
  --sp-faint: #7d937e;
  --sp-blue-page: #081009;
  --sp-scroll: #4a6b52;
  --scroll-thumb: #4a6b52;
  --scroll-thumb-hover: #4ade80;
  --sp-grad-bar: linear-gradient(90deg,#5a8a6b,#4ade80,#2ee6a8);
  --sp-panel-grad: linear-gradient(180deg,#101710,#0d130e);
  --sp-grid: linear-gradient(rgba(74,222,128,.08) 1px,transparent 1px),linear-gradient(90deg,rgba(74,222,128,.08) 1px,transparent 1px);
  --sq-border-strong: #4a6b52;
  --hm-bg: #081009;
  --hm-border: #4a6b52;
  --btn-primary-bg: #34c47c;
  --btn-primary-border: #34c47c;
  --btn-primary-text: #04140c;
  --btn-primary-hover: #4ade80;
}

/* ---- light theme: same tokens, different values ----
   Daylight is the light theme: it applies when the account preference
   resolves to light OR when the terminal-theme picker picks Daylight. */
html[data-acct-theme="light"], html[data-term-theme="daylight"]{
  --bg: #eef0fb;
  --panel: #ffffff;
  --panel2: #ece8fa;
  --surface-hover: #ece8fa;
  --surface-input: #ffffff;
  --canvas-bg: #ffffff;
  --overlay: rgba(255,255,255,.85);
  --overlay-soft: rgba(255,255,255,.85);
  --text: #14112e;
  --text-inverse: #14112e;
  --panel-head: #14112e;
  --muted: #5a5478;
  /* --dim, light: #8a8a94 -> #75757f (visual pass, 2026-11-27), then
     -> #7a7398 (Aurora Midnight): keeps the step below --muted on the
     lighter violet card. */
  --dim: #7a7398;
  --border: #c9c2e8;
  --border2: #ddd6f5;
  /* Panel-contrast rule, light: outer fade white -> #e7e3fa; inner cards a
     distinct solid lavender (#d9d2f5) with a visible violet border.
     Dark gradients must NOT leak here. */
  --panel-fade: linear-gradient(180deg,rgba(139,92,246,.10),rgba(139,92,246,0) 22%),linear-gradient(180deg,#ffffff,#e7e3fa);
  --card-bg: #d9d2f5;
  --card-border: var(--border-strong);
  /* --border-strong, light: #aab1c8 -> #828aa8 (visual pass, 2026-11-27),
     then -> #6b5ce7 (Aurora Midnight): a real violet boundary, the same
     accent as dark so the two themes read as one product. */
  --border-strong: #6b5ce7;
  --card-hi: rgba(255,255,255,.85);
  --panel-shadow: 0 10px 28px rgba(40,30,110,.14);
  --card-shadow: 0 1px 4px rgba(40,30,110,.12);
  --track: #ddd6f5;
  --head-bar: linear-gradient(90deg,rgba(139,92,246,.20),rgba(34,195,230,.10) 55%,rgba(46,230,168,.05));
  --green: #1d8a4e;
  --red: #d92d20;
  --amber: #b54708;
  --orange: #c4320a;
  --hot: #c01048;
  /* squeeze surfaces, light: Spectra values mirrored — same solid band
     colours (they read on light too), light solid dims, blue-tinted
     heatmap. Band pills keep their solid fills + dark text. */
  --sq-bg: #ece9f7;
  --sq-bg-hover: #e4ddf5;
  --sq-border: #cfc8e8;
  --sq-border-strong: #6b5ce7;
  --sq-cold-bg: #d6f2f8;
  --sq-warm-bg: #fdeed3;
  --sq-watch-bg: #ffe4d6;
  --sq-hot-bg: #ffe0e4;
  --hm-bg: #dfe8f5;
  --hm-border: #6b5ce7;
  /* Spectra family tokens, light: same shapes, light values — the dark
     panel gradient and purple grid MUST NOT leak into the light theme */
  --sp-panel: #ffffff;
  --sp-panel2: #f0f0f3;
  --sp-line: #d8d8de;
  --sp-panel-grad: linear-gradient(180deg,#ffffff,#f0f0f3);
  --sp-grid: linear-gradient(rgba(59,130,246,.10) 1px,transparent 1px),linear-gradient(90deg,rgba(59,130,246,.10) 1px,transparent 1px);
  --btn-primary-text: #ffffff;
  --btn-secondary-bg: #ffffff;
  --scroll-thumb: #9a8cf0;
  --scroll-track: var(--bg);
  --scroll-thumb-hover: var(--purple);
  --input-bg: #ffffff;
}
