
body { margin: 0; font-family: var(--font-sans); font-size: 14px; line-height: 21px; background: var(--surface); color: var(--fg); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }

/* ---------- Materials: Neumorphism 2.0 ----------
   Everything is moulded from the graphite under one light, straight overhead:
   highlights on top edges, shadows falling straight down. Five levels: depth-inset,
   flat, depth-1 (controls), depth-2 (cards), depth-3 (menus), depth-4 (sheets).
   A crisp hairline means edges never rely on shadow alone. Tables and dense
   data stay flat. Text and state always carry full contrast. */

.nx-sky {
  color: var(--fg);
  background-color: var(--surface);
  background-image:
    radial-gradient(120% 70% at 50% -10%, rgba(255, 248, 240, 0.035) 0%, rgba(0, 0, 0, 0) 60%),
    radial-gradient(120% 55% at 50% 110%, var(--horizon) 0%, rgba(0, 0, 0, 0) 62%);
}
[data-theme="light"] .nx-sky, .nx-sky[data-theme="light"] {
  background-image:
    radial-gradient(120% 70% at 50% -10%, #ffffff 0%, rgba(255, 255, 255, 0) 60%),
    radial-gradient(80% 50% at 50% 110%, var(--horizon) 0%, rgba(0, 0, 0, 0) 70%);
}

/* Grain: a fine tooth on the material so gradients never band. */
.nx-grain { position: relative; isolation: isolate; }
.nx-grain::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0; border-radius: inherit;
  opacity: 0.06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.nx-grain > * { position: relative; z-index: 1; }

/* Raised: a card moulded out of the surface. (nx-glass is kept as the class name.) */
.nx-glass, .nx-raised {
  position: relative;
  background-color: var(--surface);
  background-image: linear-gradient(180deg, rgba(255, 248, 240, 0.035) 0%, rgba(0, 0, 0, 0.06) 100%);
  border-radius: var(--radius-lg);
  box-shadow: var(--depth-2);
}
[data-theme="light"] .nx-glass, [data-theme="light"] .nx-raised { background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0%, rgba(0, 0, 0, 0.015) 100%); }
.nx-glass-strong { background-color: var(--surface); }
.nx-float { box-shadow: var(--depth-2), var(--depth-4); }
/* Pressed in: a well carved into the surface. */
.nx-inset { background-color: var(--surface-1); border-radius: var(--radius-md); box-shadow: var(--depth-inset); }
.nx-warm { background-image: radial-gradient(90% 80% at 50% -10%, var(--attention-glow) 0%, rgba(0, 0, 0, 0) 60%), linear-gradient(180deg, rgba(255, 248, 240, 0.035) 0%, rgba(0, 0, 0, 0.06) 100%); }
.nx-recede { color: var(--fg-muted); }

.nx-stage { display: flex; flex-wrap: wrap; gap: var(--space-6); align-items: center; padding: var(--space-8); }
.nx-stack { display: flex; flex-direction: column; gap: var(--space-6); padding: var(--space-8); max-width: 580px; }
.nx-caption { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--fg-muted); }

/* ---------- Button ---------- */
.nx-btn { position: relative; font: inherit; font-weight: 600; letter-spacing: -0.005em; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); border-radius: 9px; border: 0; cursor: pointer; white-space: nowrap; transition: box-shadow var(--duration-quick) var(--ease-standard), background-color var(--duration-quick) var(--ease-standard), color var(--duration-quick) var(--ease-standard), transform 400ms var(--spring-snappy); }
.nx-btn-md { height: 46px; padding: 0 20px; font-size: 14px; }
.nx-btn-sm { height: 36px; padding: 0 14px; font-size: 13px; border-radius: 8px; }
/* Press: the key sinks into the surface and gives a little (scale 0.98) in 100ms;
   release settles back on the snappy spring. Hover lifts 1px, pointers only. */
@media (hover: hover) {
  .nx-btn:not(.nx-btn-ghost):not(:disabled):hover { transform: translateY(-1px); box-shadow: var(--depth-1-lift); }
}
.nx-btn:not(:disabled):active { box-shadow: var(--depth-inset); transform: translateY(0) scale(0.98); transition-duration: var(--duration-fast); transition-timing-function: var(--ease-standard); }
/* Cobalt: Noetic's action. */
.nx-btn-primary, .nx-btn-approve { color: var(--on-action); background-color: var(--action); background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 55%, rgba(0, 0, 0, 0.08) 100%); box-shadow: var(--depth-1); }
.nx-btn-primary:hover, .nx-btn-approve:hover { background-color: var(--action-hover); }
/* Semantic actions: fixed meanings, never brand. */
.nx-btn-positive { color: var(--on-positive); background-color: var(--positive-fill); background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 55%); box-shadow: var(--depth-1); }
.nx-btn-warning { color: var(--on-warning); background-color: var(--warning-fill); background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0) 55%); box-shadow: var(--depth-1); }
.nx-btn-critical { color: var(--on-critical); background-color: var(--critical-fill); background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 55%); box-shadow: var(--depth-1); }
/* Neutral: a raised key of the same material. */
.nx-btn-secondary { color: var(--fg); background-color: var(--surface); background-image: linear-gradient(180deg, rgba(255, 248, 240, 0.04) 0%, rgba(0, 0, 0, 0.06) 100%); box-shadow: var(--depth-1); }
[data-theme="light"] .nx-btn-secondary { background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(0, 0, 0, 0.02) 100%); }
.nx-btn-secondary:hover { color: var(--fg); background-color: var(--surface-1); }
.nx-btn-ghost { color: var(--fg-muted); background: transparent; padding-left: 6px; padding-right: 6px; }
.nx-btn-ghost:hover { color: var(--fg); }
.nx-btn-ghost:active { box-shadow: none; }
.nx-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.nx-btn:focus-visible, .nx-input:focus-visible, .nx-seg-opt:focus-visible { outline: 2px solid var(--action); outline-offset: 3px; }

/* ---------- Field ---------- */
.nx-field { display: flex; flex-direction: column; gap: var(--space-2); max-width: 360px; }
/* Inputs carry a line-strong hairline (3:1) under the inset: a field must be findable without its shadow. */
.nx-input { font: inherit; height: 46px; padding: 0 var(--space-4); border-radius: 9px; border: 0; background: var(--surface-1); color: var(--fg); box-shadow: var(--depth-inset), inset 0 0 0 1px var(--line-strong); transition: box-shadow var(--duration-quick) var(--ease-standard); }
.nx-input:hover { box-shadow: var(--depth-inset), inset 0 0 0 1px var(--fg-subtle); }
.nx-input::placeholder { color: var(--fg-subtle); }
.nx-field-note { font-size: 13px; line-height: 19px; color: var(--fg-subtle); }
.nx-field-error .nx-input, .nx-field-error .nx-input:hover { box-shadow: var(--depth-inset), inset 0 0 0 1.5px var(--critical); }
.nx-field-error .nx-field-note { color: var(--critical); }

/* ---------- Segmented: a carved track with one raised key ---------- */
.nx-seg { display: flex; padding: 4px; gap: 4px; border-radius: 10px; background: var(--surface-1); box-shadow: var(--depth-inset); }
.nx-seg-opt { flex: 1 1 auto; font: inherit; font-size: 13px; font-weight: 500; white-space: nowrap; height: 32px; padding: 0 10px; border: 0; border-radius: 7px; background: transparent; color: var(--fg-muted); cursor: pointer; transition: background-color var(--duration-quick) var(--ease-standard), box-shadow var(--duration-quick) var(--ease-standard), color var(--duration-quick) var(--ease-standard); }
.nx-seg-opt:hover { color: var(--fg); }
.nx-seg-opt:active { box-shadow: var(--depth-inset); transition-duration: var(--duration-fast); }
.nx-seg-on { color: var(--fg); font-weight: 600; background-color: var(--surface); background-image: linear-gradient(180deg, rgba(255, 248, 240, 0.05) 0%, rgba(0, 0, 0, 0.05) 100%); box-shadow: var(--depth-1); }

