@font-face {
  font-family: "DM Sans Variable";
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url("../fonts/dm-sans-variable.ttf") format("truetype");
}

@font-face {
  font-family: "DM Sans Variable";
  font-style: italic;
  font-weight: 100 1000;
  font-display: swap;
  src: url("../fonts/dm-sans-variable-italic.ttf") format("truetype");
}

:root {
  /* Rose primitives */
  --rose-neutral-0: #ffffff;
  --rose-neutral-50: #fafafa;
  --rose-neutral-100: #f5f5f5;
  --rose-neutral-150: #f4f4f4;
  --rose-neutral-200: #ececec;
  --rose-neutral-300: #d4d4d4;
  --rose-neutral-400: #a3a3a3;
  --rose-neutral-500: #737373;
  --rose-neutral-600: #525252;
  --rose-neutral-700: #404040;
  --rose-neutral-800: #262626;
  --rose-neutral-900: #171717;
  --rose-neutral-950: #0a0a0a;
  --rose-brand-50: #f0f5ff;
  --rose-brand-100: #e6f0ff;
  --rose-brand-200: #bfdbfe;
  --rose-brand-300: #93c5fd;
  --rose-brand-400: #60a5fa;
  --rose-brand-500: #3b82f6;
  --rose-brand-600: #2563eb;
  --rose-brand-700: #1d4ed8;
  --rose-brand-800: #1e40af;
  --rose-brand-900: #1e3a8a;
  --rose-brand-950: #172554;
  --rose-red-50: #fef2f2;
  --rose-red-600: #dc2626;
  --rose-green-50: #f0fdf4;
  --rose-green-600: #16a34a;
  --rose-amber-50: #fffbeb;
  --rose-amber-600: #d97706;
  --rose-sky-50: #f0f9ff;
  --rose-sky-600: #0284c7;

  /* Rose semantics */
  --rose-background: var(--rose-neutral-50);
  --rose-surface: var(--rose-neutral-0);
  --rose-surface-sunken: var(--rose-neutral-100);
  --rose-foreground: var(--rose-neutral-950);
  --rose-foreground-secondary: var(--rose-neutral-700);
  --rose-foreground-muted: var(--rose-neutral-500);
  --rose-border: var(--rose-neutral-200);
  --rose-border-strong: var(--rose-neutral-300);
  --rose-link: var(--rose-brand-600);
  --rose-link-hover: var(--rose-brand-700);
  --rose-accent: var(--rose-brand-100);
  --rose-accent-faint: var(--rose-brand-50);
  --rose-accent-foreground: var(--rose-brand-700);
  --rose-primary: var(--rose-neutral-950);
  --rose-primary-hover: var(--rose-neutral-800);
  --rose-primary-foreground: var(--rose-neutral-0);
  --rose-ring: var(--rose-brand-600);
  --rose-code-background: var(--rose-neutral-100);
  --rose-code-foreground: var(--rose-neutral-800);
  --rose-radius-xs: 4px;
  --rose-radius-sm: 6px;
  --rose-radius-md: 8px;
  --rose-radius-lg: 12px;
  --rose-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --rose-shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --rose-content-max: 1320px;
  --rose-duration-fast: 120ms;
  --rose-duration-base: 150ms;
  --rose-easing: cubic-bezier(0.2, 0, 0, 1);
}

[data-md-color-scheme="default"] {
  --md-primary-fg-color: var(--rose-surface);
  --md-primary-fg-color--light: var(--rose-brand-400);
  --md-primary-fg-color--dark: var(--rose-brand-700);
  --md-primary-bg-color: var(--rose-foreground);
  --md-primary-bg-color--light: var(--rose-foreground-secondary);
  --md-accent-fg-color: var(--rose-link);
  --md-accent-fg-color--transparent: rgba(37, 99, 235, 0.1);
  --md-default-bg-color: var(--rose-background);
  --md-default-fg-color: var(--rose-foreground);
  --md-default-fg-color--light: var(--rose-foreground-secondary);
  --md-default-fg-color--lighter: var(--rose-foreground-muted);
  --md-default-fg-color--lightest: var(--rose-border);
  --md-code-bg-color: var(--rose-code-background);
  --md-code-fg-color: var(--rose-code-foreground);
  --md-typeset-a-color: var(--rose-link);
}

