/* Areti dark style override — applies new palette + visual treatment
 * without touching landing content. Loaded last so it wins. */

@import url("https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500;600&display=swap");

/* ─── LIGHT theme (default) — warm cream palette ──────────────────────── */
:root {
  --background: 36 55% 90%;          /* warm cream */
  --card: 38 70% 94%;
  --card-foreground: 20 45% 12%;
  --popover: 38 70% 94%;
  --popover-foreground: 20 45% 12%;

  --foreground: 20 45% 12%;
  --muted: 35 38% 86%;
  --muted-foreground: 25 18% 42%;

  --border: 35 38% 82%;
  --input: 35 30% 76%;
  --ring: 20 49% 29%;

  --primary: 20 49% 29%;             /* #6E4326 */
  --primary-foreground: 36 55% 94%;
  --primary-light: 20 45% 36%;
  --primary-dark: 20 49% 22%;
  --accent: 20 49% 29%;
  --accent-foreground: 36 55% 94%;
  --success: 20 49% 29%;
  --success-foreground: 36 55% 94%;

  --acc-knowledge-blue: 30 50% 40%;
  --acc-indigo: 30 50% 40%;
  --acc-cyan: 30 50% 40%;
  --acc-violet: 30 50% 40%;
  --acc-green: 30 50% 40%;
  --acc-teal: 30 50% 40%;
  --acc-amber: 38 70% 55%;
  --acc-orange: 38 70% 55%;
  --acc-rose: 25 18% 45%;
  --acc-red: 25 18% 45%;
  --acc-purple: 30 50% 40%;

  --shadow-xs: 0 1px 2px 0 hsl(20 30% 20% / 0.06);
  --shadow-sm: 0 1px 3px 0 hsl(20 30% 20% / 0.08), 0 1px 2px -1px hsl(20 30% 20% / 0.06);
  --shadow-md: 0 4px 6px -1px hsl(20 30% 20% / 0.1), 0 2px 4px -2px hsl(20 30% 20% / 0.08);
  --shadow-lg: 0 10px 15px -3px hsl(20 30% 20% / 0.1), 0 4px 6px -4px hsl(20 30% 20% / 0.08);
  --shadow-xl: 0 20px 25px -5px hsl(20 30% 20% / 0.12), 0 8px 10px -6px hsl(20 30% 20% / 0.08);
  --shadow-soft: 0 6px 18px -8px hsl(20 49% 29% / 0.22);
  --shadow-medium: 0 10px 26px -10px hsl(20 49% 29% / 0.3);

  --gradient-primary: linear-gradient(135deg, hsl(20 49% 29%), hsl(20 45% 36%));
  --gradient-hero: linear-gradient(180deg, hsl(38 70% 94%), hsl(36 55% 90%));
  --gradient-subtle: linear-gradient(to bottom, transparent, hsl(20 49% 29% / 0.05));
  --gradient-logo: linear-gradient(to top right, hsl(20 49% 29%), hsl(20 45% 40%));

  --radius: 0.75rem;
  --radius-md: 0.625rem;
  --radius-sm: 0.5rem;

  --font-sans: "Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  --font-display: var(--font-sans);
}

