:root { color-scheme:light; --paper:#FFF; --wash:#F4F6FA; --ink:#0F141C; --muted:#5A6474; --line:#DFE4EC; --blue:#0A4FE0; --blue-dark:#073AA9; --blue-soft:#EAF1FF; --action:#0A4FE0; --action-hover:#073AA9; }
/* Dark mode uses the Defender app's neutral greys and #1462E5 accent, on a soft charcoal rather than pure black. */
:root[data-theme="dark"] {
  color-scheme:dark;
  --paper:#141414;
  --wash:#1E1E1E;
  --ink:#EDEDED;
  --muted:#A3A3A3;
  --line:#2F2F2F;
  --blue:#5B9BF8;
  --blue-dark:#8AB8FB;
  --blue-soft:#0E1F3A;
  --action:#1462E5;
  --action-hover:#0F52C4;
}
.site-theme-toggle { display:inline-grid; place-items:center; flex:0 0 40px; width:40px; height:40px; padding:0; border:0; border-radius:0; background:transparent; color:var(--ink); cursor:pointer; }
.site-theme-toggle:hover { background:var(--wash); color:var(--blue); }
.site-theme-toggle:active { background:var(--blue-soft); }
.site-theme-toggle:focus-visible { outline:3px solid var(--blue); outline-offset:2px; }
.theme-sun, [data-theme="dark"] .theme-moon { display:none; }
[data-theme="dark"] .theme-sun { display:block; }
[data-theme="dark"] .bridge-credit img, [data-theme="dark"] .bridge-logo img { filter:none; }
[data-theme="dark"] .skip-link { color:var(--paper); }
[data-theme="dark"] .nav-links .nav-download,
[data-theme="dark"] .button-primary,
[data-theme="dark"] .notify button,
[data-theme="dark"] .hero-mark::before,
[data-theme="dark"] .segmented button[aria-pressed="true"],
[data-theme="dark"] .state-intro .segmented button[aria-pressed="true"]::before,
[data-theme="dark"] .pay-period::before,
[data-theme="dark"] .estimate-jump { background:var(--action); color:#FFF; }
[data-theme="dark"] .nav-links .nav-download:hover,
[data-theme="dark"] .button-primary:hover,
[data-theme="dark"] .notify button:hover,
[data-theme="dark"] .segmented button[aria-pressed="true"]:hover,
[data-theme="dark"] .state-intro .segmented button[aria-pressed="true"]:hover::before,
[data-theme="dark"] .estimate-jump:hover { background:var(--action-hover); color:#FFF; }
[data-theme="dark"] .state-intro .segmented button[aria-pressed="true"],
[data-theme="dark"] .state-intro .segmented button[aria-pressed="true"]:hover { background:transparent; }
[data-theme="dark"] .pay-period input:checked + span { color:#FFF; }
[data-theme="dark"] .field input:hover, [data-theme="dark"] .field select:hover { border-color:var(--muted); }
[data-theme="dark"] .notify-status.is-error, [data-theme="dark"] .estimator-page .field-error { color:#FFAB9D; }
[data-theme="dark"] [aria-invalid="true"] { border-color:#FFAB9D; }
[data-theme="dark"] .notify input[aria-invalid="true"] { border-color:#FFAB9D; }
[data-theme="dark"] .payment-result .timing-note, [data-theme="dark"] .quarterly-compact .timing-note { color:#F0BE8A; }
[data-theme="dark"] ::selection, [data-theme="dark"] .estimator-page ::selection { background:#345583; color:#FFF; }
[data-theme="dark"] * { scrollbar-color:#3A3A3A var(--paper); }
[data-theme="dark"] *::-webkit-scrollbar-thumb { background:#3A3A3A; }
/* The player chrome follows the site theme; demo-light.css gives the app window its light appearance. */
[data-theme="dark"] .demo-player { color:var(--ink); }
[data-theme="dark"] .demo-stages button { color:var(--muted); border-bottom-color:var(--line); }
[data-theme="dark"] .demo-stages button[aria-selected="true"] { color:var(--blue); }
[data-theme="dark"] .demo-stages button:hover { background:var(--wash); color:var(--blue); }
[data-theme="dark"] .stage-number { border-color:#3A3A3A; }
[data-theme="dark"] [aria-selected="true"] .stage-number { background:var(--action); color:#FFF; border-color:var(--action); }
[data-theme="dark"] .demo-transcript, [data-theme="dark"] .demo-time { color:var(--muted); }
[data-theme="dark"] .transport-button { background:var(--paper); color:var(--ink); border-color:#3A3A3A; }
[data-theme="dark"] .transport-button:hover { background:var(--wash); color:var(--blue); border-color:var(--blue); }
[data-theme="dark"] .demo-player :focus-visible { outline-color:var(--blue); }
[data-theme="dark"] .app-frame * { scrollbar-color:#333 #0A0A0A; }
@media (max-width:540px) { .nav-links { gap:.25rem; } }
@media (max-width:360px) {
  .nav .brand { gap:.4rem; }
  .nav .brand img { width:28px; height:28px; }
  .nav .brand-copy strong { font-size:.7rem; }
  .nav .brand-copy span { font-size:.5rem; }
  .nav-compact { column-gap:.25rem; }
}
