/* ============================================================
   Heaven OS — "Sunrise on ink" design system (Paint Your Heaven LLC)
   ============================================================ */
@font-face { font-family: 'Clash Display'; font-weight: 600; font-display: swap; src: url('/fonts/clash-display-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Clash Display'; font-weight: 700; font-display: swap; src: url('/fonts/clash-display-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Fraunces'; font-style: italic; font-weight: 800; font-display: swap; src: url('/fonts/fraunces-latin-800-italic.woff2') format('woff2'); }
@font-face { font-family: 'Satoshi'; font-weight: 500; font-display: swap; src: url('/fonts/satoshi-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Satoshi'; font-weight: 700; font-display: swap; src: url('/fonts/satoshi-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/jetbrains-mono-latin-500-normal.woff2') format('woff2'); }
:root {
  --bg: #0b0a1c;
  --bg-2: #14122b;
  --ink: #f6f3fb;
  --ink-2: #c7c2d8;
  --ink-3: #8d88a4;
  --ink-strong: #ffffff;
  --bg-rgb: 11, 10, 28;
  --bg2-rgb: 20, 18, 43;
  --tint: 236, 230, 255;   /* surfaces are lavender-white-at-low-alpha on midnight … */
  --shade: 0, 0, 0;        /* … and recessed areas are black-at-low-alpha */
  --line: rgba(var(--tint), 0.09);
  --line-2: rgba(var(--tint), 0.16);
  --glass: linear-gradient(180deg, rgba(var(--tint), 0.07), rgba(var(--tint), 0.025));
  --glass-strong: linear-gradient(180deg, rgba(var(--tint), 0.12), rgba(var(--tint), 0.05));
  --glass-fill: rgba(20, 18, 43, 0.5);
  --glass-line: rgba(236, 230, 255, 0.14);
  --glass-inner: rgba(236, 230, 255, 0.2);
  --code-bg: #0c0b1f;
  --ok-fg: #9df0c6;
  --warn-fg: #ffe3a3;
  --bad-fg: #ffb0a6;
  --violet-fg: #d9cfff;
  --cyan-fg: #bfe6ff;
  --shadow-rgb: 0, 0, 0;
  /* Painted sky — coral → rose → violet, with sky and gold as accents */
  --coral: #ff6a4d;
  --rose: #f0478a;
  --violet: #6e5cf6;
  --sky: #3fa6f2;
  --sun: #f5b840;
  --mint: #2fd4a3;
  --coral-rgb: 255, 106, 77;
  --rose-rgb: 240, 71, 138;
  --violet-rgb: 110, 92, 246;
  --sky-rgb: 63, 166, 242;
  --sun-rgb: 245, 184, 64;
  --lav: var(--violet);
  --lav-rgb: var(--violet-rgb);
  --pink: var(--rose);
  --pink-rgb: var(--rose-rgb);
  --magenta: var(--rose);
  --magenta-rgb: var(--rose-rgb);
  --cyan: var(--sky);
  --gold: var(--sun);
  --green: #2fd4a3;
  --red: #ff6b6b;
  --amber: #ffb547;
  --claude: #6d7bff;
  --gpt: #ff4d5e;
  --gemini: #2bb3ff;
  --grok: #c8ccd6;
  --grad: linear-gradient(120deg, #ff6a4d 0%, #f0478a 50%, #6e5cf6 100%);
  --grad-warm: linear-gradient(120deg, #ff6a4d 0%, #f0478a 55%, #a04ddc 100%);
  --grad-text: linear-gradient(110deg, #ffffff 0%, #ffd6cc 12%, #ff6a4d 30%, #f0478a 52%, #8b7cff 74%, #bfb4ff 88%, #ffffff 100%);
  --radius: 18px;
  --radius-sm: 12px;
  --font-display: 'Clash Display', 'Satoshi', system-ui, sans-serif;
  --font-accent: 'Fraunces', Georgia, serif;
  --font-body: 'Satoshi', 'Manrope', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --shadow: 0 1px 0 rgba(var(--tint), 0.04) inset, 0 24px 60px -36px rgba(var(--shadow-rgb), 0.9);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --btn-hover-bg: #1b1836;
  --sidebar: 248px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(1200px 700px at 85% -10%, rgba(var(--violet-rgb), 0.2), transparent 60%),
    radial-gradient(900px 620px at 0% 100%, rgba(var(--sky-rgb), 0.08), transparent 60%),
    radial-gradient(760px 520px at 100% 100%, rgba(var(--rose-rgb), 0.1), transparent 60%),
    radial-gradient(600px 400px at 25% 0%, rgba(var(--coral-rgb), 0.12), transparent 60%);
}
body::after {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
#bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; opacity: 0; transition: opacity 1.4s ease; filter: blur(18px) saturate(1.25); transform: scale(1.08); pointer-events: none; }
/* drifting colour fields behind the glass (named bg-orb: .orb is the agent avatar) */
.bg-orbs { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg-orb { position: absolute; border-radius: 50%; filter: blur(40px); opacity: 0.5; will-change: transform; animation: orbFloat var(--t, 26s) ease-in-out infinite alternate; }
.bg-orb.a { width: 36vw; height: 36vw; left: -10vw; top: 8vh; background: radial-gradient(circle, rgba(var(--coral-rgb), 0.5), transparent 65%); --t: 24s; }
.bg-orb.b { width: 32vw; height: 32vw; right: -8vw; top: -4vh; background: radial-gradient(circle, rgba(var(--violet-rgb), 0.5), transparent 65%); --t: 30s; animation-delay: -9s; }
.bg-orb.c { width: 28vw; height: 28vw; left: 34vw; bottom: -12vw; background: radial-gradient(circle, rgba(var(--sky-rgb), 0.42), transparent 65%); --t: 36s; animation-delay: -17s; }
@keyframes orbFloat { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(8vw, -6vh) scale(1.15); } 100% { transform: translate(-6vw, 8vh) scale(0.95); } }
#bg.on { opacity: 1; }
#app { position: relative; z-index: 1; min-height: 100vh; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
::selection { background: rgba(var(--coral-rgb), 0.45); color: var(--ink-strong); }
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.02em; word-spacing: 0.12em; margin: 0; line-height: 1.1; } /* Clash Display's space glyph is 0.14em — widen it */
p { margin: 0; }
code, .mono { font-family: var(--font-mono); font-size: 0.92em; }
.muted { color: var(--ink-3); }
.dim { color: var(--ink-2); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.hidden { display: none !important; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.grid > *, .two > *, .stat-row > *, .conn-grid > * { min-width: 0; }
.grow { flex: 1; }
.center { text-align: center; }
.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }

/* ---------- gradient text & effects ---------- */
.grad-text {
  background: var(--grad-text);
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: gradShift 10s ease-in-out infinite alternate;
}
.grad-text-static { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
@keyframes gradShift { 0% { background-position: 0% 50%; } 100% { background-position: 100% 50%; } }
.shimmer { position: relative; overflow: hidden; }
.shimmer::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(var(--tint), 0.18) 50%, transparent 70%);
  transform: translateX(-120%); animation: shimmer 4.5s var(--ease) infinite;
}
@keyframes shimmer { 0% { transform: translateX(-120%); } 60%, 100% { transform: translateX(120%); } }
.reveal .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.reveal .w > span { display: inline-block; transform: translateY(115%); animation: rise 1s var(--ease) forwards; animation-delay: var(--d, 0s); }
@keyframes rise { to { transform: translateY(0); } }
.fade-up { opacity: 0; transform: translateY(18px); animation: fadeUp 0.9s var(--ease) forwards; animation-delay: var(--d, 0s); }
@keyframes fadeUp { to { opacity: 1; transform: none; } }
.glow-text { filter: drop-shadow(0 0 28px rgba(var(--coral-rgb), 0.35)) drop-shadow(0 0 60px rgba(var(--sky-rgb), 0.12)); }
.typing::after { content: '▍'; animation: blink 1s steps(2) infinite; color: var(--cyan); }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- glass surfaces ---------- */
.card {
  position: relative;
  min-width: 0;
  background: var(--glass), var(--glass-fill);
  border: 1px solid var(--glass-line);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 var(--glass-inner), var(--shadow);
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  padding: 22px;
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s;
  --mx: 50%; --my: 50%;
}
.card::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.4s;
  background: radial-gradient(520px circle at var(--mx) var(--my), rgba(var(--rose-rgb), 0.18), transparent 42%);
}
.card::after { content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: var(--grad); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity 0.4s; pointer-events: none; }
.card:hover::before, .card:hover::after { opacity: 1; }
.card:hover { box-shadow: inset 0 1px 0 var(--glass-inner), 0 36px 70px -36px rgba(var(--violet-rgb), 0.45); }
.card.tight:hover, .card.flat:hover { box-shadow: var(--shadow); }
.card.flat::after, .card.tight::after { display: none; }
.card.flat { box-shadow: none; }
.card.tight { padding: 16px; }
.card.accent { border-color: rgba(var(--coral-rgb), 0.35); }
.card.accent::after { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 2px; background: var(--grad); opacity: 0.9; }
.card h3 { font-size: 17px; font-weight: 700; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-title > * { min-width: 0; }

/* ---------- buttons ---------- */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 12px; border: 1px solid var(--line-2);
  background: rgba(var(--tint), 0.05); color: var(--ink); font-weight: 600; font-size: 14px;
  transition: transform 0.25s var(--ease), background 0.25s, border-color 0.25s, box-shadow 0.3s;
  white-space: nowrap; user-select: none;
}
.btn:hover { background: rgba(var(--tint), 0.1); border-color: rgba(var(--tint), 0.25); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn.primary {
  border: 1px solid transparent;
  background: var(--grad);
  color: #ffffff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
  box-shadow: 0 0 0 0 rgba(var(--coral-rgb), 0), 0 12px 30px -14px rgba(var(--rose-rgb), 0.9);
}
.btn.primary:hover { box-shadow: 0 16px 40px -14px rgba(var(--rose-rgb), 1), 0 0 0 4px rgba(var(--coral-rgb), 0.14); filter: saturate(1.1) brightness(1.04); }
.btn.primary { background-size: 200% 100%; animation: btnShift 6s ease-in-out infinite alternate; overflow: hidden; }
.btn.primary::after { content: ''; position: absolute; top: -40%; bottom: -40%; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.4), transparent); transform: skewX(-20deg); transition: left 0.7s var(--ease); }
.btn.primary:hover::after { left: 120%; }
@keyframes btnShift { to { background-position: 100% 50%; } }
.btn.solid { background: var(--grad); border: none; color: #ffffff; }
.btn.solid:hover { filter: brightness(1.08); box-shadow: 0 10px 40px -12px rgba(var(--coral-rgb), 0.9); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: rgba(var(--tint), 0.06); color: var(--ink); }
.btn.danger { border-color: rgba(251, 113, 133, 0.4); color: var(--bad-fg); }
.btn.danger:hover { background: rgba(251, 113, 133, 0.12); }
.btn.success { border-color: rgba(52, 211, 153, 0.45); color: var(--ok-fg); }
.btn.success:hover { background: rgba(52, 211, 153, 0.14); }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn.lg { padding: 14px 24px; font-size: 16px; border-radius: 14px; }
.btn.icon { padding: 8px; width: 36px; height: 36px; }
.btn .spin { width: 14px; height: 14px; border: 2px solid rgba(var(--tint), 0.25); border-top-color: currentColor; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); letter-spacing: 0.02em; }
.field .help { font-size: 12px; color: var(--ink-3); }
.input, textarea.input, select.input {
  width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line-2);
  background: rgba(var(--shade), 0.35); color: var(--ink); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input:focus { border-color: rgba(var(--coral-rgb), 0.7); box-shadow: 0 0 0 4px rgba(var(--coral-rgb), 0.15); }
textarea.input { min-height: 110px; resize: vertical; line-height: 1.5; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
select.input option { background: var(--bg-2); color: var(--ink); }
.input.mono { font-family: var(--font-mono); font-size: 13px; }
.switch { position: relative; width: 44px; height: 26px; border-radius: 999px; background: rgba(var(--tint), 0.12); border: 1px solid var(--line-2); cursor: pointer; transition: background 0.25s; flex: none; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform 0.25s var(--ease); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); }
.switch.on { background: linear-gradient(120deg, var(--violet), var(--cyan)); border-color: transparent; }
.switch.on::after { transform: translateX(18px); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.switch-row:last-child { border-bottom: none; }
.switch-row .l { font-weight: 600; font-size: 14px; }
.switch-row .s { font-size: 12.5px; color: var(--ink-3); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 12.5px; font-weight: 600; color: var(--ink-2); background: rgba(var(--tint), 0.03); cursor: pointer; transition: all 0.2s; }
.chip:hover { border-color: rgba(var(--tint), 0.3); color: var(--ink); }
.chip.on { background: rgba(var(--coral-rgb), 0.2); border-color: rgba(var(--coral-rgb), 0.6); color: var(--ink-strong); }
.chip.static { cursor: default; }

/* ---------- pills / status ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; border: 1px solid var(--line-2); color: var(--ink-2); background: rgba(var(--tint), 0.04); white-space: nowrap; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.pill.green { color: var(--ok-fg); border-color: rgba(52, 211, 153, 0.4); background: rgba(52, 211, 153, 0.08); }
.pill.amber { color: var(--warn-fg); border-color: rgba(251, 191, 36, 0.4); background: rgba(251, 191, 36, 0.08); }
.pill.red { color: var(--bad-fg); border-color: rgba(251, 113, 133, 0.4); background: rgba(251, 113, 133, 0.08); }
.pill.violet { color: var(--violet-fg); border-color: rgba(var(--coral-rgb), 0.5); background: rgba(var(--coral-rgb), 0.12); }
.pill.cyan { color: var(--cyan-fg); border-color: rgba(var(--sky-rgb), 0.45); background: rgba(var(--sky-rgb), 0.08); }
.pill.gray { color: var(--ink-3); }
.pill .dot.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.7); } }

/* ---------- avatars / orbs ---------- */
.orb { position: relative; width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 16px; color: #fff; background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.55), transparent 40%), radial-gradient(circle at 50% 50%, var(--c, var(--violet)) 0%, color-mix(in srgb, var(--c, var(--violet)) 50%, #000) 70%, #000 100%); box-shadow: 0 0 24px -4px var(--c, var(--violet)), inset 0 0 12px rgba(255, 255, 255, 0.25); }
.orb.lg { width: 64px; height: 64px; font-size: 22px; }
.orb.xl { width: 88px; height: 88px; font-size: 30px; box-shadow: 0 0 60px -8px var(--c, var(--violet)), inset 0 0 18px rgba(255, 255, 255, 0.3); }
.orb.sm { width: 28px; height: 28px; font-size: 11px; box-shadow: 0 0 14px -3px var(--c, var(--violet)); }
.orb.off { filter: grayscale(0.9) brightness(0.55); box-shadow: none; }
.orb.live::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 1px solid var(--c, var(--violet)); opacity: 0.6; animation: ring 2.4s ease-out infinite; }
@keyframes ring { 0% { transform: scale(0.9); opacity: 0.7; } 100% { transform: scale(1.5); opacity: 0; } }
.logo-tile { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex: none; background: rgba(var(--tint), 0.05); border: 1px solid var(--line-2); color: var(--c, var(--ink-strong)); font-family: var(--font-display); font-weight: 800; font-size: 17px; letter-spacing: -0.02em; box-shadow: 0 0 30px -12px var(--c, transparent); }
.logo-tile svg { width: 24px; height: 24px; fill: currentColor; }
.logo-tile img { width: 28px; height: 28px; object-fit: contain; }
.logo-tile.lg { width: 60px; height: 60px; border-radius: 18px; font-size: 22px; }
.logo-tile.lg svg { width: 30px; height: 30px; }

/* ---------- layout: landing ---------- */
.landing { position: relative; }
.nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 18px clamp(18px, 4vw, 48px); background: linear-gradient(180deg, rgba(var(--bg-rgb), 0.55), rgba(var(--bg-rgb), 0)); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; word-spacing: 0.12em; }
.brand .mark { width: 36px; height: 36px; border-radius: 11px; background: var(--grad); display: grid; place-items: center; color: #0b0712; font-size: 13px; font-weight: 900; font-family: var(--font-display); letter-spacing: -0.02em; box-shadow: 0 8px 30px -10px rgba(var(--coral-rgb), 0.9); }
.brand .mark svg { width: 22px; height: 22px; }
.brand .mark.logo { background: none; box-shadow: 0 8px 30px -10px rgba(var(--magenta-rgb), 0.9); border-radius: 0; }
.brand .mark.logo img { width: 36px; height: 36px; display: block; }
.brand .sub { font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); display: block; margin-top: 1px; font-family: var(--font-body); }
.hero { min-height: calc(100vh - 80px); display: grid; align-content: center; padding: 6vh clamp(18px, 6vw, 96px) 10vh; max-width: 1200px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 26px; padding: 7px 14px 7px 12px; border-radius: 999px; background: var(--glass-fill); border: 1px solid var(--glass-line); box-shadow: inset 0 1px 0 var(--glass-inner); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 16px var(--cyan); animation: pulse 2s infinite; }
.hero h1 { font-size: clamp(56px, 11vw, 148px); font-weight: 800; letter-spacing: -0.045em; line-height: 0.95; }
.hero h1 .grad-text { background-size: 220% 100%; animation-duration: 7s; }
.hero .sub { margin-top: 26px; font-size: clamp(17px, 2vw, 22px); color: var(--ink-2); max-width: 680px; line-height: 1.5; }
.hero .sub strong { color: var(--ink); font-weight: 600; }
.hero .cta { margin-top: 38px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero-meta { margin-top: 56px; display: flex; gap: 28px; flex-wrap: wrap; color: var(--ink-3); font-size: 13px; }
.hero-meta b { color: var(--ink); font-weight: 600; }
.section { padding: 10vh clamp(18px, 6vw, 96px); max-width: 1240px; margin: 0 auto; }
.section-head { margin-bottom: 36px; max-width: 760px; }
.section-head h2 { font-size: clamp(32px, 5vw, 56px); font-weight: 800; letter-spacing: -0.035em; }
.section-head p { margin-top: 14px; color: var(--ink-2); font-size: 17px; }
.grid { display: grid; gap: 16px; }
.grid.c2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid.agents { grid-template-columns: repeat(auto-fit, minmax(min(100%, 470px), 1fr)); gap: 18px; }
.grid.c3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.grid.c4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.agent-tile { padding: 26px; min-height: 230px; display: flex; flex-direction: column; gap: 14px; transition: transform 0.4s var(--ease), border-color 0.3s; }
.agent-tile:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--c) 45%, transparent); }
.agent-tile h3 { font-size: 22px; }
.agent-tile .role { color: var(--c); font-weight: 700; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; }
.agent-tile ul { margin: 0; padding: 0; list-style: none; color: var(--ink-2); font-size: 14px; display: flex; flex-direction: column; gap: 6px; }
.agent-tile li::before { content: '◆'; color: var(--c); font-size: 9px; margin-right: 8px; vertical-align: middle; }
.pipeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 10px; counter-reset: step; }
.pipeline .step { position: relative; padding: 20px 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--glass); counter-increment: step; }
.pipeline .step::before { content: counter(step, decimal-leading-zero); font-family: var(--font-mono); font-size: 11px; color: var(--cyan); letter-spacing: 0.1em; }
.pipeline .step h4 { margin-top: 10px; font-size: 16px; }
.pipeline .step p { margin-top: 6px; color: var(--ink-3); font-size: 13px; }
.pipeline .step.you { border-color: rgba(var(--sun-rgb), 0.5); background: linear-gradient(180deg, rgba(var(--sun-rgb), 0.12), rgba(var(--sun-rgb), 0.03)); }
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee .track { display: flex; gap: 14px; width: max-content; animation: marquee 48s linear infinite; }
.marquee:hover .track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee .item { display: flex; align-items: center; gap: 12px; padding: 12px 18px 12px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--glass); font-weight: 600; white-space: nowrap; }
.footer { padding: 40px clamp(18px, 6vw, 96px); color: var(--ink-3); font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-top: 1px solid var(--line); }

