/* Sendline design system: Phase 1 prototype.
   Neutral zinc UI, one accent, colour reserved for delivery status. */

:root {
  --bg: #FAFAFA;
  --surface: #FFFFFF;
  --surface-2: #F4F4F5;
  --surface-3: #ECECEE;
  --border: #E4E4E7;
  --border-strong: #D4D4D8;
  --text: #18181B;
  --text-2: #52525B;
  --text-3: #8A8A93;
  --accent: #5B5BF7;
  --accent-hover: #4A4AE8;
  --accent-soft: #EEEEFE;
  --accent-text: #4343D6;
  /* aliases used by route/tracking components */
  --signal: var(--accent);
  --signal-soft: var(--accent-soft);
  --signal-text: var(--accent-text);

  --s-delivered: #16A34A;  --s-delivered-bg: #EAF7EE;
  --s-opened: #2563EB;     --s-opened-bg: #EAF1FE;
  --s-clicked: #7C3AED;    --s-clicked-bg: #F2ECFE;
  --s-deferred: #B45309;   --s-deferred-bg: #FEF5E6;
  --s-bounced: #DC2626;    --s-bounced-bg: #FDECEC;
  --s-complained: #E11D48; --s-complained-bg: #FDEBF0;
  --s-dropped: #71717A;    --s-dropped-bg: #F1F1F3;
  --s-processing: #0891B2; --s-processing-bg: #E7F6FA;
  --s-unsub: #475569;      --s-unsub-bg: #EEF1F5;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-pop: 0 12px 40px rgba(24,24,27,.14), 0 2px 8px rgba(24,24,27,.06);
  --sidebar: 248px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --serif: var(--font);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0B0B0D;
  --surface: #121215;
  --surface-2: #18181C;
  --surface-3: #202026;
  --border: #26262C;
  --border-strong: #33333B;
  --text: #F4F4F5;
  --text-2: #A1A1AA;
  --text-3: #71717A;
  --accent: #7676FF;
  --accent-hover: #8A8AFF;
  --accent-soft: #1F1F3D;
  --accent-text: #A5A5FF;
  --s-delivered-bg: #0F2A1A;  --s-delivered: #4ADE80;
  --s-opened-bg: #10213F;     --s-opened: #60A5FA;
  --s-clicked-bg: #231742;    --s-clicked: #A78BFA;
  --s-deferred-bg: #2E2109;   --s-deferred: #FBBF24;
  --s-bounced-bg: #351212;    --s-bounced: #F87171;
  --s-complained-bg: #3A1020; --s-complained: #FB7185;
  --s-dropped-bg: #1F1F23;    --s-dropped: #A1A1AA;
  --s-processing-bg: #0B2A33; --s-processing: #22D3EE;
  --s-unsub-bg: #1C2230;      --s-unsub: #94A3B8;
  --shadow-pop: 0 16px 48px rgba(0,0,0,.6);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select { font: inherit; color: inherit; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
svg { display: block; }

/* ───── Shell ───── */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; padding: 14px 12px; gap: 6px; overflow-y: auto; z-index: 30; }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 14px; font-weight: 700; font-size: 16px; letter-spacing: -.02em; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, #5B5BF7, #9B5CF6); display: grid; place-items: center; color: #fff; }
.workspace { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; }
.workspace .avatar { width: 26px; height: 26px; border-radius: 7px; background: #18181B; color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
:root[data-theme="dark"] .workspace .avatar { background: #F4F4F5; color: #18181B; }
.workspace .ws-name { font-weight: 600; font-size: 13px; line-height: 1.2; }
.workspace .ws-plan { font-size: 11.5px; color: var(--text-3); }
.workspace .chev { margin-left: auto; color: var(--text-3); }
.nav-group { margin-top: 10px; }
.nav-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); padding: 6px 10px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: var(--text-2); font-weight: 500; font-size: 13.5px; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--accent-text); }
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; }
.nav-item .soon { margin-left: auto; font-size: 10.5px; font-weight: 600; padding: 1px 6px; border-radius: 99px; background: var(--surface-2); color: var(--text-3); }
.nav-item .count { margin-left: auto; font-size: 11.5px; color: var(--text-3); }
.usage { margin-top: auto; padding: 12px; border: 1px solid var(--border); border-radius: 10px; }
.usage-top { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); margin-bottom: 8px; }
.meter { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.usage small { display: block; margin-top: 8px; font-size: 11.5px; color: var(--text-3); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 28px; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); }
.icon-btn.menu-btn { display: none; }
.page-title { font-size: 16px; font-weight: 650; letter-spacing: -.01em; }
.topbar .spacer { flex: 1; }
.search { display: flex; align-items: center; gap: 8px; width: 280px; height: 34px; padding: 0 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--text-3); font-size: 13px; }
.search kbd { margin-left: auto; font-family: var(--mono); font-size: 11px; padding: 1px 6px; border: 1px solid var(--border); border-radius: 5px; color: var(--text-3); }
.env { display: inline-flex; padding: 3px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
.env button { padding: 3px 10px; border-radius: 6px; font-size: 12.5px; font-weight: 600; color: var(--text-3); }
.env button.on { background: var(--surface-2); color: var(--text); }
.env button.on.live::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--s-delivered); margin-right: 6px; vertical-align: 1px; }
.icon-btn { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--text-2); }
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 9px; font-weight: 600; font-size: 13px; border: 1px solid var(--border); background: var(--surface); }
.btn:hover { border-color: var(--border-strong); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn svg { width: 15px; height: 15px; }

.content { padding: 24px 28px 56px; max-width: 1440px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.page-head p { color: var(--text-2); margin-top: 2px; }
.select { height: 34px; padding: 0 30px 0 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238A8A93' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; appearance: none; font-size: 13px; font-weight: 500; }

/* ───── Cards & grid ───── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 0; }
.card-head h3 { font-size: 14px; font-weight: 650; }
.card-head .sub { font-size: 12.5px; color: var(--text-3); }
.card-body { padding: 16px 18px 18px; }
.grid { display: grid; gap: 16px; }
.kpis { grid-template-columns: repeat(6, minmax(0,1fr)); }
.two { grid-template-columns: 2fr 1fr; }
.half { grid-template-columns: 1fr 1fr; }

.insight { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(120deg, var(--accent-soft), var(--surface) 60%); margin-bottom: 16px; }
.insight .spark-ic { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.insight b { font-weight: 650; }
.insight p { color: var(--text-2); font-size: 13.5px; }

.kpi { padding: 14px 16px 12px; position: relative; }
.kpi-label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.kpi-label .info { color: var(--text-3); cursor: help; }
.kpi-value { font-size: 24px; font-weight: 700; letter-spacing: -.03em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; font-size: 12px; }
.delta { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi-foot .note { text-align: right; margin-left: 8px; }
.delta.good { color: var(--s-delivered); }
.delta.bad { color: var(--s-bounced); }
.kpi .spark { position: absolute; right: 14px; top: 44px; opacity: .9; }
.kpi .note { font-size: 11.5px; color: var(--text-3); }
.tip { position: relative; }
.tip[data-tip]:hover::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); width: 240px; padding: 10px 12px; background: #18181B; color: #F4F4F5; font-size: 12px; font-weight: 400; line-height: 1.45; border-radius: 8px; box-shadow: var(--shadow-pop); z-index: 50; white-space: normal; }

/* ───── Status chips ───── */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.delivered { color: var(--s-delivered); background: var(--s-delivered-bg); }
.chip.opened { color: var(--s-opened); background: var(--s-opened-bg); }
.chip.clicked { color: var(--s-clicked); background: var(--s-clicked-bg); }
.chip.deferred { color: var(--s-deferred); background: var(--s-deferred-bg); }
.chip.bounced { color: var(--s-bounced); background: var(--s-bounced-bg); }
.chip.complained { color: var(--s-complained); background: var(--s-complained-bg); }
.chip.dropped { color: var(--s-dropped); background: var(--s-dropped-bg); }
.chip.processing { color: var(--s-processing); background: var(--s-processing-bg); }
.chip.unsubscribed { color: var(--s-unsub); background: var(--s-unsub-bg); }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 11.5px; font-weight: 500; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); }
.pill-ok { color: var(--s-delivered); font-weight: 600; }
.pill-warn { color: var(--s-deferred); font-weight: 600; }
.pill-bad { color: var(--s-bounced); font-weight: 600; }

/* ───── Chart ───── */
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; padding: 4px 18px 0; }
.legend-item { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-2); cursor: pointer; user-select: none; }
.legend-item i { width: 10px; height: 10px; border-radius: 3px; }
.legend-item.off { opacity: .4; }
.chart-wrap { padding: 8px 10px 6px 4px; }
.chart-wrap svg text { fill: var(--text-3); font-size: 11px; font-family: var(--font); }
.chart-tt { position: fixed; pointer-events: none; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-pop); padding: 10px 12px; font-size: 12.5px; z-index: 60; min-width: 170px; }
.chart-tt .row { display: flex; justify-content: space-between; gap: 16px; }
.chart-tt b { font-variant-numeric: tabular-nums; }

/* ───── Funnel ───── */
.funnel { display: flex; flex-direction: column; gap: 14px; }
.f-row .f-top { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.f-row .f-top b { font-variant-numeric: tabular-nums; }
.f-bar { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.f-bar span { display: block; height: 100%; border-radius: 99px; }

/* ───── Tables ───── */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-weight: 600; font-size: 12px; color: var(--text-3); padding: 10px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface); position: sticky; top: 0; }
.tbl td { padding: 11px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tbody tr { cursor: pointer; transition: background .12s; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tr.new-row { animation: flash 1.6s ease; }
@keyframes flash { from { background: var(--accent-soft); } to { background: transparent; } }
.cell-main { font-weight: 550; }
.cell-sub { font-size: 12px; color: var(--text-3); }
.trunc { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.toolbar { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.fchip { height: 28px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border); font-size: 12.5px; font-weight: 550; color: var(--text-2); background: var(--surface); display: inline-flex; align-items: center; gap: 6px; }
.fchip b { font-weight: 600; color: var(--text-3); font-variant-numeric: tabular-nums; }
.fchip.on { border-color: var(--text); color: var(--text); background: var(--surface-2); }
.input { height: 32px; padding: 0 10px 0 32px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238A8A93' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 10px center; min-width: 260px; font-size: 13px; outline: none; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.live { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--s-delivered); margin-left: auto; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--s-delivered); box-shadow: 0 0 0 0 rgba(22,163,74,.5); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(22,163,74,0); } 100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); } }
.tfoot { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-3); }

/* ───── Drawer ───── */
.scrim { position: fixed; inset: 0; background: rgba(9,9,11,.35); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 70; }
.scrim.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; height: 100vh; width: min(640px, 100vw); background: var(--surface); border-left: 1px solid var(--border); box-shadow: var(--shadow-pop); transform: translateX(100%); transition: transform .25s cubic-bezier(.2,.8,.2,1); z-index: 80; display: flex; flex-direction: column; }
.drawer.open { transform: none; }
.drawer-head { padding: 18px 22px 0; border-bottom: 1px solid var(--border); }
.drawer-top { display: flex; align-items: flex-start; gap: 12px; }
.drawer-top h2 { font-size: 17px; font-weight: 650; letter-spacing: -.01em; line-height: 1.3; }
.drawer-top .close { margin-left: auto; }
.drawer-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 10px 0 14px; font-size: 12.5px; color: var(--text-2); }
.tabs { display: flex; gap: 2px; }
.tab { padding: 9px 12px; font-size: 13px; font-weight: 550; color: var(--text-3); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab.on { color: var(--text); border-color: var(--accent); }
.drawer-body { padding: 20px 22px 40px; overflow-y: auto; flex: 1; }
.copy { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 12px; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); cursor: pointer; }
.copy:hover { border-color: var(--border-strong); }

.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ''; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tl-item { position: relative; padding-bottom: 20px; }
.tl-dot { position: absolute; left: -28px; top: 1px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid currentColor; }
.tl-dot::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.tl-title { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.tl-time { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.tl-desc { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.tl-desc .mono { color: var(--text-2); }
.badge-soft { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 99px; background: var(--surface-2); color: var(--text-3); border: 1px solid var(--border); }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 10px 16px; font-size: 13px; }
.kv dt { color: var(--text-3); }
.kv dd { word-break: break-all; }
pre.code { font-family: var(--mono); font-size: 12px; line-height: 1.6; background: #0F0F12; color: #E4E4E7; padding: 14px 16px; border-radius: 10px; overflow-x: auto; }
pre.code .k { color: #A5A5FF; } pre.code .s { color: #86EFAC; } pre.code .n { color: #FBBF24; }
.preview-frame { width: 100%; height: 520px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }

/* ───── Domains ───── */
.dns-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; }
.dns-status i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.health-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.health-row:last-child { border: 0; }

/* ───── Empty / roadmap ───── */
.roadmap { display: grid; place-items: center; text-align: center; padding: 80px 24px; }
.roadmap .ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); margin-bottom: 18px; }
.roadmap h2 { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.roadmap p { color: var(--text-2); max-width: 520px; margin: 8px auto 0; }
.roadmap ul { list-style: none; display: grid; gap: 8px; margin: 22px auto 0; text-align: left; max-width: 420px; }
.roadmap li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--text-2); }
.roadmap li svg { color: var(--s-delivered); flex-shrink: 0; margin-top: 3px; }
.phase-badge { display: inline-block; margin-top: 18px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(20px); opacity: 0; background: #18181B; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 13px; font-weight: 500; transition: all .2s; z-index: 100; box-shadow: var(--shadow-pop); }
.toast.show { opacity: 1; transform: translateX(-50%); }

.score { display: inline-flex; align-items: center; gap: 8px; }
.score .bar { width: 64px; height: 6px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.score .bar span { display: block; height: 100%; border-radius: 99px; }
.avatar-c { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 650; color: #fff; flex-shrink: 0; }
.who { display: flex; align-items: center; gap: 10px; }

/* ───── Responsive ───── */
@media (max-width: 1280px) { .kpis { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 1080px) { .two, .half { grid-template-columns: 1fr; } .search { display: none; } }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; width: var(--sidebar); transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-pop); }
  .sidebar.open { transform: none; }
  .icon-btn.menu-btn { display: grid; }
  .topbar { padding: 0 16px; }
  .content { padding: 18px 16px 48px; }
  .kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .env, .topbar .btn-primary span { display: none; }
  .input { min-width: 0; width: 100%; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dt { margin-top: 8px; }
}

/* ═════════ Components v2 ═════════ */

/* Brand */
.brand img, .brand svg.mark { width: 28px; height: 28px; border-radius: 8px; }
.brand .word { font-weight: 700; font-size: 16.5px; letter-spacing: -.035em; }

/* Modal system */
.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; background: rgba(9,9,11,.42); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .18s ease; }
.modal.open { opacity: 1; pointer-events: auto; }
.modal-card { width: 100%; max-height: calc(100vh - 40px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-pop); transform: translateY(10px) scale(.98); transition: transform .22s cubic-bezier(.2,.8,.2,1); overflow: hidden; }
.modal.open .modal-card { transform: none; }
.modal-card.sm { max-width: 420px; } .modal-card.md { max-width: 560px; } .modal-card.lg { max-width: 760px; } .modal-card.xl { max-width: 1000px; }
.m-head { display: flex; gap: 14px; align-items: flex-start; padding: 20px 22px 14px; }
.m-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: var(--accent-soft); color: var(--accent-text); }
.m-icon.danger { background: var(--s-bounced-bg); color: var(--s-bounced); }
.m-icon.success { background: var(--s-delivered-bg); color: var(--s-delivered); }
.m-title { font-size: 16px; font-weight: 650; letter-spacing: -.01em; }
.m-desc { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.m-head .icon-btn { margin-left: auto; width: 30px; height: 30px; border: 0; }
.m-body { padding: 4px 22px 20px; overflow-y: auto; }
.m-foot { display: flex; align-items: center; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--border); background: var(--surface-2); }
.m-foot .hint { font-size: 12.5px; color: var(--text-3); margin-right: auto; }
.btn-danger { background: var(--s-bounced); border-color: var(--s-bounced); color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* Stepper */
.stepper { display: flex; align-items: center; gap: 8px; padding: 0 22px 14px; }
.step { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--text-3); }
.step .n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; border: 1.5px solid var(--border-strong); }
.step.on { color: var(--text); } .step.on .n { border-color: var(--accent); background: var(--accent); color: #fff; }
.step.done { color: var(--text-2); } .step.done .n { border-color: var(--s-delivered); background: var(--s-delivered); color: #fff; }
.step-line { flex: 1; height: 1.5px; background: var(--border); min-width: 16px; }

/* Forms */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.field .help { font-size: 12px; color: var(--text-3); }
.field input, .field select, .field textarea { height: 38px; padding: 0 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); outline: none; font-size: 13.5px; transition: border-color .15s, box-shadow .15s; }
.field textarea { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; font-family: inherit; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field.error input { border-color: var(--s-bounced); box-shadow: 0 0 0 3px var(--s-bounced-bg); }
.field .err { font-size: 12px; color: var(--s-bounced); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.check { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 9px; cursor: pointer; font-size: 13px; }
.check:hover { border-color: var(--border-strong); }
.check input { accent-color: var(--accent); width: 15px; height: 15px; }
.radio-cards { display: grid; gap: 10px; }
.radio-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1.5px solid var(--border); border-radius: 12px; cursor: pointer; }
.radio-card.on { border-color: var(--accent); background: var(--accent-soft); }
.radio-card b { display: block; font-size: 13.5px; }
.radio-card span { font-size: 12.5px; color: var(--text-2); }
.radio-card .dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border-strong); flex-shrink: 0; margin-top: 1px; }
.radio-card.on .dot { border: 5px solid var(--accent); }
.switch { position: relative; width: 36px; height: 20px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--border-strong); transition: .2s; cursor: pointer; }
.switch span::after { content: ''; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(16px); }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.setting-row:last-child { border: 0; }
.setting-row b { display: block; font-size: 13.5px; font-weight: 600; }
.setting-row span { font-size: 12.5px; color: var(--text-2); }

/* Secret reveal */
.secret { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px dashed var(--accent); border-radius: 10px; background: var(--accent-soft); font-family: var(--mono); font-size: 13px; word-break: break-all; }
.secret button { margin-left: auto; flex-shrink: 0; }
.callout { display: flex; gap: 10px; padding: 12px 14px; border-radius: 10px; font-size: 13px; margin-top: 12px; }
.callout.warn { background: var(--s-deferred-bg); color: var(--s-deferred); }
.callout.info { background: var(--accent-soft); color: var(--accent-text); }
.callout.error { background: var(--s-bounced-bg); color: var(--s-bounced); }
.callout.ok { background: var(--s-delivered-bg); color: var(--s-delivered); }
.callout svg { flex-shrink: 0; margin-top: 2px; }

/* Dropzone */
.dropzone { border: 1.5px dashed var(--border-strong); border-radius: 14px; padding: 34px 20px; text-align: center; background: var(--surface-2); cursor: pointer; transition: .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone .ic { width: 44px; height: 44px; border-radius: 12px; margin: 0 auto 10px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); color: var(--accent-text); }
.file-pill { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; }
.progress { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .3s; }

