/*
 * Veraya tokens — "Held V" identity (HEW-65, reskin PR 1/3).
 *
 * Single canonical token file for the Veraya web UI. Monochrome, no accent.
 * Primitives first, then semantic aliases consumed by styles.css and pages.
 * To revert: point the <link> tags back at the previous token file.
 * Builder will own the canonical design system later (HEW-72).
 */

@font-face {
  font-family: "Source Sans 3";
  src: url("/veraya/static/fonts/SourceSans3-Variable.ttf") format("truetype");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;

  /* ---- Primitives ---- */
  --veraya-charred: #0E0F0C;        /* background */
  --veraya-charred-1: #151613;      /* raised surface: sidebar, cards */
  --veraya-charred-2: #1B1D19;      /* nested slab: inputs, subtle blocks */
  --veraya-charred-3: #23251F;      /* hover / pressed */
  --veraya-cool-light: #F1F2EE;     /* primary text, primary action */
  --veraya-cool-light-hover: #FFFFFF;
  --veraya-steel: #A9B4B8;          /* tempered steel: secondary text, quiet UI */
  --veraya-steel-dim: #7D878B;      /* tertiary text (4.9:1 on charred) */

  --veraya-line-subtle: rgba(241, 242, 238, 0.06);
  --veraya-line: rgba(241, 242, 238, 0.10);
  --veraya-line-strong: rgba(169, 180, 184, 0.28);
  --veraya-fill-quiet: rgba(241, 242, 238, 0.06);   /* chip / active nav fill */
  --veraya-fill-quiet-2: rgba(241, 242, 238, 0.10);

  --veraya-success: #8FB39A;        /* muted sage */
  --veraya-warning: #C9B37E;        /* muted ochre */
  --veraya-danger: #D08A80;         /* muted clay */
  --veraya-danger-solid: #8E4A42;   /* destructive button fill */
  --veraya-danger-solid-hover: #9E554C;
  --veraya-danger-bg: rgba(208, 138, 128, 0.12);
  --veraya-scrim: rgba(14, 15, 12, 0.72);

  --veraya-font-sans: "Source Sans 3", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --veraya-font-mono: ui-monospace, "SF Mono", "Fira Code", Menlo, monospace;
  --veraya-weight-regular: 400;
  --veraya-weight-semibold: 600;
  --veraya-text-body: 16px;
  --veraya-text-chat: 16px;

  --veraya-radius-slab: 16px;   /* panels, chat bubbles, large cards */
  --veraya-radius-card: 12px;   /* cards */
  --veraya-radius-field: 10px;  /* inputs, nav items */
  --veraya-radius-pill: 999px;  /* buttons, chips */

  --veraya-space-1: 8px;
  --veraya-space-2: 16px;
  --veraya-space-3: 24px;
  --veraya-space-4: 32px;
  --veraya-space-5: 40px;
  --veraya-space-6: 48px;

  --veraya-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.28);
  --veraya-shadow-panel: 0 20px 60px rgba(0, 0, 0, 0.45);

  /* ---- Semantic aliases (names used throughout styles.css) ---- */
  --bg: var(--veraya-charred);
  --bg-card: var(--veraya-charred-1);
  --bg-subtle: var(--veraya-charred-2);
  --bg-hover: var(--veraya-charred-3);
  --text: var(--veraya-cool-light);
  --text-muted: var(--veraya-steel);
  --text-soft: var(--veraya-steel-dim);
  --accent: var(--veraya-cool-light);          /* monochrome: "accent" = cool light */
  --accent-hover: var(--veraya-cool-light-hover);
  --accent-light: var(--veraya-fill-quiet);
  --text-on-accent: var(--veraya-charred);
  --border: var(--veraya-line);
  --border-subtle: var(--veraya-line-subtle);
  --border-strong: var(--veraya-line-strong);
  --success: var(--veraya-success);
  --warning: var(--veraya-warning);
  --danger: var(--veraya-danger);
  --danger-solid: var(--veraya-danger-solid);
  --danger-solid-hover: var(--veraya-danger-solid-hover);
  --danger-bg: var(--veraya-danger-bg);
  --scrim: var(--veraya-scrim);
  --shadow: var(--veraya-shadow);
  --shadow-panel: var(--veraya-shadow-panel);
  --radius-lg: var(--veraya-radius-slab);
  --radius: var(--veraya-radius-card);
  --radius-sm: var(--veraya-radius-field);
  --radius-pill: var(--veraya-radius-pill);
  --font: var(--veraya-font-sans);
  --font-display: var(--veraya-font-sans);
  --font-mono: var(--veraya-font-mono);
  --weight-heading: var(--veraya-weight-semibold);
}

/* Optional light mode for theme toggle (monochrome inverse) */
[data-theme="light"] {
  color-scheme: light;
  --bg: var(--veraya-cool-light);
  --bg-card: #FFFFFF;
  --bg-subtle: #E8EAE5;
  --bg-hover: #DFE2DC;
  --text: var(--veraya-charred);
  --text-muted: #4E575B;
  --text-soft: #6B7478;
  --accent: var(--veraya-charred);
  --accent-hover: #262823;
  --accent-light: rgba(14, 15, 12, 0.06);
  --text-on-accent: var(--veraya-cool-light);
  --border: rgba(14, 15, 12, 0.10);
  --border-subtle: rgba(14, 15, 12, 0.06);
  --border-strong: rgba(14, 15, 12, 0.22);
  --success: #3F6B4C;
  --warning: #7A6330;
  --danger: #9A4A40;
  --danger-bg: rgba(154, 74, 64, 0.10);
  --shadow: 0 1px 2px rgba(14, 15, 12, 0.05), 0 2px 6px rgba(14, 15, 12, 0.05);
}
