/* ── Scheduler visibility page and widget ───────────────────── */
.sched-bar { margin-bottom: 0.7rem; }
.sched-bar__head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8rem;
  margin-bottom: 0.2rem;
}
.sched-bar__track {
  height: 0.45rem;
  border-radius: var(--radius-sm);
  background: var(--border);
  overflow: hidden;
}
.sched-bar__fill { height: 100%; }
.sched-bar__note {
  display: block;
  font-size: 0.74rem;
  color: var(--text-faint);
  margin-top: 0.15rem;
}
.sched-bar__note--alert { color: var(--red); }

/* Lifecycle: a count column beside the prose, read top to bottom. */
.sched-stage {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 0.9rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
}
.sched-stage:first-child { border-top: none; }
.sched-stage__count {
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: right;
  color: var(--text-faint);
}
.sched-stage__count--busy { color: var(--orange); }
.sched-stage__label { font-weight: 600; font-size: 0.9rem; }
.sched-stage__text {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.sched-stage__gate { margin: 0.3rem 0 0; font-size: 0.8rem; }
.sched-stage__gate-label { color: var(--text-faint); }
.sched-stage__knobs {
  margin: 0.3rem 0 0;
  font-size: 0.76rem;
  color: var(--text-faint);
}

.sched-panel { padding: 0.9rem 1.25rem; }
.sched-panel__title { font-size: 0.95rem; font-weight: 700; }

/* ── Now: verdict, funnel, capacity meters ──────────────────── */
.sched-now { margin-bottom: 0.5rem; }
.sched-verdict {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.sched-verdict__dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--green);
}
.sched-verdict__headline { font-size: 1.05rem; font-weight: 700; }
.sched-verdict__cause { font-size: 0.82rem; color: var(--text-muted); }
.sched-verdict--busy .sched-verdict__dot { background: var(--orange); }
.sched-verdict--alert .sched-verdict__dot { background: var(--red); }
.sched-verdict--alert .sched-verdict__headline { color: var(--red); }

/* The pipeline read left to right, with the gate between two steps. */
.sched-funnel {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 1.1rem 0 1.25rem;
}
.sched-funnel__step { min-width: 5.5rem; }
.sched-funnel__count {
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-faint);
}
.sched-funnel__count--busy { color: var(--orange); }
.sched-funnel__label { font-size: 0.78rem; color: var(--text-muted); }
.sched-funnel__gate {
  font-size: 0.72rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0 0.6rem;
}

.sched-meters {
  display: grid;
  gap: 0.8rem 1.75rem;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
}
.sched-caption {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0.15rem 0 0;
}

.sched-section-title { font-size: 1.05rem; margin: 0 0 0.3rem; }
.sched-subsection-title {
  font-size: 0.9rem;
  margin: 1.1rem 0 0.35rem;
  color: var(--text-muted);
}
/* The break between what is live, what is diagnostic and what is reference. */
.sched-layer {
  border-top: 1px solid var(--border);
  margin-top: 1.75rem;
  padding-top: 1.1rem;
}
.sched-ref { margin-bottom: 0.6rem; padding: 0.7rem 1.25rem; }
.sched-ref > summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
}
.sched-section-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
  max-width: 60rem;
}
.sched-table-wrap { overflow-x: auto; margin-bottom: 1.5rem; }

.sched-note { margin-top: 0.6rem; }
.sched-note__title { font-weight: 600; font-size: 0.85rem; color: var(--orange); }
.sched-note__title--info { color: var(--text-muted); }
.sched-note__detail {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.sched-widget__head {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}
.sched-widget__link { margin-left: auto; font-size: 0.82rem; }
.sched-widget__states {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 0.6rem;
  font-size: 0.8rem;
}
.sched-widget__state-count { font-weight: 700; }
.sched-widget__state-label { color: var(--text-muted); }

.sched-row--dead { opacity: 0.55; }
.sched-flag { color: var(--orange); }
.sched-badge { background: var(--orange); color: var(--bg-card); }
.sched-holders {
  margin-left: 0.8rem;
  color: var(--text-muted);
}
