/* IDP Landing — page styles. Inherits tokens from tokens.css. */
*, *::before, *::after { box-sizing: border-box; }
html, body, #root { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  color: hsl(var(--foreground));
  background: hsl(var(--background));
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv02","cv03","cv04","cv11";
}
button, input { font-family: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 2px; }

/* Theme override hooks (Tweaks) */
body[data-theme="dark"] { color-scheme: dark; }
body[data-theme="dark"] .invert-on-dark { background: hsl(12 24% 8%); }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: 96px 0; }
.section-tight { padding: 64px 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: hsl(var(--muted-foreground));
  padding: 6px 10px;
  border: 1px solid hsl(var(--border));
  border-radius: 9999px;
  background: hsl(var(--background));
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 9999px;
  background: hsl(var(--acc-violet));
}

.h-display {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 700; letter-spacing: -0.025em;
  line-height: 1.02; margin: 0;
  text-wrap: balance;
}
.h-section {
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 700; letter-spacing: -0.02em;
  line-height: 1.08; margin: 0;
  text-wrap: balance;
}
.lead {
  font-size: 18px; line-height: 1.55;
  color: hsl(var(--muted-foreground));
  max-width: 640px;
  text-wrap: pretty;
}

/* Gradient ink, used very sparingly */
.ink-grad {
  background: var(--gradient-logo);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Header ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid hsl(var(--border) / 0.6);
  background: hsl(var(--background) / 0.78);
  backdrop-filter: saturate(140%) blur(10px);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  max-width: 1240px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  color: hsl(var(--foreground));
  background: transparent;
  box-shadow: none;
  flex-shrink: 0;
}
.brand-mark svg { width: 100%; height: 100%; }
.brand-name { font-weight: 600; font-size: 18px; letter-spacing: -0.005em; line-height: 1; color: hsl(var(--foreground)); }
.brand-sub  { font-size: 9.5px; font-weight: 500; letter-spacing: 0.14em; color: hsl(var(--muted-foreground)); margin-top: 3px; text-transform: uppercase; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
  padding: 8px 12px; border-radius: 8px;
  font-size: 13px; font-weight: 500;
  color: hsl(var(--muted-foreground));
  transition: all var(--transition-base);
}
.nav-link:hover { background: hsl(var(--muted)); color: hsl(var(--foreground)); }

