/* Design tokens for SKD Intel (see DESIGN.md, section 2). The only place colours are written.
   The same file is used by the public site and the paid app: keep the two copies identical.
   Light values on :root; dark values twice (system setting, and data-theme="dark" for a
   future theme switch). Change a dark value in BOTH dark blocks. */
:root{
  /* light surfaces */
  --bg:#ffffff;
  --alt:#f3f5f8;
  --card:#ffffff;
  --text:#0b1220;
  --text-2:#3b4657;
  --muted:#5b6577;
  --line:#e2e6ec;
  --field:#7d8798;            /* darker than DESIGN.md's #c5ccd6 so form borders reach 3:1 (section 12.2) */
  /* panels inside a card (paid app tools): a clearer tint and edge than --alt/--line, so each
     section stands apart from the white card around it; fields inside stay --card */
  --panel:#eceff4;
  --panel-line:#cdd3dc;

  /* accent */
  --accent:#2447d6;
  --accent-hover:#1a35a8;
  --accent-text:#2447d6;
  --accent-soft:#eef2ff;
  --on-accent:#ffffff;

  /* band surfaces: dark in both themes */
  --band:#0b1220;
  --band-2:#131c2e;
  --band-3:#1a2333;
  --band-line:#263248;
  --band-line-2:#3a4659;
  --band-text:#ffffff;
  --band-text-2:#c7ced8;
  --band-muted:#a3adbf;
  --band-accent:#8fa8ff;
  --band-nav:#e6eaf2;          /* header nav links (section 12.1) */

  /* status */
  --signal:#f5b544;           /* attention only */
  --on-signal:#1a1200;
  --ok-bg:#e3f5ea;
  --ok-fg:#11603a;
  --warn-bg:#fdf0d8;
  --warn-fg:#7a4a00;
  --error:#b42318;

  /* risk scale for Wallet Investigator scores and findings (paid app). Each -fg passes
     4.5:1 on --bg, --alt and --card, and on its own -bg tile, in both themes. */
  --risk-low:#11603a;      --risk-low-bg:#e3f5ea;
  --risk-mid:#7a4a00;      --risk-mid-bg:#fdf0d8;
  --risk-high:#b42318;     --risk-high-bg:#fde8e6;
  --risk-critical:#7a1410; --risk-critical-bg:#fbd5d1;

  /* focus ring: --accent-text on light surfaces; .band surfaces switch it to --band-accent
     (section 12.3: --band-accent alone is too faint on white) */
  --focus:var(--accent-text);

  /* type */
  --font-sans:'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-mono:'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  /* layout */
  --container:1200px;
  --container-narrow:880px;
  --gutter:24px;
  --section-y:104px;
  --header-h:72px;

  /* shape (section 5.1; the literals 10, 14 and 18px are tokens here, section 12.4) */
  --radius-sm:8px;
  --radius-tile:10px;
  --radius-md:12px;
  --radius-card:14px;
  --radius-lg:16px;
  --radius-form:18px;
  --radius-xl:20px;
  --radius-pill:999px;
  --shadow-card:0 1px 2px rgba(11,18,32,0.06), 0 12px 32px rgba(11,18,32,0.08);
}

@media (max-width:700px){
  :root{ --section-y:72px; }
}

@media (prefers-color-scheme: dark){
  :root:not([data-theme='light']){
    --bg:#0e1420;
    --alt:#131b2a;
    --card:#172133;
    --text:#e8ecf3;
    --text-2:#c3cad6;
    --muted:#9aa4b5;
    --line:#263247;
    --field:#6b7890;
    --panel:#1e2a40;
    --panel-line:#34415a;
    --accent:#3a5be8;
    --accent-hover:#5272f0;
    --accent-text:#93aaff;
    --accent-soft:#1c2950;
    --band:#080d17;
    --band-2:#111a2a;
    --band-3:#162036;
    --ok-bg:#123524;
    --ok-fg:#8ee0b0;
    --warn-bg:#3a2a0c;
    --warn-fg:#f5c77a;
    --error:#ff8a80;
    --risk-low:#8ee0b0;      --risk-low-bg:#123524;
    --risk-mid:#f5c77a;      --risk-mid-bg:#3a2a0c;
    --risk-high:#ff8a80;     --risk-high-bg:#3d1714;
    --risk-critical:#ffb3ab; --risk-critical-bg:#4a1210;
    --focus:var(--band-accent);
    --shadow-card:0 1px 2px rgba(0,0,0,0.4), 0 12px 32px rgba(0,0,0,0.35);
  }
}

:root[data-theme='dark']{
  --bg:#0e1420;
  --alt:#131b2a;
  --card:#172133;
  --text:#e8ecf3;
  --text-2:#c3cad6;
  --muted:#9aa4b5;
  --line:#263247;
  --field:#6b7890;
  --panel:#1e2a40;
  --panel-line:#34415a;
  --accent:#3a5be8;
  --accent-hover:#5272f0;
  --accent-text:#93aaff;
  --accent-soft:#1c2950;
  --band:#080d17;
  --band-2:#111a2a;
  --band-3:#162036;
  --ok-bg:#123524;
  --ok-fg:#8ee0b0;
  --warn-bg:#3a2a0c;
  --warn-fg:#f5c77a;
  --error:#ff8a80;
  --risk-low:#8ee0b0;      --risk-low-bg:#123524;
  --risk-mid:#f5c77a;      --risk-mid-bg:#3a2a0c;
  --risk-high:#ff8a80;     --risk-high-bg:#3d1714;
  --risk-critical:#ffb3ab; --risk-critical-bg:#4a1210;
  --focus:var(--band-accent);
  --shadow-card:0 1px 2px rgba(0,0,0,0.4), 0 12px 32px rgba(0,0,0,0.35);
}
