/* Shared interaction rules for the two final pages. */
body:is(.home-page, .product-page)
  :is(
    .btn,
    .impact-card > a,
    .model-spin-toggle,
    .model-controls button,
    .agent-step-list button,
    .model-inspector summary,
    .tab,
    .menu-toggle
  ) {
  --action-hover-background: var(--theme-hover);
  --action-hover-color: #fff;
  --action-hover-border: var(--theme-hover);
  transition:
    background-color 180ms ease,
    color 180ms ease,
    border-color 180ms ease;
}
body:is(.home-page, .product-page) .tab {
  --action-hover-background: var(--tab-tint, var(--theme-tint));
  --action-hover-color: var(--tab-accent, var(--theme-brand));
  --action-hover-border: var(--stage-line, var(--theme-border));
}
body:is(.home-page, .product-page) :is(.agent-step-list button, .model-inspector summary) {
  --action-hover-background: #f1f2f4;
  --action-hover-color: var(--theme-heading);
  --action-hover-border: var(--theme-border);
}
/* Filled and outlined actions change color without lifting or growing. */
@media (hover: hover) {
  body:is(.home-page, .product-page)
    :is(
      .btn,
      .impact-card > a,
      .model-spin-toggle,
      .model-controls button,
      .agent-step-list button,
      .model-inspector summary,
      .tab,
      .menu-toggle
    ):not(:disabled):not([aria-disabled='true']):hover {
    background-color: var(--action-hover-background);
    color: var(--action-hover-color);
    border-color: var(--action-hover-border);
  }
  body:is(.home-page, .product-page) .btn:hover {
    transform: none;
  }
  body:is(.home-page, .product-page) .hero-showcase .btn-solid:hover {
    box-shadow: 0 0 28px rgba(255, 255, 255, 0.14);
  }
}

/* Text actions share an underline reveal and a small, layout-stable arrow move. */
body:is(.home-page, .product-page)
  :is(
    .inline-link,
    .hero-demo-link,
    .approach-card-button,
    .agent-restart,
    .hero-video-toggle,
    .announcement a,
    .desktop-nav > a,
    .footer-cols a,
    .model-downloads a,
    .hero-showcase-footer > a
  ):not(.btn) {
  text-decoration-line: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.4em;
  border-bottom-color: transparent;
  transition:
    color 180ms ease,
    text-decoration-color 180ms ease;
}
body:is(.home-page, .product-page) .inline-link,
body:is(.home-page, .product-page) .inline-link:hover {
  gap: 17px;
}
/* Underline the label, never the decorative arrow or the space beside it. */
body:is(.home-page, .product-page) :is(a, button):not(.btn):has(> .action-label),
body:is(.home-page, .product-page) :is(a, button):not(.btn):has(> .action-label):hover {
  text-decoration-line: none;
}
body:is(.home-page, .product-page) .action-label {
  text-decoration-line: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.4em;
  transition: text-decoration-color 180ms ease;
}
body:is(.home-page, .product-page) :is(a, button):is(:hover, :focus-visible) > .action-label {
  text-decoration-color: currentColor;
}
body:is(.home-page, .product-page)
  :is(
    .inline-link,
    .hero-demo-link,
    .approach-card-button,
    .announcement a,
    .hero-showcase-footer > a
  )
  > span[aria-hidden='true'] {
  display: inline-block;
  transition: transform 180ms ease;
}
@media (hover: hover) {
  body:is(.home-page, .product-page)
    :is(
      .inline-link,
      .hero-demo-link,
      .approach-card-button,
      .agent-restart,
      .hero-video-toggle,
      .announcement a,
      .desktop-nav > a,
      .footer-cols a,
      .model-downloads a,
      .hero-showcase-footer > a
    ):not(.btn):hover {
    text-decoration-color: currentColor;
    border-bottom-color: transparent;
  }
  body:is(.home-page, .product-page)
    :is(.inline-link, .hero-demo-link, .approach-card-button, .announcement a)
    > span[aria-hidden='true'] {
    transform: none;
  }
  body:is(.home-page, .product-page)
    :is(.inline-link, .hero-demo-link, .approach-card-button, .announcement a):hover
    > span[aria-hidden='true'] {
    transform: translateX(3px);
  }
  body:is(.home-page, .product-page) .hero-showcase-footer > a:hover > span[aria-hidden='true'] {
    transform: translateY(3px);
  }
}
@media (prefers-reduced-motion: reduce) {
  body:is(.home-page, .product-page)
    :is(
      .inline-link,
      .hero-demo-link,
      .approach-card-button,
      .announcement a,
      .hero-showcase-footer > a
    ):hover
    > span[aria-hidden='true'] {
    transform: none;
  }
}

/* Accordion icon buttons retain their open-state rotation. */
body:is(.home-page, .product-page) .industry-toggle {
  transition:
    background-color 180ms ease,
    color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}
@media (hover: hover) {
  body:is(.home-page, .product-page) .industry-card summary:hover .industry-toggle {
    background-color: #fff;
    color: #202329;
    border-color: #fff;
  }
}
