/* Shared reading roles. Task titles introduce the work instead of filling it. */
body main .page-head { align-items: start; gap: 16px 24px; padding-top: 24px; padding-bottom: 20px; }
body main .page-head h1 { font-size: var(--title); line-height: 1.1; max-width: 24ch; }
body main .page-head .lede { font-size: var(--read); line-height: 1.6; max-width: 36em; }
body main .page-head .eyebrow { margin-bottom: 8px; }
/* Chinese body leading is comfortable at 1.7; a heading needs a different role. */
:is(h1, h2, h3, h4) [lang|="zh"], :is(h1, h2, h3, h4)[lang|="zh"] { line-height: 1.2; }
body.handbook main .page-head h1 { font-size: var(--title); }
body.handbook .doc :not(pre) > code { white-space: normal; overflow-wrap: anywhere; }
body.handbook .doc :is(figure, .table-wrap, pre) { min-width: 0; max-width: 100%; }
body.handbook .doc details > summary { min-height: var(--target); }
/* Keep touch targets, but let translated labels wrap instead of clipping. */
body .controls > .btn { white-space: normal; overflow-wrap: anywhere; }
.page-explanation { margin: 20px var(--gutter); border-top: 1px solid currentColor; }
.page-explanation > summary { cursor: pointer; min-height: var(--target); padding-block: 10px; font-size: var(--read); }
.page-explanation .start-block { padding-inline: 0; }
@media (max-width: 900px) {
  body main .page-head { gap: 12px; }
  body .opening:not(.opening-map) .opening-text { padding-top: 24px; padding-bottom: 24px; gap: 16px; }
  body .opening:not(.opening-map) h1 { font-size: var(--title); line-height: 1.1; }
  body .opening:not(.opening-map) .lede { font-size: var(--read); line-height: 1.6; }
  body .opening:not(.opening-map) .cta { margin-top: 16px; }
}

.table-scroll-hint { font-size: var(--micro); margin-bottom: 8px; }
.gate-skip-note > summary { cursor: pointer; min-height: var(--target); padding-block: 10px; }

.reference-frame { display: block; width: min(100%, 640px); height: auto; margin-block: 12px; }
.reference-frame[hidden] { display: none; }

/* Home promises: headings introduce a thought; paragraphs stay together.
   One compact reading beat within a thought, two between thoughts. */
body .promises .page-head { padding-bottom: 16px; }
body .promises .page-head h2 { font-size: var(--subtitle); line-height: 1.15; max-width: 28ch; }
body .promise-reading { display: grid; grid-template-columns: 1fr; gap: 2em; padding-bottom: 2em; font-size: var(--read); }
body .promise-reading > li { display: grid; grid-template-columns: minmax(12em, 1fr) minmax(0, 2fr); column-gap: 2em; row-gap: .5em; max-width: 68em; }
body .promise-reading h3 { margin: 0; font-size: var(--body); line-height: 1.25; max-width: 22ch; }
body .promise-reading p { margin: 0; max-width: 60ch; line-height: 1.4; }
body .promise-reading :is(h3, p) > [lang] { line-height: inherit; }
body .promise-reading p + p { margin-top: .8em; }
body .promise-reading p strong { font-size: inherit; }
html[data-lang="th"] body .promise-reading p,
html[data-lang="zh"] body .promise-reading p { line-height: 1.5; }
@media (max-width: 700px) {
  body .promise-reading > li { grid-template-columns: 1fr; }
  body .promise-reading h3 { max-width: none; }
}

/* A title and its explanation are one reading group, not distant grid ends. */
.page-head:has(h1) { grid-template-columns: fit-content(42%) minmax(0, 1fr); column-gap: 24px; }
@media (max-width: 900px) { .page-head:has(h1) { grid-template-columns: minmax(0, 1fr); } }
