/* The pipeline spine — numbered stations, status dots, cadence groups (spec §4). */
.rail-head { padding: 22px 22px 14px; border-bottom: 1px solid var(--line); }
.rail-head .brand { display: flex; align-items: baseline; gap: 8px; }
.rail-head .brand small { color: var(--muted); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; }

.rail-nav { padding: 14px 14px 24px; }
.rail-group + .rail-group { margin-top: 18px; }
.rail-group-label {
  font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); padding: 0 10px 8px;
}

/* the connecting spine line behind the station dots */
.rail-stations { position: relative; }
.rail-stations::before {
  content: ""; position: absolute; left: 24px; top: 14px; bottom: 14px;
  width: 2px; background: var(--line);
}

.station {
  position: relative; display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left; border: 0; background: transparent;
  padding: 9px 10px; border-radius: var(--r-md); color: var(--ink);
}
.station:hover { background: var(--paper); }
.station.active { background: var(--teal-soft); }
.station.active .station-title { color: var(--teal); font-weight: 600; }

.station-dot {
  position: relative; z-index: 1; flex: 0 0 auto;
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); border: 2px solid var(--line);
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted);
}
.station-meta { display: flex; flex-direction: column; min-width: 0; }
.station-title { font-size: 0.92rem; line-height: 1.25; }
.station-sub { font-size: 0.72rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }

/* status glyph — color is ALWAYS paired with a glyph/label (quality floor) */
.status-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 0.72rem; color: var(--muted); }
.status-pill::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--status-idle);
}
.s-placeholder::before { background: var(--status-placeholder); }
.s-idle::before        { background: var(--status-idle); border: 1px solid var(--muted); }
.s-running::before     { background: var(--status-running); animation: pulse 1.1s ease-in-out infinite; }
.s-done::before        { background: var(--status-done); }
.s-error::before       { background: var(--status-error); }

.station.s-done .station-dot    { border-color: var(--status-done); color: var(--status-done); }
.station.s-running .station-dot { border-color: var(--status-running); color: var(--status-running); }
.station.s-error .station-dot   { border-color: var(--status-error); color: var(--status-error); }
.station.s-placeholder .station-dot { border-style: dashed; }

@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) {
  .s-running::before { animation: none; }
}

/* mobile: rail collapses to a top horizontal stepper */
@media (max-width: 720px) {
  .rail { border-right: 0; border-bottom: 1px solid var(--line); }
  .rail-stations::before { display: none; }
  .rail-nav { display: flex; gap: 8px; overflow-x: auto; padding: 12px; }
  .rail-group { margin: 0 !important; }
  .rail-group-label { display: none; }
  .station { width: auto; flex-direction: column; gap: 4px; padding: 8px 10px; }
  .station-meta { align-items: center; }
  .station-title { white-space: nowrap; font-size: 0.75rem; }
  .station-sub { display: none; }
}
