/* Sendara AI - dashboard styles (Ink, Signal Green #75D95F, Cream)
   Brand: green #75D95F, ink #1A1B1F, cream #F8F7F4. Montserrat / Inter / JetBrains Mono. */

:root {
  --accent: #75d95f;
  --accent-ink: #2f7d1c;          /* readable green for text on light */
  --accent-soft: rgba(117, 217, 95, 0.16);
  --ink: #1a1b1f;
  --bg: #f8f7f4;
  --surface: #ffffff;
  --surface-2: #f2f0ed;
  --line: #e4e1dc;
  --text: #1a1b1f;
  --muted: #6b6a66;
  --side-bg: #1a1b1f;
  --side-text: #d9d9d6;
  --side-muted: #8d8d89;
  --side-line: #2c2d31;
  --side-hover: #24252a;
  --good: #2f7d1c;   --good-bg: #e5f6df;
  --warn: #9a6200;   --warn-bg: #fdf0d5;
  --bad: #b42318;    --bad-bg: #fde5e2;
  --shadow: 0 1px 2px rgba(26, 27, 31, .04), 0 4px 16px rgba(26, 27, 31, .05);
  --radius: 14px;
  --font-head: Montserrat, Inter, system-ui, sans-serif;
  --font-body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --accent-ink: #75d95f;
  --accent-soft: rgba(117, 217, 95, 0.14);
  --bg: #0d0e10;
  --surface: #16171a;
  --surface-2: #1d1f23;
  --line: #2a2c31;
  --text: #f2f2ef;
  --muted: #9b9b96;
  --side-bg: #08090a;
  --side-line: #1f2024;
  --side-hover: #16171a;
  --good: #75d95f;   --good-bg: rgba(117, 217, 95, .14);
  --warn: #f2b84b;   --warn-bg: rgba(242, 184, 75, .14);
  --bad: #ff7a6e;    --bad-bg: rgba(255, 107, 94, .14);
  --shadow: none;
  color-scheme: dark;
}

