[data-theme="dark"] {
  --primary: #8FC4EA;
  --accent: #DCEEFF;
  --silver: #152333;
  --soft-gray: #253648;
  --white: #0B1520;
  --charcoal: #EEF4F8;
  --muted: rgba(238, 244, 248, 0.72);
  --line: rgba(238, 244, 248, 0.15);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  --navy: #DCEEFF;
  --blue: #8FC4EA;
  --steel: #253648;
  --ivory: #152333;
  --paper: #0B1520;
  --linen: #111D2A;
  --bronze: #8FC4EA;
  --ink: #EEF4F8;
  --moss: #8FC4EA;
  --olive: #DCEEFF;
  --stone: #253648;
  --bone: #152333;
  --copper: #8FC4EA;
  --deep: #DCEEFF;
  --sky: #152333;
  --panel: #101B27;
  --green: #8FC4EA;
  --amber: #DCEEFF;
}

[data-theme="dark"] body {
  background: #0B1520;
  color: #EEF4F8;
}

[data-theme="dark"] .site-header,
[data-theme="dark"] .classic-header,
[data-theme="dark"] .portal-header,
[data-theme="dark"] .advisory-header {
  background: rgba(11, 21, 32, 0.96);
  border-color: rgba(238, 244, 248, 0.15);
}

[data-theme="dark"] .dropdown-menu,
[data-theme="dark"] .dropdown-menu::before,
[data-theme="dark"] .page-card,
[data-theme="dark"] .details-stack article,
[data-theme="dark"] .two-column article,
[data-theme="dark"] .faq-list article,
[data-theme="dark"] .support-card,
[data-theme="dark"] .audience-row a,
[data-theme="dark"] .trust-grid div {
  background: #101B27;
}

[data-theme="dark"] .logo-mark,
[data-theme="dark"] .logo-wordmark {
  filter: invert(1);
}

.back-to-top {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(15, 53, 88, 0.18);
  border-radius: 50%;
  background: #ffffff;
  color: #0F3558;
  box-shadow: 0 14px 34px rgba(15, 53, 88, 0.18);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition:
    opacity 160ms ease,
    transform 160ms ease,
    background-color 160ms ease,
    color 160ms ease;
}

.back-to-top svg {
  width: 22px;
  height: 22px;
  stroke-width: 2.4;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background: #0F3558;
  color: #ffffff;
}

.back-to-top:focus-visible {
  outline: 3px solid rgba(21, 76, 121, 0.25);
  outline-offset: 3px;
}

.theme-toggle {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(15, 53, 88, 0.18);
  border-radius: 50%;
  background: #ffffff;
  color: #0F3558;
  box-shadow: 0 14px 34px rgba(15, 53, 88, 0.18);
  cursor: pointer;
  transition:
    background-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.theme-toggle:hover {
  background: #0F3558;
  color: #ffffff;
  transform: translateY(-2px);
}

.theme-toggle:focus-visible {
  outline: 3px solid rgba(21, 76, 121, 0.25);
  outline-offset: 3px;
}

.theme-toggle svg {
  width: 22px;
  height: 22px;
  stroke-width: 2.2;
}

.theme-toggle .sun-icon {
  display: none;
}

[data-theme="dark"] .theme-toggle {
  border-color: rgba(255, 255, 255, 0.18);
  background: #0F3558;
  color: #ffffff;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

[data-theme="dark"] .theme-toggle:hover {
  background: #F4C542;
  color: #0F3558;
}

[data-theme="dark"] .theme-toggle .moon-icon {
  display: none;
}

[data-theme="dark"] .theme-toggle .sun-icon {
  display: block;
}

@media (max-width: 640px) {
  .back-to-top {
    left: 18px;
    bottom: 18px;
    width: 44px;
    height: 44px;
  }

  .theme-toggle {
    right: 18px;
    bottom: 18px;
    width: 44px;
    height: 44px;
  }
}
