/* A single accessible switch for every public and authenticated page. */
.theme-toggle {
  position: fixed;
  right: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #cfc6b5;
  border-radius: 24px;
  background: #fffdf8;
  color: #19364d;
  font: 600 13px/1.5 'Segoe UI', system-ui, sans-serif;
  letter-spacing: normal;
  cursor: pointer;
  box-shadow: 0 3px 14px #14283f14;
}
.theme-toggle [data-theme-icon] { font: 22px/1 sans-serif; }
.theme-toggle:hover { border-color: #a38449; }
.theme-toggle:focus-visible { outline: 3px solid #b79a60; outline-offset: 4px; }
:root[data-theme='dark'] .theme-toggle { background: #203142; color: #f0e3c8; border-color: #667382; }
body:has(.contact-float) .theme-toggle { bottom: calc(82px + env(safe-area-inset-bottom, 0px)); }
@media (max-width: 1023px) {
  body:has(.law-bottom-nav) .theme-toggle { bottom: calc(90px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 639px) {
  .theme-toggle { right: 14px; padding: 9px 13px; font-size: 12px; }
}
[data-theme-slot] { display: flex; align-items: center; flex-shrink: 0; }
[data-theme-slot] .theme-toggle { position: static; z-index: auto; box-shadow: none; }
@media (max-width: 639px) {
  [data-theme-slot] .theme-toggle { min-width: 44px; padding: 8px; }
  [data-theme-slot] .theme-toggle [data-theme-label] { display: none; }
}
[data-theme-slot] .theme-toggle { color: #19364d; }
:root[data-theme='dark'] [data-theme-slot] .theme-toggle { color: #f0e3c8; }
