/**
 * KND global typography scale — the ONE lever for text size across the whole platform.
 *
 * Rule (2026-10): every text size is the historic size × --knd-type-scale (14 / 12 = 1.166667, i.e. 12px → 14px).
 *   - rem / em / % / inherited sizes scale through the root below (once — never multiply them again).
 *   - Hard-coded px / pt (and the viewport part of fluid sizes) must be written as
 *       calc(<historic px> * var(--knd-type-scale, 1.166667))
 *     — always with the fallback, because some game pages render without this file's :root.
 *   - New UI: prefer rem or the shared tokens (--k-fs-*, --knd-game-text-*); qa/typography_scale_test.php fails on raw px.
 *   - Never use transform: scale() / zoom for text, never font-size: 0 tricks through calc.
 * Load FIRST in <head> (page CSS may set its own html font-size — written with the same calc so the scale still applies).
 * Bump the ?v= of every <link> to this file when it changes (static .css is cached immutable for a year).
 */
:root {
  --knd-type-scale: 1.166667;
}

html {
  font-size: calc(100% * var(--knd-type-scale));
}

/* Form controls do not inherit the page size in the UA stylesheet (13.333px): give them the scaled default; any page /
   framework rule (Bootstrap reboot: font-size: inherit) still wins — :where() has zero specificity. */
:where(button, input, select, textarea) {
  font-size: calc(13.333px * var(--knd-type-scale));
}

/* Legibility floor (2026-10): small / secondary text is never thin. Descriptions, meta lines, hints, notes, captions,
   kickers and ledes default to a medium weight (with the brighter secondary colour tokens of each design system).
   Zero specificity (:where) — a page rule that sets its own font-weight still wins; this only lifts text that would
   otherwise inherit the body's 400. Minimum text size: no font-size below calc(11.5px * scale) (≈13.4px) anywhere. */
:where(small, .small, .text-muted, .form-text, figcaption,
       [class*="desc"], [class*="meta"], [class*="hint"], [class*="note"], [class*="caption"],
       [class*="kicker"], [class*="micro"], [class*="lede"], [class*="tagline"], [class*="subtitle"], [class*="__sub"]) {
  font-weight: 500;
}
