.prediction-compact {
  display: grid;
  gap: 2px;
  min-width: max-content;
}
.prediction-compact small { color: var(--muted); font-size: .78rem; }

.prediction-consensus-head,
.prediction-model-row-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.prediction-consensus-head > .score { font-size: 1.45rem; }
.prediction-method { margin-top: 8px; }
.prediction-breakdown,
.prediction-entries { margin-top: 22px; }
.prediction-axis-labels {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  color: var(--muted);
  font-size: .76rem;
}
.prediction-model-row {
  border-top: 1px solid var(--line);
  padding: 13px 0;
}
.prediction-model-id { display: grid; gap: 1px; }
.prediction-model-id strong { overflow-wrap: anywhere; }
.prediction-model-id .subtle { font-size: .79rem; }
.prediction-model-median-label { color: var(--muted); font-size: .84rem; }
.prediction-model-axis {
  position: relative;
  height: 22px;
  margin: 8px 4px 5px;
  background: linear-gradient(90deg, #dceee0, #eef0ea 50%, #f7eadd);
  border-block: 1px solid #c9d2c7;
  border-radius: 4px;
}
.prediction-model-axis::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 50%;
  border-inline-start: 1px dashed #829487;
}
.prediction-model-range {
  position: absolute;
  inset-block-start: 9px;
  height: 3px;
  background: #869a8c;
}
.prediction-model-dot,
.prediction-model-median {
  position: absolute;
  inset-block-start: 50%;
  width: 7px;
  height: 7px;
  transform: translate(-50%, -50%);
}
.prediction-model-dot { background: #36664f; border-radius: 50%; }
.prediction-model-median {
  width: 9px;
  height: 9px;
  background: #183229;
  border: 1px solid #f8fcf8;
  transform: translate(-50%, -50%) rotate(45deg);
}
.prediction-verdicts { display: flex; gap: 4px 10px; flex-wrap: wrap; font-size: .78rem; color: var(--muted); }
.prediction-verdicts b { color: var(--ink); }
.prediction-model-table { margin-top: 18px; }
.prediction-model-table > .subtle { margin: 7px 0 12px; }
.prediction-model-table th[scope=row] { white-space: normal; min-width: 10rem; }

.model-benchmark { margin-bottom: 1.25rem; }
.model-benchmark h2, .benchmark-results h3 { margin: 0 0 .35rem; }
.model-benchmark h2 + p { margin-block: .3rem .9rem; }
.benchmark-filters { display: flex; flex-wrap: wrap; gap: .6rem 1rem; margin-block: 1rem .75rem; }
.benchmark-filters label { display: grid; gap: .25rem; font-size: .85rem; font-weight: 650; max-width: 100%; }
.benchmark-filters select { min-width: min(100%, 12rem); max-width: 100%; }
.benchmark-method, .benchmark-provenance { margin-block: .4rem; }
.benchmark-coverage { margin: .9rem 0 .15rem; font-size: .92rem; font-weight: 680; }
.benchmark-results {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: 1.25rem;
  margin-block: 1.25rem;
}
.benchmark-results h3 { font-size: 1rem; font-weight: 690; }
.benchmark-matrix { table-layout: fixed; }
.benchmark-matrix th, .benchmark-matrix td { padding: .55rem; white-space: normal; }
.benchmark-matrix th { font-size: .81rem; }
.benchmark-matrix td span { display: block; font-size: .8rem; }
.benchmark-matrix td strong, .benchmark-metrics strong { display: block; font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.benchmark-correct { color: var(--accent-dark); background: #e7f1e8; }
.benchmark-error { color: #7e3e25; background: #fbefe7; }
.benchmark-legend { display: flex; flex-wrap: wrap; gap: .4rem .8rem; margin: .4rem 0; font-size: .78rem; }
.benchmark-legend span::before {
  content: "";
  display: inline-block;
  width: .65rem;
  height: .65rem;
  margin-inline-end: .3rem;
  border-radius: 2px;
  background: var(--class-color);
}
.model-benchmark [data-group="positive"] { --class-color: #287257; }
.model-benchmark [data-group="negative"] { --class-color: #566589; }
.benchmark-chart-scroll { overflow-x: auto; }
.benchmark-chart {
  position: relative;
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  min-width: 24rem;
  padding: .85rem .65rem 1.4rem 0;
}
.benchmark-bin { position: relative; min-width: 0; border-inline-start: 1px solid var(--line); }
.benchmark-bin.benchmark-threshold { border-inline-start: 2px dashed #a5573b; }
.benchmark-bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  height: 6rem;
  border-bottom: 1px solid #a3b1a8;
  background: #f4f7f2;
}
.benchmark-bar {
  position: relative;
  display: block;
  block-size: 0;
  width: 34%;
  max-width: 1.25rem;
  border-radius: 3px 3px 0 0;
  background: var(--class-color);
}
.benchmark-bar b { position: absolute; inset: auto 0 100%; text-align: center; color: var(--ink); font-size: .72rem; }
.benchmark-tick, .benchmark-axis-end { position: absolute; font-size: .7rem; color: var(--muted); white-space: nowrap; }
.benchmark-tick { inset: 100% auto auto .1rem; }
.benchmark-axis-end { inset: auto 0 .33rem auto; }
.benchmark-axis-title { margin: .15rem 0 0; font-size: .77rem; }
.benchmark-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
  gap: .65rem;
  margin-block: 1rem;
}
.benchmark-metrics > div { border: 1px solid var(--line); border-radius: 8px; padding: .55rem .7rem; }
.benchmark-metrics dt { font-size: .8rem; font-weight: 650; }
.benchmark-metrics dd { margin: 0; }
.benchmark-metrics span, .benchmark-metrics small { display: block; font-size: .74rem; color: var(--muted); }
.benchmark-control-records > summary { cursor: pointer; font-weight: 650; }
.benchmark-control-records .table-wrap { margin-top: .55rem; }
.benchmark-control-records small { display: block; font-weight: 400; }
@media (max-width: 900px) {
  .benchmark-results { grid-template-columns: minmax(0, 1fr); }
}

.prediction-entry {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 13px;
  margin-top: 8px;
}
.prediction-entry > summary { cursor: pointer; }
.prediction-entry > summary > span:first-child { display: inline-grid; vertical-align: middle; margin: 0 10px 0 3px; }
.prediction-entry > summary > span:last-child { display: inline-block; font-size: .85rem; color: var(--muted); }
.prediction-entry-body { display: grid; gap: 12px; margin-top: 11px; }
.prediction-entry-body h4 { margin: 0 0 4px; font-size: .87rem; }
.prediction-mechanism { white-space: pre-wrap; overflow-wrap: anywhere; }
.prediction-entry-body pre,
.prediction-digest { overflow-wrap: anywhere; }
.prediction-entry-body pre { white-space: pre-wrap; }
.prediction-provenance {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 14px;
  margin: 0;
}
.prediction-provenance div { overflow-wrap: anywhere; }
.prediction-provenance dt { font-weight: 680; color: var(--muted); font-size: .78rem; }
.prediction-provenance dd { margin: 0; font-size: .88rem; }

.prediction-submission { max-width: 950px; }
.prediction-submit-form { margin-top: 12px; }
.prediction-submit-form textarea { min-height: 74px; }
.prediction-submit-form [data-public-preview] pre { max-height: 20rem; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.prediction-submit-form textarea.mono { font-size: .92rem; }
.prediction-submit-form input[type=file]::file-selector-button {
  background: var(--accent-wash);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  font: inherit;
  padding: 3px 8px;
  margin-right: 8px;
}
.prediction-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 14px; }
.prediction-fields input { min-width: 0; }
.prediction-task-links { margin: 9px 0; }
.prediction-packet { margin-top: 5px; }
.prediction-submitted {
  padding: 9px 12px;
  color: var(--accent-dark);
  background: var(--accent-wash);
  border-radius: 7px;
}
.prediction-submitted a { text-underline-offset: 3px; }

@media (max-width: 560px) {
  .prediction-fields,
  .prediction-provenance { grid-template-columns: minmax(0, 1fr); }
}