/* ---------- Status and Pill ---------- */
.nx-status { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; line-height: 19px; font-weight: 500; color: var(--fg-muted); white-space: nowrap; }
.nx-dot { width: 7px; height: 7px; border-radius: var(--radius-full); background: var(--fg-subtle); flex: none; }
.nx-tone-positive { color: var(--positive); } .nx-tone-positive .nx-dot { background: var(--positive); }
.nx-tone-warning { color: var(--warning); } .nx-tone-warning .nx-dot { background: var(--warning); }
.nx-tone-critical { color: var(--critical); } .nx-tone-critical .nx-dot { background: var(--critical); }
.nx-tone-progress { color: var(--fg); } .nx-tone-progress .nx-dot { background: var(--fg); }
.nx-tone-attention { color: var(--attention); } .nx-tone-attention .nx-dot { background: var(--attention); }
/* Working: the dot breathes (opacity only, about 0.55 Hz) for as long as the work runs. */
.nx-pulse .nx-dot { animation: nx-breathe var(--breathe) ease-in-out infinite; }
@keyframes nx-breathe { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.nx-pill { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 11px 0 9px; border-radius: var(--radius-full); font-size: 12px; line-height: 16px; font-weight: 600; white-space: nowrap; color: var(--fg-muted); background-color: var(--surface); box-shadow: var(--depth-1); }
.nx-pill .nx-dot { width: 6px; height: 6px; }

/* ---------- Agent: a voice made visible ----------
   One luminous line closed into a ring. Its resting shape is the agent's
   signature (three harmonics from its name), so personas differ by shape, not
   colour. It breathes through its harmonics while the agent works or thinks and
   moves with the voice when it listens or speaks. sm and md sit on a small
   raised disc with initials, for lists and headers. lg and xl have no disc: just
   light on the sky, with echo lines and a soft core while speaking. */
.nx-agent { position: relative; display: inline-flex; flex: none; align-items: center; justify-content: center; border-radius: var(--radius-full); font-weight: 600; letter-spacing: 0.02em; color: var(--fg-muted); background-color: var(--surface); background-image: linear-gradient(180deg, rgba(255, 248, 240, 0.05) 0%, rgba(0, 0, 0, 0.06) 100%); box-shadow: var(--depth-1); transition: color var(--duration-quick) var(--ease-standard); }
.nx-agent-sm { width: 30px; height: 30px; font-size: 9px; }
.nx-agent-md { width: 42px; height: 42px; font-size: 11px; }
.nx-agent-lg, .nx-agent-xl { background: none; box-shadow: none; }
.nx-agent-lg { width: 168px; height: 168px; }
.nx-agent-xl { width: 240px; height: 240px; }
.nx-agent-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.nx-agent-svg path { vector-effect: non-scaling-stroke; fill: none; stroke-linejoin: round; transition: stroke var(--duration-moderate) var(--ease-standard), opacity var(--duration-moderate) var(--ease-standard); }
.nx-agent-mark { position: relative; }
.nx-agent-form { stroke: var(--ink-8); stroke-width: 1.25px; }
.nx-agent-echo { stroke: var(--ink-8); stroke-width: 1px; }
.nx-agent-lg .nx-agent-form, .nx-agent-xl .nx-agent-form { stroke-width: 1.75px; }
/* States */
.nx-agent-working, .nx-agent-thinking, .nx-agent-speaking, .nx-agent-listening { color: var(--fg); }
.nx-agent-working .nx-agent-form { stroke: var(--ink-11); }
.nx-agent-listening .nx-agent-form, .nx-agent-listening .nx-agent-echo { stroke: var(--fg); }
.nx-agent-thinking .nx-agent-form, .nx-agent-thinking .nx-agent-echo { stroke: var(--cobalt-11); }
.nx-agent-speaking .nx-agent-form, .nx-agent-speaking .nx-agent-echo { stroke: var(--cobalt-11); }
.nx-agent-waiting { color: var(--attention); }
.nx-agent-waiting .nx-agent-form { stroke: var(--attention); }
.nx-agent-lg.nx-agent-speaking .nx-agent-form, .nx-agent-xl.nx-agent-speaking .nx-agent-form { filter: drop-shadow(0 0 4px var(--attention-glow)) drop-shadow(0 0 12px var(--attention-glow)); }
[data-theme="light"] .nx-agent-speaking .nx-agent-form, [data-theme="light"] .nx-agent-speaking .nx-agent-echo, [data-theme="light"] .nx-agent-thinking .nx-agent-form, [data-theme="light"] .nx-agent-thinking .nx-agent-echo { stroke: var(--cobalt-9); }
/* The core: a cobalt gradient at the centre of lg and xl, always present,
   brightest while speaking. */
.nx-agent-lg::before, .nx-agent-xl::before { content: ''; position: absolute; inset: 22%; border-radius: var(--radius-full); background: radial-gradient(circle at 50% 45%, var(--cobalt-10) 0%, var(--cobalt-8) 22%, var(--cobalt-5) 48%, rgba(0, 0, 0, 0) 72%); opacity: 0.35; transition: opacity var(--duration-moderate) var(--ease-standard); }
[data-theme="light"] .nx-agent-lg::before, [data-theme="light"] .nx-agent-xl::before { background: radial-gradient(circle at 50% 45%, var(--cobalt-9) 0%, var(--cobalt-7) 26%, var(--cobalt-3) 52%, rgba(255, 255, 255, 0) 72%); }
.nx-agent-working::before, .nx-agent-listening::before { opacity: 0.55; }
.nx-agent-waiting::before { opacity: 0.6; }
.nx-agent-thinking::before { opacity: 0.75; }
.nx-agent-speaking::before { opacity: 1; box-shadow: 0 0 40px 6px var(--attention-glow); }
/* Texture: a fine grain over the lens, like coated glass, so the light never
   looks like a flat gradient. */
.nx-agent-lg::after, .nx-agent-xl::after { content: ''; position: absolute; inset: 7%; border-radius: var(--radius-full); pointer-events: none; opacity: 0.18; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
/* The lens: a glass rim lit from above (bright top, falling away below), an
   inner hairline for thickness, one specular glint at the top left, and fine
   Fresnel rings inside for texture. All hold still. */
[data-theme="light"] .nx-agent-lg::after, [data-theme="light"] .nx-agent-xl::after { opacity: 0.1; mix-blend-mode: multiply; }
/* HUD rings: a broken hairline with one bright segment (inner), and a run of
   fine dots with a short arc (outer). They turn slowly in opposite directions
   while the agent is active and hold still at rest. */
.nx-agent-hud { transform-box: view-box; transform-origin: 50px 50px; }
.nx-agent-hair { stroke: var(--ink-7); stroke-width: 1px; }
.nx-agent-bright { stroke: var(--ink-11); stroke-width: 2.5px; stroke-linecap: round; }
.nx-agent-dots { stroke: var(--ink-8); stroke-width: 1.5px; stroke-linecap: round; stroke-dasharray: 0 6; }
.nx-agent-working .nx-agent-hair, .nx-agent-listening .nx-agent-hair { stroke: var(--ink-8); }
.nx-agent-thinking .nx-agent-bright, .nx-agent-speaking .nx-agent-bright, .nx-agent-waiting .nx-agent-bright { stroke: var(--cobalt-11); }
.nx-agent-thinking .nx-agent-hair, .nx-agent-speaking .nx-agent-hair { stroke: var(--cobalt-7); }
.nx-agent-thinking .nx-agent-dots, .nx-agent-speaking .nx-agent-dots { stroke: var(--cobalt-10); }
.nx-agent-waiting .nx-agent-hair { stroke: var(--cobalt-7); }
[data-theme="light"] .nx-agent-hair { stroke: var(--ink-7); }
[data-theme="light"] .nx-agent-thinking .nx-agent-bright, [data-theme="light"] .nx-agent-speaking .nx-agent-bright, [data-theme="light"] .nx-agent-waiting .nx-agent-bright, [data-theme="light"] .nx-agent-thinking .nx-agent-dots, [data-theme="light"] .nx-agent-speaking .nx-agent-dots, [data-theme="light"] .nx-agent-thinking .nx-agent-arc, [data-theme="light"] .nx-agent-speaking .nx-agent-arc { stroke: var(--cobalt-9); }
.nx-agent-working .nx-agent-hud-inner, .nx-agent-listening .nx-agent-hud-inner { animation: nx-turn 40s linear infinite; }
.nx-agent-working .nx-agent-hud-outer, .nx-agent-listening .nx-agent-hud-outer { animation: nx-turn 64s linear infinite reverse; }
.nx-agent-thinking .nx-agent-hud-inner, .nx-agent-speaking .nx-agent-hud-inner { animation: nx-turn 16s linear infinite; }
.nx-agent-thinking .nx-agent-hud-outer, .nx-agent-speaking .nx-agent-hud-outer { animation: nx-turn 28s linear infinite reverse; }
@keyframes nx-turn { to { transform: rotate(360deg); } }

/* ---------- Day Line: the day carved into the surface ---------- */
.nx-dayline { display: flex; flex-direction: column; gap: 10px; width: 100%; min-width: 280px; }
.nx-dl-head { display: flex; justify-content: space-between; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--fg-muted); }
.nx-dl-track { position: relative; height: 16px; border-radius: var(--radius-full); box-shadow: var(--depth-inset); }
.nx-dl-track::before { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 2px 2px 4px rgba(0, 0, 0, 0.45); pointer-events: none; }
.nx-dl-past { position: absolute; left: 0; top: 0; bottom: 0; border-radius: var(--radius-full) 0 0 var(--radius-full); background: rgba(14, 11, 9, 0.55); }
.nx-dl-now { position: absolute; top: -6px; bottom: -6px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--action); box-shadow: 0 0 10px 1px var(--attention-glow); }
.nx-dl-nowlabel { position: absolute; bottom: calc(100% + 5px); left: 50%; transform: translateX(-50%); padding: 2px 7px; border-radius: 7px; font-size: 11px; line-height: 15px; font-weight: 600; color: var(--on-action); background: var(--action); box-shadow: var(--depth-1); }
.nx-dl-events { position: relative; }
.nx-dl-event { position: absolute; height: 24px; box-sizing: border-box; padding: 0 9px; display: flex; align-items: center; gap: 6px; overflow: hidden; font-size: 11px; line-height: 14px; font-weight: 600; white-space: nowrap; border-radius: var(--radius-full); color: var(--fg-muted); background-color: var(--surface); box-shadow: var(--depth-1); }
.nx-dl-pip { width: 6px; height: 6px; flex: none; border-radius: var(--radius-full); background: var(--fg-subtle); }
.nx-dl-agent { color: var(--fg); } .nx-dl-agent .nx-dl-pip { background: var(--ink-11); }
.nx-dl-window { color: var(--positive); } .nx-dl-window .nx-dl-pip { background: var(--positive); }
.nx-dl-you { color: var(--attention); } .nx-dl-you .nx-dl-pip { background: var(--attention); }
.nx-dl-risk { color: var(--critical); } .nx-dl-risk .nx-dl-pip { background: var(--critical); }
.nx-dl-event-label { overflow: hidden; text-overflow: ellipsis; }
.nx-dl-marks { position: relative; height: 4px; margin-top: -3px; }
.nx-dl-mark { position: absolute; top: 0; height: 4px; border-radius: 2px; background: var(--fg-subtle); }
.nx-dl-mark.nx-dl-agent { background: var(--ink-11); }
.nx-dl-mark.nx-dl-window { background: var(--positive); }
.nx-dl-mark.nx-dl-you { background: var(--attention); }
.nx-dl-mark.nx-dl-risk { background: var(--critical); }
.nx-dl-hours { display: flex; justify-content: space-between; font-size: 11px; line-height: 14px; color: var(--fg-subtle); }

