/* ==========================================================================
   FollowUp Assistant — design system
   Night-instrument palette · Geist / Geist Mono / Instrument Serif
   ========================================================================== */

:root {
  color-scheme: dark;
  --bg: #06070a;
  --bg-2: #0a0c11;
  --surface: #0f1219;
  --surface-2: #141823;
  --surface-3: #1a1f2c;
  --glass: rgba(20, 24, 35, 0.62);
  --line: rgba(255, 255, 255, 0.065);
  --line-2: rgba(255, 255, 255, 0.11);
  --line-3: rgba(255, 255, 255, 0.18);
  --text: #eef0f5;
  --text-2: #c9cdd8;
  --muted: #959cab;
  --faint: #636a79;

  --accent: #5ef0c4;
  --accent-2: #2fd3a6;
  --accent-ink: #03130d;
  --accent-soft: rgba(94, 240, 196, 0.1);
  --accent-glow: rgba(94, 240, 196, 0.35);
  --violet: #a291ff;
  --ember: #ff9a6b;
  --ember-soft: rgba(255, 154, 107, 0.12);
  --danger: #ff6b7d;
  --danger-soft: rgba(255, 107, 125, 0.1);
  --warn: #f5c66e;
  --warn-soft: rgba(245, 198, 110, 0.1);

  --st-new: #8ea6ff;
  --st-contacted: #62d4f2;
  --st-appointment: #b89dff;
  --st-closed: #5ef0c4;

  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --serif: 'Instrument Serif', ui-serif, Georgia, serif;

  --r-xs: 6px;
  --r-sm: 9px;
  --r: 12px;
  --r-lg: 18px;
  --r-xl: 26px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 20px 50px -24px rgba(0, 0, 0, 0.8);
  --shadow-lg: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 40px 90px -30px rgba(0, 0, 0, 0.9);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.55;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'ss01', 'cv11';
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
::selection { background: rgba(94, 240, 196, 0.28); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); font-feature-settings: 'zero', 'tnum'; letter-spacing: -0.01em; }
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.nowrap { white-space: nowrap; }
.grow { flex: 1; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.stack { display: grid; gap: 14px; }
.stack-sm { display: grid; gap: 8px; }
.stack-lg { display: grid; gap: 22px; }
.between { justify-content: space-between; }
.hidden { display: none !important; }

/* ---------- Brand mark ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.02em; font-size: 15px; }
.brand-mark { width: 26px; height: 26px; flex: none; }
.brand-mark .trk { stroke: var(--line-3); }
.brand-mark .n1 { fill: var(--st-new); }
.brand-mark .n2 { fill: var(--st-contacted); }
.brand-mark .n3 { fill: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  --b-bg: var(--surface-2);
  --b-fg: var(--text);
  --b-line: var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 15px;
  border-radius: var(--r-sm);
  border: 1px solid var(--b-line);
  background: var(--b-bg);
  color: var(--b-fg);
  font-weight: 500; font-size: 13.5px;
  cursor: pointer; white-space: nowrap;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease), transform 0.12s var(--ease), box-shadow 0.2s var(--ease), color 0.18s;
  user-select: none;
}
.btn:hover { --b-bg: var(--surface-3); --b-line: var(--line-3); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-primary {
  --b-bg: var(--accent); --b-fg: var(--accent-ink); --b-line: transparent;
  font-weight: 600;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset, 0 8px 24px -10px var(--accent-glow);
}
.btn-primary:hover { --b-bg: #7ff6d3; --b-line: transparent; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2) inset, 0 10px 32px -8px var(--accent-glow); }
.btn-ghost { --b-bg: transparent; --b-line: transparent; color: var(--text-2); }
.btn-ghost:hover { --b-bg: rgba(255, 255, 255, 0.05); --b-line: transparent; color: var(--text); }
.btn-danger { --b-bg: var(--danger-soft); --b-fg: var(--danger); --b-line: rgba(255, 107, 125, 0.22); }
.btn-danger:hover { --b-bg: rgba(255, 107, 125, 0.16); --b-line: rgba(255, 107, 125, 0.35); }
.btn-sm { height: 31px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.icon-btn { width: 34px; height: 34px; padding: 0; }

/* ---------- Forms ---------- */
.field { display: grid; gap: 7px; }
.field > label, .label { font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.hint { font-size: 12px; color: var(--faint); }
.input, .select, .textarea {
  width: 100%; height: 40px; padding: 0 12px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.textarea { height: auto; min-height: 110px; padding: 11px 12px; line-height: 1.6; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--line-3); }
.input:focus, .select:focus, .textarea:focus { border-color: rgba(94, 240, 196, 0.55); box-shadow: 0 0 0 4px rgba(94, 240, 196, 0.09); background: #090b10; }
.select { appearance: none; padding-right: 34px; background-image: 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='%23959cab' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.select option { background: var(--surface); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--text-2); cursor: pointer; }
.check input { appearance: none; flex: none; width: 17px; height: 17px; margin-top: 2px; border-radius: 5px; border: 1px solid var(--line-3); background: var(--bg-2); display: grid; place-items: center; cursor: pointer; transition: 0.15s; }
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { content: ''; width: 9px; height: 5px; border: 2px solid var(--accent-ink); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.toggle { position: relative; width: 38px; height: 22px; flex: none; }
.toggle input { appearance: none; position: absolute; inset: 0; margin: 0; border-radius: 99px; background: var(--surface-3); border: 1px solid var(--line-2); cursor: pointer; transition: 0.2s; }
.toggle input::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: 0.2s var(--ease); }
.toggle input:checked { background: var(--accent-soft); border-color: rgba(94, 240, 196, 0.5); }
.toggle input:checked::after { transform: translateX(16px); background: var(--accent); }
.form-error { color: var(--danger); font-size: 13px; }

/* ---------- Password visibility + Google sign-in ---------- */
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 42px; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; display: grid; place-items: center;
  border: 0; background: transparent; color: var(--muted); border-radius: 8px; cursor: pointer;
}
.pw-toggle:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.pw-toggle.on { color: var(--accent); }
.pw-toggle svg { width: 17px; height: 17px; }
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--line-2); }
.btn-google { --b-bg: #fff; --b-fg: #1a1d24; --b-line: rgba(255, 255, 255, 0.25); }
.btn-google:hover { --b-bg: #f2f4f7; --b-line: rgba(255, 255, 255, 0.4); }
.btn-google .g-mark { font-weight: 700; font-size: 17px; color: #4285f4; line-height: 1; }

/* ---------- Surfaces ---------- */
.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 40%), var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}
.card-pad { padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { margin: 0; font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; }
.card-body { padding: 20px 22px; }
.divider { height: 1px; background: var(--line); margin: 6px 0; border: 0; }
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }

/* ---------- Badges / chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 99px; font-size: 11.5px; font-weight: 500; border: 1px solid var(--line-2); color: var(--text-2); background: rgba(255, 255, 255, 0.025); white-space: nowrap; }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-accent { color: var(--accent); background: var(--accent-soft); border-color: rgba(94, 240, 196, 0.22); }
.badge-ember { color: var(--ember); background: var(--ember-soft); border-color: rgba(255, 154, 107, 0.25); }
.badge-danger { color: var(--danger); background: var(--danger-soft); border-color: rgba(255, 107, 125, 0.22); }
.badge-warn { color: var(--warn); background: var(--warn-soft); border-color: rgba(245, 198, 110, 0.22); }
.badge-violet { color: var(--violet); background: rgba(162, 145, 255, 0.1); border-color: rgba(162, 145, 255, 0.22); }
.stage { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.stage::before { content: ''; width: 7px; height: 7px; border-radius: 2px; background: var(--c); box-shadow: 0 0 10px var(--c); }
.st-new { --c: var(--st-new); }
.st-contacted { --c: var(--st-contacted); }
.st-appointment { --c: var(--st-appointment); }
.st-closed { --c: var(--st-closed); }
.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.pulse::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--accent); opacity: 0; animation: pulse 2.4s var(--ease) infinite; }
.pulse.ember { background: var(--ember); }
.pulse.ember::after { border-color: var(--ember); }
@keyframes pulse { 0% { transform: scale(0.6); opacity: 0.9; } 100% { transform: scale(1.8); opacity: 0; } }

/* ---------- Flash / toasts ---------- */
.flash-wrap { position: fixed; z-index: 90; top: 18px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; width: min(520px, calc(100vw - 32px)); pointer-events: none; }
.flash { pointer-events: auto; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: rgba(20, 24, 35, 0.92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); font-size: 13.5px; animation: flashIn 0.35s var(--ease); }
.flash svg { width: 17px; height: 17px; flex: none; margin-top: 1px; }
.flash-ok svg { color: var(--accent); }
.flash-err svg { color: var(--danger); }
.flash-info svg { color: var(--violet); }
.flash.out { animation: flashOut 0.3s var(--ease) forwards; }
@keyframes flashIn { from { opacity: 0; transform: translateY(-8px) scale(0.98); } }
@keyframes flashOut { to { opacity: 0; transform: translateY(-8px); } }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--surface-2); font-size: 13.5px; color: var(--text-2); }
.notice svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.notice strong { color: var(--text); font-weight: 600; }
.notice-warn { border-color: rgba(245, 198, 110, 0.25); background: linear-gradient(90deg, var(--warn-soft), transparent 70%), var(--surface-2); }
.notice-warn svg { color: var(--warn); }
.notice-accent { border-color: rgba(94, 240, 196, 0.22); background: linear-gradient(90deg, var(--accent-soft), transparent 70%), var(--surface-2); }
.notice-accent svg { color: var(--accent); }
.notice-danger { border-color: rgba(255, 107, 125, 0.25); background: linear-gradient(90deg, var(--danger-soft), transparent 70%), var(--surface-2); }
.notice-danger svg { color: var(--danger); }

