/* widgets/close-qc — Marianne's close QC dashboard.

   COURT-HONEST COLOUR: --action (vivid green) is CRAIG-COURT ONLY and appears nowhere in this
   file. This surface is --canopy chrome, --signal for healthy state, and amber (--motm-warning)
   for exceptions. CALM ALERTS: no red, no filled alarm boxes — an unproven account is an amber
   left-edge and a bolded word, never a shout.

   TYPE: --fs-num / --fs-body / --fs-label / --fs-micro only. --fs-micro is chips and badges,
   never sentences.

   GRID: native flex. No GridStack. */

#ops-pane-closeqc { font-size: var(--fs-body); color: var(--motm-grey-900); }

.cq-wrap { display: flex; flex-direction: column; gap: 18px; }

/* ── index head ─────────────────────────────────────────────────────────────────────────── */
.cq-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.cq-head-l { min-width: 0; }
.cq-title { font-size: 18px; font-weight: 700; color: var(--canopy); line-height: 1.25; }
.cq-sub { margin-top: 5px; font-size: var(--fs-body); color: var(--motm-grey-700); line-height: 1.45; }
.cq-head-r { flex: 0 0 auto; text-align: right; }
.cq-fresh-k { font-size: var(--fs-label); font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--motm-grey-500); }
.cq-fresh-v { font-size: var(--fs-num-sm); font-weight: 700; color: var(--canopy); margin-top: 2px; }

.cq-kpis { display: flex; gap: 12px; flex-wrap: wrap; }
.cq-kpi { flex: 1 1 180px; background: var(--motm-grey-50); border: 1px solid var(--motm-grey-300);
  border-radius: var(--radius-md); padding: 12px 14px; }
.cq-kpi-n { font-size: var(--fs-num); font-weight: 700; line-height: 1; color: var(--canopy); }
.cq-kpi-l { font-size: var(--fs-label); font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--motm-grey-700); margin-top: 6px; }
.cq-kpi-s { font-size: var(--fs-micro); color: var(--motm-grey-500); margin-top: 3px; }

/* ── index rows ─────────────────────────────────────────────────────────────────────────── */
.cq-rows { display: flex; flex-direction: column; gap: 8px; }
.cq-row { display: flex; align-items: center; gap: 16px; width: 100%; text-align: left;
  background: #fff; border: 1px solid var(--motm-grey-300); border-left: 3px solid var(--motm-grey-300);
  border-radius: var(--radius-md); padding: 12px 14px; cursor: pointer; font: inherit;
  transition: border-color .12s, background .12s, box-shadow .12s; }
.cq-row:hover { background: var(--motm-grey-50); border-color: var(--motm-grey-500);
  box-shadow: var(--shadow-sm); }
.cq-row:focus-visible { outline: 2px solid var(--canopy); outline-offset: 2px; }
/* Amber left-edge = this book is waiting on her. Calm, not an alarm. */
.cq-row.is-waiting { border-left-color: var(--motm-warning); }
/* The header and every row share ONE column geometry — same flex bases, same gaps — so the ratios
   line up down the page and the eye can scan a column instead of re-reading a label per row. */
/* Border box must match .cq-row EXACTLY. The row carries a 1px right border; without it the
   header's flexible first column grows 1px wider and the whole strip lands 1px right of the
   rows it labels. */
.cq-rowhead { display: flex; align-items: flex-end; gap: 16px; padding: 0 14px 2px;
  border: 1px solid transparent; border-left: 3px solid transparent; }
