/* Shared reading typography: low specificity preserves intentional display layouts. */
:where(p) {
  text-align: justify;
  text-align-last: start;
  text-justify: inter-word;
  -webkit-hyphens: auto;
  hyphens: auto;
  hyphenate-limit-chars: 7 3 3;
  overflow-wrap: break-word;
}

/* Labels, controls, reference columns and small cards are not continuous prose. */
:where(header p, nav p, footer p, aside p, button p, figcaption p,
       td p, th p, .eye, .eyebrow, .term-meta, .topic-list p,
       .topic-grid p, .profile-grid p, .cards p, .example-grid p,
       .text-left, .text-start, [data-prose-align="start"]) {
  text-align: start;
  text-align-last: auto;
}
:where(.text-center, [data-prose-align="center"]) {
  text-align: center;
  text-align-last: auto;
}

/* On very narrow phones, ragged-right avoids stretched word spacing. */
@media (max-width: 420px) {
  :where(p) { text-align: start; text-align-last: auto; }
}
@media print {
  :where(main > p, article p, .historical-context p) {
    text-align: justify;
    text-align-last: start;
  }
}