/* ---------- Metric ---------- */
.nx-metric { display: flex; flex-direction: column; gap: 6px; min-width: 160px; }
.nx-metric-body { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-4); }
.nx-metric-row { display: flex; align-items: baseline; gap: 4px; }
.nx-metric-value { font-size: 24px; line-height: 27px; font-weight: 600; letter-spacing: -0.03em; color: var(--fg); }
.nx-metric-xl .nx-metric-value { font-size: 56px; line-height: 51px; letter-spacing: -0.05em; }
.nx-metric-unit { font-size: 14px; font-weight: 500; color: var(--fg-subtle); }
.nx-metric-xl .nx-metric-unit { font-size: 18px; letter-spacing: -0.02em; }
.nx-metric-delta { font-size: 13px; font-weight: 500; color: var(--fg-muted); }
.nx-spark { display: block; overflow: visible; }
.nx-spark-stop-top { stop-color: var(--action); stop-opacity: 0.28; }
.nx-spark-stop-bottom { stop-color: var(--action); stop-opacity: 0; }
.nx-spark-line { fill: none; stroke: var(--action); stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; }
.nx-spark-halo { fill: var(--attention-glow); }
.nx-spark-now { fill: var(--action); }
.nx-spark-quiet .nx-spark-stop-top { stop-color: var(--fg-muted); stop-opacity: 0.16; }
.nx-spark-quiet .nx-spark-stop-bottom { stop-color: var(--fg-muted); stop-opacity: 0; }
.nx-spark-quiet .nx-spark-line { stroke: var(--fg-muted); stroke-width: 1.5; }
.nx-spark-quiet .nx-spark-halo { fill: transparent; }
.nx-spark-quiet .nx-spark-now { fill: var(--fg); }
.nx-spark-critical .nx-spark-stop-top { stop-color: var(--critical); stop-opacity: 0.22; }
.nx-spark-critical .nx-spark-stop-bottom { stop-color: var(--critical); stop-opacity: 0; }
.nx-spark-critical .nx-spark-line { stroke: var(--critical); stroke-width: 1.5; }
.nx-spark-critical .nx-spark-halo { fill: transparent; }
.nx-spark-critical .nx-spark-now { fill: var(--critical); }

/* ---------- Gauge: a soft dial ---------- */
.nx-gauge { position: relative; margin: 0; flex: none; border-radius: var(--radius-full); background-color: var(--surface-1); box-shadow: var(--depth-inset); }
.nx-gauge svg { position: absolute; inset: 0; }
.nx-gauge-track { fill: none; stroke: var(--ink-4); stroke-linecap: round; }
/* The arc draws in once on arrival, then tweens in place when the value changes. */
.nx-gauge-arc { fill: none; stroke: var(--action); stroke-linecap: round; filter: drop-shadow(0 0 6px var(--attention-glow)); transition: stroke-dasharray var(--duration-moderate) var(--ease-standard), stroke var(--duration-quick) var(--ease-standard); animation: nx-gauge-draw var(--duration-slower) var(--ease-enter) both; }
@keyframes nx-gauge-draw { from { stroke-dasharray: 0 2000; } }
.nx-gauge-critical .nx-gauge-arc { stroke: var(--critical-fill); filter: drop-shadow(0 0 6px rgba(241, 68, 69, 0.35)); }
.nx-gauge-positive .nx-gauge-arc { stroke: var(--positive-fill); filter: none; }
.nx-gauge-warning .nx-gauge-arc { stroke: var(--warning-fill); filter: none; }
.nx-gauge-mark { stroke: var(--fg); stroke-width: 2; stroke-linecap: round; }
.nx-gauge-face { position: absolute; border-radius: var(--radius-full); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; background-color: var(--surface); background-image: linear-gradient(180deg, rgba(255, 248, 240, 0.05) 0%, rgba(0, 0, 0, 0.08) 100%); box-shadow: var(--depth-2); }
[data-theme="light"] .nx-gauge-face { background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(0, 0, 0, 0.02) 100%); }
.nx-gauge-value { display: flex; align-items: baseline; gap: 2px; font-size: 30px; line-height: 30px; font-weight: 600; letter-spacing: -0.045em; color: var(--fg); }
.nx-gauge-value small { font-size: 14px; font-weight: 500; letter-spacing: 0; color: var(--fg-subtle); }
.nx-gauge-label { font-size: 11px; line-height: 14px; font-weight: 500; color: var(--fg-muted); text-align: center; max-width: 80%; }

/* ---------- TrendChart ---------- */
.nx-trend { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.nx-trend-plot { position: relative; margin-right: 6px; }
/* The line reveals left to right on arrival (the reading travels through time);
   the now point and its label land after it. */
.nx-trend-plot svg { display: block; overflow: visible; animation: nx-reveal var(--duration-slower) var(--ease-enter) both; }
.nx-trend-now, .nx-trend-nowlabel { animation: nx-fade var(--duration-quick) var(--ease-enter) 320ms both; }
@keyframes nx-reveal { from { clip-path: inset(-20px 100% -20px 0); } to { clip-path: inset(-20px -20px -20px 0); } }
@keyframes nx-fade { from { opacity: 0; } }
.nx-trend-grid { stroke: var(--edge); stroke-width: 1; }
.nx-trend-threshold { stroke: var(--fg-subtle); stroke-width: 1; stroke-dasharray: 3 4; }
.nx-trend-line { fill: none; stroke: var(--action); stroke-width: 2.25; stroke-linecap: round; }
.nx-trend-stop-top { stop-color: var(--action); stop-opacity: 0.26; }
.nx-trend-stop-bottom { stop-color: var(--action); stop-opacity: 0; }
.nx-trend-critical .nx-trend-line { stroke: var(--critical); }
.nx-trend-critical .nx-trend-stop-top { stop-color: var(--critical); stop-opacity: 0.2; }
.nx-trend-critical .nx-trend-stop-bottom { stop-color: var(--critical); }
.nx-trend-now { position: absolute; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: var(--radius-full); background: var(--fg); box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--edge-strong); }
.nx-trend-nowlabel { position: absolute; right: 14px; transform: translateY(-140%); padding: 3px 8px; border-radius: 8px; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--fg); background: var(--surface); box-shadow: var(--depth-1); white-space: nowrap; }
.nx-trend-thlabel { position: absolute; left: 0; transform: translateY(-120%); font-size: 11px; line-height: 14px; color: var(--fg-subtle); }
.nx-trend-axis { display: flex; justify-content: space-between; font-size: 11px; line-height: 14px; color: var(--fg-subtle); }

/* ---------- RowChart: capsules in a carved well ---------- */
.nx-rows { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.nx-rows-plot { position: relative; height: 104px; display: flex; align-items: flex-end; gap: 3px; padding: 10px 10px 0; border-radius: 10px; background: var(--surface-1); box-shadow: var(--depth-inset); }
.nx-rows-bar { flex: 1 1 0; min-width: 0; border-radius: 4px 4px 1px 1px; background: linear-gradient(180deg, var(--ink-9), var(--ink-7)); opacity: 0.55; transform-origin: bottom; transition: height var(--duration-moderate) var(--ease-standard); animation: nx-grow var(--duration-slow) var(--ease-enter) both; }
@keyframes nx-grow { from { transform: scaleY(0); } }
.nx-rows-on { background: linear-gradient(180deg, var(--critical), var(--critical-fill)); opacity: 1; }
.nx-rows-threshold { position: absolute; left: 10px; right: 10px; height: 0; border-top: 1px dashed var(--fg-muted); z-index: 1; }
.nx-rows-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12px; line-height: 16px; color: var(--fg-muted); }
.nx-rows-legend span { display: inline-flex; align-items: center; gap: 6px; }
.nx-rows-key-on { width: 8px; height: 8px; border-radius: 2px; background: var(--critical); }
.nx-rows-key-line { width: 14px; height: 0; border-top: 1px dashed var(--fg-muted); }
.nx-rows-axis { position: relative; height: 14px; margin: 0 10px; font-size: 11px; line-height: 14px; color: var(--fg-subtle); }
.nx-rows-axis span { position: absolute; transform: translateX(-50%); }

