/* ============================================================
   Argento Tools — shared theme
   Canonical color/type variables for every tool in tools/*.html.
   Edit a color here and it propagates to all 12 tools at once.

   Legacy variable names each individual tool was originally built
   with (--bg, --text, --accent2, --danger, etc.) are aliased below
   onto these canonical values so each tool's own CSS didn't need
   to be rewritten var-by-var. fee_estimator.html and
   calc_dte_meter_selector.html previously used a visually different
   palette of their own — both were normalized to this shared theme
   on 2026-07-26, so their aliases now resolve to the same canonical
   colors as every other tool.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600;700&family=Inter:wght@400;500;600&family=Roboto+Mono:wght@400;500;600;700&display=swap');

:root{
  /* ---- canonical palette ---- */
  /* Brand palette (2026-10-11), matched to argentoengineering.com:
     blueprint navy #013A51 and sky blue #49B8E7 (deepened to #1A7AA8 in light
     mode for text contrast on white), signal orange #EB9848 as the caution
     color, cool slate neutrals and the site's #D4D9E2 hairline. The --copper*
     names are historical; they hold the brand blues now. */
  --paper:#F3F5F8; --panel:#FFFFFF; --ink:#1D262F; --muted:#5E6B7C;
  --hairline:#D4D9E2; --copper:#1A7AA8; --copper-dark:#013A51; --steel:#3E5A72;
  --good:#2F7D5B; --warn:#B9661A; --bad:#B23A2E; --info:#2A6F97;
  --surface:#F8FAFC; --surface-accent:#EAF5FB;
  --pass-bg:#E7F3EC; --warn-bg:#FDF0E3; --fail-bg:#F9E9E6; --info-bg:#E6F1F8;
  --solid-bg:#013A51; --solid-fg:#FFFFFF; --accent-fg:#FFFFFF;
  /* "slab": a navy summary card that stays navy in both modes (tax estimator ledger/verdict) */
  --slab-bg:#013A51; --slab-fg:#FFFFFF; --slab-muted:#9FD8F1; --slab-good:#5FD49A; --slab-bad:#FF8A7D;
  --alarm:#A32C24; --alarm-dark:#7E211B; --run-track:#DDE3EA;
  --icon-op:1; --icon-op-alt:0;

  /* ---- canonical type ---- */
  --mono:'Roboto Mono','Courier New',monospace;
  --sans:'Inter',system-ui,sans-serif;
  --heading:'Montserrat',sans-serif;

  /* ---- legacy aliases (map each tool's own variable names onto the above) ---- */
  --bg:var(--paper);
  --text:var(--ink);
  --border:var(--hairline);
  --accent:var(--copper);
  --accent2:var(--copper-dark);
  --accent-hover:var(--copper-dark);
  --danger:var(--bad);
  --safe:var(--good);
  --input-bg:var(--surface);
  --label:var(--muted);
  --panel-bg:var(--panel);
  --panel2:var(--surface);
  --text-muted:var(--muted);
  --text-dim:var(--muted);
  --border-active:var(--copper);
  --accent-dim:var(--copper-dark);
  --surface2:var(--surface);
  --checked-bg:var(--surface-accent);
  --checked-border:var(--copper);
  --tag-bg:var(--surface-accent);
  --tag-text:var(--copper-dark);
  --spare-bg:#E3E8EE;
  --box-tint:rgba(163,44,36,.05);
  --warn-border:var(--warn);
  --ok-bg:var(--pass-bg);
  --ok-border:var(--good);
  --shadow:rgba(0,0,0,.08);
  --muted2:var(--muted);
  --muted3:var(--muted);
  --border-soft:var(--hairline);
  --border-soft2:var(--hairline);
  --border-soft3:var(--hairline);
  --border-soft4:var(--hairline);
  --accent-strong:var(--copper-dark);
  --accent-tint:var(--surface-accent);
  --flag-good-bg:var(--pass-bg);
  --flag-warn-bg:var(--warn-bg);
  --flag-bad-bg:var(--fail-bg);
  --flag-info-bg:var(--info-bg);
  --warnbox-bg:var(--warn-bg);
  --warnbox-border:var(--warn);
  --warnbox-text:var(--copper-dark);
  --btn-text:var(--muted);

  /* arc_flash-only severity tint colors (no shared equivalent); --cat2 also tints the theme toggle icon */
  --cat2:#1f8fae;
  --catX:#9b00c2;

  /* One-line/feeder-diagram accent colors shared by calc_voltage_drop and
     calc_fire_pump_voltage_drop (no shared canonical equivalent) */
  --diagram-silver:#5F6B75;    /* aluminum conductor / conduit material */
  --diagram-voltage:#7A4FB0;   /* every voltage reading, incl. transformer primary/secondary */
  --diagram-xfmr-attr:#1F6E63; /* transformer kVA / impedance / insulation class */
}

[data-theme="dark"]{
  /* Dark mode = the website's hero: deep blueprint navy with the exact sky blue */
  --paper:#06202C; --panel:#0B2C3B; --ink:#E6EEF3; --muted:#93A7B6;
  --hairline:#1E4A60; --copper:#49B8E7; --copper-dark:#8FD3F1; --steel:#8FB3CC;
  --good:#4CC38A; --warn:#EB9848; --bad:#F06B5E; --info:#6CC7EE;
  --surface:#10364A; --surface-accent:rgba(73,184,231,.12);
  --pass-bg:rgba(76,195,138,.15); --warn-bg:rgba(235,152,72,.15); --fail-bg:rgba(240,107,94,.15); --info-bg:rgba(108,199,238,.15);
  --solid-bg:#49B8E7; --solid-fg:#06202C; --accent-fg:#06202C;
  --alarm:#ff6b6b; --alarm-dark:#e05555; --run-track:#123446;
  --icon-op:0; --icon-op-alt:1;

  --spare-bg:#0F3243;
  --box-tint:rgba(76,195,232,.05);
  --shadow:rgba(0,0,0,.4);

  --cat2:#4ec9e0;
  --catX:#cc00ff;

  --diagram-silver:#9AA4AD;
  --diagram-voltage:#B48EE0;
  --diagram-xfmr-attr:#4FCDB8;
}
