/*
 * Campaign show page v1 — "ingredients and recipes" layout.
 *
 * Lifted from docs/handoff/campaign-page-v1/demo.html (the design
 * agent's canonical demo). Class names scoped under .cpv1-body so they
 * don't collide with the existing .campaign-* classes used by the
 * edit/new forms.
 *
 * See docs/handoff/campaign-page-v1/DESIGN-DECISIONS.md for the why
 * and docs/AM_CAMPAIGN_PAGE_IMPLEMENTATION_PLAN.md for the build plan.
 */

.cpv1-body {
  /* Repointed to the design-system tokens (design_tokens.css) so the whole
     Campaign page renders in the design-system palette. The component CSS
     below references these --cp-* names unchanged. */
  --cp-bg: var(--surface);
  --cp-surface: var(--surface);
  --cp-surface-2: var(--surface-2);
  --cp-border: var(--border);
  --cp-border-strong: var(--border-strong);
  --cp-text: var(--fg);
  --cp-text-muted: var(--fg-muted);
  --cp-text-faint: var(--fg-faint);
  --cp-accent: var(--color-blue-700);
  --cp-accent-soft: var(--color-blue-50);
  --cp-success: var(--color-success-text);
  --cp-success-soft: var(--color-success-bg);
  --cp-warning: var(--color-warning-text);
  --cp-warning-soft: var(--color-warning-bg);
  --cp-danger: var(--color-danger-text);
  --cp-danger-soft: var(--color-danger-bg);
  --cp-drop-target: var(--color-blue-200);
  --cp-drop-target-bg: var(--color-blue-50);
  --cp-radius: var(--r-card);
  --cp-radius-lg: var(--r-modal);

  /* Width + padding live on the shared .campaign-page shell now. The
   * body element only carries the variables, base font-size, and color
   * defaults — all descendants reference these via `var(--cp-*)`. */
  font-size: 13px;
  line-height: 1.45;
  color: var(--cp-text);
}

.cpv1-body a { color: var(--cp-accent); text-decoration: none; }
.cpv1-body a:hover { text-decoration: underline; }
.cpv1-body button { font-family: inherit; cursor: pointer; }

/* ---------- chips and badges ---------- */

.cpv1-body .cpv1-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: var(--cp-surface-2);
  border: 1px solid var(--cp-border);
  border-radius: var(--r-pill);                    /* 4px square per design-system badge/chip spec (was 10px rounded) */
  font-size: 12px;
  color: var(--cp-text);
  line-height: 1.5;
  white-space: nowrap;
}
.cpv1-body .cpv1-chip:hover { background: var(--color-slate-200); text-decoration: none; }
.cpv1-body .cpv1-chip--event { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.cpv1-body .cpv1-chip--topic { background: #f3e8ff; border-color: #d8b4fe; color: #6b21a8; }
.cpv1-body .cpv1-chip--ghost {
  background: transparent;
  border-style: dashed;
  color: var(--cp-text-muted);
  cursor: pointer;
  font-family: inherit;
}
.cpv1-body .cpv1-chip-wrap {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  position: relative;
}
.cpv1-body .cpv1-chip-detach {
  background: none;
  border: none;
  color: var(--cp-text-faint);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  opacity: 1;                                      /* always visible per badge/chip spec + P0.4 (was hover-revealed) */
  font-family: inherit;
}
.cpv1-body .cpv1-chip-detach:hover { color: var(--cp-danger); }
.cpv1-body .cpv1-chip--ghost:hover { color: var(--cp-text); border-color: var(--cp-border-strong); }
/* Clickable value chip (opens a picker) — multi-axis encoding: dotted border + ▾ caret. */
.cpv1-body .cpv1-chip--clickable { border-style: dotted; }
.cpv1-body .cpv1-chip-caret { font-size: 8px; margin-left: 4px; opacity: 0.6; }
.cpv1-body .cpv1-overflow-hidden { display: none; }

/* Facts-column chips must fit the 300px column. Long event/topic names
   ellipsis-truncate instead of overflowing the column (and the page). The
   chip becomes an inline-block so text-overflow applies; the wrapper caps at
   the available value width and the chip shrinks within it, leaving the × visible. */
.cpv1-body .cpv1-facts-v .cpv1-chip-wrap { max-width: 100%; min-width: 0; }
.cpv1-body .cpv1-facts-v .cpv1-chip {
  display: inline-block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

/* ---------- inline editing ---------- */

/* Old dashed-underline pattern replaced by the chevron + hover-tint
 * pattern defined below. */
/* Click-to-edit hover: tint-50 fill around the trigger. Negative margin
 * + matching padding keeps surrounding layout from shifting on hover.
 * (Discoverability cue for editable fields is being designed separately;
 *  the chevron approach was reverted on 2026-05-16.) */
.cpv1-body .cpv1-inline-field {
  border-radius: 4px;
  padding: 0 4px;
  margin: 0 -4px;
}
.cpv1-body .cpv1-inline-field:hover {
  background: var(--tint-50, var(--cp-surface-2));
  border-bottom-color: transparent;
}
.cpv1-body .cpv1-inline-field:focus-visible {
  outline: 2px solid var(--tint-200, var(--cp-border-strong));
  outline-offset: 0;
  background: var(--tint-50, var(--cp-surface-2));
}
/* When an inline-field is also a chip (e.g. the Vertical field) the
 * chip's own padding/border-radius win — the inline-field's negative-
 * margin offset doesn't apply. */
.cpv1-body .cpv1-chip.cpv1-inline-field {
  padding: 2px 8px;
  margin: 0;
  border-radius: var(--r-pill);
}
.cpv1-body .cpv1-chip.cpv1-inline-field:hover {
  background: var(--tint-50, var(--color-slate-100));
  border-color: var(--cp-border-strong);
}

/* Inline-edit input — for click-to-edit fields on the hero (kicker, title)
 * and inside panels (Notes, Send card fields). Preserves the parent
 * field's typography via font: inherit so the in-edit state visually
 * matches the at-rest state. See OPEN_STATES_SPEC Primitive 4. */
.cpv1-body .cpv1-inline-input {
  font: inherit;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--tint-300, var(--cp-border));
  border-radius: var(--cp-radius);
  padding: 1px 4px;
  background: white;
  color: var(--cp-text);
  outline: none;
}
.cpv1-body .cpv1-inline-input:focus {
  border-color: var(--tint-800, var(--cp-accent));
  box-shadow: 0 0 0 2px var(--tint-100, transparent);
}
.cpv1-body .cpv1-inline-input--textarea {
  width: 100%;
  resize: vertical;
}
/* Save / Cancel for textarea inline-edits (Notes). Saving is an
 * affirmative step — blur does NOT auto-commit. */
.cpv1-body .cpv1-inline-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  justify-content: flex-end;
}
/* Canon Button atom: primary is slate-900 fill — blue is reserved for
 * links and focus rings, never button fills (components/button). */
.cpv1-body .cpv1-inline-save {
  padding: 5px 14px;
  background: var(--color-slate-900);
  color: white;
  border: 1px solid var(--color-slate-900);
  border-radius: var(--cp-radius);
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
}
.cpv1-body .cpv1-inline-save:hover {
  background: var(--color-slate-700);
  border-color: var(--color-slate-700);
}
.cpv1-body .cpv1-inline-cancel {
  padding: 5px 12px;
  background: transparent;
  color: var(--cp-text-muted);
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius);
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
}
.cpv1-body .cpv1-inline-cancel:hover {
  color: var(--cp-text);
  border-color: var(--cp-border-strong);
}
/* Title fills the title-block's full width so the click target /
 * hover background / edit input all sit in the same fixed box.
 * Text doesn't jump between display and edit states.
 *
 * When the h1 has a static prefix (e.g. "Campaign:"), it becomes a
 * flex row so prefix + editable name sit on the same baseline. */
.cpv1-body .cpv1-hero-title { display: flex; align-items: baseline; gap: 0.35em; min-width: 0; }
.cpv1-body .cpv1-hero-title-prefix { flex-shrink: 0; color: var(--cp-text); }
.cpv1-body .cpv1-inline-field--title {
  display: block;
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
  padding: 2px 6px;
  margin: 0 -6px;       /* recover net layout: -6px shifts left, +6px padding shifts text back */
}
/* Edit mode: span padding goes to 0, input owns all padding so text-position
 * doesn't shift between display and edit. Input uses box-shadow for its
 * "editable border" cue so it has zero layout impact. */
.cpv1-body .cpv1-inline-field--title.cpv1-inline-field--editing {
  padding: 0;
}
.cpv1-body .cpv1-inline-field--title .cpv1-inline-input {
  width: 100%;
  box-sizing: border-box;
  padding: 2px 6px;
  border: 0;
  box-shadow: inset 0 0 0 1px var(--tint-300, var(--cp-border));
}
.cpv1-body .cpv1-inline-field--title .cpv1-inline-input:focus {
  box-shadow: inset 0 0 0 1px var(--tint-800, var(--cp-accent)),
              0 0 0 2px var(--tint-100, transparent);
  border: 0;
}

/* ---------- planning-state transition menu ---------- */

.cpv1-body .cpv1-badge--clickable {
  cursor: pointer;
  border: none;
  font-family: inherit;
}
/* Every state-menu anchors to its own trigger wrapper (canon: menus
 * anchor below the trigger, flipping on clip — never the page edge).
 * Without this, body-row menus anchored to the nearest positioned
 * ancestor, which could be the page itself. */
.cpv1-body [data-controller~="cpv1-state-menu"] { position: relative; }
.cpv1-body .cpv1-state-menu {
  display: none;
  position: absolute;
  /* Deterministic anchor: directly below the trigger wrapper. Without
   * an explicit top, absolute elements fall at their static position,
   * which inside flex wrappers can land beside or above the trigger. */
  top: calc(100% + 6px);
  right: 0;
  min-width: 220px;
  background: var(--cp-surface);
  border: 1px solid var(--cp-border-strong);
  border-radius: var(--cp-radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  padding: 4px 0;
  z-index: 20;
}
.cpv1-body .cpv1-state-menu.cpv1-state-menu--open { display: block; }
/* Left-anchored variant — used by the facts-column Vertical menu, which
 * sits at the left of its value cell (the hero state menu anchors right). */
.cpv1-body .cpv1-state-menu--left { left: 0; right: auto; }
/* State menu items per STATE_CHANGE_MENU_SPEC.md — flex row with a
 * colored dot, label, and (current only) a "current" marker. */
.cpv1-body .cpv1-state-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 6px 10px 6px 8px;
  background: none;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  color: var(--cp-text);
  cursor: pointer;
  font-family: inherit;
}
.cpv1-body .cpv1-state-menu-item:hover { background: var(--cp-surface-2); }
.cpv1-body .cpv1-state-menu-item--current {
  cursor: default;
}
.cpv1-body .cpv1-state-menu-item--current:hover { background: transparent; }
.cpv1-body .cpv1-state-menu-item--current .cpv1-state-label {
  color: var(--cp-text-muted);
}
.cpv1-body .cpv1-state-label { flex: 1; }
.cpv1-body .cpv1-state-menu-tag {
  font-size: 11px;
  color: var(--cp-text-faint);
  font-weight: 500;
}
/* Delete row at the bottom of the state menu, separated by a divider.
 * Per AUDIENCE_MARKETING_AUDIT_AND_UNDO.md §5.1. The divider signals
 * "Delete is not a peer choice with the workflow states." */