.nav-cta { display: flex; align-items: center; gap: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px;
  font-size: 14px; font-weight: 500;
  border-radius: 10px; border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-smooth);
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; stroke-width: 1.75; flex-shrink: 0; }
.btn-primary {
  background: hsl(var(--primary)); color: #fff;
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover { background: hsl(var(--primary-light)); box-shadow: var(--shadow-medium); }
.btn-outline {
  background: hsl(var(--background)); color: hsl(var(--foreground));
  border-color: hsl(var(--border));
}
.btn-outline:hover { background: hsl(var(--muted)); border-color: hsl(var(--border)); }
.btn-ghost { background: transparent; color: hsl(var(--foreground)); }
.btn-ghost:hover { background: hsl(var(--muted)); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: 12px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 36px 0 24px;
  overflow: hidden;
  background:
    radial-gradient(60% 80% at 50% 0%, hsl(150 60% 96%) 0%, transparent 70%),
    radial-gradient(40% 60% at 88% 18%, hsl(150 60% 96%) 0%, transparent 70%);
}
.dark .hero {
  background: transparent;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(hsl(var(--border) / 0.55) 1px, transparent 1px),
    linear-gradient(90deg, hsl(var(--border) / 0.55) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(70% 70% at 50% 30%, #000 20%, transparent 80%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 920px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero { padding-top: 24px; }
}
.hero-copy { display: flex; flex-direction: column; gap: 24px; }
.hero-cta-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hero-meta {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  font-size: 13px; color: hsl(var(--muted-foreground));
}
.hero-meta-item { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta-item svg { width: 14px; height: 14px; color: hsl(var(--success)); }

/* Section-stack visual */
.stack {
  position: relative;
  width: 100%;
  aspect-ratio: 1.05 / 1;
  max-width: 540px;
  margin-left: auto;
}
.stack-card {
  position: absolute; left: 0; right: 0;
  border-radius: 16px;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  box-shadow: var(--shadow-md);
  padding: 14px 18px;
  display: flex; align-items: center; gap: 12px;
  transform-origin: 50% 100%;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}
.stack:hover .stack-card { transform: var(--hover-t, none); }
.stack-card .ic {
  width: 36px; height: 36px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stack-card .ic svg { width: 18px; height: 18px; stroke-width: 1.75; }
.stack-card .body { display: flex; flex-direction: column; min-width: 0; }
.stack-card .t { font-size: 14px; font-weight: 600; letter-spacing: -0.005em; }
.stack-card .s { font-size: 12px; color: hsl(var(--muted-foreground)); }
.stack-card .meta {
  margin-left: auto;
  font-family: var(--font-mono); font-size: 11px;
  color: hsl(var(--muted-foreground));
  background: hsl(var(--muted));
  border-radius: 6px;
  padding: 2px 7px;
}
.stack .layer-glow {
  position: absolute; inset: -8% -8% -16% -8%;
  background: radial-gradient(50% 60% at 50% 60%, hsl(var(--primary) / 0.15), transparent 70%);
  filter: blur(20px);
  z-index: -1;
}

.section-card-mock {
  position: absolute; left: 8%; right: 8%; top: 0; bottom: 0;
  border-radius: 20px;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  box-shadow: var(--shadow-xl);
  padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.section-card-mock .head {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 4px 12px; border-bottom: 1px dashed hsl(var(--border));
}
.section-card-mock .browser-dot { width: 10px; height: 10px; border-radius: 99px; }
.section-card-mock .url-pill {
  margin-left: 8px;
  font-family: var(--font-mono); font-size: 11px;
  background: hsl(var(--muted)); color: hsl(var(--muted-foreground));
  border-radius: 6px;
  padding: 3px 8px;
}
.section-card-mock .stack-list { display: flex; flex-direction: column; gap: 8px; padding: 4px; }

/* Section spec rows (the section-stack visual) */
.spec-row {
  display: grid; grid-template-columns: 32px 1fr auto;
  align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border));
}
.spec-row .ic {
  width: 32px; height: 32px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
}
.spec-row .ic svg { width: 16px; height: 16px; stroke-width: 1.75; }
.spec-row .body { display: flex; flex-direction: column; }
.spec-row .t { font-size: 13px; font-weight: 600; line-height: 1.2; }
.spec-row .s { font-size: 11px; color: hsl(var(--muted-foreground)); margin-top: 1px; }
.spec-row .tag {
  font-family: var(--font-mono); font-size: 10px;
  background: hsl(var(--muted)); color: hsl(var(--muted-foreground));
  border-radius: 5px; padding: 2px 6px;
}

/* ---------- Section heads ---------- */
.section-head {
  display: flex; flex-direction: column; gap: 14px;
  margin-bottom: 48px;
  max-width: 760px;
}

/* ---------- Assistant demo ---------- */
.demo-panel {
  display: grid; grid-template-columns: 0.95fr 1.1fr;
  border-radius: 16px;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  min-height: 520px;
}
@media (max-width: 920px) {
  .demo-panel { grid-template-columns: 1fr; }
}
.demo-chat {
  display: flex; flex-direction: column;
  background: hsl(180 6% 98%);
  border-right: 1px solid hsl(var(--border));
}
.demo-tab {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid hsl(var(--border));
  font-size: 12px; font-weight: 500;
  color: hsl(var(--muted-foreground));
}
.demo-tab .live-dot {
  width: 8px; height: 8px; border-radius: 99px;
  background: hsl(var(--success));
  box-shadow: 0 0 0 4px hsl(var(--success) / 0.18);
}
.demo-chat-body { flex: 1; overflow: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; gap: 10px; max-width: 90%; }
.msg-av {
  width: 28px; height: 28px; border-radius: 8px;
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600;
}
.msg-av.user { background: hsl(var(--muted)); color: hsl(var(--foreground)); }
.msg-av.bot  { background: var(--gradient-logo); color: #fff; }
.msg-bubble {
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border));
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px; line-height: 1.5;
  color: hsl(var(--foreground));
  box-shadow: var(--shadow-xs);
}
.msg.user .msg-bubble { background: hsl(var(--primary) / 0.06); border-color: hsl(var(--primary) / 0.2); }
.msg .tool-call {
  margin-top: 6px;
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
  background: hsl(var(--background));
  font-family: var(--font-mono);
  font-size: 11px;
  color: hsl(var(--muted-foreground));
  padding: 0;
  overflow: hidden;
}
.msg .tool-call .tc-head {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px;
  border-bottom: 1px solid hsl(var(--border));
  font-weight: 500;
}
.msg .tool-call .tc-head svg { width: 12px; height: 12px; }
.msg .tool-call .tc-head .ok { color: hsl(var(--success)); }
.msg .tool-call .tc-body { padding: 6px 10px; white-space: pre; }

.demo-chat-input {
  display: flex; gap: 8px; padding: 14px;
  border-top: 1px solid hsl(var(--border));
  background: hsl(var(--background));
}
.demo-chat-input input {
  flex: 1; height: 38px; border-radius: 10px;
  border: 1px solid hsl(var(--input)); padding: 0 12px;
  font-size: 13px; outline: none;
  background: hsl(var(--background));
}
.demo-chat-input input:focus { border-color: hsl(var(--ring)); box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2); }

.demo-preview {
  display: flex; flex-direction: column;
  background: hsl(var(--background));
  position: relative;
}
.demo-preview-tabs {
  display: flex; gap: 4px;
  padding: 10px 14px;
  border-bottom: 1px solid hsl(var(--border));
  background: hsl(180 6% 98%);
  align-items: center;
}
.demo-preview-tabs .pt {
  font-size: 12px; padding: 6px 10px; border-radius: 6px;
  color: hsl(var(--muted-foreground)); cursor: pointer;
  transition: all var(--transition-base);
}
.demo-preview-tabs .pt.active { background: hsl(var(--background)); color: hsl(var(--foreground)); border: 1px solid hsl(var(--border)); font-weight: 500; }
.demo-preview-tabs .pt:hover:not(.active) { background: hsl(var(--muted)); }
.demo-preview-tabs .right { margin-left: auto; display: flex; gap: 4px; }
.demo-preview-body { flex: 1; padding: 24px; overflow: auto; }

/* The mocked Habit Tracker section UI generated by the assistant */
.gen-section { display: flex; flex-direction: column; gap: 18px; }
.gen-section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  padding-bottom: 14px; border-bottom: 1px solid hsl(var(--border));
}
.gen-section-head h3 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.gen-section-head p { margin: 4px 0 0; font-size: 13px; color: hsl(var(--muted-foreground)); }
.kpi-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kpi {
  border: 1px solid hsl(var(--border)); border-radius: 12px;
  padding: 12px; background: hsl(var(--card));
}
.kpi .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; color: hsl(var(--muted-foreground)); font-weight: 600; }
.kpi .val { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; margin-top: 4px; }
.kpi .delta { font-size: 11px; color: hsl(var(--success)); margin-top: 2px; }
.kpi .delta.neg { color: hsl(var(--destructive)); }

.habit-table {
  border: 1px solid hsl(var(--border)); border-radius: 12px;
  background: hsl(var(--card)); overflow: hidden;
}
.habit-row {
  display: grid; grid-template-columns: 1.4fr repeat(7, minmax(0, 28px)) 64px;
  align-items: center; gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid hsl(var(--border));
}
.habit-row:last-child { border-bottom: none; }
.habit-row.hd { background: hsl(180 6% 98%); }
.habit-row.hd .day { font-size: 10px; color: hsl(var(--muted-foreground)); text-transform: uppercase; letter-spacing: 0.06em; text-align: center; }
.habit-row.hd .name { font-size: 11px; color: hsl(var(--muted-foreground)); text-transform: uppercase; letter-spacing: 0.06em; }
.habit-row .name { font-size: 13px; font-weight: 500; }
.habit-row .name .sub { font-size: 11px; color: hsl(var(--muted-foreground)); font-weight: 400; display: block; margin-top: 1px; }
.habit-row .day {
  width: 24px; height: 24px; border-radius: 6px;
  background: hsl(var(--muted));
  display: inline-flex; align-items: center; justify-content: center;
  margin: 0 auto;
}
.habit-row .day.done { background: hsl(var(--success) / 0.16); color: hsl(var(--success)); }
.habit-row .day.done svg { width: 12px; height: 12px; }
.habit-row .streak {
  font-family: var(--font-mono); font-size: 12px; text-align: right;
  color: hsl(var(--foreground));
}
.habit-row .streak .fire { color: hsl(var(--warning)); }

