/* VENDORED from the Pantheon design system (design/tokens.css), unmodified below this
 * note. It is the parent platform's single source of colour, type, space and shape, and
 * styles.css builds on it by token NAME. To pick up a design-system change, replace this
 * file wholesale — never edit values here; put anything Pages-specific in styles.css. */

/* Pantheon design tokens
   One source for every colour, type size, spacing step, radius, border,
   shadow and motion value used by Pheme, Muse, the docs site and the demos.
   No other file in the system may contain a raw colour.

   Structure
     1. Brand primitives   measured from design/brand/FeatureImage.png
     2. Semantic tokens    light values on :root
     3. Dark values        under prefers-color-scheme, guarded, then again
                           under [data-theme="dark"] so a toggle wins both ways
   Every token is first declared on bare :root. The two dark blocks only
   redefine. */

:root {
  color-scheme: light;

  /* 1. Brand primitives (do not use directly in components; alias them) */
  --brand-sky-1: #78c0fc;   /* wordmark highlight */
  --brand-sky-2: #60b4f0;   /* wordmark mid */
  --brand-sky-3: #48a8e4;   /* wordmark shadow; 2.63:1 on white, marks only */
  --brand-deep: #1b6fae;    /* text-safe brand blue, 5.34:1 on white */
  --brand-deeper: #155a8c;
  --brand-coral: #e85d4c;   /* the checkmark and chart points; 3.44:1, marks only */
  --brand-coral-ink: #b93a2a; /* text-safe coral, 5.67:1 on white */
  --brand-charcoal: #303030;
  --brand-slate: #485460;
  --brand-grey: #e4e4e4;
  --brand-white: #ffffff;   /* the feature image's ground; theme-invariant, logo tiles only */

  /* 2. Semantic: surfaces and ink */
  --bg: #f5f7f9;            /* page */
  --surface: #ffffff;       /* cards, rows, inputs */
  --surface-2: #eaeef2;     /* sunken: code, zebra rows, table heads, neutral tints */
  --surface-3: #dfe6ec;     /* hover on a sunken surface */
  --ink: #262b30;           /* primary text */
  --ink-2: #485460;         /* secondary text, table heads, reported modality */
  --quiet: #5f6b76;         /* captions, metadata, rumoured and planned modality */
  --faint: #7f8a94;         /* placeholders, disabled; 3:1, never body text */
  --line: #d5dce3;          /* hairlines, dividers, card edges */
  --line-strong: #7f8c98;   /* input borders and anything that must read as a control, 3:1 */

  /* Interaction: the brand blue has one job on screen, "you can act here" */
  --accent: var(--brand-deep);        /* links, primary buttons, focus, active nav */
  --accent-strong: var(--brand-deeper);
  --accent-on: #ffffff;               /* text on --accent */
  --accent-mark: #1f86cc;             /* brand blue for non-text marks: bars, rings, 3.9:1 */
  --accent-wash: #e3f0fb;             /* selected row, hover tint; ink stays --ink */
  --focus: var(--brand-deep);
  --focus-halo: var(--surface);

  /* Evidence: the highlighter. Text on it is always --ink */
  --evidence: #fdf2a8;
  --evidence-edge: #e3c94a;           /* hairline under a span, 1.5:1 decorative only */

  /* Negation: coral's one job. Denied, cancelled, ended, contradicts, rejected */
  --negative: var(--brand-coral-ink); /* text and strike ink */
  --negative-mark: var(--brand-coral);/* glyphs, chart points */
  --negative-wash: #fde4df;

  /* Modality: certainty is ink density, shape carries it (see components) */
  --modality-confirmed: var(--ink);
  --modality-reported: var(--ink-2);
  --modality-rumoured: var(--quiet);
  --modality-planned: var(--quiet);

  /* Source tier: four bars, filled count = tier. Satire is struck */
  --tier-fill: var(--ink-2);
  --tier-empty: var(--line-strong);
  --tier-satire: var(--negative);

  /* Bitemporal: valid time is the world (ink), recorded time is Muse (brand) */
  --valid: var(--ink-2);
  --valid-wash: var(--surface-2);
  --recorded: var(--accent-mark);
  --recorded-wash: var(--accent-wash);
  --asof: var(--negative-mark);        /* the as-of cursor is the one coral line on a timeline */

  /* Review status: fixed scale, always icon + label */
  --status-good: #1f6b3a;   --status-good-wash: #dcefe1;   /* verified, published */
  --status-warn: #7a5a0c;   --status-warn-wash: #f9ead2;   /* needs review, held */
  --status-critical: var(--negative); --status-critical-wash: var(--negative-wash); /* rejected */
  --status-neutral: var(--quiet);     --status-neutral-wash: var(--surface-2);     /* candidate, superseded */

  /* Charts: validated categorical order (dataviz skill, light surface #ffffff) */
  --chart-1: #1f86cc;  /* brand blue */
  --chart-2: #eb6834;  /* orange */
  --chart-3: #1baf7a;  /* aqua, relief required */
  --chart-4: #eda100;  /* yellow, relief required */
  --chart-5: #e87ba4;  /* magenta, relief required */
  --chart-6: #008300;  /* green */
  --chart-7: #6250d6;  /* violet */
  --chart-seq-1: #cfe5f7; --chart-seq-2: #9ccbee; --chart-seq-3: #5fa9df;
  --chart-seq-4: #1f86cc; --chart-seq-5: #155a8c;
  --chart-div-neg: var(--brand-coral); --chart-div-mid: #e4e7ea; --chart-div-pos: var(--chart-1);
  --chart-grid: #e6eaee;
  --chart-axis: #b9c3cc;
  --chart-surface: var(--surface);

  /* Type */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --font-display: var(--font-sans);
  --fs-1: 0.72rem;   /* 11.5px labels, eyebrows */
  --fs-2: 0.8125rem; /* 13px dense UI, queue rows, table cells */
  --fs-3: 0.875rem;  /* 14px UI default, captions */
  --fs-4: 1rem;      /* 16px document body */
  --fs-5: 1.125rem;  /* 18px lead, fact claim */
  --fs-6: 1.375rem;  /* 22px h3 */
  --fs-7: 1.75rem;   /* 28px h2 */
  --fs-8: 2.25rem;   /* 36px h1 */
  --lh-tight: 1.2;
  --lh-ui: 1.4;
  --lh-body: 1.6;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --tracking-label: 0.06em;
  --tracking-display: -0.015em;

  /* Space (4px rhythm) */
  --s-1: 0.25rem; --s-2: 0.5rem; --s-3: 0.75rem; --s-4: 1rem;
  --s-5: 1.5rem;  --s-6: 2rem;   --s-7: 3rem;    --s-8: 4rem;
  --measure: 68ch;
  --gutter: max(16px, env(safe-area-inset-left, 0px));

  /* Shape: the wordmark's rounded geometry */
  --r-1: 4px;     /* inputs, small chips */
  --r-2: 8px;     /* cards, buttons, diagram boxes */
  --r-3: 12px;    /* panels, figures */
  --r-pill: 999px;/* badges, entity chips, the P counter */
  --bw: 1px;
  --bw-strong: 1.5px;
  --stroke: 1.25; /* SVG diagram stroke width (unitless) */

  /* Elevation and motion */
  --shadow-1: 0 1px 2px rgba(38, 43, 48, 0.06), 0 2px 8px rgba(38, 43, 48, 0.05);
  --shadow-2: 0 4px 16px rgba(38, 43, 48, 0.10), 0 1px 3px rgba(38, 43, 48, 0.06);
  --dur: 140ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

/* Optional open-licensed display layer. Opt in with data-type="rounded".
   Uses a locally installed face if present, otherwise the system stack.
   Never a dependency: no @font-face, nothing fetched. */
:root[data-type="rounded"] {
  --font-display: "Nunito", "Varela Round", "Quicksand", var(--font-sans);
}

/* 3. Dark values. Same hues stepped for a dark ground; not an inversion. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #14191e;
    --surface: #1b2229;
    --surface-2: #242d35;
    --surface-3: #2c3640;
    --ink: #e6ebef;
    --ink-2: #c3ccd4;
    --quiet: #96a3ae;
    --faint: #7a8792;
    --line: #2f3a44;
    --line-strong: #6b7a87;
    --accent: #78c0fc;
    --accent-strong: #a3d4ff;
    --accent-on: #14191e;
    --accent-mark: #3b96e0;
    --accent-wash: #1d2f40;
    --focus: #78c0fc;
    --focus-halo: #14191e;
    --evidence: #4d4520;
    --evidence-edge: #8a7a2a;
    --negative: #ff8a78;
    --negative-mark: #e85d4c;
    --negative-wash: #3a1f1b;
    --status-good: #7fcf98; --status-good-wash: #173a26;
    --status-warn: #e2b45a; --status-warn-wash: #3d3113;
    --chart-1: #3b96e0; --chart-2: #d95926; --chart-3: #199e70; --chart-4: #c98500;
    --chart-5: #d55181; --chart-6: #008300; --chart-7: #9085e9;
    --chart-seq-1: #1d2f40; --chart-seq-2: #1f4d73; --chart-seq-3: #2a6fa6;
    --chart-seq-4: #3b96e0; --chart-seq-5: #78c0fc;
    --chart-div-mid: #38424b;
    --chart-grid: #273039;
    --chart-axis: #4a5661;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.25);
    --shadow-2: 0 4px 16px rgba(0, 0, 0, 0.45), 0 1px 3px rgba(0, 0, 0, 0.3);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #14191e;
  --surface: #1b2229;
  --surface-2: #242d35;
  --surface-3: #2c3640;
  --ink: #e6ebef;
  --ink-2: #c3ccd4;
  --quiet: #96a3ae;
  --faint: #7a8792;
  --line: #2f3a44;
  --line-strong: #6b7a87;
  --accent: #78c0fc;
  --accent-strong: #a3d4ff;
  --accent-on: #14191e;
  --accent-mark: #3b96e0;
  --accent-wash: #1d2f40;
  --focus: #78c0fc;
  --focus-halo: #14191e;
  --evidence: #4d4520;
  --evidence-edge: #8a7a2a;
  --negative: #ff8a78;
  --negative-mark: #e85d4c;
  --negative-wash: #3a1f1b;
  --status-good: #7fcf98; --status-good-wash: #173a26;
  --status-warn: #e2b45a; --status-warn-wash: #3d3113;
  --chart-1: #3b96e0; --chart-2: #d95926; --chart-3: #199e70; --chart-4: #c98500;
  --chart-5: #d55181; --chart-6: #008300; --chart-7: #9085e9;
  --chart-seq-1: #1d2f40; --chart-seq-2: #1f4d73; --chart-seq-3: #2a6fa6;
  --chart-seq-4: #3b96e0; --chart-seq-5: #78c0fc;
  --chart-div-mid: #38424b;
  --chart-grid: #273039;
  --chart-axis: #4a5661;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-2: 0 4px 16px rgba(0, 0, 0, 0.45), 0 1px 3px rgba(0, 0, 0, 0.3);
}
