/* Design tokens, matched to the Key Tech Services Portal: blue #3B82F6, violet #8B5CF6, slate #1F2937,
   emerald / red for status, cool blue-gray surfaces. Light is the default; dark follows the system unless the
   user picks a theme (Settings > Display or the header button), which sets data-theme on <html>. */
:root {
  --font: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;

  --bg: hsl(215 25% 95%);
  --surface: #ffffff;
  --surface-2: hsl(215 30% 98%);
  --surface-3: #e6ebf1;
  --text: #1f2937;
  --text-2: #5f6b7d;
  --line: hsl(215 20% 87%);
  --hdr-shadow: hsl(215 28% 17% / .12);
  --line-strong: #c2cad6;

  --primary: #3b82f6;
  --primary-hover: #2f6fe0;
  --on-primary: #ffffff;
  --primary-soft: #e6effe;
  --primary-text: #1d5fd6;
  --accent: #8b5cf6;

  --warn: #a15c00;
  --warn-soft: #fff3df;
  --danger: #dc2626;
  --danger-soft: #fdecec;
  --ok: #0f8a5f;
  --ok-soft: #e1f6ee;

  --focus: #3b82f6;
  --shadow-1: 0 1px 2px rgba(31, 41, 55, .07);
  --shadow-2: 0 12px 32px -12px rgba(31, 41, 55, .25);
  --scrim: rgba(17, 24, 39, .45);
  --shadow-reveal: 12px 0 28px -8px var(--scrim);

  --r-sm: 8px;
  --r: 14px;
  --r-lg: 16px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --touch: 44px;
  --panel-w: 400px;
  --aux-w: 420px;
  --rail-w: 56px;
  --rail-open: 264px;
  --header-h: 56px;
  --status-h: 32px;
  --nav-h: 60px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: hsl(215 28% 17%); --surface: hsl(215 26% 21%); --surface-2: hsl(215 24% 26%); --surface-3: hsl(215 24% 29%);
    --text: #ffffff; --text-2: hsl(215 16% 72%); --line: hsl(215 20% 32%); --hdr-shadow: rgba(0,0,0,.35); --line-strong: #46566d;
    --primary: #60a5fa; --primary-hover: #7db6fb; --on-primary: #0b1a33; --primary-soft: #1e3354; --primary-text: #93c0fc; --accent: #a78bfa;
    --warn: #f2b45c; --warn-soft: #3a2a10; --danger: #f87171; --danger-soft: #3e1a1a; --ok: #34d399; --ok-soft: #12302a;
    --focus: #60a5fa; --shadow-1: 0 1px 2px rgba(0, 0, 0, .4); --shadow-2: 0 12px 32px -12px rgba(0, 0, 0, .6); --scrim: rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: hsl(215 28% 17%); --surface: hsl(215 26% 21%); --surface-2: hsl(215 24% 26%); --surface-3: hsl(215 24% 29%);
  --text: #ffffff; --text-2: hsl(215 16% 72%); --line: hsl(215 20% 32%); --hdr-shadow: rgba(0,0,0,.35); --line-strong: #46566d;
  --primary: #60a5fa; --primary-hover: #7db6fb; --on-primary: #0b1a33; --primary-soft: #1e3354; --primary-text: #93c0fc; --accent: #a78bfa;
  --warn: #f2b45c; --warn-soft: #3a2a10; --danger: #f87171; --danger-soft: #3e1a1a; --ok: #34d399; --ok-soft: #12302a;
  --focus: #60a5fa; --shadow-1: 0 1px 2px rgba(0, 0, 0, .4); --shadow-2: 0 12px 32px -12px rgba(0, 0, 0, .6); --scrim: rgba(0, 0, 0, .6);
  color-scheme: dark;
}

@media (min-width: 1536px) { :root { --aux-w: 460px; } }

/* HoneyPlotr palette (matches the logo): boat white + nautical navy + honey gold */
:root {
  --bg: #f4f1ea; --surface: #fdfcf8; --surface-2: #f8f6f0; --surface-3: #ebe6da;
  --text: #111418; --text-2: #4f5866; --line: #e2dccd; --line-strong: #cbc3b0; --hdr-shadow: rgba(14,34,64,.12);
  --primary: #1d3b60; --primary-hover: #0e2240; --on-primary: #ffffff; --primary-soft: #e4eaf2; --primary-text: #1d3b60;
  --accent: #d98a1e; --focus: #d98a1e;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161616; --surface: #1f1f1f; --surface-2: #272727; --surface-3: #303030;
    --text: #f3f1ea; --text-2: #a3a3a3; --line: #333333; --line-strong: #444444; --hdr-shadow: rgba(0,0,0,.4);
    --primary: #e0a526; --primary-hover: #fbd45c; --on-primary: #161616; --primary-soft: #33290f; --primary-text: #fbd45c;
    --accent: #3fe0d8; --focus: #fbd45c;
  }
}
:root[data-theme="dark"] {
  --bg: #161616; --surface: #1f1f1f; --surface-2: #272727; --surface-3: #303030;
  --text: #f3f1ea; --text-2: #a3a3a3; --line: #333333; --line-strong: #444444; --hdr-shadow: rgba(0,0,0,.4);
  --primary: #e0a526; --primary-hover: #fbd45c; --on-primary: #161616; --primary-soft: #33290f; --primary-text: #fbd45c;
  --accent: #3fe0d8; --focus: #fbd45c;
}
