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

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page-background);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

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

a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 150ms ease;
}

a:hover { color: var(--interactive-hover); }

h1,
h2,
h3,
h4 {
  margin-block: 0 var(--space-4);
  color: var(--heading);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

h1 {
  color: var(--heading-h1-color);
  font-size: var(--heading-h1-size);
  font-weight: 700;
  line-height: 1.15;
}

h2 {
  color: var(--heading-h2-color);
  font-size: var(--heading-h2-size);
  font-weight: 700;
}

h3 { color: var(--heading-h3-color); font-size: var(--heading-h3-size); font-weight: 600; }
h4 { color: var(--heading-h4-color); font-size: var(--heading-h4-size); font-weight: 600; }
.content-text,
.rich-text { color: var(--body-text-color); font-size: var(--body-text-size); }
p { margin-block: 0 var(--space-4); }
small { font-size: 14px; }

button,
input {
  font: inherit;
}

:focus-visible {
  outline: 3px solid var(--interactive-hover);
  outline-offset: 3px;
}

.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;
  z-index: 1000;
  top: var(--space-3);
  left: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--surface);
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }
.body-large { font-size: 18px; }

@media (max-width: 767px) {
  h1 { font-size: var(--heading-h1-mobile-size); }
  h2 { font-size: var(--heading-h2-mobile-size); }
}

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