/* CBK Ops Hub · design system 2 (modules, themes, density, motion). Loaded after styles.css: every page keeps its
   markup and picks the new look from these tokens. Themes: light, dark, midnight. Accents: ocean, violet, teal,
   amber, rose. Density: comfortable, compact. Motion can be turned off (and follows the OS "reduce motion"). */

:root, [data-theme="light"] {
  --acc: 37 99 235; --acc2: 124 58 237;
  --blue: rgb(var(--acc)); --mint: rgb(var(--acc) / .1);
  --bg: #f3f5fa; --bg-grad: radial-gradient(1200px 600px at 100% -10%, rgb(var(--acc) / .07), transparent 60%), radial-gradient(900px 500px at -10% 110%, rgb(var(--acc2) / .05), transparent 60%);
  --paper: #ffffff; --paper-2: #f8f9fc; --glass: rgba(255,255,255,.72); --line: #e5e9f1; --line-2: #d6dce8;
  --ink: #0f172a; --ink-2: #334155; --muted: #64748b; --nav: #0f172a; --hover: #f5f7fb;
  --grey-bg: #eff2f7; --pill-ink: #475569;
  --amber: #b45309; --amber-bg: #fef3e2; --red: #dc2626; --red-bg: #fdecec; --green: #15803d; --green-bg: #e7f6ec;
  --teal: #0e7490; --teal-bg: #e0f4f7; --purple: #6d28d9; --purple-bg: #f0eafd;
  --shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px -12px rgba(15,23,42,.10);
  --shadow-lg: 0 24px 60px -20px rgba(15,23,42,.30);
  --code-bg: #0b1222; --code-ink: #e2e8f0;
  --r: 14px; --r-sm: 10px;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0a0f1c; --bg-grad: radial-gradient(1100px 600px at 100% -10%, rgb(var(--acc) / .16), transparent 60%), radial-gradient(900px 600px at -10% 110%, rgb(var(--acc2) / .12), transparent 60%);
  --paper: #111827; --paper-2: #0f1625; --glass: rgba(17,24,39,.72); --line: #1f2a3d; --line-2: #2b3850;
  --ink: #e5eaf3; --ink-2: #c3cddd; --muted: #8a98b0; --nav: #e5eaf3; --hover: #172133;
  --grey-bg: #1a2335; --pill-ink: #c3cddd; --mint: rgb(var(--acc) / .18);
  --amber: #fbbf24; --amber-bg: rgba(251,191,36,.12); --red: #f87171; --red-bg: rgba(248,113,113,.13); --green: #4ade80; --green-bg: rgba(74,222,128,.12);
  --teal: #2dd4bf; --teal-bg: rgba(45,212,191,.12); --purple: #a78bfa; --purple-bg: rgba(167,139,250,.14);
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 10px 30px -14px rgba(0,0,0,.6);
  --shadow-lg: 0 30px 80px -20px rgba(0,0,0,.75);
  --code-bg: #070b14; --code-ink: #dbe3f0;
  color-scheme: dark;
}
[data-theme="midnight"] {
  --bg: #04060b; --bg-grad: radial-gradient(1000px 520px at 85% -15%, rgb(var(--acc) / .22), transparent 60%), radial-gradient(800px 500px at 0% 105%, rgb(var(--acc2) / .16), transparent 60%);
  --paper: #0b0f19; --paper-2: #080b13; --glass: rgba(11,15,25,.66); --line: #182033; --line-2: #24304a;
  --ink: #eef2fa; --ink-2: #c8d1e1; --muted: #8492ab; --nav: #eef2fa; --hover: #111829;
  --grey-bg: #131a2a; --pill-ink: #c8d1e1; --mint: rgb(var(--acc) / .2);
  --amber: #fbbf24; --amber-bg: rgba(251,191,36,.12); --red: #fb7185; --red-bg: rgba(251,113,133,.13); --green: #34d399; --green-bg: rgba(52,211,153,.12);
  --teal: #22d3ee; --teal-bg: rgba(34,211,238,.12); --purple: #c4b5fd; --purple-bg: rgba(196,181,253,.13);
  --shadow: 0 0 0 1px rgba(255,255,255,.02), 0 18px 40px -20px rgba(0,0,0,.8);
  --shadow-lg: 0 30px 90px -20px rgba(0,0,0,.85);
  --code-bg: #05080f; --code-ink: #dbe3f0;
  color-scheme: dark;
}
[data-accent="violet"] { --acc: 124 58 237; --acc2: 236 72 153; }
[data-accent="teal"]   { --acc: 13 148 136; --acc2: 37 99 235; }
[data-accent="amber"]  { --acc: 217 119 6;  --acc2: 220 38 38; }
[data-accent="rose"]   { --acc: 225 29 72;  --acc2: 124 58 237; }
[data-theme="dark"][data-accent="ocean"], [data-theme="midnight"][data-accent="ocean"] { --acc: 96 165 250; }
[data-theme="dark"][data-accent="violet"], [data-theme="midnight"][data-accent="violet"] { --acc: 167 139 250; }
[data-theme="dark"][data-accent="teal"], [data-theme="midnight"][data-accent="teal"] { --acc: 45 212 191; }
[data-theme="dark"][data-accent="amber"], [data-theme="midnight"][data-accent="amber"] { --acc: 251 191 36; }
[data-theme="dark"][data-accent="rose"], [data-theme="midnight"][data-accent="rose"] { --acc: 251 113 133; }

/* density */
:root { --pad: 20px; --gap: 16px; --row: 10px; --fs: 14px; }
[data-density="compact"] { --pad: 14px; --gap: 11px; --row: 6px; --fs: 13px; }

/* ---------- base ---------- */
html { background: var(--bg); }
body { background: var(--bg) var(--bg-grad) fixed; color: var(--ink); font: var(--fs)/1.5 "Inter var", Inter, "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
::selection { background: rgb(var(--acc) / .25); }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
a { color: var(--blue); }
input, select, textarea { background: var(--paper); color: var(--ink); }

/* ---------- shell: rail + module panel ---------- */
aside.rail { width: 68px; flex: none; height: 100vh; position: sticky; top: 0; z-index: 30; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 0; background: var(--glass); backdrop-filter: blur(18px) saturate(1.4); border-right: 1px solid var(--line); }
.rail .logo { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; margin-bottom: 14px; cursor: pointer;
  background: linear-gradient(135deg, rgb(var(--acc)), rgb(var(--acc2))); box-shadow: 0 8px 22px -8px rgb(var(--acc) / .7); }
.rail .mod { position: relative; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--muted); cursor: pointer;
  border: 0; background: transparent; transition: background .2s, color .2s, transform .2s; }
