/* Envoy — dashboard. A mail-room desk: manila paper, ink, an airmail edge, and a postmark on every letter. */

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/fonts/bricolage.woff2') format('woff2');
  font-weight: 400 800;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('/fonts/dmsans.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --desk: #e9dfcc;
  --desk-2: #dfd3bc;
  --paper: #fbf7ee;
  --paper-2: #f4eddd;
  --ink: #1c2540;
  --ink-2: #4a5270;
  --mute: #7b7f8f;
  --rule: #d3c6aa;
  --red: #c93a25;
  --blue: #2a4f9c;
  --green: #1f7a55;
  --amber: #a8650a;
  --wa: #128c5e;
  --display: 'Bricolage Grotesque', 'DM Sans', system-ui, sans-serif;
  --body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'Cascadia Mono', Consolas, Menlo, monospace;
  --radius: 10px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 1px 2px rgba(28, 37, 64, 0.08), 0 8px 24px -12px rgba(28, 37, 64, 0.28);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font: 400 15px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  /* the desk: warm board with a faint grain of ruled lines */
  background:
    repeating-linear-gradient(0deg, rgba(28, 37, 64, 0.022) 0 1px, transparent 1px 28px),
    radial-gradient(1200px 500px at 85% -10%, rgba(255, 255, 255, 0.55), transparent 70%),
    var(--desk);
}

/* The airmail edge that every envelope from abroad carries. */
.airmail {
  height: 8px;
  background: repeating-linear-gradient(-45deg, var(--red) 0 14px, var(--paper) 14px 22px, var(--blue) 22px 36px, var(--paper) 36px 44px);
}