[data-md-color-scheme="slate"] {
  --rose-background: var(--rose-neutral-950);
  --rose-surface: var(--rose-neutral-900);
  --rose-surface-sunken: var(--rose-neutral-800);
  --rose-foreground: var(--rose-neutral-50);
  --rose-foreground-secondary: var(--rose-neutral-300);
  --rose-foreground-muted: var(--rose-neutral-400);
  --rose-border: var(--rose-neutral-800);
  --rose-border-strong: var(--rose-neutral-700);
  --rose-link: var(--rose-brand-400);
  --rose-link-hover: var(--rose-brand-300);
  --rose-accent: var(--rose-brand-950);
  --rose-accent-faint: #101a33;
  --rose-accent-foreground: var(--rose-brand-300);
  --rose-primary: var(--rose-neutral-50);
  --rose-primary-hover: var(--rose-neutral-200);
  --rose-primary-foreground: var(--rose-neutral-950);
  --rose-ring: var(--rose-brand-500);
  --rose-code-background: var(--rose-neutral-900);
  --rose-code-foreground: var(--rose-neutral-200);
  --md-primary-fg-color: var(--rose-surface);
  --md-primary-fg-color--light: var(--rose-brand-400);
  --md-primary-fg-color--dark: var(--rose-brand-700);
  --md-primary-bg-color: var(--rose-foreground);
  --md-primary-bg-color--light: var(--rose-foreground-secondary);
  --md-accent-fg-color: var(--rose-link);
  --md-accent-fg-color--transparent: rgba(96, 165, 250, 0.12);
  --md-default-bg-color: var(--rose-background);
  --md-default-fg-color: var(--rose-foreground);
  --md-default-fg-color--light: var(--rose-foreground-secondary);
  --md-default-fg-color--lighter: var(--rose-foreground-muted);
  --md-default-fg-color--lightest: var(--rose-border);
  --md-code-bg-color: var(--rose-code-background);
  --md-code-fg-color: var(--rose-code-foreground);
  --md-typeset-a-color: var(--rose-link);
}

html {
  scroll-padding-top: 5rem;
}

body,
input {
  font-family: "DM Sans Variable", "DM Sans", sans-serif;
  font-optical-sizing: auto;
}

body {
  background: var(--rose-background);
  color: var(--rose-foreground);
}

::selection {
  background: var(--rose-brand-200);
  color: var(--rose-neutral-950);
}

:focus-visible {
  outline: 2px solid var(--rose-ring);
  outline-offset: 3px;
}

.md-grid {
  max-width: var(--rose-content-max);
}

.md-header {
  background: var(--rose-surface);
  border-bottom: 1px solid var(--rose-border);
  box-shadow: var(--rose-shadow-sm);
  color: var(--rose-foreground);
}

.md-header__inner {
  min-height: 3.25rem;
}

.md-header__button {
  color: var(--rose-foreground-secondary);
  transition:
    color var(--rose-duration-fast) var(--rose-easing),
    background-color var(--rose-duration-fast) var(--rose-easing);
}

.md-header__button:hover {
  color: var(--rose-foreground);
}

.md-header__button.md-logo {
  align-items: center;
  display: inline-flex;
  margin: 0;
  padding: 0.5rem 0.8rem 0.5rem 0;
}

.md-header__button.md-logo img,
.md-header__button.md-logo svg {
  height: auto;
  width: 4.7rem;
}

.md-header__title {
  font-size: 0.78rem;
  font-weight: 600;
}

.md-header__topic:first-child {
  color: var(--rose-foreground);
}

.md-search__form {
  background: var(--rose-surface-sunken);
  border: 1px solid var(--rose-border);
  border-radius: var(--rose-radius-md);
  box-shadow: none;
  color: var(--rose-foreground);
  transition:
    border-color var(--rose-duration-fast) var(--rose-easing),
    box-shadow var(--rose-duration-fast) var(--rose-easing),
    background-color var(--rose-duration-fast) var(--rose-easing);
}

.md-search__form:hover {
  border-color: var(--rose-border-strong);
}

.md-search__input {
  color: var(--rose-foreground);
}

.md-search__input::placeholder {
  color: var(--rose-foreground-muted);
}

.md-search__input:focus {
  background: var(--rose-surface);
  box-shadow: 0 0 0 2px var(--rose-ring);
}

.md-search__output {
  background: var(--rose-surface);
  border: 1px solid var(--rose-border);
  border-radius: var(--rose-radius-lg);
  box-shadow: var(--rose-shadow-md);
}

.md-search-result__meta {
  background: var(--rose-surface-sunken);
  color: var(--rose-foreground-muted);
}

.md-tabs {
  background: var(--rose-surface);
  border-bottom: 1px solid var(--rose-border);
  color: var(--rose-foreground-secondary);
}

.md-tabs__link {
  font-size: 0.68rem;
  font-weight: 600;
  margin-top: 0.75rem;
  opacity: 1;
  transition: color var(--rose-duration-fast) var(--rose-easing);
}

.md-tabs__item--active .md-tabs__link,
.md-tabs__link:hover {
  color: var(--rose-link);
}

.md-main {
  background: var(--rose-background);
}

