/* ==========================================================================
   Dwarpal (Dattamsha Data Labs) - page scale
   --------------------------------------------------------------------------
   Every page loads this file last. It shrinks the whole page with `zoom`, so
   the other stylesheets keep their px sizes and nothing else changes.

     <html class="is-compact">   every page except the sign-in screens: 90%
     <html class="is-windows">   a Windows browser: a further 90%

   Windows draws the same CSS noticeably larger than a Mac does, and 90% there
   matches 100% on a Mac. So a sign-in screen is 100% on a Mac and 90% on
   Windows; every other page is 90% on a Mac and 81% on Windows. The classes
   are set by the server from the User-Agent (template_helpers.py,
   client_is_windows), so the page never draws at full size first.

   Phones and print keep 100%: below 761px the layouts already switch to
   their narrow forms, and shrinking those would only make text hard to read.

   `zoom` also shrinks 100vh, so a full-height shell would stop short of the
   bottom of the window. Each one divides 100vh by the same zoom to fill it.
   ========================================================================== */

@media screen and (min-width: 761px) {
  html.is-compact             { --pl-zoom: .9; }
  html.is-windows             { --pl-zoom: .9; }
  html.is-compact.is-windows  { --pl-zoom: .81; }

  html.is-compact, html.is-windows { zoom: var(--pl-zoom); }

  html.is-compact .layout,
  html.is-compact .admin,
  html.is-compact .status-shell,
  html.is-windows .layout,
  html.is-windows .admin,
  html.is-windows .status-shell,
  html.is-windows .auth-shell { min-height: calc(100vh / var(--pl-zoom)); }
}

/* At 960px and below the sidebar becomes a top band (dattamsha.css), so it is
   one window tall only above that. */
@media screen and (min-width: 961px) {
  html.is-compact .admin-nav,
  html.is-windows .admin-nav { height: calc(100vh / var(--pl-zoom)); }
}
