/* Runningstart rebuild - design tokens (owner: platform).
   Applexus palette, phase colours, fonts, spacing, light and dark mode.
   Theme: follows the system unless <html data-theme="light|dark"> is set. */

/* Carlito, extracted from the Runningstart portal (assets/manifest.json). */
@font-face { font-family: "Carlito"; font-style: normal; font-weight: 400; font-display: swap; src: url("../../assets/fonts/runningstart/runningstart-01.woff2") format("woff2"); }
@font-face { font-family: "Carlito"; font-style: italic; font-weight: 400; font-display: swap; src: url("../../assets/fonts/runningstart/runningstart-02.woff2") format("woff2"); }
@font-face { font-family: "Carlito"; font-style: normal; font-weight: 700; font-display: swap; src: url("../../assets/fonts/runningstart/runningstart-03.woff2") format("woff2"); }
@font-face { font-family: "Carlito"; font-style: italic; font-weight: 700; font-display: swap; src: url("../../assets/fonts/runningstart/runningstart-04.woff2") format("woff2"); }

:root {
  /* Applexus blues and accents */
  --ax-blue: #0049b4;
  --ax-sky: #0091ee;
  --ax-blue-2: #0a5ac8;
  --ax-blue-3: #2b7de0;
  --ax-purple: #632cbd;   /* sparingly; never in logos */
  --ax-orange: #ff7d1e;
  --ax-green: #427c2c;
  --ax-teal: #0f8b8d;

  /* Phase colours */
  --ph-prepare: #0091ee;
  --ph-discover: #2b7de0;
  --ph-design: #0049b4;
  --ph-build: #632cbd;
  --ph-validate: #ff7d1e;
  --ph-deploy: #0a5ac8;
  --ph-run: #5ea044;
  --ph-addon: #6b7482;

  /* Autonomy levels */
  --lvl-1: #0f8b8d;
  --lvl-2: #0049b4;
  --lvl-3: #9a3fbf;

  /* Type */
  --font: Calibri, "Carlito", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-mono: Consolas, "Cascadia Mono", ui-monospace, monospace;
  --fs: 15px;
  --fs-sm: 13px;
  --fs-xs: 12px;
  --lh: 1.55;

  /* Spacing and shape */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 28px; --sp-7: 40px;
  --r-sm: 6px; --r: 10px; --r-lg: 14px; --r-pill: 999px;
  --maxw: 1180px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 2px 8px rgba(16, 24, 40, .06);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .18);
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* Light theme (default) */
  --bg: #f4f6f9;
  --surface: #ffffff;
  --soft: #f7f9fc;
  --ink: #1d2430;
  --muted: #5b6675;
  --line: #dfe5ec;
  --accent: #0049b4;
  --accent2: #0091ee;
  --on-accent: #ffffff;
  --ok: #2e7d32;
  --warn: #a35a00;
  --danger: #b3261e;
  --todo-bg: #fff7e6;
  --todo-line: #e8c27a;
  --header-bg: #ffffff;
  --overlay: rgba(10, 15, 25, .55);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f141b; --surface: #171e27; --soft: #1c2430; --ink: #e6ebf2; --muted: #9aa6b6; --line: #2a3442;
    --accent: #5b9dff; --accent2: #45b4ff; --on-accent: #0b1220; --ok: #6cc070; --warn: #f0b35a; --danger: #ff8a80;
    --todo-bg: #2b2416; --todo-line: #6b5a2e; --header-bg: #131a22; --overlay: rgba(0, 0, 0, .65);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f141b; --surface: #171e27; --soft: #1c2430; --ink: #e6ebf2; --muted: #9aa6b6; --line: #2a3442;
  --accent: #5b9dff; --accent2: #45b4ff; --on-accent: #0b1220; --ok: #6cc070; --warn: #f0b35a; --danger: #ff8a80;
  --todo-bg: #2b2416; --todo-line: #6b5a2e; --header-bg: #131a22; --overlay: rgba(0, 0, 0, .65);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4); color-scheme: dark;
}

/* Portal accents for the shared method views (set by the shell as <html data-portal="…">). */
:root { --pa: #0049b4; --pa-deep: #072a5e; --pa-tint: #e8f0fb; --pa-add: #ff7d1e; --pa-text: #0049b4; --hero-bg: linear-gradient(120deg, #041a3d 0%, #072a5e 45%, #0a3f8f 100%); --hero-glow: rgba(99, 44, 189, .55); --depth: 0 1px 2px rgba(7, 42, 94, .06), 0 10px 26px -14px rgba(7, 42, 94, .35); }
[data-portal="consenz"] { --pa: #632cbd; --pa-deep: #2a1a6e; --pa-tint: #f1ebfb; --pa-add: #632cbd; --pa-text: #632cbd; }
[data-portal="celerite"] { --pa: #c25a0a; --pa-deep: #7a3400; --pa-tint: #fdf0e6; --pa-add: #c25a0a; --pa-text: #a34b00; --hero-glow: rgba(0, 145, 238, .35); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --pa-tint: #1d2638; --pa-text: #8db8ff; --depth: 0 1px 2px rgba(0, 0, 0, .4); }
  :root:not([data-theme="light"])[data-portal="consenz"] { --pa-tint: #251d3a; --pa-text: #b79cf5; }
  :root:not([data-theme="light"])[data-portal="celerite"] { --pa-tint: #33241a; --pa-text: #f2a463; }
}
:root[data-theme="dark"] { --pa-tint: #1d2638; --pa-text: #8db8ff; --depth: 0 1px 2px rgba(0, 0, 0, .4); }
:root[data-theme="dark"][data-portal="consenz"] { --pa-tint: #251d3a; --pa-text: #b79cf5; }
:root[data-theme="dark"][data-portal="celerite"] { --pa-tint: #33241a; --pa-text: #f2a463; }