/* ---------- layout: app shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 22px 16px; border-right: 1px solid var(--glass-line); background: linear-gradient(180deg, rgba(var(--bg2-rgb), 0.7), rgba(var(--bg-rgb), 0.6)); backdrop-filter: blur(22px) saturate(1.4); -webkit-backdrop-filter: blur(22px) saturate(1.4); }
.sidebar .brand { padding: 4px 8px 22px; }
.navlist { display: flex; flex-direction: column; gap: 4px; }
.navlist a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: var(--ink-2); font-weight: 600; font-size: 14px; transition: all 0.2s; border: 1px solid transparent; }
.navlist a svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: 0.85; }
.navlist a:hover { color: var(--ink); background: rgba(var(--tint), 0.05); }
.navlist a.active { color: var(--ink-strong); background: linear-gradient(90deg, rgba(var(--coral-rgb), 0.25), rgba(var(--sky-rgb), 0.08)); border-color: rgba(var(--coral-rgb), 0.35); }
.navlist a .badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--gold); color: #1a1200; font-size: 11.5px; font-weight: 800; display: grid; place-items: center; }
.sidebar .foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; font-size: 12.5px; color: var(--ink-3); }
.sidebar .agents-mini { display: flex; gap: 6px; padding: 10px 8px; }
.main { padding: 26px clamp(16px, 3vw, 40px) 80px; max-width: 1400px; width: 100%; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.topbar h1 { font-size: clamp(26px, 3.4vw, 40px); font-weight: 800; }
.topbar .sub { color: var(--ink-3); margin-top: 4px; font-size: 14px; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 12px; }
.stat { padding: 18px 20px; }
.stat .v { font-family: var(--font-body); font-variant-numeric: tabular-nums; font-size: 34px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; margin-top: 8px; }
.stat .k { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.stat .d { margin-top: 6px; font-size: 12.5px; color: var(--ink-3); }
.two { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: start; }
.cmdbar { display: flex; gap: 10px; align-items: flex-end; padding: 10px 10px 10px 18px; border-radius: 18px; border: 1px solid rgba(var(--coral-rgb), 0.45); background: linear-gradient(180deg, rgba(var(--coral-rgb), 0.12), rgba(var(--bg2-rgb), 0.6)); box-shadow: 0 0 60px -20px rgba(var(--coral-rgb), 0.7); }
.cmdbar textarea { flex: 1; background: transparent; border: none; outline: none; resize: none; min-height: 28px; max-height: 160px; padding: 8px 0; font-size: 16px; line-height: 1.45; color: var(--ink); }
.cmdbar textarea::placeholder { color: var(--ink-3); }
.chat { display: flex; flex-direction: column; gap: 12px; max-height: 420px; overflow: auto; padding-right: 4px; }
.msg { display: flex; gap: 10px; align-items: flex-start; }
.msg.user { flex-direction: row-reverse; }
.msg .bubble { max-width: 82%; padding: 11px 14px; border-radius: 16px; border: 1px solid var(--line); background: rgba(var(--tint), 0.04); font-size: 14px; line-height: 1.5; }
.msg.user .bubble { background: rgba(var(--coral-rgb), 0.18); border-color: rgba(var(--coral-rgb), 0.35); border-bottom-right-radius: 6px; }
.msg.assistant .bubble { border-bottom-left-radius: 6px; }
.msg.system .bubble { background: transparent; border-style: dashed; color: var(--ink-3); font-size: 12.5px; }
.msg .bubble p + p { margin-top: 8px; }
.feed { display: flex; flex-direction: column; }
.feed .ev { display: grid; grid-template-columns: 18px 1fr auto; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; align-items: start; }
.feed .ev:last-child { border-bottom: none; }
.feed .ev .t { color: var(--ink-3); font-size: 12px; white-space: nowrap; }
.feed .ev .i { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; background: var(--ink-3); }
.feed .ev.mission .i { background: var(--violet); box-shadow: 0 0 10px var(--violet); }
.feed .ev.approval .i { background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.feed .ev.action .i, .feed .ev.connector .i { background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.feed .ev.error .i { background: var(--red); box-shadow: 0 0 10px var(--red); }
.feed .ev.security .i, .feed .ev.permission .i { background: var(--amber); }
.feed .ev.phone .i, .feed .ev.inbox .i { background: var(--green); }

/* ---------- missions ---------- */
.mission-row { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--glass); transition: border-color 0.2s, transform 0.3s var(--ease); cursor: pointer; }
.mission-row:hover { border-color: rgba(var(--coral-rgb), 0.45); transform: translateX(3px); }
.mission-row .ref { font-family: var(--font-mono); font-size: 12px; color: var(--cyan); }
.mission-row .title { font-weight: 600; margin-top: 2px; }
.mission-row .sum { color: var(--ink-3); font-size: 13px; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mission-row .meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.stepper { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.stepper .s { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--ink-3); }
.stepper .s.done { color: var(--ink); border-color: rgba(52, 211, 153, 0.4); background: rgba(52, 211, 153, 0.08); }
.stepper .s.now { color: var(--ink-strong); border-color: rgba(var(--coral-rgb), 0.7); background: rgba(var(--coral-rgb), 0.2); box-shadow: 0 0 20px -6px var(--violet); }
.stepper .s.now .dot { animation: pulse 1.4s infinite; }
.stepper .s .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.stepper .arrow { color: var(--ink-3); font-size: 11px; }
.md { line-height: 1.65; font-size: 14.5px; }
.md h1, .md h2, .md h3 { margin: 18px 0 8px; font-size: 1.15em; }
.md h1 { font-size: 1.4em; } .md h2 { font-size: 1.25em; }
.md p { margin: 0 0 10px; }
.md ul, .md ol { margin: 0 0 10px; padding-left: 22px; }
.md li { margin: 3px 0; }
.md a { color: var(--cyan); text-decoration: underline; text-underline-offset: 2px; }
.md blockquote { margin: 10px 0; padding: 8px 14px; border-left: 3px solid var(--violet); color: var(--ink-2); background: rgba(var(--coral-rgb), 0.07); border-radius: 0 8px 8px 0; }
.md hr { border: none; border-top: 1px solid var(--line); margin: 16px 0; }
.md code { background: rgba(var(--tint), 0.08); padding: 1px 6px; border-radius: 6px; font-size: 0.88em; }
.md pre { position: relative; background: var(--code-bg); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; overflow: auto; margin: 10px 0 14px; font-size: 12.5px; line-height: 1.5; }
.md pre code { background: none; padding: 0; font-size: inherit; }
.md pre .copy { position: absolute; top: 8px; right: 8px; }
.md table { border-collapse: collapse; width: 100%; margin: 10px 0; font-size: 13.5px; }
.md th, .md td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; }
.md th { background: rgba(var(--tint), 0.05); }
.md strong { color: var(--ink-strong); }
.review { padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(var(--shade), 0.25); }
.review .score { font-family: var(--font-body); font-size: 26px; font-weight: 700; }
.review ul { margin: 6px 0 0; padding-left: 18px; font-size: 13.5px; color: var(--ink-2); }
.action-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(var(--sun-rgb), 0.3); background: rgba(var(--sun-rgb), 0.06); font-size: 13.5px; }
.action-item .op { font-family: var(--font-mono); font-size: 11.5px; color: var(--gold); }
.action-item.ok { border-color: rgba(52, 211, 153, 0.4); background: rgba(52, 211, 153, 0.07); }
.action-item.fail { border-color: rgba(251, 113, 133, 0.4); background: rgba(251, 113, 133, 0.07); }
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline .tl { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.timeline .tl .t { color: var(--ink-3); font-family: var(--font-mono); font-size: 11.5px; padding-top: 2px; }
.timeline .tl .s { color: var(--cyan); font-weight: 700; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; margin-right: 8px; }

/* ---------- connectors ---------- */
.conn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.conn { display: flex; gap: 14px; align-items: flex-start; padding: 16px; cursor: pointer; transition: transform 0.3s var(--ease), border-color 0.25s; }
.conn:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c) 45%, transparent); }
.conn .n { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.conn .t { color: var(--ink-3); font-size: 13px; margin-top: 3px; line-height: 1.45; }
.conn.connected { border-color: rgba(52, 211, 153, 0.35); }
.conn.connected .logo-tile { border-color: color-mix(in srgb, var(--c) 60%, transparent); }
.cat-head { display: flex; align-items: baseline; gap: 12px; margin: 26px 0 12px; }
.cat-head h3 { font-size: 15px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.cat-head .line { flex: 1; height: 1px; background: var(--line); }
.steps { counter-reset: s; display: flex; flex-direction: column; gap: 10px; }
.steps .st { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.steps .st::before { counter-increment: s; content: counter(s); width: 24px; height: 24px; border-radius: 8px; background: rgba(var(--coral-rgb), 0.2); color: var(--violet-fg); font-weight: 800; font-size: 12px; display: grid; place-items: center; border: 1px solid rgba(var(--coral-rgb), 0.4); }
.steps .st code { display: inline-flex; align-items: center; gap: 6px; background: rgba(var(--shade), 0.4); padding: 3px 8px; border-radius: 8px; border: 1px solid var(--line); word-break: break-all; cursor: copy; }
.steps .st code:hover { border-color: var(--cyan); }

/* ---------- phone ---------- */
.phone-number { font-family: var(--font-body); font-variant-numeric: tabular-nums; font-size: clamp(30px, 5vw, 48px); font-weight: 700; letter-spacing: -0.02em; }
.msglog { display: flex; flex-direction: column; gap: 8px; max-height: 480px; overflow: auto; }
.msglog .m { display: grid; grid-template-columns: 70px 1fr; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); font-size: 13.5px; }
.msglog .m .w { font-size: 11px; color: var(--ink-3); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.msglog .m.in { background: rgba(var(--sky-rgb), 0.06); }
.msglog .m.out { background: rgba(var(--coral-rgb), 0.08); }
.msglog .m .d { color: var(--ink-3); font-size: 11.5px; margin-top: 4px; }
.kbd { display: inline-block; font-family: var(--font-mono); font-size: 12px; padding: 2px 8px; border-radius: 6px; background: rgba(var(--shade), 0.4); border: 1px solid var(--line-2); color: var(--ink-strong); }

/* ---------- modal / toast ---------- */
.modal-bg { position: fixed; inset: 0; z-index: 50; background: rgba(var(--bg-rgb), 0.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: grid; place-items: center; padding: 20px; animation: fadeIn 0.25s; overflow: auto; }
@keyframes fadeIn { from { opacity: 0; } }
.modal { width: min(720px, 100%); max-height: calc(100vh - 40px); overflow: auto; padding: 26px; animation: popIn 0.35s var(--ease); background: linear-gradient(180deg, rgba(var(--bg2-rgb), 0.96), rgba(var(--bg2-rgb), 0.98)); }
.modal.wide { width: min(980px, 100%); }
@keyframes popIn { from { opacity: 0; transform: translateY(16px) scale(0.98); } }
.modal .x { position: absolute; top: 14px; right: 14px; }
.toasts { position: fixed; bottom: 20px; right: 20px; z-index: 60; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(var(--bg2-rgb), 0.95); box-shadow: 0 20px 50px -20px rgba(var(--shadow-rgb), 1); font-size: 14px; max-width: 360px; animation: popIn 0.3s var(--ease); }
.toast.ok { border-color: rgba(52, 211, 153, 0.5); }
.toast.err { border-color: rgba(251, 113, 133, 0.5); }

/* ---------- auth / setup ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth { width: min(520px, 100%); padding: 34px; }
.auth h2 { font-size: 28px; }
.wizard-steps { display: flex; gap: 8px; margin-bottom: 20px; }
.wizard-steps .ws { flex: 1; height: 4px; border-radius: 4px; background: rgba(var(--tint), 0.1); }
.wizard-steps .ws.on { background: var(--grad); }
.keyrow { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.keyrow:last-child { border-bottom: none; }

/* ---------- misc ---------- */
.empty { padding: 36px 20px; text-align: center; color: var(--ink-3); border: 1px dashed var(--line-2); border-radius: 16px; }
.empty b { color: var(--ink-2); display: block; margin-bottom: 4px; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.copy-inline { cursor: copy; border-bottom: 1px dashed var(--ink-3); }
.copy-inline:hover { color: var(--cyan); border-color: var(--cyan); }
.progress { height: 6px; border-radius: 6px; background: rgba(var(--tint), 0.08); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--grad); border-radius: 6px; transition: width 0.6s var(--ease); }
.status-line { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-2); }
.online-dots { display: flex; gap: 5px; }
.online-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); opacity: 0.4; }
.online-dots i.on { opacity: 1; box-shadow: 0 0 10px currentColor; }
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(var(--shade), 0.3); border: 1px solid var(--line); width: max-content; max-width: 100%; overflow: auto; }
.tabs button { padding: 7px 14px; border-radius: 9px; border: none; background: transparent; color: var(--ink-3); font-weight: 600; font-size: 13px; white-space: nowrap; }
.tabs button.on { background: rgba(var(--tint), 0.1); color: var(--ink-strong); }
.spinner { width: 28px; height: 28px; border: 3px solid rgba(var(--tint), 0.12); border-top-color: var(--violet); border-radius: 50%; animation: spin 0.9s linear infinite; margin: 30px auto; }
.mobile-nav, .mobile-header, .sheet-bg { display: none; }

