/* =================================================================
 * themes/nexus-umbra/nexus-umbra.css
 * nexus-umbra — Generated Token CSS  (Step 2 of 6)
 *
 * ⚠  GENERATED FILE — DO NOT EDIT DIRECTLY
 * Source of truth: themes/nexus-umbra/DESIGN.md
 *
 * To regenerate:
 *   bun run src/lib/nexus/translate.ts \
 *     themes/nexus-umbra/DESIGN.md \
 *     themes/nexus-umbra/nexus-umbra.css
 *
 * Generated: 2026-10-08
 * Token count: 139
 * ================================================================= */

/* Theme is activated by setting data-theme="nexus-umbra" on <html>.
 * bootstrap.ts reads the user's stored preference from the OWUI users API
 * and sets this attribute at init. Components only read var(--nx-*) tokens.
 * Scoped to this theme's attribute only — :root belongs to the default. */
[data-theme="nexus-umbra"] {

  /* ── Breakpoints ──────────────────────────────────── */
  --nx-bp-2xl: 1440px;
  --nx-bp-lg: 1024px;
  --nx-bp-md: 768px;
  --nx-bp-sm: 640px;
  --nx-bp-xl: 1280px;
  --nx-bp-xs: 375px;

  /* ── Color: Surfaces ──────────────────────────────── */
  --nx-color-surface-1: #0c1d33;
  --nx-color-surface-2: #122540;
  --nx-color-surface-3: #0a1929;
  --nx-color-surface-bg: #07162a;
  --nx-color-surface-border: #243b55;
  --nx-color-surface-border-strong: #3a5474;
  --nx-color-surface-divider: #16283f;
  --nx-color-surface-navy: #122b47;
  --nx-color-surface-overlay: #010309;

  /* ── Color: Text ──────────────────────────────────── */
  --nx-color-text-inverse: #07162a;
  --nx-color-text-link: #f5c04a;
  --nx-color-text-link-hover: #ffd06b;
  --nx-color-text-muted: #8fa0b3;
  --nx-color-text-on-gold: #07162a;
  --nx-color-text-on-navy: #f7f4ef;
  --nx-color-text-primary: #f7f4ef;
  --nx-color-text-secondary: #c6cdd8;

  /* ── Color: Interactive / Amber Accent ────────────── */
  --nx-color-primary-active: #c07800;
  --nx-color-primary-base: #f0b429;
  --nx-color-primary-hover: #d4950a;
  --nx-color-primary-subtle: #2e2a12;

  /* ── Color: Semantic States ───────────────────────── */
  --nx-color-semantic-error: #e0526b;
  --nx-color-semantic-error-subtle: #331018;
  --nx-color-semantic-success: #5cb860;
  --nx-color-semantic-success-subtle: #10301b;
  --nx-color-semantic-warning: #e08a4e;
  --nx-color-semantic-warning-subtle: #33200f;

  /* ── Color: Action Lifecycle States ───────────────── */
  --nx-action-state-done: var(--nx-color-semantic-success);
  --nx-action-state-error: var(--nx-color-semantic-error);
  --nx-action-state-pending: var(--nx-color-text-muted);
  --nx-action-state-running: var(--nx-color-primary-base);

  /* ── Color: Action Type Grammar ───────────────────── */
  --nx-action-code: #3fbf9a;
  --nx-action-code-subtle: #0e2b23;
  --nx-action-code-text: var(--nx-color-text-primary);
  --nx-action-knowledge: #4cc08a;
  --nx-action-knowledge-subtle: #0e2e20;
  --nx-action-knowledge-text: var(--nx-color-text-primary);
  --nx-action-memory: #7f95e0;
  --nx-action-memory-subtle: #151d33;
  --nx-action-memory-text: var(--nx-color-text-primary);
  --nx-action-planning: #c878b0;
  --nx-action-planning-subtle: #2e1a28;
  --nx-action-planning-text: var(--nx-color-text-primary);
  --nx-action-rag: #a98fe8;
  --nx-action-rag-subtle: #1f1830;
  --nx-action-rag-text: var(--nx-color-text-primary);
  --nx-action-search: #4da3d9;
  --nx-action-search-subtle: #0e2536;
  --nx-action-search-text: var(--nx-color-text-primary);
  --nx-action-thinking: #d4b83e;
  --nx-action-thinking-subtle: #2e2910;
  --nx-action-thinking-text: var(--nx-color-text-primary);
  --nx-action-tool-call: #e08a7a;
  --nx-action-tool-call-subtle: #331b16;
  --nx-action-tool-call-text: var(--nx-color-text-primary);
  --nx-action-web-fetch: #45c0d4;
  --nx-action-web-fetch-subtle: #0e2b31;
  --nx-action-web-fetch-text: var(--nx-color-text-primary);

  /* ── Color: Field State ────────────────────────────── */
  --nx-field-arc-active: #6b9fd4;
  --nx-field-basin-guan: #3fa8bd;
  --nx-field-basin-wen: #d97580;
  --nx-field-basin-zhi: #b3a04a;
  --nx-field-bridge-closed: #6d7887;
  --nx-field-bridge-open: #f0b429;
  --nx-field-bridge-pulse: #ffc94d;
  --nx-field-coherence-emergency: #e0526b;
  --nx-field-coherence-full: #5cc968;
  --nx-field-coherence-high: #8cc24a;
  --nx-field-coherence-low: #e07a4a;
  --nx-field-coherence-mid: #e0a83e;

  /* ── Typography: UI Chrome ─────────────────────────── */
  --nx-type-ui-base: clamp(15px, calc(15px + 1 * ((100vw - 375px) / 1065)), 16px);
  --nx-type-ui-lg: clamp(18px, calc(18px + 1 * ((100vw - 375px) / 1065)), 19px);
  --nx-type-ui-sm: clamp(12px, calc(12px + 1 * ((100vw - 375px) / 1065)), 13px);
  --nx-type-ui-xl: clamp(22px, calc(22px + 2 * ((100vw - 375px) / 1065)), 24px);
  --nx-type-ui-xs: clamp(10px, calc(10px + 1 * ((100vw - 375px) / 1065)), 11px);

  /* ── Typography: Font Families ─────────────────────── */
  --nx-font-ui: 'Inter', system-ui, 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;

  /* ── Typography: Weights ───────────────────────────── */
  --nx-weight-medium: 500;
  --nx-weight-normal: 400;
  --nx-weight-semibold: 600;

  /* ── Typography: Line Heights ──────────────────────── */
  --nx-line-height-base: 1.6;
  --nx-line-height-tight: 1.2;

  /* ── Typography: Letter Spacing ────────────────────── */
  --nx-letter-spacing-base: 0;
  --nx-letter-spacing-tracked: 0.06em;

  /* ── Typography: Prose Rendering ───────────────────── */
  --nx-prose-blockquote-border: color-mix(in oklch, var(--nx-color-primary-base) 40%, transparent);
  --nx-prose-citation-color: var(--nx-color-text-muted);
  --nx-prose-citation-font: var(--nx-font-ui);
  --nx-prose-code-font-size: 0.875em;
  --nx-prose-font: 'Merriweather', 'Noto Serif TC', 'Songti TC', 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', 'Noto Sans SC', Georgia, serif;
  --nx-prose-font-mono: 'JetBrains Mono', 'Menlo', monospace;
  --nx-prose-h-font-weight: 700;
  --nx-prose-h-line-height: 1.3;
  --nx-prose-h1: clamp(23px, calc(23px + 1 * ((100vw - 375px) / 1065)), 24px);
  --nx-prose-h2: clamp(21px, calc(21px + 1 * ((100vw - 375px) / 1065)), 22px);
  --nx-prose-h3: clamp(19px, calc(19px + 1 * ((100vw - 375px) / 1065)), 20px);
  --nx-prose-h4: clamp(17px, calc(17px + 1 * ((100vw - 375px) / 1065)), 18px);
  --nx-prose-line-height: 1.75;
  --nx-prose-table-font-size: var(--nx-prose-text-base);
  --nx-prose-table-header-bg: var(--nx-color-surface-2);
  --nx-prose-table-header-font-size: var(--nx-type-ui-sm);
  --nx-prose-text-base: clamp(15px, calc(15px + 1 * ((100vw - 375px) / 1065)), 16px);
  --nx-prose-width: 70ch;

  /* ── Spacing ───────────────────────────────────────── */
  --nx-space-1: 4px;
  --nx-space-10: clamp(36px, calc(36px + 4 * ((100vw - 375px) / 1065)), 40px);
  --nx-space-12: clamp(44px, calc(44px + 4 * ((100vw - 375px) / 1065)), 48px);
  --nx-space-16: clamp(56px, calc(56px + 8 * ((100vw - 375px) / 1065)), 64px);
  --nx-space-2: 8px;
  --nx-space-3: 12px;
  --nx-space-4: 16px;
  --nx-space-6: clamp(20px, calc(20px + 4 * ((100vw - 375px) / 1065)), 24px);
  --nx-space-8: clamp(28px, calc(28px + 4 * ((100vw - 375px) / 1065)), 32px);

  /* ── Radius ────────────────────────────────────────── */
  --nx-radius-full: 9999px;
  --nx-radius-lg: 12px;
  --nx-radius-md: 8px;
  --nx-radius-sm: 4px;
  --nx-radius-xl: 16px;

  /* ── Shadows ───────────────────────────────────────── */
  --nx-shadow-inset: inset 0 1px 3px oklch(0.05 0.02 255 / 0.30);
  --nx-shadow-lg: 0 12px 32px oklch(0.05 0.02 255 / 0.55);
  --nx-shadow-md: 0 4px 12px oklch(0.05 0.02 255 / 0.45);
  --nx-shadow-sm: 0 1px 3px oklch(0.05 0.02 255 / 0.35);

  /* ── Motion: Duration ──────────────────────────────── */
  --nx-duration-base: 250ms;
  --nx-duration-fast: 150ms;
  --nx-duration-instant: 80ms;
  --nx-duration-slow: 400ms;

  /* ── Motion: Easing ────────────────────────────────── */
  --nx-easing-enter: cubic-bezier(0.0, 0.0, 0.2, 1);
  --nx-easing-exit: cubic-bezier(0.4, 0.0, 1, 1);
  --nx-easing-standard: cubic-bezier(0.16, 1, 0.3, 1);

  /* ── Component Geometry ────────────────────────────── */
  --nx-geometry-icon-lg: 20px;
  --nx-geometry-icon-md: 16px;
  --nx-geometry-icon-sm: 14px;
  --nx-geometry-input-height: 40px;
  --nx-geometry-pill-height: 28px;
  --nx-geometry-pill-height-sm: 22px;
  --nx-geometry-sidebar-width: 260px;
}