.cpv1-body .cpv1-state-menu-divider {
  height: 1px;
  background: var(--cp-border);
  margin: 4px 4px;
}
.cpv1-body .cpv1-state-menu-item--delete {
  color: #991b1b;
}
.cpv1-body .cpv1-state-menu-item--delete .cpv1-state-menu-icon {
  width: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #991b1b;
  font-weight: 600;
}
.cpv1-body .cpv1-state-menu-item--delete:hover { background: #fef2f2; }
/* Undo-delete row — single item shown when the menu is opened on a
 * soft-deleted record. Per AUDIENCE_MARKETING_AUDIT_AND_UNDO.md §5.4. */
.cpv1-body .cpv1-state-menu-item--undo-delete {
  color: var(--link-blue, #2563eb);
}
.cpv1-body .cpv1-state-menu-item--undo-delete .cpv1-state-menu-icon {
  width: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--link-blue, #2563eb);
}
.cpv1-body .cpv1-state-menu-item--undo-delete:hover { background: #eff6ff; }

/* Colored dot — fills + matching lighter border per spec section 3. */
.cpv1-body .cpv1-state-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid;
}
.cpv1-body .cpv1-state-dot--draft     { background: var(--color-slate-300); border-color: var(--color-slate-300); }
.cpv1-body .cpv1-state-dot--in_review { background: #93c5fd; border-color: #bfdbfe; }
.cpv1-body .cpv1-state-dot--approved  { background: #86efac; border-color: #bbf7d0; }
.cpv1-body .cpv1-state-dot--revising  { background: #fcd34d; border-color: #fde68a; }
.cpv1-body .cpv1-state-dot--archived  { background: var(--cp-surface-2); border-color: var(--color-slate-300); }
.cpv1-body .cpv1-head-state { position: relative; }

/* ---------- paste-URL panel-head input ---------- */

.cpv1-body .cpv1-panel-head-paste {
  display: flex;
  gap: 6px;
  align-items: center;
  flex: 1;
  max-width: 60%;
  margin-left: 16px;
}
.cpv1-body .cpv1-paste-url-input {
  flex: 1;
  padding: 4px 8px;
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius);
  font-size: 12.5px;
  font-family: inherit;
  background: white;
}
.cpv1-body .cpv1-paste-url-input:focus {
  outline: none;
  border-color: var(--tint-800, var(--cp-accent));
  box-shadow: 0 0 0 2px var(--tint-100, transparent);
}
.cpv1-body .cpv1-paste-url-submit {
  padding: 4px 12px;
  border: 1px solid var(--color-blue-600);
  background: var(--color-blue-600);              /* neutral blue, was --cp-accent slate */
  color: white;
  border-radius: var(--cp-radius);
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
}
.cpv1-body .cpv1-paste-url-submit:hover {
  background: var(--color-blue-700, #1d4ed8);
  border-color: var(--color-blue-700, #1d4ed8);
}
.cpv1-body .cpv1-panel-error {
  padding: 8px 14px;
  background: var(--cp-danger-soft);
  color: var(--cp-danger);
  font-size: 12.5px;
  border-bottom: 1px solid var(--cp-border);
}

/* ---------- per-Send pickers ---------- */

/* Per-Send picker: floats anchored to its drop zone (Primitive 1 in the
 * open-states spec). Width grows with content to whatever the longest
 * row needs, capped only by viewport. Horizontal scroll kicks in when
 * the longest row exceeds the cap — every character must be visible
 * somehow. */
.cpv1-body .cpv1-send-picker {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 100;
  min-width: 480px;
  width: max-content;
  max-width: calc(100vw - 60px);
  margin-top: 4px;
  padding: 10px 14px;
  background: var(--cp-surface);
  border: 1px solid var(--tint-200);
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08),
              0 1px 3px rgba(0, 0, 0, 0.04);
  max-height: 360px;
  overflow: auto;                                /* both axes */
}
.cpv1-body .cpv1-send-picker-search {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}
.cpv1-body .cpv1-send-picker-search input[type="text"] {
  flex: 1;
  padding: 4px 8px;
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius);
  font-size: 12.5px;
  font-family: inherit;
}

.cpv1-body .cpv1-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.12s;
}
/* State badge per STATE_CHANGE_MENU_SPEC.md §2. Five filled-pill variants
 * with light tint + matching border + darker text. Archived gets a
 * line-through. */
.cpv1-body .cpv1-badge--state-draft {
  background: #ffffff;
  border: 1px solid var(--color-slate-300);
  color: var(--color-slate-600);
}
.cpv1-body .cpv1-badge--state-draft.cpv1-badge--clickable:hover { background: var(--color-slate-100); }
.cpv1-body .cpv1-badge--state-in_review {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}
.cpv1-body .cpv1-badge--state-in_review.cpv1-badge--clickable:hover { background: #dbeafe; }
.cpv1-body .cpv1-badge--state-approved {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}
.cpv1-body .cpv1-badge--state-approved.cpv1-badge--clickable:hover { background: #dcfce7; }
.cpv1-body .cpv1-badge--state-revising {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}
.cpv1-body .cpv1-badge--state-revising.cpv1-badge--clickable:hover { background: #fef3c7; }
.cpv1-body .cpv1-badge--state-archived {
  background: var(--cp-surface-2);
  border: 1px solid var(--cp-border);
  color: var(--cp-text-muted);
  text-decoration: line-through;
  text-decoration-color: var(--cp-text-faint);
}
.cpv1-body .cpv1-badge--state-archived.cpv1-badge--clickable:hover { background: var(--color-slate-100); }
/* Deleted-state badge — top-right of the hero when the record is
 * soft-deleted. Strikethrough on the text, deep-red text. Stays
 * interactive (the only thing on the page that does) so the
 * operator can open the Undo-delete menu.
 * Per AUDIENCE_MARKETING_AUDIT_AND_UNDO.md §5.3. */
.cpv1-body .cpv1-badge--state-deleted {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  text-decoration: line-through;
  text-decoration-color: rgba(153, 27, 27, 0.5);
}
.cpv1-body .cpv1-badge--state-deleted.cpv1-badge--clickable:hover { background: #fee2e2; }
/* Legacy .cpv1-badge--send-status-* variants were folded into the
 * canonical .cpv1-badge--sending-* family added with the May 2026
 * Send-page rebuild (see section at the bottom of this file). Same
 * six states, same semantic, single source of truth. */
.cpv1-body .cpv1-badge--archived { background: var(--cp-surface-2); color: var(--cp-text-muted); }

/* Clickable badge (opens a menu) — design-system multi-axis encoding:
   dotted border in the badge's own semantic color + a ▾ caret. */
.cpv1-body .cpv1-badge--clickable { border: 1px dotted currentColor; }
.cpv1-body .cpv1-badge--clickable::after {
  content: "▾";
  margin-left: 4px;
  font-size: 9px;
  opacity: 0.7;
}

.cpv1-body .cpv1-creative-state {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}
.cpv1-body .cpv1-creative-state--approved { background: var(--cp-success-soft); color: var(--cp-success); }
.cpv1-body .cpv1-creative-state--drafted { background: var(--cp-accent-soft); color: var(--cp-accent); }
.cpv1-body .cpv1-creative-state--proofed { background: var(--cp-accent-soft); color: var(--cp-accent); }
.cpv1-body .cpv1-creative-state--second_proofed { background: var(--cp-accent-soft); color: var(--cp-accent); }
.cpv1-body .cpv1-creative-state--placeholder { background: var(--cp-surface-2); color: var(--cp-text-faint); }
.cpv1-body .cpv1-creative-state--please_revise { background: var(--cp-warning-soft); color: var(--cp-warning); }

/* ---------- page head ---------- */

.cpv1-body .cpv1-breadcrumb {
  font-size: 12px;
  color: var(--cp-text-muted);
  margin-bottom: 8px;
}
.cpv1-body .cpv1-breadcrumb a { color: var(--cp-text-muted); }

/* ---------- page head (Rich Detail archetype) ---------- */

.cpv1-body .cpv1-head {
  padding: 4px 0 16px;
  border-bottom: 1px solid var(--cp-border);
  display: flex;
  align-items: baseline;
  gap: 22px;
}
.cpv1-body .cpv1-head-block { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cpv1-body .cpv1-head-prefix {
  font-family: var(--font-mono);
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--cp-text-faint); font-weight: 700;
}
.cpv1-body .cpv1-head-name {
  font-size: 32px; font-weight: 700; line-height: 1.1;
  letter-spacing: -0.02em; color: var(--cp-text); margin: 0;
  overflow-wrap: break-word;
}
.cpv1-body .cpv1-head-meta {
  font-family: var(--font-mono); font-size: 11.5px;
  color: var(--cp-text-faint); margin-top: 6px;
}
.cpv1-body .cpv1-head-r {
  display: flex; flex-direction: column; align-items: flex-end;
  gap: 10px; flex-shrink: 0;
}
.cpv1-body .cpv1-head-launch-l {
  font-family: var(--font-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--cp-text-faint); font-weight: 700; text-align: right;
}
.cpv1-body .cpv1-head-launch-v {
  font-family: var(--font-mono); font-size: 26px; font-weight: 700;
  line-height: 1.1; text-align: right; color: var(--cp-text);
}
.cpv1-body .cpv1-head-launch-v--empty { color: var(--cp-text-faint); }
.cpv1-body .cpv1-head-drift {
  font-size: 11px; color: var(--cp-warning); margin-top: 4px;
  display: flex; align-items: center; gap: 6px; justify-content: flex-end;
}

/* ---------- two-column body: work (1fr) + facts (300px) ---------- */

.cpv1-body .cpv1-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 0;
}
.cpv1-body .cpv1-work {
  padding: 18px 28px 36px 0;
  border-right: 1px solid var(--cp-border);
  min-width: 0;
}
.cpv1-body .cpv1-facts {
  padding: 18px 0 36px 22px;
  align-self: start;
  position: sticky;
  top: 16px;
}
.cpv1-body .cpv1-facts-section {
  font-family: var(--font-mono); font-size: 10.5px;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--cp-text); font-weight: 700;
  margin: 22px 0 8px; border-bottom: 2px solid var(--cp-text); padding-bottom: 5px;
}
/* Zero the top margin only on the FIRST section of the column (Identity).
 * Scope to a direct child of .cpv1-facts: the Salesforce section is nested
 * in the picker-filter wrapper, so a bare :first-child matched it too and
 * collapsed the gap above "Salesforce". */
.cpv1-body .cpv1-facts > .cpv1-facts-section:first-child { margin-top: 0; }
.cpv1-body .cpv1-facts-row {
  display: grid; grid-template-columns: 72px minmax(0, 1fr);
  gap: 4px 14px; padding: 6px 0;
  border-bottom: 1px solid var(--cp-border);
  align-items: baseline;
}
.cpv1-body .cpv1-facts-row:last-of-type { border-bottom: none; }
.cpv1-body .cpv1-facts-l {
  font-family: var(--font-mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--cp-text-faint); font-weight: 600; padding-top: 3px;
}
.cpv1-body .cpv1-facts-v {
  font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center;
  color: var(--cp-text);
}
.cpv1-body .cpv1-facts-v--mono { font-family: var(--font-mono); font-size: 12px; }
.cpv1-body .cpv1-facts-v--prose { display: block; line-height: 1.55; font-size: 13px; }
.cpv1-body .cpv1-facts-empty { color: var(--cp-text-faint); }
/* Absent value form (Field atom form 8 / P0.5 empty-cell): italic faint
 * "No X yet" — the absence line IS the click-to-edit target. Unscoped
 * cpv1 sibling of .compact-absent (compact_detail.css). */
.cpv1-body .cpv1-absent {
  color: var(--fg-faint);
  font-style: italic;
  font-size: 12.5px;
}
/* Salesforce URL value — long SF campaign URLs wrap inside the 300px column. */
.cpv1-body .cpv1-facts-url { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 12px; }
.cpv1-body .cpv1-facts-section--with-action {
  display: flex; align-items: baseline; justify-content: space-between;
}
.cpv1-body .cpv1-facts-section-action {
  font-family: var(--font-sans); font-size: 11px; font-weight: 500;
  letter-spacing: 0; text-transform: none;
  color: var(--color-blue-600); background: none; border: 0; padding: 0; cursor: pointer;
}
.cpv1-body .cpv1-facts-section-action:hover { text-decoration: underline; }

/* Read-only mode: drag affordances suppressed. The Stimulus handlers
 * already preventDefault on dragstart and no-op on click, so this is
 * purely the visual hint — cursors and hover state shouldn't suggest
 * the operator can do something they can't. Per
 * CONCURRENT_EDITING_BRIEFING.md §3.7. */
[data-am-edit-mode="readonly"] [draggable="true"],
[data-am-edit-mode="readonly"] .cpv1-drop-zone,
[data-am-edit-mode="readonly"] .cpv1-list-row,
[data-am-edit-mode="readonly"] .cpv1-list-row:active,
[data-am-edit-mode="readonly"] .cpv1-ingredient-card,
[data-am-edit-mode="readonly"] .cpv1-ingredient-card:active {
  cursor: default;
}
[data-am-edit-mode="readonly"] .cpv1-drop-zone.drag-over {
  /* In case a stray dragover from another part of the page lights
   * one up before the dragstart guard runs, mask it. */
  background: inherit;
}

/* state badge — sits top-right of the page head; its menu anchors to it */
.cpv1-body .cpv1-head-state {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* ---------- panels ---------- */

/* Flat work-column panels (Rich Detail): no box, separated by a top hairline,
   mono uppercase titles, actions right-aligned. */
.cpv1-body .cpv1-panel {
  border-top: 1px solid var(--cp-border);
  margin-bottom: 20px;
}
.cpv1-body .cpv1-panel:first-child { border-top: none; }
.cpv1-body .cpv1-panel-head {
  padding: 12px 0 10px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}
.cpv1-body .cpv1-panel-title { flex: 0 0 auto; }
.cpv1-body .cpv1-panel-head-paste { flex: 1; max-width: none; margin-left: 0; }
.cpv1-body .cpv1-panel-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cp-text);
}
.cpv1-body .cpv1-panel-head .cpv1-panel-actions { margin-left: auto; }
.cpv1-body .cpv1-panel-action {
  font-size: 12.5px;
  color: var(--color-blue-600);                   /* neutral blue, was --cp-accent slate */
  background: none;
  border: none;
  padding: 0;
  white-space: nowrap;                            /* keep "+ Attach existing" on one line */
}
.cpv1-body .cpv1-panel-action:hover { color: var(--cp-text); text-decoration: underline; }
.cpv1-body .cpv1-panel-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.cpv1-body .cpv1-panel-action-sep { color: var(--cp-text-faint); font-size: 12px; }

.cpv1-body .cpv1-quick-add-form {
  padding: 4px;
}
.cpv1-body .cpv1-quick-add-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 6px;
}
.cpv1-body .cpv1-quick-add-row label {
  font-size: 11.5px;
  color: var(--cp-text-muted);
  text-align: right;
}
.cpv1-body .cpv1-quick-add-row input[type="text"],
.cpv1-body .cpv1-quick-add-row input[type="date"],
.cpv1-body .cpv1-quick-add-row input[type="url"],
.cpv1-body .cpv1-quick-add-row select {
  padding: 5px 8px;
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius);
  font-size: 12.5px;
  font-family: inherit;
  background: white;
  width: 100%;
}
.cpv1-body .cpv1-quick-add-input-with-action {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  align-items: center;
}
.cpv1-body .cpv1-quick-add-fill-btn {
  padding: 4px 10px;
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius);
  background: white;
  font-size: 11.5px;
  font-family: inherit;
  color: var(--cp-text-muted);
  cursor: pointer;
  white-space: nowrap;
}
.cpv1-body .cpv1-quick-add-fill-btn:hover {
  background: var(--cp-row-hover, var(--color-slate-50));
  color: var(--cp-text, inherit);
}

/* ---------- form combobox (cpv1-combobox) ----------
 * Design-system picker overlay (picker-shell) wired to a hidden form field;
 * replaces native <select> for list-valued create-form fields. The trigger
 * matches the form's text inputs; the overlay matches the picker-shell. */
.cpv1-body .cpv1-combobox { position: relative; }
.cpv1-body .cpv1-combobox-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 5px 8px;
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius);
  background: white;
  font-size: 12.5px;
  font-family: inherit;
  color: var(--cp-text);
  cursor: pointer;
  text-align: left;
}
.cpv1-body .cpv1-combobox-trigger:hover { border-color: var(--cp-border-strong); }
.cpv1-body .cpv1-combobox-trigger:focus-visible { outline: 2px solid var(--cp-border-strong); outline-offset: 0; }
.cpv1-body .cpv1-combobox-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cpv1-body .cpv1-combobox-label--empty { color: var(--cp-text-faint); }
.cpv1-body .cpv1-combobox-chevron { color: var(--cp-text-faint); font-size: 10px; flex-shrink: 0; }
.cpv1-body .cpv1-combobox-overlay {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 60;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--sh-menu);
  overflow: hidden;
}
.cpv1-body .cpv1-combobox-overlay[hidden] { display: none; }
.cpv1-body .cpv1-combobox-search { padding: 6px; border-bottom: 1px solid var(--border-faint); }
.cpv1-body .cpv1-combobox-search-input {
  width: 100%;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: var(--r-input);
  background: var(--surface-2);
  font-size: 12.5px;
  font-family: inherit;
  box-sizing: border-box;
}
.cpv1-body .cpv1-combobox-search-input:focus-visible { outline: none; border-color: var(--cp-border-strong); }
.cpv1-body .cpv1-combobox-list { max-height: 240px; overflow-y: auto; padding: 4px 0; }
.cpv1-body .cpv1-combobox-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 6px 10px;
  background: none;
  border: 0;
  font-size: 12.5px;
  font-family: inherit;
  color: var(--cp-text);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cpv1-body .cpv1-combobox-option[hidden] { display: none; }