/* ---------- base touch polish ---------- */
a, button, .card, .chip, .conn, .mission-row { -webkit-tap-highlight-color: transparent; }
button, a.btn, .mission-row, .conn, .navlist a, .mobile-nav a { touch-action: manipulation; }
.main > * { animation: viewIn 0.55s var(--ease) both; }
.main > *:nth-child(2) { animation-delay: 0.05s; }
.main > *:nth-child(3) { animation-delay: 0.1s; }
.main > *:nth-child(4) { animation-delay: 0.15s; }
.main > *:nth-child(5) { animation-delay: 0.2s; }
.main > *:nth-child(n+6) { animation-delay: 0.25s; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.md { overflow-wrap: anywhere; }
.md table { display: block; overflow: auto; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }

  /* app header */
  .mobile-header { display: flex; position: sticky; top: 0; z-index: 25; align-items: center; justify-content: space-between; gap: 12px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: rgba(var(--bg-rgb), 0.72); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-bottom: 1px solid var(--glass-line); }
  .mobile-header .brand { font-size: 15px; gap: 10px; white-space: nowrap; }
  .mobile-header .brand .mark { width: 30px; height: 30px; border-radius: 9px; font-size: 12px; }
  .mobile-header .brand .sub { display: none; }
  .mobile-header .orbs { display: flex; gap: 6px; align-items: center; }

  /* bottom nav */
  .mobile-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; padding: 6px 6px calc(8px + env(safe-area-inset-bottom)); background: rgba(var(--bg2-rgb), 0.74); backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4); border-top: 1px solid var(--glass-line); justify-content: space-around; }
  .mobile-nav a, .mobile-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 10.5px; color: var(--ink-3); font-weight: 600; padding: 6px 4px 4px; border-radius: 12px; position: relative; background: none; border: none; transition: color 0.2s, transform 0.2s var(--ease); letter-spacing: 0.01em; }
  .mobile-nav a:active, .mobile-nav button:active { transform: scale(0.92); }
  .mobile-nav a.active { color: var(--ink-strong); }
  .mobile-nav a.active::before { content: ''; position: absolute; top: -7px; width: 22px; height: 3px; border-radius: 3px; background: var(--grad); box-shadow: 0 0 12px rgba(var(--coral-rgb), 0.8); }
  .mobile-nav svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .mobile-nav .badge { position: absolute; top: 2px; right: calc(50% - 22px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--gold); color: #1a1200; font-size: 10px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px rgba(var(--bg2-rgb), 0.9); }

  /* menu sheet */
  .sheet-bg { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(var(--bg-rgb), 0.6); opacity: 0; pointer-events: none; transition: opacity 0.25s; }
  .sheet-bg.open { opacity: 1; pointer-events: auto; }
  .sheet { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 16px calc(18px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; background: linear-gradient(180deg, rgba(var(--bg2-rgb), 0.86), rgba(var(--bg-rgb), 0.92)); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); border-top: 1px solid var(--line-2); transform: translateY(100%); transition: transform 0.38s var(--ease); box-shadow: 0 -20px 60px -20px rgba(var(--shadow-rgb), 0.6); }
  .sheet-bg.open .sheet { transform: none; }
  .sheet::before { content: ''; display: block; width: 40px; height: 4px; border-radius: 4px; background: rgba(var(--tint), 0.2); margin: 4px auto 14px; }
  .sheet .navlist a { padding: 9px 12px; font-size: 15px; }
  .sheet .navlist a svg { width: 20px; height: 20px; }
  .sheet .navlist a .d { display: block; font-size: 12px; color: var(--ink-3); font-weight: 500; margin-top: 1px; }
  .sheet .foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-3); flex-wrap: wrap; }

  /* layout */
  .main { padding: 16px 14px calc(100px + env(safe-area-inset-bottom)); }
  .topbar { margin-bottom: 18px; gap: 12px; }
  .topbar h1 { font-size: 28px; }
  .card-title { flex-wrap: wrap; }
  .mission-row .title { font-size: 15px; }
  .topbar .sub { font-size: 13px; }
  .two { grid-template-columns: 1fr; }
  .card { padding: 18px; }
  .card.tight { padding: 14px; }
  .stat { padding: 14px 16px; }
  .stat .v { font-size: 30px; }
  .stat-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .chat { max-height: 52vh; }
  .cmdbar { padding: 8px 8px 8px 14px; border-radius: 16px; }
  .cmdbar textarea { font-size: 16px; }
  .mission-row { grid-template-columns: auto 1fr; }
  .mission-row .meta { grid-column: 1 / -1; justify-content: flex-start; }
  .actions { display: flex; flex-wrap: wrap; gap: 8px; }
  .actions .btn { flex: 1 1 auto; justify-content: center; }
  .keyrow { grid-template-columns: 44px 1fr; }
  .keyrow > .btn { grid-column: 2; justify-self: start; }
  .keyrow .orb { width: 40px; height: 40px; font-size: 14px; }
  .input, textarea.input, select.input { font-size: 16px; }
  .chip { padding: 7px 12px; }
  .switch-row { padding: 12px 0; }
  .toasts { left: 12px; right: 12px; bottom: calc(84px + env(safe-area-inset-bottom)); align-items: stretch; }
  .toast { max-width: none; text-align: center; }
  .phone-number { font-size: 30px; }
  .hero { min-height: 100svh; }
  .auth-wrap { min-height: 100svh; }
  .conn-grid { grid-template-columns: 1fr; }
  .cat-head { margin: 20px 0 10px; }
  .pipeline { gap: 8px; }
  .section { padding: 56px 20px; }
  .section-head { margin-bottom: 24px; }
  .footer { flex-direction: column; text-align: center; gap: 6px; padding: 28px 20px calc(28px + env(safe-area-inset-bottom)); }
}

