/* Shared parts: tabs, diagrams, cards and forms, segments, rows, status chips, datasets and pickers. */
/* Tabs inside a card (the pipeline editor). */
.tabbar { display: flex; gap: var(--s0); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabbar button { min-height: 0; background: none; border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: var(--s2) var(--s3); color: var(--dim); white-space: nowrap; }
.tabbar button:hover { color: var(--text); background: none; }
.tabbar button.on { color: var(--text); border-bottom-color: var(--link); }
.page-tabs button { font-size: var(--fs-l); padding: var(--s2) var(--s4); }
.tabrow { display: flex; align-items: center; gap: var(--s3); border-bottom: 1px solid var(--line); }
.tabrow > .tabbar { flex: 1; min-width: 0; border-bottom: 0; }
.tabrow > .page-version { flex: none; min-width: 140px; max-width: 45%; }
.pl-col[hidden] { display: none; }
.tabpanel { display: flex; flex-direction: column; gap: var(--s3); padding-top: 4px; }
.tabpanel[hidden] { display: none; }
.steps { display: flex; flex-direction: column; gap: var(--s2); }
.jsteps-list { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: var(--s0); }
dl.meta a { text-decoration: none; }
dl.meta a:hover { text-decoration: underline; }
/* A pipeline as a diagram, left to right: input → steps → output; parallel
   steps fork into lanes stacked top to bottom and join again. Edges are
   drawn in CSS: a line (and arrowhead) to the left of every item after the first. */
.flow { display: flex; align-items: center; overflow-x: auto; padding: var(--s3) var(--s0) var(--s3); --edge: #4a535a; }
.flow > *, .flow-lane > .flow-node { position: relative; flex: none; }
.flow > *, .flow-lane > .flow-node { --gap: 30px; }
.flow > .flow-add, .flow > .flow-add + * { --gap: 12px; }   /* the editor's + sits on the edge between two blocks */
.flow > * + *, .flow-lane > .flow-node + .flow-node { margin-left: var(--gap); }
.flow > * + *::before, .flow-lane > .flow-node + .flow-node::before {
    content: ''; position: absolute; right: 100%; top: calc(50% - 1px); width: var(--gap); border-top: 2px solid var(--edge); }
.flow > * + :not(.flow-par):not(.flow-add)::after, .flow-lane > .flow-node + .flow-node::after {
    content: ''; position: absolute; right: 100%; top: calc(50% - 5px); border: 5px solid transparent; border-right: 0; border-left: 6px solid var(--edge); }
.flow-end { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--edge); display: grid; place-items: center;
    font-size: var(--fs-xs); color: var(--dim); text-transform: uppercase; letter-spacing: .04em; }
.flow-node { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); padding: var(--s2) var(--s2); width: 190px;
    display: flex; flex-direction: column; gap: var(--s1); font-size: var(--fs-m); }