.cpv1-body .cpv1-combobox-option:hover,
.cpv1-body .cpv1-combobox-option--active { background: var(--surface-2); }
.cpv1-body .cpv1-combobox-option--clear { color: var(--cp-text-faint); }
/* No-match state (picker-overlay-states): quiet inline italic line. */
.cpv1-body .cpv1-combobox-empty {
  padding: 8px 10px;
  font-size: 12.5px;
  font-style: italic;
  color: var(--cp-text-faint);
}
.cpv1-body .cpv1-combobox-empty[hidden] { display: none; }
.cpv1-body .cpv1-quick-add-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding-left: 130px;
}
.cpv1-body .cpv1-quick-add-error {
  margin: 8px 0 0 130px;
  padding: 8px 10px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 12.5px;
  border-radius: 4px;
}
.cpv1-body .cpv1-panel-body { padding: 4px 0 0; }

.cpv1-body .cpv1-panel-collapse-caret {
  background: none;
  border: none;
  color: var(--cp-text-muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  text-align: center;
  font-family: inherit;
  flex: 0 0 auto;
}
.cpv1-body .cpv1-panel-collapse-caret:hover { color: var(--cp-text); }
.cpv1-body .cpv1-panel--collapsed > [data-cpv1-collapse-target="body"],
.cpv1-body .cpv1-panel--collapsed > .cpv1-panel-body,
.cpv1-body .cpv1-panel--collapsed > .cpv1-panel-body--flush,
.cpv1-body .cpv1-panel--collapsed > .cpv1-panel-body--empty,
.cpv1-body .cpv1-panel--collapsed > .cpv1-panel-error,
.cpv1-body .cpv1-panel--collapsed > turbo-frame { display: none; }
.cpv1-body .cpv1-panel-body--flush { padding: 0; }
.cpv1-body .cpv1-panel-body--empty { padding: 14px 14px 14px; min-height: 36px; }

/* ---------- row table (SF / Lists) ---------- */

.cpv1-body .cpv1-row-table { width: 100%; }
.cpv1-body .cpv1-row {
  display: grid;
  align-items: center;
  padding: 11px 14px;
  border-bottom: 1px solid var(--cp-border);
}
.cpv1-body .cpv1-row:last-child { border-bottom: none; }
.cpv1-body .cpv1-row:hover { background: var(--color-slate-50); }

.cpv1-body .cpv1-sf-row { grid-template-columns: 1fr 130px 40px 20px; gap: 14px; }
.cpv1-body .cpv1-sf-role-chip {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 6px;
  background: var(--cp-surface-2);
  border-radius: 2px;
  font-size: 11px;
  color: var(--cp-text-muted);
}
.cpv1-body .cpv1-sf-name { font-size: 13px; }
.cpv1-body .cpv1-sf-name a { color: var(--cp-text); }
.cpv1-body .cpv1-sf-counts { font-size: 12.5px; color: var(--cp-text-muted); justify-self: end; }
.cpv1-body .cpv1-sf-counts strong { font-weight: 500; color: var(--cp-text); }
.cpv1-body .cpv1-sf-counts.unset { color: var(--cp-text-faint); }
.cpv1-body .cpv1-sf-link { justify-self: end; font-size: 12px; color: var(--cp-accent); }

.cpv1-body .cpv1-list-row {
  grid-template-columns: 14px 1fr 140px 130px 40px 20px;
  gap: 12px;
  cursor: grab;
  position: relative;
}
.cpv1-body .cpv1-list-row:active { cursor: grabbing; }
.cpv1-body .cpv1-list-drag-hint {
  color: var(--cp-text-faint);
  font-size: 12px;
  line-height: 1;
  letter-spacing: -1px;
  /* Always visible — a drag handle calls out a non-obvious capability and
   * must be discoverable at rest, not revealed on hover (P0.3). */
}
.cpv1-body .cpv1-list-name { font-size: 13px; }
.cpv1-body .cpv1-list-name a { color: var(--cp-text); }
.cpv1-body .cpv1-list-source {
  font-size: 11.5px;
  color: var(--cp-text-muted);
  background: var(--cp-surface-2);
  padding: 2px 6px;
  border-radius: 3px;
  justify-self: start;
}
.cpv1-body .cpv1-list-counts { font-size: 12.5px; color: var(--cp-text-muted); }
.cpv1-body .cpv1-list-counts strong { font-weight: 500; color: var(--cp-text); }
.cpv1-body .cpv1-list-counts.unused { color: var(--cp-text-faint); }
.cpv1-body .cpv1-list-link { justify-self: end; font-size: 12px; color: var(--cp-accent); }
.cpv1-body .cpv1-detach-x {
  justify-self: end;
  color: var(--cp-text-faint);
  font-size: 14px;
  line-height: 1;
  background: none;
  border: none;
  padding: 0 2px;
  border-radius: 3px;
  /* Always visible — a remove affordance must be discoverable at rest,
   * not revealed on hover (P0.4). The Salesforce-link × in the facts
   * column had no hover-reveal ancestor at all, so it was permanently
   * invisible. Hover modifies (danger treatment), it doesn't reveal. */
  opacity: 1;
  transition: background-color 0.15s, color 0.15s;
}
.cpv1-body .cpv1-detach-x:hover { color: var(--cp-danger); background: var(--cp-danger-soft); }

/* ---------- ingredient strip (Creatives cards) ---------- */

.cpv1-body .cpv1-ingredient-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
  padding: 12px 14px;
}
.cpv1-body .cpv1-ingredient-card {
  background: var(--cp-surface);
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius);
  padding: 10px 12px;
  cursor: grab;
  position: relative;
}
.cpv1-body .cpv1-ingredient-card:hover {
  border-color: var(--cp-border-strong);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.cpv1-body .cpv1-ingredient-card:active { cursor: grabbing; }
.cpv1-body .cpv1-ingredient-card .cpv1-drag-hint {
  position: absolute;
  top: 8px;
  right: 22px;
  color: var(--cp-text-faint);
  font-size: 12px;
  line-height: 1;
  letter-spacing: -1px;
  /* Always visible — drag handle discoverable at rest (P0.3). */
}
.cpv1-body .cpv1-ingredient-card .cpv1-detach-x {
  position: absolute;
  top: 8px;
  right: 8px;
}

.cpv1-body .cpv1-ingredient-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  padding-right: 32px;
}
.cpv1-body .cpv1-ingredient-card-label {
  font-size: 13px;
  color: var(--cp-text);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cpv1-body .cpv1-ingredient-card-label a { color: var(--cp-text); }
.cpv1-body .cpv1-ingredient-card-subject {
  font-size: 12.5px;
  color: var(--cp-text-muted);
  margin-bottom: 8px;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.cpv1-body .cpv1-ingredient-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--cp-text-muted);
  padding-top: 6px;
  border-top: 1px solid var(--cp-border);
}
.cpv1-body .cpv1-ingredient-card-meta .cpv1-doc-link { margin-left: auto; color: var(--cp-accent); }
.cpv1-body .cpv1-ingredient-card-meta .unused { color: var(--cp-text-faint); }

