/*
 * Sleepfreaks fixed-page typography standard — approved 2026-08-25.
 * Reversible: remove this stylesheet link from the six page templates to
 * restore their previous type scales without changing component CSS.
 */

body.sf-e-page main {
  font-family: "Noto Sans JP", sans-serif;
}

/*
 * Completed fixed pages share the 1180px desktop content rail.
 * Narrow text measures inside those rails remain unchanged where they aid
 * reading; the selectors below are the visible section/card containers.
 */
@media (min-width: 768px) {
  body.sf-about-page :is(
    .sf-about-profile .sf-e-wrap,
    .sf-about-message .sf-e-wrap,
    .sf-about-ai .sf-e-wrap
  ),
  body.sf-law-page .sf-law-inner,
  body.sf-static-page :is(.sf-static-hero h1, .sf-migrated-content),
  body.sf-migrated-page :is(.sf-mp-intro .sf-e-wrap, .sf-mp-form-section .sf-e-wrap),
  body.sf-trial-page :is(.sf-trial-section-head, .sf-trial-cta-inner),
  body.sf-voice-page .sf-voice-section-head,
  body.sf-instructor-page .sf-instructor-section-head,
  body.sf-instructor-profile-page .sf-ip-section-heading {
    width: 100% !important;
    max-width: 1180px !important;
    margin-right: auto !important;
    margin-left: auto !important;
  }

  /* Desktop display headings use the approved 64px common scale. */
  body.sf-about-page .sf-about-hero h1,
  body.sf-law-page .sf-law-hero h1,
  body.sf-static-page .sf-static-hero h1,
  body.sf-lesson-scene-page .sf-mp-hero h1,
  body.sf-instructor-profile-page .sf-ip-hero h1,
  body.sf-migrated-page :is(
    .sf-mp-intro h2,
    .sf-mp-cta h2,
    .sf-mp-steps h2,
    .sf-mp-form-head h2
  ) {
    font-size: 64px !important;
    font-weight: 900 !important;
  }

  /* Long supporting headings keep the approved compact major scale. */
  body.sf-about-page main h2,
  body.sf-soft-page main > section h2,
  body.sf-instructor-page .sf-instructor-policy h2 {
    font-size: 40px !important;
    line-height: 1.3 !important;
  }

  /* Card headings use the shared 22.4px role. */
  body.sf-migrated-page .sf-mp-info-card h2,
  body.sf-instructor-profile-page .sf-ip-policy-card h2 {
    font-size: 22.4px !important;
    line-height: 1.4 !important;
  }

  /* Explicitly approved one-line exception for the narrow instructor heading. */
  body.sf-instructor-profile-page .sf-ip-style-grid .sf-ip-section-heading h2 {
    font-size: 52px !important;
    white-space: nowrap !important;
  }

  body.sf-static-page .sf-static-kicker,
  body.sf-instructor-profile-page .sf-ip-kicker {
    font-size: 12px !important;
  }
}

/* Course pages: full-width section headings share the homepage display scale. */
body.sf-course-page main > section:not(.sf-course-hero) h2 {
  font-size: 4rem !important;
  font-weight: 900 !important;
  line-height: 1.16 !important;
  letter-spacing: -0.055em !important;
}

/* Long or narrow-column headings use the approved compact major scale. */
body.sf-course-page main > section.sf-e-support h2.sf-e-support-title,
body.sf-course-page .sf-course-price .sf-course-section-head h2,
body.sf-course-page .sf-course-faq .sf-course-section-head h2,
body.sf-course-page .sf-course-trial h2,
body.sf-beginner-page .sf-course-intro .sf-course-section-head h2 {
  font-size: 2.5rem !important;
  line-height: 1.3 !important;
  letter-spacing: -0.045em !important;
}

body.sf-course-page main > section:not(.sf-course-hero) h3 {
  font-size: 1.4rem !important;
  font-weight: 900 !important;
  line-height: 1.4 !important;
  letter-spacing: -0.035em !important;
}

body.sf-course-page main > section:not(.sf-course-hero) p {
  font-size: 1rem !important;
  line-height: 1.8 !important;
}

