/* HAB / 2026-09-15. Interaction polish, separate from photographic art direction. */
html { scrollbar-gutter: stable; }
/* Inactive panels still size their shared grid but cannot be focused or read.
   The JS sets hidden + aria-hidden + inert. Without JS all panels remain visible. */
body #main-content .hab-panel-stack { display: grid; grid-template-columns: minmax(0,1fr); align-items: stretch; }
body #main-content .hab-panel-stack > .signature-panel {
  grid-area: 1 / 1;
  min-width: 0;
  align-self: stretch;
  margin-block: 0;
}
body #main-content .hab-panel-stack > .signature-panel[hidden] {
  display: block !important;
  visibility: hidden;
  pointer-events: none;
  animation: none;
}
body #main-content .hab-panel-stack > .signature-panel:not([hidden]) {
  visibility: visible;
  animation: hab-panel-reveal 220ms ease-out both;
}
@keyframes hab-panel-reveal { from { opacity: .3; transform: translateY(4px); } to { opacity: 1; transform: none; } }
body #main-content [data-signature-tab],
body #main-content [data-rvp-device],
body #main-content [data-rvp-compare-mode],
body #main-content [data-signature-step],
body #main-content [data-rustline-option] { touch-action: manipulation; }
body #main-content [data-signature-step] { min-width: 44px; min-height: 44px; }
body #main-content [data-signature-step]:disabled { opacity: .35; cursor: not-allowed; transform: none; }
body #main-content [data-rvp-device],
body #main-content [data-rvp-compare-mode] { min-height: 44px; }
body #main-content [data-hab-contract-scan] .contract-advisor-panel { min-height: 280px; }
body #main-content [data-hab-contract-scan] .contract-scan-console { position: relative; }
body #main-content [data-hab-contract-scan] .contract-scan-console::after {
  position: absolute;
  right: auto;
  bottom: 0;
  left: 0;
  width: var(--hab-scan-progress, 25%);
  height: 3px;
  content: '';
  background: linear-gradient(90deg, #2474ea, #ffbd1a);
  transform-origin: left center;
  transition: width 240ms ease;
  pointer-events: none;
}
body #main-content .hab-demo-play {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 46px;
  width: 100%;
  margin-top: 20px;
  padding: 12px 16px;
  border: 1px solid rgba(19,95,214,.24);
  border-radius: 10px;
  color: #0c4faf;
  background: #eef4fd;
  font: 600 .85rem/1.35 Inter, Arial, sans-serif;
  cursor: pointer;
}
body #main-content .hab-demo-play:hover { background: #e1ecfc; }
body #main-content .hab-demo-play[aria-pressed='true'] { color: #fff; background: #0c4faf; }
body #main-content .hab-demo-play:disabled { color: #49617d; background: #f1f4f8; cursor: default; }
body #main-content [data-rustline-playback='paused'] .rvp-rustline-route ol::after,
body #main-content [data-rustline-playback='paused'] .rvp-rustline-route li { animation-play-state: paused !important; }
body #main-content [data-rustline-playback='playing'] .rvp-rustline-route ol::after,
body #main-content [data-rustline-playback='playing'] .rvp-rustline-route li { animation-play-state: running; }

/* The supplied workcopy explicitly rejects its growing-mask POC. Retire that
   visual treatment without rewriting the bundled history, cache or form logic.
   A short fade keeps BOTH snapshots in place: no vertical page drift, zoom or
   blank frame. The shared header remains fixed in its own transition layer. */
html.hab-refined-transitions.hab-poc-transitioning::view-transition-old(root),
html.hab-refined-transitions.hab-insight-transitioning::view-transition-old(root) {
  opacity: 1;
  clip-path: none;
  transform: none;
  animation: none !important;
}
html.hab-refined-transitions.hab-poc-transitioning::view-transition-new(root),
html.hab-refined-transitions.hab-insight-transitioning::view-transition-new(root) {
  clip-path: none;
  transform: none;
  mix-blend-mode: normal;
  animation: hab-page-arrive 220ms linear both !important;
}
@keyframes hab-page-arrive { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body #main-content .signature-panel,
  body #main-content .contract-scan-console::after,
  body #main-content .rvp-rustline-route ol::after,
  body #main-content .rvp-rustline-route li { animation: none !important; transition: none !important; }
  html.hab-refined-transitions::view-transition-old(root),
  html.hab-refined-transitions::view-transition-new(root) { animation: none !important; }
}