/* ---------- Table ---------- */
.nx-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; line-height: 19px; }
.nx-table th { text-align: left; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--fg-subtle); padding: 0 14px 12px; white-space: nowrap; }
.nx-table th.num, .nx-table td.num { text-align: right; }
.nx-table td { padding: 12px 14px; color: var(--fg-muted); white-space: nowrap; vertical-align: middle; border-top: 1px solid var(--edge); }
.nx-table tr:first-child td { border-top: 0; }
.nx-table td.lead { color: var(--fg); font-weight: 600; }
.nx-table td.lead small { display: block; font-size: 12px; line-height: 16px; font-weight: 400; color: var(--fg-subtle); }
.nx-table td.num { color: var(--fg); font-weight: 500; letter-spacing: -0.01em; }
.nx-table td.num.low { color: var(--critical); }
.nx-table tbody tr.sel td { background: var(--surface-1); }
.nx-table tbody tr.sel td:first-child { border-radius: 9px 0 0 9px; box-shadow: inset 3px 0 0 var(--action); }
.nx-table tbody tr.sel td:last-child { border-radius: 0 9px 9px 0; }
.nx-table tbody tr.sel td, .nx-table tbody tr.sel + tr td { border-top-color: transparent; }
.nx-table tbody td { transition: background-color var(--duration-quick) var(--ease-standard); }
@media (hover: hover) { .nx-table tbody tr:not(.sel):hover td { background: var(--surface-1); } }
/* Dense data stays flat: pills in a table lose their depth and keep a hairline. */
.nx-table .nx-pill { box-shadow: inset 0 0 0 1px var(--edge-strong); background-color: transparent; }

/* ---------- Approval: a ticket ----------
   No glow. The proposal sits above a perforation (two pressed notches and a
   dotted tear line); the stub below holds exactly what will run, flat and
   tabular, and the decision. Cobalt appears only in the flag and the button. */
.nx-approval { position: relative; display: flex; flex-direction: column; border-radius: var(--radius-lg); max-width: 560px;
  background-color: var(--surface);
  background-image: linear-gradient(180deg, rgba(255, 248, 240, 0.045) 0%, rgba(255, 248, 240, 0.015) 40%, rgba(0, 0, 0, 0.05) 100%);
  box-shadow: var(--depth-2); }
