/* O3 HMS — shared boot + page-transition motion (2026-11-17)
   Crisp and fast: 160ms cross-document fade, 2.5px top hairline, 180ms open
   reveal. Nothing here blocks input; every animation is disabled under
   prefers-reduced-motion. */
@view-transition { navigation: auto; }

::view-transition-old(root) { animation: o3VtOut 160ms ease-in both; }
::view-transition-new(root) { animation: o3VtIn 160ms cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes o3VtOut { to { opacity: 0; transform: translateY(-4px); } }
@keyframes o3VtIn { from { opacity: 0; transform: translateY(4px); } }

#o3TopProgressBar {
  position: fixed; top: 0; left: 0; width: 0; height: 2.5px;
  z-index: 2147483647; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, #10b981, #14b8a6);
  box-shadow: 0 0 6px rgba(16, 185, 129, .5);
  transition: width .3s cubic-bezier(.22, 1, .36, 1), opacity .2s ease;
}
#o3TopProgressBar.o3-is-active { opacity: 1; }
#o3TopProgressBar.o3-is-done { opacity: 0; }

/* Applied to #app / main / .app-shell when the page has one, so the reveal
   never turns body into a containing block for fixed modals. */
.o3-page-reveal { animation: o3Reveal 180ms cubic-bezier(0.22, 1, 0.36, 1) both; }
.o3-page-reveal-body { animation: o3RevealBody 180ms cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes o3Reveal { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes o3RevealBody { from { opacity: 0; } to { opacity: 1; } }

#o3BootPill {
  position: fixed; top: 10px; left: 50%; transform: translateX(-50%);
  z-index: 2147483646; display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px; pointer-events: none; opacity: 0;
  background: rgba(15, 23, 42, .92); color: #ecfdf5;
  font: 600 11px/1.2 Calibri, "Segoe UI", Carlito, -apple-system, BlinkMacSystemFont, sans-serif; letter-spacing: .04em;
  transition: opacity .18s ease;
}
#o3BootPill.o3-is-visible { opacity: 1; }
#o3BootPill::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: #34d399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, .6);
  animation: o3PillPulse 1.1s ease-out infinite;
}
@keyframes o3PillPulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); }
  70% { box-shadow: 0 0 0 5px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
  .o3-page-reveal, .o3-page-reveal-body { animation: none !important; }
  #o3BootPill { display: none !important; }
  #o3TopProgressBar { transition: none; }
}
