/* ==========================================================================
   Kaivix Labs — homepage
   Implements "Kaivix Homepage.dc.html" against the Kaivix Labs design system
   (tokens verbatim from _ds/.../tokens/*.css; components recreated from
   _ds_bundle.js as plain CSS rather than shipping React).

   Scope: index.html only. The other pages still use kaivix.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens — verbatim from the design system. Dark is the default surface.
   -------------------------------------------------------------------------- */
:root {
  /* base neutrals — dark (default) */
  --bg: #050505;
  --bg-2: #070707;
  --surface: rgba(255, 255, 255, .04);
  --surface-2: rgba(255, 255, 255, .02);
  --line: rgba(255, 255, 255, .10);
  --line-strong: rgba(255, 255, 255, .18);
  --text: #f5f5f5;
  --muted: #bababa;
  --muted-2: #8a8a8a;

  /* brand accent — indigo */
  --accent: #818cf8;
  --accent-dim: rgba(129, 140, 248, .12);
  --accent-glow: rgba(129, 140, 248, .28);
  --accent-border: rgba(129, 140, 248, .28);

  /* semantic — live/positive status only */
  --live: #34d399;
  --live-dim: rgba(52, 211, 153, .12);
  --live-border: rgba(52, 211, 153, .28);

  --shadow-color: rgba(0, 0, 0, .34);
  --shadow: 0 18px 50px var(--shadow-color);
  --btn-dark-bg: #111111;
  --btn-dark-text: #ffffff;

  /* type */
  --font-head: "Manrope", "Inter", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, "SF Mono", monospace;

  --text-h1: clamp(44px, 6.5vw, 88px);
  --text-h1-narrow: clamp(40px, 5vw, 68px);
  --text-h2: clamp(30px, 3.8vw, 52px);
  --text-h2-sm: clamp(22px, 2.6vw, 30px);
  --text-h3: 21px;
  --text-lead: 18px;
  --text-prose: 17px;
  --text-body: 15px;
  --text-small: 13.5px;
  --text-micro: 11.5px;

  --tracking-tight: -.04em;
  --tracking-tighter: -.03em;
  --tracking-wide: .1em;
  --tracking-wider: .18em;
  --tracking-widest: .22em;

  --leading-tight: 1.05;
  --leading-snug: 1.3;
  --leading-body: 1.6;
  --leading-loose: 1.85;

  /* space — 4px base */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-7: 32px; --space-8: 40px;
  --space-9: 48px; --space-10: 64px; --space-11: 80px;

  --container-max: 1180px;
  --container-narrow: 740px;
  --container-gutter: 20px;
  --section-pad: 80px;
  --section-pad-sm: 60px;

  /* shape — exact; the site never snaps to a 4/8 grid */
  --radius-sm: 12px;  --radius-md: 18px;  --radius-lg: 24px;
  --radius-xl: 32px;  --radius-2xl: 34px; --radius-pill: 999px;

  /* motion — short, no bounce */
  --ease: cubic-bezier(.4, 0, .2, 1);
  --duration-fast: .15s;
  --duration-base: .2s;
  --duration-slow: .4s;
}

[data-theme="light"] {
  --bg: #f6f6f6;
  --bg-2: #eeeeee;
  --surface: #ffffff;
  --surface-2: #f9f9f9;
  --line: rgba(0, 0, 0, .09);
  --line-strong: rgba(0, 0, 0, .16);
  --text: #0d0d0d;
  --muted: #555555;
  --muted-2: #888888;

  --accent: #4f46e5;
  --accent-dim: rgba(79, 70, 229, .08);
  --accent-glow: rgba(79, 70, 229, .2);
  --accent-border: rgba(79, 70, 229, .25);

  --shadow-color: rgba(0, 0, 0, .07);
  --shadow: 0 8px 28px var(--shadow-color);
  --btn-dark-bg: #ececec;
  --btn-dark-text: #0d0d0d;
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background .25s var(--ease), color .25s var(--ease);
}

h1, h2, h3, h4, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
img, svg { display: block; max-width: 100%; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--duration-base) var(--ease);
}
a:hover { color: var(--text); }

input, textarea, button { font-family: var(--font-body); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.kvx-sr {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.kvx-skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line-strong);
  padding: 12px 20px; border-radius: 0 0 var(--radius-sm) 0; font-size: 14px;
}
.kvx-skip:focus { left: 0; }

