:root {
  --vm-header-height: 64px;
  --vm-header-pill-height: 30px;
  --vm-header-gap: 28px;
}

html[data-vm-theme="light"] {
  color-scheme: light;
  --vm-bg: #f6f7fc;
  --vm-panel: #fff;
  --vm-panel-soft: #edf0f8;
  --vm-text: #181c34;
  --vm-muted: #505972;
  --vm-border: #d8deeb;
}

.vm-theme-switch {
  --vm-theme-control-bg: rgba(255,255,255,.045);
  --vm-theme-control-border: rgba(255,255,255,.14);
  --vm-theme-control-active: #fff;
  --vm-theme-control-active-text: #181c34;
  --vm-theme-control-text: #c4c9da;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 1px;
  height: var(--vm-header-pill-height);
  margin-inline-start: -6px;
  padding: 2px;
  border: 1px solid var(--vm-theme-control-border);
  border-radius: 999px;
  background: var(--vm-theme-control-bg);
}

html:not([data-vm-theme]) .vm-theme-switch {
  display: none;
}

.vm-theme-switch button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  min-height: 24px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--vm-theme-control-text);
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease;
}

.vm-theme-switch button:hover {
  color: var(--vm-text);
}

.vm-theme-switch button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -2px;
}

.vm-theme-switch svg {
  flex: none;
  width: 12px;
  height: 12px;
}

html[data-vm-theme="light"] .vm-theme-switch {
  --vm-theme-control-bg: #e9edf7;
  --vm-theme-control-border: #d5dced;
  --vm-theme-control-active: #fff;
  --vm-theme-control-active-text: #181c34;
  --vm-theme-control-text: #505972;
}

html[data-vm-theme="light"] .vm-theme-choice[data-vm-theme-choice="light"],
html[data-vm-theme="dark"] .vm-theme-choice[data-vm-theme-choice="dark"] {
  background: var(--vm-theme-control-active);
  color: var(--vm-theme-control-active-text);
}

.vm-theme-switch .vm-theme-compact {
  display: none;
}

.vm-header-main > .vm-search-form {
  min-width: 40px;
}

.vm-header-main :is(.vm-icon-button, .vm-socials a, .vm-institutional-link) {
  flex: 0 0 auto;
  width: var(--vm-header-pill-height);
  height: var(--vm-header-pill-height);
  padding: 0;
}

.vm-header-main {
  --vm-header-separator-gap: 12px;
}

.vm-header-main > :is(.vm-social-separator, .vm-institutional-separator) {
  margin-inline: calc(var(--vm-header-separator-gap) - var(--vm-header-gap));
}

@media (min-width: 761px) {
  .vm-header-main > .vm-search-form.is-open .vm-search-input {
    height: var(--vm-header-pill-height);
    padding-inline: 14px 36px;
    font-size: 12px;
  }

  .vm-header-main > .vm-search-form.is-open .vm-search-toggle {
    right: 2px;
  }
}

@media (min-width: 1261px) {
  .vm-theme-switch { margin-inline-start: -16px; }
}