/* light sidebar (closer to Klaviyo) */
:root[data-sidebar="light"] { --side-bg: var(--surface); --side-text: var(--text); --side-muted: var(--muted); --side-line: var(--line); --side-hover: var(--surface-2); }
:root[data-sidebar="light"] .sidebar { border-right: 1px solid var(--line); }
:root[data-sidebar="light"] .wordmark, :root[data-sidebar="light"] .nav a:hover, :root[data-sidebar="light"] .nav a.active,
:root[data-sidebar="light"] .ai-card b, :root[data-sidebar="light"] .me .who b { color: var(--text); }
:root[data-sidebar="light"] .acct-menu { background: var(--surface); border-color: var(--line); }
:root[data-sidebar="light"] .acct-menu input { background: var(--surface-2); border-color: var(--line); color: var(--text); }
:root[data-sidebar="light"] .acct-item { color: var(--text); }
:root[data-sidebar="light"] .acct-item:hover { background: var(--surface-2); color: var(--text); }
:root[data-sidebar="light"] .acct-item .acct-av { background: var(--surface-2); color: var(--text); }
:root[data-sidebar="light"] .acct-sep { background: var(--line); }
:root[data-sidebar="light"] .sidebar .switch:not(.on) { background: #cfccc6; }
/* compact density */
:root[data-density="compact"] .card { padding: 13px; }
:root[data-density="compact"] td { padding: 8px 10px; }
:root[data-density="compact"] #app { padding-top: 18px; }
:root[data-density="compact"] .grid { gap: 12px; }
:root[data-density="compact"] .nav a { padding: 7px 10px; }
:root[data-density="compact"] .kpi .value { font-size: 24px; }
/* colour swatches */
.swatches { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; max-width: 280px; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--surface); background: var(--sw); box-shadow: 0 0 0 1px var(--line); padding: 0; }
.swatch.on { box-shadow: 0 0 0 2px var(--text); }
.swatch.custom { display: grid; place-items: center; background: var(--surface-2); color: var(--muted); font-weight: 700; cursor: pointer; position: relative; overflow: hidden; }
.swatch.custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 14px; line-height: 1.5; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--font-head); letter-spacing: -0.01em; }
.mono-label { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* ---------- icons (CSS masks) ---------- */
.ic { display: inline-block; width: 18px; height: 18px; background: currentColor; flex: none;
  -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }
.ic-home { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M3 10.5 12 3l9 7.5V21h-6v-6H9v6H3z'/%3E%3C/svg%3E"); }
.ic-mail { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E"); }
.ic-flow { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='3' width='7' height='6' rx='1.5'/%3E%3Crect x='14' y='15' width='7' height='6' rx='1.5'/%3E%3Cpath d='M6.5 9v4a2 2 0 0 0 2 2h5.5'/%3E%3C/svg%3E"); }
.ic-audit { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4M8 11l2 2 4-4'/%3E%3C/svg%3E"); }
.ic-users { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='9' cy='8' r='3.5'/%3E%3Cpath d='M2.5 20a6.5 6.5 0 0 1 13 0M16 4.5a3.5 3.5 0 0 1 0 7M18 14a6 6 0 0 1 3.5 6'/%3E%3C/svg%3E"); }
.ic-cal { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E"); }
.ic-list { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M9 6h12M9 12h12M9 18h12M4 6h.01M4 12h.01M4 18h.01'/%3E%3C/svg%3E"); }
.ic-gear { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 2v3M12 19v3M2 12h3M19 12h3M4.9 4.9 7 7M17 17l2.1 2.1M4.9 19.1 7 17M17 7l2.1-2.1'/%3E%3C/svg%3E"); }
.ic-chart { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 20V10M10 20V4M16 20v-7M22 20H2'/%3E%3C/svg%3E"); }
.ic-bell { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M6 9a6 6 0 0 1 12 0c0 6 3 7 3 7H3s3-1 3-7M10 20a2 2 0 0 0 4 0'/%3E%3C/svg%3E"); }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.shell.with-assistant { grid-template-columns: 248px 1fr 380px; }

.sidebar { background: var(--side-bg); color: var(--side-text); display: flex; flex-direction: column; padding: 18px 14px; gap: 6px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; padding: 2px 8px; }
.wordmark { font-family: var(--font-head); font-weight: 800; font-size: 21px; letter-spacing: -0.02em; color: #fff; }
.wordmark em, .lock-brand em { font-style: normal; color: var(--accent); margin-left: .22em; }
.product-tag { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); padding: 0 8px 10px 42px; }
.switcher { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 10px; padding: 10px; border: 1px solid var(--side-line); border-radius: 12px; background: var(--side-hover); }
.switcher .mono-label { color: var(--side-muted); }
.switcher select { background: transparent; color: #fff; border: 0; font: inherit; font-weight: 600; padding: 0; cursor: pointer; }
.switcher select option { color: #111; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; text-decoration: none; color: var(--side-text); font-weight: 500; position: relative; }
.nav a:hover { background: var(--side-hover); color: #fff; }
.nav a.active { background: var(--side-hover); color: #fff; }
.nav a.active::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav a.active .ic { color: var(--accent); }
.nav-group { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--side-muted); padding: 14px 10px 4px; }
.ic-form { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Cpath d='M7 10h10M7 14h6'/%3E%3C/svg%3E"); }
.ic-target { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Ccircle cx='12' cy='12' r='5'/%3E%3Ccircle cx='12' cy='12' r='1'/%3E%3C/svg%3E"); }
.ic-lock { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E"); }
.badge { margin-left: auto; background: var(--accent); color: var(--ink); font-size: 11px; font-weight: 700; border-radius: 999px; padding: 0 7px; line-height: 18px; }
.badge:empty { display: none; }

.ai-card { margin-top: auto; border: 1px solid var(--side-line); border-radius: 14px; padding: 12px; background: var(--side-hover); }
.ai-card .row1 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ai-card b { color: #fff; font-family: var(--font-head); font-size: 13px; }
.ai-card p { margin: 6px 0 0; font-size: 12px; color: var(--side-muted); }
.ai-card .state { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.ai-card .state.on { color: var(--accent); }
.ai-card .state.off { color: #ff8a7e; }
.acct-wrap { position: relative; margin-top: 10px; border-top: 1px solid var(--side-line); padding-top: 10px; }
.me { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border-radius: 12px; border: 0; background: none; color: var(--side-text); font-size: 13px; text-align: left; }
.me:hover, .me[aria-expanded="true"] { background: var(--side-hover); }
.me .who { flex: 1; min-width: 0; }
.me .who b { display: block; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .chev { color: var(--side-muted); font-size: 12px; }
.acct-menu { position: absolute; bottom: calc(100% + 6px); left: 0; right: 0; background: #232428; border: 1px solid #34353a; border-radius: 14px; padding: 8px; box-shadow: 0 16px 48px rgba(0,0,0,.45); z-index: 40; }
.acct-menu[hidden] { display: none; }
.acct-menu input { width: 100%; background: #16171a; border: 1px solid #34353a; color: #fff; border-radius: 9px; padding: 8px 10px; font: inherit; font-size: 13px; margin-bottom: 6px; }
.acct-menu input:focus { outline: 2px solid var(--accent); border-color: transparent; }
.acct-list { max-height: 320px; overflow-y: auto; }
.acct-item { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; color: var(--side-text); padding: 8px; border-radius: 9px; text-align: left; font-size: 13px; }
.acct-item:hover, .acct-item:focus-visible { background: #2e2f34; color: #fff; outline: none; }
.acct-item .acct-av { width: 28px; height: 28px; border-radius: 8px; background: #34353a; color: #fff; display: grid; place-items: center; font-family: var(--font-head); font-weight: 800; font-size: 11px; flex: none; }
.acct-item.all .acct-av { background: var(--accent); color: var(--ink); }
.acct-item .nm { flex: 1; min-width: 0; }
.acct-item .nm small { display: block; color: var(--side-muted); font-size: 11px; }
.acct-item .tick { color: var(--accent); font-weight: 800; }
.acct-sep { height: 1px; background: #34353a; margin: 6px 0; }
.acct-foot { padding: 6px 8px 2px; font-size: 11px; color: var(--side-muted); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--ink); display: grid; place-items: center; font-weight: 800; font-family: var(--font-head); }
.me small { display: block; color: var(--side-muted); font-size: 11px; }

/* switch */
.switch { position: relative; width: 38px; height: 22px; border-radius: 999px; border: 0; background: #4a4b50; padding: 0; flex: none; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(16px); }
.switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.main .switch { background: #cfccc6; }
:root[data-theme="dark"] .main .switch { background: #3a3c42; }
.main .switch.on { background: var(--accent); }

.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(117,217,95,.6); animation: pulse 2s infinite; display: inline-block; }
.pulse.off { background: #ff8a7e; animation: none; }
.pulse.amber { background: #f2b84b; animation: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(117,217,95,0); } 100% { box-shadow: 0 0 0 0 rgba(117,217,95,0); } }

/* ---------- top bar ---------- */
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px 28px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.crumbs { font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; min-width: 0; }
.crumbs b { color: var(--text); font-weight: 600; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn { position: relative; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; }
.icon-btn:hover { border-color: var(--muted); }
.menu-btn { display: none; }
.dot-count { position: absolute; top: -5px; right: -5px; background: var(--bad); color: #fff; font-size: 10px; font-weight: 700; border-radius: 999px; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 4px; }
.dot-count:empty { display: none; }
.ask-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--ink); color: #fff; border: 0; border-radius: 10px; padding: 9px 14px; font-weight: 600; }
:root[data-theme="dark"] .ask-btn { background: var(--accent); color: var(--ink); }
.ask-btn kbd { font-family: var(--font-mono); font-size: 10px; background: rgba(255,255,255,.14); border-radius: 5px; padding: 1px 5px; }
.bell-wrap { position: relative; }
.bell-menu { position: absolute; right: 0; top: 44px; width: 340px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.12); padding: 8px; z-index: 30; }
.bell-menu .bi { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 10px; border-radius: 10px; }
.bell-menu .bi:hover { background: var(--surface-2); }
.bell-menu .bi small { display: block; color: var(--muted); }

.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; background: var(--surface); }
.pill.sample { border-color: #e7c27a; color: var(--warn); background: var(--warn-bg); }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.good { background: var(--good-bg); color: var(--good); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.bad { background: var(--bad-bg); color: var(--bad); }
.chip.neutral { background: var(--surface-2); color: var(--muted); }
.chan { font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line); color: var(--muted); }
.chan.sms { color: var(--warn); border-color: #e7c27a; }

/* ---------- page ---------- */
#app { padding: 26px 28px 60px; max-width: 1320px; 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: 26px; font-weight: 800; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); padding: 8px 14px; border-radius: 10px; font-weight: 600; font-size: 13px; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.green { background: var(--accent); border-color: var(--accent); color: var(--ink); }
:root[data-theme="dark"] .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.btn.small { padding: 5px 10px; font-size: 12px; }
.btn:disabled { opacity: .65; cursor: progress; }
.link { background: none; border: 0; color: var(--accent-ink); font-weight: 600; padding: 0; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-head h2 { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.count { background: var(--accent); color: var(--ink); font-family: var(--font-body); font-size: 11px; font-weight: 800; border-radius: 999px; padding: 0 8px; line-height: 19px; }
.empty { color: var(--muted); padding: 22px 0; text-align: center; }
.grid { display: grid; gap: 16px; }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* hero */
.hero { position: relative; overflow: hidden; background: var(--ink); color: #fff; border-radius: 18px; padding: 24px 26px; margin-bottom: 16px; }
.hero::after { content: ""; position: absolute; right: -40px; top: -50px; width: 260px; height: 260px; background: url("/symbol.svg") center / contain no-repeat; opacity: .14; transform: rotate(8deg); }
.hero .mono-label { color: var(--accent); }
.hero h1 { font-size: 26px; font-weight: 800; margin-top: 6px; max-width: 760px; }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero p { margin: 8px 0 0; color: #c9c9c5; max-width: 640px; }
.hero .hero-actions { display: flex; gap: 8px; margin-top: 16px; position: relative; z-index: 1; flex-wrap: wrap; }
.hero .btn { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.16); color: #fff; }
.hero .btn.green { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.paused-banner { display: flex; align-items: center; gap: 12px; background: var(--bad-bg); color: var(--bad); border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; font-weight: 600; }
.paused-banner span { flex: 1; }

/* KPI tiles */
.kpi .label { color: var(--muted); font-size: 13px; display: flex; justify-content: space-between; align-items: center; }
.kpi .value { font-family: var(--font-head); font-size: 28px; font-weight: 800; letter-spacing: -0.02em; margin-top: 6px; }
.kpi .sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.delta { font-family: var(--font-mono); font-size: 11px; font-weight: 600; }
.delta.up { color: var(--good); }
.delta.down { color: var(--bad); }

/* chart */
.chart-wrap { position: relative; }
.chart { width: 100%; height: 230px; display: block; overflow: visible; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .axis-label { fill: var(--muted); font-size: 11px; font-family: var(--font-mono); }
.chart .area { fill: var(--accent-soft); }
.chart .line { fill: none; stroke: var(--accent-ink); stroke-width: 2; stroke-linejoin: round; }
:root[data-theme="dark"] .chart .line { stroke: var(--accent); }
.chart .cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .marker { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; border-radius: 8px; padding: 6px 10px; font-size: 12px; white-space: nowrap; transform: translate(-50%, -110%); }
.tip b { display: block; font-family: var(--font-head); font-size: 14px; }
:root[data-theme="dark"] .tip { background: #2a2c31; }
.big-number { font-family: var(--font-head); font-size: 30px; font-weight: 800; }

/* needs */
.need { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; }
.need:last-child { margin-bottom: 0; }
.need .icon { flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; }
.need .icon.approve { background: var(--good-bg); color: var(--good); }
.need .icon.alert { background: var(--warn-bg); color: var(--warn); }
.need .icon.high { background: var(--bad-bg); color: var(--bad); }
.need .body { flex: 1; min-width: 0; }
.need .title { font-weight: 600; }
.need .meta { color: var(--muted); font-size: 12px; margin-top: 2px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.need .detail { color: var(--muted); font-size: 13px; margin-top: 6px; }
.need .actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* tables */
.table-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 500; padding: 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover td { background: var(--surface-2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.cell-main { font-weight: 600; }
.cell-sub { color: var(--muted); font-size: 12px; }
.client-dot { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--surface-2); font-family: var(--font-head); font-weight: 800; font-size: 11px; margin-right: 8px; vertical-align: middle; }

/* tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 10px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.active { color: var(--text); border-bottom-color: var(--accent); }
.tabs .n { font-family: var(--font-mono); font-size: 11px; color: var(--muted); margin-left: 4px; }

/* feed */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.feed li:last-child { border-bottom: 0; }
.feed .dot { flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-size: 12px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }
.feed .dot.you { background: var(--surface-2); color: var(--muted); }
.feed .txt { flex: 1; min-width: 0; }
.feed .who { font-size: 12px; color: var(--muted); }
.feed .who b { color: var(--text); font-weight: 600; }

/* client cards */
.client-card { text-align: left; cursor: pointer; transition: border-color .15s, transform .15s; }
.client-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.client-card .top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.client-card h3 { font-size: 15px; }
.client-card .ind { color: var(--muted); font-size: 12px; }
.client-card .rev { font-family: var(--font-head); font-size: 22px; font-weight: 800; margin-top: 12px; }
.client-card .rev small { font-family: var(--font-body); font-size: 12px; color: var(--muted); font-weight: 500; }
.mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.mini div { font-size: 12px; color: var(--muted); }
.mini b { display: block; color: var(--text); font-size: 14px; }
.mini b.bad { color: var(--bad); }
.spark { margin-top: 10px; width: 100%; height: 34px; display: block; }
.card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); gap: 8px; }

/* audits */
.score-ring { position: relative; width: 84px; height: 84px; flex: none; }
.score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-ring .track { stroke: var(--surface-2); }
.score-ring .val { font-family: var(--font-head); font-weight: 800; font-size: 24px; position: absolute; inset: 0; display: grid; place-items: center; }
.score-ring.big { width: 150px; height: 150px; }
.score-ring.big .val { font-size: 40px; }
.audit-card { display: flex; gap: 16px; align-items: center; }
.audit-card .info { flex: 1; min-width: 0; }
.audit-hero { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.audit-hero .summary { flex: 1; min-width: 260px; }
.audit-hero .summary p { font-size: 15px; margin: 6px 0 0; }
.stake { display: flex; gap: 24px; margin-top: 14px; flex-wrap: wrap; }
.stake div { font-size: 12px; color: var(--muted); }
.stake b { display: block; font-family: var(--font-head); font-size: 20px; color: var(--text); }
.issue { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.issue:last-child { border-bottom: 0; }
.issue .body { flex: 1; min-width: 0; }
.issue .title { font-weight: 700; }
.issue .why { color: var(--muted); font-size: 13px; margin-top: 4px; }
.issue .impact { text-align: right; flex: none; }
.issue .impact b { display: block; font-family: var(--font-head); font-size: 16px; }
.issue .impact small { color: var(--muted); font-size: 11px; }
.issue.fixed { opacity: .55; }
.passed { list-style: none; margin: 0; padding: 0; }
.passed li { padding: 6px 0; display: flex; gap: 8px; color: var(--muted); }
.passed li::before { content: "✓"; color: var(--good); font-weight: 800; }

/* filters */
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.filters button { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 13px; color: var(--muted); }
.filters button.active { color: var(--ink); background: var(--accent); border-color: var(--accent); font-weight: 600; }

/* retention */
.ic-shield { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M12 3 4 6v6c0 5 3.5 8 8 9 4.5-1 8-4 8-9V6z'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E"); }
.ret-card { display: flex; gap: 20px; align-items: flex-start; }
.ret-left { display: flex; flex-direction: column; align-items: center; flex: none; }
.ret-main { flex: 1; min-width: 0; }
.ret-top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ret-quote { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-style: italic; font-size: 13px; }
.ret-quote span { font-style: normal; font-weight: 700; font-size: 11px; margin-right: 8px; padding: 1px 8px; border-radius: 999px; background: var(--surface); }
.ret-quote.negative { background: var(--bad-bg); } .ret-quote.negative span { color: var(--bad); }
.ret-quote.positive span { color: var(--good); }
.ret-quote small { font-style: normal; color: var(--muted); margin-left: 6px; }
.ret-reasons { margin: 10px 0 0; padding-left: 18px; font-size: 13px; color: var(--muted); }
.ret-reasons li { margin: 2px 0; }
.ret-plan { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px; margin-top: 6px; }
.ret-step { display: flex; gap: 10px; justify-content: space-between; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.ret-step .btn { flex: none; }
@media (max-width: 720px) { .ret-card { flex-direction: column; } }

/* safety check */
.qa { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; background: var(--surface); }
.qa.ok { border-color: var(--good); background: var(--good-bg); }
.qa.warn { border-color: #e7c27a; background: var(--warn-bg); }
.qa.bad { border-color: var(--bad); background: var(--bad-bg); }
.qa-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.qa.ok .qa-head b { color: var(--good); } .qa.warn .qa-head b { color: var(--warn); } .qa.bad .qa-head b { color: var(--bad); }
.qa ul { list-style: none; margin: 8px 0 0; padding: 0; font-size: 13px; }
.qa li { padding: 3px 0; }
.qa li.b { color: var(--bad); font-weight: 600; } .qa li.w { color: var(--warn); } .qa li.p { color: var(--muted); }
.qa details { margin-top: 6px; font-size: 12px; color: var(--muted); }
.qa summary { cursor: pointer; }

/* email designer */
.ic-design { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M12 20h9M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4z'/%3E%3C/svg%3E"); }
.ds-start { display: flex; flex-direction: column; gap: 12px; }
.ds-start-row { display: flex; gap: 12px; flex-wrap: wrap; }
.grow { flex: 1; min-width: 220px; }
.ds-start textarea { margin-top: 0; min-height: 64px; resize: vertical; }
.ds-grid { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 16px; align-items: start; }
.ds-chat { position: sticky; top: 76px; display: flex; flex-direction: column; max-height: calc(100vh - 100px); }
.ds-msgs { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; min-height: 160px; padding-bottom: 6px; }
.ds-preview { padding: 0; overflow: hidden; }
.ds-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ds-subject b { display: block; }
.ds-stage { background: repeating-conic-gradient(var(--surface-2) 0 25%, var(--surface) 0 50%) 0 0 / 22px 22px; padding: 20px; display: flex; justify-content: center; }
.ds-stage iframe, .email-frame { border: 0; width: 100%; max-width: 660px; min-height: 600px; background: #fff; border-radius: 10px; box-shadow: 0 10px 40px rgba(0,0,0,.12); }
.ds-stage.mobile iframe { max-width: 390px; border-radius: 28px; border: 10px solid #1a1b1f; }
.email-frame { height: 70vh; }
.ds-thumb { text-decoration: none; display: block; }
.ds-thumb:hover { border-color: var(--accent); }
.ds-thumb-frame { height: 220px; overflow: hidden; border-radius: 10px; background: var(--surface-2); position: relative; pointer-events: none; }
.ds-thumb-frame iframe { width: 680px; height: 900px; border: 0; transform: scale(.45); transform-origin: 0 0; }
.kit-dots { display: inline-flex; margin-right: 2px; }
.kit-dots i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--surface); margin-left: -4px; box-shadow: 0 0 0 1px var(--line); }
.kit-color { display: flex; gap: 8px; align-items: center; }
.kit-color input { width: 46px; height: 36px; padding: 2px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); }
.kit-color code { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
@media (max-width: 1000px) { .ds-grid { grid-template-columns: 1fr; } .ds-chat { position: static; max-height: none; } }

/* sign-up form preview */
.ab-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pop-site { background: repeating-linear-gradient(0deg, #ecebe7 0 18px, #f4f3f0 18px 36px); border-radius: 12px; overflow: hidden; border: 1px solid var(--line); padding-bottom: 24px; }
.pop-site-bar { display: flex; gap: 5px; align-items: center; background: #dedcd7; padding: 7px 10px; }
.pop-site-bar span { width: 8px; height: 8px; border-radius: 50%; background: #bdbab3; }
.pop-site-bar em { font-style: normal; font-size: 11px; color: #777; margin-left: 8px; font-family: var(--font-mono); }
.pop-card { position: relative; width: min(300px, 88%); margin: 24px auto 0; background: #fff; color: #111; border-radius: 14px; padding: 22px 20px 16px; text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,.18); }
.pop-card .mono-label { margin-bottom: 6px; }
.pop-x { position: absolute; top: 8px; right: 12px; color: #999; font-size: 12px; }
.pop-brand { font-family: var(--font-head); font-weight: 800; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: #777; }
.pop-head { font-family: var(--font-head); font-weight: 800; font-size: 20px; line-height: 1.2; margin: 8px 0 6px; }
.pop-sub { font-size: 12.5px; color: #555; }
.pop-input { margin-top: 14px; border: 1px solid #ddd; border-radius: 8px; padding: 9px; font-size: 12px; color: #aaa; text-align: left; }
.pop-btn { margin-top: 8px; background: #111; color: #fff; border-radius: 8px; padding: 10px; font-weight: 700; font-size: 13px; }
.pop-fine { font-size: 10px; color: #999; margin-top: 8px; }
@media (max-width: 720px) { .ab-grid { grid-template-columns: 1fr; } }

.prospect-form { display: grid; grid-template-columns: 2fr 1.2fr 1.2fr auto; gap: 12px; align-items: end; }
@media (max-width: 1000px) { .prospect-form { grid-template-columns: 1fr; } }

/* settings */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); font-weight: 500; }
.field input, .field select, textarea { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; font: inherit; font-size: 14px; }
.field input:focus, .field select:focus, textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
.field input[type=color] { padding: 3px; height: 40px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border-bottom: 0; }
.setting-row small { display: block; color: var(--muted); }

/* modal */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(10,10,12,.55); }
.modal-card { position: relative; width: min(780px, 100%); max-height: 90vh; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.modal-card .x { position: absolute; top: 14px; right: 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 50%; width: 32px; height: 32px; }
.modal-card h2 { font-size: 20px; padding-right: 40px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0; }
.facts div { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; font-size: 12px; color: var(--muted); }
.facts b { display: block; color: var(--text); font-size: 14px; }
.botnote { background: var(--accent-soft); border-left: 3px solid var(--accent); padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; }
.botnote b { color: var(--accent-ink); }
.inbox { background: #fff; color: #111; border-radius: 12px; overflow: hidden; border: 1px solid #e6e6e6; }
.inbox .hdr { padding: 14px 18px; border-bottom: 1px solid #ececec; }
.inbox .from { font-size: 12px; color: #666; }
.inbox .subj { font-weight: 700; font-size: 16px; }
.inbox .pre { font-size: 13px; color: #777; }
.inbox .content { padding: 20px 18px; white-space: pre-wrap; font-size: 14px; line-height: 1.6; }
.inbox .cta { display: inline-block; background: #111; color: #fff; padding: 9px 18px; border-radius: 6px; font-weight: 600; margin: 4px 0; }
.phone { width: 300px; max-width: 100%; margin: 0 auto; background: #1d1f1d; color: #fff; border-radius: 28px; padding: 18px 14px 28px; }
.phone .bubble { background: #2c2f2c; border-radius: 16px 16px 16px 4px; padding: 10px 12px; white-space: pre-wrap; font-size: 13px; }
.phone .sender { text-align: center; color: #999; font-size: 11px; margin-bottom: 10px; }
.modal-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; align-items: center; }
textarea { width: 100%; min-height: 80px; margin-top: 12px; }
.section-title { font-family: var(--font-head); font-size: 14px; font-weight: 700; margin: 20px 0 8px; }
.toggle { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.toggle button { border: 0; background: none; padding: 6px 14px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 13px; }
.toggle button.on { background: var(--ink); color: #fff; }
:root[data-theme="dark"] .toggle button.on { background: var(--accent); color: var(--ink); }
.help { color: var(--muted); font-size: 12px; margin-top: 6px; }
.brandform { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.brandform .modal-actions { grid-column: 1 / -1; margin-top: 4px; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row .when { width: 120px; flex: none; color: var(--muted); font-size: 12px; }
.row .what { flex: 1; min-width: 0; }
.row .what .s { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .what .c { color: var(--muted); font-size: 12px; }
.clickable-row { cursor: pointer; border-radius: 8px; }
.clickable-row:hover { background: var(--surface-2); }
.clickable-row .what .c { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.day { margin-bottom: 18px; }
.day h3 { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 6px; font-weight: 500; }

/* ---------- assistant ---------- */
.assistant { position: sticky; top: 0; height: 100vh; background: var(--surface); border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.assistant[hidden] { display: none; }
.as-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.as-title { display: flex; gap: 10px; align-items: center; }
.as-title b { font-family: var(--font-head); display: block; }
.as-title span { font-size: 12px; color: var(--muted); }
.as-tools { display: flex; gap: 6px; }
.as-tools .icon-btn { width: 32px; height: 32px; }
.as-tools .icon-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); }
.as-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 88%; padding: 10px 13px; border-radius: 14px; font-size: 14px; white-space: pre-wrap; }
.msg.user { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 4px; }
:root[data-theme="dark"] .msg.user { background: var(--accent); color: var(--ink); }
.msg.ai { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 4px; }
.msg.ai .did { display: block; margin-top: 6px; font-size: 11px; color: var(--accent-ink); font-family: var(--font-mono); }
.msg.thinking { color: var(--muted); }
.as-chips { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 16px 10px; }
.as-chips button { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; font-size: 12px; color: var(--text); }
.as-chips button:hover { border-color: var(--accent); }
.as-input { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); }
.as-input input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; background: var(--surface); color: var(--text); }
.as-input input:focus { outline: 2px solid var(--accent); border-color: transparent; }
.as-input .mic, .as-input .send { width: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-size: 16px; }
.as-input .send { background: var(--ink); color: #fff; border-color: var(--ink); }
:root[data-theme="dark"] .as-input .send { background: var(--accent); color: var(--ink); }
.as-input .mic.listening { background: var(--bad); color: #fff; border-color: var(--bad); animation: pulse-red 1.2s infinite; }
@keyframes pulse-red { 50% { box-shadow: 0 0 0 6px rgba(180,35,24,.2); } }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; font-weight: 600; padding: 10px 18px; border-radius: 999px; z-index: 70; box-shadow: 0 8px 30px rgba(0,0,0,.25); display: flex; gap: 8px; align-items: center; }
.toast[hidden] { display: none; }
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.toast.error { background: var(--bad); }
.toast.error::before { background: #fff; }

/* ---------- sign-in ---------- */
.lock { position: fixed; inset: 0; z-index: 100; display: grid; place-items: safe center; padding: 20px; background: var(--ink); overflow-y: auto; overflow-x: hidden; }
.lock[hidden] { display: none; }
.lock::before { content: ""; position: absolute; right: -80px; bottom: -80px; width: 480px; height: 480px; background: url("/symbol.svg") center / contain no-repeat; opacity: .08; }
.lock-card { position: relative; width: min(400px, 100%); background: var(--surface); border-radius: 20px; padding: 30px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 30px 80px rgba(0,0,0,.4); }
.lock-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 800; font-size: 22px; letter-spacing: -.02em; }
.lock-card h1 { font-size: 22px; font-weight: 800; margin-top: 8px; }
.lock-card p { margin: 0; color: var(--muted); }
.lock-err { color: var(--bad); font-weight: 600; min-height: 20px; font-size: 13px; }
.lock-card .btn { justify-content: center; padding: 11px; }
.lock-foot { display: flex; gap: 6px; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; }
.lock-foot .ic { width: 14px; height: 14px; }
.lock-link { align-self: center; font-size: 13px; }
.lock-links { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; flex-wrap: wrap; }
.nav a[hidden] { display: none; }
.role-select { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; font: inherit; font-size: 12px; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.plan { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.plan.current { border-color: var(--accent); background: var(--accent-soft); }
.plan b { font-family: var(--font-head); font-size: 15px; }
.plan-price { font-family: var(--font-head); font-weight: 800; font-size: 24px; }
.plan-price small { font-size: 12px; color: var(--muted); font-weight: 500; }
.plan ul { margin: 4px 0 6px; padding-left: 16px; font-size: 12px; color: var(--muted); }
.plan .btn, .plan .chip { align-self: flex-start; margin-top: auto; }
.rcode { font-family: var(--font-mono); font-size: 18px; font-weight: 600; letter-spacing: .08em; text-align: center; padding: 16px; border-radius: 12px; background: var(--surface-2); border: 1px dashed var(--line); user-select: all; word-break: break-all; }
.rc-check { display: flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 500; }
.sec-check { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; }
.sec-check .ok { color: var(--good); font-weight: 800; }
.sec-check .no { color: var(--warn); font-weight: 800; }

/* ---------- responsive ---------- */
@media (max-width: 1280px) { .shell.with-assistant { grid-template-columns: 248px 1fr; } .shell.with-assistant .assistant { position: fixed; right: 0; top: 0; width: 380px; max-width: 100%; z-index: 50; box-shadow: -10px 0 40px rgba(0,0,0,.15); } }
@media (max-width: 1100px) { .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-main { grid-template-columns: 1fr; } .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .shell, .shell.with-assistant { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 55; width: 260px; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; box-shadow: 10px 0 40px rgba(0,0,0,.3); }
  .menu-btn { display: grid; }
  .topbar { padding: 10px 16px; }
  #app { padding: 18px 16px 50px; }
  .ask-btn kbd, #samplePill { display: none; }
  .g-3, .g-4 { grid-template-columns: 1fr 1fr; }
  .form-grid, .brandform { grid-template-columns: 1fr; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 21px; }
  .bell-menu { width: min(340px, calc(100vw - 32px)); right: -60px; }
}
@media (max-width: 520px) { .g-3, .g-4 { grid-template-columns: 1fr; } .kpi .value { font-size: 24px; } .row .when { width: 82px; } }

/* ---------- first run ---------- */
.hero.welcome h1 { max-width: 820px; }
.progress { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin: 2px 0 14px; }
.progress span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.setup-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.setup-steps li { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.setup-steps li > div { flex: 1; } .setup-steps p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.setup-steps .step-dot { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--surface-2); color: var(--text); font-family: var(--font-mono); }
.setup-steps li.done .step-dot { background: var(--accent); color: #111; } .setup-steps li.done b { color: var(--muted); text-decoration: line-through; }
.platform-list { display: grid; gap: 8px; } .platform { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; } .platform small { color: var(--muted); }

/* ---------- platform admin ---------- */
.adm-hero { background: var(--ink); color: #fff; border-radius: 20px; padding: 26px 28px; display: grid; grid-template-columns: minmax(260px, 1fr) 2fr; gap: 28px; margin-bottom: 16px; position: relative; overflow: hidden; }
.adm-hero::after { content: ""; position: absolute; right: -60px; top: -80px; width: 320px; height: 320px; background: radial-gradient(circle, rgba(117,217,95,.22), transparent 65%); pointer-events: none; }
.adm-hero .mono-label { color: var(--accent); }
.adm-big { font-family: var(--font-head); font-weight: 800; font-size: 52px; letter-spacing: -.03em; line-height: 1; margin: 10px 0 6px; }
.adm-sub { color: #b9b9b5; font-size: 13px; }
.adm-sub b { color: #fff; }
.adm-pair { display: flex; gap: 26px; margin-top: 18px; flex-wrap: wrap; }
.adm-pair div { display: flex; flex-direction: column; } .adm-pair b { font-family: var(--font-head); font-size: 22px; } .adm-pair span { color: #9a9a96; font-size: 11.5px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .08em; }
.adm-delta { font-family: var(--font-mono); font-size: 12px; padding: 3px 8px; border-radius: 99px; background: rgba(117,217,95,.16); color: var(--accent); margin-left: 8px; vertical-align: middle; }
.adm-delta.down { background: rgba(255,107,94,.16); color: #ff8a7e; }
.adm-chart { position: relative; z-index: 1; }
.adm-chart svg { width: 100%; height: 190px; display: block; }
.adm-chart .gl { stroke: #2c2d31; } .adm-chart .al { fill: #8d8d89; font: 10px var(--font-mono); }
.adm-chart .ln { fill: none; stroke: var(--accent); stroke-width: 2; } .adm-chart .ar { fill: url(#admFill); }
.adm-chart .bar { fill: var(--accent); }
.adm-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.adm-tabs button { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 6px 12px; font: inherit; font-size: 12.5px; cursor: pointer; color: var(--text); }
.adm-tabs button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.adm-tools { display: flex; gap: 10px; justify-content: space-between; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.adm-tools input { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font: inherit; background: var(--surface); color: var(--text); min-width: 220px; }
.mix-row { display: grid; grid-template-columns: 90px 1fr 70px; gap: 10px; align-items: center; padding: 7px 0; font-size: 13px; }
.mix-bar { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; } .mix-bar span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.attn { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13px; }
.attn:first-child { border-top: 0; } .attn .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: none; }
.health { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.health div { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.health span { font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ws-name { display: flex; gap: 10px; align-items: center; } .ws-avatar { width: 30px; height: 30px; border-radius: 9px; background: var(--ink); color: var(--accent); display: grid; place-items: center; font-weight: 800; font-family: var(--font-head); font-size: 12px; flex: none; }
@media (max-width: 1000px) { .adm-hero { grid-template-columns: 1fr; } .health { grid-template-columns: 1fr; } }

[hidden] { display: none !important; }

/* ---------- floating logo and Christopher button ---------- */
@keyframes sd-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes sd-glow { 0%, 100% { box-shadow: 0 10px 30px rgba(0,0,0,.28), 0 0 0 0 rgba(117,217,95,.45); } 50% { box-shadow: 0 16px 36px rgba(0,0,0,.3), 0 0 0 10px rgba(117,217,95,0); } }
.brand img, .lock-brand img, .as-title img { animation: sd-float 4s ease-in-out infinite; }
.fab { position: fixed; right: 24px; bottom: 24px; z-index: 60; display: flex; align-items: center; gap: 10px; padding: 8px 18px 8px 8px; border: 0; border-radius: 99px; background: var(--ink); color: #fff; font: inherit; font-weight: 600; cursor: pointer; animation: sd-float 4s ease-in-out infinite, sd-glow 3s ease-in-out infinite; }
.fab img { border-radius: 10px; animation: none; }
.fab:hover { background: #24252a; }
.fab:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
body:has(.shell.with-assistant) .fab, body:has(#lock:not([hidden])) .fab { display: none; }
@media (max-width: 640px) { .fab span { display: none; } .fab { padding: 8px; right: 16px; bottom: 16px; } }
@media (prefers-reduced-motion: reduce) { .brand img, .lock-brand img, .as-title img, .fab { animation: none; } }

/* ---------- in-page "are you sure?" ---------- */
.confirm-layer { position: fixed; inset: 0; z-index: 200; background: rgba(10,11,13,.55); display: grid; place-items: center; padding: 16px; }
.confirm-card { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 16px; padding: 22px; width: min(440px, 100%); box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.confirm-card p { margin: 0 0 6px; font-size: 15px; line-height: 1.5; }
.btn.danger { background: var(--bad); color: #fff; border-color: var(--bad); }

/* ---------- form creator ---------- */
.fe-grid { display: grid; grid-template-columns: minmax(320px, 420px) 1fr; gap: 16px; align-items: start; }
.fe-controls { display: flex; flex-direction: column; gap: 10px; }
.fe-controls .field { margin: 0; }
.fe-label { font-size: 12.5px; font-weight: 600; color: var(--muted); margin-top: 4px; }
.fe-section { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.fe-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fe-checks { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13.5px; }
.fe-checks label { display: flex; gap: 6px; align-items: center; cursor: pointer; }
.fe-colors { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.fe-color { display: flex; align-items: center; gap: 8px; font-size: 12.5px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; cursor: pointer; }
.fe-color input { width: 26px; height: 26px; border: 0; padding: 0; background: none; cursor: pointer; }
.fe-types button { flex: 1; }
.fe-preview { position: sticky; top: 76px; }
.fe-ptools { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.fe-variants { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.fe-variant { padding: 12px; display: flex; flex-direction: column; }
.fe-variant .btn { margin-top: auto; align-self: flex-start; }
.modal-card:has(.fe-variants) { width: min(1100px, 100%); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 3px; background: var(--surface-2); }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 8px; font: inherit; font-size: 13px; cursor: pointer; color: var(--text); }
.seg button.on { background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.12); font-weight: 600; }

/* preview: a fake website with the form on it */
.fp-site { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 20px 50px rgba(0,0,0,.08); }
.fp-site.phone { width: 360px; max-width: 100%; margin: 0 auto; border-radius: 30px; border: 10px solid #1a1b1f; }
.fp-bar { display: flex; gap: 5px; align-items: center; background: #e9e7e3; padding: 8px 12px; }
.fp-bar span { width: 9px; height: 9px; border-radius: 50%; background: #c4c1ba; }
.fp-bar em { font-style: normal; font-size: 11px; color: #777; margin-left: 10px; font-family: var(--font-mono); }
.fp-page { position: relative; min-height: 460px; background: #fbfaf8; padding: 14px; }
.fp-site.phone .fp-page { min-height: 620px; }
.fp-nav { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; color: #333; font-size: 13px; }
.fp-nav i { width: 46px; height: 8px; border-radius: 4px; background: #e4e1dc; }
.fp-nav i:first-of-type { margin-left: auto; }
.fp-hero { height: 150px; border-radius: 12px; background: linear-gradient(120deg, #e8e5df, #f1efeb); margin-bottom: 12px; }
.fp-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fp-row div { height: 110px; border-radius: 10px; background: #eeece8; }
.fp-layer { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 18px; }
.fp-layer.dim { background: rgba(15,15,18,.45); }
.fp-layer.full { padding: 0; }
.fp-layer.flyout { align-items: flex-end; justify-content: flex-end; }
.fp-card { position: relative; width: min(420px, 100%); box-shadow: 0 24px 60px rgba(0,0,0,.28); overflow: hidden; display: flex; }
.fp-card.split { width: min(600px, 100%); }
.fp-card.fp-flyout { width: min(300px, 100%); }
.fp-card.fp-full-screen { width: 100%; height: 100%; box-shadow: none; border-radius: 0 !important; align-items: center; justify-content: center; }
.fp-card.fp-embed { width: 100%; box-shadow: none; }
.fp-footer { margin-top: 14px; }
.fp-panel { flex: 0 0 42%; display: grid; place-items: center; padding: 18px; }
.fp-panel span { font-family: var(--font-head); font-weight: 800; font-size: 34px; color: rgba(0,0,0,.78); text-align: center; line-height: 1.05; text-transform: uppercase; word-break: break-word; }
.fp-body { flex: 1; padding: 26px 24px 20px; text-align: center; display: flex; flex-direction: column; gap: 8px; justify-content: center; max-width: 460px; }
.fp-x { position: absolute; top: 10px; right: 12px; font-size: 13px; opacity: .55; }
.fp-logo { font-weight: 800; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.fp-head { font-weight: 800; font-size: 24px; line-height: 1.15; }
.fp-sub { font-size: 14px; opacity: .8; line-height: 1.45; }
.fp-input { border: 1px solid rgba(0,0,0,.18); background: rgba(255,255,255,.9); color: #888; text-align: left; padding: 11px 12px; font-size: 13.5px; }
.fp-btn { padding: 12px; font-weight: 700; font-size: 15px; }
.fp-fine { font-size: 11px; opacity: .6; }
.fp-site.phone .fp-card.split { flex-direction: column; }
.fp-site.phone .fp-panel { flex-basis: auto; padding: 14px; }
.fp-site.phone .fp-panel span { font-size: 24px; }
.fp-site.phone .fp-row { grid-template-columns: 1fr 1fr; }
.fp-site.fp-mini .fp-page { min-height: 300px; padding: 8px; }
.fp-site.fp-mini .fp-hero { height: 70px; }
.fp-site.fp-mini .fp-row div { height: 50px; }
.fp-site.fp-mini .fp-head { font-size: 16px; }
.fp-site.fp-mini .fp-sub, .fp-site.fp-mini .fp-fine { display: none; }
.fp-site.fp-mini .fp-body { padding: 14px 12px; gap: 6px; }
.fp-site.fp-mini .fp-panel span { font-size: 20px; }
.fp-site.fp-mini .fp-input, .fp-site.fp-mini .fp-btn { padding: 7px; font-size: 11.5px; }
@media (max-width: 1100px) { .fe-grid { grid-template-columns: 1fr; } .fe-preview { position: static; } .fe-variants { grid-template-columns: 1fr; } }

/* ---------- publish forms to a website ---------- */
.pub-status { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--warn-bg); color: var(--warn); font-size: 13.5px; }
.pub-status.ok { background: var(--good-bg); color: var(--good); }
.pub-code { display: flex; gap: 10px; align-items: center; background: var(--ink); color: #d9d9d6; border-radius: 12px; padding: 12px 12px 12px 14px; margin-top: 8px; }
.pub-code code { flex: 1; font-family: var(--font-mono); font-size: 12.5px; word-break: break-all; color: #b8f0a8; }
.pub-code.small { padding: 8px 12px; }
.pub-code.small .cell-sub { color: #9a9a96; white-space: nowrap; }
.pub-how { margin-top: 10px; font-size: 13.5px; }
.pub-how summary { cursor: pointer; font-weight: 600; }
.pub-how li { margin: 6px 0; line-height: 1.5; }
.pub-how code { font-family: var(--font-mono); font-size: 12px; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
#pubList { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; }

/* ---------- Brand DNA ---------- */
.dna-form { display: flex; gap: 10px; margin-top: 12px; }
.dna-form input { flex: 1; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: var(--surface); color: var(--text); }
.dna-result { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.dna-head { display: flex; gap: 14px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 14px; }
.dna-logo { width: 64px; height: 64px; object-fit: contain; border-radius: 12px; background: #fff; border: 1px solid var(--line); padding: 6px; }
.dna-logo-text { display: grid; place-items: center; font-family: var(--font-head); font-weight: 800; font-size: 26px; }
.dna-pick { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 14px; cursor: pointer; }
.dna-swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.dna-sw { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: 12px; display: flex; flex-direction: column; }
.dna-sw span { height: 44px; }
.dna-sw b, .dna-sw code { padding: 0 10px; }
.dna-sw b { padding-top: 6px; }
.dna-sw code { font-family: var(--font-mono); color: var(--muted); padding-bottom: 8px; }
.dna-palette { display: flex; gap: 4px; }
.dna-palette span { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line); }
.dna-fonts { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.dna-products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.dna-products div { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; font-size: 11.5px; background: #fff; color: #222; }
.dna-products img { width: 100%; aspect-ratio: 1; object-fit: cover; background: #f2f0ed; }
.dna-products span { padding: 6px 8px 0; line-height: 1.3; }
.dna-products b { padding: 2px 8px 8px; }
.dna-voice { border: 1px solid var(--line); border-radius: 12px; padding: 4px 14px; }
.dna-voice div { padding: 8px 0; border-top: 1px solid var(--line); font-size: 13.5px; display: grid; grid-template-columns: 90px 1fr; gap: 10px; }
.dna-voice div:first-child { border-top: 0; }
.dna-voice span { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.modal-card:has(.dna-result) { width: min(860px, 100%); }
.fe-images { display: flex; gap: 6px; flex-wrap: wrap; }
.fe-images button { width: 58px; height: 58px; border: 2px solid var(--line); border-radius: 10px; padding: 0; overflow: hidden; background: var(--surface-2); cursor: pointer; font-size: 10.5px; color: var(--muted); }
.fe-images button.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.fe-images img { width: 100%; height: 100%; object-fit: cover; }
.fp-logoimg { max-height: 30px; max-width: 150px; object-fit: contain; display: inline-block; }
.fp-panel { min-height: 200px; }
@media (max-width: 720px) { .dna-swatches, .dna-products { grid-template-columns: repeat(2, 1fr); } .dna-form { flex-direction: column; } }

/* ---------- deliverability ---------- */
.ic-inbox { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M3 13h5l1.5 3h5l1.5-3h5'/%3E%3Cpath d='M5 5h14l2 8v6H3v-6z'/%3E%3C/svg%3E"); }
.deliv-hero { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin: 14px 0; padding: 16px 18px; border-radius: 14px; background: var(--surface-2); }
.deliv-hero b { font-family: var(--font-head); font-size: 40px; line-height: 1; }
.deliv-hero span { color: var(--muted); }
.deliv-hero p { flex-basis: 100%; margin: 6px 0 0; font-size: 14px; }
.deliv-hero.good b { color: var(--good); } .deliv-hero.warn b { color: var(--warn); } .deliv-hero.bad b { color: var(--bad); }
.deliv-list { display: flex; flex-direction: column; }
.deliv-item { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.deliv-item p { margin: 3px 0 0; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.deliv-ic { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--surface-2); color: var(--muted); }
.deliv-ic.good { background: var(--good-bg); color: var(--good); } .deliv-ic.warn { background: var(--warn-bg); color: var(--warn); } .deliv-ic.bad { background: var(--bad-bg, #fde4e1); color: var(--bad); }
.deliv-fix { color: var(--text) !important; } .deliv-fix span { font-weight: 700; }
.deliv-rec { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; margin-top: 8px; padding: 10px; border-radius: 10px; background: var(--ink); color: #d9d9d6; }
.deliv-rec div { display: flex; flex-direction: column; gap: 2px; min-width: 70px; } .deliv-rec .grow { flex: 1; min-width: 200px; }
.deliv-rec span { font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: #9a9a96; }
.deliv-rec code { font-family: var(--font-mono); font-size: 12px; color: #b8f0a8; word-break: break-all; }
.deliv-cur { margin-top: 6px; font-size: 12.5px; } .deliv-cur summary { cursor: pointer; color: var(--muted); }
.deliv-cur code { display: block; font-family: var(--font-mono); font-size: 11.5px; word-break: break-all; background: var(--surface-2); padding: 6px 8px; border-radius: 8px; margin-top: 4px; }