/* ---------- Marketplace ---------- */
.market-rail {
  display: flex; align-items: center; gap: 8px;
  padding: 6px;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  margin-bottom: 28px;
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}
.market-rail .rail-search {
  display: flex; align-items: center; gap: 8px;
  flex: 1; min-width: 240px;
  padding: 0 12px; height: 36px;
  border-radius: 8px;
  background: hsl(var(--muted) / 0.6);
  font-size: 13px; color: hsl(var(--muted-foreground));
}
.market-rail .rail-search svg { width: 14px; height: 14px; }
.market-rail .rail-search .kbd {
  margin-left: auto;
  font-family: var(--font-mono); font-size: 10px;
  border: 1px solid hsl(var(--border));
  padding: 2px 6px; border-radius: 4px;
  background: hsl(var(--background));
}
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 8px;
  font-size: 12px; font-weight: 500;
  background: transparent; color: hsl(var(--muted-foreground));
  border: 1px solid transparent;
  cursor: pointer; white-space: nowrap;
  transition: all var(--transition-base);
}
.chip:hover { background: hsl(var(--muted)); color: hsl(var(--foreground)); }
.chip.active {
  background: hsl(var(--primary) / 0.08);
  color: hsl(var(--primary));
  border-color: hsl(var(--primary) / 0.25);
}

.market-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.mk-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 14px;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: all var(--transition-smooth);
  position: relative;
}
.mk-card:hover { box-shadow: var(--shadow-lg); border-color: hsl(var(--primary) / 0.25); transform: translateY(-2px); }
.mk-thumb {
  height: 130px; padding: 14px;
  display: flex; flex-direction: column; gap: 6px;
  border-bottom: 1px solid hsl(var(--border));
  background: hsl(var(--muted) / 0.4);
  position: relative;
  overflow: hidden;
}
.mk-thumb-bars {
  position: absolute; inset: 14px;
  display: flex; flex-direction: column; gap: 6px;
}
.mk-thumb-row {
  height: 8px; border-radius: 4px;
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border) / 0.7);
}
.mk-thumb-tile {
  flex: 1;
  border-radius: 6px;
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border) / 0.7);
}
.mk-thumb .glow {
  position: absolute; inset: -20%;
  background: radial-gradient(40% 60% at 80% 0%, var(--mk-color, hsl(var(--primary))) 0%, transparent 50%);
  opacity: 0.15;
  pointer-events: none;
}
.mk-meta { padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 10px; }
.mk-meta-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mk-meta-head .icbox {
  width: 32px; height: 32px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
}
.mk-meta-head .icbox svg { width: 16px; height: 16px; stroke-width: 1.75; }
.mk-meta-head .pubchip {
  font-size: 10px; font-weight: 600;
  padding: 2px 7px; border-radius: 9999px;
  background: hsl(var(--muted)); color: hsl(var(--muted-foreground));
  text-transform: uppercase; letter-spacing: 0.06em;
}
.mk-meta-head .pubchip.verified {
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
}
.mk-title { font-size: 15px; font-weight: 600; letter-spacing: -0.005em; }
.mk-author { font-size: 12px; color: hsl(var(--muted-foreground)); display: flex; align-items: center; gap: 6px; margin-top: -4px; }
.mk-desc { font-size: 13px; color: hsl(var(--muted-foreground)); line-height: 1.45; }

.mk-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  border-top: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  font-size: 12px;
}
.mk-stats { display: flex; align-items: center; gap: 12px; color: hsl(var(--muted-foreground)); }
.mk-stat { display: inline-flex; align-items: center; gap: 4px; }
.mk-stat svg { width: 13px; height: 13px; }
.mk-stat.credits { color: hsl(var(--acc-amber)); font-family: var(--font-mono); font-weight: 600; }
.mk-install {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 500;
  color: hsl(var(--primary));
}
.mk-install svg { width: 12px; height: 12px; transition: transform var(--transition-base); }
.mk-card:hover .mk-install svg { transform: translateX(2px); }

/* ---------- Ecosystem diagram ---------- */
.eco-board {
  position: relative;
  border-radius: 20px;
  background:
    radial-gradient(50% 60% at 50% 50%, hsl(var(--primary) / 0.04), transparent 70%),
    hsl(var(--card));
  border: 1px solid hsl(var(--border));
  box-shadow: var(--shadow-lg);
  padding: 36px;
  min-height: 540px;
  overflow: hidden;
}
.eco-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(hsl(var(--border) / 0.6) 1px, transparent 1px),
    linear-gradient(90deg, hsl(var(--border) / 0.6) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(70% 70% at 50% 50%, #000 30%, transparent 80%);
  pointer-events: none;
}
.eco-svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
.eco-positions { position: relative; height: 480px; }
.eco-node {
  position: absolute;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: var(--shadow-md);
  width: 220px;
  display: flex; flex-direction: column; gap: 10px;
  transition: all var(--transition-smooth);
}
.eco-node:hover { box-shadow: var(--shadow-xl); transform: translateY(-1px); }
.eco-node .head { display: flex; align-items: center; gap: 10px; }
.eco-node .ic {
  width: 32px; height: 32px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
}
.eco-node .ic svg { width: 16px; height: 16px; stroke-width: 1.75; }
.eco-node .name { font-size: 14px; font-weight: 600; letter-spacing: -0.005em; }
.eco-node .sub { font-size: 11px; color: hsl(var(--muted-foreground)); margin-top: -2px; }
.eco-node .data {
  font-family: var(--font-mono); font-size: 11px;
  background: hsl(var(--muted) / 0.7);
  border-radius: 6px; padding: 6px 8px;
  color: hsl(var(--muted-foreground));
  display: flex; flex-direction: column; gap: 2px;
}
.eco-node .data b { font-weight: 600; color: hsl(var(--foreground)); }

.eco-link-label {
  position: absolute;
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border));
  color: hsl(var(--muted-foreground));
  border-radius: 6px;
  padding: 3px 7px;
  white-space: nowrap;
  font-family: var(--font-mono);
}