.flow-node .n { color: var(--dim); font-size: var(--fs-xs); }
.flow-node .help { font-size: var(--fs-xs); overflow-wrap: anywhere; }
.flow-node a { text-decoration: none; font-weight: 600; }
.flow-node a:hover { text-decoration: underline; }
.flow-node.good { border-color: var(--good-line); }
.flow-node.bad { border-color: var(--bad-line); }
.flow-node.busy { border-color: var(--busy-line); }
.flow-node.warn { border-color: var(--warn-line); }
.flow-node .top { display: flex; align-items: center; gap: var(--s2); }
/* An execution's diagram: each node by where its step stands. */
.flow-node.live { border-width: 2px; padding: var(--s2) var(--s2); }
.flow-node.live[role=button] { cursor: pointer; }
.flow-node.live[role=button]:hover { background: var(--raised); }
.flow-node.sel { outline: 2px solid var(--link); outline-offset: 2px; }
.ph-wait { border-color: var(--line); border-style: dashed; }
.flow-node.ph-wait { opacity: .8; }
.ph-run { border-color: var(--accent); }
.flow-node.ph-run { animation: ph-pulse 1.6s ease-in-out infinite; }
@keyframes ph-pulse { 50% { box-shadow: 0 0 0 4px rgba(91, 141, 239, .25); } }
@media (prefers-reduced-motion: reduce) { .flow-node.ph-run { animation: none; } }
.ph-done { border-color: var(--pass); }
.ph-review { border-color: var(--warn); }
.ph-fail { border-color: var(--fail); }
.ph-stop { border-color: #5c656c; }
.flow-node.ph-stop { opacity: .7; }
.chip.ph-wait { background: #2a2a2a; color: var(--dim); }
.chip.ph-run { background: #1d2c47; color: #8db4f7; }
.chip.ph-done { background: var(--good-bg); color: var(--good-text); }
.chip.ph-review { background: #44361a; color: var(--warn-text); }
.chip.ph-fail { background: var(--bad-bg); color: var(--bad-text); }
.chip.ph-stop { background: #2a2a2a; color: var(--dim); }
.copyable { cursor: copy; }
.ex-head .meta.mono { font-size: var(--fs-xs); }
.step-detail { display: flex; flex-direction: column; gap: var(--s2); padding-top: 10px; border-top: 1px solid var(--line); }
.jobs { display: flex; flex-direction: column; gap: var(--s2); }
.jobs .rowline.on { background: var(--raised); }
.flow-node .top .grow { flex: 1; }
.flow-par { display: flex; flex-direction: column; }
.flow-lanes { display: flex; flex-direction: column; }
.flow-lane { display: flex; align-items: center; position: relative; padding: var(--s2) 26px; }   /* 26px: the width of its fork and join lines */
.flow-fill { flex: 1; min-width: 8px; border-top: 2px solid var(--edge); }
.flow-lane::before, .flow-lane::after { content: ''; position: absolute; top: 0; bottom: 0; width: 26px; border: 0 solid var(--edge);
    background: linear-gradient(var(--edge), var(--edge)) 0 calc(50% - 1px) / 100% 2px no-repeat; pointer-events: none; }
.flow-lane::before { left: 0; border-left-width: 2px; }
.flow-lane::after { right: 0; border-right-width: 2px; }
.flow-lane:first-child::before, .flow-lane:first-child::after { top: calc(50% - 1px); background: none; border-top-width: 2px; }
.flow-lane:last-child::before, .flow-lane:last-child::after { bottom: calc(50% - 1px); background: none; border-bottom-width: 2px; }
.flow-lane:first-child::before { border-top-left-radius: 10px; }
.flow-lane:first-child::after { border-top-right-radius: 10px; }
.flow-lane:last-child::before { border-bottom-left-radius: 10px; }
.flow-lane:last-child::after { border-bottom-right-radius: 10px; }
.flow-lane:only-child::before, .flow-lane:only-child::after { top: 0; bottom: 0; border-width: 0; border-radius: 0;
    background: linear-gradient(var(--edge), var(--edge)) 0 calc(50% - 1px) / 100% 2px no-repeat; }
/* the editor: a parallel group has a head and a foot of the same height, so its lanes stay centred on the edges */
.flow-par.editing { background: rgba(255,255,255,.025); border-radius: 10px; }
.flow-par .par-head, .flow-par .par-foot { display: flex; align-items: center; gap: var(--s1); min-height: 28px; padding: 0 var(--s2); font-size: var(--fs-s); color: var(--dim); }
.flow-par .par-head .grow { flex: 1; }
.flow-par .par-foot { justify-content: center; }
.flow-node.edit { width: 180px; }
.flow-node.edit select, .flow-node.edit .vpick { width: 100%; }
.flow-node.edit .step-btns { gap: var(--s0); opacity: .45; transition: opacity .15s; }
.flow-node.edit:hover .step-btns, .flow-node.edit:focus-within .step-btns, .par-head:hover .step-btns { opacity: 1; }
.flow-node.edit .step-btns button, .par-head .step-btns button { padding: 0 var(--s2); min-height: 22px; font-size: var(--fs-xs); }
.flow button.flow-add { flex: none; border-radius: 50%; width: 26px; height: 26px; min-height: 26px; padding: 0; }
.flow-lane > .flow-add { margin-left: 10px; }
.popover.plus-pop { width: 250px; }
.plus-pop button { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s0); }
.plus-pop button .help { font-size: var(--fs-xs); }
.plus-pop button[disabled] { opacity: .5; cursor: not-allowed; }
.plus-pop button[disabled]:hover { background: none; }
.card.focus { outline: 2px solid var(--link); outline-offset: 2px; }
.vpick-btn { width: 100%; text-align: left; background-color: #1a1e22; padding: var(--s1) var(--s2); font-weight: 400; font-size: var(--fs-m); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vpick-btn, .vpick-list button { color: var(--text); }
.f .vpick-pop { left: 0; right: 0; }   /* in a form: as wide as its field */
.popover.vpick-pop { min-width: 280px; max-width: calc(100vw - 32px); gap: var(--s1); }
.vpick-list button { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vpick-list { display: flex; flex-direction: column; }
.popover .vpick-list button.on { background: var(--raised); }
.vpick-foot { padding: var(--s0) var(--s3) var(--s1); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: var(--s2); }
fieldset:disabled { opacity: .55; }
.note { padding: var(--s2) var(--s3); border: 1px solid var(--line); border-radius: 6px; background: var(--raised); font-size: var(--fs-m); color: #c9cfd2; }
.files { display: flex; flex-direction: column; gap: var(--s0); font-size: var(--fs-m); }
.files a { text-decoration: none; }
input[type=file] { font-size: var(--fs-m); color: var(--dim); }

/* Sections. A .card is a section with a heading: the same heading and padding on every page. */
.card { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius-l); min-width: 0; }
.card > h2 {
    font-size: var(--fs-l); font-weight: 600; margin: 0; padding: 14px var(--s4) 0;
    display: flex; gap: var(--s2); justify-content: space-between; align-items: center; flex-wrap: wrap;
}
.card > h2 a { font-size: var(--fs-s); font-weight: 400; text-decoration: none; }
.card > .body { padding: var(--s3) var(--s4) var(--s4); display: flex; flex-direction: column; gap: var(--s3); }
.card > .body:first-child { padding-top: var(--s4); }
/* facts(): label and value pairs, one look everywhere: dim labels in one column. */
dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--s2) var(--s5); margin: 0; }
dt { color: var(--dim); font-size: var(--fs-s); padding-top: 1px; }
dd { margin: 0; overflow-wrap: anywhere; min-width: 0; }
dd.mono, dd .mono { color: #c9cfd2; }

/* A form with one job (Create or Upload a LoRA, Contact) is as wide as it needs to be, not the page. */
#lora-new > .card, #lora-upload > .card, #contact-page > .card { max-width: 760px; }

/* menuButton(): a named button with ▾; its menu scrolls when long. */
.menu-btn::after { content: ''; display: inline-block; width: 12px; height: 12px; margin-left: 6px; vertical-align: -1px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' stroke='%239aa3a9' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center; }
.menu-btn.primary::after { filter: brightness(2.2); }
.popover.menu-pop { max-height: min(360px, 60vh); overflow-y: auto; min-width: 220px; }
/* checkMenu: a dropdown of checkboxes, All first */
.popover.check-pop { min-width: 200px; max-height: min(360px, 60vh); overflow-y: auto; padding: var(--s1); }
.popover.check-pop .check-row { display: flex; align-items: center; gap: var(--s2); padding: 6px 10px; border-radius: 6px; cursor: pointer; }
.popover.check-pop .check-row:hover { background: var(--raised); }
.popover.check-pop .check-row:first-child { border-bottom: 1px solid var(--line); border-radius: 0; margin-bottom: 2px; }
.popover.menu-pop button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; }

/* emptyState(): an empty list says what it is for and how to start. */
.empty-state { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s2); padding: var(--s5) var(--s4); }
.empty-state b { font-size: var(--fs-l); font-weight: 600; }
.empty-state p { margin: 0; max-width: 60ch; }
.empty-state .row { margin-top: var(--s1); }

/* A heading inside a section (a judge's Recent runs, Top datasets): its link at the right. */
h2.section { font-size: var(--fs-l); font-weight: 600; margin: var(--s3) 0 0; display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); }
h2.section:first-child { margin-top: 0; }
.more-link { font-size: var(--fs-s); font-weight: 400; }

/* pageHead(): a list page's help line over its toolbar. detailHead(): one thing's page. */
.phead { display: flex; flex-direction: column; gap: var(--s3); }
.phead .help { margin: 0; max-width: 72ch; font-size: var(--fs-s); flex: 1 1 320px; }
.phead .toolbar { align-items: center; }
.dhead { display: flex; flex-direction: column; gap: var(--s3); padding: var(--s2) 0 var(--s2); min-width: 0; }
.dhead-top { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); }
.dhead h1 { margin: 0; font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -.01em; overflow-wrap: anywhere; }
.dhead h1 a { color: inherit; text-decoration: none; }
.dhead h1 a:hover { text-decoration: underline; }
.dhead-actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: var(--s2); }
.dhead-actions > .menu-wrap > button.small { min-height: var(--control-h); }   /* a ⋯ beside full-size buttons is as tall as they are */
.dhead-about { color: var(--dim); overflow-wrap: anywhere; }
.dhead .help { margin: 0; }
form { display: flex; flex-direction: column; gap: var(--s2); }
.f { display: flex; flex-direction: column; gap: var(--s1); font-size: var(--fs-s); color: var(--dim); }
.f .req { color: var(--warn); }
label.check { display: flex; gap: var(--s2); align-items: center; font-size: var(--fs-m); color: var(--text); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--s2); }
.grid2 > *, .grid3 > * { min-width: 0; }   /* a long choice clips in its field, never widens the page */
.checks { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); }
details > summary { cursor: pointer; color: var(--dim); font-size: var(--fs-s); }
details[open] > summary { margin-bottom: 8px; }
.cmd {
    background: var(--bg); border: 1px dashed var(--line); border-radius: 6px; padding: var(--s2);
    white-space: pre-wrap; overflow-wrap: anywhere; cursor: copy;
}
.cmd.err { color: var(--bad-text); border-color: var(--bad-line); cursor: default; }
.lora-row { display: grid; grid-template-columns: 1fr 72px auto; gap: var(--s2); }
/* Create a LoRA: one box per pair set. */
.pair-sets { display: flex; flex-direction: column; gap: var(--s3); }
.pair-set { border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s3); display: flex; flex-direction: column; gap: var(--s2); }
.pair-set > .head { display: flex; align-items: center; gap: var(--s2); }
.pair-set > .head > b { flex: 1; }
.pair-set.solo { border: 0; padding: 0; }   /* one instruction: no box, no number */
.loras { display: flex; flex-direction: column; gap: var(--s2); }

