/* Depot dashboard — layout only. Every colour comes from ui.css. */

.dash {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--s5);
  display: grid;
  /* NOT a bare `grid` with an implicit column.
     ------------------------------------------------------------------
     A grid item's min-width defaults to `auto`, meaning "no narrower than my
     content". The depot tables are ~20 columns of nowrap text, so the item
     holding one refused to shrink, the single implicit column grew to match,
     and every sibling was stretched with it — a 951px viewport rendering a
     2,642px page, with the sewer card and half the KPI row pushed off-screen.
     `minmax(0, 1fr)` here and `min-width: 0` below let the item be narrower
     than its content, which is what lets .tbl-wrap scroll the table instead. */
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s5);
}

.dash > *, .sec > *, .grid2 > *, .grid3 > * { min-width: 0; }

/* -- the depot picker strip -------------------------------------------- */
.dash-bar {
  display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: var(--s3) var(--s4);
  box-shadow: var(--shadow-1);
  position: sticky; top: 60px; z-index: 30;
}
.dash-bar-l { display: flex; align-items: center; gap: var(--s4); flex: 1; min-width: 260px; }
.dash-pick { display: flex; align-items: center; gap: var(--s2); }
.dash-pick span {
  font-size: var(--t-xs); font-weight: 650; color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em;
}
.dash-bar .note { border: 0; padding: 0; }

/* -- section blocks ----------------------------------------------------- */
.sec { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
.sec-h { display: flex; align-items: baseline; gap: var(--s3); }
.sec-h h2 { letter-spacing: -.02em; }
.sec-h .sub { font-size: var(--t-sm); color: var(--muted); }

/* min() so a column can never demand more width than the page actually has —
   below 340px the track collapses to 100% instead of overflowing. */
.grid2 { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); }
.grid3 { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }

/* -- the all-depot comparison chart ------------------------------------- */
/* Inline SVG, drawn from the aggregates. No chart library: the shapes needed
   here are bars and a legend, and a library would be more code than they are. */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { font-family: var(--font); fill: var(--muted); font-size: 10px; }
.chart text.val { fill: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.chart .axis { stroke: var(--line); stroke-width: 1; }
.chart .gridline { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 3; }
.chart rect.b:hover { opacity: .8; }
.chart .sel { stroke: var(--ink); stroke-width: 1.5; }

.legend-row { display: flex; flex-wrap: wrap; gap: var(--s4); margin-top: var(--s2); }
.legend-row i {
  width: 10px; height: 10px; border-radius: 3px; display: inline-block;
  margin-right: 6px; vertical-align: -1px;
}
.legend-row span { font-size: var(--t-xs); color: var(--muted); }

/* -- a two-column figure list ------------------------------------------- */
.figs { display: grid; gap: 0; }
.fig {
  display: flex; align-items: baseline; gap: var(--s3);
  padding: 8px 0; border-bottom: 1px solid var(--line);
}
.fig:last-child { border-bottom: 0; }
.fig-k { font-size: var(--t-sm); color: var(--ink-2); flex: 1; }
.fig-v { font-size: var(--t-md); font-weight: 650; font-variant-numeric: tabular-nums; }
.fig-s { font-size: var(--t-xs); color: var(--muted); min-width: 52px; text-align: right; }

/* -- quality findings ---------------------------------------------------- */
.finding {
  display: grid; grid-template-columns: auto 1fr auto; gap: var(--s3);
  align-items: start; padding: var(--s3) 0; border-bottom: 1px solid var(--line);
}
.finding:last-child { border-bottom: 0; }
.finding-t { font-size: var(--t-sm); font-weight: 600; }
.finding-d { font-size: var(--t-xs); color: var(--muted); line-height: 1.55; margin-top: 2px; }
.finding-n { font-size: var(--t-lg); font-weight: 680; font-variant-numeric: tabular-nums; }
.dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; }

@media (max-width: 720px) {
  .dash { padding: var(--s3); gap: var(--s4); }
  .dash-bar { position: static; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
}
