/* The panel is inert above the mobile breakpoint. */
@media (min-width: 900px) {
  .plinth-mobile-nav { display: none !important; }
}

/* Rotate the plus into a minus when a row is open, without a second icon. */
.plinth-mobile-nav details[open] > summary svg:last-child { transform: rotate(45deg); }
.plinth-mobile-nav summary svg:last-child { transition: transform 150ms ease; }
.plinth-mobile-nav summary::-webkit-details-marker { display: none; }

/* ---------------------------------------------------------------------------
   Presentation moved out of inline style attributes (defect D-18).
   The previous render emitted 16,939 bytes across 144 inline attributes on
   every page, because row / sub-link / heading declarations repeated for every
   navigation entry. Nothing here is dynamic.

   Layout rules preserved verbatim from the mobile system:
     - full-screen panel, never a slide-over
     - RESOLVED height (100dvh) with the link list flex:1;min-height:0;
       overflow-y:auto. Without the resolved height the pinned CTA is pushed
       off-screen - a real bug found in the designs.
     - all rows 48px minimum
   --------------------------------------------------------------------------- */
/* CLOSED BY DEFAULT.

   Previously this rule set display:flex unconditionally on an element carrying
   the hidden attribute. An author declaration beats the user-agent
   [hidden]{display:none}, so the panel was laid out on every page below 900px:
   a full-screen nav rendered over the content, and 146px of horizontal overflow
   at 375px. Nothing in the theme could open or close it either — the panel had
   a close control and no opener.

   Visibility is now owned here and driven by #plinth-mnav-toggle in the header,
   so it works with JavaScript disabled. */
.plinth-mobile-nav { display: none; }

.plinth-mnav-toggle:checked ~ .plinth-mobile-nav,
body:has(#plinth-mnav-toggle:checked) .plinth-mobile-nav {
  position: fixed; inset: 0; z-index: 50;
  background: var(--wp--preset--color--paper); height: 100dvh;
  display: flex; flex-direction: column; min-width: 0;
}
.plinth-mnav__bar { flex: none; min-height: var(--wp--custom--header--height-mobile);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 0 12px 0 16px; border-bottom: 1px solid var(--wp--preset--color--border); min-width: 0; }
.plinth-mnav__brand { display: inline-flex; align-items: center; min-height: 44px; gap: 8px; flex: none; }
.plinth-mnav__wordmark { font-size: var(--wp--preset--font-size--h4); font-weight: 700;
  letter-spacing: -0.02em; color: var(--wp--preset--color--navy-900); }
.plinth-mnav__close { font-family: inherit; width: 44px; height: 44px; display: inline-flex;
  align-items: center; justify-content: center; background: transparent; border: 0;
  color: var(--wp--preset--color--text); cursor: pointer; }
.plinth-mnav__searchwrap { flex: none; padding: 12px 16px;
  background: var(--wp--preset--color--surface);
  border-bottom: 1px solid var(--wp--preset--color--border); min-width: 0; }
.plinth-mnav__search { display: flex; align-items: center; gap: 10px; min-height: 48px;
  background: var(--wp--preset--color--paper);
  border: 1px solid var(--wp--preset--color--border-strong);
  border-radius: var(--wp--custom--radius--base); padding: 0 12px; min-width: 0; }
/* The input drops its own outline so the ring can be drawn on the whole field,
   which is what a sighted keyboard user reads as "focused". Without the
   :focus-within rule below, outline:none left this control with no focus
   indicator at all — the global :where(:focus-visible) rule has zero
   specificity and loses to this one. */
.plinth-mnav__search:focus-within {
  border-color: var(--wp--preset--color--navy-700);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--wp--preset--color--navy-700) 12%, transparent);
}
.plinth-mnav__input { font-family: inherit; font-size: var(--wp--preset--font-size--body);
  color: var(--wp--preset--color--text); border: 0; outline: none; background: transparent;
  width: 100%; min-width: 0; }
.plinth-mnav__list { flex: 1; min-height: 0; overflow-y: auto; min-width: 0; }
.plinth-mnav__row { display: flex; align-items: center; justify-content: space-between;
  gap: 12px; min-height: 48px; padding: 0 20px;
  border-bottom: 1px solid var(--wp--preset--color--border);
  font-size: var(--wp--preset--font-size--h4); font-weight: 600;
  color: var(--wp--preset--color--text); text-decoration: none; list-style: none;
  cursor: pointer; min-width: 0; }
.plinth-mnav__row > span, .plinth-mnav__sub > span { min-width: 0; overflow-wrap: anywhere; }
.plinth-mnav__row--docs { color: var(--wp--preset--color--navy-700); font-weight: 400; }
.plinth-mnav__panel { background: var(--wp--preset--color--surface);
  border-bottom: 1px solid var(--wp--preset--color--border); padding-bottom: 8px; min-width: 0; }
.plinth-mnav__head { font-size: var(--wp--preset--font-size--caption); font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--wp--preset--color--text-muted);
  padding: 16px 20px 4px; margin: 0; }
.plinth-mnav__sub { display: flex; align-items: center; min-height: 48px; padding: 0 20px;
  font-size: var(--wp--preset--font-size--body); color: var(--wp--preset--color--text);
  text-decoration: none; min-width: 0; }
.plinth-mnav__foot { flex: none; padding: 12px 16px 16px;
  border-top: 1px solid var(--wp--preset--color--border);
  background: var(--wp--preset--color--paper);
  box-shadow: 0 -1px 2px rgba(15, 31, 51, 0.06); min-width: 0; }
.plinth-mnav__cta { display: flex; align-items: center; justify-content: center;
  min-height: 52px; border-radius: var(--wp--custom--radius--base);
  background: var(--wp--preset--color--rust-600); color: var(--wp--preset--color--paper);
  font-size: var(--wp--preset--font-size--h4); font-weight: 600; text-decoration: none; }
.plinth-mnav__cta--secondary { background: var(--wp--preset--color--paper); color: var(--wp--preset--color--navy-800); border: 1px solid var(--wp--preset--color--border-strong); margin-bottom: 10px; }