/* Shared shell */
.kvx-wrap {
  max-width: var(--container-max);
  margin: 0 auto;
  width: calc(100% - 40px);
}
.kvx-wrap--narrow { max-width: var(--container-narrow); }
.kvx-section { padding: var(--section-pad) 0; }
.kvx-band {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* --------------------------------------------------------------------------
   3. Motion primitives
   -------------------------------------------------------------------------- */
@keyframes kvxDot   { 0%, 80%, 100% { transform: translateY(0); } 40% { transform: translateY(-5px); } }
@keyframes kvxPulse { 0%, 100% { opacity: 1; } 50% { opacity: .28; } }
@keyframes kvxWave  { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
@keyframes kvxSweep { 0% { transform: translateX(-120%); } 60%, 100% { transform: translateX(320%); } }

/* Scroll progress — width is set by JS */
.kvx-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
  z-index: 60;
}

/* Live status dot */
.kvx-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--live); box-shadow: 0 0 7px var(--live);
  animation: kvxPulse 2s infinite;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   4. Button
   -------------------------------------------------------------------------- */
.kvx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  height: 46px;
  padding: 0 20px;
  font-size: 14px;
  transition: transform var(--duration-base) var(--ease),
              border-color var(--duration-base) var(--ease),
              background var(--duration-base) var(--ease),
              box-shadow var(--duration-base) var(--ease);
}
.kvx-btn--sm { height: 40px; padding: 0 16px; font-size: 13px; }
.kvx-btn--block { width: 100%; }

.kvx-btn--primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
  font-weight: 700;
}
.kvx-btn--primary:hover {
  color: var(--bg);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(255, 255, 255, .22);
}
[data-theme="light"] .kvx-btn--primary:hover { box-shadow: 0 4px 20px rgba(0, 0, 0, .18); }

.kvx-btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.kvx-btn--ghost:hover {
  color: var(--text);
  transform: translateY(-1px);
  background: var(--surface);
  border-color: var(--line-strong);
}

.kvx-btn--accent {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: 700;
}
.kvx-btn--accent:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 22px var(--accent-glow);
}

/* --------------------------------------------------------------------------
   5. Core atoms — Badge, Eyebrow, IconTile, ThemeToggle
   -------------------------------------------------------------------------- */
.kvx-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--live-dim);
  border: 1px solid var(--live-border);
  color: var(--live);
  font-size: 11px;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  font-weight: 600;
  font-family: var(--font-body);
}

.kvx-eyebrow {
  display: inline-flex;
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  color: var(--muted);
  background: var(--surface-2);
  font-family: var(--font-body);
  font-size: var(--text-micro);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
}
.kvx-eyebrow--accent {
  border-color: var(--accent-border);
  color: var(--accent);
  background: var(--accent-dim);
}

/* Bracketed mono label — the page's signature marker */
.kvx-kicker {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--muted-2);
}

.kvx-icontile {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}
.kvx-icontile svg { color: var(--accent); }

.kvx-themetoggle {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--text);
  border-radius: var(--radius-pill);
  width: 40px; height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform var(--duration-base) var(--ease);
}
.kvx-themetoggle:hover { transform: translateY(-1px); }

/* --------------------------------------------------------------------------
   6. Card family
   -------------------------------------------------------------------------- */
.kvx-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  box-shadow: var(--shadow);
  transition: border-color var(--duration-base) var(--ease),
              box-shadow var(--duration-base) var(--ease),
              transform var(--duration-base) var(--ease);
}
.kvx-card:hover {
  border-color: var(--accent-border);
  box-shadow: var(--shadow), 0 0 32px var(--accent-dim);
  transform: translateY(-2px);
}
.kvx-card--flush { padding: 0; }
.kvx-card--28 { padding: 28px; }
.kvx-card--accent { border-color: var(--accent-border); }

.kvx-card__title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 17px;
  margin-bottom: 8px;
}
.kvx-card__body {
  font-size: var(--text-body);
  line-height: 1.7;
  color: var(--muted);
}

/* Panel rows inside a flush card */
.kvx-panel__head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.kvx-panel__name { font-family: var(--font-head); font-weight: 700; font-size: 14px; }
.kvx-panel__live {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; color: var(--live);
  letter-spacing: var(--tracking-wide); text-transform: uppercase;
}
.kvx-panel__foot {
  position: relative;
  overflow: hidden;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--muted-2);
}
.kvx-panel__sweep {
  position: absolute; inset: 0; width: 32%;
  background: linear-gradient(90deg, transparent, var(--accent-dim), transparent);
  animation: kvxSweep 5.5s ease-in-out infinite;
  pointer-events: none;
}

