/* Signal (2026-11-17). Colors are tokens with dark values below; brand = Stout Companies black #211f20 + red #ed1b24, accents green for "ready". */
:root {
  --bg: #f6f7f8; --surface: #fff; --text: #17202a; --muted: #5b6673; --border: #dde2e7; --row: #f0f3f5; --zebra: #f8f9fa; --hover: #eef2f5;
  --accent: #211f20; --accent-ink: #fff; --accent-soft: #eeeeef; --red: #ed1b24;
  --ok: #17643a; --ok-bg: #e7f6ec; --warn: #8a5300; --warn-bg: #fff4dd; --bad: #a61b1b; --bad-bg: #fdecec; --info: #1d4f91; --info-bg: #e8f0fb;
  --seg1: #2f6f4f; --seg2: #2b5f9e; --seg3: #8a5a1f; --seg4: #6b4fa0; --seg5: #9c3b5a;
  --focus: #2563eb; --radius: 10px; color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11161b; --surface: #182027; --text: #e6ebef; --muted: #9aa6b2; --border: #2b3640; --row: #1e2830; --zebra: #1b232a; --hover: #222c35;
    --accent: #eceeef; --accent-ink: #111; --accent-soft: #263039; --red: #ff4a52;
    --ok: #9be3b7; --ok-bg: #133222; --warn: #ffd58a; --warn-bg: #3a2c10; --bad: #ffb4b4; --bad-bg: #3a1717; --info: #a9c8ff; --info-bg: #17263b;
    --seg1: #7fcfa5; --seg2: #8fb8f0; --seg3: #e0b072; --seg4: #c3aef0; --seg5: #f0a3bd;
    --focus: #8ab4ff; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #11161b; --surface: #182027; --text: #e6ebef; --muted: #9aa6b2; --border: #2b3640; --row: #1e2830; --zebra: #1b232a; --hover: #222c35;
  --accent: #eceeef; --accent-ink: #111; --accent-soft: #263039; --red: #ff4a52;
  --ok: #9be3b7; --ok-bg: #133222; --warn: #ffd58a; --warn-bg: #3a2c10; --bad: #ffb4b4; --bad-bg: #3a1717; --info: #a9c8ff; --info-bg: #17263b;
  --seg1: #7fcfa5; --seg2: #8fb8f0; --seg3: #e0b072; --seg4: #c3aef0; --seg5: #f0a3bd;
  --focus: #8ab4ff; color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100dvh; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1 { font-size: 22px; margin: 0 0 4px; } h2 { font-size: 17px; margin: 0 0 10px; } h3 { font-size: 15px; margin: 0 0 6px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .num { font-variant-numeric: tabular-nums; }
.light-only { display: inline; } .dark-only { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .light-only { display: none; } :root:not([data-theme="light"]) .dark-only { display: inline; } }

.top { background: var(--surface); border-block-start: 4px solid var(--red); border-block-end: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 16px; }
.brand { display: flex; gap: 12px; align-items: center; text-decoration: none; }
.brand .logo { block-size: 40px; inline-size: auto; }
.brand .sub { font-weight: 700; font-size: 17px; padding-inline-start: 12px; border-inline-start: 1px solid var(--border); }
.who { display: flex; gap: 8px; align-items: center; font-size: 14px; }

.btn { text-decoration: none; display: inline-block; font: inherit; font-weight: 600; font-size: 14px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); border-radius: 8px; padding: 7px 14px; cursor: pointer; white-space: nowrap; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn.sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
input, select, textarea { font: inherit; font-weight: 400; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; inline-size: 100%; }
textarea { min-block-size: 80px; resize: vertical; }
label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }

.login { max-inline-size: 380px; margin: 8vh auto; padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.login form { display: grid; gap: 12px; margin-top: 14px; }
.err { color: var(--bad); background: var(--bad-bg); padding: 8px 10px; border-radius: 8px; margin: 0; font-size: 14px; }

/* shell */
.shell { display: grid; grid-template-columns: 210px 1fr; min-block-size: calc(100dvh - 61px); }
.nav { background: var(--surface); border-inline-end: 1px solid var(--border); padding: 12px 8px; display: flex; flex-direction: column; gap: 2px; }
.nav .grp { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 10px 4px; font-weight: 700; }
.nav a { text-decoration: none; padding: 7px 10px; border-radius: 8px; font-size: 14px; display: flex; justify-content: space-between; gap: 8px; }
.nav a:hover { background: var(--hover); }
.nav a.on { background: var(--accent); color: var(--accent-ink); }
.nav a .ct { font-size: 12px; opacity: .75; }
.content { padding: 18px 20px 40px; min-inline-size: 0; }
.mock { background: var(--warn-bg); color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); padding: 7px 12px; border-radius: 8px; font-size: 13px; margin-bottom: 14px; }
.head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.head .acts { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .shell { grid-template-rows: auto 1fr; }   /* the menu row only as tall as its links (2026-11-18) */
  .nav { flex-direction: row; overflow-x: auto; border-inline-end: 0; border-block-end: 1px solid var(--border); padding: 6px 8px; }
  .nav .grp { display: none; } .nav a { white-space: nowrap; } .nav a .ct { display: none; }
  .content { padding: 14px 16px 32px; }
  .brand .logo { block-size: 30px; }
}