/* ─── DARK theme — warm-brown palette ─────────────────────────────────── */
:root.dark,
.dark {
  /* Surfaces — warm dark brown palette */
  --background: 12 24% 8%;           /* #1A1210 */
  --card: 16 26% 11%;                /* #241915 */
  --card-foreground: 28 40% 90%;
  --popover: 16 26% 11%;
  --popover-foreground: 28 40% 90%;

  /* Text */
  --foreground: 28 40% 90%;          /* warm off-white */
  --muted: 16 18% 16%;
  --muted-foreground: 28 12% 55%;

  /* Borders / inputs */
  --border: 16 18% 18%;
  --input: 16 15% 24%;
  --ring: 30 50% 64%;

  /* Accent — warm tan */
  --primary: 30 50% 64%;             /* #D2A375 */
  --primary-foreground: 20 30% 12%;
  --primary-light: 30 60% 72%;
  --primary-dark: 30 45% 54%;
  --accent: 30 50% 64%;
  --accent-foreground: 20 30% 12%;
  --success: 30 50% 64%;
  --success-foreground: 20 30% 12%;

  /* Re-tint section accents toward green/neutral so the page stays monochrome */
  --acc-knowledge-blue: 30 50% 64%;
  --acc-indigo: 30 50% 64%;
  --acc-cyan: 30 50% 64%;
  --acc-violet: 30 50% 64%;
  --acc-green: 30 50% 64%;
  --acc-teal: 30 50% 64%;
  --acc-amber: 38 80% 65%;
  --acc-orange: 38 80% 65%;
  --acc-rose: 180 5% 62%;
  --acc-red: 180 5% 62%;
  --acc-purple: 30 50% 64%;

  /* Shadows — softer, near-black */
  --shadow-xs: 0 1px 2px 0 hsl(0 0% 0% / 0.5);
  --shadow-sm: 0 1px 3px 0 hsl(0 0% 0% / 0.55), 0 1px 2px -1px hsl(0 0% 0% / 0.5);
  --shadow-md: 0 4px 6px -1px hsl(0 0% 0% / 0.55), 0 2px 4px -2px hsl(0 0% 0% / 0.5);
  --shadow-lg: 0 10px 15px -3px hsl(0 0% 0% / 0.55), 0 4px 6px -4px hsl(0 0% 0% / 0.5);
  --shadow-xl: 0 20px 25px -5px hsl(0 0% 0% / 0.6), 0 8px 10px -6px hsl(0 0% 0% / 0.5);
  --shadow-soft: 0 2px 12px -2px hsl(30 50% 64% / 0.18);
  --shadow-medium: 0 6px 20px -6px hsl(30 50% 64% / 0.28);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, hsl(30 50% 64%), hsl(30 60% 56%));
  --gradient-hero: linear-gradient(180deg, hsl(12 24% 9%), hsl(12 24% 8%));
  --gradient-subtle: linear-gradient(to bottom, transparent, hsl(30 50% 64% / 0.04));
  --gradient-logo: linear-gradient(to top right, hsl(30 50% 64%), hsl(30 60% 72%));

  /* Radii — slightly tighter per spec */
  --radius: 0.75rem;       /* 12px */
  --radius-md: 0.625rem;   /* 10px */
  --radius-sm: 0.5rem;     /* 8px */

  /* Type */
  --font-sans: "Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  --font-display: var(--font-sans);
}

html { color-scheme: light dark; }
html { background: hsl(var(--background)); color: hsl(var(--foreground)); }
html.dark { color-scheme: dark; }

body {
  font-family: var(--font-sans);
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

/* Dot-grid background w/ radial fade from top center + soft accent glow */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(rgba(60, 30, 10, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: 0 0;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 75%);
}
html.dark body::before {
  background-image: radial-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px);
}

body::after {
  content: "";
  position: fixed;
  top: -200px;
  right: -180px;
  width: 720px;
  height: 720px;
  border-radius: 50%;
  background: radial-gradient(circle, oklch(0.74 0.07 65 / 0.12), transparent 60%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}

#root { position: relative; z-index: 1; }

/* Display headings: tighter weight, tighter tracking, tighter leading */
h1, .ds-h1, .hero h1, .hero-copy h1 {
  font-family: var(--font-sans);
  font-weight: 500 !important;
  letter-spacing: -0.04em !important;
  line-height: 0.98 !important;
}
h2, h3, .ds-h2, .ds-h3 {
  font-weight: 500 !important;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

/* Eyebrow / labels — mono, uppercase, green dot */
.eyebrow, .ds-eyebrow {
  font-family: var(--font-mono) !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  text-transform: uppercase;
  letter-spacing: 0.08em !important;
  color: hsl(var(--muted-foreground)) !important;
  border-radius: 999px !important;
  border: 1px solid hsl(var(--border)) !important;
  background: hsl(var(--card) / 0.6) !important;
}
.eyebrow .dot {
  background: oklch(0.74 0.07 65) !important;
  box-shadow: 0 0 0 4px oklch(0.74 0.07 65 / 0.12);
  animation: areti-pulse 2.4s ease-in-out infinite;
}
@keyframes areti-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.45; }
}

