/* One restrained phone motion policy, including styles injected after page load. */
@media (max-width: 760px) {
  :root {
    --ll-page-duration: 160ms;
    --ll-page-easing: ease-out;
    scroll-behavior: auto !important;
  }

  /* Keep the actual card heights in layout: estimates can move the scroll position. */
  :root body.market-page #listings .mf-rich-card {
    content-visibility: visible !important;
    contain-intrinsic-block-size: none !important;
  }

  /* Scrolling and seasonal artwork stay still; the holiday imagery remains intact. */
  :root body .pricing-section :is(.main-plan, .math-card, .scale-card),
  :root body :is(.careers-banner, .contact-callout),
  :root body :is(.hero-visual img.house, .mf-intro .mf-cover),
  :root body .hero-visual::after,
  :root body .mf-cover::after,
  :root body .desk-hero::after,
  :root body .desk-hero::before,
  :root body :is(.hero-copy h1, .page-intro h1, .jobs-intro h1, .native-form-intro h1, .hero-actions),
  :root body .employee-work-links a:focus-visible,
  :root body .mf-flame,
  :root body .mf-fact-grid .mf-mini:is(.mf-motivation-hot, .mf-motivation-veryHot),
  :root body .mf-dl .mf-motivation:is(.mf-motivation-hot, .mf-motivation-veryHot),
  :root body [data-panel="overview"] .stat-grid article,
  :root[data-ll-page-arrival] body main {
    animation: none !important;
    translate: none !important;
  }

  /* Touch feedback should not shift controls or leave a sticky hover lift. */
  :root body :is(.button, .primary, .secondary, .nav-portal, .portal-nav a, .portal-nav button,
    .employee-account > summary):is(:hover, :active) {
    transform: none !important;
  }
  :root body :is(.button, .primary, .secondary, .nav-portal, .portal-nav a, .portal-nav button,
    .employee-account > summary, .market-page button):active:not(:disabled) {
    opacity: .84;
  }
}

@media (max-width: 760px) and (prefers-reduced-motion: no-preference) {
  :root body :is(.button, .primary, .secondary, .nav-portal, .portal-nav a, .portal-nav button,
    .employee-account > summary, #desk-links a, #desk-links button, .market-page button) {
    transition-property: background-color, border-color, color, opacity !important;
    transition-duration: 120ms !important;
    transition-timing-function: ease-out !important;
  }
  /* Only the incoming page fades; its geometry and the header remain stationary. */
  :root::view-transition-group(root) {
    animation-duration: 160ms !important;
    animation-timing-function: ease-out !important;
  }
  :root::view-transition-old(root) {
    animation: none !important;
    opacity: 1 !important;
    mix-blend-mode: normal;
  }
  :root::view-transition-new(root) {
    animation: ll-phone-page-in 160ms ease-out both !important;
    mix-blend-mode: normal;
  }
  :root body > header :is(.brand, a:first-child) > img[src*="brand-logo"] {
    view-transition-name: none !important;
  }
  @keyframes ll-phone-page-in {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  :root body :is(.portal-intro, .auth-card, .employee-welcome, .account-top,
    [data-panel]:not([hidden]), .employee-account[open] > .account-menu,
    .employee-settings[open] > :is(a, div), .faqs details[open] > :not(summary),
    .lead-intake[open] > .lead-intake-body, .workflow-row[open] > .workflow-edit,
    .dispute-card[open] > form, #workflow-page .portal-card, dialog[open], #chat-panel:not([hidden]),
    .ll-chat-panel:not([hidden]), .caller-player:not([hidden])) {
    animation: ll-phone-surface-in 140ms ease-out !important;
  }
  :root body .lead-dialog[open] #lead-detail > h2 {
    animation: none !important;
  }
  :root body[data-portal-design].ll-phone-navigation #desk-sidebar {
    transition: transform 180ms cubic-bezier(.2, .75, .25, 1), visibility 180ms !important;
  }
  :root[data-desk-open] body #desk-scrim,
  :root body dialog[open]::backdrop {
    animation: ll-phone-backdrop-in 120ms ease-out !important;
  }
  :root body .public-header[data-mobile-open] :is(.header-primary, .header-book-mobile),
  :root body #navigation.open {
    animation: ll-phone-surface-in 140ms ease-out !important;
  }
  @keyframes ll-phone-surface-in {
    from { opacity: .75; }
    to { opacity: 1; }
  }
  @keyframes ll-phone-backdrop-in {
    from { opacity: 0; }
    to { opacity: 1; }
  }
}

@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  :root::view-transition-group(*),
  :root::view-transition-old(*),
  :root::view-transition-new(*) {
    animation: none !important;
  }
  :root body *, :root body *::before, :root body *::after,
  :root body dialog::backdrop {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
