/* Default scale on a computer, by page kind (the <html> class says which; no :has(), which a browser may evaluate before <body> exists).
   2026-10-18 the whole site rendered at 90%; on 2026-10-29 the owner found it too small on wide screens, so wide screens went up; on 2026-10-30
   everything but the demos looked too big (public type is 16-20px, the demos' 11-15px) and the owner asked for it smaller, the demos staying as they were.
   - html.mv-pub (public pages, login) and html.mv-app (console): 90% from 1280px up, no zoom on phones and tablets.
   - html.mv-demo (the demo project pages): 90% (owner, 2026-11-17: «tutte le pagine delle demo sono giganteschE… al 90%, così quando si apre al 100% sono più
     piacevoli»), growing to 99% at 1920px (it was 100% to 110%); their top bars (header, tabs, F1's navbar) are zoomed back so they stay the size of the public
     pages' bar (--mv-bar-k = --mv-nav-zoom / --mv-zoom; offsets under the bars in the demos' CSS multiply by it).
   CSS `zoom` scales px and rem alike (the site mixes both), and viewport units too (100vh renders as 100vh x zoom): full-height rules divide by
   --mv-zoom, e.g. `min-height: calc(100vh / var(--mv-zoom, 1))`. Loaded by every page right after fonts.css. Only a computer
   (hover + fine pointer) is scaled. */
:root { --mv-zoom: 1; }
html.mv-demo { --mv-nav-zoom: 1; --mv-bar-k: 1; }
/* The public bar (and the console's) is the demos' bar (owner, 2026-10-30: «guarda la navbar delle demo, quella delle altre pagine deve coincidere»): 60px, brand 1.15rem.
   Its own `zoom` cancels the page's, so on screen it is the demo bar's size at every width: --mv-nav-zoom is the demos' zoom (1, or 1.1 from 1920px).
   --header-h (the bar's height in page units, used by the hero and sticky offsets) follows. */
html.mv-pub, html.mv-app { --mv-bar-h: 60px; --mv-nav-zoom: 1; --mv-bar-page: var(--mv-bar-h); }
html.mv-pub { --header-h: var(--mv-bar-page); }
@media (max-width: 768px) { html.mv-pub, html.mv-app { --mv-bar-h: 56px; } }   /* the demos' bar is 56px high up to 768px */
@media (min-width: 1280px) and (hover: hover) and (pointer: fine) {
    html.mv-pub, html.mv-app { --mv-zoom: .9; zoom: .9; }
    html.mv-pub, html.mv-app { --mv-bar-page: calc(var(--mv-bar-h) * var(--mv-nav-zoom) / var(--mv-zoom)); }   /* the bar's height in page units */
    html.mv-pub .nav { zoom: calc(var(--mv-nav-zoom) / var(--mv-zoom)); }
}
/* The demos are at 90% on a computer, and their bars are zoomed back by 1 / zoom so that, on screen, they are what they were (and what the public bar is). */
@media (hover: hover) and (pointer: fine) {
    html.mv-demo { --mv-zoom: .9; zoom: .9; --mv-bar-k: calc(var(--mv-nav-zoom) / var(--mv-zoom)); }
    html.mv-demo body > header, html.mv-demo body > .tabs-bar, html.mv-demo body > .navbar { zoom: var(--mv-bar-k); }
}
/* The bar of the public and console pages follows the demos' bar: it grows from 100% to 110% between 1700px and 1920px in ten 1% steps (they jumped 10% at 1920px);
   the demos themselves grow with it, from 90% to 99%. */
@media (min-width: 1722px) and (hover: hover) and (pointer: fine) { html.mv-demo { --mv-zoom: 0.909; zoom: 0.909; --mv-nav-zoom: 1.01; } html.mv-pub, html.mv-app { --mv-nav-zoom: 1.01; } }
@media (min-width: 1744px) and (hover: hover) and (pointer: fine) { html.mv-demo { --mv-zoom: 0.918; zoom: 0.918; --mv-nav-zoom: 1.02; } html.mv-pub, html.mv-app { --mv-nav-zoom: 1.02; } }
@media (min-width: 1766px) and (hover: hover) and (pointer: fine) { html.mv-demo { --mv-zoom: 0.927; zoom: 0.927; --mv-nav-zoom: 1.03; } html.mv-pub, html.mv-app { --mv-nav-zoom: 1.03; } }
@media (min-width: 1788px) and (hover: hover) and (pointer: fine) { html.mv-demo { --mv-zoom: 0.936; zoom: 0.936; --mv-nav-zoom: 1.04; } html.mv-pub, html.mv-app { --mv-nav-zoom: 1.04; } }
@media (min-width: 1810px) and (hover: hover) and (pointer: fine) { html.mv-demo { --mv-zoom: 0.945; zoom: 0.945; --mv-nav-zoom: 1.05; } html.mv-pub, html.mv-app { --mv-nav-zoom: 1.05; } }
@media (min-width: 1832px) and (hover: hover) and (pointer: fine) { html.mv-demo { --mv-zoom: 0.954; zoom: 0.954; --mv-nav-zoom: 1.06; } html.mv-pub, html.mv-app { --mv-nav-zoom: 1.06; } }
@media (min-width: 1854px) and (hover: hover) and (pointer: fine) { html.mv-demo { --mv-zoom: 0.963; zoom: 0.963; --mv-nav-zoom: 1.07; } html.mv-pub, html.mv-app { --mv-nav-zoom: 1.07; } }
@media (min-width: 1876px) and (hover: hover) and (pointer: fine) { html.mv-demo { --mv-zoom: 0.972; zoom: 0.972; --mv-nav-zoom: 1.08; } html.mv-pub, html.mv-app { --mv-nav-zoom: 1.08; } }
@media (min-width: 1898px) and (hover: hover) and (pointer: fine) { html.mv-demo { --mv-zoom: 0.981; zoom: 0.981; --mv-nav-zoom: 1.09; } html.mv-pub, html.mv-app { --mv-nav-zoom: 1.09; } }
@media (min-width: 1920px) and (hover: hover) and (pointer: fine) { html.mv-demo { --mv-zoom: 0.99; zoom: 0.99; --mv-nav-zoom: 1.10; } html.mv-pub, html.mv-app { --mv-nav-zoom: 1.10; } }

/* Continuous base size (owner, 2026-11-15: «un dimensionamento strano a schizzi… dovrebbe essere incrementale»). Before: 15px up to 560px, 16px up to 1279px, then
   16px x .9 = 14.4px: two jumps (+7%, -10%). Now the rem base slides from 15px at 560px to 14.4px at 1280px, where the computer's zoom (.9 of 16px) takes over at the
   same 14.4px: the text never changes size in a step. */
html.mv-pub, html.mv-app { font-size: clamp(14.4px, calc(15px - (100vw - 560px) * .000833), 15px); }
@media (min-width: 1280px) and (hover: hover) and (pointer: fine) { html.mv-pub, html.mv-app { font-size: 16px; } }
