/* ==========================================================================
   Design tokens: the ONLY file that writes token values.
   Light values and theme-independent tokens on :root; dark overrides on
   [data-theme="dark"]. Mapping to the prototype and every divergence:
   docs/frontend/design-system/tokens.md and divergences.md.
   Nothing but custom-property declarations belongs here.
   ========================================================================== */

:root{
  /* ---- core palette (light) ---- */
  --paper:      #F5F6F4;
  --surface:    #FFFFFF;
  --surface-2:  #EEF0ED;
  --ink:        #12151B;
  --ink-soft:   #4B525C;
  --ink-faint:  #636972;   /* DIV-01: prototype #838A93 */
  --line:       #DDE1DC;
  --line-soft:  #E9EBE7;

  /* ---- brand ---- */
  --brand:      #2B4C7E;
  --brand-ink:  #17314F;
  --brand-tint: #E7EDF5;
  --signal:     #1B8A7A;
  --signal-tint:#E4F2EF;

  /* ---- semantic ---- */
  --go:         #1C7B44;   /* DIV-01: prototype #1F8A4C */
  --go-ink:     #0F5C31;
  --go-tint:    #E4F4E9;
  --warn:       #B9740A;
  --warn-tint:  #FBF0DC;
  --danger:     #BC3C29;   /* DIV-01: prototype #C7402B */
  --danger-tint:#FBE7E3;
  --info:       #2B6CB0;
  --info-tint:  #E5EEF8;

  /* ---- added tokens (replace prototype component literals) ---- */
  --on-brand:      #FFFFFF;                 /* DIV-01: text on --brand / --brand-ink */
  --on-go:         #FFFFFF;                 /* DIV-01: text on --go / --go-ink */
  --warn-ink:      #996008;                 /* DIV-01: warn text (prototype used --warn) */
  --scrim:         rgba(14,17,22,.5);       /* DIV-12: modal / sheet / drawer scrim */
  --knob:          #FFFFFF;                 /* switch knob */
  --on-brand-line: rgba(255,255,255,.18);   /* decorative auth panel rings */

  /* ---- elevation / radius ---- */
  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 16px;
  --shadow-1: 0 1px 2px rgba(18,21,27,.06);
  --shadow-2: 0 8px 24px -8px rgba(18,21,27,.18);

  /* ---- type ---- */
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;

  /* ---- shell ---- */
  --nav-w: 248px;
  --topbar-h: 64px;
}

[data-theme="dark"]{
  --paper:      #0E1116;
  --surface:    #161A21;
  --surface-2:  #1D222B;
  --ink:        #EDEFF2;
  --ink-soft:   #AEB5C0;
  --ink-faint:  #89909B;   /* DIV-01: prototype #6E7683 */
  --line:       #2A2F3A;
  --line-soft:  #22262F;

  --brand:      #6D93C7;
  --brand-ink:  #DCE6F3;
  --brand-tint: #1B2838;
  --signal:     #4FBBA8;
  --signal-tint:#132A26;

  --go:         #3FB56E;
  --go-ink:     #BEF0D2;
  --go-tint:    #12261A;
  --warn:       #E0A53D;
  --warn-tint:  #2C230F;
  --danger:     #E2695A;
  --danger-tint:#2B1714;
  --info:       #6FA0DA;
  --info-tint:  #142331;

  --on-brand:   var(--paper);   /* DIV-01: prototype white (3.16:1 on brand) */
  --on-go:      var(--paper);   /* DIV-01: prototype white (2.61:1 on go) */
  --warn-ink:   var(--warn);
}