/* ---------- send card ---------- */

.cpv1-body .cpv1-send-card { border-bottom: 1px solid var(--cp-border); }
.cpv1-body .cpv1-send-card:last-of-type { border-bottom: none; }
.cpv1-body .cpv1-send-card.cpv1-send-card--incomplete { background: var(--color-slate-50); }
.cpv1-body .cpv1-send-card:hover:not(.cpv1-send-card--incomplete):not(.cpv1-send-card--sealed) { background: var(--color-slate-50); }

/* ---------- sealed send card · P0.9 terminal read-only ----------
 * A sent Send is a permanent historical record. Slate-50 body + a
 * deeper slate-300 outline make it recede from the editable rows; the
 * corner flag is the pre-attentive "sealed" signal. Edit affordances
 * (drag handle, drop-zone ×) are already omitted when is_locked. AM
 * cards are square (no radius), so the square flag sits flush — no
 * overflow:hidden needed (which would clip the ⋯ menu). */
.cpv1-body .cpv1-send-card--sealed {
  position: relative;
  background: var(--color-slate-50);
  border: 1px solid var(--color-slate-300);
}
.cpv1-body .cpv1-send-card--sealed .cpv1-send-head {
  border-bottom: 1px solid var(--color-slate-300);
  padding-right: 32px; /* keep the ⋯ clear of the 36px corner flag */
}
.cpv1-body .cpv1-send-card--sealed .cpv1-drop-zone:not(.empty),
.cpv1-body .cpv1-send-card--sealed .cpv1-send-config {
  background: rgba(255, 255, 255, 0.55);
  border-color: var(--color-slate-300);
}
.cpv1-body .cpv1-corner-flag {
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 36px 36px 0;
  border-color: transparent var(--color-slate-500) transparent transparent;
  z-index: 4;
  pointer-events: none;
}
.cpv1-body .cpv1-corner-flag-glyph {
  position: absolute;
  top: 5px;
  right: 5px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  z-index: 5;
  pointer-events: none;
}
/* P0.9: on a sealed card the status badge is the lifecycle noun, not a
 * live status — render it neutral, not the green "sent" status color. */
.cpv1-body .cpv1-send-card--sealed .cpv1-badge--sending-sent {
  background: var(--surface-2);
  color: var(--fg-muted);
  border-color: var(--border);
}

.cpv1-body .cpv1-send-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px 8px;
}
/* After the May 2026 Send-page rebuild, the head is a link/handle to
 * the Send show page (per the brief § Campaign-page Sends panel). The
 * <a> wraps date + status pill + ↗ + segmentation; only the ⋯ menu
 * lives outside the link so its toggle doesn't navigate. Hover tints
 * the row, surfaces the ↗ open-affordance more strongly. */
.cpv1-body .cpv1-send-head-link {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  color: inherit;
  text-decoration: none;
  padding: 1px 4px;
  margin: -1px -4px;
  border-radius: var(--cp-radius);
}
.cpv1-body .cpv1-send-head-link:hover,
.cpv1-body .cpv1-send-head-link:focus-visible {
  background: var(--cp-surface-2);
  text-decoration: none;
}
.cpv1-body .cpv1-send-head-link:focus-visible {
  outline: 2px solid var(--cp-border-strong);
  outline-offset: 0;
}
.cpv1-body .cpv1-send-head-link:hover .cpv1-send-head-open,
.cpv1-body .cpv1-send-head-link:focus-visible .cpv1-send-head-open {
  color: var(--cp-accent);
}
.cpv1-body .cpv1-send-head-open {
  color: var(--cp-text-faint);
  font-size: 14px;
  flex-shrink: 0;
}
.cpv1-body .cpv1-send-identity {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--cp-text);
  margin-right: 8px;
}
.cpv1-body .cpv1-send-when { font-size: 13.5px; font-weight: 500; }
.cpv1-body .cpv1-send-when .cpv1-send-when-time { color: var(--cp-text-faint); font-weight: 400; }
.cpv1-body .cpv1-send-when.unset { color: var(--cp-text-faint); font-weight: 400; }
.cpv1-body .cpv1-send-seg { font-size: 12px; color: var(--cp-text-muted); margin-left: auto; white-space: nowrap; flex-shrink: 0; }
.cpv1-body .cpv1-send-actions {
  color: var(--cp-text-faint);
  font-size: 14px;
  cursor: pointer;
  width: 20px;
  text-align: center;
  background: none;
  border: none;
  padding: 0;
}
.cpv1-body .cpv1-send-actions:hover { color: var(--cp-text); }

.cpv1-body .cpv1-send-menu-wrap { position: relative; }
.cpv1-body .cpv1-send-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 140px;
  background: var(--cp-surface);
  border: 1px solid var(--cp-border-strong);
  border-radius: var(--cp-radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  padding: 4px 0;
  z-index: 20;
}
.cpv1-body .cpv1-send-menu.cpv1-send-menu--open { display: block; }
.cpv1-body .cpv1-send-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 6px 12px;
  background: none;
  border: none;
  font-size: 12.5px;
  color: var(--cp-text);
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}
.cpv1-body .cpv1-send-menu-item:hover {
  background: var(--cp-surface-2);
  text-decoration: none;
  color: var(--cp-text);
}
.cpv1-body .cpv1-send-menu-item--danger { color: var(--cp-danger); }
.cpv1-body .cpv1-send-menu-item--danger:hover { background: var(--cp-danger-soft); color: var(--cp-danger); }

.cpv1-body .cpv1-send-body {
  padding: 0 14px 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}
/* Grid children get min-width: 0 so nowrap content inside can be
 * truncated with ellipsis rather than stretching the track past the
 * panel edge. (Default grid item min-width is auto = content width.) */
.cpv1-body .cpv1-send-body > .cpv1-drop-zone,
.cpv1-body .cpv1-send-body > .cpv1-send-config-zone {
  min-width: 0;
}
.cpv1-body .cpv1-send-config-zone {
  position: relative;                              /* anchor for floating picker */
  grid-column: 1 / -1;
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius);
  padding: 8px 10px;
  background: var(--cp-surface-2);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 60px;
}
.cpv1-body .cpv1-send-config-zone.empty {
  border-style: dashed;
  border-color: var(--cp-border-strong);
  background: transparent;
  align-items: center;
  justify-content: center;
  color: var(--cp-text-faint);
}
.cpv1-body .cpv1-send-config-zone.empty:hover {
  border-color: var(--cp-drop-target);
  background: var(--cp-drop-target-bg);
  color: var(--cp-accent);
}
.cpv1-body .cpv1-send-config-zone.empty .cpv1-drop-zone-label-row { display: none; }
.cpv1-body .cpv1-send-config-detach {
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--cp-text-faint);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}
.cpv1-body .cpv1-send-config-detach:hover { color: var(--cp-danger); }

