/* Live bind-mount override for docs.cloakapi.io. Loaded AFTER
   /_astro/index.*.css by all 46 content pages, so a bare `.right-sidebar`
   here outranks Starlight's `.right-sidebar:where(.astro-*)` on source order
   (:where() contributes zero specificity, so the two tie).
   Source of both blocks: repo/apps/docs-site/src/styles/brand.css.

   ⛔ This file carries TWO blocks despite its name:
     1. @media (max-width: 50rem)  — the ~360px header work (Rolf 2026-09-05)
     2. @media (min-width: 72rem)  — H2, the desktop right sidebar (2026-09-06)
   The name is from block 1 and is now too narrow. Renaming it would break the
   <link> in 46 built pages, so it stands; do not assume "mobile" bounds it.
   (46 of 47 index.html; the 1 that does not link it is a refresh stub, measured
   2026-09-06 — see goal-run/F-BEVIS/auge-360-2026-09-06/H2-docs-right-sidebar.md §7.2)

   static/docs-site/ is gitignored (.gitignore:75), so this file is NOT in git
   and a rebuild of the docs site overwrites the tree. brand.css is the tracked
   copy that survives that. Not FUNN 2390 (desktop footer). */

/* H2 — right sidebar sat 1060px outside the viewport at 1400x1000 (measured
   2026-09-06, live Chromium). Starlight sets, at this same breakpoint,
   `.right-sidebar { position: fixed; width: 100% }`; on a fixed box that 100%
   resolves against the viewport (1400px) and not against the 340px
   .right-sidebar-container, giving left=1060 right=2460 vs clientWidth 1400.
   An hScroll sweep could not see it — a fixed box does not extend
   scrollWidth, so hScroll read 0. sticky returns it to flow so the same
   `width: 100%` binds to the 340px column. `top` is already set to
   nav-height + dev-notice-height by brand.css (compiled into
   /_astro/index.*.css, not this file), and sticky reads that as its stick
   threshold, so the panel still parks under the header.
   Deliberately NOT overflow-x: hidden on body. */
@media (min-width: 72rem) {
  .right-sidebar {
    position: sticky;
    height: calc(100vh - var(--sl-nav-height) - var(--cloakapi-dev-notice-h, 0px));
    padding-top: 0;
  }
}

@media (max-width: 50rem) {
  header.header {
    overflow: visible;
  }
  .cloak-header nav.top {
    padding: 10px 16px;
    padding-right: 3.25rem;
    gap: 8px;
    flex-wrap: nowrap;
  }
  .cloak-header nav.top .search-wrap,
  .cloak-header nav.top .right starlight-theme-select,
  .cloak-header nav.top .right .btn.ghost {
    display: none !important;
  }
  .cloak-header nav.top .right .btn.primary {
    white-space: nowrap;
    overflow: visible;
    flex-shrink: 0;
    min-width: 0;
    padding: 10px 12px;
  }
  starlight-menu-button {
    z-index: 120;
  }
  starlight-menu-button button {
    inset-inline-end: 0.35rem;
  }
  mobile-starlight-toc nav,
  .right-sidebar-panel {
    padding-top: 1.25rem;
  }
  .content-panel {
    padding-top: 1rem;
  }
}
