/* Impeccable delight — “the night trail answers with Action.”
   One material: a 2px line of travel. Earned on commit, hover-intent, empty, toast.
   Quiet on idle. No sound, no delay, no extra claims. */

@keyframes cmtb-trail-draw {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.btn--primary,
.btn.btn--primary {
  isolation: isolate;
}

.btn--primary::after {
  content: "";
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: 0.4rem;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.88);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.42s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 1;
}

.btn--primary:hover::after,
.btn--primary:focus-visible::after {
  transform: scaleX(1);
}

.btn--primary:disabled::after,
.btn--primary[aria-disabled='true']::after {
  content: none;
}

.service-card.service-card--v2,
.coach-card,
.newsroom-card,
.merch-card {
  position: relative;
}

.service-card.service-card--v2::after,
.coach-card::after,
.newsroom-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--color-action);
  box-shadow: 0 0 12px rgba(var(--color-action-rgb), 0.35);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.48s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 2;
}

.service-card.service-card--v2:hover::after,
.service-card.service-card--v2:focus-within::after,
.coach-card:hover::after,
.coach-card:focus-within::after,
.newsroom-card:hover::after,
.newsroom-card:focus-within::after {
  transform: scaleX(1);
}

/* Toasts: line of travel instead of a 3px side tab. */
.toast::before,
.cm-toast::before,
.toast.cm-toast::before {
  top: auto;
  bottom: 0;
  left: 0;
  right: 0;
  width: auto !important;
  height: 2px;
  border-radius: 0;
  background: var(--color-action);
  box-shadow: 0 0 10px rgba(var(--color-action-rgb), 0.4);
  transform: scaleX(0);
  transform-origin: left center;
  animation: cmtb-trail-draw 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.06s forwards;
}

.toast.success::before,
.cm-toast--success::before,
.toast[data-tone='success']::before {
  background: var(--color-success);
  box-shadow: none;
}

.toast.error::before,
.cm-toast--error::before,
.cm-toast--danger::before,
.toast[data-tone='error']::before {
  background: var(--danger);
  box-shadow: none;
}

/* Empty: a short trail, then the next action. */
p.account-empty:has(a)::before,
.vt-empty::before,
.help-empty::before,
.services-catalog__empty:not(:empty)::before {
  content: "";
  display: block;
  width: 3.25rem;
  height: 2px;
  margin: 0 0 0.85rem;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--color-action), transparent);
}

body.ds-body .ds-page-header h1,
body.admin-body .ds-page-header h1 {
  position: relative;
}

body.ds-body .ds-page-header h1::after,
body.admin-body .ds-page-header h1::after {
  content: "";
  display: block;
  width: 2.75rem;
  height: 2px;
  margin-top: 0.55rem;
  border-radius: 2px;
  background: var(--color-action);
  box-shadow: 0 0 10px rgba(var(--color-action-rgb), 0.35);
}

body.ds-body--account .ds-nav__item.is-active::after,
body.ds-body--admin .ds-nav__item.is-active::after {
  content: "";
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.35rem;
  height: 2px;
  border-radius: 2px;
  background: var(--color-action);
  opacity: 0.85;
}

.ds-nav__item {
  position: relative;
}

@media (prefers-reduced-motion: reduce) {
  .btn--primary::after,
  .service-card.service-card--v2::after,
  .coach-card::after,
  .newsroom-card::after,
  .toast::before,
  .cm-toast::before {
    transform: scaleX(1);
    animation: none;
    transition: none;
  }
}