/* ---------- Send details (UTMs, recipients, notes, stats) ---------- */

.cpv1-body .cpv1-send-details {
  grid-column: 1 / -1;
  margin-top: 4px;
  border-top: 1px dashed var(--cp-border);
  padding-top: 8px;
}
.cpv1-body .cpv1-send-details-summary {
  font-size: 11.5px;
  color: var(--cp-text-muted);
  cursor: pointer;
  user-select: none;
  padding: 2px 0;
}
.cpv1-body .cpv1-send-details-summary:hover { color: var(--cp-text); }
.cpv1-body .cpv1-send-details-body {
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--cp-surface-2);
  border-radius: var(--cp-radius);
}
.cpv1-body .cpv1-send-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 16px;
  margin-bottom: 12px;
}
.cpv1-body .cpv1-send-details-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 10px;
  align-items: center;
  font-size: 12.5px;
}
.cpv1-body .cpv1-send-details-row label {
  color: var(--cp-text-muted);
  text-align: right;
}
.cpv1-body .cpv1-send-details-row--notes {
  grid-column: 1 / -1;
}
.cpv1-body .cpv1-send-details-stats-head {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--cp-text-faint);
  font-weight: 600;
  border-top: 1px dashed var(--cp-border);
  padding-top: 8px;
  margin-bottom: 6px;
}
.cpv1-body .cpv1-send-details-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px 16px;
}
.cpv1-body .cpv1-send-details-stat {
  display: flex;
  flex-direction: column;
  font-size: 12.5px;
}
.cpv1-body .cpv1-send-details-stat label {
  font-size: 10.5px;
  color: var(--cp-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cpv1-body .cpv1-send-details-asof {
  font-size: 11.5px;
  color: var(--cp-text-faint);
  margin-top: 6px;
}

.cpv1-body .cpv1-drop-zone {
  position: relative;                              /* anchor for floating picker */
  border: 1px dashed var(--cp-border);             /* flat "slot" look per Rich Detail reference (was solid box) */
  border-radius: var(--cp-radius);
  padding: 8px 10px;
  background: var(--cp-surface-2);
  min-height: 56px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cpv1-body .cpv1-drop-zone.empty {
  border-style: dashed;
  border-color: var(--cp-border-strong);
  background: transparent;
  align-items: center;
  justify-content: center;
  color: var(--cp-text-faint);
  font-size: 12px;
}
.cpv1-body .cpv1-drop-zone.empty:hover {
  border-color: var(--cp-drop-target);
  background: var(--cp-drop-target-bg);
  color: var(--cp-accent);
}
.cpv1-body .cpv1-drop-zone.drag-over {
  border-style: solid;
  border-color: var(--cp-drop-target);
  background: var(--cp-drop-target-bg);
  color: var(--cp-accent);
}
.cpv1-body .cpv1-drop-zone-label {
  font-size: 10.5px;
  color: var(--cp-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.cpv1-body .cpv1-drop-zone-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.cpv1-body .cpv1-zone-change-link {
  font-size: 11.5px;
  color: var(--cp-accent);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}
.cpv1-body .cpv1-zone-change-link:hover { text-decoration: underline; }
.cpv1-body .cpv1-drop-zone-empty-button {
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 6px 0;
  text-align: center;
}
.cpv1-body .cpv1-drop-zone-empty-button:hover { color: var(--cp-accent); }
.cpv1-body .cpv1-drop-zone-empty-text { font-size: 12px; }
.cpv1-body .cpv1-drop-zone-value {
  font-size: 13px;
  color: var(--cp-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cpv1-body .cpv1-drop-zone-value a { color: var(--cp-text); }
.cpv1-body .cpv1-drop-zone-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--cp-text-muted);
}
/* Detach × sits in the drop-zone label row (top-right). Obvious size,
 * neutral-grey baseline, danger-red on hover. */
.cpv1-body .cpv1-drop-zone-detach {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-left: 4px;
  color: var(--cp-text-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  background: none;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 0;
}
.cpv1-body .cpv1-drop-zone-detach:hover {
  color: var(--cp-danger);
  border-color: var(--cp-danger-soft);
  background: var(--cp-danger-soft);
}

/* Sent Send: drop zones become read-only (no hover affordances, no
 * pointer events for drag-over). Operators can still see the assigned
 * Creative/List but can't mutate. */
.cpv1-body .cpv1-drop-zone--locked.empty:hover {
  border-color: var(--cp-border-strong);
  background: transparent;
  color: var(--cp-text-faint);
}

.cpv1-body .cpv1-send-config {
  grid-column: 1 / -1;
  margin-top: 4px;
  padding: 10px;
  background: var(--cp-surface-2);
  border-radius: var(--cp-radius);
  display: grid;
  grid-template-columns: 90px 1fr 90px 1fr;
  gap: 4px 12px;
  align-items: baseline;
}
.cpv1-body .cpv1-send-config-label {
  font-size: 10.5px;
  color: var(--cp-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.cpv1-body .cpv1-send-config-value {
  font-size: 12.5px;
  color: var(--cp-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cpv1-body .cpv1-send-config-value a { color: var(--cp-text); }
.cpv1-body .cpv1-send-config-value.unset { color: var(--cp-text-faint); }
.cpv1-body .cpv1-send-config-value--from { grid-column: 2 / -1; }

/* ---------- performance rollup ---------- */

.cpv1-body .cpv1-rollup-primary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--cp-border);
}
.cpv1-body .cpv1-rollup-tile { background: var(--cp-surface); padding: 12px 14px; }
.cpv1-body .cpv1-rollup-label {
  font-size: 11.5px;
  color: var(--cp-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 3px;
}
.cpv1-body .cpv1-rollup-value { font-size: 18px; font-weight: 600; }
.cpv1-body .cpv1-rollup-rate { font-size: 12px; color: var(--cp-text-muted); margin-top: 2px; }
.cpv1-body .cpv1-rollup-secondary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--cp-border);
  border-top: 1px solid var(--cp-border);
}
.cpv1-body .cpv1-rollup-secondary .cpv1-rollup-tile { padding: 9px 14px; background: var(--color-slate-50); }
.cpv1-body .cpv1-rollup-secondary .cpv1-rollup-value { font-size: 14px; font-weight: 500; }
.cpv1-body .cpv1-rollup-secondary .cpv1-rollup-rate { font-size: 11.5px; }

/* ---------- notes ---------- */

/* Notes prose fills the full panel-body width at all times — display
 * and edit. No max-width cap. */
.cpv1-body .cpv1-notes-text {
  display: block;
  font-size: 13px;
  white-space: pre-wrap;
  line-height: 1.6;
  width: 100%;
}
.cpv1-body .cpv1-notes-text .cpv1-inline-input--textarea {
  width: 100%;
  min-height: 140px;
  font-size: 13px;
  line-height: 1.6;
}

/* ---------- flash ---------- */

.cpv1-body .cpv1-flash {
  padding: 10px 14px;
  border-radius: var(--cp-radius);
  margin-bottom: 12px;
  font-size: 13px;
}
.cpv1-body .cpv1-flash--success { background: var(--cp-success-soft); color: var(--cp-success); }
.cpv1-body .cpv1-flash--error { background: var(--cp-danger-soft); color: var(--cp-danger); }

/* ---------- drag-and-drop state ---------- */

.cpv1-body .cpv1-dragging { opacity: 0.5; }

/* ---------- page-level toolbar ---------- */

.cpv1-body .cpv1-page-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}
/* Reuse the index-page .cp-landmark-btn style verbatim — see
 * app/assets/stylesheets/campaigns.css §"Sticky footer landmarks". */

/* ---------- pickers ----------
 * Per docs/AUDIENCE_MARKETING_PAGE_SHELL.md and the open-states design
 * spec: working surfaces are WHITE. Panel-head context = inline strip.
 * Hero / per-Send context = floating Popover anchored to trigger.
 * (See the `.cpv1-hero-field-value .cpv1-picker` and `.cpv1-send-picker`
 *  rules below for the popover behavior.) */

.cpv1-body .cpv1-picker {
  padding: 10px 14px;
  background: var(--cp-surface);                  /* white, was #fffbeb yellow */
  border-bottom: 1px solid var(--tint-300, var(--cp-border));
}
.cpv1-body .cpv1-picker-search {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.cpv1-body .cpv1-picker-search input[type="text"] {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius);
  font-size: 13px;
  font-family: inherit;
}
.cpv1-body .cpv1-picker-search input[type="text"]:focus {
  outline: none;
  border-color: var(--tint-800, var(--cp-accent));
  box-shadow: 0 0 0 2px var(--tint-100, transparent);
}
.cpv1-body .cpv1-picker-search input[type="submit"] {
  padding: 6px 12px;
  background: var(--color-blue-600);              /* neutral blue, was --cp-accent slate */
  color: white;
  border: none;
  border-radius: var(--cp-radius);
  font-size: 12.5px;
  cursor: pointer;
}
.cpv1-body .cpv1-picker-search input[type="submit"]:hover {
  background: var(--color-blue-700, #1d4ed8);
}
.cpv1-body .cpv1-picker-close {
  padding: 6px 12px;
  background: transparent;
  color: var(--cp-text-muted);
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius);
  font-size: 12.5px;
  cursor: pointer;
}
.cpv1-body .cpv1-picker-close:hover { color: var(--cp-text); }
.cpv1-body .cpv1-picker-list {
  display: flex;
  flex-direction: column;
  border-radius: var(--cp-radius);
  /* The outer picker handles scrolling (vertical + horizontal). The
   * list itself stays at content width so rows can be wider than the
   * picker viewport and trigger the picker's horizontal scroll. */
  width: max-content;
  min-width: 100%;
}
.cpv1-body .cpv1-picker-row + .cpv1-picker-row {
  border-top: 1px solid var(--cp-border);
}
/* Set-selector rows are each wrapped in their toggle form — carry the
 * row divider on the form siblings. */
.cpv1-body .cpv1-picker-list form + form .cpv1-picker-row {
  border-top: 1px solid var(--cp-border);
}
/* Set-selector checkbox (Compatible-X popovers — the Columns-popover
 * idiom: full universe listed, membership toggles in place). */
.cpv1-body .cpv1-picker-check {
  flex: none;
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--cp-border);
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  line-height: 1;
  color: #fff;
  background: var(--cp-surface);
}
.cpv1-body .cpv1-picker-check--on {
  background: var(--color-slate-900, var(--fg));
  border-color: var(--color-slate-900, var(--fg));
}

/* ---------- predicate rows (Persona restrictions; handoff §4c) ----------
 * One rule = lead sentence + AND-joined conditions. Layout only —
 * the affordances are the canonical atoms: facet/operator are
 * clickable badges (dotted border, --r-pill 4px, auto ▾), the value
 * is a P0.5 inline field (mono; compact-absent while a draft), and
 * the removes are cpv1-detach-x. Per foundations/radius.md the system
 * has no fully-rounded silhouettes. */
.cpv1-body .pred-row {
  padding: 10px 2px;
  border-bottom: 1px solid var(--cp-border);
}
.cpv1-body .pred-row:last-child { border-bottom: none; }
.cpv1-body .pred-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
}
.cpv1-body .pred-lead { font-size: 12.5px; color: var(--cp-text-muted); }
.cpv1-body .pred-conds { display: flex; flex-direction: column; gap: 6px; }
/* nowrap: a long value shrinks with ellipsis in place, keeping its ×
 * adjacent (P0.4) — wrapping pushed both onto orphan lines. */
.cpv1-body .pred-cond { display: flex; align-items: center; gap: 7px; flex-wrap: nowrap; min-width: 0; }
/* Join word renders only between conditions (no reserved gutter —
 * every line starts flush left, matching the page's other sections). */
.cpv1-body .pred-join {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-faint, var(--cp-text-muted));
  flex: none;
}
/* Value layout (chrome comes from cpv1-inline-field / compact-absent).
 * The value cell ALWAYS takes the rest of the row, so the trailing ×
 * never moves between rest and edit, and the mounted editor spans the
 * full container (text inputs are at minimum the width of their
 * container — per Nick's ruling 2026-06-11). */
.cpv1-body .pred-val {
  font-size: 12.5px;
  font-family: var(--font-mono);
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cpv1-body .pred-val.compact-absent { font-family: inherit; }
.cpv1-body .pred-val:has(.cpv1-inline-input) { overflow: visible; }
.cpv1-body .pred-val .cpv1-inline-input {
  width: 100%;
  box-sizing: border-box;
}
/* is_one_of value chips — each member is a removable chip; the ghost
 * chip appends one value at a time. The condition flows as one
 * wrapping line: badges, chips, the ghost add, and the × roll onto
 * following lines left-to-right like a sentence (no centered
 * sub-cloud). display:contents lifts the chips into the condition's
 * own flex flow. */
.cpv1-body .pred-cond--flow {
  flex-wrap: wrap;
  row-gap: 6px;
}
.cpv1-body .pred-cond--flow .pred-vals { display: contents; }
.cpv1-body .pred-add {
  font-size: 12.5px;
  color: var(--color-blue-700, var(--cp-accent));
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 0;
  font-family: inherit;
}
.cpv1-body .pred-add:hover { text-decoration: underline; }

/* ---------- Sending Rules oversight (handoff §5; reference §05) ----------
 * The one new page shape: registry table + read-only matrices +
 * sentence log + consequences line. Values transcribed from the
 * locked reference, mapped to cp tokens. */
.cpv1-body .srl-registry { border: 1px solid var(--cp-border); border-radius: var(--cp-radius); overflow: hidden; }
.cpv1-body .srl-table { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--cp-surface); }
.cpv1-body .srl-table th {
  font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--cp-text-muted); font-weight: 600;
  text-align: left; padding: 8px 14px; background: var(--cp-surface-2);
  border-bottom: 1px solid var(--cp-border);
}
.cpv1-body .srl-table td { padding: 8px 14px; border-bottom: 1px solid var(--cp-border); }
.cpv1-body .srl-table tr:last-child td { border-bottom: none; }
.cpv1-body .srl-pairname { font-weight: 600; white-space: nowrap; }
.cpv1-body .srl-x { color: var(--fg-faint, var(--cp-text-muted)); font-weight: 400; padding: 0 5px; }
.cpv1-body .srl-count { font-family: var(--font-mono); }
.cpv1-body .srl-count--zero { color: var(--fg-faint, var(--cp-text-muted)); }
.cpv1-body .srl-chev { text-align: right; color: var(--fg-faint, var(--cp-text-muted)); }
.cpv1-body .srl-edit-hint {
  font-size: 11px; font-family: var(--font-mono); text-transform: none;
  letter-spacing: 0; color: var(--fg-faint, var(--cp-text-muted)); font-weight: 500;
}

/* Read-only matrix — sticky header row + sticky row-header column,
 * vertical scroll capped, per the reference's bounded-scale rules. */
.cpv1-body .srl-mx-wrap {
  border: 1px solid var(--cp-border); border-radius: var(--cp-radius);
  overflow: auto; max-height: 420px;
}
.cpv1-body .srl-mx { width: 100%; border-collapse: separate; border-spacing: 0; }
.cpv1-body .srl-mx thead th {
  position: sticky; top: 0; z-index: 2;
  font-size: 11px; font-weight: 600; color: var(--cp-text-muted);
  padding: 8px 10px; background: var(--cp-surface-2);
  border-bottom: 1px solid var(--cp-border);
  text-align: center; min-width: 90px; max-width: 150px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cpv1-body .srl-mx thead th.srl-mx-rowh { left: 0; z-index: 3; background: var(--cp-surface-2); }
.cpv1-body .srl-mx thead th a { color: var(--cp-text-muted); text-decoration: none; }
.cpv1-body .srl-mx thead th a:hover { color: var(--cp-accent); }
.cpv1-body .srl-mx td.srl-mx-rowh {
  position: sticky; left: 0; z-index: 1;
  font-weight: 600; text-align: left; padding: 9px 14px;
  border-bottom: 1px solid var(--cp-border); background: var(--cp-surface);
  white-space: nowrap; min-width: 170px;
}
.cpv1-body .srl-mx td.srl-mx-rowh a { color: var(--cp-text); text-decoration: none; }
.cpv1-body .srl-mx td.srl-mx-rowh a:hover { color: var(--cp-accent); }
.cpv1-body .srl-mx-cell {
  padding: 7px 0; border-bottom: 1px solid var(--cp-border);
  text-align: center; background: var(--cp-surface);
  font-family: var(--font-mono); font-size: 13px;
  color: var(--fg-faint, var(--cp-text-muted));
  /* fixed line-height so marked and empty cells keep rows uniform */
  line-height: 24px;
}
.cpv1-body .srl-mx-cell--on {
  /* The glyph is the mark: a large near-black ✓ on a mid-slate cell
   * tint — the cell reads clearly against white without going black,
   * and the ✓ is big enough to carry at any zoom. */
  background: var(--color-slate-200, #e2e8f0);
  color: var(--color-slate-900, #0f172a);
  font-weight: 800;
  font-size: 21px;
  line-height: 24px;
}
.cpv1-body .srl-mx tr:last-child td { border-bottom: none; }
/* Axis labels — the corner cell names both axes like a printed
 * chart, on the SAME text line as the column headers: the row-axis
 * label sits left, flush with the row-label text below it; the
 * column-axis label sits right, pointing into the header names. */
.cpv1-body .srl-mx thead th.srl-mx-corner {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cp-text-muted);
  font-weight: 600;
  padding-left: 14px; /* matches td.srl-mx-rowh so the labels align */
  text-align: left;
}
.cpv1-body .srl-mx-corner .srl-mx-axis-y { float: left; }
.cpv1-body .srl-mx-corner .srl-mx-axis-x { float: right; }

/* Sentence log — rendered from the same rows the matrices are drawn
 * from; the two views can never disagree. */
.cpv1-body .srl-log { border: 1px solid var(--cp-border); border-radius: var(--cp-radius); background: var(--cp-surface); }
.cpv1-body .srl-sentence {
  padding: 8px 14px; border-bottom: 1px solid var(--cp-border);
  font-size: 13px; color: var(--cp-text); line-height: 1.5;
}
.cpv1-body .srl-sentence:last-child { border-bottom: none; }
.cpv1-body .srl-sentence b { font-weight: 600; }
.cpv1-body .srl-subj { font-weight: 600; }
/* Pair-group header rows inside the log — same treatment as the
 * matrices' header row, so the log's groups speak the registry's
 * vocabulary. */
.cpv1-body .srl-group-head {
  padding: 8px 14px;
  background: var(--cp-surface-2);
  border-bottom: 1px solid var(--cp-border);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cp-text-muted);
}
.cpv1-body .srl-group-head:not(:first-child) { border-top: 1px solid var(--cp-border); }
/* The gate note: posture + what the pair's rules gate — normal case,
 * same quiet treatment as the matrix eyebrows' edit hint. */
.cpv1-body .srl-group-gate {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  color: var(--fg-faint, var(--cp-text-muted));
}
.cpv1-body .srl-sentence--absent { font-style: italic; color: var(--fg-faint, var(--cp-text-muted)); }

/* The cross-pair consequences line — the operator's verification path. */
.cpv1-body .srl-conseq {
  display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap;
  margin-top: 14px; font-size: 13.5px; color: var(--cp-text-muted);
}
.cpv1-body .srl-conseq-n {
  font-family: var(--font-mono); font-weight: 600;
  color: var(--cp-text); font-size: 14px; padding: 0 3px;
}

/* Matrix full-screen viewer — just the matrix: its edges are the
 * rectangle's edges (thin border), the screen grays out behind it,
 * and a small floating cluster carries zoom + close. The scrim
 * itself is the scroll container for panning; the sheet scales via
 * transform inside a scaler sized to natural × zoom. */
.cpv1-body .srl-head-right { display: inline-flex; align-items: center; gap: 14px; }
.srl-viewer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.4);
  overflow: auto;
  padding: 28px;
  display: flex;
}
.srl-viewer[hidden] { display: none; }
.srl-mx-scaler { margin: auto; }
.srl-viewer .srl-mx-sheet {
  background: #fff;
  border: 1px solid var(--color-slate-300, #cbd5e1);
  width: max-content;
}
.srl-viewer-controls {
  position: fixed;
  top: 14px;
  right: 18px;
  z-index: 1001;
  display: flex;
  gap: 5px;
}
.srl-viewer-btn {
  border: 1px solid var(--color-slate-300, #cbd5e1);
  background: #fff;
  color: var(--fg, #0f172a);
  font-size: 14px;
  font-family: var(--font-mono);
  line-height: 1;
  padding: 7px 11px;
  cursor: pointer;
  border-radius: var(--cp-radius, 4px);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.15);
}
.srl-viewer-btn:hover { background: var(--color-slate-50, #f8fafc); }
.srl-viewer-level { min-width: 56px; text-align: center; font-size: 12.5px; }
/* Print-like layout inside the viewer: every label one line at full
 * length, headers and row headers are ordinary cells, the table is
 * exactly as big as its content. */
.srl-viewer .srl-mx { width: max-content; }
.srl-viewer .srl-mx thead th,
.srl-viewer .srl-mx td.srl-mx-rowh {
  position: static;
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}
.cpv1-body .cpv1-picker-row {
  background: var(--cp-surface);
  border: none;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  width: 100%;
  cursor: pointer;
  font-size: 13px;
  color: var(--cp-text);
  font-family: inherit;
  white-space: nowrap;        /* row stays one line; picker scrolls horizontally if needed */
}
.cpv1-body .cpv1-picker-row:hover { background: var(--tint-50, var(--cp-drop-target-bg)); }

/* ---------- popover behavior for facts-column + page-head pickers ---------- */
/* Vertical / Events / Topics / Salesforce pickers live in the facts column;
 * the launch-date picker lives in the page head. Float them as overlays so
 * their containers don't grow. The facts column hugs the right edge of the
 * 1280px shell, so anchor right and open leftward into the page. */
.cpv1-body .cpv1-facts-v,
.cpv1-body .cpv1-head-launch,
.cpv1-body .cpv1-facts [data-controller~="cpv1-picker-filter"] {
  position: relative;
}
.cpv1-body .cpv1-facts-v > turbo-frame > .cpv1-picker,
.cpv1-body .cpv1-facts [data-controller~="cpv1-picker-filter"] > turbo-frame > .cpv1-picker,
.cpv1-body .cpv1-head-launch > turbo-frame > .cpv1-picker {
  position: absolute;
  top: 100%;
  right: 0;
  left: auto;
  z-index: 100;
  min-width: 360px;
  width: max-content;
  max-width: calc(100vw - 60px);
  margin-top: 6px;
  background: var(--cp-surface);
  border: 1px solid var(--cp-border);
  border-radius: 6px;
  box-shadow: var(--sh-menu);
  max-height: 420px;
  overflow: auto;
}
.cpv1-body .cpv1-picker-row-label { font-weight: 500; flex: 0 0 auto; }
.cpv1-body .cpv1-picker-row-subject {
  color: var(--cp-text-muted);
  flex: 0 0 auto;             /* don't compress; let row determine its natural width */
  white-space: nowrap;        /* every character visible — picker scrolls horizontally */
}
.cpv1-body .cpv1-picker-empty {
  font-size: 12.5px;
  color: var(--cp-text-faint);
  padding: 10px 0;
}
.cpv1-body .cpv1-picker-error {
  font-size: 12.5px;
  color: var(--cp-danger);
  margin-top: 6px;
}

/* ---------- launch_date watermark (LAUNCH_DATE_SPEC.md) ----------
 * Sits bottom-right of the hero card, large date in tint-800 at 85%
 * opacity. Click opens a calendar Popover. Drift annotation appears
 * underneath when launch_date != earliest_send_at::date. */

.cpv1-body .cpv1-launch-watermark {
  position: absolute;
  right: 22px;
  bottom: 14px;
  text-align: right;
}
.cpv1-body .cpv1-launch-watermark-trigger {
  background: transparent;
  border: 0;
  padding: 4px 8px;
  margin: -4px -8px;
  text-align: right;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.12s;
  font-family: inherit;
}
.cpv1-body .cpv1-launch-watermark-trigger:hover {
  background: rgba(159, 18, 57, 0.08);              /* tint-800 at 8% — works for rose; other domains pick up via tint */
}
.cpv1-body .cpv1-launch-prefix {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--tint-800);
  margin-bottom: 2px;
}
.cpv1-body .cpv1-launch-date-value {
  display: inline-block;
  font-size: 40px;
  font-weight: 700;
  color: #000;                                      /* black, not tint */
  letter-spacing: -0.02em;
  line-height: 1;
}
.cpv1-body .cpv1-launch-date-value--empty {
  color: var(--cp-text-faint);                      /* muted when unset */
}
.cpv1-body .cpv1-launch-drift {
  margin-top: 4px;
  font-size: 12px;
  color: var(--cp-text-muted);
  text-align: right;
}
.cpv1-body .cpv1-launch-match {
  margin-left: 6px;
  background: transparent;
  border: 0;
  padding: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-blue-600);
  cursor: pointer;
  font-family: inherit;
}
.cpv1-body .cpv1-launch-match:hover { text-decoration: underline; }

/* ---------- launch_date popover (calendar) ---------- */
.cpv1-body .cpv1-launch-watermark > turbo-frame > .cpv1-launch-picker {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 100;
  margin-top: 6px;
  min-width: 280px;
  width: 280px;
  max-width: none;
  background: var(--cp-surface);
  border: 1px solid var(--tint-200);
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08),
              0 1px 3px rgba(0, 0, 0, 0.04);
  padding: 10px 12px;
  overflow: visible;
}
.cpv1-body .cpv1-launch-picker-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.cpv1-body .cpv1-launch-picker-month {
  flex: 1;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--cp-text);
}
.cpv1-body .cpv1-launch-picker-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: transparent;
  border: 0;
  color: var(--cp-text-muted);
  font-size: 16px;
  cursor: pointer;
  text-decoration: none;
}
.cpv1-body .cpv1-launch-picker-nav:hover {
  background: var(--cp-surface-2);
  color: var(--cp-text);
}
.cpv1-body .cpv1-launch-picker-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.cpv1-body .cpv1-launch-picker-dow {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--cp-text-faint);
  text-align: center;
  padding-bottom: 4px;
}
.cpv1-body .cpv1-launch-picker-blank { /* placeholder */ }
.cpv1-body .cpv1-launch-picker-day {
  position: relative;
  background: transparent;
  border: 0;
  padding: 0;
  height: 28px;
  font-size: 12.5px;
  color: var(--cp-text);
  cursor: pointer;
  border-radius: 4px;
  font-family: inherit;
}
.cpv1-body .cpv1-launch-picker-day:hover { background: var(--tint-50); }
.cpv1-body .cpv1-launch-picker-day--today {
  color: var(--tint-800);
  font-weight: 600;
}
.cpv1-body .cpv1-launch-picker-day--current {
  background: var(--tint-100);
  color: var(--tint-800);
  font-weight: 700;
}
.cpv1-body .cpv1-launch-picker-day--earliest::after {
  content: "";
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--tint-300);
}
.cpv1-body .cpv1-launch-picker-foot {
  margin-top: 8px;
  display: flex;
  justify-content: flex-start;
}
.cpv1-body .cpv1-launch-picker-clear {
  background: transparent;
  border: 0;
  padding: 0;
  font-size: 12px;
  color: var(--cp-text-muted);
  cursor: pointer;
  font-family: inherit;
}
.cpv1-body .cpv1-launch-picker-clear:hover {
  text-decoration: underline;
  color: var(--cp-text);
}

