/* ============================================================
   John Kidd OS — Obsidian Aurora design system
   ============================================================ */
:root {
  --bg: #05060b;
  --bg-2: #0a0c16;
  --ink: #f3f4fa;
  --ink-2: #b9bdd1;
  --ink-3: #7e839b;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --glass: linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025));
  --glass-strong: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
  --violet: #7c5cff;
  --cyan: #22d3ee;
  --gold: #f5c86a;
  --magenta: #ff5ca8;
  --green: #34d399;
  --red: #fb7185;
  --amber: #fbbf24;
  --claude: #d97757;
  --gpt: #10a37f;
  --gemini: #4e8df5;
  --grok: #c9cdd6;
  --grad: linear-gradient(120deg, #7c5cff 0%, #22d3ee 55%, #f5c86a 100%);
  --grad-text: linear-gradient(110deg, #ffffff 0%, #c9b8ff 14%, #8f74ff 32%, #22d3ee 52%, #f5c86a 72%, #ffd9a0 86%, #ffffff 100%);
  --radius: 20px;
  --radius-sm: 12px;
  --font-display: 'Syne', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 30px 80px -40px rgba(0, 0, 0, 0.9);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --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 80% -10%, rgba(124, 92, 255, 0.16), transparent 60%),
    radial-gradient(900px 600px at 0% 100%, rgba(34, 211, 238, 0.1), transparent 60%),
    radial-gradient(700px 500px at 100% 100%, rgba(245, 200, 106, 0.07), 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; }
#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(124, 92, 255, 0.45); color: #fff; }
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.02em; margin: 0; line-height: 1.1; }
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; }
.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(255, 255, 255, 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(124, 92, 255, 0.35)) drop-shadow(0 0 60px rgba(34, 211, 238, 0.12)); }
.typing::after { content: '▍'; animation: blink 1s steps(2) infinite; color: var(--cyan); }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- glass surfaces ---------- */
.card {
  position: relative;
  background: var(--glass), rgba(8, 9, 18, 0.55);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  padding: 22px;
  overflow: hidden;
  --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(124, 92, 255, 0.16), transparent 42%);
}
.card:hover::before { opacity: 1; }
.card.flat { box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.card.tight { padding: 16px; }
.card.accent { border-color: rgba(124, 92, 255, 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; }

/* ---------- buttons ---------- */
.btn {
  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(255, 255, 255, 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(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 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: linear-gradient(var(--bg-2), var(--bg-2)) padding-box, var(--grad) border-box;
  box-shadow: 0 0 0 0 rgba(124, 92, 255, 0), 0 10px 30px -14px rgba(124, 92, 255, 0.8);
}
.btn.primary:hover { box-shadow: 0 0 30px -6px rgba(124, 92, 255, 0.7), 0 10px 30px -14px rgba(34, 211, 238, 0.8); background: linear-gradient(#121428, #121428) padding-box, var(--grad) border-box; }
.btn.solid { background: var(--grad); border: none; color: #0b0712; }
.btn.solid:hover { filter: brightness(1.08); box-shadow: 0 10px 40px -12px rgba(124, 92, 255, 0.9); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: rgba(255, 255, 255, 0.06); color: var(--ink); }
.btn.danger { border-color: rgba(251, 113, 133, 0.4); color: #ffb3c0; }
.btn.danger:hover { background: rgba(251, 113, 133, 0.12); }
.btn.success { border-color: rgba(52, 211, 153, 0.45); color: #a7f3d0; }
.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(255, 255, 255, 0.25); border-top-color: #fff; 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(0, 0, 0, 0.35); color: var(--ink); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input:focus { border-color: rgba(124, 92, 255, 0.7); box-shadow: 0 0 0 4px rgba(124, 92, 255, 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: #11131f; }
.input.mono { font-family: var(--font-mono); font-size: 13px; }
.switch { position: relative; width: 44px; height: 26px; border-radius: 999px; background: rgba(255, 255, 255, 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.4); }
.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(255, 255, 255, 0.03); cursor: pointer; transition: all 0.2s; }
.chip:hover { border-color: rgba(255, 255, 255, 0.3); color: var(--ink); }
.chip.on { background: rgba(124, 92, 255, 0.2); border-color: rgba(124, 92, 255, 0.6); color: #fff; }
.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(255, 255, 255, 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: #86efac; border-color: rgba(52, 211, 153, 0.4); background: rgba(52, 211, 153, 0.08); }
.pill.amber { color: #fde68a; border-color: rgba(251, 191, 36, 0.4); background: rgba(251, 191, 36, 0.08); }
.pill.red { color: #fda4af; border-color: rgba(251, 113, 133, 0.4); background: rgba(251, 113, 133, 0.08); }
.pill.violet { color: #d4c6ff; border-color: rgba(124, 92, 255, 0.5); background: rgba(124, 92, 255, 0.12); }
.pill.cyan { color: #a5f3fc; border-color: rgba(34, 211, 238, 0.45); background: rgba(34, 211, 238, 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(255, 255, 255, 0.05); border: 1px solid var(--line-2); color: var(--c, #fff); 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); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); background: linear-gradient(180deg, rgba(5, 6, 11, 0.7), rgba(5, 6, 11, 0)); }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 800; letter-spacing: -0.01em; }
.brand .mark { width: 36px; height: 36px; border-radius: 11px; background: var(--grad); display: grid; place-items: center; color: #0b0712; font-size: 14px; font-weight: 800; box-shadow: 0 8px 30px -10px rgba(124, 92, 255, 0.9); }
.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; }
.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(300px, 1fr)); }
.grid.c3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid.c4 { grid-template-columns: repeat(auto-fit, minmax(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(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(245, 200, 106, 0.5); background: linear-gradient(180deg, rgba(245, 200, 106, 0.12), rgba(245, 200, 106, 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(--line); background: linear-gradient(180deg, rgba(10, 12, 22, 0.75), rgba(5, 6, 11, 0.6)); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.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(255, 255, 255, 0.05); }
.navlist a.active { color: #fff; background: linear-gradient(90deg, rgba(124, 92, 255, 0.25), rgba(34, 211, 238, 0.08)); border-color: rgba(124, 92, 255, 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(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(124, 92, 255, 0.45); background: linear-gradient(180deg, rgba(124, 92, 255, 0.12), rgba(10, 12, 22, 0.6)); box-shadow: 0 0 60px -20px rgba(124, 92, 255, 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(255, 255, 255, 0.04); font-size: 14px; line-height: 1.5; }
.msg.user .bubble { background: rgba(124, 92, 255, 0.18); border-color: rgba(124, 92, 255, 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(124, 92, 255, 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: #fff; border-color: rgba(124, 92, 255, 0.7); background: rgba(124, 92, 255, 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(124, 92, 255, 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(255, 255, 255, 0.08); padding: 1px 6px; border-radius: 6px; font-size: 0.88em; }
.md pre { position: relative; background: #07080f; 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(255, 255, 255, 0.05); }
.md strong { color: #fff; }
.review { padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(0, 0, 0, 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(245, 200, 106, 0.3); background: rgba(245, 200, 106, 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(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(124, 92, 255, 0.2); color: #e5dcff; font-weight: 800; font-size: 12px; display: grid; place-items: center; border: 1px solid rgba(124, 92, 255, 0.4); }
.steps .st code { display: inline-flex; align-items: center; gap: 6px; background: rgba(0, 0, 0, 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(34, 211, 238, 0.06); }
.msglog .m.out { background: rgba(124, 92, 255, 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(0, 0, 0, 0.4); border: 1px solid var(--line-2); color: #fff; }

/* ---------- modal / toast ---------- */
.modal-bg { position: fixed; inset: 0; z-index: 50; background: rgba(3, 4, 8, 0.72); 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(20, 22, 38, 0.96), rgba(10, 12, 22, 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(16, 18, 30, 0.95); box-shadow: 0 20px 50px -20px #000; 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(255, 255, 255, 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(255, 255, 255, 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(0, 0, 0, 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(255, 255, 255, 0.1); color: #fff; }
.spinner { width: 28px; height: 28px; border: 3px solid rgba(255, 255, 255, 0.12); border-top-color: var(--violet); border-radius: 50%; animation: spin 0.9s linear infinite; margin: 30px auto; }
.mobile-nav { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .mobile-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: rgba(8, 9, 16, 0.9); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-top: 1px solid var(--line); justify-content: space-around; }
  .mobile-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; color: var(--ink-3); font-weight: 600; padding: 4px 6px; border-radius: 10px; position: relative; }
  .mobile-nav a.active { color: #fff; }
  .mobile-nav a svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .mobile-nav a .badge { position: absolute; top: 0; right: 0; min-width: 16px; height: 16px; border-radius: 999px; background: var(--gold); color: #1a1200; font-size: 10px; font-weight: 800; display: grid; place-items: center; }
  .main { padding: 18px 14px 110px; }
  .two { grid-template-columns: 1fr; }
  .mission-row { grid-template-columns: 1fr; }
  .mission-row .meta { justify-content: flex-start; }
  .hero { min-height: 80vh; }
  .modal { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