/* Chat bubbles inside a product panel */
.kvx-bubbles { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.kvx-bubble {
  max-width: 82%;
  padding: 11px 16px;
  border-radius: 18px;
  font-size: 13.5px;
  line-height: 1.55;
}
.kvx-bubble--in {
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.kvx-bubble--out {
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
}
.kvx-bubble__who {
  font-size: 10px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 5px;
}
.kvx-bubble--out .kvx-bubble__who { color: var(--accent); text-align: right; }

/* Schedule rows */
.kvx-slot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.kvx-slot--confirmed { border-color: var(--accent-border); background: var(--accent-dim); }
.kvx-slot--confirmed span:last-child {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--accent); font-weight: 600;
}
.kvx-slot--moved { border: 1px dashed var(--line-strong); background: transparent; color: var(--muted-2); }
.kvx-slot__muted { color: var(--muted-2); }

/* Qualification rows */
.kvx-field {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; font-size: 13px; padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.kvx-field span:first-child { color: var(--muted-2); }
.kvx-score {
  padding: 14px;
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-sm);
  background: var(--accent-dim);
}
.kvx-score__head {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--accent); margin-bottom: 9px;
  letter-spacing: var(--tracking-wide); text-transform: uppercase;
}
.kvx-score__track {
  height: 6px; border-radius: var(--radius-pill);
  background: var(--surface-2); overflow: hidden;
}
.kvx-score__fill {
  height: 100%; width: 92%;
  border-radius: var(--radius-pill);
  background: var(--accent);
  transition: width 1.1s var(--ease);
}

/* ClientCard */
.kvx-client {
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color var(--duration-base) var(--ease);
}
.kvx-client:hover { border-color: var(--accent-border); }
.kvx-client__mark {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 800;
  color: var(--accent);
  font-family: var(--font-head);
  flex-shrink: 0;
}
.kvx-client__name {
  display: block;
  font-family: var(--font-head);
  font-size: 17px;
  letter-spacing: var(--tracking-tighter);
  margin-bottom: 3px;
}
.kvx-client__desc { color: var(--muted-2); font-size: 13.5px; line-height: 1.5; }

/* PendingQuoteCard — dashed always means not-yet-real */
.kvx-pending {
  margin-top: 16px;
  padding: 22px 24px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--line-strong);
  background: var(--surface-2);
}
.kvx-pending__head {
  display: block;
  font-family: var(--font-head);
  font-size: 15px;
  margin-bottom: 6px;
}
.kvx-pending p { color: var(--muted-2); font-size: 14px; line-height: 1.7; max-width: 70ch; }

/* StatRow */
.kvx-statrow {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.kvx-statrow > div { padding: 24px 20px; background: var(--bg); }
.kvx-statrow__value {
  font-family: var(--font-head);
  font-weight: 800;
  letter-spacing: var(--tracking-tight);
  font-size: clamp(28px, 3.5vw, 48px);
  line-height: 1;
  margin-bottom: 6px;
  color: var(--accent);
}
.kvx-statrow__label { color: var(--muted-2); font-size: 13px; }

/* --------------------------------------------------------------------------
   7. ChatDemoCard — the hero product panel
   -------------------------------------------------------------------------- */
.kvx-demo {
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  box-shadow: var(--shadow), 0 0 80px var(--accent-dim);
  overflow: hidden;
}
.kvx-demo__head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface-2);
}
.kvx-demo__agent { display: flex; align-items: center; gap: 12px; }
.kvx-demo__avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 800; font-size: 13px;
  color: var(--accent);
  flex-shrink: 0;
}
.kvx-demo__name { font-weight: 700; font-size: 14px; font-family: var(--font-head); }
.kvx-demo__status {
  font-size: 11px; color: var(--live);
  display: flex; align-items: center; gap: 5px; margin-top: 2px;
}
.kvx-demo__meta { font-size: 11px; color: var(--muted-2); white-space: nowrap; }

