.theme_switch {
  container-type: inline-size;
  --theme_switch_size: 2.05rem;
  --theme_switch_inset: 3px;
  --theme_switch_line: color-mix(in srgb, currentColor 40%, transparent);
  --theme_switch_thumb: var(--primary_color);
  --theme_switch_thumb_ink: #3d3d3c;
  --theme_switch_ease: cubic-bezier(0.65, 0, 0.35, 1);
  --theme_switch_duration: var(--transition_time_m);
  display: inline-flex;
  align-items: center;
  margin: 0;
  flex: none;
  width: calc(2 * var(--theme_switch_size));
  height: var(--theme_switch_size);
}
.theme_switch .input {
  all: unset;
  position: relative;
  display: inline-flex;
}
.theme_switch .input input {
  all: unset;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}
.theme_switch .input input:focus-visible + .switch {
  outline: var(--focus_ring_width) solid var(--focus_ring_color);
  outline-offset: var(--focus_ring_offset);
}
.theme_switch .switch {
  all: unset;
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, var(--theme_switch_size));
  height: var(--theme_switch_size);
  outline: 1px solid var(--theme_switch_line);
  outline-offset: -1px;
  transition: outline-color var(--transition_time_s) var(--ease_standard);
}
.theme_switch_thumb {
  position: absolute;
  top: var(--theme_switch_inset);
  inset-inline-start: var(--theme_switch_inset);
  width: calc(var(--theme_switch_size) - 2 * var(--theme_switch_inset));
  height: calc(var(--theme_switch_size) - 2 * var(--theme_switch_inset));
  background-color: var(--theme_switch_thumb);
  transition: inset-inline-start var(--theme_switch_duration) var(--theme_switch_ease);
}
.theme_switch_icon {
  position: relative;
  z-index: 1;
  width: 62%;
  height: 62%;
  margin: auto;
  color: currentColor;
  opacity: 0.8;
  transition: color var(--theme_switch_duration) var(--theme_switch_ease), opacity var(--theme_switch_duration) var(--theme_switch_ease), transform var(--theme_switch_duration) var(--theme_switch_ease);
}
.theme_switch .theme_switch_sun {
  color: var(--theme_switch_thumb_ink);
  opacity: 1;
}
.theme_switch .theme_switch_moon {
  transform: scale(0.9);
}
:root[data-theme=dark] .theme_switch .theme_switch_thumb,
.theme_switch input:checked + .switch .theme_switch_thumb {
  inset-inline-start: calc(var(--theme_switch_size) + var(--theme_switch_inset));
}
:root[data-theme=dark] .theme_switch .theme_switch_moon,
.theme_switch input:checked + .switch .theme_switch_moon {
  color: var(--theme_switch_thumb_ink);
  opacity: 1;
  transform: none;
}
:root[data-theme=dark] .theme_switch .theme_switch_sun,
.theme_switch input:checked + .switch .theme_switch_sun {
  color: currentColor;
  opacity: 0.8;
  transform: rotate(-45deg) scale(0.85);
}
.theme_switch:not([data-init]) :is(.theme_switch_thumb, .theme_switch_icon) {
  transition: none;
}
@media (hover: hover) {
  .theme_switch:hover .switch {
    --theme_switch_line: currentColor;
  }
  .theme_switch:hover .theme_switch_icon {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .theme_switch {
    --theme_switch_duration: 0s;
  }
}

.theme_switching::view-transition-old(root),
.theme_switching::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

.theme_switching::view-transition-new(root) {
  z-index: 2;
}