.eco-rails { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.eco-rail {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  border-radius: 9999px;
  border: 1px dashed hsl(var(--border));
  font-size: 12px; color: hsl(var(--muted-foreground));
  background: hsl(var(--background));
}
.eco-rail svg { width: 13px; height: 13px; }

/* ---------- Built-in sections grid ---------- */
.builtin-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}
.bi-card {
  position: relative;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 14px;
  padding: 22px;
  display: flex; flex-direction: column; gap: 4px;
  transition: all var(--transition-smooth);
  overflow: hidden;
}
.bi-card .wash {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity var(--transition-smooth);
  pointer-events: none;
}
.bi-card:hover { box-shadow: var(--shadow-lg); border-color: hsl(var(--primary) / 0.25); }
.bi-card:hover .wash { opacity: 1; }
.bi-ic {
  width: 40px; height: 40px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.bi-ic svg { width: 20px; height: 20px; stroke-width: 1.75; }
.bi-title {
  font-size: 16px; font-weight: 600; letter-spacing: -0.005em;
  display: flex; align-items: center; gap: 8px;
}
.bi-desc { font-size: 13px; line-height: 1.5; color: hsl(var(--muted-foreground)); margin-top: 2px; }

/* Compact list of domain sections */
.domain-grid {
  margin-top: 18px;
  display: grid; gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.domain-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border: 1px solid hsl(var(--border)); border-radius: 10px;
  background: hsl(var(--card));
  font-size: 13px;
}
.domain-row .ic {
  width: 26px; height: 26px; border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.domain-row .ic svg { width: 14px; height: 14px; stroke-width: 1.75; }
.domain-row .name { font-weight: 500; }

/* ---------- Comparison ---------- */
.cmp-table {
  display: grid;
  grid-template-columns: 1.3fr repeat(4, 1fr);
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.cmp-cell {
  padding: 16px 18px;
  border-bottom: 1px solid hsl(var(--border));
  font-size: 13px;
  display: flex; align-items: center; gap: 8px;
}
.cmp-cell.head {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: hsl(var(--muted-foreground));
  background: hsl(var(--muted) / 0.4);
}
.cmp-cell.row-h {
  font-weight: 500; color: hsl(var(--foreground));
}
.cmp-cell.us { background: hsl(var(--primary) / 0.04); }
.cmp-cell.us-h {
  background: hsl(var(--primary) / 0.07);
  color: hsl(var(--primary));
  font-weight: 700;
}
.cmp-cell svg { width: 14px; height: 14px; stroke-width: 2; flex-shrink: 0; }
.cmp-yes svg { color: hsl(var(--success)); }
.cmp-no svg  { color: hsl(var(--destructive) / 0.7); }
.cmp-cell:nth-last-child(-n+5) { border-bottom: none; }

@media (max-width: 920px) {
  .cmp-table { grid-template-columns: 1fr; }
  .cmp-cell { border-right: none; }
  .cmp-cell.head { display: none; }
}

/* ---------- Stack badges ---------- */
.stack-strip {
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
  padding: 22px 28px;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 14px;
}
.stack-strip .label {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: hsl(var(--muted-foreground));
}
.stack-strip .item {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500;
}
.stack-strip .item .ic {
  width: 22px; height: 22px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
}
.stack-strip .item .ic svg { width: 13px; height: 13px; stroke-width: 1.75; }

/* ---------- CTA ---------- */
.cta-card {
  position: relative;
  border-radius: 24px;
  padding: 56px 48px;
  background:
    radial-gradient(70% 80% at 0% 0%, hsl(150 60% 88%) 0%, transparent 60%),
    radial-gradient(70% 80% at 100% 100%, hsl(150 60% 92%) 0%, transparent 60%),
    hsl(var(--card));
  border: 1px solid hsl(var(--border));
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  align-items: center;
}
.cta-card .lockup .mark {
  width: 56px; height: 56px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  display: inline-flex; align-items: center; justify-content: center;
  color: hsl(var(--foreground));
  margin-bottom: 18px;
}
.cta-card .lockup .mark svg { width: 32px; height: 32px; }
.cta-card .grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(hsl(var(--border) / 0.4) 1px, transparent 1px),
    linear-gradient(90deg, hsl(var(--border) / 0.4) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(60% 80% at 80% 80%, transparent 0, #000 80%);
  pointer-events: none;
}
.cta-card h3 { font-size: clamp(28px, 3vw, 38px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; margin: 0; text-wrap: balance; }
.cta-card p  { font-size: 16px; color: hsl(var(--muted-foreground)); margin: 14px 0 22px; max-width: 520px; }
.cta-card .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cta-checks { display: flex; flex-direction: column; gap: 12px; position: relative; }
.cta-checks .item { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; }
.cta-checks .item svg { width: 18px; height: 18px; color: hsl(var(--success)); margin-top: 1px; flex-shrink: 0; }

@media (max-width: 920px) {
  .cta-card { grid-template-columns: 1fr; padding: 36px 24px; }
}

/* ---------- Footer ---------- */
.foot {
  border-top: 1px solid hsl(var(--border));
  background: hsl(var(--muted) / 0.3);
  padding: 48px 0 28px;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 28px;
}
.foot-col h4 {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: hsl(var(--muted-foreground));
  margin: 0 0 12px;
}
.foot-col a {
  display: block;
  font-size: 13px; padding: 5px 0;
  color: hsl(var(--foreground));
  transition: color var(--transition-base);
}
.foot-col a:hover { color: hsl(var(--primary)); }
.foot-bottom {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid hsl(var(--border));
  font-size: 12px;
  color: hsl(var(--muted-foreground));
}

@media (max-width: 920px) {
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .demo-panel { min-height: 0; }
  .eco-positions { height: auto; min-height: 720px; }
}

/* ---------- Misc utilities ---------- */
.muted { color: hsl(var(--muted-foreground)); }
.mono  { font-family: var(--font-mono); }

/* Scrollbar */
.demo-chat-body::-webkit-scrollbar,
.demo-preview-body::-webkit-scrollbar { width: 8px; height: 8px; }
.demo-chat-body::-webkit-scrollbar-thumb,
.demo-preview-body::-webkit-scrollbar-thumb { background: hsl(var(--border)); border-radius: 4px; }


/* ──────────────────────────────────────────────────────────────────────
   Header additions: language selector + theme toggle (icon-btn)
   ────────────────────────────────────────────────────────────────────── */
.lang-toggle {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 2px;
  border: 1px solid hsl(var(--border));
  border-radius: 9999px;
  background: hsl(var(--background));
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 600;
  letter-spacing: .04em;
}
.lang-toggle button {
  border: 0; background: transparent; cursor: pointer;
  padding: 4px 9px; border-radius: 9999px;
  color: hsl(var(--muted-foreground));
  transition: color .15s, background .15s;
}
.lang-toggle button:hover { color: hsl(var(--foreground)); }
.lang-toggle button.on {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}
.lang-toggle .sep { color: hsl(var(--border)); user-select: none; }

.icon-btn {
  width: 32px; height: 32px; border-radius: 9999px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  color: hsl(var(--muted-foreground));
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.icon-btn:hover {
  color: hsl(var(--foreground));
  background: hsl(var(--accent));
  border-color: hsl(var(--border));
}
.icon-btn svg { width: 16px; height: 16px; }

/* ──────────────────────────────────────────────────────────────────────
   Tinted section — theme-aware (was hardcoded light)
   ────────────────────────────────────────────────────────────────────── */
.section-tinted { background: hsl(var(--muted) / 0.5); }
.dark .section-tinted { background: hsl(16 18% 13%); }

/* ──────────────────────────────────────────────────────────────────────
   Dark-mode fixes for assistant demo (chat panel + preview were hardcoded)
   ────────────────────────────────────────────────────────────────────── */
.dark .demo-chat,
.dark .demo-preview-tabs { background: hsl(16 18% 14%); }
.dark .demo-preview { background: hsl(var(--card)); }
.dark .msg-bubble {
  background: hsl(16 18% 19%);
  color: hsl(var(--foreground));
  border-color: hsl(16 18% 24%);
}
.dark .msg-bubble b { color: hsl(var(--foreground)); }
.dark .tool-call {
  background: hsl(16 18% 11%);
  border-color: hsl(16 18% 22%);
  color: hsl(180 6% 92%);
}
.dark .tool-call .tc-head { color: hsl(180 6% 96%); }
.dark .demo-tab { color: hsl(var(--muted-foreground)); border-color: hsl(16 18% 22%); }
.dark .demo-chat-input { border-color: hsl(16 18% 22%); }
.dark .demo-chat-input input {
  background: hsl(16 18% 11%);
  color: hsl(var(--foreground));
  border-color: hsl(16 18% 22%);
}
.dark .pt { color: hsl(var(--muted-foreground)); }
.dark .pt.active {
  background: hsl(16 18% 19%);
  color: hsl(var(--foreground));
}
.dark .gen-section,
.dark .gen-section-head,
.dark .habit-table,
.dark .kpi-row .kpi {
  color: hsl(var(--foreground));
}
.dark .kpi-row .kpi { background: hsl(16 18% 14%); border-color: hsl(16 18% 22%); }
.dark .habit-row { border-color: hsl(16 18% 22%); }
.dark .habit-row .day { background: hsl(16 18% 14%); }
.dark .habit-row .day.done {
  background: hsl(var(--success) / 0.18);
  color: hsl(142 71% 60%);
}

/* msg-bubble base — make sure light mode reads fine too */
.msg-bubble { color: hsl(var(--foreground)); }

/* ──────────────────────────────────────────────────────────────────────
   Marketplace standalone page chrome
   ────────────────────────────────────────────────────────────────────── */
.mk-page-hero {
  padding: 88px 0 32px; position: relative;
}
.mk-page-hero h1 {
  font-size: clamp(36px, 4.4vw, 56px);
  font-weight: 700; letter-spacing: -0.025em;
  line-height: 1.05; margin: 8px 0 12px;
  text-wrap: balance;
}
.mk-page-hero p { font-size: 17px; color: hsl(var(--muted-foreground)); max-width: 620px; margin: 0; }
.mk-page-search {
  margin-top: 28px;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 14px;
  box-shadow: 0 2px 8px -2px hsl(var(--primary) / 0.08);
  max-width: 720px;
}
.mk-page-search svg { width: 18px; height: 18px; color: hsl(var(--muted-foreground)); }
.mk-page-search input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font-size: 15px; color: hsl(var(--foreground));
}
.mk-page-search .kbd {
  font-family: var(--font-mono); font-size: 11px;
  padding: 3px 7px; border-radius: 6px;
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
}

.mk-page-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  padding: 32px 0 96px;
}
@media (max-width: 900px) { .mk-page-layout { grid-template-columns: 1fr; } }

.mk-side {
  position: sticky; top: 88px; align-self: start;
  display: flex; flex-direction: column; gap: 24px;
  font-size: 13px;
}
.mk-side h4 {
  margin: 0 0 4px; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em;
  color: hsl(var(--muted-foreground));
}
.mk-side .side-cat {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: 8px;
  cursor: pointer; color: hsl(var(--foreground));
  border: 1px solid transparent;
  transition: background .15s, border-color .15s;
}
.mk-side .side-cat:hover { background: hsl(var(--accent)); }
.mk-side .side-cat.on {
  background: hsl(var(--primary) / 0.08);
  border-color: hsl(var(--primary) / 0.18);
  color: hsl(var(--primary));
  font-weight: 600;
}
.mk-side .side-cat .count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: hsl(var(--muted-foreground));
}
.mk-side .side-cat.on .count { color: hsl(var(--primary)); }

/* ──────────────────────────────────────────────────────────────────────
   Section preview overlay (modal)
   ────────────────────────────────────────────────────────────────────── */
.sp-back {
  position: fixed; inset: 0; z-index: 9000;
  background: hsl(var(--background) / 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: spFade .18s ease-out;
}
@keyframes spFade { from { opacity: 0; } to { opacity: 1; } }

.sp-modal {
  width: 100%; max-width: 1180px; max-height: 92vh;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 18px;
  box-shadow: 0 30px 80px -10px hsl(16 18% 4% / 0.4);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.sp-head {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid hsl(var(--border));
}
.sp-head .ic {
  width: 44px; height: 44px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
}
.sp-head .ic svg { width: 22px; height: 22px; }
.sp-head .name { font-size: 17px; font-weight: 600; }
.sp-head .by { font-size: 12px; color: hsl(var(--muted-foreground)); }
.sp-head .stats { display: inline-flex; gap: 14px; font-size: 12px; color: hsl(var(--muted-foreground)); }
.sp-head .stats span { display: inline-flex; align-items: center; gap: 5px; }
.sp-head .stats svg { width: 12px; height: 12px; }
.sp-head .actions { margin-left: auto; display: flex; gap: 8px; }

.sp-tabs {
  display: flex; gap: 4px; padding: 8px 16px 0;
  border-bottom: 1px solid hsl(var(--border));
  background: hsl(var(--muted) / 0.4);
}
.dark .sp-tabs { background: hsl(16 18% 12%); }
.sp-tab {
  padding: 8px 14px; border-radius: 8px 8px 0 0;
  font-size: 13px; font-weight: 500; cursor: pointer;
  border: 0; background: transparent;
  color: hsl(var(--muted-foreground));
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.sp-tab.on {
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  border-bottom-color: hsl(var(--primary));
}

.sp-body {
  flex: 1; overflow: auto;
  padding: 28px;
  background: hsl(var(--card));
}
.sp-close {
  width: 32px; height: 32px; border-radius: 9999px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  color: hsl(var(--muted-foreground));
}
.sp-close:hover { color: hsl(var(--foreground)); }
.sp-close svg { width: 14px; height: 14px; }

.sp-mock {
  border: 1px solid hsl(var(--border));
  border-radius: 14px;
  background: hsl(var(--background));
  overflow: hidden;
}
.sp-mock-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid hsl(var(--border));
  background: hsl(var(--muted) / 0.4);
  font-size: 12px; color: hsl(var(--muted-foreground));
}
.dark .sp-mock-bar { background: hsl(16 18% 12%); }
.sp-mock-body { padding: 22px; }

/* generic preview bits used in modal */
.sp-grid { display: grid; gap: 16px; }
.sp-row {
  display: grid; gap: 16px; grid-template-columns: 1fr 1fr 1fr;
}
@media (max-width: 760px) { .sp-row { grid-template-columns: 1fr; } }
.sp-tile {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  padding: 16px;
}
.dark .sp-tile { background: hsl(16 18% 14%); border-color: hsl(16 18% 22%); }
.sp-tile .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: hsl(var(--muted-foreground)); }
.sp-tile .val { font-size: 26px; font-weight: 700; margin-top: 4px; letter-spacing: -.02em; }
.sp-tile .delta { font-size: 12px; color: hsl(var(--muted-foreground)); margin-top: 2px; }

.sp-list { display: flex; flex-direction: column; gap: 1px; background: hsl(var(--border)); border: 1px solid hsl(var(--border)); border-radius: 12px; overflow: hidden; }
.sp-list .item {
  display: grid; grid-template-columns: 32px 1fr auto auto; gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: hsl(var(--card));
  font-size: 14px;
}
.dark .sp-list .item { background: hsl(16 18% 14%); }
.sp-list .item .ic { width: 32px; height: 32px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; }
.sp-list .item .ic svg { width: 16px; height: 16px; }
.sp-list .item .name { font-weight: 500; }
.sp-list .item .sub { font-size: 12px; color: hsl(var(--muted-foreground)); }
.sp-list .item .amt { font-family: var(--font-mono); font-size: 13px; font-weight: 600; }
.sp-list .item .next { font-size: 12px; color: hsl(var(--muted-foreground)); }

.sp-chart {
  height: 160px; border-radius: 12px;
  border: 1px solid hsl(var(--border));
  background: linear-gradient(180deg, hsl(var(--primary) / 0.04) 0%, transparent 100%);
  position: relative; overflow: hidden;
  padding: 14px 16px;
  display: flex; align-items: flex-end; gap: 8px;
}
.sp-bar { flex: 1; border-radius: 4px 4px 0 0; background: hsl(var(--primary) / 0.85); min-height: 8px; }

.sp-pre {
  margin: 0; padding: 16px; border-radius: 12px;
  background: hsl(16 18% 11%); color: hsl(180 6% 96%);
  font-family: var(--font-mono); font-size: 12px; line-height: 1.6;
  overflow: auto;
}


/* ──────────────────────────────────────────────────────────────────────
   Personal / Business mode toggle (in header)
   ────────────────────────────────────────────────────────────────────── */
.mode-toggle {
  display: inline-flex; align-items: center;
  padding: 2px;
  border: 1px solid hsl(var(--border));
  border-radius: 9999px;
  background: hsl(var(--muted) / 0.4);
  font-size: 12px; font-weight: 500;
  margin-left: 8px;
}
.mode-toggle button {
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; background: transparent; cursor: pointer;
  padding: 6px 12px; border-radius: 9999px;
  color: hsl(var(--muted-foreground));
  transition: color .15s, background .15s;
  font: inherit;
}
.mode-toggle button:hover { color: hsl(var(--foreground)); }
.mode-toggle button.on {
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  box-shadow: 0 1px 2px hsl(0 0% 0% / 0.06), 0 0 0 1px hsl(var(--border));
}
.mode-toggle svg { color: currentColor; }

/* ──────────────────────────────────────────────────────────────────────
   Async strip — embedded inside the hero, below the buttons
   ────────────────────────────────────────────────────────────────────── */
.async-strip {
  margin-top: 28px;
  padding-top: 26px;
  border-top: 1px dashed hsl(var(--border));
  display: flex; flex-direction: column; gap: 12px;
  max-width: 540px;
}
.async-strip-head { display: flex; flex-direction: column; gap: 8px; }
.async-title {
  font-size: 18px; font-weight: 600; letter-spacing: -0.01em;
  margin: 0; line-height: 1.25;
  color: hsl(var(--foreground));
}
.async-lead {
  font-size: 13px; line-height: 1.5;
  color: hsl(var(--muted-foreground));
  margin: 0;
}
.async-steps {
  display: flex; flex-direction: column; gap: 6px;
  margin-top: 6px;
}
.async-step {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 9px;
  font-size: 12.5px;
  color: hsl(var(--muted-foreground));
  transition: all .35s;
}
.async-step .ic {
  width: 22px; height: 22px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
  flex-shrink: 0;
  transition: all .35s;
}
.async-step.on {
  background: hsl(var(--primary) / 0.06);
  border-color: hsl(var(--primary) / 0.35);
  color: hsl(var(--foreground));
  font-weight: 500;
}
.async-step.on .ic {
  background: hsl(var(--primary));
  color: white;
}
.async-step .lbl { flex: 1; }

/* Make hero copy column slightly more constrained when phone is on right */
.hero-inner { gap: 56px; }
@media (max-width: 1100px) {
  .hero-inner { gap: 36px; }
}

/* Tighter hero buttons */
.hero-cta-row { margin-top: 4px; }
.hero-meta { margin-top: 2px; }

/* Light/dark touch-ups for header chrome */
.dark .lang-toggle, .dark .mode-toggle {
  background: hsl(16 18% 13%);
}
.dark .mode-toggle button.on {
  background: hsl(16 18% 18%);
  box-shadow: 0 1px 2px hsl(0 0% 0% / 0.4), 0 0 0 1px hsl(16 18% 24%);
}


/* ──────────────────────────────────────────────────────────────────────
   Interactive marketplace demo
   ────────────────────────────────────────────────────────────────────── */
.demo-shell {
  margin-top: 32px;
  display: flex; flex-direction: column; gap: 18px;
}
.demo-head { display: flex; flex-direction: column; gap: 10px; }
.demo-title {
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 600; letter-spacing: -0.015em;
  line-height: 1.2; margin: 0;
  text-wrap: balance;
  max-width: 720px;
}

.demo-board {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 18px;
  align-items: stretch;
}
@media (max-width: 980px) { .demo-board { grid-template-columns: 1fr; } }

.demo-stage {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 16px;
  overflow: hidden;
  display: flex; flex-direction: column;
  min-height: 540px;
  box-shadow: 0 12px 32px -16px hsl(var(--primary) / 0.18);
}
.demo-stage-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid hsl(var(--border));
  background: hsl(var(--muted) / 0.4);
  font-size: 12px;
}
.dark .demo-stage-bar { background: hsl(16 18% 12%); }
.demo-stage-bar .live-dot {
  width: 7px; height: 7px; border-radius: 99px;
  background: hsl(var(--success));
  box-shadow: 0 0 0 4px hsl(var(--success) / 0.18);
}
.demo-stage-body {
  padding: 22px;
  flex: 1; overflow: auto;
  animation: demoFlash .42s cubic-bezier(0.4,0,0.2,1);
}
@keyframes demoFlash {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Chat side */
.demo-side { display: flex; flex-direction: column; }
.demo-chat-window {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 16px;
  display: flex; flex-direction: column;
  overflow: hidden;
  height: 100%;
  min-height: 540px;
}
.demo-chat-log {
  flex: 1; min-height: 200px;
  padding: 18px;
  display: flex; flex-direction: column; gap: 12px;
  overflow: auto;
  background: hsl(var(--muted) / 0.3);
}
.dark .demo-chat-log { background: hsl(16 18% 10%); }
.demo-chat-empty {
  margin: auto; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: hsl(var(--muted-foreground));
  max-width: 280px;
}
.demo-chat-empty p { font-size: 13px; line-height: 1.45; margin: 0; }
.demo-chat-empty svg { color: hsl(var(--primary)); }

.demo-chat-msg { display: flex; }
.demo-chat-msg.user { justify-content: flex-end; }
.demo-chat-msg .bubble {
  max-width: 92%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px; line-height: 1.5;
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
}
.demo-chat-msg.user .bubble {
  background: hsl(var(--primary));
  color: white;
  border-color: hsl(var(--primary));
}
.demo-typing { display: inline-flex; gap: 3px; align-items: center; }
.demo-typing span {
  width: 4px; height: 4px; border-radius: 99px;
  background: currentColor; opacity: .55;
  animation: demoTyping 1.1s infinite ease-in-out;
}
.demo-typing span:nth-child(2) { animation-delay: .15s; }
.demo-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes demoTyping {
  0%,100% { transform: translateY(0); opacity: .35; }
  50%     { transform: translateY(-3px); opacity: 1; }
}

.demo-suggest {
  padding: 10px 14px 4px;
  display: flex; flex-wrap: wrap; gap: 6px;
  border-top: 1px solid hsl(var(--border));
  background: hsl(var(--background));
}
.demo-suggest-label {
  width: 100%;
  font-size: 10px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  color: hsl(var(--muted-foreground));
  margin-bottom: 2px;
}
.demo-suggest-chip {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
}
.demo-suggest-chip:hover:not(:disabled) {
  border-color: hsl(var(--primary) / 0.4);
  background: hsl(var(--primary) / 0.06);
  color: hsl(var(--primary));
}
.demo-suggest-chip:disabled { opacity: .5; cursor: wait; }

.demo-input {
  display: flex; gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid hsl(var(--border));
  background: hsl(var(--background));
}
.demo-input input {
  flex: 1; height: 38px;
  border: 1px solid hsl(var(--input));
  border-radius: 10px;
  padding: 0 12px;
  font-size: 13px;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  outline: none;
}
.demo-input input:focus { border-color: hsl(var(--ring)); box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2); }

/* ── Personal Finance demo "app" UI ────────────────────────────────── */
.fa { display: flex; flex-direction: column; gap: 16px; }
.fa-head { display: flex; align-items: flex-end; justify-content: space-between; }
.fa-head h3 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.fa-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fa-kpi {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  padding: 12px 14px;
}
.dark .fa-kpi { background: hsl(16 18% 14%); border-color: hsl(16 18% 22%); }
.fa-kpi .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: hsl(var(--muted-foreground)); font-weight: 600; }
.fa-kpi .val { font-size: 24px; font-weight: 700; letter-spacing: -.01em; margin-top: 3px; }

.fa-envs { display: flex; flex-direction: column; gap: 10px; }
.fa-env {
  padding: 10px 14px;
  border: 1px solid hsl(var(--border));
  border-radius: 10px;
  background: hsl(var(--card));
  animation: faRowIn .35s cubic-bezier(0.4,0,0.2,1);
}
.dark .fa-env { background: hsl(16 18% 14%); border-color: hsl(16 18% 22%); }
@keyframes faRowIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fa-env-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px;
  margin-bottom: 8px;
}
.fa-env-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.fa-env-name .dotc { width: 8px; height: 8px; border-radius: 99px; flex-shrink: 0; }
.fa-env-amt { font-family: var(--font-mono); font-size: 12px; }
.fa-env-bar {
  height: 6px; border-radius: 99px;
  background: hsl(var(--muted));
  overflow: hidden;
}
.fa-env-bar span {
  display: block; height: 100%;
  transition: width .5s cubic-bezier(0.4,0,0.2,1), background .15s;
}

.fa-txns {
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  overflow: hidden;
}
.fa-txns-head {
  padding: 10px 14px;
  background: hsl(var(--muted) / 0.4);
  border-bottom: 1px solid hsl(var(--border));
  font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: hsl(var(--muted-foreground)); font-weight: 600;
}
.dark .fa-txns-head { background: hsl(16 18% 12%); }
.fa-txn {
  display: grid; grid-template-columns: 64px 1.4fr 1fr auto;
  align-items: center; gap: 10px;
  padding: 10px 14px; font-size: 13px;
  border-top: 1px solid hsl(var(--border));
  background: hsl(var(--card));
}
.dark .fa-txn { background: hsl(16 18% 14%); }
.fa-txn:first-of-type { border-top: 0; }
.fa-txn-date { font-family: var(--font-mono); font-size: 11px; color: hsl(var(--muted-foreground)); }
.fa-txn-merch { font-weight: 500; }
.fa-txn-amt { font-family: var(--font-mono); font-weight: 600; text-align: right; }
.fa-txn-amt.pos { color: hsl(var(--success)); }

/* ── Conference Contacts demo "app" UI ─────────────────────────────── */
.ca { display: flex; flex-direction: column; gap: 18px; }
.ca-head { display: flex; align-items: flex-end; justify-content: space-between; }
.ca-head h3 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.ca-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 18px;
}
@media (max-width: 760px) { .ca-grid { grid-template-columns: 1fr; } }