/* ============================================================
   Deleted-page state — applied via [data-am-deleted="true"] on
   .cpv1-body. Whole page goes ~40% opacity, pointer-events
   suppressed everywhere except the state badge (which stays
   interactive so the operator can open Undo-delete).
   Per AUDIENCE_MARKETING_AUDIT_AND_UNDO.md §5.3.
   ============================================================ */
.cpv1-body[data-am-deleted="true"] {
  position: relative;
}
.cpv1-body[data-am-deleted="true"] > * {
  opacity: 0.4;
  pointer-events: none;
  user-select: none;
}
/* The hero/head rows escape the wholesale fade — an ancestor's opacity
 * composites its whole subtree and can't be undone from inside — and
 * fade their own children individually instead, so the state slot
 * (Undo delete) renders at full strength and stays interactive. */
.cpv1-body[data-am-deleted="true"] > .cpv1-hero,
.cpv1-body[data-am-deleted="true"] > .cpv1-head {
  opacity: 1;
}
.cpv1-body[data-am-deleted="true"] > .cpv1-hero > :not(.cpv1-hero-state),
.cpv1-body[data-am-deleted="true"] > .cpv1-head > :not(.cpv1-head-state) {
  opacity: 0.4;
}
.cpv1-body[data-am-deleted="true"] .cpv1-hero-state,
.cpv1-body[data-am-deleted="true"] .cpv1-head-state {
  pointer-events: auto;
  user-select: auto;
}