[data-theme="light"] .nx-approval { background-color: var(--surface-1); background-image: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0.6) 50%, rgba(0, 0, 0, 0.012) 100%); }
.nx-ap-top { display: flex; flex-direction: column; gap: 14px; padding: 20px 22px 20px; }
.nx-ap-head { display: flex; align-items: center; gap: 10px; }
.nx-ap-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nx-ap-agent { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--fg); }
.nx-ap-via { font-weight: 400; color: var(--fg-subtle); }
.nx-ap-context { font-size: 12px; line-height: 16px; color: var(--fg-subtle); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nx-ap-flag { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 22px; padding: 0 9px 0 8px; border-radius: var(--radius-full); font-size: 11px; line-height: 14px; font-weight: 600; color: var(--attention); box-shadow: inset 0 0 0 1px var(--cobalt-6); }
.nx-ap-flag .nx-dot { width: 6px; height: 6px; background: var(--attention); }
.nx-ap-main { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.nx-ap-title { margin: 0; font-size: 16px; line-height: 21px; font-weight: 600; letter-spacing: -0.015em; color: var(--fg); text-wrap: balance; }
.nx-ap-value { flex: none; display: flex; flex-direction: column; align-items: flex-end; }
.nx-ap-value-label { font-size: 11px; line-height: 14px; color: var(--fg-subtle); }
.nx-ap-figure { font-size: 20px; line-height: 21px; font-weight: 600; letter-spacing: -0.035em; color: var(--fg); font-variant-numeric: tabular-nums; }
.nx-ap-body { font-size: 13px; line-height: 20px; color: var(--fg-muted); max-width: 60ch; }
.nx-ap-sources { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.nx-ap-sources-label { font-size: 11px; line-height: 14px; color: var(--fg-subtle); margin-right: 2px; }
.nx-ap-source { font-size: 11px; line-height: 14px; font-weight: 500; color: var(--fg-muted); padding: 4px 8px; border-radius: 7px; box-shadow: inset 0 0 0 1px var(--edge-strong); }
/* The perforation: a dotted tear line between two notches pressed into the card. */
.nx-ap-perf { position: relative; height: 0; margin: 0 22px; border-top: 1.5px dotted var(--edge-strong); }
.nx-ap-perf::before, .nx-ap-perf::after { content: ''; position: absolute; top: -9px; width: 18px; height: 18px; border-radius: var(--radius-full); background: var(--surface-1); box-shadow: var(--depth-inset); }
.nx-ap-perf::before { left: -31px; }
.nx-ap-perf::after { right: -31px; }
.nx-ap-stub { display: flex; flex-direction: column; gap: 16px; padding: 18px 22px 20px; border-radius: 0 0 var(--radius-lg) var(--radius-lg); background: rgba(0, 0, 0, 0.1); }
[data-theme="light"] .nx-ap-stub { background: rgba(60, 45, 30, 0.03); }
.nx-ap-receipt { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
.nx-ap-row { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.nx-ap-row + .nx-ap-row { padding-left: 14px; box-shadow: inset 1px 0 0 var(--edge); }
.nx-ap-row dt { font-size: 11px; line-height: 14px; color: var(--fg-subtle); }
.nx-ap-row dd { margin: 0; font-size: 14px; line-height: 19px; font-weight: 600; letter-spacing: -0.01em; color: var(--fg); font-variant-numeric: tabular-nums; }
.nx-ap-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.nx-ap-actions { display: flex; align-items: center; gap: 8px; }
.nx-ap-note { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; line-height: 16px; color: var(--fg-subtle); }
/* Compact: calls and phones. */
.nx-approval-compact .nx-ap-top { gap: 10px; padding: 16px 18px; }
.nx-approval-compact .nx-ap-title { font-size: 14px; line-height: 18px; }
.nx-approval-compact .nx-ap-figure { font-size: 18px; line-height: 21px; }
.nx-approval-compact .nx-ap-perf { margin: 0 18px; }
.nx-approval-compact .nx-ap-perf::before { left: -27px; }
.nx-approval-compact .nx-ap-perf::after { right: -27px; }
.nx-approval-compact .nx-ap-stub { gap: 12px; padding: 14px 18px 16px; }
.nx-approval-compact .nx-ap-row dd { font-size: 13px; line-height: 18px; }
.nx-approval-compact .nx-ap-receipt { grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); }

/* Stakes, queue and phones */
.nx-ap-reference { font-size: 12px; line-height: 16px; color: var(--fg-subtle); text-align: right; }
.nx-ap-notes { display: flex; flex-direction: column; gap: 4px; }
.nx-ap-next { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 22px 14px; border-top: 1px solid var(--edge); font-size: 13px; line-height: 18px; color: var(--fg-subtle); }
.nx-ap-next b { font-weight: 600; color: var(--fg-muted); }
.nx-approval-high .nx-ap-figure { color: var(--fg); }
/* Compact (phones and calls): the decision is the easiest tap on the screen.
   Full-width 52px approve, decline on its own line, labels at 13px or more. */
.nx-approval-compact .nx-ap-foot { flex-direction: column; align-items: stretch; gap: 8px; }
.nx-approval-compact .nx-ap-actions { flex-direction: column; align-items: stretch; gap: 2px; }
.nx-approval-compact .nx-ap-actions .nx-btn { width: 100%; }
.nx-approval-compact .nx-ap-actions .nx-btn-approve { height: 52px; font-size: 14px; border-radius: 12px; }
.nx-approval-compact .nx-ap-actions .nx-btn-ghost { height: 44px; }
.nx-approval-compact .nx-ap-notes { align-items: center; }
.nx-approval-compact .nx-ap-row dt, .nx-approval-compact .nx-ap-context, .nx-approval-compact .nx-ap-note, .nx-approval-compact .nx-ap-next { font-size: 13px; line-height: 18px; }
.nx-approval-compact .nx-ap-next { padding: 10px 18px 12px; }

/* ---------- Insight ---------- */
.nx-insight { display: flex; flex-wrap: wrap; gap: var(--space-6); padding: 20px; border-radius: var(--radius-lg); max-width: 640px; background-color: var(--surface); background-image: linear-gradient(180deg, rgba(255, 248, 240, 0.035) 0%, rgba(0, 0, 0, 0.06) 100%); box-shadow: var(--depth-2); }
.nx-insight-main { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.nx-insight-from { display: flex; align-items: center; gap: 8px; }
.nx-insight-title { margin: 0; font-size: 15px; line-height: 20px; font-weight: 600; color: var(--fg); text-wrap: balance; }
.nx-insight-body { font-size: 13px; line-height: 20px; color: var(--fg-muted); }
.nx-insight-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 4px; }
.nx-insight-value { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.nx-insight-figure { font-size: 24px; line-height: 27px; font-weight: 600; letter-spacing: -0.03em; color: var(--fg); }
.nx-insight-valuelabel { font-size: 12px; line-height: 16px; color: var(--fg-muted); }

/* ---------- AgentTask ---------- */
.nx-task { display: flex; align-items: center; gap: 12px; padding: 12px 0; box-shadow: inset 0 -1px 0 var(--edge); }
.nx-task:last-child { box-shadow: none; }
.nx-task-main { flex: 1; min-width: 0; }
.nx-task-title { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nx-task-meta { font-size: 12px; line-height: 17px; color: var(--fg-subtle); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nx-list { padding: 4px 18px; }

/* ---------- Message ---------- */
.nx-msg { display: flex; gap: 10px; }
.nx-msg-user { flex-direction: column; align-items: flex-end; gap: 4px; }
.nx-msg-bubble { max-width: 80%; padding: 11px 15px; border-radius: 12px 12px 4px 12px; color: var(--fg); background-color: var(--surface); background-image: linear-gradient(180deg, rgba(255, 248, 240, 0.04) 0%, rgba(0, 0, 0, 0.06) 100%); box-shadow: var(--depth-1); }
.nx-msg-main { min-width: 0; flex: 1; padding-top: 4px; }
.nx-msg-head { display: flex; align-items: baseline; gap: 8px; }
.nx-msg-name { font-size: 13px; font-weight: 600; color: var(--fg); }
.nx-msg-time { font-size: 11px; line-height: 15px; color: var(--fg-subtle); }
.nx-msg-text { color: var(--fg); }
.nx-msg-text p { margin: 0 0 6px; }

/* ---------- Surfaces, edges and state ----------
   Raise only what you act on. Approvals and decision cards are the raised
   objects (depth-2: a dark cut line, a 1px top highlight, a tight drop); the
   budget is one per phone screen and two or three per desktop view. Everything
   else sits flat on the sky, grouped by type and space.
   Light and state are separate. Edges are neutral. Colour never sits on a
   border except one: the approval's cobalt beam, a 1px line along the top,
   inset from the corners, which sweeps in once on arrival. State lives in the
   content: a leading tick, a dot, the coloured figure and the word. */
.nx-glass, .nx-raised, .nx-insight { position: relative; }
.nx-edge-attention { --state: var(--cobalt-10); }
.nx-edge-critical { --state: var(--critical-fill); }
.nx-edge-warning { --state: var(--warning-fill); }
.nx-edge-positive { --state: var(--positive-fill); }
[data-theme="light"] .nx-edge-attention { --state: var(--cobalt-9); }
.nx-approval::before { content: ''; position: absolute; top: 0; left: 20px; right: 20px; height: 1px; pointer-events: none; z-index: 2;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0), var(--cobalt-10) 28%, var(--cobalt-11) 50%, var(--cobalt-10) 72%, rgba(0, 0, 0, 0));
  animation: nx-beam var(--duration-slower) var(--ease-enter) 160ms both; }
[data-theme="light"] .nx-approval::before { background: linear-gradient(90deg, rgba(255, 255, 255, 0), var(--cobalt-9) 30%, var(--cobalt-9) 70%, rgba(255, 255, 255, 0)); }
.nx-approval.nx-quiet::before { opacity: 0; }
@keyframes nx-beam { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
/* A raised card with a state carries it as a faint wash from the top left, never a border. */
.nx-raised[class*="nx-edge-"], .nx-glass[class*="nx-edge-"], .nx-disclosure-card[class*="nx-edge-"] { background-image: radial-gradient(120% 90% at 0% 0%, color-mix(in oklab, var(--state) 10%, transparent) 0%, rgba(0, 0, 0, 0) 55%), linear-gradient(180deg, rgba(255, 248, 240, 0.035) 0%, rgba(0, 0, 0, 0.06) 100%); }

/* ---------- Sections and stat strips: type and space, not boxes ---------- */
.nx-section { display: flex; flex-direction: column; gap: var(--gap-item); }
.nx-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.nx-section-title { margin: 0; font-size: 15px; line-height: 19px; font-weight: 600; letter-spacing: -0.01em; color: var(--fg); }
.nx-section-meta { font-size: 13px; line-height: 18px; color: var(--fg-subtle); }
.nx-stats { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.nx-stat { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 2px 20px; }
.nx-stat:first-child { padding-left: 0; }
.nx-stat + .nx-stat { box-shadow: inset 1px 0 0 var(--edge); }
.nx-stat-label { font-size: 13px; line-height: 17px; color: var(--fg-muted); }
.nx-stat-value { font-size: 20px; line-height: 23px; font-weight: 600; letter-spacing: -0.03em; color: var(--fg); font-variant-numeric: tabular-nums; }
.nx-stat-value small { font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--fg-subtle); }
.nx-stat-delta { font-size: 13px; line-height: 17px; color: var(--fg-subtle); }

/* ---------- Disclosure and Accordion ----------
   Flat rows are the default: hairlines between rows, no background, no shadow.
   A state shows as a short leading tick plus the coloured figure and word.
   The raised card (nx-disclosure-card) is the exception, for something you act on.
   Never nested. */
.nx-disclosure { position: relative; border-top: 1px solid var(--edge); }
.nx-disclosure:last-child { border-bottom: 1px solid var(--edge); }
.nx-disclosure-card { border: 0; border-radius: var(--radius-lg); background-color: var(--surface); background-image: linear-gradient(180deg, rgba(255, 248, 240, 0.035) 0%, rgba(0, 0, 0, 0.06) 100%); box-shadow: var(--depth-2); }
.nx-disclosure-card:last-child { border-bottom: 0; }
[data-theme="light"] .nx-disclosure-card { background-color: var(--surface-1); background-image: none; }
.nx-disclosure-head { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 4px; cursor: pointer; list-style: none; border-radius: 6px; }
.nx-disclosure-card > .nx-disclosure-head { padding: 0 16px 0 18px; border-radius: inherit; }
.nx-disclosure[class*="nx-edge-"] > .nx-disclosure-head::before { content: ''; flex: none; width: 3px; height: 18px; margin-right: -2px; border-radius: 2px; background: var(--state); }
.nx-disclosure-head::-webkit-details-marker { display: none; }
.nx-disclosure-head:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
@media (hover: hover) { .nx-disclosure:not(.nx-disclosure-card) > .nx-disclosure-head { transition: background-color var(--duration-quick) var(--ease-standard); } .nx-disclosure:not(.nx-disclosure-card) > .nx-disclosure-head:hover { background-color: rgba(255, 255, 255, 0.025); } [data-theme="light"] .nx-disclosure:not(.nx-disclosure-card) > .nx-disclosure-head:hover { background-color: rgba(30, 27, 24, 0.03); } }
.nx-disclosure-icon { display: inline-flex; flex: none; }
.nx-disclosure-titles { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.nx-disclosure-title { font-size: 14px; line-height: 19px; font-weight: 600; color: var(--fg); }
.nx-disclosure-summary { font-size: 13px; line-height: 18px; color: var(--fg-subtle); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nx-disclosure-meta { flex: none; font-size: 14px; line-height: 19px; font-weight: 600; color: var(--fg); font-variant-numeric: tabular-nums; text-align: right; }
.nx-disclosure-meta small { display: block; font-size: 11px; line-height: 14px; font-weight: 500; color: var(--fg-subtle); }
.nx-chevron { flex: none; color: var(--fg-subtle); transition: transform var(--duration-moderate) var(--ease-standard), color var(--duration-quick) var(--ease-standard); }
details[open] > summary .nx-chevron { transform: rotate(180deg); color: var(--fg); }
@media (hover: hover) { .nx-disclosure-head:hover .nx-chevron, .nx-ap-why > summary:hover .nx-chevron { color: var(--fg); } }
.nx-disclosure-body { padding: 2px 4px 18px 17px; }
.nx-disclosure-card > .nx-disclosure-body { padding: 4px 18px 18px; }
.nx-accordion { display: flex; flex-direction: column; }
.nx-accordion:has(> .nx-disclosure-card) { gap: 10px; }
/* Opening animates height where the browser supports it; elsewhere it is instant. */
@supports (interpolate-size: allow-keywords) {
  .nx-disclosure, .nx-ap-why { interpolate-size: allow-keywords; }
  .nx-disclosure::details-content, .nx-ap-why::details-content { height: 0; overflow: clip; opacity: 0; transition: height var(--duration-moderate) var(--ease-standard), opacity var(--duration-moderate) var(--ease-standard), content-visibility var(--duration-moderate) allow-discrete; }
  .nx-disclosure[open]::details-content, .nx-ap-why[open]::details-content { height: auto; opacity: 1; }
}

/* Approval: the "Why" disclosure */
.nx-ap-why > summary { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--fg-muted); border-radius: 6px; }
.nx-ap-why > summary::-webkit-details-marker { display: none; }
.nx-ap-why > summary:focus-visible { outline: 2px solid var(--action); outline-offset: 3px; }
.nx-ap-why-meta { font-weight: 400; color: var(--fg-subtle); }
.nx-ap-why-body { display: flex; flex-direction: column; gap: 12px; padding-top: 10px; }

/* ---------- Keys ---------- */
.nx-kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 5px; font: 500 11px/1 var(--font-sans); color: var(--fg-muted); background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 0 0 1px var(--edge-strong), inset 0 -1px 0 rgba(0, 0, 0, 0.25); }
[data-theme="light"] .nx-kbd { background: rgba(30, 27, 24, 0.03); box-shadow: inset 0 0 0 1px var(--edge-strong), inset 0 -1px 0 rgba(30, 27, 24, 0.08); }
.nx-btn .nx-kbd { margin-left: 4px; min-width: 16px; height: 16px; font-size: 10px; color: inherit; opacity: 0.7; background: rgba(255, 255, 255, 0.12); box-shadow: none; }

/* ---------- ListDetail: a still list, detail in a side panel ---------- */
.nx-ld { position: relative; }
.nx-ld-list { display: flex; flex-direction: column; }
.nx-ld-row { position: relative; display: flex; align-items: center; gap: 16px; width: 100%; min-height: 56px; padding: 8px 12px 8px 14px; box-sizing: border-box; border: 0; border-top: 1px solid var(--edge); background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background-color var(--duration-quick) var(--ease-standard); }
.nx-ld-row:last-child { border-bottom: 1px solid var(--edge); }
.nx-ld-row[class*="nx-edge-"]::before { content: ''; position: absolute; left: 0; top: 50%; width: 3px; height: 18px; margin-top: -9px; border-radius: 2px; background: var(--state); }
@media (hover: hover) { .nx-ld-row:hover { background: rgba(255, 255, 255, 0.025); } [data-theme="light"] .nx-ld-row:hover { background: rgba(30, 27, 24, 0.025); } }
.nx-ld-sel { background: rgba(255, 255, 255, 0.045); }
[data-theme="light"] .nx-ld-sel { background: rgba(30, 27, 24, 0.045); }
.nx-ld-row:focus-visible { outline: 2px solid var(--action); outline-offset: -2px; }
.nx-ld-titles { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.nx-ld-title { font-size: 14px; line-height: 19px; font-weight: 600; color: var(--fg); }
.nx-ld-sub { font-weight: 400; color: var(--fg-subtle); }
.nx-ld-summary { font-size: 13px; line-height: 18px; color: var(--fg-subtle); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nx-ld-meta { flex: none; min-width: 84px; text-align: right; font-size: 14px; line-height: 19px; font-weight: 600; color: var(--fg); font-variant-numeric: tabular-nums; }
.nx-ld-meta small { display: block; font-size: 11px; line-height: 14px; font-weight: 500; color: var(--fg-subtle); }
.nx-ld-go { flex: none; color: var(--fg-subtle); opacity: 0; transition: opacity var(--duration-quick) var(--ease-standard), color var(--duration-quick) var(--ease-standard); }
.nx-ld-sel .nx-ld-go { opacity: 1; color: var(--attention); }
@media (hover: hover) { .nx-ld-row:hover .nx-ld-go { opacity: 1; } }
.nx-ld-hint { display: flex; align-items: center; gap: 4px; padding: 10px 2px 0; font-size: 12px; line-height: 16px; color: var(--fg-subtle); }
.nx-ld-hint-gap { display: inline-block; width: 12px; }

/* The side panel: depth-3, slides in from the right without moving the list. */
.nx-panel { position: fixed; top: 16px; right: 16px; bottom: 16px; width: min(440px, calc(100vw - 32px)); z-index: 40; display: flex; flex-direction: column; border-radius: var(--radius-lg); background: var(--surface-1); box-shadow: var(--depth-3), inset 0 1px 0 rgba(255, 255, 255, 0.06); transform: translateX(calc(100% + 32px)); visibility: hidden; transition: transform calc(var(--duration-slow) * 0.75) var(--ease-exit), visibility 0s linear var(--duration-slow); }
.nx-panel-open { transform: translateX(0); visibility: visible; transition: transform var(--duration-slow) var(--ease-enter), visibility 0s; }
[data-theme="light"] .nx-panel { background: #ffffff; }
.nx-panel-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 20px 16px; border-bottom: 1px solid var(--edge); }
.nx-panel-titles { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.nx-panel-title { font-size: 16px; line-height: 21px; font-weight: 600; letter-spacing: -0.02em; color: var(--fg); }
.nx-panel-sub { font-size: 13px; line-height: 18px; color: var(--fg-subtle); }
.nx-panel-close { flex: none; border: 0; padding: 4px; background: none; cursor: pointer; border-radius: 6px; }
.nx-panel-close:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
.nx-panel-body { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 22px; padding: 20px; }
.nx-panel-figure { font-size: 28px; line-height: 31px; font-weight: 600; letter-spacing: -0.04em; color: var(--fg); font-variant-numeric: tabular-nums; }
.nx-panel-figure small { font-size: 14px; font-weight: 500; letter-spacing: 0; color: var(--fg-subtle); }
.nx-panel-note { margin: 0; font-size: 13px; line-height: 20px; color: var(--fg-muted); }
.nx-panel-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--edge); }
.nx-panel-agent { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; line-height: 18px; color: var(--fg-muted); }

/* ---------- CommandBar ---------- */
.nx-cmdk-trigger { display: flex; align-items: center; gap: 8px; width: 100%; height: 36px; padding: 0 8px 0 10px; box-sizing: border-box; border: 0; border-radius: 8px; font: 500 13px/1 var(--font-sans); color: var(--fg-subtle); background: rgba(255, 255, 255, 0.03); box-shadow: inset 0 0 0 1px var(--edge); cursor: pointer; transition: color var(--duration-quick) var(--ease-standard), box-shadow var(--duration-quick) var(--ease-standard); }
.nx-cmdk-trigger span { flex: 1; text-align: left; }
.nx-cmdk-trigger:hover { color: var(--fg-muted); box-shadow: inset 0 0 0 1px var(--edge-strong); }
.nx-cmdk-trigger:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
.nx-cmdk-scrim { position: fixed; inset: 0; z-index: 60; display: flex; justify-content: center; align-items: flex-start; padding-top: 14vh; background: rgba(10, 8, 6, 0.45); animation: nx-fade var(--duration-quick) var(--ease-enter) both; }
[data-theme="light"] .nx-cmdk-scrim { background: rgba(30, 27, 24, 0.18); }
.nx-cmdk { width: min(600px, calc(100vw - 32px)); max-height: 60vh; display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius-lg); background: var(--surface-1); box-shadow: var(--depth-4); animation: nx-enter var(--duration-moderate) var(--ease-enter) both; }
[data-theme="light"] .nx-cmdk { background: #ffffff; }
.nx-cmdk-field { display: flex; align-items: center; gap: 10px; padding: 0 18px; height: 56px; border-bottom: 1px solid var(--edge); color: var(--fg-subtle); }
.nx-cmdk-input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--fg); font: 400 17px/1 var(--font-sans); }
.nx-cmdk-input::placeholder { color: var(--fg-subtle); }
.nx-cmdk-list { flex: 1; min-height: 0; overflow: auto; padding: 6px; }
.nx-cmdk-group { padding: 10px 12px 4px; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--fg-subtle); }
.nx-cmdk-item { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 12px; border-radius: 8px; font-size: 13px; line-height: 19px; color: var(--fg-muted); cursor: pointer; }
.nx-cmdk-act { background: rgba(255, 255, 255, 0.06); color: var(--fg); }
[data-theme="light"] .nx-cmdk-act { background: rgba(30, 27, 24, 0.05); }
.nx-cmdk-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nx-cmdk-meta { font-size: 13px; color: var(--fg-subtle); font-variant-numeric: tabular-nums; }
.nx-cmdk-keys { display: inline-flex; gap: 4px; }
.nx-cmdk-foot { display: flex; align-items: center; gap: 4px; padding: 10px 16px; border-top: 1px solid var(--edge); font-size: 12px; line-height: 16px; color: var(--fg-subtle); }

/* ---------- Approval: armed and done ---------- */
.nx-btn-armed { background-color: var(--action-hover); box-shadow: var(--depth-1), 0 0 0 3px var(--attention-glow); }
.nx-ap-confirm { color: var(--fg-muted); }
.nx-ap-done { display: flex; align-items: center; gap: 12px; min-height: 46px; color: var(--positive); animation: nx-fade var(--duration-moderate) var(--ease-enter) both; }
.nx-ap-done-text { flex: 1; display: flex; flex-direction: column; gap: 1px; font-size: 13px; line-height: 18px; color: var(--fg-subtle); }
.nx-ap-done-text b { font-size: 14px; line-height: 19px; font-weight: 600; color: var(--fg); }
.nx-approval-done::before { opacity: 0; transition: opacity var(--duration-moderate) var(--ease-standard); }

/* ---------- Motion ----------
   Enter: fade up 6px, decelerating. Lists stagger 35ms per item, capped at six.
   Set --i on each item (0, 1, 2...) to stagger. Exit runs at 75% of enter. */
.nx-enter { animation: nx-enter var(--duration-slow) var(--ease-enter) both; animation-delay: calc(min(var(--i, 0), 5) * var(--stagger)); }
.nx-exit { animation: nx-exit calc(var(--duration-slow) * 0.75) var(--ease-exit) both; }
@keyframes nx-enter { from { opacity: 0; transform: translateY(6px); } }
@keyframes nx-exit { to { opacity: 0; transform: translateY(4px); } }
/* A live value that changed: one quick flash in place. Nothing moves. */
.nx-tick { animation: nx-tick var(--duration-quick) var(--ease-standard); }
@keyframes nx-tick { from { opacity: 0.35; } }

/* Reduced motion: movement becomes a 100ms cross-fade, draws and reveals are
   skipped, loops stop and the static ring and word carry the state. Colour
   and opacity changes stay, because they are not motion. */
@media (prefers-reduced-motion: reduce) {
  .nx-pulse .nx-dot { animation: none; opacity: 0.5; }
  .nx-agent-hud { animation: none !important; }
  .nx-btn, .nx-btn:not(:disabled):active { transition-property: box-shadow, background-color, color; }
  .nx-btn:not(.nx-btn-ghost):not(:disabled):hover, .nx-btn:not(:disabled):active { transform: none; }
  .nx-enter { animation: nx-fade var(--duration-fast) linear both; animation-delay: 0ms; }
  .nx-exit { animation: none; opacity: 0; }
  .nx-gauge-arc, .nx-trend-plot svg, .nx-trend-now, .nx-trend-nowlabel, .nx-rows-bar { animation: none; transition: none; }
  .nx-disclosure::details-content, .nx-ap-why::details-content, .nx-chevron { transition: none !important; }
  .nx-approval::before { animation: none; }
  .nx-panel, .nx-panel-open { transition: visibility 0s; }
  .nx-cmdk, .nx-cmdk-scrim, .nx-ap-done { animation: none; }
}

/* ---------- Ambient ----------
   Fabric: soft cloth under the overhead light, drawn by one shader. Folds
   catch a sheen and fall into shade; motion is cobalt light moving through
   the cloth and spreading as ripples, never lines or dots. Fades in over
   700ms; waiting settles the cloth and holds the agent's glow. */
.nx-amb, .nx-grain > .nx-amb { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity var(--duration-dim) var(--ease-standard); }
.nx-amb-on { opacity: 1; }
.nx-amb-art { position: absolute; inset: 0; -webkit-mask-image: var(--amb-mask, radial-gradient(75% 80% at 50% 50%, #000 35%, transparent 80%)); mask-image: var(--amb-mask, radial-gradient(75% 80% at 50% 50%, #000 35%, transparent 80%)); }
.nx-amb-canvas { display: block; width: 100%; height: 100%; }
.nx-amb-control { position: absolute; right: 16px; bottom: 16px; z-index: 2; pointer-events: auto; display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px 0 9px; border: 0; border-radius: 999px; font: inherit; font-size: 12px; font-weight: 500; color: var(--fg-subtle); background: transparent; box-shadow: inset 0 0 0 1px var(--edge); cursor: pointer; transition: color var(--duration-quick) var(--ease-standard), box-shadow var(--duration-quick) var(--ease-standard); }
.nx-amb-control:hover { color: var(--fg); box-shadow: inset 0 0 0 1px var(--edge-strong); }
.nx-amb-control:focus-visible { outline: 2px solid var(--action); outline-offset: 3px; }
.nx-amb-toggle { position: static; }

/* ---------- Icon ----------
   Sculpted glyphs: a solid form lit from overhead, with one detail cut in.
   The body is the light material (Night) or graphite (Day); the cut shows
   the shaded surface beneath, with a lit lower lip. Active puts cobalt light
   in the cut; status tones colour only the cut. */
.nx-icon { display: inline-block; flex: none; vertical-align: middle; overflow: visible;
  --ic-hi: #ffffff; --ic-mid: var(--ink-12); --ic-lo: var(--ink-9); --ic-cut-top: var(--ink-1); --ic-cut-bot: var(--ink-4);
  --ic-rim: rgba(255, 250, 244, 0.45); --ic-drop: rgba(0, 0, 0, 0.75); --ic-lip: rgba(255, 250, 244, 0.38); --ic-flat: var(--fg-muted); }
[data-theme="light"] .nx-icon { --ic-hi: var(--ink-8); --ic-mid: var(--ink-11); --ic-lo: var(--ink-12); --ic-cut-top: var(--ink-6); --ic-cut-bot: var(--ink-1);
  --ic-rim: rgba(255, 255, 255, 0.95); --ic-drop: rgba(30, 27, 24, 0.35); --ic-lip: rgba(255, 255, 255, 0.8); --ic-flat: var(--ink-11); }
.nx-icon-muted { --ic-hi: var(--ink-11); --ic-mid: var(--ink-10); --ic-lo: var(--ink-8); --ic-rim: rgba(255, 250, 244, 0.28); --ic-flat: var(--fg-subtle); }
[data-theme="light"] .nx-icon-muted { --ic-hi: var(--ink-7); --ic-mid: var(--ink-8); --ic-lo: var(--ink-10); }
/* A plate: a raised key of the surface material holding the icon. Active sinks it. */
/* Inside text and controls, a flat icon takes the text colour. */
.nx-icon.nx-icon-inherit { --ic-flat: currentColor; }
.nx-icon-plate { display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 30%; background-color: var(--surface); background-image: linear-gradient(180deg, rgba(255, 248, 240, 0.05) 0%, rgba(0, 0, 0, 0.08) 100%); box-shadow: var(--depth-1); }
[data-theme="light"] .nx-icon-plate { background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.85) 0%, rgba(0, 0, 0, 0.02) 100%); }
.nx-icon-plate-on { box-shadow: var(--depth-inset); background-image: none; background-color: var(--surface-1); }

/* ---------- Agent lens (lg, xl) ----------
   One piece of glass under a fixed light from the top left (after the
   research: Fresnel rim plus dark bevel, a window reflection not a dot,
   element rings offset toward the light, faint coating ghosts kept clear of
   the status hues, a recessed core and a breathing halo). Only the halo and
   core move; loudness changes glow, not geometry. */
.nx-agent-lg, .nx-agent-xl {
  --lens-halo: var(--cobalt-10); --lens-glass: rgba(6, 8, 13, 0.45);
  --lens-core-1: var(--cobalt-11); --lens-core-2: var(--cobalt-10); --lens-core-3: #1b2f63;
  --lens-vig: #000; --lens-vig-a: 0.45; --lens-rim-a: 0.6; --lens-spec: 0.32; --lens-bevel: rgba(5, 7, 11, 0.65);
  --lens-el: #9fb4d8; --lens-ghost-a: #5fd6a8; --lens-ghost-b: #c77dff; --lens-ghost: 1; }
[data-theme="light"] .nx-agent-lg, [data-theme="light"] .nx-agent-xl {
  --lens-glass: rgba(255, 255, 255, 0.4); --lens-core-1: var(--cobalt-6); --lens-core-2: #4476d6; --lens-core-3: var(--cobalt-3);
  --lens-vig: #0b1a33; --lens-vig-a: 0.09; --lens-rim-a: 0.95; --lens-spec: 0.2; --lens-bevel: rgba(11, 26, 51, 0.12); --lens-el: #2d54af; --lens-ghost: 0.5; }
.nx-agent-lg::before, .nx-agent-xl::before { display: none; }
.nx-agent-lg::after, .nx-agent-xl::after { inset: 7%; opacity: 0.07; }
.nx-agent-svg .nx-lens path { vector-effect: none; }
.nx-lens-halo { opacity: 0.12; animation: nx-lens-breathe 7s ease-in-out infinite; }
.nx-agent-idle .nx-lens-halo { opacity: 0.06; animation: none; }
.nx-agent-speaking .nx-lens-halo { animation-name: nx-lens-breathe-hi; }
[data-theme="light"] .nx-lens-halo { animation: none; opacity: 0.06; }
@keyframes nx-lens-breathe { 0%, 100% { opacity: 0.1; } 50% { opacity: 0.14; } }
@keyframes nx-lens-breathe-hi { 0%, 100% { opacity: 0.18; } 50% { opacity: 0.24; } }
.nx-lens-glass { fill: var(--lens-glass); }
.nx-lens-core { opacity: 0.4; transition: opacity var(--duration-slower) var(--ease-standard); animation: nx-lens-drift 11s ease-in-out infinite; }
.nx-agent-working .nx-lens-core { opacity: 0.55; }
.nx-agent-listening .nx-lens-core, .nx-agent-waiting .nx-lens-core { opacity: 0.62; }
.nx-agent-thinking .nx-lens-core { opacity: 0.8; }
.nx-agent-speaking .nx-lens-core { opacity: calc(0.82 + 0.18 * var(--amp, 0.5)); }
@keyframes nx-lens-drift { 0%, 100% { transform: translate(0, 0); } 33% { transform: translate(-0.9px, -0.6px); } 66% { transform: translate(0.7px, 0.5px); } }
.nx-lens-el { fill: none; stroke: var(--lens-el); stroke-width: 0.45; }
.nx-lens-el-1 { stroke-opacity: 0.06; }
.nx-lens-el-2 { stroke-opacity: 0.09; }
.nx-lens-ghost-a, .nx-lens-ghost-b { fill: none; stroke-width: 1.2; stroke-linecap: round; mix-blend-mode: screen; }
.nx-lens-ghost-a { stroke: var(--lens-ghost-a); stroke-opacity: calc(0.08 * var(--lens-ghost)); }
.nx-lens-ghost-b { stroke: var(--lens-ghost-b); stroke-opacity: calc(0.06 * var(--lens-ghost)); }
.nx-lens-spec2 { fill: #fff; fill-opacity: calc(var(--lens-spec) * 0.35); }
.nx-lens-bevel { fill: none; stroke: var(--lens-bevel); stroke-width: 2.2; }
.nx-lens-bloom { fill: none; stroke-width: 1.8; opacity: 0.3; }
.nx-lens-rim { fill: none; stroke-width: 0.6; }
.nx-lens-back { fill: none; stroke: var(--cobalt-11); stroke-opacity: 0.25; stroke-width: 0.4; stroke-linecap: round; }
/* The voice ring at lg and xl: a sharp line with a soft bloom; loudness lifts both. */
.nx-agent-lg .nx-agent-form, .nx-agent-xl .nx-agent-form { stroke-width: 1.5px; opacity: calc(0.55 + 0.45 * var(--amp, 0)); }
.nx-agent-lg.nx-agent-speaking .nx-agent-form, .nx-agent-xl.nx-agent-speaking .nx-agent-form,
.nx-agent-lg.nx-agent-listening .nx-agent-form, .nx-agent-xl.nx-agent-listening .nx-agent-form,
.nx-agent-lg.nx-agent-thinking .nx-agent-form, .nx-agent-xl.nx-agent-thinking .nx-agent-form { filter: drop-shadow(0 0 1.5px var(--attention-glow)) drop-shadow(0 0 calc(3px + 7px * var(--amp, 0)) var(--attention-glow)); }
/* HUD outside the glass: neutral hairline, one bright segment, dots only while thinking. */
.nx-agent-lg .nx-agent-hair, .nx-agent-xl .nx-agent-hair { stroke: rgba(246, 243, 240, 0.18); stroke-width: 0.75px; }
[data-theme="light"] .nx-agent-lg .nx-agent-hair, [data-theme="light"] .nx-agent-xl .nx-agent-hair { stroke: rgba(30, 26, 22, 0.2); }
.nx-agent-lg .nx-agent-bright, .nx-agent-xl .nx-agent-bright { stroke-width: 2px; opacity: 0.7; }
.nx-agent-lg .nx-agent-dots, .nx-agent-xl .nx-agent-dots { opacity: 0; transition: opacity var(--duration-slower) var(--ease-standard); }
.nx-agent-lg.nx-agent-thinking .nx-agent-dots, .nx-agent-xl.nx-agent-thinking .nx-agent-dots { opacity: 0.35; }
.nx-agent-thinking .nx-agent-hud-inner { animation-duration: 8s; }
@media (prefers-reduced-motion: reduce) { .nx-lens-halo, .nx-lens-core { animation: none; } }

/* ---------- Finish ----------
   The quality layer. Four tones instead of one black:
   1 chrome (sidebars, tab bars) is darkest, so content reads as lit;
   2 sunken wells sit below the canvas;
   3 the canvas carries a faint atmosphere (a cool light leak top right);
   4 raised surfaces are a clear step lighter and lit from the top.
   Raised edges catch the light: a bright top line, faint sides, a dark cut
   below. Sections get a rule that fades out; rows, stats and the current
   nav item get finer detail. */
.nx-sky { background-image:
  radial-gradient(55% 45% at 88% -8%, rgba(68, 118, 214, 0.075) 0%, rgba(68, 118, 214, 0) 70%),
  radial-gradient(120% 70% at 50% -10%, rgba(255, 248, 240, 0.04) 0%, rgba(0, 0, 0, 0) 60%),
  radial-gradient(120% 55% at 50% 110%, var(--horizon) 0%, rgba(0, 0, 0, 0) 62%); }
[data-theme="light"] .nx-sky, .nx-sky[data-theme="light"] { background-image:
  radial-gradient(55% 45% at 88% -8%, rgba(68, 118, 214, 0.06) 0%, rgba(68, 118, 214, 0) 70%),
  radial-gradient(120% 70% at 50% -10%, #ffffff 0%, rgba(255, 255, 255, 0) 60%),
  radial-gradient(80% 50% at 50% 110%, var(--horizon) 0%, rgba(0, 0, 0, 0) 70%); }
/* Tone 4: raised. */
.nx-glass:not(.nx-warm), .nx-raised, .nx-approval, .nx-disclosure-card { background-color: var(--surface-raised); background-image: linear-gradient(180deg, rgba(255, 248, 240, 0.05) 0%, rgba(255, 248, 240, 0.012) 34%, rgba(0, 0, 0, 0.07) 100%); }
.nx-warm { background-color: var(--surface-raised); }
[data-theme="light"] .nx-glass:not(.nx-warm), [data-theme="light"] .nx-raised, [data-theme="light"] .nx-approval, [data-theme="light"] .nx-disclosure-card { background-color: var(--surface-raised); background-image: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0.7) 50%, rgba(30, 27, 24, 0.015) 100%); }
.nx-panel, .nx-cmdk { background-color: var(--surface-raised); background-image: linear-gradient(180deg, rgba(255, 248, 240, 0.045) 0%, rgba(255, 248, 240, 0) 120px); }
[data-theme="light"] .nx-panel, [data-theme="light"] .nx-cmdk { background-image: none; }
/* The approval's notches show the canvas through the card; its stub is a step down. */
.nx-ap-perf::before, .nx-ap-perf::after { background: var(--surface); }
.nx-ap-stub { background: linear-gradient(180deg, rgba(0, 0, 0, 0.16) 0%, rgba(0, 0, 0, 0.08) 100%); box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.2); }
[data-theme="light"] .nx-ap-stub { background: linear-gradient(180deg, rgba(30, 27, 24, 0.035) 0%, rgba(30, 27, 24, 0.015) 100%); box-shadow: none; }
/* Tone 2: sunken. */
.nx-inset { background-color: var(--surface-sunken); }
.nx-cmdk-trigger { background-color: var(--surface-sunken); box-shadow: var(--depth-inset); }
.nx-cmdk-trigger:hover { box-shadow: var(--depth-inset), inset 0 0 0 1px var(--edge-strong); }
/* Tone 1: chrome. A frame around the work, with a lit inner edge. */
.nx-chrome { background-color: var(--surface-chrome); background-image: linear-gradient(180deg, rgba(255, 248, 240, 0.02) 0%, rgba(0, 0, 0, 0) 40%); }
.nx-chrome-side { box-shadow: inset -1px 0 0 rgba(255, 250, 244, 0.05), 1px 0 0 rgba(0, 0, 0, 0.55); }
.nx-chrome-top { box-shadow: inset 0 -1px 0 rgba(255, 250, 244, 0.05), 0 1px 0 rgba(0, 0, 0, 0.5); }
.nx-chrome-bottom { box-shadow: inset 0 1px 0 rgba(255, 250, 244, 0.06), 0 -1px 0 rgba(0, 0, 0, 0.5); }
[data-theme="light"] .nx-chrome { background-image: none; }
[data-theme="light"] .nx-chrome-side { box-shadow: inset -1px 0 0 var(--edge); }
/* The current place in a nav: a small raised key of the surface. */
.nx-nav-on { background-color: var(--surface-raised); background-image: linear-gradient(180deg, rgba(255, 248, 240, 0.05) 0%, rgba(0, 0, 0, 0.04) 100%); box-shadow: inset 0 1px 0 var(--edge-lit), 0 0 0 1px rgba(0, 0, 0, 0.5), 0 2px 6px -2px rgba(0, 0, 0, 0.6); }
[data-theme="light"] .nx-nav-on { box-shadow: var(--depth-1); }
/* Sections: a rule under the head that is strongest at the start and fades out. */
.nx-section-head { position: relative; padding-bottom: 11px; }
.nx-section-head::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, var(--edge-strong) 0%, var(--edge) 45%, rgba(255, 255, 255, 0) 100%); }
[data-theme="light"] .nx-section-head::after { background: linear-gradient(90deg, var(--edge-strong) 0%, var(--edge) 45%, rgba(30, 27, 24, 0) 100%); }
.nx-section-title { font-size: 14px; line-height: 19px; letter-spacing: -0.012em; }
.nx-section-meta { font-size: 12px; line-height: 16px; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; }
.nx-section .nx-ld-row:first-child { border-top-color: transparent; border-image: none; }
/* Rows: hairlines that fade at both ends; selection gets a faint cool wash. */
.nx-ld-row { border-image: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, var(--edge) 6%, var(--edge) 94%, rgba(255, 255, 255, 0) 100%) 1; }
[data-theme="light"] .nx-ld-row { border-image: linear-gradient(90deg, rgba(30, 27, 24, 0) 0%, var(--edge) 6%, var(--edge) 94%, rgba(30, 27, 24, 0) 100%) 1; }
.nx-ld-sel { background: linear-gradient(90deg, rgba(68, 118, 214, 0.07) 0%, rgba(255, 250, 244, 0.035) 35%, rgba(255, 250, 244, 0.015) 100%); }
@media (hover: hover) { .nx-ld-row:not(.nx-ld-sel):hover { background: linear-gradient(90deg, rgba(255, 250, 244, 0.03) 0%, rgba(255, 250, 244, 0.012) 100%); } }
/* Stats: figures sit on a fine baseline; dividers fade top and bottom. */
.nx-stat + .nx-stat { box-shadow: none; background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, var(--edge-strong) 30%, var(--edge-strong) 70%, rgba(255, 255, 255, 0) 100%) left center / 1px 100% no-repeat; }
.nx-stat-label { font-size: 12px; line-height: 16px; letter-spacing: 0.01em; color: var(--fg-subtle); }
.nx-stat-value { font-size: 20px; line-height: 23px; letter-spacing: -0.035em; }
/* Type: numerals line up everywhere, headings are set tight. */
.nx-sky, .nx-panel, .nx-cmdk { font-variant-numeric: tabular-nums; text-rendering: optimizeLegibility; }
