/* Collection Operations — the four subviews that extend the existing
 * Operations screen. Everything here is scoped so the legacy operations
 * panels (manual verification, sources, rounds, action history) keep their
 * exact look; only the new shapes are defined. Classes from the theme are
 * reused wherever they exist (opstable, opscards, opsalert, grouprow,
 * modeswitch, tablescroll, pill, opsline, opsnote, skeleton): this file
 * adds only what those cannot express.
 */

/* ---- Head panel: subview switch, window + refresh, freshness ---------- */
.colhead .modeswitch { flex-wrap: wrap; margin: 4px 0 12px; }
.coltools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 2px 0 4px; }
.colwindow { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.colwindow select { padding: 8px 10px; font-size: 13px; width: auto; }
.colhead #colrefresh { background: #fff; color: #33505f; border: 1px solid #cbd6dc; padding: 8px 13px; font-size: 13px; }
.colfresh { flex: 1 1 auto; text-align: right; min-width: 220px; }
.collegacyline { margin: 0 0 8px; }
.opsbrand-selector { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin: 0 0 12px; }
.opsbrand-selector label { color: var(--muted); font-size: 14px; }
.opsbrand-selector select { width: auto; min-width: 180px; padding: 8px 10px; }

/* ---- Legacy collection cutover banner (2026-09-26) --------------------
   Sits on top of every Operations subview once `collection.owner ===
   'crawlhub'`. `.opsalert` supplies the box; this only adds the button
   row's spacing and the icon queue/run-center labels rely on. */
.opsalert.legacycutover p { margin: 8px 0 0; }
.opsalert.legacycutover .button { display: inline-block; }
.residualstale { color: var(--muted); font-style: italic; }

/* ---- Group rows ---------------------------------------------------------
   The row is opened by a real <button> (keyboard reachable by default);
   the button is reset to look like the surrounding row text. */
.colgroup .groupopen {
  display: block; flex: 1 1 auto; min-width: 0; width: 100%;
  background: none; border: 0; padding: 0; margin: 0;
  color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.colgroup .groupopen:hover b, .colgroup .groupopen:focus-visible b { color: var(--accent); }
.colgroup .rowline { display: block; }
.colgroup .groupactions button { white-space: nowrap; }

/* Tone pills for collection states. The theme's base pill is deliberately
   neutral and legacy never defines warn/good; this view needs the
   distinction visible, and scoping it to #colroot leaves every other view
   (including the legacy operations panels) exactly as it was. */
#colroot .pill.good { background: #e7f6ee; border-color: #b8e2c6; color: #1c6b38; }
#colroot .pill.warn { background: #fff4d9; border-color: #f0dca8; color: #8a6100; }

/* ---- Inline group detail -----------------------------------------------
   An expanded panel under the group row, not a dialog: the keyword ×
   country matrix stays in reading flow and the page keeps its scroll. */
.coldetail {
  border-left: 3px solid var(--accent-soft);
  background: #fbfdfe; border-radius: 0 8px 8px 0;
  padding: 12px 16px; margin: 4px 0 10px;
}
.coldetail[hidden] { display: none; }
.coldetail h3.coldetailtitle { font-size: 15px; margin: 2px 0 6px; }
.coldetail h3.coldetailtitle:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.coldetail h4 { font-size: 13.5px; margin: 14px 0 6px; }
.coldetail .secondary { margin-top: 12px; }
#colroot .opstable td.num, #colroot .opstable th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---- Vocabulary and slice chips ---------------------------------------- */
.colchips { display: flex; flex-wrap: wrap; gap: 5px; margin: 4px 0 8px; }
.colselline { margin: 2px 0; }
.colselline .chip { display: inline-block; margin: 1px 0; }

/* ---- The intent matrix as a grid ---------------------------------------
   The backend returns one row per (keyword, country, engine, device,
   service) context, so a six-keyword, eight-country group printed 48 rows
   that differed in two columns. The grid puts the two configured axes on
   the two axes of a table: the same rows, one screen, no scrolling to find
   the failing pair. The row table is still one click away, and every cell
   says how many contexts it stands for. */
.colmatrixhead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.colmatrixhead .modeswitch { margin: 10px 0 4px; }
.colcountrytally { margin: 2px 0 10px; }

.colmatrixlegend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 4px 0 8px; font-size: 12.5px; color: var(--muted); }
.colmatrixkey { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.colmatrixkey b { color: var(--text-2); font-variant-numeric: tabular-nums; }
.colglyph {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 5px; flex: 0 0 auto;
  border: 1px solid var(--line); background: var(--panel-alt);
  /* The base `button` rule paints a primary button's white text; inside a
     cell that is white on white, so a tone-less glyph would vanish. */
  color: var(--text-2);
  font-size: 12px; line-height: 1;
}
.tone-good > .colglyph, .colcellbtn.tone-good .colglyph { background: #e7f6ee; border-color: #b8e2c6; color: #1c6b38; }
.tone-warn > .colglyph, .colcellbtn.tone-warn .colglyph { background: #fff4d9; border-color: #f0dca8; color: #8a6100; }
/* A placeholder for a keyword the rotation did not select: nothing was
   meant to run, so the cell is neither a warning nor a pass. Dashed and
   muted, distinct from the amber "?" of a pair that was meant to run and
   for which nothing was attributed. */
.colnotsel .colglyph, .colcellbtn.colnotsel .colglyph {
  background: transparent; border-style: dashed; border-color: var(--line); color: var(--muted);
}

/* The verdict sentence, and the pairs that keep it from being "all
   verified". Compact and tabular: one gap per line, keyword bold, the
   backend's own reason after it; a row selects its cell in the grid. */
.colverdict { margin: 6px 0 8px; font-size: 13.5px; color: var(--text-2); }
.colverdict p { margin: 0 0 3px; }
.colverdictdegenerate p:first-child { font-weight: 600; }
.colgaps { list-style: none; margin: 0 0 10px; padding: 0; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.colgaps li { margin: 0; padding: 0; border-top: 1px solid var(--line); }
.colgaps li:first-child { border-top: 0; }
.colgapbtn {
  display: block; width: 100%; text-align: left;
  background: none; border: 0; margin: 0; padding: 3px 6px;
  color: var(--text-2); font: inherit; line-height: 1.4; cursor: pointer; border-radius: 4px;
}
.colgapbtn:hover, .colgapbtn:focus-visible { background: var(--panel-alt); }
.colgapbtn b { color: var(--text); }
.colgapreason { color: var(--muted); }
.colgapsnone { margin: 4px 0 10px; }

/* One column per country: short codes, so the header may stay narrow and
   the keyword column takes the width it needs. */
#colroot .opstable.colmatrix { table-layout: auto; }
#colroot .opstable.colmatrix th.colmatrixcountry { text-align: center; white-space: nowrap; width: 62px; }
/* The row header is a captured keyword, not a label. `.opstable th` sets
   uppercase, letter-spacing and a muted grey for column headings; applied
   here it would print the collected term "im8 health" as "IM8 HEALTH",
   which is the one thing this view must never do to evidence. */
#colroot .opstable.colmatrix th.colmatrixkeyword {
  text-align: left; white-space: nowrap;
  text-transform: none; letter-spacing: normal;
  font-size: 13px; font-weight: 600; color: var(--text-2);
  position: sticky; left: 0; background: var(--panel); z-index: 1;
}
#colroot .opstable.colmatrix td.colmatrixcell { text-align: center; padding: 4px 6px; }
/* A pair the backend did not return: visible as an absence, never mistaken
   for an unfilled cell of a state it does have a glyph for. */
#colroot .colmatrixcell .colabsent {
  display: inline-block; width: 18px; height: 18px; line-height: 18px;
  border: 1px dashed var(--line); border-radius: 5px; color: var(--muted);
  font-size: 11px;
}
.colcellbtn {
  display: inline-flex; align-items: center; gap: 3px;
  background: none; border: 0; padding: 2px; margin: 0;
  color: var(--text-2); font: inherit; cursor: pointer; border-radius: 6px;
}
.colcellbtn:hover .colglyph { border-color: var(--accent); }
.colcellbtn[aria-pressed="true"] { outline: 2px solid var(--accent); outline-offset: 1px; }
.colcellcount { font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* The contexts behind one selected cell, opened under the grid rather than
   in a dialog: the grid stays visible while its detail is read. */
.colpairdetail { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin: 8px 0 4px; background: var(--panel); }
.colpairhead { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.colpairhead h5 { margin: 2px 0 6px; font-size: 13px; font-weight: 600; }

/* ---- Action queue: failures grouped by cause ---------------------------- */
.colcause { border-top: 1px solid #e6edf0; padding: 12px 0 6px; }
.colcause:first-of-type { border-top: 0; }
.colcause h3 { font-size: 14px; margin: 0 0 6px; display: flex; align-items: center; gap: 8px; }
.colcause h3 .pill { font-size: 11.5px; }
.colaction { padding: 6px 0 10px; border-top: 1px dashed #edf2f5; }
.colaction:first-of-type { border-top: 0; }
.colaction .affected { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

/* ---- Narrow screens ------------------------------------------------------
   The legacy .grouprow already collapses to a column at 760px; these follow
   the same breakpoints so the two halves of the view switch together. */
@media (max-width: 700px) {
  .coltools { flex-direction: column; align-items: stretch; }
  .colfresh { text-align: left; min-width: 0; }
  .coldetail { padding: 10px 12px; }
  .colcause h3 { flex-wrap: wrap; }
}

/* ---- Verification bands and the manual queue ----------------------------
   Loaded after theme.css, so these win where they overlap. The two legacy
   panels used to print one paragraph per row; the row is now a row and the
   paragraph is a band heading or a disclosure, which needs the styles the
   base table never had. */

/* A pill is a chip, not a run of text. Without a box it wrapped mid-phrase
   ("Waiting for a / person") and the background broke across the two lines. */
#opsverification .pill, #opsmanual .pill {
  display: inline-block; white-space: nowrap; vertical-align: baseline;
}

/* The band heading: one next step, spanning the table, with the regions that
   share it underneath. Each band is its own <tbody> (so the banner can be
   scope="rowgroup"), and the banner is a <th> inside it, so the uppercase
   micro-type of the real column header has to be undone here. */
#opsverification .bandhead > th {
  background: #f4f8fa; text-transform: none; letter-spacing: 0;
  font-size: 13px; white-space: normal; text-align: left;
  padding: 9px 10px; border-bottom: 0;
  color: var(--text);
}
/* Between bands, not above the first one: the column header already closes
   the top of the table, and a second rule there reads as an empty row. */
#opsverification tbody + tbody .bandhead > th { border-top: 2px solid var(--line); }
#opsverification .bandhead.warn > th { background: #fff4e6; box-shadow: inset 3px 0 0 #f59e0b; }
#opsverification .bandhead > th b { font-weight: 600; }
/* Severity was carried by a pale fill alone, which is invisible to a colour
   -blind operator and to anyone on a projector: the band also gets a bar. */
#opsverification tbody tr.rowwarn td:first-child { box-shadow: inset 3px 0 0 #f59e0b; }
#opsverification .opstable td:first-child { white-space: nowrap; }

/* Counts read as counts. */
#opsverification .opstable td.num, #opsverification .opstable th.num {
  text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap;
}

/* An expired queue row is history, not work. It must stay legible -- greying
   it to invisibility would hide a task that still has to be explained. */
#opsmanual tbody tr.lapsed td { background: #fafbfc; color: var(--muted); }
#opsmanual tbody tr.lapsed td b { color: var(--text-2); }

/* The browser cell: a short line, then disclosures. */
#opsmanual .takeover { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
#opsmanual .takeover .btn { margin-top: 2px; }
.bindwarn { color: #9a3412; }
/* The disclosure inside a table cell keeps the row one line high; the default
   14px bottom margin would put a gap under every row. */
#opsverification .opsnote.tight, #opsmanual .opsnote.tight { margin: 2px 0 0; }
#opsmanual .opsnote.tight > div, #opsverification .opsnote.tight > div { padding-top: 4px; }

html[data-theme="dark"] #opsverification .bandhead > th { background: #182430; color: var(--text); }
html[data-theme="dark"] #opsverification .bandhead.warn > th { background: #2a2016; }
html[data-theme="dark"] #opsmanual tbody tr.lapsed td { background: #151b22; }
html[data-theme="dark"] .bindwarn { color: #fdba74; }

/* ---- Home / Issues / Runs (the health projection, 2026-09-22) --------------
   Scoped to #colroot like the tone pills above; the legacy panels keep
   their look. Tones: good = collecting, warn = degraded/unknown/never,
   bad = stopped/blocked. */
#colroot .pill.bad { background: var(--danger-soft, #fdeaea); border-color: #f1c2be; color: var(--danger, #b42318); }
#colroot .rtdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #c3ccd6; flex: 0 0 auto; }
#colroot .rtdot.good { background: var(--success, #0f9d58); }
#colroot .rtdot.warn { background: #e0a100; }
#colroot .rtdot.bad { background: var(--danger, #b42318); }

/* ① the verdict: one coloured left edge, one big word, one sentence. */
.rtverdict { border-left: 5px solid #c3ccd6; }
.rtverdict.tone-good { border-left-color: var(--success, #0f9d58); }
.rtverdict.tone-warn { border-left-color: #e0a100; }
.rtverdict.tone-bad { border-left-color: var(--danger, #b42318); }
.rtverdicthead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rtverdicthead h2 { margin: 0; font-size: 22px; }
.rtreason { font-size: 15px; margin: 8px 0 4px; line-height: 1.5; }
.rtfacts { margin: 0 0 10px; }
.rtprimary { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.rtprimary .btn { color: #fff; background: linear-gradient(180deg, var(--accent-2) 0%, var(--accent) 100%); border-color: transparent; }
.rtprimary .btn[disabled] { opacity: .5; cursor: default; }

/* ② coverage table: blocked rows carry a red edge, never-collected an amber one. */
.rtcovertable td, .rtcovertable th { white-space: nowrap; }
.rtcovertable tr.rowbad td:first-child { box-shadow: inset 3px 0 0 var(--danger, #b42318); }
.rtcovertable tr.rowwarn td:first-child { box-shadow: inset 3px 0 0 #e0a100; }
.rtcoveragehead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rtcovertable .rtnext { text-align: right; }
.rtcovertable .rtnext .linkbtn { white-space: nowrap; }
.rtcovertable .rtdevice { margin-left: 8px; font-weight: 400; }
.rtproxycheck { max-width: 960px; margin-inline: auto; }
.rtproxycheck .panelhead { margin-top: 12px; }
.rtproxycheck .panelhead h2 { margin: 0; }
.rtproxyfacts { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 12px 0; border-block: 1px solid var(--line); font-size: 13px; }
.rtproxystep { margin: 18px 0; }
.rtproxystep p { margin: 6px 0 12px; }
.rtproxyanswer { display: flex; flex-direction: column; gap: 5px; border-left: 4px solid var(--danger, #b42318); padding: 10px 14px; background: var(--danger-soft, #fff5f4); border-radius: 4px; }
.rtproxyanswer.good { border-left-color: var(--success, #0f9d58); background: #effaf3; }
html[data-theme="dark"] .rtproxyanswer.good { background: #10291c; }
html[data-theme="dark"] .rtproxyanswer.bad { background: #2a1b1b; }
.rtproxyanswer p { margin: 5px 0 0; }
.rtproxyall { margin-top: 16px; }
.rtproxyinventory { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.rtproxyinventory .panelhead { margin-top: 0; }
.rtproxyedit { width: min(520px, calc(100vw - 32px)); max-height: 85vh; overflow: auto; margin: auto; padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); box-shadow: 0 18px 50px #0003; }
.rtproxyedit:not([open]) { display: none; }
.rtproxyedit::backdrop { background: #0d1b30a8; }
.rtproxyedit form { display: grid; gap: 14px; }
.rtproxyedit h3, .rtproxyedit p { margin: 0; }
.rtproxyedit label { display: grid; gap: 5px; font-size: 14px; }
.rtproxyedit label:has(input[type="checkbox"]) { display: flex; align-items: center; gap: 8px; }
.rtproxyedit input:not([type="checkbox"]) { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: var(--text); }
.rtproxyedit .rtactions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ③ issues: one block per cause. */
.rtissuelist { display: flex; flex-direction: column; gap: 8px; }
.rtissue { border: 1px solid #e4e8f2; border-left-width: 4px; border-radius: 8px; padding: 10px 14px; background: #fff; }
.rtissue.tone-bad { border-left-color: var(--danger, #b42318); background: #fffafa; }
.rtissue.tone-warn { border-left-color: #e0a100; background: #fffdf7; }
.rtissue .rowline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rtissue .rtaffected { margin-top: 4px; color: #33505e; }
.rtissue p { margin: 6px 0 2px; }
.rtissue .rtactions { margin-top: 6px; }
.rtissue-markets { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.rtissue-markets > summary { cursor: pointer; color: var(--accent); font-size: 13px; font-weight: 600; }
.rtissue-markets .tablescroll { margin-top: 8px; }

/* ④ runs. */
.rtruns { display: flex; flex-direction: column; gap: 6px; }
.rtrun { border: 1px solid #edf0f5; border-radius: 8px; padding: 10px 14px; background: #fff; }
.rtrun-compact { padding: 8px 12px; }
.rtrun .rowline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rtrun .rowline + .rowline { margin-top: 3px; }
.rtrun .rtactions { gap: 8px; margin-top: 8px; }
.rtrun .rtactions .secondary { text-decoration: none; }
.rtrun .rtdetail { margin-left: auto; }
.rtblind { color: var(--danger, #b42318); }
.rtmarkets { margin-top: 10px; }
.rtlog { margin-top: 8px; }
.rtrun[tabindex], .rtrun:focus { outline: none; }
.rtrun:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

/* the foot: two doors out. */
.rtfooter { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin: 4px 0 8px; }
.rtfootlink {
  display: flex; flex-direction: column; gap: 2px; text-align: left;
  background: #fff; border: 1px solid #e4e8f2; border-radius: 8px; padding: 12px 14px;
  color: inherit; text-decoration: none; font: inherit; cursor: pointer;
}
.rtfootlink:hover { border-color: #9bb3c1; }
.rtfootlink b { color: var(--accent); }
.rtsources { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.rtsources h3 { margin: 0; }
.colnav { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.colnav .modeswitch { margin: 0; }
.colnav .coltools { margin: 0; }
.colhead .colfresh { text-align: left; margin: 0 0 4px; }

/* ---- Plan editor (2026-09-23): sectioned cards, meta-job-edit style ---- */
#planeditor { max-width: 1120px; margin-inline: auto; box-sizing: border-box; }
#planeditor .editorhead { display: flex; flex-direction: column; gap: 4px; margin: 0 0 14px; }
#planeditor .editorhead h2 { margin: 0; }
#planeditor fieldset { min-width: 0; border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; margin: 0 0 16px; }
#planeditor legend { font-size: 13px; font-weight: 600; color: var(--text-2); padding: 0 6px; }
/* Only field wrappers get the column layout -- unlike a bare `#planeditor
   label` rule, this does not outrank `.checkgrid .checkline`'s row layout
   (theme.css) for the market/engine checkbox rows nested inside. */
#planeditor .editorfield { display: flex; flex-direction: column; min-width: 0; gap: 4px; font-size: 13px; margin: 0 0 12px; }
#planeditor .editorrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 20px; align-items: start; margin: 0 0 12px; }
#planeditor .editor-keywords { display: grid; min-width: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
#planeditor textarea { min-height: 130px; font-family: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); resize: vertical; width: 100%; box-sizing: border-box; }
/* The three buying-intent levels read top-down as a funnel, one full-width input each. */
#planeditor .editor-tiers { grid-template-columns: minmax(0, 1fr); gap: 12px; }
#planeditor .editor-tiers textarea { min-height: 64px; }
#planeditor .editor-tiers .editorhint { margin-top: 2px; }
#planeditor .checkgrid { max-width: 720px; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
#planeditor .segmented { align-self: flex-start; max-width: 100%; }
#planeditor .editor-all-engines { align-self: flex-start; margin: 2px 0 8px; }
#planeditor .requiredmark { color: var(--danger, #b42318); }
#planeditor .editorcount { font-size: 11.5px; color: var(--muted); }
#planeditor .editorhint { font-size: 11.5px; color: var(--muted); margin: 2px 0 0; }
#planeditor .marketadd { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
#planeditor .marketadd input { width: 60px; text-transform: uppercase; padding: 5px 8px; font-size: 12.5px; border: 1px solid var(--line); border-radius: var(--r-sm); }
#planeditor .stepper { display: inline-flex; align-items: center; gap: 6px; }
#planeditor .stepper button {
  border: 1px solid var(--line); background: #fff; border-radius: 6px;
  width: 26px; height: 26px; font-size: 15px; line-height: 1; cursor: pointer; color: var(--text-2);
}
#planeditor .stepper button:hover { background: var(--panel-alt); color: var(--text); }
#planeditor .stepper input[type="number"] { width: 70px; text-align: center; }
#planeditor .editorband { display: flex; align-items: flex-end; gap: 10px; margin: 0 0 6px; }
#planeditor .editorband label { display: flex; flex-direction: column; gap: 2px; font-size: 11.5px; color: var(--muted); margin: 0; }
#planeditor .editorband input { margin-top: 2px; width: 64px; }
#planeditor .editorfoot { margin: 4px 0 14px; font-size: 12.5px; color: var(--muted); }
#planeditor .opstools { display: flex; gap: 8px; margin: 0; }
#planeditor .editorfooter { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 18px -20px -18px; padding: 12px 20px; background: var(--panel); border-top: 1px solid var(--line); box-shadow: 0 -5px 18px rgba(16, 35, 61, .06); }
#planeditor .editorfooter .editorfoot { margin: 0; }
#planeditor .editorfooter .editorfoot p { margin: 2px 0; }
@media (max-width: 720px) {
  #planeditor .editor-keywords { grid-template-columns: minmax(0, 1fr); }
  #planeditor .editorfooter { align-items: stretch; }
  #planeditor .editorfooter .opstools { width: 100%; }
}
html[data-theme="dark"] #planeditor .stepper button { background: var(--panel); }

/* ---- Queue: whole-job queue, recent work items, and execution resources. */
#opsqueue > .panel + .panel { margin-top: 16px; }
.queuehead { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-left: auto; }
.autorefresh { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); cursor: pointer; white-space: nowrap; }
#opsqueue .panelhead { flex-wrap: wrap; gap: 8px; }
#opsqueue .queuejobcounts { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
#opsqueue .queuejobcounts span { border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; font-size: 13px; }
#opsqueue .queuejobcounts strong { font-size: 15px; }
#opsqueue [data-queue-resources] .opscards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#opsqueue [data-kpi] strong { display: block; margin: 2px 0; }
#opsqueue [data-kpi-detail] { display: block; }
#opsqueue tr.roundhead td { background: #f3f6f9; color: #55707d; font-size: 12px; font-weight: 600; padding: 6px 12px; border-top: 1px solid #e4e8f2; }
#opsqueue .kwcell { display: inline-block; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
@media (max-width: 640px) { #opsqueue [data-queue-resources] .opscards { grid-template-columns: 1fr; } }
.opscenter-counts { gap: 18px; margin: 0 0 12px; flex-wrap: wrap; }
.centeritemtable { min-width: 620px; }
.centerkeywords { max-width: 300px; }
.centerkeywords summary { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.centerkeywords p { white-space: normal; overflow-wrap: anywhere; margin: 8px 0 0; }
.centerjoblink + .centerjoblink { margin-left: 8px; }
.opslineage { display: grid; grid-template-columns: minmax(0,1fr) 16px minmax(0,1fr) 16px minmax(0,1fr); gap: 7px; align-items: stretch; margin: 14px 0 18px; }
.opslineage-step { min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-alt); color: var(--text); text-align: left; font: inherit; }
.opslineage-step.current { border-color: var(--accent); }
.opslineage-step small { display: block; color: var(--muted); font-size: 11px; }
.opslineage-step b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
button.opslineage-step { cursor: pointer; }
button.opslineage-step:hover { border-color: var(--accent); }
.opslineage-arrow { display: grid; place-items: center; color: var(--muted); font-size: 20px; }
@media (max-width: 640px) { .opslineage { grid-template-columns: 1fr; } .opslineage-arrow { transform: rotate(90deg); } }

/* Verification policy: keep controls and their meaning together. */
[data-verification-settings] .panelhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
[data-verification-settings] .verification-overview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 18px; max-width: 960px; }
[data-verification-settings] .verification-overview-group { min-width: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-md); }
[data-verification-settings] .verification-overview-group h3 { margin: 0 0 10px; font-size: 14px; }
[data-verification-settings] .verification-overview-group dl { display: grid; gap: 0; margin: 0; }
[data-verification-settings] .verification-overview-group dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
[data-verification-settings] .verification-overview-group dt { min-width: 0; color: var(--text-2); font-size: 13px; }
[data-verification-settings] .verification-overview-group dd { min-width: 0; margin: 0; font-size: 13px; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
[data-verification-settings] .verification-form { max-width: 960px; }
[data-verification-settings] .verification-group { min-width: 0; margin: 14px 0 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-md); }
[data-verification-settings] .verification-group legend { padding: 0 6px; color: var(--text-2); font-size: 13px; font-weight: 600; }
[data-verification-settings] .verification-switch { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 14px; cursor: pointer; }
[data-verification-settings] .verification-switch:last-child { margin-bottom: 0; }
[data-verification-settings] .verification-switch input { flex: 0 0 auto; margin: 3px 0 0; }
[data-verification-settings] .verification-switch span { display: grid; gap: 3px; }
[data-verification-settings] .verification-switch strong { font-size: 14px; font-weight: 600; }
[data-verification-settings] .verification-switch small { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
[data-verification-settings] .verification-fields { display: grid; grid-template-columns: repeat(2, minmax(180px, 1fr)) minmax(220px, 1.4fr); gap: 12px 16px; }
[data-verification-settings] .verification-fields label { display: grid; align-content: start; gap: 7px; min-width: 0; font-size: 13px; color: var(--text-2); }
[data-verification-settings] .verification-fields input, [data-verification-settings] .verification-fields select { width: 100%; min-width: 0; box-sizing: border-box; }
[data-verification-settings] .verification-model-field { display: grid; gap: 10px; min-width: 0; }
[data-verification-settings] .verification-hint { margin: 10px 0 0; }
[data-verification-settings] .verification-revision { margin: 14px 0 10px; }
[data-verification-settings] .verification-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
@media (max-width: 760px) { [data-verification-settings] .verification-fields, [data-verification-settings] .verification-overview { grid-template-columns: 1fr; } }