/* ===== Design-system Modal + confirm dialog (components/modal) =====
 * The single AM confirm dialog, driven by the cpv1-confirm controller
 * (shared/_confirm_modal). Terse mode = title only; consequence mode =
 * title + one-line body. Markup uses the canonical DS class names
 * (.modal / .btn--*); the rules are scoped under .modal-backdrop so a
 * bare .btn / .modal can't collide with Avo while the app migrates off it. */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-backdrop[hidden] { display: none; }
.modal-backdrop .modal {
  background: var(--surface);
  border-radius: var(--r-modal);
  box-shadow: var(--sh-modal);
  padding: var(--s-6);
  width: 100%;
  max-width: 480px;
  font-family: var(--font-sans);
}
.modal-backdrop .modal-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--fg);
  line-height: 1.4;
  margin-bottom: var(--s-5);
}
.modal-backdrop .modal-body {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.55;
  margin-bottom: var(--s-6);
}
.modal-backdrop .modal-body[hidden] { display: none; }
.modal-backdrop .modal-actions {
  display: flex;
  gap: var(--s-3);
  justify-content: flex-end;
}
.modal-backdrop .btn {
  display: inline-flex;
  align-items: center;
  padding: var(--s-3) var(--s-4);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color var(--t-fast), border-color var(--t-fast);
  white-space: nowrap;
}
.modal-backdrop .btn--secondary {
  background: var(--surface);
  color: var(--color-slate-700);
  border-color: var(--color-slate-300);
}
.modal-backdrop .btn--secondary:hover { background: var(--color-slate-50); }
.modal-backdrop .btn--primary {
  background: var(--color-slate-900);
  color: #fff;
  border-color: var(--color-slate-900);
}
.modal-backdrop .btn--primary:hover { background: var(--color-slate-700); border-color: var(--color-slate-700); }
.modal-backdrop .btn--danger-solid {
  background: var(--color-danger);
  color: #fff;
  border-color: var(--color-danger);
}
.modal-backdrop .btn--danger-solid:hover {
  background: var(--color-danger-text);
  border-color: var(--color-danger-text);
}

