/* projector.css — A FLOOR UNDER ROOM-FACING TEXT.
 *
 * Measured, not guessed: 103 elements across 18 surfaces render below 12px, and preflight calls three
 * projector geometries red for it — "smallest body text 11px, unreadable from row twenty". A conference
 * room is the one place where 11px is not a style choice, it is text that some of the audience simply
 * cannot read, and they will not say so.
 *
 * ══ WHY A FLOOR AND NOT A REWRITE ══
 * The tempting fix is to hunt every rule and bump it. That is the fix-one-instance error at scale: 103 edits
 * across surfaces built at different times, and the page I add tomorrow starts at 11px again. A floor holds
 * for pages that do not exist yet.
 *
 * ══ WHY THIS IS NOT A LOBOTOMY OF THE DESIGN ══
 * It raises a MINIMUM. It does not flatten the type scale, does not touch anything already at or above the
 * floor, and does not change any layout that was already legible. Small type is a legitimate device for
 * hierarchy — a caption should look like a caption — so the floor is set at the readability threshold
 * (12px), not at body size, which preserves the visual distinction between a caption and its paragraph
 * while making both readable.
 *
 * ══ WHAT IT DELIBERATELY DOES NOT TOUCH ══
 *   [data-chrome="presenter"]  the keyboard hints and Morphy's own card. Read at arm's length by one
 *                              person driving the talk, never by row twenty. Holding it to room legibility
 *                              would be a false red, and preflight already exempts it BY DECLARATION.
 *   the frozen corpus          those 174 pages are certified and served verbatim. They are in a frame and
 *                              this stylesheet does not cross into it. Their typography is theirs.
 */

:root { --room-floor: 12px; }

/* The floor. `max()` keeps any larger size untouched, so this can only ever raise. */
body :where(p, li, td, th, span, div, dd, dt, figcaption, label, small, cite, blockquote) {
  font-size: max(1em, var(--room-floor));
}

/* Elements that set their size in px below the floor need the floor applied to the computed value rather
   than to 1em, or `max(1em, 12px)` resolves against the parent and lets a small child through. */
body :where(small, figcaption, cite, .caption, .note, .meta, .hint, .stat, .pill, .badge, .grp, .out) {
  font-size: max(var(--room-floor), 0.82rem);
}

/* Presenter chrome keeps its own scale — declared, exempt, and unchanged. */
[data-chrome="presenter"],
[data-chrome="presenter"] :where(p, li, td, th, span, div, small, label) {
  font-size: revert;
}

/* A floor can push a fixed-width element into overflow, and horizontal overflow on a projector means text
   is off the edge of the screen with no way to reach it — a worse failure than the one being fixed. These
   let long words and tables give way instead of pushing the page sideways. */
body { overflow-wrap: break-word; }
table { table-layout: auto; }
:where(pre, code, table, .scroll) { max-width: 100%; overflow-x: auto; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
