/* GMB Tools design tokens: the single source of truth for the portal (app.css) and the three hosted tools.
   Linked before app.css / each tool's style.css. Tool stylesheets alias their old variable names to these. */
:root {
  /* brand */
  --brand: #4f46e5;
  --brand-dark: #4338ca;
  --brand-2: #7c3aed;          /* second stop of the brand gradient */
  --brand-soft: #eef2ff;
  --brand-line: #c7d2fe;       /* border on brand-soft surfaces */
  --brand-ring: rgba(79, 70, 229, .28);
  /* text, surfaces, lines */
  --ink: #0f172a;
  --text: #1e293b;
  --muted: #5a6a7f;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --bg: #f8fafc;
  --card: #ffffff;
  --surface-2: #f8fafc;
  --hover: #f1f5f9;            /* hover background of rows, menu items, ghost buttons */
  --control-off: #7d8ca1;      /* switch track, >= 3:1 on white */
  --line-soft: #f1f2f4;        /* row separators inside tables */
  --brand-soft-hover: #e0e7ff;
  /* status borders and the blue info banner (tools) */
  --ok-line: #bbf7d0; --bad-line: #fecaca; --warn-line: #fde68a;
  --info-soft: #eff6ff; --info-ink: #1e3a8a; --info-line: #bfdbfe; --info-hover: #dbeafe; --info-edge: #93c5fd;
  /* status */
  --ok: #15803d;
  --ok-soft: #dcfce7;
  --warn: #b45309;
  --warn-soft: #fef3c7;
  --bad: #b91c1c;
  --bad-soft: #fee2e2;
  /* semantic result colours (tools): found / missing / unidentified / skip */
  --result-found: #15803d;
  --result-found-soft: #dcfce7;
  --result-missing: #b91c1c;
  --result-missing-soft: #fee2e2;
  --result-unidentified: #92400e;
  --result-unidentified-soft: #fef3c7;
  --result-skip: #4b5563;
  --result-skip-soft: #e5e7eb;
  /* shape */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  /* spacing scale (4px base) */
  --sp-1: .25rem; --sp-2: .5rem; --sp-3: .75rem; --sp-4: 1rem; --sp-5: 1.5rem; --sp-6: 2rem;
  /* elevation + motion */
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 4px 14px rgba(15, 23, 42, 0.05);
  --shadow-pop: 0 12px 32px rgba(15, 23, 42, .18), 0 2px 6px rgba(15, 23, 42, .08);
  --shadow-hover: 0 2px 4px rgba(15, 23, 42, .06), 0 8px 22px rgba(15, 23, 42, .08);
  --ease: .16s ease;
  --font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Dark mode for every page with <html data-portal>: the portal and the hosted tools (the tools' stylesheets only use tokens).
   <html data-theme="light|dark"> is the visitor's choice (static/js/theme.js); without it the system setting decides. */
@media (prefers-color-scheme: dark) {
  :root[data-portal]:not([data-theme="light"]) {
    color-scheme: dark;
    --ink: #f1f5f9; --text: #e2e8f0; --muted: #a3b2c7;
    --line: #2b3a52; --line-strong: #3d4f6b;
    --bg: #0b1220; --card: #111a2e; --surface-2: #0f172a; --hover: #1b2740;
    --brand: #6366f1; --brand-dark: #4f46e5; --brand-soft: #1e1b4b; --brand-line: #3730a3;
    --ok: #4ade80; --ok-soft: #052e16; --warn: #fbbf24; --warn-soft: #3b2a05; --bad: #f87171; --bad-soft: #3b0d0d;
    --control-off: #64748b;
    --line-soft: #1a2538; --brand-soft-hover: #2e2a6b;
    --ok-line: #14532d; --bad-line: #7f1d1d; --warn-line: #78350f;
    --info-soft: #172554; --info-ink: #bfdbfe; --info-line: #1e3a8a; --info-hover: #1e3a8a; --info-edge: #3b82f6;
    --result-found: #4ade80; --result-found-soft: #052e16; --result-missing: #f87171; --result-missing-soft: #3b0d0d;
    --result-unidentified: #fbbf24; --result-unidentified-soft: #3b2a05; --result-skip: #9ca3af; --result-skip-soft: #1f2937;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 14px rgba(0, 0, 0, .3);
  }
}
:root[data-portal][data-theme="dark"] {
  color-scheme: dark;
  --ink: #f1f5f9; --text: #e2e8f0; --muted: #a3b2c7;
  --line: #2b3a52; --line-strong: #3d4f6b;
  --bg: #0b1220; --card: #111a2e; --surface-2: #0f172a; --hover: #1b2740;
  --brand: #6366f1; --brand-dark: #4f46e5; --brand-soft: #1e1b4b; --brand-line: #3730a3;
  --ok: #4ade80; --ok-soft: #052e16; --warn: #fbbf24; --warn-soft: #3b2a05; --bad: #f87171; --bad-soft: #3b0d0d;
  --control-off: #64748b;
  --line-soft: #1a2538; --brand-soft-hover: #2e2a6b;
  --ok-line: #14532d; --bad-line: #7f1d1d; --warn-line: #78350f;
  --info-soft: #172554; --info-ink: #bfdbfe; --info-line: #1e3a8a; --info-hover: #1e3a8a; --info-edge: #3b82f6;
  --result-found: #4ade80; --result-found-soft: #052e16; --result-missing: #f87171; --result-missing-soft: #3b0d0d;
  --result-unidentified: #fbbf24; --result-unidentified-soft: #3b2a05; --result-skip: #9ca3af; --result-skip-soft: #1f2937;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 14px rgba(0, 0, 0, .3);
}