/* ==========================================================================
   App shell
   ========================================================================== */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 6px;
  padding: 20px 14px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(94, 240, 196, 0.025), transparent 30%), var(--bg-2);
}
.side .brand { padding: 4px 10px 18px; }
.nav { display: grid; gap: 2px; }
.nav-label { padding: 14px 12px 6px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.nav a { position: relative; display: flex; align-items: center; gap: 11px; height: 36px; padding: 0 12px; border-radius: 9px; color: var(--muted); font-weight: 500; font-size: 13.5px; transition: 0.15s; }
.nav a svg { width: 17px; height: 17px; flex: none; opacity: 0.85; }
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.035); }
.nav a.on { color: var(--text); background: linear-gradient(90deg, rgba(94, 240, 196, 0.1), rgba(94, 240, 196, 0.02)); box-shadow: 0 0 0 1px rgba(94, 240, 196, 0.12) inset; }
.nav a.on svg { color: var(--accent); opacity: 1; }
.nav a.on::before { content: ''; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 2px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.nav .count { margin-left: auto; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 99px; font-family: var(--mono); font-size: 10.5px; display: grid; place-items: center; background: var(--ember-soft); color: var(--ember); }
.side-foot { margin-top: auto; display: grid; gap: 10px; }
.trial-pill { padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-size: 12.5px; color: var(--muted); }
.trial-pill strong { color: var(--text); font-weight: 600; }
.meter { height: 4px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin-top: 8px; }
.meter > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-2), var(--accent)); box-shadow: 0 0 10px var(--accent-glow); }
.meter.warn > i { background: var(--warn); box-shadow: none; }
.me { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; }
.avatar { width: 30px; height: 30px; flex: none; border-radius: 9px; display: grid; place-items: center; font-weight: 600; font-size: 12px; color: var(--accent-ink); background: linear-gradient(135deg, var(--accent), var(--st-contacted)); }
.avatar.lg { width: 46px; height: 46px; border-radius: 14px; font-size: 16px; }
.avatar.lead { color: var(--text); background: linear-gradient(135deg, #273047, #1a2030); border: 1px solid var(--line-2); }
.me-info { min-width: 0; }
.me-info div { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-info span { font-size: 11.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }

.main { min-width: 0; position: relative; }
.main::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 380px; pointer-events: none; background: radial-gradient(60% 100% at 70% 0%, rgba(162, 145, 255, 0.06), transparent 70%), radial-gradient(40% 80% at 20% 0%, rgba(94, 240, 196, 0.045), transparent 70%); }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 16px 34px; background: rgba(6, 7, 10, 0.72); backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2); border-bottom: 1px solid var(--line); }
.topbar h1 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.topbar .crumb { color: var(--faint); font-size: 13px; }
.topbar .crumb a:hover { color: var(--text); }
.content { position: relative; padding: 28px 34px 80px; max-width: 1320px; }
.page-intro { margin: 0 0 24px; }
.page-intro h2 { margin: 0; font-size: 28px; font-weight: 500; letter-spacing: -0.035em; line-height: 1.15; }
.page-intro h2 em { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.12em; color: var(--accent); }
.page-intro p { margin: 6px 0 0; color: var(--muted); }

