/* Live dashboard in the real-time pipeline box. Source: dashboard/pipeline-dashboard.css (CV project);
   copied to website/assets/css/ by build.py site. Uses the site's colour tokens (site.css :root). */
.dash.is-live .dash__body { padding: 12px 16px 12px; display: flex; flex-direction: column; gap: 10px; font: 400 13px/1.45 var(--sans); color: var(--ink-2); }
.pd-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; }
.pd-window, .pd-age { margin: 0; }
.pd-window { color: var(--ink); font-weight: 600; }
.pd-window span { font: 500 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-right: 6px; font-weight: 500; }
.pd-age { font: 400 12px/1.4 var(--mono); color: var(--muted); }
.pd-age.is-warn { color: var(--amber); }
.dash__bar .pd-age--bar { margin-left: auto; font: 400 10.5px/1 var(--mono); letter-spacing: 0; text-transform: none; }
.dash__bar .pd-age--bar + .pulse { margin-left: 8px; }
.pd-loading { padding: 24px 0; }
.pd-notice { margin: 0; padding: 8px 11px; border-radius: 9px; border: 1px solid rgba(255, 181, 71, .32); background: rgba(255, 181, 71, .07); color: #ffd79a; font-size: 12.5px; }
.pd-notice--fail { border-color: rgba(255, 122, 89, .4); background: rgba(255, 122, 89, .08); color: #ffb9a6; }

.pd-funnel { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.pd-step { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.pd-step__key { font: 600 12px/1 var(--mono); color: var(--teal); text-align: center; padding: 6px 0; border-radius: 7px; border: 1px solid rgba(62, 230, 200, .28); background: rgba(62, 230, 200, .06); }
.pd-step__main { display: flex; flex-wrap: wrap; row-gap: 0; align-items: baseline; gap: 0 8px; min-width: 0; }
.pd-step__label { color: var(--ink); font-weight: 600; white-space: nowrap; }
.pd-step__route { font: 400 11px/1.3 var(--mono); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.pd-step__track { flex-basis: 100%; height: 4px; margin-top: 4px; border-radius: 3px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.pd-step__fill { display: block; height: 100%; width: var(--w); border-radius: 3px; background: linear-gradient(90deg, var(--teal-d), var(--teal)); transform-origin: left; animation: pd-grow 1.1s var(--ease) both; }
.pd-step:nth-child(2) .pd-step__fill { animation-delay: .12s; }
.pd-step:nth-child(3) .pd-step__fill { animation-delay: .24s; }
.pd-step:nth-child(4) .pd-step__fill { animation-delay: .36s; }
@keyframes pd-grow { from { transform: scaleX(0); } }
.pd-step__num { text-align: right; font: 500 17px/1.1 var(--mono); color: var(--ink); min-width: 92px; }
.pd-step__num small { display: block; font: 400 10.5px/1.3 var(--mono); color: var(--muted); white-space: nowrap; }
.pd-step__num small b { font-weight: 400; color: var(--violet); }

.pd-chart { margin: 0; }
.pd-chart__plot { position: relative; height: 50px; display: flex; align-items: flex-end; gap: 4px; border-bottom: 1px solid var(--line-2); }
.pd-chart__col { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; }
.pd-chart__bar { display: block; width: 100%; border-radius: 3px 3px 0 0; background: rgba(155, 140, 255, .45); }
.pd-chart__col.is-in .pd-chart__bar { background: var(--teal); box-shadow: 0 0 12px rgba(62, 230, 200, .45); }
.pd-chart__col.is-skip .pd-chart__bar { background: rgba(255, 255, 255, .16); }
.pd-chart__none { position: absolute; left: 20%; right: 20%; bottom: 0; height: 2px; background: rgba(255, 255, 255, .25); }
.pd-chart figcaption { display: flex; justify-content: space-between; gap: 8px; margin-top: 5px; font: 400 10.5px/1.3 var(--mono); color: var(--muted); }
.pd-chart .k { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin: 0 4px 0 8px; vertical-align: -1px; }
.pd-chart .k--in { background: var(--teal); }
.pd-chart .k--skip { background: rgba(255, 255, 255, .16); }

.pd-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 14px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.pd-rubin { font: 400 12px/1.3 var(--mono); color: var(--ink-2); text-decoration: none; }
.pd-rubin:hover { color: var(--teal); }
.pd-rubin i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 7px; background: var(--teal); box-shadow: 0 0 8px var(--teal); }
.pd-rubin i.warn { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.pd-run { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.pd-run__msg { font: 400 11.5px/1.3 var(--mono); color: var(--muted); }
.pd-btn { font: 600 12.5px/1 var(--sans); color: #04121a; background: var(--teal); border: 0; border-radius: 999px; padding: 9px 15px; cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s; }
.pd-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(62, 230, 200, .35); }
.pd-btn:disabled { background: rgba(255, 255, 255, .1); color: var(--muted); cursor: default; }
.pd-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

@media (max-width: 560px) {
  /* phones: the number goes under the label, so nothing pushes the box wider than the screen */
  .pd-step { grid-template-columns: 30px minmax(0, 1fr); row-gap: 3px; align-items: start; }
  .pd-step__key { grid-row: 1 / span 2; align-self: center; }
  .pd-step__label { white-space: normal; }
  .pd-step__num { grid-column: 2; min-width: 0; text-align: left; font-size: 15px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; }
  .pd-step__num small { display: inline; white-space: normal; }
  .pd-chart figcaption span:nth-child(2) { display: none; }
}
@media (prefers-reduced-motion: reduce) { .pd-step__fill { animation: none; } }

/* title bar on one line */
.dash__bar span, .dash__bar .pd-age--bar { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash__bar span { flex: 0 1 auto; min-width: 0; }
.dash__bar .pd-age--bar { flex: 0 1 auto; min-width: 0; }
/* compact stat tiles in the pipeline box, so the box with the live dashboard stays near the other big boxes */
.statgrid:has(+ .dash.is-live) li { padding: 12px 14px; }
.statgrid:has(+ .dash.is-live) .statgrid__value { font-size: clamp(22px, 2.2vw, 28px); }
.statgrid:has(+ .dash.is-live) .statgrid__label { margin-top: 5px; font-size: 12px; line-height: 1.35; }
/* phones: keep the title whole; only the "updated ..." text shortens */
@media (max-width: 560px) { .dash__bar span:not(.pd-age--bar), .dash__bar i { flex-shrink: 0; } }

/* label: this dashboard shows the main science run (page 2 runs demo runs) */
.pd-kind { margin: 0 0 8px; font: 600 10.5px/1.4 var(--mono, ui-monospace, monospace); letter-spacing: .1em; text-transform: uppercase; color: #9b8cff; }
