/* Pure Click HQ dashboard. Pure Click brand: black, near-black surfaces, blue accent, Archivo + DM Mono. */
:root {
  --bg: #0a0a0a; --side: #000000; --surface: #111111; --surface-2: #1a1a1a; --line: #222222; --line-2: #2e2e2e;
  --fg: #f0f0f0; --muted: #999999; --muted-2: #666666;
  --accent: #2563eb; --accent-hi: #3b82f6; --accent-ink: #ffffff; --accent-soft: rgba(37,99,235,.12); --accent-edge: rgba(59,130,246,.25);
  --good: #22c55e; --good-soft: rgba(34,197,94,.1); --good-edge: rgba(34,197,94,.25);
  --warn: #eab308; --warn-soft: rgba(234,179,8,.12); --warn-edge: rgba(234,179,8,.25);
  --bad: #ef4444; --bad-soft: rgba(239,68,68,.1); --bad-edge: rgba(239,68,68,.28);
  --violet: #a78bfa;
  --f-body: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--fg); font: 14px/1.55 var(--f-body); -webkit-font-smoothing: antialiased; }
a { color: var(--accent-hi); text-decoration-color: var(--accent-edge); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent-hi); }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; }
::selection { background: var(--accent); color: #fff; }
.boot { padding: 40px; color: var(--muted-2); font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }

/* forms */
input, select, textarea { font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; width: 100%; min-width: 0; transition: border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: var(--muted-2); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent-hi); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { min-height: 140px; resize: vertical; font-family: var(--f-mono); font-size: 12.5px; }
label.f { display: flex; flex-direction: column; gap: 6px; font-family: var(--f-mono); font-size: 10.5px; font-weight: 400; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
label.f .h { color: var(--muted-2); text-transform: none; letter-spacing: 0; font-size: 11.5px; }
label.f input, label.f select, label.f textarea { text-transform: none; letter-spacing: normal; font-family: var(--f-body); font-size: 14px; color: var(--fg); }
label.f textarea { font-family: var(--f-mono); font-size: 12.5px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-2); background: var(--surface); border-radius: 10px; padding: 10px 18px; font-weight: 600; white-space: nowrap; text-decoration: none; color: var(--fg); transition: background .15s, border-color .15s, transform .15s; }
.btn:hover { background: var(--surface-2); border-color: #3a3a3a; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hi); border-color: var(--accent-hi); transform: translateY(-1px); }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sp { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.error { color: #fca5a5; background: var(--bad-soft); border: 1px solid var(--bad-edge); border-radius: 10px; padding: 10px 12px; font-size: 13px; }

/* brand */
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); }
.brand .mark { width: 32px; height: auto; flex: none; color: #fff; }
.brand .wm { font-family: var(--f-body); font-style: italic; text-transform: uppercase; font-size: 17px; letter-spacing: .01em; line-height: 1; white-space: nowrap; }
.brand .wm .l { font-weight: 400; }
.brand .wm b { font-weight: 800; }

/* login */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px));
  background: radial-gradient(600px 300px at 50% 0%, rgba(37,99,235,.10), transparent 70%), var(--bg); }
.auth-box { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.auth-box h1 { font-size: 28px; font-weight: 600; margin: 4px 0 0; letter-spacing: -.03em; line-height: 1.15; }
.auth-box p { margin: -8px 0 0; }

/* shell */
.shell { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100vh; background: linear-gradient(to right, var(--side) 243px, var(--line) 243px 244px, var(--bg) 244px); }
.side { position: sticky; top: 0; height: 100vh; overflow: auto; background: var(--side); border-right: 1px solid var(--line); padding: 20px 14px 18px max(14px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 18px; }
.side .brand { padding: 2px 8px 14px; border-bottom: 1px solid var(--line); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--muted); text-decoration: none; font-weight: 500; border: 1px solid transparent; }
.nav a:hover { background: var(--surface); color: var(--fg); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-hi); border-color: var(--accent-edge); }
.nav .sec { font-family: var(--f-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted-2); padding: 14px 10px 6px; overflow-wrap: anywhere; }
.who { margin-top: auto; border-top: 1px solid var(--line); padding-top: 14px; font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 10px; overflow-wrap: anywhere; font-family: var(--f-mono); }
.who .btn { font-family: var(--f-body); }
.main { min-width: 0; padding: 36px max(16px, env(safe-area-inset-right, 0px)) 64px 32px; }
.wrap { max-width: 1080px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; counter-reset: sec; }

/* page header, styled like the report hero */
.ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding-bottom: 10px; }
.eyebrow { font-family: var(--f-mono); font-size: 11px; color: var(--accent-hi); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.eyebrow::before { content: ""; width: 24px; height: 1px; background: var(--accent-hi); flex: none; }
.ph h1 { font-size: clamp(1.7rem, 3.4vw, 2.35rem); font-weight: 600; margin: 0; letter-spacing: -.03em; line-height: 1.12; }
.ph p { margin: 8px 0 0; color: var(--muted); }

/* cards and sections */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; min-width: 0; }
.card > h2:first-child { counter-increment: sec; margin: -20px -20px 4px; padding: 14px 20px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: 16px 16px 0 0; }
.card > h2:first-child::before { content: counter(sec, decimal-leading-zero); font-family: var(--f-mono); font-size: 10px; font-weight: 400; color: var(--muted-2); letter-spacing: .05em; }
.card > h2:first-child > :last-child { margin-left: auto; }
.card:not(.stack) > h2:first-child { margin-bottom: 8px; }
.grid { display: grid; gap: 12px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.kpi { border-radius: 12px; padding: 16px 18px; }
.kpi .l { font-family: var(--f-mono); font-size: 10px; color: var(--muted-2); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.kpi .v { font-family: var(--f-body) !important; font-size: 1.6rem; font-weight: 600; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .d { font-size: 11.5px; margin-top: 8px; color: var(--muted-2); }
.kpi:nth-child(2) .v { color: var(--good); }

.pill { display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-mono); font-size: 10px; font-weight: 400; text-transform: uppercase; letter-spacing: .05em; padding: 3px 10px; border-radius: 100px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line-2); white-space: nowrap; }
.pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pill.good { color: var(--good); background: var(--good-soft); border-color: var(--good-edge); }
.pill.warn { color: var(--warn); background: var(--warn-soft); border-color: var(--warn-edge); }
.pill.bad { color: var(--bad); background: var(--bad-soft); border-color: var(--bad-edge); }

.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-family: var(--f-mono); font-weight: 400; color: var(--muted-2); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 13px 12px; border-bottom: 1px solid var(--line); }
td:first-child { min-width: 150px; }
tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--surface-2); }
td.r, th.r { text-align: right; }

.check { display: flex; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13.5px; }
.check:last-child { border-bottom: 0; }
.check > span:not(.sp):not(.dot) { color: var(--fg); }
.check .dot { width: 20px; height: 20px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 11px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--muted-2); }
.check.done { color: var(--fg); }
.check.done .dot { background: var(--good-soft); border-color: var(--good-edge); color: var(--good); }
code.copy { cursor: pointer; font-family: var(--f-mono); font-size: 12px; background: var(--bg); border: 1px solid var(--line-2); color: var(--fg); padding: 4px 8px; border-radius: 6px; overflow-wrap: anywhere; transition: border-color .15s; }
code.copy:hover { border-color: var(--accent-hi); }
.empty { padding: 40px; text-align: center; color: var(--muted); }

