/* tokens.css — single source of color, type, spacing, elevation, and motion values. No component defines a raw color or duration. */

:root {
  /* Palette: the concept tree's blue + gold on white paper, applied app-wide. */
  --stage-void: #f3f7fb;
  --stage-grid: #dbe5ee;
  --ink-primary: #1f3344;
  --ink-secondary: #34495a;
  --ink-muted: #6b7d8c;
  --accent-chalk: #2c74ae;
  --accent-chalk-deep: #1f5a8a;
  --accent-chalk-dim: #2c74ae1f;
  --accent-warm: #f2b640;
  --accent-warm-soft: #fbe7bd;
  --accent-warm-line: #d9952a;
  --accent-warm-ink: #a86c12;
  --accent-warm-edge: #ecc77a;
  --on-accent: #ffffff;
  --rel-prerequisite: #2c74ae;
  --rel-related: #d9952a;
  --rel-advanced: #1f3344;
  --state-visited: #c9daea;
  --panel-bg: #ffffff;
  --panel-border: #dbe5ee;
  --overlay-bg: rgba(31, 51, 68, 0.32);

  /* Whiteboard marker inks */
  --marker-ink: #1f3344;
  --marker-blue: #2c74ae;
  --marker-red: #c0392b;
  --marker-green: #2e8b57;
  --marker-orange: #d9952a;

  /* Classroom: wall, aluminium frame, board surface, sticky notes, highlighter */
  --wall-light: #ffffff;
  --wall-dot: #d3dee8;
  --frame-metal-hi: #f6f8fa;
  --frame-metal-lo: #c3ccd5;
  --frame-edge: #9eabb7;
  --board-surface-top: #ffffff;
  --board-surface-bottom: #f5f8fa;
  --board-sheen: rgba(255, 255, 255, 0.85);
  --board-ghost: rgba(31, 51, 68, 0.03);
  --marker-body: #fbfcfd;
  --eraser-felt: #6b7d8c;
  --sticky-blue: #e6f0f9;
  --sticky-gold: #fdf0d2;
  --sticky-ink: #eef1f4;
  --highlighter: rgba(242, 182, 64, 0.42);
  --elev-board: 0 22px 48px rgba(31, 51, 68, 0.18), 0 4px 10px rgba(31, 51, 68, 0.08);
  --elev-sticky: 0 6px 14px rgba(31, 51, 68, 0.12);

  /* Typography */
  --font-display: 'Noto Sans', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Noto Sans', 'Noto Sans Devanagari', 'Roboto', 'Segoe UI', system-ui, sans-serif;
  --font-hand: 'Caveat', 'Kalam', 'Segoe Print', cursive;
  --type-display-xl: 40px/46px var(--font-display);
  --type-display-l: 28px/34px var(--font-display);
  --type-title-m: 18px/26px var(--font-display);
  --type-body: 16px/26px var(--font-body);
  --type-meta: 13px/18px var(--font-body);

  /* Spacing (4px scale) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
  --space-9: 48px;
  --space-10: 64px;

  /* Radius & elevation */
  --radius-panel: 14px;
  --radius-control: 10px;
  --radius-pill: 999px;
  --radius-key: 6px;
  --elev-panel: 0 6px 18px rgba(31, 51, 68, 0.12);
  --elev-overlay: 0 10px 32px rgba(31, 51, 68, 0.16);
  --elev-primary: 0 4px 10px rgba(44, 116, 174, 0.35);

  /* Shared components (components.css) */
  --card-bar: 5px solid var(--accent-warm);
  --control-h: 36px;
  --control-h-lg: 44px;
  --focus-ring: 2px solid var(--accent-chalk);
  --icon-size: 20px;
  --icon-size-sm: 16px;

  /* Paper: one dotted background for map, tree and board */
  --paper-dot-size: 24px;
  --paper-bg: radial-gradient(circle, var(--wall-dot) 1px, transparent 1.4px) 0 0 / var(--paper-dot-size) var(--paper-dot-size), var(--stage-void);

  /* Chrome layout: everything below the shared top bar starts at --chrome-top */
  --chrome-top: 84px;
  --popover-w: 340px;

  /* Map pills */
  --map-pill-h: 30px;
  --map-desc-w: 210px;
  --label-plate: rgba(243, 247, 251, 0.92);

  /* Motion */
  --motion-instant: 120ms ease-out;
  --motion-control: 200ms cubic-bezier(.2,.8,.2,1);
  --motion-reveal: 420ms cubic-bezier(.25,.9,.25,1);
  --motion-travel: 720ms cubic-bezier(.65,0,.35,1);
  --motion-view: 280ms cubic-bezier(.2,.8,.2,1);
  --motion-overture: 2600ms;
}

/* Reduced motion / motion-off: collapse every animated token to an instant cut. */
.motion-off,
:root[data-reduced-motion="true"] {
  --motion-instant: 0ms linear;
  --motion-control: 0ms linear;
  --motion-reveal: 0ms linear;
  --motion-travel: 0ms linear;
  --motion-view: 0ms linear;
  --motion-overture: 0ms;
}

/* The OS reduced-motion setting collapses the same tokens, even before the app's Motion toggle. */
@media (prefers-reduced-motion: reduce) {
  :root {
    --motion-instant: 0ms linear;
    --motion-control: 0ms linear;
    --motion-reveal: 0ms linear;
    --motion-travel: 0ms linear;
    --motion-view: 0ms linear;
    --motion-overture: 0ms;
  }
}