.ca-table {
  display: flex; flex-direction: column;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  overflow: hidden;
}
.dark .ca-table { background: hsl(16 18% 14%); border-color: hsl(16 18% 22%); }
.ca-row {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 10px 14px;
  font-size: 12.5px;
  border-top: 1px solid hsl(var(--border));
  align-items: center;
  animation: faRowIn .35s cubic-bezier(0.4,0,0.2,1);
}
.dark .ca-row { border-color: hsl(16 18% 22%); }
.ca-row:first-child { border-top: 0; }
.ca-row.hd {
  background: hsl(var(--muted) / 0.4);
  font-size: 10.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  color: hsl(var(--muted-foreground));
}
.dark .ca-row.hd { background: hsl(16 18% 12%); }
.ca-cell-name { font-weight: 600; color: hsl(var(--foreground)); }
.ca-cell {
  color: hsl(var(--foreground));
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ca-pill {
  display: inline-block;
  font-size: 9.5px; font-weight: 700; letter-spacing: .04em;
  padding: 1.5px 5px; border-radius: 4px;
  margin-right: 4px;
}
.ca-pill.tg { background: hsl(150 60% 48% / 0.18); color: hsl(150 60% 38%); }
.ca-pill.li { background: hsl(150 60% 36% / 0.16); color: hsl(150 60% 36%); }
.dark .ca-pill.tg { color: hsl(150 60% 70%); }
.dark .ca-pill.li { color: hsl(150 60% 70%); }

.ca-mycard {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  color: hsl(var(--foreground));
}
.dark .ca-mycard { background: hsl(16 18% 14%); border-color: hsl(16 18% 22%); }
.ca-mycard-head {
  font-size: 11px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: hsl(var(--muted-foreground));
}
.ca-mycard-body {
  display: grid; grid-template-columns: 110px 1fr; gap: 14px;
  align-items: center;
}
.ca-qr {
  width: 110px; height: 110px;
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border));
  border-radius: 10px;
  padding: 8px;
  color: hsl(var(--foreground));
}
.qr-svg { width: 100%; height: 100%; display: block; }
.ca-me { display: flex; flex-direction: column; gap: 4px; }
.ca-me-name { font-size: 16px; font-weight: 700; letter-spacing: -.005em; }
.ca-me-row {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-family: var(--font-mono);
  color: hsl(var(--foreground));
  margin-top: 2px;
}
.ca-mycard-foot {
  font-size: 11.5px; line-height: 1.4; margin-top: 4px;
}


