*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Sans titles: one class, applied to any wrapper.
   The composite --type-* shorthands must be re-declared here: a nested var() inside a
   custom property is substituted where it is DECLARED (:root), so --type-title would
   otherwise stay frozen on the serif no matter where the class lands. */
.ot-titles-sans {
  --font-display: var(--font-sans);
  --type-display: var(--weight-medium) var(--text-5xl) / var(--leading-tight) var(--font-sans);
  --type-title: var(--weight-medium) var(--text-3xl) / var(--leading-snug) var(--font-sans);
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--surface-page);
  color: var(--text-body);
  font: var(--type-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: anywhere;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--text-display);
  font-family: var(--font-display);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-display);
  text-wrap: pretty;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: var(--text-link);
  text-decoration-color: color-mix(in oklch, var(--text-link) 35%, transparent);
  text-underline-offset: 3px;
  transition: color var(--duration-2) var(--ease-standard);
}
a:hover {
  color: var(--text-link-hover);
  text-decoration-color: currentColor;
}

code,
pre,
kbd {
  font-family: var(--font-mono);
}

::selection {
  background: var(--accent-wash);
  color: var(--ink-1);
}

:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
  border-radius: var(--radius-1);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