h1, h2, h3 { font-family: var(--display); letter-spacing: -0.01em; margin: 0; }
a { color: var(--blue); }
code { font: 13px var(--mono); background: rgba(28, 37, 64, 0.07); padding: 1px 5px; border-radius: 4px; }
small { color: var(--mute); font-weight: 400; }
.hint { color: var(--ink-2); font-size: 13.5px; margin: 6px 0 0; }
.error, .result.bad { color: var(--red); font-weight: 600; font-size: 14px; }
.result { color: var(--green); font-weight: 600; font-size: 14px; margin: 4px 0 0; }
.empty { color: var(--ink-2); padding: 34px 18px; text-align: center; border: 1.5px dashed var(--rule); border-radius: var(--radius); margin: 0; }
.spacer { flex: 1; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.row.between { justify-content: space-between; }

/* ---------------------------------------------------------------- buttons */

.btn {
  font: 600 14px var(--body);
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  box-shadow: 2px 2px 0 var(--ink);
  transition: transform 0.08s, box-shadow 0.08s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }
.btn:disabled { opacity: 0.45; cursor: default; transform: none; box-shadow: 2px 2px 0 var(--ink); }
.btn.primary { background: var(--ink); color: var(--paper); box-shadow: 2px 2px 0 var(--red); }
.btn.primary:hover { box-shadow: 3px 3px 0 var(--red); }
.btn.ghost { border-color: transparent; background: transparent; box-shadow: none; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; padding-inline: 8px; }
.btn.ghost:hover { color: var(--ink); transform: none; }
.btn.small { font-size: 13px; padding: 5px 10px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* ------------------------------------------------------------------ forms */

label { display: block; font-weight: 600; font-size: 13.5px; margin-top: 12px; }
label small { margin-left: 6px; }
input, select, textarea {
  display: block;
  width: 100%;
  margin-top: 5px;
  font: 400 15px/1.5 var(--body);
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--rule);
  border-radius: 8px;
  padding: 8px 10px;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px rgba(42, 79, 156, 0.18); }
label.check { display: flex; gap: 8px; align-items: center; }
label.check input { width: auto; margin: 0; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ------------------------------------------------------------------ login */

.login { min-height: calc(100vh - 8px); display: grid; place-items: center; padding: 24px; }
.envelope {
  position: relative;
  width: min(420px, 100%);
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 14px;
  padding: 34px 30px 28px;
  box-shadow: 6px 6px 0 var(--ink);
}
.envelope h1 { font-size: 40px; font-weight: 800; }
.envelope .lede { margin: 4px 0 18px; color: var(--ink-2); }
.envelope .btn { margin-top: 16px; width: 100%; justify-content: center; padding: 11px; }
.stamp-box {
  position: absolute; top: 22px; right: 22px;
  width: 74px; height: 86px;
  display: grid; place-content: center; text-align: center;
  background: var(--red); color: var(--paper);
  font: 800 13px var(--display); letter-spacing: 0.08em;
  transform: rotate(4deg);
  /* perforated edge */
  -webkit-mask: radial-gradient(circle 4px at 4px 4px, transparent 97%, #000) -4px -4px / 12px 12px;
  mask: radial-gradient(circle 4px at 4px 4px, transparent 97%, #000) -4px -4px / 12px 12px;
}
.stamp-box small { color: inherit; font: 500 9px var(--body); letter-spacing: 0.04em; opacity: 0.85; }

/* -------------------------------------------------------------------- top */

.top {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 12px clamp(14px, 3vw, 34px);
  background: var(--paper);
  border-bottom: 1.5px solid var(--ink);
  position: sticky; top: 0; z-index: 5;
}
.brand { font: 800 24px var(--display); display: flex; align-items: center; gap: 9px; }
.mark { width: 24px; height: 17px; border: 2px solid var(--ink); border-radius: 3px; position: relative; background: var(--paper); }
.mark::after { content: ''; position: absolute; right: -6px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.product-pick { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 500; color: var(--ink-2); }
.product-pick select { margin: 0; width: auto; font-weight: 700; border-color: var(--ink); padding: 5px 8px; }
.tabs { display: flex; gap: 2px; margin-left: 6px; }
.tabs button, .subtabs button[data-work] {
  font: 600 14.5px var(--body); color: var(--ink-2);
  background: none; border: 0; border-bottom: 3px solid transparent;
  padding: 8px 12px; cursor: pointer;
}
.tabs button:hover, .subtabs button[data-work]:hover { color: var(--ink); }
.tabs button.on, .subtabs button.on { color: var(--ink); border-bottom-color: var(--red); }
.send-switch { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.send-status { font-size: 13.5px; color: var(--ink-2); text-align: right; max-width: 300px; line-height: 1.3; }
.send-status b { color: var(--ink); }
.send-status b.bad { color: var(--red); }
.switch {
  width: 58px; height: 32px; flex: none;
  border: 1.5px solid var(--ink); border-radius: 20px;
  background: var(--desk-2); cursor: pointer; padding: 0; position: relative;
  transition: background 0.15s;
}
.switch i { position: absolute; top: 3px; left: 3px; width: 23px; height: 23px; border-radius: 50%; background: var(--ink); transition: left 0.15s; }
.switch[aria-checked='true'] { background: var(--green); }
.switch[aria-checked='true'] i { left: 29px; background: var(--paper); }

.banner {
  margin: 16px clamp(14px, 3vw, 34px) 0;
  padding: 11px 16px;
  background: #fff4c9; border: 1.5px solid var(--ink); border-radius: var(--radius);
  font-weight: 500;
}
.page { padding: 22px clamp(14px, 3vw, 34px) 60px; max-width: 1240px; margin: 0 auto; }
.h { font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 10px; }

/* ------------------------------------------------------------------ route */

.route { list-style: none; margin: 0 0 26px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.station {
  position: relative;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-left-width: 0;
  padding: 16px 18px 18px;
}
.station:first-child { border-left-width: 1.5px; border-radius: var(--radius) 0 0 var(--radius); }
.station:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
/* the arrow that carries a lead to the next station */
.station:not(:last-child)::after {
  content: ''; position: absolute; z-index: 1; right: -10px; top: 26px;
  width: 18px; height: 18px; background: var(--paper);
  border: solid var(--ink); border-width: 1.5px 1.5px 0 0; transform: rotate(45deg);
}
.station h2 { font-size: 19px; font-weight: 700; margin: 8px 0 2px; }
.station p { margin: 0; color: var(--ink-2); font-size: 14px; }
.station p strong { color: var(--ink); font-size: 16px; }
.no {
  display: inline-grid; place-items: center; flex: none;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--ink); color: var(--paper); font: 700 13px var(--display);
}
.job { margin-top: 12px; font-size: 13px; color: var(--ink-2); }
.job .bar { height: 8px; border: 1.5px solid var(--ink); border-radius: 6px; overflow: hidden; background: var(--paper-2); margin-bottom: 4px; }
.job .bar i { display: block; height: 100%; width: 0; background: repeating-linear-gradient(-45deg, var(--red) 0 8px, var(--blue) 8px 16px); transition: width 0.4s; }

/* The live feed: one block per lead, one line per step, newest lead on top. */
.feed { list-style: none; margin: 12px 0 0; padding: 0; max-height: 340px; overflow-y: auto; font: 12.5px/1.45 var(--mono); color: var(--ink-2); }
.feed > li { padding: 8px 0 8px 10px; border-top: 1px dashed var(--rule); box-shadow: inset 2px 0 0 var(--rule); }
.feed > li.running { box-shadow: inset 2px 0 0 var(--blue); }
.feed > li.ready { box-shadow: inset 2px 0 0 var(--green); }
.feed > li.skipped { box-shadow: inset 2px 0 0 var(--amber); }
.feed > li.failed { box-shadow: inset 2px 0 0 var(--red); }
.feed b { display: block; font: 600 13px var(--body); color: var(--ink); overflow-wrap: anywhere; }
.feed ul { list-style: none; margin: 2px 0 0; padding: 0; }
.feed ul li { display: flex; gap: 6px; overflow-wrap: anywhere; }
.feed ul li::before { flex: none; width: 1ch; content: '✓'; color: var(--green); }
.feed ul li.running::before { content: '›'; color: var(--blue); animation: feed-blink 1s steps(2) infinite; }
.feed ul li.failed::before { content: '✗'; color: var(--red); }
.feed .outcome { margin-top: 3px; font-family: var(--body); color: var(--ink); }
.feed .summary { box-shadow: none; padding-left: 0; font-family: var(--body); color: var(--ink); }
@keyframes feed-blink { 50% { opacity: 0.2; } }
@media (prefers-reduced-motion: reduce) { .feed ul li.running::before { animation: none; } }

.subtabs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; border-bottom: 1.5px solid var(--rule); margin-bottom: 18px; }
.subtabs button span:not(:empty) { background: var(--ink); color: var(--paper); border-radius: 10px; padding: 1px 7px; font-size: 12px; margin-left: 4px; }

/* ---------------------------------------------------------------- letters */

.work { display: grid; gap: 18px; }
.letter {
  position: relative;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(0, 1.5fr);
}
.letter.busy { opacity: 0.5; pointer-events: none; }
.letter header { padding: 20px 22px; border-right: 1.5px dashed var(--rule); padding-right: 96px; }
.letter h3 { font-size: 20px; font-weight: 700; margin-top: 8px; line-height: 1.2; }
.letter .to { margin: 4px 0 0; font: 13px var(--mono); color: var(--ink-2); word-break: break-word; }
.letter .to a { display: block; margin-top: 2px; }
.letter .why { margin: 12px 0 0; font-size: 14px; }
.proof { margin: 10px 0 0; font-size: 13px; color: var(--amber); padding-left: 10px; border-left: 3px solid currentColor; }
.proof.ok { color: var(--green); }
.sheet .sub { margin: 18px 0 0; padding-top: 14px; border-top: 1px dashed currentColor; font: 700 13px var(--body); letter-spacing: 0.08em; text-transform: uppercase; }
.chk { display: inline-block; margin-left: 6px; font: 700 11px var(--body); letter-spacing: 0.04em; padding: 2px 7px; border-radius: 4px; border: 1.5px solid currentColor; color: var(--amber); }
.chk.ok { color: var(--green); }
.chk.bad { color: var(--red); }
.warn { margin: 10px 0 0; font-size: 13px; font-weight: 600; color: var(--red); background: #fdebe6; border-radius: 6px; padding: 7px 10px; }
.via { font: 700 11px var(--body); letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 8px; border-radius: 4px; color: #fff; background: var(--blue); }
.via.wa { background: var(--wa); }

.paper { padding: 14px 22px 6px; background: #fff; }
.paper .field { margin-top: 8px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--mute); }
.paper input, .paper textarea { border-color: transparent; border-bottom-color: var(--rule); border-radius: 0; padding-inline: 0; background: transparent; }
.paper input { font-weight: 600; }
.paper input:focus, .paper textarea:focus { box-shadow: none; border-bottom-color: var(--ink); }
.sign { margin: 6px 0 10px; color: var(--mute); font-size: 14px; }
.paper details { border-top: 1.5px dashed var(--rule); padding: 8px 0 10px; }
.paper summary { cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--ink-2); }
.paste { margin-top: 10px; }
.paste summary { cursor: pointer; font-size: 14px; color: var(--ink-2); }
.slip > .paste { flex-basis: 100%; grid-column: 1 / -1; }
.bubble { background: #e3f6ea; border-radius: 4px 14px 14px 14px; padding: 12px 14px; margin: 4px 0 12px; white-space: pre-wrap; max-width: 560px; }
.via.reply { background: var(--green); }
.via.reply.not_now, .via.reply.wrong_person { background: var(--amber); }
.paper .label { margin: 10px 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--mute); }
.their { margin: 0 0 10px; padding: 2px 0 2px 12px; border-left: 3px solid var(--rule); white-space: pre-wrap; font-size: 14.5px; max-height: 320px; overflow: auto; }
.mine { margin: 0 0 12px; white-space: pre-wrap; color: var(--ink-2); }
.letter footer {
  grid-column: 1 / -1;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 12px 22px; border-top: 1.5px solid var(--ink); background: var(--paper-2);
  border-radius: 0 0 var(--radius) var(--radius);
}
.hint-input { flex: 1; min-width: 200px; margin: 0 0 0 10px; font-size: 14px; padding: 7px 10px; }

/* The postmark: fit score, struck slightly off-square like a real cancellation. */
.postmark {
  position: absolute; top: 14px; left: calc(40% - 92px);
  width: 66px; height: 66px; border-radius: 50%;
  display: grid; place-content: center; text-align: center;
  border: 2.5px double currentColor; color: var(--amber);
  transform: rotate(-9deg); opacity: 0.9;
}
.postmark b { font: 800 22px/1 var(--display); }
.postmark span { font: 700 9px var(--body); letter-spacing: 0.14em; text-transform: uppercase; }
.postmark.high { color: var(--green); }
.postmark.low { color: var(--red); }

.slip {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--paper); border: 1.5px solid var(--ink); border-radius: 8px; padding: 10px 16px;
}
.work:has(.slip) { gap: 8px; }
.slip > div:first-child { flex: 1; min-width: 200px; }
.slip b { display: block; }
.slip span { font: 13px var(--mono); color: var(--ink-2); }
.slip .where { font-family: var(--body); font-weight: 600; }
.slip-actions { display: flex; gap: 2px; }

.log { list-style: none; margin: 0; padding: 0; background: var(--paper); border: 1.5px solid var(--ink); border-radius: var(--radius); }
.log li { padding: 9px 16px; border-bottom: 1px solid var(--rule); display: flex; gap: 14px; }
.log li:last-child { border: 0; }
.log time { flex: none; width: 76px; font: 12.5px var(--mono); color: var(--mute); padding-top: 2px; }
.log .sent { box-shadow: inset 3px 0 0 var(--blue); }
.log .reply { box-shadow: inset 3px 0 0 var(--green); font-weight: 600; }
.log .warn { box-shadow: inset 3px 0 0 var(--red); background: none; margin: 0; border-radius: 0; color: var(--ink); font-size: inherit; }

/* ------------------------------------------------------------------ leads */

.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 14px; }
.toolbar input { width: 260px; margin: 0 0 0 auto; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: 600 13px var(--body); background: var(--paper); border: 1.5px solid var(--rule); border-radius: 20px; padding: 4px 11px; cursor: pointer; color: var(--ink-2); }
.chip span { color: var(--mute); margin-left: 3px; }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip.on span { color: var(--desk-2); }
.table-wrap { overflow-x: auto; background: var(--paper); border: 1.5px solid var(--ink); border-radius: var(--radius); }
table.leads { width: 100%; border-collapse: collapse; font-size: 14px; }
.leads th { text-align: left; font: 700 11.5px var(--body); letter-spacing: 0.07em; text-transform: uppercase; color: var(--mute); padding: 10px 14px; border-bottom: 1.5px solid var(--ink); background: var(--paper-2); }
.leads td { padding: 10px 14px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.leads tr:last-child td { border-bottom: 0; }
.leads td small { display: block; }
.leads td:nth-child(2) { font: 13px var(--mono); word-break: break-word; }
.leads .note { color: var(--ink-2); font-size: 13px; max-width: 300px; }
.leads .acts { white-space: nowrap; text-align: right; }
.tag { font: 700 11.5px var(--body); padding: 3px 8px; border-radius: 4px; background: var(--desk-2); white-space: nowrap; }
.tag.ready { background: #fff0b8; }
.tag.approved, .tag.active { background: #dbe6fb; color: var(--blue); }
.tag.replied { background: #d5f0e2; color: var(--green); }
.tag.bounced, .tag.stopped { background: #fbdcd5; color: var(--red); }

/* ---------------------------------------------------- products + settings */

.split { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 1.4fr); gap: 28px; align-items: start; }
.cards { display: grid; gap: 10px; margin: 14px 0; }
.card { text-align: left; font: inherit; color: inherit; cursor: pointer; background: var(--paper); border: 1.5px solid var(--ink); border-radius: var(--radius); padding: 14px 16px; }
.card.on { box-shadow: 4px 4px 0 var(--red); }
.card b { font: 700 18px var(--display); display: block; }
.card span { font: 12.5px var(--mono); color: var(--blue); }
.card p { margin: 6px 0 0; font-size: 13.5px; color: var(--ink-2); }
/* Buyer segments on a product card */
.segments { display: grid; gap: 10px; margin-top: 12px; }
.segment { margin: 0; padding: 12px 14px 14px; border: 1.5px dashed var(--rule); border-radius: var(--radius); background: var(--paper-2); }
.segment .seg-head { display: flex; gap: 10px; align-items: end; }
.segment .seg-head label:first-child { flex: 1; }
.segment .seg-head label.share { width: 84px; }
.segment label { margin-top: 8px; }
.segment .seg-head label { margin-top: 0; }
.seg-stats { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 13px; }
.seg-stats th { text-align: left; font: 700 11px var(--body); letter-spacing: 0.06em; text-transform: uppercase; color: var(--mute); padding: 4px 6px; border-bottom: 1.5px solid var(--rule); }
.seg-stats td { padding: 5px 6px; border-bottom: 1px solid var(--rule); }
.seg-stats td + td, .seg-stats th + th { text-align: right; font-variant-numeric: tabular-nums; }
.seg { font: 600 11.5px var(--body); padding: 3px 8px; border-radius: 4px; border: 1.5px solid var(--ink-2); color: var(--ink-2); margin-left: 6px; }

.sheet { background: var(--paper); border: 1.5px solid var(--ink); border-radius: var(--radius); padding: 20px 22px 22px; box-shadow: var(--shadow); }
.settings { columns: 2 380px; column-gap: 22px; }
.settings .sheet { break-inside: avoid; margin-bottom: 22px; }

/* ---------------------------------------------------------------- dialogs */

.dialog { width: min(480px, calc(100vw - 32px)); border: 1.5px solid var(--ink); border-radius: 14px; padding: 24px; background: var(--paper); color: var(--ink); box-shadow: 6px 6px 0 var(--ink); }
.dialog::backdrop { background: rgba(28, 37, 64, 0.45); }
.pick-list { display: grid; gap: 8px; margin: 14px 0 4px; max-height: 50vh; overflow: auto; padding: 2px 4px 4px 2px; }
.pick { display: flex; justify-content: space-between; gap: 12px; text-align: left; font: inherit; color: inherit; cursor: pointer; background: #fff; border: 1.5px solid var(--rule); border-radius: 8px; padding: 10px 12px; }
.pick:hover { border-color: var(--ink); }
.pick span { color: var(--mute); white-space: nowrap; }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 20;
  max-width: min(640px, calc(100vw - 32px));
  background: var(--ink); color: var(--paper); font-weight: 500;
  padding: 12px 18px; border-radius: 10px; box-shadow: 4px 4px 0 var(--green);
}
.toast.bad { box-shadow: 4px 4px 0 var(--red); }

/* ------------------------------------------------------------------ small */

@media (max-width: 900px) {
  .top { position: static; }
  .route { grid-template-columns: 1fr 1fr; gap: 10px; }
  .station, .station:first-child, .station:last-child { border-width: 1.5px; border-radius: var(--radius); }
  .station::after { display: none; }
  .letter { grid-template-columns: 1fr; }
  .letter header { border-right: 0; border-bottom: 1.5px dashed var(--rule); }
  .postmark { left: auto; right: 16px; }
  .split { grid-template-columns: 1fr; }
  .send-switch { margin-left: 0; width: 100%; justify-content: space-between; }
  .send-status { text-align: left; }
}
@media (max-width: 560px) {
  .route { grid-template-columns: 1fr; }
  .pair { grid-template-columns: 1fr; }
  .toolbar input { width: 100%; margin: 0; }
  .hint-input { margin-left: 0; flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* The sending-domain check: one line per DNS record, marked good, check or fix. */
.checks { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.checks li { border-left: 3px solid var(--green); padding: 2px 0 2px 10px; font-size: 14px; }
.checks li.warn { border-left-color: var(--amber); }
.checks li.bad { border-left-color: var(--red); }
.checks .tag { margin-left: 4px; }
.checks li.ok .tag { background: #d5f0e2; color: var(--green); }
.checks li.warn .tag { background: #fbecd0; color: var(--amber); }
.checks li.bad .tag { background: #fbdcd5; color: var(--red); }
.checks p { margin: 4px 0 0; }
.checks code { display: block; margin-top: 4px; font-size: 12px; word-break: break-all; color: var(--ink-2); }

/* More sending mailboxes: one line each, with today's count and its buttons. */
.boxes { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.boxes > li { display: flex; flex-wrap: wrap; gap: 8px 14px; justify-content: space-between; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper); }
.boxes > li.off { opacity: 0.6; }
.boxes > li span { display: block; font-size: 13px; color: var(--ink-2); }
.boxes > li p.warn { margin: 4px 0 0; font-size: 13px; color: var(--amber); }
.boxes > li .checks { flex-basis: 100%; }
.add-box { margin-top: 12px; }
.add-box summary { cursor: pointer; font-weight: 600; }

/* Results: faded rows are too small to tell from; the suggestion and the examples stand apart. */
.results table.leads { margin-bottom: 6px; }
.results tr.thin td { color: var(--mute); }
.results .sub { margin-top: 22px; }
.tip { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin: 14px 0; padding: 12px 14px; border-left: 3px solid var(--blue); background: var(--paper-2); border-radius: 0 var(--radius) var(--radius) 0; }
.tip p { margin: 0; flex: 1 1 280px; }
.example { margin: 8px 0; padding: 8px 12px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper); }
.example summary { cursor: pointer; }
.example .mine { white-space: pre-wrap; margin: 8px 0 0; }

/* Find more like them: who answered well, and searches to run. */
.like { padding: 12px 14px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper); }
.like > p:first-child { margin-top: 0; }
.traits { margin: 6px 0 12px; padding-left: 20px; }
.searches { list-style: none; margin: 6px 0 10px; padding: 0; display: grid; gap: 6px; }
.searches li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.searches li span { flex: 1 1 220px; font-weight: 600; }
.searches a { font-size: 13px; }
.like .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.like .row small { color: var(--mute); }

/* What came of a conversation: the stage buttons on a reply card, and the count at the top of Results. */
.deal { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--rule); }
.slip .deal { flex-basis: 100%; margin-top: 4px; }
.deal .label { margin: 0 4px 0 0; }
.deal .btn.on { background: var(--green); border-color: var(--green); color: #fff; }
.deal label { display: inline-flex; gap: 6px; align-items: center; margin: 0 0 0 6px; font-size: 13px; }
.deal input { width: 110px; }
.deal small { color: var(--mute); }
.pipeline { margin: 0 0 14px; padding: 10px 14px; background: var(--paper-2); border-radius: var(--radius); }

/* The inbox test: where each test email landed. */
.landed .tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 4px; }
.landed .tag.inbox { background: #d5f0e2; color: var(--green); }
.landed .tag.spam { background: #fbdcd5; color: var(--red); }
.landed .tag.missing, .landed .tag.error { background: #fbecd0; color: var(--amber); }
#placement-results { margin: 12px 0; }

/* The call list: the script reads top to bottom while on the phone. */
.via.call { background: var(--amber); }
ul.script { margin: 4px 0 12px; padding-left: 20px; }
dl.script { margin: 4px 0 12px; }
dl.script dt { font-style: italic; color: var(--ink-2); margin-top: 6px; }
dl.script dd { margin: 2px 0 0 16px; }

/* Testing two versions. */
.proof.test { border-left-color: var(--blue); color: var(--blue); }
.presets { list-style: none; margin: 8px 0 12px; padding: 0; display: grid; gap: 8px; }
.presets li { display: grid; gap: 2px; padding: 8px 12px; border: 1px solid var(--rule); border-radius: var(--radius); }
.presets li span { font-size: 13px; color: var(--ink-2); }
.presets li .btn { justify-self: start; margin-top: 6px; }
.rules { margin: 6px 0 0; padding-left: 20px; }
.rules li { margin: 4px 0; }
.rules small { color: var(--mute); }
