/*
  ANTIMUS design tokens. Dark only.

  The palette is Claude's: warm charcoal surfaces, ivory text and the
  terracotta accent (#d97757), with the brand blue kept for the LIVE dot. The
  token *roles* follow a terminal layout - a background, three raised surfaces,
  three line weights and three text tiers - so a component can be written once
  and re-skinned by swapping this file.

  There is no light theme and no toggle. A single block means a colour can
  never exist in one theme and be missing from the other, which was the whole
  class of bug the old two-block file had to guard against.

  Every neutral here is warm (a little more red than blue). A cool grey next to
  the terracotta reads as a different product, so none is used.
*/

:root {
  /* surfaces */
  --bg: #1f1e1d;
  --panel: #262624;
  --raised: #30302e;
  --raised-2: #383734;
  --wash: #222120;

  /* lines, lightest to heaviest */
  --line: #3a3936;
  --line-2: #474641;
  --line-3: #5e5c55;

  /* text tiers */
  --ink-bright: #faf9f5;
  --ink: #e8e6dc;
  --ink-2: #c2c0b6;
  /* 6.0:1 on --panel and 4.7:1 on --raised-2, so the 10-11px labels this tier
     is used for clear WCAG AA on every surface they sit on, and it still sits
     clearly below --ink-2 in the hierarchy. */
  --ink-3: #a6a39a;
  --ink-dim: rgba(250, 249, 245, 0.12);
  --text: var(--ink-bright);
  --text-2: var(--ink-2);
  --text-3: var(--ink-3);

  /* The accent: Claude terracotta. --accent is for fills, borders and marks.
     As TEXT it measures 4.9:1 on --panel but only 3.8:1 on --raised-2, so small
     accent-coloured type uses --accent-text, the same hue one step lighter
     (6.5:1 on --panel, 5.1:1 on --raised-2). */
  --accent: #d97757;
  --accent-bright: #e89274;
  --accent-text: #e6957a;
  --accent-deep: #8a4329;
  --accent-dim: rgba(217, 119, 87, 0.16);
  --accent-line: rgba(217, 119, 87, 0.32);
  --accent-tint: rgba(217, 119, 87, 0.07);
  /* Near-black on the terracotta is 5.9:1. Ivory on it is 3.1:1, which is why
     a filled control never uses light text. */
  --on-accent: #141413;
  --grad-accent-v: linear-gradient(180deg, #e89274, #b85c3d);
  --grad-accent: linear-gradient(135deg, #d97757, #e89274);

  /* The blue. LIVE dot and brand-mark accent ONLY - anywhere else it competes
     with the terracotta for "this is the live thing". */
  --stripe: #6a9bcc;

  /* semantic. Up is green and down is red because that is what a price table
     means everywhere; neither is the accent, so an active control can never be
     read as a gain. The red is a cool crimson, kept well away from the
     terracotta's orange. */
  --pos: #93c97a;
  --pos-text: #93c97a;
  --neg: #f8677a;
  --warn: #e8c268;

  /* charts */
  --chart-up: var(--pos);
  --chart-down: var(--neg);
  --chart-grid: #30302e;
  --chart-axis: #474641;
  --chart-text: #a6a39a;
  --chart-vol: #383734;
  --chart-cross: var(--accent);
  --band-fill: rgba(217, 119, 87, 0.14);
  --band-edge: var(--accent);
  --band-own-fill: rgba(250, 249, 245, 0.05);
  --band-own-edge: var(--ink);

  /* brand mark */
  --mark-body: #2b2a28;
  --mark-apex: var(--accent);

  /* radii */
  --r-full: 999px;
  --r-lg: 18px;
  --r-md: 12px;
  --r-sm: 9px;

  /* type */
  --f-mono: var(--font-mono, 'JetBrains Mono'), ui-monospace, SFMono-Regular, Menlo, monospace;
  --f-sans: var(--font-sans, 'Inter'), ui-sans-serif, system-ui, -apple-system, sans-serif;
  --f-display: var(--font-display, 'Space Grotesk'), var(--f-sans);
  --track: 0.14em;
  --fs-display: clamp(40px, 6vw, 78px);
  --fs-h1: clamp(28px, 4vw, 44px);
  --fs-h2: clamp(22px, 3vw, 30px);
  --fs-h3: 20px;
  --fs-body: 16px;
  --fs-micro: 10px;
  --lh-body: 1.65;

  /* motion */
  --dur: 0.16s;
  --dur-press: 0.12s;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);

  /* depth. The glows are held lower than a neon palette would carry them:
     this accent is a matte clay, and a strong halo around it turns it into a
     warning light. */
  --sheen: rgba(250, 249, 245, 0.06);
  --glass-bg: rgba(38, 38, 36, 0.6);
  --glass-line: rgba(250, 249, 245, 0.09);
  --glass-highlight: inset 0 1px 0 rgba(250, 249, 245, 0.07);
  --glass-shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.6);
  --glow-accent: 0 0 0 1px rgba(217, 119, 87, 0.18), 0 8px 30px -10px rgba(217, 119, 87, 0.2);
  --glow-accent-strong: 0 0 0 1px rgba(217, 119, 87, 0.32), 0 10px 40px -10px rgba(217, 119, 87, 0.3);
  --card-wash: linear-gradient(180deg, rgba(217, 119, 87, 0.05), transparent 42%);
  --edge-glow: rgba(217, 119, 87, 0.45);

  /* The signature panel: hero cards, the clan profile key panel. */
  --signature-bg:
    radial-gradient(circle at 14% 0%, rgba(217, 119, 87, 0.16), rgba(0, 0, 0, 0) 52%),
    linear-gradient(145deg, #2b2a28, #262624 64%);
  --signature-shadow:
    inset 0 1px 0 rgba(232, 146, 116, 0.14),
    0 0 0 1px rgba(217, 119, 87, 0.08),
    0 18px 40px rgba(0, 0, 0, 0.35);

  /* layout */
  --rail-w: 56px;
  --rail-w-open: 212px;
  --topbar-h: 66px;
  --tabbar-h: 58px;
  --positions-max-h: 620px;
}

/* Drop the motion for anyone who has asked for less of it. */
@media (prefers-reduced-motion: reduce) {
  :root {
    --dur: 0s;
    --dur-press: 0s;
  }
}