.mobile-bar { display: none; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat { position: relative; overflow: hidden; padding: 18px 20px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); }
.stat::after { content: ''; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(closest-side, var(--glow, rgba(94, 240, 196, 0.08)), transparent); }
.stat .k { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.stat .k svg { width: 15px; height: 15px; color: var(--faint); }
.stat .v { margin-top: 10px; font-family: var(--mono); font-size: 30px; font-weight: 500; letter-spacing: -0.04em; line-height: 1; }
.stat .v small { font-size: 13px; color: var(--faint); letter-spacing: -0.01em; margin-left: 4px; }
.stat .s { margin-top: 8px; font-size: 12px; color: var(--faint); }

.split { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.split-even { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* ---------- Setup checklist ---------- */
.setup { position: relative; overflow: hidden; padding: 24px; border-radius: var(--r-xl); border: 1px solid rgba(94, 240, 196, 0.16); background: radial-gradient(80% 140% at 100% 0%, rgba(94, 240, 196, 0.09), transparent 60%), radial-gradient(60% 120% at 0% 100%, rgba(162, 145, 255, 0.07), transparent 60%), var(--surface); }
.setup h3 { margin: 0; font-size: 20px; font-weight: 500; letter-spacing: -0.03em; }
.setup h3 em { font-family: var(--serif); font-style: italic; color: var(--accent); font-size: 1.1em; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.step-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(6, 7, 10, 0.45); transition: 0.2s var(--ease); }
.step-card:hover { border-color: var(--line-3); transform: translateY(-1px); }
.step-card .n { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; font-family: var(--mono); font-size: 11.5px; border: 1px solid var(--line-3); color: var(--muted); }
.step-card.done .n { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.step-card.done .n::before { content: '✓'; font-family: var(--sans); font-weight: 700; }
.step-card.done .n span { display: none; }
.step-card .t { font-weight: 600; font-size: 14px; margin-top: 6px; }
.step-card .d { font-size: 12.5px; color: var(--muted); }
.step-card .go { margin-top: auto; padding-top: 10px; font-size: 12.5px; color: var(--accent); font-weight: 500; }
.step-card.done .go { color: var(--faint); }

/* ---------- Lists & tables ---------- */
.list { display: grid; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 13px 22px; border-top: 1px solid var(--line); transition: background 0.15s; }
.list-item:first-child { border-top: 0; }
a.list-item:hover { background: rgba(255, 255, 255, 0.02); }
.li-main { min-width: 0; flex: 1; }
.li-title { font-weight: 500; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li-sub { font-size: 12.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.search { position: relative; flex: 1; min-width: 220px; max-width: 360px; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--faint); pointer-events: none; }
.search .input { padding-left: 36px; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line-2); }
.seg a { height: 30px; padding: 0 11px; border-radius: 7px; display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); font-weight: 500; transition: 0.15s; }
.seg a:hover { color: var(--text); }
.seg a.on { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 2px 8px rgba(0, 0, 0, 0.3); }
.seg .num { font-family: var(--mono); font-size: 11px; color: var(--faint); }

.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-weight: 500; font-size: 11.5px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--faint); padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; font-family: var(--mono); }
.tbl td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr { transition: background 0.12s; }
.tbl tbody tr:hover { background: rgba(255, 255, 255, 0.018); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .cell-lead { display: flex; align-items: center; gap: 11px; min-width: 210px; }
.tbl .cell-lead .avatar { width: 32px; height: 32px; font-size: 11.5px; }
.tbl .cell-lead a:hover .li-title { color: var(--accent); }
.tbl td.chk, .tbl th.chk { width: 44px; padding-right: 0; }
.bulkbar { position: sticky; bottom: 18px; z-index: 15; margin-top: 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px 10px 18px; border-radius: 14px; background: rgba(20, 24, 35, 0.9); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--line-3); box-shadow: var(--shadow-lg); animation: flashIn 0.25s var(--ease); }

/* ---------- Cadence track (signature) ---------- */
.cadence { display: flex; align-items: center; gap: 0; min-width: 132px; }
.cad-node { position: relative; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-size: 9.5px; color: var(--faint); border: 1px solid var(--line-3); background: var(--bg-2); flex: none; }
.cad-link { flex: 1; height: 1px; min-width: 14px; background: var(--line-2); }
.cad-node.sent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.cad-link.sent { background: linear-gradient(90deg, var(--accent), rgba(94, 240, 196, 0.4)); }
.cad-node.next { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 3px rgba(94, 240, 196, 0.12); }
.cad-node.next::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 1px solid var(--accent); opacity: 0; animation: pulse 2.4s var(--ease) infinite; }
.cad-node.halt { border-color: rgba(255, 154, 107, 0.5); color: var(--ember); }
.cad-state { font-size: 12px; color: var(--muted); margin-top: 5px; white-space: nowrap; }