/* =====================================================================
 * Send show page (May 2026 rebuild).
 * Additions only — everything that could reuse an existing .cpv1-*
 * class does (rose hero, panel chrome, state menu shell, send-config
 * block, inline-edit, etc.). This section adds primitives that don't
 * have a pre-existing analogue: the sending_status badge variants, the
 * state-dot variants for the sending_status enum, the Ready-to-
 * schedule checklist, the Creative/List pool with click-to-select,
 * the Send-page UTM grid + performance grid, the failed-state error
 * banner, and the small completeness chip in the Ready panel head.
 *
 * Design source of truth: mockups/01-send-page-canonical.html in
 * file transfers/SEND PAGE DESIGN DELIVERABLES/.
 * ===================================================================== */

/* ---------- sending_status badge + dot variants ---------- */

.cpv1-body .cpv1-badge--sending-draft {
  background: #fce7eb; color: #9f1239; border-color: #f9c8d0;
}
.cpv1-body .cpv1-badge--sending-draft.cpv1-badge--clickable:hover { background: #fbd6dd; }
.cpv1-body .cpv1-badge--sending-scheduled {
  background: #dbeafe; color: #1e40af; border-color: #bfdbfe;
}
.cpv1-body .cpv1-badge--sending-scheduled.cpv1-badge--clickable:hover { background: #c7d8fc; }
.cpv1-body .cpv1-badge--sending-sending {
  background: #fef3c7; color: #92400e; border-color: #fde68a;
}
.cpv1-body .cpv1-badge--sending-sending.cpv1-badge--clickable:hover { background: #fde8a8; }
.cpv1-body .cpv1-badge--sending-sent {
  background: #dcfce7; color: #166534; border-color: #bbf7d0;
}
.cpv1-body .cpv1-badge--sending-sent.cpv1-badge--clickable:hover { background: #c4f5d4; }
.cpv1-body .cpv1-badge--sending-failed {
  background: #fee2e2; color: #991b1b; border-color: #fecaca;
}
.cpv1-body .cpv1-badge--sending-failed.cpv1-badge--clickable:hover { background: #fdcdcd; }
.cpv1-body .cpv1-badge--sending-cancelled {
  background: var(--color-slate-100); color: var(--color-slate-600); border-color: var(--color-slate-300);
}
.cpv1-body .cpv1-badge--sending-cancelled.cpv1-badge--clickable:hover { background: var(--color-slate-200); }

/* Compact badge variant — used for the small Campaign planning-state
 * pill rendered alongside the Campaign link in the Send hero's first
 * field row, and inside pool item meta rows. */
.cpv1-body .cpv1-badge--small {
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 3px;
}

/* sending_status dot — used inside the state-menu items. Mirrors the
 * existing .cpv1-state-dot--<planning_state> variants for Campaign. */
.cpv1-body .cpv1-state-dot--sending-draft      { background: #fca5b5; border-color: #f9c8d0; }
.cpv1-body .cpv1-state-dot--sending-scheduled { background: #93c5fd; border-color: #bfdbfe; }
.cpv1-body .cpv1-state-dot--sending-sending   { background: #fcd34d; border-color: #fde68a; }
.cpv1-body .cpv1-state-dot--sending-sent      { background: #86efac; border-color: #bbf7d0; }
.cpv1-body .cpv1-state-dot--sending-failed    { background: #fca5a5; border-color: #fecaca; }
.cpv1-body .cpv1-state-dot--sending-cancelled { background: var(--color-slate-300); border-color: var(--color-slate-300); }

/* Unreachable state-menu items — muted, not clickable, with an
 * inline italic reason naming the missing fields. */
.cpv1-body .cpv1-state-menu-item--disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.cpv1-body .cpv1-state-menu-item--disabled:hover { background: transparent; }
.cpv1-body .cpv1-state-menu-reason {
  margin-left: auto;
  font-size: 11px;
  font-style: italic;
  color: var(--cp-text-faint);
}

/* ---------- watermark sub-line (time + zone under the date) ---------- */

.cpv1-body .cpv1-launch-sub {
  display: block;
  font-size: 11.5px;
  color: var(--cp-text-muted);
  font-weight: 400;
  margin-top: 2px;
}

/* ---------- Ready-to-schedule panel ---------- */

.cpv1-body .cpv1-completeness-chip {
  background: var(--cp-surface);
  border: 1px solid #f9c8d0;
  border-radius: 10px;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 500;
  color: var(--cp-text-muted);
  margin-right: 4px;
}
.cpv1-body .cpv1-completeness-chip--inconsistent {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #b91c1c;
}
.cpv1-body .cpv1-pool-item--locked { cursor: default; opacity: 0.85; }
.cpv1-body .cpv1-pool-item--locked:not(.cpv1-pool-item--selected) { opacity: 0.45; }
.cpv1-body .cpv1-head-status-pill {
  background: #ffffff;
  border: 1px solid #f9c8d0;
  border-radius: 10px;
  padding: 2px 8px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #b91c4d;
}
.cpv1-body .cpv1-badge--inconsistent {
  outline: 1px solid #ef4444;
  outline-offset: 1px;
}

.cpv1-body .cpv1-panel-head-meta {
  font-size: 12px;
  color: var(--cp-text-muted);
  margin-right: 8px;
}

.cpv1-body .cpv1-panel-body--checklist { padding: 0; }

.cpv1-body .cpv1-check-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--cp-border);
  font-size: 13px;
}
.cpv1-body .cpv1-check-row:last-child { border-bottom: none; }
.cpv1-body .cpv1-check-mark {
  width: 14px;
  text-align: center;
  font-weight: 700;
  flex-shrink: 0;
}
.cpv1-body .cpv1-check-row--complete .cpv1-check-mark { color: #16a34a; }
.cpv1-body .cpv1-check-row--incomplete .cpv1-check-mark { color: #dc2626; }
.cpv1-body .cpv1-check-row--info .cpv1-check-mark { color: var(--cp-text-muted); }
.cpv1-body .cpv1-check-label { flex: 1; color: var(--cp-text); }
.cpv1-body .cpv1-check-row--complete .cpv1-check-label,
.cpv1-body .cpv1-check-row--info .cpv1-check-label {
  color: var(--cp-text-muted);
}
.cpv1-body .cpv1-check-info-note {
  margin-left: 6px;
  font-size: 11.5px;
  color: var(--cp-text-faint);
  font-style: italic;
}

/* Buttons used as primary actions in the Ready-to-schedule panel
 * head. Mirrors the existing campaign-btn-primary style but lives
 * inside .cpv1-body so it shares the design-system color tokens. */
.cpv1-body .cpv1-btn {
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius);
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  background: var(--cp-surface);
  color: var(--cp-text);
}
.cpv1-body .cpv1-btn--primary {
  background: #2563eb;
  border-color: #2563eb;
  color: white;
}
.cpv1-body .cpv1-btn--primary:hover { background: #1d4ed8; border-color: #1d4ed8; }
.cpv1-body .cpv1-btn--success {
  background: #16a34a;
  border-color: #16a34a;
  color: white;
}
.cpv1-body .cpv1-btn--success:hover { background: #15803d; border-color: #15803d; }
.cpv1-body .cpv1-btn--ghost {
  background: var(--cp-surface);
  color: var(--cp-text);
}
.cpv1-body .cpv1-btn--ghost:hover { background: var(--cp-surface-2); }
.cpv1-body .cpv1-btn--disabled,
.cpv1-body .cpv1-btn:disabled {
  background: var(--cp-surface-2);
  border-color: var(--cp-border);
  color: var(--cp-text-faint);
  cursor: not-allowed;
}

/* ---------- Creative / Recipient list pool ---------- */

.cpv1-body .cpv1-pool {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cpv1-body .cpv1-pool-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius);
  padding: 10px 14px;
  background: var(--cp-surface);
  cursor: pointer;
  font-family: inherit;
}
.cpv1-body .cpv1-pool-item:hover {
  background: var(--cp-surface-2);
  border-color: var(--cp-border-strong);
}
.cpv1-body .cpv1-pool-item--selected {
  background: #eef4ff;
  border-color: #93c5fd;
  box-shadow: inset 0 0 0 1px #93c5fd;
}
.cpv1-body .cpv1-pool-item--selected:hover { background: #eef4ff; }
.cpv1-body .cpv1-pool-item-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.cpv1-body .cpv1-pool-item-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--cp-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cpv1-body .cpv1-pool-item-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  color: var(--cp-text-muted);
}
.cpv1-body .cpv1-usage-annotation {
  font-size: 11.5px;
  color: var(--cp-text-muted);
  font-style: italic;
}
.cpv1-body .cpv1-pool-empty {
  color: var(--cp-text-faint);
  font-style: italic;
  font-size: 12.5px;
  padding: 8px 4px;
}

/* ---------- UTM grid ---------- */

.cpv1-body .cpv1-utm-fields {
  display: grid;
  grid-template-columns: 110px 1fr;
  row-gap: 8px;
  column-gap: 14px;
  font-size: 13px;
}
.cpv1-body .cpv1-utm-key {
  font-size: 11px;
  font-weight: 700;
  color: var(--cp-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  align-self: center;
}
.cpv1-body .cpv1-utm-val { color: var(--cp-text); }
.cpv1-body .cpv1-utm-val--empty {
  color: var(--cp-text-faint);
  font-style: italic;
}

/* ---------- performance grid (Send-scoped, distinct from the Campaign
 * aggregate panel which has its own .cpv1-stats-* classes) ---------- */

.cpv1-body .cpv1-perf-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.cpv1-body .cpv1-perf-cell {
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius);
  padding: 10px 12px;
  background: var(--cp-surface);
}
.cpv1-body .cpv1-perf-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--cp-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.cpv1-body .cpv1-perf-value {
  margin-top: 4px;
  font-size: 17px;
  font-weight: 600;
  color: var(--cp-text);
  font-variant-numeric: tabular-nums;
}
.cpv1-body .cpv1-perf-cell--empty .cpv1-perf-value {
  color: var(--cp-text-faint);
  font-weight: 400;
  font-size: 14px;
}

/* ---------- Failed-state error banner ---------- */

.cpv1-body .cpv1-error-banner {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--cp-radius);
  padding: 10px 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.cpv1-body .cpv1-error-banner-label {
  font-size: 10.5px;
  font-weight: 700;
  color: #991b1b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-top: 2px;
  flex-shrink: 0;
}
.cpv1-body .cpv1-error-banner-value {
  flex: 1;
}
.cpv1-body .cpv1-error-banner-text {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 12.5px;
  color: #7f1d1d;
  white-space: pre-wrap;
}

/* ---------- Misc ---------- */

.cpv1-body .cpv1-txt-link { color: var(--cp-accent); cursor: pointer; }
.cpv1-body .cpv1-txt-link:hover { text-decoration: underline; }
.cpv1-body .cpv1-sep { color: var(--cp-text-faint); margin: 0 2px; }