.kvx-demo__tabs { display: flex; gap: 6px; padding: 12px 14px 0; flex-wrap: wrap; }
.kvx-demo__tab {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted-2);
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 400;
  cursor: pointer;
  font-family: inherit;
  transition: border-color var(--duration-base) var(--ease),
              background var(--duration-base) var(--ease),
              color var(--duration-base) var(--ease);
}
.kvx-demo__tab[aria-selected="true"] {
  border-color: var(--accent-border);
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 600;
}

/* Height is reserved so the hero never shifts on load */
.kvx-demo__log {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 200px;
}
.kvx-demo__log .kvx-bubble { max-width: 84%; }

.kvx-demo__rule { border: none; border-top: 1px solid var(--line); margin: 0; }
.kvx-demo__caption {
  padding: 14px 20px 4px;
  font-size: 12.5px;
  color: var(--muted-2);
  line-height: 1.65;
  min-height: 58px;
}
.kvx-demo__caption strong { color: var(--text); }

.kvx-demo__stats { display: grid; grid-template-columns: repeat(3, 1fr); }
.kvx-demo__stats > div {
  text-align: center;
  padding: 14px 8px;
  border-right: 1px solid var(--line);
}
.kvx-demo__stats > div:last-child { border-right: none; }
.kvx-demo__stats b {
  display: block;
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}
.kvx-demo__stats span {
  font-size: 10px;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* Typing indicator */
.kvx-typing { display: inline-flex; gap: 4px; align-items: center; height: 12px; }
.kvx-typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  animation: kvxDot .9s infinite;
}
.kvx-typing span:nth-child(2) { animation-delay: .15s; }
.kvx-typing span:nth-child(3) { animation-delay: .3s; }

/* --------------------------------------------------------------------------
   8. ComparisonTable
   -------------------------------------------------------------------------- */
.kvx-cmp-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.kvx-cmp {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  font-family: var(--font-body);
}
table.kvx-cmp th {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-strong);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted-2);
}
table.kvx-cmp th:last-child { color: var(--accent); }
table.kvx-cmp td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  vertical-align: top;
}
table.kvx-cmp td:first-child { color: var(--text); font-weight: 600; }
table.kvx-cmp td:last-child { color: var(--text); }
table.kvx-cmp .kvx-no { color: var(--muted-2); }
table.kvx-cmp .kvx-yes { color: var(--accent); }

/* --------------------------------------------------------------------------
   9. WorkflowSteps
   -------------------------------------------------------------------------- */
.kvx-steps {
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  box-shadow: var(--shadow);
}
.kvx-steps__row {
  padding: 28px;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  border-top: 1px solid var(--line);
}
.kvx-steps__row:first-child { border-top: none; }
.kvx-steps__num {
  color: var(--muted-2);
  letter-spacing: var(--tracking-wider);
  font-size: 12px;
  text-transform: uppercase;
  font-family: var(--font-head);
}
.kvx-steps__row h3 { font-size: 18px; margin-bottom: 6px; font-family: var(--font-head); }
.kvx-steps__row p { color: var(--muted); line-height: 1.75; margin: 0; }

/* --------------------------------------------------------------------------
   10. FaqAccordion
   -------------------------------------------------------------------------- */
.kvx-faqs { display: grid; gap: 10px; }
.kvx-faq {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  transition: border-color .2s;
}
.kvx-faq:hover,
.kvx-faq[open] { border-color: var(--accent-border); }
.kvx-faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.kvx-faq summary::-webkit-details-marker { display: none; }
.kvx-faq summary::after {
  content: "+";
  font-size: 22px;
  color: var(--muted);
  line-height: 1;
  flex-shrink: 0;
}
.kvx-faq[open] summary::after { content: "\2013"; color: var(--accent); }
.kvx-faq__answer { padding-top: 14px; font-size: 15px; color: var(--muted); line-height: 1.75; }

/* --------------------------------------------------------------------------
   11. Header / nav
   -------------------------------------------------------------------------- */
.kvx-header {
  position: sticky;
  top: 0;
  z-index: 30;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
}
.kvx-header__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  width: calc(100% - 40px);
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.kvx-header__logo { display: inline-flex; align-items: center; flex-shrink: 0; }
.kvx-header__logo img { height: 34px; width: auto; }

.kvx-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 13.5px;
  flex: 1 1 0;
  min-width: 0;
  justify-content: center;
  white-space: nowrap;
  overflow: hidden;
}
.kvx-nav a { color: var(--muted); }
.kvx-nav a:hover { color: var(--text); }
.kvx-nav a[aria-current="page"] { color: var(--text); font-weight: 600; }