/* ──────────────────────────────────────────────────────────────────────
   Hero right column — async header above phone + steps row below
   ────────────────────────────────────────────────────────────────────── */
.hero-right {
  display: flex; flex-direction: column;
  align-items: stretch;
  gap: 18px;
  width: 100%;
  max-width: 540px;
  margin-left: auto;
}
.async-header { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.async-header .async-title {
  font-size: 22px; font-weight: 600; letter-spacing: -0.01em;
  line-height: 1.2; margin: 0;
  color: hsl(var(--foreground));
}
.async-header .async-lead {
  font-size: 14px; line-height: 1.5;
  color: hsl(var(--muted-foreground)); margin: 0;
}

/* Phone visual stays as-is, but we ensure it sits inside hero-right cleanly */
.hero-right .phone-frame { margin: 0 auto; }

/* Steps row below phone — horizontal compact strip */
.async-steps-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 6px;
}
.async-steps-row .async-step {
  padding: 8px 10px;
  font-size: 11.5px;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  text-align: left;
}
.async-steps-row .async-step .lbl { font-size: 11.5px; line-height: 1.3; }
.async-steps-row .async-step .ic { width: 20px; height: 20px; }
.async-steps-row .async-step .ic svg { width: 11px; height: 11px; }

@media (max-width: 920px) {
  .hero-right { max-width: 100%; margin-left: 0; }
  .async-steps-row { grid-template-columns: 1fr; }
}

/* Drop the old async-strip dashed border since the strip is gone */
.async-strip { display: none !important; }

/* ──────────────────────────────────────────────────────────────────────
   Marketplace demo: chat-left variant (flip stage <-> chat)
   ────────────────────────────────────────────────────────────────────── */
.demo-board.chat-left {
  grid-template-columns: 1fr 1.5fr;
}
.demo-board.chat-left .demo-stage { order: 2; }
.demo-board.chat-left .demo-side  { order: 1; }
@media (max-width: 980px) {
  .demo-board.chat-left { grid-template-columns: 1fr; }
  .demo-board.chat-left .demo-stage { order: 1; }
  .demo-board.chat-left .demo-side  { order: 2; }
}
