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

html {
  scroll-behavior: smooth;
}

html:focus-within {
  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;
  font-family: var(--font);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: var(--lh-body);
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
}

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

img,
svg,
video {
  height: auto;
}

a {
  color: var(--color-secondary);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

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

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: var(--lh-heading);
  letter-spacing: 0.01em;
  text-wrap: balance;
  color: var(--color-text);
  margin: 0 0 var(--space-16);
}

h1 {
  font-size: var(--fs-h1);
}

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

h3 {
  font-size: var(--fs-h3);
}

h4 {
  font-size: var(--fs-h4);
}

h5 {
  font-size: var(--fs-h5);
}

h6 {
  font-size: var(--fs-h6);
}

p {
  margin: 0 0 var(--space-16);
  max-width: 70ch;
  text-wrap: pretty;
}

.list,
.article ul,
.article ol,
.container > ul:not([class]),
.container > ol:not([class]) {
  margin: 0 0 var(--space-24);
  padding: 0;
  max-width: 40rem;
  display: grid;
  gap: var(--space-8);
}

.list,
.article ul,
.container > ul:not([class]) {
  list-style: none;
}

.list li,
.article ul li,
.container > ul:not([class]) li {
  position: relative;
  padding-left: 1.2em;
  color: var(--color-text);
}

.list li::before,
.article ul li::before,
.container > ul:not([class]) li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.42em;
  height: 0.42em;
  border-radius: 50%;
  background: var(--color-primary);
}

.article ol,
.container > ol:not([class]),
.list--numbered {
  list-style: none;
  counter-reset: cp-ol;
}

.article ol li,
.container > ol:not([class]) li,
.list--numbered li {
  counter-increment: cp-ol;
  padding-left: 1.75em;
}

.article ol li::before,
.container > ol:not([class]) li::before,
.list--numbered li::before {
  content: counter(cp-ol) ".";
  position: absolute;
  left: 0;
  top: 0;
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  color: var(--color-primary);
  font-weight: 600;
}

.list--pages {
  max-width: 36rem;
}

.list--pages li {
  padding-left: 0;
}

.list--pages li::before {
  content: none;
}

.list--pages a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: var(--space-12) var(--space-16);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-primary);
  text-decoration: none;
  transition: background-color var(--duration) var(--ease), color var(--duration) var(--ease), border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease), transform var(--duration) var(--ease);
}

.list--pages a::after {
  content: "→";
  color: var(--color-secondary);
  transition: color var(--duration) var(--ease), transform var(--duration) var(--ease);
}

.list--pages a:hover,
.list--pages a:focus-visible {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-on-primary);
  box-shadow: var(--shadow-lift);
  transform: translateY(-3px);
}

.list--pages a:hover::after,
.list--pages a:focus-visible::after {
  color: var(--color-accent);
  transform: translateX(4px);
}

@media (prefers-reduced-motion: reduce) {
  .list--pages a:hover,
  .list--pages a:focus-visible {
    transform: none;
  }

  .list--pages a:hover::after,
  .list--pages a:focus-visible::after {
    transform: none;
  }
}

.skip-link {
  position: absolute;
  left: var(--space-16);
  top: -100px;
  z-index: var(--z-modal);
  background: var(--color-primary);
  color: var(--color-on-primary);
  padding: var(--space-8) var(--space-16);
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: var(--space-16);
}

.container {
  width: min(100% - var(--gutter) * 2, var(--container));
  margin-inline: auto;
}

.section {
  padding: var(--section-y) 0;
}

.article,
.article p,
.article a,
.article li {
  overflow-wrap: anywhere;
}

.article table,
.article .wp-block-table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.article :where(img, video, iframe, figure) {
  border-radius: var(--radius-md);
}

.article pre {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
