/* The report card's gentle lift is shared by actionable controls.
   translate leaves layout, disclosure arrows and segmented indicators intact. */
@media screen {
  :root {
    --control-lift: -2px;
    --control-press: 1px;
    --control-motion-duration: 180ms;
  }

  :is(button, summary, [role="button"], input[type="button"], input[type="submit"], input[type="reset"],
      a.primary, a.secondary, a.text-button, a.dossier-report-card, a.archive-report, a.handoff-download,
      a.registration-report, nav a[href], header a[href], .topbar-actions > a[href],
      label:has(> input:is([type="checkbox"], [type="radio"]))) {
    transition: translate var(--control-motion-duration) ease,
      box-shadow var(--control-motion-duration) ease,
      background-color var(--control-motion-duration) ease,
      border-color var(--control-motion-duration) ease,
      color var(--control-motion-duration) ease !important;
  }

  /* Replace previous per-component movements so they never add up. */
  .dossier-report-card,
  .history-main-action,
  .history-card-action,
  .source-mode {
    transform: none !important;
  }

  @media (hover: hover) and (pointer: fine) {
    :is(button, summary, [role="button"], input[type="button"], input[type="submit"], input[type="reset"],
        a.primary, a.secondary, a.text-button, a.dossier-report-card, a.archive-report, a.handoff-download,
        a.registration-report, nav a[href], header a[href], .topbar-actions > a[href],
        label:has(> input:is([type="checkbox"], [type="radio"]))):hover:not(:disabled, [disabled], [aria-disabled="true"], [aria-busy="true"], [inert], [inert] *, [aria-busy="true"] *, [data-motion="none"]):not(:has(> input:disabled)):not(:has(:is(button, a[href], summary, [role="button"], input, select, textarea):hover)) {
      translate: 0 var(--control-lift);
    }
  }

  :is(button, summary, [role="button"], input[type="button"], input[type="submit"], input[type="reset"],
      a.primary, a.secondary, a.text-button, a.dossier-report-card, a.archive-report, a.handoff-download,
      a.registration-report, nav a[href], header a[href], .topbar-actions > a[href],
      label:has(> input:is([type="checkbox"], [type="radio"]))):is(:active, [data-control-pressed]):not(:disabled, [disabled], [aria-disabled="true"], [aria-busy="true"], [inert], [inert] *, [aria-busy="true"] *, [data-motion="none"]):not(:has(> input:disabled)):not(:has(:is(button, a[href], summary, [role="button"], input, select, textarea):active)) {
    translate: 0 var(--control-press);
    transition-duration: 80ms !important;
  }

  /* Keep keyboard focus visible without moving the target before activation. */
  :where(button, summary, [role="button"], a[href], input[type="button"], input[type="submit"]):focus-visible {
    outline: 3px solid #608e9a;
    outline-offset: 3px;
  }

  @media (prefers-reduced-motion: reduce) {
    :is(button, summary, [role="button"], input[type="button"], input[type="submit"], input[type="reset"],
        a.primary, a.secondary, a.text-button, a.dossier-report-card, a.archive-report, a.handoff-download,
        a.registration-report, nav a[href], header a[href], .topbar-actions > a[href],
        label:has(> input:is([type="checkbox"], [type="radio"]))) {
      translate: none !important;
      transition: none !important;
      animation: none !important;
    }
  }
}
