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

html {
  font-size: var(--tf-size-root);
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--tf-paper);
  color: var(--tf-ink);
  font-family: var(--tf-font-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--tf-font-display);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 var(--tf-space-2);
  text-wrap: balance;
}

h1 { font-size: var(--tf-h1); }
h2 { font-size: var(--tf-h2); }
h3 { font-size: var(--tf-h3); }
h4 { font-size: 1.2rem; }

p {
  margin: 0 0 var(--tf-space-3);
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:not(.tf-btn) {
  color: var(--tf-ink);
}

a:not(.tf-btn):hover {
  color: var(--tf-accent);
}

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

ul, ol {
  padding-left: 1.25em;
}

blockquote {
  margin: 0;
  font-family: var(--tf-font-display);
  font-style: italic;
}

.tf-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--tf-ink);
  color: var(--tf-paper);
  padding: var(--tf-space-1) var(--tf-space-2);
  z-index: 1000;
}

.tf-skip-link:focus {
  left: var(--tf-space-2);
  top: var(--tf-space-2);
}

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

.tf-mono-label {
  font-family: var(--tf-font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tf-gray-500);
}