.md-main__inner {
  margin-top: 1.5rem;
}

.md-sidebar {
  color: var(--rose-foreground-secondary);
}

.md-sidebar__scrollwrap {
  scrollbar-color: var(--rose-border-strong) transparent;
}

.md-nav {
  font-size: 0.7rem;
}

.md-nav__title {
  background: transparent;
  box-shadow: none;
  color: var(--rose-foreground);
  font-weight: 650;
}

.md-nav__link {
  border-radius: var(--rose-radius-sm);
  color: var(--rose-foreground-secondary);
  margin: 0.18rem 0;
  padding: 0.35rem 0.5rem;
  transition:
    background-color var(--rose-duration-fast) var(--rose-easing),
    color var(--rose-duration-fast) var(--rose-easing);
}

.md-nav__link:is(:focus, :hover) {
  background: var(--rose-surface-sunken);
  color: var(--rose-foreground);
}

.md-nav__link--active,
.md-nav__link--active:is(:focus, :hover) {
  background: var(--rose-accent-faint);
  color: var(--rose-accent-foreground);
  font-weight: 650;
}

.md-nav--secondary {
  border-left: 1px solid var(--rose-border);
}

.md-nav--secondary .md-nav__link {
  border-radius: 0;
  margin: 0;
  padding-block: 0.28rem;
}

.md-nav--secondary .md-nav__link--active {
  background: transparent;
  box-shadow: -2px 0 0 var(--rose-link);
}

.md-content {
  min-width: 0;
}

.md-content__inner {
  max-width: 52rem;
  padding-bottom: 4rem;
}

.md-content__inner::before {
  height: 0;
}

.md-typeset {
  color: var(--rose-foreground-secondary);
  font-size: 0.8rem;
  line-height: 1.68;
  text-wrap: pretty;
}

.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-typeset h4 {
  color: var(--rose-foreground);
  font-weight: 680;
  line-height: 1.2;
  text-wrap: balance;
}

.md-typeset h1 {
  font-size: clamp(1.8rem, 3vw, 2.2rem);
  letter-spacing: -0.025em;
  margin-bottom: 0.85rem;
}

.md-typeset h2 {
  font-size: 1.25rem;
  letter-spacing: -0.015em;
  margin: 2.4rem 0 0.7rem;
}

.md-typeset h3 {
  font-size: 1rem;
  margin: 1.8rem 0 0.55rem;
}

.md-typeset h4 {
  font-size: 0.9rem;
}

.md-typeset p,
.md-typeset ul,
.md-typeset ol {
  max-width: 74ch;
}

.md-typeset strong {
  color: var(--rose-foreground);
  font-weight: 650;
}