.kvx-header__actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.kvx-header__pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--muted-2);
  white-space: nowrap;
}

.kvx-burger {
  display: none;
  width: 44px; height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
}
.kvx-burger span { display: block; width: 18px; height: 1.5px; background: var(--text); }

.kvx-mobilenav { display: none; border-top: 1px solid var(--line); background: var(--bg); }
.kvx-mobilenav.is-open { display: block; }
.kvx-mobilenav nav {
  max-width: var(--container-max);
  margin: 0 auto;
  width: calc(100% - 40px);
  padding: var(--space-4) 0 var(--space-6);
  display: grid;
}
.kvx-mobilenav a {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 16px;
}
.kvx-mobilenav a[aria-current="page"] { color: var(--text); }
.kvx-mobilenav__ctas { display: grid; gap: 12px; margin-top: var(--space-6); }
.kvx-mobilenav__ctas .kvx-btn { width: 100%; }
.kvx-mobilenav__ctas a { border-bottom: 0; padding: 0; }

/* The DS nav wraps below 900px — swap to the compact header there. */
@media (max-width: 899px) {
  .kvx-nav { display: none; }
  .kvx-burger { display: flex; }
  .kvx-header__inner { gap: 16px; }
  .kvx-header__logo img { height: 30px; }
  .kvx-header__actions .kvx-btn { display: none; }
}
@media (max-width: 1239px) { .kvx-header__pill { display: none; } }
@media (max-width: 1079px) { .kvx-header__cta-ghost { display: none; } }

/* --------------------------------------------------------------------------
   12. Hero + section furniture
   -------------------------------------------------------------------------- */
.kvx-hero { position: relative; padding: var(--section-pad) 0 var(--space-11); }
.kvx-hero__wash {
  position: absolute;
  inset: -10% 20% 40% 20%;
  background: radial-gradient(60% 60% at 50% 30%, var(--accent-dim), transparent 70%);
  pointer-events: none;
}
.kvx-hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(390px, 1fr));
  gap: var(--space-10);
  align-items: center;
}
.kvx-hero h1 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: var(--text-h1);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--space-6);
  text-wrap: pretty;
}
.kvx-hero__lead {
  font-size: var(--text-lead);
  line-height: var(--leading-body);
  color: var(--muted);
  max-width: 52ch;
  margin-bottom: var(--space-8);
  text-wrap: pretty;
}
.kvx-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.kvx-actions--center { justify-content: center; }

.kvx-split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: var(--space-10);
  align-items: center;
}
.kvx-split--wide { grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); }
.kvx-split__first { order: 1; }
.kvx-split__second { order: 2; }

.kvx-h2 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: var(--text-h2);
  line-height: 1.08;
  letter-spacing: var(--tracking-tight);
  margin: var(--space-5) 0 var(--space-5);
  text-wrap: pretty;
}
.kvx-prose {
  font-size: var(--text-prose);
  line-height: var(--leading-body);
  color: var(--muted);
  max-width: 50ch;
}
.kvx-note {
  font-size: var(--text-small);
  line-height: 1.7;
  color: var(--muted-2);
}
.kvx-linkrow { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.kvx-arrowlink { font-size: var(--text-body); font-weight: 600; }

.kvx-grid3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
}
.kvx-grid3--lg { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* Trust strip */
.kvx-trust {
  padding: var(--space-5) 0;
  display: flex;
  gap: var(--space-8);
  flex-wrap: wrap;
  justify-content: space-between;
  font-size: var(--text-small);
  color: var(--muted-2);
}

/* Stats framing note */
.kvx-framed {
  font-size: var(--text-body);
  line-height: 1.8;
  color: var(--muted-2);
  max-width: 52ch;
  padding-left: var(--space-5);
  border-left: 1px solid var(--line-strong);
}

/* Packages */
.kvx-plan__num { font-family: var(--font-mono); font-size: 12px; color: var(--muted-2); margin-bottom: 18px; }
.kvx-plan__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 18px;
}
.kvx-plan__name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--text-h3);
  letter-spacing: var(--tracking-tighter);
  margin-bottom: 6px;
}
.kvx-plan__scope { font-size: var(--text-body); color: var(--accent); margin-bottom: 14px; }
.kvx-plan__desc { font-size: var(--text-body); line-height: 1.7; color: var(--muted); margin-bottom: 20px; }
.kvx-ticks { display: grid; gap: 10px; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.kvx-ticks li { display: flex; gap: 10px; }
.kvx-ticks li::before { content: "\2713"; color: var(--accent); flex-shrink: 0; }

/* Voice roadmap strip — dashed means not-yet-real */
.kvx-roadmap {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-8);
  align-items: center;
  background: var(--surface-2);
}
.kvx-roadmap__tag {
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  border: 1px dashed var(--line-strong);
  background: transparent;
  color: var(--muted-2);
  font-size: 11px;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  font-weight: 600;
}
.kvx-roadmap h2 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--text-h2-sm);
  letter-spacing: var(--tracking-tighter);
  margin-bottom: var(--space-4);
}
.kvx-wave {
  display: flex; align-items: flex-end; gap: 4px; height: 64px; opacity: .5;
}
.kvx-wave span {
  width: 4px; background: var(--muted-2); border-radius: 2px;
  animation: kvxWave 1.6s ease-in-out infinite;
}