@media (max-width: 760px) {
  :root {
    --vm-header-height: 60px;
    --vm-header-pill-height: 34px;
  }

  .vm-header-main {
    --vm-mobile-header-end: 16px;
    --vm-header-separator-gap: 10px;
  }

  .vm-header-main.vm-has-institutional-link {
    --vm-mobile-header-end: calc(16px + var(--vm-header-pill-height) + 1px + 2 * var(--vm-header-separator-gap));
  }

  .vm-header-main > .vm-institutional-separator {
    margin-inline-start: auto;
  }

  html[data-vm-theme] .vm-header-main > .vm-search-form {
    --vm-mobile-search-right: calc(var(--vm-mobile-header-end) + var(--vm-header-pill-height) + 6px);
    top: 50%;
    transform: translateY(-50%);
  }

  html[data-vm-theme] .vm-header-main > .vm-brand {
    min-width: 0;
    max-width: calc(100% - var(--vm-mobile-header-end) - var(--vm-header-pill-height) - 85px);
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .vm-header-main > .vm-theme-switch {
    position: absolute;
    top: 50%;
    right: var(--vm-mobile-header-end);
    z-index: 6;
    display: grid;
    width: var(--vm-header-pill-height);
    margin: 0;
    padding: 0;
    transform: translateY(-50%);
  }

  .vm-theme-switch .vm-theme-choice,
  html[data-vm-theme="light"] .vm-theme-compact .vm-theme-moon,
  html[data-vm-theme="dark"] .vm-theme-compact .vm-theme-sun {
    display: none;
  }

  .vm-theme-switch .vm-theme-compact {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: var(--vm-text);
  }

  .vm-theme-compact svg {
    width: 14px;
    height: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vm-theme-switch button { transition: none; }
}

html[data-vm-theme="light"] .vm-header {
  --vm-header-glass: rgba(255,255,255,.87);
  --vm-secondary-glass: rgba(229,234,248,.79);
  border-color: var(--vm-border);
  background: linear-gradient(to bottom,
    var(--vm-header-glass) 0 var(--vm-header-height),
    var(--vm-secondary-glass) var(--vm-header-height) 100%);
}

html[data-vm-theme="light"] .vm-secondary,
html[data-vm-theme="light"] .vm-mobile-drawer {
  border-color: var(--vm-border);
}

html[data-vm-theme="light"] .vm-mobile-drawer {
  background: rgba(250,251,255,.96);
}

html[data-vm-theme="light"] .vm-brand,
html[data-vm-theme="light"] .vm-footer-brand,
html[data-vm-theme="light"] .vm-header .vm-icon-button:not(.vm-search-toggle),
html[data-vm-theme="light"] .vm-socials a,
html[data-vm-theme="light"] .vm-institutional-link {
  color: var(--vm-text);
}

html[data-vm-theme="light"] .vm-nav-link,
html[data-vm-theme="light"] .vm-nav-trigger,
html[data-vm-theme="light"] .vm-nav-popover a {
  color: var(--vm-muted);
}

html[data-vm-theme="light"] :is(.vm-nav-link,.vm-nav-trigger,.vm-nav-popover a):is(:hover,:focus-visible,.is-active),
html[data-vm-theme="light"] .vm-nav-group.is-open > .vm-nav-trigger {
  background: rgba(27,40,81,.08);
  color: var(--vm-text);
}

html[data-vm-theme="light"] .vm-nav-popover {
  border-color: var(--vm-border);
  background: rgba(255,255,255,.98);
  box-shadow: 0 20px 50px rgba(32,44,80,.15);
}

html[data-vm-theme="light"] .vm-mobile-drawer .vm-nav-popover {
  background: var(--vm-panel-soft);
  box-shadow: none;
}

html[data-vm-theme="light"] .vm-social-separator,
html[data-vm-theme="light"] .vm-institutional-separator {
  background: var(--vm-border);
}

html[data-vm-theme="light"] .vm-socials a,
html[data-vm-theme="light"] .vm-institutional-link {
  border-color: var(--vm-border);
  background: rgba(27,40,81,.035);
}

html[data-vm-theme="light"] :is(.vm-socials a,.vm-institutional-link,.vm-mobile-toggle):is(:hover,:focus-visible) {
  background: rgba(27,40,81,.10);
}

html[data-vm-theme="light"] .vm-footer {
  border-color: var(--vm-border);
  background: #e9edf7;
}

html[data-vm-theme="light"] .vm-footer-links a,
html[data-vm-theme="light"] .vm-footer-columns {
  border-color: var(--vm-border);
  color: var(--vm-muted);
}

html[data-vm-theme="light"] .vm-footer-links a:is(:hover,:focus-visible) {
  color: var(--vm-text);
}
