/* ===========================================================================
   base.css — shared foundation, loaded on every page BEFORE the page's own
   <style> and before nav.css, so anything here is a default the page can still
   override. Purely additive: it fills gaps (focus rings, selection colour,
   reduced-motion, a canonical palette fallback) and standardises a couple of
   utilities. It does not restyle existing components.
   =========================================================================== */

/* Canonical Spoofey palette. Pages that still declare their own :root win on
   the cascade (same specificity, later in the document) — this is the floor,
   so a page that forgets a token still gets the right colour. */
:root{
  --void:#060912;
  --deep:#0B1122;
  --panel:#0C1226;
  --violet:#4F46E5;
  --electric:#2563EB;
  --glow:#93A5FF;
  --signal:#2DD4BF;
  --cyan:#38BDF8;
  --ink:#ECE7F7;
  --muted:#9A8CB8;
  --faint:#6B5E85;
  --danger:#F87171;
  --warn:#FBBF24;
  --ok:#34D399;
  --glass:rgba(79,70,229,.06);
  --glass-brd:rgba(37,99,235,.16);
  --line:rgba(37,99,235,.09);
  --radius:16px;
}

*{box-sizing:border-box}

/* Visible keyboard focus everywhere. The dark theme swallows the UA default;
   only .snav had a real ring before. Mouse clicks are unaffected. */