/* cards, tiles */
.grid { display: grid; gap: 12px; }
.g4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.g2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; min-inline-size: 0; }
.tile .v { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.tile .l { font-size: 13px; color: var(--muted); }
.tile .d { font-size: 12px; margin-top: 4px; }
.sect { margin-top: 18px; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; font-size: 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; min-inline-size: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { .kv { grid-template-columns: 1fr; } .kv dd { margin-bottom: 6px; } }
@media (max-width: 600px) { .head .acts .btn { white-space: normal; text-align: start; } }   /* long list buttons wrap on phones (farm & retail, 2026-11-17) */

/* badges */
.b { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); white-space: nowrap; }
.b.ok { background: var(--ok-bg); color: var(--ok); } .b.warn { background: var(--warn-bg); color: var(--warn); } .b.bad { background: var(--bad-bg); color: var(--bad); } .b.info { background: var(--info-bg); color: var(--info); }
.b.src { background: transparent; border: 1px solid var(--border); font-weight: 500; }
.dot { display: inline-block; inline-size: 9px; block-size: 9px; border-radius: 50%; margin-inline-end: 6px; vertical-align: 1px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
/* new replies waiting (2026-11-17): a red count on the menu (phones too), the campaign list and the Replies tab */
.nb { display: inline-block; margin-inline-start: 6px; min-inline-size: 18px; padding: 0 6px; border-radius: 999px; background: var(--red); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; vertical-align: middle; opacity: 1; }
@media (max-width: 820px) { .nav a .nb { display: inline-block; } }
.chip { font: inherit; font-size: 13px; border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 4px 11px; border-radius: 999px; cursor: pointer; }
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* tables */
.tblwrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
table { border-collapse: collapse; inline-size: 100%; font-size: 14px; }
th { text-align: start; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 8px 10px; border-block-end: 1px solid var(--border); white-space: nowrap; background: var(--zebra); }
td { padding: 8px 10px; border-block-end: 1px solid var(--row); vertical-align: top; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--hover); }
td.r, th.r { text-align: end; }
.bar { block-size: 8px; background: var(--row); border-radius: 4px; overflow: hidden; min-inline-size: 60px; }
.bar > i { display: block; block-size: 100%; background: var(--ok); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.filters input { max-inline-size: 260px; } .filters select { inline-size: auto; }

/* findings */
.find { border-inline-start: 3px solid var(--border); padding: 6px 10px; margin-bottom: 8px; background: var(--zebra); border-radius: 0 8px 8px 0; font-size: 14px; }
.find.ok { border-color: var(--ok); } .find.warn { border-color: var(--warn); } .find.info { border-color: var(--info); }
.find .meta { font-size: 12px; color: var(--muted); }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: start; font-size: 14px; }
.steps li::before { content: counter(s); inline-size: 24px; block-size: 24px; border-radius: 50%; background: var(--accent-soft); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.steps li.done::before { background: var(--ok-bg); color: var(--ok); content: "✓"; }
.steps li.now::before { background: var(--accent); color: var(--accent-ink); }

/* builders */
.builder { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 14px; align-items: start; }
@media (max-width: 900px) { .builder { grid-template-columns: 1fr; } }
.blocks { display: grid; gap: 8px; }
.blk { display: flex; justify-content: space-between; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; background: var(--surface); font-size: 14px; }
.blk .h { cursor: grab; color: var(--muted); }
.mail { background: #fff; color: #1d1d1f; border: 1px solid var(--border); border-radius: 10px; max-inline-size: 640px; margin-inline: auto; font: 15px/1.55 Georgia, "Times New Roman", serif; }
.mail .mh { padding: 10px 16px; font: 13px/1.5 system-ui, sans-serif; border-block-end: 1px solid #e5e5e5; color: #555; }
.mail .mb { padding: 18px 22px; }
.mail .mb h2 { font: 700 20px/1.3 system-ui, sans-serif; color: #211f20; }
.mail .prod { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.mail .prod div { border: 1px solid #e3e3e3; border-radius: 8px; padding: 10px; font: 14px/1.4 system-ui, sans-serif; }
.mail .cta { display: inline-block; background: #211f20; color: #fff; text-decoration: none; padding: 9px 18px; border-radius: 6px; font: 600 14px system-ui, sans-serif; }
.mail .mf { padding: 12px 22px 16px; font: 12px/1.5 system-ui, sans-serif; color: #777; border-block-start: 1px solid #eee; }
.merge { background: #fff2b3; border-radius: 3px; padding: 0 2px; }
.page { background: #fff; color: #1d1d1f; inline-size: min(100%, 612px); aspect-ratio: 8.5 / 11; margin-inline: auto; border: 1px solid var(--border); box-shadow: 0 2px 10px rgba(0,0,0,.08); padding: 5% 6%; display: flex; flex-direction: column; gap: 3%; font: 12px/1.45 system-ui, sans-serif; overflow: hidden; }
.page .ph { display: flex; justify-content: space-between; align-items: center; border-block-end: 3px solid #ed1b24; padding-block-end: 8px; }
.page .ph img { block-size: 44px; }
.page h2 { font-size: 22px; line-height: 1.2; margin: 0; color: #211f20; }
.page .hero { background: #f2f4f1; border-radius: 6px; padding: 12px; }
.page .cols { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.page .cols div { border: 1px solid #e2e2e2; border-radius: 6px; padding: 8px; }
.page .foot { margin-top: auto; display: flex; justify-content: space-between; gap: 10px; align-items: flex-end; border-block-start: 1px solid #ddd; padding-block-start: 8px; }
.page .qr { inline-size: 64px; block-size: 64px; background: repeating-linear-gradient(45deg, #222 0 4px, #fff 4px 8px); border: 4px solid #fff; outline: 1px solid #222; }
.check { list-style: none; padding: 0; margin: 0; display: grid; gap: 5px; font-size: 13px; }
.check li::before { content: "✓ "; color: var(--ok); font-weight: 700; }
.check li.no::before { content: "! "; color: var(--warn); }
.map { position: relative; aspect-ratio: 16 / 9; background: var(--zebra); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.map svg { inline-size: 100%; block-size: 100%; display: block; }
@media print {
  .top, .nav, .mock, .head, .noprint { display: none !important; }
  .shell { display: block; } .content { padding: 0; } .builder { display: block; }
  .page { box-shadow: none; border: 0; inline-size: 100%; }
}

/* ── Step 2 (2026-11-17): live mail pieces, the printed letter, labels, the public reply page ── */
.mock.live { background: var(--ok-bg); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
label.row { display: flex; gap: 8px; align-items: center; font-weight: 500; color: var(--text); }
label.row input { inline-size: auto; }
a.chip { text-decoration: none; }
.lwrap { overflow: auto; background: var(--zebra); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; }
/* The letter, at true size: US Letter. Return address and recipient sit where a #10 double-window envelope shows them
   (return window ~0.5in from top/left; recipient window ~2in from top, 0.875in from left). Check with a test print. */
.letter { position: relative; inline-size: 8.5in; block-size: 11in; background: #fff; color: #1d1d1f; margin-inline: auto; box-shadow: 0 1px 8px rgba(0,0,0,.12);
  font: 11pt/1.45 Georgia, "Times New Roman", serif; overflow: hidden; }
.letter .lt-ret { position: absolute; top: 0.45in; left: 0.6in; inline-size: 3.2in; font: 9pt/1.35 system-ui, sans-serif; }
.letter .lt-blogo { display: block; max-block-size: 0.55in; max-inline-size: 1.6in; margin-bottom: 4px; }   /* the brand's own logo above its name */
.letter .lt-logo { position: absolute; top: 0.45in; right: 0.6in; block-size: 0.9in; max-inline-size: 3.4in; object-fit: contain; }
/* brand colour from SSInv (the invoice's): headline rule, reply box edge, the signer's name (2026-11-17) */
.letter.branded h2 { border-bottom-color: var(--brand); }
.letter.branded .lt-reply { border-left: 4px solid var(--brand); }
.letter.branded .lt-reply b, .letter.branded .lt-sign b { color: var(--brand); }
.letter .lt-to { position: absolute; top: 2.1in; left: 0.95in; inline-size: 3.8in; block-size: 1in; font: 11pt/1.3 system-ui, sans-serif; }
.letter .lt-body { position: absolute; top: 3.35in; left: 0.9in; right: 0.9in; }
.letter .lt-date { text-align: right; font: 10pt system-ui, sans-serif; color: #444; margin-bottom: 6px; }
.letter h2 { font: 700 17pt/1.2 system-ui, sans-serif; color: #211f20; margin: 0 0 10px; border-bottom: 3px solid #ed1b24; padding-bottom: 6px; }
.letter p { margin: 0 0 9px; }
.letter .lt-k { font: 600 10pt system-ui, sans-serif; margin-bottom: 3px; }
.letter .lt-items { inline-size: 100%; border-collapse: collapse; font: 10pt system-ui, sans-serif; margin-bottom: 10px; }
.letter .lt-items td { border: 0; padding: 2px 8px; background: #fff; }   /* no headings, no lines (Ryan 2026-11-17) */
.letter .lt-items td.r { text-align: end; white-space: nowrap; }
.letter .lt-items td.r { font-weight: 600; }
.letter .lt-reply { display: flex; gap: 14px; align-items: center; border: 1px solid #ccc; border-radius: 6px; padding: 6px 10px; margin: 8px 0; font: 10pt/1.4 system-ui, sans-serif; }
.letter .lt-qr { inline-size: 1in; block-size: 1in; flex: none; }
.letter .lt-qr.ph { background: repeating-linear-gradient(45deg, #222 0 4px, #fff 4px 8px); }
.letter .lt-url { font: 8pt ui-monospace, monospace; color: #555; word-break: break-all; }
.letter .lt-sign { font: 10pt/1.4 system-ui, sans-serif; }
.letter .lt-foot { position: absolute; bottom: 0.45in; left: 0.9in; right: 0.9in; font: 8pt system-ui, sans-serif; color: #666; border-top: 1px solid #ddd; padding-top: 5px; }
/* Avery 5160: 30 labels (3 × 10), 2.625in × 1in, page margins 0.5in top, 0.1875in sides, 0.125in between columns */
.labels { inline-size: 8.5in; block-size: 11in; padding: 0.5in 0.1875in 0; display: grid; grid-template-columns: repeat(3, 2.625in); grid-auto-rows: 1in; column-gap: 0.125in; background: #fff; }
.labels .lbl { padding: 0.1in 0.15in; font: 9.5pt/1.25 system-ui, sans-serif; color: #000; overflow: hidden; }
#printArea { display: none; }
@media print {
  @page { size: letter; margin: 0; }
  body.printing > *:not(#printArea) { display: none !important; }
  body.printing #printArea { display: block; }
  body.printing { background: #fff; }
  #printArea .letter { box-shadow: none; margin: 0; page-break-after: always; break-after: page; }
  #printArea .labels { page-break-after: always; break-after: page; }
}
/* public reply page */
.rp { max-inline-size: 520px; margin: 0 auto; padding: 20px 16px 40px; }
.rp ul { margin: 4px 0 14px 20px; padding: 0; }
.rp .b { white-space: normal; border-radius: 8px; }   /* the 'Test letter' note wraps on a phone */
.rp form { display: grid; gap: 12px; margin-top: 14px; }
.choices { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; display: grid; gap: 8px; background: var(--surface); }
.choices legend { font-weight: 700; padding: 0 4px; }
/* reply page in the letter's brand (2026-11-17): a white letterhead bar in every theme (the logos are on white), brand colour on the bar
   edge, buttons and choices */
.reply.branded .top { background: #fff; border-block-start-color: var(--brand, var(--red)); }
.reply.branded .brand { display: flex; inline-size: 100%; align-items: center; justify-content: space-between; gap: 12px; }
.reply.branded .rb-left { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; color: #211f20; font-size: 12px; line-height: 1.2; min-inline-size: 0; }   /* logo above the name, like the letter */
.reply.branded .rb-one { block-size: 38px; inline-size: auto; max-inline-size: 130px; object-fit: contain; flex: none; }
.reply.branded .rb-group { block-size: 48px; inline-size: auto; max-inline-size: 55%; object-fit: contain; }
.reply.branded .btn { background: var(--brand); border-color: var(--brand); color: #fff; }
.reply.branded label.ch input { accent-color: var(--brand); }
.reply.branded h1 { color: var(--brand); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .reply.branded h1 { color: inherit; } }
@media (max-width: 420px) { .reply.branded .rb-one { block-size: 40px; } .reply.branded .rb-group { block-size: 40px; } }
label.ch { display: flex; gap: 10px; align-items: center; font-size: 15px; font-weight: 500; color: var(--text); cursor: pointer; }
label.ch input { inline-size: 20px; block-size: 20px; flex: none; }
/* the save step of "Make lead…" (2026-11-17): a bar under the preview with a big green button */
.gen-bar { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 12px; padding: 12px 14px; border: 2px solid var(--ok); border-radius: var(--radius, 10px); background: var(--ok-bg); color: var(--text); }
.btn.gen { background: #15803d; border-color: #15803d; color: #fff; font-size: 16px; padding: 10px 22px; }   /* same dark green in both themes: white text stays readable */
.btn.gen:hover:not(:disabled) { filter: brightness(1.08); }
.find.saved { font-size: 15px; }
/* Results (2026-11-17) */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 12px 0; }
.tile { border: 1px solid var(--border); border-radius: var(--radius, 10px); padding: 10px 12px; background: var(--surface); }
.tile .tv { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; } .tile .tv small { font-size: 13px; font-weight: 500; color: var(--muted); }
/* Prospects filters (2026-11-18): county and search sit in the chip row, not full width */
#prv .chips select, #prv .chips input { inline-size: auto; min-inline-size: 170px; flex: 0 1 260px; }

/* ── Newsletters (2026-11-18, nl.js) ── */
.btn.big { font-size: 15px; padding: 9px 18px; }
.nowrap { white-space: nowrap; } .rowlink { text-decoration: none; } .rowlink:hover b { text-decoration: underline; }
.nltable td { vertical-align: top; }
.empty h2 { margin-top: 0; }
.flash { padding: 10px 12px; border-radius: 8px; margin: 0 0 12px; font-size: 14px; background: var(--accent-soft); line-height: 1.5; }
.flash .btn { margin: 4px 6px 0 0; vertical-align: middle; }
.flash.info { background: var(--info-bg); color: var(--info); } .flash.warn { background: var(--warn-bg); color: var(--warn); } .flash.bad { background: var(--bad-bg); color: var(--bad); } .flash.ok { background: var(--ok-bg); color: var(--ok); }
.hint { font-weight: 400; color: var(--muted); font-size: 12px; margin-inline-start: 6px; }
label > .lt { display: block; }   /* label text and its hint on one line */
.lbl { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.form { display: grid; gap: 12px; max-inline-size: 640px; }
.form.inline { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; max-inline-size: none; }
.form.inline label { flex: 1 1 260px; }
.acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
/* the four steps */
.stepper { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.stepper .step { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); text-decoration: none; font-weight: 600; font-size: 14px; }
.stepper .step .n { inline-size: 22px; block-size: 22px; border-radius: 50%; background: var(--accent-soft); display: grid; place-items: center; font-size: 12px; }
.stepper .step.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.stepper .step.on .n { background: var(--accent-ink); color: var(--accent); }
.stepper .step.off { opacity: .5; cursor: not-allowed; }
.stepper .arrow { color: var(--muted); }
/* template picker */
.tplcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.tplcard { font: inherit; color: var(--text); text-align: start; display: grid; gap: 4px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.tplcard:hover { border-color: var(--accent); background: var(--hover); }
.tplcard .thumb { block-size: 70px; border-radius: 6px; background: var(--row); display: grid; place-items: center; font-size: 28px; color: var(--muted); }
.outline { margin: 0; padding-inline-start: 20px; display: grid; gap: 4px; font-size: 14px; }
/* brand settings */
.logobox { min-block-size: 90px; border: 1px dashed var(--border); border-radius: 8px; display: grid; place-items: center; padding: 10px; margin-bottom: 8px; background: #fff; }
.logobox img { max-inline-size: 260px; max-block-size: 120px; }
.filebtn { display: inline-block; position: relative; overflow: hidden; color: var(--text); font-size: 13px; }
.filebtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.colors { display: grid; gap: 8px; }
.color { display: flex; gap: 10px; align-items: center; font-weight: 500; color: var(--text); font-size: 14px; }
.color input { inline-size: 44px; block-size: 32px; padding: 2px; }
.linkrow { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 6px; margin-bottom: 6px; }
@media (max-width: 640px) { .linkrow { grid-template-columns: 1fr; } }
/* phones: each newsletter is a card, with "Duplicate as new draft" in view (not off the side of a wide table) */
@media (max-width: 640px) {
  .nltable, .nltable tbody, .nltable tr, .nltable td { display: block; }
  .nltable tr:first-child { display: none; }
  .nltable tr { padding: 10px 12px; border-block-end: 1px solid var(--border); }
  .nltable td { padding: 2px 0; border: 0; }
  .nltable td.r { text-align: start; padding-top: 8px; white-space: normal; }
}

/* ── Newsletter editor (2026-11-18, nl-editor.js) ── */
.edtop { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin: 4px 0 10px; }
.edtop h1 { overflow-wrap: anywhere; }
.edacts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.savestate { font-size: 13px; color: var(--muted); display: inline-flex; gap: 8px; align-items: center; min-inline-size: 140px; }
.savestate.ok { color: var(--ok); } .savestate.bad { color: var(--bad); font-weight: 600; }
.ed { display: grid; grid-template-columns: 190px minmax(0, 1fr) 290px; gap: 14px; align-items: start; }
.ed.ro { grid-template-columns: minmax(0, 1fr) 290px; }
.palette, .settings { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; position: sticky; top: 76px; }
.settings { display: grid; gap: 12px; max-block-size: calc(100dvh - 96px); overflow: auto; }
.settings h2 { margin: 0; }
.pal-hint { margin-bottom: 8px; }
#pal { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.palitem { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; cursor: grab; font-size: 14px; font-weight: 600; background: var(--surface); user-select: none; }
.palitem:hover, .palitem:focus-visible { border-color: var(--accent); background: var(--hover); }
.palitem .ic { inline-size: 26px; text-align: center; font-size: 15px; color: var(--muted); }
.canvaswrap { min-inline-size: 0; overflow-x: auto; border-radius: var(--radius); }
.canvas { padding: 24px 12px 40px; border-radius: var(--radius); border: 1px solid var(--border); min-block-size: 400px; }
.paper { max-inline-size: 600px; margin: 0 auto; color: #222; font-size: 16px; line-height: 1.55; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.nlb { position: relative; outline: 2px solid transparent; outline-offset: -2px; }
.nlb:hover { outline-color: rgba(37, 99, 235, .35); }
.nlb.sel { outline-color: #2563eb; z-index: 2; }
.nlbbody { padding-inline: 24px; position: relative; }
/* drag handle: inside the block's own left padding, so it covers nothing */
.nlb > .handle { position: absolute; inset-inline-start: 2px; inset-block-start: 50%; transform: translateY(-50%); z-index: 3; display: none; cursor: grab; background: #2563eb; color: #fff; font: 700 12px/1 system-ui, sans-serif; letter-spacing: -2px; padding: 8px 4px 8px 2px; border-radius: 4px; }
.nlb:hover > .handle, .nlb.sel > .handle { display: block; }
/* the selected block's tools, pinned above the email */
.blockbar { position: sticky; inset-block-start: 62px; z-index: 4; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-block-size: 44px; padding: 6px 10px; margin-bottom: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 2px 6px rgba(0,0,0,.06); }
.blockbar .bname { margin-inline-end: 6px; }
.blockbar .fmt, .blockbar .bacts { display: inline-flex; flex-wrap: wrap; gap: 3px; align-items: center; }
.blockbar .bacts { margin-inline-start: auto; }
.blockbar button { font: inherit; font-size: 13px; font-weight: 600; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 6px; min-inline-size: 30px; padding: 4px 8px; cursor: pointer; }
.blockbar button:hover { background: var(--hover); }
.blockbar button.del:hover { background: var(--bad-bg); color: var(--bad); border-color: var(--bad); }
.nlbbody .ql-editor { padding: 0; overflow: visible; line-height: inherit; }
.nlbbody .ql-editor p { margin: 0 0 12px; } .nlbbody .ql-editor p:last-child { margin-bottom: 0; }
.nlbbody.ql-container, .nlbbody .ql-container { font: inherit; block-size: auto; }   /* Quill's own 13px loses: the block is the Quill container */
.nlbbody .ql-editor a { color: inherit; text-decoration: underline; }
.nlbbody .ql-editor.ql-blank::before { color: #999; font-style: normal; inset-inline: 0; }
.nlbbody.two { display: grid; grid-template-columns: 2fr 3fr; gap: 12px; align-items: center; }
.nlbbody.two.rtl .col.img { order: 2; }
.nlbbody .photo { position: relative; display: inline-block; max-inline-size: 100%; }
.nlbbody .photo img { display: block; block-size: auto; }
.nlbbody .photo .replace { position: absolute; inset-block-start: 8px; inset-inline-end: 8px; opacity: 0; transition: opacity .15s; }
.nlb:hover .photo .replace, .nlb.sel .photo .replace, .photo .replace:focus-visible { opacity: 1; }
.nlbbody .placeholder { min-inline-size: 260px; block-size: 160px; display: grid; place-items: center; background: repeating-linear-gradient(45deg, #f1f3f5, #f1f3f5 10px, #e9ecef 10px, #e9ecef 20px); color: #555; font-weight: 600; cursor: pointer; border-radius: 4px; }
.t-image .placeholder { inline-size: 100%; }
.nlbtn { display: inline-block; padding: 14px 28px; border-radius: 6px; font-weight: 700; text-align: center; }
.nlbtn.nolink { outline: 2px dashed #d97706; outline-offset: 2px; }
.warnline { color: #92400e; background: #fef3c7; font: 600 12px/1.3 system-ui, sans-serif; padding: 3px 8px; border-radius: 4px; margin-top: 6px; display: inline-block; }
.nlbbody.spacer { background: repeating-linear-gradient(90deg, transparent, transparent 6px, rgba(0,0,0,.05) 6px, rgba(0,0,0,.05) 12px); }
.t-footer { font-size: 13px; color: #666; text-align: center; line-height: 1.5; }
.t-footer .fnote { margin-bottom: 10px; }
.t-footer .ffixed { opacity: .85; cursor: not-allowed; }
.t-footer .ffixed div { margin-top: 6px; }
.drop-ghost { block-size: 6px !important; min-block-size: 0 !important; overflow: hidden !important; padding: 0 !important; background: #2563eb !important; border-radius: 3px; opacity: 1 !important; }
.drop-ghost > * { display: none !important; }
.nlpill { background: #e0ecff; color: #1e3a8a; border-radius: 999px; padding: 1px 8px; font-size: .85em; font-weight: 600; white-space: nowrap; cursor: pointer; }
.nlpill.bad { background: #fde2e2; color: #991b1b; }
/* settings */
.ctl { display: grid; gap: 4px; }
.colorctl { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.colorctl input { inline-size: 44px; block-size: 30px; padding: 2px; }
.linkbtn { font: inherit; font-size: 13px; background: none; border: 0; color: var(--info); text-decoration: underline; cursor: pointer; padding: 0; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; }
.seg button { font: inherit; font-size: 13px; padding: 5px 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 6px; cursor: pointer; }
.seg button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
input[type=range] { padding: 0; border: 0; background: transparent; }
input.invalid { border-color: var(--bad); outline: 2px solid var(--bad-bg); }
.setthumb { max-inline-size: 100%; max-block-size: 120px; border-radius: 6px; border: 1px solid var(--border); display: block; margin-bottom: 6px; }
/* photo dialog */
.dlg { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); padding: 18px; inline-size: min(640px, calc(100vw - 32px)); }
.dlg::backdrop { background: rgba(0,0,0,.4); }
.dlg h2 { margin-top: 0; }
.dlg textarea { min-block-size: 60px; }
.phgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; max-block-size: 300px; overflow: auto; }
.phpick { border: 2px solid transparent; padding: 0; background: var(--row); border-radius: 6px; cursor: pointer; aspect-ratio: 4 / 3; overflow: hidden; }
.phpick:hover, .phpick:focus-visible { border-color: #2563eb; }
.phpick img { inline-size: 100%; block-size: 100%; object-fit: cover; display: block; }
.phprev { max-inline-size: 100%; max-block-size: 220px; display: block; margin: 0 auto 12px; border-radius: 6px; }
@media (max-width: 1100px) {
  .ed { grid-template-columns: minmax(0, 1fr) 270px; }
  .palette { grid-column: 1 / -1; position: static; }
  #pal { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
@media (max-width: 760px) {
  .ed, .ed.ro { grid-template-columns: 1fr; }
  .settings { position: static; max-block-size: none; }
  .nlbbody.two { grid-template-columns: 1fr; }
}

/* ── Newsletter fields + Preview step (2026-11-18, nl-steps.js) ── */
.fieldbtn { background: #e0ecff !important; color: #1e3a8a !important; border-color: #bfd4ff !important; }
.oneline { border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; background: var(--surface); }
.oneline .ql-editor { padding: 0; white-space: nowrap; overflow-x: auto; }
.oneline.ro { opacity: .7; }
.addf { justify-self: start; }
.pvbar { display: grid; grid-template-columns: minmax(0, 1.4fr) auto minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 12px; }
.pvbar .row { display: flex; gap: 6px; }
.picker { position: relative; }
.picker .results { position: absolute; inset-inline: 0; inset-block-start: calc(100% + 2px); z-index: 6; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.12); max-block-size: 320px; overflow: auto; }
.picker .res { display: grid; gap: 2px; inline-size: 100%; text-align: start; font: inherit; color: var(--text); background: none; border: 0; border-block-end: 1px solid var(--border); padding: 8px 10px; cursor: pointer; }
.picker .res:hover, .picker .res:focus-visible { background: var(--hover); }
.pad { padding: 8px 10px; }
#pvWho { margin-top: 6px; }
.ok-t { color: var(--ok); } .err-t { color: var(--bad); }
.pvgrid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
.inbox { margin-bottom: 10px; }
.inboxrow { display: flex; gap: 10px; align-items: baseline; padding: 8px 0; overflow: hidden; white-space: nowrap; }
.inboxrow .isubj { font-weight: 600; } .inboxrow .iprev { overflow: hidden; text-overflow: ellipsis; }
.pvframe { background: var(--row); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; display: flex; justify-content: center; }
.pvframe iframe { border: 0; background: #fff; inline-size: 100%; max-inline-size: 680px; block-size: 900px; border-radius: 6px; }
.pvframe.mobile iframe { inline-size: 375px; block-size: 760px; border: 10px solid #222; border-radius: 28px; }
.pvtext { white-space: pre-wrap; font: 13px/1.5 ui-monospace, Menlo, Consolas, monospace; max-block-size: 900px; overflow: auto; background: var(--row); padding: 10px; border-radius: 6px; margin: 0; }
@media (max-width: 1100px) { .pvbar, .pvgrid { grid-template-columns: 1fr; } }

/* ── Newsletter Recipients step (2026-11-18) ── */
.choose { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin-bottom: 12px; }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; font-weight: 400; color: var(--text); font-size: 14px; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--hover); }
.choice input { inline-size: auto; margin-top: 3px; }
.row.gap { display: flex; gap: 8px; }
.pickbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 10px 0; }
.pickbar label.row { display: flex; gap: 6px; align-items: center; font-weight: 500; color: var(--text); }
.pickbar input[type=checkbox], td input[type=checkbox] { inline-size: auto; }
.g3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.tiles .tile .v { font-size: 30px; font-weight: 700; }
.tiles .tile.ok .v { color: var(--ok); }
details.why { margin: 6px 0; } details.why > summary { cursor: pointer; padding: 6px 0; font-size: 14px; }
details.why .tblwrap { margin-top: 6px; max-block-size: 380px; overflow: auto; }
.btn.disabled { opacity: .5; pointer-events: none; }

/* ── Newsletter Review & send (2026-11-18) ── */
.rvcheck li.no { color: var(--bad); font-weight: 600; } .rvcheck li.no::before { content: "\2715  "; color: var(--bad); }
.rvcheck li.warn::before { content: "!  "; color: var(--warn); font-weight: 700; }
.sendbox { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.btn.send { background: #15803d; border-color: #15803d; color: #fff; font-size: 17px; padding: 12px 26px; }
.btn.send:disabled { background: var(--muted); border-color: var(--muted); }
.progress { block-size: 12px; background: var(--row); border-radius: 999px; overflow: hidden; }
.progress i { display: block; block-size: 100%; background: #15803d; inline-size: 0; transition: inline-size .4s; }
.tiles .tile.bad .v { color: var(--bad); } .tiles .tile.warn .v { color: var(--warn); }
/* send later (2026-11-18) */
.later { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.later label.inline { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; color: var(--text); }
.later input[type=datetime-local] { inline-size: auto; }
#slNote { flex-basis: 100%; }
/* Find → Prospects sub-entries, one per outside list (2026-11-18) */
.nav a.sub { padding-inline-start: 22px; font-size: 13px; }
.nav a.sub .ct { font-variant-numeric: tabular-nums; }
@media (max-width: 820px) { .nav a.sub { padding-inline-start: 10px; } }
#lfT { max-inline-size: 420px; }
/* To-do (2026-11-18) */
#tdT, #tdB { margin-bottom: 8px; }
.todo .resp { border-inline-start: 3px solid var(--info, #1d4f91); background: var(--info-bg, #e8f0fb); padding: 10px 14px; border-radius: 8px; margin-top: 10px; }
.todo .resp h4 { margin: 10px 0 4px; } .todo .resp ul { margin: 4px 0 8px 18px; padding: 0; } .todo .resp p { margin: 6px 0; }
.todo.go { border-color: var(--ok); } .todo.done, .todo.dropped { opacity: .7; }
label.row.go { font-weight: 700; color: var(--text); }
/* possible matches (2026-11-18): shown, not counted */
#prv .possible { margin-top: 4px; }
/* Match review (2026-11-18) */
#prv .mt { margin-bottom: 6px; } #prv .mt + .mt { border-top: 1px dashed var(--border); padding-top: 6px; }
#prv .rv { display: inline-flex; gap: 6px; margin-top: 4px; } #prv .rv .btn { padding: 3px 9px; }
#prv .rvok { background: var(--ok, #17643a); border-color: var(--ok, #17643a); color: #fff; }
#prv .rvd { display: inline-block; margin-top: 3px; font-size: 12px; } #prv .rvd.confirmed { color: var(--ok); } #prv .rvd.rejected { color: var(--bad, #a61b1b); }
#prv .rvd a { margin-inline-start: 6px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) #prv .rvok { background: #15803d; border-color: #15803d; } }
/* people found on prospects' websites (To-do #1, 2026-11-18) */
#prv .found { margin-top: 8px; padding: 6px 8px; border-left: 3px solid var(--ok); background: var(--ok-bg); border-radius: 6px; }
#prv .found .fc { margin-top: 5px; } #prv .found .fc + .fc { border-top: 1px dashed var(--border); padding-top: 5px; }
