:is(.ampersand-page, .ampersand-model-card) .site-header { --header-width: 1120px; min-height: 80px; padding: 20px max(20px, calc((100vw - var(--header-width)) / 2)) 14px; }
:is(.ampersand-page, .ampersand-model-card) .site-logo { height: 42px; }
:is(.ampersand-page, .ampersand-model-card) .site-nav { position: relative; align-items: center; gap: 32px; }
@media (min-width: 1120px) {
  :is(.ampersand-page, .ampersand-model-card) .site-header { --header-width: 1280px; }
}
@media (min-width: 701px) {
  :is(.ampersand-page, .ampersand-model-card) .site-nav .theme-toggle { position: absolute; left: 100%; margin-left: 4px; top: 50%; transform: translateY(-50%); width: 20px; }
}
.theme-toggle { position: relative; display: inline-block; flex: 0 0 32px; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink); font-size: 0; cursor: pointer; }
/* Moon in light mode (the button switches to dark), sun in dark mode; drawn as a mask so it takes the text color. */
.theme-toggle::before { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 16px; height: 16px; background: currentColor; opacity: .6; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.5 14.2A8.5 8.5 0 0 1 9.8 3.5a8.5 8.5 0 1 0 10.7 10.7z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.5 14.2A8.5 8.5 0 0 1 9.8 3.5a8.5 8.5 0 1 0 10.7 10.7z'/%3E%3C/svg%3E") center / contain no-repeat; }
.theme-toggle[aria-pressed="true"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='4' fill='black'/%3E%3Cpath d='M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='4' fill='black'/%3E%3Cpath d='M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4'/%3E%3C/svg%3E"); }
.theme-toggle::before { width: 10px; height: 10px; box-sizing: border-box; border: 1.5px solid currentColor; border-radius: 50%; background: transparent; -webkit-mask: none; mask: none; }
.theme-toggle[aria-pressed="true"]::before { background: linear-gradient(90deg, currentColor 50%, transparent 50%); -webkit-mask: none; mask: none; }
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover::before { opacity: 1; }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media print { .theme-toggle { display: none; } }
@media (max-width: 700px) {
  :is(.ampersand-page, .ampersand-model-card) .site-header { min-height: 98px; padding: 10px 20px; }
  :is(.ampersand-page, .ampersand-model-card) .site-nav { gap: 18px; }
}
