/* Interface tokens (docs/superpowers/specs/2026-11-28-portal-interface-
   rebuild-design.md). Every colour in app.css and chrome.css is one of
   these. The six --app-accent* tokens are overwritten per person by
   <style id="appAccent"> (services/theme_colour.py). The accent values
   here are what that service returns for its default colour, in each
   mode; tests/test_theme_contrast.py keeps the two equal. */
:root {
  --app-font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --app-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --app-text: #1a1f27; --app-muted: #56606e;
  --app-scroll-shade: rgba(0, 0, 0, 0.16); --app-bg: #f3f5f8; --app-panel: #ffffff; --app-surface: #fafbfc; --app-hover: #f5f7fa;
  --app-border: #e1e5ea; --app-border-strong: #cbd1d9; --app-border-input: #7f8996;
  --app-side-bg: #fcfcfd;
  --app-ok: #0b6b43; --app-ok-bg: #eaf6ef;
  --app-warn: #8a5300; --app-warn-bg: #fdf3df;
  --app-info: #1f5fa8; --app-info-bg: #eaf2fb;
  --app-bad: #a4262c; --app-bad-bg: #fbeceb;
  --app-accent: #c8400f; --app-accent-hover: #ac370d; --app-accent-text: #ffffff;
  --app-accent-ink: #c03d0e; --app-accent-soft: #faeee9; --app-accent-line: #edc2b2;
  --app-radius: 10px; --app-radius-control: 7px;
  /* Not text surfaces: the shadow under a menu, dialog or pop-up, and
     the veil a dialog draws over the page. */
  --app-shadow-pop: 0 8px 24px rgba(16,24,40,.12);
  --app-overlay: rgba(18,21,26,.45);
}
body.dark-mode {
  --app-text: #e7eaef; --app-muted: #a3acb9;
  --app-scroll-shade: rgba(0, 0, 0, 0.55); --app-bg: #12151a; --app-panel: #1a1e25; --app-surface: #1f242c; --app-hover: #232832;
  --app-border: #2c323c; --app-border-strong: #3a4250; --app-border-input: #78818f;
  --app-side-bg: #161a20;
  --app-ok: #6fd3a3; --app-ok-bg: #153326;
  --app-warn: #f0c36a; --app-warn-bg: #3a2c10;
  --app-info: #8fbdf0; --app-info-bg: #162b44;
  --app-bad: #f2a7a7; --app-bad-bg: #3d1a1c;
  --app-accent: #c8400f; --app-accent-hover: #ac370d; --app-accent-text: #ffffff;
  --app-accent-ink: #de8c6f; --app-accent-soft: #362321; --app-accent-line: #682d1b;
  --app-shadow-pop: 0 8px 24px rgba(0,0,0,.5);
  --app-overlay: rgba(0,0,0,.6);
}

/* The old names. Screens not yet moved read var(--theme-…); each one is
   an --app-* token under its old name. Declared on body.dark-mode as
   well as :root because a var() is worked out where it is declared: on
   :root alone the dark page would keep the light value. */
:root, body.dark-mode {
  --theme-bg-page: var(--app-bg); --theme-bg-body: var(--app-bg);
  --theme-bg-card: var(--app-panel); --theme-card-bg: var(--app-panel); --theme-surface: var(--app-panel);
  --theme-bg-elevated: var(--app-surface);
  --theme-border: var(--app-border); --theme-border-strong: var(--app-border-strong);
  --theme-text: var(--app-text); --theme-text-strong: var(--app-text);
  --theme-text-secondary: var(--app-muted); --theme-text-muted: var(--app-muted);
  --theme-accent: var(--app-accent-ink); --theme-accent-hover: var(--app-accent-ink);
  --theme-accent-fill: var(--app-accent); --theme-accent-fill-hover: var(--app-accent-hover);
  --theme-primary: var(--app-accent);
  --theme-link: var(--app-accent-ink); --theme-link-hover: var(--app-accent-ink);
  --theme-control-border: var(--app-border-input); --theme-input-border: var(--app-border-input);
  --theme-row-card: var(--app-panel); --theme-row-card-hover: var(--app-hover);
  --theme-code-bg: var(--app-surface); --theme-blockquote-bg: var(--app-surface);
  /* No --app-* twin: the same in both modes. */
  --theme-focus: #f439a0;
  --theme-bg-hover: rgba(127,127,127,.1); --theme-bg-muted: rgba(127,127,127,.12);
}
/* No --app-* twin: one value per mode. --theme-code is <code> as text
   (an address someone has to type), 4.5:1 on every ground. */
:root {
  --theme-code: #ab296a;
  --theme-shadow-card: 0 1px 3px rgba(0,0,0,0.04);
}
body.dark-mode {
  --theme-code: #ffb38a;
  --theme-shadow-card: 0 1px 3px rgba(0,0,0,0.30);
}