body.sf-course-page main > section:not(.sf-course-hero) li {
  font-size: 1rem !important;
  line-height: 1.75 !important;
}

body.sf-course-page main > section:not(.sf-course-hero) summary {
  font-size: 1rem !important;
  line-height: 1.7 !important;
}

body.sf-course-page main :is(
  .sf-course-section-head,
  .sf-ai-stance-head,
  .sf-e-section-head,
  .sf-ai-requirements-grid > div,
  .sf-course-certificate-grid > div,
  .sf-e-trial-inner > div
) > small {
  font-size: 0.75rem !important;
  font-weight: 900 !important;
  line-height: 1.4 !important;
  letter-spacing: 0.18em !important;
}

/* Dense curriculum details remain supporting information. */
body.sf-course-page .sf-course-curriculum-list details li {
  font-size: 0.8125rem !important;
  line-height: 1.7 !important;
}

/* Company page: the long message heading is a compact major heading. */
body.sf-about-page main h2 {
  font-size: 2.5rem !important;
  font-weight: 900 !important;
  line-height: 1.3 !important;
  letter-spacing: -0.045em !important;
}

body.sf-about-page main h3 {
  font-size: 1.4rem !important;
  font-weight: 900 !important;
  line-height: 1.4 !important;
  letter-spacing: -0.035em !important;
  width: auto !important;
  max-width: 100% !important;
  white-space: normal !important;
}

body.sf-about-page main :is(p, li, dd) {
  font-size: 1rem !important;
  line-height: 1.8 !important;
}

body.sf-about-page main :is(.sf-about-eyebrow, .sf-about-message-kicker, .sf-about-label) {
  font-size: 0.75rem !important;
  font-weight: 900 !important;
  line-height: 1.4 !important;
  letter-spacing: 0.18em !important;
}

/* Application page: use the approved fixed-page hierarchy. */
body.sf-apply-page .sf-apply-hero h1 {
  font-size: 4rem !important;
  font-weight: 900 !important;
  line-height: 1.16 !important;
  letter-spacing: -0.055em !important;
}

body.sf-apply-page main :is(.sf-apply-kicker, .sf-apply-label) {
  font-size: 0.75rem !important;
  font-weight: 900 !important;
  line-height: 1.4 !important;
  letter-spacing: 0.18em !important;
}

body.sf-apply-page main :is(.sf-apply-guide h2, .sf-apply-receipt h2) {
  font-size: 1.4rem !important;
  font-weight: 900 !important;
  line-height: 1.4 !important;
  letter-spacing: -0.035em !important;
}

body.sf-apply-page main :is(
  .sf-apply-hero-inner > p:last-child,
  .sf-apply-copy p,
  .sf-apply-receipt p:not(.sf-apply-label)
) {
  font-size: 1rem !important;
  line-height: 1.8 !important;
}

body.sf-apply-page main .sf-apply-cta {
  font-size: 1rem !important;
  line-height: 1.4 !important;
}

/* Legal page headings function as card/item headings, not display headings. */
body.sf-law-page main h2 {
  font-size: 1.4rem !important;
  font-weight: 900 !important;
  line-height: 1.4 !important;
  letter-spacing: -0.035em !important;
}

body.sf-law-page main h3 {
  font-size: 1.25rem !important;
  font-weight: 900 !important;
  line-height: 1.42 !important;
  letter-spacing: -0.025em !important;
}

body.sf-law-page main :is(p, li, dd) {
  font-size: 1rem !important;
  line-height: 1.8 !important;
}

/* Migrated fixed pages use a conventional document hierarchy. */
body.sf-static-page .sf-migrated-content {
  font-size: 1rem !important;
  line-height: 1.8 !important;
}

body.sf-static-page .sf-migrated-content :is(p, li, dd) {
  font-size: 1rem !important;
  line-height: 1.8 !important;
}

body.sf-static-page .sf-migrated-content h2 {
  font-size: 2.125rem !important;
  font-weight: 900 !important;
  line-height: 1.35 !important;
}

