/* Hallmark · macrostructure: Marquee Hero (the hero IS the instrument: two continents lit by rank) / Long Document (zone page: map, ledger, loop)
 * tone: technical, warm · theme: custom · vibe: "an atlas on a counting-room table: obsidian field, gold lantern, one parchment note"
 * paper: oklch(0.13 0.018 260) obsidian · accent: oklch(0.82 0.16 85) gold · display + body: Bricolage Grotesque · mono: JetBrains Mono
 * axes: dark / grotesk-display / warm-gold · pre-emit critique: P5 H5 E4 S5 R5 V4
 * Evolved 2026-10-02 from the Oct-01 counting-room tokens (backup backups/tokens.css.bak-20261002-0430-prearch). Same identity, new object:
 * the site is an atlas, not a dashboard. Colour is information and nothing else:
 *   gold / silver / copper  = relative tier among WORTH IT units (glow intensity, coin colour); never a verdict on its own
 *   emerald / ruby          = signed change only, always beside a printed sign
 *   steel / rust            = faction of a flight point (Alliance / Horde), always beside the name
 *   hairline grey / dashed  = vendor floor / no scan yet (the honest states are first-class, not errors)
 * Motion tokens are the only timing source for js/core/motion.js and every module; reduced motion collapses them below.
 */
