/* ULTRABENCH — view-specific layout: feed, model detail, benchmarks coverage, runs, disputes. */

/* ---------- live feed ---------- */

.feed-head {
  display: flex; flex-wrap: wrap; gap: 18px; align-items: center;
  padding: 12px 16px; margin-bottom: 14px;
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius);
}
.feed-head .stat-value.cost-over { color: var(--danger); }

.cost-bar {
  width: 160px; height: 6px; border-radius: 3px; background: var(--bg-inset);
  border: 1px solid var(--line-strong); overflow: hidden; margin-top: 4px;
}
.cost-bar > span { display: block; height: 100%; background: var(--accent); }
.cost-bar > span.over { background: var(--danger); }

.feed-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line);
             border-radius: var(--radius); background: var(--bg-raised); overflow: hidden; }
.feed-item {
  display: grid;
  grid-template-columns: 78px 132px 1fr;
  gap: 12px; align-items: baseline;
  padding: 8px 14px; border-bottom: 1px solid var(--line);
  border-left: 3px solid transparent;
  font-size: 13px;
}
.feed-item:last-child { border-bottom: none; }
.feed-time { font-family: var(--mono); font-size: 11px; color: var(--text-faint); }
.feed-kind {
  font-family: var(--mono); font-size: 11px; letter-spacing: .04em;
  color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.feed-detail { font-family: var(--mono); font-size: 12px; color: var(--text);
               white-space: pre-wrap; word-break: break-word; }
.feed-phase { color: var(--text-faint); font-family: var(--mono); font-size: 11px; }

.feed-item.k-model_added          { border-left-color: var(--accent); background: rgba(84, 214, 176, .06); }
.feed-item.k-model_added .feed-kind { color: var(--accent); font-weight: 600; }
.feed-item.k-model_added .feed-detail { color: var(--text); font-size: 13px; }
.feed-item.k-score_added .feed-kind          { color: #a9d9c9; }
.feed-item.k-benchmark_registered            { border-left-color: var(--info); }
.feed-item.k-benchmark_registered .feed-kind { color: var(--info); }
.feed-item.k-gate_reject          { border-left-color: var(--warn); }
.feed-item.k-gate_reject .feed-kind { color: var(--warn); }
.feed-item.k-dispute              { border-left-color: var(--warn); }
.feed-item.k-dispute .feed-kind   { color: var(--warn); }
.feed-item.k-supersede .feed-kind { color: var(--info); }
.feed-item.k-alarm                { border-left-color: var(--danger); background: rgba(232, 100, 107, .06); }
.feed-item.k-alarm .feed-kind     { color: var(--danger); }
.feed-item.k-query .feed-kind     { color: var(--text-dim); }
.feed-item.k-info .feed-kind,
.feed-item.k-info .feed-detail    { color: var(--text-faint); }

/* ---------- model detail ---------- */

.detail-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.detail-head h1 { font-size: 22px; }
.detail-sub { color: var(--text-faint); font-family: var(--mono); font-size: 12px; margin-bottom: 14px; }
.detail-summary { color: var(--text-dim); max-width: 78ch; }

.lineage { display: flex; flex-wrap: wrap; gap: 8px; }
.lineage a { font-family: var(--mono); font-size: 12px; }

.tag-list { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.tag-list li {
  font-size: 12px; color: var(--text-dim);
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px 9px;
}

/* ---------- benchmarks coverage ---------- */

.coverage-cols { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.slug-list { list-style: none; margin: 0; padding: 0; max-height: 320px; overflow-y: auto;
             font-family: var(--mono); font-size: 12px; }
.slug-list li { padding: 3px 0; border-bottom: 1px solid var(--line); }
.slug-list li:last-child { border-bottom: none; }
.coverage-uncovered li { color: var(--text-faint); }

/* ---------- runs + disputes ---------- */

.run-events { margin-top: 14px; }
.payload-viewer {
  background: var(--bg-inset); border: 1px solid var(--line); border-radius: var(--radius-s);
  padding: 10px 12px; margin: 0; overflow-x: auto;
  font-family: var(--mono); font-size: 12px; color: var(--text-dim);
  max-height: 320px; white-space: pre-wrap; word-break: break-word;
}
.dispute-card { display: grid; gap: 8px; }
.dispute-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dispute-actions .note { color: var(--text-faint); font-size: 12px; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .feed-item { grid-template-columns: 62px 110px 1fr; gap: 8px; padding: 8px 10px; }
  .stat .stat-value { font-size: 15px; }
  .cost-bar { width: 120px; }
}

@media (max-width: 520px) {
  .feed-item { grid-template-columns: 1fr; gap: 2px; }
  .feed-time { order: 1; }
  .feed-kind { order: 0; }
  .feed-detail { order: 2; }
  .detail-head h1 { font-size: 18px; }
  .filters { gap: 6px; }
  .filters label { font-size: 11px; }
  table.data th, table.data td { padding: 8px 10px; }
}