.timeline-lg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; position: relative; }
.tl-step { position: relative; padding: 0 12px 0 0; }
.tl-step .bar { position: relative; height: 2px; background: var(--line-2); margin: 15px 0 18px; }
.tl-step .bar::before { content: ''; position: absolute; left: 0; top: 50%; transform: translate(0, -50%); width: 14px; height: 14px; border-radius: 50%; background: var(--bg-2); border: 1.5px solid var(--line-3); }
.tl-step.sent .bar { background: linear-gradient(90deg, var(--accent), rgba(94, 240, 196, 0.2)); }
.tl-step.sent .bar::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 14px var(--accent-glow); }
.tl-step.next .bar::before { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(94, 240, 196, 0.12); }
.tl-step.halt .bar::before { border-color: var(--ember); }
.tl-step .day { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.tl-step .subj { margin-top: 4px; font-weight: 500; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-step .when { margin-top: 3px; font-size: 12px; color: var(--muted); }

/* ---------- Pipeline (kanban) ---------- */
.board { display: grid; grid-template-columns: repeat(4, minmax(250px, 1fr)); gap: 14px; align-items: start; overflow-x: auto; padding-bottom: 8px; }
.col { display: flex; flex-direction: column; min-height: 420px; border-radius: var(--r-lg); background: linear-gradient(180deg, color-mix(in oklab, var(--c) 7%, transparent), transparent 120px), var(--bg-2); border: 1px solid var(--line); transition: border-color 0.2s, background 0.2s; }
.col.over { border-color: color-mix(in oklab, var(--c) 55%, transparent); background: linear-gradient(180deg, color-mix(in oklab, var(--c) 14%, transparent), transparent 220px), var(--bg-2); }
.col-head { display: flex; align-items: center; gap: 10px; padding: 15px 16px 12px; }
.col-head .stage { font-weight: 600; font-size: 13px; color: var(--text); }
.col-head .num { margin-left: auto; font-family: var(--mono); font-size: 11.5px; color: var(--faint); padding: 2px 8px; border-radius: 99px; border: 1px solid var(--line-2); }
.col-body { display: grid; gap: 8px; padding: 4px 10px 12px; align-content: start; flex: 1; }
.kcard { display: block; padding: 12px 13px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: 0 6px 16px -10px rgba(0, 0, 0, 0.7); cursor: grab; transition: transform 0.15s var(--ease), border-color 0.15s, box-shadow 0.2s, opacity 0.15s; }
.kcard:hover { border-color: var(--line-3); transform: translateY(-1px); }
.kcard.dragging { opacity: 0.4; cursor: grabbing; }
.kcard .nm { font-weight: 500; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kcard .em { font-size: 12px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kcard .ft { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.kcard .mini-cad { display: flex; gap: 3px; }
.kcard .mini-cad i { width: 14px; height: 3px; border-radius: 2px; background: var(--line-3); }
.kcard .mini-cad i.on { background: var(--accent); box-shadow: 0 0 6px var(--accent-glow); }
.kcard.replied { border-color: rgba(255, 154, 107, 0.3); }
.col-empty { padding: 26px 12px; text-align: center; font-size: 12.5px; color: var(--faint); border: 1px dashed var(--line-2); border-radius: 12px; }
.kmove { display: none; }

/* ---------- Template editor ---------- */
.tpl-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr) minmax(0, 0.95fr); gap: 18px; align-items: start; }
.tpl-tabs { display: grid; gap: 8px; position: sticky; top: 86px; }
.tpl-tab { position: relative; display: block; padding: 14px 15px 14px 44px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); transition: 0.18s; }
.tpl-tab:hover { border-color: var(--line-3); }
.tpl-tab.on { border-color: rgba(94, 240, 196, 0.35); background: linear-gradient(90deg, var(--accent-soft), transparent), var(--surface); }
.tpl-tab .nd { position: absolute; left: 15px; top: 16px; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-3); }
.tpl-tab.on .nd { border-color: var(--accent); background: radial-gradient(circle, var(--accent) 35%, transparent 40%); }
.tpl-tab::after { content: ''; position: absolute; left: 23.5px; top: 36px; height: calc(100% - 12px); width: 1px; background: var(--line-2); }
.tpl-tab:last-child::after { display: none; }
.tpl-tab .day { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.tpl-tab .sj { font-size: 13px; font-weight: 500; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpl-tab .wh { font-size: 12px; color: var(--faint); margin-top: 2px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-chip { height: 26px; padding: 0 9px; border-radius: 7px; font-family: var(--mono); font-size: 11.5px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text-2); cursor: pointer; transition: 0.15s; }
.tag-chip:hover { border-color: rgba(94, 240, 196, 0.4); color: var(--accent); }
.textarea.tall { min-height: 320px; font-size: 14px; }
.preview { position: sticky; top: 86px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line-2); background: #f6f7f9; color: #1a1d24; box-shadow: var(--shadow-lg); }
.preview-chrome { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #e9ebef; border-bottom: 1px solid #dde0e6; }
.preview-chrome i { width: 9px; height: 9px; border-radius: 50%; background: #c9cdd5; }
.preview-chrome span { margin-left: 8px; font-size: 11.5px; color: #6b7280; font-family: var(--mono); }
.preview-meta { padding: 16px 20px 12px; border-bottom: 1px solid #e6e8ec; background: #fff; font-size: 12.5px; color: #6b7280; display: grid; gap: 3px; }
.preview-meta b { color: #1a1d24; font-weight: 600; }
.preview-subj { font-size: 16px; font-weight: 600; color: #111; margin-top: 6px; letter-spacing: -0.01em; }
.preview-body { padding: 18px 20px 22px; background: #fff; font-size: 14px; line-height: 1.65; white-space: pre-wrap; font-family: -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif; }
.preview-foot { padding: 12px 20px 18px; background: #fff; border-top: 1px solid #eef0f3; font-size: 11.5px; color: #8a909b; white-space: pre-wrap; font-family: -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif; }

/* ---------- Lead detail ---------- */
.lead-hero { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.lead-hero h2 { margin: 0; font-size: 24px; font-weight: 500; letter-spacing: -0.03em; }
.lead-hero .meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 13px; margin-top: 3px; }
.lead-hero .meta span { display: inline-flex; align-items: center; gap: 6px; }
.lead-hero .meta svg { width: 14px; height: 14px; color: var(--faint); }
.stage-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.stage-picker button { height: 36px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--muted); font-size: 12.5px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 7px; transition: 0.15s; }
.stage-picker button:hover { color: var(--text); border-color: var(--line-3); }
.stage-picker button.on { color: var(--text); border-color: color-mix(in oklab, var(--c) 55%, transparent); background: color-mix(in oklab, var(--c) 10%, var(--bg-2)); }
.stage-picker button::before { content: ''; width: 6px; height: 6px; border-radius: 2px; background: var(--c); }
.feed { display: grid; gap: 0; }
.feed-item { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding: 0 0 18px; }
.feed-item::before { content: ''; position: absolute; left: 13.5px; top: 26px; bottom: 0; width: 1px; background: var(--line); }
.feed-item:last-child::before { display: none; }
.feed-ic { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--muted); }
.feed-ic svg { width: 14px; height: 14px; }
.feed-ic.accent { color: var(--accent); border-color: rgba(94, 240, 196, 0.25); background: var(--accent-soft); }
.feed-ic.ember { color: var(--ember); border-color: rgba(255, 154, 107, 0.25); background: var(--ember-soft); }
.feed-ic.danger { color: var(--danger); border-color: rgba(255, 107, 125, 0.25); background: var(--danger-soft); }
.feed-txt { font-size: 13.5px; padding-top: 4px; }
.feed-time { font-size: 12px; color: var(--faint); }
.msg { margin-top: 8px; padding: 13px 15px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-2); font-size: 13.5px; color: var(--text-2); white-space: pre-wrap; word-break: break-word; max-height: 300px; overflow: auto; }
.msg.in { border-color: rgba(255, 154, 107, 0.25); background: linear-gradient(180deg, rgba(255, 154, 107, 0.05), transparent), var(--bg-2); }
.msg .msg-subj { display: block; font-weight: 600; color: var(--text); margin-bottom: 6px; white-space: normal; }
details.msg-details summary { cursor: pointer; font-size: 12.5px; color: var(--muted); list-style: none; margin-top: 6px; }
details.msg-details summary::-webkit-details-marker { display: none; }
details.msg-details summary:hover { color: var(--text); }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 10px 14px; font-size: 13.5px; }
.kv dt { color: var(--faint); }
.kv dd { margin: 0; word-break: break-word; }

/* ---------- Empty states ---------- */
.empty { display: grid; place-items: center; text-align: center; padding: 56px 24px; }
.empty-art { width: 140px; height: 70px; margin-bottom: 18px; }
.empty h3 { margin: 0; font-size: 18px; font-weight: 500; letter-spacing: -0.02em; }
.empty p { margin: 6px 0 18px; color: var(--muted); max-width: 400px; }

/* ---------- Dialog ---------- */
dialog.modal { width: min(520px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line-3); border-radius: var(--r-xl); background: var(--surface); color: var(--text); box-shadow: 0 50px 120px -20px rgba(0, 0, 0, 0.9); }
dialog.modal::backdrop { background: rgba(3, 4, 6, 0.7); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
dialog.modal[open] { animation: modalIn 0.3s var(--ease); }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px 0; }
.modal-head h3 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.modal-body { padding: 18px 22px 22px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--line); background: rgba(0, 0, 0, 0.15); }

/* ---------- Import ---------- */
.drop { position: relative; display: grid; place-items: center; text-align: center; gap: 6px; padding: 44px 24px; border-radius: var(--r-lg); border: 1.5px dashed var(--line-3); background: radial-gradient(60% 100% at 50% 0%, rgba(94, 240, 196, 0.05), transparent), var(--bg-2); cursor: pointer; transition: 0.2s; }
.drop:hover, .drop.over { border-color: rgba(94, 240, 196, 0.55); background: radial-gradient(60% 100% at 50% 0%, rgba(94, 240, 196, 0.1), transparent), var(--bg-2); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); border: 1px solid rgba(94, 240, 196, 0.25); margin-bottom: 8px; }
.drop .ic svg { width: 22px; height: 22px; }
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }

/* ---------- DNS records ---------- */
.dns td { font-family: var(--mono); font-size: 12px; word-break: break-all; }
.dns td.v { max-width: 380px; }
.copy { cursor: pointer; color: var(--muted); }
.copy:hover { color: var(--accent); }

/* ==========================================================================
   Auth pages
   ========================================================================== */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-panel { display: flex; flex-direction: column; padding: 32px 48px; }
.auth-form { width: 100%; max-width: 380px; margin: auto; padding: 40px 0; }
.auth-form h1 { margin: 0; font-size: 30px; font-weight: 500; letter-spacing: -0.04em; line-height: 1.1; }
.auth-form h1 em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent); font-size: 1.1em; }
.auth-form .sub { margin: 8px 0 28px; color: var(--muted); }
.auth-alt { margin-top: 22px; text-align: center; font-size: 13.5px; color: var(--muted); }
.auth-alt a { color: var(--text); font-weight: 500; border-bottom: 1px solid var(--line-3); }
.auth-alt a:hover { border-color: var(--accent); }
.auth-art { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: 48px; border-left: 1px solid var(--line); background: radial-gradient(70% 60% at 70% 30%, rgba(94, 240, 196, 0.12), transparent 70%), radial-gradient(60% 60% at 20% 80%, rgba(162, 145, 255, 0.12), transparent 70%), var(--bg-2); }
.auth-art::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(70% 70% at 60% 40%, #000, transparent); -webkit-mask-image: radial-gradient(70% 70% at 60% 40%, #000, transparent); }
.auth-art > * { position: relative; }
.auth-art blockquote { margin: 0; font-family: var(--serif); font-size: 38px; line-height: 1.12; letter-spacing: -0.02em; max-width: 480px; }
.auth-art blockquote em { color: var(--accent); }
.auth-art .points { display: grid; gap: 10px; margin-top: 26px; color: var(--muted); font-size: 13.5px; }
.auth-art .points div { display: flex; gap: 10px; align-items: center; }
.auth-art .points svg { width: 16px; height: 16px; color: var(--accent); }
.auth-orbit { position: absolute; top: 12%; right: 10%; width: 300px; height: 300px; }

/* ==========================================================================
   Marketing
   ========================================================================== */
.mk { position: relative; overflow-x: hidden; }
.mk-nav { position: sticky; top: 0; z-index: 30; background: rgba(6, 7, 10, 0.6); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3); border-bottom: 1px solid var(--line); }
.mk-nav .in { max-width: 1180px; margin: 0 auto; padding: 14px 28px; display: flex; align-items: center; gap: 28px; }
.mk-nav nav { display: flex; gap: 24px; font-size: 13.5px; color: var(--muted); }
.mk-nav nav a:hover { color: var(--text); }
.mk-nav .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }

.hero { position: relative; padding: 104px 0 70px; text-align: center; }
.hero::before { content: ''; position: absolute; inset: -120px 0 0; pointer-events: none; background: radial-gradient(40% 50% at 50% 20%, rgba(94, 240, 196, 0.13), transparent 70%), radial-gradient(35% 45% at 75% 35%, rgba(162, 145, 255, 0.12), transparent 70%); }
.hero::after { content: ''; position: absolute; inset: -120px 0 0; pointer-events: none; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(55% 60% at 50% 30%, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(55% 60% at 50% 30%, #000 20%, transparent 75%); }
.hero > * { position: relative; z-index: 1; }
.kicker { display: inline-flex; align-items: center; gap: 10px; height: 30px; padding: 0 14px 0 10px; border-radius: 99px; border: 1px solid var(--line-2); background: rgba(15, 18, 25, 0.7); font-size: 12.5px; color: var(--text-2); }
.hero h1 { margin: 26px auto 0; max-width: 880px; font-size: clamp(42px, 6.4vw, 80px); line-height: 0.98; font-weight: 500; letter-spacing: -0.055em; }
.hero h1 em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.03em; background: linear-gradient(100deg, var(--accent) 10%, #a8f7e0 50%, var(--violet) 95%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: 0.06em; }
.hero p.lede { margin: 24px auto 0; max-width: 580px; font-size: 18px; line-height: 1.55; color: var(--muted); }
.hero .ctas { margin-top: 34px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero .fine { margin-top: 16px; font-size: 12.5px; color: var(--faint); }

.stage-demo { position: relative; margin: 72px auto 0; max-width: 1040px; border-radius: 22px; padding: 1px; background: linear-gradient(180deg, var(--line-3), rgba(255, 255, 255, 0.02) 60%); box-shadow: 0 60px 140px -40px rgba(0, 0, 0, 0.95), 0 0 120px -40px rgba(94, 240, 196, 0.2); }
.stage-demo .inner { border-radius: 21px; background: linear-gradient(180deg, #0d1017, #080a0e); padding: 26px; text-align: left; }
.demo-head { display: flex; align-items: center; gap: 10px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.demo-head i { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-3); }
.demo-head span { margin-left: 8px; font-family: var(--mono); font-size: 12px; color: var(--faint); }
.demo-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 22px; padding-top: 22px; }
.demo-track { position: relative; padding: 22px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); }
.demo-track .rail { position: relative; display: grid; grid-template-columns: 1fr 2fr 4fr; margin: 30px 0 10px; }
.demo-track .rail::before { content: ''; position: absolute; left: 0; right: 0; top: 10px; height: 2px; background: linear-gradient(90deg, var(--accent), rgba(94, 240, 196, 0.45) 45%, var(--line-2) 70%); }
.demo-track .pt { position: relative; }
.demo-track .pt b { position: relative; display: block; width: 22px; height: 22px; border-radius: 50%; background: var(--bg-2); border: 2px solid var(--line-3); }
.demo-track .pt.on b { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 18px var(--accent-glow); }
.demo-track .pt.nx b { border-color: var(--accent); }
.demo-track .pt.nx b::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid var(--accent); animation: pulse 2.4s var(--ease) infinite; }
.demo-track .pt .d { margin-top: 14px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.demo-track .pt .s { font-size: 13px; color: var(--text-2); margin-top: 3px; max-width: 160px; }
.demo-track .pt:last-child { justify-self: end; text-align: right; }
.demo-track .pt:last-child b { margin-left: auto; }
.demo-reply { margin-top: 22px; display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 12px; border: 1px solid rgba(255, 154, 107, 0.25); background: linear-gradient(90deg, var(--ember-soft), transparent 70%); font-size: 13px; color: var(--text-2); }
.demo-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.demo-col { border-radius: 12px; border: 1px solid var(--line); background: var(--surface); padding: 12px 10px; min-height: 230px; }
.demo-col .h { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; margin-bottom: 10px; }
.demo-col .h::before { content: ''; width: 6px; height: 6px; border-radius: 2px; background: var(--c); box-shadow: 0 0 8px var(--c); }
.ghost-card { height: 46px; border-radius: 9px; border: 1px solid var(--line-2); background: linear-gradient(90deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)); margin-bottom: 7px; position: relative; overflow: hidden; }
.ghost-card::before, .ghost-card::after { content: ''; position: absolute; left: 10px; height: 6px; border-radius: 3px; background: var(--line-3); }
.ghost-card::before { top: 13px; width: 55%; }
.ghost-card::after { top: 26px; width: 35%; background: var(--line-2); }
.ghost-card.hl { border-color: color-mix(in oklab, var(--c) 45%, transparent); }

.section { padding: 110px 0; position: relative; }
.section-head { max-width: 700px; margin-bottom: 52px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { margin: 14px 0 0; font-size: clamp(32px, 4.2vw, 50px); line-height: 1.04; font-weight: 500; letter-spacing: -0.045em; }
.section-head h2 em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent); }
.section-head p { margin: 16px 0 0; font-size: 16.5px; color: var(--muted); }

.flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.flow-card { position: relative; padding: 28px; border-radius: var(--r-xl); border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 50%), var(--surface); min-height: 270px; display: flex; flex-direction: column; overflow: hidden; }
.flow-card .num { font-family: var(--serif); font-style: italic; font-size: 64px; line-height: 0.8; color: transparent; -webkit-text-stroke: 1px var(--line-3); }
.flow-card h3 { margin: auto 0 0; padding-top: 36px; font-size: 20px; font-weight: 500; letter-spacing: -0.025em; }
.flow-card p { margin: 8px 0 0; color: var(--muted); font-size: 14.5px; }
.flow-card .glyph { position: absolute; right: 22px; top: 24px; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--accent); }
.flow-card .glyph svg { width: 21px; height: 21px; }

.feat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.feat { grid-column: span 2; padding: 26px; border-radius: var(--r-xl); border: 1px solid var(--line); background: var(--surface); }
.feat.wide { grid-column: span 3; }
.feat .ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); border: 1px solid rgba(94, 240, 196, 0.2); }
.feat .ic svg { width: 18px; height: 18px; }
.feat h3 { margin: 20px 0 0; font-size: 16.5px; font-weight: 600; letter-spacing: -0.02em; }
.feat p { margin: 7px 0 0; color: var(--muted); font-size: 14px; }