:root {
  /* Obsidian field (hue 260) */
  --bg-app: oklch(0.13 0.018 260);
  --bg-surface: oklch(0.17 0.022 260);
  --bg-surface-elevated: oklch(0.21 0.026 260);
  --bg-surface-hover: oklch(0.25 0.030 260);
  --bg-surface-active: oklch(0.28 0.035 260);
  /* Lantern wash: fixed radial warmth, top-left, fading to the field */
  --lantern-core: oklch(0.19 0.035 60);
  --lantern: radial-gradient(120vmax 80vmax at 0% 0%, var(--lantern-core) 0%, var(--bg-app) 55%);
  /* Map table: the continent panels sit on a darker felt so the art reads as an object laid down, not a background */
  --map-felt: oklch(0.10 0.015 260);
  --map-vignette: radial-gradient(140% 110% at 50% 45%, transparent 55%, oklch(0.10 0.015 260 / 0.75) 100%);

  /* The one bright surface: the daily note card and /brief/ pages only */
  --paper-ledger: oklch(0.93 0.035 85);
  --paper-ledger-line: oklch(0.86 0.045 85);
  --ink: oklch(0.20 0.02 60);
  --ink-soft: oklch(0.38 0.03 60);

  /* Borders */
  --border-subtle: oklch(0.26 0.025 260);
  --border-strong: oklch(0.36 0.040 260);
  --border-glow: oklch(0.82 0.16 85 / 0.4);

  /* Text */
  --text-primary: oklch(0.96 0.010 260);
  --text-secondary: oklch(0.72 0.020 260);
  --text-muted: oklch(0.66 0.02 260); /* >= 4.5:1 on --bg-app and the surfaces at 12px: every figure carries a stamp in this colour */
  --text-inverted: oklch(0.12 0.018 260);

  /* Gold */
  --color-gold: oklch(0.82 0.16 85);
  --color-gold-hover: oklch(0.88 0.18 85);
  --color-gold-dim: oklch(0.45 0.09 85);
  --color-gold-bg: oklch(0.82 0.16 85 / 0.12);
  --gold-sheen: linear-gradient(105deg, transparent 20%, oklch(0.97 0.08 90 / 0.55) 50%, transparent 80%);

  /* Coin triad: relative tier among worth-it units (glow + coin colour). Never a verdict. */
  --coin-copper: oklch(0.62 0.12 40);
  --coin-silver: oklch(0.80 0.02 250);
  --coin-gold: var(--color-gold);
  --coin-copper-bg: oklch(0.62 0.12 40 / 0.14);
  --coin-silver-bg: oklch(0.80 0.02 250 / 0.12);
  --coin-gold-bg: var(--color-gold-bg);

  /* Hotspot glow on the world map: fill alpha and scale per tier (js/modules/world-map.js reads these by name) */
  --hot-outer-alpha: 0.12;
  --hot-inner-alpha: 0.35;
  --hot-gold-opacity: 0.9;   --hot-gold-scale: 1.15;
  --hot-silver-opacity: 0.55; --hot-silver-scale: 1;
  --hot-copper-opacity: 0.3; --hot-copper-scale: 0.8;
  --hot-locked-opacity: 0.2;
  --hot-ring: oklch(0.50 0.02 260);      /* hairline ring: every eligible unit at vendor floor */
  --hot-ring-nodata: oklch(0.40 0.02 260); /* dashed ring: no scan yet */

  /* Signed change only (the sign is always printed beside the colour) */
  --color-emerald: oklch(0.78 0.18 145);
  --color-emerald-bg: oklch(0.78 0.18 145 / 0.12);
  --color-ruby: oklch(0.68 0.22 25);
  --color-ruby-bg: oklch(0.68 0.22 25 / 0.12);

  /* Verdict stamps (lower-case two-word labels; colour is secondary to the word) */
  --v-worth: var(--color-gold);
  --v-worth-bg: var(--color-gold-bg);
  --v-thin: oklch(0.80 0.04 85);
  --v-thin-bg: oklch(0.80 0.04 85 / 0.10);
  --v-floor: var(--text-muted);
  --v-floor-bg: oklch(0.66 0.02 260 / 0.08);
  --v-nodata: oklch(0.56 0.02 260);
  --v-nodata-border: dashed;

  /* Flight-point pins by faction: silver diamond glyph, tinted. Steel for Alliance, rust for Horde, plain silver for both. */
  --pin-alliance: oklch(0.80 0.07 250);
  --pin-horde: oklch(0.72 0.11 35);
  --pin-both: var(--coin-silver);
  --pin-town: oklch(0.90 0.03 85);
  --pin-landmark: oklch(0.78 0.03 85);
  --pin-dungeon: oklch(0.75 0.10 300);
  --loop-stroke: var(--color-gold);
  --loop-stroke-w: 4;
  --pen: var(--color-gold-hover);

  /* Version chips: always colour + text */
  --color-midnight: oklch(0.75 0.18 300);
  --chip-forever: oklch(0.88 0.06 80);
  --chip-forever-bg: oklch(0.88 0.06 80 / 0.14);
  --chip-retail: var(--color-midnight);
  --chip-retail-bg: oklch(0.75 0.18 300 / 0.14);

  /* Item quality (WoW) */
  --q0: oklch(0.62 0.01 260); --q1: oklch(0.96 0.01 260); --q2: oklch(0.78 0.18 145);
  --q3: oklch(0.70 0.17 255); --q4: oklch(0.70 0.22 310); --q5: oklch(0.80 0.16 60);

  /* Type: two families, metrics-matched fallbacks (size-adjust) to protect CLS */
  --font-display: "Bricolage Grotesque", "Bricolage Fallback", "Segoe UI", Arial, sans-serif;
  --font-body: "Bricolage Grotesque", "Bricolage Fallback", "Segoe UI", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "JetBrains Fallback", Consolas, "Cascadia Code", monospace;
  --display-wght: 800;
  --display-wdth: 90;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
  --text-display-s: clamp(2rem, 1.2rem + 3.5vw, 3.25rem);
  --text-display: clamp(2.4rem, 1.4rem + 5vw, 4.5rem);
  --text-map-label: 14px; /* SVG zone labels on the continent art; paint-order stroke keeps them legible on any terrain */
  --leading-body: 1.55;
  --measure: 66ch;

  /* 4pt spacing */
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem;
  --space-5: 1.25rem; --space-6: 1.5rem; --space-8: 2rem; --space-10: 2.5rem;
  --space-12: 3rem; --space-16: 4rem; --space-20: 5rem;
  --gutter: 16px;
  --tap: 44px;

  /* Radii: controls 6px, the two card types 10px */
  --radius-control: 6px;
  --radius-card: 10px;
  --radius-full: 9999px;

  /* Motion: the only timing source. transform / opacity / stroke-dashoffset only. */
  --ease-out: cubic-bezier(0.2, 0, 0, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
  --ease-in: cubic-bezier(0.5, 0, 0.75, 0);
  --dur-fast: 150ms;    /* stamp crossfade, tab crossfade */
  --dur-base: 300ms;    /* hotspot ignition, art fade-in, estimate countTo */
  --dur-slow: 600ms;    /* figure tween old -> new, map settle 1.02 -> 1 */
  --dur-draw: 2400ms;   /* the loop drawing itself */
  --dur-pop: 180ms;     /* a stop or pin popping in */
  --dur-flip: 220ms;    /* board row FLIP reorder (translateY) */
  --stagger: 60ms;      /* rank-order ignition step (motion.sequence) */
  --stagger-pin: 90ms;  /* pin groups on the zone page */
  --ticker-px-s: 28;    /* tape speed, px per second, duration derived from measured width */

  /* Chrome heights */
  --header-h: 56px;
  --bar-h: 56px;        /* the market bar, sticky under the header on every atlas page */
  --ledger-tick: 2px;

  color-scheme: dark;
}

/* Metrics-matched fallbacks so the swap does not shift layout */
@font-face {
  font-family: "Bricolage Fallback";
  src: local("Arial");
  size-adjust: 97%;
  ascent-override: 92%;
  descent-override: 24%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "JetBrains Fallback";
  src: local("Consolas"), local("Courier New");
  size-adjust: 104%;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-fast: 0ms;
    --dur-base: 150ms;
    --dur-slow: 150ms;
    --dur-draw: 0ms;
    --dur-pop: 0ms;
    --dur-flip: 0ms;
    --stagger: 0ms;
    --stagger-pin: 0ms;
  }
}