.md-typeset a {
  color: var(--rose-link);
  text-decoration-color: color-mix(in srgb, var(--rose-link) 35%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
  transition:
    color var(--rose-duration-fast) var(--rose-easing),
    text-decoration-color var(--rose-duration-fast) var(--rose-easing);
}

.md-typeset a:hover {
  color: var(--rose-link-hover);
  text-decoration-color: currentColor;
}

.md-typeset .headerlink {
  color: var(--rose-foreground-muted);
}

.md-typeset hr {
  border-bottom-color: var(--rose-border);
}

.md-typeset blockquote {
  border-left: 3px solid var(--rose-brand-300);
  color: var(--rose-foreground-secondary);
  margin-left: 0;
  padding: 0.3rem 0 0.3rem 1rem;
}

.md-typeset code,
.md-typeset kbd,
.md-typeset pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.md-typeset code {
  background: var(--rose-code-background);
  border: 1px solid var(--rose-border);
  border-radius: var(--rose-radius-xs);
  color: var(--rose-code-foreground);
  padding: 0.08em 0.32em;
}

.md-typeset pre {
  border: 1px solid var(--rose-border);
  border-radius: var(--rose-radius-md);
  box-shadow: var(--rose-shadow-sm);
}

.md-typeset pre > code {
  border: 0;
  border-radius: inherit;
  padding: 1rem 1.1rem;
}

.md-typeset .highlighttable,
.md-typeset .highlight {
  border-radius: var(--rose-radius-md);
}

.md-clipboard {
  color: var(--rose-foreground-muted);
}

.md-clipboard:is(:focus, :hover) {
  color: var(--rose-link);
}

.md-typeset table:not([class]) {
  background: var(--rose-surface);
  border: 1px solid var(--rose-border);
  border-radius: var(--rose-radius-md);
  box-shadow: var(--rose-shadow-sm);
  overflow: hidden;
}

.md-typeset table:not([class]) th {
  background: var(--rose-surface-sunken);
  color: var(--rose-foreground);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
}

.md-typeset table:not([class]) td {
  border-top-color: var(--rose-border);
}

.md-typeset table:not([class]) tr:hover {
  background: color-mix(in srgb, var(--rose-surface-sunken) 55%, transparent);
}

.md-typeset .md-button {
  border: 1px solid var(--rose-border-strong);
  border-radius: var(--rose-radius-md);
  color: var(--rose-foreground);
  font-size: 0.7rem;
  font-weight: 650;
  padding: 0.55rem 0.9rem;
  transition:
    background-color var(--rose-duration-fast) var(--rose-easing),
    border-color var(--rose-duration-fast) var(--rose-easing),
    color var(--rose-duration-fast) var(--rose-easing);
}

.md-typeset .md-button:is(:focus, :hover) {
  background: var(--rose-surface-sunken);
  border-color: var(--rose-foreground-muted);
  color: var(--rose-foreground);
}

.md-typeset .md-button--primary {
  background: var(--rose-primary);
  border-color: var(--rose-primary);
  color: var(--rose-primary-foreground);
}

.md-typeset .md-button--primary:is(:focus, :hover) {
  background: var(--rose-primary-hover);
  border-color: var(--rose-primary-hover);
  color: var(--rose-primary-foreground);
}

.md-typeset .admonition,
.md-typeset details {
  background: var(--rose-surface);
  border-color: var(--rose-border);
  border-radius: var(--rose-radius-md);
  box-shadow: var(--rose-shadow-sm);
}

.md-typeset .admonition-title,
.md-typeset summary {
  background: var(--rose-surface-sunken);
  border-radius: var(--rose-radius-md) var(--rose-radius-md) 0 0;
  color: var(--rose-foreground);
}

.md-typeset .admonition.note,
.md-typeset details.note,
.md-typeset .admonition.info,
.md-typeset details.info {
  border-color: var(--rose-brand-300);
}

.md-typeset .admonition.warning,
.md-typeset details.warning {
  border-color: var(--rose-amber-600);
}

.md-typeset .admonition.danger,
.md-typeset details.danger,
.md-typeset .admonition.failure,
.md-typeset details.failure {
  border-color: var(--rose-red-600);
}

.md-typeset .admonition.success,
.md-typeset details.success {
  border-color: var(--rose-green-600);
}

.md-typeset .tabbed-set {
  border: 1px solid var(--rose-border);
  border-radius: var(--rose-radius-md);
  overflow: hidden;
}

.md-typeset .tabbed-labels {
  background: var(--rose-surface-sunken);
  box-shadow: inset 0 -1px var(--rose-border);
}

.md-typeset .tabbed-labels > label {
  color: var(--rose-foreground-muted);
  font-weight: 600;
}

.md-typeset .tabbed-labels > label:hover,
.md-typeset .tabbed-set > input:checked + label {
  color: var(--rose-link);
}

.md-typeset .grid.cards > ul > li {
  background: var(--rose-surface);
  border-color: var(--rose-border);
  border-radius: var(--rose-radius-lg);
  box-shadow: var(--rose-shadow-sm);
  transition:
    border-color var(--rose-duration-fast) var(--rose-easing),
    box-shadow var(--rose-duration-fast) var(--rose-easing);
}

.md-typeset .grid.cards > ul > li:hover {
  border-color: var(--rose-brand-300);
  box-shadow: var(--rose-shadow-md);
}

.md-footer {
  background: var(--rose-neutral-950);
  color: var(--rose-neutral-300);
}

.md-footer-meta {
  background: var(--rose-neutral-950);
}

.md-footer__link {
  color: var(--rose-neutral-200);
}

.md-footer__title {
  font-weight: 650;
}

.md-top {
  background: var(--rose-primary);
  border-radius: var(--rose-radius-md);
  box-shadow: var(--rose-shadow-md);
  color: var(--rose-primary-foreground);
}

@media screen and (max-width: 76.234375em) {
  .md-nav--primary .md-nav__title[for="__drawer"] {
    background: var(--rose-surface);
    border-bottom: 1px solid var(--rose-border);
    color: var(--rose-foreground);
  }

  .md-nav--primary .md-nav__title .md-logo img,
  .md-nav--primary .md-nav__title .md-logo svg {
    height: auto;
    width: 4.7rem;
  }

  .md-sidebar--primary {
    background: var(--rose-surface);
  }
}

@media screen and (max-width: 44.984375em) {
  .md-header__inner {
    min-height: 3rem;
  }

  .md-main__inner {
    margin-top: 0.75rem;
  }

  .md-content__inner {
    padding-bottom: 2.5rem;
  }

  .md-typeset {
    font-size: 0.8rem;
  }

  .md-typeset h1 {
    font-size: 1.75rem;
  }

  .md-typeset h2 {
    font-size: 1.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
