/* ============================================================
   CONDUCTOR — DESIGN TOKENS
   "compact dev console": cool neutrals, Inter, dense.
   Light is the DEFAULT palette on bare :root; dark is a complete
   redefinition (not an inversion), selected via data-theme on <html>.
   ============================================================ */
:root {
  /* surfaces — cool neutrals (no warm cast) */
  --bg: #fafafa;
  --bg-side: #ffffff;
  --surface: #ffffff;
  --surface-2: #f7f7f8;
  --surface-3: #ededf0;
  --sunken: #f8f8f9;
  --overlay: rgba(18, 18, 22, 0.28);
  /* lines */
  --border: #e4e4e7;
  --border-strong: #d9d9de;
  --border-side: #e6e6e8;   /* sidebar right border */
  --divider: #ececee;
  /* text — zinc scale */
  --text: #18181b;
  --text-2: #4f4f57;
  --text-3: #6a6a72;
  --text-4: #8e8e96;
  --text-inv: #ffffff;
  /* accent (swappable) */
  --acc-l: #4b5bd6;      /* ← BRAND ACCENT: indigo */
  --acc-d: #8e9af3;      /* ← BRAND ACCENT: indigo */
  --accent: var(--acc-l);
  --on-accent: #ffffff;
  --accent-soft: color-mix(in srgb, var(--accent) 10%, transparent);
  --accent-line: color-mix(in srgb, var(--accent) 38%, transparent);
  /* semantic — cool-leaning set */
  --green: #1a7f37;
  --amber: #955f0d;
  --red: #cf222e;
  --blue: #2160c4;
  --violet: #6e40c9;
  --teal: #0f7f78;
  --rose: #bf3989;
  --orange: #bc4c00;
  --gray: #6e7781;
  --green-soft: color-mix(in srgb, var(--green) 11%, transparent);
  --amber-soft: color-mix(in srgb, var(--amber) 12%, transparent);
  --red-soft: color-mix(in srgb, var(--red) 10%, transparent);
  --blue-soft: color-mix(in srgb, var(--blue) 10%, transparent);
  --teal-soft: color-mix(in srgb, var(--teal) 10%, transparent);
  --violet-soft: color-mix(in srgb, var(--violet) 11%, transparent);
  --rose-soft: color-mix(in srgb, var(--rose) 10%, transparent);
  /* elevation */
  --shadow-sm: 0 1px 2px rgba(24, 24, 27, 0.05);
  --shadow-card: 0 1px 2px rgba(24, 24, 27, 0.04), 0 0 0 1px var(--border);
  --shadow-pop: 0 12px 32px -8px rgba(24, 24, 27, 0.18), 0 2px 6px -2px rgba(24, 24, 27, 0.07), 0 0 0 1px var(--border);
  --shadow-raise: 0 1px 2px rgba(24, 24, 27, 0.07);
  --shadow-hover: 0 2px 6px rgba(24, 24, 27, 0.07), 0 0 0 1px var(--border);
  /* radius — sharp scale */
  --r-xs: 3px; --r-sm: 5px; --r: 7px; --r-lg: 9px; --r-full: 999px;
  /* spacing (4pt scale) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px;
  --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 48px;
  /* type — Inter, compact scale. Mono slot: Geist, displayed all caps
     (replaces Geist Mono; Geist is imported in demo/index.html). */
  --font: 'Inter', ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Geist', ui-sans-serif, 'Segoe UI', sans-serif;
  --fs-2xs: 11px; --fs-xs: 12px; --fs-sm: 12px; --fs: 12px;
  --fs-md: 14px; --fs-lg: 14px; --fs-xl: 14px; --fs-2xl: 20px; --fs-stat: 20px;
  /* component sizes — densest of the family */
  --h-xs: 20px; --h-sm: 24px; --h-md: 28px; --h-lg: 32px;
  --side-w: 252px; --side-row: 28px; --row-h: 34px;
  --card-pad: 14px; --topbar-h: 42px;
  /* one horizontal content edge shared by page headers, toolbars, tables, cards */
  --gutter: 20px;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur: 140ms;
  /* select chevron — data-URI stroke needs a literal hex per theme */
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238e8e96' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  color-scheme: light;
}

/* explicit light (matches the default) — kept complete so either theme
   can be selected via data-theme alone */
:root[data-theme='light'] {
  --bg: #fafafa;
  --bg-side: #ffffff;
  --surface: #ffffff;
  --surface-2: #f7f7f8;
  --surface-3: #ededf0;
  --sunken: #f8f8f9;
  --overlay: rgba(18, 18, 22, 0.28);
  --border: #e4e4e7;
  --border-strong: #d9d9de;
  --border-side: #e6e6e8;
  --divider: #ececee;
  --text: #18181b;
  --text-2: #4f4f57;
  --text-3: #6a6a72;
  --text-4: #8e8e96;
  --text-inv: #ffffff;
  --accent: var(--acc-l);
  --on-accent: #ffffff;
  --green: #1a7f37;
  --amber: #955f0d;
  --red: #cf222e;
  --blue: #2160c4;
  --violet: #6e40c9;
  --teal: #0f7f78;
  --rose: #bf3989;
  --orange: #bc4c00;
  --gray: #6e7781;
  --shadow-sm: 0 1px 2px rgba(24, 24, 27, 0.05);
  --shadow-card: 0 1px 2px rgba(24, 24, 27, 0.04), 0 0 0 1px var(--border);
  --shadow-pop: 0 12px 32px -8px rgba(24, 24, 27, 0.18), 0 2px 6px -2px rgba(24, 24, 27, 0.07), 0 0 0 1px var(--border);
  --shadow-raise: 0 1px 2px rgba(24, 24, 27, 0.07);
  --shadow-hover: 0 2px 6px rgba(24, 24, 27, 0.07), 0 0 0 1px var(--border);
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238e8e96' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  color-scheme: light;
}

/* dark — cool #131316 family, indigo lifts to --acc-d, semantics brighten */
:root[data-theme='dark'] {
  --bg: #131316;
  --bg-side: #17171b;
  --surface: #1a1a1f;
  --surface-2: #202026;
  --surface-3: #27272e;
  --sunken: #16161a;
  --overlay: rgba(0, 0, 0, 0.55);
  --border: #26262c;
  --border-strong: #34343c;
  --border-side: #26262c;
  --divider: #212127;
  --text: #ececf1;
  --text-2: #b8b8c2;
  --text-3: #9c9ca6;
  --text-4: #75757f;
  --text-inv: #131316;
  --accent: var(--acc-d);
  --on-accent: #14162b;
  --green: #4ac269;
  --amber: #d9a53f;
  --red: #f47067;
  --blue: #6cb6ff;
  --violet: #a996f8;
  --teal: #39c5cf;
  --rose: #e275ab;
  --orange: #f0883e;
  --gray: #8b949e;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 0 0 1px var(--border);
  --shadow-pop: 0 16px 40px -10px rgba(0, 0, 0, 0.6), 0 2px 6px -2px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--border-strong);
  --shadow-raise: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.35), 0 0 0 1px var(--border-strong);
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2375757f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  color-scheme: dark;
}