.rail .mod:hover { background: var(--hover); color: var(--ink); transform: translateY(-1px); }
.rail .mod.on { color: rgb(var(--acc)); background: rgb(var(--acc) / .12); }
.rail .mod.on::before { content: ""; position: absolute; left: -12px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: rgb(var(--acc)); }
.rail .mod .dot { position: absolute; top: 7px; right: 7px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 9px; font-size: 10px; font-weight: 700;
  display: grid; place-items: center; color: #fff; background: rgb(var(--acc)); box-shadow: 0 0 0 2px var(--paper); }
.rail .tip { position: absolute; left: 54px; white-space: nowrap; padding: 5px 9px; border-radius: 8px; font-size: 12px; font-weight: 600; background: var(--ink); color: var(--paper);
  opacity: 0; pointer-events: none; transform: translateX(-4px); transition: .15s; }
.rail .mod:hover .tip { opacity: 1; transform: none; }
.rail .grow { flex: 1; }
.rail .avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #334155, #0f172a); box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--line-2); cursor: default; }
.rail .me { display: none; }

aside.panel { width: 236px; flex: none; height: 100vh; position: sticky; top: 0; z-index: 20; display: flex; flex-direction: column; padding: 20px 14px 14px;
  background: var(--glass); backdrop-filter: blur(18px) saturate(1.4); border-right: 1px solid var(--line); transition: width .25s, padding .25s, opacity .2s; overflow: hidden; }
body.panel-off aside.panel { width: 0; padding-left: 0; padding-right: 0; opacity: 0; border: 0; }
.panel .mtitle { font-size: 17px; font-weight: 750; letter-spacing: -.2px; margin: 2px 8px 2px; white-space: nowrap; }
.panel .mdesc { font-size: 12px; color: var(--muted); margin: 0 8px 16px; line-height: 1.4; }
.panel nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; margin-bottom: 2px; border-radius: 10px; color: var(--ink-2); font-weight: 550; font-size: 13.5px;
  white-space: nowrap; transition: background .15s, color .15s; }
.panel nav a:hover { background: var(--hover); text-decoration: none; color: var(--ink); }
.panel nav a.on { background: rgb(var(--acc) / .12); color: rgb(var(--acc)); font-weight: 650; }
.panel nav a svg { opacity: .85; flex: none; }
.panel nav a .count { margin-left: auto; background: rgb(var(--acc)); color: #fff; font-size: 11px; border-radius: 9px; padding: 0 7px; min-width: 20px; text-align: center; }
.panel .ctx { margin-top: auto; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper-2); white-space: nowrap; }
.panel .ctx b { display: block; font-size: 13px; margin-top: 3px; }
.panel .ctx span { color: var(--muted); font-size: 12px; }

/* ---------- top bar ---------- */
.wrap { min-width: 0; }
.top { position: sticky; top: 0; z-index: 15; gap: 10px; padding: 10px 28px; background: var(--glass); backdrop-filter: blur(18px) saturate(1.4); border-bottom: 1px solid var(--line); }
.top .iconbtn { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--paper); color: var(--ink-2); cursor: pointer; transition: .15s; }
.top .iconbtn:hover { border-color: var(--line-2); color: var(--ink); transform: translateY(-1px); }
.crumb { font-size: 13px; color: var(--muted); }
.crumb b { color: var(--ink); }
.search { width: 340px; border-radius: 11px; background: var(--paper); border-color: var(--line); padding: 7px 10px; transition: border-color .15s, box-shadow .15s; }
.search:focus-within { border-color: rgb(var(--acc) / .6); box-shadow: 0 0 0 4px rgb(var(--acc) / .12); }
.search kbd, .kbd { font: 600 11px ui-monospace, Consolas, monospace; color: var(--muted); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; padding: 1px 5px; background: var(--paper-2); white-space: nowrap; }
main { padding: 28px 32px 56px; max-width: 1400px; }