#toast { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%) translateY(20px); background: var(--surface-2); color: var(--fg); border: 1px solid var(--line-2); padding: 10px 16px; border-radius: 10px; font-weight: 500; opacity: 0; pointer-events: none; transition: .2s; z-index: 60; max-width: calc(100% - 32px); box-shadow: 0 10px 30px rgba(0,0,0,.5); }
#toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 900px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g2 { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; background: var(--bg); }
  .side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .who { margin-top: 0; }
  .main { padding: 24px max(16px, env(safe-area-inset-right, 0px)) 48px max(16px, env(safe-area-inset-left, 0px)); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.f-static { display: flex; flex-direction: column; gap: 6px; }
.f-static .lbl { font-family: var(--f-mono); font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
code { overflow-wrap: anywhere; word-break: break-all; }
@media (max-width: 760px) {
  table.rec thead { display: none; }
  table.rec, table.rec tbody, table.rec tr, table.rec td { display: block; width: 100%; }
  table.rec tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  table.rec td { border: 0; padding: 4px 0; min-width: 0; }
  table.rec td::before { content: attr(data-l); display: block; font-family: var(--f-mono); font-size: 10px; color: var(--muted-2); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
}
label.opt { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--fg); text-transform: none; letter-spacing: 0; font-family: var(--f-body); cursor: pointer; padding: 6px 0; }
label.opt input { width: auto; margin-top: 3px; accent-color: var(--accent); }
.seg-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 2px 16px; max-height: 360px; overflow: auto; }
input[type=file] { padding: 8px; }
.plan-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.plan-row .kpi { padding: 0; }
.plan-price { font-family: var(--f-mono); font-size: 14px; color: var(--muted); font-weight: 400; letter-spacing: 0; }
.meter { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--accent-hi); border-radius: 99px; }
.steps { display: flex; flex-direction: column; gap: 12px; max-width: 820px; }
.step { padding: 0; }
.step-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; }
.step-head h3 { margin: 0; font-size: 16px; font-weight: 600; flex: 1; }
.step-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-family: var(--f-mono); font-size: 12px; background: var(--accent-soft); color: var(--accent-hi); border: 1px solid var(--accent-edge); flex: none; }
.step-body { padding: 0 20px 18px 58px; display: flex; flex-direction: column; gap: 12px; }
.step.is-locked { opacity: .55; }
.step.is-locked .step-n { background: var(--surface-2); color: var(--muted-2); border-color: var(--line-2); }
.steps-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.row.nowrap { flex-wrap: nowrap; }
.minis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mini { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.mini .l { font-family: var(--f-mono); font-size: 10px; color: var(--muted-2); text-transform: uppercase; letter-spacing: .06em; }
.mini .v { font-size: 20px; font-weight: 600; margin-top: 4px; font-variant-numeric: tabular-nums; }
.mini .v.good { color: var(--good); }
.plan-line { font-size: 15px; }
details.more summary, details.more-card > summary { cursor: pointer; color: var(--accent-hi); font-weight: 500; list-style: none; }
details.more summary::-webkit-details-marker, details.more-card > summary::-webkit-details-marker { display: none; }
details.more summary::before, details.more-card > summary::before { content: "▸ "; }
details[open].more summary::before, details[open].more-card > summary::before { content: "▾ "; }
details.more-card { max-width: 820px; }
details.more-card > summary { color: var(--fg); font-weight: 600; }
@media (max-width: 760px) { .step-body { padding-left: 20px; } .minis { grid-template-columns: 1fr 1fr 1fr; gap: 6px; } .mini .v { font-size: 17px; } }

/* campaign builder */
.builder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 18px; align-items: start; }
.builder-edit { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.builder-preview { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.preview-bar { display: flex; align-items: center; gap: 4px; }
.preview-bar .lbl, .add-row .lbl { font-family: var(--f-mono); font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.seg { padding: 6px 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--muted); font-size: 13px; }
.seg:first-of-type { border-radius: 8px 0 0 8px; } .seg:last-of-type { border-radius: 0 8px 8px 0; border-left: 0; }
.seg.on { background: var(--accent-soft); color: var(--accent-hi); border-color: var(--accent-edge); }
.frame-wrap { background: #e9e9ec; border-radius: 12px; border: 1px solid var(--line); padding: 14px; height: calc(100vh - 120px); min-height: 520px; display: flex; justify-content: center; }
.frame-wrap iframe { width: 100%; max-width: 640px; height: 100%; border: 0; border-radius: 6px; background: #fff; transition: max-width .2s; }
.frame-wrap.mobile iframe { max-width: 375px; }
.blocks { display: flex; flex-direction: column; gap: 10px; }
.blk { border: 1px solid var(--line-2); border-radius: 12px; background: var(--bg); }
.blk-head { display: flex; align-items: center; gap: 4px; padding: 8px 10px 8px 14px; border-bottom: 1px solid var(--line); }
.blk-type { font-family: var(--f-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-hi); }
.blk-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.blk-body .grid { gap: 10px; }
.icon-btn { width: 28px; height: 28px; border-radius: 6px; color: var(--muted); display: grid; place-items: center; font-size: 13px; }
.icon-btn:hover:not([disabled]) { background: var(--surface-2); color: var(--fg); }
.icon-btn[disabled] { opacity: .3; cursor: default; }
.add-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.hint { font-size: 12px; color: var(--muted-2); font-family: var(--f-mono); }
.aud-count { background: var(--accent-soft); border: 1px solid var(--accent-edge); border-radius: 10px; padding: 12px 14px; }
.aud-count b { font-size: 18px; }
.color-row { display: flex; gap: 8px; }
.color-row input[type=color] { width: 44px; height: 40px; padding: 3px; flex: none; cursor: pointer; }
.title-edit { outline: none; border-bottom: 1px dashed transparent; }
.title-edit:hover, .title-edit:focus { border-bottom-color: var(--line-2); }
.blk textarea { font-family: var(--f-body); font-size: 14px; min-height: 0; }
@media (max-width: 1100px) { .builder { grid-template-columns: 1fr; } .builder-preview { position: static; } .frame-wrap { height: 640px; } }

/* ===== Klaviyo-style layout ===== */
.ico { width: 18px; height: 18px; flex: none; }
.nav { gap: 1px; }
.nv { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 8px; color: var(--muted); text-decoration: none; font-weight: 500; cursor: pointer; list-style: none; border: 1px solid transparent; }
.nv::-webkit-details-marker { display: none; }
.nv:hover { background: var(--surface); color: var(--fg); }
.nv.on { background: var(--accent-soft); color: var(--accent-hi); border-color: var(--accent-edge); }
.nv span { flex: 1; }
.nv .chev { width: 14px; height: 14px; transition: transform .15s; }
.nv-group[open] > summary .chev { transform: rotate(180deg); }
.nv-kids { display: flex; flex-direction: column; gap: 1px; padding: 2px 0 4px 39px; }
.nv-sub { padding: 6px 10px; border-radius: 6px; color: var(--muted); text-decoration: none; font-size: 13.5px; }
.nv-sub:hover { color: var(--fg); background: var(--surface); }
.nv-sub.on { color: var(--accent-hi); background: var(--accent-soft); }
.nv-gap { height: 10px; }
.acct { margin-top: auto; border-top: 1px solid var(--line); padding-top: 12px; position: relative; }
.acct summary { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; cursor: pointer; list-style: none; }
.acct summary::-webkit-details-marker { display: none; }
.acct summary:hover { background: var(--surface); }
.acct-av { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-hi); display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; border: 1px solid var(--accent-edge); }
.acct-name { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-menu { position: absolute; bottom: calc(100% + 6px); left: 0; right: 0; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 6px; display: flex; flex-direction: column; box-shadow: 0 12px 40px rgba(0,0,0,.6); z-index: 30; max-height: 60vh; overflow: auto; }
.acct-menu a, .acct-menu button { text-align: left; padding: 8px 10px; border-radius: 6px; color: var(--fg); text-decoration: none; font-size: 13.5px; }
.acct-menu a:hover, .acct-menu button:hover { background: var(--surface); }
.acct-sep { border-top: 1px solid var(--line-2); margin: 6px 0; }
.acct-email { font-family: var(--f-mono); font-size: 11px; color: var(--muted); padding: 4px 10px; overflow-wrap: anywhere; }
.tabs { margin-top: -6px; }

/* campaigns list */
.perf-card { padding: 16px 20px; }
.perf-head { display: flex; gap: 12px; align-items: baseline; margin-bottom: 12px; }
.perf-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.perf-v { font-size: 22px; font-weight: 600; }
.perf-l { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; }
.filters input[type=search] { max-width: 320px; }
.filters select { width: auto; }
.table-card { padding: 4px 8px; }
.ctable td { vertical-align: middle; }
.ctable .ico { color: var(--muted); }
.cname { color: var(--accent-hi); text-decoration: none; font-weight: 500; }
.cname:hover { text-decoration: underline; }
.rate { color: var(--accent-hi); }

/* drawers and modals */
.drawer-scrim, .modal-scrim { position: fixed; inset: 0; z-index: 80; }
.scrim-bg { position: absolute; inset: 0; background: rgba(0,0,0,.6); }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(480px, 100%); background: var(--surface); border-left: 1px solid var(--line-2); display: flex; flex-direction: column; transform: translateX(100%); transition: transform .2s ease; }
.drawer-scrim.on .drawer { transform: none; }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 18px; }
.drawer-body { padding: 20px 22px; overflow: auto; flex: 1; }
.drawer-foot { padding: 16px 22px; border-top: 1px solid var(--line); }
.choice { display: flex; gap: 10px; align-items: center; padding: 14px; border: 1px solid var(--line-2); border-radius: 10px; cursor: pointer; text-transform: none; letter-spacing: 0; font-family: var(--f-body); font-size: 14px; color: var(--fg); }
.choice input { width: auto; accent-color: var(--accent); }
.choice.on { border-color: var(--accent-hi); background: var(--accent-soft); }
.choice.off { opacity: .45; cursor: default; }
.choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modal { position: absolute; inset: 4vh 4vw; background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; display: flex; flex-direction: column; overflow: hidden; }
.pv-wrap { flex: 1; background: #e9e9ec; display: flex; justify-content: center; padding: 18px; }
.pv-wrap iframe { width: 100%; max-width: 680px; height: 100%; border: 0; background: #fff; border-radius: 6px; transition: max-width .2s; }
.pv-wrap.mobile iframe { max-width: 375px; }

/* wizard */
body.full .boot { display: none; }
.wz { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.wz-top { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 12px 20px; background: var(--side); border-bottom: 1px solid var(--line); }
.wz-crumb { display: flex; gap: 8px; align-items: center; min-width: 0; font-weight: 500; }
.wz-crumb a { color: var(--muted); text-decoration: none; }
.wz-crumb a:hover { color: var(--fg); }
.wz-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wz-steps { text-align: center; }
.wz-step-label { font-weight: 600; font-size: 13.5px; }
.wz-dots { display: flex; gap: 6px; justify-content: center; margin-top: 6px; }
.wz-dot { width: 22px; height: 5px; border-radius: 99px; border: 1px solid var(--line-2); }
.wz-dot.on { width: 40px; background: var(--fg); border-color: var(--fg); }
.wz-dot.done { background: var(--good); border-color: var(--good); }
.wz-actions { display: flex; gap: 8px; justify-content: flex-end; }
.wz-body { flex: 1; padding: 28px max(16px, 3vw) 60px; }
.wz-grid { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 720px) minmax(0, 1fr); gap: 28px; align-items: start; }
.wz-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.wz-side { position: sticky; top: 90px; }
.est-n { font-size: 40px; font-weight: 600; line-height: 1; }
.est-l { color: var(--muted); margin-top: 6px; font-weight: 500; }
.wz-grid.msg { grid-template-columns: minmax(0, 420px) minmax(0, 1fr); max-width: 1400px; }
.wz-msg-form h2 .ico { margin-right: 6px; vertical-align: -3px; }
.wz-grid.rvw { grid-template-columns: minmax(0, 560px) minmax(0, 1fr); max-width: 1300px; }
.wz-preview { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
#save-state.bad { color: var(--bad); }

/* multi-select */
.ms { position: relative; }
.ms-box { width: 100%; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 44px; padding: 7px 10px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg); text-align: left; }
.ms-box:hover { border-color: #3a3a3a; }
.ms-panel { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; z-index: 40; box-shadow: 0 16px 40px rgba(0,0,0,.55); padding: 8px; }
.ms-q { margin-bottom: 6px; }
.ms-items { max-height: 320px; overflow: auto; display: flex; flex-direction: column; }
.ms-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.ms-item:hover { background: var(--surface); }
.ms-item input { width: auto; accent-color: var(--accent); }
.li-ico { color: var(--muted); font-size: 12px; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 6px; padding: 3px 4px 3px 9px; font-size: 13px; }
.chip button { width: 20px; height: 20px; border-radius: 4px; color: var(--muted); }
.chip button:hover { background: var(--line-2); color: var(--fg); }
.link-btn { color: var(--accent-hi); font-weight: 500; align-self: flex-start; padding: 2px 0; }
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; font-size: 14px; color: var(--fg); text-transform: none; letter-spacing: 0; font-family: var(--f-body); }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 40px; height: 22px; border-radius: 99px; background: var(--line-2); position: relative; flex: none; transition: background .15s; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent-hi); outline-offset: 2px; }
.inline-sel { width: auto; padding: 2px 6px; font-size: 12.5px; display: inline-block; }

/* templates and thumbnails */
.small-tabs { margin: 0; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.tpl { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); transition: border-color .15s, transform .15s; }
.tpl:hover { border-color: var(--accent-hi); transform: translateY(-2px); }
.tpl span:first-of-type { font-weight: 500; }
.thumb { width: 100%; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 8px; background: #f4f4f5; position: relative; pointer-events: none; }
.thumb iframe { width: 600px; height: 800px; border: 0; transform: scale(var(--s, .26)); transform-origin: 0 0; position: absolute; top: 0; left: 0; }
.tpl .thumb iframe { --s: .26; }
.thumb.big { aspect-ratio: auto; height: 520px; max-width: 420px; pointer-events: auto; }
.thumb.big iframe { --s: .7; height: 742px; }
.thumb.tall { aspect-ratio: auto; height: min(78vh, 900px); width: min(100%, 640px); pointer-events: auto; }
.thumb.tall iframe { transform: none; width: 100%; height: 100%; position: static; }

/* review */
.rv { border: 1px solid var(--line); border-radius: 10px; }
.rv summary { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; list-style: none; }
.rv summary::-webkit-details-marker { display: none; }
.rv-body { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.rv-ok { color: var(--fg); }
.rv-ok::first-letter { color: var(--good); }
.rv-warn { color: var(--warn); font-size: 13.5px; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 10px; font-size: 13.5px; }
.kv > span:first-child { color: var(--muted); }

/* editor */
.ed { height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.ed-top { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--side); border-bottom: 1px solid var(--line); }
.ed-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 30vw; }
.ed-tools { display: flex; align-items: center; gap: 2px; }
.ed-sep { width: 1px; height: 22px; background: var(--line-2); margin: 0 8px; }
.ed-main { flex: 1; display: grid; grid-template-columns: 52px 320px minmax(0, 1fr); min-height: 0; }
.ed-rail { border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 12px; background: var(--side); }
.rail-btn { width: 36px; height: 36px; border-radius: 9px; color: var(--muted); font-size: 18px; border: 1px solid transparent; }
.rail-btn:hover { color: var(--fg); background: var(--surface); }
.rail-btn.on { color: var(--accent-hi); background: var(--accent-soft); border-color: var(--accent-edge); }
.ed-panel { border-right: 1px solid var(--line); overflow: auto; background: var(--surface); }
.pn-head { padding: 16px 18px 6px; }
.pn-title { padding: 4px 18px 0; font-size: 16px; font-weight: 600; }
.pn-tip { padding: 0 18px; margin: 0 0 10px; }
.pn-body { padding: 12px 18px 24px; }
.palette { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 14px 20px; }
.pal { display: flex; align-items: center; gap: 10px; padding: 14px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg); font-weight: 500; cursor: grab; text-align: left; }
.pal:hover { border-color: var(--accent-hi); }
.pal-g { width: 22px; text-align: center; color: var(--accent-hi); font-weight: 700; }
.pal-grip { margin-left: auto; color: var(--muted-2); }
.ed-stage { overflow: auto; position: relative; padding: 32px 24px 80px; }
.ed-canvas { margin: 0 auto; width: 600px; max-width: 100%; transition: width .2s; }
.ed-canvas.mobile { width: 375px; }
.cv-email { border-radius: 4px; box-shadow: 0 2px 20px rgba(0,0,0,.25); min-height: 300px; color: #18181b; }
.cv-blk { position: relative; outline: 1px solid transparent; outline-offset: -1px; cursor: pointer; }
.cv-blk:hover { outline-color: rgba(59,130,246,.5); }
.cv-blk.sel { outline: 2px solid #3b82f6; outline-offset: -2px; z-index: 2; }
.cv-tools { position: absolute; top: -30px; right: 0; display: none; gap: 2px; background: #2563eb; border-radius: 6px 6px 0 0; padding: 3px 4px; z-index: 5; }
.cv-blk.sel .cv-tools { display: flex; }
.cv-tools button { color: #fff; width: 26px; height: 24px; border-radius: 4px; font-size: 13px; }
.cv-tools button:hover { background: rgba(255,255,255,.18); }
.cv-tag { color: #fff; font-size: 11px; font-family: var(--f-mono); text-transform: uppercase; letter-spacing: .05em; padding: 0 8px 0 4px; align-self: center; }
.cv-drag { cursor: grab; }
.cv-ph { border: 1px dashed #c4c4cc; background: #f4f4f6; color: #71717a; text-align: center; padding: 26px 12px; border-radius: 6px; font: 13px/1.4 Arial, sans-serif; }
.cv-btn { display: inline-block; padding: 12px 28px; border-radius: 6px; font-weight: bold; font-size: 16px; }
.cv-split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; }
.cv-split.right > div:first-child { order: 2; }
.ed-canvas.mobile .cv-split { grid-template-columns: 1fr; }
.cv-hr { border: 0; border-top: 1px solid #e4e4e7; margin: 6px 0; }
.cv-coupon { display: inline-block; border: 2px dashed; border-radius: 8px; padding: 14px 28px; font-size: 22px; letter-spacing: 2px; }
.cv-html { width: 100%; height: 120px; border: 0; pointer-events: none; }
.cv-empty { padding: 60px 20px; text-align: center; color: #71717a; border: 2px dashed #d4d4d8; margin: 20px; border-radius: 8px; font: 15px Arial, sans-serif; }
.cv-foot { padding: 22px 32px 28px; text-align: center; font: 12px/1.6 Arial, sans-serif; color: #6b7280; }
.rt { outline: none; min-height: 1.6em; cursor: text; }
.rt p, .rt div, .rt h1, .rt h2, .rt h3 { margin: 0 0 12px; }
.rt p:last-child { margin-bottom: 0; }
.rt h2 { font-size: 1.6em; } .rt h3 { font-size: 1.25em; }
.rt a { color: inherit; }
.drop-line { position: absolute; height: 4px; background: #3b82f6; border-radius: 4px; pointer-events: none; z-index: 10; box-shadow: 0 0 0 3px rgba(59,130,246,.25); }
.rt-bar { position: fixed; transform: translateX(-50%); display: flex; gap: 2px; background: #111; border: 1px solid #333; border-radius: 8px; padding: 4px; z-index: 60; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.rt-bar button { min-width: 30px; height: 30px; border-radius: 6px; color: #f0f0f0; font-size: 14px; }
.rt-bar button:hover { background: #2a2a2a; }

/* misc pages */
.soon { display: flex; flex-direction: column; gap: 10px; max-width: 680px; }
.soon-badge { align-self: flex-start; font-family: var(--f-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-hi); background: var(--accent-soft); border: 1px solid var(--accent-edge); border-radius: 99px; padding: 3px 10px; }
.integ { text-decoration: none; color: var(--fg); display: flex; flex-direction: column; gap: 8px; transition: border-color .15s; }
.integ:hover { border-color: var(--accent-hi); }
.integ-top { display: flex; justify-content: space-between; align-items: center; }

@media (max-width: 1000px) {
  .wz-grid, .wz-grid.msg, .wz-grid.rvw { grid-template-columns: 1fr; }
  .wz-side, .wz-preview { position: static; }
  .perf-row { grid-template-columns: 1fr 1fr; }
  .ed-main { grid-template-columns: 52px 260px minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .wz-top { grid-template-columns: 1fr auto; }
  .wz-steps { display: none; }
  .ed-main { grid-template-columns: 1fr; }
  .ed-rail, .ed-panel { display: none; }
  .acct-menu { position: static; box-shadow: none; margin-top: 6px; }
}
[hidden] { display: none !important; }
.nav a.nv, .nav summary.nv { display: flex; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a, .tabs button { padding: 9px 14px; font-weight: 500; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-size: 14px; }
.tabs a:hover, .tabs button:hover { color: var(--fg); }
.tabs a[aria-current="page"], .tabs button[aria-current="page"] { color: var(--fg); border-color: var(--accent-hi); }
.wz .card > h2:first-child::before { content: none; }
.wz .card > h2:first-child > :last-child { margin-left: 0; }
.wz .card > h2:first-child { justify-content: flex-start; gap: 8px; }
.rail-btn { font-size: 20px; line-height: 1; }

/* ----- analytics & revenue ----- */
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .g3 { grid-template-columns: 1fr; } }
.good-t { color: #1fae55; }
.rev-kpis .kpi:nth-child(2) .v { color: inherit; }
a.kpi-link { color: inherit; text-decoration: none; transition: border-color .15s; }
a.kpi-link:hover { border-color: var(--accent, #3b82f6); }
.an-filters { align-items: center; }
.an-filters form.row { gap: 8px; align-items: center; flex-wrap: wrap; }
.an-filters input[type=date] { width: auto; }
.sp-r { margin-left: auto; }
.card-pad { padding: 16px 20px 4px; }
.chart-card { padding: 16px 20px; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.chart-head h2 { margin: 0; }
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.sw-a { background: #1fae55; }
.sw-o { background: #3b82f6; }
.chart { position: relative; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-card { overflow-x: auto; }
@media (max-width: 700px) { .ctable td.small { white-space: nowrap; } }
.chart .gl { stroke: rgba(255,255,255,.07); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart .ax { fill: var(--muted-2, #777); font-family: var(--f-mono); font-size: 10px; }
.chart .b-a { fill: #1fae55; }
.chart .b-o { fill: #3b82f6; }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit.on { fill: rgba(255,255,255,.04); }
.chart-tip { position: absolute; pointer-events: none; background: #1a1a1a; border: 1px solid rgba(255,255,255,.12); border-radius: 8px; padding: 8px 10px; font-size: 12px; line-height: 1.6; white-space: nowrap; box-shadow: 0 6px 20px rgba(0,0,0,.4); z-index: 5; }
.chart-tip div { display: flex; align-items: center; gap: 6px; }
.chart-tip .num { margin-left: auto; padding-left: 12px; }
.chart-tip .tip-t { border-top: 1px solid rgba(255,255,255,.1); margin-top: 4px; padding-top: 4px; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
details.how summary { cursor: pointer; }
details.how p { color: var(--muted); margin: 10px 0 0; max-width: 760px; }

/* ----- flows ----- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); font-size: 12.5px; white-space: nowrap; }
.chip .ico { width: 14px; height: 14px; color: var(--good); }
.f-period { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn.danger { color: var(--bad); border-color: var(--bad-edge); }
.btn.danger:hover { background: var(--bad-soft); }
.icon-btn.sm { width: 24px; height: 24px; font-size: 12px; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.tpl-card { text-align: left; display: flex; flex-direction: column; gap: 8px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; color: var(--fg); transition: border-color .15s, transform .15s; }
.tpl-card:hover { border-color: var(--accent-hi); transform: translateY(-1px); }
.tpl-card p { margin: 0; }
.tpl-top { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.tpl-top .ico { width: 18px; height: 18px; color: var(--accent-hi); }
.tpl-meta { display: flex; align-items: center; gap: 10px; margin-top: auto; flex-wrap: wrap; }
.tpl-needs { color: var(--warn); }
.tpl-card.blank { border-style: dashed; }
.tpl-card .plus { width: 18px; text-align: center; color: var(--accent-hi); }

.fl .wz-top { grid-template-columns: 1fr auto; }
.fl-name { width: auto; min-width: 140px; max-width: 360px; padding: 6px 10px; font-weight: 600; background: transparent; border-color: transparent; }
.fl-name:hover, .fl-name:focus { border-color: var(--line-2); background: var(--bg); }
.wz-actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.fl-people { margin-right: 6px; }
.fl-problems { padding: 10px 20px; background: var(--warn-soft); border-bottom: 1px solid var(--warn-edge); color: var(--fg); font-size: 13.5px; }
.fl-problems b { color: var(--warn); }
.fl-main { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 400px; min-height: 0; }
.fl-canvas { overflow: auto; padding: 32px 24px 80px; background: radial-gradient(circle, #1c1c1c 1px, transparent 1px) 0 0 / 18px 18px, var(--bg); height: calc(100vh - 57px); }
.fl-panel { border-left: 1px solid var(--line); background: var(--surface); overflow: auto; height: calc(100vh - 57px); }
.fl-tree { display: flex; flex-direction: column; align-items: center; min-width: max-content; margin: 0 auto; }
.fl-node { display: flex; align-items: center; gap: 12px; width: 300px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; text-align: left; color: var(--fg); box-shadow: 0 4px 16px rgba(0,0,0,.35); transition: border-color .15s; }
.fl-node:hover { border-color: #444; }
.fl-node.sel { border-color: var(--accent-hi); box-shadow: 0 0 0 3px var(--accent-soft); }
.fl-node .fl-ic { width: 32px; height: 32px; flex: none; border-radius: 8px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-hi); }
.fl-node .fl-ic .ico { width: 17px; height: 17px; }
.fl-node .fl-txt, .fl-node.split > span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.fl-node .fl-txt b, .fl-node .fl-txt .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-node.trigger .fl-ic { background: var(--good-soft); color: var(--good); }
.fl-node.split .fl-ic { background: rgba(167,139,250,.12); color: var(--violet); }
.fl-node.delay { width: auto; padding: 7px 14px; border-radius: 99px; gap: 8px; font-size: 13px; color: var(--muted); box-shadow: none; }
.fl-node.delay .ico { width: 15px; height: 15px; }
.fl-stats { display: flex; gap: 10px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); margin-top: 4px; font-family: var(--f-mono); }
.fl-add-wrap { position: relative; display: flex; flex-direction: column; align-items: center; }
.fl-line { width: 2px; height: 14px; background: var(--line-2); }
.fl-add { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); color: var(--muted); font-size: 14px; line-height: 1; display: grid; place-items: center; transition: .15s; }
.fl-add:hover, .fl-add.on { border-color: var(--accent-hi); color: var(--accent-hi); }
.fl-menu { position: absolute; top: 44px; left: 50%; transform: translateX(-50%); z-index: 10; display: flex; flex-direction: column; min-width: 190px; padding: 6px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.5); }
.fl-menu button { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 6px; text-align: left; color: var(--fg); }
.fl-menu button:hover { background: var(--surface); }
.fl-menu .ico { width: 16px; height: 16px; color: var(--accent-hi); }
.fl-branches { display: flex; gap: 32px; align-items: flex-start; position: relative; padding-top: 16px; }
.fl-branches::before { content: ""; position: absolute; top: 0; left: 25%; right: 25%; height: 16px; border: 2px solid var(--line-2); border-bottom: 0; border-radius: 10px 10px 0 0; }
.fl-branch { display: flex; flex-direction: column; align-items: center; min-width: 300px; }
.fl-yes, .fl-no { font-family: var(--f-mono); font-size: 10px; letter-spacing: .08em; padding: 2px 8px; border-radius: 99px; }
.fl-yes { color: var(--good); background: var(--good-soft); }
.fl-no { color: var(--bad); background: var(--bad-soft); }
.fl-end { font-family: var(--f-mono); font-size: 10px; color: var(--muted-2); text-transform: uppercase; letter-spacing: .08em; padding: 4px 10px; border: 1px dashed var(--line-2); border-radius: 99px; }
.fp-head { padding: 16px 20px; border-bottom: 1px solid var(--line); font-size: 15px; position: sticky; top: 0; background: var(--surface); z-index: 2; }
.fp-body { padding: 18px 20px 40px; gap: 14px; }
.fp-sec { display: flex; flex-direction: column; gap: 2px; padding-top: 10px; border-top: 1px solid var(--line); }
.fp-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.fp-stats div { display: flex; flex-direction: column; gap: 2px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.fp-stats span { font-size: 11px; color: var(--muted); }

.cond { border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg); padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.cond-top { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.cond-top select { width: auto; flex: 1; }
.cond-body { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cond-body select, .cond-body input { width: auto; padding: 7px 9px; font-size: 13px; }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; cursor: pointer; }
.check-row input { width: auto; margin-top: 3px; }
.note { font-size: 13px; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); border: 1px solid var(--accent-edge); }
.modal.sm { inset: auto; top: 20vh; left: 50%; transform: translateX(-50%); width: min(380px, 92vw); }
.cv-item { display: flex; align-items: center; gap: 14px; padding: 8px 0; }
.cv-item-img { width: 64px; height: 64px; border-radius: 6px; background: #e4e4e7; flex: none; }
@media (max-width: 900px) {
  .fl-main { grid-template-columns: 1fr; }
  .fl-canvas, .fl-panel { height: auto; }
  .fl-panel { border-left: 0; border-top: 1px solid var(--line); }
  .fl-people { display: none; }
}

/* ----- metrics ----- */
.m-name { display: flex; gap: 12px; align-items: center; }
.m-ic { width: 28px; height: 28px; flex: none; border-radius: 7px; display: inline-grid; place-items: center; vertical-align: middle; }
.m-ic.pc { background: #fff; color: #000; }
.m-ic.pc .mark { width: 16px; height: 16px; }
.m-ic.sh { background: #95bf47; color: #fff; font-weight: 800; font-size: 14px; }
.m-ic.web { background: var(--accent-soft); color: var(--accent-hi); }
.m-ic .ico { width: 16px; height: 16px; }
h1 .m-ic { width: 34px; height: 34px; margin-right: 6px; }
.steps-list { margin: 0; padding-left: 20px; color: var(--muted); line-height: 1.9; }
.steps-list b { color: var(--fg); }
pre.pixel { margin: 0; max-height: 220px; overflow: auto; }
pre.pixel code.copy { display: block; white-space: pre; overflow-wrap: normal; padding: 12px; font-size: 11.5px; line-height: 1.5; }
.fp-thumb { aspect-ratio: auto; height: 300px; }
.fp-thumb iframe { --s: .6; height: 500px; left: 50%; margin-left: -180px; }
.m-kpis .kpi:nth-child(2) .v { color: inherit; }

/* ----- segments, profile, home extras ----- */
.li-ico { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--surface-2); color: var(--muted); font-size: 12px; flex: none; }
.li-ico.sg { background: rgba(167,139,250,.12); color: var(--violet); }
.li-ico .ico { width: 14px; height: 14px; }
.seg-builder { max-width: 980px; }
.seg-match { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.seg-match select { width: auto; }
.seg-join { font-family: var(--f-mono); font-size: 10px; letter-spacing: .08em; color: var(--accent-hi); padding: 6px 0 6px 14px; }
.seg-cond { margin: 0; }
#seg-conds .btn.sm { margin-top: 12px; }
.seg-where { display: inline-flex; gap: 6px; align-items: center; }
.seg-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.seg-count b { font-size: 20px; }
.error-t { color: var(--bad); }
.fl-wait { margin-left: auto; font-family: var(--f-mono); font-size: 10px; color: var(--warn); background: var(--warn-soft); border: 1px solid var(--warn-edge); border-radius: 99px; padding: 2px 8px; white-space: nowrap; }
.fl-node.delay .fl-wait { margin-left: 4px; }
.fl-node.action .fl-ic { background: rgba(234,179,8,.12); color: var(--warn); }
.prof-grid { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 12px; align-items: start; }
.prof-grid .card a { color: var(--accent-hi); text-decoration: none; }
.acts { display: flex; flex-direction: column; }
.act { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.act:last-child { border-bottom: 0; }
.act-ic { width: 28px; height: 28px; flex: none; border-radius: 8px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-hi); }
.act-ic .ico { width: 15px; height: 15px; }
.act-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.act-txt .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-v { white-space: nowrap; }
.act-t { white-space: nowrap; min-width: 140px; text-align: right; }
.home-big { display: flex; flex-direction: column; gap: 2px; }
.home-big .num { font-size: 28px; font-weight: 600; }
.ch-row { display: flex; flex-direction: column; gap: 6px; }
.ch-top { display: flex; justify-content: space-between; font-size: 13.5px; }
.meter span.m-flow, .meter span.m-camp { display: block; height: 100%; border-radius: 99px; }
.meter span.m-flow { background: #1fae55; }
.meter span.m-camp { background: #3b82f6; }
.mini-chart .chart svg { max-height: 150px; }
@media (max-width: 900px) { .prof-grid { grid-template-columns: 1fr; } .act-t { min-width: 0; } }
/* Equal-width YES / NO columns so the bracket sits exactly under each path. */
.fl-branches { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; }
.fl-branches::before { left: calc(25% - 8px); right: calc(25% - 8px); }
.prof-kpis .kpi:nth-child(2) .v { color: inherit; }
.ms-item .li-ico { width: 20px; height: 20px; }

/* ----- sign-up forms ----- */
.type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.type-grid .choice { align-items: flex-start; }
.type-grid .choice .ico { width: 22px; height: 22px; color: var(--accent-hi); flex: none; }
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--fg); }
.fm-kpi { padding: 20px 22px; }
.fm-kpi .v { font-size: 1.9rem; }
.fm-kpi .l2 { margin-top: 8px; color: var(--muted); font-size: 13.5px; }
.fm-kpis .kpi:nth-child(2) .v { color: inherit; }
.fm-kpis .kpi:first-child .v { color: #1fae55; }
.fn { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.fn-step { display: flex; flex-direction: column; gap: 2px; position: relative; }
.fn-n { font-size: 24px; font-weight: 600; }
.fn-l { font-size: 13.5px; }
.fn-drop { align-self: flex-start; margin-top: 4px; font-size: 11px; font-family: var(--f-mono); color: var(--bad); background: var(--bad-soft); border-radius: 99px; padding: 2px 8px; }
.fn-bar { margin-top: 10px; height: 120px; background: var(--surface-2); border-radius: 6px; display: flex; align-items: flex-end; overflow: hidden; }
.fn-bar span { display: block; width: 100%; background: #3b82f6; min-height: 2px; }
.ab-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 24px 6px; }
.ab-empty > .ico { width: 54px; height: 54px; padding: 14px; border-radius: 50%; background: var(--surface-2); color: var(--muted); }
.ab-empty p { margin: 0; }
.segs { display: inline-flex; }
.segs .seg:first-child { border-radius: 8px 0 0 8px; }
.segs .seg:last-child { border-radius: 0 8px 8px 0; }
.segs .seg + .seg { border-left: 0; }
.seg.on { color: var(--accent-hi); background: var(--accent-soft); border-color: var(--accent-edge); }
.fm .rail-btn .ico { width: 18px; height: 18px; }
.fm-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 16px; border-bottom: 1px solid var(--line); background: var(--bg); flex-wrap: wrap; }
.fm-tabs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fm-tab { padding: 7px 12px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); color: var(--fg); font-size: 13px; font-weight: 600; }
.fm-tab.on { border-color: var(--accent-hi); color: var(--accent-hi); background: var(--accent-soft); }
.fm-tab.add { color: var(--muted); border-style: dashed; }
.fm-arrow { color: var(--muted-2); }
.fm-right { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.fm-stage-wrap { display: flex; align-items: flex-start; justify-content: center; overflow: auto; padding: 28px; background: radial-gradient(circle, #1c1c1c 1px, transparent 1px) 0 0 / 18px 18px, var(--bg); }
.fm-stage { background: #e5e7eb; border-radius: 12px; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.5); display: flex; flex-direction: column; flex: none; }
.fm-stage.desktop { width: min(100%, 960px); height: 620px; }
.fm-stage.mobile { width: 375px; height: 740px; border-radius: 40px; border: 10px solid #111; }
.fm-chrome { height: 38px; background: #f4f4f5; display: flex; align-items: center; gap: 6px; padding: 0 14px; flex: none; border-bottom: 1px solid #e4e4e7; }
.fm-chrome .dot { width: 10px; height: 10px; border-radius: 50%; background: #d4d4d8; }
.fm-notch { width: 90px; height: 20px; border-radius: 20px; background: #111; position: absolute; left: 50%; transform: translateX(-50%); }
.fm-stage.mobile .fm-chrome { position: relative; height: 70px; align-items: flex-end; padding-bottom: 8px; justify-content: center; }
.fm-stage.mobile .fm-chrome .fm-url { margin: 0; }
.fm-url { margin-left: 12px; font-size: 12px; color: #71717a; background: #fff; border-radius: 99px; padding: 4px 14px; }
.fm-page { position: relative; flex: 1; background: #fff; overflow: hidden; }
.fm-fake { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.fm-fake span { display: block; height: 18px; border-radius: 6px; background: #f4f4f5; }
.fm-fake span:first-child { height: 120px; }
.fm-fake span:nth-child(3) { width: 70%; }
.fm-host { position: absolute; inset: 0; overflow: auto; }
.fm-stepset { padding: 14px 20px 20px; border-top: 1px solid var(--line); margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.fpv-wrap { flex: 1; display: flex; align-items: center; justify-content: center; background: #e5e7eb; padding: 20px; overflow: auto; }
.fpv-stage { position: relative; background: #fff; border-radius: 10px; overflow: hidden; }
.fpv-stage.desktop { width: min(100%, 1000px); height: min(100%, 640px); }
.fpv-stage.mobile { width: 375px; height: min(100%, 740px); border-radius: 30px; border: 8px solid #111; }
.fpv-host { position: absolute; inset: 0; }
@media (max-width: 900px) { .fm-stage.desktop { height: 520px; } .type-grid { grid-template-columns: 1fr; } }
/* Keep form previews inside their frames (the form uses its own stacking order). */
.fm-page, .fpv-stage { isolation: isolate; }
.fpv-stage.desktop { height: 640px; max-height: 100%; }
.fpv-stage.mobile { height: 720px; max-height: 100%; }
.fpv-stage.full { width: 100%; height: 100%; border-radius: 0; }
#form-preview.full .modal { inset: 0; border-radius: 0; }
#form-preview.full .fpv-wrap { padding: 0; }
.warn-t { color: var(--warn); }

/* ----- images ----- */
.dropzone { border: 2px dashed var(--line-2); border-radius: 14px; padding: 26px; text-align: center; color: var(--muted); margin-bottom: 14px; transition: .15s; display: flex; flex-direction: column; gap: 4px; }
.dropzone.over { border-color: var(--accent-hi); background: var(--accent-soft); color: var(--fg); }
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.img-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.img-card.pick { cursor: pointer; transition: border-color .15s; }
.img-card.pick:hover { border-color: var(--accent-hi); }
.img-thumb { aspect-ratio: 4 / 3; background: repeating-conic-gradient(#1c1c1c 0 25%, #151515 0 50%) 0 0 / 16px 16px; display: grid; place-items: center; overflow: hidden; }
.img-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.img-meta { padding: 10px 12px 4px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.img-meta b { font-weight: 500; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.img-acts { padding: 6px 12px 12px; gap: 6px; }
.img-acts code.copy { font-size: 11px; }
label.btn input[hidden] { display: none; }
.img-modal { inset: 6vh 8vw; }
.img-modal-body { padding: 16px 20px; overflow: auto; flex: 1; }
.img-field { display: flex; flex-direction: column; gap: 8px; }
.img-field .btn { align-self: flex-start; }
.img-prev { max-width: 100%; max-height: 120px; object-fit: contain; border-radius: 8px; border: 1px solid var(--line); background: #fff; align-self: flex-start; }

/* ----- templates ----- */
.tpl-lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.tpl-item { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.tpl-item .thumb { pointer-events: auto; display: block; }
.tpl-item .thumb iframe { pointer-events: none; }
.tpl-info { display: flex; flex-direction: column; gap: 2px; }
.tpl-item .row { gap: 6px; flex-wrap: wrap; }

/* Campaign A/B tests */
.ab-card { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 6px; }
.ab-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ab-col { border: 1px solid var(--line-2); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ab-col.win { border-color: var(--good-edge); background: var(--good-soft); }
.ab-subj { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ab-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ab-stats > div { display: flex; flex-direction: column; gap: 2px; }
.ab-stats .num { font-size: 18px; font-weight: 600; }
@media (max-width: 700px) { .ab-cols { grid-template-columns: 1fr; } .ab-stats { grid-template-columns: repeat(2, 1fr); } }

/* Campaign list / calendar */
.view-tabs { margin-bottom: 14px; }
.cal-card { padding: 16px; }
.cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.cal-head b { min-width: 150px; text-align: center; }
.cal-key { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.cal-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-left: 8px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal-wd { font-family: var(--f-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cal-cell { min-height: 104px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal-cell.off { background: var(--surface); }
.cal-cell.today .cal-d { background: var(--accent); color: var(--accent-ink); border-radius: 999px; }
.cal-d { font-size: 12px; color: var(--muted); align-self: flex-start; padding: 1px 7px; }
.cal-ev { display: block; font-size: 12px; padding: 4px 6px; border-radius: 6px; text-decoration: none; color: var(--fg); background: var(--surface-2); border-left: 3px solid var(--muted-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-ev:hover { background: var(--line-2); }
.cal-t { color: var(--muted); }
.cal-ev.sent, .cal-dot.sent { border-left-color: var(--good); background-color: var(--good-soft); }
.cal-dot.sent { background: var(--good); }
.cal-ev.scheduled { border-left-color: var(--accent-hi); }
.cal-dot.scheduled { background: var(--accent-hi); }
.cal-ev.sending, .cal-ev.paused { border-left-color: #f59e0b; }
.cal-dot.sending { background: #f59e0b; }
@media (max-width: 700px) { .cal-cell { min-height: 64px; } .cal-ev .cal-t { display: none; } }

/* Deliverability */
.chart .ln { fill: none; stroke: #3b82f6; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.chart .dt { fill: #3b82f6; stroke: var(--surface); stroke-width: 2; }
.chart .thr { stroke: var(--warn); stroke-width: 1; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; opacity: .7; }
.chart .thr-t { fill: var(--warn); }
.bad-t { color: var(--bad); }
.warn-t { color: var(--warn); }
.dv-kpi .v { font-size: 30px; }

/* Campaign list extras */
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--fg); }
.row-acts { white-space: nowrap; opacity: 0; transition: opacity .15s; }
tr:hover .row-acts, .row-acts:focus-within { opacity: 1; }
@media (hover: none) { .row-acts { opacity: 1; } }
.cal-cell.can-add { cursor: pointer; }
.cal-add { margin-top: auto; font-size: 11px; color: var(--muted-2); opacity: 0; transition: opacity .15s; }
.cal-cell.can-add:hover .cal-add { opacity: 1; }
.ld-grid { align-items: start; }
.pager { justify-content: center; gap: 12px; margin-top: 12px; }
.fl-when { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 6px; text-align: center; }
.link-cell { max-width: 520px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===================== Email editor (Klaviyo style) ===================== */
.ev { position: fixed; inset: 0; display: flex; flex-direction: column; background: var(--bg); z-index: 50; }
.ev-top { height: 52px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--side); flex: none; }
.ev-top .sp, .ev-pv-head .sp, .ev-crop-foot .sp { flex: 1; }
.ev-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
.ev-icon { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: var(--fg); background: none; border: 0; cursor: pointer; text-decoration: none; }
.ev-icon:hover { background: var(--surface-2); }
.evi { width: 18px; height: 18px; flex: none; }
.evi.inl { width: 15px; height: 15px; vertical-align: -3px; }
.ev-main { flex: 1; display: flex; min-height: 0; }
.ev-rail { width: 52px; flex: none; border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 0; background: var(--side); }
.ev-rail button { width: 36px; height: 36px; border-radius: 10px; border: 1px solid transparent; background: none; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.ev-rail button.on { color: var(--accent-hi); border-color: var(--accent-edge); background: var(--accent-soft); }
.ev-panel { width: 330px; flex: none; border-right: 1px solid var(--line); background: var(--surface); overflow-y: auto; }
.ev-ph-head { display: flex; align-items: center; gap: 8px; padding: 16px 18px 6px; font-size: 15px; }
.ev-back { background: none; border: 0; color: var(--fg); cursor: pointer; padding: 2px; border-radius: 6px; display: grid; place-items: center; }
.ev-back:hover { background: var(--surface-2); }
.ev-tabs { display: flex; gap: 18px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.ev-tabs button { background: none; border: 0; color: var(--muted); padding: 10px 0 9px; cursor: pointer; font: inherit; font-size: 13.5px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.ev-tabs button.on { color: var(--fg); border-bottom-color: var(--fg); font-weight: 600; }
.ev-pbody { padding: 14px 18px 40px; display: flex; flex-direction: column; gap: 12px; }
.ev-fs { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.ev-fs:disabled { opacity: .45; }
.ev-sub { font-weight: 600; font-size: 13.5px; margin-top: 4px; }
.ev-help { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.ev-hint { display: block; font-size: 11.5px; color: var(--muted-2); text-transform: none; letter-spacing: 0; font-family: inherit; margin-top: -2px; }
.ev-palette { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ev-pal { display: flex; align-items: center; gap: 8px; padding: 11px 10px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--fg); cursor: grab; font: inherit; font-size: 13px; text-align: left; transition: border-color .15s, background .15s; }
.ev-pal span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-pal .grip { width: 14px; height: 14px; color: var(--muted-2); }
.ev-pal:hover { border-color: var(--accent-edge); background: var(--accent-soft); }
.ev-pre { display: flex; flex-direction: column; gap: 8px; }
.ev-pre-item { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--fg); cursor: grab; font: inherit; }
.ev-pre-item span { font-size: 12px; color: var(--muted); }
.ev-pre-item:hover { border-color: var(--accent-edge); }
.ev-uni-list { display: flex; flex-direction: column; gap: 6px; }
.ev-uni-item { display: flex; align-items: center; gap: 4px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface-2); padding-right: 6px; cursor: grab; }
.ev-uni-main { flex: 1; display: flex; flex-direction: column; text-align: left; padding: 10px 12px; background: none; border: 0; color: var(--fg); font: inherit; cursor: pointer; min-width: 0; }
.ev-uni-main span { font-size: 12px; color: var(--muted); }
.ev-empty-note { padding: 18px; border: 1px dashed var(--line-2); border-radius: 10px; color: var(--muted); text-align: center; font-size: 13px; }
.ev-x { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 4px; border-radius: 6px; display: inline-grid; place-items: center; font-size: 14px; }
.ev-x:hover { color: var(--fg); background: var(--line); }
.ev-x.on { color: var(--accent-hi); }
.ev-x.ev-hide { display: none; }
.ev-x .evi { width: 15px; height: 15px; }
.ev-colpick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 4px; }
.ev-colpick .ev-sub { grid-column: 1 / -1; }
.ev-colpick button { display: flex; gap: 3px; height: 34px; padding: 6px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface-2); cursor: pointer; }
.ev-colpick button i { display: block; background: var(--muted-2); border-radius: 3px; }
.ev-colpick button:hover, .ev-colpick button.on { border-color: var(--accent-hi); }
.ev-colpick button.on i { background: var(--accent-hi); }
.ev-sec-t { margin-top: 6px; font-size: 13.5px; }
.ev-f { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--muted); }
.ev-f input, .ev-f select, .ev-f textarea { font-size: 13.5px; padding: 8px 10px; border-radius: 8px; }
.ev-f textarea { min-height: 0; }
.ev-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ev-unit { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); border-radius: 8px; padding: 0 10px; background: var(--bg); color: var(--muted); }
.ev-unit input { border: 0; background: none; padding: 8px 0; min-width: 0; box-shadow: none !important; }
.ev-unit em { font-style: normal; font-size: 12px; color: var(--muted-2); }
.ev-unit .evi { width: 15px; height: 15px; }
.ev-l { font-size: 12px; color: var(--muted-2); font-weight: 500; }
.ev-pad { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: center; }
.ev-pad:has(.ev-unit:nth-of-type(3)) { grid-template-columns: 1fr 1fr 1fr 1fr auto; }
.ev-pad:has(.ev-unit:nth-of-type(3)) .ev-unit { padding: 0 6px; }
.ev-seg { display: flex; border: 1px solid var(--line-2); border-radius: 9px; overflow: hidden; background: var(--surface-2); }
.ev-seg button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 10px; background: none; border: 0; border-right: 1px solid var(--line-2); color: var(--muted); cursor: pointer; font: inherit; font-size: 13px; }
.ev-seg button:last-child { border-right: 0; }
.ev-seg button.on { background: var(--bg); color: var(--fg); box-shadow: inset 0 0 0 1px var(--accent-edge); }
.ev-tg { display: flex; align-items: center; gap: 10px; font-size: 13.5px; cursor: pointer; }
.ev-tg > span:first-child { flex: 1; }
.ev-tg input { position: absolute; opacity: 0; width: 0; height: 0; }
.ev-sw { width: 34px; height: 20px; border-radius: 999px; background: var(--line-2); position: relative; transition: background .15s; flex: none; }
.ev-sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s; }
.ev-tg input:checked + .ev-sw { background: var(--accent); }
.ev-tg input:checked + .ev-sw::after { transform: translateX(14px); }
.ev-tg input:focus-visible + .ev-sw { outline: 2px solid var(--accent-hi); outline-offset: 2px; }
.ev-q { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: var(--line-2); color: var(--muted); font-size: 10px; font-style: normal; cursor: help; }
.ev-color { display: flex; gap: 6px; }
.ev-color input[type=color] { width: 38px; height: 36px; padding: 2px; border-radius: 8px; flex: none; }
.ev-opt { border-top: 1px solid var(--line); padding-top: 10px; }
.ev-opt-h { display: flex; align-items: center; justify-content: space-between; font-size: 13.5px; }
.ev-opt-h button { background: none; border: 0; color: var(--fg); font-size: 20px; line-height: 1; cursor: pointer; width: 26px; height: 26px; border-radius: 6px; }
.ev-opt-h button:hover { background: var(--line); }
.ev-opt-b { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.ev-radio { display: flex; flex-direction: column; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.ev-radio label { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line-2); cursor: pointer; font-size: 13.5px; }
.ev-radio label:last-child { border-bottom: 0; }
.ev-radio label.on { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-edge); }
.ev-radio input { width: auto; accent-color: var(--accent); }
.ev-radio span { display: flex; flex-direction: column; }
.ev-radio small { color: var(--muted); font-size: 12px; }
.ev-radio-l { display: flex; gap: 8px; align-items: center; font-size: 13.5px; cursor: pointer; }
.ev-radio-l input { width: auto; }
.ev-imgcard { border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; background: var(--bg); }
.ev-imgcard-pic { background: repeating-conic-gradient(#1f1f1f 0 25%, #262626 0 50%) 0 0 / 16px 16px; display: grid; place-items: center; min-height: 120px; padding: 10px; }
.ev-imgcard-pic img { max-width: 100%; max-height: 170px; display: block; border-radius: 6px; }
.ev-imgcard-pic.empty { color: var(--muted); font-size: 13px; }
.ev-imgcard-meta { padding: 10px 12px 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; overflow-wrap: anywhere; }
.ev-imgcard-meta code { font-family: var(--f-mono); font-size: 11.5px; color: var(--muted); }
.ev-imgcard .row { padding: 10px 12px 12px; gap: 8px; }
.ev-imgf { display: flex; align-items: center; gap: 10px; }
.ev-imgf img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line-2); }
.ev-banner { font-size: 12.5px; line-height: 1.5; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); border: 1px solid var(--accent-edge); }
.ev-banner.warn { background: var(--warn-soft); border-color: var(--warn-edge); }
.ev-rule { border: 1px solid var(--line-2); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
.ev-rule-top, .ev-rule-row { display: flex; gap: 6px; align-items: center; }
.ev-rule select, .ev-rule input { font-size: 13px; padding: 7px 9px; border-radius: 8px; }
.ev-and { text-align: center; font-family: var(--f-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); }
.ev-inline { width: auto; display: inline-block; padding: 2px 6px; font-size: 12.5px; }
.ev-prodlist { display: flex; flex-direction: column; gap: 6px; }
.ev-prod { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.ev-prod img, .ev-prod-img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; background: var(--line-2); flex: none; }
.ev-prod span:nth-child(2) { flex: 1; }

/* stage and canvas */
.ev-stage { flex: 1; overflow: auto; position: relative; }
.ev-pill { position: sticky; top: 12px; z-index: 6; margin: 12px auto 0; width: max-content; display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 12px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.12), 0 4px 16px rgba(0,0,0,.12); }
.ev-pill button { width: 34px; height: 30px; border-radius: 8px; border: 0; background: none; color: #52525b; display: grid; place-items: center; cursor: pointer; }
.ev-pill button:hover:not(:disabled) { background: #f4f4f5; }
.ev-pill button.on { background: #eef2ff; color: #2563eb; }
.ev-pill button:disabled { opacity: .35; cursor: default; }
.ev-pill-sep { width: 1px; height: 20px; background: #e4e4e7; margin: 0 4px; }
.ev-canvas { padding: 8px 0 80px; }
.ev-email { position: relative; }
.ev-sec { position: relative; display: flex; justify-content: center; outline: 1px solid transparent; outline-offset: -1px; cursor: default; }
.ev-sec:hover { outline-color: rgba(37,99,235,.45); }
.ev-sec.sel { outline: 2px solid #2563eb; outline-offset: -2px; z-index: 2; }
.ev-sec-tag { position: absolute; left: 0; top: 0; transform: translateY(-100%); background: #2563eb; color: #fff; font: 600 11px/1 Arial, sans-serif; padding: 5px 7px; border-radius: 4px 4px 0 0; display: none; z-index: 3; white-space: nowrap; }
.ev-sec:hover > .ev-sec-tag { display: block; background: #93a8d8; }
.ev-sec.sel > .ev-sec-tag { display: block; background: #2563eb; }
.ev-sec-in { position: relative; box-sizing: border-box; max-width: 100%; }
.ev-cols { display: flex; }
.ev-cols.stack { flex-direction: column; }
.ev-cols.stack.rtl { flex-direction: column-reverse; }
.ev-col { min-width: 0; min-height: 20px; flex: none; }
.ev-col-empty { margin: 8px; padding: 22px 10px; border: 1.5px dashed #a1a1aa; border-radius: 8px; color: #71717a; font: 13px Arial, sans-serif; text-align: center; background: rgba(255,255,255,.6); }
.ev-blk { position: relative; outline: 1px solid transparent; outline-offset: -1px; cursor: pointer; }
.ev-blk:hover { outline: 1px dashed #60a5fa; }
.ev-blk.sel { outline: 2px solid #2563eb; outline-offset: -2px; z-index: 2; }
.ev-tag { position: absolute; left: 0; top: 0; transform: translateY(-100%); background: #2563eb; color: #fff; font: 600 11px/1 Arial, sans-serif; padding: 5px 7px; border-radius: 4px 4px 0 0; display: none; z-index: 4; pointer-events: none; }
.ev-blk.sel > .ev-tag { display: block; }
.ev-flags { position: absolute; right: 4px; top: 4px; display: flex; gap: 4px; z-index: 3; pointer-events: none; }
.ev-flags i { font: 600 10px/1 Arial, sans-serif; font-style: normal; background: rgba(17,17,17,.75); color: #fff; padding: 4px 6px; border-radius: 4px; }
.ev-uni > .ev-sec-in, .ev-blk.ev-uni { box-shadow: inset 3px 0 0 #a855f7; }
.ev-hidden { opacity: .35; }
.ev-hidden::after { content: 'Hidden on this device'; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font: 600 11px Arial, sans-serif; background: #111; color: #fff; padding: 5px 8px; border-radius: 4px; pointer-events: none; }
.ev-blk .rt { outline: none; cursor: text; min-height: 1em; }
.ev-blk .rt p { margin: 0 0 12px; } .ev-blk .rt p:last-child { margin-bottom: 0; }
.ev-blk .rt h1 { font-size: 32px; margin: 0 0 12px; line-height: 1.25; } .ev-blk .rt h2 { font-size: 26px; margin: 0 0 12px; line-height: 1.25; } .ev-blk .rt h3 { font-size: 21px; margin: 0 0 12px; line-height: 1.3; }
.ev-blk .rt ul, .ev-blk .rt ol { margin: 0 0 12px; padding-left: 22px; }
.ev-ph { padding: 26px 12px; text-align: center; background: #f4f4f5; border: 1px dashed #a1a1aa; color: #71717a; font: 13px Arial, sans-serif; border-radius: 4px; }
.ev-ph-img { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 12px; cursor: pointer; }
.ev-ph-img .evi { width: 28px; height: 28px; }
.ev-btn { padding: 13px 28px; font-weight: bold; text-align: center; }
.ev-split { display: flex; gap: 24px; align-items: center; } .ev-split.right { flex-direction: row-reverse; } .ev-split > div { flex: 1; min-width: 0; }
.ev-coupon { display: inline-block; border: 2px dashed; border-radius: 8px; padding: 12px 26px; } .ev-coupon b { font-size: 22px; letter-spacing: 2px; }
.ev-table { width: 100%; border-collapse: collapse; } .ev-table td { padding: 8px 10px; vertical-align: top; }
.ev-video { position: relative; } .ev-video img { width: 100%; display: block; }
.ev-video span { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 64px; height: 64px; border-radius: 50%; background: rgba(0,0,0,.65); color: #fff; display: grid; place-items: center; font-size: 26px; }
.ev-grid { display: grid; gap: 12px; }
.ev-card { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 15px; }
.ev-card img, .ev-card-img { width: 100%; aspect-ratio: 1; object-fit: cover; background: #e4e4e7; display: block; }
.ev-card s { opacity: .6; }
.ev-card .ev-btn { padding: 9px 16px; }
.ev-dyn { font: 12px Arial, sans-serif; color: #6d28d9; background: #f5f3ff; border: 1px solid #ddd6fe; border-radius: 6px; padding: 6px 8px; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.ev-dyn .evi { width: 14px; height: 14px; }
.ev-item { display: flex; gap: 12px; align-items: center; padding: 8px 0; } .ev-item-img { width: 64px; height: 64px; background: #e4e4e7; border-radius: 6px; flex: none; }
.ev-html { width: 100%; height: 120px; border: 0; display: block; background: #fff; }
.ev-empty { margin: 40px auto; max-width: 600px; padding: 60px 20px; border: 2px dashed #a1a1aa; border-radius: 12px; text-align: center; color: #52525b; font: 15px Arial, sans-serif; background: rgba(255,255,255,.7); }
.ev-foot { margin: 0 auto; padding: 20px 16px; text-align: center; font: 12px/1.6 Arial, sans-serif; color: #71717a; box-sizing: border-box; max-width: 100%; }
.ev-canvas.mobile .ev-sec-in, .ev-canvas.mobile .ev-foot { box-shadow: none; }
.ev-drop { position: absolute; height: 4px; background: #2563eb; border-radius: 2px; z-index: 8; pointer-events: none; box-shadow: 0 0 0 3px rgba(37,99,235,.2); }
.ev-drop.sec { height: 6px; background: #7c3aed; }
.ev-float { position: absolute; z-index: 9; display: flex; flex-direction: column; gap: 2px; padding: 4px; background: #fff; border-radius: 10px; box-shadow: 0 1px 2px rgba(0,0,0,.14), 0 6px 20px rgba(0,0,0,.14); }
.ev-float button, .ev-float .ev-grip { width: 32px; height: 32px; border: 0; background: none; border-radius: 7px; color: #3f3f46; display: grid; place-items: center; cursor: pointer; }
.ev-float .ev-grip { cursor: grab; }
.ev-float button:hover, .ev-float .ev-grip:hover { background: #f4f4f5; }
.ev-float .evi { width: 17px; height: 17px; }
body.dragging .ev-blk, body.dragging .ev-sec { pointer-events: auto; }

/* rich text toolbar */
.ev-rtbar { position: fixed; z-index: 60; transform: translateX(-50%); display: flex; align-items: center; gap: 2px; padding: 4px; background: #111; border: 1px solid #333; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.ev-rtbar button { min-width: 30px; height: 30px; padding: 0 6px; border: 0; background: none; color: #f0f0f0; border-radius: 6px; cursor: pointer; font-size: 13px; display: grid; place-items: center; }
.ev-rtbar button:hover { background: #262626; }
.ev-rtbar .evi { width: 15px; height: 15px; }
.ev-rtbar .ev-pill-sep { background: #333; }
.ev-rtcolor { position: relative; width: 30px; height: 30px; display: grid; place-items: center; cursor: pointer; border-radius: 6px; font-weight: 700; color: #f0f0f0; }
.ev-rtcolor input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; padding: 0; }
.ev-rtcolor span { border-bottom: 3px solid #ef4444; line-height: 1.1; }
.ev-rtbar select { width: auto; padding: 4px 6px; font-size: 12px; background: #1a1a1a; border-color: #333; }

/* preview, crop, products */
.ev-pv { width: min(1180px, 96vw); height: 92vh; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.ev-pv-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.ev-pv-head h2 { margin: 0; font-size: 16px; }
.ev-pv-head input[type=search] { width: 260px; }
.ev-pv-body { flex: 1; display: flex; min-height: 0; }
.ev-pv-side { width: 290px; flex: none; border-right: 1px solid var(--line); padding: 16px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
.ev-pv-res { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.ev-pv-pick { display: flex; flex-direction: column; text-align: left; gap: 2px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--fg); font: inherit; font-size: 13px; cursor: pointer; overflow-wrap: anywhere; }
.ev-pv-pick small { color: var(--muted); font-size: 11.5px; }
.ev-pv-pick.on { border-color: var(--accent-hi); background: var(--accent-soft); }
.ev-pv-frame { flex: 1; background: #e4e4e7; display: flex; justify-content: center; overflow: auto; padding: 16px; }
.ev-pv-frame iframe { width: 100%; max-width: 760px; height: 100%; border: 0; background: #fff; border-radius: 6px; }
.ev-pv-frame.mobile iframe { width: 390px; border-radius: 28px; border: 10px solid #111; }
.ev-link { display: block; font-size: 11.5px; overflow-wrap: anywhere; cursor: pointer; }
.ev-cropm { width: min(900px, 96vw); padding: 0; overflow: hidden; }
.ev-crop-body { padding: 20px; background: #0b0b0b; display: flex; justify-content: center; }
.ev-crop-wrap { position: relative; display: inline-block; user-select: none; touch-action: none; cursor: crosshair; }
.ev-crop-wrap img { display: block; max-width: 100%; max-height: 62vh; }
.ev-crop-box { position: absolute; border: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(0,0,0,.55); cursor: move; }
.ev-crop-box i { position: absolute; width: 14px; height: 14px; background: #fff; border-radius: 3px; }
.ev-crop-box i[data-h=nw] { left: -8px; top: -8px; cursor: nwse-resize; } .ev-crop-box i[data-h=ne] { right: -8px; top: -8px; cursor: nesw-resize; }
.ev-crop-box i[data-h=sw] { left: -8px; bottom: -8px; cursor: nesw-resize; } .ev-crop-box i[data-h=se] { right: -8px; bottom: -8px; cursor: nwse-resize; }
.ev-crop-foot { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); }
.ev-prodm { width: min(900px, 96vw); max-height: 86vh; padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.ev-prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; padding: 16px; overflow-y: auto; }
.ev-prod-card { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 8px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--fg); font: inherit; font-size: 13px; cursor: pointer; }
.ev-prod-card img, .ev-prod-card .ev-prod-img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
.ev-prod-card small { color: var(--muted); }
.ev-prod-card.picked { border-color: var(--good); box-shadow: inset 0 0 0 1px var(--good); }
.ev-cropm, .ev-prodm { height: auto; min-height: 0; }
.ev-pv, .ev-cropm, .ev-prodm { inset: auto; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.ev-pv { max-height: 92vh; }

/* ----- list and segment pages ----- */
.ad-actions { align-items: center; }
details.dd { position: relative; }
details.dd > summary { list-style: none; }
details.dd > summary::-webkit-details-marker { display: none; }
details.dd .caret { font-size: 10px; margin-left: 4px; color: var(--muted); }
.dd-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 250px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 6px; box-shadow: 0 12px 32px rgba(0,0,0,.5); display: flex; flex-direction: column; }
.dd-menu a, .dd-menu button { display: block; text-align: left; padding: 8px 10px; border-radius: 6px; color: var(--fg); text-decoration: none; font-size: 13.5px; width: 100%; }
.dd-menu a:hover, .dd-menu button:hover { background: rgba(255,255,255,.06); }
.dd-menu .danger { color: var(--bad); }
.dd-menu hr { border: 0; border-top: 1px solid var(--line-2); margin: 6px 0; }
.ad-tabs { margin: 4px 0 18px; }
.tab-n { font-family: var(--f-mono); font-size: 11px; color: var(--muted); margin-left: 4px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 1px 7px; }
.ad-range { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.ad-range .tabs { border-bottom: 0; }
.kpi .d .up { color: var(--good); }
.kpi .d .down { color: var(--bad); }
.chart .b-add { fill: #22c55e; }
.chart .b-drop { fill: #ef4444; }
.chart .gl.zero { stroke: rgba(255,255,255,.25); }
.sw.add { background: #22c55e; }
.sw.drop { background: #ef4444; }
.eg-bar { display: flex; gap: 2px; height: 28px; border-radius: 6px; overflow: hidden; min-width: 0 !important; margin: 6px 0 4px; }
.eg-bar span { height: 100%; min-width: 3px; }
.eg-1 { background: #60a5fa; } .eg-2 { background: #3b82f6; } .eg-3 { background: #1e4fae; } .eg-4 { background: #52525b; } .eg-5 { background: #2e2e2e; }
.eg-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.eg-legend > div { display: grid; grid-template-columns: 12px 1fr auto; column-gap: 8px; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.eg-legend .sw { width: 12px; height: 12px; }
.eg-legend .muted { grid-column: 2 / 4; }
.ad-settings .f > span { font-family: var(--f-mono); font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.ad-settings div.f { display: flex; flex-direction: column; gap: 6px; }
.ad-settings .row input { flex: 1; }
.ad-modal { width: min(460px, 92vw) !important; top: 14vh !important; }
.ad-modal-body { padding: 16px 20px 20px; gap: 12px; }
.ad-supp { max-height: 46vh; overflow: auto; }
@media (max-width: 700px) { .ad-actions { flex-wrap: wrap; } .dd-menu { left: 0; right: auto; } }
.ad-details { max-height: 420px; overflow-y: auto; }

/* ----- list clean-up ----- */
.cu-grid { display: grid; gap: 10px; }
.cu-item { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.cu-item p { margin: 2px 0 0; }
.cu-n { display: flex; flex-direction: column; align-items: flex-end; }
.cu-n .num { font-size: 18px; font-weight: 600; }
.cu-h { font-size: 13px; margin: 6px 0 0; color: var(--muted); font-weight: 500; }
.cu-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cu-sum > div { display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.cu-sum .num { font-size: 20px; font-weight: 600; }
.cu-sum .cu-final { border-color: var(--bad-edge); background: var(--bad-soft); }
@media (max-width: 700px) { .cu-item { grid-template-columns: 1fr; } .cu-n { align-items: flex-start; } }

/* ----- import contacts ----- */
.im-steps { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.im-steps span { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); font-size: 13px; }
.im-steps b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-size: 11px; font-family: var(--f-mono); }
.im-steps .on { color: var(--fg); border-color: var(--accent-edge); }
.im-steps .on b { background: var(--accent); color: #fff; }
.im-steps .done b { background: var(--good-soft); color: var(--good); }
.im-drop { cursor: pointer; margin: 0; }
.im-map select { min-width: 200px; }
.im-key { margin-top: 6px; }
.im-mode { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 12px; cursor: pointer; }
.im-mode input { width: auto; margin-top: 4px; }
.im-mode > span { display: flex; flex-direction: column; gap: 2px; }
.im-mode.on { border-color: var(--accent-hi); background: var(--accent-soft); }
.seg-tools { display: inline-flex; gap: 2px; margin-left: 6px; min-width: 112px; justify-content: flex-end; }
.seg-tools .icon-btn { color: var(--muted); }
.seg-tools .icon-btn:hover { color: var(--fg); }
.seg-draft { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-color: var(--accent-edge); background: var(--accent-soft); padding: 12px 16px; margin-bottom: 12px; }

/* ----- flows: multi-path splits, A/B, manual review, previewing a person ----- */
.fl-branches.multi { grid-template-columns: repeat(var(--n), minmax(300px, 1fr)); }
.fl-branches.multi::before { left: calc(50% / var(--n) - 8px); right: calc(50% / var(--n) - 8px); }
.fl-path { font-family: var(--f-mono); font-size: 10px; letter-spacing: .06em; padding: 2px 8px; border-radius: 99px; color: var(--accent-hi); background: var(--accent-soft); max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fp-path { border: 1px solid var(--line-2); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.fp-path .row input:not([type=number]) { flex: 1; }
.fl-wait.held { color: var(--accent-hi); background: var(--accent-soft); border-color: var(--accent-edge); }
.fp-ab { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 1px dashed var(--line-2); border-radius: 10px; padding: 10px 12px; }
.fp-ab.on { flex-direction: column; align-items: stretch; border-style: solid; border-color: var(--accent-edge); }
.fp-abstats { display: flex; flex-direction: column; gap: 6px; }
.fp-abrow { display: grid; grid-template-columns: 20px 1fr 1fr 1fr auto; gap: 8px; align-items: center; font-size: 12.5px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }
.fl-node.sim-on { border-color: var(--good); box-shadow: 0 0 0 3px var(--good-soft); }
.fl-node.sim-skip { border-color: var(--warn); border-style: dashed; }
.fl-node.sim-off { opacity: .35; }
.fl-sim { position: fixed; left: 24px; bottom: 24px; z-index: 20; width: 340px; max-height: 60vh; overflow: auto; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; box-shadow: 0 12px 32px rgba(0,0,0,.5); display: flex; flex-direction: column; gap: 8px; }
.sim-step { display: grid; grid-template-columns: 22px 1fr; gap: 8px; font-size: 13px; }
.sim-i { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; background: var(--good-soft); color: var(--good); }
.sim-step.skip .sim-i, .sim-step.wait .sim-i { background: var(--warn-soft); color: var(--warn); }
.sim-step.stop .sim-i { background: var(--bad-soft); color: var(--bad); }
.sim-res { display: flex; flex-direction: column; gap: 4px; max-height: 320px; overflow: auto; }
.sim-row { display: flex; flex-direction: column; text-align: left; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); }
.sim-row:hover { border-color: var(--accent-edge); background: var(--accent-soft); }
.fl-tags { display: flex; gap: 4px; margin-top: 2px; } .fl-tags .pill { font-size: 9px; padding: 1px 6px; }

/* ----- reporting ----- */
.tl-head { justify-content: space-between; align-items: center; }
.tl-head .tabs { border-bottom: 0; }
.dv-score { display: flex; gap: 22px; align-items: flex-start; }
.dv-score-n { flex: none; width: 110px; height: 110px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 6px solid var(--line-2); }
.dv-score-n .num { font-size: 34px; font-weight: 700; line-height: 1; }
.dv-score-n .small { color: var(--muted); font-size: 11px; }
.dv-score-n.good { border-color: var(--good); } .dv-score-n.warn { border-color: var(--warn); } .dv-score-n.bad { border-color: var(--bad); }
.dv-score-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.dv-fix { display: grid; grid-template-columns: 110px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.dv-fix .pill { justify-self: start; }
@media (max-width: 700px) { .dv-score { flex-direction: column; } .dv-fix { grid-template-columns: 1fr; } }
.hc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.hc { display: flex; flex-direction: column; gap: 4px; }
.hc .l { font-family: var(--f-mono); font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.hc .v { font-size: 24px; font-weight: 600; }
.hc .d { font-size: 12px; color: var(--muted); }
.hc-tools { display: inline-flex; gap: 2px; opacity: .5; } .hc:hover .hc-tools { opacity: 1; }
.hc-bars { display: flex; align-items: flex-end; gap: 2px; height: 40px; margin-top: 8px; }
.hc-bars span { flex: 1; background: #3b82f6; border-radius: 2px 2px 0 0; min-width: 2px; }
.bad-t { color: var(--bad); }

/* ----- forms: new blocks and publish checks ----- */
.fm-seg { display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px solid var(--line-2); border-radius: 10px; }
.warn-btn { border-color: var(--warn-edge); color: var(--warn); background: var(--warn-soft); }
.fm-probs .dd-menu { min-width: 320px; gap: 6px; padding: 12px; font-size: 13px; }
.fm-probs { margin-right: 8px; }

/* ----- AI helpers and approval ----- */
.ai-btn { border-color: rgba(167,139,250,.35); color: #c4b5fd; }
.ai-btn:hover { background: rgba(167,139,250,.1); }
.ai-out { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow: auto; }
.ai-pick { display: flex; flex-direction: column; text-align: left; gap: 2px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; }
.ai-pick:hover { border-color: rgba(167,139,250,.5); background: rgba(167,139,250,.08); }
.ai-seg { border-color: rgba(167,139,250,.3); margin-bottom: 12px; }
.ap-note { background: var(--bg); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; }
.ap-grid { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 16px; align-items: start; }
.ap-preview { padding: 0; overflow: hidden; }
.ap-preview iframe { width: 100%; height: 80vh; border: 0; background: #fff; display: block; }
.ap-banner { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; border-color: var(--warn-edge); background: var(--warn-soft); margin-bottom: 16px; }
@media (max-width: 800px) { .ap-grid { grid-template-columns: 1fr; } }

/* ----- system status ----- */
.sys { margin-top: 16px; }
.sys-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.sys-w { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.sys-w .dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; flex: none; background: var(--good); }
.sys-w.bad .dot { background: var(--warn); }

/* ----- launch checklist ----- */
.launch-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; margin-bottom: 16px; }
.lc { display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.lc:first-of-type { border-top: 0; }
.lc-i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--warn-soft); color: var(--warn); }
.lc.ok .lc-i { background: var(--good-soft); color: var(--good); }
.lc.must .lc-i { background: var(--bad-soft); color: var(--bad); }

/* ----- flow builder, Klaviyo layout: Actions or details on the left, roomy canvas on the right ----- */
.fl .fl-main { grid-template-columns: 400px minmax(0, 1fr); }
.fl .fl-panel { border-left: 0; border-right: 1px solid var(--line); }
.fl-stage { position: relative; min-width: 0; }
.fl .fl-canvas { padding: 40px 40px 120px; }
.fl-zoom { min-width: max-content; }
.fl-tree { gap: 0; }
.fp-head { display: flex; align-items: center; gap: 10px; font-size: 16px; padding: 18px 22px; }
.fp-head .fp-x { order: 9; margin-left: auto; }
.fp-body { padding: 20px 22px 48px; gap: 18px; }
.fp-body label.f { gap: 8px; }
.fp-body select, .fp-body input:not([type=checkbox]):not([type=radio]) { padding: 11px 12px; }
.fp-body .cond { padding: 14px; gap: 10px; }
.fp-body .cond-body { gap: 10px; row-gap: 10px; }

/* Actions panel */
.fp-palette { gap: 4px; }
.pal-g { font-size: 12.5px; color: var(--muted); margin: 14px 0 4px; }
.pal-i { display: flex; align-items: center; gap: 12px; padding: 10px 10px; border-radius: 10px; cursor: grab; user-select: none; border: 1px solid transparent; }
.pal-i:hover { background: var(--surface-2); border-color: var(--line-2); }
.pal-i:active { cursor: grabbing; }
.pal-ic, .fc-ic { width: 30px; height: 30px; flex: none; border-radius: 8px; display: grid; place-items: center; }
.pal-ic .ico, .fc-ic .ico { width: 16px; height: 16px; }
.pal-ic.email, .fc-ic.email { background: var(--accent-soft); color: var(--accent-hi); }
.pal-ic.action, .fc-ic.action { background: rgba(234,179,8,.12); color: var(--warn); }
.pal-ic.logic, .fc-ic.split, .fc-ic.delay { background: rgba(167,139,250,.12); color: var(--violet); }
.fc-ic.trigger { background: var(--good-soft); color: var(--good); }
.pal-grip { color: var(--muted-2); letter-spacing: -2px; }

/* step cards */
.fc-slot { position: relative; display: flex; flex-direction: column; align-items: flex-start; }
.fc { position: relative; width: 340px; padding: 16px 16px 14px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; color: var(--fg); box-shadow: 0 6px 20px rgba(0,0,0,.35); cursor: pointer; display: flex; flex-direction: column; gap: 8px; transition: border-color .15s, box-shadow .15s; }
.fc:hover { border-color: #474747; }
.fc.sel { border: 2px solid var(--accent-hi); padding: 15px 15px 13px; box-shadow: 0 0 0 4px var(--accent-soft); }
.fc[draggable="true"] { cursor: grab; }
.fc-h { display: flex; align-items: center; gap: 10px; }
.fc-h b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-sub { font-size: 14px; color: #d4d4d8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-more { width: 28px; height: 28px; border-radius: 6px; color: var(--muted); font-size: 18px; line-height: 1; flex: none; }
.fc-more:hover { background: var(--surface-2); color: var(--fg); }
.fc-menu { position: absolute; top: 46px; right: 10px; z-index: 30; min-width: 180px; padding: 6px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.5); display: flex; flex-direction: column; cursor: default; }
.fc-menu button { text-align: left; padding: 9px 10px; border-radius: 6px; font-size: 14px; }
.fc-menu button:hover { background: var(--surface); }
.fc-menu .danger { color: var(--bad); }
.fc-stats { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.fc-stats > div { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.fc-stats > div span:first-child { color: #d4d4d8; }
.fc-stats hr { border: 0; border-top: 1px solid var(--line-2); margin: 2px 0; }
.fc-foot { display: flex; justify-content: flex-end; }
.fc-status { width: auto !important; padding: 5px 28px 5px 10px !important; font-size: 13px; border-radius: 8px; }
.fc-status.live { color: var(--good); }
.fc-status.manual { color: var(--warn); }
.fc-day { margin-top: 6px; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.fc-day .ico { width: 13px; height: 13px; }
.fc-delay { width: 240px; align-self: center; }
.fc-slot:has(.fc-delay) { align-items: center; }
.fl .fl-line { height: 22px; }
.fl .fl-add { width: 30px; height: 30px; font-size: 16px; }
.fl .fl-branches { column-gap: 72px; padding-top: 20px; }
.fl .fl-branch { min-width: 340px; }
.fl-yes, .fl-no { font-family: var(--f-body); font-size: 12.5px; letter-spacing: 0; padding: 3px 12px; }
.fl-yes { color: #fff; background: var(--accent); }
.fl-no { color: #fff; background: #3f3f46; }
.fl .fl-end { margin-top: 4px; }

/* dragging */
body.fl-dragging .fl-add-wrap .fl-add { width: 40px; height: 40px; border: 2px dashed var(--accent-hi); color: var(--accent-hi); background: var(--accent-soft); }
body.fl-dragging .fl-add-wrap.over .fl-add { background: var(--accent); color: #fff; border-style: solid; transform: scale(1.15); }
.fc.dragging { opacity: .4; }

/* canvas controls */
.fl-days { position: absolute; top: 14px; right: 18px; width: auto; z-index: 5; background: var(--surface); }
.fl-zoomctl { position: absolute; right: 18px; bottom: 18px; z-index: 5; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.fl-zoomctl button { width: 46px; height: 36px; font-size: 16px; color: var(--fg); }
.fl-zoomctl button:hover { background: var(--surface-2); }
.fl-zoomctl #fl-zoom-pct { font-size: 12px; font-family: var(--f-body); color: var(--muted); height: 28px; }
.fl-zoomctl .fl-fit { font-size: 13px; font-weight: 600; border-top: 1px solid var(--line-2); }
/* The flow builder fills the window exactly: banners on top, then panel and canvas share what is left. */
.wz.fl { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
.fl .fl-main { flex: 1; min-height: 0; grid-template-rows: minmax(0, 1fr); }
.fl .fl-stage { min-height: 0; }
.fl .fl-canvas, .fl .fl-panel { height: 100%; min-height: 0; }
.fl-stat-btn.on { color: var(--accent-hi); border-color: var(--accent-edge); background: var(--accent-soft); }

/* email details panel */
.ed-details { gap: 16px; }
.ed-row2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; }
.ed-sec { display: flex; flex-direction: column; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.ed-sec-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.kv2 { display: grid; grid-template-columns: 150px 1fr; gap: 12px; font-size: 14px; }
.kv2 span:first-child { color: var(--muted); }
.kv2 span:last-child { overflow-wrap: anywhere; }
.check-row.tall { align-items: flex-start; gap: 10px; }
.check-row.tall input { margin-top: 3px; }
.check-row.tall > span { display: flex; flex-direction: column; gap: 2px; }
.dark-btn { background: #f0f0f0; color: #111; border-color: #f0f0f0; font-weight: 600; }
.dark-btn:hover { background: #fff; }
.fp-thumb.mobile iframe { --s: .75; width: 375px; left: 50%; margin-left: -140px; }
.del-paths { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.del-path { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 10px; cursor: pointer; }
.del-path input { width: auto; }
.del-path:has(input:checked) { border-color: var(--bad-edge); background: var(--bad-soft); }
@media (max-width: 900px) { .fl .fl-main { grid-template-columns: 1fr; } .fl .fl-panel { max-height: 45vh; } }
.fl .fp-thumb { height: 420px; } .fl .fp-thumb iframe { height: 700px; }
.fc-delay { width: auto; min-width: 240px; max-width: 340px; }
.fc-delay .fc-h b { white-space: normal; }
.fc-menu button { display: flex; gap: 10px; align-items: center; }

/* ----- copying flows from Klaviyo ----- */
.kf-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
@media (max-width: 900px) { .kf-layout { grid-template-columns: 1fr; } }
.kf-list { padding: 0; overflow: hidden; }
.kf-list-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.kf-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto 110px; gap: 14px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); cursor: pointer; }
.kf-row:hover { background: var(--accent-soft); }
.kf-row.on { background: var(--accent-soft); }
.kf-row input { width: 18px; height: 18px; margin: 0; }
.kf-name { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.kf-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kf-done { text-align: right; }
.kf-arch summary { padding: 14px 20px; cursor: pointer; color: var(--muted); }
.kf-side { position: sticky; top: 16px; gap: 14px; }
.kf-side hr { border: 0; border-top: 1px solid var(--line); margin: 2px 0; width: 100%; }
.kf-results { gap: 10px; }
.kf-res { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.kf-res.ok .lc-i { background: var(--good-soft); color: var(--good); }
.kf-res.bad .lc-i { background: var(--bad-soft); color: var(--bad); }
.kf-res .lc-i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.fl-notes { display: flex; gap: 10px; align-items: center; padding: 9px 20px; background: var(--accent-soft); border-bottom: 1px solid var(--accent-edge); font-size: 13.5px; }
.fl-notes .ico { width: 18px; height: 18px; color: var(--warn); flex: none; }
.fl-notes span { flex: 1; }
.fc-note { position: absolute; top: -9px; right: -9px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--warn); color: #111; font-size: 12px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 3px var(--bg); }
.fp-notes { margin: 0 20px 4px; padding: 12px 14px; border: 1px solid var(--warn-edge); background: var(--warn-soft); border-radius: 10px; display: flex; flex-direction: column; gap: 10px; }
.fp-notes > b { display: flex; gap: 8px; align-items: center; font-size: 13.5px; }
.fp-notes .ico { width: 16px; height: 16px; color: var(--warn); }
.fp-note { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; font-size: 13.5px; line-height: 1.45; }
.fp-note .btn { flex: none; }
.kf-ng { display: flex; flex-direction: column; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.kf-ng-h { font-size: 14px; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent-hi); font: inherit; font-weight: 600; cursor: pointer; text-align: left; }
.linkish:hover { text-decoration: underline; }
.cond-group { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.cond-group .cond { background: var(--surface); }
.cond-join { font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--muted); padding-left: 6px; }
.btn.disabled { pointer-events: none; opacity: .5; }
.kf-side input[type=checkbox] { width: 18px; height: 18px; flex: none; }
@media (max-width: 900px) {
  .wz.fl { height: auto; overflow: visible; }
  .fl .fl-main { grid-template-rows: auto; display: flex; flex-direction: column-reverse; }
  .fl .fl-canvas { height: 70vh; height: 70dvh; }
  .fl .fl-panel { height: auto; max-height: none; border-right: 0; border-top: 1px solid var(--line); }
}

/* ----- friendly empty / error state ----- */
.card.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 48px 32px; max-width: 720px; }
.card.empty-state > h2, .card.empty-state > h2:first-child { margin: 0; padding: 0; border: 0; background: none; font-size: 20px; font-weight: 600; display: block; letter-spacing: -.01em; }
.card.empty-state > h2:first-child::before { content: none; }
.card.empty-state p { margin: 0; color: #c4c4c4; max-width: 520px; line-height: 1.6; font-size: 15px; }
.card.empty-state p.small { font-size: 13px; color: var(--muted); }
.es-ic { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-hi); border: 1px solid var(--accent-edge); }
.es-ic .ico { width: 24px; height: 24px; }
.es-steps { text-align: left; margin: 4px 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; color: var(--fg); font-size: 15px; line-height: 1.5; max-width: 520px; }
.es-actions { justify-content: center; margin-top: 6px; }

/* ----- phones: top bar, slide-in menu, no sideways scrolling ----- */
html { background: var(--bg); }
.mtop, .nav-scrim, .side-x, .m-notice { display: none; }
.ph > div { min-width: 0; }
.ph h1, .ph p, .card h2, .card h3 { overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .shell { display: block; background: var(--bg); }
  .mtop { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 40; min-height: 56px; padding: env(safe-area-inset-top, 0px) 16px 0; background: var(--side); border-bottom: 1px solid var(--line); }
  .mtop .brand .mark { width: 26px; }
  .mtop .brand .wm { font-size: 15px; }
  .mtop-ws { margin-left: auto; color: var(--muted); font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .mtop-btn { width: 40px; height: 40px; margin-left: -8px; border-radius: 10px; display: grid; place-items: center; color: var(--fg); flex: none; }
  .mtop-btn:hover { background: var(--surface); }
  .mtop-btn .ico { width: 22px; height: 22px; }
  .side { position: fixed; top: 0; left: 0; bottom: 0; z-index: 70; width: min(300px, 86vw); height: 100vh; height: 100dvh; border-right: 1px solid var(--line); border-bottom: 0; transform: translateX(-105%); transition: transform .22s ease; padding-top: max(20px, env(safe-area-inset-top, 0px)); }
  body.nav-open .side { transform: none; box-shadow: 20px 0 60px rgba(0,0,0,.6); }
  body.nav-open .nav-scrim { display: block; position: fixed; inset: 0; z-index: 65; background: rgba(0,0,0,.6); }
  body.nav-open { overflow: hidden; }
  .side-x { display: grid; place-items: center; position: absolute; top: max(16px, env(safe-area-inset-top, 0px)); right: 12px; width: 36px; height: 36px; border-radius: 8px; color: var(--muted); font-size: 16px; }
  .side-x:hover { background: var(--surface); color: var(--fg); }
  .acct-menu { position: absolute; box-shadow: 0 12px 40px rgba(0,0,0,.6); margin-top: 0; }
  .main { padding: 20px 16px 48px; }
  .wrap { gap: 16px; }
  .ph { align-items: flex-start; }
  .ph h1 { font-size: 1.6rem; }
  /* Charts and wide tables scroll inside their own box, never the page. */
  .chart { min-width: 0 !important; }
  .chart-card .chart { min-width: 0 !important; }
  .table-card { overflow-x: auto; }
  .card { overflow-wrap: anywhere; }
  td { overflow-wrap: normal; }
  .grid.g4 { grid-template-columns: 1fr 1fr; }
  .filters input[type=search] { max-width: none; }
  /* Big editors: say so, and keep Save / Publish within reach. */
  .m-notice { display: flex; gap: 10px; align-items: center; padding: 10px 16px; background: var(--accent-soft); border-bottom: 1px solid var(--accent-edge); font-size: 13.5px; line-height: 1.4; color: var(--fg); }
  .m-notice .ico { width: 18px; height: 18px; color: var(--accent-hi); }
  .ev-top, .ed-top { height: auto; flex-wrap: wrap; padding: 8px 12px; row-gap: 8px; }
  .ev-name { max-width: calc(100vw - 120px); }
  .ev-top .sp, .ed-top .sp { flex-basis: 100%; height: 0; }
  .ev-main { flex-direction: column; }
  .ev-rail { display: none; }
  .ev-stage { min-height: 55vh; }
  .ev-panel { width: 100%; order: 2; border-right: 0; border-top: 1px solid var(--line); max-height: 40vh; }
  .ed { height: auto; min-height: 100vh; }
  .ed-top .fl-name { flex: 1; max-width: none; }
  .fm-stage-wrap { padding: 14px; }
  .fl .wz-top { display: flex; flex-wrap: wrap; padding: 10px 12px; }
  .fl .wz-crumb { flex-basis: 100%; flex-wrap: wrap; }
  .fl .wz-actions { justify-content: flex-start; }
  .wz-top { padding: 10px 12px; }
  .wz-actions { flex-wrap: wrap; }
}
.ms-box { cursor: pointer; }
.ms-box .ms-chev { width: 16px; height: 16px; color: var(--muted); flex: none; margin-right: 2px; }
.ms-box .chip { white-space: normal; }

/* Source tag for lists and segments copied from Klaviyo */
.src-tag { display: inline-flex; align-items: center; vertical-align: 2px; margin-left: 6px; padding: 1px 8px; border-radius: 99px; font: 500 11px/1.6 var(--f-body); letter-spacing: 0; text-transform: none; color: #c4b5fd; background: rgba(167,139,250,.12); border: 1px solid rgba(167,139,250,.28); white-space: nowrap; }
h1 .src-tag { font-size: 13px; vertical-align: 6px; padding: 2px 10px; }
.li-ico.all { background: var(--accent-soft); color: var(--accent-hi); }
.li-ico .ico, .ms-item .li-ico .ico { width: 14px; height: 14px; }
.filter-chip { align-self: center; padding: 6px 6px 6px 12px; font-size: 13px; border-radius: 99px; }

/* ----- page header: buttons line up with the title row; one breadcrumb style ----- */
.ph-eyebrow { margin-bottom: -6px; }
.ph { align-items: flex-start; }
.ph > div:last-child:not(:first-child), .ph > .btn:last-child, .ph > a.btn:last-child { margin-top: 2px; }
.ph:has(> div:first-child > .crumb) > :last-child:not(:first-child) { margin-top: 28px; }
.ph > .row { flex-wrap: wrap; justify-content: flex-end; }
.crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); margin: 0 0 8px; line-height: 20px; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--fg); text-decoration: underline; }
.crumb span { color: var(--muted-2); }

/* ===== Typography calm-down: labels and helper text in Archivo, sentence case, readable sizes.
   DM Mono stays only for code-like values (code, .copy, pixel snippets) and small numeric stats (.num). ===== */
:root { --label: #d6d6d6; --help: #a8a8a8; }
.small { font-size: 13px; }
textarea { font-family: var(--f-body); font-size: 14px; line-height: 1.5; }
textarea[name=html], textarea.code, label.f textarea[name=html] { font-family: var(--f-mono); font-size: 12.5px; }
label.f textarea { font-family: var(--f-body); font-size: 14px; }
label.f { font-family: var(--f-body); font-size: 14px; font-weight: 500; color: var(--label); text-transform: none; letter-spacing: normal; gap: 8px; }
label.f .h { font-size: 13px; font-weight: 400; color: var(--help); }
.f-static .lbl, .preview-bar .lbl, .add-row .lbl, .ad-settings .f > span { font-family: var(--f-body); font-size: 14px; font-weight: 500; color: var(--label); text-transform: none; letter-spacing: normal; }
.hint, .ev-hint { font-family: var(--f-body); font-size: 13px; color: var(--help); }
.ev-help, .ev-f, .ev-l { color: var(--help); }
.ev-f { font-size: 13px; }
th { font-family: var(--f-body); font-size: 12.5px; font-weight: 500; text-transform: none; letter-spacing: normal; color: var(--muted); }
.kpi .l, .mini .l, .hc .l { font-family: var(--f-body); font-size: 13px; font-weight: 500; text-transform: none; letter-spacing: normal; color: var(--muted); }
.kpi .d { font-size: 13px; color: var(--muted); }
.pill { font-family: var(--f-body); font-size: 12px; font-weight: 500; text-transform: none; letter-spacing: normal; padding: 3px 10px; }
.eyebrow { font-family: var(--f-body); font-size: 13px; font-weight: 500; letter-spacing: .01em; text-transform: none; }
.cal-wd, .acct-email, .fl-end, .fl-when, .fl-path, .fl-wait, .seg-join, .ev-and, .cond-join, .step-n { font-family: var(--f-body); text-transform: none; letter-spacing: normal; }
.cal-wd { font-size: 12.5px; font-weight: 500; }
.fl-end { font-size: 12px; }
.fl-when { font-size: 12.5px; }
.fl-path, .fl-wait { font-size: 12px; }
.seg-join, .ev-and, .cond-join { font-size: 12px; font-weight: 600; }
.acct-email { font-size: 12.5px; }
.muted.small, p.muted.small { color: var(--help); }
.fp-stats span, .ev-radio small, .ev-pv-pick small { color: var(--help); font-size: 12.5px; }
.tab-n { font-family: var(--f-body); font-size: 12px; }

/* ----- "..." row menus (campaign list, templates) ----- */
.rm { position: relative; display: inline-flex; }
.rm-btn { display: inline-grid; place-items: center; font-size: 20px; letter-spacing: 1px; width: 34px; height: 34px; border-radius: 8px; }
.rm-btn.on { background: var(--surface-2); color: var(--fg); }
.rm-menu { position: fixed; top: 0; left: 0; right: auto; min-width: 170px; z-index: 90; text-align: left; }
.rm-menu a, .rm-menu button { display: flex; width: 100%; text-align: left; padding: 9px 12px; border-radius: 6px; font-size: 14px; color: var(--fg); text-decoration: none; }
.rm-menu a:hover, .rm-menu button:hover { background: var(--surface); }
.rm-menu .danger { color: var(--bad); }
.row-acts { opacity: 1; width: 48px; }
.row-acts .rm-btn { color: var(--muted-2); }
tr:hover .row-acts .rm-btn, .row-acts .rm-btn.on { color: var(--fg); }
.tpl-foot { display: flex; align-items: flex-start; gap: 8px; }
.tpl-foot .tpl-info { flex: 1; min-width: 0; }
.tpl-foot .tpl-info b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpl-item .thumb iframe { --s: .34; left: 50%; transform: translateX(-50%) scale(var(--s)); transform-origin: 50% 0; }

/* ----- polish ----- */
.merge-chip { display: inline-flex; align-items: baseline; gap: 4px; padding: 0 7px; margin: 0 1px; border-radius: 6px; background: var(--accent-soft); border: 1px solid var(--accent-edge); color: var(--accent-hi); font-size: .92em; font-weight: 500; white-space: nowrap; }
.merge-chip i { font-style: normal; color: var(--muted); font-weight: 400; }
.c-date { white-space: nowrap; }
.lc-t { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 2px; }
.lc { padding: 14px 0; gap: 14px; }
.lc-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.hc-empty { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 32px; }
/* Radios and checkboxes: one size everywhere, never squeezed by long text. */
label.opt input[type=radio], label.opt input[type=checkbox], .choice input[type=radio] { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); }
#send-drawer .f-static { gap: 8px; }
#send-drawer .f-static label.opt { padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 10px; align-items: flex-start; }
#send-drawer .f-static label.opt:has(input:checked) { border-color: var(--accent-hi); background: var(--accent-soft); }
#send-drawer .f-static label.opt > span > .muted.small { display: block; margin-top: 2px; line-height: 1.5; }
#send-drawer .choice { align-items: flex-start; }
/* Form editor block palette: line icons, labels on one line */
.fm .palette .pal { padding: 12px; gap: 10px; min-width: 0; }
.fm .palette .pal-g { width: 20px; flex: none; display: grid; place-items: center; margin: 0; }
.fm .palette .pal-g .evi { width: 18px; height: 18px; }
.fm .palette .pal-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; font-size: 13.5px; }
label.f .h { margin-top: -4px; }
.card-pad h2 { font-size: 15px; font-weight: 600; margin: 0 0 6px; }

/* ----- client view, billing, team ----- */
.nv-managed { margin: 18px 6px 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; gap: 4px; }
.nv-managed .btn { margin-top: 8px; justify-content: center; }
.view-as { display: flex; gap: 12px; align-items: center; justify-content: center; padding: 10px 20px; background: var(--accent-soft); border-bottom: 1px solid var(--accent-edge); font-size: 14px; }
.ch-approve { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; border-color: var(--accent-edge); background: var(--accent-soft); }
.ch-approve-list { display: flex; gap: 10px; flex-wrap: wrap; }
.cv-row { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); color: var(--fg); text-decoration: none; }
.cv-row:first-of-type { border-top: 0; }
.cv-row > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cv-row > span b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-row .r { align-items: flex-end; text-align: right; flex: none; }
.cv-row:hover b { color: var(--accent-hi); }
.bill-grid { align-items: start; }
.bill-plan { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 17px; }
.bill-lines { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.bill-lines > div { display: flex; justify-content: space-between; padding: 12px 16px; border-top: 1px solid var(--line); }
.bill-lines > div:first-child { border-top: 0; }
.bill-lines .tot { font-weight: 600; background: var(--surface-2); }
.bill-alert { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; border-color: var(--warn-edge); background: var(--warn-soft); margin-bottom: 16px; }
.bill-alert.bad { border-color: var(--bad-edge); background: var(--bad-soft); }
.bill-alert > div { flex: 1; min-width: 240px; line-height: 1.55; }
.bill-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px 20px; }
.bill-admin .row { flex-wrap: wrap; gap: 10px; }
.cv-row { width: 100%; align-self: stretch; text-align: left; }
.cv-row > span:first-child { align-items: flex-start; }
.view-as { margin: 0 0 8px; border-radius: 0 0 12px 12px; }

/* ----- library ----- */
.lib-row { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 14px 0; border-top: 1px solid var(--line); }
.lib-row:first-of-type { border-top: 0; }
.lib-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lib-installs { display: flex; gap: 6px; flex-wrap: wrap; }
.lib-installs .pill { text-decoration: none; }
.lib-acts { display: flex; gap: 8px; align-items: center; flex: none; }
.lib-brands { display: flex; flex-direction: column; gap: 10px; max-height: 320px; overflow: auto; padding: 4px 0; }
.lib-done { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
/* Resend to non-openers */
.resend-aud { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border: 1px solid var(--accent-edge); background: var(--accent-soft); border-radius: 12px; line-height: 1.55; }
.resend-ico { flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--accent); }
.resend-t { font-size: 15.5px; }
.resend-t a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.resend-subj { margin: -4px 0 4px; padding: 12px 14px; border-radius: 10px; background: var(--warn-soft); border: 1px solid var(--warn-edge); font-size: 14px; line-height: 1.55; }
.resend-orig { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--warn-edge); }

/* Campaign report: links */
.links-table .link-row { cursor: pointer; }
.links-table .link-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.links-table .link-row.on td { background: var(--surface-2); }
.links-table .link-cell { max-width: 560px; }
.link-t { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.link-bar { display: block; height: 4px; margin-top: 7px; border-radius: 4px; background: var(--line); overflow: hidden; max-width: 320px; }
.link-bar span { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.link-who > td { background: var(--surface-2); padding: 0 !important; }
.link-who-box { padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 10px; }
.link-who-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; min-width: 0; }
.link-full { overflow-wrap: anywhere; }
.link-who-t { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }

/* Editor: unique coupon codes */
.ev-coupon-tag { margin-top: 6px; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; opacity: .7; }
@media (max-width: 640px) {
  .link-t { max-width: 38vw; }
  .link-who-box { padding: 12px; }
}

/* Conversion metric picker (Campaigns and Flows) */
.metric-pick { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); border-radius: 10px; padding: 0 4px 0 10px; background: var(--bg); }
.metric-pick .ico { width: 14px; height: 14px; color: #22c55e; flex: none; }
.metric-pick select { border: 0; background: transparent; padding-left: 0; width: auto; max-width: 220px; }
.filters .metric-pick.sp-r { margin-left: auto; }
@media (max-width: 700px) { .filters .metric-pick.sp-r { margin-left: 0; } }

/* Login extras */
.auth { align-content: center; gap: 14px; }
.auth-link { font-size: 14px; text-align: center; color: var(--muted, #a1a1aa); }
.auth-link:hover { color: var(--fg); }
.auth-foot { margin: 0; font-size: 12px; color: var(--muted, #71717a); text-align: center; letter-spacing: .02em; }

/* ----- Phones: tables become stacked cards, so no column is ever cut off ----- */
@media (max-width: 700px) {
  table.ctable, table.ctable tbody { display: block; width: 100%; }
  table.ctable thead { display: none; }
  table.ctable tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; padding: 14px 4px; border-bottom: 1px solid var(--line); position: relative; }
  table.ctable tr:last-child { border-bottom: 0; }
  table.ctable td { display: block; padding: 0; border: 0; min-width: 0 !important; text-align: left !important; white-space: normal !important; overflow-wrap: anywhere; }
  table.ctable td:first-child { grid-column: 1 / -1; padding-right: 40px; }
  table.ctable td[data-l]:not(:first-child)::before { content: attr(data-l); display: block; font-family: var(--f-mono); font-size: 10px; color: var(--muted-2); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 3px; }
  table.ctable td[data-l="Type"], table.ctable td:empty, table.ctable td.na { display: none; }
  table.ctable td.row-acts { position: absolute; top: 8px; right: 0; }
  table.ctable td.row-acts::before { display: none !important; }
  table.ctable tr.ctable-empty td::before { display: none; }
  .tbl-wrap:has(> table.ctable) { overflow-x: visible; }
  .table-card { padding-left: 12px; padding-right: 12px; }
  /* Big numbers never break in the middle. */
  .kpi .v, .perf-v, .an-big, .stat-v { white-space: nowrap; font-size: clamp(20px, 7vw, 30px); }
}

/* ----- Polish ----- */
/* Section numbers on card headings ("01", "02") meant nothing to clients. */
.card > h2:first-child::before { content: none; }
.card > h2:first-child { gap: 8px; }
/* One look for numbers: the body font with even-width digits, never link blue. */
.num { font-family: inherit; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.rate { color: var(--fg); font-weight: 500; }
.kpi:nth-child(2) .v { color: inherit; }
.kpi .v.good { color: var(--good); }
.nodata { color: var(--muted-2); font-weight: 400; font-size: .8em; letter-spacing: 0; }
.chart-empty { display: grid; place-items: center; min-height: 160px; color: var(--muted); font-size: 13.5px; border: 1px dashed var(--line-2); border-radius: 12px; text-align: center; padding: 16px; }
/* Flow canvas zoomed far out: bigger titles, no small print, so the whole flow is still readable. */
.fl-zoom.far .fc-h b { font-size: 30px; white-space: normal; line-height: 1.15; }
.fl-zoom.far .fc-sub { font-size: 24px; white-space: normal; }
.fl-zoom.far .fc-ic { transform: scale(1.8); margin: 0 10px; }
.fl-zoom.far .fc-stats, .fl-zoom.far .fc-more, .fl-zoom.far .fc-note, .fl-zoom.far .fc-day, .fl-zoom.far .fc-foot { display: none; }
.fl-zoom.far .fc-status { font-size: 24px; pointer-events: none; }
.integ { min-height: 150px; }
.integ-top { gap: 12px; justify-content: flex-start; }
.integ-ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line-2); flex: none; }
.integ-ic .ico { width: 20px; height: 20px; color: var(--fg); }
.integ-cta { margin-top: auto; font-size: 13.5px; font-weight: 600; color: var(--accent-hi); }

/* ----- Text-only and HTML email editors ----- */
.split-btn { display: inline-flex; align-items: center; gap: 2px; }
.split-btn .rm-btn { border: 1px solid var(--line-2); border-radius: 8px; width: 30px; height: 30px; }
.te { min-height: 100vh; background: var(--bg); display: flex; flex-direction: column; }
.te-head { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 24px; background: var(--side); border-bottom: 1px solid var(--line); }
.te-back { color: var(--accent-hi); text-decoration: none; font-weight: 500; }
.te-body { width: 100%; max-width: 1100px; margin: 0 auto; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.te-title { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.te-pre { display: flex; flex-direction: column; gap: 6px; }
.te-lbl { font-weight: 600; margin-top: 6px; }
.te-tools { display: flex; flex-direction: column; gap: 8px; position: sticky; top: 58px; z-index: 10; background: var(--bg); padding: 6px 0; }
.te-row { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.te-sel { width: auto !important; padding: 7px 30px 7px 10px !important; font-size: 13.5px; }
#te-font { min-width: 170px; }
.te-size { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 10px; padding: 0 10px 0 0; background: var(--bg); }
.te-size input { width: 64px; border: 0; background: transparent; }
.te-size span { color: var(--muted); font-size: 13px; }
.te-b { min-width: 34px; height: 34px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--fg); font-size: 15px; cursor: pointer; white-space: nowrap; }
.te-b:hover { background: var(--surface-2); border-color: var(--line-2); }
.te-b .ico { width: 17px; height: 17px; }
.te-sep { width: 1px; height: 22px; background: var(--line-2); margin: 0 4px; }
.te-color { position: relative; }
.te-color .te-a { font-weight: 700; border-bottom: 3px solid #e11d48; line-height: 1; padding-bottom: 1px; }
.te-hl .te-a { border-bottom-color: #facc15; background: rgba(250, 204, 21, .25); padding: 0 3px 1px; }
.te-color input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; padding: 0; border: 0; }
.te-m { position: relative; display: inline-flex; }
.te-pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; min-width: 200px; display: flex; flex-direction: column; padding: 6px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.45); }
.te-pop[hidden] { display: none; }
.te-pop > button { text-align: left; padding: 9px 12px; border: 0; background: transparent; color: var(--fg); border-radius: 8px; cursor: pointer; font-size: 14px; }
.te-pop > button:hover { background: var(--surface-2); }
.te-emoji { display: grid; grid-template-columns: repeat(8, 34px); gap: 2px; }
.te-emoji button { width: 34px; height: 34px; border: 0; background: transparent; border-radius: 8px; font-size: 19px; cursor: pointer; }
.te-emoji button:hover { background: var(--surface-2); }
.te-area { min-height: 460px; background: #ffffff; color: #111111; border: 1px solid var(--line-2); border-radius: 12px; padding: 20px 22px; line-height: 1.55; outline: none; overflow-wrap: anywhere; }
.te-area:focus { border-color: var(--accent-hi); box-shadow: 0 0 0 3px var(--accent-soft); }
.te-area p { margin: 0 0 10px; }
.te-area a { color: #1a56db; }
.te-area img { max-width: 100%; height: auto; display: block; margin: 0 0 12px; }
.te-area hr { border: 0; border-top: 1px solid #ddd; margin: 16px 0; }
.te-area blockquote { margin: 0 0 12px; padding-left: 12px; border-left: 3px solid #ddd; color: #555; }
.te-area h1 { font-size: 2em; margin: 0 0 12px; } .te-area h2 { font-size: 1.6em; margin: 0 0 12px; } .te-area h3 { font-size: 1.3em; margin: 0 0 12px; }

.he-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 24px 0; }
.he .te-pre { padding: 12px 24px 0; max-width: 900px; }
.he-main { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 12px 24px 0; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; min-height: 560px; height: calc(100vh - 290px); }
.he-main.he-code { grid-template-columns: 1fr; } .he-main.he-code .he-prev { display: none; }
.he-main.he-preview { grid-template-columns: 1fr; } .he-main.he-preview .he-code { display: none; }
.he-code { display: flex; min-width: 0; background: #ffffff; position: relative; }
.he-gut { margin: 0; padding: 14px 10px 14px 14px; text-align: right; color: #9ca3af; background: #f6f7f9; border-right: 1px solid #e5e7eb; font: 13px/20px ui-monospace, Menlo, monospace; overflow: hidden; user-select: none; min-width: 46px; }
#he-src { flex: 1; border: 0; border-radius: 0; resize: none; padding: 14px; font: 13px/20px ui-monospace, Menlo, monospace; background: #ffffff; color: #1f2937; white-space: pre; overflow: auto; tab-size: 2; height: 100%; }
#he-src:focus { box-shadow: none; }
.he-dark .he-code, .he-dark #he-src { background: #0f1115; color: #e5e7eb; }
.he-dark .he-gut { background: #15181d; color: #4b5563; border-right-color: #23272e; }
.he-prev { background: #e9eaee; border-left: 1px solid var(--line-2); min-width: 0; }
.he-prev iframe { width: 100%; height: 100%; border: 0; background: #ffffff; }
.he-foot { padding: 14px 24px 24px; }
@media (max-width: 900px) {
  .he-main { grid-template-columns: 1fr; height: auto; }
  .he-main.he-split .he-prev { min-height: 420px; border-left: 0; border-top: 1px solid var(--line-2); }
  .he-code { min-height: 420px; }
  .te-body { padding: 16px; } .te-head { padding: 10px 16px; } .he-bar, .he .te-pre { padding-left: 16px; padding-right: 16px; } .he-main { margin: 12px 16px 0; }
  .te-tools { top: 0; position: static; }
}

/* ---------- texting (SMS) ---------- */
.pill.soon { color: var(--violet); background: rgba(167,139,250,.1); border-color: rgba(167,139,250,.3); }
.pill.ch-sms { color: var(--accent-hi); background: var(--accent-soft); border-color: var(--accent-edge); font-size: 11px; padding: 1px 8px; vertical-align: 2px; }
.pill.ch-sms::before { display: none; }
.sms-soon { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: rgba(167,139,250,.06); border: 1px solid rgba(167,139,250,.22); font-size: 13px; color: var(--fg); margin-bottom: 16px; }
.sms-soon .pill { flex: none; margin-top: 1px; }
.fp-body .sms-soon, .wz-main .sms-soon { margin-bottom: 0; }
.sms-hero-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-hi); flex: none; }
.sms-hero-ic .ico { width: 22px; height: 22px; }
.sms-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.sms-step { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.sms-step:first-child { border-top: 0; }
.sms-check { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; font-size: 12px; margin-top: 1px; }
.sms-step.done .sms-check { background: var(--good); border-color: var(--good); color: #000; font-weight: 700; }
.sms-usage { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.sms-usage > div { display: flex; flex-direction: column; gap: 2px; }
.sms-usage b { font-size: 22px; font-weight: 600; }
.sms-usage span { color: var(--muted); font-size: 12.5px; }
.sms-handled { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; color: var(--muted); }
.sms-handled b { color: var(--fg); font-weight: 600; }

.sms-grid { grid-template-columns: minmax(0, 620px) minmax(0, 1fr); }
.sms-ed textarea { font-family: var(--f-body); font-size: 15px; line-height: 1.5; min-height: 150px; border-radius: 12px 12px 0 0; }
.sms-tools { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; border: 1px solid var(--line-2); border-top: 0; border-radius: 0 0 12px 12px; background: var(--surface-2); }
.sms-meta { margin-top: -6px; }
.sms-meta b { color: var(--fg); font-weight: 600; }
.sms-warn { margin-top: 6px; color: var(--warn); }
.est.inline { display: flex; align-items: baseline; gap: 10px; }
.est.inline .est-n { font-size: 28px; }
.est.inline .est-l { margin: 0; }
.rv-list { display: flex; flex-direction: column; gap: 6px; }

/* the phone preview */
.phone { width: 320px; max-width: 100%; border-radius: 36px; border: 1px solid var(--line-2); background: #000; padding: 14px 12px 22px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.8); }
.phone.sm { width: 100%; max-width: 360px; border-radius: 20px; padding: 10px; }
.phone-top { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 0 12px; border-bottom: 1px solid #1c1c1e; }
.phone-av { width: 44px; height: 44px; border-radius: 50%; background: #3a3a3c; display: grid; place-items: center; font-weight: 600; font-size: 18px; color: #fff; }
.phone-top b { font-size: 13px; }
.phone-msgs { min-height: 380px; padding: 14px 4px 0; display: flex; flex-direction: column; gap: 8px; }
.phone.sm .phone-msgs { min-height: 0; padding: 4px; }
.sms-b { max-width: 82%; display: flex; flex-direction: column; gap: 4px; }
.sms-b.in { align-self: flex-start; }
.sms-b.out { align-self: flex-end; align-items: flex-end; }
.sms-bt { padding: 9px 13px; border-radius: 18px; white-space: pre-wrap; word-break: break-word; font-size: 14.5px; line-height: 1.38; }
.sms-b.in .sms-bt { background: #26262a; color: #fff; border-bottom-left-radius: 6px; }
.sms-b.out .sms-bt { background: var(--accent); color: #fff; border-bottom-right-radius: 6px; }
.sms-bt .merge-chip { background: rgba(255,255,255,.12); color: #fff; }
.sms-bimg { max-width: 220px; max-height: 260px; border-radius: 14px; object-fit: cover; display: block; }
.sms-bm { font-size: 11px; color: var(--muted-2); padding: 0 6px; }
.bad-t { color: var(--bad); }

/* the inbox */
.sms-inbox { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; align-items: start; }
.sms-convs { padding: 6px; display: flex; flex-direction: column; max-height: calc(100dvh - 200px); overflow: auto; }
.sms-conv { display: flex; gap: 10px; align-items: center; text-align: left; padding: 10px; border-radius: 10px; width: 100%; }
.sms-conv:hover { background: var(--surface-2); }
.sms-conv.on { background: var(--accent-soft); }
.sms-av { width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line-2); display: grid; place-items: center; font-weight: 600; }
.sms-cv { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sms-cv b, .sms-cv span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sms-cm { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.sms-dot { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; display: grid; place-items: center; }
.sms-thread { padding: 0; display: flex; flex-direction: column; height: calc(100dvh - 200px); min-height: 420px; overflow: hidden; }
.sms-th { display: flex; gap: 10px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.sms-back { display: none; font-size: 22px; }
.sms-msgs { flex: 1; overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.sms-reply { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); align-items: flex-end; }
.sms-reply textarea { min-height: 44px; font-family: var(--f-body); font-size: 14px; flex: 1; }
.sms-reply-off { padding: 12px 16px; margin: 0; border-top: 1px solid var(--line); }
.sms-rep { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }

@media (max-width: 900px) {
  .sms-grid { grid-template-columns: 1fr; }
  .sms-side { align-items: center; width: 100%; }
}
@media (max-width: 700px) {
  .sms-usage { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sms-inbox { grid-template-columns: 1fr; }
  .sms-inbox.has-sel .sms-convs { display: none; }
  .sms-inbox:not(.has-sel) .sms-thread { display: none; }
  .sms-back { display: inline-grid; }
  .sms-thread { height: calc(100dvh - 250px); min-height: 380px; }
  .sms-rep { grid-template-columns: 1fr; }
  .phone { width: 100%; }
  .phone-msgs { min-height: 220px; }
}
.pill.soon, .pill.ch-sms { display: inline-flex; flex-direction: row; width: auto; height: auto; align-self: center; flex: none; }
.sms-soon .pill.soon { align-self: flex-start; }
.sms-hero-t { font-size: 20px; font-weight: 600; }
.sms-hero { padding-top: 22px; }
.sms-nums { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.sms-num { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface-2); }
.sms-num b { font-size: 15px; }
.sms-num .btn { align-self: flex-start; }
.grid.g3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }
@media (max-width: 700px) { .grid.g3 { grid-template-columns: 1fr; } }

/* ---------- A/B tests ---------- */
.pill.accent { color: var(--accent-hi); background: var(--accent-soft); border-color: var(--accent-edge); }
.abx { display: flex; flex-direction: column; gap: 10px; }
.abx.on { }
.abx-empty { padding: 10px 12px; border: 1px dashed var(--line-2); border-radius: 10px; }
.abx-lead { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); flex-wrap: wrap; }
.abx-prob { display: flex; flex-direction: column; gap: 2px; }
.abx-prob b { font-size: 24px; font-weight: 600; line-height: 1.1; }
.abx-verdict { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.abx-rows { display: flex; flex-direction: column; gap: 6px; }
.abx-row { display: grid; grid-template-columns: 26px 1fr 1fr 1fr; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.abx-row.lead { border-color: var(--accent-edge); }
.abx-row span { display: flex; flex-direction: column; min-width: 0; }
.abx-row b { font-size: 13.5px; font-weight: 600; }
.abx-row i { font-style: normal; color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.abx-v { width: 24px; height: 24px; border-radius: 50%; display: inline-grid !important; place-items: center; font-family: var(--f-mono); font-size: 11px; font-weight: 600; color: #fff; flex: none; }
.abx-v.v-a { background: #3b82f6; }
.abx-v.v-b { background: #d97706; }
.abx-more summary { cursor: pointer; color: var(--accent-hi); font-size: 13px; list-style: none; }
.abx-more summary::-webkit-details-marker { display: none; }
.abx-more summary::before { content: '▸ '; }
.abx-more[open] summary::before { content: '▾ '; }
.abx-set { display: flex; flex-direction: column; gap: 12px; }
.abx-mode { display: inline-flex; }
.abx-done { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.abx-link { font-size: 13px; }
.abx-keep .btn { flex: 1; }
.sw-ab-a { background: #3b82f6; }
.sw-ab-b { background: #d97706; }
.chart .ln-a { stroke: #3b82f6; }
.chart .ln-b { stroke: #d97706; }
.chart .dt-a { fill: #3b82f6; }
.chart .dt-b { fill: #d97706; }
.chart .ln-lab { font-family: var(--f-mono); font-size: 11px; font-weight: 600; }
.chart .ln-lab-a { fill: #3b82f6; }
.chart .ln-lab-b { fill: #d97706; }
.abr { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 16px; }
.abr-ov { display: flex; flex-direction: column; gap: 0; }
.abr-ov h2 { margin: 0 0 6px; }
.abr-kv { display: flex; flex-direction: column; gap: 4px; padding: 12px 0; border-top: 1px solid var(--line); }
.abr-kv:first-of-type { border-top: 0; }
.abr-kv > span { font-family: var(--f-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.abr-big { font-size: 28px; font-weight: 600; line-height: 1.1; }
.abr-win-name { display: flex; align-items: center; gap: 8px; }
.abr-keep { padding-top: 12px; border-top: 1px solid var(--line); }
.abr-keep .btn { flex: 1; }
.abr-legend { display: inline-flex; gap: 14px; font-size: 12.5px; color: var(--muted); }
.abr-legend span { display: inline-flex; align-items: center; gap: 6px; }
.abr-legend .sw, .abx-card .sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.abr-vn { display: flex; gap: 10px; align-items: flex-start; }
.abr-vn > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.abr-body { white-space: pre-wrap; font-size: 13px; color: var(--muted); max-width: 520px; }
.abr-win td { background: rgba(34,197,94,.04); }
.abr-pick { width: auto; max-width: 100%; }
.abr-settings { max-width: 640px; margin-top: 16px; }
@media (max-width: 900px) { .abr { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .abx-row { grid-template-columns: 26px 1fr 1fr; } .abx-row span:last-child { display: none; } }
.abr-right { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.abr-vn .pill, .abr-win-name .pill { align-self: flex-start; flex: none; }
.abr-win-name { flex-wrap: wrap; }
.abr-table { margin: 0; }
.card > .sms-ab { border-top: 0; padding-top: 0; margin-top: 0; }

/* Client Home: list growth and "What we did" */
.chg-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.chg-stat { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--bg); }
.chg-stat .l { font-family: var(--f-mono); font-size: 10px; color: var(--muted-2); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.chg-stat .v { font-size: 1.5rem; font-weight: 600; line-height: 1; letter-spacing: -.02em; }
.chg-stat .d { margin-top: 6px; }
.chg-chart { margin: 0; }
.chg-chart svg { display: block; width: 100%; height: 120px; }
.chg-e { fill: #3b82f6; background: #3b82f6; }
.chg-s { fill: #d97706; background: #d97706; }
.chg-bar:hover rect.chg-e, .chg-bar:hover rect.chg-s { opacity: .8; }
.chg-legend { display: flex; gap: 14px; margin-bottom: 8px; color: var(--muted); }
.chg-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.chg-axis { display: flex; justify-content: space-between; margin-top: 6px; border-top: 1px solid var(--line); padding-top: 6px; }
.chg-form { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.chg-form:last-child { border-bottom: 0; }
.chw-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.chw-tile { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--bg); }
.chw-tile .v { font-size: 1.4rem; font-weight: 600; line-height: 1.1; }
.chw-tile .l { margin-top: 4px; }
.chw-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.chw-list li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--line); }
.chw-list li:last-child { border-bottom: 0; }
.chw-ic { flex: none; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-hi); }
.chw-ic .ico { width: 15px; height: 15px; }
.chw .view-tabs { margin: 0; flex: none; }
@media (max-width: 600px) { .chw > .row { flex-direction: column; } }
