/* Reset + element defaults. Style elements here; style components in components.css. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + var(--space-4));
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: var(--text-base) / var(--leading) var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 var(--space-3);
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h1 {
  font-size: var(--text-3xl);
  font-weight: 750;
}
h2 {
  font-size: var(--text-2xl);
  font-weight: 700;
}
h3 {
  font-size: var(--text-xl);
  font-weight: 650;
}
h4 {
  font-size: var(--text-lg);
  font-weight: 650;
}

p {
  margin: 0 0 var(--space-4);
  text-wrap: pretty;
}

a {
  color: var(--brand);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover {
  color: var(--brand-hover);
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: var(--space-5) 0;
}

code,
kbd,
pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}
code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.1em 0.4em;
}
pre {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4);
  overflow: auto;
}
pre code {
  background: none;
  border: 0;
  padding: 0;
}

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

::selection {
  background: var(--brand-soft);
}

[hidden] {
  display: none !important;
}

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