/* Network reporting.
 *
 * Rides on performance.css for the palette, header, bands and tiles, the same
 * way platform.css does -- this is a page on that site, not a second product.
 * Everything here is what that stylesheet has no concept of: the requirement
 * cards, the phase filter and the tables under them.
 *
 * The state of a requirement is carried by a word and by the border weight on
 * the left of its card, never by colour alone. This page gets printed, and it
 * gets projected in rooms where the projector eats saturation.
 */

.viz-root {
  --brand-orange: #cf5f12;
  --chip: rgba(11, 11, 11, 0.04);
}

@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) .viz-root {
    --brand-orange: #ff8f45;
    --chip: rgba(255, 255, 255, 0.06);
  }
}
:root[data-theme="dark"] .viz-root {
  --brand-orange: #ff8f45;
  --chip: rgba(255, 255, 255, 0.06);
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero-claim {
  max-width: 720px;
  margin: 16px auto 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.hot { color: var(--brand-orange); }

.head-badge {
  margin-right: auto;
  color: var(--brand-orange);
  font-weight: 600;
  font-size: 13.5px;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .head-badge { display: none; }
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 26px;
}

.hero-stats .tile { min-width: 150px; }

/* ---------- The phase filter ---------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 20px;
}

.filter {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-1);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.filter:hover { border-color: var(--text-muted); }

/* The selected phase is marked by weight and by a filled ground, so it survives
   both a greyscale print and a projector. */
.filter.on {
  border-color: var(--brand-orange);
  background: var(--chip);
}

.filter-label { font-size: 14px; font-weight: 600; }
.filter.on .filter-label { color: var(--brand-orange); }
.filter-note { font-size: 12px; color: var(--text-muted); }

/* ---------- Requirement cards ---------- */

.tally {
  margin: 0 0 16px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.tally strong { font-variant-numeric: tabular-nums; }
.tally .s-live { color: var(--status-good); }
.tally .s-buildable { color: var(--brand-orange); }
.tally .s-blocked { color: var(--text-secondary); }

.req-list {
  display: grid;
  gap: 12px;
}

.req {
  padding: 16px 18px;
  border: 1px solid var(--border);
  /* State on the left edge: solid and heavy for what runs, thin for what
     could, dashed for what cannot. Readable with no colour at all. */
  border-left-width: 4px;
  border-radius: var(--radius);
  background: var(--surface-1);
}

.req-live { border-left-color: var(--status-good); }
.req-buildable { border-left-color: var(--brand-orange); }
.req-blocked { border-left-style: dashed; border-left-color: var(--text-muted); }

.req-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.req-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
}

.chip {
  flex: none;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--chip);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.chip-live { color: var(--status-good); border-color: currentColor; }
.chip-buildable { color: var(--brand-orange); border-color: currentColor; }
.chip-blocked { color: var(--text-muted); border-style: dashed; }

/* The three phases, side by side, each carrying the format that phase asks
   for. A phase that doesn't ask for this requirement is drawn quiet rather
   than dropped, so the columns line up down the list. */
.req-phases {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.phase {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--chip);
  opacity: 0.45;
}

.phase.asked { opacity: 1; }

.phase-name {
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.phase-format { font-size: 12.5px; line-height: 1.4; }

.req-line {
  margin: 8px 0 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.req-line strong { color: var(--text-primary); }
.req-needs strong { color: var(--brand-orange); }

.req-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.flag {
  padding: 3px 9px;
  border: 1px dashed var(--text-muted);
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-muted);
}

.req-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-orange);
  text-decoration: none;
}

.req-link:hover { text-decoration: underline; }

/* ---------- Tables ---------- */

.table-wrap {
  overflow-x: auto;
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-1);
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

table.data th,
table.data td {
  padding: 9px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

table.data thead th {
  font-size: 12px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

table.data tbody tr:last-child td { border-bottom: none; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }
table.data .quiet { color: var(--text-muted); }

/* ---------- Caveats ---------- */

/* The paragraph that says what a figure is not. Deliberately given the same
   weight as the figure itself: on this page the qualification is the point. */
.caveat {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-left: 3px solid var(--brand-orange);
  background: var(--chip);
  border-radius: 0 8px 8px 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.caveat strong { color: var(--text-primary); }

.baseline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 8px;
}

.baseline-grid h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
}

.baseline-grid p {
  margin: 0 0 10px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-secondary);
}

@media (max-width: 720px) {
  .req-phases { grid-template-columns: 1fr; }
  .phase:not(.asked) { display: none; }
}
