html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  background: var(--color-background);
  color: var(--color-foreground);
  font-size: 16px;
  overflow-x: hidden;
  overflow-wrap: break-word;
}

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(1.9rem, 5vw + 0.5rem, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3vw + 0.5rem, 2.25rem); }
h3 { font-size: clamp(1.15rem, 1.4vw + 0.6rem, 1.4rem); }

p { max-width: 62ch; }

.lede {
  font-size: clamp(1.05rem, 1.5vw + 0.6rem, 1.25rem);
  color: var(--color-muted-foreground);
}

a {
  transition: color 0.15s ease;
}

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

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

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

@media (min-width: 640px) {
  .container { padding-inline: 2rem; }
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--color-primary);
  color: var(--color-primary-foreground);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  z-index: 100;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 1rem;
}
