/* Outbound «Review & send» — one contact, one row (founder mockup 2026-09-28).
 *
 * Plain CSS (not Tailwind utilities) because the precompiled tailwind.css only
 * carries classes some template already used; this layout is new. Colours are
 * the app tokens (ink / ink-2 / ink-3 / rule) and the role accent `--c` set on
 * the `.rvt` wrapper. Rows are a CSS grid inside native <details> so a row
 * expands with zero JS (CSP `script-src 'self'`); the small
 * `js/outbound-review-table.js` only keeps the «N selected» count honest.
 */

.rvt { --rvt-ink: rgb(20 19 16); --rvt-ink2: rgb(70 68 61); --rvt-ink3: rgb(118 115 105);
  --rvt-rule: rgb(236 233 226); --rvt-acc: var(--c, #1f6fb2); --rvt-ok: #15803d;
  --rvt-okbg: #ecfdf3; --rvt-warm: #b45309; --rvt-warmbg: #fff7e6; --rvt-mut: #f4f5f7;
  --rvt-act: 128px;
  --rvt-cols: minmax(0, 1.35fr) minmax(0, 1fr) 118px 112px minmax(0, 2.1fr) 104px var(--rvt-act); }
.rvt.rvt-onecamp { --rvt-cols: minmax(0, 1.4fr) minmax(0, 1.1fr) 112px minmax(0, 2.3fr) 104px var(--rvt-act); }

.rvt-h1 { font-size: 26px; font-weight: 700; letter-spacing: -.025em; line-height: 1.2;
  color: var(--rvt-ink); margin: 0; }
.rvt-sub { margin-top: 6px; font-size: 13.5px; color: var(--rvt-ink2); }

/* ── Sending strip + how-it-works flow ────────────────────────────── */
.rvt-sec { margin-top: 20px; }
.rvt-strip { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; padding: 12px 16px;
  border: 1px solid var(--rvt-rule); border-radius: 12px; background: #fff; font-size: 13px;
  color: var(--rvt-ink2); }
.rvt-strip b { color: var(--rvt-ink); font-weight: 650; }
.rvt-strip .rvt-warn { color: #92400e; font-weight: 500; }
.rvt-strip a { color: var(--rvt-acc); font-weight: 600; text-decoration: none; }
.rvt-strip a:hover { text-decoration: underline; }
.rvt-strip .rvt-end { margin-left: auto; font-size: 12px; }
.rvt-strip .rvt-planfit { flex-basis: 100%; font-size: 12px; color: #78350f; }
.rvt-flow { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px;
  font-size: 12.5px; color: var(--rvt-ink2); list-style: none; padding: 0; }
.rvt-flow li { background: var(--rvt-mut); border-radius: 999px; padding: 4px 10px; }
.rvt-flow .rvt-arrow { background: none; padding: 0; color: var(--rvt-ink3); }

/* ── Send clean letters automatically (2026-10-01) ────────────────── */
.rvt-ap { padding: 14px 16px; border: 1px solid var(--rvt-rule); border-radius: 12px; background: #fff; }
.rvt-ap-h { margin: 0; font-size: 14px; font-weight: 650; color: var(--rvt-ink); }
.rvt-ap-intro { margin-top: 4px; font-size: 12.5px; color: var(--rvt-ink2); }
.rvt-ap-flash { margin-top: 8px; font-size: 12.5px; color: var(--rvt-ok); font-weight: 600; }
.rvt-ap-list { margin: 10px 0 0; padding: 0; list-style: none; }
.rvt-ap-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr) auto; gap: 6px 14px;
  align-items: center; padding: 8px 0; border-top: 1px solid var(--rvt-rule); font-size: 13px; }
.rvt-ap-row:first-child { border-top: 0; }
.rvt-ap-name { font-weight: 600; color: var(--rvt-ink); overflow-wrap: anywhere; }
.rvt-ap-state { color: var(--rvt-ink2); }
.rvt-ap-on { color: var(--rvt-ok); font-weight: 600; }
.rvt-ap-rates { color: var(--rvt-warm); }
.rvt-ap-state.rvt-ap-consent { color: var(--rvt-warm); font-weight: 600; }
.rvt-ap-consent-note { margin-top: 8px; padding: 8px 12px; border-radius: 8px; font-size: 12.5px;
  background: #fff7e6; color: #78350f; border: 1px solid #fde68a; }
.rvt-ap-consent-note a { color: inherit; font-weight: 600; text-decoration: underline; }
.rvt-ap-form { margin: 0; }
.rvt-ap-btn { border: 1px solid var(--rvt-rule); background: #fff; color: var(--rvt-ink); border-radius: 8px;
  padding: 5px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.rvt-ap-btn.on { background: var(--rvt-acc); border-color: var(--rvt-acc); color: #fff; }
.rvt-ap-btn:hover { filter: brightness(.97); }
@media (max-width: 640px) {
  .rvt-ap-row { grid-template-columns: minmax(0, 1fr) auto; }
  .rvt-ap-state { grid-column: 1 / -1; grid-row: 2; }
}

/* ── Filter bar ───────────────────────────────────────────────────── */
.rvt-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rvt-chip { display: inline-flex; align-items: center; border: 1px solid var(--rvt-rule);
  background: #fff; border-radius: 999px; padding: 5px 12px; font-size: 12.5px; font-weight: 600;
  color: var(--rvt-ink2); text-decoration: none; white-space: nowrap; }
.rvt-chip:hover { border-color: var(--rvt-acc); color: var(--rvt-ink); }
.rvt-chip.on { background: var(--rvt-acc); border-color: var(--rvt-acc); color: #fff; }
.rvt-chip em { font-style: normal; opacity: .75; margin-left: 4px; font-variant-numeric: tabular-nums; }
.rvt-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; flex: 1; min-width: 220px; }
.rvt-sel { border: 1px solid var(--rvt-rule); border-radius: 8px; padding: 6px 10px; font-size: 12.5px;
  background: #fff; color: var(--rvt-ink2); max-width: 220px; }
.rvt-search { flex: 1; min-width: 210px; border: 1px solid var(--rvt-rule); border-radius: 8px;
  padding: 6px 10px; font-size: 12.5px; color: var(--rvt-ink); background: #fff; }
.rvt-search::placeholder { color: var(--rvt-ink3); }
.rvt-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--rvt-rule);
  background: #fff; border-radius: 8px; padding: 6px 12px; font-size: 12.5px; font-weight: 600;
  color: var(--rvt-ink); text-decoration: none; cursor: pointer; white-space: nowrap; }
.rvt-btn:hover { background: #fafaf8; }
.rvt-btn.pri { background: var(--rvt-acc); border-color: var(--rvt-acc); color: #fff; }
.rvt-btn.pri:hover { filter: brightness(.95); }
.rvt-btn.sm { padding: 3px 8px; font-size: 12px; }
.rvt-btn[disabled] { opacity: .45; cursor: not-allowed; }
.rvt.rvt-js .rvt-apply { display: none; }

/* ── Table (a grid of <details> rows) ─────────────────────────────── */
.rvt-table { margin-top: 10px; background: #fff; border: 1px solid var(--rvt-rule); border-radius: 12px;
  overflow: hidden; font-size: 13px; }
.rvt-row { display: flex; align-items: flex-start; border-top: 1px solid var(--rvt-rule); }
.rvt-row:first-child { border-top: 0; }
.rvt-cb { flex: none; width: 36px; display: flex; justify-content: center; padding-top: 11px; }
.rvt-cb input { width: 15px; height: 15px; accent-color: var(--rvt-acc); }
.rvt-d { flex: 1; min-width: 0; }
.rvt-g { display: grid; grid-template-columns: var(--rvt-cols); gap: 0 12px; align-items: center;
  padding: 8px 12px 8px 0; min-height: 44px; }
summary.rvt-g { cursor: pointer; list-style: none; }
summary.rvt-g::-webkit-details-marker { display: none; }
summary.rvt-g:hover, .rvt-d[open] > summary.rvt-g { background: #fcfcfb; }
.rvt-head { background: #fafaf8; border-bottom: 1px solid var(--rvt-rule); }
.rvt-head .rvt-g { min-height: 0; padding-top: 9px; padding-bottom: 9px; font-size: 11px; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase; color: var(--rvt-ink3); }
.rvt-head .rvt-cb { padding-top: 9px; }
.rvt-head a { color: inherit; text-decoration: none; }
.rvt-head a:hover { color: var(--rvt-ink); }
.rvt-c { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--rvt-ink2); }
.rvt-name { display: block; color: var(--rvt-ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.rvt-title { display: block; font-weight: 400; color: var(--rvt-ink3); font-size: 12px; overflow: hidden;
  text-overflow: ellipsis; }
.rvt-reason { color: var(--rvt-ink3); font-style: italic; }
/* ONE action column (founder 2026-09-28): the last grid track is a fixed
   `--rvt-act` wide and right-aligned, so «Approve» and the chevron sit in
   the same place on every row and under the header. A long label wraps
   inside the track instead of widening it. */
.rvt .c-chev { grid-column: -2 / -1; display: flex; justify-content: flex-end;
  align-items: center; overflow: visible; text-align: right; }
.rvt .c-chev .rvt-btn { max-width: 100%; white-space: normal;
  text-align: center; line-height: 1.25; }
.rvt-chev { color: var(--rvt-ink3); font-size: 16px; line-height: 1; text-align: right; }
.rvt-d[open] .rvt-chev { transform: rotate(90deg); }

.rvt-pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 2px 9px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap; max-width: 100%; overflow: hidden;
  text-overflow: ellipsis; }
.rvt-pill.ready, .rvt-pill.clear { background: var(--rvt-okbg); color: var(--rvt-ok); }
.rvt-pill.read_first, .rvt-pill.glance, .rvt-pill.unchecked { background: var(--rvt-warmbg); color: var(--rvt-warm); }
.rvt-pill.skipped, .rvt-pill.yours { background: #f3f4f6; color: #4b5563; }
.rvt-pill.writing { background: #eef4fb; color: #1f5b93; }
.rvt-pill.sent, .rvt-pill.draft_saved, .rvt-pill.queued { background: #eef2ff; color: #3730a3; }
.rvt-pill.bounced { background: #fef3f2; color: #b42318; }
.rvt-pill.replied { background: #ecfdf3; color: #067647; }
.rvt-pill.c1 { background: #eef2ff; color: #3730a3; }
.rvt-pill.c2 { background: #fdf2f8; color: #9d174d; }
.rvt-pill.c3 { background: #ecfdf3; color: #067647; }
.rvt-pill.c4 { background: #fff7e6; color: #93370d; }
.rvt-pill.c5 { background: #f0f9ff; color: #026aa2; }
.rvt-pill.c6 { background: #f4f3ff; color: #5925dc; }

/* The expanded letter. */
.rvt-letter { white-space: normal; padding: 12px 18px 16px 0; font-size: 13px; }
.rvt-letter .rvt-meta { margin: 0 0 8px; font-size: 12px; color: var(--rvt-ink3); display: flex;
  flex-wrap: wrap; align-items: center; gap: 6px; }
.rvt-letter .rvt-meta a { color: var(--rvt-acc); }
.rvt-mail { border: 1px solid var(--rvt-rule); border-radius: 10px; background: #fff; padding: 12px 14px;
  max-width: 780px; }
.rvt-mail .rvt-subj { font-weight: 700; color: var(--rvt-ink); margin-bottom: 6px; }
.rvt-mail .rvt-body { margin: 0; color: var(--rvt-ink); line-height: 1.55; white-space: pre-wrap;
  overflow-wrap: anywhere; }
.rvt-note { margin: 8px 0 0; font-size: 12.5px; color: var(--rvt-ink2); max-width: 780px; line-height: 1.5; }
.rvt-note.warm { color: #92400e; }
.rvt-why { margin: 0 0 8px; max-width: 780px; border-radius: 10px; background: #f8f8f6;
  border: 1px solid var(--rvt-rule); padding: 10px 14px; }
.rvt-why b { display: block; font-size: 12px; color: var(--rvt-ink2); margin-bottom: 2px; }
.rvt-why .rvt-reason { font-size: 13px; }
.rvt-write { margin-top: 10px; max-width: 780px; border: 1px solid var(--rvt-rule); border-radius: 10px;
  background: #fff; padding: 12px 14px; }
.rvt-write label { display: block; font-size: 12px; color: var(--rvt-ink2); margin-top: 8px; }
.rvt-write label:first-of-type { margin-top: 0; }
.rvt-write input[type=text], .rvt-write textarea { display: block; width: 100%; margin-top: 4px;
  border: 1px solid var(--rvt-rule); border-radius: 8px; padding: 6px 10px; font-size: 13px;
  color: var(--rvt-ink); font-family: inherit; }
.rvt-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }

/* One line for every letter still being written. */
.rvt-collapsed { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--rvt-rule);
  background: #f8fafc; color: #1f5b93; font-weight: 600; padding: 11px 14px 11px 36px; }
.rvt-collapsed a { margin-left: auto; font-weight: 600; font-size: 12px; color: var(--rvt-acc);
  text-decoration: none; }
.rvt-empty { padding: 22px 16px; text-align: center; color: var(--rvt-ink2); font-size: 13px; }
.rvt-empty a { color: var(--rvt-acc); font-weight: 600; }

/* ── Action bar (above the table, sticky under the 56px app top bar) ── */
.rvt-actions { position: sticky; top: 56px; z-index: 20; display: flex; flex-wrap: wrap;
  gap: 8px 12px; align-items: center; margin: 10px 0; padding: 10px 14px;
  border: 1px solid var(--rvt-rule); border-radius: 10px; background: #fff;
  box-shadow: 0 4px 12px -8px rgba(15, 23, 42, .25); }
.rvt-allform { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.rvt-allwhy { color: var(--rvt-ink3); font-size: 12px; max-width: 34ch; }
.rvt-actions .rvt-bulk { margin: 0; padding: 0 0 0 12px; border: 0; border-left: 1px solid var(--rvt-rule);
  border-radius: 0; flex: 1 1 24rem; }
/* ── Bulk bar ─────────────────────────────────────────────────────── */
.rvt-bulk { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px;
  padding: 10px 14px; border: 1px solid var(--rvt-rule); border-radius: 10px; background: #fff;
  font-size: 13px; color: var(--rvt-ink2); }
.rvt-bulk b { color: var(--rvt-ink); }
.rvt-bulk .rvt-hint { margin-left: auto; color: var(--rvt-ink3); font-size: 12px; }
.rvt-bulk label { font-size: 12px; }
.rvt-bulk select { border: 1px solid var(--rvt-rule); border-radius: 8px; padding: 4px 8px; font-size: 12px;
  background: #fff; }
.rvt-more { margin-top: 36px; }
.rvt-foot { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px; }
.rvt-quota { flex: 0 0 18rem; max-width: 100%; }
.rvt-clarity { flex: 1 1 18rem; min-width: 0; }

/* ── Narrow screens: keep Contact · Subject · Check ───────────────── */
@media (max-width: 760px) {
  .rvt, .rvt.rvt-onecamp { --rvt-cols: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.6fr) 78px; }
  .rvt .c-status, .rvt .c-chev, .rvt .c-camp { display: none; }
}
@media (max-width: 520px) {
  .rvt, .rvt.rvt-onecamp { --rvt-cols: minmax(0, 1fr) minmax(0, 1.3fr) 70px; }
  .rvt .c-company { display: none; }
  .rvt-flow { font-size: 12px; }
  .rvt-bulk .rvt-hint { margin-left: 0; flex-basis: 100%; }
  /* 390px: the two forms stack; the selection row loses its divider. The
     stacked bar is ~200px tall, so on a phone it stays at the top of the
     table but does not stick — a sticky bar would cover a quarter of the
     screen while reading letters. */
  .rvt-actions { padding: 8px 10px; position: static; }
  .rvt-actions .rvt-bulk { padding: 8px 0 0; border-left: 0; border-top: 1px solid var(--rvt-rule);
    flex-basis: 100%; }
}
@media (max-width: 640px) {
  .rvt-flow .rvt-arrow { display: none; }
}
