/* THE ONLY PLACE BRAND LIVES. Every colour, font, radius and spacing value is a variable here.
   site.css, paper.css and demo.css use var(--…) only. Source: brand/truman-brand-book.html (2026-11-06), whose
   :root is the app's own (truman/ui/style.css). Each colour is light-dark(light, dark); color-scheme follows the
   OS and [data-theme] overrides it. Proportion: ground 86%, ink 9%, accent 3%, state 2%. Budapest Bright
   (sun, apricot, coral, cream, pink, brick, ink) is reserved for state; headlines are ink, never colour. */
:root {
  color-scheme: light dark;

  /* palette: state only */
  --pink: #ff9ac8; --coral: #ff4d5a; --brick: #e03a1e; --sun: #ffc90e; --apricot: #ffb25b; --clay: #d98a4a; --cream: #fff3d6; --ink: #4a0f18;

  /* surfaces and text */
  --bg: light-dark(#fafafa, #1c1c1c);
  --bg-deep: light-dark(#f1f1f1, #121212);
  --panel: light-dark(#ffffff, #171717);
  --raised: light-dark(#f4f4f4, #2a2a2a);
  --border: light-dark(#d9d9d9, #2e2e2e);
  --control-border: light-dark(#767676, #707070);
  --text: light-dark(#1c1c1c, #ededed);
  --muted: light-dark(#5f5f5f, #b4b4b4);
  --subtle: light-dark(#6b6b6b, #a0a0a0);

  /* accent (cyan-blue): the one action per screen, links, selection */
  --accent: light-dark(#0b6ea3, #1e9bd7);
  --accent-text: light-dark(#0b6ea3, #3fb0e6);
  --on-accent: light-dark(#ffffff, #04141c);
  --focus: light-dark(#0b6ea3, #3fb0e6);

  /* state. Stamp colours: Cal's decision of 2026-11-07 (newest wins over the book): approve and resolve are green,
     retire and reject are red. These are the values the Truman app uses. */
  --stamp: light-dark(#1f7a3a, #5fd38a);
  --stamp-neg: light-dark(#b8290c, #ff9ac8);
  --danger-text: light-dark(#b8290c, #ff4d5a);
  --warn-text: light-dark(#7a4a1e, #ffb25b);
  --add: light-dark(#1a7f37, #3fb950);
  --del: light-dark(#c4212d, #ff6b73);
  --ok-text: var(--add);
  --pill-pending: var(--sun);
  --pill-stale: var(--apricot);
  --pill-danger: var(--coral);
  --pill-info: var(--cream);
  --on-pill: var(--ink);
  --selected-bar: light-dark(var(--brick), var(--coral));
  --selected-bg: light-dark(var(--cream), #2a2a2a);
  --select-bg: light-dark(var(--cream), var(--pink));
  --select-fg: var(--ink);
  --shadow: light-dark(0 8px 30px rgb(0 0 0 / .14), 0 8px 30px rgb(0 0 0 / .55)); /* floating layers only (consent panel) */
  --edge: light-dark(#a8a8a8, #5a5a5a);

  /* logo: the T follows the text token, the dot never changes */
  --mark-ink: light-dark(#000000, #ededed);
  --mark-dot: #ffc70a;

  /* aliases kept so older rules read the book's tokens */
  --code-bg: var(--bg-deep);
  --card: var(--panel);
  --card-border: var(--border);
  --add-bg: color-mix(in srgb, var(--add) 12%, transparent);
  --del-bg: color-mix(in srgb, var(--del) 12%, transparent);

  /* type: Newsreader only above 28 px; system UI for text; JetBrains Mono for evidence */
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body: system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: var(--font-body);
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --fs-base: 15px;
  --fs-small: 13.5px;
  --fs-mono: 12.5px;
  --lh-body: 1.6;
  --fw-head: 600;
  --measure: 68ch;

  /* shape and space: radii 3 focus, 4 stamp, 6 controls, 8 panels, 10 pills; 4 px base */
  --r-focus: 3px;
  --r-stamp: 4px;
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 8px;
  --r-pill: 10px;
  --r-full: 999px; /* header bar buttons (floating-bar pattern, 2026-11-07) */
  --r-bar: 16px; --r-bar-item: 10px; --bar-inset: clamp(16px, 2vw, 24px);
  --maxw: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --gap: 24px;
  --section-pad: clamp(48px, 8vw, 96px);
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
