/* Bench view. Uses the dashboard tokens from styles.css (light, dark, increased contrast). */
.bench { display: flex; flex-direction: column; gap: 24px; }
.bench .card { margin-bottom: 0; }

/* Section tabs (a segmented control) and the set picker. */
.btabs { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.btabgroup { display: inline-flex; background: var(--fill-3); border-radius: var(--r-seg); padding: 2px; gap: 2px; }
.btab {
  min-height: 24px; padding: 3px 14px; border-radius: calc(var(--r-seg) - 2px); color: var(--label); text-decoration: none;
  font-size: 13px; line-height: 18px; font-weight: 500; display: inline-flex; align-items: center;
  transition: background-color 120ms ease;
}
.btab:hover { background: var(--fill-4); }
.btab.on { background: var(--thumb); box-shadow: var(--shadow-thumb); font-weight: 600; }
.bspacer { flex: 1; }
.bset { font-size: 12px; color: var(--label-2); display: flex; gap: 8px; align-items: center; }
.bset select { max-width: min(420px, 70vw); }

.bench select, .bench input:not([type="checkbox"]), .bench textarea { font-size: 13px; }
.bench textarea { min-height: 28px; line-height: 18px; resize: vertical; }
/* A list's title row with its filters, above the group. */
.bcontrols { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 0 4px 10px; }
.bhead { margin: 0; font-size: 15px; line-height: 20px; font-weight: 600; }
.btoggle { font-size: 13px; color: var(--label); display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.bwarn {
  background: color-mix(in srgb, var(--orange) 12%, var(--group));
  border-radius: var(--r-group); padding: 10px 14px; font-size: 13px;
}
.bwarn b:first-child { color: var(--orange-text); }
.bwarn ul { margin: 4px 0 0 18px; padding: 0; }
.bpager { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 4px 0; font-size: 12px; color: var(--label-2); font-variant-numeric: tabular-nums; }
.bpages { display: inline-flex; align-items: center; gap: 8px; }
.pager-btn {
  width: 26px; height: 26px; display: inline-grid; place-items: center; border-radius: var(--r-control);
  border: 0; background: var(--fill-3); color: var(--label); font-size: 15px; line-height: 1; cursor: pointer;
}
.pager-btn:hover:not(:disabled) { background: var(--fill-2); }
.pager-btn:disabled { opacity: 0.4; cursor: default; }
.bpage { display: inline-flex; align-items: center; gap: 6px; }
.app input.page-field:not([type="checkbox"]):not([type="radio"]):not([type="file"]) {
  width: calc(4ch + 14px); min-height: 26px; padding: 3px 7px; border-radius: var(--r-control);
  font-size: 12px; text-align: center; font-variant-numeric: tabular-nums;
}
.app input.page-field:disabled { opacity: 0.4; }
.bscroll { max-height: 70vh; }
a.link, .bcrumb a { color: var(--blue-text); text-decoration: none; font-weight: 500; }
a.link:hover, .bcrumb a:hover { opacity: 0.72; }

/* HF-style table: column names are the row document's field names, shown as identifiers. */
table.hf { --cell-x: 12px; }
table.hf th { vertical-align: top; padding: 9px var(--cell-x); min-width: 90px; }
table.hf td { padding: 8px var(--cell-x); vertical-align: top; font-size: 13px; }
table.hf td a { color: var(--blue-text); font-weight: 600; text-decoration: none; }
table.hf td a:hover { opacity: 0.72; }
.hname { color: var(--label); font-weight: 600; font-family: var(--mono); font-size: 12px; }
.mono-name { font-family: var(--mono); font-size: 12px; }
.htype { font-weight: 400; font-size: 11px; color: var(--label-2); margin: 1px 0 6px; }
.dist { display: grid; grid-template-columns: auto minmax(30px, 1fr) auto; gap: 2px 6px; align-items: center; font-weight: 400; font-size: 11px; color: var(--label-2); min-width: 140px; }
.dist .dk { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dist i { display: block; height: 6px; background: var(--data); border-radius: 3px; }
.dist .dn { text-align: right; font-variant-numeric: tabular-nums; }
.hist { display: flex; align-items: flex-end; gap: 2px; height: 30px; min-width: 100px; }
.hist i { flex: 1; background: var(--data); opacity: 0.85; border-radius: 2px 2px 0 0; }
.rng { display: flex; justify-content: space-between; font-weight: 400; font-size: 11px; color: var(--label-2); font-variant-numeric: tabular-nums; }
td.trunc { max-width: 280px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
td.trunc.full { white-space: pre-wrap; overflow: visible; word-break: break-word; }
.small { font-size: 12px; }
.bexp {
  border: 0; background: transparent; color: var(--label-2); cursor: pointer;
  width: 22px; height: 22px; padding: 0; margin-right: 2px; border-radius: 5px; font-size: 11px;
}
.bexp:hover { background: var(--fill-3); color: var(--label); }
tr.brow.open td { background-color: color-mix(in srgb, var(--blue) 10%, var(--group)); }
tr.bsub td { background-color: var(--group-2); }
/* Arm-type tags: tinted capsules, the word in the bold accessible color. */
.bb { display: inline-block; border-radius: 5px; padding: 0 6px; margin: 0 3px 2px 0; font-size: 11px; font-weight: 600; line-height: 18px; background: var(--fill-3); }
.b-att { color: var(--red-text); background: color-mix(in srgb, var(--red) 12%, var(--group)); }
.b-ben { color: var(--green-text); background: color-mix(in srgb, var(--green) 14%, var(--group)); }
.b-ctl { color: var(--orange-text); background: color-mix(in srgb, var(--orange) 14%, var(--group)); }
.ok { color: var(--green-text); font-weight: 600; }
.bad { color: var(--red-text); font-weight: 600; }
mark { background: color-mix(in srgb, #ffcc00 40%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.armgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px;
  position: sticky; left: 12px; max-width: calc(100vw - 340px); }
.armcard { background: var(--group); border-radius: var(--r-inner); padding: 10px 12px; min-width: 0; }
.armhead { margin-bottom: 6px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Row page */
.bcrumb { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; min-height: 28px; }
.bcrumb a.btn { color: var(--on-tint); font-weight: 600; opacity: 1; }
.bcrumb a.btn-secondary { color: var(--label); font-weight: 500; }
a.btn { text-decoration: none; }
.rowgrid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; }
.kv { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 6px 12px; font-size: 13px; }
.kv > span:nth-child(odd) { color: var(--label-2); font-size: 12px; }
.pre { white-space: pre-wrap; word-break: break-word; }
.issues { margin: 0; padding-left: 18px; font-size: 13px; }
.issues li { margin: 2px 0; }
.issues li.error { color: var(--red-text); }
.issues li.warning { color: var(--orange-text); }
.armtabs { display: flex; gap: 6px; flex-wrap: wrap; }
.armtab {
  border: 0; background: var(--fill-3); border-radius: var(--r-control); padding: 3px 8px; min-height: 26px; cursor: pointer;
  transition: background-color 120ms ease;
}
.armtab:hover { background: var(--fill-2); }
.armtab.on { background: color-mix(in srgb, var(--blue) 14%, var(--group)); box-shadow: inset 0 0 0 1.5px var(--blue); }
.partsgrid { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 2fr); gap: 16px; }
.plabel { font-size: 11px; line-height: 14px; font-weight: 600; color: var(--label-2); margin: 12px 0 5px; }
.plabel:first-child { margin-top: 0; }
.ptext { white-space: pre-wrap; word-break: break-word; background: var(--group-2); border-radius: var(--r-inner); padding: 8px 10px; font-size: 13px; }
details.check { box-shadow: inset 0 var(--hairline) 0 var(--separator); padding: 6px 0; font-size: 13px; }
details > summary { cursor: pointer; }
pre.json { margin: 6px 0; background: var(--group-2); border-radius: var(--r-inner); padding: 8px 10px; font-size: 12px; overflow: auto; max-height: 320px; white-space: pre-wrap; word-break: break-word; font-family: var(--mono); }
pre.json.tall { max-height: 640px; }
.fmt { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fmt-note { margin: 6px 0 10px; }
.seg { display: inline-flex; background: var(--fill-3); border-radius: var(--r-seg); padding: 2px; gap: 2px; }
.seg button {
  border: 0; background: transparent; color: var(--label); min-height: 24px; padding: 3px 11px; border-radius: calc(var(--r-seg) - 2px);
  font-size: 12px; line-height: 16px; font-weight: 500; cursor: pointer;
}
.seg button:hover:not([aria-checked="true"]) { background: var(--fill-4); }
.seg button[aria-checked="true"] { background: var(--thumb); box-shadow: var(--shadow-thumb); font-weight: 600; }
.msg { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; box-shadow: inset 0 var(--hairline) 0 var(--separator); padding: 8px 0; }
.msg pre { margin: 0; white-space: pre-wrap; word-break: break-word; font-size: 12px; font-family: var(--mono); }
.role { font-weight: 600; font-size: 12px; }
.role small { display: block; font-weight: 400; color: var(--label-2); font-size: 11px; }
.r-system, .r-tools { color: var(--label-2); }
.r-user { color: var(--purple-text); }
.r-assistant { color: var(--orange-text); }
.r-tool { color: var(--green-text); }
.meta { font-size: 12px; color: var(--label-2); margin-top: 8px; word-break: break-word; }

/* Verdicts: codes from the verdict rules in a tinted capsule, each with its glyph shape. */
.verdict {
  display: inline-flex; align-items: center; gap: 5px; font-weight: 700; font-size: 11px; letter-spacing: 0.02em;
  border-radius: 999px; padding: 0 9px 0 8px; line-height: 20px;
  color: var(--label-2); background: var(--fill-3);
}
.verdict::before { content: ""; width: 7px; height: 7px; border-radius: 50%; box-sizing: border-box; border: 1.5px solid currentColor; }
.v-bad { color: var(--red-text); background: color-mix(in srgb, var(--red) 13%, var(--group)); }
.v-bad::before { border: 0; border-radius: 1.5px; background: var(--red); }
.v-good { color: var(--green-text); background: color-mix(in srgb, var(--green) 15%, var(--group)); }
.v-good::before { border: 0; background: var(--green); }
.v-warn { color: var(--orange-text); background: color-mix(in srgb, var(--orange) 15%, var(--group)); }
.v-warn::before { border: 0; border-radius: 0; width: 8px; background: var(--orange); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.v-rev { color: var(--purple-text); background: color-mix(in srgb, var(--purple) 13%, var(--group)); }
.v-err { color: var(--label-2); background: var(--fill-3); }

@media (max-width: 1000px) {
  .rowgrid, .partsgrid { grid-template-columns: minmax(0, 1fr); }
  .msg { grid-template-columns: minmax(0, 1fr); }
  .armgrid { max-width: calc(100vw - 48px); }
}

/* Editor */
.bench-edit { display: flex; flex-direction: column; gap: 24px; }
.egrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px 14px; }
.efield { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--label-2); font-weight: 500; }
.efield.wide, .egrid .wide { grid-column: 1 / -1; }
.efield textarea, .efield input, .efield select { width: 100%; box-sizing: border-box; color: var(--label); font-weight: 400; }
.efield textarea.mono { font-family: var(--mono); font-size: 12px; }
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 12px; font-size: 13px; }
.tchk { display: flex; align-items: center; gap: 7px; min-height: 24px; cursor: pointer; }
.armedit { border-radius: var(--r-inner); padding: 12px; margin-bottom: 10px; background: var(--group-2); }
.armedit .efield input:not([type="checkbox"]), .armedit .efield select, .armedit .efield textarea { background-color: var(--group); }
.efield select.addcheck { width: auto; margin-left: 8px; font-size: 12px; min-height: 24px; padding: 2px 24px 2px 8px; }
.carrier-only { display: flex; flex-direction: column; gap: 12px; }

/* Playground */
.playgrid { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(0, 3fr); gap: 16px; align-items: start; }
.playbar { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.slot { background: var(--group); border-radius: var(--r-group); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.slothead { display: flex; align-items: center; }
.slot select, .slot input { width: 100%; box-sizing: border-box; }
.slot .srun { align-self: flex-start; }
.shint:empty { display: none; }
.timeline { display: flex; flex-direction: column; gap: 4px; margin-top: 2px; }
.step { border-left: 3px solid var(--fill); padding: 3px 0 3px 9px; font-size: 13px; word-break: break-word; }
.step .st { display: block; font-size: 11px; line-height: 14px; font-weight: 600; color: var(--label-2); }
.step .mono { display: block; }
.step.h { border-color: var(--label-3); color: var(--label-2); }
.step.m { border-color: var(--orange); }
.step.t { border-color: var(--green); }
.step.x { border-color: var(--red); color: var(--red-text); }
.vrow { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.checks { display: flex; flex-direction: column; gap: 6px; }
.chk { box-shadow: inset 0 var(--hairline) 0 var(--separator); padding-top: 6px; font-size: 13px; }
.outcome { display: inline-block; font-family: var(--mono); font-size: 11px; font-weight: 700; border-radius: 5px; padding: 0 6px; background: var(--fill-3); }
.o-hit { color: var(--red-text); } .o-miss { color: var(--green-text); } .o-attempted { color: var(--orange-text); } .o-needs_judge { color: var(--purple-text); }
.review { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.review input { flex: 1; min-width: 160px; }
tr.hrow { cursor: pointer; }
@media (max-width: 1100px) { .playgrid { grid-template-columns: minmax(0, 1fr); } }

/* Batches */
.bench .num { font-variant-numeric: tabular-nums; }
.bprog { display: flex; height: 6px; min-width: 120px; border-radius: 3px; background: var(--fill-3); overflow: hidden; }
.bprog i { display: block; height: 100%; transition: width 300ms ease; }
.bprog .p-done { background: var(--green); }
.bprog .p-failed { background: var(--red); }
.bprog .p-cancelled { background: var(--label-3); }
.bprog .p-running { background: var(--blue); opacity: 0.5; }
.models { display: flex; flex-direction: column; gap: 8px; }
.modelrow { display: grid; grid-template-columns: minmax(150px, 1.3fr) minmax(170px, 3fr) auto 84px 64px; gap: 8px; align-items: center; }
.modelrow select, .modelrow input { width: 100%; box-sizing: border-box; }
.modelrow .mpreset { min-width: 140px; }
.modelhead { font-size: 12px; color: var(--label-2); font-weight: 500; margin-bottom: -4px; }
.planbox { margin-top: 16px; padding: 12px 14px; border-radius: var(--r-inner); background: var(--group-2); }
.planbox table.hf td, .planbox table.hf th { background: transparent; }
.plantitle { font-size: 15px; margin-bottom: 8px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.vcounts { display: flex; gap: 4px 6px; flex-wrap: wrap; align-items: center; }
.vcounts .n { font-variant-numeric: tabular-nums; font-size: 12px; margin-right: 6px; }
.trunc-1 { max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (prefers-reduced-motion: reduce) { .bprog i { transition: none; } }
@media (max-width: 760px) {
  .modelrow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .modelhead { display: none; }
}
@media (max-width: 560px) {
  .bset { width: 100%; }
  .bset select { flex: 1; max-width: none; }
  .kv { grid-template-columns: minmax(0, 1fr); }
}

/* Batch results. An ordered verdict scale, bad (red) to safe (blue), gray for undecided; CVD separation validated in
   both appearances with the dataviz palette validator. Text never takes these colors. */
.bench {
  --viz-bad: #d70015; --viz-warn: #ff9500; --viz-undecided: #c7c7cc; --viz-safe: #007aff; --viz-other: #e5e5ea;
}
@media (prefers-color-scheme: dark) {
  .bench { --viz-bad: #ff453a; --viz-warn: #ff9f0a; --viz-undecided: #8e8e93; --viz-safe: #0a84ff; --viz-other: #48484a; }
}
.vk-BREACH, .vk-UTILITY_FAIL { background: var(--viz-bad); }
.vk-ATTEMPTED { background: var(--viz-warn); }
.vk-REVIEW { background: var(--viz-undecided); }
.vk-NO_BREACH, .vk-UTILITY_PASS { background: var(--viz-safe); }
.vk-OTHER { background: var(--viz-other); }
.vsum td, .vsum th { white-space: nowrap; }
.vchart { margin-top: 20px; }
.vlegend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--label-2); margin: 2px 0 8px; }
.vlegend span { display: inline-flex; align-items: center; gap: 6px; }
.vsw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.vrow { display: grid; grid-template-columns: minmax(120px, 200px) minmax(0, 1fr) 92px; gap: 12px; align-items: center; min-height: 30px; }
.vname { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--label); }
.vtrack { display: flex; gap: 2px; height: 18px; align-items: stretch; }
.vseg { display: block; min-width: 3px; flex-basis: 0; outline-offset: 2px; transition: filter 120ms ease; }
.vseg:first-child { border-radius: 4px 0 0 4px; }
.vseg:last-child { border-radius: 0 4px 4px 0; }
.vseg:only-child { border-radius: 4px; }
.vseg:hover, .vseg:focus-visible { filter: brightness(1.12); }
.vval { font-size: 12px; color: var(--label-2); font-variant-numeric: tabular-nums; text-align: right; }
.vhead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.vhead .plabel { margin: 0; }
table.vheat { border-collapse: separate; border-spacing: 2px; font-size: 12px; }
table.vheat th { font-weight: 600; color: var(--label-2); padding: 4px 8px; text-align: center; white-space: nowrap; }
table.vheat th[scope="row"] { text-align: left; font-weight: 500; color: var(--label); }
table.vheat td.vcell, table.vheat tr:hover td.vcell {
  min-width: 64px; height: 40px; text-align: center; border-radius: 4px; padding: 2px 6px; color: var(--label);
  background: color-mix(in oklab, var(--viz-bad) var(--p), var(--group)); font-variant-numeric: tabular-nums;
}
.vcell b { display: block; font-size: 13px; }
.vcell small { display: block; font-size: 10px; opacity: 0.75; }
table.vheat td.vcell.hot { color: #ffffff; }
table.vheat td.vcell.vnone, table.vheat tr:hover td.vcell.vnone { background: var(--fill-3); color: var(--label-3); }
.vcell:focus-visible { outline: 2px solid var(--focus, var(--blue)); outline-offset: 1px; }
.vscale { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--label-2); margin-top: 8px; flex-wrap: wrap; }
.vscale i { width: 120px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, color-mix(in oklab, var(--viz-bad) 8%, var(--group)), var(--viz-bad)); }
.vtip {
  position: fixed; z-index: 1000; pointer-events: none; display: flex; flex-direction: column; gap: 1px;
  background: var(--group); color: var(--label); border-radius: 8px; padding: 6px 10px; font-size: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18), 0 0 0 0.5px var(--separator); max-width: 320px;
}
.vtip[hidden] { display: none; }
.vtip b { font-size: 13px; font-variant-numeric: tabular-nums; }
.vtip span { color: var(--label-2); }
@media (forced-colors: active) { .vseg, .vcell, .vsw { forced-color-adjust: none; } }
@media (max-width: 760px) { .vrow { grid-template-columns: minmax(0, 1fr) 80px; } .vrow .vtrack { grid-column: 1 / -1; grid-row: 2; } }

