/* TorchQuill design tokens: the only place raw values live.

   Every other stylesheet uses these variables, never a hex color, a loose
   pixel size or a one-off shadow. See docs/DESIGN.md and the live style
   guide at /ui.

   Colors: the values below are the TorchQuill brand theme (dark), used by
   the website. Inside the app, the person's chosen theme replaces the
   --tq-* colors at runtime (js/app/themes.js sets the same names). */

:root {
  /* Color: surfaces, lines and text */
  --tq-bg: #0d1a1c;
  --tq-panel: #12242a;
  --tq-panel-2: #183039;
  --tq-line: #24414a;
  --tq-text: #e8f1ee;
  --tq-muted: #a9c0ba;

  /* Color: meaning */
  --tq-accent: #7fd6c2;
  --tq-on-accent: #08201b;
  --tq-accent-soft: #1d3c3e;
  --tq-accent-text: #7fd6c2;
  --tq-danger: #ff9a8a;
  --tq-on-danger: #111111;
  --tq-success: #8ee08e;
  --tq-brand-gold: #f2b24c; /* the wordmark and illustrations only */

  /* Color: story acts and states (tracker, story builder). Each has a
     light-mode set below. Checked at 4.5:1 on every theme's backgrounds. */
  --tq-act1: #d6ae5e;
  --tq-act1-soft: #332a18;
  --tq-act2: #7cc2e6;
  --tq-act2-soft: #16303d;
  --tq-act3: #f4a088;
  --tq-act3-soft: #3a1f17;
  --tq-board: #b4bec8;
  --tq-board-soft: #262d33;
  --tq-warn: #ebb15c;
  --tq-warn-soft: #3a2b14;

  /* Space: a 4px grid. Inside a control 8–12, between groups 16–24,
     between page sections 48. */
  --tq-space-1: 4px;
  --tq-space-2: 8px;
  --tq-space-3: 12px;
  --tq-space-4: 16px;
  --tq-space-5: 24px;
  --tq-space-6: 32px;
  --tq-space-7: 48px;

  /* Type */
  --tq-font: Inter, system-ui, sans-serif;
  --tq-font-display: Cinzel, Georgia, serif; /* wordmark, campaign titles */
  --tq-font-mono: 'JetBrains Mono', ui-monospace, monospace; /* codes, dice */
  --tq-text-xs: 12px; /* labels, tags, counts */
  --tq-text-sm: 14px; /* body inside tools, buttons, inputs */
  --tq-text-md: 16px; /* body on reading pages */
  --tq-text-lg: 20px; /* panel and dialog titles */
  --tq-text-xl: 28px; /* page titles */
  --tq-weight: 400;
  --tq-weight-strong: 600;

  /* Shape */
  --tq-radius-sm: 6px; /* buttons, inputs, chips */
  --tq-radius-md: 10px; /* boxes, cards, rows */
  --tq-radius-lg: 14px; /* floating bars, menus, dialogs */
  --tq-radius-round: 999px; /* avatars, ports, pills */
  --tq-control-h: 36px; /* every button and input */
  --tq-control-h-sm: 28px; /* toolbar and inline buttons */

  /* Depth: flat unless floating */
  --tq-shadow-float: 0 6px 24px rgb(0 0 0 / 28%);
  /* The tour's flying quill (a drop-shadow, so it follows the drawing). */
  --tq-shadow-quill: 0 6px 6px rgb(0 0 0 / 25%);
  --tq-scrim: rgb(0 0 0 / 55%);
  /* Fog of war on maps (opacity is set per viewer). */
  --tq-fog: #0b0f10;

  /* Motion */
  /* Motion (js/app/motion.js has the full kit). */
  --tq-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --tq-ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --tq-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --tq-fast: 120ms; /* hovers, presses */
  --tq-slow: 200ms; /* panels sliding in */

  /* Layout */
  --tq-reading-width: 720px;
  --tq-list-width: 40%;
  --tq-detail-min: 320px;

  color-scheme: dark;
}

:root[data-mode='light'] {
  --tq-act1: #6a4f18;
  --tq-act1-soft: #efe4cc;
  --tq-act2: #22597a;
  --tq-act2-soft: #d8e7ef;
  --tq-act3: #93361f;
  --tq-act3-soft: #f1dcd4;
  --tq-board: #4a545e;
  --tq-board-soft: #e1e5e9;
  --tq-warn: #7a4806;
  --tq-warn-soft: #f6e6c8;
  color-scheme: light;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --tq-fast: 0ms;
    --tq-slow: 0ms;
  }
}
