/* /chapter1 is the reading reference. Retain its three distinct tiers:
   chapter/primary heading, smaller subtitle/section heading, narrative body.
   The approved home aliases, logos, navigation, controls and footer are excluded. */
html body {
  --site-landing-title-size: min(calc(.4 * 1.2vw + 1rem), max(calc(.4 * .012 * 1800px + 1rem), 1.4rem));
  --site-reference-heading-size: calc(2 * var(--site-landing-title-size));
  --site-landing-body-size: 1rem;
}
@media screen and (max-width:767px) and (orientation:portrait) {
  html body { --site-landing-title-size: calc(.4 * (.012 * min(100vh, 900px)) + 1rem); }
}
/* Same specificity as the existing APPLY mobile adapter; this shared policy
   is finalized after that adapter, so a subtitle cannot become a large title. */
html body :is(main#page,main) [data-site-text-size][data-site-reading="primary"] {
  font-family:var(--heading-font-font-family,"Gilda Display") !important;
  font-size:var(--site-reference-heading-size) !important;
  font-weight:400 !important;
  font-style:var(--heading-font-font-style,normal) !important;
  line-height:calc(var(--heading-font-line-height,1.2em) * (1 + (1 - var(--heading-2-size-value,2.8)) / 25)) !important;
  letter-spacing:var(--heading-font-letter-spacing,-.02em) !important;
}
html body :is(main#page,main) [data-site-text-size][data-site-reading="secondary"] {
  font-family:var(--heading-font-font-family,"Gilda Display") !important;
  font-size:var(--site-landing-title-size) !important;
  font-weight:400 !important;
  font-style:var(--heading-font-font-style,normal) !important;
  line-height:calc(var(--heading-font-line-height,1.2em) * (1 + (1 - var(--heading-4-size-value,1.6)) / 25)) !important;
  letter-spacing:var(--heading-font-letter-spacing,-.02em) !important;
}
html body :is(main#page,main) [data-site-text-size][data-site-reading="body"] {
  font-family:var(--body-font-font-family,"PT Serif") !important;
  font-size:var(--site-landing-body-size) !important;
  line-height:var(--body-font-line-height,1.5em) !important;
  letter-spacing:normal !important;
}
html body :is(main#page,main) [data-site-reading] :is(a,span,strong,em,b,i,small):not(:is(math,.katex,.MathJax,mjx-container,pre,code,button,.sqs-block-button-element,a.enter,.sqs-system-button,.site-language-trigger) *):not(math,.katex,.MathJax,mjx-container,pre,code,button,.sqs-block-button-element,a.enter,.sqs-system-button,.site-language-trigger) {
  font-family:inherit !important;
  font-size:inherit !important;
  line-height:inherit;
  letter-spacing:inherit;
}
html body :is(main#page,main) :is([data-site-reading="primary"],[data-site-reading="secondary"]) :is(strong,b,a,span):not(math,.katex,.MathJax,mjx-container,pre,code,.sqs-block-button-element,a.enter,.sqs-system-button):not(:is(math,.katex,.MathJax,mjx-container,pre,code,button,.sqs-block-button-element,a.enter,.sqs-system-button) *) { font-weight:inherit !important; }
/* Retain the prior size-only inline normalization, including its existing
   formula-root sizing. Never replace a formula's own font face or leading. */
html body :is(#page,main) [data-site-text-size] :is(a,span,strong,em,b,i,small):not(:is(math,.katex,.MathJax,mjx-container,pre,code) *) { font-size:inherit !important; }
/* Reuse the existing self-hosted serif glyph packs. English uses the exact
   chapter reference faces; translations retain their script-specific fallbacks. */
html[data-site-language]:not([data-site-language="en"]) body :is(main#page,main) :is([data-site-reading="primary"],[data-site-reading="secondary"]) {
  font-family:"Gilda Display",var(--site-serif-fallback),Georgia,serif !important;
}
html[data-site-language]:not([data-site-language="en"]) body :is(main#page,main) [data-site-reading="body"] {
  font-family:"PT Serif",var(--site-serif-fallback),Georgia,serif !important;
}
/* Preserve authored alignment/line breaks. Code and equations keep their own
   fonts and scroll lanes; typography does not rewrite text, controls or media. */
@media (max-width:767px) {
  html body :is(main,#page) [data-site-text-size] { min-inline-size:0; max-inline-size:100%; overflow-wrap:anywhere; }
  html body main :is(pre,.katex-display,.MathJax_Display,.cosmology-equation) { max-inline-size:100%; overflow-x:auto; overscroll-behavior-inline:contain; }
  html body main .sqs-html-content table { display:block; max-inline-size:100%; overflow-x:auto; }
}
