/* Lexivo Hub. Colors follow lexivoai.com: ink #121829, indigo #4453E6, amber #D2760F, paper #F7F6F2. */
:root {
  --ink: #121829; --ink2: #3b4257; --muted: #6b7286; --line: #e3e5ec; --paper: #f7f6f2; --card: #fff;
  --brand: #4453e6; --brand-soft: #eceefd; --amber: #b8650a; --amber-soft: #fdf1df;
  --green: #1f7a4d; --green-soft: #e4f4ea; --red: #b3261e; --red-soft: #fbeae8; --grey-soft: #eef0f4;
  --r: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14.5px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--paper); }
h1, h2, h3, p { margin: 0; }
a { color: var(--brand); }
button, input, select, textarea { font: inherit; color: inherit; }
.sr { position: absolute; left: -9999px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* top bar */
.top { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 20; }
.top-in { max-width: 1180px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 18px; min-height: 56px; flex-wrap: wrap; }
.brand { font-weight: 800; font-size: 19px; letter-spacing: -.01em; color: #fff; text-decoration: none; }
.brand b { color: #8f9bff; font-weight: 800; }
.biz select { background: #1e2740; color: #fff; border: 1px solid #343e5c; border-radius: 8px; padding: 6px 28px 6px 10px; max-width: 230px; }
#tabs { display: flex; gap: 2px; flex: 1; flex-wrap: wrap; }
#tabs a { color: #c5cbe0; text-decoration: none; padding: 17px 12px; font-weight: 600; border-bottom: 3px solid transparent; }
#tabs a:hover { color: #fff; }
#tabs a.on { color: #fff; border-bottom-color: #8f9bff; }
.who { display: flex; align-items: center; gap: 12px; font-size: 13px; color: #c5cbe0; }
.who form { margin: 0; }
.link { background: none; border: 0; padding: 0; color: #c5cbe0; text-decoration: underline; cursor: pointer; }
.pill-test { background: var(--amber-soft); color: var(--amber); border-radius: 99px; padding: 2px 10px; font-weight: 700; font-size: 12px; }
.pill-live { background: var(--green-soft); color: var(--green); border-radius: 99px; padding: 2px 10px; font-weight: 700; font-size: 12px; }

main { max-width: 1180px; margin: 0 auto; padding: 22px 20px 60px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.head h1 { font-size: 22px; letter-spacing: -.01em; }
.head p { color: var(--muted); margin-top: 2px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.card + .card, .grid + .card, .card + .grid { margin-top: 16px; }
.card h2 { font-size: 15px; margin-bottom: 4px; }
.card .sub { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 860px) { .g2 { grid-template-columns: 1fr; } }

.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 8px 14px; font-weight: 600; cursor: pointer; text-decoration: none; color: var(--ink); min-height: 38px; }
.btn:hover { border-color: #c9cddb; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { filter: brightness(1.07); }
.btn.small { padding: 5px 10px; min-height: 30px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: default; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: #fff; }
.seg button { border: 0; background: none; padding: 7px 12px; cursor: pointer; font-weight: 600; color: var(--ink2); }
.seg button.on { background: var(--ink); color: #fff; }
input[type=text], input[type=email], input[type=search], input[type=number], input[type=url], select, textarea {
  border: 1px solid #cfd3df; border-radius: 9px; padding: 8px 10px; background: #fff; width: 100%; }
textarea { min-height: 150px; resize: vertical; font-family: inherit; line-height: 1.5; }
label.f { display: block; font-weight: 600; font-size: 13px; margin-bottom: 12px; }
label.f span.h { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; margin: 1px 0 5px; }
label.f input, label.f select, label.f textarea { margin-top: 5px; font-weight: 400; }

/* alert */
.note { border-radius: var(--r); padding: 12px 14px; display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px; }
.note.red { background: var(--red-soft); color: #7d1a14; border: 1px solid #f1c7c3; }
.note.amber { background: var(--amber-soft); color: #7a4406; border: 1px solid #f3d9b4; }
.note.blue { background: var(--brand-soft); color: #2a359b; border: 1px solid #cfd4fa; }
.note b { font-weight: 700; }

/* funnel */
.funnel { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; }
.fstep { background: var(--grey-soft); border-radius: 10px; padding: 12px 10px 10px; position: relative; min-width: 0; }
.fstep .n { font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.fstep .l { font-size: 12.5px; color: var(--ink2); font-weight: 600; margin-top: 2px; }
.fstep .p { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.fstep.lead { background: var(--brand); color: #fff; }
.fstep.lead .l, .fstep.lead .p { color: #dfe2ff; }
.fstep .bar { height: 4px; border-radius: 4px; background: #d5d9e6; margin-top: 8px; overflow: hidden; }
.fstep .bar i { display: block; height: 100%; background: var(--brand); border-radius: 4px; }
.fstep.lead .bar { background: rgba(255,255,255,.3); } .fstep.lead .bar i { background: #fff; }
@media (max-width: 980px) { .funnel { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 520px) { .funnel { grid-template-columns: repeat(2, 1fr); } }

/* tables */
.tw { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 10px; border-bottom: 1px solid #eef0f4; vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.click { cursor: pointer; }
tr.click:hover td { background: #fafbff; }
.empty { text-align: center; color: var(--muted); padding: 34px 10px; }
.chip { display: inline-block; border-radius: 99px; padding: 2px 10px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--grey-soft); color: var(--ink2); }
.chip.blue { background: var(--brand-soft); color: #2a359b; } .chip.green { background: var(--green-soft); color: var(--green); }
.chip.red { background: var(--red-soft); color: var(--red); } .chip.amber { background: var(--amber-soft); color: var(--amber); }
.who2 b { display: block; } .who2 span, .dim { color: var(--muted); font-size: 12.5px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.filters input { max-width: 260px; } .filters select { width: auto; }
.days { display: flex; align-items: flex-end; gap: 3px; height: 54px; }
.days i { flex: 1; background: #c9cffb; border-radius: 3px 3px 0 0; min-height: 2px; }

/* drawer (one lead) */
.drawer { position: fixed; inset: 0; z-index: 40; background: rgba(18,24,41,.45); display: flex; justify-content: flex-end; }
.drawer[hidden] { display: none; }
.sheet { width: min(720px, 100%); background: var(--paper); height: 100%; overflow-y: auto; padding: 20px 22px 40px; box-shadow: -12px 0 40px rgba(0,0,0,.18); }
.sheet .x { float: right; }
.sheet h2 { font-size: 20px; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 12px; }
.kv div { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.kv span { display: block; font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.kv b { font-size: 14.5px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; align-items: center; }

/* timeline */
.tl { list-style: none; margin: 6px 0 0; padding: 0; }
.tl li { position: relative; padding: 0 0 16px 34px; }
.tl li::before { content: ""; position: absolute; left: 10px; top: 22px; bottom: -2px; width: 2px; background: var(--line); }
.tl li:last-child::before { display: none; }
.tl .dot { position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--green-soft); color: var(--green); }
.tl li.mail .dot { background: var(--brand); color: #fff; }
.tl li.planned .dot { background: #fff; color: var(--brand); border: 2px dashed #aab2f5; }
.tl li.stopped .dot, .tl li.skipped .dot { background: var(--grey-soft); color: var(--muted); }
.tl li.failed .dot, .tl li.alert .dot { background: var(--red-soft); color: var(--red); }
.tl li.warn .dot { background: var(--amber-soft); color: var(--amber); }
.tl .t { font-weight: 700; }
.tl li.planned .t { color: var(--ink2); }
.tl li.stopped .t, .tl li.skipped .t { color: var(--muted); text-decoration: line-through; }
.tl .d { color: var(--muted); font-size: 12.5px; }
.tl .when { color: var(--muted); font-size: 12.5px; font-weight: 400; margin-left: 6px; white-space: nowrap; }
.tl .sep { padding: 2px 0 14px 34px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 800; }
.tl .sep::before { display: none; }

/* follow-up series */
.switchrow { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.switch { position: relative; width: 58px; height: 32px; border-radius: 99px; background: #c9cddb; border: 0; cursor: pointer; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch[aria-checked=true] { background: var(--green); }
.switch[aria-checked=true]::after { transform: translateX(26px); }
.counts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.counts div { background: var(--grey-soft); border-radius: 10px; padding: 8px 14px; min-width: 92px; }
.counts b { display: block; font-size: 20px; } .counts span { font-size: 12px; color: var(--ink2); font-weight: 600; }
.series { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.stepc { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; background: #fff; display: flex; flex-direction: column; gap: 6px; }
.stepc.off { opacity: .55; }
.stepc .when2 { font-size: 12px; font-weight: 800; color: var(--brand); text-transform: uppercase; letter-spacing: .05em; }
.stepc h3 { font-size: 14.5px; }
.stepc p { color: var(--ink2); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.stepc .row { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 8px; }
.preview { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-top: 10px; }
.preview .subj { font-weight: 700; margin-bottom: 8px; }
.check { display: flex; gap: 8px; align-items: flex-start; margin-top: 6px; font-size: 13.5px; }
.check i { font-style: normal; font-weight: 800; }
.ok { color: var(--green); } .bad { color: var(--red); }

/* install */
pre.code { background: var(--ink); color: #e7e9f5; border-radius: 10px; padding: 14px; overflow-x: auto; font: 12.5px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; word-break: break-all; margin: 8px 0; }
.qr { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px; width: 168px; height: 168px; display: grid; place-items: center; }
.qr svg, .qr img { width: 100%; height: 100%; }
.review-frame { width: 100%; height: calc(100vh - 150px); min-height: 520px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.sheet.wide { width: min(1080px, 100%); }

.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 10px; z-index: 60; box-shadow: 0 8px 30px rgba(0,0,0,.25); }

/* sign-in and unsubscribe pages */
body.plain { display: grid; place-items: center; min-height: 100vh; padding: 20px; }
.plain-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 30px; width: min(420px, 100%); margin: 0; }
.plain-card .brand { color: var(--ink); display: block; margin-bottom: 16px; } .plain-card .brand b { color: var(--brand); }
.plain-card h1 { font-size: 21px; margin-bottom: 8px; } .plain-card p { color: var(--ink2); margin-bottom: 16px; }
.plain-card form { display: grid; gap: 10px; }

/* Narrow screens: brand, business and account on the first row; the sections on a second row that never wraps. */
@media (max-width: 1020px) {
  .top-in { gap: 8px 12px; padding: 8px 16px 0; }
  .top .biz { flex: 1 1 140px; min-width: 0; } .top .biz select { width: 100%; max-width: 260px; }
  .who { margin-left: auto; gap: 10px; white-space: nowrap; }
  #tabs { order: 5; flex: 0 0 100%; display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 8px; }
  #tabs::-webkit-scrollbar { display: none; }
  #tabs a { flex: 0 0 auto; }
}
@media (max-width: 640px) { #email { display: none; } .top .biz { flex: 1 1 110px; } .pill-test, .pill-live { font-size: 11px; padding: 2px 8px; } #tabs a { padding: 12px 9px; font-size: 14.5px; } }
