/* ODYSSEUS — fixed bottom-right DESIGN.md link (t_0ee49d72)
   Brian's correction: DESIGN.md navigation moves to a persistent, themed,
   underlined TEXT link anchored to the viewport's bottom-right corner. It
   REPLACES every existing DESIGN.md nav button (header pill on
   index/case/components/sounds/privacy, the mobile "more" kebab entry on
   index, and design.html's own nav-level copy of the same button) rather
   than adding a second affordance. It does not touch design.html's own
   Download button (#dmd-download) or its format menu — those are a
   different control with a different job and keep their place.

   Why a direct <body> child, not inside <header>/<main>: the link must be
   persistent site chrome that is NEVER part of the hero's physics canvas.
   On every page it is injected into, it sits as a sibling to <header> and
   <main>/<footer>, outside the hero <section>/<iframe> entirely — so the
   workbench engine running inside heroframe's separate document can never
   see it, drag it, or move it under Shake/Align/Scatter/Go crazy (those
   tools only ever touch pieces inside that iframe's own DOM). No JS wiring
   of any kind is needed for that guarantee; it's structural. */

/* 1) Remove the old button placements everywhere they appeared. The single
   remaining DESIGN.md destination is the fixed link below.
   Specificity note: apollo-toolbar-correction.css carries a
   `body.is-oneview .uiw-nav-pages{display:flex!important}` rule scoped to
   <=390px (to show the single remaining nav item inline once About was
   hidden). That selector's specificity (body + .is-oneview + .uiw-nav-pages)
   beats a bare `.uiw-nav-pages` rule regardless of !important + source
   order, so this must match or exceed it everywhere the old rule could
   apply, not just rely on cascade position. */
.uiw-nav-pages,
.uiw-nav-pages__more,
body.is-oneview .uiw-nav-pages,
body.is-oneview .uiw-nav-pages__more,
html[data-theme] .bd-nav .uiw-nav-pages,
html[data-theme] .dmd-header .uiw-nav-pages{
  display:none!important;
}

/* 2) The persistent link itself. */
.uiw-dmd-fixedlink{
  position:fixed;
  right:max(16px,env(safe-area-inset-right));
  bottom:max(16px,env(safe-area-inset-bottom));
  z-index:70; /* above --bd-z-bar(60) so it can never be visually buried,
                 though in practice it never shares space with the bar:
                 the bar is centered, this link lives in the corner. */
  display:inline-flex;
  align-items:center;
  min-height:44px;
  min-width:44px;
  padding:12px 14px; /* generous hit area well past the 44px target */
  font:600 14px/1.2 var(--bd-sans);
  letter-spacing:0;
  color:var(--bd-accent-text);
  text-decoration:underline;
  text-decoration-thickness:1.5px;
  text-underline-offset:3px;
  background:transparent;
  border:0;
  border-radius:8px;
  cursor:pointer;
}
.uiw-dmd-fixedlink:hover,
.uiw-dmd-fixedlink.is-hover{
  color:var(--bd-accent);
}
.uiw-dmd-fixedlink:active{
  color:var(--bd-accent-lo,var(--bd-accent));
}
.uiw-dmd-fixedlink:focus-visible,
.uiw-dmd-fixedlink.is-focus{
  outline:3px solid var(--bd-focus,#1456d8);
  outline-offset:3px;
  border-radius:6px;
}

/* Retro: pixel-font small caps reads better against the CRT field and
   matches the rest of the chrome's type treatment at this size. */
html[data-theme="retro"] .uiw-dmd-fixedlink{
  font:12px/1.4 var(--bd-p-pixel);
  text-transform:uppercase;
}

/* Reduced motion / no special motion used here, so nothing to gate ---
   the link has no animation, just a themed static underline. */

/* 3) Mobile clearance: index.html's hero control bar (#bar / .bd-bar) is
   the only fixed bottom chrome on this site and on narrow viewports it
   spans edge-to-edge (odysseus.css <=860px: left/right:8px). Keep this
   link clear of it on every page by default (a little extra breathing
   room on pages that don't have the bar is harmless; never overlapping
   the one page that does is the requirement). */
@media (max-width:860px){
  .uiw-dmd-fixedlink{
    bottom:calc(76px + env(safe-area-inset-bottom));
    right:max(12px,env(safe-area-inset-right));
    padding:11px 12px;
    font-size:13px;
  }
}
/* The bar wraps to two rows under 340px (odysseus.css), taller still. */
@media (max-width:340px){
  .uiw-dmd-fixedlink{
    bottom:calc(132px + env(safe-area-inset-bottom));
  }
}

/* 4) Keep the fixed link clear of real footer content on pages whose
   footer is actually visible (index.html's is [hidden]; design.html has
   no footer at all). Extra bottom padding means a user scrolled to the
   very end sees empty space under the footer's own content, not the
   fixed link sitting on top of the footer's copyright/contact line. */
#footer:not([hidden]){
  padding-bottom:calc(40px + 56px + env(safe-area-inset-bottom));
}