/* Nav — sticky, blurred, bottom border */
.nav {
  background: hsl(var(--background) / 0.6) !important;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid hsl(var(--border));
  box-shadow: none !important;
}

/* Buttons */
.btn { font-family: var(--font-sans); transition: all 160ms cubic-bezier(0.4, 0, 0.2, 1); }
.btn-primary {
  background: hsl(var(--primary)) !important;
  color: hsl(var(--primary-foreground)) !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  box-shadow: 0 1px 0 hsl(0 0% 100% / 0.08) inset, 0 6px 20px -8px hsl(var(--primary) / 0.5);
}
.btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-0.5px);
  box-shadow: 0 1px 0 hsl(0 0% 100% / 0.12) inset, 0 10px 24px -10px hsl(var(--primary) / 0.6);
}
.btn-outline {
  background: hsl(var(--card)) !important;
  border: 1px solid hsl(var(--input)) !important;
  color: hsl(var(--foreground)) !important;
  border-radius: 8px !important;
}
.btn-outline:hover {
  background: hsl(var(--muted)) !important;
  border-color: hsl(var(--input)) !important;
}
.btn-ghost { color: hsl(var(--muted-foreground)); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.04); color: hsl(var(--foreground)); }

/* Generic card treatment — shine + hover lift */
.card,
.cta-card,
.feature-card,
.section-card,
[class*="-card"] {
  background: hsl(var(--card)) !important;
  border: 1px solid hsl(var(--border)) !important;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1),
              border-color 200ms cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 200ms cubic-bezier(0.4, 0, 0.2, 1);
}
.card::before,
.cta-card::before,
.feature-card::before,
.section-card::before,
[class*="-card"]::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), transparent 40%);
}
.card:hover,
.feature-card:hover,
.section-card:hover,
[class*="-card"]:hover {
  transform: translateY(-3px);
  border-color: hsl(var(--input)) !important;
}

/* Chips */
.chip {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid hsl(var(--border)) !important;
  color: hsl(var(--muted-foreground)) !important;
  border-radius: 999px;
}
.chip.active {
  background: oklch(0.74 0.07 65 / 0.12) !important;
  border-color: oklch(0.74 0.07 65 / 0.4) !important;
  color: oklch(0.88 0.05 65) !important;
}

/* Inputs / sliders */
input[type="range"] { accent-color: oklch(0.74 0.07 65); }
input[type="text"], input[type="email"], textarea, select {
  background: hsl(var(--card)) !important;
  border: 1px solid hsl(var(--input)) !important;
  color: hsl(var(--foreground)) !important;
}
input::placeholder, textarea::placeholder { color: hsl(var(--muted-foreground)); }

/* Code / terminal blocks */
code, pre, .mono, .code, [class*="terminal"], [class*="code-block"] {
  font-family: var(--font-mono) !important;
}
pre, .code-block, [class*="terminal"] {
  background: hsl(var(--card)) !important;
  border: 1px solid hsl(var(--border));
  border-radius: 10px;
}

/* Generous section spacing */
section, .section {
  padding-top: 120px;
  padding-bottom: 120px;
}
section > header,
.section > header {
  margin-bottom: 60px;
}

/* Section labels (small uppercase mono in green) */
.section-label, .kicker, .ds-eyebrow.accent {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: oklch(0.74 0.07 65);
}

/* Status dots / check icons → green */
.hero-meta-item svg,
.cta-checks .item svg {
  color: oklch(0.74 0.07 65) !important;
}

/* Soft accent glow utility */
.accent-glow {
  background: radial-gradient(circle, oklch(0.74 0.07 65 / 0.12), transparent 60%);
  filter: blur(40px);
}