.price { display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; max-width: 960px; margin: 0 auto; border-radius: 28px; overflow: hidden; border: 1px solid var(--line-2); background: var(--surface); box-shadow: var(--shadow-lg); }
.price-l { padding: 44px; background: radial-gradient(90% 120% at 0% 0%, rgba(94, 240, 196, 0.12), transparent 60%), radial-gradient(70% 90% at 100% 100%, rgba(162, 145, 255, 0.1), transparent 60%); border-right: 1px solid var(--line); }
.price-amt { display: flex; align-items: flex-start; gap: 4px; margin-top: 18px; }
.price-amt .cur { font-size: 26px; color: var(--muted); margin-top: 12px; }
.price-amt .big { font-family: var(--mono); font-size: 92px; line-height: 1; letter-spacing: -0.07em; font-weight: 500; }
.price-amt .per { align-self: flex-end; margin-bottom: 14px; color: var(--muted); }
.price-r { padding: 44px; display: grid; gap: 14px; align-content: center; }
.price-r div { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; color: var(--text-2); }
.price-r svg { width: 18px; height: 18px; flex: none; color: var(--accent); margin-top: 2px; }

.faq { max-width: 780px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { border-radius: 16px; border: 1px solid var(--line); background: var(--surface); padding: 0 22px; transition: border-color 0.2s; }
.faq details[open] { border-color: var(--line-3); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; font-weight: 500; font-size: 15.5px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 22px; font-weight: 300; color: var(--muted); transition: transform 0.25s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); color: var(--accent); }
.faq details p { margin: 0 0 20px; color: var(--muted); font-size: 14.5px; }

