/* Shared colour tokens for every page (16 Nov 2026, "soft terminal").
   Dark is the default; [data-theme="light"] on <html> switches to light. Pages load this AFTER their own :root block. */
:root{
  /* Kyoto dusk (dark, default) — 3 Dec 2026 */
  --bg:#050C1F; --bg2:#07102A; --panel:#0A1836; --raise:#0F2045; --hover:#11244C; --pill:#132852;
  --ink:#F3ECE3; --ink2:#C9D2DC; --muted:#9AAABD;
  --line:#18325E; --line2:#122849; --line3:#25467A;
  --accent:#E66C27; --on-accent:#050C1F;
  --accent-grad:linear-gradient(135deg,#EBAE7E,#E66C27);
  --bar:linear-gradient(180deg,#EBAE7E,#E66C27);
  --rule:linear-gradient(90deg,#1E3D6E,#8294A8 40%,#EBAE7E 75%,#E66C27);
  --sel:#10234B; --sel-line:#25467A;
  --pos:#5FD3A0; --neg:#FF7E95;
  --up-bg:rgba(95,211,160,.08); --dn-bg:rgba(255,126,149,.08); --up-line:rgba(95,211,160,.35); --dn-line:rgba(255,126,149,.35);
  --so-up:rgba(95,211,160,.05); --so-dn:rgba(255,126,149,.05);
  --tint-up:rgba(95,211,160,.16); --tint-dn:rgba(255,126,149,.15);
  --hero:linear-gradient(115deg,#0C1C40 0%,#16305C 55%,#4E3540 100%); --hero-ink:#F3ECE3; --hero-mu:#C9D2DC; --hero-line:#2C4F86; --hero-up:#5FD3A0; --hero-dn:#FF9AAD;
  --card-edge:none;
  --good:#3FBF86; --good-fill:rgba(95,211,160,.14); --good-ink:#8FE3BE;
  --soft:#8FE3BE; --soft-fill:rgba(143,227,190,.12); --soft-ink:#C3F1DC;
  --warn:#EBAE7E; --warn-fill:rgba(235,174,126,.14); --warn-ink:#F3C9A2;
  --bad:#FF6F8A; --bad-fill:rgba(255,126,149,.14); --bad-ink:#FFB3C1;
  --neutral:#8294A8; --neutral-fill:rgba(130,148,168,.16); --neutral-ink:#C9D2DC;
  --surface2:#0F2045; --shadow:none;
  --r-card:18px; --r-row:10px;
  color-scheme:dark;
}
:root[data-theme="light"]{
  /* Cedar smoke (light) */
  --bg:#EEE8E0; --bg2:#E7E0D7; --panel:#FBF8F3; --raise:#F3EEE7; --hover:#F0EAE2; --pill:#E5DDD3;
  --ink:#1E1A17; --ink2:#3A312A; --muted:#5E5248;
  --line:#DCD4C9; --line2:#E7E0D7; --line3:#CFC6BA;
  --accent:#3A312A; --on-accent:#FBF8F3;
  --accent-grad:linear-gradient(135deg,#685B50,#1E1A17);
  --bar:linear-gradient(180deg,#A09487,#3A312A);
  --rule:linear-gradient(90deg,#CFC6BA,#A09487 40%,#685B50 75%,#1E1A17);
  --sel:#FFFFFF; --sel-line:#CFC6BA;
  --pos:#1E7A4C; --neg:#B3261E;
  --up-bg:rgba(30,122,76,.06); --dn-bg:rgba(179,38,30,.06); --up-line:rgba(30,122,76,.35); --dn-line:rgba(179,38,30,.35);
  --so-up:rgba(30,122,76,.06); --so-dn:rgba(179,38,30,.06);
  --tint-up:rgba(30,122,76,.36); --tint-dn:rgba(179,38,30,.28);
  --hero:linear-gradient(115deg,#FBF8F3 0%,#EFE7DC 55%,#DCCFBF 100%); --hero-ink:#1E1A17; --hero-mu:#5E5248; --hero-line:#CFC6BA; --hero-up:#1E7A4C; --hero-dn:#B3261E;
  --card-edge:0 0 0 1px rgba(30,26,23,.06), 0 1px 3px rgba(30,26,23,.07);
  --good:#1E7A4C; --good-fill:rgba(30,122,76,.12); --good-ink:#1E7A4C;
  --soft:#4F9E74; --soft-fill:rgba(79,158,116,.12); --soft-ink:#245F42;
  --warn:#9A5B1E; --warn-fill:rgba(154,91,30,.12); --warn-ink:#7A4515;
  --bad:#C0392B; --bad-fill:rgba(179,38,30,.1); --bad-ink:#B3261E;
  --neutral:#685B50; --neutral-fill:rgba(104,91,80,.12); --neutral-ink:#3A312A;
  --surface2:#FFFFFF;
  color-scheme:light;
}
html,body{background:var(--bg)}
.theme-tg{display:inline-flex;gap:2px;padding:3px;border-radius:999px;background:var(--pill)}
.theme-tg button{width:30px;height:30px;border:0;border-radius:999px;background:none;color:var(--muted);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;padding:0}
.theme-tg button[aria-pressed="true"]{background:var(--ink);color:var(--bg)}
.theme-tg svg{width:15px;height:15px}

/* Kyoto dusk / Cedar smoke gradients: frame only, never behind numbers */
.t-top{background-image:var(--rule);background-size:100% 2px;background-repeat:no-repeat;background-position:left bottom}
.t-nav [aria-current="page"],.t-cta,.btn.primary,.seg button[aria-pressed="true"],.t-tape .lead,.p-ex{background:var(--accent-grad);border-color:transparent}
.t-r.sel,.t-t.sel{box-shadow:none;background:var(--bar) left top/3px 100% no-repeat,var(--sel)}
.loadbar .bar i{background:var(--rule)}
.t-brand{background:linear-gradient(90deg,#C9D2DC,#EBAE7E 55%,#E66C27);-webkit-background-clip:text;background-clip:text;color:transparent}
:root[data-theme="light"] .t-brand{background:linear-gradient(90deg,#685B50,#1E1A17);-webkit-background-clip:text;background-clip:text}
.t-vix{border:1px solid transparent;background:linear-gradient(var(--panel),var(--panel)) padding-box,var(--rule) border-box}
/* tint sits behind the panel's header only, fading out before the tiles, chart and tables */
#paneC.tint-up{background:linear-gradient(180deg,var(--tint-up) 0,transparent 300px) no-repeat,var(--panel)}
#paneC.tint-dn{background:linear-gradient(180deg,var(--tint-dn) 0,transparent 300px) no-repeat,var(--panel)}
