/* 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; }
.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.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; }