.cta-band { position: relative; overflow: hidden; margin: 0 auto; max-width: 1180px; padding: 80px 40px; border-radius: 32px; text-align: center; border: 1px solid var(--line-2); background: radial-gradient(50% 120% at 50% 0%, rgba(94, 240, 196, 0.16), transparent 70%), var(--surface); }
.cta-band h2 { margin: 0; font-size: clamp(32px, 4.4vw, 54px); font-weight: 500; letter-spacing: -0.05em; line-height: 1.02; }
.cta-band h2 em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent); }
.cta-band p { margin: 14px 0 28px; color: var(--muted); font-size: 16px; }
.mk-foot { padding: 60px 0 44px; color: var(--faint); font-size: 13px; }
.mk-foot .in { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 30px; }

/* Simple centered pages (unsubscribe, billing gate) */
.center-page { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; background: radial-gradient(50% 50% at 50% 0%, rgba(94, 240, 196, 0.08), transparent 70%), var(--bg); }
.center-card { width: min(480px, 100%); padding: 36px; border-radius: var(--r-xl); text-align: center; }
.center-card h1 { margin: 18px 0 8px; font-size: 24px; font-weight: 500; letter-spacing: -0.03em; }
.center-card p { color: var(--muted); margin: 0 0 22px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1180px) {
  .tpl-grid { grid-template-columns: 210px minmax(0, 1fr); }
  .tpl-grid .preview-col { grid-column: 1 / -1; }
  .preview { position: static; }
}
@media (max-width: 1060px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .split, .split-even { grid-template-columns: 1fr; }
  .demo-grid { grid-template-columns: 1fr; }
  .feat, .feat.wide { grid-column: span 3; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .mobile-bar { position: fixed; z-index: 40; left: 12px; right: 12px; bottom: 12px; display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px; border-radius: 18px; background: rgba(15, 18, 25, 0.88); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); }
  .mobile-bar a { display: grid; justify-items: center; gap: 3px; padding: 7px 0; border-radius: 12px; font-size: 10.5px; color: var(--faint); font-weight: 500; }
  .mobile-bar a svg { width: 19px; height: 19px; }
  .mobile-bar a.on { color: var(--accent); background: var(--accent-soft); }
  .topbar { padding: 14px 16px; }
  .content { padding: 20px 16px 120px; }
  .steps { grid-template-columns: 1fr; }
  .tpl-grid { grid-template-columns: 1fr; }
  .tpl-tabs { position: static; grid-template-columns: repeat(3, 1fr); }
  .tpl-tab { padding: 12px; }
  .tpl-tab .nd, .tpl-tab::after, .tpl-tab .wh { display: none; }
  .board { grid-template-columns: repeat(4, 82vw); scroll-snap-type: x mandatory; }
  .col { scroll-snap-align: start; }
  .kmove { display: block; margin-top: 10px; }
  .kmove .select { height: 32px; font-size: 12.5px; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .auth-panel { padding: 24px 20px; }
  .mk-nav nav { display: none; }
  .flow { grid-template-columns: 1fr; }
  .flow-card { min-height: 0; }
  .feat, .feat.wide { grid-column: span 6; }
  .price { grid-template-columns: 1fr; }
  .price-l { border-right: 0; border-bottom: 1px solid var(--line); }
  .price-l, .price-r { padding: 30px; }
  .section { padding: 76px 0; }
  .hero { padding: 72px 0 40px; }
  .demo-cols { grid-template-columns: repeat(2, 1fr); }
  .timeline-lg { grid-template-columns: 1fr; gap: 6px; }
  .grid-2 { grid-template-columns: 1fr; }
  .stage-picker { grid-template-columns: repeat(2, 1fr); }
  .hide-sm { display: none; }
  .wrap, .mk-nav .in { padding-left: 18px; padding-right: 18px; }
  .cta-band { padding: 56px 22px; border-radius: 24px; }
}
@media (max-width: 520px) {
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px; }
  .stat .v { font-size: 24px; }
  .demo-track .rail { grid-template-columns: 1fr 1fr 1fr; }
  .stage-demo .inner { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Grid tracks must be allowed to shrink so long unwrapped text truncates instead of overflowing. */
.stack, .stack-sm, .stack-lg, .tpl-tabs { grid-template-columns: minmax(0, 1fr); }
.tl-step, .split > *, .tpl-grid > *, .split-even > * { min-width: 0; }
.hero h1 em { white-space: nowrap; }
.demo-track .rail { grid-template-columns: 1fr 1fr 1fr; }
.demo-track .pt:nth-child(2) { justify-self: center; text-align: center; }
.demo-track .pt:nth-child(2) b { margin: 0 auto; }
@media (max-width: 860px) { .tpl-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
