/* Shared action language for the cosmic-system library. System accents remain intact. */
:is(.system-primary-action, .system-secondary-action,
  .th-button, .ez-button, .em-button, .gz-btn, .tz-btn, .sr-btn,
  .tonal-controls button, .nr-button, .nr-quick, .enso-clear-button,
  .atlas-depth-button, .tz-depth-button, .sr-depth-button,
  #gzDepthButton, .tonal-mini, .cosmic-library-context-action, .enso-source-links a) {
  box-sizing: border-box;
  border-radius: var(--action-radius, var(--r-md));
  font-family: var(--font-h);
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.25;
  text-decoration: none;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease,
    box-shadow 180ms ease, color 180ms ease;
}

/* Main decisions: same hierarchy as the site CTAs, tinted by each system. */
:is(.system-primary-action, .th-button.primary, .ez-button.primary, .em-button.primary,
  .gz-btn.primary, .tz-btn.primary, .sr-btn-primary, .nr-button.primary,
  #tonalApply, #tonalOpenTrecena) {
  border-color: color-mix(in srgb, var(--system-accent-light) 55%, transparent);
  background: linear-gradient(135deg, var(--system-accent) 0%, var(--system-accent-light) 100%);
  box-shadow: 0 8px 28px color-mix(in srgb, var(--system-accent) 25%, transparent);
  color: #06051a;
}

:is(.system-primary-action, .th-button.primary, .ez-button.primary, .em-button.primary,
  .gz-btn.primary, .tz-btn.primary, .sr-btn-primary, .nr-button.primary,
  #tonalApply, #tonalOpenTrecena):hover {
  transform: translateY(-2px);
  border-color: var(--system-accent-light);
  box-shadow: 0 12px 34px color-mix(in srgb, var(--system-accent) 38%, transparent);
}

/* Secondary actions retain the same form while staying visually quieter. */
:is(.system-secondary-action, .th-button:not(.primary),
  .ez-button:not(.primary), .em-button:not(.primary), .gz-btn:not(.primary),
  .tz-btn:not(.primary), .sr-btn:not(.sr-btn-primary), .tonal-controls button:not(#tonalApply):not(#tonalOpenTrecena),
  .nr-button:not(.primary), .nr-quick, .enso-clear-button, .atlas-depth-button,
  .tz-depth-button, .sr-depth-button, #gzDepthButton,
  .tonal-mini, .cosmic-library-context-action, .enso-source-links a) {
  border-color: color-mix(in srgb, var(--system-accent) 38%, transparent);
  background: color-mix(in srgb, var(--system-accent) 10%, transparent);
  color: var(--system-accent-light);
}

:is(.system-secondary-action, .th-button:not(.primary),
  .ez-button:not(.primary), .em-button:not(.primary), .gz-btn:not(.primary),
  .tz-btn:not(.primary), .sr-btn:not(.sr-btn-primary), .tonal-controls button:not(#tonalApply):not(#tonalOpenTrecena),
  .nr-button:not(.primary), .nr-quick, .enso-clear-button, .atlas-depth-button,
  .tz-depth-button, .sr-depth-button, #gzDepthButton,
  .tonal-mini, .cosmic-library-context-action, .enso-source-links a):hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--system-accent-light) 68%, transparent);
  background: color-mix(in srgb, var(--system-accent) 18%, transparent);
  color: #ffffff;
}

:is(.system-primary-action, .system-secondary-action,
  .th-button, .ez-button, .em-button, .gz-btn, .tz-btn, .sr-btn,
  .tonal-controls button, .nr-button, .nr-quick, .enso-clear-button,
  .atlas-depth-button, .tz-depth-button, .sr-depth-button,
  #gzDepthButton, .tonal-mini, .cosmic-library-context-action, .enso-source-links a):focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--bg), 0 0 24px color-mix(in srgb, var(--system-accent-light) 38%, transparent);
}

@media (max-width: 560px) {
  :is(.system-primary-action, .system-secondary-action) { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  :is(.system-primary-action, .system-secondary-action,
    .th-button, .ez-button, .em-button, .gz-btn, .tz-btn, .sr-btn,
    .tonal-controls button, .nr-button, .nr-quick, .enso-clear-button,
    .atlas-depth-button, .tz-depth-button, .sr-depth-button,
    #gzDepthButton, .tonal-mini, .cosmic-library-context-action, .enso-source-links a) {
    transition: none;
  }
}