/* Final CTA */
.kvx-cta { position: relative; padding: var(--section-pad) 0 var(--space-11); border-top: 1px solid var(--line); overflow: hidden; }
.kvx-cta__wash {
  position: absolute; inset: -20% 25% 30% 25%;
  background: radial-gradient(60% 60% at 50% 40%, var(--accent-dim), transparent 70%);
  pointer-events: none;
}
.kvx-cta h2 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: var(--text-h1-narrow);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  margin: var(--space-6) 0 var(--space-5);
}

.kvx-form {
  max-width: 520px;
  margin: 0 auto;
  padding: var(--space-7);
  border: 1px solid var(--line);
  border-radius: var(--radius-2xl);
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  box-shadow: var(--shadow);
  text-align: left;
}
.kvx-form__intro {
  font-size: var(--text-small);
  color: var(--muted-2);
  margin-bottom: var(--space-5);
  text-align: center;
}
.kvx-form__fields { display: grid; gap: 12px; }
.kvx-form input,
.kvx-form textarea {
  width: 100%;
  padding: 0 14px;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color var(--duration-base) var(--ease);
}
.kvx-form textarea { height: auto; padding: 12px 14px; resize: vertical; line-height: 1.6; }
.kvx-form input:focus,
.kvx-form textarea:focus { border-color: var(--accent); }
.kvx-form input::placeholder,
.kvx-form textarea::placeholder { color: var(--muted-2); }
.kvx-form__status { font-size: var(--text-small); line-height: 1.6; text-align: center; min-height: 20px; }
.kvx-form__status--ok { color: var(--live); }
.kvx-form__status--err { color: var(--muted); }

/* --------------------------------------------------------------------------
   13. Footer
   -------------------------------------------------------------------------- */
.kvx-footer {
  padding: 40px 0 48px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 13px;
  background: var(--bg-2);
}
.kvx-footer__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}
.kvx-footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 16px;
  color: var(--text);
  margin-bottom: 10px;
}
.kvx-footer__blurb { color: var(--muted-2); font-size: 13px; line-height: 1.6; }
.kvx-footer h4 {
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.kvx-footer a { display: block; color: var(--muted-2); margin-bottom: 9px; font-size: 13px; }
.kvx-footer a:hover { color: var(--text); }
.kvx-footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.kvx-footer__bottom a { display: inline; color: inherit; margin: 0; }
.kvx-footer__bottom div { display: flex; gap: 18px; flex-wrap: wrap; }

@media (max-width: 860px) {
  .kvx-footer__grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 28px; }
}

/* --------------------------------------------------------------------------
   14. Chat widget
   -------------------------------------------------------------------------- */
.kvx-launcher {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  z-index: 9999;
  transition: transform var(--duration-base) var(--ease);
}
.kvx-launcher:hover { transform: translateY(-2px); }
.kvx-launcher[hidden] { display: none; }

