
/* PRJ-8 / D17 CANDIDATE — mobile native menu tracks OS appearance.
   Scope to the ONE public dialog; do not recolor editorial/public pages or role
   cabinets. Retain D16 mobile geometry, routes, gesture and native modal. */
@media (max-width:700px) and (prefers-color-scheme:light) and (forced-colors:none) {
  body .px-menu-dialog[open] {
    color-scheme:light;
    --mm-sheet-divider:rgba(44,65,87,.16);
    --mm-sheet-label:#40576d;
    --mm-sheet-secondary:#566c80;
    color:#1d3043;
    border-color:rgba(59,80,101,.24);
    background:
      radial-gradient(88% 54% at 20% 0%,rgba(255,255,255,.94),transparent 78%),
      linear-gradient(155deg,rgba(250,253,255,.97),rgba(226,235,245,.97) 100%);
    /* Content-rich mobile sheet stays opaque, no extra backdrop sampling. */
    -webkit-backdrop-filter:none;
    backdrop-filter:none;
    box-shadow:0 26px 75px rgba(17,38,58,.23),inset 0 1px rgba(255,255,255,.94);
  }
  body .px-menu-dialog[open] .px-menu-heading {
    background:rgba(246,250,254,.95);
    border-bottom-color:rgba(54,76,97,.16);
  }
  body .px-menu-dialog[open] .px-menu-heading > a,
  body .px-menu-dialog[open] .mm-menu-brand > a,
  body .px-menu-dialog[open] .mm-menu-editorial-title,
  body .px-menu-dialog[open] .mm-public-menu-all .mm-public-menu-group a,
  body .px-menu-dialog[open] .mm-public-menu-primary-access .px-menu-access-action:not(:first-of-type),
  body .px-menu-dialog[open] .mm-menu-collapse-button,
  body .px-menu-dialog[open] .px-menu-close {
    color:#20364a;
  }
  body .px-menu-dialog[open] .mm-menu-editorial-eyebrow,
  body .px-menu-dialog[open] .mm-public-menu-group-title,
  body .px-menu-dialog[open] .px-menu-kicker {
    color:#40576d;
  }
  body .px-menu-dialog[open] .mm-menu-editorial-caption,
  body .px-menu-dialog[open] .mm-public-menu-access-status {
    color:#53697e;
  }
  body .px-menu-dialog[open] .mm-menu-editorial,
  body .px-menu-dialog[open] .mm-public-menu-group {
    border-color:rgba(54,76,97,.16);
  }
  body .px-menu-dialog[open] .mm-menu-section-links {
    background:rgba(255,255,255,.40);
    border-color:rgba(62,84,106,.12);
  }
  body .px-menu-dialog[open] .mm-public-menu-all .mm-public-menu-group a {
    border-bottom-color:rgba(58,79,99,.15);
  }
  body .px-menu-dialog[open] .mm-public-menu-all .mm-public-menu-group a:is(:hover,:focus-visible) {
    color:#122b42;
    background:rgba(40,76,113,.09);
  }
  body .px-menu-dialog[open] .mm-public-menu-primary-access .px-menu-access-action {
    border-color:rgba(54,76,97,.22);
    background:rgba(255,255,255,.50);
  }
  body .px-menu-dialog[open] .mm-public-menu-primary-access .px-menu-access-action:first-of-type {
    color:#fff;
    background:linear-gradient(148deg,#30485f,#1c3046);
    border-color:rgba(19,42,64,.75);
    box-shadow:inset 0 1px rgba(255,255,255,.19),0 6px 15px rgba(25,45,65,.16);
  }
  body .px-menu-dialog[open] :is(a,button):focus-visible {
    outline-color:#244766;
  }
  body .px-menu-dialog[open]::backdrop {
    background:rgba(28,46,62,.24);
  }
}
/* Keep the accessibility material opaque and unblurred whenever the OS
   requests less transparency or higher contrast, even with light appearance. */
@media (max-width:700px) and (prefers-color-scheme:light) and (prefers-reduced-transparency:reduce),
       (max-width:700px) and (prefers-color-scheme:light) and (prefers-contrast:more) {
  body .px-menu-dialog[open] {
    color:#102437;
    background:#f7fafd;
    -webkit-backdrop-filter:none;
    backdrop-filter:none;
    border-color:#36516c;
  }
  body .px-menu-dialog[open] .px-menu-heading {background:#f7fafd;}
  body .px-menu-dialog[open] .mm-public-menu-group-title,
  body .px-menu-dialog[open] .mm-menu-editorial-caption {color:#29455e;}
  body .px-menu-dialog[open]::backdrop {
    -webkit-backdrop-filter:none;backdrop-filter:none;
    background:rgba(18,30,42,.56);
  }
}

/* PRJ-8 Society / solid editorial header: match Crystal color tokens. */
@media (min-width:701px) and (forced-colors:none) {
  .mm-crystal-public-header.public-topbar-solid .mm-desktop-crystal-item:not([data-selected="true"]):not(:hover) {
    color:var(--mm-desk-subtle);
  }
}

/* PRJ-8 / PUBLIC D20 — lightweight iOS-calibrated route handoff.
   Only animate the outgoing/incoming page snapshots. The named Crystal Island
   remains spatially anchored; no page clip masks, filters, or layout changes.
   Readiness still gates reveal; initial key entrance remains untouched. */
@keyframes mm-public-ios-route-out {
  from { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
  to { opacity: .92; transform: translate3d(0, -8px, 0) scale(.994); }
}
@keyframes mm-public-ios-route-in {
  from { opacity: .84; transform: translate3d(0, 16px, 0) scale(.991); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}
@media (prefers-reduced-motion: no-preference) and (forced-colors: none) {
  html[data-route-transition="native"]::view-transition-old(root) {
    animation: 260ms cubic-bezier(.2,.8,.3,1) both mm-public-ios-route-out;
    mix-blend-mode: normal;
  }
  html[data-route-transition="native"]::view-transition-new(root) {
    animation: 360ms cubic-bezier(.22,1,.36,1) both mm-public-ios-route-in;
    mix-blend-mode: normal;
  }
  /* Persistent public chrome uses the same timeline as the content, instead
     of collapsing the transition to the legacy 180ms page-wipe. */
  html[data-route-transition="native"]:has([data-public-chrome-owner="persistent-root"])::view-transition-old(root) {
    animation-duration: 260ms;
  }
  html[data-route-transition="native"]:has([data-public-chrome-owner="persistent-root"])::view-transition-new(root) {
    animation-duration: 360ms;
  }
}
