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

* {
  margin: 0;
}

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

html,
body {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-variation-settings: 'wdth' 100;
  font-size: var(--text-base);
  line-height: calc(var(--leading-base) + var(--body-line-height-bump));
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition:
    background-color var(--duration-base) var(--ease-out-expo),
    color var(--duration-base) var(--ease-out-expo);
}

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

/* Defensive default: an inline icon svg with no explicit size (a missed
   component-specific rule) would otherwise render at its ~300x150 intrinsic
   size instead of disappearing invisibly. Components that need a different
   size (feature icons, the diagram) override this with a higher-specificity
   class rule. */
svg {
  display: inline-block;
  width: 1em;
  height: 1em;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

input,
button {
  font-family: inherit;
}

ul,
ol {
  list-style: none;
  padding: 0;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-variation-settings: 'wdth' 120;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: var(--leading-tight);
  text-wrap: balance;
  color: var(--ink);
}

p {
  text-wrap: pretty;
}

h1 {
  font-size: var(--text-hero);
}
h2 {
  font-size: var(--text-3xl);
}
h3 {
  font-size: var(--text-2xl);
}
h4 {
  font-size: var(--text-xl);
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: var(--space-2);
  left: var(--space-2);
  z-index: var(--z-toast);
  padding: var(--space-2) var(--space-4);
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius-md);
  font-weight: 600;
  transform: translateY(-150%);
  transition: transform var(--duration-fast) var(--ease-out-expo);
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--space-6);
}

@media (min-width: 768px) {
  .container {
    padding-inline: var(--space-8);
  }
}

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