.kvx-widget {
  position: fixed;
  bottom: 88px; right: 24px;
  width: 360px;
  max-width: calc(100vw - 32px);
  height: 520px;
  max-height: calc(100vh - 120px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px 20px 6px 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  z-index: 9998;
}
[data-theme="dark"] .kvx-widget { background: #101012; }
.kvx-widget[hidden] { display: none; }

.kvx-widget__head {
  padding: 16px 18px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.kvx-widget__agent { display: flex; align-items: center; gap: 10px; }
.kvx-widget__avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  display: grid; place-items: center;
  font-size: 14px; font-weight: 700; color: var(--text);
  flex-shrink: 0;
}
.kvx-widget__name { font-size: 14px; font-weight: 600; color: var(--text); }
.kvx-widget__status { font-size: 11px; color: var(--live); margin-top: 1px; }
.kvx-widget__close {
  background: none; border: none; color: var(--muted-2);
  cursor: pointer; font-size: 20px; line-height: 1; padding: 4px;
}
.kvx-widget__close:hover { color: var(--text); }

.kvx-widget__log {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.kvx-msg {
  max-width: 82%;
  padding: 11px 15px;
  border-radius: 18px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.kvx-msg--user {
  align-self: flex-end;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-bottom-right-radius: 4px;
}
.kvx-msg--agent {
  align-self: flex-start;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  border-bottom-left-radius: 4px;
}
.kvx-msg a { text-decoration: underline; color: var(--accent); }
[data-theme="dark"] .kvx-msg--user { background: rgba(255, 255, 255, .05); }

.kvx-widget__typing {
  display: flex; gap: 4px;
  padding: 11px 15px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  border-radius: 18px;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}
.kvx-widget__typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--muted-2);
  animation: kvxDot .9s infinite;
}
.kvx-widget__typing span:nth-child(2) { animation-delay: .15s; }
.kvx-widget__typing span:nth-child(3) { animation-delay: .3s; }

.kvx-widget__fallback { display: flex; flex-direction: column; gap: 8px; align-self: flex-start; max-width: 92%; }
.kvx-widget__fallback a {
  font-size: 13px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
}
.kvx-widget__fallback a:hover { border-color: var(--accent-border); color: var(--accent); }

.kvx-widget__foot { padding: 12px; border-top: 1px solid var(--line); background: var(--surface-2); }
.kvx-widget__row { display: flex; gap: 8px; }
.kvx-widget__input {
  flex: 1;
  min-width: 0;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 13px;
  font-size: 13px;
  outline: none;
  font-family: inherit;
}
.kvx-widget__input:focus { border-color: var(--accent); }
.kvx-widget__input::placeholder { color: var(--muted-2); }
.kvx-widget__send {
  width: 38px; height: 38px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.kvx-widget__send:disabled { opacity: .45; cursor: not-allowed; }
.kvx-widget__brand {
  text-align: center;
  font-size: 10px;
  color: var(--muted-2);
  margin-top: 8px;
  letter-spacing: .5px;
}

/* --------------------------------------------------------------------------
   15. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  :root { --section-pad: 60px; }
  .kvx-hero__grid { grid-template-columns: 1fr; gap: var(--space-9); }
  .kvx-split,
  .kvx-split--wide { grid-template-columns: 1fr; gap: var(--space-9); }
  /* Copy always leads when the two columns stack */
  .kvx-split__first { order: 0; }
  .kvx-split__second { order: 0; }
  .kvx-trust { gap: var(--space-4); }
}

@media (max-width: 640px) {
  .kvx-steps__row { grid-template-columns: 1fr; gap: 8px; padding: 22px; }
  .kvx-roadmap { padding: var(--space-6); }
  .kvx-form { padding: var(--space-6); }
  .kvx-launcher { bottom: 16px; right: 16px; }
  .kvx-widget { bottom: 80px; right: 16px; }
  /* The comparison table is the one grid that needs an explicit mobile stack */
  table.kvx-cmp, table.kvx-cmp tbody, table.kvx-cmp tr, table.kvx-cmp td { display: block; width: 100%; }
  table.kvx-cmp thead { display: none; }
  table.kvx-cmp tr { border-bottom: 1px solid var(--line-strong); padding: 6px 0 10px; }
  table.kvx-cmp tr:last-child { border-bottom: none; }
  table.kvx-cmp td { border-bottom: none; padding: 6px 0; }
  table.kvx-cmp td:first-child {
    font-family: var(--font-head);
    font-size: 12px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted-2);
  }
}

/* --------------------------------------------------------------------------
   16. Reduced motion — reveals resolve instantly, loops stop
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .kvx-progress { display: none; }
}

@media print {
  .kvx-header, .kvx-launcher, .kvx-widget, .kvx-progress, .kvx-mobilenav { display: none !important; }
  body { background: #fff; color: #000; }
}
