:root {
  --site-canvas: #eeeeed;
  --site-surface: #f8f8f7;
  --site-surface-hover: #ffffff;
  --site-figure: #f5f5f3;
  --site-ink: #161618;
  --site-copy: #46463f;
  --site-muted: #84847e;
  --site-muted-soft: #9b9a94;
  --site-faint: #cfcfcb;
  --site-line: #dbdbd9;
  --site-nav: rgba(241, 241, 239, 0.82);
  --theme-toggle-background: rgba(255, 255, 255, 0.72);
  --theme-toggle-color: #161618;
  --theme-toggle-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.08),
    0 1px 2px rgba(0, 0, 0, 0.05);
  --theme-toggle-shadow-hover:
    0 0 0 1px rgba(0, 0, 0, 0.13),
    0 2px 6px rgba(0, 0, 0, 0.08);
}

html[data-theme="dark"] {
  --site-canvas: #121212;
  --site-surface: #1a1a19;
  --site-surface-hover: #222220;
  --site-figure: #181817;
  --site-ink: #f1f0ec;
  --site-copy: #c1c0ba;
  --site-muted: #aaa9a2;
  --site-muted-soft: #85847e;
  --site-faint: #5e5d59;
  --site-line: #343431;
  --site-nav: rgba(18, 18, 18, 0.84);
  --theme-toggle-background: rgba(255, 255, 255, 0.07);
  --theme-toggle-color: #f1f0ec;
  --theme-toggle-shadow: 0 0 0 1px rgba(255, 255, 255, 0.11);
  --theme-toggle-shadow-hover: 0 0 0 1px rgba(255, 255, 255, 0.18);
}

html,
body {
  background-color: var(--site-canvas);
}

body {
  color: var(--site-ink);
  transition-property: color, background-color;
  transition-duration: 220ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

html[data-theme="dark"],
html[data-theme="dark"] body {
  color: var(--site-ink);
  background: var(--site-canvas);
}

.theme-toggle {
  position: relative;
  display: inline-grid;
  width: 42px;
  min-width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: var(--theme-toggle-color);
  background: var(--theme-toggle-background);
  box-shadow: var(--theme-toggle-shadow);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition-property: color, background-color, box-shadow, scale;
  transition-duration: 180ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.theme-toggle:hover {
  box-shadow: var(--theme-toggle-shadow-hover);
}

.theme-toggle:active {
  scale: 0.96;
}

.theme-toggle:focus-visible {
  outline: 2px solid #f23a1b;
  outline-offset: 3px;
}

.theme-toggle__icons {
  position: relative;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
}

.theme-toggle__icon {
  position: absolute;
  inset: 0;
  width: 18px;
  height: 18px;
  opacity: 0;
  filter: blur(4px);
  scale: 0.25;
  transition-property: opacity, filter, scale;
  transition-duration: 300ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

html[data-theme="light"] .theme-toggle__sun,
html[data-theme="dark"] .theme-toggle__moon {
  opacity: 1;
  filter: blur(0);
  scale: 1;
}

html[data-theme="dark"] nav {
  border-color: var(--site-line) !important;
  background: var(--site-nav) !important;
}

html[data-theme="dark"] [data-grain] {
  opacity: 0.025 !important;
  mix-blend-mode: screen !important;
}

html[data-theme="dark"] [data-card] {
  background: var(--site-surface) !important;
}

html[data-theme="dark"] [data-card]:hover {
  background: var(--site-surface-hover) !important;
}

html[data-theme="dark"] [data-fig] {
  border-color: var(--site-line) !important;
  background: var(--site-figure) !important;
}

html[data-theme="dark"] [data-form] {
  filter: invert(0.9) hue-rotate(180deg);
}

html[data-theme="dark"] [style*="color:#161618"],
html[data-theme="dark"] [style*="color: rgb(22, 22, 24)"] {
  color: var(--site-ink) !important;
}

html[data-theme="dark"] [style*="color:#46463f"],
html[data-theme="dark"] [style*="color: rgb(70, 70, 63)"] {
  color: var(--site-copy) !important;
}

html[data-theme="dark"] [style*="color:#84847e"],
html[data-theme="dark"] [style*="color:#6b6b65"],
html[data-theme="dark"] [style*="color: rgb(132, 132, 126)"],
html[data-theme="dark"] [style*="color: rgb(107, 107, 101)"] {
  color: var(--site-muted) !important;
}

html[data-theme="dark"] [style*="color:#9b9a94"],
html[data-theme="dark"] [style*="color:#9a9a94"],
html[data-theme="dark"] [style*="color: rgb(155, 154, 148)"],
html[data-theme="dark"] [style*="color: rgb(154, 154, 148)"] {
  color: var(--site-muted-soft) !important;
}

html[data-theme="dark"] [style*="color:#cfcfcb"],
html[data-theme="dark"] [style*="color: rgb(207, 207, 203)"] {
  color: var(--site-faint) !important;
}

html[data-theme="dark"] [style*="background:#161618"],
html[data-theme="dark"] [style*="background: rgb(22, 22, 24)"] {
  background: var(--site-ink) !important;
}

html[data-theme="dark"] [style*="border:1px solid #161618"],
html[data-theme="dark"] [style*="border: 1px solid rgb(22, 22, 24)"] {
  border-color: var(--site-ink) !important;
}

html[data-theme="dark"] [style*="border:1px solid #dbdbd9"],
html[data-theme="dark"] [style*="border-bottom:1px solid #dbdbd9"],
html[data-theme="dark"] [style*="border-left:1px solid #dbdbd9"],
html[data-theme="dark"] [style*="border-top:1px solid #dbdbd9"],
html[data-theme="dark"] [style*="border: 1px solid rgb(219, 219, 217)"],
html[data-theme="dark"] [style*="border-bottom: 1px solid rgb(219, 219, 217)"],
html[data-theme="dark"] [style*="border-left: 1px solid rgb(219, 219, 217)"],
html[data-theme="dark"] [style*="border-top: 1px solid rgb(219, 219, 217)"] {
  border-color: var(--site-line) !important;
}

html[data-theme="dark"] [style*="background:#dbdbd9"],
html[data-theme="dark"] [style*="background: rgb(219, 219, 217)"] {
  background: var(--site-line) !important;
}

html[data-theme="dark"] [style*="background:#f8f8f7"],
html[data-theme="dark"] [style*="background: rgb(248, 248, 247)"] {
  background: var(--site-surface) !important;
}

html[data-theme="dark"] [style*="background:#f5f5f3"],
html[data-theme="dark"] [style*="background: rgb(245, 245, 243)"] {
  background: var(--site-figure) !important;
}

@media (max-width: 860px) {
  html[data-theme="dark"] [data-heroright] {
    border-top-color: var(--site-line) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body,
  .theme-toggle,
  .theme-toggle__icon {
    transition-duration: 0.01ms;
  }
}
