/* Colors matched to the published Elite Safety AI theme. */
:root {
  --brand-primary: hsl(221 83% 53%);
  --brand-primary-hover: hsl(221 83% 44%);
  --brand-navy: hsl(214 75% 28%);
  --brand-green: #10b981;
  --bg: light-dark(hsl(210 40% 96%), #101c2e);
  --paper: light-dark(#ffffff, #172840);
  --ink: light-dark(hsl(215 40% 12%), #f0f5fc);
  --mut: light-dark(hsl(215 25% 35%), #b1c2d8);
  --line: light-dark(hsl(214 32% 91%), #334b69);
  --grid: light-dark(#edf2f8, #263b56);
  --bar: light-dark(hsl(214 75% 28%), #8cb9ff);
  --y: #ffffff;
  --k: hsl(214 75% 28%);
  --kb: hsl(221 83% 53%);
}
header {
  background: var(--brand-navy);
  color: #ffffff;
}
header::after {
  bottom: -4px;
  height: 4px;
  background: var(--brand-green);
}
header h1 { overflow-wrap: anywhere; }
header svg path:first-child { fill: #ffffff; }
header svg path:nth-child(2) { fill: var(--brand-navy); }
header svg rect, header svg circle { fill: #ffffff; }
nav a { color: #e7effa; }
nav a:hover { background: #ffffff14; }
nav a[aria-current] {
  background: var(--brand-primary);
  color: #ffffff;
}
.btn, .btn.ai {
  background: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-primary);
  transition: background-color .15s, border-color .15s;
}
.btn:hover, .btn.ai:hover {
  background: var(--brand-primary-hover);
  border-color: var(--brand-primary-hover);
}
.btn.alt {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn.alt:hover { background: var(--grid); border-color: var(--brand-primary); }
:focus-visible { outline: 3px solid var(--brand-primary); outline-offset: 3px; }
input:focus, select:focus, textarea:focus { border-color: var(--brand-primary); }
a:not(.btn):not(nav a) { text-underline-offset: 3px; }
main > .mut a { color: light-dark(var(--brand-primary), #93bbff); }
@media (max-width: 480px) {
  header h1 { font-size: 28px; }
}

/* ---------- Tool menu shell (public/tool-menu.js) ---------- */
:root { --tm-w: 248px; --tm-bg: light-dark(hsl(214 60% 16%), #0b1524); }
.tm {
  position: fixed; inset: 0 auto 0 0; width: var(--tm-w); z-index: 40;
  background: var(--tm-bg); color: #dbe6f5;
  display: flex; flex-direction: column; padding: 18px 14px;
  border-right: 1px solid #ffffff14; overflow-y: auto;
  font-family: Barlow, system-ui, sans-serif;
}
.tm-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 26px; }
.tm-logo { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font: 700 21px/1 "Barlow Condensed", sans-serif; letter-spacing: .01em; padding: 4px; border-radius: 8px; }
.tm-logo svg { width: 30px; height: 28px; flex: none; }
.tm-logo b { color: var(--brand-green); }
.tm-close { display: none; width: 44px; height: 44px; border: 0; border-radius: 8px; background: #ffffff10; color: #fff; cursor: pointer; place-items: center; }
.tm-close svg { width: 20px; height: 20px; }
.tm-close:hover { background: #ffffff1f; }
.tm-label { display: flex; justify-content: space-between; align-items: center; margin: 0 6px 8px; font: 700 13px Barlow, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: #8ea6c6; }
.tm-label span { font-size: 12px; letter-spacing: 0; background: #ffffff12; color: #c6d5ea; border-radius: 99px; padding: 0 8px; }
.tm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.tm-home { margin-bottom: 24px; }
.tm-link {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 52px;
  padding: 8px 10px; border-radius: 10px; color: #dbe6f5; text-decoration: none;
  transition: background-color .15s;
}
.tm-link:hover { background: #ffffff0f; }
.tm-link[aria-current] { background: #ffffff14; color: #fff; }
.tm-link[aria-current]::before { content: ""; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--brand-green); }
.tm-ic { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 9px; background: #ffffff10; }
.tm-link[aria-current] .tm-ic { background: var(--brand-primary); }
.tm-ic svg { width: 20px; height: 20px; }
.tm-tx { display: grid; line-height: 1.2; }
.tm-tx b { font: 700 18px "Barlow Condensed", sans-serif; }
.tm-tx small { font-size: 13px; color: #9fb4d0; }
.tm-foot { margin: auto 6px 0; padding-top: 18px; font-size: 13px; line-height: 1.45; color: #7f97b8; border-top: 1px solid #ffffff12; }
.tm a:focus-visible, .tm button:focus-visible { outline: 3px solid var(--brand-green); outline-offset: 2px; }
.tm-scrim { position: fixed; inset: 0; z-index: 39; background: rgb(6 14 28 / .55); }
.tm-toggle {
  display: none; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px 8px 10px;
  border: 1px solid #ffffff33; border-radius: 8px; background: #ffffff10; color: #fff;
  font: 700 17px "Barlow Condensed", sans-serif; cursor: pointer; margin-bottom: 12px;
}
.tm-toggle svg { width: 22px; height: 22px; }
.tm-toggle:hover { background: #ffffff1f; }

@media (min-width: 1024px) {
  html.tm-on body { padding-left: var(--tm-w); }
  .tm-scrim { display: none; }
}
@media (max-width: 1023.98px) {
  .tm { transform: translateX(-100%); visibility: hidden; transition: transform .22s ease, visibility 0s .22s; width: min(300px, 86vw); box-shadow: 0 0 40px rgb(0 0 0 / .3); }
  html.tm-open .tm { transform: none; visibility: visible; transition: transform .22s ease; }
  html.tm-open body { overflow: hidden; }
  .tm-close { display: grid; }
  .tm-toggle { display: inline-flex; }
  /* account pages: header is a flex row, keep the toggle inline */
  header[style], body > header:not(:has(nav)) .tm-toggle { margin-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) { .tm, html.tm-open .tm { transition: none; } }
