/* =========================================================================
   AvPlot — Design tokens
   -------------------------------------------------------------------------
   Source of truth for color, type, motion, rules, and shadows across all
   tool pages. Pasted verbatim from the design handoff
   (source/AvPlot Linework Generator.html, :root + [data-theme="light"]).
   This is the working superset the design CSS consumes. Design System
   § 17 is a documented subset — the superset here is what actually renders.
   -------------------------------------------------------------------------
   Do not retype values. Do not introduce new accent hues. Every color a
   component uses must route through one of these variables.
   ========================================================================= */

:root{
  /* Surfaces (dark default) */
  --bg:          oklch(14% 0.010 250);
  --bg-1:        oklch(11% 0.012 250);
  --bg-2:        oklch(17% 0.010 250);
  --surf:        oklch(19% 0.011 250);
  --surf-2:      oklch(22% 0.010 250);
  --well:        oklch(13% 0.012 250);
  --well-ro:     oklch(10% 0.010 250);

  /* Ink */
  --ink:         oklch(94% 0.005 85);
  --ink-2:       oklch(78% 0.008 85);
  --ink-3:       oklch(60% 0.010 250);
  --ink-4:       oklch(42% 0.012 250);
  --mt:          oklch(52% 0.012 250);

  /* Rules */
  --rule:        oklch(26% 0.010 250);
  --rule-2:      oklch(32% 0.010 250);
  --rule-soft:   oklch(22% 0.010 250);

  /* Accent — amber */
  --acc:         oklch(78% 0.16 85);        /* #E6AD00 */
  --acc-deep:    oklch(68% 0.15 78);
  --acc-soft:    oklch(88% 0.08 85);
  --acc-tint:    oklch(25% 0.08 85);
  --acc-wash:    oklch(20% 0.06 85 / .18);

  /* Semantic */
  --ok:          oklch(72% 0.17 145);       /* validated green */
  --ok-deep:     oklch(62% 0.17 145);
  --ok-tint:     oklch(24% 0.08 145);
  --ok-wash:     oklch(20% 0.07 145 / .18);

  --er:          oklch(64% 0.22 28);        /* invalid red */
  --er-deep:     oklch(54% 0.22 28);
  --er-tint:     oklch(26% 0.12 28);
  --er-wash:     oklch(20% 0.10 28 / .22);

  --gd:          oklch(76% 0.13 78);        /* advisory amber */
  --gd-tint:     oklch(24% 0.08 78);
  --gd-wash:     oklch(20% 0.06 78 / .2);

  --rd:          var(--er);                  /* legacy alias */
  --tl:          var(--ok);                  /* legacy alias */
  --ac:          var(--acc);                 /* legacy alias */
  --bg3:         var(--surf-2);
  --mt2:         var(--ink-4);

  /* Save / print button-only accents */
  --save:        oklch(58% 0.15 145);
  --save-hi:     oklch(64% 0.16 145);
  --print:       oklch(58% 0.16 298);
  --print-hi:    oklch(64% 0.17 298);

  /* Motion */
  --dur-fast: 180ms;
  --dur-med: 360ms;
  --ease: cubic-bezier(.2,.7,.2,1);

  /* Type */
  --fd: 'Archivo', ui-serif, Georgia, serif;
  --ft: 'Inter Tight', ui-sans-serif, system-ui, sans-serif;
  --fm: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
}

[data-theme="light"]{
  --bg:          oklch(97% 0.004 85);
  --bg-1:        oklch(94% 0.005 85);
  --bg-2:        oklch(99% 0.003 85);
  --surf:        oklch(99% 0.003 85);
  --surf-2:      oklch(96% 0.005 85);
  --well:        oklch(98% 0.004 85);
  --well-ro:     oklch(94% 0.006 85);

  --ink:         oklch(18% 0.012 250);
  --ink-2:       oklch(30% 0.012 250);
  --ink-3:       oklch(46% 0.012 250);
  --ink-4:       oklch(62% 0.010 250);
  --mt:          oklch(52% 0.012 250);

  --rule:        oklch(82% 0.006 85);
  --rule-2:      oklch(72% 0.008 85);
  --rule-soft:   oklch(88% 0.005 85);

  --acc:         oklch(78% 0.16 85);
  --acc-deep:    oklch(68% 0.17 75);
  --acc-soft:    oklch(76% 0.10 85);
  --acc-tint:    oklch(92% 0.05 85);
  --acc-wash:    oklch(90% 0.06 85 / .6);

  --ok:          oklch(52% 0.17 145);
  --ok-deep:     oklch(44% 0.17 145);
  --ok-tint:     oklch(90% 0.07 145);
  --ok-wash:     oklch(88% 0.08 145 / .6);

  --er:          oklch(52% 0.23 28);
  --er-deep:     oklch(44% 0.22 28);
  --er-tint:     oklch(92% 0.08 28);
  --er-wash:     oklch(90% 0.10 28 / .6);

  --gd:          oklch(58% 0.14 78);
  --gd-tint:     oklch(92% 0.06 78);
  --gd-wash:     oklch(88% 0.08 78 / .6);

  /* Light-mode shadows — soft, warm, paper-feel */
  --sh-sm: 0 1px 2px oklch(30% 0.02 80 / .06), 0 1px 1px oklch(30% 0.02 80 / .04);
  --sh-md: 0 2px 6px oklch(30% 0.02 80 / .07), 0 1px 2px oklch(30% 0.02 80 / .05);
  --sh-lg: 0 8px 24px oklch(30% 0.02 80 / .08), 0 2px 6px oklch(30% 0.02 80 / .05);
  --sh-inset: inset 0 1px 2px oklch(30% 0.02 80 / .05);

  /* Rule strengthening for light mode */
  --rule: oklch(84% 0.007 85);
  --rule-soft: oklch(90% 0.005 85);
}