/* bottom-sheet modals + compact landing on phones */
@media (max-width: 640px) {
  .modal-bg { align-items: flex-end; padding: 0; display: flex; }
  .modal { width: 100%; max-height: 92dvh; border-radius: 24px 24px 0 0; padding: 14px 18px calc(22px + env(safe-area-inset-bottom)); animation: sheetUp 0.4s var(--ease); }
  .modal::before { content: ''; display: block; width: 40px; height: 4px; border-radius: 4px; background: rgba(var(--tint), 0.22); margin: 0 auto 14px; }
  .modal .x { top: 12px; right: 12px; }
  @keyframes sheetUp { from { transform: translateY(40px); opacity: 0.6; } to { transform: none; opacity: 1; } }

  .nav { padding: calc(10px + env(safe-area-inset-top)) 16px 10px; gap: 8px; }
  .nav .brand { font-size: 15px; gap: 10px; white-space: nowrap; }
  .nav .brand .mark { width: 32px; height: 32px; border-radius: 10px; font-size: 12px; }
  .nav .brand .sub { display: none; }
  .nav .row { gap: 6px; }
  .nav .btn { padding: 8px 10px; font-size: 13px; }
  .nav .btn .label { display: none; }
  .nav .btn.ghost { display: none; }
  .nav .brand { min-width: 0; }
  .nav .theme-ctl button { width: 26px; height: 24px; }
  .hero { padding: 12vh 20px 8vh; position: relative; }
  .hero::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(95% 70% at 50% 60%, rgba(var(--bg-rgb), 0.72), transparent 72%); }
  .eyebrow { font-size: 10.5px; letter-spacing: 0.14em; margin-bottom: 18px; padding: 6px 12px 6px 10px; text-align: left; }
  .eyebrow-x { display: none; }
  .hero h1 { font-size: clamp(64px, 21vw, 92px); line-height: 0.92; }
  .hero h1 .w { display: block; }
  .hero .sub { font-size: 16px; margin-top: 18px; }
  .hero .cta { margin-top: 26px; }
  .hero .cta .btn { flex: 1 1 auto; justify-content: center; }
  .hero-meta { margin-top: 30px; gap: 8px; }
  .hero-meta span { font-size: 12px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: rgba(var(--bg2-rgb), 0.4); }
  .section-head h2 { font-size: 34px; }
  .agent-tile { min-height: 0; }
  .grid { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ---------- Daylight theme ---------- */
:root[data-theme="light"] {
  --bg: #fbf8f3;
  --bg-2: #ffffff;
  --ink: #16132a;
  --ink-2: #4a4661;
  --ink-3: #7b7791;
  --ink-strong: #0d0b1c;
  --bg-rgb: 251, 248, 243;
  --bg2-rgb: 255, 255, 255;
  --tint: 22, 19, 42;
  --shade: 255, 255, 255;
  --line: rgba(22, 19, 42, 0.1);
  --line-2: rgba(22, 19, 42, 0.18);
  --glass: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.25));
  --glass-strong: linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.6));
  --glass-fill: rgba(255, 255, 255, 0.5);
  --glass-line: rgba(255, 255, 255, 0.8);
  --glass-inner: rgba(255, 255, 255, 0.95);
  --code-bg: #f3efe8;
  --coral: #e8533a;
  --rose: #d4357a;
  --violet: #5b48e0;
  --sky: #1e86d6;
  --sun: #b9830e;
  --mint: #0f9d6e;
  --coral-rgb: 232, 83, 58;
  --rose-rgb: 212, 53, 122;
  --violet-rgb: 91, 72, 224;
  --sky-rgb: 30, 134, 214;
  --sun-rgb: 185, 131, 14;
  --green: #0f9d6e;
  --red: #d9264f;
  --amber: #b45309;
  --claude: #4453d6;
  --gpt: #d4323f;
  --gemini: #1a7fc0;
  --grok: #5f6676;
  --ok-fg: #0b7a55;
  --warn-fg: #8a4b06;
  --bad-fg: #b3123b;
  --violet-fg: #4b37d1;
  --cyan-fg: #0a6f9a;
  --grad: linear-gradient(120deg, #e8533a 0%, #d4357a 50%, #5b48e0 100%);
  --grad-warm: linear-gradient(120deg, #e8533a 0%, #d4357a 55%, #8a3fc9 100%);
  --grad-text: linear-gradient(110deg, #16132a 0%, #b23a2a 16%, #e8533a 32%, #d4357a 52%, #5b48e0 72%, #4b37d1 86%, #16132a 100%);
  --shadow-rgb: 60, 40, 90;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 20px 50px -30px rgba(60, 40, 90, 0.28);
  --btn-hover-bg: #f6f1ff;
}
:root[data-theme="light"] body::before {
  background:
    radial-gradient(1200px 700px at 80% -10%, rgba(var(--coral-rgb), 0.14), transparent 60%),
    radial-gradient(900px 600px at 0% 100%, rgba(var(--sky-rgb), 0.12), transparent 60%),
    radial-gradient(700px 500px at 100% 100%, rgba(var(--sun-rgb), 0.16), transparent 60%);
}
:root[data-theme="light"] body::after { opacity: 0.05; }
:root[data-theme="light"] .glow-text { filter: drop-shadow(0 8px 24px rgba(var(--coral-rgb), 0.18)); }
:root[data-theme="light"] .orb { color: #fff; }
:root[data-theme="light"] .logo-tile, :root[data-theme="light"] .agent-tile .role, :root[data-theme="light"] .agent-name { color: var(--c-dark, var(--c)); }
:root[data-theme="light"] .btn.solid, :root[data-theme="light"] .brand .mark { color: #ffffff; }
:root[data-theme="light"] .badge { color: #1a1200; }
:root[data-theme="light"] .cmdbar { background: linear-gradient(180deg, rgba(var(--coral-rgb), 0.08), rgba(255, 255, 255, 0.85)); box-shadow: 0 0 60px -24px rgba(var(--coral-rgb), 0.5); }
:root[data-theme="light"] .msg.user .bubble { background: rgba(var(--coral-rgb), 0.1); }
:root[data-theme="light"] .switch { background: rgba(22, 20, 48, 0.15); }
:root[data-theme="light"] .stat .v.grad-text-static { -webkit-text-fill-color: transparent; }
.agent-name { color: var(--c); }

/* ---------- theme control ---------- */
.theme-ctl { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: rgba(var(--shade), 0.25); border: 1px solid var(--line); }
.theme-ctl button { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 26px; border-radius: 7px; border: none; background: transparent; color: var(--ink-3); transition: all 0.2s; }
.theme-ctl button svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-ctl button:hover { color: var(--ink); }
.theme-ctl button.on { background: rgba(var(--tint), 0.12); color: var(--ink-strong); box-shadow: 0 1px 0 rgba(var(--tint), 0.06) inset; }

/* ============================================================
   Heaven OS additions: projects, import, website editor, personas, leads
   ============================================================ */
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
ul.clean { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 13.5px; }
ul.clean li { margin: 3px 0; }
.chip.sm, .pill.sm { font-size: 11px; padding: 3px 8px; }
.swatch { width: 12px; height: 12px; border-radius: 4px; flex: none; box-shadow: 0 0 12px -2px currentColor; }
.swatch.lg { width: 18px; height: 18px; border-radius: 6px; }
.feed .ev.memory .i, .feed .ev.import .i { background: var(--lav); box-shadow: 0 0 10px var(--lav); }
.feed .ev.created .i, .feed .ev.note .i { background: var(--sun); }
.feed .ev.site .i, .feed .ev.lead .i { background: var(--coral); box-shadow: 0 0 10px var(--coral); }
.feed .ev.project .i { background: var(--mint); }

/* projects */
.project-card { display: block; border-top: 2px solid var(--pc, var(--coral)); transition: transform .25s var(--ease), border-color .25s; }
.project-card:hover { transform: translateY(-3px); border-color: var(--pc, var(--coral)); }
.project-card .pc-title { font-size: 21px; line-height: 1.15; margin-top: 12px; overflow-wrap: anywhere; }
.project-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(var(--tint), 0.03); transition: border-color .2s, transform .2s; }
.project-row:hover { border-color: rgba(var(--coral-rgb), 0.45); transform: translateX(3px); }
.brief-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 22px; }
.brief-grid > div > p { margin-top: 4px; font-size: 14px; }
@media (max-width: 760px) { .brief-grid { grid-template-columns: 1fr; } }
.source-row { padding: 8px 0; border-bottom: 1px solid var(--line); gap: 10px; }
.source-row:last-child { border-bottom: none; }
.source-view { max-height: 60vh; overflow: auto; font-size: 13.5px; }

/* import */
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 34px 18px; border: 1.5px dashed rgba(var(--coral-rgb), 0.45); border-radius: 16px; background: rgba(var(--coral-rgb), 0.04); cursor: pointer; transition: border-color .2s, background .2s, transform .2s; }
.drop:hover, .drop.over { border-color: var(--coral); background: rgba(var(--coral-rgb), 0.09); transform: scale(1.01); }
.drop-icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--grad-warm); color: #0b0712; margin-bottom: 6px; box-shadow: 0 10px 30px -12px rgba(var(--coral-rgb), 0.9); }
.import-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.import-row:hover { border-color: var(--line-2); }
.import-row input { accent-color: var(--coral); }
.radio { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.radio:has(input:checked) { border-color: rgba(var(--coral-rgb), 0.6); background: rgba(var(--coral-rgb), 0.07); }
.radio input { accent-color: var(--coral); margin-top: 4px; }

/* website editor */
.list-item { padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(var(--tint), 0.025); }
.list-item .field label { text-transform: capitalize; }

/* personas */
.card.persona { border-top: 2px solid var(--c, var(--coral)); }
.voice-row { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.voice-row .field { margin: 0; }
.agent-tile .muted.small { margin-top: 4px; }

/* public-site preview link in the sidebar footer */
.sidebar .foot .tiny a { color: var(--ink-2); }
.list-item .grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.list-item .field:has(textarea) { grid-column: 1 / -1; }

/* ---------- landing hero art: the four minds as paint swatches ---------- */
@media (min-width: 1000px) {
  .landing .hero { grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
  .landing .hero h1 { font-size: clamp(56px, 6.4vw, 100px); }
}
.hero-art { position: relative; min-height: 430px; perspective: 1200px; }
.hero-art::before { content: ''; position: absolute; inset: -6% -4%; border-radius: 50%; background: conic-gradient(from 0deg, rgba(var(--coral-rgb), 0.35), rgba(var(--rose-rgb), 0.25), rgba(var(--violet-rgb), 0.35), rgba(var(--sky-rgb), 0.25), rgba(var(--sun-rgb), 0.3), rgba(var(--coral-rgb), 0.35)); filter: blur(46px); opacity: 0.8; animation: spinHalo 28s linear infinite; }
@keyframes spinHalo { to { transform: rotate(360deg); } }
.mind-swatches { position: relative; min-height: 430px; }
.mind-swatch { position: absolute; width: 52%; aspect-ratio: 5 / 3.2; border-radius: 20px; padding: 18px; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; color: #fff; box-shadow: 0 30px 60px -30px rgba(10, 5, 30, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.45); transform: rotate(var(--r)); overflow: hidden; animation: swatchBob var(--bt, 7s) ease-in-out infinite alternate; animation-delay: var(--bd, 0s); }
.mind-swatch::before { content: ''; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0) 45%); }
.mind-swatch::after { content: ''; position: absolute; top: -60%; bottom: -60%; width: 50%; left: -80%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent); transform: skewX(-20deg); animation: swatchSheen 9s ease-in-out infinite; animation-delay: var(--bd, 0s); }
@keyframes swatchBob { from { transform: rotate(var(--r)) translateY(0); } to { transform: rotate(calc(var(--r) + 1.5deg)) translateY(-12px); } }
@keyframes swatchSheen { 0%, 60% { left: -80%; } 90%, 100% { left: 140%; } }
.mind-swatch .tag { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.9; }
.mind-swatch b { font-family: var(--font-display); font-weight: 700; font-size: clamp(22px, 2.2vw, 30px); letter-spacing: -0.02em; word-spacing: 0.12em; line-height: 1.05; }
.mind-swatch small { font-size: 12.5px; opacity: 0.88; }
.mind-swatch.s0 { left: 0; top: 0; --r: -6deg; --bt: 7s; background: linear-gradient(135deg, #8a95ff, #4b58e6); z-index: 2; }
.mind-swatch.s1 { right: 0; top: 12%; --r: 5deg; --bt: 8.5s; --bd: -3s; background: linear-gradient(135deg, #ff6f7c, #d8213f); z-index: 3; }
.mind-swatch.s2 { left: 0; bottom: 0; --r: -4deg; --bt: 9.5s; --bd: -6s; background: linear-gradient(135deg, #5cc8ff, #1884d9); z-index: 2; }
.mind-swatch.s3 { right: 0; bottom: 2%; --r: 6deg; --bt: 8s; --bd: -1.5s; background: linear-gradient(135deg, #e3e6ee, #8b92a3); z-index: 4; color: #141126; }
@media (max-width: 999px) { .hero-art { display: none; } }