:focus-visible{
  outline:2px solid var(--signal,#2DD4BF);
  outline-offset:2px;
  border-radius:6px;
}
/* don't double-ring elements that already draw their own focus treatment */
.snav :focus-visible{outline-color:var(--signal,#2DD4BF)}

::selection{background:rgba(37,99,235,.32);color:#fff}

/* Shared horizontal-scroll wrapper for wide tables. Pages already use this
   class name in a few places; this makes it real everywhere. */
.table-scroll{
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}

/* Respect reduced-motion globally instead of each page re-declaring it. */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{
    animation-duration:.001ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.001ms !important;
  }
  html{scroll-behavior:auto}
}

/* ===========================================================================
   Shared components, added in the site-wide style audit. Each of these used
   to be re-declared (with small drift) in 10-15 separate page <style>
   blocks; they live here once now. Pages should stop re-defining these
   selectors locally — the last page-local definition in source order always
   wins over this file, so a leftover local rule silently un-fixes this one.
   =========================================================================== */

/* "Numeric" role: phone numbers, codes, ids, balances. Tabular so digits
   align in a column. */
.mono{font-family:'Space Grotesk',sans-serif;font-variant-numeric:tabular-nums}

/* Two-tier secondary-text system. .subtitle sits directly under a page or
   section heading; .hint is fine print under one specific control. */
.subtitle{font-size:14px;color:var(--muted);line-height:1.6;margin:0}
.hint{font-size:12.5px;color:var(--faint);margin:4px 0 0}

/* Checkbox: a real <input type=checkbox> visually replaced by a painted
   tick, ported verbatim from admin.html's original (itself ported from
   calls.html's pre-call explainer "don't show again" control) — this was
   the one checkbox design on the site that already looked designed, so it
   becomes the canonical one instead of inventing a new fourth version.
   Real <input> is hidden; .acbx-box is the visible box. `label.acbx` (not
   `.acbx`) so it beats a page-local `.modal label` reset by source order. */
label.acbx{
  display:flex;align-items:center;gap:11px;cursor:pointer;margin:0;position:relative;
  text-transform:none;letter-spacing:normal;
  font:500 12.5px/1.35 'Hanken Grotesk',system-ui,sans-serif;color:var(--muted);
  padding:11px 13px;border:1px solid var(--line);border-radius:11px;background:rgba(37,99,235,.04);
  transition:color .15s ease,background .18s ease,border-color .18s ease;
  user-select:none;-webkit-tap-highlight-color:transparent;
}
label.acbx:hover{color:var(--ink);background:rgba(37,99,235,.08);border-color:var(--glass-brd)}
label.acbx:has(.acbx-i:checked){color:var(--ink);border-color:rgba(37,99,235,.4);background:rgba(37,99,235,.1)}
.acbx-i{position:absolute;width:1px;height:1px;opacity:0;margin:0;pointer-events:none}
.acbx-box{
  flex:0 0 auto;width:19px;height:19px;border-radius:6px;display:grid;place-items:center;
  background:rgba(10,7,20,.5);border:1.5px solid var(--glass-brd);
  transition:background .18s ease,border-color .18s ease,box-shadow .18s ease,transform .12s ease;
}
label.acbx:active .acbx-box{transform:scale(.9)}
.acbx-box svg{
  width:11px;height:11px;fill:none;stroke:#fff;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round;
  stroke-dasharray:17;stroke-dashoffset:17;transition:stroke-dashoffset .22s cubic-bezier(.65,0,.35,1) .03s;
}
.acbx-i:checked + .acbx-box{
  background:linear-gradient(135deg,var(--electric),#1D4ED8);border-color:transparent;
  box-shadow:0 6px 16px -7px rgba(37,99,235,.75);
}
.acbx-i:checked + .acbx-box svg{stroke-dashoffset:0}
.acbx-i:focus-visible + .acbx-box{box-shadow:0 0 0 3px rgba(37,99,235,.4)}
.acbx-t{flex:1;min-width:0}
.acbx-t small{display:block;color:var(--faint);font-size:11px;margin-top:2px;letter-spacing:normal;text-transform:none}
@media(prefers-reduced-motion:reduce){ label.acbx,.acbx-box,.acbx-box svg{transition:none} }

/* Toggle switch: one visual language for every on/off setting site-wide.
   Two markup flavours already exist on the site (self-contained `.tgl`
   label, and a `.switch`+`.slider` pair used inside a separate label) —
   both are kept and made to render identically, rather than forcing a
   markup rewrite for a purely visual fix. */
.tgl,.switch{position:relative;flex:0 0 auto}
.tgl,.tgl-mini{display:inline-flex;align-items:center;gap:11px;cursor:pointer;font-size:14.5px;color:var(--ink)}
.tgl input,.tgl-mini input,.switch input{position:absolute;opacity:0;width:0;height:0}
.switch{display:inline-block;width:50px;height:28px;cursor:pointer}
.tgl .track,.tgl-mini .track,.switch .slider{
  width:50px;height:28px;border-radius:100px;background:rgba(107,94,133,.3);
  border:1px solid var(--glass-brd);position:relative;transition:background .2s ease,border-color .2s ease;
}
.switch .slider{position:absolute;inset:0;width:auto;height:auto}
.tgl .track::after,.tgl-mini .track::after,.switch .slider::after{
  content:"";position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;
  background:#fff;transition:transform .2s ease;box-shadow:0 1px 3px rgba(0,0,0,.4);
}
.tgl input:checked + .track,.tgl-mini input:checked + .track,.switch input:checked + .slider{background:linear-gradient(135deg,var(--electric),#1D4ED8);border-color:transparent}
.tgl input:checked + .track::after,.tgl-mini input:checked + .track::after,.switch input:checked + .slider::after{transform:translateX(22px)}
.tgl input:focus-visible + .track,.tgl-mini input:focus-visible + .track,.switch input:focus-visible + .slider{outline:2px solid var(--signal);outline-offset:2px}
/* .tgl-mini is also used bare (no .tgl) by the sitewide agent-dock widget -
   both spellings get the same compact size. */
.tgl-mini .track,.tgl.tgl-mini .track{width:34px;height:20px}
.tgl-mini .track::after,.tgl.tgl-mini .track::after{width:14px;height:14px}
.tgl-mini input:checked + .track::after,.tgl.tgl-mini input:checked + .track::after{transform:translateX(14px)}
@media(prefers-reduced-motion:reduce){ .tgl .track,.tgl .track::after,.switch .slider,.switch .slider::after{transition:none} }
