/*
 * theme-editorial.css — "clean editorial" design tokens (restyle sidebar/chat, F0).
 *
 * SCOPE F0: this file ONLY declares the `--ka-*` custom properties in :root. No
 * selector consumes them yet, so F0 produces ZERO visual change. Consumption
 * starts in F1a.
 *
 * Why a dedicated leaf (not a core.css section): in F3 the ops-configurable
 * palette is delivered as a dynamic `/branding.css` that overrides these SAME
 * `--ka-*` in :root by loading AFTER this file — no other file needs to change,
 * and core.css (the global design system) stays untouched (zero risk to existing
 * pages).
 *
 * Every hex of the approved mockup has a token here — no orphan hex downstream:
 * F1a/F2 selectors reference `var(--ka-*)`, F3 makes the PRIMARIES configurable.
 *
 * PRIMARIES (configurable from ops in F3): the neutral warm scale + accents +
 * families. DERIVED (not configurable): a few values that color-mix() can compute
 * faithfully from the primaries; where the mockup gives a specific hex that a mix
 * would not reproduce exactly, the explicit hex stays (fidelity > cleverness).
 */

:root {
  /* --- PRIMARIES — warm neutral scale (configurable in F3) --- */
  --ka-bg: #FDFCFA;      /* paper background */
  --ka-ink: #23201C;     /* darkest text / headings */
  --ka-text: #4C463C;    /* body text */
  --ka-soft: #6B655B;    /* secondary text */
  --ka-muted: #9C948A;   /* tertiary text / meta */
  --ka-faint: #C1B9AD;   /* faint text / disabled */
  --ka-label: #B3AA9C;   /* group labels (small caps) */
  --ka-line: #EEEAE3;    /* hairline borders / dividers */
  --ka-active: #F3E7D9;  /* active list item background */
  --ka-hover: #F6F3EE;   /* hover surface */

  /* --- PRIMARIES — accents (configurable in F3) --- */
  --ka-accent: #B4622E;    /* primary accent (wordmark, active dot, badges) */
  --ka-accent-2: #C97C43;  /* secondary accent (dropzone circle, gradients) */

  /* --- PRIMARIES — panel frame surfaces (F1b, configurable in F3) --- */
  --ka-shell-bg: #F4F0E9;       /* warm backdrop behind the floating panels */
  --ka-workspace-bg: #FFFFFF;   /* chat workspace panel (white) */

  /* --- PRIMARIES — type families --- */
  --ka-serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --ka-sans: 'Hanken Grotesk', var(--core-font-family);
  --ka-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;

  /* --- SEMANTIC (mapped to primaries — derived, not separately configurable) --- */
  --ka-group-label: var(--ka-label);        /* IERI / ULTIMI 7 GIORNI */
  /* Dots: dim everywhere (Dashboard, list), lit only on the active item. */
  --ka-dot: var(--ka-faint);                /* resting dot */
  --ka-dot-active: var(--ka-accent);        /* active list item dot */
  --ka-count-badge-text: var(--ka-accent);  /* "FONTI ATTIVE 4" count */
  --ka-file-ext-text: var(--ka-accent);     /* MD / PNG extension badge */
  --ka-item-active-text: var(--ka-ink);
  --ka-item-active-bg: var(--ka-active);

  /* DERIVED via color-mix() from the primaries (faithful to the mockup):
     subtle item hover and hairline-on-hover computed from accent/paper. */
  --ka-item-hover: color-mix(in srgb, var(--ka-accent) 5%, var(--ka-bg));
  --ka-focus-ring: color-mix(in srgb, var(--ka-accent) 25%, transparent);

  /* --- "Nuova chat" button --- */
  --ka-newchat-ink: #A65A28;    /* explicit: warmer than --ka-accent in the mockup */
  --ka-newchat-hover: #FBF6F0;  /* explicit: near-paper hover tint */

  /* --- Panels (Fonti attive container) --- */
  --ka-panel-border: #EBE6DE;
  --ka-panel-shadow: 0 1px 2px rgba(35, 32, 28, 0.05);

  /* --- Dropzone ("Aggiungi una fonte") — explicit mockup values --- */
  --ka-drop-border: #DDB58C;                     /* dashed border */
  --ka-drop-grad-from: #FCF6EF;                  /* gradient start */
  --ka-drop-grad-to: #FBF3EA;                    /* gradient end */
  --ka-drop-hover: #FBEEDF;                       /* hover fill */
  --ka-drop-ring: #E9C6A2;                        /* focus/hover ring */
  --ka-drop-circle-shadow: rgba(201, 124, 67, 0.55);  /* upload circle glow */
}