/* Dropdown menu */
.menu { position: fixed; z-index: 95; min-width: 220px; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-pop); animation: pop .14s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } }
.menu-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); padding: 8px 10px 4px; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 8px; font-size: 13px; font-weight: 500; text-align: left; color: var(--text); }
.menu-item:hover, .menu-item.hl { background: var(--surface-2); }
.menu-item svg { color: var(--text-3); width: 16px; height: 16px; }
.menu-item .kbd, .menu-item .meta { margin-left: auto; font-size: 11.5px; color: var(--text-3); }
.menu-item.danger { color: var(--s-bounced); } .menu-item.danger svg { color: var(--s-bounced); }
.menu-sep { height: 1px; background: var(--border); margin: 6px 4px; }
.menu-item .ws-dot { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; }

/* Command palette */
.palette { position: fixed; inset: 0; z-index: 96; display: grid; justify-items: center; align-items: start; padding-top: 12vh; background: rgba(9,9,11,.42); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .15s; }
.palette.open { opacity: 1; pointer-events: auto; }
.palette-card { width: min(620px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-pop); overflow: hidden; }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); color: var(--text-3); }
.palette-input input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 15px; color: var(--text); }
.palette-list { max-height: 380px; overflow-y: auto; padding: 6px; }
.palette-foot { display: flex; gap: 14px; padding: 9px 16px; border-top: 1px solid var(--border); font-size: 11.5px; color: var(--text-3); }
.palette-foot kbd, .search kbd { font-family: var(--mono); }

/* Sidebar user */
.user-btn { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; width: 100%; text-align: left; margin-top: 8px; }
.user-btn:hover { background: var(--surface-2); }
.user-btn .avatar-c { width: 30px; height: 30px; }
.user-btn b { display: block; font-size: 13px; font-weight: 600; line-height: 1.2; }
.user-btn small { font-size: 11.5px; color: var(--text-3); }

/* Page tabs */
.ptabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.ptab { padding: 10px 14px; font-size: 13.5px; font-weight: 550; color: var(--text-3); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.ptab.on { color: var(--text); border-color: var(--accent); }
.seg { display: inline-flex; padding: 3px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
.seg button { padding: 4px 10px; border-radius: 6px; font-size: 12.5px; font-weight: 600; color: var(--text-3); }
.seg button.on { background: var(--surface-2); color: var(--text); }

/* Campaigns */
.camp-name { font-weight: 600; }
.camp-meta { font-size: 12px; color: var(--text-3); }
.mini-bar { width: 90px; height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; display: inline-block; vertical-align: middle; margin-right: 8px; }
.mini-bar span { display: block; height: 100%; border-radius: 99px; }
.chip.draft { color: var(--text-2); background: var(--surface-2); }
.chip.scheduled { color: var(--accent-text); background: var(--accent-soft); }
.chip.sending { color: var(--s-processing); background: var(--s-processing-bg); }
.chip.sent { color: var(--s-delivered); background: var(--s-delivered-bg); }
.chip.paused { color: var(--s-deferred); background: var(--s-deferred-bg); }

/* Templates gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.tpl { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--surface); cursor: pointer; transition: border-color .15s, transform .15s; }
.tpl:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.tpl-thumb { height: 170px; background: var(--surface-2); padding: 16px 22px 0; overflow: hidden; border-bottom: 1px solid var(--border); }
.tpl-mail { background: #fff; border-radius: 8px 8px 0 0; height: 100%; padding: 14px; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.tpl-mail .l { height: 7px; border-radius: 4px; background: #E4E4E7; margin-bottom: 7px; }
.tpl-mail .h { height: 11px; border-radius: 4px; background: #18181B; width: 70%; margin: 10px 0; }
.tpl-mail .cta { height: 18px; width: 46%; border-radius: 5px; margin-top: 12px; }
.tpl-mail .img { height: 44px; border-radius: 6px; margin-bottom: 8px; }
.tpl-info { padding: 12px 14px; }
.tpl-info b { font-size: 13.5px; }
.tpl-info div { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* Editor modal */
.editor { display: grid; grid-template-columns: 1fr 1fr; height: 62vh; border-top: 1px solid var(--border); }
.editor textarea { border: 0; border-right: 1px solid var(--border); resize: none; padding: 16px; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; background: #0F0F12; color: #E4E4E7; outline: none; }
.editor iframe { width: 100%; height: 100%; border: 0; background: #f4f4f5; }

/* Automation canvas */
.canvas { position: relative; padding: 32px 20px 48px; background-color: var(--surface-2); background-image: radial-gradient(var(--border-strong) 1px, transparent 1px); background-size: 18px 18px; border-radius: 0 0 var(--radius) var(--radius); display: flex; flex-direction: column; align-items: center; overflow-x: auto; }
.node { width: 300px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; box-shadow: 0 1px 2px rgba(0,0,0,.04); position: relative; }
.node-head { display: flex; align-items: center; gap: 10px; }
.node-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; }
.node b { font-size: 13.5px; }
.node small { display: block; font-size: 12px; color: var(--text-3); }
.node-stats { display: flex; gap: 14px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-2); }
.node-stats b { font-size: 12.5px; color: var(--text); }
.connector { width: 2px; height: 28px; background: var(--border-strong); }
.add-step { width: 26px; height: 26px; border-radius: 50%; border: 1.5px dashed var(--border-strong); display: grid; place-items: center; color: var(--text-3); background: var(--surface); margin: -6px 0; position: relative; z-index: 1; }
.branch { display: flex; gap: 40px; align-items: flex-start; position: relative; padding-top: 28px; }
.branch::before { content: ''; position: absolute; top: 0; left: 150px; right: 150px; height: 2px; background: var(--border-strong); }
.branch > div { display: flex; flex-direction: column; align-items: center; position: relative; }
.branch > div::before { content: ''; position: absolute; top: -28px; width: 2px; height: 28px; background: var(--border-strong); }
.branch-label { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 99px; margin-bottom: 8px; }

/* Inbox tests */
.placement { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--surface-3); min-width: 160px; }
.placement span { height: 100%; }
.legend-dots { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); }
.legend-dots i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: 0; }
.donut-wrap { display: flex; align-items: center; gap: 24px; }
.donut-center { font-size: 26px; font-weight: 700; letter-spacing: -.03em; }

/* Billing */
.plans { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.plan { border: 1.5px solid var(--border); border-radius: 14px; padding: 18px; background: var(--surface); display: flex; flex-direction: column; gap: 10px; }
.plan.current { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.plan .price { font-size: 26px; font-weight: 700; letter-spacing: -.03em; }
.plan .price small { font-size: 13px; font-weight: 500; color: var(--text-3); }
.plan ul { list-style: none; display: grid; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.plan li { display: flex; gap: 8px; } .plan li svg { color: var(--s-delivered); flex-shrink: 0; margin-top: 2px; }
.plan .btn { justify-content: center; margin-top: auto; }

/* Contact profile */
.profile-head { display: flex; gap: 14px; align-items: center; }
.profile-head .avatar-c { width: 48px; height: 48px; font-size: 16px; }
.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; margin: 16px 0 6px; }
.stat-row div { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; }
.stat-row small { font-size: 11.5px; color: var(--text-3); }
.stat-row b { display: block; font-size: 17px; font-weight: 700; }
.mail-list .mi { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.mail-list .mi:last-child { border: 0; }

.empty { text-align: center; padding: 56px 20px; color: var(--text-2); }
.empty .ic { width: 48px; height: 48px; border-radius: 14px; margin: 0 auto 14px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-3); }
.empty h3 { font-size: 15px; color: var(--text); margin-bottom: 4px; }

@media (max-width: 1080px) { .plans { grid-template-columns: repeat(2, minmax(0,1fr)); } .editor { grid-template-columns: 1fr; } .editor textarea { display: none; } }
@media (max-width: 640px) { .row2, .check-grid { grid-template-columns: 1fr; } .plans { grid-template-columns: 1fr; } .stat-row { grid-template-columns: repeat(2, minmax(0,1fr)); } .stepper .step span.t { display: none; } }

/* ═════════ Route & tracking components ═════════ */
.page-head h1 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.brand .word { font-weight: 700; letter-spacing: -.02em; }
.nav-item .count { color: var(--s-delivered); font-weight: 600; font-size: 11px; }
.fchip.on b { color: var(--text-3); }
/* Tracking codes */
.trk { font-family: var(--mono); font-size: 12px; letter-spacing: .02em; color: var(--text-2); }

/* Mini route: 4 stations on a line, filled to the station reached */
.route { display: inline-flex; align-items: center; gap: 0; height: 14px; }
.route .st { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--border-strong); background: var(--surface); flex-shrink: 0; position: relative; z-index: 1; }
.route .tr { width: 16px; height: 2px; background: var(--border); flex-shrink: 0; }
.route .st.on { background: var(--c); border-color: var(--c); }
.route .tr.on { background: var(--c); }
.route .tr.dash { background: repeating-linear-gradient(90deg, var(--c) 0 3px, transparent 3px 6px); }
.route .tr.break { background: transparent; position: relative; }
.route .tr.break::after { content: ''; position: absolute; left: 5px; top: -3px; width: 2px; height: 8px; background: var(--c); transform: rotate(20deg); }
.route .st.x { background: var(--surface); border-color: var(--c); }
.route .st.x::after { content: ''; position: absolute; inset: 1.5px; border-radius: 50%; background: var(--c); }
.route-cell { display: flex; align-items: center; gap: 10px; }
.route-cell .lbl { font-size: 12.5px; font-weight: 600; color: var(--c); white-space: nowrap; }

/* Large route (email detail): parcel-tracker style */
.route-lg { display: grid; grid-template-columns: repeat(4, 1fr); margin: 6px 0 18px; }
.route-lg .stn { position: relative; padding-top: 22px; }
.route-lg .stn::before { content: ''; position: absolute; top: 7px; left: 0; right: 0; height: 3px; background: var(--border); }
.route-lg .stn:first-child::before { left: 8px; }
.route-lg .stn:last-child::before { right: auto; width: 8px; }
.route-lg .stn.on::before { background: var(--c); }
.route-lg .stn.next-dash::before { background: repeating-linear-gradient(90deg, var(--c) 0 5px, transparent 5px 10px); }
.route-lg .dot { position: absolute; top: 0; left: 0; width: 17px; height: 17px; border-radius: 50%; background: var(--surface); border: 3px solid var(--border-strong); z-index: 1; }
.route-lg .stn.on .dot { border-color: var(--c); background: var(--c); box-shadow: 0 0 0 4px var(--surface); }
.route-lg .stn.here .dot { box-shadow: 0 0 0 4px var(--surface), 0 0 0 7px color-mix(in srgb, var(--c) 25%, transparent); }
.route-lg .stn.fail .dot { border-color: var(--c); background: var(--surface); }
.route-lg .n { font-size: 12.5px; font-weight: 650; }
.route-lg .t { font-size: 11.5px; color: var(--text-3); font-family: var(--mono); }
.route-lg .stn:not(.on) .n { color: var(--text-3); }

/* Line map (overview funnel as a transit line) */
.linemap { padding: 30px 22px 22px; }
.lm-track { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); }
.lm-stn { position: relative; padding-top: 40px; }
.lm-stn::before { content: ''; position: absolute; top: 12px; left: 0; right: 0; height: 6px; background: var(--signal); }
.lm-stn:first-child::before { left: 12px; border-radius: 3px 0 0 3px; }
.lm-stn:last-child::before { right: auto; width: 12px; }
.lm-dot { position: absolute; top: 3px; left: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--surface); border: 5px solid var(--accent); z-index: 1; }
.lm-name { font-size: 12px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; }
.lm-val { font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; margin-top: 2px; }
.lm-rate { position: absolute; top: -18px; left: calc(-50% + 12px); transform: translateX(-50%); font-size: 11.5px; font-weight: 650; font-family: var(--mono); color: var(--signal-text); background: var(--surface); padding: 0 6px; white-space: nowrap; }
.lm-stn:first-child .lm-rate { display: none; }
.lm-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }


/* ═════════ Copilot, SES connect, Migrate ═════════ */
.copilot { border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 12px; padding: 14px 16px; margin-bottom: 20px; background: linear-gradient(135deg, var(--accent-soft), var(--surface) 55%); }
.cp-head { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 650; color: var(--accent-text); text-transform: uppercase; letter-spacing: .05em; }
.cp-badge { margin-left: auto; text-transform: none; letter-spacing: 0; font-size: 12px; }
.cp-title { font-size: 15px; font-weight: 650; margin: 8px 0 4px; }
.cp-why { font-size: 13px; color: var(--text-2); line-height: 1.55; }
.cp-label { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin: 12px 0 6px; }
.cp-fix { list-style: none; display: grid; gap: 7px; }
.cp-fix li { display: flex; gap: 8px; font-size: 13px; line-height: 1.5; }
.cp-fix li svg { color: var(--s-delivered); flex-shrink: 0; margin-top: 3px; }
.cp-evidence { display: flex; gap: 10px; align-items: center; margin-top: 12px; padding: 8px 10px; border-radius: 8px; background: var(--surface); border: 1px dashed var(--border-strong); font-size: 12px; overflow-x: auto; white-space: nowrap; }
.cp-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }

.score-ring { position: relative; width: 132px; height: 132px; flex-shrink: 0; }
.score-ring svg { transform: rotate(-90deg); }
.score-ring .v { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.score-ring .v b { display: block; font-size: 32px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.score-ring .v small { font-size: 11.5px; color: var(--text-3); }
.issue { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); margin-bottom: 12px; overflow: hidden; }
.issue-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; }
.issue-sev { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; }
.issue-head b { font-size: 14px; display: block; }
.issue-head small { font-size: 12.5px; color: var(--text-3); }
.issue-head .chev2 { margin-left: auto; color: var(--text-3); transition: transform .15s; }
.issue.open .chev2 { transform: rotate(90deg); }
.issue-body { display: none; padding: 0 16px 16px 62px; }
.issue.open .issue-body { display: block; }
.impact { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }

.chat { display: flex; flex-direction: column; gap: 12px; max-height: 420px; overflow-y: auto; padding: 4px 2px 8px; }
.bubble { max-width: 88%; padding: 10px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.55; }
.bubble.user { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.bubble.ai { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.bubble.ai .src { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.bubble.ai .src span { font-size: 11px; padding: 1px 7px; border-radius: 6px; background: var(--surface); border: 1px solid var(--border); color: var(--text-3); }
.typing span { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); margin: 0 2px; animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.chat-input { display: flex; gap: 8px; margin-top: 12px; }
.chat-input input { flex: 1; height: 40px; padding: 0 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); outline: none; font-size: 13.5px; }
.chat-input input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.suggest { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.suggest button { font-size: 12.5px; padding: 5px 10px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); }
.suggest button:hover { border-color: var(--accent); color: var(--accent-text); }

.hero-card { display: grid; grid-template-columns: 1.2fr 1fr; gap: 0; overflow: hidden; }
.hero-card .left { padding: 28px; }
.hero-card .right { padding: 28px; background: var(--surface-2); border-left: 1px solid var(--border); }
.hero-card h2 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; }
.hero-card p { color: var(--text-2); margin-top: 8px; }
.how { display: grid; gap: 14px; }
.how-step { display: flex; gap: 12px; }
.how-step .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--accent-soft); color: var(--accent-text); flex-shrink: 0; }
.how-step b { font-size: 13.5px; display: block; }
.how-step span { font-size: 12.5px; color: var(--text-2); }
.checklist { display: grid; gap: 4px; }
.ck { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.ck:last-child { border: 0; }
.ck .st { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; border: 2px solid var(--border-strong); }
.ck.done .st { background: var(--s-delivered); border-color: var(--s-delivered); color: #fff; }
.ck.run .st { border-color: var(--accent); border-right-color: transparent; animation: spin .7s linear infinite; }
.ck.warn .st { background: var(--s-deferred); border-color: var(--s-deferred); color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
.ck small { display: block; font-size: 12px; color: var(--text-3); }
.ck .r { margin-left: auto; font-size: 12px; }
.letter { font-size: 13px; line-height: 1.65; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); white-space: pre-wrap; max-height: 280px; overflow-y: auto; }

.calc { display: grid; grid-template-columns: 1fr 1.1fr; gap: 16px; }
.savings { text-align: center; padding: 22px 16px; border-radius: 12px; background: var(--s-delivered-bg); color: var(--s-delivered); }
.savings b { display: block; font-size: 40px; font-weight: 750; letter-spacing: -.04em; line-height: 1.05; }
.savings span { font-size: 13px; font-weight: 600; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.compare div { padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.compare small { font-size: 12px; color: var(--text-3); }
.compare b { display: block; font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.range { width: 100%; accent-color: var(--accent); }
.prov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.prov { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1.5px solid var(--border); border-radius: 12px; cursor: pointer; background: var(--surface); font-weight: 600; font-size: 13.5px; }
.prov.on { border-color: var(--accent); background: var(--accent-soft); }
.prov i { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 800; color: #fff; flex-shrink: 0; }
@media (max-width: 1080px) { .hero-card, .calc { grid-template-columns: 1fr; } .hero-card .right { border-left: 0; border-top: 1px solid var(--border); } }

.card-head h3 svg, .pill-ok svg, .pill-warn svg, .pill-bad svg { display: inline-block; vertical-align: -2px; margin-right: 4px; }

/* ═════════ Full-page flows ═════════ */
.flow-top { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-3); font-weight: 500; }
.back:hover { color: var(--text); }
.flow-title { font-size: 22px; font-weight: 700; letter-spacing: -.02em; border: 0; background: transparent; outline: none; padding: 2px 6px; margin-left: -6px; border-radius: 8px; min-width: 0; width: min(520px, 60vw); }
.flow-title:hover { background: var(--surface-2); } .flow-title:focus { background: var(--surface); box-shadow: 0 0 0 2px var(--accent-soft); }
.flow-top .spacer { flex: 1; }
.saved { font-size: 12.5px; color: var(--text-3); display: inline-flex; align-items: center; gap: 6px; }

/* Campaign builder: checklist + sticky inbox preview */
.builder { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 20px; align-items: start; }
.ready { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); margin-bottom: 14px; }
.ready .bars { display: flex; gap: 4px; flex: 1; }
.ready .bars span { flex: 1; height: 6px; border-radius: 99px; background: var(--surface-3); transition: background .25s; }
.ready .bars span.on { background: var(--s-delivered); }
.ready b { font-size: 13px; white-space: nowrap; }
.sec { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); margin-bottom: 10px; transition: border-color .15s, box-shadow .15s; }
.sec.open { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.sec-head { display: flex; align-items: center; gap: 14px; padding: 16px 18px; cursor: pointer; }
.sec-st { width: 24px; height: 24px; border-radius: 50%; border: 2px dashed var(--border-strong); display: grid; place-items: center; flex-shrink: 0; color: #fff; }
.sec.done .sec-st { background: var(--s-delivered); border: 0; }
.sec.warn .sec-st { background: var(--s-deferred); border: 0; font-weight: 800; font-size: 12px; }
.sec-head .t { font-size: 14.5px; font-weight: 650; }
.sec-head .s { font-size: 13px; color: var(--text-2); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 520px; }
.sec-head .s.unset { color: var(--text-3); font-style: italic; }
.sec-head .btn { margin-left: auto; }
.sec-body { display: none; padding: 0 18px 18px 56px; }
.sec.open .sec-body { display: block; }
.counter { font-size: 11.5px; color: var(--text-3); text-align: right; margin-top: 4px; }
.aud-list { display: grid; gap: 8px; }
.aud { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1.5px solid var(--border); border-radius: 10px; cursor: pointer; }
.aud.on { border-color: var(--accent); background: var(--accent-soft); }
.aud b { font-size: 13.5px; } .aud span { font-size: 12.5px; color: var(--text-3); }
.aud .n { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.tpl-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tpl-row .tpl-thumb { height: 120px; }
.tpl.sel { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.preview-pane { position: sticky; top: 76px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); overflow: hidden; }
.pp-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.inbox-mock { padding: 10px 12px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.inbox-mock .cap { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin-bottom: 6px; }
.im-row { display: grid; grid-template-columns: 22px 120px 1fr 44px; gap: 10px; align-items: center; padding: 9px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; font-size: 12.5px; }
.im-row .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); justify-self: center; }
.im-row .fr { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.im-row .sj { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.im-row .sj b { font-weight: 650; } .im-row .sj span { color: var(--text-3); }
.im-row .tm { color: var(--text-3); text-align: right; font-size: 11.5px; }
.im-row.ghost { opacity: .45; margin-top: 6px; }
.pp-frame { width: 100%; height: 470px; border: 0; display: block; background: #f4f4f5; transition: width .2s; margin: 0 auto; }
.pp-frame.mobile { width: 375px; max-width: 100%; }
.precheck li { justify-content: space-between; }
.precheck .r { font-size: 12px; font-weight: 600; white-space: nowrap; }

/* Campaign report */
.stat-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: 12px; background: var(--surface); margin-bottom: 16px; }
.stat-strip > div { padding: 14px 16px; border-left: 1px solid var(--border); }
.stat-strip > div:first-child { border-left: 0; }
.stat-strip small { display: block; font-size: 12px; color: var(--text-3); font-weight: 500; }
.stat-strip b { display: block; font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat-strip em { font-style: normal; font-size: 12px; font-weight: 600; }
.stat-strip .sub2 { font-size: 11.5px; color: var(--text-3); }
.clickmap-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 0; }
.clickmap { padding: 22px; background: var(--surface-2); border-right: 1px solid var(--border); }
.cm-mail { max-width: 520px; margin: 0 auto; background: #fff; color: #18181b; border: 1px solid #e4e4e7; border-radius: 12px; padding: 28px; font-size: 14px; line-height: 1.6; }
.cm-mail h2 { font-size: 20px; margin: 0 0 10px; color: #18181b; }
.cm-mail p { color: #52525b; margin: 0 0 12px; }
.cm-mail .hero-img { height: 120px; border-radius: 8px; background: linear-gradient(135deg, #e0e7ff, #ede9fe); margin-bottom: 16px; display: grid; place-items: center; color: #6366f1; font-weight: 700; }
.hot { position: relative; display: inline-block; border-radius: 6px; outline: 2px solid rgba(91, 91, 247, calc(var(--h) * .9 + .1)); outline-offset: 3px; background: rgba(91, 91, 247, calc(var(--h) * .22)); transition: outline-color .15s, transform .15s; cursor: default; }
.hot.hl { outline-color: #f59e0b; transform: scale(1.03); }
.hot .hb { position: absolute; top: -13px; right: -14px; font-style: normal; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 99px; background: #5B5BF7; color: #fff; white-space: nowrap; box-shadow: 0 2px 6px rgba(0,0,0,.18); }
.hot.hl .hb { background: #f59e0b; }
.cm-btn { display: inline-block; background: #5B5BF7; color: #fff !important; padding: 10px 18px; border-radius: 8px; font-weight: 600; text-decoration: none; }
.cm-link { color: #4343D6; text-decoration: underline; }
.links-side { padding: 16px; }
.lk { display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-radius: 8px; cursor: default; }
.lk:hover, .lk.hl { background: var(--surface-2); }
.lk .rk { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--accent-soft); color: var(--accent-text); flex-shrink: 0; }
.lk .u { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lk .c { margin-left: auto; text-align: right; font-size: 12.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
.lk .c small { display: block; font-weight: 500; color: var(--text-3); }
.cp-summary { display: grid; grid-template-columns: auto 1fr; gap: 14px; padding: 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); margin-bottom: 16px; }
.cp-summary .ic2 { width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; }
.cp-summary p { font-size: 14px; line-height: 1.6; }
.cp-summary .recs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* Setup flows: status rail + panel */
.flow { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 24px; align-items: start; }
.rail { position: sticky; top: 76px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); padding: 10px; }
.rail-item { position: relative; display: flex; gap: 12px; padding: 12px 10px; border-radius: 10px; cursor: pointer; }
.rail-item:hover { background: var(--surface-2); }
.rail-item.on { background: var(--accent-soft); }
.rail-item:not(:last-child)::after { content: ''; position: absolute; left: 22px; top: 40px; bottom: -10px; width: 2px; background: var(--border); }
.rail-item.done:not(:last-child)::after { background: var(--s-delivered); }
.rail-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; border: 2px solid var(--border-strong); background: var(--surface); flex-shrink: 0; position: relative; z-index: 1; }
.rail-item.on .rail-n { border-color: var(--accent); color: var(--accent-text); }
.rail-item.done .rail-n { background: var(--s-delivered); border-color: var(--s-delivered); color: #fff; }
.rail-item.warn .rail-n { background: var(--s-deferred); border-color: var(--s-deferred); color: #fff; }
.rail-item b { display: block; font-size: 13.5px; }
.rail-item small { font-size: 12px; color: var(--text-3); }
.rail-foot { margin: 8px 6px 4px; padding: 12px; border-radius: 10px; background: var(--surface-2); font-size: 12px; color: var(--text-2); line-height: 1.5; }
.panel { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.panel-head { padding: 22px 24px 4px; }
.panel-head .kicker { font-size: 12px; font-weight: 650; color: var(--accent-text); text-transform: uppercase; letter-spacing: .06em; }
.panel-head h2 { font-size: 20px; font-weight: 700; letter-spacing: -.02em; margin-top: 4px; }
.panel-head p { color: var(--text-2); margin-top: 4px; font-size: 13.5px; }
.panel-body { padding: 18px 24px 24px; }
.panel-foot { display: flex; align-items: center; gap: 8px; padding: 14px 24px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 14px 14px; }
.panel-foot .hint { margin-right: auto; font-size: 12.5px; color: var(--text-3); }
.method { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.method .radio-card { flex-direction: column; gap: 8px; }
.dns-live td .dns-status { min-width: 92px; }
.dns-live tr.just { animation: flash 1.4s ease; }
.auto-dns { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 14px; background: linear-gradient(90deg, var(--accent-soft), var(--surface) 70%); }
.auto-dns .logos { display: flex; gap: 6px; }
.auto-dns .logos i { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: 11px; color: #fff; }
.map-table td select { height: 32px; }
.sample { font-size: 12px; color: var(--text-3); font-family: var(--mono); }
@media (max-width: 1180px) { .builder, .clickmap-wrap { grid-template-columns: 1fr; } .preview-pane { position: static; } .clickmap { border-right: 0; border-bottom: 1px solid var(--border); } .stat-strip { grid-template-columns: repeat(3, 1fr); } .stat-strip > div:nth-child(4) { border-left: 0; } }
@media (max-width: 900px) { .flow { grid-template-columns: 1fr; } .rail { position: static; } .method { grid-template-columns: 1fr; } .tpl-row { grid-template-columns: 1fr 1fr; } }
.rail-foot { display: flex; gap: 8px; align-items: flex-start; }
.rail-foot svg { flex-shrink: 0; margin-top: 2px; }
.method .radio-card { flex-direction: row; align-items: flex-start; }

/* ═══════ Deliverability pages (signals.js) ═══════ */
.ev-note { font-size: 12.5px; color: var(--text-3); line-height: 1.5; margin-top: 8px; }
.ev-note a, .cp-inline a { color: var(--accent-text); font-weight: 600; }
.ev-cap { font-size: 11.5px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.ev-axis { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--text-3); margin-top: 3px; font-family: var(--mono); }
.mbars { width: 100%; height: 74px; display: block; border-bottom: 1px solid var(--border); }

/* Copilot: forecast + chain */
.cpx-hero { padding: 22px 24px 24px; margin-bottom: 16px; }
.cpx-top { display: flex; gap: 20px; align-items: center; margin-bottom: 18px; }
.cpx-num { display: flex; align-items: baseline; gap: 8px; flex-shrink: 0; }
.cpx-num b { font-size: 52px; font-weight: 750; letter-spacing: -.04em; line-height: 1; }
.cpx-num span { font-size: 22px; font-weight: 650; color: var(--s-delivered); letter-spacing: -.02em; }
.cpx-verdict { font-size: 16px; display: block; margin-bottom: 3px; }
.cpx-top p { font-size: 13px; }
.fc-track { position: relative; height: 26px; border-radius: 7px; background: var(--surface-2); overflow: hidden; }
.fc-fill { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: 7px 0 0 7px; }
.fc-seg { position: absolute; top: 0; bottom: 0; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; border-left: 2px solid var(--surface); background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.18) 0 4px, transparent 4px 8px); }
.fc-seg.bad { background-color: var(--s-bounced); } .fc-seg.warn { background-color: var(--s-deferred); }
.fc-now { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text); }
.fc-scale { position: relative; height: 18px; margin-top: 4px; }
.fc-scale span { position: absolute; transform: translateX(-50%); font-size: 11px; color: var(--text-3); font-family: var(--mono); }
.fc-scale span:first-child { transform: none; } .fc-scale span:last-child { transform: translateX(-100%); }
.fc-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 6px; }
.fc-legend a { font-size: 12.5px; color: var(--text-2); display: inline-flex; align-items: center; gap: 7px; }
.fc-legend a:hover { color: var(--text); }
.fc-legend i { width: 10px; height: 10px; border-radius: 3px; }
.fc-legend i.bad { background: var(--s-bounced); } .fc-legend i.warn { background: var(--s-deferred); }
.chain { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: relative; padding: 0; margin: 0; }
.chain::before { content: ''; position: absolute; left: 10%; right: 10%; top: 11px; height: 2px; background: var(--border-strong); }
.ch { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; padding: 0 6px; cursor: pointer; }
.ch-dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 12px; margin-bottom: 6px; box-shadow: 0 0 0 4px var(--surface); }
.ch.ok .ch-dot { background: var(--s-delivered); } .ch.warn .ch-dot { background: var(--s-deferred); } .ch.bad .ch-dot { background: var(--s-bounced); }
.ch b { font-size: 13px; } .ch small { font-size: 12px; color: var(--text-3); line-height: 1.35; }
.ch.bad small { color: var(--s-bounced); } .ch.warn small { color: var(--s-deferred); }
.ch:hover b { color: var(--accent-text); }

.cpx-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.case { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 12px; overflow: hidden; scroll-margin-top: 80px; position: relative; }
.case::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; }
.case.bad::before { background: var(--s-bounced); } .case.warn::before { background: var(--s-deferred); }
.case.flash { animation: caseflash 1.2s ease; }
@keyframes caseflash { 0% { box-shadow: 0 0 0 4px var(--accent-soft); border-color: var(--accent); } 100% { box-shadow: none; } }
.case header { display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px 14px 20px; border-bottom: 1px solid var(--border); }
.case-n { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--text-3); padding-top: 3px; }
.case-area { font-size: 12px; color: var(--text-3); margin-bottom: 2px; }
.case h3 { font-size: 15.5px; font-weight: 650; letter-spacing: -.01em; }
.case-gain { margin-left: auto; text-align: right; font-weight: 700; font-size: 15px; color: var(--s-delivered); white-space: nowrap; }
.case-gain small { display: block; font-size: 11px; font-weight: 500; color: var(--text-3); }
.case-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.case-ev { padding: 16px 18px 18px 20px; background: var(--surface-2); border-right: 1px solid var(--border); }
.case-ev .cp-label, .case-fix .cp-label { margin-top: 0; }
.case-fix { padding: 16px 18px 18px; display: flex; flex-direction: column; }
.case-fix p { font-size: 13px; line-height: 1.55; color: var(--text-2); }
.case-fix .case-why { color: var(--text); margin-bottom: 14px; }
.case-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.case-foot { margin-top: auto; padding-top: 14px; font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.case-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.case-toggle b { font-size: 13px; display: block; } .case-toggle small { font-size: 12px; color: var(--text-3); }
.diff { font-family: var(--mono); font-size: 11.5px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface); }
.dl { padding: 7px 10px; display: flex; gap: 8px; word-break: break-all; }
.dl i { font-style: normal; font-weight: 700; flex-shrink: 0; }
.dl.del { background: var(--s-bounced-bg); color: var(--s-bounced); text-decoration: line-through; text-decoration-color: rgba(220,38,38,.4); }
.dl.add { background: var(--s-delivered-bg); color: var(--s-delivered); }
.proof { margin-top: 12px; display: grid; gap: 7px; }
.pf { display: grid; grid-template-columns: 92px 1fr auto; gap: 10px; align-items: center; font-size: 12px; }
.pf-bar, .sb-bar { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.pf-bar span { display: block; height: 100%; background: var(--s-delivered); }
.pf .mono { font-size: 11px; color: var(--text-3); }
.bursts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.defer-row { display: flex; align-items: flex-end; gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.defer-row > div { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.dr-bar { width: 18px; height: 34px; background: var(--surface-3); border-radius: 4px; display: flex; align-items: flex-end; overflow: hidden; }
.dr-bar span { width: 100%; display: block; }
.defer-row b { font-size: 11px; } .defer-row small { font-size: 10.5px; color: var(--text-3); }
.defer-row p { font-size: 12px; color: var(--text-3); margin-left: 6px; align-self: center; line-height: 1.4; }
.src-bars { display: grid; gap: 10px; }
.sb { display: grid; grid-template-columns: 150px 1fr 24px; gap: 12px; align-items: center; font-size: 12.5px; }
.sb b { display: block; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .sb small { color: var(--text-3); font-size: 11.5px; }
.sb-bar span { display: block; height: 100%; background: var(--s-bounced); border-radius: 99px; }
.sb .mono { text-align: right; font-weight: 600; }
.also { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px 6px; scroll-margin-top: 80px; }
.also .cp-label { margin-top: 0; }
.also-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) 260px; gap: 14px; padding: 12px 0; border-top: 1px solid var(--border); align-items: start; }
.also-row:first-of-type { border-top: 0; }
.also-ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; }
.also-ic.ok { background: var(--s-delivered-bg); color: var(--s-delivered); } .also-ic.info { background: var(--accent-soft); color: var(--accent-text); }
.also-main b { font-size: 13.5px; } .also-main p { font-size: 12.5px; margin-top: 3px; line-height: 1.5; }
.also-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.also-chips span { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; padding: 3px 8px; border-radius: 99px; background: var(--s-delivered-bg); color: var(--s-delivered); font-weight: 550; }
.split { display: flex; height: 22px; border-radius: 6px; overflow: hidden; font-size: 11px; font-weight: 600; }
.split span { display: flex; align-items: center; padding: 0 8px; white-space: nowrap; }
.split .real { background: var(--s-opened); color: #fff; } .split .machine { flex: 1; background: var(--surface-3); color: var(--text-3); background-image: repeating-linear-gradient(135deg, transparent 0 4px, rgba(0,0,0,.04) 4px 8px); }
.ask { position: sticky; top: 76px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.ask-head { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; color: var(--accent-text); }
.ask-head b { color: var(--text); font-size: 14px; display: block; } .ask-head small { font-size: 12px; color: var(--text-3); }
.ask .chat { max-height: 320px; }
.ask .suggest { margin: 10px 0; }

/* Threshold gauge (AWS / Gmail enforcement lines) */
.tg { padding-top: 22px; }
.tg-track { position: relative; height: 12px; border-radius: 99px; background: var(--surface-3); }
.tg-zone { position: absolute; top: 0; bottom: 0; }
.tg-zone:first-child { border-radius: 99px 0 0 99px; } .tg-zone:last-of-type { border-radius: 0 99px 99px 0; }
.tg-zone.z-ok { background: var(--s-delivered-bg); }
.tg-zone.z-warn { background: var(--s-deferred-bg); background-image: repeating-linear-gradient(135deg, transparent 0 5px, rgba(180,83,9,.12) 5px 10px); }
.tg-zone.z-bad { background: var(--s-bounced-bg); background-image: repeating-linear-gradient(135deg, transparent 0 5px, rgba(220,38,38,.16) 5px 10px); }
.tg-zone em { position: absolute; top: -19px; right: 4px; font-style: normal; font-size: 10.5px; font-weight: 600; white-space: nowrap; }
.tg-zone.z-warn em { color: var(--s-deferred); } .tg-zone.z-bad em { color: var(--s-bounced); }
.tg-alert { position: absolute; top: -4px; bottom: -4px; border-left: 2px dashed var(--accent); }
.tg-alert em { position: absolute; top: 18px; left: -2px; transform: translateX(-50%); font-style: normal; font-size: 10px; color: var(--accent-text); white-space: nowrap; font-weight: 600; margin-top: 14px; }
.tg-pin { position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%; background: var(--text); border: 3px solid var(--surface); transform: translate(-50%, -50%); box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.tg-pin b { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); font-size: 11.5px; background: var(--text); color: var(--surface); padding: 2px 6px; border-radius: 5px; white-space: nowrap; }
.tg-scale { position: relative; height: 30px; margin-top: 6px; }
.tg-scale span { position: absolute; transform: translateX(-50%); font-size: 10.5px; color: var(--text-3); font-family: var(--mono); }
.tg-scale span:first-child { transform: none; } .tg-scale span:last-child { transform: translateX(-100%); }

/* Inbox tests: seed matrix */
.seedcard { padding: 20px 22px; }
.seed-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.seed-verdict { font-size: 19px; font-weight: 550; letter-spacing: -.02em; margin-top: 4px; line-height: 1.35; max-width: 760px; }
.seed-verdict b { font-weight: 750; }
.seed-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 16px 0 6px; font-size: 12px; color: var(--text-2); }
.seed-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sd { width: 18px; height: 18px; border-radius: 4px; display: inline-block; position: relative; }
.sd.k-in { background: var(--s-delivered); } .sd.k-tab { background: var(--s-deferred); opacity: .75; } .sd.k-spam { background: var(--s-bounced); } .sd.k-miss { background: transparent; border: 1.5px dashed var(--border-strong); }
.seed-legend .sd { width: 12px; height: 12px; border-radius: 3px; }
.seed-rows { margin-top: 6px; }
.seed-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) minmax(0, 300px) 56px; gap: 16px; align-items: center; padding: 11px 0; border-top: 1px solid var(--border); }
.seed-row.flag { background: linear-gradient(90deg, var(--s-bounced-bg), transparent 60%); margin: 0 -22px; padding-left: 22px; padding-right: 22px; }
.sr-name b { font-size: 13.5px; display: block; } .sr-name small { font-size: 11.5px; color: var(--text-3); }
.sr-cells { display: flex; flex-wrap: wrap; gap: 4px; }
.sr-cells .sd { cursor: default; transition: transform .1s; }
.sr-cells .sd:hover { transform: scale(1.2); z-index: 2; }
.sr-cells .sd:hover::after { content: attr(data-tip); position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%) scale(.84); background: var(--text); color: var(--surface); font-size: 12px; padding: 4px 8px; border-radius: 6px; white-space: nowrap; font-family: var(--mono); }
.sr-folders { display: flex; flex-wrap: wrap; gap: 6px; }
.sr-folders span { font-size: 12px; padding: 3px 8px; border-radius: 6px; background: var(--surface-2); color: var(--text-2); }
.sr-folders span b { margin-left: 2px; }
.sr-folders .k-in b { color: var(--s-delivered); } .sr-folders .k-tab b { color: var(--s-deferred); } .sr-folders .k-spam b { color: var(--s-bounced); }
.sr-folders .k-spam:not(.zero) { background: var(--s-bounced-bg); color: var(--s-bounced); }
.sr-folders .zero { opacity: .55; }
.sr-pct { text-align: right; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.why-group { margin-bottom: 12px; } .why-group .cp-label { margin: 0 0 4px; }
.why-row { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; font-size: 13px; border-bottom: 1px solid var(--border); }
.why-row:last-child { border-bottom: 0; }
.cp-inline { display: flex; gap: 10px; padding: 12px 14px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); font-size: 13px; line-height: 1.5; margin-top: 4px; }
.cp-inline > svg { flex-shrink: 0; margin-top: 2px; } .cp-inline b { color: var(--text); }
.cp-inline div { color: var(--text-2); }
.heatmap { padding: 4px 18px 8px; }
.hm-row { display: grid; grid-template-columns: 150px repeat(6, minmax(0, 1fr)); gap: 4px; align-items: center; margin-bottom: 4px; }
.hm-head span { font-size: 11px; color: var(--text-3); text-align: center; font-weight: 600; }
.hm-name b { font-size: 13px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .hm-name small { font-size: 11.5px; color: var(--text-3); }
.hm-cell { height: 34px; border-radius: 6px; display: grid; place-items: center; font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; }
.hm-cell.h4 { background: var(--s-delivered); color: #fff; } .hm-cell.h3 { background: color-mix(in srgb, var(--s-delivered) 55%, var(--surface)); color: #fff; }
.hm-cell.h2 { background: var(--s-deferred-bg); color: var(--s-deferred); } .hm-cell.h1 { background: color-mix(in srgb, var(--s-deferred) 35%, var(--surface)); color: var(--s-deferred); }
.hm-cell.h0 { background: var(--s-bounced-bg); color: var(--s-bounced); }
.hm-scale { display: flex; align-items: center; gap: 4px; justify-content: flex-end; margin-top: 10px; font-size: 11px; color: var(--text-3); }
.hm-scale .hm-cell { width: 16px; height: 10px; border-radius: 3px; }

/* SES: flow map */
.live-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-2); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--s-delivered); box-shadow: 0 0 0 0 rgba(22,163,74,.5); animation: sl-pulse 1.8s infinite; }
@keyframes sl-pulse { 70% { box-shadow: 0 0 0 7px rgba(22,163,74,0); } 100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); } }
.flowmap { display: grid; grid-template-columns: 1fr 90px 1.35fr 90px 1fr; align-items: center; padding: 18px 20px 6px; }
.fm-node { border: 1px solid var(--border); border-radius: 12px; padding: 14px; background: var(--surface); display: flex; flex-direction: column; gap: 2px; }
.fm-node b { font-size: 14px; } .fm-node small { font-size: 12px; color: var(--text-3); }
.fm-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); margin-bottom: 8px; }
.fm-node.ses .fm-ic { background: #FF9900; color: #fff; }
.fm-link { position: relative; height: 2px; background: var(--border-strong); margin: 0 6px; }
.fm-link::after { content: ''; position: absolute; right: -1px; top: -4px; border: 5px solid transparent; border-left: 7px solid var(--border-strong); border-right: 0; }
.fm-link span { position: absolute; left: 50%; bottom: 7px; transform: translateX(-50%); font-family: var(--mono); font-size: 10.5px; color: var(--text-3); white-space: nowrap; }
.fm-aws { border: 1.5px dashed #FF9900; border-radius: 14px; padding: 30px 12px 12px; position: relative; background: color-mix(in srgb, #FF9900 5%, var(--surface)); }
.fm-aws-label { position: absolute; top: 8px; left: 12px; font-size: 11px; font-weight: 700; color: #C26F00; display: flex; gap: 5px; align-items: center; text-transform: uppercase; letter-spacing: .04em; }
.fm-aws-foot { font-size: 11.5px; color: var(--text-2); margin-top: 10px; line-height: 1.45; }
.fm-return { position: relative; margin: 4px 20px 18px; height: 34px; }
.fm-ret-line { position: absolute; left: 10%; right: 50%; top: 0; height: 16px; border: 2px solid var(--accent); border-top: 0; border-radius: 0 0 10px 10px; opacity: .6; }
.fm-ret-label { position: absolute; left: 10%; top: 20px; font-size: 11.5px; color: var(--accent-text); font-weight: 550; }
.gauges { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--border); margin-top: 14px; }
.gauge-block { padding: 18px 20px 20px; }
.gauge-block + .gauge-block { border-left: 1px solid var(--border); }
.gb-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.gb-head b { font-size: 14px; display: block; } .gb-head small { font-size: 12px; color: var(--text-3); }
.limit { padding: 4px 0 14px; }
.lm-top { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 7px; }
.lm-top span { color: var(--text-2); }
.lm-bar { position: relative; height: 8px; border-radius: 99px; background: var(--surface-3); }
.lm-bar span { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.limit small { display: block; font-size: 12px; color: var(--text-3); margin-top: 6px; line-height: 1.45; }
.receipt { font-size: 13px; border: 1px solid var(--border); border-radius: 10px; padding: 4px 14px; background: var(--surface-2); }
.rc-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--border-strong); font-variant-numeric: tabular-nums; }
.rc-row:last-child { border-bottom: 0; }
.rc-row small { display: block; font-family: var(--mono); font-size: 11px; color: var(--text-3); margin-top: 1px; }
.rc-row > span { font-family: var(--mono); font-weight: 600; }
.rc-row.total { font-size: 14px; } .rc-row.total > span { font-size: 15px; }

/* Migrate */
.mig-calc { display: grid; grid-template-columns: 290px minmax(0, 1fr); }
.mc-inputs { padding: 18px 20px; border-right: 1px solid var(--border); background: var(--surface-2); border-radius: 12px 0 0 12px; }
.mc-out { padding: 18px 20px; min-width: 0; }
.mc-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.mc-save { font-size: 15px; color: var(--text-2); margin-top: 2px; }
.mc-save b { font-size: 26px; font-weight: 750; letter-spacing: -.03em; color: var(--s-delivered); margin-right: 4px; }
.mc-save span { font-size: 13px; color: var(--text-3); margin-left: 6px; }
.mc-key { display: flex; gap: 16px; font-size: 12px; color: var(--text-2); }
.mc-key > span { display: inline-flex; align-items: center; gap: 6px; } .mc-key i { width: 18px; height: 0; display: inline-block; }
.sav-svg { width: 100%; height: auto; display: block; margin-top: 10px; }
.sv-ax { font-size: 10.5px; fill: var(--text-3); font-family: var(--mono); }
.sv-end { font-size: 12px; font-weight: 700; fill: var(--text-3); } .sv-end.ours { fill: var(--accent-text); }
.bills { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
.bill-col { border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; font-size: 13px; }
.bill-col.ours { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.bill-col > small { font-size: 11.5px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }
.bl-row { display: flex; justify-content: space-between; padding: 5px 0; color: var(--text-2); font-variant-numeric: tabular-nums; }
.bl-row.total { border-top: 1px dashed var(--border-strong); margin-top: 4px; padding-top: 8px; color: var(--text); font-weight: 650; }
.switchline { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 18px 20px 22px; margin: 0; position: relative; gap: 18px; }
.switchline::before { content: ''; position: absolute; left: 26px; right: 26px; top: 24px; height: 2px; background: linear-gradient(90deg, var(--accent), var(--s-delivered)); opacity: .5; }
.switchline li { position: relative; }
.sw-dot { display: block; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); margin-bottom: 12px; position: relative; }
.switchline li:last-child .sw-dot { border-color: var(--s-delivered); }
.sw-day { font-family: var(--mono); font-size: 11px; color: var(--text-3); display: block; }
.switchline b { font-size: 14px; display: block; margin: 2px 0 4px; }
.switchline p { font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
.ramp { display: flex; align-items: flex-end; gap: 4px; height: 44px; margin: 10px 0 4px; }
.ramp span { flex: 1; background: var(--accent); opacity: .8; border-radius: 3px 3px 0 0; }
.prov-tabs { display: flex; gap: 6px; flex-wrap: wrap; padding: 14px 18px 0; }
.prov-tabs button { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 7px; border: 1px solid var(--border); border-radius: 99px; background: var(--surface); font-size: 13px; font-weight: 550; color: var(--text-2); }
.prov-tabs button.on { border-color: var(--text); color: var(--text); box-shadow: 0 0 0 1px var(--text); }
.prov-tabs i { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 10.5px; font-weight: 800; }
.cmap { margin: 14px 18px 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.cm-row { display: grid; grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr) minmax(0, 1.2fr); align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--border); font-size: 13px; }
.cm-row:first-child { border-top: 0; }
.cm-from { font-family: var(--mono); font-size: 12px; color: var(--text-2); }
.cm-arrow { color: var(--text-3); display: grid; place-items: center; }
.cm-to { font-weight: 600; }
.cm-note { font-size: 12px; color: var(--text-3); }
.cm-row.no .cm-to { color: var(--text-3); text-decoration: line-through; font-weight: 500; }
.map-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px 18px; flex-wrap: wrap; font-size: 12.5px; }
.map-foot .faint { display: inline-flex; align-items: center; gap: 6px; }

@media (max-width: 1180px) {
  .cpx-layout, .case-grid, .mig-calc, .gauges { grid-template-columns: 1fr; }
  .case-ev { border-right: 0; border-bottom: 1px solid var(--border); }
  .ask { position: static; }
  .gauge-block + .gauge-block { border-left: 0; border-top: 1px solid var(--border); }
  .mc-inputs { border-right: 0; border-bottom: 1px solid var(--border); border-radius: 12px 12px 0 0; }
  .flowmap { grid-template-columns: 1fr; gap: 0; } .fm-link { height: 28px; width: 2px; margin: 0 auto; } .fm-link::after { display: none; } .fm-link span { left: 12px; bottom: 8px; transform: none; } .fm-return { display: none; }
  .seed-row { grid-template-columns: 110px 1fr 50px; } .sr-folders { grid-column: 2 / 4; }
  .also-row { grid-template-columns: 24px 1fr; } .also-viz { grid-column: 2; }
}
@media (max-width: 720px) {
  .chain { grid-template-columns: 1fr; gap: 12px; } .chain::before { display: none; } .ch { flex-direction: row; text-align: left; align-items: center; gap: 10px; } .ch-dot { margin: 0; flex-shrink: 0; }
  .switchline { grid-template-columns: 1fr 1fr; } .switchline::before { display: none; }
  .bills, .bursts { grid-template-columns: 1fr; }
  .cm-row { grid-template-columns: 1fr 20px 1fr; } .cm-note { grid-column: 1 / -1; }
  .hm-row { grid-template-columns: 100px repeat(6, minmax(0, 1fr)); }
}

.tg-scale { height: 18px; }
.tg-legend { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--accent-text); font-weight: 550; margin-top: 2px; }
.tg-legend i { width: 0; height: 12px; border-left: 2px dashed var(--accent); }
.tg-zone.z-ok em { display: none; }

/* ═══════ Automations (journeys.js) ═══════ */
.jgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.jcard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; transition: border-color .15s, box-shadow .15s, transform .15s; color: inherit; }
.jcard:hover { border-color: var(--border-strong); box-shadow: 0 8px 24px rgba(24,24,27,.07); transform: translateY(-1px); }
.jc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 18px 12px; }
.jc-top b { font-size: 15px; }
.jc-trig { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.jc-trig span { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 550; padding: 2px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-text); }
.jc-map { height: 118px; display: grid; place-items: center; background-color: var(--surface-2); background-image: radial-gradient(var(--border-strong) 1px, transparent 1px); background-size: 14px 14px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.jt-svg { width: 280px; max-width: 90%; height: 96px; }
.jc-stats { display: grid; grid-template-columns: repeat(4, 1fr); }
.jc-stats > div { padding: 11px 18px 13px; } .jc-stats > div + div { border-left: 1px solid var(--border); }
.jc-stats small { display: block; font-size: 11.5px; color: var(--text-3); } .jc-stats b { font-size: 16px; font-variant-numeric: tabular-nums; }
.recipes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.recipe { display: flex; flex-direction: column; gap: 6px; padding: 13px 14px; border: 1px dashed var(--border-strong); border-radius: 12px; background: var(--surface); color: inherit; transition: border-color .15s, background .15s; }
.recipe:hover { border-style: solid; border-color: var(--accent); background: var(--accent-soft); }
.recipe b { font-size: 13.5px; }
.rc-trig { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--accent-text); }
.rc-steps { display: flex; align-items: center; gap: 4px; }
.rc-steps i { width: 14px; height: 8px; border-radius: 3px; background: var(--border-strong); position: relative; }
.rc-steps i + i { margin-left: 6px; } .rc-steps i + i::before { content: ''; position: absolute; right: 100%; top: 3.5px; width: 6px; height: 1px; background: var(--border-strong); }
.rc-steps i.last { background: var(--s-delivered); }
.rc-steps small { font-size: 11px; color: var(--text-3); margin-left: 6px; }

/* full-screen editor mode */
body.canvas-mode .shell { display: block; }
body.canvas-mode .sidebar, body.canvas-mode .topbar { display: none; }
body.canvas-mode .content { padding: 0; max-width: none; height: 100vh; }
.jx { height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.jx-bar { height: 58px; flex-shrink: 0; display: flex; align-items: center; gap: 12px; padding: 0 14px; border-bottom: 1px solid var(--border); background: var(--surface); z-index: 5; }
.jx-bar .spacer { flex: 1; }
.jx-back { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: var(--text-2); border: 1px solid var(--border); }
.jx-back svg { transform: scaleX(-1); } .jx-back:hover { color: var(--text); background: var(--surface-2); }
.jx-name input { border: 0; background: transparent; font: inherit; font-size: 15px; font-weight: 650; color: var(--text); padding: 2px 4px; border-radius: 6px; width: 260px; }
.jx-name input:hover, .jx-name input:focus { background: var(--surface-2); outline: none; }
.jx-name small { display: block; font-size: 11.5px; color: var(--text-3); padding-left: 4px; }
.jx-tabs { margin-left: 8px; }
.jx-live { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); cursor: pointer; user-select: none; }
.jx-live input { display: none; }
.switch-sm { width: 28px; height: 16px; border-radius: 99px; background: var(--border-strong); position: relative; transition: .2s; }
.switch-sm::after { content: ''; position: absolute; left: 2px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: .2s; }
.jx-live input:checked + .switch-sm { background: var(--s-delivered); } .jx-live input:checked + .switch-sm::after { left: 14px; }
.jx-status { display: inline-flex; align-items: center; gap: 9px; padding: 6px 8px 6px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 13px; font-weight: 600; cursor: pointer; }
.jx-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.jx-status.on { border-color: color-mix(in srgb, var(--s-delivered) 40%, var(--border)); background: var(--s-delivered-bg); color: var(--s-delivered); }
.jx-status.on .dot { background: var(--s-delivered); box-shadow: 0 0 0 3px color-mix(in srgb, var(--s-delivered) 25%, transparent); }
.jx-body { flex: 1; position: relative; min-height: 0; }
.jx-canvas { position: absolute; inset: 0; overflow: hidden; cursor: grab; background-color: var(--bg); background-image: radial-gradient(color-mix(in srgb, var(--text-3) 45%, transparent) 1.1px, transparent 1.2px); user-select: none; }
.jx-canvas.panning { cursor: grabbing; }
.jx-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.jx-edges { position: absolute; left: 0; top: 0; overflow: visible; }
.e-hit { fill: none; stroke: transparent; stroke-width: 22; cursor: pointer; }
.e-line { fill: none; stroke-linecap: round; opacity: .55; transition: opacity .15s; }
.e-arrow { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: .8; }
.e-flow { fill: none; stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 2 16; animation: eflow 1.1s linear infinite; opacity: .85; }
@keyframes eflow { to { stroke-dashoffset: -18; } }
.edge:hover .e-line { opacity: .95; }
.e-label { display: flex; justify-content: center; } .e-label { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 99px; width: max-content; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); }
.e-label.yes { color: var(--s-delivered); border-color: color-mix(in srgb, var(--s-delivered) 35%, var(--border)); } .e-label.no { color: var(--s-deferred); border-color: color-mix(in srgb, var(--s-deferred) 35%, var(--border)); }
.e-count { font-size: 10.5px; font-family: var(--mono); color: var(--text-3); text-align: center; }
.e-plus-wrap { opacity: 0; transition: opacity .15s; } .edge:hover .e-plus-wrap { opacity: 1; }
.e-plus { width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--accent); background: var(--surface); color: var(--accent-text); font-size: 16px; font-weight: 600; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px rgba(91,91,247,.25); }
.e-plus:hover { background: var(--accent); color: #fff; }
.nd { position: absolute; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 14px; box-shadow: 0 1px 2px rgba(24,24,27,.05), 0 4px 14px rgba(24,24,27,.05); cursor: pointer; transition: box-shadow .15s, border-color .15s; }
.nd:hover { border-color: var(--text-3); box-shadow: 0 6px 22px rgba(24,24,27,.1); }
.nd.nd-sel { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), 0 8px 26px rgba(91,91,247,.18); }
.nd.dragging { cursor: grabbing; box-shadow: 0 16px 40px rgba(24,24,27,.18); opacity: .95; z-index: 3; }
.nd.t-trigger { border-radius: 40px 14px 14px 40px; }
.nd.t-trigger .nd-main { padding-left: 14px; }
.nd.t-trigger .nd-ic { border-radius: 50%; }
.nd.t-goal { border-color: color-mix(in srgb, var(--s-delivered) 45%, var(--border)); }
.nd.t-goal .nd-main::after { content: '🏁'; font-size: 13px; margin-left: auto; }
.nd.t-exit { border-style: dashed; }
.nd.nd-empty { border: 2px dashed var(--accent); background: color-mix(in srgb, var(--accent) 4%, var(--surface)); animation: ndpulse 2s ease-in-out infinite; }
@keyframes ndpulse { 50% { box-shadow: 0 0 0 7px var(--accent-soft); } }
.nd-main { display: flex; align-items: center; gap: 11px; padding: 12px 13px; }
.nd-ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; }
.nd-txt { min-width: 0; display: flex; flex-direction: column; }
.nd-txt small { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); display: inline-flex; align-items: center; gap: 3px; }
.nd.t-trigger .nd-txt small { color: var(--accent-text); }
.nd-txt b { font-size: 13.5px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nd-txt span { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nd-stats { display: flex; border-top: 1px solid var(--border); }
.nd-stats span { flex: 1; padding: 7px 10px; font-size: 10.5px; color: var(--text-3); display: flex; flex-direction: column; }
.nd-stats span + span { border-left: 1px solid var(--border); }
.nd-stats b { font-size: 13px; color: var(--text); font-variant-numeric: tabular-nums; }
.nd-badge { position: absolute; top: -10px; right: 12px; font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--text); color: var(--surface); }
.nd-port { position: absolute; top: 50%; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--border-strong); transform: translateY(-50%); }
.nd-port.in { left: -7px; } .nd-port.out { right: -7px; }
.nd:hover .nd-port, .nd.nd-sel .nd-port { border-color: var(--accent); }
.jx-tools { position: absolute; left: 16px; bottom: 16px; display: flex; align-items: center; gap: 2px; background: var(--surface); border: 1px solid var(--border); border-radius: 11px; padding: 4px; box-shadow: 0 4px 14px rgba(24,24,27,.06); z-index: 4; }
.jx-tools button { width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent; color: var(--text-2); display: grid; place-items: center; cursor: pointer; }
.jx-tools button:hover { background: var(--surface-2); color: var(--text); }
.jx-tools span { font-size: 11.5px; font-family: var(--mono); color: var(--text-3); width: 44px; text-align: center; }
.jx-add { position: absolute; right: 16px; top: 16px; width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 18px rgba(91,91,247,.35); z-index: 4; transition: transform .15s; }
.jx-add:hover { transform: scale(1.05); }
.jx-mini { position: absolute; right: 16px; bottom: 16px; width: 180px; height: 110px; border: 1px solid var(--border); border-radius: 10px; background: color-mix(in srgb, var(--surface) 92%, transparent); box-shadow: 0 4px 14px rgba(24,24,27,.06); overflow: hidden; z-index: 4; }
.jx-hint { position: absolute; left: 50%; top: 16px; transform: translateX(-50%); font-size: 12px; color: var(--text-3); background: var(--surface); border: 1px solid var(--border); border-radius: 99px; padding: 6px 14px; transition: opacity .6s; pointer-events: none; z-index: 3; }
.jx-hint.gone { opacity: 0; }
.jx-panel { position: absolute; top: 12px; bottom: 12px; width: 320px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 12px 40px rgba(24,24,27,.12); display: flex; flex-direction: column; overflow: hidden; z-index: 6; transition: transform .22s ease, opacity .22s; }
.jx-panel.left { left: 12px; transform: translateX(calc(-100% - 20px)); opacity: 0; }
.jx-panel.right { right: 12px; width: 380px; transform: translateX(calc(100% + 20px)); opacity: 0; }
.jx-panel.open { transform: none; opacity: 1; }
body.canvas-mode .jx-panel.right.open ~ .jx-add, .jx-body:has(.jx-panel.right.open) .jx-add { right: 404px; }
.jx-body:has(.jx-panel.right.open) .jx-mini { right: 404px; }
.jx-body:has(.jx-panel.left.open) .jx-tools { left: 344px; }
.pl-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 12px 8px; }
.pl-search { margin: 0 12px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 9px; padding: 0 10px; color: var(--text-3); }
.pl-search input { border: 0; background: transparent; height: 34px; flex: 1; font: inherit; font-size: 13px; color: var(--text); outline: none; }
.pl-note { font-size: 12px; color: var(--text-3); padding: 10px 14px 4px; line-height: 1.45; }
.pl-list { overflow-y: auto; padding: 4px 8px 12px; flex: 1; }
.pl-group { margin-top: 8px; }
.pl-label { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); padding: 6px 8px; }
.pl-label span { margin-left: auto; font-weight: 600; }
.pl-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px; border: 0; border-radius: 9px; background: transparent; text-align: left; cursor: pointer; color: var(--text); }
.pl-item:hover { background: var(--surface-2); }
.pl-item b { font-size: 13px; display: block; } .pl-item small { font-size: 11.5px; color: var(--text-3); display: block; }
.pl-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; }
.pl-ic.trig { background: var(--accent-soft); color: var(--accent-text); border-radius: 50%; }
.in-head { display: flex; align-items: center; gap: 11px; padding: 14px 14px 12px; border-bottom: 1px solid var(--border); }
.in-head small { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); display: block; }
.in-head b { font-size: 14.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.in-head .icon-btn { margin-left: auto; }
.in-strip { display: flex; gap: 16px; padding: 9px 16px; background: var(--surface-2); font-size: 12px; color: var(--text-3); border-bottom: 1px solid var(--border); }
.in-strip b { color: var(--text); }
.in-body { padding: 16px; overflow-y: auto; overflow-x: hidden; flex: 1; min-width: 0; }
.in-foot { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); }
.rule { display: flex; gap: 6px; } .rule select, .rule input { flex: 1; min-width: 0; }
.link-btn { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; color: var(--accent-text); font-size: 12.5px; font-weight: 600; margin-top: 8px; cursor: pointer; padding: 0; }
.radio-cards.compact .radio-card { padding: 9px 12px; }
.day-pills { display: flex; gap: 5px; } .day-pills span { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border); display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--text-3); }
.day-pills span.on { background: var(--accent-soft); border-color: transparent; color: var(--accent-text); }
.ins-mail { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-bottom: 14px; }
.im-bar { display: flex; gap: 4px; padding: 7px 9px; background: var(--surface-2); border-bottom: 1px solid var(--border); } .im-bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--border-strong); }
.im-body { padding: 14px 16px; background: #fff; }
.im-logo { font-weight: 800; font-size: 12px; color: #18181B; margin-bottom: 10px; }
.im-h { font-weight: 700; font-size: 14px; color: #18181B; margin-bottom: 8px; }
.im-l { height: 6px; border-radius: 3px; background: #E4E4E7; margin-bottom: 5px; } .im-l.short { width: 60%; }
.im-btn { width: 96px; height: 22px; border-radius: 6px; background: #5B5BF7; margin-top: 10px; }
.ins-funnel, .ins-branches { display: grid; gap: 8px; }
.ins-funnel > div, .ins-branches > div { display: grid; grid-template-columns: 72px 1fr 52px; gap: 10px; align-items: center; font-size: 12.5px; }
.ins-funnel b, .ins-branches b { text-align: right; font-variant-numeric: tabular-nums; }
.if-bar { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; } .if-bar span { display: block; height: 100%; background: var(--s-opened); border-radius: 99px; }
.ins-branches .yes .if-bar span { background: var(--s-delivered); } .ins-branches .no .if-bar span { background: var(--s-deferred); }
.ins-big { margin-top: 12px; padding: 14px; border-radius: 10px; background: var(--s-delivered-bg); } .ins-big b { font-size: 26px; color: var(--s-delivered); display: block; letter-spacing: -.02em; } .ins-big span { font-size: 12.5px; color: var(--text-2); }
@media (max-width: 1100px) { .jgrid { grid-template-columns: 1fr; } .recipes { grid-template-columns: repeat(2, 1fr); } .jx-tabs, .jx-live { display: none; } }
@media (max-width: 720px) { .jx-panel, .jx-panel.right { width: auto; left: 8px; right: 8px; } .jx-mini, #testj { display: none; } .jc-stats { grid-template-columns: repeat(2, 1fr); } }

/* journeys v2: connections + inspector */
.jx-links { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; }
.e-temp { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-dasharray: 6 5; stroke-linecap: round; }
.jx-canvas.linking, .jx-canvas.linking .nd { cursor: crosshair; }
.nd.drop-ok { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.nd.drop-ok .nd-port.in { background: var(--accent); border-color: var(--accent); transform: translateY(-50%) scale(1.3); }
.nd-port { width: 14px; height: 14px; cursor: crosshair; transition: transform .12s, background .12s; z-index: 2; }
.nd-port::after { content: ''; position: absolute; inset: -9px; border-radius: 50%; }
.nd-port.in { left: -8px; } .nd-port.out { right: -8px; }
.nd-port:hover { transform: translateY(-50%) scale(1.35); background: var(--accent); border-color: var(--accent); }
.e-acts { display: flex; gap: 6px; justify-content: center; }
.e-plus.del { border-color: var(--border-strong); color: var(--text-3); box-shadow: none; }
.e-plus.del:hover { background: var(--s-bounced); border-color: var(--s-bounced); color: #fff; }
.pl-note.on { color: var(--accent-text); background: var(--accent-soft); margin: 10px 12px 0; border-radius: 8px; padding: 8px 10px; }
.in-tabs { display: flex; align-items: center; gap: 4px; padding: 0 12px; border-bottom: 1px solid var(--border); }
.in-tabs button { border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--text-3); padding: 11px 6px; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; }
.in-tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
.in-count { margin-left: auto; font-size: 11.5px; color: var(--text-3); } .in-count b { color: var(--text); }
.ins-sec { margin-bottom: 18px; }
.ins-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); margin-bottom: 8px; }
.ins-help { font-size: 12px; color: var(--text-3); line-height: 1.5; margin-top: 8px; }
.ins-empty { text-align: center; padding: 30px 12px; color: var(--accent-text); }
.ins-empty b { display: block; color: var(--text); font-size: 14px; margin: 10px 0 4px; } .ins-empty p { font-size: 12.5px; color: var(--text-3); line-height: 1.5; }
.trig-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: linear-gradient(135deg, var(--accent-soft), color-mix(in srgb, var(--accent-soft) 30%, var(--surface))); border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--border)); margin-bottom: 18px; }
.tc-ic { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.tc-txt { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.tc-txt small { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent-text); }
.tc-txt b { font-size: 14px; } .tc-txt span { font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hook { display: flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-2); }
.hook .mono { font-size: 11.5px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tok-line { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; padding: 6px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 6px; position: relative; padding-right: 30px; }
.tok { display: inline-flex; align-items: center; gap: 4px; border: 0; font: inherit; font-size: 12.5px; font-weight: 600; padding: 4px 8px; border-radius: 6px; cursor: pointer; max-width: 100%; }
.tok svg { opacity: .55; transform: rotate(90deg); }
.tok.k { background: var(--s-processing-bg); color: var(--s-processing); }
.tok.op { background: var(--surface-2); color: var(--text-2); font-weight: 500; }
.tok.v { background: var(--accent-soft); color: var(--accent-text); }
.tok.join { background: none; color: var(--text-3); font-weight: 500; padding: 4px 2px; cursor: default; }
.tok-x { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border: 0; background: none; color: var(--text-3); border-radius: 6px; display: grid; place-items: center; cursor: pointer; opacity: 0; }
.tok-line:hover .tok-x { opacity: 1; } .tok-x:hover { background: var(--surface-2); color: var(--s-bounced); }
.rhythms { display: grid; gap: 6px; }
.rh { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); cursor: pointer; color: var(--text-3); font: inherit; }
.rh:hover { border-color: var(--border-strong); }
.rh.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.rh-txt { flex: 1; min-width: 0; } .rh-txt b { display: block; font-size: 13px; color: var(--text); } .rh-txt small { font-size: 11.5px; color: var(--text-3); }
.rh-viz { flex-shrink: 0; display: flex; }
.mail-frame { position: relative; height: 230px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 16px; background: #F4F4F5; }
.mail-frame iframe { width: 200%; height: 200%; border: 0; transform: scale(.5); transform-origin: 0 0; pointer-events: none; }
.mail-frame::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 50px; background: linear-gradient(transparent, rgba(244,244,245,.95)); }
.mf-edit { position: absolute; right: 10px; bottom: 10px; z-index: 1; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kpis > div { padding: 10px; border: 1px solid var(--border); border-radius: 10px; }
.kpis b { display: block; font-size: 17px; letter-spacing: -.02em; } .kpis small { font-size: 11.5px; color: var(--text-3); }
.kb { display: block; height: 4px; border-radius: 99px; background: var(--surface-3); margin-top: 6px; overflow: hidden; } .kb span { display: block; height: 100%; background: var(--s-opened); }
.payload { font-family: var(--mono); font-size: 11.5px; line-height: 1.6; background: #18181B; color: #D4D4D8; border-radius: 10px; padding: 12px 14px; white-space: pre-wrap; word-break: break-all; }
.payload i { font-style: normal; color: #A5A5FF; }
.recent { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 12.5px; }
.recent:last-child { border-bottom: 0; }
.recent > div { flex: 1; min-width: 0; } .recent b { display: block; font-size: 12.5px; } .recent small { font-size: 11.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.recent > span { font-size: 11.5px; color: var(--text-3); white-space: nowrap; }
.recent .avatar-c { width: 28px; height: 28px; font-size: 11px; flex-shrink: 0; }
.jx-panel:not(.open) { pointer-events: none; }
.recent .avatar-c { color: #fff; display: grid; place-items: center; border-radius: 50%; font-weight: 700; }

/* ═══════ Email builder (builder.js) ═══════ */
.eb { height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.eb-title { font-size: 15px; display: block; padding: 2px 4px; }
.eb-undo { display: flex; gap: 2px; margin-left: 8px; } .eb-undo .icon-btn:disabled { opacity: .35; cursor: default; }
.eb-bar .seg button { display: inline-flex; align-items: center; gap: 6px; }
.eb-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 336px minmax(0, 1fr) 340px; }
.eb-left { display: grid; grid-template-columns: 64px 1fr; border-right: 1px solid var(--border); background: var(--surface); min-height: 0; }
.eb-rail { display: flex; flex-direction: column; gap: 4px; padding: 10px 6px; border-right: 1px solid var(--border); }
.eb-rail button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 9px 2px; border: 0; background: none; border-radius: 10px; color: var(--text-3); font: inherit; font-size: 10.5px; font-weight: 600; cursor: pointer; }
.eb-rail button:hover { color: var(--text); background: var(--surface-2); }
.eb-rail button.on { color: var(--accent-text); background: var(--accent-soft); }
.eb-lib { overflow-y: auto; padding: 14px 14px 24px; }
.lib-head b { font-size: 14px; display: block; } .lib-head small { font-size: 12px; color: var(--text-3); line-height: 1.45; display: block; margin-top: 2px; }
.lib-group { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); margin: 16px 0 8px; }
.lib-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.lib-tile { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 12px 4px 10px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); cursor: grab; font: inherit; font-size: 11.5px; font-weight: 550; color: var(--text-2); transition: border-color .12s, box-shadow .12s, transform .12s; }
.lib-tile:hover { border-color: var(--accent); color: var(--text); box-shadow: 0 4px 12px rgba(91,91,247,.12); transform: translateY(-1px); }
.lt-g { height: 26px; display: grid; place-items: center; color: var(--text); }
.g-lines { display: grid; gap: 3px; width: 26px; } .g-lines i { height: 3px; border-radius: 2px; background: var(--text-3); width: 100%; }
.g-img { width: 30px; height: 22px; border-radius: 5px; background: linear-gradient(135deg, #8B8BFA, #C4B5FD); display: grid; place-items: center; font-size: 9px; color: #fff; }
.g-btn { width: 30px; height: 12px; border-radius: 4px; background: var(--accent); }
.g-div { width: 30px; border-top: 2px solid var(--text-3); }
.g-sp { font-size: 15px; color: var(--text-3); }
.g-soc { display: flex; gap: 3px; } .g-soc i { width: 8px; height: 8px; border-radius: 50%; background: var(--text-2); }
.g-prod { display: grid; gap: 3px; justify-items: center; } .g-prod i { width: 20px; height: 14px; border-radius: 3px; background: #C4B5FD; } .g-prod b { width: 20px; height: 4px; border-radius: 2px; background: var(--accent); }
.g-coupon { font: 700 10px var(--mono); border: 1.5px dashed var(--accent); border-radius: 4px; padding: 2px 4px; color: var(--accent-text); }
.g-menu { display: flex; gap: 3px; } .g-menu i { width: 8px; height: 3px; border-radius: 2px; background: var(--text-2); }
.g-foot { display: grid; gap: 3px; justify-items: center; width: 28px; } .g-foot i { height: 3px; width: 100%; border-radius: 2px; background: var(--text-3); }
.lib-rows { display: grid; gap: 8px; margin-top: 14px; }
.lib-row { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); cursor: grab; font: inherit; text-align: left; }
.lib-row:hover { border-color: var(--accent); }
.lr-cols { display: flex; gap: 5px; height: 30px; } .lr-cols i { border: 1.5px dashed var(--border-strong); border-radius: 6px; background: var(--surface-2); }
.lib-row:hover .lr-cols i { border-color: var(--accent); background: var(--accent-soft); }
.lib-row small { font-size: 11.5px; color: var(--text-3); font-weight: 600; }
.lib-note { font-size: 12px; color: var(--text-3); margin-top: 14px; display: flex; gap: 6px; line-height: 1.45; }
.lib-sec { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); margin-top: 8px; cursor: grab; font: inherit; text-align: left; }
.lib-sec:hover { border-color: var(--accent); box-shadow: 0 4px 12px rgba(91,91,247,.1); }
.lib-sec b { font-size: 13px; display: block; } .lib-sec small { font-size: 11.5px; color: var(--text-3); }
.ls-thumb { width: 74px; height: 52px; flex-shrink: 0; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); padding: 6px; display: flex; flex-wrap: wrap; gap: 3px; align-content: center; justify-content: center; }
.ls-thumb i { display: block; border-radius: 3px; }
.st-logo { width: 18px; height: 6px; background: var(--text); } .st-menu { width: 30px; height: 4px; background: var(--text-3); margin-left: auto; }
.st-hero { width: 100%; height: 20px; background: linear-gradient(135deg, #8B8BFA, #C4B5FD); } .st-h { width: 70%; height: 4px; background: var(--text); } .st-btn { width: 24px; height: 6px; background: var(--accent); }
.st-3 { width: 18px; height: 30px; background: var(--border-strong); } .st-2 { width: 28px; height: 32px; background: #DDD6FE; }
.st-q { width: 100%; height: 26px; border-left: 3px solid var(--accent); background: var(--surface); }
.st-cta { width: 100%; height: 32px; background: var(--accent); } .st-cp { width: 46px; height: 22px; border: 2px dashed var(--accent); }
.st-ft { width: 100%; height: 24px; background: repeating-linear-gradient(transparent 0 5px, var(--border-strong) 5px 7px); }
.brand-pull { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 11px; background: var(--accent-soft); margin: 14px 0 16px; color: var(--accent-text); }
.brand-pull b { display: block; font-size: 13px; color: var(--text); } .brand-pull small { font-size: 11.5px; color: var(--text-2); } .brand-pull > div { flex: 1; min-width: 0; }
.ebf { margin-bottom: 16px; } .ebf > label { display: block; font-size: 12px; font-weight: 650; color: var(--text-2); margin-bottom: 6px; }
.ebf small { display: block; font-size: 11.5px; color: var(--text-3); margin-top: 5px; line-height: 1.45; }
.ebf-c { display: flex; align-items: center; gap: 8px; } .ebf-c > input:not([type=range]):not([type=checkbox]), .ebf-c > select, .ebf-c > textarea { width: 100%; }
.ebf-c input[type=range] { flex: 1; accent-color: var(--accent); }
.range-v { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); width: 42px; text-align: right; }
.ebf-tip { font-size: 12px; color: var(--text-3); line-height: 1.5; background: var(--surface-2); border-radius: 9px; padding: 9px 11px; margin-bottom: 16px; }
.ebf-lock { display: flex; gap: 6px; font-size: 12px; color: var(--s-delivered); background: var(--s-delivered-bg); border-radius: 9px; padding: 9px 11px; margin-bottom: 16px; line-height: 1.45; }
.eb-seg { display: inline-flex; background: var(--surface-2); border-radius: 9px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.eb-seg button { border: 0; background: none; padding: 6px 10px; border-radius: 7px; font: inherit; font-size: 12px; font-weight: 600; color: var(--text-3); cursor: pointer; display: grid; place-items: center; }
.eb-seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.color-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; } .color-grid.one { grid-template-columns: 1fr; }
.cf { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.cf input[type=color] { width: 26px; height: 26px; border: 0; padding: 0; border-radius: 7px; background: none; cursor: pointer; flex-shrink: 0; }
.cf input[type=color]::-webkit-color-swatch-wrapper { padding: 0; } .cf input[type=color]::-webkit-color-swatch { border: 1px solid rgba(0,0,0,.12); border-radius: 7px; }
.cf b { display: block; font-size: 12px; } .cf small { font-size: 10.5px; color: var(--text-3); }
.pad4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; width: 100%; } .pad4.pad2 { grid-template-columns: 1fr 1fr; }
.pad4 label { position: relative; } .pad4 input { width: 100%; padding-right: 22px; font-family: var(--mono); font-size: 12px; }
.pad4 small { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); margin: 0; font-size: 10px; color: var(--text-3); }
.asset-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.asset-grid button { aspect-ratio: 1; border: 1.5px solid var(--border); border-radius: 9px; padding: 3px; background: var(--surface-2); cursor: pointer; overflow: hidden; display: grid; place-items: center; color: var(--text-3); }
.asset-grid img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.asset-grid button.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.asset-up { border-style: dashed !important; }
.soc-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.soc-pick label { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 9px; font-size: 12px; cursor: pointer; opacity: .55; }
.soc-pick label.on { opacity: 1; border-color: var(--border-strong); } .soc-pick input { display: none; } .soc-pick span { margin: 0 !important; }
.lay-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.lay-pick button { display: flex; gap: 3px; height: 34px; padding: 5px; border: 1.5px solid var(--border); border-radius: 9px; background: var(--surface); cursor: pointer; }
.lay-pick i { background: var(--surface-3); border-radius: 3px; } .lay-pick button.on { border-color: var(--accent); } .lay-pick button.on i { background: var(--accent-soft); }

/* stage */
.eb-stage { overflow: auto; position: relative; background-color: var(--surface-2); background-image: radial-gradient(color-mix(in srgb, var(--text-3) 30%, transparent) 1px, transparent 1px); background-size: 20px 20px; }
.eb-stage-in { position: relative; min-height: 100%; padding: 32px 24px 80px; display: flex; flex-direction: column; align-items: center; }
.eb-frame { border-radius: 16px; padding: 0 0 28px; box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 12px 40px rgba(24,24,27,.08); border: 1px solid var(--border); overflow: visible; transition: width .2s; }
.eb-frame.mobile { border-radius: 38px; padding: 10px 10px 30px; border: 8px solid #18181B; }
.eb-phone-top { height: 26px; display: grid; place-items: center; } .eb-phone-top i { width: 90px; height: 20px; border-radius: 12px; background: #18181B; }
.eb-inbox-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid rgba(0,0,0,.06); background: rgba(255,255,255,.75); border-radius: 16px 16px 0 0; font-size: 13px; color: #18181B; margin-bottom: 24px; }
.eb-av { width: 32px; height: 32px; border-radius: 50%; background: #18181B; color: #fff; display: grid; place-items: center; font-weight: 700; flex-shrink: 0; }
.eb-subj { font-size: 13px; margin-top: 1px; color: #3F3F46; } .eb-inbox-head .faint { color: #8A8A93; }
.eb-email { margin: 0 auto; border-radius: 12px; position: relative; color: #3F3F46; transition: width .2s; }
.eb-frame:not(.mobile) .eb-email { margin: 0 28px; }
.eb-frame.dark .eb-email, .eb-frame.dark .eb-inbox-head { filter: invert(.93) hue-rotate(180deg); }
.eb-frame.dark .eb-email img, .eb-frame.dark .eb-email .g-keep { filter: invert(1) hue-rotate(180deg); }
.eb-frame.dark { background: #111113 !important; }
.eb-email img { max-width: 100%; }
.eb-row { position: relative; outline: 1px dashed transparent; outline-offset: -1px; transition: outline-color .1s; }
.eb-row:first-of-type { border-radius: 12px 12px 0 0; } .eb-row:nth-last-child(2) { border-radius: 0 0 12px 12px; }
.eb-row:hover { outline-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.eb-row.sel { outline: 2px solid var(--accent); z-index: 2; }
.eb-row.hidden-here { opacity: .4; }
.eb-hidden-note { position: absolute; right: 8px; top: 8px; font: 600 11px var(--font); color: var(--s-deferred); background: var(--s-deferred-bg); padding: 2px 8px; border-radius: 99px; z-index: 3; }
.eb-row-tools { position: absolute; left: -1px; top: -27px; height: 26px; display: none; align-items: center; gap: 1px; padding: 0 4px; background: var(--accent); color: #fff; border-radius: 8px 8px 0 0; font: 600 11px var(--font); z-index: 6; white-space: nowrap; }
.eb-row:hover > .eb-row-tools, .eb-row.sel > .eb-row-tools { display: flex; }
.eb-row-tools button, .eb-row-tools .rt-drag { width: 22px; height: 22px; display: grid; place-items: center; border: 0; background: none; color: #fff; border-radius: 5px; cursor: pointer; font-size: 12px; }
.eb-row-tools .rt-drag { cursor: grab; } .eb-row-tools button:hover, .eb-row-tools .rt-drag:hover { background: rgba(255,255,255,.2); }
.eb-row-tools .rt-label { padding: 0 6px; } .eb-row-tools .danger:hover { background: var(--s-bounced); }
.eb-cols { display: flex; gap: 0; }
.eb-cell { min-width: 0; position: relative; min-height: 20px; }
.eb-cols > .eb-cell + .eb-cell { box-shadow: inset 1px 0 0 transparent; }
.eb-row:hover .eb-cols > .eb-cell + .eb-cell { box-shadow: inset 1px 0 0 color-mix(in srgb, var(--accent) 25%, transparent); }
.eb-empty-cell { margin: 8px 16px; border: 1.5px dashed var(--border-strong); border-radius: 10px; padding: 22px 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; font: 600 12px var(--font); color: var(--text-3); background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.eb-blk { position: relative; cursor: pointer; outline: 1.5px solid transparent; outline-offset: -1.5px; border-radius: 4px; }
.eb-blk:hover { outline-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.eb-blk.sel { outline: 2px solid var(--accent); z-index: 3; cursor: default; }
.eb-blk-tools { position: absolute; right: 4px; top: -24px; display: none; align-items: center; gap: 1px; background: #18181B; color: #fff; border-radius: 7px; padding: 2px 3px; z-index: 7; font: 600 11px var(--font); }
.eb-blk:hover > .eb-blk-tools, .eb-blk.sel > .eb-blk-tools { display: flex; }
.eb-blk-tools .bt-name { padding: 0 6px; color: #A1A1AA; }
.eb-blk-tools button, .eb-blk-tools .bt-drag { width: 22px; height: 20px; display: grid; place-items: center; border: 0; background: none; color: #fff; border-radius: 5px; cursor: pointer; }
.eb-blk-tools .bt-drag { cursor: grab; } .eb-blk-tools button:hover, .eb-blk-tools .bt-drag:hover { background: rgba(255,255,255,.18); } .eb-blk-tools .danger:hover { background: var(--s-bounced); }
.eb-blk.sel .eb-edit { cursor: text; outline: none; }
.eb-blk.sel .eb-edit:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent); border-radius: 3px; }
.mtag { display: inline-block; padding: 0 7px; border-radius: 99px; background: #EEEEFE; color: #4343D6; font-size: .82em; font-weight: 650; font-style: normal; line-height: 1.5; vertical-align: baseline; }
.eb-add-row { margin: 14px auto 0; width: max-content; display: flex; align-items: center; gap: 6px; padding: 8px 16px; border: 1.5px dashed var(--border-strong); border-radius: 99px; font: 600 12.5px var(--font); color: var(--text-3); cursor: pointer; background: var(--surface); }
.eb-add-row:hover { border-color: var(--accent); color: var(--accent-text); }
.eb-ind { position: absolute; height: 4px; border-radius: 4px; background: var(--accent); display: none; pointer-events: none; z-index: 20; box-shadow: 0 0 0 3px var(--accent-soft); }
.eb-ind.on { display: block; }
.eb-ind::after { content: attr(data-label); position: absolute; left: 50%; top: -11px; transform: translateX(-50%); background: var(--accent); color: #fff; font: 700 10.5px var(--font); padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.eb-ind.rows { height: 4px; }
body.eb-dragging .eb-empty-cell { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); }
.fmt-bar { position: absolute; z-index: 30; display: none; align-items: center; gap: 2px; padding: 4px; background: #18181B; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.fmt-bar.on { display: flex; }
.fmt-bar button { min-width: 30px; height: 28px; border: 0; background: none; color: #fff; border-radius: 7px; cursor: pointer; font-size: 13px; display: grid; place-items: center; padding: 0 8px; font-family: var(--font); }
.fmt-bar button:hover { background: rgba(255,255,255,.15); }
.fmt-sep { width: 1px; height: 18px; background: rgba(255,255,255,.2); margin: 0 3px; }
.fmt-note { color: #A1A1AA; font-size: 12px; padding: 0 8px; }
.merge-menu { position: absolute; top: 38px; right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-pop); padding: 4px; width: 220px; }
.merge-menu button { width: 100%; display: flex; flex-direction: column; align-items: flex-start; height: auto; padding: 7px 9px; color: var(--text); border-radius: 7px; }
.merge-menu button:hover { background: var(--surface-2); } .merge-menu small { font-size: 11px; color: var(--text-3); }
.eb-code { width: 100%; max-width: 980px; background: #18181B; border-radius: 14px; overflow: hidden; }
.ec-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #27272A; color: #fff; font-size: 13px; } .ec-head .faint { flex: 1; color: #A1A1AA; font-size: 12px; }
.eb-code pre { margin: 0; padding: 16px; color: #D4D4D8; font: 11.5px/1.6 var(--mono); white-space: pre-wrap; word-break: break-all; max-height: calc(100vh - 200px); overflow: auto; }

/* right panel */
.eb-right { border-left: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; min-height: 0; }
.ebpp-head { display: flex; align-items: center; gap: 10px; padding: 13px 14px; border-bottom: 1px solid var(--border); }
.ebpp-head small { display: block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); } .ebpp-head b { font-size: 14px; }
.ebpp-head .icon-btn { margin-left: auto; }
.ebpp-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; flex-shrink: 0; color: var(--text-2); }
.ebpp-body { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 16px; }
.ebpp-foot { display: flex; gap: 6px; padding: 12px 14px; border-top: 1px solid var(--border); }
.ck-score { margin-left: auto; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 99px; }
.ck-score.ok { background: var(--s-delivered-bg); color: var(--s-delivered); } .ck-score.warn { background: var(--s-deferred-bg); color: var(--s-deferred); }
.ck-list { display: grid; gap: 2px; }
.ck2 { display: flex; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--border); }
.ck2 > div { flex: 1; min-width: 0; } .ck2 b { font-size: 13px; display: block; } .ck2 small { font-size: 12px; color: var(--text-3); line-height: 1.4; }
.ck2-ic { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; font: 800 11px var(--font); color: #fff; margin-top: 1px; }
.ck2.ok .ck2-ic { background: var(--s-delivered); } .ck2.warn .ck2-ic { background: var(--s-deferred); } .ck2.bad .ck2-ic { background: var(--s-bounced); }
.ck2.warn small { color: var(--s-deferred); } .ck2.bad small { color: var(--s-bounced); }
.ck2-bar { display: block; position: relative; height: 6px; border-radius: 99px; background: var(--surface-3); margin-top: 7px; }
.ck2-bar span { display: block; height: 100%; border-radius: 99px; background: var(--s-delivered); } .ck2.warn .ck2-bar span { background: var(--s-deferred); } .ck2.bad .ck2-bar span { background: var(--s-bounced); }
.ck2-bar i { position: absolute; top: -3px; bottom: -3px; border-left: 2px dashed var(--s-deferred); }
.outline { display: grid; gap: 1px; max-height: 320px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; padding: 4px; }
.ol-row, .ol-blk { display: flex; align-items: center; gap: 6px; width: 100%; border: 0; background: none; text-align: left; padding: 6px 8px; border-radius: 7px; font: inherit; font-size: 12.5px; cursor: pointer; color: var(--text); }
.ol-row { font-weight: 650; } .ol-blk { padding-left: 26px; color: var(--text-2); }
.ol-row:hover, .ol-blk:hover { background: var(--surface-2); }
.ol-row small, .ol-blk small { margin-left: auto; color: var(--text-3); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 55%; }

/* preview overlay */
.eb-prev { position: fixed; inset: 0; z-index: 200; background: color-mix(in srgb, #0B0B0D 92%, transparent); display: flex; flex-direction: column; animation: fadein .15s ease; }
@keyframes fadein { from { opacity: 0; } }
.ep-bar { display: flex; align-items: center; gap: 14px; padding: 12px 18px; color: #fff; } .ep-bar .faint { color: #A1A1AA; font-size: 13px; } .ep-bar .spacer { flex: 1; }
.ep-bar .jx-live { color: #D4D4D8; }
.ep-test { display: flex; gap: 6px; } .ep-test input { background: #27272A; border: 1px solid #3F3F46; color: #fff; border-radius: 8px; padding: 0 10px; height: 32px; width: 220px; font: inherit; font-size: 13px; }
.ep-stage { flex: 1; min-height: 0; display: flex; gap: 32px; align-items: flex-start; justify-content: center; padding: 10px 24px 24px; overflow: auto; }
.ep-desk { flex: 1; max-width: 860px; height: calc(100vh - 110px); border-radius: 12px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.ep-chrome { display: flex; align-items: center; gap: 6px; padding: 10px 12px; background: #F4F4F5; border-bottom: 1px solid #E4E4E7; font-size: 12px; color: #71717A; }
.ep-chrome i { width: 10px; height: 10px; border-radius: 50%; background: #D4D4D8; } .ep-chrome span { margin-left: 10px; }
.ep-desk iframe { flex: 1; border: 0; width: 100%; }
.ep-phone { width: 390px; height: min(800px, calc(100vh - 110px)); border-radius: 46px; border: 10px solid #27272A; background: #fff; overflow: hidden; position: relative; flex-shrink: 0; display: flex; flex-direction: column; }
.ep-notch { height: 30px; display: grid; place-items: center; background: #fff; } .ep-notch::after { content: ''; width: 100px; height: 22px; border-radius: 14px; background: #18181B; }
.ep-phone iframe { flex: 1; border: 0; width: 100%; }
.ep-cap { position: absolute; bottom: -2px; left: 0; right: 0; text-align: center; font-size: 11px; color: #A1A1AA; display: none; }

/* campaign page: content section */
.ct-start { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ct-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); text-align: left; cursor: pointer; font: inherit; }
.ct-opt:hover { border-color: var(--accent); background: var(--accent-soft); }
.ct-opt > span { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; margin-bottom: 6px; }
.ct-opt b { font-size: 13.5px; } .ct-opt small { font-size: 12px; color: var(--text-3); line-height: 1.4; }
.ct-design { display: grid; grid-template-columns: 220px 1fr; gap: 16px; }
.ct-thumb { position: relative; height: 280px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; cursor: pointer; background: #F4F4F5; }
.ct-thumb iframe { width: 300%; height: 300%; transform: scale(.3333); transform-origin: 0 0; border: 0; pointer-events: none; }
.ct-hover { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 6px; background: rgba(24,24,27,.55); color: #fff; font-weight: 650; font-size: 13px; opacity: 0; transition: opacity .15s; }
.ct-thumb:hover .ct-hover { opacity: 1; }
.ct-side b { font-size: 14px; display: block; } .ct-side > small { font-size: 12px; color: var(--text-3); }
.ct-checks { list-style: none; padding: 0; margin: 12px 0 14px; display: grid; gap: 6px; }
.ct-checks li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.ct-checks li > span { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 800 10px var(--font); flex-shrink: 0; background: var(--s-delivered); }
.ct-checks li.warn > span { background: var(--s-deferred); } .ct-checks li.bad > span { background: var(--s-bounced); } .ct-checks li.warn { color: var(--s-deferred); } .ct-checks li.bad { color: var(--s-bounced); }
.ct-acts { display: flex; gap: 8px; }
@media (max-width: 1280px) { .eb-body { grid-template-columns: 300px minmax(0, 1fr) 300px; } .eb-bar #prev { display: none; } }
@media (max-width: 900px) { .eb-body { grid-template-columns: 1fr; } .eb-left, .eb-right { display: none; } .ct-start, .ct-design { grid-template-columns: 1fr; } }

.ep-close { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 8px 0 10px; border-radius: 8px; border: 1px solid #3F3F46; background: #27272A; color: #F4F4F5; font: 600 13px var(--font); cursor: pointer; }
.ep-close:hover { background: #3F3F46; border-color: #52525B; }
.ep-close svg { stroke: currentColor; }
.ep-close kbd { font: 600 10.5px var(--mono); color: #A1A1AA; background: #18181B; border: 1px solid #3F3F46; border-radius: 5px; padding: 1px 5px; }
.asset-grid.photos { max-height: 240px; overflow-y: auto; padding-right: 2px; }

/* ═══════ Template gallery (templates.js) ═══════ */
.ai-bar { position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 14px 16px; border-radius: 14px; margin-bottom: 18px; border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border)); background: linear-gradient(120deg, var(--accent-soft), color-mix(in srgb, var(--accent-soft) 25%, var(--surface)) 60%); }
.ai-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--accent); color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.ai-bar input { flex: 1; min-width: 240px; height: 40px; border: 1px solid var(--border); border-radius: 10px; padding: 0 12px; font: inherit; font-size: 14px; background: var(--surface); color: var(--text); }
.ai-bar input:disabled { opacity: .85; cursor: not-allowed; }
.ai-soon { font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: var(--accent); color: #fff; }
.ai-chips { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; padding-left: 46px; }
.ai-chips button { border: 1px solid var(--border); background: var(--surface); border-radius: 99px; padding: 5px 11px; font: inherit; font-size: 12px; color: var(--text-2); cursor: pointer; }
.ai-chips button:hover { border-color: var(--accent); color: var(--accent-text); }
.tg-tools { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.tg-search { margin-left: auto; display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 9px; padding: 0 10px; background: var(--surface); color: var(--text-3); width: 280px; max-width: 100%; }
.tg-search input { border: 0; background: none; height: 36px; flex: 1; font: inherit; font-size: 13.5px; color: var(--text); outline: none; }
.tg-cats { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tg-cats button { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--border); background: var(--surface); border-radius: 99px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 550; color: var(--text-2); cursor: pointer; }
.tg-cats button span { font-size: 11px; color: var(--text-3); font-weight: 600; }
.tg-cats button:hover { border-color: var(--border-strong); color: var(--text); }
.tg-cats button.on { background: var(--text); border-color: var(--text); color: var(--surface); } .tg-cats button.on span { color: color-mix(in srgb, var(--surface) 70%, transparent); }
.tg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.tg-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s; }
.tg-card:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(24,24,27,.1); border-color: var(--border-strong); }
.tg-thumb { position: relative; height: 330px; overflow: hidden; background: #F4F4F5; border-bottom: 1px solid var(--border); }
.tg-thumb iframe { position: absolute; left: 0; top: 0; width: 640px; height: 1400px; border: 0; transform-origin: 0 0; pointer-events: none; }
.tg-thumb::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 60px; background: linear-gradient(transparent, rgba(244,244,245,.9)); pointer-events: none; }
.tg-thumb.plain { display: grid; place-items: center; padding: 24px; } .tg-thumb.plain::after { display: none; } .tg-thumb.plain .tpl-mail { width: 100%; }
.tg-over { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 8px; background: rgba(24,24,27,.45); opacity: 0; transition: opacity .15s; }
.tg-card:hover .tg-over { opacity: 1; }
.tg-info { padding: 12px 14px 14px; } .tg-info b { font-size: 14px; display: block; } .tg-info small { font-size: 12px; color: var(--text-3); }
.tg-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; } .tg-tags span { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--text-2); }
.tg-empty { grid-column: 1 / -1; text-align: center; padding: 48px 12px; color: var(--text-2); line-height: 1.8; }
@media (max-width: 720px) { .ai-chips { padding-left: 0; } .tg-search { margin-left: 0; width: 100%; } }

/* ═══════ Agent mode (agent.js) ═══════ */
.agent-switch { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px 0 10px; border-radius: 99px; font-size: 13px; font-weight: 650; color: #fff; background: linear-gradient(135deg, #5B5BF7, #8B5CF6); box-shadow: 0 2px 10px rgba(91,91,247,.3); white-space: nowrap; }
.agent-switch:hover { filter: brightness(1.07); }
body.agent-mode .content { height: 100vh; }
.ag { height: 100vh; display: grid; grid-template-columns: 272px minmax(0, 1fr); background: var(--surface); transition: grid-template-columns .2s; }
.ag.noside { grid-template-columns: 0 minmax(0, 1fr); }
.ag-side { background: var(--surface-2); border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.ag.noside .ag-side { border: 0; }
.ag-side-top { display: flex; align-items: center; padding: 10px 10px 4px; }
.ag-ib { width: 36px; height: 36px; border: 0; background: none; border-radius: 9px; color: var(--text-2); display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.ag-ib:hover { background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--text); }
.ag-new { display: flex; align-items: center; gap: 9px; margin: 6px 10px 8px; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: 600 13.5px var(--font); cursor: pointer; }
.ag-new:hover { border-color: var(--border-strong); }
.ag-new kbd, .ag-dash kbd { margin-left: auto; font: 600 10.5px var(--mono); color: var(--text-3); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; background: var(--surface-2); }
.ag-search { display: flex; align-items: center; gap: 8px; margin: 0 10px 6px; padding: 0 10px; height: 34px; border-radius: 9px; color: var(--text-3); }
.ag-search:focus-within { background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.ag-search input { border: 0; background: none; flex: 1; font: inherit; font-size: 13px; color: var(--text); outline: none; }
.ag-hist { flex: 1; overflow-y: auto; padding: 0 8px 12px; }
.ag-g { font-size: 11.5px; font-weight: 650; color: var(--text-3); padding: 14px 8px 5px; }
.ag-h-item { position: relative; display: flex; align-items: center; height: 36px; padding: 0 8px 0 10px; border-radius: 9px; cursor: pointer; font-size: 13.5px; color: var(--text); }
.ag-h-item:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
.ag-h-item.on { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent-text); font-weight: 600; }
.ag-h-t { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ag-h-more { width: 26px; height: 26px; border: 0; background: none; border-radius: 7px; color: var(--text-3); display: grid; place-items: center; cursor: pointer; opacity: 0; }
.ag-h-item:hover .ag-h-more, .ag-h-item.on .ag-h-more { opacity: 1; } .ag-h-more:hover { background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text); }
.ag-side-foot { border-top: 1px solid var(--border); padding: 10px; display: grid; gap: 8px; }
.ag-dash { display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 12px; border-radius: 10px; border: 0; background: var(--text); color: var(--surface); font: 600 13.5px var(--font); cursor: pointer; }
.ag-dash:hover { opacity: .9; } .ag-dash kbd { background: transparent; border-color: color-mix(in srgb, var(--surface) 30%, transparent); color: color-mix(in srgb, var(--surface) 70%, transparent); }
.ag-ws { display: flex; align-items: center; gap: 10px; padding: 4px 4px; }
.ag-ws-a { width: 30px; height: 30px; border-radius: 8px; background: #18181B; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.ag-ws b { font-size: 13px; display: block; } .ag-ws small { font-size: 11.5px; color: var(--text-3); }
.ag-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; position: relative; }
.ag-top { display: flex; align-items: center; gap: 8px; height: 56px; padding: 0 14px; flex-shrink: 0; }
.ag-top #expand { display: none; } .ag.noside .ag-top #expand { display: grid; }
.ag-brand { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.ag-model { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-text); }
.ag-pill { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: 600 13px var(--font); cursor: pointer; }
.ag-pill:hover { border-color: var(--border-strong); background: var(--surface-2); }
.ag-scroll { flex: 1; overflow-y: auto; }
.ag-col { max-width: 780px; margin: 0 auto; padding: 16px 24px 32px; }
.ag-empty { min-height: calc(100vh - 260px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px 0; }
.ag-empty h1 { font-size: 30px; letter-spacing: -.03em; margin: 16px 0 6px; } .ag-empty > p { color: var(--text-2); font-size: 15px; max-width: 520px; line-height: 1.55; }
.ag-sugg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 28px; width: 100%; text-align: left; }
.ag-s { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); cursor: pointer; font: inherit; color: var(--text); transition: border-color .15s, transform .15s, box-shadow .15s; }
.ag-s:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(91,91,247,.1); }
.ag-s > span { width: 30px; height: 30px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; margin-bottom: 6px; }
.ag-s b { font-size: 13.5px; } .ag-s small { font-size: 12.5px; color: var(--text-3); line-height: 1.4; }
.am { margin: 22px 0; }
.am-u { display: flex; justify-content: flex-end; }
.am-u .am-b { max-width: 78%; background: var(--surface-2); border-radius: 18px 18px 6px 18px; padding: 10px 16px; font-size: 15px; line-height: 1.55; white-space: pre-wrap; }
.am-a { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 14px; }
.am-av { width: 30px; height: 30px; display: grid; place-items: center; }
.am-body { min-width: 0; }
.am-txt { font-size: 15px; line-height: 1.65; color: var(--text); }
.am-txt p { margin: 0 0 10px; } .am-txt ul, .am-txt ol { margin: 0 0 10px; padding-left: 22px; } .am-txt li { margin: 4px 0; }
.am-txt code { font-family: var(--mono); font-size: 13px; background: var(--surface-2); padding: 1px 6px; border-radius: 5px; }
.caret { display: inline-block; width: 8px; height: 16px; background: var(--text); border-radius: 2px; vertical-align: -3px; margin-left: 2px; animation: caretb 1s steps(1) infinite; }
@keyframes caretb { 50% { opacity: 0; } }
.am-steps { margin-bottom: 10px; font-size: 13px; color: var(--text-2); }
.am-steps summary { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; padding: 5px 11px; border-radius: 99px; background: var(--s-delivered-bg); color: var(--s-delivered); font-weight: 600; list-style: none; }
.am-steps summary::-webkit-details-marker { display: none; }
.am-steps ol, .am-steps-live ol { list-style: none; padding: 8px 0 0 4px; margin: 0; display: grid; gap: 6px; }
.am-steps li, .am-steps-live li { display: flex; align-items: center; gap: 8px; color: var(--text-2); }
.am-steps li svg, .am-steps-live li svg { color: var(--s-delivered); flex-shrink: 0; }
.am-steps-live { margin-bottom: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); font-size: 13px; }
.st-head { display: flex; align-items: center; gap: 8px; font-size: 13px; } .st-head svg { color: var(--s-delivered); }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--accent) 25%, transparent); border-top-color: var(--accent); animation: spin .7s linear infinite; flex-shrink: 0; }
.spin.sm { width: 11px; height: 11px; }
@keyframes spin { to { transform: rotate(360deg); } }
.am-src { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); margin-top: 10px; }
.am-src span { padding: 2px 9px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); }
.am-acts { display: flex; gap: 2px; margin-top: 8px; opacity: 0; transition: opacity .15s; }
.am-a:hover .am-acts, .am-a:last-child .am-acts { opacity: 1; }
.am-acts button { width: 30px; height: 28px; border: 0; background: none; border-radius: 7px; color: var(--text-3); cursor: pointer; display: grid; place-items: center; font-size: 13px; filter: grayscale(1); }
.am-acts button:hover { background: var(--surface-2); color: var(--text); } .am-acts button.on { filter: none; background: var(--accent-soft); }
.ac { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); margin: 12px 0; overflow: hidden; }
.ac-h { display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text-2); }
.ac-h b { color: var(--text); } .ac-h > span { margin-left: auto; color: var(--text-3); font-size: 12.5px; }
.ac-f { display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--border); background: var(--surface-2); }
.aseg .seg-n { font-size: 34px; font-weight: 750; letter-spacing: -.03em; padding: 12px 14px 0; } .aseg .seg-n small { font-size: 14px; color: var(--text-3); font-weight: 500; margin-left: 6px; letter-spacing: 0; }
.seg-r { list-style: none; padding: 8px 14px 14px; margin: 0; display: grid; gap: 6px; }
.seg-r li { font-size: 13px; color: var(--text-2); padding-left: 18px; position: relative; } .seg-r li::before { content: ''; position: absolute; left: 2px; top: 7px; width: 7px; height: 7px; border-radius: 2px; background: var(--s-processing); }
.am-thumb { position: relative; height: 300px; overflow: hidden; background: #F4F4F5; cursor: pointer; }
.am-thumb iframe { width: 640px; height: 1200px; border: 0; transform: scale(.75); transform-origin: 0 0; pointer-events: none; position: absolute; left: 50%; margin-left: -240px; }
.am-over { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 6px; background: rgba(24,24,27,.5); color: #fff; font-weight: 650; font-size: 13px; opacity: 0; transition: opacity .15s; }
.am-thumb:hover .am-over { opacity: 1; }
.am-subj { padding: 10px 14px; border-top: 1px solid var(--border); } .am-subj small { display: block; font-size: 11.5px; color: var(--text-3); } .am-subj b { font-size: 14px; }
.approve { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); box-shadow: 0 0 0 4px var(--accent-soft); }
.approve .ac-h { color: var(--accent-text); background: var(--accent-soft); border-bottom-color: color-mix(in srgb, var(--accent) 25%, var(--border)); } .approve .ac-h b { color: var(--accent-text); }
.approve.st-done { border-color: color-mix(in srgb, var(--s-delivered) 40%, var(--border)); box-shadow: none; } .approve.st-done .ac-h { background: var(--s-delivered-bg); color: var(--s-delivered); border-bottom-color: var(--border); } .approve.st-done .ac-h b { color: var(--s-delivered); }
.approve.st-cancelled { box-shadow: none; border-color: var(--border); opacity: .7; } .approve.st-cancelled .ac-h { background: var(--surface-2); color: var(--text-3); } .approve.st-cancelled .ac-h b { color: var(--text-3); }
.ap-t { font-size: 15px; font-weight: 650; padding: 12px 14px 4px; }
.ap-lines { padding: 4px 14px 12px; display: grid; gap: 6px; }
.ap-lines div { display: grid; grid-template-columns: 100px 1fr; gap: 10px; font-size: 13px; } .ap-lines span { color: var(--text-3); } .ap-lines b { font-weight: 600; }
.ap-done { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--border); font-size: 13px; color: var(--s-delivered); background: var(--s-delivered-bg); }
.jr-chain { display: flex; flex-direction: column; padding: 14px; }
.jr-n { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); }
.jr-n.jr-trig { border-radius: 30px 11px 11px 30px; border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.jr-n b { font-size: 13px; display: block; } .jr-n small { font-size: 12px; color: var(--text-3); }
.jr-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; background: var(--surface-2); color: var(--text-2); }
.jr-ic.zap { background: var(--accent-soft); color: var(--accent-text); border-radius: 50%; } .jr-ic.mail { background: var(--s-opened-bg); color: var(--s-opened); } .jr-ic.split { background: var(--s-clicked-bg); color: var(--s-clicked); }
.jr-ln { width: 2px; height: 14px; background: var(--border-strong); margin-left: 24px; }
.ch-key { display: flex; align-items: center; gap: 6px; } .ch-key i { width: 10px; height: 3px; border-radius: 2px; display: inline-block; margin-left: 8px; }
.ac-svg { width: 100%; height: auto; display: block; padding: 6px 4px 2px; }
.chk { padding-bottom: 6px; }
.ck-r { display: grid; grid-template-columns: 20px 150px 1fr; gap: 10px; align-items: center; padding: 8px 14px; font-size: 13px; }
.ck-r > span { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 800 10px var(--font); background: var(--s-delivered); }
.ck-r.warn > span { background: var(--s-deferred); } .ck-r.bad > span { background: var(--s-bounced); }
.ck-r small { color: var(--text-3); font-size: 12.5px; } .ck-r.warn small { color: var(--s-deferred); } .ck-r.bad small { color: var(--s-bounced); }
.tbl2 table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl2 th { text-align: left; font-size: 11.5px; color: var(--text-3); font-weight: 600; padding: 8px 14px; background: var(--surface-2); }
.tbl2 td { padding: 9px 14px; border-top: 1px solid var(--border); } .tbl2 td.num { font-variant-numeric: tabular-nums; font-weight: 650; }
.kp { display: grid; grid-template-columns: repeat(4, 1fr); }
.kp > div { padding: 12px 14px; } .kp > div + div { border-left: 1px solid var(--border); }
.kp small { display: block; font-size: 12px; color: var(--text-3); } .kp b { display: block; font-size: 21px; letter-spacing: -.02em; } .kp em { font-style: normal; font-size: 12px; font-weight: 600; } .kp em.good { color: var(--s-delivered); } .kp em.bad { color: var(--s-bounced); }
.ag-compose-wrap { padding: 0 24px 14px; }
.ag-compose { max-width: 780px; margin: 0 auto; display: flex; align-items: flex-end; gap: 6px; padding: 8px; border: 1px solid var(--border-strong); border-radius: 22px; background: var(--surface); box-shadow: 0 6px 24px rgba(24,24,27,.07); }
.ag-compose:focus-within { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }
.ag-compose textarea { flex: 1; border: 0; outline: none; resize: none; background: none; font: inherit; font-size: 15px; line-height: 1.5; padding: 7px 4px; max-height: 200px; color: var(--text); }
.ag-send { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.ag-send:hover { background: var(--accent-hover); }
.ag-send.stop { background: var(--text); } .ag-send .sq { width: 12px; height: 12px; border-radius: 3px; background: var(--surface); }
.ag-note { max-width: 780px; margin: 8px auto 0; text-align: center; font-size: 11.5px; color: var(--text-3); display: flex; align-items: center; justify-content: center; gap: 5px; }
@media (max-width: 900px) { .ag { grid-template-columns: 0 minmax(0, 1fr); } .ag:not(.noside) .ag-side { position: fixed; z-index: 50; width: 280px; height: 100vh; box-shadow: var(--shadow-pop); } .ag-top #expand { display: grid; } .ag-sugg { grid-template-columns: 1fr 1fr; } .kp { grid-template-columns: 1fr 1fr; } .ag-pill span { display: none; } }
@media (max-width: 1100px) { .agent-switch span { display: none; } .agent-switch { padding: 0 10px; } }
.ag-top .spacer, .ag-side-top .spacer { flex: 1; }
/* Dashboard | Agent mode switch (same family as Live/Test) */
.mode-sw a { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 6px; font-size: 12.5px; font-weight: 600; color: var(--text-3); cursor: pointer; }
.mode-sw a:hover { color: var(--text); }
.mode-sw a.on { background: var(--surface-2); color: var(--text); }
.mode-sw a.ag-on svg { color: var(--accent); }
.mode-sw a.on.ag-on { background: var(--accent-soft); color: var(--accent-text); }
.ag-top .mode-sw a { padding: 5px 12px; font-size: 13px; }

/* ═══ Phase 2: real SES connect + domains ═══ */
.key-steps { margin: 0; padding-left: 22px; display: grid; gap: 18px; font-size: 13.5px; line-height: 1.6; }
.key-steps li::marker { font-weight: 700; color: var(--accent-text); }
.key-steps a { color: var(--accent-text); font-weight: 600; }
.pol-wrap { position: relative; margin-top: 10px; }
.pol-wrap pre.code { max-height: 240px; overflow: auto; margin: 0; font-size: 11.5px; }
.pol-copy { position: absolute; top: 8px; right: 8px; z-index: 1; }
.ses-empty { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; padding: 32px; align-items: center; }
.ses-empty .se-ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); margin-bottom: 14px; }
.ses-empty h2 { font-size: 22px; letter-spacing: -.02em; margin-bottom: 6px; }
.ses-empty p { color: var(--text-2); font-size: 14px; line-height: 1.6; margin-bottom: 18px; max-width: 460px; }
.ses-empty .se-points { display: grid; gap: 14px; padding: 18px; border-radius: 12px; background: var(--surface-2); }
.ses-empty .se-points > div { display: flex; gap: 12px; align-items: flex-start; }
.ses-empty .se-points span { width: 30px; height: 30px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); display: grid; place-items: center; flex: none; color: var(--text-2); }
.ses-empty .se-points b { display: block; font-size: 13.5px; }
.ses-empty .se-points small { color: var(--text-3); font-size: 12.5px; line-height: 1.5; }
.auto-dns .logos i { min-width: 28px; padding: 0 5px; width: auto; }
@media (max-width: 760px) { .ses-empty { grid-template-columns: 1fr; padding: 22px; } }
.cs-steps { display: grid; gap: 4px; }
.cs-step { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.cs-step:last-child { border-bottom: 0; }
.cs-step > div { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.cs-step b { font-size: 14.5px; }
.cs-step small { color: var(--text-3); font-size: 12.5px; line-height: 1.5; margin-bottom: 6px; }
.cs-n { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); font-weight: 700; font-size: 13px; display: grid; place-items: center; flex: none; }
.cs-cmd { display: flex; align-items: center; gap: 8px; width: 100%; background: #0F0F12; border-radius: 10px; padding: 8px 8px 8px 14px; }
.cs-cmd code { flex: 1; min-width: 0; font-family: var(--mono); font-size: 12.5px; color: #E4E4E7; white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
.cs-cmd code::before { content: '$ '; color: #71717A; }
.cs-cmd .btn { flex: none; }
.cs-wait { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); padding: 10px 12px; border-radius: 10px; background: var(--surface-2); width: 100%; }
.cs-wait .spin { border-color: var(--border-strong); border-top-color: var(--accent); flex: none; }
.cs-bad { color: var(--s-bounced); display: grid; flex: none; }
.cs-more { margin-top: 14px; font-size: 13px; color: var(--text-2); }
.cs-more summary { cursor: pointer; font-weight: 600; color: var(--text); }
.cs-more p { margin-top: 8px; line-height: 1.6; }
.cs-more a, .cs-steps a:not(.btn) { color: var(--accent-text); font-weight: 600; }
.dom-pick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.dom-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--text); }
.dom-chip.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.dom-add { display: flex; gap: 8px; }
.dom-add input { flex: 1; height: 38px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 9px; font: inherit; font-size: 14px; background: var(--surface); color: var(--text); }
.dom-add input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cs-steps { grid-template-columns: minmax(0, 1fr); }
.cs-step, .cs-step > div { min-width: 0; }
#pbody p a { color: var(--accent-text); font-weight: 600; }
/* ═══ Phase 3: sending ═══ */
.st-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.st-pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-processing { color: var(--s-processing); background: var(--s-processing-bg); }
.st-delivered { color: var(--s-delivered); background: var(--s-delivered-bg); }
.st-deferred { color: var(--s-deferred); background: var(--s-deferred-bg); }
.st-bounced { color: var(--s-bounced); background: var(--s-bounced-bg); }
.st-complained { color: var(--s-complained); background: var(--s-complained-bg); }
.st-unsub { color: var(--s-unsub); background: var(--s-unsub-bg); }
.st-dropped { color: var(--s-dropped); background: var(--s-dropped-bg); }
.from-pick { display: flex; align-items: center; gap: 6px; }
.from-pick input { flex: 1; min-width: 0; }
.from-pick span { color: var(--text-3); font-weight: 600; }
.from-pick select { flex: 1.3; min-width: 0; }
.tf-res { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); font-size: 13px; }
/* ═══ Phase 4: activity ═══ */
.insight.bad { background: var(--s-bounced-bg); border-color: transparent; }
.insight.bad .spark-ic { color: var(--s-bounced); }
/* ═══ Phase 5: contacts ═══ */
a.ptab { text-decoration: none; }
.seg-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
.seg-match { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; margin: 6px 0 12px; }
.seg-match .select { height: 32px; }
.seg-row { display: grid; grid-template-columns: minmax(140px, 1.2fr) minmax(120px, 1fr) minmax(120px, 1.2fr) 32px; gap: 8px; align-items: center; margin-bottom: 8px; }
.seg-row .select, .seg-row input { height: 36px; min-width: 0; width: 100%; }
.seg-row input { padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 9px; font: inherit; font-size: 13.5px; background: var(--surface); color: var(--text); }
.seg-days { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.seg-preview { position: sticky; top: 76px; }
.seg-count { font-size: 34px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.seg-sample { display: flex; flex-direction: column; padding: 7px 0; border-bottom: 1px solid var(--border); color: var(--text); font-weight: 550; }
.seg-sample span { font-size: 12px; color: var(--text-3); font-weight: 400; }
.imp-prog { padding: 4px 0 8px; }
.imp-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-top: 14px; }
.imp-stats div { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; }
.imp-stats small { display: block; font-size: 11.5px; color: var(--text-3); }
.imp-stats b { font-size: 18px; font-variant-numeric: tabular-nums; }
@media (max-width: 860px) { .seg-layout { grid-template-columns: 1fr; } .seg-preview { position: static; } .seg-row { grid-template-columns: 1fr 1fr; } .seg-row .sx { justify-self: end; } }
/* ═══ Phase 6: templates, media, brand kit ═══ */
.tg-acts { display: flex; gap: 2px; margin-top: 6px; }
.brand-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 16px; align-items: start; }
.brand-logo { display: flex; align-items: center; gap: 14px; padding: 12px; border: 1px dashed var(--border-strong); border-radius: 10px; min-height: 64px; }
.brand-logo img { max-height: 48px; max-width: 220px; }
.brand-colors { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.bcol { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.bcol input[type="color"] { width: 30px; height: 30px; border: 0; padding: 0; background: none; cursor: pointer; flex: none; }
.bcol b { display: block; font-size: 13px; }
.bcol small { font-size: 11.5px; color: var(--text-3); }
.brand-socials { display: grid; gap: 8px; }
.brand-socials label { display: grid; grid-template-columns: 110px minmax(0, 1fr); align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); }
.brand-prev { position: sticky; top: 76px; overflow: hidden; }
.brand-prev iframe { width: 100%; height: 640px; border: 0; display: block; background: var(--surface-2); }
@media (max-width: 960px) { .brand-layout { grid-template-columns: 1fr; } .brand-prev { position: static; } }

/* ── Campaigns (Phase 7) ── */
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ab-box { margin-top: 12px; padding: 14px; border: 1px dashed var(--border-strong); border-radius: 12px; background: var(--surface-2); }
.ab-box .field:last-of-type { margin-bottom: 8px; }
.ab-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 18px 18px; }
.ab-col { padding: 14px 16px; border: 1.5px solid var(--border); border-radius: 12px; }
.ab-col.win { border-color: var(--s-delivered); background: color-mix(in srgb, var(--s-delivered) 7%, transparent); }
.ab-k { font: 700 11px/1 var(--mono); letter-spacing: .06em; color: var(--text-3); }
.ab-col.win .ab-k { color: var(--s-delivered); }
.ab-s { font-size: 13.5px; font-weight: 600; margin: 8px 0 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ab-n b { font-size: 22px; font-variant-numeric: tabular-nums; } .ab-n { font-size: 12.5px; color: var(--text-2); }
.ab-col small { display: block; margin-top: 6px; font-size: 12px; color: var(--text-3); }
.tpl-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.tpl-p { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); text-align: left; cursor: pointer; font: inherit; color: inherit; }
.tpl-p:hover { border-color: var(--accent); background: var(--accent-soft); }
.tpl-p b { font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .tpl-p small { font-size: 11.5px; color: var(--text-3); }
.ct-start .ct-opt[disabled], .tpl-p[disabled] { opacity: .5; cursor: default; }
@media (max-width: 640px) { .row3, .ab-grid { grid-template-columns: 1fr; } }
.row3 .select, .row3 input { width: 100%; min-width: 0; max-width: 100%; }

/* ── Journeys on the real API (Phase 8) ── */
.jx-ctl { display: flex; gap: 8px; align-items: center; }
.pl-item.soon { opacity: .5; cursor: default; } .pl-item.soon:hover { background: transparent; }
.pl-item b em { font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); border: 1px solid var(--border); border-radius: 99px; padding: 1px 6px; margin-left: 4px; vertical-align: 1px; }
.nd.nd-bad { border-color: color-mix(in srgb, var(--s-deferred) 60%, var(--border)); }
.nd-warn { position: absolute; top: -9px; left: 12px; width: 18px; height: 18px; border-radius: 50%; background: var(--s-deferred); color: #fff; font: 800 11px/18px var(--sans, inherit); text-align: center; }
.nd.nd-path { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent); }
.jx-probs { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); width: min(520px, calc(100% - 420px)); max-height: 220px; overflow: auto; background: var(--surface); border: 1px solid color-mix(in srgb, var(--s-deferred) 40%, var(--border)); border-radius: 12px; box-shadow: 0 12px 32px rgba(24,24,27,.12); display: none; z-index: 4; }
.jx-probs.on { display: block; }
.jp-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-size: 13px; font-weight: 650; color: var(--s-deferred); border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); }
.jp-head .icon-btn { margin-left: auto; }
.jp-row { display: block; width: 100%; text-align: left; border: 0; background: none; font: inherit; font-size: 12.5px; color: var(--text-2); padding: 8px 12px; cursor: pointer; border-bottom: 1px solid var(--border); }
.jp-row:last-child { border-bottom: 0; } .jp-row:hover { background: var(--surface-2); color: var(--text); }
.jr-match { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); margin-bottom: 8px; }
.jr-match .select { height: 30px; width: auto; }
.jr-row { border: 1px solid var(--border); border-radius: 10px; padding: 8px; margin-bottom: 8px; display: grid; gap: 6px; background: var(--surface-2); }
.jr-top { display: flex; gap: 6px; } .jr-top .select { flex: 1; min-width: 0; }
.jr-bot { display: flex; gap: 6px; flex-wrap: wrap; } .jr-bot > .select, .jr-bot > input { flex: 1 1 110px; min-width: 0; }
.jr-row .select, .jr-row input { height: 32px; font-size: 12.5px; }
.jr-row input { padding: 0 9px; border: 1px solid var(--border-strong); border-radius: 8px; font: inherit; font-size: 12.5px; background: var(--surface); color: var(--text); }
.rv-days { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); } .rv-days input { width: 72px; }
.jr-inline { display: flex; gap: 8px; } .jr-inline input { width: 90px; } .jr-inline .select { flex: 1; }
.jr-starts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: -4px 0 14px; } .jr-starts .select { height: 30px; flex: 1; min-width: 120px; font-size: 12.5px; }
.jr-steps { list-style: none; padding: 0; margin: 12px 0 0; counter-reset: s; display: grid; gap: 0; }
.jr-steps li { position: relative; padding: 8px 0 8px 30px; border-left: 2px solid var(--border); margin-left: 9px; font-size: 13px; display: grid; gap: 2px; }
.jr-steps li::before { counter-increment: s; content: counter(s); position: absolute; left: -11px; top: 8px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }
.jr-steps li:last-child { border-left-color: transparent; }
.jr-steps span { color: var(--text-2); font-size: 12.5px; } .jr-steps time { color: var(--text-3); font-size: 11.5px; }
.jr-run { width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; font: inherit; cursor: pointer; color: inherit; }
.jr-run:hover b { color: var(--accent-text); } .jr-run > span { font-size: 11.5px; color: var(--text-3); white-space: nowrap; }

/* ── Copilot + Inbox tests on the real API (Phase 9) ── */
.codes { display: grid; gap: 6px; }
.code-row { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.code-row .mono { font-size: 11.5px; color: var(--text-2); word-break: break-word; } .code-row b { font-size: 12.5px; flex-shrink: 0; }
.ev-stats { display: grid; gap: 6px; } .ev-stats > div { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.ev-stats > div:last-child { border-bottom: 0; } .ev-stats span { color: var(--text-2); } .ev-stats b { font-variant-numeric: tabular-nums; }
.case-foot a { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--border-strong); } .case-foot a:hover { color: var(--text); }
sup.cite { font-size: 9.5px; font-weight: 700; color: var(--accent-text); background: var(--accent-soft); border-radius: 4px; padding: 0 4px; margin-left: 2px; vertical-align: 2px; }
.bubble.ai .src a { font-size: 11px; padding: 1px 7px; border-radius: 6px; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); }
.bubble.ai .src a:hover { color: var(--accent-text); border-color: var(--accent); }
.dm-dom + .dm-dom { margin-top: 18px; } .dm-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; font-size: 13px; }
.seed-li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.seed-li:last-child { border-bottom: 0; } .seed-li > div { flex: 1; min-width: 0; } .seed-li b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.seed-li small { display: block; font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seed-li .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); flex-shrink: 0; } .seed-li .dot.ok { background: var(--s-delivered); } .seed-li .dot.error { background: var(--s-bounced); }
.auth-chips { display: flex; gap: 10px; font-size: 12px; flex-wrap: wrap; align-self: flex-start; }
.sd.k-wait { background: transparent; border: 1.5px dashed var(--border-strong); animation: sdpulse 1.4s ease-in-out infinite; }
@keyframes sdpulse { 50% { opacity: .4; } }
.ch.na .ch-dot { background: var(--surface-3); color: var(--text-3); } .ch.na small { color: var(--text-3); }

/* ── Agent mode on the real API (Phase 10) ── */
.am-cards:empty { display: none; }
.ac-issues { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.ac-issues li { display: flex; gap: 6px; align-items: flex-start; font-size: 12.5px; color: var(--s-deferred); line-height: 1.45; }
.ac-issues li svg { flex-shrink: 0; margin-top: 2px; }
.ac.camp .ap-lines, .ac.chk .ap-lines { margin-top: 6px; }
.ac .ac-h span a { color: var(--accent-text); font-weight: 600; }
.ag-compose textarea:disabled { opacity: .6; cursor: not-allowed; }

/* ═══════ Editions: Sendline Pro locked pages (edition.js) ═══════ */
.pro-chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 99px; font-size: 11.5px; font-weight: 650; letter-spacing: .01em; color: var(--accent-text); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent); }
.pro-mark { margin-left: auto; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-text); background: var(--accent-soft); border-radius: 5px; padding: 1px 5px; }
.mode-sw .pro-mark { margin-left: 6px; }
.pro-lock { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 40px; align-items: center; max-width: 1120px; margin: 8px auto 0; padding: 28px 0 40px; }
.pro-lock.compact { grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: 28px; padding: 6px 0 10px; margin: 0; }
.pl-kicker { margin-top: 16px; font-size: 12.5px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }
.pro-lock h1 { margin: 6px 0 0; font-size: 30px; line-height: 1.15; letter-spacing: -.02em; font-weight: 700; max-width: 18ch; }
.pro-lock.compact h1 { font-size: 22px; }
.pl-lead { margin: 12px 0 0; color: var(--text-2); font-size: 14.5px; line-height: 1.6; max-width: 52ch; }
.pl-points { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 14px; }
.pl-points li { display: flex; gap: 12px; align-items: flex-start; }
.pl-points b { display: block; font-size: 13.5px; } .pl-points span:not(.pl-ic) { display: block; font-size: 13px; color: var(--text-2); line-height: 1.5; margin-top: 2px; }
.pl-ic { flex-shrink: 0; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--accent-text); background: var(--accent-soft); }
.pl-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.pl-preview { position: relative; padding: 26px; border-radius: 18px; background: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--text-3) 30%, transparent) 1px, transparent 0) 0 0 / 16px 16px, linear-gradient(160deg, var(--accent-soft), var(--surface-2)); border: 1px solid var(--border); }
.pl-frame { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 18px 40px -18px rgba(24, 24, 40, .28); overflow: hidden; }
.pl-bar { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.pl-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); } .pl-bar span { margin-left: auto; font-size: 11px; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.pl-chat { padding: 16px; display: grid; gap: 12px; }
.pl-msg { font-size: 13px; line-height: 1.5; padding: 10px 12px; border-radius: 12px; max-width: 88%; }
.pl-msg.me { justify-self: end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.pl-msg.ai { background: var(--surface-2); border-bottom-left-radius: 4px; max-width: 100%; }
.pl-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pl-steps li { display: flex; gap: 8px; align-items: center; } .pl-steps svg { color: var(--s-delivered); flex-shrink: 0; }
.pl-card { margin-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 10px; background: var(--surface); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border)); }
.pl-card small { display: block; font-size: 11.5px; color: var(--accent-text); font-weight: 600; } .pl-card b { font-size: 13px; }
.pl-seeds { padding: 14px 16px; display: grid; gap: 4px; }
.pl-seed { display: grid; grid-template-columns: 90px 1fr auto; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.pl-seed:last-child { border-bottom: 0; } .pl-seed span { display: flex; gap: 5px; } .pl-seed small { color: var(--text-2); font-variant-numeric: tabular-nums; }
.pl-team { padding: 8px 16px; }
.pl-mem { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.pl-mem:last-child { border-bottom: 0; } .pl-mem .tag { margin-left: auto; }
.ask-lock .chat { max-height: none; } .ask-lock .bubble.ai { opacity: .9; }
.ask-lock-foot { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.ask-lock-foot p { margin: 0 0 10px; font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
.ed-card .setting-row { border-bottom: 0; padding: 0; } .ed-card { margin-bottom: 16px; }
@media (max-width: 900px) { .pro-lock, .pro-lock.compact { grid-template-columns: 1fr; gap: 24px; padding-top: 8px; } .pl-preview { padding: 16px; } .pro-lock h1 { font-size: 24px; } }

/* ═══════ Design with AI (ai-design.js) ═══════ */
.aid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.aid-form textarea { width: 100%; resize: vertical; min-height: 130px; line-height: 1.55; }
.aid-ideas { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip-btn { height: 28px; padding: 0 11px; border-radius: 99px; font-size: 12.5px; font-weight: 550; color: var(--text-2); background: var(--surface); border: 1px solid var(--border); }
.chip-btn:hover { color: var(--accent-text); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); background: var(--accent-soft); }
.aid-tones { flex-wrap: wrap; width: fit-content; max-width: 100%; } .aid-tones button { padding: 6px 12px; font-size: 13px; }
.aid-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.aid-foot .faint { font-size: 12.5px; display: inline-flex; gap: 6px; align-items: center; }
.aid-side { position: sticky; top: 76px; padding: 18px; border-radius: var(--radius); border: 1px solid var(--border); background: linear-gradient(170deg, var(--accent-soft), var(--surface) 55%); }
.aid-how { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; gap: 14px; }
.aid-how li { counter-increment: s; position: relative; padding-left: 32px; font-size: 13px; }
.aid-how li::before { content: counter(s); position: absolute; left: 0; top: -1px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 700; color: var(--accent-text); background: var(--surface); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border)); }
.aid-how b { display: block; } .aid-how span { display: block; color: var(--text-2); line-height: 1.5; margin-top: 2px; }
.aid-brand { display: inline-flex; gap: 6px; align-items: center; margin-top: 16px; font-size: 13px; font-weight: 600; color: var(--accent-text); }
.aid-run { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.aid-run li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--text-3); }
.aid-run li.now { color: var(--text); font-weight: 600; } .aid-run li.done { color: var(--text-2); } .aid-run li.done svg { color: var(--s-delivered); }
.aid-run li i { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid var(--border-strong); }
@media (max-width: 900px) { .aid { grid-template-columns: 1fr; } .aid-side { position: static; } .aid-foot { flex-direction: column; align-items: stretch; } }

/* ═══════ SaaS mode (Pro saas.js): billing tab, banner, platform ═══════ */
.billbar { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; padding: 10px 14px; border-radius: 10px; font-size: 13.5px; background: var(--accent-soft); color: var(--accent-text); }
.billbar.warn { background: color-mix(in srgb, var(--s-deferred) 14%, var(--surface)); color: var(--text); }
.billbar a { margin-left: auto; font-weight: 650; white-space: nowrap; }
.bill-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.bill-name { display: flex; align-items: center; gap: 8px; font-size: 22px; font-weight: 700; letter-spacing: -.01em; margin: 2px 0; }
.bill-meters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.bm-top { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; } .bm-top b small { color: var(--text-3); font-weight: 500; }
.bill-plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; padding: 0 16px 16px; }
.bill-plan { border: 1px solid var(--border); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 6px; background: var(--surface); }
.bill-plan.current { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); background: color-mix(in srgb, var(--accent-soft) 45%, var(--surface)); }
.bp-price { font-size: 22px; font-weight: 700; letter-spacing: -.02em; } .bp-price small { font-size: 12.5px; font-weight: 500; color: var(--text-3); }
.bill-plan ul { list-style: none; padding: 0; margin: 6px 0 8px; display: grid; gap: 4px; font-size: 13px; color: var(--text-2); }
.bill-plan ul li::before { content: '✓'; color: var(--accent-text); font-weight: 700; margin-right: 7px; }
.bill-plan .btn { margin-top: auto; align-self: flex-start; }
.check-row { display: flex; align-items: center; gap: 9px; padding: 6px 0; font-size: 13.5px; cursor: pointer; } .check-row input { accent-color: var(--accent); }
@media (max-width: 760px) { .bill-meters { grid-template-columns: 1fr; } }

/* ═══════ Platform: system status (platform.js) ═══════ */
.sys-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.sys-tile { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.sys-tile b { display: block; font-size: 19px; letter-spacing: -.01em; margin-top: 6px; } .sys-tile small { color: var(--text-3); font-size: 12.5px; }
.sys-top { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.sys-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--s-delivered); }
.sys-tile.bad { border-color: color-mix(in srgb, var(--s-bounced) 35%, var(--border)); } .sys-tile.bad .sys-dot { background: var(--s-bounced); }
.set-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 1080px) { .sys-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .set-groups { grid-template-columns: 1fr; } }
.impbar { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; gap: 10px; padding: 9px 16px; font-size: 13px; color: #fff; background: #B42318; }
.impbar button { margin-left: auto; height: 28px; padding: 0 12px; border-radius: 7px; border: 1px solid rgba(255,255,255,.5); background: transparent; color: #fff; font-weight: 650; cursor: pointer; white-space: nowrap; }
