/* Adapted from Qrzzzz NavActions.vue and site.css; see THIRD_PARTY_NOTICES.md. */

.NavActions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 12px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.theme-toggle,
.nav-github {
  position: relative;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  transition: background-color 160ms ease, color 160ms ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible,
.nav-github:hover,
.nav-github:focus-visible {
  background: var(--selection);
  color: var(--link);
}

.nav-github::after {
  display: none;
  content: none;
}

.theme-toggle {
  display: grid;
  flex: 0 0 40px;
  place-items: center;
  padding: 0;
  cursor: pointer;
}

.theme-toggle__track {
  position: relative;
  display: block;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 7px;
  background: transparent;
}

.theme-toggle__thumb {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: transparent;
  box-shadow: none;
  color: inherit;
  transition:
    color 250ms ease,
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.theme-toggle.is-dark .theme-toggle__thumb {
  color: var(--link);
  transform: rotate(8deg);
}

.theme-toggle:hover .theme-toggle__thumb,
.theme-toggle:focus-visible .theme-toggle__thumb {
  color: var(--link);
}

.theme-toggle__icon {
  position: absolute;
  inset: 9px;
}

.theme-toggle__icon svg {
  position: absolute;
  inset: 0;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transition:
    opacity 180ms ease,
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.theme-toggle__sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.theme-toggle__moon {
  opacity: 0;
  transform: rotate(-45deg) scale(0.5);
}

.theme-toggle.is-dark .theme-toggle__sun {
  opacity: 0;
  transform: rotate(45deg) scale(0.5);
}

.theme-toggle.is-dark .theme-toggle__moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.nav-github {
  display: inline-flex;
  flex: 0 0 40px;
  align-items: center;
  justify-content: center;
  padding: 0;
  text-decoration: none;
}

.nav-github > svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: currentColor;
}

@media (max-width: 767.98px) {
  .NavActions {
    gap: 2px;
    margin-left: 6px;
    padding-left: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .theme-toggle__track,
  .theme-toggle__thumb,
  .theme-toggle__icon svg,
  .theme-toggle,
  .nav-github {
    transition: none;
  }
}

.theme-toggle, .nav-github { width: 44px; height: 44px; flex-basis: 44px; }
.theme-toggle__icon { inset: 7px; }
.theme-toggle__icon svg { width: 18px; height: 18px; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }
html.theme-fade-out body { animation: theme-page-fade-out 144ms ease both; }
html.theme-fade-in body { animation: theme-page-fade-in 176ms ease both; }
@keyframes theme-page-fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes theme-page-fade-in { from { opacity: 0; } to { opacity: 1; } }
/* Navigation dimensions from current site.css, without line markers. */
.header-inner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; min-height: 88px; gap: 20px; }
.header-inner nav { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.header-inner nav a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 10px; font-size: 12px; color: var(--muted); }
.header-inner nav a:hover, .header-inner nav a[aria-current="page"] { color: var(--link); text-decoration: none; }
.home-link { display: inline-flex; align-items: center; width: auto; min-height: 44px; padding: 0; border-radius: 3px; }
.site-brand { color: var(--ink); font: 400 18px/1.4 var(--sans); letter-spacing: -.7px; white-space: nowrap; }
.NavActions { gap: 4px; border: 0; margin: 0; padding: 0; }
.theme-toggle, .nav-github { border-radius: 3px; }
@media (max-width: 639px) {
  .header-inner { grid-template-columns: auto minmax(0, 1fr) auto; gap: 0 12px; padding-block: 8px; }
  .home-link { grid-column: 1; grid-row: 1; }
  .NavActions { grid-column: 3; grid-row: 1; }
  .header-inner nav { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; gap: 4px; }
  .header-inner nav a { padding-inline: 0; }
}
