:root {
  /* ---- Base palette: 1967 poster inks, held at low chroma on warm off-white stock.
     Poppy is the accent; everything else is wayfinding. Load tokens/loud.css after
     styles.css for the full-strength poster register. ---- */
  --ink-900: #24211C;
  --ink-800: #3A362F;
  --ink-700: #57524A;
  --ink-500: #7D776D;
  --ink-300: #A9A399;

  --paper-100: #FDFCF8;
  --paper-200: #F7F4EC;
  --paper-300: #EFEBE0;
  --paper-400: #DFD9CB;

  --poppy-600: #A03422;
  --poppy-500: #C4452F;
  --poppy-300: #DE9084;
  --poppy-100: #F6E5E0;

  --marigold-600: #966D2A;
  --marigold-500: #B98A3C;
  --marigold-300: #D8BC84;
  --marigold-100: #F3ECDD;

  --banana-500: #D8C87A;
  --banana-300: #E8DFB8;
  --banana-100: #F7F3E4;

  --teal-700: #37605B;
  --teal-500: #4A7F79;
  --teal-300: #93B5B1;
  --teal-100: #E2ECEA;

  --aqua-500: #6D9BA6;
  --aqua-300: #A9C4CB;
  --aqua-100: #E6EEF1;

  --grape-600: #574B6E;
  --grape-500: #6E6089;
  --grape-300: #A79BBC;
  --grape-100: #EAE7F0;

  --rose-500: #B0778C;
  --rose-300: #D0AAB7;
  --rose-100: #F3E9ED;

  /* ---- Semantic aliases ---- */
  --surface-page: var(--paper-200);
  --surface-card: var(--paper-100);
  --surface-sunken: var(--paper-300);
  --surface-inverse: var(--ink-900);
  --surface-accent: var(--marigold-500);

  --text-strong: var(--ink-900);
  --text-body: var(--ink-800);
  --text-muted: var(--ink-500);
  --text-on-dark: var(--paper-100);
  --text-on-accent: var(--ink-900);
  --text-link: var(--poppy-600);
  --text-link-hover: var(--poppy-500);

  --line-strong: var(--ink-900);
  --line-soft: #E4DFD4;

  --accent: var(--poppy-500);
  --accent-press: var(--poppy-600);
  --accent-secondary: var(--teal-500);
  --accent-tertiary: var(--grape-500);

  /* The one "you are here" fill: sidebar row, segmented segment, toggled icon button. */
  --selected-fill: var(--paper-100);
  --selected-text: var(--poppy-600);

  --state-focus: var(--grape-500);
  --state-positive: var(--teal-500);
  --state-warn: var(--marigold-500);
  --state-danger: var(--poppy-600);

  /* Mode hues: the one place the palette keeps real separation — six identifiers that must
     never be mistaken for each other. Spread by hue angle AND lightness, above the surface
     palette's chroma but below poppy's, so the accent still leads. */
  --mode-text: #C4452F;      /* red */
  --mode-cover: #6F52A0;     /* violet */
  --mode-repaint: #C08A1E;   /* ochre */
  --mode-lego: #2F7A6B;      /* green */
  --mode-extract: #3D82A8;   /* blue */
  --mode-complete: #B45577;  /* pink */
}

/* Night: the same inks printed on black stock. Used by the macOS player and
   any full-bleed listening surface. */
[data-theme="night"] {
  --surface-page: var(--ink-900);
  --surface-card: var(--ink-800);
  --surface-sunken: #14100E;
  --surface-inverse: var(--paper-100);
  --text-strong: var(--paper-100);
  --text-body: var(--paper-200);
  --text-muted: var(--ink-300);
  --text-on-dark: var(--paper-100);
  --line-strong: var(--paper-100);
  --line-soft: var(--ink-700);
}