/* ---------- components ---------- */
.head h1 { color: var(--ink); font-size: 30px; letter-spacing: -.6px; }
.head .eyebrow { color: rgb(var(--acc)); }
.eyebrow { letter-spacing: 1.2px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: var(--pad); transition: border-color .2s, box-shadow .25s, transform .25s; }
.card:hover { border-color: var(--line-2); }
.grid { gap: var(--gap); }
.mb { margin-bottom: var(--gap); }
.kpi { overflow: hidden; }
.kpi::after { content: ""; position: absolute; inset: auto -40% -60% auto; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, rgb(var(--acc) / .08), transparent 70%); pointer-events: none; }
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.kpi .num { font-size: 34px; letter-spacing: -1px; background: linear-gradient(180deg, var(--ink), var(--ink-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kpi .ico { background: rgb(var(--acc) / .12); color: rgb(var(--acc)); border-radius: 10px; }
.kpi .ico.green { background: var(--green-bg); color: var(--green); }
.btn { border-radius: 10px; border-color: var(--line); background: var(--paper); color: var(--ink); transition: transform .15s, box-shadow .2s, border-color .15s, background .15s; }
.btn:hover { border-color: var(--line-2); transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: none; }
.btn.primary { background: linear-gradient(135deg, rgb(var(--acc)), rgb(var(--acc) / .85)); border-color: transparent; color: #fff; box-shadow: 0 8px 20px -10px rgb(var(--acc) / .9); }
.btn.primary:hover { box-shadow: 0 12px 26px -10px rgb(var(--acc) / .95); }
.btn.danger { color: var(--red); }
th { color: var(--muted); border-bottom-color: var(--line); padding: var(--row) 10px; }
td { border-bottom-color: var(--line); padding: var(--row) 10px; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: var(--hover); }
.pill { color: var(--pill-ink); background: var(--grey-bg); }
.field input, .field select, .field textarea, .pm-start input, .dbc-filter input, .dbc-filter select { border-radius: 10px; border-color: var(--line); background: var(--paper); color: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: rgb(var(--acc) / .7); box-shadow: 0 0 0 4px rgb(var(--acc) / .12); }
pre.code { background: var(--code-bg); color: var(--code-ink); border-radius: 12px; }
.toast { background: var(--ink); color: var(--paper); border-radius: 12px; box-shadow: var(--shadow-lg); }
.banner { border-radius: 12px; border-color: transparent; background: var(--amber-bg); color: var(--ink); }

/* hard-coded light colours of earlier pages, made theme-aware */
td.off, .act.unread, .act .ico, .qa-chip, .qa-drop, .qa-ring > div, .pm-frame { background: var(--paper-2); }
.qa-chip, .qa-drop, .qa-find { border-color: var(--line-2); }
.qa-bar { background: var(--grey-bg); }
.qa-legend, .qa-grid h4, .pm-fd, .dbc-ex, .qa-drop { color: var(--muted); }
.bars .track { background: var(--grey-bg); }
.dbc-diff { background: var(--paper); }
.dbc-hh { background: rgb(var(--acc) / .1); color: rgb(var(--acc)); }
.dbc-l span { border-right-color: var(--line); }
[data-theme="dark"] .dbc-l.add, [data-theme="midnight"] .dbc-l.add, [data-theme="dark"] .dl.add, [data-theme="midnight"] .dl.add { background: rgba(74,222,128,.10); }
[data-theme="dark"] .dbc-l.add code, [data-theme="midnight"] .dbc-l.add code { color: #86efac; }
[data-theme="dark"] .dbc-l.del, [data-theme="midnight"] .dbc-l.del { background: rgba(248,113,113,.10); }
[data-theme="dark"] .dbc-l.del code, [data-theme="midnight"] .dbc-l.del code { color: #fca5a5; }
[data-theme="dark"] iframe, [data-theme="midnight"] iframe { color-scheme: light; }

/* ---------- motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
body:not(.no-motion) main.enter > * { animation: rise .42s cubic-bezier(.2,.7,.2,1) both; }
body:not(.no-motion) main.enter > *:nth-child(2) { animation-delay: .04s; }
body:not(.no-motion) main.enter > *:nth-child(3) { animation-delay: .08s; }
body:not(.no-motion) main.enter > *:nth-child(4) { animation-delay: .12s; }
body:not(.no-motion) main.enter > *:nth-child(n+5) { animation-delay: .16s; }
body.no-motion *, body.no-motion *::before, body.no-motion *::after { transition: none !important; animation: none !important; }
@media (prefers-reduced-motion: reduce) { body:not(.force-motion) main.enter > * { animation: none; } }

/* ---------- command palette ---------- */
.cmdk-back { position: fixed; inset: 0; z-index: 90; background: rgba(4,8,18,.42); backdrop-filter: blur(6px); display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh; animation: fade .15s; }
.cmdk { width: min(640px, 92vw); border-radius: 18px; background: var(--paper); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); overflow: hidden; animation: rise .2s cubic-bezier(.2,.7,.2,1); }
.cmdk input { width: 100%; border: 0; outline: 0; padding: 18px 20px; font-size: 16px; background: transparent; border-bottom: 1px solid var(--line); }
.cmdk .list { max-height: 52vh; overflow: auto; padding: 8px; }
.cmdk .grp { font-size: 10.5px; font-weight: 700; letter-spacing: 1.1px; text-transform: uppercase; color: var(--muted); padding: 10px 12px 4px; }
.cmdk .it { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; color: var(--ink-2); }
.cmdk .it small { margin-left: auto; color: var(--muted); }
.cmdk .it.sel { background: rgb(var(--acc) / .12); color: rgb(var(--acc)); }
.cmdk .foot { display: flex; gap: 14px; padding: 9px 16px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); }

/* ---------- appearance panel ---------- */
.appear { position: fixed; left: 80px; bottom: 16px; z-index: 80; width: 300px; padding: 16px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); animation: rise .2s; }
.appear h4 { margin: 0 0 10px; font-size: 14px; }
.appear .lbl { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin: 12px 0 6px; }
.appear .seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 11px; background: var(--grey-bg); }
.appear .seg button { border: 0; padding: 7px 6px; border-radius: 8px; background: transparent; color: var(--ink-2); font-weight: 600; font-size: 12.5px; cursor: pointer; }
.appear .seg button.on { background: var(--paper); color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.appear .sw { display: flex; gap: 10px; }
.appear .sw button { width: 30px; height: 30px; border-radius: 50%; border: 0; cursor: pointer; box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px transparent; transition: .15s; }
.appear .sw button.on { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px currentColor; }
.appear .row { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-size: 13px; }

@media (max-width: 1100px) { aside.panel { position: fixed; left: 68px; box-shadow: var(--shadow-lg); } body.panel-off aside.panel { box-shadow: none; } }
.dbc-how p, .dbc-ex, .pm-fd { color: var(--muted); }

/* =====================================================================================================
   NEXUS · the AI command-center theme (default). Deep space, living background, holographic glass,
   neon edges, thin display type, floating dock. Every page keeps its markup.
   ===================================================================================================== */
[data-theme="nexus"] {
  --acc: 0 229 255; --acc2: 124 92 255;
  --bg: #03040c; --bg-grad: none;
  --paper: rgba(16,20,44,.46); --paper-2: rgba(10,13,30,.55); --glass: rgba(8,10,26,.55); --line: rgba(160,180,255,.13); --line-2: rgba(160,180,255,.24);
  --ink: #eaf0ff; --ink-2: #c6d0ee; --muted: #8d97b8; --nav: #eaf0ff; --hover: rgba(124,140,255,.08);
  --grey-bg: rgba(255,255,255,.06); --pill-ink: #c6d0ee; --mint: rgba(0,229,255,.12);
  --amber: #ffc46b; --amber-bg: rgba(255,181,71,.13); --red: #ff7d93; --red-bg: rgba(255,84,112,.14); --green: #3dffa8; --green-bg: rgba(61,255,168,.11);
  --teal: #4ff0ff; --teal-bg: rgba(0,229,255,.11); --purple: #b9a8ff; --purple-bg: rgba(124,92,255,.17);
  --shadow: 0 0 0 1px rgba(255,255,255,.015) inset, 0 20px 50px -24px rgba(0,0,0,.9);
  --shadow-lg: 0 30px 90px -20px rgba(0,0,0,.95), 0 0 40px -10px rgba(124,92,255,.35);
  --code-bg: rgba(2,3,10,.85); --code-ink: #d8e2ff; --r: 20px; --r-sm: 12px;
  color-scheme: dark;
}
[data-theme="nexus"][data-accent="violet"] { --acc: 185 150 255; --acc2: 255 79 216; }
[data-theme="nexus"][data-accent="teal"] { --acc: 61 255 200; --acc2: 0 160 255; }
[data-theme="nexus"][data-accent="amber"] { --acc: 255 196 107; --acc2: 255 84 112; }
[data-theme="nexus"][data-accent="rose"] { --acc: 255 120 190; --acc2: 124 92 255; }

body.nexus { background: #03040c; }
body.nexus #space { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
body.nexus .aurora { position: fixed; inset: -20%; z-index: 0; filter: blur(90px); opacity: .5; pointer-events: none; }
body.nexus .aurora i { position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%; mix-blend-mode: screen; animation: nx-drift 26s ease-in-out infinite alternate; }
body.nexus .aurora i:nth-child(1) { background: radial-gradient(circle, rgb(var(--acc2)) 0, transparent 65%); left: 5%; top: 0; opacity: .8; }
body.nexus .aurora i:nth-child(2) { background: radial-gradient(circle, rgb(var(--acc)) 0, transparent 62%); right: 0; top: 20%; animation-duration: 32s; opacity: .55; }
body.nexus .aurora i:nth-child(3) { background: radial-gradient(circle, #ff2fbf 0, transparent 65%); left: 35%; bottom: -10%; animation-duration: 38s; opacity: .4; }
@keyframes nx-drift { to { transform: translate(8vmax,-6vmax) scale(1.15); } }
body:not(.nexus) #space, body:not(.nexus) .aurora, body:not(.nexus) #dock, body:not(.nexus) #subnav, body:not(.nexus) .nx-brand, body:not(.nexus) .nx-clock { display: none !important; }

/* layout: no sidebars, HUD on top, module tabs, floating dock */
body.nexus aside.rail, body.nexus aside.panel, body.nexus #panelBtn { display: none; }
body.nexus .wrap { position: relative; z-index: 1; }
body.nexus .top { flex: none; background: rgba(3,4,12,.45); border-bottom-color: var(--line); padding: 12px 28px; }
.nx-brand { display: flex; align-items: center; gap: 12px; margin-right: 8px; cursor: pointer; }
.nx-glyph { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: conic-gradient(from 0deg, rgb(var(--acc2)), rgb(var(--acc)), #ff4fd8, rgb(var(--acc2))); animation: nx-spin 8s linear infinite; box-shadow: 0 0 26px rgb(var(--acc2) / .55); }
.nx-glyph b { width: 28px; height: 28px; border-radius: 8px; background: #05060f; display: grid; place-items: center; font: 800 11.5px system-ui; color: #fff; animation: nx-spin 8s linear infinite reverse; }
@keyframes nx-spin { to { transform: rotate(360deg); } }
.nx-brand span { font: 600 12px ui-monospace, Consolas, monospace; letter-spacing: 4px; color: var(--muted); }
.nx-brand span b { color: var(--ink); letter-spacing: 6px; }
.nx-clock { font: 300 20px "Segoe UI Variable Display", system-ui; letter-spacing: 2px; color: var(--ink); margin-left: 6px; }
body.nexus .crumb { font: 600 11px ui-monospace, Consolas, monospace; letter-spacing: 2px; text-transform: uppercase; }
body.nexus .search { background: rgba(6,8,22,.7); border-color: var(--line-2); }
#subnav { position: relative; z-index: 14; flex: none; display: flex; gap: 6px; padding: 14px 28px 6px; overflow-x: auto; }
#subnav a { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(14px);
  color: var(--ink-2); font-size: 13px; font-weight: 550; white-space: nowrap; text-decoration: none; transition: .2s; }
#subnav a:hover { border-color: rgb(var(--acc) / .6); color: #fff; box-shadow: 0 0 18px rgb(var(--acc) / .25); }
#subnav a.on { color: #fff; border-color: transparent; background: linear-gradient(135deg, rgb(var(--acc2) / .55), rgb(var(--acc) / .35)); box-shadow: 0 0 24px rgb(var(--acc2) / .35); }
#subnav a .count { background: rgb(var(--acc)); color: #03040c; font-size: 11px; font-weight: 700; border-radius: 9px; padding: 0 6px; }
#subnav .mname { font: 600 10.5px ui-monospace, Consolas, monospace; letter-spacing: 2.4px; color: var(--muted); text-transform: uppercase; align-self: center; margin-right: 8px; }
body.nexus main { padding: 16px 28px 130px; max-width: 1480px; }

#dock { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 40; display: flex; align-items: flex-end; gap: 6px; padding: 10px 14px; border-radius: 24px;
  background: rgba(10,13,32,.55); border: 1px solid var(--line-2); backdrop-filter: blur(22px) saturate(1.6); box-shadow: 0 24px 60px -18px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.03) inset; }
#dock .d { position: relative; width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; color: #cdd6f5; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06);
  cursor: pointer; transition: transform .22s cubic-bezier(.2,.8,.2,1), background .2s; transform-origin: bottom; }
#dock .d:hover { transform: scale(1.22) translateY(-5px); background: linear-gradient(135deg, rgb(var(--acc2) / .55), rgb(var(--acc) / .35)); color: #fff; }
#dock .d:hover + .d, #dock .d:has(+ .d:hover) { transform: scale(1.12) translateY(-2px); }
#dock .d.on::after { content: ""; position: absolute; bottom: -7px; width: 5px; height: 5px; border-radius: 50%; background: rgb(var(--acc)); box-shadow: 0 0 8px rgb(var(--acc)); }
#dock .d .dot { position: absolute; top: -4px; right: -4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; display: grid; place-items: center; font: 700 10px system-ui; color: #03040c; background: rgb(var(--acc)); box-shadow: 0 0 10px rgb(var(--acc)); }
#dock .pop { position: absolute; bottom: 64px; left: 50%; transform: translateX(-50%) translateY(6px); min-width: 210px; padding: 8px; border-radius: 16px; background: rgba(6,8,22,.94); border: 1px solid var(--line-2);
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: .18s; }
#dock .d:hover .pop { opacity: 1; pointer-events: auto; transform: translateX(-50%) scale(.82); transform-origin: bottom center; }
#dock .pop .h { font: 600 10.5px ui-monospace, Consolas, monospace; letter-spacing: 2px; color: var(--muted); padding: 6px 10px; text-transform: uppercase; }
#dock .pop a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--ink-2); font-size: 13px; white-space: nowrap; text-decoration: none; }
#dock .pop a:hover { background: rgb(var(--acc) / .12); color: #fff; }
#dock .sep { width: 1px; height: 34px; background: var(--line-2); margin: 0 6px 7px; }

/* holographic surfaces */
body.nexus .card { background: var(--paper); backdrop-filter: blur(18px) saturate(1.5); border-color: var(--line); position: relative; }
body.nexus .card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: conic-gradient(from var(--nxa, 0deg), transparent 0 68%, rgb(var(--acc)) 80%, rgb(var(--acc2)) 88%, transparent 96%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: nx-edge 5s linear infinite; }
body.nexus .card:hover::before, body.nexus .kpi::before { opacity: .85; }
@property --nxa { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes nx-edge { to { --nxa: 360deg; } }
body.nexus .card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(260px circle at var(--mx, 50%) var(--my, -30%), rgb(var(--acc2) / .14), transparent 60%); }
body.nexus .kpi::after { inset: 0; width: auto; height: auto; border-radius: inherit; background: radial-gradient(260px circle at var(--mx, 50%) var(--my, -30%), rgb(var(--acc2) / .16), transparent 60%); }
body.nexus .head h1 { font: 200 40px/1.1 "Segoe UI Variable Display", system-ui; letter-spacing: -1px; }
body.nexus .head .eyebrow, body.nexus .eyebrow, body.nexus th, body.nexus .kpi .label { font-family: ui-monospace, Consolas, monospace; letter-spacing: 2px; text-transform: uppercase; font-size: 10.5px; font-weight: 600; }
body.nexus .head .eyebrow { color: rgb(var(--acc)); text-shadow: 0 0 14px rgb(var(--acc) / .6); }
body.nexus .kpi .label { color: var(--muted); }
body.nexus .kpi .num { font: 200 46px/1.05 "Segoe UI Variable Display", system-ui; letter-spacing: -2px; background: linear-gradient(180deg, #fff, #9fb2ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
body.nexus .kpi .ico { background: rgb(var(--acc) / .1); color: rgb(var(--acc)); box-shadow: 0 0 18px rgb(var(--acc) / .25); }
body.nexus .card h3 { font-weight: 600; letter-spacing: .2px; }
body.nexus .btn { background: rgba(255,255,255,.04); border-color: var(--line-2); color: var(--ink); backdrop-filter: blur(10px); }
body.nexus .btn:hover { border-color: rgb(var(--acc) / .7); box-shadow: 0 0 20px rgb(var(--acc) / .25); }
body.nexus .btn.primary { background: linear-gradient(135deg, rgb(var(--acc2)), rgb(var(--acc))); color: #03040c; font-weight: 700; box-shadow: 0 0 26px -4px rgb(var(--acc2) / .7); }
body.nexus .btn.danger { color: var(--red); }
body.nexus .pill { border: 1px solid rgba(255,255,255,.06); }
body.nexus tbody tr:hover { background: linear-gradient(90deg, rgb(var(--acc) / .07), transparent 70%); box-shadow: inset 2px 0 0 rgb(var(--acc)); }
body.nexus .field input, body.nexus .field select, body.nexus .field textarea, body.nexus .pm-start input, body.nexus .dbc-filter input, body.nexus .dbc-filter select, body.nexus .search input { background: rgba(4,6,18,.6); border-color: var(--line-2); color: var(--ink); }
body.nexus select option { background: #0b0e22; color: var(--ink); }
body.nexus .pm-tabs { border-bottom-color: var(--line); }
body.nexus .pm-tabs a.on { color: rgb(var(--acc)); border-bottom-color: rgb(var(--acc)); text-shadow: 0 0 12px rgb(var(--acc) / .6); }
body.nexus .qa-bar i, body.nexus .bars .fill { background: linear-gradient(90deg, rgb(var(--acc2)), rgb(var(--acc))); box-shadow: 0 0 10px rgb(var(--acc) / .6); }
body.nexus .toast { background: rgba(6,8,22,.95); color: var(--ink); border: 1px solid var(--line-2); }
body.nexus .cmdk { background: rgba(6,8,22,.95); }
body.nexus .appear { background: rgba(6,8,22,.95); left: auto; right: 24px; bottom: 96px; }
body.nexus main.enter > * { animation-name: nx-rev; animation-duration: .7s; }
@keyframes nx-rev { from { opacity: 0; transform: translateY(16px) scale(.985); filter: blur(5px); } to { opacity: 1; transform: none; filter: none; } }

/* Nexus home */
.nx-home { display: grid; grid-template-columns: 1fr minmax(420px, 560px) 1fr; gap: 26px; align-items: center; min-height: calc(100vh - 230px); }
.nx-col { display: flex; flex-direction: column; gap: 16px; }
.nx-core { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.nx-orb { position: relative; width: 230px; height: 230px; display: grid; place-items: center; }
.nx-orb .nxr { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(140,160,255,.25); }
.nx-orb .nxr:nth-child(1) { inset: -18px; border-style: dashed; animation: nx-spin 40s linear infinite; }
.nx-orb .nxr:nth-child(2) { inset: 6px; border-color: transparent; border-top-color: rgb(var(--acc)); border-right-color: rgb(var(--acc)); animation: nx-spin 6s linear infinite; filter: drop-shadow(0 0 6px rgb(var(--acc))); }
.nx-orb .nxr:nth-child(3) { inset: 26px; border-color: transparent; border-bottom-color: #ff4fd8; border-left-color: #ff4fd8; animation: nx-spin 9s linear infinite reverse; filter: drop-shadow(0 0 6px #ff4fd8); }
.nx-orb .ball { width: 146px; height: 146px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 0, #b9a8ff 8%, rgb(var(--acc2)) 30%, #1b0f5a 62%, #05030f 80%);
  box-shadow: 0 0 60px rgb(var(--acc2) / .8), 0 0 140px rgb(var(--acc) / .35), inset -20px -30px 60px rgba(0,0,0,.6); animation: nx-breathe 4.5s ease-in-out infinite; }
.nx-orb.think .ball { animation-duration: .9s; }
@keyframes nx-breathe { 50% { transform: scale(1.06); box-shadow: 0 0 90px rgb(var(--acc2)), 0 0 180px rgb(var(--acc) / .5), inset -20px -30px 60px rgba(0,0,0,.6); } }
.nx-orb .nxw { position: absolute; inset: 44px; border-radius: 50%; border: 2px solid rgb(var(--acc) / .5); animation: nx-wave 3s ease-out infinite; opacity: 0; }
.nx-orb .nxw.b { animation-delay: 1.5s; }
@keyframes nx-wave { from { transform: scale(.7); opacity: .8; } to { transform: scale(1.7); opacity: 0; } }
.nx-greet { text-align: center; }
.nx-greet h1 { font: 200 34px "Segoe UI Variable Display", system-ui; letter-spacing: -.5px; margin: 0; }
.nx-greet h1 b { font-weight: 600; background: linear-gradient(90deg, rgb(var(--acc)), rgb(var(--acc2)), #ff4fd8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nx-brief { min-height: 66px; max-width: 540px; margin: 8px auto 0; color: var(--ink-2); font-size: 14.5px; }
.nx-caret { display: inline-block; width: 8px; height: 17px; background: rgb(var(--acc)); vertical-align: -3px; margin-left: 2px; animation: nx-blink 1s steps(1) infinite; }
@keyframes nx-blink { 50% { opacity: 0; } }
.nx-ask { position: relative; width: 100%; border-radius: 20px; padding: 2px; background: linear-gradient(90deg, rgb(var(--acc)), rgb(var(--acc2)), #ff4fd8, rgb(var(--acc))); background-size: 300% 100%; animation: nx-flow 6s linear infinite; }
@keyframes nx-flow { to { background-position: 300% 0; } }
.nx-ask div { display: flex; align-items: center; gap: 12px; border-radius: 18px; background: rgba(6,8,22,.94); padding: 14px 18px; }
.nx-ask input { flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 16px; }
.nx-sugg { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.nx-sugg a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass); color: var(--ink-2); font-size: 12.5px; text-decoration: none; backdrop-filter: blur(10px); transition: .2s; }
.nx-sugg a:hover { border-color: rgb(var(--acc)); color: #fff; box-shadow: 0 0 18px rgb(var(--acc) / .35); }
.nx-big { font: 200 52px/1.05 "Segoe UI Variable Display", system-ui; letter-spacing: -2px; margin: 8px 0 4px; background: linear-gradient(180deg, #fff, #9fb2ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nx-lbl { font: 600 10.5px ui-monospace, Consolas, monospace; letter-spacing: 2.2px; color: var(--muted); text-transform: uppercase; display: flex; justify-content: space-between; }
.nx-meta { color: var(--ink-2); font-size: 12.5px; opacity: .85; }
.nx-flowl { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.nx-flowl .r { display: grid; grid-template-columns: 1fr auto; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.nx-flowl .t { grid-column: 1 / -1; height: 4px; border-radius: 4px; background: rgba(255,255,255,.06); overflow: hidden; }
.nx-flowl .t i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, rgb(var(--acc2)), rgb(var(--acc))); box-shadow: 0 0 12px rgb(var(--acc)); animation: nx-grow 1.2s both; transform-origin: left; }
@keyframes nx-grow { from { transform: scaleX(0); } }
.nx-sig { display: flex; flex-direction: column; max-height: 290px; overflow: hidden; mask-image: linear-gradient(#000 75%, transparent); }
.nx-sig a { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 9px 2px; border-bottom: 1px solid rgba(255,255,255,.05); text-decoration: none; color: var(--ink-2); font-size: 12.5px; }
.nx-sig a:hover { color: #fff; text-decoration: none; }
.nx-sig em { font: normal 600 10px ui-monospace, Consolas, monospace; letter-spacing: 1px; padding: 2px 6px; border-radius: 6px; background: rgb(var(--acc2) / .2); color: #c9bcff; height: fit-content; }
.nx-sig em.bad { background: rgba(255,84,112,.16); color: #ff9fb0; }
.nx-sig small { display: block; color: var(--muted); font-size: 11px; }
.nx-constel { position: relative; height: 150px; }
.nx-constel a { position: absolute; border-radius: 50%; display: grid; place-items: center; text-align: center; font: 600 11px/1.3 ui-monospace, Consolas, monospace; letter-spacing: 1px; color: #fff; text-decoration: none;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.35), rgb(var(--acc2) / .25) 40%, rgb(var(--acc) / .08)); border: 1px solid rgba(160,180,255,.3); box-shadow: 0 0 30px rgb(var(--acc2) / .35); animation: nx-float 6s ease-in-out infinite; }
@keyframes nx-float { 50% { transform: translateY(-8px); } }
.nx-sys { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.nx-chip { display: flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); font: 600 11px ui-monospace, Consolas, monospace; letter-spacing: 1px; }
.nx-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: nx-blink 2s infinite; }
.nx-chip.bad i { background: var(--red); box-shadow: 0 0 10px var(--red); }
@media (max-width: 1250px) { .nx-home { grid-template-columns: 1fr; } }

/* =====================================================================================================
   NEXUS LIGHT ("Aurora"): the same command center in daylight. Pearl glass, iridescent aurora,
   ink-blue type, soft holographic edges. Shares every Nexus layout rule; only light-specific
   colours are overridden here.
   ===================================================================================================== */
[data-theme="aurora"] {
  --acc: 37 99 235; --acc2: 139 92 246;
  --bg: #eef2fb; --bg-grad: none;
  --paper: rgba(255,255,255,.62); --paper-2: rgba(255,255,255,.5); --glass: rgba(255,255,255,.55); --line: rgba(70,90,160,.14); --line-2: rgba(70,90,160,.24);
  --ink: #0b1433; --ink-2: #2c3a63; --muted: #66749a; --nav: #0b1433; --hover: rgba(37,99,235,.06);
  --grey-bg: rgba(15,30,80,.06); --pill-ink: #2c3a63; --mint: rgba(37,99,235,.1);
  --amber: #b45309; --amber-bg: rgba(245,158,11,.14); --red: #dc2626; --red-bg: rgba(239,68,68,.11); --green: #059669; --green-bg: rgba(16,185,129,.12);
  --teal: #0e7490; --teal-bg: rgba(6,182,212,.12); --purple: #6d28d9; --purple-bg: rgba(139,92,246,.12);
  --shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 18px 44px -24px rgba(30,50,120,.35);
  --shadow-lg: 0 30px 80px -24px rgba(30,50,120,.45), 0 0 40px -12px rgba(139,92,246,.35);
  --code-bg: #0b1433; --code-ink: #e3e9ff; --r: 20px; --r-sm: 12px;
  color-scheme: light;
}
[data-theme="aurora"][data-accent="violet"] { --acc: 124 58 237; --acc2: 236 72 153; }
[data-theme="aurora"][data-accent="teal"] { --acc: 13 148 136; --acc2: 37 99 235; }
[data-theme="aurora"][data-accent="amber"] { --acc: 217 119 6; --acc2: 225 29 72; }
[data-theme="aurora"][data-accent="rose"] { --acc: 225 29 72; --acc2: 124 58 237; }

body.nexus.nx-light { background: #eef2fb; }
body.nx-light .aurora { opacity: .55; filter: blur(80px); }
body.nx-light .aurora i:nth-child(1) { background: radial-gradient(circle, #b9a4ff 0, transparent 65%); opacity: .9; }
body.nx-light .aurora i:nth-child(2) { background: radial-gradient(circle, #7ee0ff 0, transparent 62%); opacity: .8; }
body.nx-light .aurora i:nth-child(3) { background: radial-gradient(circle, #ffb3e6 0, transparent 65%); opacity: .7; }
body.nx-light .aurora i { mix-blend-mode: multiply; }
body.nx-light .top { background: rgba(255,255,255,.55); }
body.nx-light .nx-glyph b { background: #fff; color: #0b1433; }
body.nx-light .search, body.nx-light .field input, body.nx-light .field select, body.nx-light .field textarea, body.nx-light .pm-start input,
body.nx-light .dbc-filter input, body.nx-light .dbc-filter select, body.nx-light .search input { background: rgba(255,255,255,.75); color: var(--ink); }
body.nx-light select option { background: #fff; color: var(--ink); }
body.nx-light #subnav a:hover { color: var(--ink); }
body.nx-light #subnav a.on { color: #fff; background: linear-gradient(135deg, rgb(var(--acc2)), rgb(var(--acc))); box-shadow: 0 8px 22px -8px rgb(var(--acc2) / .6); }
body.nx-light #subnav a .count { color: #fff; }
body.nx-light #dock { background: rgba(255,255,255,.6); box-shadow: 0 24px 60px -20px rgba(30,50,120,.45), 0 0 0 1px rgba(255,255,255,.8) inset; }
body.nx-light #dock .d { color: #33406a; background: rgba(255,255,255,.7); border-color: rgba(70,90,160,.12); }
body.nx-light #dock .d:hover { color: #fff; }
body.nx-light #dock .d .dot { color: #fff; box-shadow: 0 0 0 2px #fff; }
body.nx-light #dock .pop, body.nx-light .cmdk, body.nx-light .appear, body.nx-light .toast { background: rgba(255,255,255,.96); color: var(--ink); }
body.nx-light #dock .pop a:hover { color: rgb(var(--acc)); }
body.nx-light .kpi .num, body.nx-light .nx-big { background: linear-gradient(180deg, #0b1433, rgb(var(--acc2))); -webkit-background-clip: text; background-clip: text; color: transparent; }
body.nx-light .head .eyebrow { text-shadow: none; }
body.nx-light .card::after, body.nx-light .kpi::after { background: radial-gradient(280px circle at var(--mx, 50%) var(--my, -30%), rgb(var(--acc2) / .12), transparent 60%); }
body.nx-light .btn { background: rgba(255,255,255,.7); }
body.nx-light .btn.primary { color: #fff; box-shadow: 0 10px 24px -10px rgb(var(--acc2) / .8); }
body.nx-light tbody tr:hover { background: linear-gradient(90deg, rgb(var(--acc) / .07), transparent 70%); }
body.nx-light .pm-tabs a.on { text-shadow: none; }
body.nx-light .nx-ask div { background: rgba(255,255,255,.95); }
body.nx-light .nx-orb .ball { background: radial-gradient(circle at 35% 30%, #fff 0, #e4dcff 12%, rgb(var(--acc2)) 40%, rgb(var(--acc)) 70%, #1e1b6b 95%);
  box-shadow: 0 0 50px rgb(var(--acc2) / .55), 0 0 120px rgb(var(--acc) / .3), inset -18px -26px 50px rgba(20,10,80,.35); }
body.nx-light .nx-orb .nxr:nth-child(1) { border-color: rgba(70,90,160,.3); }
body.nx-light .nx-sugg a:hover { color: rgb(var(--acc)); }
body.nx-light .nx-sig a:hover { color: var(--ink); }
body.nx-light .nx-sig em { color: #5b3fd6; }
body.nx-light .nx-sig em.bad { color: #c81e3a; }
body.nx-light .nx-sig a { border-bottom-color: rgba(70,90,160,.1); }
body.nx-light .nx-constel a { color: #0b1433; background: radial-gradient(circle at 35% 30%, #fff, rgb(var(--acc2) / .25) 45%, rgb(var(--acc) / .12)); border-color: rgba(70,90,160,.25); box-shadow: 0 10px 30px -8px rgb(var(--acc2) / .45); }
body.nx-light .nx-flowl .t { background: rgba(15,30,80,.07); }
body.nx-light .nx-chip { background: rgba(255,255,255,.7); }
body.nx-light #dock .d:hover { background: linear-gradient(135deg, rgb(var(--acc2)), rgb(var(--acc))); color: #fff; }

/* =====================================================================================================
   CALM: built for long reading. Warm paper, strong text contrast, generous spacing, larger type,
   no moving background, quiet colour used only for meaning. Paper (day) and Night.
   ===================================================================================================== */
[data-theme="calm"] {
  --acc: 52 92 170; --acc2: 52 92 170;
  --bg: #f6f4ef; --bg-grad: none;
  --paper: #fffefb; --paper-2: #faf8f3; --glass: #fffefb; --line: #e6e1d6; --line-2: #d6cfc0;
  --ink: #1d2126; --ink-2: #353b44; --muted: #5d6470; --nav: #1d2126; --hover: #f3efe6;
  --grey-bg: #f0ede5; --pill-ink: #3d434c; --mint: #e8eef8;
  --amber: #8a5300; --amber-bg: #fbf0dc; --red: #b3261e; --red-bg: #fbe9e7; --green: #1e6b3f; --green-bg: #e5f2e9;
  --teal: #0b6470; --teal-bg: #e1f1f2; --purple: #5a3e9a; --purple-bg: #efeaf8;
  --shadow: 0 1px 2px rgba(60,50,30,.05); --shadow-lg: 0 18px 40px -18px rgba(60,50,30,.25);
  --code-bg: #26292e; --code-ink: #eceae4; --r: 12px; --r-sm: 9px;
  color-scheme: light;
}
[data-theme="calmnight"] {
  --acc: 138 170 230; --acc2: 138 170 230;
  --bg: #1a1c20; --bg-grad: none;
  --paper: #212429; --paper-2: #1d2024; --glass: #212429; --line: #31353c; --line-2: #3d424a;
  --ink: #ecebe6; --ink-2: #d2d1cb; --muted: #a3a6ad; --nav: #ecebe6; --hover: #282b31;
  --grey-bg: #2a2e34; --pill-ink: #d2d1cb; --mint: rgba(138,170,230,.14);
  --amber: #e7b765; --amber-bg: rgba(231,183,101,.12); --red: #f0857c; --red-bg: rgba(240,133,124,.12); --green: #7fc79a; --green-bg: rgba(127,199,154,.12);
  --teal: #74c3cb; --teal-bg: rgba(116,195,203,.12); --purple: #b8a5e8; --purple-bg: rgba(184,165,232,.12);
  --shadow: 0 1px 2px rgba(0,0,0,.3); --shadow-lg: 0 18px 40px -18px rgba(0,0,0,.6);
  --code-bg: #15171a; --code-ink: #e4e2dc; --r: 12px; --r-sm: 9px;
  color-scheme: dark;
}
[data-theme="calm"][data-accent="violet"] { --acc: 96 70 170; } [data-theme="calmnight"][data-accent="violet"] { --acc: 184 165 232; }
[data-theme="calm"][data-accent="teal"] { --acc: 11 110 110; } [data-theme="calmnight"][data-accent="teal"] { --acc: 116 195 203; }
[data-theme="calm"][data-accent="amber"] { --acc: 150 90 10; } [data-theme="calmnight"][data-accent="amber"] { --acc: 231 183 101; }
[data-theme="calm"][data-accent="rose"] { --acc: 170 50 80; } [data-theme="calmnight"][data-accent="rose"] { --acc: 236 140 160; }

body.calm { --fs: 15px; font-family: "Segoe UI Variable Text", "Segoe UI", Inter, system-ui, sans-serif; line-height: 1.62; letter-spacing: .005em; }
body.calm aside.rail, body.calm aside.panel, body.calm .top { backdrop-filter: none; background: var(--paper); }
body.calm aside.rail { background: var(--paper-2); }
body.calm .rail .logo { background: rgb(var(--acc)); box-shadow: none; }
body.calm .rail .mod.on { background: var(--mint); }
body.calm .panel .mtitle { font-size: 18px; font-weight: 650; }
body.calm .panel .mdesc { font-size: 13px; }
body.calm .panel nav a { font-size: 14.5px; padding: 10px 12px; font-weight: 500; color: var(--ink-2); }
body.calm .panel nav a.on { background: var(--mint); color: var(--ink); font-weight: 650; box-shadow: inset 3px 0 0 rgb(var(--acc)); border-radius: 4px 10px 10px 4px; }
body.calm main { padding: 32px 40px 64px; max-width: 1280px; }
body.calm .head { margin-bottom: 26px; }
body.calm .head h1 { font: 650 30px/1.2 "Segoe UI Variable Display", "Segoe UI", system-ui; letter-spacing: -.3px; color: var(--ink); }
body.calm .head p { font-size: 15px; color: var(--ink-2); max-width: 82ch; }
body.calm .eyebrow { font-size: 11px; letter-spacing: 1px; color: var(--muted); }
body.calm .head .eyebrow { color: rgb(var(--acc)); }
body.calm .card { box-shadow: var(--shadow); border-color: var(--line); padding: 22px 24px; }
body.calm .card:hover { border-color: var(--line-2); }
body.calm .card h3 { font-size: 16px; font-weight: 650; margin-bottom: 4px; }
body.calm .card .sub { font-size: 14px; color: var(--muted); }
body.calm .grid { gap: 20px; }
body.calm .mb { margin-bottom: 20px; }
body.calm .kpi::after { display: none; }
body.calm .kpi:hover { transform: none; box-shadow: var(--shadow); }
body.calm .kpi .label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
body.calm .kpi .num { font: 650 36px/1.1 "Segoe UI Variable Display", "Segoe UI", system-ui; background: none; color: var(--ink); -webkit-text-fill-color: currentColor; letter-spacing: -.5px; }
body.calm .kpi .hint { font-size: 13.5px; color: var(--muted); }
body.calm .kpi .ico { background: var(--grey-bg); color: var(--ink-2); }
body.calm th { font-size: 12px; letter-spacing: .4px; text-transform: none; font-weight: 650; color: var(--muted); padding: 12px 12px; background: var(--paper-2); }
body.calm td { font-size: 14.5px; padding: 13px 12px; }
body.calm tbody tr:nth-child(even) { background: var(--paper-2); }
body.calm tbody tr:hover { background: var(--hover); }
body.calm .pill { font-size: 12.5px; padding: 3px 10px; font-weight: 600; }
body.calm .btn { border-radius: 9px; font-size: 14px; padding: 8px 14px; box-shadow: none; }
body.calm .btn:hover { transform: none; background: var(--hover); }
body.calm .btn.primary { background: rgb(var(--acc)); color: #fff; }
body.calm .btn.primary:hover { filter: brightness(1.06); background: rgb(var(--acc)); }
[data-theme="calmnight"] body.calm .btn.primary { color: #15171a; }
body.calm .field label { font-size: 13px; color: var(--ink-2); }
body.calm .field input, body.calm .field select, body.calm .field textarea { font-size: 14.5px; padding: 9px 12px; }
body.calm a { text-underline-offset: 3px; }
body.calm pre.code { font-size: 13px; line-height: 1.6; }
body.calm main.enter > * { animation: fade .25s ease both !important; }
body.calm .search { width: 360px; }
body.calm .crumb { font-size: 14px; }

/* reading size (all themes) */
[data-text="large"] { --fs: 16px; }
[data-text="large"] body { font-size: 16px; }
[data-text="large"] td, [data-text="large"] .panel nav a { font-size: 15.5px; }
[data-text="large"] .card .sub, [data-text="large"] .kpi .hint, [data-text="large"] .muted { font-size: 14.5px; }
