/*
 * Text scale for large screens (v6.36)
 *
 * On 4K the project layouts already grow with the window, but their text
 * stopped growing at 2200 px (root 21 px): body copy ended near 1.3x of its
 * 1920 size and small labels near 12 px. The target is the one used in the
 * HGK instrument (Resonance Print): text about 1.25x, 1.4x, 1.6x and 1.8x of
 * its 1920 size from 2200x1200, 2450x1380, 3000x1650 and 3400x1900.
 *
 * The page itself is not zoomed: many layouts size sections in vw, and a page
 * zoom would multiply those widths beyond the window. Instead the outermost
 * text blocks are zoomed by --tb, the extra factor each page still needs
 * (measured per page, docs/qa/2026-10-17-content-consistency/scale/).
 * Display headings (h1, h2), images, canvases and the grid keep their own
 * scaling. Interfaces with a fixed geometry are excluded.
 */
@media (min-width: 2450px) and (min-height: 1380px) { :root { --tb: 1.07; } }
@media (min-width: 3000px) and (min-height: 1650px) { :root { --tb: 1.22; } }
@media (min-width: 3400px) and (min-height: 1900px) { :root { --tb: 1.37; } }

/* Pages whose text already grows with the window. */
@media (min-width: 2450px) and (min-height: 1380px) {
  body[data-readability="events-umwelt"] { --tb: 1; }
  body[data-readability="events-raum-basel"] { --tb: 1; }
}
@media (min-width: 3000px) and (min-height: 1650px) {
  body[data-readability="events-raum-basel"] { --tb: 1.07; }
  body[data-readability="events-testimonien-einer-nahen-zukunft"] { --tb: 1.2; }
}
@media (min-width: 3400px) and (min-height: 1900px) {
  body[data-readability="events-raum-basel"] { --tb: 1.2; }
  body[data-readability="events-testimonien-einer-nahen-zukunft"] { --tb: 1.13; }
}

/* Pages without the shared wide-screen root size need the whole factor. */
@media (min-width: 2200px) and (min-height: 1200px) {
  body[data-readability="research-swiss-creative-tech-education"], body[data-readability="autorschaft"] { --tb: 1.25; }
}
@media (min-width: 2450px) and (min-height: 1380px) {
  body[data-readability="research-swiss-creative-tech-education"], body[data-readability="autorschaft"] { --tb: 1.4; }
}
@media (min-width: 3000px) and (min-height: 1650px) {
  body[data-readability="research-swiss-creative-tech-education"], body[data-readability="autorschaft"] { --tb: 1.6; }
}
@media (min-width: 3400px) and (min-height: 1900px) {
  body[data-readability="research-swiss-creative-tech-education"], body[data-readability="autorschaft"] { --tb: 1.8; }
}

@media (min-width: 2200px) and (min-height: 1200px) {
  :where(p, li, dt, dd, figcaption, blockquote, h3, h4, h5, h6, label, summary, legend, caption, th, td, address, button, select, small):not(:where(p, li, dt, dd, figcaption, blockquote, h1, h2, h3, h4, h5, h6, label, summary, legend, caption, th, td, address, button, select, small) *):not(:where(.receiver-object, svg, .is-embedded, .site-utilities) *):not(.utility-button, .frame-corner) {
    zoom: var(--tb, 1);
  }
  /* Standalone labels: inline elements outside any text block, and leaf divs. */
  :where(span, a, b, strong, i, em, time, cite, code, div:not(:has(*))):not(:where(p, li, dt, dd, figcaption, blockquote, h1, h2, h3, h4, h5, h6, label, summary, legend, caption, th, td, address, button, select, small, span, a, b, strong, i, em, time, cite, code) *):not(:where(.receiver-object, svg, .is-embedded, .site-utilities) *):not(.utility-button, .frame-corner) {
    zoom: var(--tb, 1);
  }
}
