/* Global motion control and the loops it can suspend.
   Loaded after the feature stylesheets, before portfolio-palette.css, on every route.
   The control only appears once MotionGovernor.js has marked the document, so a visitor
   without scripts never meets a button that does nothing. */
.motion-toggle {
  display: none;
}

html[data-motion-ready="true"] .motion-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  margin-inline-start: auto;
  min-height: var(--control-min-size);
  padding: 0 var(--space-sm);
  border: var(--rule-thin) solid var(--color-rule);
  border-radius: var(--portfolio-control-radius);
  background: transparent;
  color: var(--color-ink-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}

html[data-motion-ready="true"] .motion-toggle:hover {
  border-color: var(--portfolio-blue);
  color: var(--color-ink);
}

/* Selected secondary control: cobalt structure, white ink — per the palette contract. */
html[data-motion-ready="true"] .motion-toggle[aria-pressed="true"] {
  background: var(--portfolio-blue);
  border-color: var(--portfolio-blue);
  color: #fff;
}

html[data-motion-ready="true"] .motion-toggle:disabled {
  border-color: var(--color-rule);
  background: transparent;
  color: var(--color-ink-muted);
  cursor: default;
  opacity: .72;
}

/* Loops that only CSS animates. The governor marks each track idle when the page is paused,
   the tab is in the background, or the track itself has scrolled away. */
.workflow-banner-track[data-motion-loop="idle"],
.brand-marquee-track[data-motion-loop="idle"],
.marquee-lane-track[data-motion-loop="idle"] {
  animation-play-state: paused;
}

@media print {
  .motion-toggle { display: none; }
}

@media (max-width: 47.999rem) {
  html[data-motion-ready="true"] .motion-toggle { min-height: 2.25rem; padding: 0 var(--space-xs); }
}
