/* MOTwise v63 navigation/resume transition.
   Solid transition surfaces + same-origin document view transitions prevent the
   feature page or a half-painted Dashboard showing through during return. */

html{background:var(--mt-page,#f4f7fb)}
@view-transition{navigation:auto}
::view-transition-group(root){animation-duration:.22s;animation-timing-function:ease-out}
::view-transition-old(root){animation-name:mwRootHold;z-index:1}
::view-transition-new(root){animation-name:mwRootReveal;z-index:2}
@keyframes mwRootHold{from{opacity:1}to{opacity:1}}
@keyframes mwRootReveal{from{opacity:0}to{opacity:1}}

.mw-return-transition[hidden]{display:none!important}
.mw-return-transition{
  position:fixed;inset:0;z-index:2147482500;display:grid;place-items:center;padding:24px;
  background:var(--mt-page,#f4f7fb);backdrop-filter:none;-webkit-backdrop-filter:none;
  opacity:1;transition:none
}
.mw-return-transition.is-visible{opacity:1}
.mw-return-card{
  width:min(460px,calc(100vw - 32px));display:grid;grid-template-columns:52px minmax(0,1fr) 28px;
  gap:14px;align-items:center;padding:18px 19px;border:1px solid var(--mt-line,#d8e3ee);border-radius:18px;
  background:var(--mt-surface,#fff);color:var(--mt-text,#081a33);box-shadow:0 26px 72px rgba(4,24,45,.24)
}
.mw-return-mark{width:48px;height:48px;display:grid;place-items:center;border-radius:14px;background:var(--mw-primary-soft,#e6f7f9);color:var(--mw-primary,#078da2);font-size:27px;font-weight:950;letter-spacing:-1.5px}
.mw-return-card small{display:block;margin-bottom:3px;color:var(--mw-primary,#078da2);font-size:9px;font-weight:950;letter-spacing:.13em}
.mw-return-card strong{display:block;color:var(--mt-text,#081a33);font-size:15px;line-height:1.25}
.mw-return-card p{margin:4px 0 0;color:var(--mt-muted,#60758d);font-size:11px;line-height:1.45}
.mw-return-spinner{width:23px;height:23px;border:3px solid color-mix(in srgb,var(--mw-primary,#078da2) 20%,transparent);border-top-color:var(--mw-primary,#078da2);border-radius:50%;animation:mwReturnSpin .75s linear infinite}
@keyframes mwReturnSpin{to{transform:rotate(360deg)}}

/* Dashboard resume uses the same opaque visual surface as the outgoing feature page. */
html[data-mw-resume="pending"] body.v2-body{overflow:hidden!important;background:var(--mt-page,#f4f7fb)!important}
html[data-mw-resume="pending"] body.v2-body .v2-shell{opacity:0!important;visibility:hidden!important;pointer-events:none!important}
html[data-mw-resume="pending"] body.v2-body::before{content:"";position:fixed;inset:0;z-index:2147482400;background:var(--mt-page,#f4f7fb)!important}
html[data-mw-resume="pending"] body.v2-body::after{
  content:"MOTwise  ·  Returning to your vehicle dashboard…";position:fixed;z-index:2147482401;
  left:50%;top:50%;transform:translate(-50%,-50%);width:min(460px,calc(100vw - 32px));padding:22px 24px;
  border:1px solid var(--mt-line,#d8e3ee);border-radius:18px;background:var(--mt-surface,#fff);color:var(--mt-text,#081a33);
  box-shadow:0 26px 72px rgba(4,24,45,.24);font:850 14px/1.45 Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;text-align:center
}
html[data-theme="dark"] .mw-return-transition,html[data-mw-theme="dark"] .mw-return-transition,
html[data-theme="dark"][data-mw-resume="pending"] body.v2-body::before,html[data-mw-theme="dark"][data-mw-resume="pending"] body.v2-body::before{background:var(--mt-page,#07182e)!important}

/* LANDING SURFACE AUTHORITY.
   #v2Launch is the source of truth. ID-level :has() specificity prevents any later
   dashboard/responsive stylesheet from re-displaying dashboard chrome above landing. */
html body.v2-body:has(#v2Launch) .v2-sidebar,
html body.v2-body:has(#v2Launch) .v2-topbar,
html body.v2-body:has(#v2Launch) #v2MobileMenu,
html body.v2-body:has(#v2Launch) #v2MobileClose,
html body.v2-body:has(#v2Launch) #v2MobileBackdrop{display:none!important}
html body.v2-body:has(#v2Launch) .v2-shell{
  display:block!important;grid-template-columns:none!important;width:100%!important;max-width:none!important;min-width:0!important;
  margin:0!important;padding:0!important
}
html body.v2-body:has(#v2Launch) .v2-main-wrap{
  display:block!important;width:100%!important;max-width:none!important;min-width:0!important;height:auto!important;min-height:0!important;
  margin:0!important;padding:0!important;transform:none!important
}
html body.v2-body:has(#v2Launch) .v2-content{
  display:block!important;width:100%!important;max-width:none!important;min-width:0!important;margin:0!important;padding:0!important
}
html body.v2-body:has(#v2Launch) #results,
html body.v2-body:has(#v2Launch) #emptyResults{display:none!important}
html body.v2-body:has(#v2Launch) #v2Launch{display:block!important;width:100%!important;max-width:none!important;margin:0!important}

/* Critical first-paint mobile/tablet guard. The richer responsive stylesheet takes over later,
   but the sidebar can never occupy dashboard width while CSS/JS assets are still hydrating. */
@media(max-width:1024px){
  html body.v2-body .v2-shell{display:block!important;grid-template-columns:none!important;width:100%!important;min-width:0!important}
  html body.v2-body .v2-main-wrap{display:block!important;width:100%!important;min-width:0!important;margin:0!important}
  html body.v2-body .v2-sidebar{
    position:fixed!important;inset:0 auto 0 0!important;width:min(326px,88vw)!important;max-width:88vw!important;height:100dvh!important;
    z-index:2147481201!important;transform:translate3d(-106%,0,0)!important;pointer-events:none!important;overflow-y:auto!important
  }
  html body.v2-body .v2-shell[data-mobile-nav="open"] .v2-sidebar{transform:translate3d(0,0,0)!important;pointer-events:auto!important}
}

@media(max-width:600px){.mw-return-card{grid-template-columns:44px minmax(0,1fr) 22px;padding:15px}.mw-return-mark{width:42px;height:42px;border-radius:12px;font-size:24px}.mw-return-card strong{font-size:13px}.mw-return-card p{font-size:10px}}
@media(prefers-reduced-motion:reduce){.mw-return-spinner{animation:none;border-top-color:var(--mw-primary,#078da2)}::view-transition-group(root){animation-duration:.001ms}}
