/* The one appearance control, on every page that has the site's layouts
   (US-SITE-010). It needs theme.js, so it shows only when that script has run. */
:root {
  --toggle-line: rgba(16, 45, 117, 0.16);
  --toggle-surface: #fff;
  --toggle-text: #102d75;
}

:root[data-theme="light"] { color-scheme: light; }

.theme-toggle {
  position: absolute;
  z-index: 3;
  top: 8px;
  right: 12px;
  display: none;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--toggle-line);
  border-radius: 999px;
  background: var(--toggle-surface);
}

:root[data-theme] .theme-toggle { display: inline-flex; }

.theme-toggle button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: var(--toggle-text);
  background: transparent;
  cursor: pointer;
}

.theme-toggle svg {
  display: block;
  width: 16px;
  height: 16px;
}

.theme-toggle button[aria-pressed="true"] {
  color: var(--toggle-surface);
  background: var(--toggle-text);
}

.theme-toggle button:focus-visible {
  outline: 3px solid #f5a623;
  outline-offset: 2px;
}
