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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

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

body {
  background:
    linear-gradient(180deg, var(--color-body-gradient-surface) 0, var(--color-body-gradient-bg-fade) 520px),
    var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  margin: 0;
  min-width: 320px;
  text-rendering: geometricPrecision;
}

body.nav-open {
  overflow: hidden;
}

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

:where(main, section, article, aside, header, footer, nav, div, ul, ol, li, dl, dt, dd, p, h1, h2, h3, h4, h5, h6) {
  min-width: 0;
}

img {
  height: auto;
}

.themeable-svg {
  height: auto;
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
}

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

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

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

p a,
.text-large a,
.text-small a,
.caption a {
  color: var(--color-primary);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--color-primary) 34%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

p a:hover,
.text-large a:hover,
.text-small a:hover,
.caption a:hover,
p a:focus-visible,
.text-large a:focus-visible,
.text-small a:focus-visible,
.caption a:focus-visible {
  color: var(--color-primary-hover);
  text-decoration-color: currentColor;
}

p,
h1,
h2,
h3,
h4,
h5,
h6,
ul,
ol,
figure,
blockquote {
  margin: 0;
}

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

h1,
h2,
h3,
h4 {
  color: var(--color-text-strong);
  font-family: var(--font-heading);
  font-weight: var(--font-weight-heading);
  max-width: 100%;
  overflow-wrap: break-word;
  text-wrap: balance;
}

h1 {
  font-size: var(--font-size-display-xl);
  font-weight: var(--font-weight-display);
  letter-spacing: var(--letter-spacing-display);
  line-height: var(--line-height-display);
}

h2 {
  font-size: var(--font-size-h2);
  letter-spacing: var(--letter-spacing-heading);
  line-height: var(--line-height-heading);
}

h3 {
  font-size: var(--font-size-h3);
  letter-spacing: var(--letter-spacing-subheading);
  line-height: var(--line-height-subheading);
}

h4 {
  font-size: var(--font-size-h4);
  letter-spacing: var(--letter-spacing-title);
  line-height: 1.25;
}

p {
  color: var(--color-text-muted);
  max-width: var(--text-max, none);
  overflow-wrap: break-word;
  text-wrap: pretty;
}

strong {
  color: var(--color-text-strong);
  font-weight: 700;
}

.text-large {
  color: var(--color-text);
  font-size: var(--font-size-body-lg);
  line-height: var(--line-height-body-lg);
}

.text-small {
  font-size: var(--font-size-body-sm);
  line-height: var(--line-height-body-sm);
}

.caption {
  color: var(--color-text-soft);
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-caption);
}

.text-muted {
  color: var(--color-text-muted);
}

.text-soft {
  color: var(--color-text-soft);
}

.text-strong {
  color: var(--color-text-strong);
}

.skip-link {
  background: var(--color-primary);
  border-radius: var(--radius-pill);
  color: var(--color-text-inverse);
  font-weight: 700;
  left: 20px;
  padding: 12px 18px;
  position: fixed;
  top: 20px;
  transform: translateY(-160%);
  z-index: var(--z-skip-link);
}

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

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

[hidden] {
  display: none !important;
}

::selection {
  background: var(--color-selection-bg);
  color: var(--color-text-strong);
}

@media (max-width: 980px) {
  h1 {
    font-size: var(--font-size-display-lg);
  }

  h2 {
    font-size: 38px;
  }

  h3 {
    font-size: 24px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  h1,
  h2,
  h3,
  h4 {
    text-wrap: pretty;
  }

  h1 {
    font-size: var(--font-size-display-xl);
    line-height: 1.03;
  }

  h2 {
    font-size: var(--font-size-h2);
  }

  .text-large {
    font-size: 18px;
  }
}
