/* Cipherra's design tokens: the one place colours, type sizes and control sizes are defined.
   Components use these names; dark mode changes only the values here.
   The palette comes from the logo: Cipherra blue (#0d2599) on cool neutral greys.
   Text colours meet WCAG AA (4.5:1) on every surface they are used on: canvas, surface, subtle and hover. */
:root{
  /* surfaces, from the page behind everything to the hover state of a row */
  --canvas:#f4f5f9;--surface:#fafbfd;--surface-raised:#ffffff;--surface-subtle:#eceef4;--surface-hover:#e5e8f1;
  --surface-inverse:#141a33;--on-inverse:#e7eaf5;--on-inverse-muted:#b0b7cf;
  /* text */
  --text:#1b2033;--text-muted:#525a70;--text-faint:#5b6378;
  /* lines */
  --border:#dce0e9;--border-strong:#c2c8d7;
  /* brand and state: --brand is the logo's own blue; --accent is the same blue for controls */
  --brand:#0d2599;--on-brand:#ffffff;
  --accent:#0d2599;--accent-strong:#091b73;--accent-hover:#0b2087;--accent-soft:#e6eaf9;--on-accent:#ffffff;
  --danger:#a8382c;--danger-soft:#f8e4e1;--warning:#835f12;--warning-soft:#f5ecd6;--info:#1f62c0;--info-soft:#e3ecfa;
  --success:#22744a;--success-soft:#e1f2e8;
  --focus:#4b64e0;
  /* the drawing and image backdrops follow the theme */
  --viewer-backdrop:#eceef4;--drawing-paper:#ffffff;
  --overlay-bg:color-mix(in srgb,var(--surface-raised) 94%,transparent);
  --shadow:0 8px 24px #141c3d0d;--shadow-overlay:0 12px 35px #0d1a4d1f;

  /* type scale: nothing below 12px */
  --text-xs:12px;   /* captions, badges, counts */
  --text-sm:13px;   /* secondary text, controls */
  --text-md:14px;   /* body text, chat */
  --text-lg:16px;   /* section titles */
  --text-xl:20px;   /* page titles */
  --display:"Iowan Old Style","Palatino Linotype",Georgia,serif;

  /* controls: at least 32px with a mouse, 44px on touch screens */
  --control-h:32px;--control-touch-h:44px;--radius:13px;--radius-sm:8px;

  /* older names, kept as aliases so every stylesheet reads the same tokens */
  --paper:var(--canvas);--white:var(--surface-raised);--ink:var(--text);--muted:var(--text-muted);--line:var(--border);
  --green:var(--accent-strong);--lime:var(--accent-soft);--dark:var(--surface-inverse);
}
:root[data-theme=dark]{
  --canvas:#10131d;--surface:#151925;--surface-raised:#1c2130;--surface-subtle:#20263a;--surface-hover:#283048;
  --surface-inverse:#0b0e17;--on-inverse:#e4e7f2;--on-inverse-muted:#a9b0c7;
  --text:#e4e7f2;--text-muted:#aab1c6;--text-faint:#9ca4bb;
  --border:#2b3247;--border-strong:#3f4862;
  /* the logo keeps its blue but lifts a little so it holds on a dark page */
  --brand:#2f4fd6;--on-brand:#ffffff;
  --accent:#a8b7ff;--accent-strong:#a8b7ff;--accent-hover:#c1ccff;--accent-soft:#1f2852;--on-accent:#0b1233;
  --danger:#f2a497;--danger-soft:#45231e;--warning:#e2c27e;--warning-soft:#3d321b;--info:#9cc0f7;--info-soft:#1c2a40;
  --success:#8fd3a9;--success-soft:#1b3326;
  --focus:#8ea0ff;
  --viewer-backdrop:#0d1018;--drawing-paper:#1a1f2c;
  --shadow:0 15px 55px #0006;--shadow-overlay:0 15px 55px #0008;
  --green:var(--accent);--lime:var(--accent-soft);
}
