header nav { display: flex; align-items: center; gap: 16px; }
.theme-toggle {
  width: 40px; height: 40px; padding: 0; flex: none;
  border: 1px solid var(--line, var(--border)); border-radius: 50%;
  background: var(--surface); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.theme-toggle:hover { background: var(--bg, var(--surface-2)); }
.theme-toggle:focus-visible { outline: 3px solid var(--accent, var(--blue)); outline-offset: 3px; }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
.theme-toggle[data-mode="dark"] .icon-sun { display: block; }
.theme-toggle[data-mode="dark"] .icon-moon { display: none; }
/* Homepage branding stays dark regardless of the content theme. */
.brand-header { background: #343d49; border-bottom-color: #4b5665; }
.brand-header nav a { color: #edf2f7; }
.brand-header .theme-toggle { background: transparent; color: #edf2f7; border-color: #657184; }
.brand-header .theme-toggle:hover { background: #465262; }
.brand-header a:focus-visible, .brand-header .theme-toggle:focus-visible { outline-color: #a9ceff; }
.brand-logo { display: flex; align-items: center; width: 236px; height: 58px; }
.brand-logo img { display: block; width: 100%; height: auto; }
@media (max-width: 600px) {
  .brand-logo { width: 177px; height: 44px; }
  header .wrap { flex-wrap: wrap; gap: 10px; padding-block: 10px; }
  header nav { gap: 10px; }
}