.cq-rowhead .cq-stage { gap: 0; }
.cq-row-main { flex: 1 1 230px; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cq-row-name { font-weight: 600; color: var(--motm-grey-900); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.cq-row-wait { font-size: var(--fs-micro); color: var(--motm-grey-500); }
.cq-row-wait.is-you { color: var(--motm-warning); font-weight: 600; }
.cq-row-stages { flex: 0 0 auto; display: flex; gap: 8px; }
.cq-row-tail { flex: 0 0 220px; display: flex; align-items: center; justify-content: flex-end;
  gap: 8px; }
.cq-row-go { font-size: var(--fs-micro); font-weight: 600; color: var(--canopy); white-space: nowrap; }

/* ── stage ratios ───────────────────────────────────────────────────────────────────────── */
.cq-stage { display: flex; flex-direction: column; gap: 2px; flex: 0 0 96px; width: 96px; }
.cq-stage-k { font-size: var(--fs-micro); color: var(--motm-grey-500); white-space: nowrap; }
.cq-stage-v { font-size: var(--fs-num-sm); font-weight: 700; line-height: 1; color: var(--motm-grey-700); }
.cq-stage-d { font-size: var(--fs-micro); font-weight: 600; color: var(--motm-grey-500); }
.cq-stage.is-done .cq-stage-v { color: var(--signal); }
.cq-stage.is-part .cq-stage-v { color: var(--motm-warning); }
.cq-stage.is-none .cq-stage-v { color: var(--motm-grey-500); }
/* The drill-in's single bar keeps its labels — there is no header above it to carry them. */
.cq-stagebar .cq-stage { flex: 0 0 auto; width: auto; min-width: 96px; }
.cq-stagebar { display: flex; gap: 22px; flex-wrap: wrap; padding: 12px 14px;
  background: var(--motm-grey-50); border: 1px solid var(--motm-grey-300);
  border-radius: var(--radius-md); }

/* ── source_tag truth ───────────────────────────────────────────────────────────────────── */
.cq-src { font-size: var(--fs-micro); font-weight: 600; padding: 2px 7px; border-radius: 999px;
  white-space: nowrap; border: 1px solid transparent; }
.cq-src-auto { background: var(--signal-tint); color: var(--signal); border-color: #cfe3d3; }
.cq-src-us { background: var(--motm-grey-100); color: var(--motm-grey-700); border-color: var(--motm-grey-300); }
.cq-src-client { background: #fdf4e3; color: var(--motm-warning); border-color: #f0dcb4; }
.cq-src-unk { background: var(--motm-grey-100); color: var(--motm-grey-500); border-color: var(--motm-grey-300); }
.cq-warn { font-size: var(--fs-micro); font-weight: 600; color: var(--motm-warning);
  white-space: nowrap; }

/* ── how-this-works ─────────────────────────────────────────────────────────────────────── */
.cq-reply { background: var(--motm-grey-50); border: 1px solid var(--motm-grey-300);
  border-radius: var(--radius-md); padding: 14px 16px; }
.cq-reply-h { font-size: var(--fs-label); font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--motm-grey-700); margin-bottom: 8px; }
.cq-reply ul { margin: 0; padding-left: 18px; }
.cq-reply li { margin: 4px 0; color: var(--motm-grey-700); line-height: 1.45; }

.cq-empty { padding: 28px 4px; max-width: 640px; }
.cq-empty-h { font-size: 16px; font-weight: 700; color: var(--canopy); }
.cq-empty-b { margin-top: 8px; color: var(--motm-grey-700); line-height: 1.5; }

/* ── drill-in ───────────────────────────────────────────────────────────────────────────── */
.cq-back { align-self: flex-start; background: none; border: 1px solid var(--motm-grey-300);
  border-radius: 999px; padding: 5px 12px; font: inherit; font-size: var(--fs-micro);
  font-weight: 600; color: var(--canopy); cursor: pointer; }
.cq-back:hover { background: var(--motm-grey-100); }
.cq-back:focus-visible { outline: 2px solid var(--canopy); outline-offset: 2px; }
.cq-d-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.cq-d-name { font-size: 19px; font-weight: 700; color: var(--canopy); }
.cq-d-period { font-size: var(--fs-label); font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--motm-grey-500); }
.cq-headline { font-size: 15px; font-weight: 600; color: var(--motm-grey-900); line-height: 1.4; }
.cq-narr { color: var(--motm-grey-700); line-height: 1.55; max-width: 78ch; }
.cq-close-link { align-self: flex-start; font-weight: 600; color: var(--canopy);
  text-decoration: none; border-bottom: 1px solid var(--canopy-line); padding-bottom: 1px; }
.cq-close-link:hover { color: var(--canopy-deep); }

.cq-sec { font-size: var(--fs-label); font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--motm-grey-700); border-bottom: 1px solid var(--motm-grey-300);
  padding-bottom: 6px; }

/* ── account cards ──────────────────────────────────────────────────────────────────────── */
.cq-acts { display: flex; flex-direction: column; gap: 10px; }
.cq-act { background: #fff; border: 1px solid var(--motm-grey-300);
  border-left: 3px solid var(--signal); border-radius: var(--radius-md); padding: 13px 15px;
  display: flex; flex-direction: column; gap: 10px; }
/* Unproven leads the list AND reads amber — the exceptions ARE the report. */
.cq-act.is-unproven { border-left-color: var(--motm-warning); background: #fffdf8; }
.cq-act-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cq-act-id { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.cq-act-lbl { font-weight: 600; color: var(--motm-grey-900); }
.cq-act-l4 { font-size: var(--fs-micro); color: var(--motm-grey-500); }
.cq-dag { color: var(--motm-warning); font-weight: 700; cursor: help; }
.cq-act-grid { display: flex; gap: 20px; flex-wrap: wrap; }
.cq-f { flex: 1 1 150px; min-width: 0; }
.cq-f-k { font-size: var(--fs-micro); font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--motm-grey-500); }
.cq-f-v { margin-top: 2px; color: var(--motm-grey-900); line-height: 1.4; word-break: break-word; }
.cq-yes { color: var(--signal); font-weight: 600; }
.cq-no { color: var(--motm-warning); }
.cq-no strong { font-weight: 700; }
.cq-stmt-stale, .cq-stmt-none { color: var(--motm-grey-500); font-style: italic; }

.cq-ev { background: var(--motm-grey-50); border-radius: var(--radius-sm); padding: 9px 11px; }
.cq-ev-k { font-size: var(--fs-micro); font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--motm-grey-500); margin-bottom: 5px; }
.cq-ev-row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 3px 0; }
.cq-ev-n { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px;
  color: var(--motm-grey-900); word-break: break-all; }
