/* The active destination opens its table of contents above the shared glass
   pill. Inactive destinations remain links to their pages. */
.company-mobile-navigation { display: none; }
@media (max-width: 767px) {
  :root { --company-mobile-clearance: calc(96px + env(safe-area-inset-bottom, 0px)); }
  html { scroll-padding-bottom: var(--company-mobile-clearance); }
  body { padding-bottom: var(--company-mobile-clearance); }
  .company-mobile-navigation {
    display: block; position: fixed; z-index: 55;
    inset-inline: max(12px, env(safe-area-inset-left, 0px)) max(12px, env(safe-area-inset-right, 0px));
    bottom: max(12px, env(safe-area-inset-bottom, 0px)); max-width: 420px; margin-inline: auto;
    color: var(--body); font-family: var(--font-body);
  }
  .company-mobile-pill { position: relative; min-width: 0; border-radius: 32px; }
  .company-mobile-glass {
    position: absolute; inset: 0; pointer-events: none; border: 1px solid var(--rule); border-radius: inherit;
    background: var(--surface-raised); box-shadow: inset 0 1px 0 #ffffff2e, 0 4px 24px -8px #00000038;
  }
  .company-mobile-links { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; padding: 6px; }
  .company-mobile-link { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 48px; border-radius: 26px; padding: 5px; font-size: 11px; line-height: 1.2; }
  .company-mobile-link svg { flex-shrink: 0; }
  .company-mobile-link[aria-current="page"] { color: var(--accent); background: color-mix(in srgb, var(--accent) 11%, transparent); font-weight: 600; }
  .company-mobile-link:hover { color: var(--accent); background: var(--surface-sunken); }
  .company-mobile-menu { min-width: 0; }
  .company-mobile-menu > summary { list-style: none; height: 100%; }
  .company-mobile-menu[open] > summary { color: var(--accent); background: var(--surface-sunken); }
  .company-mobile-label { display: inline-flex; align-items: center; gap: 4px; }
  .company-mobile-chevron { transform-origin: center; }
  .company-mobile-menu[open] .company-mobile-chevron { transform: rotate(180deg); }
  .company-mobile-panel { position: absolute; inset-inline: 0; bottom: calc(100% + 12px); max-height: min(60dvh, calc(100dvh - var(--site-header-height, 53px) - 120px - env(safe-area-inset-bottom, 0px))); overflow-y: auto; overscroll-behavior: contain; padding: 12px; border: 1px solid var(--rule); border-radius: 20px; background: var(--surface-raised); box-shadow: 0 8px 30px -10px #00000040; }
  .company-mobile-panel > .eyebrow { padding: 5px 10px 9px; font-size: 10px; }
  .company-mobile-panel ol { list-style: none; margin: 0; padding: 0; }
  .company-mobile-panel a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px; border-radius: 10px; font-size: 13px; line-height: 1.4; }
  .company-mobile-panel a:hover { background: var(--surface-sunken); }
  .company-mobile-panel small { display: block; color: var(--muted); margin-top: 2px; font-size: 11px; }
  .company-mobile-number { color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
  .company-mobile-navigation :focus-visible { outline-offset: 1px; border-radius: 16px; }
  body:has(dialog[open]) .company-mobile-navigation { visibility: hidden; pointer-events: none; }
  body.ecosystem-page .compare-tray { bottom: var(--company-mobile-clearance); }
  body.ecosystem-page:has(#compare-tray:not([hidden])) { padding-bottom: calc(var(--company-mobile-clearance) + 8rem); }
  body.ecosystem-page .shelf-toast { bottom: calc(var(--company-mobile-clearance) + 1rem); }
  body.ecosystem-page:has(#compare-tray:not([hidden])) .shelf-toast { bottom: calc(var(--company-mobile-clearance) + 9rem); }
  body:has(.company-mobile-menu[open]) .compare-tray { visibility: hidden; }
  @supports (backdrop-filter: blur(24px)) or (-webkit-backdrop-filter: blur(24px)) {
    .company-mobile-glass { background: color-mix(in srgb, var(--surface-raised) 85%, transparent); -webkit-backdrop-filter: blur(24px) saturate(120%); backdrop-filter: blur(24px) saturate(120%); }
  }
}
@media (prefers-reduced-transparency: reduce) { .company-mobile-glass { background: var(--surface-raised); -webkit-backdrop-filter: none; backdrop-filter: none; } }
@media (prefers-reduced-motion: no-preference) {
  .company-mobile-link { transition: color 180ms ease, background-color 180ms ease; }
  .company-mobile-chevron { transition: transform 180ms ease; }
  .company-mobile-menu[open] .company-mobile-panel { animation: company-nav-enter 160ms ease-out; transform-origin: bottom center; }
  @keyframes company-nav-enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}
@media print { .company-mobile-navigation { display: none; } }
