/**
 * Editorial typography parity
 *
 * This is the final, role-scoped type layer for page and long-form content.
 * Search, forms, navigation, buttons, cards, maps, metadata, badges and modal
 * surfaces deliberately keep their component-owned type scales.
 */

body.wp-child-theme-marnamic {
  --marnamic-type-page-h1: clamp(2.125rem, 3.75vw, 3rem);
  --marnamic-type-detail-h1: clamp(2rem, 3.25vw, 2.625rem);
  --marnamic-type-section-h2: clamp(1.375rem, 2.35vw, 1.875rem);
  --marnamic-type-section-h3: clamp(1.125rem, 1.65vw, 1.375rem);
  --marnamic-type-editorial-copy-size: 18px;
  --marnamic-type-editorial-copy-line: 27px;
}

/* Page and marketing H1: 34px to 48px. Repeating the semantic body class is
 * intentional so this late contract also wins over page-editor style blocks. */
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  .page__text > .mn-home h1,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  .mn-info .mn-hero h1,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-blog-intro > .marnamic-blog-intro__title,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-matching-intro__copy > h1,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-matching-complete > h1,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic.marnamic-account-area
  .hp-page__content > .hp-page__title,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-glossary-category-hero__title,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic:is(.category, .tag)
  .header-hero.category--single .category__name,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic.tax-hp_listing_category
  .header-hero .hp-listing-category__name,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  .page__text > h1 {
  font-size: var(--marnamic-type-page-h1) !important;
  line-height: 1.08 !important;
  letter-spacing: 0 !important;
}

/* Article and marketplace detail H1: 32px to 42px. */
body.single-post.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  .header-hero.post--single .post__title,
body.single-glossary.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  article.glossary > .entry-title,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic.hp-template--vendor-view-page
  .hp-page__content > .hp-page__title,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic.hp-template--listing-view-page
  .hp-page__content > .hp-listing__title {
  font-size: var(--marnamic-type-detail-h1) !important;
  line-height: 1.1 !important;
  letter-spacing: 0 !important;
}

/* Section H2: only editorial headings, never nested component headings. */
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  .page__text > h2,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  .mn-home > h2,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  .mn-home-intro > h2,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  .mn-home-explore__copy > h2,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  .mn-home-steps > h2,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  .mn-home-benefits__head > h2,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  .mn-info .mn-center > h2,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  .mn-info .mn-section > .mn-wrap > h2,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  .mn-info .mn-story > :not(.mn-story__panel) > h2,
body.single-post.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  .post--single .post__text h2,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-matching-account-intro > h2,
body.single-glossary.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  article.glossary > .entry-content h2,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic.hp-template--listing-view-page
  .hp-page__content > .hp-listing__description h2,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-blog-empty > h2 {
  font-size: var(--marnamic-type-section-h2) !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
}

/* Section H3: the same editorial boundary as H2. */
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  .page__text > h3,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  .mn-home > h3,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  .mn-home-intro > h3,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  .mn-home-explore__copy > h3,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  .mn-home-steps > h3,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  .mn-home-benefits__head > h3,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  .mn-info .mn-center > h3,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  .mn-info .mn-section > .mn-wrap > h3,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  .mn-info .mn-story > :not(.mn-story__panel) > h3,
body.single-post.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  .post--single .post__text h3,
body.single-glossary.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  article.glossary > .entry-content h3,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic.hp-template--listing-view-page
  .hp-page__content > .hp-listing__description h3 {
  font-size: var(--marnamic-type-section-h3) !important;
  line-height: 1.25 !important;
  letter-spacing: 0 !important;
}

/* Standard editorial copy: 18px / 27px on wide screens. Direct-child
 * selectors prevent the scale from leaking into embedded UI components. */
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  .page__text > p,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  .page__text > :is(ul, ol) > li,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  .page__text > .mn-home :is(
    .mn-home-lead,
    .mn-home-intro > p,
    .mn-home-explore__copy > p,
    .mn-home-benefits__head > p
  ),
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  .mn-info .mn-lead,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  .mn-info .mn-center > p,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  .mn-info .mn-story > :not(.mn-story__panel) > p,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-blog-intro > .marnamic-blog-intro__description,
body.single-post.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  .post--single .post__text > p,
body.single-post.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  .post--single .post__text > :is(ul, ol) > li,
body.single-post.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  .post--single .post__text > blockquote > p,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-matching-intro__copy > p,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-matching-complete > p,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic.marnamic-account-area
  .hp-page__content > .hp-page__description,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-glossary-category-hero__description,
body.single-glossary.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  article.glossary > .entry-content > p,
body.single-glossary.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  article.glossary > .entry-content > :is(ul, ol) > li,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic.hp-template--listing-view-page
  .hp-page__content > .hp-listing__description > p,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic.hp-template--listing-view-page
  .hp-page__content > .hp-listing__description > :is(ul, ol) > li,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic:is(.category, .tag)
  .header-hero.category--single .category__description,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic.tax-hp_listing_category
  .header-hero .hp-listing-category__description,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-blog-empty > p {
  font-size: var(--marnamic-type-editorial-copy-size) !important;
  line-height: var(--marnamic-type-editorial-copy-line) !important;
}

@media (max-width: 980px) {
  body.wp-child-theme-marnamic {
    --marnamic-type-page-h1: clamp(2.125rem, 6vw, 2.625rem);
    --marnamic-type-detail-h1: clamp(2rem, 5.5vw, 2.5rem);
    --marnamic-type-section-h2: clamp(1.375rem, 4vw, 1.75rem);
    --marnamic-type-section-h3: clamp(1.125rem, 3vw, 1.3125rem);
    --marnamic-type-editorial-copy-size: 16px;
    --marnamic-type-editorial-copy-line: 24px;
  }
}