body.sf-static-page .sf-migrated-content h3 {
  font-size: 1.4rem !important;
  font-weight: 900 !important;
  line-height: 1.4 !important;
}

body.sf-static-page .sf-migrated-content h4 {
  font-size: 1.1875rem !important;
  font-weight: 900 !important;
  line-height: 1.5 !important;
}

/* The page directory keeps its information-dense card metadata. */
body.sf-page-list-page .sf-page-list-hero > div > p:not(.sf-page-list-kicker),
body.sf-page-list-page .sf-page-list-group header > span {
  font-size: 1rem !important;
  line-height: 1.75 !important;
}

body.sf-page-list-page .sf-page-list-group h2 {
  font-size: 2.125rem !important;
  font-weight: 900 !important;
  line-height: 1.35 !important;
}

@media (max-width: 767px) {
  body.sf-apply-page .sf-apply-hero h1 {
    font-size: 2rem !important;
    line-height: 1.22 !important;
  }

  body.sf-apply-page main :is(.sf-apply-guide h2, .sf-apply-receipt h2) {
    font-size: 1.25rem !important;
    line-height: 1.42 !important;
  }

  body.sf-course-page main > section:not(.sf-course-hero) h2 {
    font-size: 2rem !important;
    line-height: 1.22 !important;
    letter-spacing: -0.05em !important;
    white-space: normal !important;
  }

  body.sf-course-page main > section.sf-e-support h2.sf-e-support-title,
  body.sf-course-page .sf-course-price .sf-course-section-head h2,
  body.sf-course-page .sf-course-faq .sf-course-section-head h2,
  body.sf-course-page .sf-course-trial h2,
  body.sf-beginner-page .sf-course-intro .sf-course-section-head h2 {
    font-size: 2rem !important;
    line-height: 1.22 !important;
  }

  body.sf-course-page main > section.sf-e-support h2.sf-e-support-title {
    font-size: 1.75rem !important;
    line-height: 1.35 !important;
  }

  body.sf-course-page main > section.sf-course-trial h2 {
    font-size: 1.5rem !important;
    line-height: 1.35 !important;
  }

  body.sf-course-page main > section.sf-course-trial h2 br {
    display: none;
  }

  body.sf-ai-page .sf-course-trial .sf-ai-heading-mobile-line {
    display: inline !important;
  }

  body.sf-beginner-page .sf-course-intro .sf-course-section-head h2 {
    font-size: 1.5rem !important;
    line-height: 1.35 !important;
  }

  body.sf-beginner-page .sf-course-intro .sf-course-section-head h2 br {
    display: none;
  }

  body.sf-course-page main > section:not(.sf-course-hero) h3,
  body.sf-about-page main h3,
  body.sf-static-page .sf-migrated-content h3 {
    font-size: 1.25rem !important;
    line-height: 1.42 !important;
  }

  body.sf-about-page main h2 {
    font-size: 1.75rem !important;
    line-height: 1.35 !important;
  }

  body.sf-static-page .sf-migrated-content h2,
  body.sf-page-list-page .sf-page-list-group h2 {
    font-size: 1.25rem !important;
    line-height: 1.42 !important;
  }

  /* Older custom templates use the same approved mobile header geometry. */
  body:is(.sf-about-page, .sf-law-page) .sf-e-brand {
    width: 145px !important;
    min-width: 145px !important;
    flex-basis: 145px !important;
  }

  body:is(.sf-about-page, .sf-law-page) .sf-e-nav {
    width: 174px !important;
    margin-left: auto !important;
  }

  body:is(.sf-about-page, .sf-law-page) .sf-e-nav-cta {
    width: 174px !important;
    min-width: 174px !important;
    padding: 10px !important;
    font-size: 0.72rem !important;
    white-space: nowrap !important;
  }
}

/* Keep the company-page long headings on the approved compact 40px scale. */
@media (min-width: 768px) {
  body.sf-about-page main h2 {
    font-size: 40px !important;
  }

  body.sf-contact-page .sf-contact-source {
    width: 100% !important;
    max-width: 1180px !important;
    margin-right: auto !important;
    margin-left: auto !important;
  }
}
