/* Shared reading rhythm for every page, card and dialog.
   Loaded last to reconcile the older page-specific typography layers. */
body.layout-two,
body.payment-success-page {
  --reading-line: 1.55;
  --reading-heading: 1.4;
  --reading-paragraph-gap: .75em;
  line-height: var(--reading-line);
}

html body:is(.layout-two, .payment-success-page) :is(main, dialog, footer) :is(
  p, li, blockquote, figcaption, summary, dt, dd,
  .custom-text-box, .custom-content, .dialog-private, .package-included,
  .course-description, .section-lead, .module-title, .policy-article
) {
  line-height: var(--reading-line) !important;
}

html body:is(.layout-two, .payment-success-page) :is(main, dialog, footer) :is(h1, h2, h3, h4) {
  line-height: var(--reading-heading) !important;
}
/* Keep the large, two-line Latin wordmark's existing compact rhythm. */
html body.layout-two #intro #sky-title { line-height: 1.2 !important; }

html body.layout-two :is(
  .overview-copy, .channel-card, .home-brief-card, .learning-about-copy,
  .home-start-reminder, .about-cover-copy, .story-point-copy, .story-pair-copy,
  .life-copy, .income-story-copy, .platform-story, .platform-trend-copy,
  .work-journal-heading, .review-intro, .experience-offer, .course-about-inner,
  .lesson-intro, .course-body, .audience-grid article, .policy-article,
  .policy-dialog, .faq-list details, .module-body, .dialog-content
) > p:not(.eyebrow):not(.price):not(.course-format):not(.expert-years) {
  margin-bottom: var(--reading-paragraph-gap);
}
html body.layout-two :is(
  .overview-copy, .channel-card, .home-brief-card, .learning-about-copy,
  .home-start-reminder, .story-point-copy, .story-pair-copy, .life-copy,
  .income-story-copy, .platform-story, .platform-trend-copy,
  .review-intro, .lesson-intro, .audience-grid article, .policy-article,
  .policy-dialog, .faq-list details, .module-body
) > p:last-child { margin-bottom: 0; }

html body.layout-two .course-description { min-height: 0; }
html body.layout-two .benefit-list,
html body.layout-two #curriculum .curriculum-overview ul,
html body.layout-two .module-body ol { row-gap: 6px; }
html body.layout-two .lesson-title-row { margin-bottom: 12px; }
html body.layout-two :is(.lesson-card, .audience-grid article, .course-body) h3 {
  margin-bottom: 10px;
}
html body.layout-two .lesson-modal-topics > ol { row-gap: 18px; margin-top: 18px; }
html body.layout-two .lesson-topic > h3 { margin-bottom: 6px; }
html body.layout-two .lesson-module-outcome { margin-block: 18px 20px; }
html body.layout-two .lesson-modal-content > h2 { margin-bottom: 12px; }
html body.layout-two .lesson-modal-topics .lesson-subgroup-heading { margin-block: 22px 10px; }
html body.layout-two #course-dialog .steps { gap: 0; }
html body.layout-two #course-dialog .steps li { padding-block: 14px; }
html body.layout-two #course-dialog .steps h3 { margin-bottom: 6px; }
html body.layout-two #course-dialog .checkout-steps h2 { margin-bottom: 12px; }

html body.payment-success-page .steps { margin-top: 18px; }
html body.payment-success-page .steps li { padding-block: 18px; }
html body.payment-success-page .steps h3 { margin-bottom: 6px; }
html body.payment-success-page .welcome-copy { margin-top: 16px; }
html body.payment-success-page .tax-card > p { margin-top: 12px; }

@media (max-width: 750px) {
  body.layout-two,
  body.payment-success-page {
    --reading-line: 1.5;
    --reading-paragraph-gap: .65em;
  }
  html body.layout-two .benefit-list,
  html body.layout-two #curriculum .curriculum-overview ul,
  html body.layout-two .module-body ol { row-gap: 5px; }
  html body.layout-two .lesson-modal-topics > ol { row-gap: 16px; }
  html body.layout-two #course-dialog .steps li,
  html body.payment-success-page .steps li { padding-block: 14px; }
}
