/* delivery-forecast.css — page chrome for /delivery-forecast.
 *
 * It carries only what the shell's css.css does not already give this page:
 * the form layout, the band readout, the histogram, and the two evidence
 * tables. Colors come from the shell's custom properties so the page follows
 * the site's light/dark switch rather than declaring its own.
 */

.dfc__lede { max-width: 62ch; }

/* ---- the tool ---------------------------------------------------------- */

.dfc__tool {
  border: 1px solid var(--rule, #d2d2d7);
  border-radius: 10px;
  padding: 1.25rem;
  margin: 1.5rem 0 2rem;
}

.dfc__form label { display: block; margin: 0.75rem 0 0.25rem; font-weight: 600; }
.dfc__mode { border: 0; padding: 0; margin: 0 0 1rem; }
.dfc__mode legend { font-weight: 600; padding: 0; }
.dfc__mode label { font-weight: 400; margin: 0.35rem 0; }

.dfc__panel { margin-bottom: 1rem; }
.dfc__panel input[type="text"],
.dfc__panel input[type="number"],
.dfc__panel textarea { width: 100%; max-width: 42rem; font-family: inherit; }
.dfc__panel input[type="range"] { width: 100%; max-width: 22rem; display: block; }

.dfc__hint { font-size: 0.9rem; opacity: 0.85; max-width: 62ch; margin: 0.35rem 0 0; }

.dfc__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }

.dfc__status { margin: 0.75rem 0 0; font-size: 0.9rem; opacity: 0.8; }
.dfc__error {
  margin: 0.75rem 0 0;
  padding: 0.6rem 0.8rem;
  border-left: 3px solid #c0392b;
  font-size: 0.95rem;
}

/* ---- the bands --------------------------------------------------------- */

.dfc__bands { list-style: none; padding: 0; margin: 1.25rem 0; }
.dfc__bands li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--rule, #e5e5ea);
}
.dfc__band-name { font-weight: 700; min-width: 3rem; }
.dfc__band-value { font-size: 1.15rem; font-weight: 600; }

/* An absent band is styled DOWN, not up. It is the honest "we will not say",
 * and making it look like a result would defeat the point of having it. */
.dfc__band-value--absent { font-size: 1rem; font-weight: 400; font-style: italic; opacity: 0.85; }
.dfc__band-note { font-size: 0.85rem; opacity: 0.75; }

/* ---- the histogram ----------------------------------------------------- */

.dfc__chart { margin: 1.5rem 0 0; }
.dfc__chart figcaption { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.5rem; }

.dfc__histogram {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 160px;
  padding: 0;
  border-bottom: 1px solid var(--rule, #d2d2d7);
}
.dfc__bar {
  flex: 1 1 0;
  min-height: 1px;
  background: currentColor;
  opacity: 0.75;
}
.dfc__axis { font-size: 0.85rem; opacity: 0.75; margin: 0.4rem 0 0; }
.dfc__seed { font-size: 0.85rem; opacity: 0.8; margin: 0.75rem 0 0; }

.dfc__noscript { margin: 1rem 0; }

/* ---- the evidence ------------------------------------------------------ */

.dfc__limits, .dfc__evidence { max-width: 68ch; margin-top: 2.5rem; }
.dfc__evidence { max-width: none; }
.dfc__evidence p { max-width: 68ch; }

/* Wide content scrolls inside its own container so the page body never does. */
.dfc__table {
  display: block;
  overflow-x: auto;
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.75rem;
  font-size: 0.95rem;
}
.dfc__table caption {
  text-align: left;
  font-weight: 600;
  padding-bottom: 0.4rem;
}
.dfc__table th, .dfc__table td {
  text-align: left;
  padding: 0.4rem 0.9rem 0.4rem 0;
  border-bottom: 1px solid var(--rule, #e5e5ea);
  white-space: nowrap;
}
.dfc__table thead th { font-weight: 700; }

/* A missed band is marked, not hidden. */
.dfc__row--missed th[scope="row"] { position: relative; }
.dfc__missed-tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  opacity: 0.9;
}
.dfc__cell--missed { font-weight: 600; }

/* The miss table is long by design — every one of them is listed — so it gets
 * its own height cap and scrolls rather than pushing the rest of the page
 * below a fold nobody reaches. */
.dfc__table--misses { max-height: 22rem; overflow-y: auto; }

.dfc__provenance { font-size: 0.9rem; opacity: 0.85; }

@media (max-width: 600px) {
  .dfc__tool { padding: 0.9rem; }
  .dfc__histogram { height: 120px; }
  .dfc__bands li { gap: 0.35rem; }
}
