/* Owner ruling, 2026-09-02 (D-89 / UI-11 widened): the mobile nav must still open at a tent on
   cellular even if AspStudio's theme bundle fails to download, parse or execute. app.min.css ships
   the off-canvas sidebar drawer with NO :checked/:target CSS-only fallback anywhere in the compiled
   file (15-RESEARCH.md Common Pitfall #3) — the drawer is opened and closed entirely by app.min.js,
   and the CURRENT app's nav has zero such dependency. This file is that fallback, and it is
   FAIL-SAFE BY DEFAULT: it assumes the theme's script did NOT run and undocks the sidebar back into
   the normal document flow, so a broken bundle degrades the LOOK, not the app's usability.

   The theme proves itself by adding "theme-js-ready" to <html> — set in _Layout.cshtml's <head>
   before first paint, revoked by site.js at DOMContentLoaded if the theme's own App object never
   appears. Until that class is present, every rule below applies. Do not invert this: the fallback
   is the default, not an opt-in that requires something to have already run.

   Deliberately NO media query anywhere in this file. The condition being handled is "the script did
   not run," which has nothing to do with viewport width — a media-query wrapper would silently
   exempt one side of the breakpoint from the guarantee this file exists to make. Deliberately no
   font-size/height/min-height declaration either, so this file — fourth of five stylesheets, before
   site.css — can never shadow the floors site.css asserts from its later position.

   Phase 15 plan 15-03, 2026-09-02. */

html:not(.theme-js-ready) .app-sidebar {
  /* app.min.css's own base (non-media) rule pins .app-sidebar with position: fixed, an explicit
     top/bottom pair and a fixed 15rem width; its max-width: 991.98px rule additionally pushes
     inset-inline-start fully off-screen; its .app-sidebar-mobile-toggled/-closed rules animate that
     inset-inline-start value between the two. Neutralising position alone makes top/bottom/
     inset-inline-start inert per spec once the element is no longer positioned, but every one of
     them is reset explicitly below anyway, matching exactly what was grepped out of the compiled
     file rather than assuming which properties matter. With position: static and no explicit
     height, the sidebar's height grows with its content instead of stretching to fill the viewport.
     .app-sidebar carries display: flex; flex-direction: column unconditionally in app.min.css and
     that is left untouched — it still stacks the nav content and the (permanently hidden, per its
     own default display: none) mobile backdrop vertically. */
  position: static;
  top: auto;
  bottom: auto;
  inset-inline-start: auto;
  width: auto;
  z-index: auto;
  animation: none;
  /* Same olive chrome the docked sidebar uses, so the undocked list still reads as the nav rather
     than as a stray unstyled block. var(--color-nav-bg), never a hex literal — site.css's :root
     block stays the single source of truth for the measured brand value. */
  background-color: var(--color-nav-bg);
}

html:not(.theme-js-ready) .app-content {
  /* app.min.css reserves 15rem for the docked sidebar via margin-inline-start on .app-content. With
     the sidebar undocked above, that reserved margin would indent every page's content behind a
     rail that no longer occupies that space. */
  margin-inline-start: 0;
}

html:not(.theme-js-ready) .menu-toggler[data-toggle="sidebar-mobile"] {
  /* The mobile toggler exists only to open a drawer app.min.js never wired in this failure mode. A
     control that cannot do anything when tapped is worse than no control at all, especially in the
     one situation where the owner is already stressed. */
  display: none;
}