.cq-ev-m { font-size: var(--fs-micro); color: var(--motm-grey-500); white-space: nowrap; }
.cq-drift { margin-top: 7px; padding-top: 7px; border-top: 1px dashed var(--motm-grey-300);
  font-size: var(--fs-micro); color: var(--motm-warning); line-height: 1.5; }
.cq-drift code { background: #fff; padding: 1px 4px; border-radius: 3px; }
.cq-disk { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.cq-disk code { font-size: 11px; color: var(--motm-grey-700); word-break: break-all; }

.cq-note { font-size: var(--fs-micro); color: var(--motm-grey-700); line-height: 1.5;
  max-width: 82ch; }
.cq-unm { display: flex; flex-direction: column; gap: 6px; }
.cq-unm-row { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 9px 12px; background: var(--motm-grey-50); border-radius: var(--radius-sm); }
.cq-unm-m { font-size: var(--fs-micro); color: var(--motm-grey-500); }
.cq-unm-m strong { color: var(--motm-warning); }

.cq-proof { font-size: var(--fs-micro); color: var(--motm-grey-700); line-height: 1.55;
  background: var(--signal-tint); border-radius: var(--radius-sm); padding: 10px 12px;
  max-width: 82ch; }
.cq-ask { margin: 0; padding-left: 20px; }
.cq-ask li { margin: 6px 0; color: var(--motm-grey-900); line-height: 1.5; max-width: 80ch; }
.cq-sample { font-size: var(--fs-body); font-weight: 600; color: var(--canopy); line-height: 1.5;
  max-width: 80ch; }
.cq-gen { font-size: var(--fs-micro); color: var(--motm-grey-500); }

/* ── flag → reopen + re-queue ───────────────────────────────────────────────────────────── */
.cq-flag-btn, .cq-flag-send, .cq-flag-cancel { font: inherit; font-size: var(--fs-micro);
  font-weight: 600; border-radius: var(--radius-sm); padding: 6px 12px; cursor: pointer; }
.cq-flag-btn { background: none; border: 1px solid var(--motm-grey-300); color: var(--motm-grey-700); }
.cq-flag-btn:hover { border-color: var(--motm-warning); color: var(--motm-warning); }
.cq-flag-btn:focus-visible, .cq-flag-send:focus-visible, .cq-flag-cancel:focus-visible {
  outline: 2px solid var(--canopy); outline-offset: 2px; }
.cq-flag-form { display: flex; flex-direction: column; gap: 8px; padding: 11px 12px;
  background: #fffdf8; border: 1px solid #f0dcb4; border-radius: var(--radius-sm); }
.cq-flag-l { font-size: var(--fs-micro); font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--motm-warning); }
.cq-flag-t { font: inherit; font-size: var(--fs-body); padding: 8px 10px; resize: vertical;
  border: 1px solid var(--motm-grey-300); border-radius: var(--radius-sm); color: var(--motm-grey-900); }
.cq-flag-t:focus { outline: none; border-color: var(--motm-warning); }
.cq-flag-t.is-need { border-color: var(--motm-warning); background: #fffaf0; }
.cq-flag-actions { display: flex; gap: 8px; }
.cq-flag-send { background: var(--canopy); border: 1px solid var(--canopy); color: #fff; }
.cq-flag-send:hover { background: var(--canopy-deep); }
.cq-flag-cancel { background: none; border: 1px solid var(--motm-grey-300); color: var(--motm-grey-700); }
.cq-flag-hint { font-size: var(--fs-micro); color: var(--motm-grey-700); line-height: 1.45; }
.cq-flag-sent, .cq-flag-done { font-size: var(--fs-micro); color: var(--motm-warning);
  font-weight: 600; line-height: 1.5; }
.cq-flag-note { margin-top: 4px; font-weight: 400; color: var(--motm-grey-700); }

/* ── doorway tile ───────────────────────────────────────────────────────────────────────── */
.cq-tile { display: block; width: 100%; text-align: left; background: #fff;
  border: 1px solid var(--motm-grey-300); border-left: 3px solid var(--motm-warning);
  border-radius: var(--radius-md); padding: 14px 16px; cursor: pointer; font: inherit;
  transition: box-shadow .12s, border-color .12s; }
.cq-tile:hover { box-shadow: var(--shadow-sm); border-color: var(--motm-grey-500);
  border-left-color: var(--motm-warning); }
.cq-tile:focus-visible { outline: 2px solid var(--canopy); outline-offset: 2px; }
.cq-tile-k { font-size: var(--fs-label); font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--motm-grey-500); }
.cq-tile-n { font-size: var(--fs-num); font-weight: 700; line-height: 1.1; color: var(--canopy); }
.cq-tile-of { font-size: var(--fs-body); font-weight: 600; color: var(--motm-grey-500); }
.cq-tile-l { font-size: var(--fs-body); font-weight: 600; color: var(--motm-warning); }
.cq-tile-m { font-size: var(--fs-micro); color: var(--motm-grey-700); margin-top: 6px; }
.cq-tile-w { color: var(--motm-warning); font-weight: 600; }
.cq-tile-go { font-size: var(--fs-micro); font-weight: 600; color: var(--canopy); margin-top: 8px; }

/* ── the owner doorway: RETIRED 2026-08-07 ──────────────────────────────────────────────────
   `.cq-door*` styled the QC chip on the month-end close header. Craig scrapped the QC dashboard
   it opened (8/6) and flagged the surviving chip twice; the node and its renderer were deleted
   on 8/7 — see widgets/close-qc/render.js and widgets/close-spine/render.js for where each thing
   it said now lives. Rules dropped with it rather than left orphaned: unreferenced selectors read
   as a live surface to the next person who greps for one. */

@media (max-width: 860px) {
  .cq-row { flex-wrap: wrap; }
  .cq-row-stages { flex-basis: 100%; }
}