/* One segmented control for every set of choices. */
.seg { display: inline-flex; flex-wrap: wrap; gap: var(--s0); padding: var(--s0); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; align-self: flex-start; }
.seg button { min-height: 28px; background: none; border: 0; border-radius: 6px; padding: var(--s1) var(--s3); font-size: var(--fs-m); color: var(--dim); }
.seg button:hover { background: var(--raised); color: var(--text); }
.seg button.on { background: var(--sel); color: var(--text); }

/* A list's skeleton while its data loads (skeletonRows, skeletonTable). */
.bone { display: inline-block; height: .8em; max-width: 100%; border-radius: 4px; vertical-align: middle;
    background: linear-gradient(90deg, var(--raised) 25%, var(--hover) 50%, var(--raised) 75%); background-size: 200% 100%; animation: bone 1.4s ease-in-out infinite; }
.skeleton .rowline { min-height: 41px; }
.toolbar .bone { height: 28px; border-radius: 6px; }
@keyframes bone { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .bone { animation: none; } }

/* One row style for every list: pipelines, executions, jobs, LoRAs. */
.rows { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
/* Inside a card the card is the box: a list there draws only its row lines. */
.card .rows { border: 0; border-radius: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rows > .empty-row { padding: var(--s3) var(--s3); color: var(--dim); font-size: var(--fs-m); }
.rowitem { border-bottom: 1px solid var(--line); }
.rowitem:last-child { border-bottom: 0; }
.rowline { display: flex; gap: var(--s2); align-items: center; padding: var(--s2) var(--s3); color: var(--text); text-decoration: none; min-width: 0; }
a.rowline, .rowline.click { cursor: pointer; }
a.rowline:hover, .rowline.click:hover { background: var(--raised); }
.rowitem.open { background: var(--sel); }
.rowitem.current > .rowline { background: var(--sel); }
.rowline .title { font-weight: 600; white-space: nowrap; }
.rowline .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rowline .meta { color: var(--dim); font-size: var(--fs-s); white-space: nowrap; }
.rowline .when { flex: none; }
.rowdetail { display: flex; flex-direction: column; gap: var(--s2); padding: 0 var(--s3) var(--s3); flex-basis: 100%; }
.rowdetail:empty { display: none; }
.rowitem { display: flex; flex-wrap: wrap; align-items: center; }
.rowitem > .rowline { flex: 1; }
.row-actions { display: flex; gap: var(--s1); align-items: center; padding-right: var(--s3); }
.rowline .lead img { width: 32px; height: 32px; object-fit: cover; border-radius: 4px; display: block; background: var(--img-bg); }
.rowline .lead .none { display: block; width: 32px; height: 32px; border-radius: 4px; border: 1px dashed var(--line); }
.list { display: flex; flex-direction: column; gap: var(--s2); }
/* colList(): rows in columns. Each row is one grid (--cols); the name sits over a line of what it is. */
.clist { display: flex; flex-direction: column; border: 1px solid var(--line-soft); border-radius: var(--radius-l); overflow: hidden; background: #1a1e22; }
.crow { display: grid; grid-template-columns: var(--cols); column-gap: var(--s5); align-items: center; padding: 0 20px; min-height: 64px;
    border-top: 1px solid #262c31; color: var(--text); text-decoration: none; }
.crow:first-child, .chead + .crow { border-top: 0; }
a.crow:hover { background: #20262a; }
.chead { min-height: 40px; color: var(--dim); font-size: var(--fs-s); background: #181c20; border-bottom: 1px solid var(--line-soft); }
.crow .who { display: flex; align-items: center; gap: var(--s3); min-width: 0; padding: var(--s3) 0; }
.crow .who[style*="--depth"] { padding-left: calc(var(--depth) * 28px); }
.crow.nested { background: #171a1d; }
.crow .twist { width: 24px; height: 24px; min-height: 0; padding: 0; flex: none; border: 0; background: none; color: var(--dim); font-size: 12px; line-height: 1; border-radius: var(--radius-s); }
.crow .twist:hover { color: var(--text); background: #20262a; }
.crow .twist[aria-expanded="true"] span { display: inline-block; transform: rotate(90deg); }
.crow span.twist { visibility: hidden; }
.crow .lines { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.crow .lead img, .crow .lead .none { width: 40px; height: 40px; object-fit: cover; border-radius: var(--radius-s); display: block; background: var(--img-bg); flex: none; }
.crow .lead .none { border: 1px dashed var(--line); background: none; }
/* A dataset folder (datasets.js): a folder's shape drawn in CSS, the size of a dataset's cover. */
.crow .lead .folder-ico { width: 40px; height: 40px; display: block; flex: none; position: relative; }
.crow .lead .folder-ico::before { content: ''; position: absolute; left: 4px; top: 8px; width: 14px; height: 6px; border-radius: 3px 3px 0 0; background: var(--dim); }
.crow .lead .folder-ico::after { content: ''; position: absolute; left: 4px; right: 4px; top: 12px; bottom: 8px; border-radius: var(--radius-s); background: var(--dim); opacity: .75; }
nav.crumbs { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; margin: 0 0 var(--s2); font-size: var(--fs-m); }
.share-row { gap: var(--s2); align-items: center; margin-top: var(--s1); flex-wrap: nowrap; }
.share-row select { width: auto; flex: none; }
.share-row button { flex: none; }
.share-row .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.share-row input[name=share-with] { flex: 1; min-width: 0; }
.share-row .grow .chip { margin-left: var(--s2); }
.crow.block a.name { color: var(--text); }
.crow .cell a { color: var(--link); }
.crow .cell a.chip { color: #aeb6bb; }
.crow .cell a.chip:hover { color: var(--text); text-decoration: none; border-color: #4a535a; }
.crow.block .go { visibility: hidden; }
.crow .cell .chip + .meta { margin-left: 6px; }
.crow .name { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crow .sub { color: var(--dim); font-size: var(--fs-s); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crow .cell { min-width: 0; max-width: 100%; color: #c9cfd2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; justify-self: start; }
.crow .cell.end { justify-self: end; color: var(--dim); font-size: var(--fs-s); font-variant-numeric: normal; }
.crow .cell .dim, .crow .cell.dim { color: var(--faint); }
.crow .name .dim { color: var(--dim); font-weight: 500; }
.crow .go { color: var(--faint); font-size: 18px; line-height: 1; justify-self: end; }
.clist > .empty-row { padding: var(--s3); color: var(--dim); }
.clist.skeleton .lines { gap: var(--s2); }
table.data { width: 100%; border-collapse: collapse; font-size: var(--fs-m); }
table.data th { text-align: left; color: var(--dim); font-weight: 500; font-size: var(--fs-s); white-space: nowrap; }
table.data th, table.data td { padding: var(--s2) var(--s3); border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data td { overflow-wrap: anywhere; }
table.data tr.current td { background: var(--sel); }
table.data td .chip { white-space: nowrap; }
button.more { align-self: center; }
.pager { display: flex; flex-wrap: wrap; gap: var(--s1); align-items: center; justify-content: center; margin-top: var(--s3); }
.pager button.on { background: var(--sel); color: var(--text); border-color: transparent; opacity: 1; }
/* The Datasets table: a cover beside each name, its pipelines as chips. */
table.data.datasets td { vertical-align: top; padding-top: var(--s3); padding-bottom: var(--s3); }
table.data.datasets .ds-name { display: flex; gap: var(--s3); align-items: center; font-weight: 600; color: inherit; text-decoration: none; }
table.data.datasets .ds-name:hover span { text-decoration: underline; }
table.data.datasets .ds-name img, table.data.datasets .ds-name .none { width: 40px; height: 40px; object-fit: cover; border-radius: 4px; flex: none; background: var(--img-bg); }
table.data.datasets .ds-name .none { display: block; border: 1px dashed var(--line); background: none; }
table.data.datasets td:nth-child(2), table.data.datasets td:nth-child(6) { white-space: nowrap; }
table.data.datasets td:first-child { min-width: 240px; }
table.data.datasets td:nth-child(5) { max-width: 300px; }
table.data.datasets .chips { display: flex; flex-wrap: wrap; gap: var(--s1); }
table.data.datasets .help { margin-top: 2px; }
.toolbar { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
input[type=search].search { width: 220px; max-width: 100%; min-height: var(--control-h); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s1) var(--s2); }

/* Chips, two kinds. A plain .chip is a tag: outlined, for a version, a base model, a role, a type.
   A toned chip (.good, .bad, .busy, .warn) is a status: filled, with a dot, from one vocabulary
   (status.js: run statuses, scores). Anything else is plain text in the row, not a chip. */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 20px; font-size: var(--fs-xs); font-weight: 500; padding: 0 6px;
    border: 1px solid var(--line); border-radius: var(--radius-s); background: none; color: #aeb6bb; white-space: nowrap; text-decoration: none; vertical-align: middle;
    font-variant-numeric: normal; }
.chip.good, .chip.bad, .chip.busy, .chip.warn, .chip.idle { height: 22px; padding: 0 8px; border: 0; border-radius: 999px; font-weight: 600; }
.chip.good::before, .chip.bad::before, .chip.busy::before, .chip.warn::before, .chip.idle::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.chip.good { background: var(--good-bg); color: var(--good-text); }
.chip.bad { background: var(--bad-bg); color: var(--bad-text); }
.chip.busy { background: var(--busy-bg); color: var(--busy-text); }
.chip.warn { background: var(--warn-bg); color: var(--warn-text); }
.chip.idle { background: var(--idle-bg); color: var(--idle-text); }

/* Datasets and pickers */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: var(--s1); }
.thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; display: block; background: var(--img-bg); }
/* An image that couldn't load (components/broken-image.js): the placeholder, whole, with why in its title. */
img.img-broken { object-fit: contain; background: var(--img-bg); cursor: help; }
.thumbs.pick { grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); }
.thumbs.pick img { cursor: pointer; border: 2px solid transparent; opacity: .6; }
.thumbs.pick img.on { border-color: var(--link); opacity: 1; }
.thumbs.strip { grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); }
.thumbs.big { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: var(--s2); }
.ba { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s2); margin: var(--s2) 0; }
.ba .pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s0); }
.ba img, .ba video { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; display: block; background: var(--img-bg); }
/* An output with no input of its name: the output alone, as wide as a pair's half. */
.ba .pair.solo { grid-template-columns: 1fr; }
.ba .lbl { grid-column: 1 / -1; font-size: var(--fs-xs); opacity: .7; display: flex; justify-content: space-between; }
.review { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s3); margin: var(--s2) 0; }
.review .pair { border: 2px solid transparent; border-radius: 6px; padding: var(--s1); }
.review .pair.approved { border-color: var(--good-line); }
.review .pair.rejected { border-color: var(--bad-line); }
.review > .pair { cursor: pointer; }
.review > .pair:hover { background: var(--raised); }
.review > .pair .lbl a { color: inherit; }
.review .score-tag { font-variant-numeric: tabular-nums; padding: 0 var(--s1); border-radius: 3px; background: var(--raised); opacity: 1; }
.review .score-tag.low { background: var(--bad-bg); color: var(--bad-text); }
.scorebar { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.scorebar select { width: auto; max-width: 280px; }
.scorebar input[type=number] { width: 70px; }

/* Environments: a section each with its whole configuration; one turned off is dimmed. */
.env-cards { display: flex; flex-direction: column; gap: 0; }
.env-card { border-top: 1px solid var(--line-soft); padding: var(--s5) 0; display: flex; flex-direction: column; gap: var(--s3); min-width: 0; }
.env-card.off .env-facts, .env-card.off h3 { opacity: .6; }
.env-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); }
.env-actions { display: flex; align-items: center; gap: var(--s2); margin-left: auto; }
.env-head h3 { margin: 0; font-size: 18px; font-weight: 600; }
.env-card .meta { color: var(--dim); font-size: var(--fs-s); }
.env-card .mono { overflow-wrap: anywhere; }
.env-about { margin: 0; color: var(--dim); font-size: var(--fs-s); max-width: 72ch; }
.env-card h4 { margin: 0 0 var(--s1); font-size: var(--fs-m); font-weight: 600; }
.env-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); padding: var(--s1) 0; font-size: var(--fs-m); min-width: 0; }
.env-checks { border-top: 1px solid var(--line-soft); padding-top: var(--s3); }
.env-checks.bad h4 { color: var(--bad-text); }
.env-certs { border-top: 1px solid var(--line-soft); padding-top: var(--s3); display: flex; flex-direction: column; gap: var(--s2); }
.certs-foot { display: flex; flex-direction: column; gap: var(--s5); border-top: 1px solid var(--line-soft); padding-top: var(--s5); }

/* Groups of rows, opened to the rows under them: the Executions page's (executions.js: a
   pipeline's row, opened to its latest runs) and the Environments page's (certs.js: a token, opened to its workers). */
.ex-group .lead { width: 1em; color: var(--dim); }
.ex-group-open > .ex-group { background: var(--raised); }
.ex-group-runs { display: flex; flex-direction: column; }
.ex-group-runs > .rowitem > .rowline { padding-left: calc(var(--s3) + 1.5em); }
.ex-group-runs > .empty-row { padding: var(--s2) var(--s3) var(--s2) calc(var(--s3) + 1.5em); color: var(--dim); font-size: var(--fs-s); }
/* The Environments page's certificates as a file tree (certs.js): compact rows, a group a
   folder with a chevron, its rows indented under a guide line with a tick to each. */
.cert-tree { padding: var(--s1) 0; }
.cert-tree .rowitem { border-bottom: 0; position: relative; }
.cert-tree .rowline { padding-top: 3px; padding-bottom: 3px; min-height: 30px; }
.cert-tree .rowitem:hover { background: #20262a; }
.cert-tree .row-actions button { min-height: 24px; height: 24px; padding: 0 6px; }
.cert-tree .lead { display: inline-flex; align-items: center; gap: 4px; color: var(--dim); }
.cert-tree .tw { display: inline-block; width: 12px; text-align: center; font-size: 15px; line-height: 1; transition: transform .1s; }
.cert-tree .tw.on { transform: rotate(90deg); }
.cert-tree .ti { flex: none; }
.cert-group-rows, .cert-org-body { display: flex; flex-direction: column; margin-left: calc(var(--s3) + 6px); }
.cert-org-body > .rows { border: 0; border-radius: 0; padding: 0; }
/* Each row under a folder draws its own part of the guide: down past it (├), or, the last, only
   to its tick (└); an open folder's part runs past everything inside it. */
.cert-group-rows > *, .cert-org-body > .rows > * { position: relative; }
.cert-group-rows > *::before, .cert-org-body > .rows > *::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; border-left: 1px solid var(--line); pointer-events: none; }
.cert-group-rows > :last-child::before, .cert-org-body > .rows > :last-child::before { bottom: auto; height: 15px; }
.cert-group-rows > .rowitem::after, .cert-group-rows > .empty-row::after, .cert-org-body > .rows > .rowitem::after,
.cert-org-body > .rows > .cert-group-open > .rowitem::after { content: ''; position: absolute; left: 0; top: 15px; width: 8px; border-top: 1px solid var(--line); pointer-events: none; }
.cert-group-rows > .rowitem > .rowline, .cert-org-body > .rows > .rowitem > .rowline, .cert-org-body > .rows > .cert-group-open > .rowitem > .rowline { padding-left: var(--s3); }
.cert-group-rows > .empty-row { padding: 6px var(--s3); color: var(--dim); font-size: var(--fs-s); }
.cert-tree .tree-more .title { font-weight: 400; color: var(--dim); }
.cert-lists input[type=search].search { width: 300px; }   /* its placeholder whole: "Find a worker, environment or org" */
.cert-lists { display: flex; flex-direction: column; gap: var(--s2); }

/* A page's main list of rows (rowList/executionList with big): as tall and
   spaced as colList's, so LoRAs, Executions and Training read like Pipelines and Datasets. */
.list:has(> .rows.big) { gap: var(--s3); }
.rows.big { border-color: var(--line-soft); border-radius: var(--radius-l); background: #1a1e22; }
.rows.big .rowitem { border-bottom-color: var(--line-soft); }
.rows.big .rowline { min-height: 64px; padding: var(--s3) 20px; gap: var(--s3); }
.rows.big .rowline .title { font-size: 15px; }
.rows.big a.rowline:hover, .rows.big .rowline.click:hover { background: none; }
.rows.big .rowitem:has(> a.rowline:hover, > .rowline.click:hover) { background: #20262a; }
.rows.big > .ex-group-open:not(:last-child) { border-bottom: 1px solid var(--line-soft); }
.rows.big .row-actions { padding-right: 20px; }
.rows.big .ex-group-runs > .rowitem { background: #171a1d; border-top: 1px solid var(--line-soft); border-bottom: 0; }
.rows.big .ex-group-runs > .rowitem > .rowline { min-height: 52px; padding-left: calc(20px + 1em + var(--s3) + 28px); }
.rows.big .ex-group-runs > .empty-row { padding-left: calc(20px + 1em + var(--s3) + 28px); border-top: 1px solid var(--line-soft); }
.rows.big > .empty-row { padding: var(--s4) 20px; }
.rows.big.skeleton .rowline { min-height: 64px; }

/* filterPicker(): a list's filter. Unset, a button named for what it filters by;
   set, a pill with what it filters to, which removes the filter when clicked. */
.filter-pick { display: inline-flex; }
.filter-pick .vpick-btn { width: auto; }
.filter-pick .popover.vpick-pop { left: 0; right: auto; }
.filter-pill { display: inline-flex; align-items: center; gap: 6px; min-height: var(--control-h); max-width: 320px; padding: var(--s1) var(--s2) var(--s1) var(--s3);
    border-radius: 999px; background: var(--sel); border: 1px solid #3b5a86; color: var(--text); font-weight: 400; font-size: var(--fs-m); }
.filter-pill:hover { background: var(--hover); border-color: #4b6fa3; }
.filter-pill .k { color: var(--dim); white-space: nowrap; }
.filter-pill .v { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.filter-pill .x { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--dim); font-size: 15px; line-height: 1; }
.filter-pill:hover .x { color: var(--text); background: var(--raised); }
.filter-pill[hidden], .filter-pick > .vpick[hidden] { display: none; }
/* the admins' Queue page: a model's queue within its group's card */
.queue-part + .queue-part { margin-top: var(--s5); }
.queue-head { margin-bottom: var(--s2); flex-wrap: wrap; }

/* The acting org's credits below zero (main.js creditsBanner): at the top of every page. */
.credits-banner { margin: var(--s3) auto 0; max-width: 1180px; padding: var(--s2) var(--s3); border: 1px solid var(--warn-line);
    border-radius: 6px; background: var(--warn-bg); color: var(--warn-text); font-size: var(--fs-m); }
.credits-banner a { color: inherit; text-decoration: underline; }

/* Parts more than one page uses, once in the page files (judges.css, evals.css, pipelines.css: those load
   only on their own pages now, web/page.py). Kept in their old order. */
/* A parallel group's join (the step editors: pages/pipeline-edit.js, judge-edit.js). */
.flow-par .par-head select[data-js=join] { width: auto; min-height: 22px; padding: 0 var(--s1); font-size: var(--fs-xs); }
.flow-par .par-head input[data-js=join-min] { width: 82px; min-height: 22px; padding: 0 var(--s1); font-size: var(--fs-xs); }
/* Two versions side by side (a pipeline's, a LoRA's, an environment's, a review's). */
table.diff { border-collapse: collapse; font-size: var(--fs-m); width: 100%; }
table.diff th, table.diff td { padding: var(--s1) var(--s3) var(--s1) 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
table.diff th { color: var(--dim); font-weight: 500; }
table.diff td { word-break: break-word; }
/* A thumbnail's delete button; a run's data picker and its upload (pages/uploads.js). */
.thumb { position: relative; }
.thumb .del { position: absolute; top: 2px; right: 2px; padding: 0 var(--s2); font-size: var(--fs-xs); background: rgba(0,0,0,.6); border: 0; }
/* A file's ✕ shows on hover or focus; on touch screens, always. */
@media (hover: hover) { .thumb .del { opacity: 0; } .thumb:hover .del, .thumb:focus-within .del { opacity: 1; } }
.picker { display: flex; flex-direction: column; gap: var(--s2); }
.upload-new { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s2); border: 1px dashed var(--line); border-radius: 6px; }
.warn-note { color: var(--warn-text); }
table.diff { width: 100%; border-collapse: collapse; }
table.diff th { text-align: left; font-weight: normal; color: var(--dim); font-size: var(--fs-s); }
table.diff th, table.diff td { padding: var(--s1) var(--s2); border-bottom: 1px solid var(--line); white-space: normal; overflow-wrap: anywhere; vertical-align: top; }
.menu-wrap { position: relative; }
.popover {
    position: absolute; right: 0; top: calc(100% + 4px); z-index: 6; min-width: 190px; display: flex; flex-direction: column;
    background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: var(--s1); box-shadow: 0 6px 20px rgba(0,0,0,.5);
}
.popover[hidden] { display: none; }
.popover.floating { position: fixed; right: auto; z-index: 50; max-width: calc(100vw - 16px); }
#rail [hidden] { display: none; }
.rowline input[type=checkbox] { width: auto; margin: 0; }
.popover button { background: none; border: 0; text-align: left; border-radius: 6px; padding: var(--s2) var(--s3); }
.popover button:hover { background: var(--raised); }
.popover button.danger { color: var(--bad-text); }
/* The Executions page's base-model filter: as wide as the model it shows, not its longest option, so it
   doesn't widen (and push the filters after it) when its models arrive with the catalog. */
.model-filter { width: 13em; }
@supports (field-sizing: content) { .model-filter { width: auto; field-sizing: content; } }

/* A text model's answer in a grid (components/file-cell.js): its start, scrollable, picked like an image. */
pre.filetext { width: 280px; max-height: 240px; overflow: auto; margin: 0; padding: var(--s2);
    white-space: pre-wrap; word-break: break-word; font-size: var(--fs-xs); line-height: 1.4; border-radius: 4px;
    background: var(--img-bg); border: 2px solid transparent; }
.evalgrid td.pick pre.filetext { cursor: pointer; }
.evalgrid td.pick:hover pre.filetext { border-color: var(--busy-line); }
.evalgrid td.on pre.filetext { border-color: var(--pass); }
.evalgrid td.lost pre.filetext { opacity: .55; }
.ba pre.filetext { width: 100%; aspect-ratio: 1; max-height: none; }
/* An input with a × inside it, on the right (environments.js: a queue's field). */
.input-x { position: relative; }
.input-x input { width: 100%; padding-right: 36px; }
.input-x button { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); min-height: 0; padding: 2px 8px; line-height: 1; }
.queue-rows { display: flex; flex-direction: column; gap: var(--s3); }
.queue-rows:not(:empty) { margin: var(--s1) 0 var(--s3); }
/* An environment's models: a table by use and modality, each with its queue (environments.js usesBlock). */
.env-uses { display: flex; flex-direction: column; gap: var(--s2); min-width: 0; }
.env-uses-head { display: flex; align-items: baseline; gap: var(--s3); flex-wrap: wrap; }
.env-uses-head h4 { margin: 0; }
.env-uses-head .check { margin-left: auto; }
.env-uses table.data .mono { color: var(--dim); overflow-wrap: anywhere; }
.env-card.off .env-uses { opacity: .6; }
.env-uses table.data td:nth-child(-n+2), .env-uses table.data th:nth-child(-n+2) { white-space: nowrap; }   /* Use, Modality: one line */
