/* Campaign Member Reports — the segmentation module (locked MK2 design).
   Values are the specimens' literals: Inter / IBM Plex Mono; ink #0f172a;
   muted #475569; faint #94a3b8; blue #1d4ed8 (values, OR, Include, links);
   rose #be123c (negation); red #991b1b (Exclude scope border); borders
   #e2e8f0 / strong #cbd5e1; group bgs #f1f5f9 → #fff → #e7ecf3; radius 4px;
   drawer #fcfcfd 404px → 604px. Search/primary = slate-900. */

.cm-page { max-width: 100%; margin: 0 auto; padding: 18px 24px 80px; font-size: 13px; color: #0f172a; }
.cm-page--narrow { max-width: 760px; }
.cm-page--builder { max-width: 920px; }
.cm-mut { color: #475569; }
.cm-lnk { color: #1d4ed8; font-weight: 500; }
.cm-inlineform { display: inline; }
.cm-blockform { display: block; width: 100%; }
.cm-flex1 { flex: 1; display: flex; }
.cm-flex1 > * { flex: 1; }

/* ————— page head ————— */
.cm-phead { display: flex; align-items: baseline; gap: 12px; padding: 4px 0 12px; }
.cm-phead-left { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.cm-backlink { color: #1d4ed8; text-decoration: none; font-size: 12.5px; white-space: nowrap; }
.cm-backlink:hover { text-decoration: underline; }
.cm-title { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; margin: 0; }
.cm-camp { font-size: 12.5px; color: #475569; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-phead-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.cm-btn { font: inherit; font-size: 12px; font-weight: 500; color: #0f172a; background: #fff; border: 1px solid #cbd5e1; border-radius: 4px; padding: 5px 10px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.cm-btn-ic { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 10px; color: #94a3b8; }
.cm-btn.is-on, .cm-btn.is-on .cm-btn-ic { border-color: #1d4ed8; color: #1d4ed8; background: #eff6ff; }

/* ————— share popover ————— */
.cm-sharewrap { position: relative; }
.cm-sharepop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; width: 340px; background: #fff; border: 1px solid #e2e8f0; box-shadow: 0 10px 30px rgba(15,23,42,.16); border-radius: 4px; overflow: hidden; }
.cm-sharepop-h { font-size: 13px; font-weight: 600; padding: 11px 14px; border-bottom: 1px solid #e2e8f0; }
.cm-sharepop-b { padding: 13px 14px; display: flex; flex-direction: column; gap: 10px; }
.cm-linkrow { display: flex; gap: 8px; }
.cm-linkrow input { flex: 1; font-family: "IBM Plex Mono", monospace; font-size: 12px; border: 1px solid #cbd5e1; border-radius: 4px; padding: 7px 9px; color: #475569; background: #f8fafc; min-width: 0; }
.cm-linkrow button { background: #0f172a; color: #fff; border: none; border-radius: 4px; padding: 0 13px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.cm-sharehint { font-size: 11.5px; color: #94a3b8; line-height: 1.5; margin: 0; }

/* ————— count strip (loose-ends #6) ————— */
.cm-strip { display: flex; align-items: center; gap: 9px; padding: 7px 15px; font-size: 12px; border: 1px solid #e2e8f0; border-radius: 4px; background: #fff; margin-bottom: 10px; }
.cm-strip--ran { background: #f8fafc; color: #475569; }
.cm-strip--stale { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.cm-strip b { color: #0f172a; font-weight: 600; }
.cm-strip-cnt { font-family: "IBM Plex Mono", monospace; font-weight: 600; color: #0f172a; }
.cm-staleflag { font-family: "IBM Plex Mono", monospace; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; color: #92400e; }
.cm-strip-ok { margin-left: auto; font-weight: 600; color: #1d4ed8; }
.cm-strip-run { margin-left: auto; font: inherit; font-weight: 600; background: none; border: none; cursor: pointer; }
.cm-strip-run--amb { color: #92400e; }
.cm-strip-run--amb:hover { text-decoration: underline; }

/* ————— stage: index + drawer ————— */
.cm-stage { display: flex; align-items: stretch; min-height: 600px; background: #fff; border: 1px solid #e2e8f0; border-radius: 4px; box-shadow: 0 1px 3px rgba(15,23,42,.06); overflow: hidden; }
.cm-idx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cm-toolbar { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-bottom: 1px solid #e2e8f0; background: #f8fafc; }
.cm-toolbar-cnt { font-family: "IBM Plex Mono", monospace; font-size: 11px; color: #475569; white-space: nowrap; }
.cm-toolbar-cnt b { color: #0f172a; }
.cm-toolbar-grp { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.cm-tbtn { font: inherit; font-size: 11px; color: #475569; background: #fff; border: 1px solid #cbd5e1; border-radius: 4px; padding: 3px 8px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.cm-tbtn[disabled] { opacity: .45; cursor: not-allowed; }

/* live-preview strip (§05-B) */
.cm-fstrip { display: flex; align-items: center; gap: 9px; padding: 6px 14px; background: #eff6ff; border-bottom: 1px solid #bfdbfe; font-size: 11.5px; color: #475569; }
.cm-fstrip b { color: #0f172a; }
.cm-fstrip-chip { font-family: "IBM Plex Mono", monospace; font-size: 10px; background: #fff; border: 1px solid #bfdbfe; color: #1d4ed8; border-radius: 3px; padding: 1px 6px; font-weight: 600; }

/* member table */
.cm-twrap { flex: 1; overflow: auto; }
.cm-twrap--dim { opacity: .45; }
.cm-cell-trunc { max-width: 210px; }
.cm-empty { text-align: center; color: #94a3b8; padding: 26px 0 !important; }

/* ————— drawer ————— */
.cm-drawer { flex: none; width: 404px; display: none; flex-direction: column; background: #fcfcfd; border-left: 1px solid #e2e8f0; box-shadow: -8px 0 24px -12px rgba(15,23,42,.18); transition: width .18s ease; }
.cm-drawer.is-open { display: flex; }
.cm-drawer.is-wide { width: 604px; }
.cm-drawer turbo-frame { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.cm-dhead { display: flex; align-items: center; gap: 9px; padding: 11px 14px; border-bottom: 1px solid #e2e8f0; background: #fff; }
.cm-dhead h2 { font-size: 13px; font-weight: 600; margin: 0; }
.cm-dback { font-size: 12px; color: #1d4ed8; cursor: pointer; font-weight: 500; text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }
.cm-dback:hover { text-decoration: underline; }
.cm-x { margin-left: auto; color: #94a3b8; cursor: pointer; font-size: 14px; line-height: 1; background: none; border: none; padding: 0 2px; text-decoration: none; }
.cm-x:hover { color: #0f172a; }

.cm-tabs { display: flex; gap: 2px; padding: 0 12px; border-bottom: 1px solid #e2e8f0; background: #fff; }
.cm-tab { font: inherit; font-size: 12px; color: #475569; padding: 9px 9px; cursor: pointer; border: none; background: none; border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; white-space: nowrap; }
.cm-tab.is-on { color: #0f172a; font-weight: 600; border-bottom-color: #0f172a; }

.cm-dbody { flex: 1; overflow-y: auto; padding: 13px 14px; display: flex; flex-direction: column; gap: 14px; }
.cm-pane { display: none; flex-direction: column; gap: 14px; }
.cm-pane.is-on { display: flex; }
.cm-fld { display: flex; flex-direction: column; gap: 6px; }
.cm-fl { font-family: "IBM Plex Mono", monospace; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #94a3b8; }

/* segmented control */
.cm-cp { display: flex; border: 1px solid #cbd5e1; border-radius: 4px; overflow: hidden; }
.cm-cp-opt { flex: 1; position: relative; }
.cm-cp-opt input { position: absolute; opacity: 0; }
.cm-cp-opt span { display: block; text-align: center; font-size: 12.5px; font-weight: 600; color: #475569; padding: 6px; cursor: pointer; background: #fff; }
.cm-cp-opt input:checked + span { background: #0f172a; color: #fff; }

/* baseline (visible-but-locked, hatched 45°) */
.cm-base { display: flex; flex-direction: column; gap: 2px; background: repeating-linear-gradient(45deg, #f1f5f9, #f1f5f9 7px, #f8fafc 7px, #f8fafc 14px); border: 1px solid #e2e8f0; border-radius: 4px; padding: 7px 10px; }
.cm-base-l { font-family: "IBM Plex Mono", monospace; font-size: 8.5px; text-transform: uppercase; letter-spacing: .06em; color: #94a3b8; font-weight: 700; }
.cm-base code { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; color: #475569; }

/* ————— two buckets (segment-combination + Nick's clarifications) ————— */
.cm-grp { display: flex; flex-direction: column; gap: 7px; }
.cm-grp-lbl { font-family: "IBM Plex Mono", monospace; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.cm-grp-lbl--include { color: #1d4ed8; }
.cm-grp-lbl--exclude { color: #991b1b; }
.cm-seg { border: 1px solid #e2e8f0; border-radius: 4px; background: #fff; overflow: hidden; }
.cm-seg--exc { border-color: #fecaca; }   /* scope marker: border only, no fill */
.cm-seg-r { display: flex; align-items: center; gap: 8px; padding: 9px 10px; }
.cm-seg-r + .cm-seg-r { border-top: 1px solid #eef2f6; }
.cm-seg-r:hover { background: #f8fafc; }
.cm-seg-name { flex: 1; min-width: 0; font-size: 12.5px; font-weight: 500; color: #0f172a; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-seg-r:hover .cm-seg-name { color: #1d4ed8; }
.cm-seg-sum { font-family: "IBM Plex Mono", monospace; font-size: 10px; color: #94a3b8; flex: none; }
.cm-seg-move { font-family: "IBM Plex Mono", monospace; font-size: 9px; color: #94a3b8; border: 1px solid #cbd5e1; border-radius: 4px; padding: 2px 6px; flex: none; background: #fff; cursor: pointer; }
.cm-seg-r:hover .cm-seg-move { color: #475569; }
.cm-seg-x { background: none; border: none; color: #cbd5e1; cursor: pointer; font-size: 12px; flex: none; opacity: 0; padding: 0 2px; }
.cm-seg-r:hover .cm-seg-x { opacity: 1; }
.cm-seg-x:hover { color: #991b1b; }
.cm-seg-go { color: #cbd5e1; flex: none; font-family: "IBM Plex Mono", monospace; font-size: 11px; }
.cm-seg-r:hover .cm-seg-go { color: #1d4ed8; }
.cm-grp-empty { border: 1px dashed #cbd5e1; border-radius: 4px; padding: 10px; font-size: 12px; font-style: italic; color: #94a3b8; text-align: center; }

/* add-segment → library picker overlay (segment-library specimen) */
.cm-addwrap { position: relative; }
.cm-addseg { width: 100%; display: flex; align-items: center; justify-content: center; gap: 7px; border: 1px dashed #cbd5e1; background: transparent; color: #475569; border-radius: 4px; padding: 8px; font: inherit; font-size: 12px; font-weight: 500; cursor: pointer; }
.cm-addseg:hover { border-color: #1d4ed8; color: #1d4ed8; background: #eff6ff; }
.cm-picker { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); z-index: 50; background: #fff; border: 1px solid #e2e8f0; box-shadow: 0 12px 34px rgba(15,23,42,.18); border-radius: 4px; overflow: hidden; }
.cm-picker-h { display: flex; align-items: center; gap: 9px; padding: 11px 14px; border-bottom: 1px solid #e2e8f0; }
.cm-picker-h h3 { font-size: 13px; font-weight: 600; margin: 0; }
.cm-picker-s { padding: 9px 12px; border-bottom: 1px solid #e2e8f0; }
.cm-picker-s input { width: 100%; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 4px; padding: 8px 11px; font: inherit; font-size: 13px; }
.cm-picker-list { max-height: 280px; overflow-y: auto; }
.cm-picker-r { display: flex; align-items: center; gap: 10px; padding: 9px 14px; cursor: pointer; border: none; background: none; width: 100%; text-align: left; font: inherit; border-bottom: 1px solid #eef2f6; }
.cm-picker-r:hover { background: #f8fafc; }
.cm-picker-r.is-applied { opacity: .5; cursor: default; }
.cm-picker-r.is-applied:hover { background: none; }
.cm-picker-nm { flex: 1; min-width: 0; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-picker-meta { font-family: "IBM Plex Mono", monospace; font-size: 10px; color: #94a3b8; flex: none; }
.cm-picker-r.is-applied .cm-picker-meta { color: #166534; }
.cm-picker-new { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px; font-size: 13px; font-weight: 600; color: #1d4ed8; cursor: pointer; background: #eff6ff; border-top: 1px solid #e2e8f0; text-decoration: none; }

/* number fields (Limit) */
.cm-nrow { display: flex; gap: 10px; }
.cm-nfld { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.cm-nin { border: 1px solid #cbd5e1; border-radius: 4px; padding: 8px 10px; font: inherit; font-size: 13px; font-family: "IBM Plex Mono", monospace; color: #0f172a; width: 100%; }
.cm-nin:focus { outline: none; border-color: #1d4ed8; }
.cm-hint { font-size: 11px; color: #94a3b8; line-height: 1.45; margin: 0; }
.cm-hint--warn { color: #92400e; }

/* export checklist */
.cm-chk { border: 1px solid #e2e8f0; border-radius: 4px; background: #fff; max-height: 214px; overflow: auto; }
.cm-chk label { display: flex; align-items: center; gap: 9px; padding: 7px 11px; font-size: 12.5px; cursor: pointer; border-bottom: 1px solid #eef2f6; }
.cm-chk label:last-child { border-bottom: none; }
.cm-chk label:hover { background: #f8fafc; }
.cm-chk input { width: 15px; height: 15px; accent-color: #1d4ed8; flex: none; }
.cm-lk { color: #94a3b8; }
.cm-asof { color: #94a3b8; font-size: 11px; margin: 6px 0 0; }

/* ————— footers (contextual per tab) ————— */
.cm-dfoot { padding: 11px 14px; border-top: 1px solid #e2e8f0; background: #f8fafc; display: flex; flex-direction: column; gap: 8px; }
.cm-runbtn { background: #0f172a; color: #fff; border: 1px solid #0f172a; border-radius: 4px; padding: 9px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; width: 100%; text-align: center; text-decoration: none; display: block; }
.cm-runbtn:hover { background: #1e293b; }
.cm-runbtn[disabled] { background: #f1f5f9; border-color: #f1f5f9; color: #94a3b8; cursor: not-allowed; }
.cm-row2 { display: flex; gap: 8px; }
.cm-ghost { flex: 1; background: #fff; color: #0f172a; border: 1px solid #cbd5e1; border-radius: 4px; padding: 7px; font: inherit; font-size: 12px; font-weight: 500; cursor: pointer; }
.cm-ghost[disabled] { opacity: .45; cursor: not-allowed; }
.cm-ghost--danger { color: #991b1b; }

/* segment name input (builder) */
.cm-namein { border: 1px solid #cbd5e1; border-radius: 4px; padding: 8px 10px; font: inherit; font-size: 13.5px; font-weight: 600; color: #0f172a; width: 100%; }
.cm-namein:focus { outline: none; border-color: #1d4ed8; box-shadow: 0 0 0 3px rgba(29,78,216,.12); }

/* ————— the v14 tree (locked visual system) ————— */
.cmt-noyet { font-size: 12.5px; font-style: italic; color: #94a3b8; padding: 6px 5px; }
.cmt-gc { border: 1px solid #e2e8f0; border-radius: 4px; padding: 9px 12px; }
.cmt-gc--d1 { background: #f1f5f9; }
.cmt-gc--d2 { background: #fff; }
.cmt-gc--d3 { background: #e7ecf3; }

.cmt-jn { display: flex; align-items: center; gap: 9px; margin: 7px 0; }
.cmt-jn::before, .cmt-jn::after { content: ""; height: 1.5px; flex: 1; border-radius: 2px; }
.cmt-jn-op { font-family: "IBM Plex Mono", monospace; font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; background: none; border: none; cursor: pointer; padding: 1px 4px; }
.cmt-jn--and .cmt-jn-op { color: #475569; }
.cmt-jn--and::before, .cmt-jn--and::after { background: #cbd5e1; }
.cmt-jn--or .cmt-jn-op { color: #1d4ed8; }
.cmt-jn--or::before, .cmt-jn--or::after { background: #bfdbfe; }

.cmt-cond { display: flex; align-items: center; gap: 10px; padding: 4px 5px; font-size: 13px; border-radius: 4px; flex-wrap: wrap; }
.cmt-cond:hover { background: #f8fafc; }
.cmt-cond--bad { background: #fff1f2; }
.cmt-grip { width: 11px; color: #cbd5e1; opacity: 0; flex: none; font-size: 12px; cursor: grab; }
.cmt-cond:hover .cmt-grip { opacity: 1; }
.cmt-cell { border: 1px solid transparent; border-radius: 4px; padding: 1px 6px; cursor: pointer; background: none; font: inherit; }
.cmt-cell:hover { border-color: #cbd5e1; background: #fff; }
.cmt-cell.is-active { border-color: #1d4ed8; background: #fff; box-shadow: 0 0 0 2px rgba(37,99,235,.12); }
.cmt-f { font-weight: 600; color: #0f172a; }
.cmt-o { color: #475569; font-family: "IBM Plex Mono", monospace; font-size: 12px; }
.cmt-o--neg { color: #be123c; }
.cmt-v { color: #1d4ed8; font-weight: 500; }
.cmt-v--ph { color: #94a3b8; font-style: italic; font-weight: 400; }
.cmt-vchips { display: inline-flex; gap: 3px; flex-wrap: wrap; align-items: center; border: 1px solid transparent; border-radius: 4px; padding: 1px 4px; background: none; cursor: pointer; font: inherit; }
.cmt-vchips:hover { border-color: #cbd5e1; background: #fff; }
.cmt-chip { display: inline-block; background: #eff6ff; color: #1d4ed8; border: 1px solid #dbeafe; border-radius: 4px; font-size: 12px; padding: 0 6px; }
.cmt-chip--add { background: #fff; border-style: dashed; color: #94a3b8; cursor: pointer; }
.cmt-chip-x { background: none; border: none; color: #93c5fd; cursor: pointer; font-size: 10px; padding: 0; }
.cmt-chip-x:hover { color: #1d4ed8; }
.cmt-textin { border: 1px solid #cbd5e1; border-radius: 4px; padding: 3px 9px; font: inherit; font-size: 13px; color: #0f172a; min-width: 90px; }
.cmt-textin--q { color: #1d4ed8; font-weight: 500; min-width: 180px; }
.cmt-unit { font: inherit; font-size: 12px; border: 1px solid #cbd5e1; border-radius: 4px; padding: 3px 5px; background: #fff; }
.cmt-lab { font-family: "IBM Plex Mono", monospace; font-size: 12px; color: #475569; }
.cmt-miss { color: #be123c; font-style: italic; font-size: 12.5px; border: 1px dashed #fda4af; border-radius: 4px; padding: 1px 8px; }
.cmt-x { margin-left: auto; color: #cbd5e1; opacity: 0; cursor: pointer; font-size: 13px; flex: none; background: none; border: none; }
.cmt-cond:hover .cmt-x { opacity: 1; }
.cmt-x:hover { color: #be123c; }

.cmt-adds { padding: 9px 3px 2px; display: flex; gap: 8px; }
.cmt-adds--nest { padding: 7px 0 1px; }
.cmt-add-main { flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; border: 1px dashed #cbd5e1; background: transparent; color: #475569; border-radius: 4px; padding: 7px; font: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer; }
.cmt-adds--nest .cmt-add-main { padding: 5px; font-size: 12px; }
.cmt-add-main--sm { width: 100%; padding: 5px; font-size: 12px; border: 1px dashed #cbd5e1; background: none; color: #475569; border-radius: 4px; cursor: pointer; margin-top: 6px; }
.cmt-add-main:hover, .cmt-add-grp:hover, .cmt-add-main--sm:hover { border-color: #1d4ed8; color: #1d4ed8; background: #eff6ff; }
.cmt-add-grp { display: inline-flex; align-items: center; gap: 6px; border: 1px dashed #cbd5e1; background: transparent; color: #475569; border-radius: 4px; padding: 7px 12px; font: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer; }
.cmt-add-rm { display: inline-flex; align-items: center; border: 1px dashed #e2e8f0; background: none; color: #94a3b8; border-radius: 4px; padding: 7px 10px; font: inherit; font-size: 12px; cursor: pointer; }
.cmt-add-rm:hover { color: #be123c; border-color: #fda4af; }

/* popovers (builder-states .pop) */
.cmt-pop { background: #fff; border: 1px solid #e2e8f0; border-radius: 4px; box-shadow: 0 10px 30px rgba(15,23,42,.15); width: 288px; overflow: hidden; margin: 6px 0 2px 4px; }
.cmt-pop-search { display: flex; align-items: center; gap: 8px; padding: 8px 11px; border-bottom: 1px solid #e2e8f0; color: #94a3b8; }
.cmt-pop-search input { border: none; outline: none; font: inherit; font-size: 13px; flex: 1; background: none; color: #0f172a; }
.cmt-pop-list { max-height: 250px; overflow-y: auto; }
.cmt-pop-grp { font-family: "IBM Plex Mono", monospace; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #94a3b8; padding: 9px 11px 3px; }
.cmt-pop-item { display: flex; align-items: center; gap: 9px; padding: 6px 11px; cursor: pointer; width: 100%; border: none; background: none; text-align: left; font: inherit; font-size: 13px; }
.cmt-pop-item:hover { background: #f8fafc; }
.cmt-pop-item.is-on { background: #eff6ff; color: #1d4ed8; font-weight: 600; }
.cmt-pop-ck { width: 13px; color: #1d4ed8; flex: none; }
.cmt-pop-ct { margin-left: auto; font-family: "IBM Plex Mono", monospace; font-size: 11px; color: #94a3b8; }
.cmt-pop-sep { height: 1px; background: #e2e8f0; margin: 4px 0; }
.cmt-tag-new, .cmt-tag-multi { margin-left: auto; font-family: "IBM Plex Mono", monospace; font-size: 8.5px; font-weight: 700; text-transform: uppercase; border-radius: 3px; padding: 0 5px; }
.cmt-tag-new { color: #1d4ed8; background: #eff6ff; border: 1px solid #bfdbfe; }
.cmt-tag-multi { color: #166534; background: #f0fdf4; border: 1px solid #bbf7d0; }
.cmt-pop-item.is-on .cmt-tag-new, .cmt-pop-item.is-on .cmt-tag-multi { margin-left: 8px; }
.cmt-pop-foot { padding: 7px 11px; border-top: 1px solid #e2e8f0; display: flex; justify-content: space-between; align-items: center; }
.cmt-pop-c { font-family: "IBM Plex Mono", monospace; font-size: 11px; color: #94a3b8; }
.cmt-pop-ap { background: #1d4ed8; color: #fff; border: none; border-radius: 4px; padding: 4px 12px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }

/* membership valpick + qualified where (coverage-addendum) */
.cmt-valpick { display: inline-flex; align-items: center; gap: 7px; border: 1px solid #cbd5e1; border-radius: 4px; padding: 3px 9px; font-size: 12.5px; color: #1d4ed8; font-weight: 500; background: #fff; cursor: pointer; font-family: inherit; }
.cmt-car { font-family: "IBM Plex Mono", monospace; font-size: 9px; color: #94a3b8; }
.cmt-where { font-family: "IBM Plex Mono", monospace; font-size: 12px; color: #475569; border: 1px solid #cbd5e1; border-radius: 4px; background: #fff; padding: 2px 9px; cursor: pointer; }
.cmt-where:hover { color: #0f172a; }
.cmt-subscope { margin: 8px 0 2px 26px; border-left: 2px solid #cbd5e1; padding-left: 14px; }
.cmt-scopehdr { font-family: "IBM Plex Mono", monospace; font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #475569; margin: 2px 0 8px; display: flex; align-items: center; gap: 7px; }
.cmt-scopeobj { color: #166534; }

/* ————— cards / library / new pages ————— */
.cm-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 4px; padding: 16px 18px; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.cm-newform .cm-nin, .cm-newform select, .cm-newform input[type=text] { max-width: 480px; }
.cm-input { width: 100%; padding: 7px 10px; border: 1px solid #cbd5e1; border-radius: 4px; font: inherit; font-size: 13px; }
.cm-rowactions { display: flex; gap: 6px; }
.cm-mini { font: inherit; font-size: 11px; padding: 2px 8px; border: 1px solid #cbd5e1; border-radius: 4px; background: #fff; cursor: pointer; color: #1d4ed8; }
.cm-mini--red { color: #991b1b; }
.cm-mini:hover { background: #f8fafc; }
.cm-mono { font-family: "IBM Plex Mono", monospace; font-size: 12px; color: #475569; }
.cm-segrow-name { color: #1d4ed8; font-weight: 600; text-decoration: none; }
.cm-segrow-name:hover { text-decoration: underline; }
.cm-btn--primary { background: #0f172a; border-color: #0f172a; color: #fff; }
.cm-btn--primary:hover { background: #1e293b; }
.cm-drawer-foot { padding: 12px 0 10px; display: flex; gap: 8px; }

/* canon-instance adjustments inside the report stage */
.cm-idx .cpv1-strip.cm-strip-slim { border-left: none; border-right: none; border-top: none; border-radius: 0; margin: 0; }
.cm-idx .cpv1-tbl-wrap { border: none; border-radius: 0; margin: 0; }
.cm-idx .cpv1-landmark { margin: 0; padding: 6px 14px; border-top: 1px solid #e2e8f0; }
.cm-twrap--dim .cpv1-tbl-viewport { opacity: .45; }

/* ————— ⋯ row menu (details-based) ————— */
.cm-rowmenu { position: relative; display: inline-block; }
.cm-rowmenu > summary { list-style: none; cursor: pointer; color: #94a3b8; font-weight: 700; letter-spacing: 1px; padding: 0 6px; border-radius: 4px; }
.cm-rowmenu > summary::-webkit-details-marker { display: none; }
.cm-rowmenu > summary:hover { color: #0f172a; background: #f1f5f9; }
.cm-rowmenu[open] > summary { color: #0f172a; }
.cm-rowmenu-pop { position: absolute; right: 0; top: calc(100% + 4px); z-index: 60; min-width: 150px; background: #fff; border: 1px solid #e2e8f0; border-radius: 4px; box-shadow: 0 10px 30px rgba(15,23,42,.16); overflow: hidden; padding: 4px 0; }
.cm-rowmenu-pop a, .cm-rowmenu-pop button { display: block; width: 100%; text-align: left; padding: 6px 12px; font: inherit; font-size: 12.5px; color: #0f172a; background: none; border: none; cursor: pointer; text-decoration: none; }
.cm-rowmenu-pop form { display: block; }
.cm-rowmenu-pop a:hover, .cm-rowmenu-pop button:hover { background: #f8fafc; }
.cm-rowmenu-pop a.is-on { color: #1d4ed8; font-weight: 600; }
.cm-rowmenu-pop .cm-rowmenu-danger { color: #991b1b; }
.cm-sortmenu > summary { color: #475569; font-weight: 500; letter-spacing: 0; }

/* ————— two-pane field picker (mirror verbatim, JC-1) + provenance marks ————— */
.cmt-pop--twopane { width: min(576px, 100%); }
.cmt-tp { display: flex; height: 330px; }
.cmt-tp-rail { width: 200px; border-right: 1px solid #e2e8f0; background: #f8fafc; overflow-y: auto; padding: 6px 0; flex: none; }
.cmt-tp-railhead { font-family: "IBM Plex Mono", monospace; font-size: 9.5px; text-transform: uppercase; letter-spacing: .07em; color: #94a3b8; font-weight: 700; padding: 8px 13px 5px; }
.cmt-tp-cat { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 8px 13px; font-size: 12.5px; color: #475569; cursor: pointer; border-left: 2px solid transparent; }
.cmt-tp-cat:hover { background: #fff; color: #0f172a; }
.cmt-tp-cat.is-on { background: #fff; color: #0f172a; font-weight: 600; border-left-color: #0f172a; }
.cmt-tp-ct { font-family: "IBM Plex Mono", monospace; font-size: 10px; color: #94a3b8; }
.cmt-tp-flag { font-family: "IBM Plex Mono", monospace; font-size: 8.5px; color: #6d28d9; border: 1px solid #ddd6fe; background: #f5f3ff; border-radius: 2px; padding: 0 3px; text-transform: uppercase; white-space: nowrap; }
.cmt-tp-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.cmt-tp-search { padding: 8px; border-bottom: 1px solid #e2e8f0; }
.cmt-tp-search input { width: 100%; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 4px; padding: 7px 10px; font: inherit; font-size: 13px; }
.cmt-tp-fields { flex: 1; overflow-y: auto; padding: 4px 0; }
.cmt-tp-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; border: none; background: transparent; text-align: left; padding: 7px 13px; font: inherit; font-size: 13px; color: #0f172a; cursor: pointer; }
.cmt-tp-row:hover { background: #f1f5f9; }
.cmt-tp-row.is-on { background: #eef4ff; }
.cmt-tp-row--cross { border-bottom: 1px solid #e2e8f0; }
.cmt-tp-row--cross .cmt-tp-nm { font-weight: 600; }
.cmt-tp-nm { display: flex; align-items: center; gap: 4px; min-width: 0; }
.cmt-tp-type { font-family: "IBM Plex Mono", monospace; font-size: 9.5px; color: #94a3b8; text-transform: uppercase; flex: none; }
.cmt-pv { font-family: "IBM Plex Mono", monospace; color: #6d28d9; font-weight: 600; white-space: nowrap; }
.cmt-pv-f { margin-right: 1px; }
.cmt-pv-h { font-size: .68em; vertical-align: super; font-weight: 700; }

/* ————— collapsible groups ————— */
.cmt-gc { position: relative; }
.cmt-gc-chev { position: absolute; top: 6px; right: 8px; background: none; border: none; color: #cbd5e1; font-size: 10px; cursor: pointer; padding: 2px 4px; opacity: 0; }
.cmt-gc:hover > .cmt-gc-chev { opacity: 1; }
.cmt-gc-chev:hover { color: #0f172a; }
.cmt-clp { display: flex; align-items: center; gap: 9px; padding: 5px 4px; cursor: pointer; }
.cmt-clp-chev { color: #94a3b8; font-size: 10px; }
.cmt-clp-op { font-family: "IBM Plex Mono", monospace; font-size: 9.5px; font-weight: 700; text-transform: uppercase; padding: 1px 8px; border-radius: 4px; background: #eff6ff; color: #1d4ed8; }
.cmt-clp-sm { color: #94a3b8; font-size: 12.5px; font-family: "IBM Plex Mono", monospace; }

/* ————— drag reorder ————— */
.cmt-cond--drag { opacity: .4; }
.cmt-cond--over { box-shadow: inset 0 2px 0 #1d4ed8; }

/* date popover editor zone */
.cmt-pop-datezone { display: flex; align-items: center; gap: 7px; padding: 6px 11px 9px; flex-wrap: wrap; }
.cm-rowmenu-rename { display: flex; gap: 5px; padding: 5px 12px 7px; border-bottom: 1px solid #eef2f6; }
.cm-rowmenu-rename input[type=text] { flex: 1; min-width: 0; border: 1px solid #cbd5e1; border-radius: 4px; padding: 4px 7px; font: inherit; font-size: 12px; }
.cm-rowmenu-rename input[type=submit] { font: inherit; font-size: 11.5px; font-weight: 600; color: #1d4ed8; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 4px; padding: 3px 8px; cursor: pointer; }
.cm-hiddenform { display: none; }

/* ————— push confirm (§12): three-step modal ————— */
.cm-push-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(15,23,42,.35); display: flex; align-items: flex-start; justify-content: center; padding-top: 12vh; }
.cm-push-modal { width: 420px; background: #fff; border: 1px solid #e2e8f0; border-radius: 4px; box-shadow: 0 16px 40px rgba(15,23,42,.18); overflow: hidden; }
.cm-push-h { display: flex; align-items: center; gap: 9px; padding: 13px 16px; border-bottom: 1px solid #e2e8f0; }
.cm-push-h h3 { font-size: 14px; font-weight: 600; margin: 0; }
.cm-push-b { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.cm-push-err { margin: 10px 16px 0; font-size: 12.5px; color: #991b1b; background: #fef2f2; border: 1px solid #fecaca; border-radius: 4px; padding: 7px 10px; }
.cm-push-src { border: 1px dashed #cbd5e1; border-radius: 4px; padding: 9px 11px; font-size: 13px; color: #475569; margin-top: 5px; }
.cm-push-radio { display: flex; flex-direction: column; gap: 8px; margin-top: 5px; }
.cm-push-ropt { display: flex; align-items: flex-start; gap: 10px; border: 1px solid #e2e8f0; border-radius: 4px; padding: 10px 12px; cursor: pointer; font-size: 13px; }
.cm-push-ropt.is-on { border-color: #1d4ed8; background: #eff6ff; }
.cm-push-dot { width: 15px; height: 15px; border-radius: 50%; border: 2px solid #cbd5e1; flex: none; margin-top: 2px; }
.cm-push-ropt.is-on .cm-push-dot { border-color: #1d4ed8; background: radial-gradient(circle, #1d4ed8 0 5px, #fff 6px); }
.cm-push-rbody { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cm-push-ropt input { width: 100%; border: 1px solid #cbd5e1; border-radius: 4px; padding: 6px 9px; font: inherit; font-size: 13px; background: #fff; }
.cm-push-ropt > input { flex: 1; }
.cm-push-list { display: flex; flex-direction: column; max-height: 150px; overflow-y: auto; }
.cm-push-opt { text-align: left; border: none; background: none; padding: 6px 8px; font: inherit; font-size: 12.5px; cursor: pointer; border-radius: 4px; }
.cm-push-opt:hover { background: #f1f5f9; }
.cm-push-f { display: flex; gap: 9px; padding: 13px 16px; border-top: 1px solid #e2e8f0; background: #f8fafc; align-items: center; }
.cm-push-sp { flex: 1; }
.cm-push-f .cm-ghost { flex: none; padding: 7px 13px; }
.cm-push-pri { font: inherit; font-size: 13px; font-weight: 600; border-radius: 4px; padding: 8px 15px; cursor: pointer; border: 1px solid #0f172a; background: #0f172a; color: #fff; }
.cm-push-pri[disabled] { background: #f1f5f9; border-color: #f1f5f9; color: #94a3b8; cursor: not-allowed; }
.cm-push-ledger { border: 1px solid #e2e8f0; border-radius: 4px; overflow: hidden; }
.cm-push-lr { display: flex; align-items: center; justify-content: space-between; padding: 10px 13px; font-size: 13px; border-top: 1px solid #eef2f6; }
.cm-push-lr:first-child { border-top: none; }
.cm-push-lr b { font-family: "IBM Plex Mono", monospace; font-size: 13px; font-weight: 600; }
.cm-push-lr--sub { background: #f8fafc; color: #475569; }
.cm-push-op { font-family: "IBM Plex Mono", monospace; font-size: 11px; color: #94a3b8; margin-right: 8px; }
.cm-push-lr--net { background: #f0fdf4; border-top: 1px solid #bbf7d0; }
.cm-push-lr--net span, .cm-push-lr--net b { color: #166534; font-weight: 600; }
.cm-push-guard { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #166534; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 4px; padding: 8px 11px; }
.cm-push-sample { border: 1px solid #e2e8f0; border-radius: 4px; overflow: hidden; }
.cm-push-sh { font-family: "IBM Plex Mono", monospace; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #94a3b8; padding: 7px 12px; background: #f8fafc; border-bottom: 1px solid #e2e8f0; }
.cm-push-srow { display: flex; justify-content: space-between; padding: 6px 12px; font-size: 12.5px; border-top: 1px solid #eef2f6; }
.cm-push-srow:first-child { border-top: none; }
.cm-push-co { color: #475569; }
.cm-push-writing { padding: 40px 16px; text-align: center; font-size: 13px; color: #475569; }
.cm-push-rbig { display: flex; align-items: baseline; gap: 9px; }
.cm-push-n { font-size: 34px; font-weight: 700; letter-spacing: -.02em; color: #166534; font-family: "IBM Plex Mono", monospace; }
.cm-push-l { font-size: 14px; color: #475569; }
.cm-push-failbig { font-size: 20px; font-weight: 700; color: #991b1b; }
.cm-push-rline { display: flex; align-items: center; gap: 9px; font-size: 13px; color: #475569; margin-top: 6px; }
.cm-push-rline b { color: #0f172a; }
.cm-push-tk-ok { font-family: "IBM Plex Mono", monospace; color: #166534; }
.cm-push-tk-skip { font-family: "IBM Plex Mono", monospace; color: #92400e; }
.cm-push-tk-fail { font-family: "IBM Plex Mono", monospace; color: #991b1b; }
.cm-push-audit { font-family: "IBM Plex Mono", monospace; font-size: 11px; color: #94a3b8; border-top: 1px solid #eef2f6; padding-top: 10px; margin-top: 4px; line-height: 1.5; }
.cm-push-open { text-decoration: none; display: inline-flex; align-items: center; }

/* ————— positioning-audit fixes (2026-07-08) ————— */
/* P2: builder popovers float over the tree */
.cmt-pop { position: absolute; z-index: 80; left: 0; }
/* P3/P12: neutralize app-frame heading line-height leaks; center head clusters */
.cm-dhead h2, .cm-push-h h3, .cm-title { line-height: 1.4; }
.cm-phead { align-items: center; }
.cm-phead-left { align-items: baseline; }
/* P1: row-menu forms stack no matter what the app-wide form rules say */
.cm-rowmenu-pop form, .cm-rowmenu-pop form.button_to { display: block; width: 100%; }
.cm-rowmenu-pop form button, .cm-rowmenu-pop form input[type=submit] { width: 100%; text-align: left; }
/* P6: new-report form — stacked labels, aligned rails */
.cm-fieldrow { display: block; margin-bottom: 14px; }
.cm-fieldrow .cm-lbl { display: block; margin-bottom: 5px; }
.cm-input--block, .cm-newform select.cm-input { width: 100%; max-width: 480px; display: block; }
/* P7: library builder runbar */
.cm-builder-foot { display: flex; gap: 8px; align-items: center; margin-top: 13px; padding-top: 12px; border-top: 1px solid #e2e8f0; }
.cm-btn--run { background: #0f172a; border-color: #0f172a; color: #fff; font-weight: 600; }
.cm-builder-foot .cm-btn:not(.cm-btn--run) { margin-left: auto; }
/* P8: single-line radio option centers its dot */
.cm-push-ropt:has(> input) { align-items: center; }
.cm-push-ropt:has(> input) .cm-push-dot { margin-top: 0; }
/* P10: Additional one-off rules live in a bordered card */
.cm-rulescard { border: 1px solid #e2e8f0; border-radius: 4px; background: #fff; padding: 8px 11px; }
.cm-rowmenu-pop form.cm-rowmenu-rename { display: flex; }
.cm-rowmenu-pop form.cm-rowmenu-rename input[type=submit] { width: auto; text-align: center; }
.cm-builder-foot form { margin-left: auto; }

/* ————— fresh-report flow (locked §04-C): campaign type-ahead + draft naming ————— */
.cm-camp--unset { font-style: italic; color: #94a3b8; }
.cm-draftflag { font-family: "IBM Plex Mono", monospace; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #92400e; background: #fef3c7; border: 1px solid #fde68a; border-radius: 3px; padding: 1px 6px; margin-left: 6px; }
.cm-idx--empty { display: flex; align-items: center; justify-content: center; background: #f8fafc; }
.cm-idx-emptynote { color: #94a3b8; font-size: 13px; }
.cm-tab--off { color: #cbd5e1; }
.cm-cp-ghost { flex: 1; text-align: center; font-size: 12.5px; font-weight: 600; color: #94a3b8; padding: 6px; background: #fff; }
.cm-cp-ghost.is-on { background: #e2e8f0; color: #64748b; }
.cm-unset { opacity: .45; pointer-events: none; display: flex; flex-direction: column; gap: 12px; }
.cm-camppick { position: relative; }
.cm-camppick-in { width: 100%; border: 1px solid #cbd5e1; border-radius: 4px; padding: 8px 10px; font: inherit; font-size: 13px; }
.cm-camppick-in:focus { outline: none; border-color: #1d4ed8; box-shadow: 0 0 0 3px rgba(29,78,216,.12); }
.cm-campmenu { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 70; background: #fff; border: 1px solid #e2e8f0; border-radius: 4px; box-shadow: 0 10px 30px rgba(15,23,42,.15); overflow: hidden; max-height: 240px; overflow-y: auto; }
.cm-campopt { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; border: none; background: none; text-align: left; padding: 7px 10px; font: inherit; font-size: 12.5px; cursor: pointer; border-bottom: 1px solid #eef2f6; }
.cm-campopt:last-child { border-bottom: none; }
.cm-campopt:hover { background: #eef4ff; }
.cm-campopt-nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-campopt-ct { font-family: "IBM Plex Mono", monospace; font-size: 10px; color: #94a3b8; flex: none; }
.cm-namebar { border: 1px solid #1d4ed8; border-radius: 4px; background: #fff; padding: 10px 12px; box-shadow: 0 0 0 3px rgba(29,78,216,.12); margin-bottom: 8px; }
.cm-namebar-l { color: #1d4ed8; }
.cm-namebar-in { width: 100%; border: 1px solid #cbd5e1; border-radius: 4px; padding: 7px 9px; font: inherit; font-size: 13px; font-weight: 600; margin-top: 5px; }
.cm-namebar-in:focus { outline: none; border-color: #1d4ed8; }
.cm-namebar .cm-row2 { margin-top: 8px; }
.cm-namebar-save { flex: 1; background: #0f172a; color: #fff; border: 1px solid #0f172a; border-radius: 4px; padding: 7px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }

/* ————— MK3: subnav pills + campaign-context header ————— */
.cm-subnav { display: flex; gap: 6px; padding: 0 0 14px; }
.cm-pill { padding: 5px 11px; background: #fff; border: 1px solid #cbd5e1; border-radius: 4px; font-size: 12.5px; color: #475569; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.cm-pill:hover { color: #0f172a; }
.cm-pill-meta { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; color: #94a3b8; }
.cm-pill--active { background: #0f172a; color: #fff; border-color: #0f172a; font-weight: 500; }
.cm-pill--active .cm-pill-meta { color: rgba(255,255,255,.6); }

.cm-camp-title { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.cm-phead--ctx { padding-bottom: 0; }
.cm-phead-sub { display: flex; align-items: center; gap: 6px; padding: 0 0 10px; position: relative; }
.cm-sub-lbl { font-family: "IBM Plex Mono", monospace; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #94a3b8; margin-right: 2px; }
.cm-rswitch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; border: 1px solid transparent; border-radius: 4px; padding: 3px 8px; margin-left: -4px; background: transparent; font: inherit; }
.cm-rswitch:hover { background: #f8fafc; border-color: #e2e8f0; }
.cm-rswitch.open { background: #f8fafc; border-color: #cbd5e1; }
.cm-rswitch--static { cursor: default; }
.cm-rswitch--static:hover { background: transparent; border-color: transparent; }
.cm-rs-name { font-size: 13px; font-weight: 600; color: #0f172a; }
.cm-rs-name--draft { font-style: italic; font-weight: 500; color: #94a3b8; }
.cm-rs-caret { font-family: "IBM Plex Mono", monospace; font-size: 10px; color: #94a3b8; }
.cm-rswitch.open .cm-rs-caret { color: #475569; }
.cm-rowmenu--sub > summary { width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; padding: 0; }

.cm-switch { position: absolute; top: calc(100% - 4px); left: 52px; z-index: 60; background: #fff; border: 1px solid #cbd5e1; border-radius: 4px; box-shadow: 0 10px 28px rgba(15,23,42,.16); width: 330px; overflow: hidden; }
.cm-switch-h { padding: 6px 12px; font-family: "IBM Plex Mono", monospace; font-size: 9.5px; text-transform: uppercase; letter-spacing: .05em; color: #94a3b8; background: #f8fafc; border-bottom: 1px solid #e2e8f0; }
.cm-switch-r { display: flex; align-items: center; gap: 9px; padding: 8px 12px; cursor: pointer; border-bottom: 1px solid #eef2f6; text-decoration: none; color: #0f172a; }
.cm-switch-r:hover { background: #f8fafc; }
.cm-switch-r.is-on { background: #eff6ff; }
.cm-switch-check { width: 11px; color: #1d4ed8; flex: none; font-size: 11px; }
.cm-switch-nm { flex: 1; font-size: 12.5px; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-switch-cat { font-family: "IBM Plex Mono", monospace; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #94a3b8; margin-left: 6px; }
.cm-switch-meta { font-family: "IBM Plex Mono", monospace; font-size: 10px; color: #94a3b8; flex: none; }
.cm-switch-new { display: block; width: 100%; text-align: left; padding: 9px 12px; color: #1d4ed8; font-weight: 500; font-size: 12.5px; cursor: pointer; background: none; border: none; font-family: inherit; }
.cm-switch-new:hover { background: #f8fafc; }

.cm-rename { display: inline-flex; align-items: center; gap: 6px; }
.cm-rename-form { display: inline-flex; align-items: center; gap: 6px; }
.cm-rename-in { border: 1px solid #1d4ed8; box-shadow: 0 0 0 3px rgba(29,78,216,.12); border-radius: 4px; padding: 3px 8px; font: inherit; font-size: 13px; font-weight: 600; color: #0f172a; width: 230px; }
.cm-rename-in:focus { outline: none; }
.cm-rename-ok { border: none; background: #0f172a; color: #fff; border-radius: 4px; padding: 4px 10px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.cm-rename-cancel { border: none; background: transparent; color: #475569; font: inherit; font-size: 12px; cursor: pointer; padding: 4px 6px; }

/* known-item jump on the landing */
.cm-jump { position: relative; width: 340px; }
.cm-jump-in { width: 100%; padding: 7px 11px; background: #fff; border: 1px solid #cbd5e1; border-radius: 4px; font: inherit; font-size: 13px; color: #0f172a; }
.cm-jump-in:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px #eff6ff; }
.cm-jump-pop { position: absolute; top: calc(100% + 5px); left: 0; right: 0; background: #fff; border: 1px solid #cbd5e1; border-radius: 4px; box-shadow: 0 8px 24px rgba(15,23,42,.13); overflow: hidden; z-index: 50; }
.cm-jump-head { padding: 6px 12px; font-family: "IBM Plex Mono", monospace; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: #94a3b8; background: #f1f5f9; border-bottom: 1px solid #e2e8f0; }
.cm-jump-row { padding: 8px 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; border-bottom: 1px solid #eef2f6; width: 100%; border-left: none; border-right: none; border-top: none; background: none; font: inherit; text-align: left; }
.cm-jump-row:last-child { border-bottom: none; }
.cm-jump-row:hover { background: #eff6ff; }
.cm-jump-nm { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-jump-meta { font-family: "IBM Plex Mono", monospace; font-size: 11px; color: #94a3b8; flex: none; }

/* ————— wide-workbench width (Nick, 2026-07-08): this module's surfaces use
   the window instead of the frame's 1280 cap — the report surface carries a
   404/604px drawer beside a 15-column table, and the indexes should not
   strand most of a wide monitor. Fluid to 1760, centered beyond that. ————— */
.viewport > .shell:has(.cm-page), .viewport > .shell:has(.cm-subnav) { max-width: 1760px; }
/* flex-child trap (see campaigns.css .campaign-page note): without an
   explicit width the page sizes to its content inside the shell's column. */
.cm-page { width: 100%; }
/* empty result region fills the index column — one clean box, no leftover
   bordered band below it */
.cm-idx .cpv1-empty-block { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 0; border: none; background: #f8fafc; }

/* ————— segment detail (stage-2 §07): compact-detail shell ————— */
.cm-sd-reader { max-width: 820px; margin: 0 auto; padding: 0 4px; }
.cm-sd-head { padding: 20px 0 18px; border-bottom: 1px solid #e2e8f0; display: flex; align-items: baseline; gap: 22px; }
.cm-sd-head-block { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cm-sd-prefix { font-family: "IBM Plex Mono", monospace; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: #94a3b8; font-weight: 700; }
.cm-sd-name { font-size: 26px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.15; color: #0f172a; border: 1px solid transparent; border-radius: 4px; padding: 1px 6px; margin-left: -6px; cursor: text; display: inline-block; background: none; font-family: inherit; text-align: left; }
.cm-sd-name:hover { border-color: #cbd5e1; }
.cm-sd-rename-in { font-size: 20px; font-weight: 700; width: 380px; }
.cm-sd-head-r { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.cm-sd-badge { display: inline-flex; align-items: center; padding: 3px 8px; font-size: 12px; font-weight: 600; border: 1px dotted #475569; border-radius: 3px; background: #fff; color: #475569; cursor: pointer; white-space: nowrap; line-height: 1.3; list-style: none; }
.cm-sd-badge::-webkit-details-marker { display: none; }
.cm-sd-caret { font-size: 9px; margin-left: 5px; opacity: .7; }
.cm-sd-head-r .cm-rowmenu > summary:not(.cm-sd-badge) { border: 1px solid #cbd5e1; border-radius: 3px; color: #475569; font-size: 13px; padding: 4px 9px; line-height: 1; width: auto; height: auto; }
.cm-sd-section { margin-top: 28px; }
.cm-sd-heading { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: #0f172a; font-weight: 700; margin: 0 0 12px; border-bottom: 2px solid #0f172a; padding-bottom: 5px; display: flex; align-items: baseline; justify-content: space-between; }
.cm-sd-heading-meta { color: #94a3b8; font-weight: 500; letter-spacing: 0; }
.cm-sd-def { border: 1px solid #e2e8f0; border-radius: 4px; background: #fff; padding: 14px 16px; }
.cm-sd-savebar { display: flex; justify-content: flex-end; gap: 6px; margin-top: 12px; }
.cm-sd-savebar .cm-ghost { flex: none; padding: 7px 12px; }
.cm-sd-save { background: #0f172a; color: #fff; border: 1px solid #0f172a; border-radius: 4px; padding: 7px 14px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.cm-sd-save:hover { background: #1e293b; }
.cm-sd-row { display: grid; grid-template-columns: 180px 1fr; gap: 4px 18px; padding: 8px 0; border-bottom: 1px solid #e2e8f0; align-items: baseline; }
.cm-sd-row:last-of-type { border-bottom: none; }
.cm-sd-row-l { font-family: "IBM Plex Mono", monospace; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: #94a3b8; font-weight: 600; padding-top: 3px; }
.cm-sd-row-v { font-size: 13.5px; }
.cm-sd-row-v--mono { font-family: "IBM Plex Mono", monospace; font-size: 12.5px; color: #475569; }
.cm-sd-rc-wrap { border: 1px solid #e2e8f0; border-radius: 4px; overflow: hidden; }
.cm-sd-rc { display: grid; grid-template-columns: minmax(0,1.6fr) 120px 1fr 80px; gap: 12px; padding: 9px 14px; border-bottom: 1px solid #eef2f6; align-items: center; font-size: 13px; }
.cm-sd-rc:last-child { border-bottom: none; }
.cm-sd-rc:hover:not(.cm-sd-rc--head) { background: #f8fafc; }
.cm-sd-rc--head { background: #f1f5f9; border-bottom: 1px solid #e2e8f0; padding: 7px 14px; font-family: "IBM Plex Mono", monospace; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: #94a3b8; font-weight: 600; }
.cm-sd-rc-name a { color: #0f172a; font-weight: 500; text-decoration: none; }
.cm-sd-rc-name a:hover { color: #1d4ed8; text-decoration: underline; }
.cm-sd-rc-report { font-family: "IBM Plex Mono", monospace; font-size: 12px; color: #475569; }
.cm-sd-rc-meta { font-size: 12px; color: #475569; }
.cm-sd-rc-link { color: #1d4ed8; font-size: 12px; text-align: right; text-decoration: none; }
.cm-sd-empty { color: #94a3b8; font-size: 13px; }
.cm-cond-summary { font-family: "IBM Plex Mono", monospace; font-size: 11.5px; color: #475569; }

/* export log */
.cm-export-note { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; color: #94a3b8; }

/* unsaved-criteria gate on Export/Push */
.cm-runbtn.is-gated, .cm-ghost.is-gated { opacity: .45; cursor: not-allowed; }
