/* FINMOTION-1: presentation only. Existing page styles own settled geometry,
   colour, focus rings and illustration optical transforms. Static by default. */
:root {
  --motion-press: 110ms;
  --motion-respond: 170ms;
  --motion-settle: 200ms;
  --motion-repeat: 160ms;
  --motion-unfold: 240ms;
  --motion-arrive: 280ms;
  --motion-ease-out: cubic-bezier(.2,.8,.2,1);
}

/* Replace the old unconditional 3–4px hover lifts. Never target PNG children. */
main :is(.home-tool-card,.toolsx-path,.toolsx-product,.homes-pathway,.homes-product,
  .personal-pathway,.personal-product,.inv-pathway-card,.inv-product-card,.learn-feature),
main :is(.home-button,.about-button,.finances-primary-action,.learn-topic-nav a) {
  transform: none;
  transition: none;
}
:root main :is(.home-tool-card,.toolsx-path,.toolsx-product,.homes-pathway,.homes-product,
  .personal-pathway,.personal-product,.inv-pathway-card,.inv-product-card,.learn-feature,
  .home-button,.about-button,.finances-primary-action,.learn-topic-nav a):is(:hover,:active) {
  transform: none;
}

/* A keyboard outline and the released focus-within edge appear immediately. */
main :is(.home-tool-card,.toolsx-path,.toolsx-product,.homes-pathway,.homes-product,
  .personal-pathway,.personal-product,.inv-pathway-card,.inv-product-card,.learn-feature):has(:focus-visible),
main :is(.home-button,.about-button,.finances-primary-action,.learn-topic-nav a,
  .x1-primary,.x1-secondary,.x1-text-button):focus-visible {
  transform: none;
  transition: none;
}

@media (prefers-reduced-motion: no-preference) {
  /* Non-spatial response: no opacity change to labels, numbers, or errors. */
  main :is(.x1-primary,.x1-secondary,.x1-text-button,.article-tool-link,
    .fff-illustrated-link,.learn-guide-list a,.home-text-link):not(:focus-visible) {
    transition: background-color var(--motion-respond) var(--motion-ease-out),
      border-color var(--motion-respond) var(--motion-ease-out),
      color var(--motion-respond) var(--motion-ease-out);
  }
  [data-tool-workspace] :is(.x1-primary,.x1-secondary):hover:not(:disabled):not(:focus-visible) {
    box-shadow: inset 0 0 0 1px currentColor;
  }
  [data-tool-workspace] :is(.x1-primary,.x1-secondary):active:not(:disabled):not(:focus-visible) {
    box-shadow: inset 0 0 0 2px currentColor;
    transition-duration: var(--motion-press);
  }

  @media (hover: hover) and (pointer: fine) {
    main :is(.home-tool-card,.toolsx-path,.toolsx-product,.homes-pathway,.homes-product,
      .personal-pathway,.personal-product,.inv-pathway-card,.inv-product-card,.learn-feature):not(:has(:focus-visible)) {
      transition: transform var(--motion-respond) var(--motion-ease-out),
        border-color var(--motion-respond) var(--motion-ease-out),
        box-shadow var(--motion-respond) var(--motion-ease-out);
    }
    :root main :is(.home-tool-card,.toolsx-path,.toolsx-product,.homes-pathway,.homes-product,
      .personal-pathway,.personal-product,.inv-pathway-card,.inv-product-card,.learn-feature):hover:not(:has(:focus-visible)) {
      transform: translateY(-2px);
    }
    main :is(.home-button,.about-button,.finances-primary-action,.learn-topic-nav a):not(:focus-visible) {
      transition: background-color var(--motion-respond) var(--motion-ease-out),
        border-color var(--motion-respond) var(--motion-ease-out),
        box-shadow var(--motion-respond) var(--motion-ease-out);
    }
  }

}
