/* ═══════════════════════════════════════════════════════════════════════
   CavityX theme: the ONE place to tune colors, fonts and corners.
   Used by the app (/v5/theme.css), the account/admin/login pages
   (/v7/theme.css) and the public site (/site/theme.css): same file.
   Modern industrial: graphite/steel surfaces, one cyan accent (#22e9f2, the logo flow line),
   amber for warnings, 1px machined borders, condensed technical type.
   Fonts are bundled in ./fonts (SIL OFL 1.1); nothing loads from a CDN.
   ═══════════════════════════════════════════════════════════════════════ */
@font-face { font-family: "Inter"; src: url("fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("fonts/barlow-condensed-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("fonts/barlow-condensed-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("fonts/barlow-condensed-700.woff2") format("woff2");
  font-weight: 700 900; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/jetbrains-mono-var.woff2") format("woff2");
  font-weight: 100 800; font-style: normal; font-display: swap; }

:root {
  /* surfaces: graphite → steel */
  --cx-bg:        #14171a;   /* page */
  --cx-bg-deep:   #0f1114;   /* inputs, wells */
  --cx-panel:     #1e2328;   /* panels, cards */
  --cx-panel-2:   #2a3038;   /* raised: headers, menus */
  --cx-hover:     #323a44;
  --cx-line:      #343c46;   /* 1px borders */
  --cx-line-2:    #4a5462;   /* stronger borders, input outlines */
  /* text (all pass WCAG AA on --cx-panel) */
  --cx-ink:       #eceff2;
  --cx-ink-2:     #c2c9d1;
  --cx-muted:     #939eab;
  /* the one accent + status */
  --cx-accent:    #22e9f2;   /* brand cyan: 12.0:1 on --cx-bg, 10.6:1 on --cx-panel */
  --cx-accent-hi: #6ff2f7;
  --cx-accent-lo: #12c4cc;   /* 8.4:1 on --cx-bg */
  --cx-on-accent: #04181b;   /* text on cyan: 12.2:1 (8.5:1 on accent-lo) */
  --cx-amber:     #ffb020;   /* warnings only */
  --cx-ok:        #3fcf8e;
  --cx-bad:       #ff5b4f;
  /* shape + type */
  --cx-radius:    3px;
  --cx-radius-lg: 4px;
  --cx-font-ui:   "Inter", "Segoe UI", -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --cx-font-head: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", "Inter", sans-serif;
  --cx-font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --cx-shadow:    0 10px 30px rgba(0, 0, 0, .5);
  /* texture, used sparingly */
  --cx-grid: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px) 0 0/24px 24px,
             linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px) 0 0/24px 24px,
             linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px) 0 0/120px 120px,
             linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px) 0 0/120px 120px;
  --cx-brushed: repeating-linear-gradient(90deg, rgba(255,255,255,.014) 0 1px, transparent 1px 3px);
  --cx-hazard: repeating-linear-gradient(-45deg, var(--cx-accent) 0 6px, transparent 6px 12px);
}

/* Scroll bars follow the theme everywhere (panels, drawers, dialogs, pages):
   Firefox uses scrollbar-color / -width, Chromium and Safari the ::-webkit rules.
   The app (style.css) re-points these at the active app theme. */
* { scrollbar-color: var(--cx-line-2) var(--cx-bg-deep); scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--cx-bg-deep); }
::-webkit-scrollbar-thumb { background: var(--cx-line-2); border-radius: 5px; border: 2px solid var(--cx-bg-deep); }
::-webkit-scrollbar-thumb:hover { background: var(--cx-muted); }
::-webkit-scrollbar-corner { background: var(--cx-bg-deep); }
