/* Reset and element defaults. No components here. */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5.5rem; } /* the sticky header must not cover anchor targets or focused elements */
html:has(body.admin-bar) { scroll-padding-top: 7.5rem; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: var(--wp--custom--line-height--body);
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--space-4);
  font-family: var(--font-heading);
  font-weight: 400;
  text-wrap: balance;
}
p, ul, ol, dl, blockquote, figure, address { margin: 0 0 var(--space-4); }
address { font-style: normal; }
ul, ol { padding-left: 1.25em; }

a { color: var(--color-primary); text-underline-offset: 0.15em; }
a:hover { color: var(--color-primary-hover); text-decoration-thickness: 2px; }

img, video, iframe { max-width: 100%; height: auto; }
img { display: block; }

hr { border: 0; border-top: 1px solid var(--color-border); margin: var(--space-6) 0; }

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

::selection { background: var(--color-primary); color: var(--color-primary-contrast); }

.screen-reader-text {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100%;
  z-index: 100;
  padding: var(--space-3) var(--space-4);
  background: var(--color-primary);
  color: var(--color-primary-contrast);
}
.skip-link:focus { top: var(--space-4); }

main:focus { outline: none; }

@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;
  }
}