*, *::before, *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	/* #503 — without text-size-adjust:100%, phones font-boost wide
	   scrollable elements; code blocks render huge while desktop measures
	   correct. THE canonical fix — do not remove when a "font-size bug" is
	   reported; check for regressions first. Lives in the GENERATOR
	   (translate.ts) because the output is overwritten whole on
	   regeneration — direct edits to the copies were swept twice. */
	text-size-adjust: 100%;
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: 4rem;
}

body {
	min-height: 100dvh;
	line-height: var(--nx-line-height-base, 1.6);
	font-family: var(--nx-font-ui, 'Inter', system-ui, sans-serif);
	font-size: var(--nx-type-ui-base, 14px);
	color: var(--nx-color-text-primary, #07162a);
	background-color: var(--nx-color-surface-bg, #f8f3e9);
}

img, picture, video, canvas, svg {
	display: block;
	max-width: 100%;
	height: auto;
}

input, button, textarea, select {
	font: inherit;
	color: inherit;
}

h1, h2, h3, h4, h5, h6 {
	text-wrap: balance;
	line-height: 1.15;
	font-family: var(--nx-font-ui, 'Inter', system-ui, sans-serif);
}

p, li, figcaption {
	text-wrap: pretty;
	max-width: 72ch;
}

button {
	cursor: pointer;
	background: none;
	border: none;
}

table {
	border-collapse: collapse;
	width: 100%;
}

::selection {
	background: color-mix(in oklch, var(--nx-color-primary-base, #f0b429) 25%, transparent);
	color: var(--nx-color-text-primary, #07162a);
}

:focus-visible {
	outline: 2px solid var(--nx-color-primary-base, #f0b429);
	outline-offset: 3px;
	border-radius: var(--nx-radius-sm, 4px);
}

a, button, [role="button"], input, textarea, select {
	transition:
		color 180ms cubic-bezier(0.16, 1, 0.3, 1),
		background 180ms cubic-bezier(0.16, 1, 0.3, 1),
		border-color 180ms cubic-bezier(0.16, 1, 0.3, 1),
		box-shadow 180ms cubic-bezier(0.16, 1, 0.3, 1),
		opacity 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border-width: 0;
}

:root {
	/* #91 — register-agnostic alias tokens: the documents module (synced
	   from nexus-ui) references these upstream names. Canonical values live
	   in the theme groups (prose-font-mono, color-text-muted); these aliases
	   keep the upstream names stable. Lives in the GENERATOR per the #503
	   law — hand additions to the output copies die on regeneration. */
	--nx-color-text-faint: var(--nx-color-text-muted);
	--nx-font-mono: var(--nx-prose-font-mono);
}