/* Hero: hide the top eyebrow badge and vertically center the copy
 * within the first viewport. Right-column graphic flows below. */
.hero { padding-top: 0 !important; padding-bottom: 0 !important; }
.hero-copy,
.hero-right {
  min-height: calc(100vh - 72px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-copy > .eyebrow:first-child { display: none !important; }
/* Hide all section eyebrow badges */
.eyebrow { display: none !important; }
.hero .h-display { white-space: pre-line; }
.hero-right .async-header { display: none !important; }

/* Stack the three step-cards vertically to the right of the phone,
 * prefixed with 1/2/3. */
.hero-right { position: relative; overflow: visible; }
/* Shift the phone left a bit so step cards never overlap it */

.hero-right .phone-frame { transform: translateX(-110px); }
.hero-right .async-steps-row {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  display: flex !important;
  flex-direction: column;
  gap: 14px;
  width: 160px;
  z-index: 3;
  counter-reset: step;
}
.hero-right .async-steps-row .async-step {
  counter-increment: step;
  background: hsl(var(--card)) !important;
  border: 1px solid hsl(var(--border)) !important;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  transition: border-color 200ms ease, transform 200ms ease;
}
.hero-right .async-steps-row .async-step::before {
  content: counter(step);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: oklch(0.74 0.07 65 / 0.14);
  color: oklch(0.88 0.05 65);
  border: 1px solid oklch(0.74 0.07 65 / 0.4);
  flex-shrink: 0;
  transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease;
}
.hero-right .async-steps-row .async-step.on::before {
  background: oklch(0.74 0.07 65);
  color: oklch(0.22 0.04 50);
  border-color: oklch(0.74 0.07 65);
}
.hero-right .async-steps-row .async-step .ic { display: none !important; }
.hero-right .async-steps-row .async-step .lbl {
  font-size: 12.5px;
  line-height: 1.35;
}
.hero-right .async-steps-row .async-step:hover {
  border-color: oklch(0.74 0.07 65 / 0.5) !important;
  transform: translateX(-2px);
}

@media (max-width: 1100px) {
  .hero-right .async-steps-row {
    position: static;
    transform: none;
    width: 100%;
    margin-top: 16px;
  }
}

/* Hide the old triangle mark in the CTA card (we use the potato logo elsewhere) */
.cta-card .lockup .mark { display: none !important; }

/* ─── Marketplace preview-mode: split layout (copy left, cards right) ──── */
.market-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 64px;
  align-items: start;
}
.market-split-copy { position: sticky; top: 100px; }
.market-split-copy .eyebrow { margin-bottom: 14px; }
.market-split-copy .h-section { margin-bottom: 18px; }
.market-split-copy .lead { max-width: 460px; }

.market-example-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.mk-example {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .15s, transform .15s;
}
.mk-example:hover {
  border-color: hsl(var(--primary) / 0.35);
  transform: translateY(-2px);
}
.mk-example-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.mk-example-icon {
  width: 36px; height: 36px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
}
.mk-example-icon svg { width: 18px; height: 18px; }
.mk-example-tag {
  font-size: 10px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: hsl(var(--muted-foreground));
}
.mk-example-title {
  font-size: 16px; font-weight: 600; color: hsl(var(--foreground));
  line-height: 1.25;
}
.mk-example-desc {
  font-size: 13px; line-height: 1.5;
  color: hsl(var(--muted-foreground));
}

/* Stack on tablet / mobile */
@media (max-width: 920px) {
  .market-split {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .market-split-copy { position: static; }
}
@media (max-width: 560px) {
  .market-example-grid { grid-template-columns: 1fr; }
}

/* Marketplace category buttons — match site palette (was browser-default gray) */
.mk-side .side-cat {
  background: transparent !important;
  font-family: inherit;
}
.mk-side .side-cat:hover {
  background: hsl(var(--muted) / 0.6) !important;
}
.mk-side .side-cat.on {
  background: hsl(var(--primary) / 0.1) !important;
  border-color: hsl(var(--primary) / 0.25) !important;
  color: hsl(var(--primary)) !important;
}

/* Reduce large section padding on mobile */
@media (max-width: 760px) {
  .section { padding-top: 60px !important; padding-bottom: 60px !important; }
}

/* ─── Mobile/tablet hero adjustments ─────────────────────────────────── */
@media (max-width: 900px) {
  /* Drop the 100vh min-height so sections don't have huge gaps */
  .hero-copy,
  .hero-right {
    min-height: 0;
    justify-content: flex-start;
  }
  .hero-copy { padding-top: 40px; padding-bottom: 24px; }

  /* Don't push the phone off-canvas on mobile — center it */
  .hero-right { display: flex; align-items: center; }
  .hero-right .phone-frame {
    transform: none !important;
    margin: 0 auto;
  }

  /* Step cards: full-width stack below the phone */
  .hero-right .async-steps-row {
    width: 100%;
    max-width: 360px;
    margin: 20px auto 0;
    align-items: stretch;
  }
  .hero-right .async-steps-row .async-step {
    flex-direction: row;
    align-items: center;
    width: 100%;
  }
}

/* Compact navbar on tablet/mobile — drop section links, keep brand + mode + CTA */
@media (max-width: 900px) {
  .nav-inner .nav-links { display: none !important; }
}
@media (max-width: 640px) {
  /* Hide language picker + Sign in on phone; keep brand, mode toggle, Get started */
  .nav-cta > :not(:last-child) { display: none !important; }
  .nav-inner {
    gap: 6px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
  /* Compact mode toggle: tighter padding so it doesn't push the CTA off-screen */
  .mode-toggle { padding: 3px !important; gap: 2px !important; }
  .mode-toggle button,
  .mode-toggle .seg,
  .mode-toggle [role="button"] { padding: 4px 8px !important; font-size: 12px !important; }
  .mode-toggle svg { width: 14px !important; height: 14px !important; }
  .nav .brand-name { font-size: 15px; }
  .nav .brand-mark, .nav .brand-mark img { width: 30px !important; height: 30px !important; }
  .nav-cta .btn {
    padding: 6px 10px !important;
    font-size: 12.5px !important;
    white-space: nowrap;
    min-height: 0 !important;
  }
}
@media (max-width: 420px) {
  /* On smallest phones, hide brand text — just the potato logo */
  .nav .brand-name { display: none !important; }
}

/* Market rail on mobile: search full-width top, chips compact 1-2 rows below */
@media (max-width: 760px) {
  .market-rail {
    flex-wrap: wrap !important;
    height: auto !important;
    gap: 6px !important;
    padding: 10px 14px !important;
  }
  /* Search bar — full first row */
  .market-rail .rail-search {
    flex: 0 0 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  /* Chips — compact, wrap naturally in remaining rows */
  .market-rail .chip,
  .market-rail a.chip {
    flex-shrink: 0 !important;
    padding: 5px 12px !important;
    font-size: 12px !important;
  }
  /* Trending: remove push-right so it wraps inline with other chips */
  .market-rail a[style*="margin-left"] {
    margin-left: 0 !important;
  }
}

/* Assistant demo on mobile: side-by-side like desktop, horizontal scroll */
@media (max-width: 920px) {
  /* Wrap panel in scroll context */
  .demo-panel {
    grid-template-columns: 360px 400px !important;
    min-width: 760px !important;
    overflow-x: visible !important;
  }
  /* Make the container scrollable */
  .demo-panel {
    /* overflow handled by parent */
  }
  /* Scroll wrapper — target the container holding demo-panel */
  section:has(.demo-panel) .container,
  .section:has(.demo-panel) .container {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  section:has(.demo-panel) .container::-webkit-scrollbar { display: none; }
}

/* Comparison table on mobile: horizontal scroll with visible header + sticky first column */
@media (max-width: 760px) {
  .cmp-table {
    grid-template-columns: 160px repeat(4, 100px) !important;
    overflow-x: auto;
    max-width: 100%;
    display: grid !important;
    position: relative;
  }
  /* Re-enable header cells (they're hidden by default at this breakpoint) */
  .cmp-table .cmp-cell.head {
    display: flex !important;
    padding: 12px 14px !important;
    font-size: 11px !important;
    background: hsl(var(--muted) / 0.5) !important;
  }
  /* Sticky first column — left edge (feature labels stay visible on horizontal swipe) */
  .cmp-table .cmp-cell.row-h,
  .cmp-table .cmp-cell.head:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: hsl(var(--card));
    border-right: 1px solid hsl(var(--border));
  }
  .cmp-table .cmp-cell.head:first-child {
    background: hsl(var(--muted) / 0.85) !important;
    z-index: 3;
  }
}

/* Avoid horizontal overflow on small screens */
@media (max-width: 640px) {
  /* Clip overflow on sections, not body — so internal scroll containers still work */
  .section, .hero, header.nav { max-width: 100%; overflow-x: clip; }
  .hero .h-display,
  .hero h1,
  .hero-copy h1 {
    font-size: clamp(34px, 9vw, 56px) !important;
    line-height: 1.05 !important;
    word-wrap: break-word;
    overflow-wrap: anywhere;
  }
  .hero-copy { padding-left: 0; padding-right: 0; }
}

/* Tinted sections → match base background; separate with hairline rule */
.section-tinted,
.dark .section-tinted {
  background: transparent !important;
  border-top: 1px solid hsl(var(--border));
  border-bottom: 1px solid hsl(var(--border));
}

/* Ecosystems section — hairline divider above */
#ecosystems {
  border-top: 1px solid hsl(var(--border));
}

/* On mobile, stack the eco-board nodes vertically instead of absolute-positioning */
@media (max-width: 700px) {
  #ecosystems .eco-board { height: auto !important; min-height: 0 !important; }
  #ecosystems .eco-positions { min-height: 0 !important; }
  #ecosystems .eco-positions {
    display: flex !important;
    flex-direction: column;
    gap: 14px;
    height: auto !important;
    position: relative !important;
  }
  #ecosystems .eco-positions > * {
    position: static !important;
    transform: none !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  /* Hide the connecting rails/SVG lines — they don't match the stacked layout */
  #ecosystems .eco-rails,
  #ecosystems .eco-board svg { display: none !important; }
}

/* Remove built-in line-grid backgrounds — we use the dot grid only */
.hero-grid,
.eco-grid-bg,
.cta-card .grid-bg {
  display: none !important;
}

/* Replace hard-coded near-white panels in the assistant demo with theme card */
.demo-chat,
.demo-preview-tabs,
.habit-row.hd {
  background: hsl(var(--card)) !important;
}

/* Habit-tracker demo: align tabs + table header with dark theme */
.demo-preview-tabs,
.dark .demo-preview-tabs {
  background: hsl(var(--card)) !important;
  border-bottom: 1px solid hsl(var(--border)) !important;
}
.demo-preview-tabs .pt {
  background: transparent !important;
  border: 1px solid transparent !important;
  color: hsl(var(--muted-foreground)) !important;
}
.demo-preview-tabs .pt:hover:not(.active) {
  background: rgba(255, 255, 255, 0.04) !important;
  color: hsl(var(--foreground)) !important;
}
.demo-preview-tabs .pt.active {
  background: oklch(0.74 0.07 65 / 0.14) !important;
  border-color: oklch(0.74 0.07 65 / 0.4) !important;
  color: oklch(0.88 0.05 65) !important;
}

/* Habit table header row — was white, make it match the card */
.habit-row.hd,
.dark .habit-row.hd {
  background: hsl(var(--card)) !important;
  border-bottom: 1px solid hsl(var(--border));
}
.habit-row.hd .day,
.habit-row.hd .name {
  color: hsl(var(--muted-foreground)) !important;
}

/* Selection */
::selection {
  background: oklch(0.74 0.07 65 / 0.35);
  color: hsl(var(--foreground));
}
