/* ═══════════════════════════════════════════════════════════════════════
   ΣTYX — visual identity layer
   Loaded last. Redefines the shared tokens every legacy rule already reads
   (--bg*, --text*, --a/--b/--c, --line…), then restyles shell, navigation,
   chat and the shared primitives. Backend identifiers stay untouched.

   Concept: the river is the boundary. Blue/indigo = the water and the dark,
   bronze = Charon's obol — the only warm material, used for "you are here"
   and the brand, never for status.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  /* ── Water (surfaces) */
  --styx-0: #060a13;          /* abyss — behind everything            */
  --styx-1: #080d18;          /* main background                       */
  --styx-2: #0d1424;          /* recessed wells (inputs, code)         */
  --styx-3: #10182a;          /* elevated surface                      */
  --styx-4: #17223a;          /* secondary surface / hover             */
  --styx-5: #263b5b;          /* muted blue, strong borders            */
  --indigo: #5658a6;
  --indigo-hi: #8a8cd8;
  --cold: #819dcd;            /* cold highlight — primary interactive  */
  --cold-hi: #a9c0e6;
  /* ── Bronze (obol) */
  --bronze: #9b7356;
  --bronze-hi: #b9906f;
  --bronze-lo: #654936;
  /* ── Text */
  --ink-1: #e6eaf2;
  --ink-2: #a3b0c3;           /* lifted from #9BA9BD for AA on --styx-3 */
  --ink-3: #8592a7;           /* tertiary: ≥5:1 on every surface up to --styx-4 */
  /* ── Semantic (independent from brand) */
  --ok:   #5fbf98;
  --warn-c: #d9a648;
  --err:  #e0606f;
  --info-c: #6fa3e0;

  /* ── Remap legacy tokens so every existing module follows */
  --bg0: var(--styx-0); --bg1: var(--styx-1); --bg2: var(--styx-2);
  --bg3: var(--styx-3); --bg4: var(--styx-4); --bg5: #1d2a45;
  --text: var(--ink-1); --text1: var(--ink-1); --text2: var(--ink-2); --text3: var(--ink-3); --muted: #7d8ba1;  /* was #66748a = 4.1:1, failed AA */
  --a: var(--cold); --a2: #6f89b8; --b: var(--indigo); --b2: var(--indigo-hi); --c: var(--info-c);
  --success: var(--ok); --warn: var(--warn-c); --danger: var(--err); --info: var(--info-c);
  --surface: var(--styx-3); --surface2: var(--styx-4);
  --line:  rgba(129,157,205,0.10);
  --line2: rgba(129,157,205,0.18);
  --line3: rgba(129,157,205,0.30);
  --glow-a: rgba(129,157,205,0.10);
  --glow-b: rgba(86,88,166,0.14);
  --hud-tick: rgba(185,144,111,0.40);
  --surface-hi: none;
  --focus: 0 0 0 1px var(--cold), 0 0 0 4px rgba(129,157,205,0.22);

  /* ── Type: exactly two families */
  --font-head: 'Chakra Petch', 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Inter', ui-sans-serif, -apple-system, system-ui, sans-serif;
  --font-data: 'Inter', ui-sans-serif, system-ui, sans-serif; /* + tnum via .num rules */
  --fs-xs: 11px; --fs-sm: 12px; --fs-md: 13px; --fs-base: 14px; --fs-lg: 16px; --fs-xl: 20px;

  /* ── Geometry */
  --r: 2px; --r1: 2px; --r2: 3px; --r3: 4px; --r4: 6px;
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px;
  --nav-w: 56px; --nav-w-open: 232px;

  /* ── Motion */
  --ease-river: cubic-bezier(.22,.61,.36,1);
  --dur-fast: 120ms; --dur-std: 220ms; --dur-slow: 420ms;

  /* ── Textures (static, generated once by the browser) */
  --dither: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .62 0 0 0 0 .8 0 0 0 .55 0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='discrete' tableValues='0 0 0 .5 1'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --marble: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='900'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.006 .022' numOctaves='4' seed='11'/%3E%3CfeColorMatrix values='0 0 0 0 .62 0 0 0 0 .70 0 0 0 0 .86 0 0 0 -9 4.6'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23m)'/%3E%3C/svg%3E");
  --meander: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='8'%3E%3Cpath d='M0 7.5h4V2.5h5v3H6.5' fill='none' stroke='%239b7356' stroke-width='1'/%3E%3Cpath d='M9 7.5h7' stroke='%239b7356' stroke-width='1'/%3E%3C/svg%3E");
  --core: var(--cold);
  color-scheme: dark;
}
body[data-core="thinking"]  { --core: #8a8cd8; }
body[data-core="working"]   { --core: #d9a648; }
body[data-core="speaking"]  { --core: #5fbf98; }
body[data-core="listening"] { --core: #a9c0e6; }
body[data-core="error"]     { --core: #e0606f; }
body[data-core="idle"]      { --core: #819dcd; }

/* ── BASE ─────────────────────────────────────────────────────────────── */
html { font-size: 14px; }
body {
  font-family: var(--font-body);
  font-feature-settings: 'cv11', 'ss01';
  color: var(--ink-1);
  background: var(--styx-1);
  -webkit-font-smoothing: antialiased;
}
body::before, body::after { display: none !important; } /* retire legacy grid/grain */
::selection { background: rgba(86,88,166,0.55); color: #fff; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; letter-spacing: .01em; }
a { color: var(--cold-hi); text-decoration-color: rgba(129,157,205,.4); text-underline-offset: 2px; }
a:hover { color: #fff; }
code, kbd, .mono, pre, td, .kpi-value, .num, time { font-variant-numeric: tabular-nums slashed-zero; }
code { background: rgba(129,157,205,0.09); color: var(--cold-hi); border-radius: var(--r2); padding: 1px 5px; font-size: .92em; font-weight: 500; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r2); }

button, input, select, textarea, optgroup { font-family: inherit; }

/* ── ATMOSPHERE: the river under the interface ────────────────────────── */
.styx-atmos { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background:
    radial-gradient(120% 80% at 70% -10%, rgba(38,59,91,.55), transparent 60%),
    radial-gradient(90% 70% at 0% 110%, rgba(86,88,166,.16), transparent 60%),
    linear-gradient(180deg, #091020 0%, #080d18 50%, #060a13 100%); }
.styx-atmos::after { content: ''; position: absolute; inset: 0; background-image: var(--dither); opacity: .035; } /* static, no blend mode */
.styx-current { position: absolute; left: -25%; width: 150%; height: 46vh; opacity: .6; will-change: transform; contain: strict; }
/* No filter: blur — the closest-side radial gradient is already soft; blur on a
   viewport-sized animated layer cost ~22 fps (measured 28 → 6 fps). */
.styx-current.a { top: 38%; background: radial-gradient(closest-side, rgba(86,88,166,.16), rgba(86,88,166,.06) 55%, transparent);
  animation: styxDrift 46s ease-in-out infinite alternate; }
.styx-current.b { top: 58%; background: radial-gradient(closest-side, rgba(129,157,205,.10), transparent);
  animation: styxDrift 63s ease-in-out -20s infinite alternate-reverse; }
@keyframes styxDrift { from { transform: translate3d(-6%, 2%, 0); } to { transform: translate3d(6%, -4%, 0); } } /* translate only: compositor-cheap, no re-raster */
/* The river is still while ΣTYX is idle and flows only while the core works.
   A perpetual full-viewport animation cost ~28 fps (measured 43 → 15 fps). */
.styx-atmos .styx-current { animation-play-state: paused; } /* must out-rank .styx-current.a shorthand */
body:not([data-core="idle"]) .styx-atmos .styx-current { animation-play-state: running; }
html.styx-paused .styx-current { animation-play-state: paused !important; }
#sidebar, #main { position: relative; z-index: 1; }
#sidebar { position: fixed; z-index: 100; }

/* ── SIDEBAR: carved stone ────────────────────────────────────────────── */
#sidebar {
  width: var(--nav-w); min-width: var(--nav-w);
  background:
    var(--marble) 0 0 / 240px 900px,
    linear-gradient(180deg, #0c1322 0%, #090e1a 55%, #070b15 100%);
  background-blend-mode: soft-light, normal;
  border-right: 0;
  box-shadow: inset -1px 0 0 rgba(129,157,205,.10), 1px 0 0 rgba(0,0,0,.5);
  transition: width var(--dur-slow) var(--ease-river), box-shadow var(--dur-slow);
}
#sidebar::before { content: ''; position: absolute; inset: 0; pointer-events: none; background-image: var(--dither); opacity: .035; }
#sidebar::after { /* the boundary — a single bronze hairline that fades along the river */
  content: ''; position: absolute; top: 0; bottom: 0; right: 0; width: 1px; pointer-events: none;
  background: linear-gradient(180deg, transparent 4%, rgba(155,115,86,.45) 22%, rgba(129,157,205,.18) 60%, transparent 96%); }
#sidebar:hover, #sidebar:focus-within { width: var(--nav-w-open); box-shadow: 18px 0 48px rgba(3,6,12,.6); }

.brand { padding: 12px 12px; min-height: 60px; border-bottom: 0; gap: 12px; position: relative; }
.brand::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 0; height: 8px;
  background: var(--meander) 0 0 / 16px 8px repeat-x; opacity: .32; }
.brand-icon { width: 32px; height: 32px; min-width: 32px; border-radius: 7px; position: relative;
  background: linear-gradient(160deg, #141d31, #0a1020); border: 1px solid rgba(129,157,205,.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 6px 18px rgba(0,0,0,.4); color: #cdd7ea; }
.brand-icon svg { width: 22px; height: 22px; display: block; }
.brand-icon::after { border-radius: 9px; }
.brand-text strong.styx-word { font: 700 18px/1 var(--font-head); letter-spacing: .14em; color: var(--ink-1); }
.brand-text small { display: block; margin-top: 4px; font: 500 10.5px/1 var(--font-body); letter-spacing: .14em; color: var(--bronze-hi); text-transform: uppercase; }

nav { padding: 10px 8px 12px; }
.nav-group { margin-bottom: 6px; }
.nav-group + .nav-group { padding-top: 6px; border-top: 1px solid rgba(129,157,205,.07); }
.nav-label { font: 600 10.5px/1 var(--font-head); letter-spacing: .16em; color: rgba(185,144,111,.85); padding: 10px 10px 6px; }
.nav-btn { font: 500 13px var(--font-body); letter-spacing: 0; color: var(--ink-3); min-height: 34px; padding: 0 10px; border-radius: var(--r3); margin: 1px 0; }
.nav-btn .icon { width: 20px; min-width: 20px; height: 20px; }
.nav-btn .icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
#sidebar:hover .nav-btn, #sidebar:focus-within .nav-btn { gap: 12px; }
.nav-btn:hover { color: var(--ink-1); background: rgba(129,157,205,.06); }
.nav-btn.active { color: var(--ink-1); background: linear-gradient(90deg, rgba(86,88,166,.22), rgba(86,88,166,.04)); }
.nav-btn.active .icon { color: var(--bronze-hi); }
.nav-btn.active::before { left: -8px; top: 7px; bottom: 7px; width: 2px; background: var(--bronze-hi); box-shadow: 0 0 10px rgba(185,144,111,.55); border-radius: 0 2px 2px 0; }
.sidebar-status { border-top: 1px solid rgba(129,157,205,.08); padding: 12px 14px 14px 22px; font-size: 12px; color: var(--ink-3); }
#sidebar:hover .sidebar-status-label, #sidebar:focus-within .sidebar-status-label { opacity: 1; max-width: 200px; }

#main { margin-left: var(--nav-w); }

/* ── TOPBAR ───────────────────────────────────────────────────────────── */
.topbar { height: 52px; padding: 0 24px; gap: 16px; background: rgba(8,13,24,.94); backdrop-filter: none;
  border-bottom: 1px solid rgba(129,157,205,.08); }
.topbar::after { height: 1px; background: linear-gradient(90deg, transparent, var(--core) 30%, transparent 70%); opacity: .30; }
.topbar-group { font: 500 12px var(--font-body); letter-spacing: .02em; text-transform: none; color: var(--ink-3); }
.topbar-sep { color: var(--styx-5); }
h1.topbar-title, .topbar-title { font: 600 16px/1 var(--font-head); letter-spacing: .04em; text-transform: none; color: var(--ink-1); }
.core-chip { font: 500 12px var(--font-body); padding: 5px 12px; border-radius: 999px; border-color: var(--line2); background: rgba(16,24,42,.6); }
.palette-btn { font: 500 12px var(--font-body); padding: 5px 6px 5px 12px; color: var(--ink-3); border-color: var(--line2); border-radius: var(--r3); background: rgba(13,20,36,.6); }
.palette-btn:hover { color: var(--ink-1); border-color: var(--line3); }
kbd { font: 600 11px var(--font-body); padding: 1px 6px; border-radius: var(--r2); border: 1px solid var(--line2); border-bottom-width: 2px; background: var(--styx-2); color: var(--ink-2); }
.topbar-ts { font-size: 12px; color: var(--ink-3); }
.topbar-indicator { font: 600 11px var(--font-body); letter-spacing: .08em; color: var(--ink-3); gap: 6px; }
.topbar-indicator .status-dot { width: 6px; height: 6px; min-width: 6px; }
.topbar-status { border-left-color: var(--line); padding-left: 16px; gap: 14px; }

/* ── CONTENT / SECTIONS ───────────────────────────────────────────────── */
.content { padding: 24px 28px 40px; }
.panel.active { animation: styxPanelIn var(--dur-slow) var(--ease-river) both; }
@keyframes styxPanelIn { from { opacity: 0; transform: translate3d(0, 6px, 0); } to { opacity: 1; transform: none; } }
.section-header { margin: 32px 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line); align-items: baseline; }
.section-header:first-child { margin-top: 0; }
.section-title { font: 600 15px/1.2 var(--font-head); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-1); }
.section-title::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 10px; vertical-align: 2px; transform: rotate(45deg); border: 1px solid var(--bronze-hi); }
.section-ts { font-size: 12px; color: var(--ink-3); }

/* ── CARDS: one surface, no decoration ────────────────────────────────── */
.card, .kpi-card, .resource-card, .session-card, .repo-card, .mod-card, .gov-card, .usage-card, .li-panel, .ctx-panel {
  background: linear-gradient(180deg, rgba(23,34,58,.55), rgba(16,24,42,.75));
  border: 1px solid var(--line); border-radius: var(--r4); box-shadow: none; }
.card { padding: 16px; }
.card::before { opacity: .0 !important; }
.card:hover { border-color: var(--line2); }
.card-header { margin-bottom: 12px; gap: 12px; }
.card-title { font: 600 13px/1.3 var(--font-head); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); }
.card-badge, .badge { font: 600 11px/1.5 var(--font-body); letter-spacing: .03em; border-radius: var(--r2); padding: 1px 7px; }
.kpi-card { padding: 14px 16px; }
.kpi-card::before { height: 1px !important; opacity: .7; box-shadow: none !important; }
.kpi-label { font: 600 11px var(--font-body) !important; letter-spacing: .1em !important; text-transform: uppercase; color: var(--ink-3) !important; }
.kpi-value { font-family: var(--font-head) !important; font-weight: 600 !important; letter-spacing: .01em; color: var(--ink-1); }
.kpi-sub { font-size: 12px; color: var(--ink-3); }
.kpi-card.teal::before { background: var(--cold) !important; } .kpi-card.purple::before { background: var(--indigo-hi) !important; }

/* ── BUTTONS ──────────────────────────────────────────────────────────── */
.btn, .btn-sm, .btn-secondary, .set-btn-sm, .btn-start, .btn-stop { font-family: var(--font-body); font-weight: 500; border-radius: var(--r3); }
.btn { font-size: 13px; padding: 7px 14px; background: var(--styx-4); border-color: var(--line2); color: var(--ink-1); }
.btn:hover { border-color: var(--line3); background: #1c2945; }
.btn-sm, .set-btn-sm { font-size: 12px; padding: 4px 10px; background: transparent; border: 1px solid var(--line2); color: var(--ink-2); }
.btn-sm:hover, .set-btn-sm:hover { color: var(--ink-1); border-color: var(--line3); background: rgba(129,157,205,.06); }
.btn-primary { font: 600 13px var(--font-body); letter-spacing: .02em; padding: 8px 18px; border-radius: var(--r3);
  color: #f3f5fa; background: linear-gradient(180deg, #6668b8, #4d4f98); border: 1px solid rgba(169,192,230,.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 4px 14px rgba(38,40,96,.45); cursor: pointer; }
.btn-primary:hover:not(:disabled) { opacity: 1; background: linear-gradient(180deg, #7072c4, #5658a6); box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 6px 20px rgba(56,58,140,.5); }
.btn-secondary { background: transparent; border: 1px solid var(--line2); color: var(--ink-2); }
.btn-secondary:hover { color: var(--ink-1); border-color: var(--line3); }

/* ── FORMS ────────────────────────────────────────────────────────────── */
textarea, input[type="text"], input[type="number"], input[type="search"], input[type="password"], input[type="date"], select {
  background: var(--styx-2); border: 1px solid var(--line2); border-radius: var(--r3); color: var(--ink-1); font: 13px/1.5 var(--font-body); }
textarea:focus, input:focus, select:focus { border-color: rgba(129,157,205,.55); box-shadow: 0 0 0 3px rgba(129,157,205,.12); outline: none; }
::placeholder { color: #7d8ba1; }
input[type="checkbox"], input[type="range"] { accent-color: var(--indigo); }

/* ── TABLES ───────────────────────────────────────────────────────────── */
.tbl-wrap { border-color: var(--line); border-radius: var(--r4); background: rgba(13,20,36,.5); }
table { font-size: 12.5px; }
th { font: 600 11px var(--font-body) !important; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3) !important;
  background: rgba(13,20,36,.8) !important; border-bottom: 1px solid var(--line2) !important; padding: 9px 12px !important; text-align: left; }
td { font-size: 12.5px; color: var(--ink-2); border-bottom-color: var(--line); padding: 8px 12px; }
tr:hover td { background: rgba(129,157,205,.035); }
.progress-bar { background: var(--styx-2); height: 4px; }
.progress-fill { background: linear-gradient(90deg, var(--indigo), var(--cold)); }

/* ── STATUS ───────────────────────────────────────────────────────────── */
.status-dot { background: var(--ok); box-shadow: 0 0 0 2px rgba(95,191,152,.15); }
.status-dot.warn { background: var(--warn-c); box-shadow: 0 0 0 2px rgba(217,166,72,.15); }
.status-dot.offline { background: var(--err); box-shadow: 0 0 0 2px rgba(224,96,111,.15); }
.status-dot.pending { background: var(--ink-3); box-shadow: none; }

/* ── PALETTE / TOASTS / DIALOGS ───────────────────────────────────────── */
.pal-icon { display: inline-flex; width: 20px; justify-content: center; color: var(--ink-3); }
.pal-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.toast { background: var(--styx-3); border: 1px solid var(--line2); border-left: 2px solid var(--info-c); border-radius: var(--r3); font-size: 13px; box-shadow: 0 12px 32px rgba(0,0,0,.45); }

/* ── EMPTY / LOADING ──────────────────────────────────────────────────── */
.skeleton-block { background: linear-gradient(100deg, rgba(129,157,205,.03) 20%, rgba(129,157,205,.09) 40%, rgba(129,157,205,.03) 60%) 0 0 / 300% 100%; }

/* ═══ CHAT ══════════════════════════════════════════════════════════════ */
.chat-layout { grid-template-columns: 272px minmax(0,1fr); gap: 0; height: calc(100vh - 52px - 48px); }
.core-rail { padding-right: 20px; margin-right: 0; border-right: 1px solid var(--line); }
.orb-frame { width: 200px; height: 200px; }
.orb-label { font: 600 11px var(--font-head); letter-spacing: .32em; color: var(--bronze-hi); opacity: .9; margin-top: 16px; }
.core-state { font: 600 13px var(--font-head); letter-spacing: .2em; }
.core-source { font-size: 12px; color: var(--ink-3); }
.ctx-panel { padding: 14px; background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.ctx-title { font: 600 11px var(--font-head); letter-spacing: .16em; color: var(--ink-3); }
.ctx-kv { grid-template-columns: 76px minmax(0,1fr); font-size: 12px; gap: 6px 10px; }
.ctx-kv dt { font-size: 12px; color: var(--ink-3); }
.ctx-kv dd { font-size: 12px; color: var(--ink-1); font-weight: 500; }
.ctx-conv code { font-size: 11.5px; }

.chat-main { background: transparent; border: 0; border-radius: 0; }
.messages { padding: 28px max(24px, calc((100% - 840px) / 2)) 24px; gap: 0; scroll-padding-bottom: 24px; }
/* Messages are rows in one document, not floating bubbles. */
.message { max-width: none; width: 100%; padding: 18px 0 18px 0; border: 0; border-radius: 0; background: none;
  font-size: 14.5px; line-height: 1.68; color: var(--ink-1); position: relative; }
.message + .message:not(.system) { border-top: 1px solid rgba(129,157,205,.07); }
.message.user { align-self: stretch; background: none; border: 0; padding-left: 0; }
.message.user .msg-body { display: inline-block; max-width: 100%; padding: 10px 14px; border-radius: var(--r4) var(--r4) var(--r1) var(--r4);
  background: rgba(23,34,58,.75); border: 1px solid var(--line2); color: var(--ink-1); }
.message.user { text-align: right; }
.message.user .msg-head { justify-content: flex-end; }
.message.user .msg-body { text-align: left; }
.message.assistant { align-self: stretch; background: none; border: 0; padding-left: 28px; }
.message.assistant::before { /* Σ seal — the speaker mark */
  content: 'Σ'; position: absolute; left: 0; top: 18px; width: 18px; height: 18px; display: grid; place-items: center;
  font: 700 11px/1 var(--font-head); color: var(--bronze-hi); border: 1px solid rgba(185,144,111,.45); border-radius: 50%; }
.message.assistant.pending::before { border-color: var(--indigo-hi); color: var(--indigo-hi); animation: styxRipple 1.8s var(--ease-river) infinite; }
@keyframes styxRipple { 0% { box-shadow: 0 0 0 0 rgba(138,140,216,.45); } 100% { box-shadow: 0 0 0 10px rgba(138,140,216,0); } }
.message.assistant.error { background: none; color: #f1b9c0; }
.message.assistant.error::before { content: '!'; color: var(--err); border-color: rgba(224,96,111,.55); }
.message.assistant.error .msg-body { padding: 10px 12px; border: 1px solid rgba(224,96,111,.3); background: rgba(224,96,111,.06); border-radius: var(--r3); }
.message.system { align-self: center; width: auto; padding: 10px 0; font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 12px; }
.message.system::before, .message.system::after { content: ''; width: 48px; height: 1px; background: linear-gradient(90deg, transparent, var(--line3)); }
.message.system::after { transform: scaleX(-1); }
.msg-head { font-size: 12px; gap: 10px; margin-bottom: 6px; color: var(--ink-3); letter-spacing: 0; align-items: center; }
.msg-who { font: 600 12px var(--font-head); letter-spacing: .12em; color: var(--ink-2); }
.message.assistant .msg-who { color: var(--ink-1); }
.msg-meta { font-size: 12px; color: var(--ink-3); }
.meta-model { color: var(--cold-hi); font-weight: 500; }
.meta-sep { color: var(--styx-5); margin: 0 6px; }
.msg-time { font-size: 12px; color: var(--ink-3); }
.message.user .msg-time { margin-left: 0; }
.msg-h { font: 600 15.5px/1.4 var(--font-head); letter-spacing: .02em; margin: 10px 0 2px; color: var(--ink-1); }
.msg-body strong { color: #fff; font-weight: 600; }
.msg-li { display: inline-block; width: 100%; padding-left: 18px; position: relative; }
.msg-li::before { content: ''; position: absolute; left: 4px; top: .72em; width: 5px; height: 5px; transform: rotate(45deg); border: 1px solid var(--bronze-hi); }
.msg-body code { font-size: 13px; }
.msg-code { margin: 12px 0; padding: 34px 16px 14px; background: var(--styx-0); border: 1px solid var(--line2); border-radius: var(--r4);
  font: 500 13px/1.6 var(--font-data); color: #cdd8ec; white-space: pre; tab-size: 2;
  background-image: linear-gradient(180deg, rgba(23,34,58,.9) 0 26px, transparent 26px); }
.msg-code::before { content: attr(data-lang); position: absolute; top: 0; left: 0; right: 0; height: 26px; padding: 0 12px; display: flex; align-items: center;
  font: 600 11px var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); border-bottom: 1px solid var(--line); }
.msg-code:not([data-lang])::before { content: 'output'; }
.msg-code[data-lang]::before { top: 0; right: 0; }
.msg-table { overflow-x: auto; margin: 10px 0; border: 1px solid var(--line2); border-radius: var(--r4); white-space: normal; }
.msg-table table { font-size: 13px; }
.msg-table td { color: var(--ink-1); }
.msg-actions { margin-top: 10px; gap: 6px; }
.msg-actions .btn-sm { font-size: 11.5px; padding: 3px 9px; }
/* Tool activity: visible, quiet, collapsible */
.msg-trace { margin-top: 12px; border-left: 1px solid var(--line2); padding-left: 12px; }
.msg-trace summary { font: 500 12px var(--font-body); color: var(--ink-3); letter-spacing: 0; }
.msg-trace summary:hover { color: var(--ink-1); }
.msg-trace summary::before { content: '▸ '; color: var(--bronze-hi); }
.msg-trace[open] summary::before { content: '▾ '; }
.msg-trace ol { border-left: 0; padding-left: 0; gap: 3px; }
.tr { grid-template-columns: 56px 190px minmax(0,1fr); font-size: 12px; }
.tr-e { color: var(--indigo-hi); }
.think-dots i { background: var(--indigo-hi); }
.chat-empty { margin: 8vh auto auto; max-width: 560px; padding: 0; border: 0; text-align: left; }
.ce-title { font: 600 22px/1.2 var(--font-head); letter-spacing: .04em; text-transform: none; color: var(--ink-1); margin-bottom: 16px; }
.ce-title::before { content: 'Σ'; display: block; font-size: 40px; line-height: 1; color: var(--bronze-hi); margin-bottom: 14px; opacity: .9; }
.ce-list { font-size: 13.5px; line-height: 1.7; color: var(--ink-2); }

/* Composer — the threshold */
.composer { margin: 0 max(24px, calc((100% - 840px) / 2)) 4px; padding: 10px 12px 10px; border: 1px solid var(--line2); border-radius: 10px;
  background: linear-gradient(180deg, rgba(23,34,58,.88), rgba(16,24,42,.92)); box-shadow: 0 -24px 40px -24px rgba(6,10,19,.9), 0 10px 30px rgba(0,0,0,.35);
  transition: border-color var(--dur-std), box-shadow var(--dur-std); }
.composer:focus-within { border-color: rgba(129,157,205,.42); box-shadow: 0 0 0 3px rgba(86,88,166,.16), 0 10px 30px rgba(0,0,0,.35); }
.voicebar { border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 4px; }
.mic { width: 32px; height: 32px; min-width: 32px; border-color: rgba(138,140,216,.45); background: rgba(86,88,166,.12); }
.mic-glyph { background: var(--indigo-hi); box-shadow: none; }
.mic-status { font-size: 12px; color: var(--ink-3); padding: 2px 2px 4px; }
#input { background: transparent; border: 0; box-shadow: none !important; padding: 8px 4px; font-size: 14.5px; line-height: 1.55; min-height: 48px; }
.send-row { margin-top: 4px; gap: 14px; }
.send-row label { font-size: 12px; color: var(--ink-3); }
.send-hint { font-size: 12px; color: var(--ink-3); }

/* ── VOICE / ORB legacy accents ───────────────────────────────────────── */
.orb-reticle { stroke: var(--bronze-hi); opacity: .35; }

/* ── RESPONSIVE ───────────────────────────────────────────────────────── */
@media (min-width: 2200px) { .content { padding-left: 40px; padding-right: 40px; } .chat-layout { grid-template-columns: 300px minmax(0,1fr); } }
@media (max-width: 1100px) { .chat-layout { grid-template-columns: minmax(0,1fr); } .core-rail { display: none; } }
@media (max-width: 900px) {
  #main { margin-left: 0; }
  .content { padding: 16px 14px 28px; }
  .topbar { padding: 0 12px; height: 52px; }
  .messages { padding: 16px 4px; }
  .composer { margin: 0; }
  .message { font-size: 14px; }
  .message.assistant { padding-left: 26px; }
  .tr { grid-template-columns: 48px minmax(0,1fr); } .tr-d { grid-column: 2; }
  .chat-layout { height: calc(100dvh - 52px - 32px); }
}
@media (prefers-reduced-motion: reduce) {
  .styx-current, .message.assistant.pending::before { animation: none !important; }
  .panel.active { animation: none !important; }
}
#crypto-trading .qx-heart small, #crypto-trading .qx-hero-ctl small { font-size: 11px; }
/* Bot card headers: wrap as a row, never crush labels into a column */
.qx-bot-card > div:first-child { flex-wrap: wrap; row-gap: 6px; }
.qx-bot-card > div:first-child > span { white-space: nowrap; }
.qx-bot-card > div:first-child > span:first-child { font-family: var(--font-head); font-size: 14px !important; letter-spacing: .03em; }

.msg-code { position: relative; }
.code-copy { position: absolute; top: 3px; right: 6px; z-index: 1; height: 20px; padding: 0 8px; border: 1px solid transparent; border-radius: var(--r2);
  background: transparent; color: var(--ink-3); font: 500 11.5px var(--font-body); cursor: pointer; }
.code-copy:hover, .code-copy:focus-visible { color: var(--ink-1); border-color: var(--line2); background: rgba(129,157,205,.06); }

/* Mobile chat: the conversation must own the viewport. Brief becomes a capped,
   scrollable strip; composer drops its idle mic hint. (Measured: 213px of 844px
   were left for messages.) */
@media (max-width: 900px) {
  #chat #sit-brief { max-height: 112px; overflow-y: auto; overscroll-behavior: contain; margin-bottom: 6px; }
  .composer .mic-status { display: none; }
  .composer .voicebar { padding-bottom: 4px; }
  #input { min-height: 40px; padding: 6px 4px; }
  .send-row { margin-top: 0; }
  .chat-empty { margin-top: 2vh; }
  .ce-title::before { font-size: 28px; margin-bottom: 8px; }
}

/* ── Provider state matrix ─────────────────────────────────────────────── */
.ps-matrix { width: 100%; border-collapse: collapse; font: 400 13px/1.35 var(--font-body); font-variant-numeric: tabular-nums; }
.ps-matrix th, .ps-matrix td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: center; vertical-align: middle; }
.ps-matrix thead th { font: 600 11.5px var(--font-display); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); border-bottom-color: var(--line2); }
.ps-matrix th[scope=row], .ps-matrix thead th:first-child { text-align: left; }
.ps-matrix th[scope=row] b { display: block; color: var(--ink-1); font-weight: 600; }
.ps-matrix th[scope=row] small { color: var(--ink-3); font-size: 11.5px; }
.ps-matrix tbody tr:hover { background: rgba(129,157,205,.04); }
.ps { font-size: 15px; cursor: help; color: var(--ink-3); }
.ps:focus-visible { outline: 1px solid var(--bronze, #9b7356); outline-offset: -2px; }
.ps-yes { color: var(--ok); } .ps-partial { color: var(--warn-c); } .ps-no { color: var(--err); } .ps-na { color: var(--line2); }
.ps-why { text-align: left !important; color: var(--ink-2); font-size: 12px; max-width: 46ch; }
.ps-matrix.compact th, .ps-matrix.compact td { padding: 5px 6px; }
.ps-legend { margin: 8px 2px 0; color: var(--ink-3); font-size: 12px; }
@media (max-width: 700px) { .ps-why { display: none; } .ps-matrix th, .ps-matrix td { padding: 6px 4px; } }

/* ── Crypto Trading render cost (measured: 15 backdrop-filters re-sampling live WebGL
   canvases every frame → ~1–2 fps with an idle main thread). Surfaces become opaque;
   blur only ever came from the canvas behind them. ─────────────────────────────── */
#crypto-trading *, #crypto-trading *::before, #crypto-trading *::after { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
#crypto-trading .qx-rail, #crypto-trading .qx-hud, #crypto-trading .qx-hero-ctl { background: rgba(10,16,30,.94) !important; }
#crypto-trading .qx-bot-card { background: var(--styx-2, #10182a) !important; }
@keyframes qt-slide { 0% { transform: translateY(var(--qt-shift,-1.6em)); opacity: .3 } 100% { transform: none; opacity: 1 } }
html.qx-soft-gl #qt-tradelog .qt-row, html.styx-reduced #qt-tradelog .qt-row { animation: none !important; }

/* ARR: state sentence + metric semantics */
.arr-state { grid-column: 1 / -1; padding: 10px 14px; border-left: 2px solid var(--line2); background: rgba(129,157,205,.04); color: var(--ink-2); font-size: 13px; line-height: 1.5; }
.arr-state.warn { border-left-color: var(--warn-c); }
.arr-state b { color: var(--ink-1); font-weight: 600; margin-right: 4px; }
.arr-sem { margin: 10px 0 14px; color: var(--ink-2); font-size: 12.5px; }
.arr-sem summary { cursor: pointer; color: var(--ink-3); font: 600 11.5px var(--font-display); letter-spacing: .06em; text-transform: uppercase; }
.arr-sem dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 10px 0 0; }
.arr-sem dt { color: var(--ink-3); font-variant-numeric: tabular-nums; } .arr-sem dd { margin: 0; }

/* Provider feed: matrix needs the full width (legacy rule made it a card grid). */
#resourcesFeed, #mc-resources { display: block !important; }
.ps-matrix th[scope=row] small { text-transform: none; letter-spacing: 0; }

/* Live Execution: sessions as disclosure rows, not raw dumps */
.ses { padding: 0 !important; border: 0 !important; border-bottom: 1px solid var(--line) !important; border-radius: 0 !important; background: transparent !important; }
.ses > summary { display: grid; grid-template-columns: 11ch 9ch minmax(18ch,1.4fr) 18ch 16ch 16ch auto; gap: 14px; align-items: baseline; padding: 10px 12px; cursor: pointer; list-style: none; font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ses > summary::-webkit-details-marker { display: none; }
.ses > summary:hover { background: rgba(129,157,205,.04); }
.ses[open] > summary { background: rgba(129,157,205,.06); }
.ses-id { color: var(--ink-1); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ses-plat { color: var(--ink-3); }
.ses-model { color: var(--ink-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ses-model small { margin-left: 8px; color: var(--ink-3); font-size: 12px; }
.ses-flag { justify-self: start; padding: 1px 8px; border: 1px solid var(--line2); border-radius: 2px; color: var(--ink-3); font-size: 11.5px; }
.ses-flag.warn { border-color: rgba(216,169,92,.45); color: var(--warn-c); }
.ses-body { padding: 4px 12px 14px 24px; display: grid; gap: 8px; font-size: 13px; color: var(--ink-2); }
.ses-row { display: grid; grid-template-columns: 12ch 1fr; gap: 12px; }
.ses-row b { color: var(--ink-3); font-weight: 500; }
.ses-tl { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(22ch,1fr)); gap: 2px 16px; max-height: 220px; overflow: auto; }
.ses-tl li { display: flex; gap: 10px; } .ses-t { color: var(--ink-3); } .ses-k { color: var(--ink-1); }
.ses-empty { margin: 10px 12px; color: var(--ink-3); font-size: 12.5px; }
@media (max-width: 1100px) { .ses > summary { grid-template-columns: 1fr auto; } .ses > summary > :nth-child(n+3):not(.ses-num):not(.ses-flag) { display: none; } }

/* ═══════════════════════════════════════════════════════════════════════════
   ΣTYX Network Intelligence — network tab
   ═══════════════════════════════════════════════════════════════════════════ */

/* Layout */
#network { overflow: hidden; }
.net-layout { display: grid; grid-template-columns: 280px 1fr; height: 100%; gap: 0; }
.net-aside  { overflow-y: auto; border-right: 1px solid var(--line); padding: 14px 12px; display: flex; flex-direction: column; gap: 0; }
.net-main   { overflow-y: auto; display: flex; flex-direction: column; }
.net-panel-hd { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; }
.net-hd-label { font: 600 11.5px var(--font-display); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.net-scan-badge { font-size: 11.5px; color: var(--ink-3); }
.net-empty { color: var(--ink-3); font-size: 13px; padding: 6px 0; margin: 0; }

/* Monitor NOC */
.net-noc { display: flex; flex-direction: column; gap: 4px; }
.noc-row { display: grid; grid-template-columns: 10px 1fr auto 60px; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 2px; font-size: 13px; font-variant-numeric: tabular-nums; }
.noc-row:hover { background: rgba(129,157,205,.05); }
.noc-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }
.noc-ok  .noc-dot { background: var(--ok); }
.noc-err .noc-dot { background: var(--err); }
.noc-unk .noc-dot { background: var(--ink-3); }
.noc-label { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.noc-lat { color: var(--ink-1); font-size: 12px; white-space: nowrap; }
.noc-loss { color: var(--warn-c); font-size: 11.5px; margin-left: 4px; }
.noc-spark { width: 60px; height: 20px; }
.noc-spark-line { fill: none; stroke: var(--bronze, #9b7356); stroke-width: 1.5; vector-effect: non-scaling-stroke; }

/* Changes */
.net-changes { display: flex; flex-direction: column; gap: 3px; }
.chg-row { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: start; padding: 5px 6px; border-left: 2px solid var(--line2); font-size: 12.5px; }
.chg-crit { border-left-color: var(--err); }
.chg-warn { border-left-color: var(--warn-c); }
.chg-info { border-left-color: var(--ok); }
.chg-type { color: var(--ink-3); font-size: 11.5px; white-space: nowrap; }
.chg-desc { color: var(--ink-2); line-height: 1.4; }
.chg-age  { color: var(--ink-3); font-size: 11.5px; white-space: nowrap; }

/* Topology */
.net-topo-section { flex: 0 0 420px; border-bottom: 1px solid var(--line); position: relative; }
.net-topo-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px 0; }
.net-topo-tools   { display: flex; align-items: center; gap: 8px; }
.net-btn { background: rgba(129,157,205,.08); border: 1px solid var(--line); color: var(--ink-2); font: 500 12px var(--font-body); padding: 4px 10px; border-radius: 2px; cursor: pointer; }
.net-btn:hover { background: rgba(129,157,205,.14); border-color: var(--line2); color: var(--ink-1); }
.net-btn:disabled { opacity: .5; cursor: not-allowed; }
.net-btn-sm { all: unset; cursor: pointer; color: var(--ink-3); padding: 2px 6px; font-size: 14px; }
.net-btn-sm:hover { color: var(--ink-1); }
.net-scan-status { font-size: 12px; color: var(--ink-3); }
.net-topo-wrap { position: relative; height: 380px; padding: 8px; overflow: hidden; }
.net-topo-svg  { width: 100%; height: 100%; background: rgba(0,0,0,.12); border-radius: 2px; }
.topo-empty-txt { fill: var(--ink-3); font-size: 14px; }
.net-topo-legend { position: absolute; bottom: 14px; left: 20px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-3); pointer-events: none; }
.nl-item::before { content: "●"; margin-right: 3px; color: var(--ink-3); }
.nl-item.nl-router::before { color: var(--bronze, #9b7356); }
.nl-item.nl-pc::before    { color: #5b8fd4; }
.nl-item.nl-phone::before { color: #9b7ec4; }
.nl-item.nl-iot::before   { color: #4aa87e; }
.nl-item.nl-ts::before    { color: #3b82f6; }
.nl-sep { color: var(--line2); }
.nl-online  { color: var(--ok); } .nl-online::before { content: ""; }
.nl-offline { color: var(--err); } .nl-offline::before { content: ""; }
.nl-unknown { color: var(--ink-3); } .nl-unknown::before { content: ""; }

/* D3 node styles (SVG, so class-based) */
.topo-link      { stroke: var(--line2); stroke-width: 1; stroke-opacity: .6; }
.topo-lan       { stroke: rgba(100,130,180,.5); }
.topo-tailscale { stroke: rgba(59,130,246,.5); stroke-dasharray: 5,3; }
.topo-offline   { stroke: rgba(180,60,60,.3); stroke-dasharray: 2,4; }
.topo-arrow     { fill: var(--line2); }
.topo-circle    { fill: rgba(23,34,58,.92); stroke-width: 1.5; }
.dt-router circle, .topo-node.dt-router .topo-circle { fill: rgba(50,36,20,.95); stroke: var(--bronze,#9b7356); stroke-width: 2.5; }
.topo-node.dt-ap     .topo-circle { fill: rgba(30,42,60,.95); stroke: #5b8fd4; }
.topo-node.dt-pc     .topo-circle { fill: rgba(30,42,60,.95); stroke: #5b8fd4; }
.topo-node.dt-mac    .topo-circle { fill: rgba(30,42,60,.95); stroke: #aab8d0; }
.topo-node.dt-phone  .topo-circle { fill: rgba(35,30,50,.95); stroke: #9b7ec4; }
.topo-node.dt-tv     .topo-circle { fill: rgba(25,35,55,.95); stroke: #7ec4b8; }
.topo-node.dt-speaker .topo-circle{ fill: rgba(30,38,50,.95); stroke: #c47e4a; }
.topo-node.dt-nas    .topo-circle { fill: rgba(30,42,60,.95); stroke: #aab8d0; }
.topo-node.dt-iot    .topo-circle { fill: rgba(20,42,32,.95); stroke: #4aa87e; }
.topo-circle.dt-console { fill: rgba(32,24,58,.95); stroke: #8d7cff; }
.topo-node.tst-online  .topo-circle { stroke-opacity: 1; }
.topo-node.tst-offline .topo-circle { stroke-opacity: .4; }
.topo-node.tst-unknown .topo-circle { stroke-opacity: .6; stroke-dasharray: 3,2; }
.topo-label { fill: var(--ink-2); font: 400 11.5px var(--font-body); pointer-events: none; text-anchor: middle; }
.topo-node:hover .topo-circle { stroke-width: 2.5; }
.dt-router .topo-label { font-weight: 600; fill: var(--ink-1); }

/* Device table */
.net-devices-section { flex: 1; padding: 14px 0 0; }
.net-dev-toolbar { display: flex; align-items: center; gap: 12px; padding: 0 14px 10px; flex-wrap: wrap; }
.net-dev-filters { display: flex; gap: 8px; }
.net-search { background: rgba(129,157,205,.07); border: 1px solid var(--line); color: var(--ink-1); font: 400 13px var(--font-body); padding: 5px 10px; border-radius: 2px; width: 180px; }
.net-search:focus { outline: none; border-color: var(--bronze,#9b7356); }
.net-sel { background: rgba(129,157,205,.07); border: 1px solid var(--line); color: var(--ink-2); font: 400 12.5px var(--font-body); padding: 4px 8px; border-radius: 2px; }
.net-dev-count { margin-left: auto; font-size: 12px; color: var(--ink-3); }
.net-dev-table-wrap { overflow-x: auto; }
.net-dev-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.net-dev-table th { font: 600 11.5px var(--font-display); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding: 6px 10px; border-bottom: 1px solid var(--line2); text-align: left; white-space: nowrap; }
.nd-row td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.nd-row:hover { background: rgba(129,157,205,.04); cursor: pointer; }
.nd-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }
.nd-st-on  .nd-dot { background: var(--ok); }
.nd-st-off .nd-dot { background: var(--err); }
.nd-st-on  .nd-name { color: var(--ink-1); }
.nd-st-off  { opacity: .65; }
.nd-name small { margin-left: 8px; }
.nd-lat { color: var(--ink-3); font-size: 11.5px; }
.nd-mac  { color: var(--ink-3); font-size: 12px; font-family: var(--font-mono, monospace); }
.nd-ts-ip { font-size: 12px; color: #3b82f6; font-family: var(--font-mono, monospace); }
.nd-type-badge { font-size: 11.5px; padding: 1px 6px; border-radius: 2px; border: 1px solid var(--line); color: var(--ink-3); }
.dt-router .nd-type-badge { border-color: rgba(155,115,86,.5); color: var(--bronze,#9b7356); }
.dt-pc     .nd-type-badge, .dt-mac .nd-type-badge { border-color: rgba(91,143,212,.4); color: #5b8fd4; }
.dt-console.nd-type-badge { border-color: rgba(141,124,255,.5); color: #a99cff; }

/* Drawer */
.net-drawer { position: fixed; top: 0; right: -400px; width: 380px; height: 100vh; background: var(--styx-2,#10182a); border-left: 1px solid var(--line2); z-index: 200; transition: right .22s ease; overflow-y: auto; }
.net-drawer.open { right: 0; }
.net-drawer-inner { padding: 20px 18px; }
.net-drawer-close { background: none; border: none; color: var(--ink-3); font-size: 18px; cursor: pointer; float: right; padding: 4px 8px; }
.net-drawer-close:hover { color: var(--ink-1); }
.drawer-title { font: 700 16px var(--font-display); color: var(--ink-1); margin: 0 0 14px; }
.drawer-dl { display: grid; grid-template-columns: 11ch 1fr; gap: 6px 12px; margin: 0 0 18px; }
.drawer-dl dt { color: var(--ink-3); font-size: 12.5px; }
.drawer-dl dd { color: var(--ink-2); font-size: 13px; margin: 0; word-break: break-all; }
.drawer-name-form { border-top: 1px solid var(--line); padding-top: 12px; }
.drawer-label { font: 600 11.5px var(--font-display); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); display: block; margin-bottom: 8px; }
.drawer-name-row { display: flex; gap: 8px; }

/* Badge */
.badge { background: var(--err); color: #fff; font: 700 11.5px var(--font-display); padding: 1px 7px; border-radius: 10px; min-width: 20px; text-align: center; }

@media (max-width: 1050px) {
  .net-layout { grid-template-columns: 1fr; }
  .net-aside { border-right: none; border-bottom: 1px solid var(--line); max-height: 280px; }
  .net-topo-section { flex: 0 0 320px; }
  .net-topo-wrap { height: 300px; }
  .nd-mac, .nd-vendor, .nd-ts { display: none; }
}
