/* main-success / path (template/blocks/main-success/path.twig): the title, the route of 2–4 stations on a band of the surface colour
   the width of the page (a vertical route on phones), then items | contacts and the shelf. The only motion: a light runs from the
   station «now» to the next one along its line (none with reduced motion: half of the line lit). Tokens only. */
.et-success--path .et-success__top { display: grid; gap: 0.75rem; padding-block: clamp(1.75rem, 5vw, 4rem) clamp(1.75rem, 4vw, 3rem); }
.et-success--path .et-route__title { max-width: 18ch; font-size: clamp(1.875rem, 4.6vw, 4.25rem); letter-spacing: -0.03em; line-height: 1.02; }
.et-success--path .et-success__meta b { font-weight: 700; }
.et-success--path .et-success__account { max-width: 70ch; }

.et-route__band { border-block: var(--et-border-width) solid var(--et-border); background: var(--et-surface); }
.et-route {
  --dot: 1.875rem; --gap: clamp(1rem, 2.4vw, 2.25rem);
  display: grid; grid-template-columns: repeat(var(--et-route-n, 4), minmax(0, 1fr)); gap: var(--gap);
  margin-block: 0; padding: 1.75rem 0 2.5rem; list-style: none;
}
.et-route__st { position: relative; min-width: 0; padding-top: calc(var(--dot) + 1.25rem); }
.et-route__dot {
  position: absolute; top: 0; left: 0; display: grid; place-items: center; width: var(--dot); height: var(--dot);
  border: 2px solid var(--et-border-strong, var(--et-border)); border-radius: var(--et-radius-full); background: var(--et-surface); font-size: 0.75rem;
}
.et-route__st.is-done .et-route__dot { border-color: var(--et-accent); background: var(--et-accent); color: var(--et-accent-contrast); }
.et-route__st.is-cur .et-route__dot { border-color: var(--et-accent); animation: et-route-ping 2.6s ease-out infinite; }
.et-route__st.is-cur .et-route__dot::after { content: ""; width: 0.625rem; height: 0.625rem; border-radius: var(--et-radius-full); background: var(--et-accent); }
@keyframes et-route-ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--et-accent) 45%, transparent); } 70%, 100% { box-shadow: 0 0 0 0.875rem transparent; } }
/* the line to the next station: lit up to «now», from «now» a light runs along it */
.et-route__line {
  position: absolute; top: calc(var(--dot) / 2 - 1px); left: calc(var(--dot) + 0.375rem); right: calc(-1 * var(--gap) + 0.375rem); height: 2px;
  overflow: hidden; border-radius: 2px; background: var(--et-border);
}
.et-route__line.is-past { background: var(--et-accent); }
.et-route__st.is-cur .et-route__line { background: linear-gradient(90deg, var(--et-accent) 0 30%, var(--et-border) 30%); overflow: visible; }
.et-route__st.is-cur .et-route__line::after {
  content: ""; position: absolute; top: -2px; left: 0; width: 2.875rem; height: 6px; border-radius: 6px;
  background: radial-gradient(closest-side, var(--et-accent), transparent); animation: et-route-run 2.6s cubic-bezier(0.5, 0, 0.2, 1) infinite;
}
@keyframes et-route-run { 0% { left: 0; opacity: 0; } 15%, 85% { opacity: 1; } 100% { left: calc(100% - 2.875rem); opacity: 0; } }
.et-route__name { margin-bottom: 0.625rem; font-family: var(--et-font-display); font-size: clamp(1.1875rem, 1.7vw, 1.625rem); font-weight: var(--et-heading-weight); letter-spacing: -0.015em; line-height: 1.15; overflow-wrap: anywhere; hyphens: auto; }
.et-route__now {
  display: inline-block; margin-inline-start: 0.25rem; padding: 0.1875rem 0.5rem; border-radius: var(--et-radius-full); vertical-align: middle;
  background: var(--et-accent); color: var(--et-accent-contrast); font-family: var(--et-font); font-size: var(--et-text-xs); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}
.et-route__body { display: grid; gap: 0.375rem; align-content: start; font-size: var(--et-text-sm); line-height: 1.45; overflow-wrap: anywhere; }
.et-route__pay { display: grid; gap: 0.5rem; justify-items: start; margin-top: 0.5rem; }

@media (max-width: 991.98px) {
  .et-route { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2.25rem; }
  .et-route__st:nth-child(2n) .et-route__line { display: none; }
}
@media (max-width: 640px) {
  .et-route { grid-template-columns: minmax(0, 1fr); gap: 0; padding-block: 1.5rem 0.5rem; }
  .et-route__st { padding: 0 0 1.625rem calc(var(--dot) + 1rem); }
  .et-route__st:nth-child(2n) .et-route__line { display: block; }
  .et-route__line { top: calc(var(--dot) + 0.25rem); bottom: 0.25rem; left: calc(var(--dot) / 2 - 1px); right: auto; width: 2px; height: auto; }
  .et-route__st.is-cur .et-route__line { background: linear-gradient(180deg, var(--et-accent) 0 30%, var(--et-border) 30%); }
  .et-route__st.is-cur .et-route__line::after { top: 0; left: -2px; width: 6px; height: 2.5rem; animation-name: et-route-down; }
  .et-route__name { margin-bottom: 0.375rem; padding-top: 0.125rem; }
  .et-route__body { font-size: 1rem; }
}
@keyframes et-route-down { 0% { top: 0; opacity: 0; } 15%, 85% { opacity: 1; } 100% { top: calc(100% - 2.5rem); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .et-route__st.is-cur .et-route__line::after { display: none; } }
@media print { .et-route__band { border: 0; background: none; } .et-route__line::after { display: none; } }
