/* ============================================================
   Theme — Colors
   Two layers, modeled on Ignite's theme/colors.ts:

   1. PALETTE  — raw color values. The only place a hex code
      should ever appear. Never reference --palette-* directly
      in component or page styles.
   2. SEMANTIC — names that describe *purpose* (text, border,
      accent). All other CSS uses these. To re-theme the site,
      change what the semantic tokens point to.
   ============================================================ */

:root {
  /* ---------- 1. PALETTE ---------- */

  /* Neutrals, light → dark */
  --palette-neutral-100: #ffffff;
  --palette-neutral-200: #fafafa;
  --palette-neutral-300: #f5f5f5;
  --palette-neutral-350: #eeeeee;
  --palette-neutral-400: #dddddd;
  --palette-neutral-500: #cccccc;
  --palette-neutral-600: #888888;
  --palette-neutral-650: #666666;
  --palette-neutral-700: #444444;
  --palette-neutral-750: #333333;
  --palette-neutral-800: #232323;
  --palette-neutral-850: #222222;
  --palette-neutral-900: #111111;
  --palette-black: #000000;

  /* Brand — Prussian blue.

     This replaced an oxblood (#7c2128 / #5c1319 / #e8b4b8) that had sat here
     since the newsprint redesign. The oxblood's problem was its hue angle: at
     355deg it sits just COOL of pure red, and that blue undertone is what made
     small uppercase rubrics read as a warning rather than as ink. The site sets
     a lot of small caps in the accent — section bars, kickers, ledger letters,
     degree figures — so "reads as an alert" was being paid on nearly every
     screen.

     The fix is not a warmer red. The warmth in this design already comes from
     the paper, the tan and the near-black chrome; asking the accent to supply
     it too is what forced the accent into the red family in the first place.
     Freed of that job, the accent can be cool, and cool-on-warm is the more
     stable pairing: the ground carries temperature, the accent carries weight.

     Prussian blue is also the correct MEANING for this site. It is the ink of
     ledgers, maps, library stamps and blueprints, and the site is a sourced
     citation ledger. It is the only hue here with no competing status meaning:
     red is taken by --palette-error, green by --palette-success (both live on
     the game's answer states, where a red accent sat directly beside a red
     error). At 8.9:1 on the paper ground it also has more contrast than the
     oxblood's warm-red alternatives, which matters for type this small.

     If this is ever re-tuned, keep it DARK and desaturated. A brighter blue
     turns the site into generic product chrome; the whole effect here depends
     on the accent being nearly as heavy as the body ink. */
  --palette-primary: #1f4e6b;
  --palette-primary-dark: #173a4f;

  /* Accent tint for the dark influence band. Prussian at full strength is too
     close to the near-black ink to read there, so the band uses this lighter
     tint instead. */
  --palette-primary-soft: #b3ccdb;

  /* Newsprint, as a three-step stack from the page ground DOWN into the sheet.

     --palette-paper is the page ground: true white, for crispness. The design's
     warmth lives in the sunk surface, the tan, the rule and the near-black
     chrome, which are far enough off neutral to be seen.

     --palette-paper-raised is the card surface, so cards, panels and callouts
     read as sheets laid on the page. It is a WHISPER of a tint on purpose: any
     warmer turns a card grid into beige blocks. Judge it on the artist page
     head (one very wide card alone on white, the worst case), not on the
     album or genre grids.

     At this strength the tone CANNOT define a card and is not meant to. The edge
     is the --color-divider hairline's job, and every card using --color-bg-card
     carries one. If a card needs more definition, strengthen its border or its
     shadow. Do not deepen this.

     --palette-paper-sunk is the recessed surface, below the ground. It is the
     one surface in this stack that stays visibly tinted: it has to read as sunk,
     and unlike a card it is usually a small area nested inside something else.
     --palette-rule is the hairline that replaces neutral-350 on a warm ground. */
  --palette-paper: #ffffff;
  --palette-paper-raised: #fdfcfa;
  --palette-paper-sunk: #f3eee4;
  --palette-rule: #ded6c9;

  /* Warm near-black for the header/footer chrome. Pure #000 next to a warm
     paper ground reads as a hole; this keeps the contrast and loses the chill. */
  --palette-ink: #141210;

  /* The *tinted surface* token: the writing room's paper
     (admin_styles/writing.css), the game's redacted medallion
     (page_styles/game.css), and writer graph nodes (js/writer_network.js) all
     need to sit visibly on top of something.

     This used to share a value with --palette-paper, with a note that it must
     stay distinguishable if the page ground ever moved. The ground has now moved
     to an almost-white, so this keeps the full cream as its own literal value.

     Deliberately NOT pointed at --palette-paper-raised: that token is a faint
     card tint that leans on a border to define its edge, whereas these are
     single objects that have to read as tinted on their own — a writing surface,
     a medallion, a graph node. They want the tone. */
  --palette-tan: #fbf8f3;

  /* Status */
  --palette-error: #b00020;
  --palette-success: #137333;

  /* Data visualization (artist network graph, game graph, legend dots).

     These were a stock Tailwind blue (#3b82f6) and emerald (#10b981), which
     had two problems. The blue fought the accent — two unrelated blues on one
     page read as an inconsistency, not a distinction — and both were far too
     light for this ground: 3.7:1 and 2.5:1 on white, so the legend dots and
     graph nodes were the least legible marks on the page.

     Now: influence IS the accent, since an influence edge is the site's
     subject and should carry the brand color rather than a second blue.
     Listens is a muted green held 73deg off the accent's hue, which keeps the
     two readable apart without either looking like a status light. Both clear
     5:1 on paper. Keep them desaturated — these sit on a warm newsprint
     ground, and a saturated data color on this surface reads as a UI element
     that wandered in from another site. */
  --palette-viz-influence: var(--palette-primary);
  --palette-viz-listens: #4a7a52;

  /* ---------- 2. SEMANTIC TOKENS ---------- */

  /* Accent / brand */
  --color-accent: var(--palette-primary);
  --color-accent-hover: var(--palette-primary-dark);
  /* Accent for use on the dark band, where the full-strength Prussian is too
     near the ink ground to separate from it. */
  --color-accent-on-dark: var(--palette-primary-soft);

  /* Text */
  --color-body-text: var(--palette-neutral-800);
  --color-heading-text: var(--palette-neutral-900);
  --color-text: var(--palette-neutral-900);
  --color-heading: var(--palette-neutral-900);
  --color-heading-muted: var(--palette-neutral-700);
  --color-subtle-text: var(--palette-neutral-650);
  --color-text-muted: var(--palette-neutral-650);
  --color-gray-text: var(--palette-neutral-750);
  --color-link: var(--palette-neutral-850);

  /* Legacy aliases (prefer the names above in new code) */
  --color-black: var(--palette-neutral-900);
  --color-dark-gray: var(--palette-neutral-850);
  --color-white: var(--palette-neutral-100);
  --color-light-gray: var(--palette-neutral-400);

  /* Backgrounds.
     --color-bg-card is deliberately DISTINCT from --color-bg: the ground is white
     and cards carry a whisper of warm tint above it, so a card reads as a sheet
     laid on the page. This replaced an earlier scheme where the two were equal
     and the site read as one continuous sheet, which made the whole page a
     mid-tone wash. See --palette-paper-raised above for why the tint stays faint
     and what to reach for instead if cards need more definition. */
  --color-bg: var(--palette-paper);
  --color-bg-card: var(--palette-paper-raised);
  --color-bg-subtle: var(--palette-paper-sunk);
  --color-background: var(--palette-paper-sunk);
  --color-background-light: var(--palette-paper-sunk);
  --color-background-tan: var(--palette-tan);

  /* Borders & dividers */
  --color-border: var(--palette-neutral-500);
  --color-divider: var(--palette-rule);

  /* Status */
  --color-error: var(--palette-error);
  --color-success: var(--palette-success);

  /* Artist network graph */
  --color-viz-influence: var(--palette-viz-influence);
  --color-viz-listens: var(--palette-viz-listens);

  /* Dark header / footer region */
  --header-bg: var(--palette-ink);
  --text-light: var(--palette-neutral-100);
  --text-muted: var(--palette-neutral-500);
}
