body {
  font-family: var(--body-font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-color);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--heading-font);
  color: var(--grey-90);
  text-wrap: balance; /* even line lengths on wrapped titles, no orphaned last word */
}

h1 {
  font-size: var(--h1-fs);
  line-height: var(--h1-lh);
  letter-spacing: var(--h1-ls);
  font-weight: 700;
}

/* Heading weights: display + h1 bold (700); h2–h6 semibold (600) — weight never
   goes UP as the size goes down. Heebo is requested at 400/600/700 in
   enqueue-styles.php. The hero-jumbo (display) and the Large CTA (an h2 at the h1 step) set 700
   explicitly in sections.css. Don't use an unloaded weight (500) on a heading. */
h2 {
  font-size: var(--h2-fs);
  line-height: var(--h2-lh);
  letter-spacing: var(--h2-ls);
  font-weight: 600;
}

h3 {
  font-size: var(--h3-fs);
  line-height: var(--h3-lh);
  letter-spacing: var(--h3-ls);
  font-weight: 600;
}

/* h4 and h5 deliberately share one step (cards use h5 for titles, profiles h4
   for names) — differentiate them by context, not size. */
h4, h5 {
  font-size: var(--h4-h5-fs);
  line-height: var(--h4-h5-lh);
  font-weight: 600;
}

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

* + h2,
* + h3,
* + h4 {
  margin-top: var(--space-md-lg-d);
}

/* Prose rhythm (rich text: API/WYSIWYG content). h1/h5/h6 aren't in the global
   rule above because component titles use them as the first thing after an image
   or avatar (member/group/news cards) and shouldn't gain a top margin. A heading
   also sits closer to what it introduces than to what came before it (proximity),
   so heading → paragraph/list is tighter than paragraph → paragraph. */
.rich-text * + h1 {
  margin-top: var(--space-md-lg-d);
}

.rich-text * + h5,
.rich-text * + h6 {
  margin-top: var(--space-md);
}

.rich-text :is(h1, h2, h3, h4, h5, h6) + :is(p, ul, ol, blockquote) {
  margin-top: var(--space-sm);
}

/* A heading straight after another (title + subtitle) is one unit, so it doesn't
   need the big gap that separates a heading from the paragraph before it. */
.rich-text :is(h1, h2, h3, h4, h5, h6) + :is(h1, h2, h3, h4, h5, h6) {
  margin-top: var(--space-md);
}

a {
  color: var(--primary-color);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

/* Links in body copy are always underlined — colour alone (pink on #333 text)
   isn't enough to tell a link from text. Buttons and nav/card links live outside
   prose so they're untouched. Hover thickens the line. */
:where(p, blockquote, .rich-text) a:not(.button):not(.cta-button) {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

:where(p, blockquote, .rich-text) a:not(.button):not(.cta-button):hover {
  text-decoration-thickness: 2px;
}

ul,
ol {
  padding-left: var(--space-md);
}

/* Default list rhythm (also what rich-text lists use); lists that need more air
   opt in below. :where() keeps the specificity at the bare `li + li` level, so
   component overrides (e.g. `.desktop-navigation .menu li`) still win. */
li + li {
  margin-top: var(--space-sm);
}

:where(.faqs__list, .menu, .sub-menu) li + li {
  margin-top: var(--space-md);
}

small {
  font-size: var(--font-sm);
}


strong {
  font-weight: 700;
}

em {
  font-style: italic;
}

/* No margin of its own: spacing comes from the sibling rules below (top) and the
   next element's top margin, so it can't be lopsided. */
blockquote {
  padding-left: var(--space-md);
  border-left: 4px solid var(--primary-color);
}

code,
pre {
  font-family: monospace;
  font-size: 0.9375rem;
}

* + p,
* + ul,
* + ol,
* + blockquote {
  margin-top: var(--space-md);
}