/* Owns: the design tokens every page shares, in one :root set (docs/guides/design.md):
   colors, the type scale, radii, z layers, spacing and motion.
   Must not: hold rules for any element; a page's own palette and display sizes stay in its own file
   Layer: ui */
:root {
  /* The shell: a warm dark frame around a bright paper map, one amber accent. */
  --bg: #24211d;
  --bg-2: #2e2a25;
  --bg-3: #3a352e;
  --bg-deep: #1f1c18;
  --backdrop: #1c1a17;
  --line: #4a443b;
  /* A control's own edge (input, select, the pressed .seg ring): 3:1 on --bg and --bg-2 (WCAG 1.4.11). */
  --edge: #7d7568;
  --text: #ece5d6;
  --dim: #a89f8e;
  --faint: #7d7568;
  --accent: #e0a94f;
  --accent-hover: #ecba65;
  --accent-ink: #2a1f0c;
  --accent-soft: color-mix(in srgb, var(--accent) 50%, transparent);
  --danger: #7d2f27;
  --danger-fill: #8e3329;
  --danger-fill-hover: #a63c30;
  --danger-text: #f08a7c;
  --warn-text: #f0a487;
  --ok-text: #9fd3a0;
  --save-ok: #8fc27a;
  --white: #fff;
  --black: #000;
  /* Light surfaces: inline text, help notes, picture tiles. */
  --paper: #fbf7ea;
  --paper-ink: #26241f;
  --paper-dim: #988d78;
  --thumb-bg: #f1ead6;
  /* The paper pages (help, tutorials, legal): dark ink on a warm page. */
  --page-bg: #f6f1e0;
  --page-rule: #ddd3b8;
  --page-row-rule: #e3dac2;
  --page-quote-rule: #d8cba6;
  --page-head: #efe7cf;
  --page-code: #ece3c9;
  --page-code-line: #cfc4a5;
  --page-link: #7c4a12;
  --page-mark: #b5862e;
  --page-lede: #4a453a;
  --page-caption: #5f584a;
  --page-shadow: 0 2px 10px rgba(60, 45, 20, .12);
  --page-shadow-hover: 0 2px 12px rgba(60, 45, 20, .16);
  /* Samples and pickers that show a color rather than use one. */
  --sample-water: #8fc0e6;
  --mask-ink: #2476c4; /* break-out mode's area masks on the map (breakout-mode/draw.js) */
  --swatch-auto: repeating-linear-gradient(45deg, #8fbfdc 0 5px, #eee7cc 5px 10px);
  --color-wheel: conic-gradient(#e44, #ec4, #4c6, #4ce, #46e, #c4e, #e44);
  --checker: repeating-conic-gradient(#d9d9d9 0 25%, #f4f4f4 0 50%);
  /* Sign in with Google keeps Google's own button colors. */
  --google-ink: #1f1f1f;
  --google-line: #dadce0;
  --google-hover: #f4f6f8;
  /* Edges and shades. */
  --edge-dark: rgba(0, 0, 0, .35);
  --ring-dark: rgba(0, 0, 0, .15);
  --ring-light: rgba(255, 255, 255, .15);
  --scrim: rgba(0, 0, 0, .55);
  --veil: rgba(0, 0, 0, .18);
  --shadow: 0 8px 28px rgba(0, 0, 0, .45);
  --shadow-s: 0 8px 24px rgba(0, 0, 0, .18);
  --shadow-bar: 0 4px 18px rgba(0, 0, 0, .3);
  --shadow-sheet: 0 1px 6px rgba(0, 0, 0, .35);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  /* Type scale: six steps. */
  --font-2xs: 10px;
  --font-xs: 11px;
  --font-s: 12px;
  --font-m: 13px;
  --font-l: 16px;
  --font-xl: 20px;

  /* Corners: a .seg button's radius is its track's minus the track's 2px padding (l - m). */
  --radius-s: 4px;
  --radius-m: 6px;
  --radius-l: 8px;
  --radius-xl: 12px;
  --radius-pill: 999px;

  /* Z layers, bottom to top. */
  --z-raise: 1;
  --z-hud: 2;
  --z-chrome: 3;
  --z-bar: 4;
  --z-pop: 5;
  --z-pop-over: 6;
  --z-toast: 10;
  --z-menu: 40;
  --z-boot: 50;

  /* Spacing: a 4px grid with 2px and 6px half-steps for dense controls. */
  --space-0h: 2px;
  --space-1: 4px;
  --space-1h: 6px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;

  /* Panel rhythm: how a tool drawer, a fold or a section stacks its rows (design guide UI-17).
     Every panel uses these four, so the gaps read the same everywhere. */
  --gap-cap: 4px;      /* a caption and its control */
  --gap-pair: 6px;     /* a control and what belongs to it: its note, its second row */
  --gap-row: 14px;     /* one group of controls and the next */
  --gap-section: 20px; /* one section and the next, across a rule */

  /* Motion: short; longer ones (the working indicator) stay local. */
  --ease-fast: .12s;
  --ease: .2s;
}
