/* ==================================================================
   Promptly showcase site — design system.
   Tokens mirror the app's frontend/src/index.css exactly, so the
   site reads as a native extension of the product.
   ================================================================== */

:root {
  --bg: #FAF9F7;
  --surface: #FFFFFF;
  --border: rgba(122, 105, 95, 0.16);
  --border-strong: rgba(122, 105, 95, 0.28);
  --text: #1A1A19;
  --text-muted: #6B7280;
  --text-faint: #9CA3AF;
  --accent: #D97757;
  --accent-hover: #C2613E;
  --accent-soft: rgba(217, 119, 87, 0.10);
  --accent-softer: rgba(217, 119, 87, 0.055);
  --surface-1: #F2F0EC;
  --surface-2: #EBE8E3;
  --hover: rgba(0, 0, 0, 0.04);
  --danger: #DC2626;
  --warning: #B45309;
  --success: #059669;
  --success-bg: rgba(16, 185, 129, 0.12);
  --radius-card: 0.75rem;
  --radius-input: 1.5rem;
  --shadow-sm: 0 1px 2px rgba(26, 26, 25, 0.05);
  --shadow-md: 0 4px 16px -2px rgba(26, 26, 25, 0.08), 0 2px 4px rgba(26, 26, 25, 0.04);
  --shadow-lg: 0 24px 60px -12px rgba(26, 26, 25, 0.18), 0 8px 24px -8px rgba(26, 26, 25, 0.10);
  --shadow-window: 0 40px 90px -20px rgba(120, 63, 40, 0.25), 0 12px 32px -8px rgba(26, 26, 25, 0.12);
  --code-bg: #0b0f14;
  --nav-bg: rgba(250, 249, 247, 0.82);
  --hero-glow-1: rgba(217, 119, 87, 0.16);
  --hero-glow-2: rgba(247, 184, 1, 0.07);
  --mark: rgba(247, 184, 1, 0.35);
}

html.dark {
  --bg: #1C1917;
  --surface: #27231E;
  --border: rgba(168, 148, 132, 0.18);
  --border-strong: rgba(168, 148, 132, 0.32);
  --text: #F5F5F4;
  --text-muted: #A8A29E;
  --text-faint: #78716C;
  --accent-hover: #E08A6E;
  --accent-soft: rgba(217, 119, 87, 0.14);
  --accent-softer: rgba(217, 119, 87, 0.07);
  --surface-1: #2E2A24;
  --surface-2: #36312A;
  --hover: rgba(255, 255, 255, 0.06);
  --danger: #F87171;
  --warning: #FBBF24;
  --success: #34D399;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px -2px rgba(0, 0, 0, 0.35), 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 24px 60px -12px rgba(0, 0, 0, 0.55), 0 8px 24px -8px rgba(0, 0, 0, 0.35);
  --shadow-window: 0 40px 90px -20px rgba(0, 0, 0, 0.6), 0 12px 32px -8px rgba(0, 0, 0, 0.4);
  --nav-bg: rgba(28, 25, 23, 0.82);
  --hero-glow-1: rgba(217, 119, 87, 0.12);
  --hero-glow-2: rgba(247, 184, 1, 0.045);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.25s ease, color 0.25s ease;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button {
  font-family: inherit;
  font-size: inherit;
  border: none;
  background: none;
  color: inherit;
  cursor: pointer;
  padding: 0;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; }
p { margin: 0; }
::selection { background: rgba(217, 119, 87, 0.28); }

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.container {
  width: min(1160px, calc(100% - 3rem));
  margin-inline: auto;
}

/* Anchored sections must clear the 64px fixed nav when jumped to. */
[id] { scroll-margin-top: 84px; }
@media (max-width: 640px) {
  .container { width: calc(100% - 2.25rem); }
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }

/* ---------- Nav ---------- */
.site-nav {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: var(--nav-bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}
.site-nav.is-scrolled { border-bottom-color: var(--border); }
.site-nav__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 64px;
}
.site-nav__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}
.site-nav__brand img { width: 28px; height: 28px; border-radius: 7px; }
.site-nav__links {
  display: flex;
  gap: 0.25rem;
  margin-inline: auto;
}
.site-nav__links a {
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s ease, background-color 0.15s ease;
}
.site-nav__links a:hover { color: var(--text); background: var(--hover); }
.site-nav__links a.is-current { color: var(--accent); background: var(--accent-softer); }
.site-nav__actions { display: flex; align-items: center; gap: 0.6rem; margin-left: auto; }
@media (max-width: 860px) {
  .site-nav__links { display: none; }
}

.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: color 0.15s ease, background-color 0.15s ease;
}
.theme-toggle:hover { color: var(--text); background: var(--hover); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
html.dark .theme-toggle .icon-sun { display: block; }
/* Sponsor heart — accent-tinted so it reads as "support" not just another icon. */
.theme-toggle--sponsor { color: var(--accent); border-color: rgba(217, 119, 87, 0.28); }
.theme-toggle--sponsor:hover { color: var(--accent-hover); background: var(--accent-soft); }
html.dark .theme-toggle .icon-moon { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 999px;
  padding: 0.65rem 1.4rem;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 20px -6px rgba(217, 119, 87, 0.55);
}
.btn--primary:hover { background: var(--accent-hover); box-shadow: 0 8px 26px -6px rgba(217, 119, 87, 0.65); }
.btn--ghost {
  border: 1px solid var(--border-strong);
  color: var(--text);
  background: var(--surface);
}
.btn--ghost:hover { background: var(--surface-1); }
.btn--lg { padding: 0.85rem 1.8rem; font-size: 1.02rem; }
.btn--sm { padding: 0.45rem 1rem; font-size: 0.85rem; }
.btn svg { width: 1.05em; height: 1.05em; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 10.5rem 0 5.5rem;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto;
  height: 120%;
  background:
    radial-gradient(42% 55% at 28% 38%, var(--hero-glow-1), transparent 70%),
    radial-gradient(38% 50% at 72% 30%, var(--hero-glow-2), transparent 70%);
  pointer-events: none;
}
.hero__inner { position: relative; text-align: center; }
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(217, 119, 87, 0.25);
  border-radius: 999px;
  padding: 0.35rem 0.95rem;
  margin-bottom: 1.5rem;
}
.hero__badge .dot {
  width: 7px; height: 7px; border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 3px var(--success-bg);
}
.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  letter-spacing: -0.03em;
  max-width: 17ch;
  margin-inline: auto;
}
.hero h1 .accent-word {
  color: var(--accent);
  position: relative;
  white-space: nowrap;
}
.hero h1 .accent-word svg {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.18em;
  width: 100%;
  height: 0.28em;
  overflow: visible;
}
.hero h1 .accent-word svg path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 6;
  stroke-linecap: round;
  opacity: 0.45;
}
.hero__sub {
  max-width: 62ch;
  margin: 1.5rem auto 0;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--text-muted);
}
.hero__cta {
  display: flex;
  justify-content: center;
  gap: 0.9rem;
  margin-top: 2.25rem;
  flex-wrap: wrap;
}
.hero__meta {
  margin-top: 1.4rem;
  font-size: 0.85rem;
  color: var(--text-faint);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
}
.hero__meta span { display: inline-flex; align-items: center; gap: 0.4rem; }
.hero__meta svg { width: 15px; height: 15px; color: var(--success); }

/* ---------- App window chrome (shared by all demos) ---------- */
.window {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow-window);
  overflow: hidden;
  text-align: left;
}
.window__bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-1);
}
.window__dots { display: flex; gap: 6px; }
.window__dots i {
  width: 11px; height: 11px; border-radius: 999px; display: block;
}
.window__dots i:nth-child(1) { background: #F87171; }
.window__dots i:nth-child(2) { background: #FBBF24; }
.window__dots i:nth-child(3) { background: #34D399; }
.window__title {
  margin-inline: auto;
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transform: translateX(-14px); /* optically centre vs the dots */
}
.window__title img { width: 14px; height: 14px; border-radius: 3.5px; }

/* ---------- Hero demo: full app mock ---------- */
.hero__demo {
  position: relative;
  margin-top: 4rem;
}
.hero__demo .window { max-width: 1060px; margin-inline: auto; }
.appmock {
  display: grid;
  grid-template-columns: 232px 1fr;
  /* Fixed height, not min-height: streaming replies must clip inside the
     window (anchored to the input bar) instead of stretching the page. */
  height: 540px;
  font-size: 0.85rem;
}
.appmock__side {
  border-right: 1px solid var(--border);
  background: var(--bg);
  padding: 0.9rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.appmock__newchat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  margin-bottom: 0.8rem;
  font-size: 0.83rem;
}
.appmock__navitem {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.42rem 0.65rem;
  border-radius: 0.55rem;
  color: var(--text-muted);
  font-weight: 500;
}
.appmock__navitem svg { width: 16px; height: 16px; flex: none; }
.appmock__navitem.is-active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.appmock__section {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  padding: 0.9rem 0.65rem 0.3rem;
  font-weight: 600;
}
.appmock__convo {
  padding: 0.4rem 0.65rem;
  border-radius: 0.55rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.appmock__convo.is-active { background: var(--surface-2); color: var(--text); }

.appmock__main {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  min-width: 0;
  /* Grid items default to min-height:auto — without this, overflowing chat
     content grows the row past the fixed 540px window and pushes the input
     bar out of view instead of clipping at the top of the feed. */
  min-height: 0;
}
.appmock__chat {
  flex: 1;
  padding: 1.4rem 1.6rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow: hidden;
  justify-content: flex-end;
}
.bubble {
  max-width: 78%;
  border-radius: 1rem;
  padding: 0.7rem 1rem;
  line-height: 1.55;
}
.bubble--user {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 0.3rem;
}
.bubble--ai {
  align-self: flex-start;
  background: var(--surface-1);
  border-bottom-left-radius: 0.3rem;
}
.bubble--ai .model-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-faint);
  margin-bottom: 0.35rem;
  text-transform: none;
}
.bubble--ai .model-tag i {
  width: 6px; height: 6px; border-radius: 999px; background: var(--accent); display: inline-block;
}
.bubble--ai pre {
  margin: 0.5rem 0 0.2rem;
  background: var(--code-bg);
  color: #e6e6e6;
  border-radius: 0.55rem;
  padding: 0.65rem 0.8rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.74rem;
  line-height: 1.6;
  overflow-x: auto;
}
.bubble--ai pre .tok-kw { color: #c678dd; }
.bubble--ai pre .tok-fn { color: #61afef; }
.bubble--ai pre .tok-str { color: #98c379; }
.bubble--ai pre .tok-cm { color: #5c6370; font-style: italic; }
.typing-caret {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--accent);
  vertical-align: text-bottom;
  margin-left: 1px;
  animation: caret-blink 0.9s steps(1) infinite;
}
@keyframes caret-blink { 50% { opacity: 0; } }

.thinking-dots { display: inline-flex; gap: 4px; padding: 0.2rem 0; }
.thinking-dots span {
  width: 6px; height: 6px; border-radius: 999px; background: var(--text-muted);
  animation: thinking-bounce 1.1s infinite ease-in-out both;
}
.thinking-dots span:nth-child(2) { animation-delay: 0.15s; }
.thinking-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes thinking-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.35; }
  40% { transform: translateY(-3px); opacity: 1; }
}

.appmock__inputwrap { padding: 0.9rem 1.6rem 1.2rem; }
.appmock__input {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-input);
  padding: 0.6rem 0.7rem 0.6rem 1.1rem;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.appmock__input .hint { color: var(--text-faint); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appmock__input .chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface-1);
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  flex: none;
}
.appmock__input .chip svg { width: 12px; height: 12px; }
.appmock__send {
  width: 32px; height: 32px; flex: none;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
}
.appmock__send svg { width: 15px; height: 15px; }

/* Collapse the mock sidebar on narrow screens. Must come AFTER the
   .appmock__side base rule — same specificity, so source order decides. */
@media (max-width: 900px) {
  .appmock { grid-template-columns: 1fr; }
  .appmock__side { display: none; }
}

/* ---------- Section scaffolding ---------- */
.section { padding: 5.5rem 0; position: relative; }
.section--alt { background: var(--surface); border-block: 1px solid var(--border); }
html.dark .section--alt { background: rgba(39, 35, 30, 0.5); }
.section__head { max-width: 640px; margin-bottom: 3rem; }
.section__head--center { margin-inline: auto; text-align: center; }
.section__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.9rem;
}
.section__eyebrow svg { width: 15px; height: 15px; }
.section__head h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  letter-spacing: -0.025em;
}
.section__head p {
  margin-top: 0.9rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ---------- Feature grid ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}
@media (max-width: 960px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .feature-grid { grid-template-columns: 1fr; } }
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.feature-card__icon {
  width: 42px; height: 42px;
  border-radius: 0.65rem;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 1rem;
}
.feature-card__icon svg { width: 21px; height: 21px; }
.feature-card h3 { font-size: 1.05rem; margin-bottom: 0.45rem; letter-spacing: -0.01em; }
.feature-card p { font-size: 0.92rem; color: var(--text-muted); }

/* ---------- Parallel-agents spotlight (features section) ---------- */
.agents-spotlight {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
  margin-bottom: 3.5rem;
}
@media (max-width: 900px) {
  .agents-spotlight { grid-template-columns: 1fr; }
}
.pill-new {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  padding: 0.22rem 0.7rem;
  margin-bottom: 0.9rem;
}
.agents-spotlight__copy h3 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  letter-spacing: -0.02em;
}
.agents-spotlight__copy > p {
  margin-top: 0.8rem;
  color: var(--text-muted);
  font-size: 0.98rem;
}
.agents-spotlight__copy code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.85em;
  background: var(--surface-1);
  border-radius: 0.3rem;
  padding: 0.1rem 0.35rem;
}

.agents-demo {
  padding: 1rem 1.2rem 1.2rem;
  display: grid;
  gap: 0.7rem;
  font-size: 0.8rem;
}
.agents-demo__head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-muted);
  padding-bottom: 0.2rem;
}
.chip-tool {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(217, 119, 87, 0.25);
  border-radius: 0.4rem;
  padding: 0.18rem 0.55rem;
}
.agent-lane {
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  background: var(--surface-1);
  padding: 0.6rem 0.8rem 0.7rem;
  display: grid;
  gap: 0.45rem;
}
.agent-lane__top {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}
.agent-lane__name {
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--accent);
  flex: none;
}
.agent-lane__task {
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.agent-lane__state { margin-left: auto; flex: none; display: inline-flex; }
.agent-lane__state svg { width: 14px; height: 14px; }
.agent-lane__bar {
  height: 4px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}
.agent-lane__bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--accent);
}
.agent-lane__meta {
  font-size: 0.7rem;
  color: var(--text-faint);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  min-height: 1.1em;
}
.agents-demo__result {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  color: var(--success);
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.agents-demo__result.is-shown { opacity: 1; }
.agents-demo__result svg { width: 14px; height: 14px; flex: none; }

/* ---------- Split feature rows ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.split--flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.split--flip .split__copy { order: 2; }
.split--flip .split__demo { order: 1; }
@media (max-width: 900px) {
  .split, .split--flip { grid-template-columns: 1fr; }
  .split--flip .split__copy { order: 1; }
  .split--flip .split__demo { order: 2; }
}
/* Grid items default to min-width:auto, so a fixed-width child (the 940px
   flow canvas) would stretch the whole column past the viewport. */
.split__copy, .split__demo { min-width: 0; }
.split__copy h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); letter-spacing: -0.025em; }
.split__copy > p { margin-top: 0.9rem; color: var(--text-muted); font-size: 1.02rem; }
.split__list { list-style: none; margin: 1.6rem 0 0; padding: 0; display: grid; gap: 0.85rem; }
.split__list li { display: flex; gap: 0.7rem; font-size: 0.95rem; }
.split__list li svg { width: 19px; height: 19px; flex: none; color: var(--accent); margin-top: 2px; }
.split__list li strong { font-weight: 600; }
.split__list li span { color: var(--text-muted); }
.split__demo .window { box-shadow: var(--shadow-lg); }

/* ---------- Workspace demo tabs ---------- */
.ws-tabs {
  display: flex;
  gap: 0.3rem;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-1);
  overflow-x: auto;
  scrollbar-width: none;
}
.ws-tabs::-webkit-scrollbar { display: none; }
.ws-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.ws-tab svg { width: 14px; height: 14px; }
.ws-tab:hover { background: var(--hover); color: var(--text); }
.ws-tab.is-active { background: var(--accent); color: #fff; }
.ws-pane { display: none; min-height: 380px; }
.ws-pane.is-active { display: block; animation: pane-in 0.3s ease; }
@keyframes pane-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* Notes pane */
.ws-note { padding: 1.5rem 1.9rem; max-width: 620px; }
.ws-note__title { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; margin-bottom: 0.7rem; }
.ws-note p { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 0.6rem; }
.ws-note .tasklist { list-style: none; margin: 0.7rem 0 0; padding: 0; display: grid; gap: 0.45rem; }
.ws-note .tasklist li { display: flex; align-items: center; gap: 0.6rem; font-size: 0.88rem; }
.ws-note .tasklist input { accent-color: var(--accent); width: 15px; height: 15px; }
.ws-note .tasklist li.done span { text-decoration: line-through; color: var(--text-faint); }
.ws-note .note-callout {
  border-left: 3px solid var(--accent);
  background: var(--accent-softer);
  border-radius: 0 0.5rem 0.5rem 0;
  padding: 0.6rem 0.9rem;
  font-size: 0.85rem;
  margin-top: 0.9rem;
}

/* Canvas pane — fixed-width stage inside a scroll wrapper so the
   stickies/shapes never clip invisibly on narrow viewports. */
.ws-canvas__scroll { overflow-x: auto; }
.ws-canvas {
  position: relative;
  min-width: 800px;
  height: 380px;
  background:
    radial-gradient(var(--border) 1px, transparent 1px);
  background-size: 22px 22px;
  overflow: hidden;
}
.ws-canvas .sticky {
  position: absolute;
  width: 138px;
  padding: 0.7rem 0.8rem;
  border-radius: 0.4rem;
  font-size: 0.75rem;
  line-height: 1.45;
  box-shadow: var(--shadow-md);
  transform: rotate(-2deg);
  color: #3d3320;
}
.ws-canvas .sticky.s2 { transform: rotate(1.5deg); }
.ws-canvas .sticky.s3 { transform: rotate(-1deg); }
.ws-canvas .shape {
  position: absolute;
  border: 2px solid var(--accent);
  border-radius: 0.6rem;
  background: var(--accent-softer);
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  padding: 0.4rem 0.8rem;
}
.ws-canvas svg.connector {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.ws-canvas svg.connector path {
  fill: none;
  stroke: var(--text-muted);
  stroke-width: 1.6;
  stroke-dasharray: 5 5;
  opacity: 0.65;
}

/* Board pane */
.ws-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  padding: 1.1rem;
  min-height: 380px;
  align-items: start;
}
@media (max-width: 640px) { .ws-board { grid-template-columns: 1fr; min-height: 0; } }
.ws-col {
  background: var(--surface-1);
  border-radius: 0.7rem;
  padding: 0.7rem;
}
.ws-col__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.15rem 0.3rem 0.6rem;
}
.ws-col__head i { width: 8px; height: 8px; border-radius: 999px; display: block; }
.ws-col__head .count {
  margin-left: auto;
  font-weight: 600;
  color: var(--text-faint);
  font-size: 0.72rem;
}
.ws-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  padding: 0.6rem 0.7rem;
  font-size: 0.8rem;
  margin-bottom: 0.55rem;
  cursor: grab;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ws-card:last-child { margin-bottom: 0; }
.ws-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.ws-card.is-dragging { opacity: 0.45; transform: rotate(2.5deg) scale(1.02); cursor: grabbing; }
.ws-card .tags { display: flex; gap: 0.3rem; margin-top: 0.45rem; flex-wrap: wrap; }
.ws-card .tag {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
}
.ws-col.drag-over { outline: 2px dashed var(--accent); outline-offset: -4px; }

/* Roster pane — drag a teammate onto a day → a default 9–5 shift */
.ws-roster { padding: 1.1rem; min-height: 380px; }
.ws-roster__people {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-bottom: 0.9rem;
  margin-bottom: 0.9rem;
  border-bottom: 1px solid var(--border);
}
.rst-people__lbl {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  margin-right: 0.1rem;
}
.rst-person {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.6rem 0.28rem 0.3rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: grab;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.rst-person:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--pc) 55%, var(--border)); }
.rst-person.is-dragging { opacity: 0.45; transform: rotate(2deg) scale(1.03); cursor: grabbing; }
.rst-av {
  width: 22px; height: 22px; border-radius: 999px; flex: none;
  display: grid; place-items: center;
  color: #fff; font-size: 0.68rem; font-weight: 700;
}
.rst-av.sm { width: 18px; height: 18px; font-size: 0.6rem; }
.rst-hint {
  display: inline-flex; align-items: center; gap: 0.3rem;
  margin-left: auto;
  font-size: 0.72rem; color: var(--text-faint);
}
.rst-hint svg { width: 13px; height: 13px; }
.ws-roster__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.6rem;
  align-items: start;
}
@media (max-width: 640px) {
  .ws-roster__grid { grid-template-columns: repeat(2, 1fr); }
  .ws-roster { min-height: 0; }
}
.rst-day {
  background: var(--surface-1);
  border: 1px solid transparent;
  border-radius: 0.7rem;
  padding: 0.55rem;
  min-height: 130px;
  transition: outline 0.12s ease, background 0.12s ease;
}
.rst-day.is-today { background: color-mix(in srgb, var(--accent) 7%, var(--surface-1)); }
.rst-day__head {
  display: flex; align-items: baseline; gap: 0.35rem;
  font-size: 0.72rem; font-weight: 700;
  padding: 0.1rem 0.2rem 0.55rem;
  color: var(--text-muted);
}
.rst-day__head span { font-weight: 600; color: var(--text-faint); }
.rst-day.drag-over { outline: 2px dashed var(--accent); outline-offset: -4px; }
.rst-shift {
  position: relative;
  display: flex; align-items: center; gap: 0.4rem;
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--pc) 30%, transparent);
  border-left: 3px solid var(--pc);
  border-radius: 0.5rem;
  padding: 0.4rem 0.5rem;
  margin-bottom: 0.45rem;
  font-size: 0.74rem;
  cursor: grab;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  animation: pane-in 0.22s ease;
}
.rst-shift:last-child { margin-bottom: 0; }
.rst-shift:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.rst-shift.is-dragging { opacity: 0.45; transform: rotate(2deg) scale(1.02); cursor: grabbing; }
.rst-shift b { font-weight: 600; }
.rst-shift .rst-time {
  margin-left: auto;
  font-size: 0.66rem; font-weight: 600;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

/* Sheets pane — always warm-light, mirroring the real app decision */
.ws-sheet {
  padding: 0;
  overflow-x: auto;
  background: #FFFCF7;
  color: #1A1A19;
  min-height: 380px;
}
.ws-sheet table { border-collapse: collapse; width: 100%; font-size: 0.78rem; }
.ws-sheet th, .ws-sheet td {
  border: 1px solid #E8E2D6;
  padding: 0.42rem 0.7rem;
  text-align: left;
  min-width: 90px;
  white-space: nowrap;
}
.ws-sheet th {
  background: #F5F0E6;
  font-weight: 600;
  color: #6B6355;
  font-size: 0.7rem;
  text-align: center;
}
.ws-sheet td.rowhead { background: #F5F0E6; color: #6B6355; text-align: center; font-size: 0.7rem; min-width: 36px; }
.ws-sheet td.sel { outline: 2px solid #D97757; outline-offset: -2px; background: rgba(217,119,87,0.06); }
.ws-sheet td.num { text-align: right; font-variant-numeric: tabular-nums; }
.ws-sheet .formula-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.8rem;
  border-bottom: 1px solid #E8E2D6;
  background: #FFFCF7;
  font-size: 0.75rem;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  color: #6B6355;
}
.ws-sheet .formula-bar .cellref {
  font-weight: 700;
  color: #D97757;
  border: 1px solid #E8E2D6;
  border-radius: 0.3rem;
  padding: 0.08rem 0.5rem;
  background: #fff;
}

/* Workspace chat pane (RAG) */
.ws-chatpane { padding: 1.3rem 1.6rem; display: flex; flex-direction: column; gap: 0.9rem; min-height: 380px; }
.ws-chatpane .sources {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 0.55rem;
}
/* Used in the workspace chat pane AND the hero chat feed — keep unscoped. */
.source-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(217, 119, 87, 0.25);
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
}
.source-chip svg { width: 11px; height: 11px; flex: none; }

/* ---------- Study flashcards ---------- */
.study-demo {
  display: grid;
  gap: 1rem;
  justify-items: center;
  padding: 2.4rem 1.5rem;
}
.flashcard {
  width: min(430px, 100%);
  height: 240px;
  perspective: 1200px;
  cursor: pointer;
}
.flashcard__inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.4, 0.2, 0.2, 1);
}
.flashcard.is-flipped .flashcard__inner { transform: rotateY(180deg); }
.flashcard__face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.8rem;
  gap: 0.7rem;
}
.flashcard__face .kicker {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--accent);
}
.flashcard__face p { font-size: 1.08rem; font-weight: 600; line-height: 1.45; }
.flashcard__face .hint-line { font-size: 0.78rem; color: var(--text-faint); font-weight: 400; }
.flashcard__face--back { transform: rotateY(180deg); background: var(--accent); border-color: transparent; }
.flashcard__face--back .kicker { color: rgba(255, 255, 255, 0.8); }
.flashcard__face--back p { color: #fff; }
.flashcard__face--back .hint-line { color: rgba(255, 255, 255, 0.65); }
.study-grade {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}
.study-grade button {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.42rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  transition: all 0.15s ease;
}
.study-grade button:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-softer); }
.study-progress {
  font-size: 0.78rem;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.study-progress .bar {
  width: 130px; height: 5px; border-radius: 999px; background: var(--surface-2); overflow: hidden;
}
.study-progress .bar i {
  display: block; height: 100%; border-radius: 999px; background: var(--accent);
  transition: width 0.4s ease;
}

/* ---------- Voice waveform ---------- */
.voice-demo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 2.6rem 1.5rem;
}
.voice-demo__orb {
  width: 96px; height: 96px;
  border-radius: 999px;
  background: radial-gradient(circle at 32% 28%, #E8977B, var(--accent) 65%);
  display: grid;
  place-items: center;
  color: #fff;
  position: relative;
  cursor: pointer;
  box-shadow: 0 12px 34px -8px rgba(217, 119, 87, 0.55);
  transition: transform 0.2s ease;
}
.voice-demo__orb:hover { transform: scale(1.04); }
.voice-demo__orb svg { width: 34px; height: 34px; }
.voice-demo__orb::before,
.voice-demo__orb::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 2px solid rgba(217, 119, 87, 0.4);
  opacity: 0;
}
.voice-demo.is-live .voice-demo__orb::before { animation: orb-ring 2s ease-out infinite; }
.voice-demo.is-live .voice-demo__orb::after { animation: orb-ring 2s ease-out infinite 1s; }
@keyframes orb-ring {
  from { transform: scale(1); opacity: 0.7; }
  to { transform: scale(1.75); opacity: 0; }
}
.voice-demo__bars {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 52px;
}
.voice-demo__bars i {
  width: 5px;
  border-radius: 999px;
  background: var(--accent);
  height: 12%;
  opacity: 0.85;
  transition: height 0.12s ease;
}
.voice-demo__caption {
  min-height: 1.6em;
  font-size: 0.95rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 46ch;
}
.voice-demo__caption strong { color: var(--text); font-weight: 600; }

/* ---------- Automations node graph ---------- */
.flow-demo {
  position: relative;
  min-height: 400px;
  background:
    radial-gradient(var(--border) 1px, transparent 1px);
  background-size: 22px 22px;
  padding: 1rem;
  overflow: hidden;
}
.flow-node {
  position: absolute;
  width: 168px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 0.7rem;
  box-shadow: var(--shadow-md);
  font-size: 0.75rem;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.flow-node__head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.7rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  background: var(--surface-1);
}
.flow-node__head svg { width: 14px; height: 14px; color: var(--accent); }
.flow-node__body { padding: 0.5rem 0.7rem; color: var(--text-muted); line-height: 1.5; }
.flow-node__body code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  background: var(--surface-1);
  border-radius: 0.3rem;
  padding: 0.05rem 0.3rem;
}
.flow-node.is-running {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-md);
}
.flow-node.is-done .flow-node__head .status { color: var(--success); }
.flow-node .status { margin-left: auto; display: inline-flex; }
.flow-node .status svg { width: 13px; height: 13px; color: var(--text-faint); }
.flow-edges { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.flow-edges path {
  fill: none;
  stroke: var(--border-strong);
  stroke-width: 2;
}
.flow-edges path.is-active {
  stroke: var(--accent);
  stroke-dasharray: 6 6;
  animation: edge-flow 0.7s linear infinite;
}
@keyframes edge-flow { to { stroke-dashoffset: -12; } }

/* ---------- Terminal (self-host) ---------- */
.terminal {
  background: var(--code-bg);
  border-radius: var(--radius-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
}
.terminal__bar {
  display: flex;
  align-items: center;
  padding: 0.6rem 0.9rem;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.terminal__body {
  padding: 1rem 1.1rem 1.3rem;
  color: #d6d3ce;
  line-height: 1.75;
  min-height: 210px;
}
.terminal__body .prompt { color: #34D399; }
.terminal__body .cmd { color: #fff; }
.terminal__body .dim { color: #6b7280; }
.terminal__body .ok { color: #34D399; }
.terminal__body .accent { color: #E8977B; }

/* ---------- Files drive mock ---------- */
.filemock { font-size: 0.83rem; }
.filemock__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 90px;
  gap: 0.8rem;
  align-items: center;
  padding: 0.65rem 1.1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}
.filemock__row:last-child { border-bottom: none; }
.filemock__row > span:first-child {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.filemock__row--head {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--text-faint);
  background: var(--surface-1);
}
.filemock__row--head > span:first-child { color: var(--text-faint); font-weight: 700; }
.filemock__row:not(.filemock__row--head):hover { background: var(--hover); }
.filemock__row.is-selected { background: var(--accent-softer); }
.fm-icon {
  width: 26px; height: 26px; flex: none;
  border-radius: 0.45rem;
  display: inline-block;
  position: relative;
}
.fm-icon::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.9;
  clip-path: polygon(0 0, 65% 0, 100% 35%, 100% 100%, 0 100%);
}
.fm-folder { background: rgba(217, 119, 87, 0.16); color: #D97757; }
.fm-folder::after { clip-path: polygon(0 15%, 40% 15%, 50% 30%, 100% 30%, 100% 100%, 0 100%); }
.fm-pdf { background: rgba(220, 38, 38, 0.12); color: #DC2626; }
.fm-img { background: rgba(139, 92, 246, 0.12); color: #8B5CF6; }
.fm-csv { background: rgba(16, 185, 129, 0.12); color: #059669; }
.fm-doc { background: rgba(59, 130, 246, 0.12); color: #3B82F6; }
@media (max-width: 480px) {
  .filemock__row { grid-template-columns: minmax(0, 1fr) 90px; }
  .filemock__row > span:nth-child(2) { display: none; }
}

/* Spinner used by the flow-runner status icons. */
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Install options (self-host section) ---------- */
.install-opts {
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  overflow: hidden;
}
.install-opts__head {
  padding: 0.65rem 1rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-faint);
  background: var(--surface-1);
  border-bottom: 1px solid var(--border);
}
.install-opt {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
}
.install-opt:last-child { border-bottom: none; }
.install-opt__info { min-width: 0; flex: 1; }
.install-opt__name { font-size: 0.85rem; font-weight: 600; }
.install-opt__desc { font-size: 0.76rem; color: var(--text-muted); margin-top: 0.1rem; }
.install-opt__cmd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.74rem;
  color: var(--accent);
  background: var(--accent-softer);
  border: 1px solid rgba(217, 119, 87, 0.2);
  border-radius: 0.4rem;
  padding: 0.28rem 0.6rem;
  white-space: nowrap;
  flex: none;
}
.copy-btn {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 0.45rem;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.copy-btn:hover { color: var(--text); background: var(--hover); border-color: var(--border-strong); }
.copy-btn svg { width: 14px; height: 14px; }
.copy-btn.is-copied { color: var(--success); border-color: var(--success-border); background: var(--success-bg); }
@media (max-width: 560px) {
  .install-opt { flex-wrap: wrap; }
  .install-opt__info { flex-basis: 100%; }
}

/* ---------- Providers ---------- */
.providers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
}
.provider-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: all 0.2s ease;
}
.provider-chip:hover { border-color: var(--accent); color: var(--text); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.provider-chip i {
  width: 9px; height: 9px; border-radius: 999px; display: inline-block;
}

/* ---------- Stats strip ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  text-align: center;
}
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat h3 {
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  color: var(--accent);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.stat p { color: var(--text-muted); font-size: 0.88rem; margin-top: 0.3rem; }

/* ---------- Theme showcase ---------- */
.theme-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}
@media (max-width: 760px) { .theme-cards { grid-template-columns: 1fr; } }
.theme-card {
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.theme-card__preview { padding: 1.4rem; display: grid; gap: 0.6rem; }
.theme-card__preview .row { height: 10px; border-radius: 999px; }
.theme-card__label {
  padding: 0.8rem 1.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.theme-card__label i { width: 10px; height: 10px; border-radius: 999px; background: var(--accent); display: inline-block; }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin-inline: auto; display: grid; gap: 0.7rem; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 0;
  overflow: hidden;
  transition: border-color 0.2s ease;
}
.faq details[open] { border-color: var(--border-strong); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1.05rem 1.3rem;
  font-weight: 600;
  font-size: 0.98rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg {
  width: 17px; height: 17px; flex: none;
  color: var(--text-faint);
  transition: transform 0.25s ease;
}
.faq details[open] summary svg { transform: rotate(45deg); color: var(--accent); }
.faq .faq__body {
  padding: 0 1.3rem 1.15rem;
  color: var(--text-muted);
  font-size: 0.93rem;
}
.faq .faq__body code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.83em;
  background: var(--surface-1);
  border-radius: 0.3rem;
  padding: 0.1rem 0.35rem;
}

/* ---------- Final CTA ---------- */
.cta-final {
  text-align: center;
  padding: 6rem 0;
  position: relative;
  overflow: hidden;
}
.cta-final::before {
  content: "";
  position: absolute;
  inset: auto -20% -60%;
  height: 120%;
  background: radial-gradient(45% 60% at 50% 80%, var(--hero-glow-1), transparent 70%);
  pointer-events: none;
}
.cta-final .container { position: relative; }
.cta-final h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); letter-spacing: -0.03em; max-width: 20ch; margin-inline: auto; }
.cta-final p { margin: 1.1rem auto 0; color: var(--text-muted); max-width: 52ch; font-size: 1.05rem; }
.cta-final .hero__cta { margin-top: 2.2rem; }
.cta-final .logo-mark {
  width: 64px; height: 64px; border-radius: 16px;
  margin: 0 auto 1.6rem;
  box-shadow: 0 16px 40px -10px rgba(217, 119, 87, 0.5);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.6rem 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.site-footer__brand { display: flex; align-items: center; gap: 0.55rem; font-weight: 700; color: var(--text); }
.site-footer__brand img { width: 22px; height: 22px; border-radius: 5.5px; }
.site-footer nav { display: flex; gap: 1.3rem; flex-wrap: wrap; }
.site-footer nav a:hover { color: var(--text); }

/* ==================================================================
   Guided tour (#tour) — auto-playing workspace walkthrough.
   Every class is wt- prefixed so it never clashes with the site's
   generic .split / .bubble / .tasklist utilities. Colours come from
   the shared tokens, so the demo follows the site theme automatically.
   ================================================================== */
.wt { position: relative; }

/* Narrator strip */
.wt-cap { display: flex; align-items: center; gap: 9px; padding: 8px 14px;
  background: var(--surface); border-bottom: 1px solid var(--border);
  font-size: 12.5px; color: var(--text-muted); min-height: 37px; }
.wt-cap__pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none;
  box-shadow: 0 0 0 0 rgba(217,119,87,.35); animation: wt-pulse 1.6s ease-out infinite; }
@keyframes wt-pulse { 0% { box-shadow: 0 0 0 0 rgba(217,119,87,.35); } 100% { box-shadow: 0 0 0 9px rgba(217,119,87,0); } }
.wt-cap__text b { color: var(--text); font-weight: 600; }

/* App shell */
.wt-shell { display: grid; grid-template-columns: 226px 1fr; height: 440px; position: relative; }
.wt-rail { background: var(--surface-1); border-right: 1px solid var(--border);
  padding: 12px 8px; display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.wt-rail__grp { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-faint); padding: 8px 8px 4px; }
.wt-row { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px;
  font-size: 13px; color: var(--text); cursor: default; position: relative; transition: background .18s ease; }
.wt-row:hover { background: var(--hover); }
.wt-row.is-active { background: var(--surface-2); font-weight: 600; }
.wt-row.is-active::before { content: ""; position: absolute; left: -8px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 16px; border-radius: 2px; background: var(--accent); }
.wt-ic { width: 22px; height: 22px; border-radius: 6px; flex: none; display: grid; place-items: center; }
.wt-ic svg { width: 13px; height: 13px; }
.wt-k-chat { background: rgba(217,119,87,.16); color: var(--accent); }
.wt-k-note { background: rgba(245,158,11,.16); color: #F59E0B; }
.wt-k-canvas { background: rgba(59,130,246,.16); color: #3B82F6; }
.wt-k-board { background: rgba(16,185,129,.16); color: #10B981; }
.wt-k-sheet { background: rgba(236,72,153,.16); color: #EC4899; }
.wt-k-roster { background: rgba(21,154,168,.16); color: #159AA8; }
.wt-nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Main pane */
.wt-main { position: relative; overflow: hidden; background: var(--bg); }
.wt-pane { position: absolute; inset: 0; padding: 20px 22px; overflow: auto;
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity .34s ease, transform .34s ease; }
.wt-pane.is-active { opacity: 1; transform: none; pointer-events: auto; }
.wt-pane__h { font-size: 15px; font-weight: 600; margin: 0 0 3px; letter-spacing: -.01em; }
.wt-pane__sub { font-size: 12px; color: var(--text-muted); margin: 0; }

/* Note */
.wt-note p { font-size: 13px; color: var(--text); margin: 0 0 12px; max-width: 60ch; }
.wt-tasklist { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-direction: column; gap: 6px; }
.wt-tasklist li { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.wt-box { width: 15px; height: 15px; border-radius: 4px; border: 1.5px solid var(--border-strong); flex: none; }
.wt-done .wt-box { background: var(--accent); border-color: var(--accent); position: relative; }
.wt-done .wt-box::after { content: "✓"; color: #fff; font-size: 10px; position: absolute; inset: 0; display: grid; place-items: center; }
.wt-done span { color: var(--text-muted); text-decoration: line-through; }
.wt-callout { border: 1px solid var(--border); border-left: 3px solid var(--accent);
  background: var(--accent-soft); border-radius: 8px; padding: 11px 13px; font-size: 12.5px;
  max-width: 62ch; transition: box-shadow .3s ease, border-color .3s ease; }
.wt-callout.wt-flash { box-shadow: 0 0 0 4px rgba(217,119,87,.18); border-left-color: var(--accent-hover); }
.wt-callout b { color: var(--accent-hover); }

/* Canvas */
.wt-canvas { position: absolute; inset: 0; background: radial-gradient(circle, var(--border) 1px, transparent 1px) 0 0/22px 22px; }
.wt-cv-shape, .wt-cv-sticky { position: absolute; font-size: 12px; border-radius: 8px; padding: 10px 12px;
  box-shadow: var(--shadow-sm); animation: wt-pop .4s cubic-bezier(.2,.8,.3,1.2) both; }
.wt-cv-shape { background: var(--surface); border: 1.5px solid var(--accent); color: var(--text); font-weight: 600;
  display: grid; place-items: center; text-align: center; }
.wt-cv-sticky { color: #3a2f13; font-weight: 500; box-shadow: 0 6px 14px -4px rgba(0,0,0,.2); }
.wt-cv-connector { position: absolute; inset: 0; pointer-events: none; }
.wt-cv-connector path { stroke: var(--accent); stroke-width: 2; fill: none; opacity: .55; stroke-dasharray: 6 5; }
@keyframes wt-pop { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }

/* Chat */
.wt-chat { display: flex; flex-direction: column; height: 100%; }
.wt-feed { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 12px; padding-bottom: 6px; }
.wt-bubble { max-width: 82%; font-size: 13px; padding: 10px 13px; border-radius: 14px; }
.wt-bubble--user { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 5px; }
.wt-bubble--ai { align-self: flex-start; background: var(--surface); border: 1px solid var(--border);
  border-bottom-left-radius: 5px; box-shadow: var(--shadow-sm); }
.wt-model-tag { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-muted);
  margin-bottom: 6px; font-weight: 600; }
.wt-model-tag i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.wt-sources { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.wt-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-muted);
  background: var(--surface-1); border: 1px solid var(--border); border-radius: 999px; padding: 3px 9px; }
.wt-chip svg { width: 11px; height: 11px; color: #F59E0B; }
.wt-dots span { display: inline-block; width: 6px; height: 6px; margin: 0 1px; border-radius: 50%;
  background: var(--text-faint); animation: wt-blink 1.2s infinite both; }
.wt-dots span:nth-child(2) { animation-delay: .2s; } .wt-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes wt-blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
.wt-composer { margin-top: 12px; display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--border-strong); background: var(--surface); border-radius: 999px; padding: 6px 6px 6px 15px; }
.wt-txt { flex: 1; font-size: 13px; color: var(--text); min-height: 20px; }
.wt-txt.wt-ph { color: var(--text-faint); }
.wt-send { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); flex: none;
  display: grid; place-items: center; color: #fff; }
.wt-send svg { width: 15px; height: 15px; }
.wt-caret { display: inline-block; width: 1.5px; height: 15px; background: var(--accent); vertical-align: -2px; animation: wt-caret 1s step-end infinite; }
@keyframes wt-caret { 50% { opacity: 0; } }

/* Split screen */
.wt-pane__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.wt-side-btn { display: inline-flex; align-items: center; gap: 6px; flex: none; font-size: 11.5px; font-weight: 600;
  color: var(--text-muted); border: 1px solid var(--border-strong); border-radius: 999px; padding: 5px 11px; background: var(--surface); }
.wt-side-btn svg { width: 13px; height: 13px; }
.wt-ic-sm { width: 18px; height: 18px; border-radius: 5px; display: grid; place-items: center; flex: none; }
.wt-ic-sm svg { width: 11px; height: 11px; }
.wt-split { display: grid; grid-template-columns: 1fr 1fr; height: 100%; }
.wt-split__col { display: flex; flex-direction: column; min-width: 0; border-right: 1px solid var(--border); }
.wt-split__col:last-child { border-right: none; }
.wt-split__bar { display: flex; align-items: center; gap: 7px; padding: 9px 12px; font-size: 12px; font-weight: 600;
  border-bottom: 1px solid var(--border); background: var(--surface-1); }
.wt-x { margin-left: auto; color: var(--text-faint); font-size: 16px; line-height: 1; }
.wt-split__body { padding: 14px; overflow: auto; flex: 1; position: relative; }
.wt-split__body p { font-size: 12px; color: var(--text); margin: 0 0 11px; }
.wt-split__canvas { background: radial-gradient(circle, var(--border) 1px, transparent 1px) 0 0/18px 18px; }
.wt-split__canvas .wt-cv-sticky { position: absolute; }

/* Fake cursor */
.wt-cursor { position: absolute; left: 0; top: 0; width: 22px; height: 22px; z-index: 40; pointer-events: none;
  transition: transform .7s cubic-bezier(.5,.05,.3,1); will-change: transform; filter: drop-shadow(0 2px 3px rgba(0,0,0,.3)); }
.wt-cursor.wt-click { animation: wt-cvclick .4s ease; }
@keyframes wt-cvclick { 40% { transform: translate(var(--cx), var(--cy)) scale(.78); } }
.wt-ripple { position: absolute; z-index: 39; border: 2px solid var(--accent); border-radius: 50%;
  width: 14px; height: 14px; margin: -7px 0 0 -7px; opacity: 0; pointer-events: none; }
.wt-ripple.wt-go { animation: wt-rip .5s ease-out; }
@keyframes wt-rip { from { opacity: .7; transform: scale(.4); } to { opacity: 0; transform: scale(2.6); } }

/* Controls */
.wt-controls { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 16px; }
.wt-steps { display: flex; gap: 6px; }
.wt-steps i { width: 7px; height: 7px; border-radius: 50%; background: var(--border-strong); transition: background .2s, width .2s; }
.wt-steps i.wt-on { background: var(--accent); width: 18px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  .wt-cursor { transition: none; } .wt-pane { transition: none; }
  .wt-cap__pulse, .wt-cv-shape, .wt-cv-sticky { animation: none; }
}
@media (max-width: 720px) {
  .wt-shell { grid-template-columns: 1fr; height: auto; }
  .wt-rail { flex-direction: row; flex-wrap: wrap; border-right: none; border-bottom: 1px solid var(--border); }
  .wt-rail__grp { display: none; } .wt-nm { display: none; } .wt-main { height: 420px; position: relative; }
}

/* ==================================================================
   Interactive Workspaces demo (#workspaces) — reuses the .wt-rail /
   .wt-row sidebar chrome above, but keeps real click-to-switch panes,
   a draggable board, and an "Open to side" split.
   ================================================================== */
[data-ws-rail] .wt-row { width: 100%; cursor: pointer; font: inherit; text-align: left; }
.ws-main { display: flex; flex-direction: column; min-width: 0; height: 100%; }
.ws-bar { display: flex; align-items: center; gap: 10px; padding: 7px 12px 7px 16px;
  min-height: 40px; border-bottom: 1px solid var(--border); background: var(--surface); }
.ws-bar__title { font-size: 12.5px; font-weight: 600; color: var(--text); }
.ws-side-btn { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; flex: none;
  font-size: 11.5px; font-weight: 600; color: var(--text-muted); cursor: pointer;
  border: 1px solid var(--border-strong); border-radius: 999px; padding: 5px 11px; background: var(--surface);
  transition: border-color .15s, color .15s; }
.ws-side-btn:hover { border-color: var(--accent); color: var(--text); }
.ws-side-btn + .ws-side-btn { margin-left: 8px; }
.ws-side-btn svg { width: 13px; height: 13px; }
.ws-panes { flex: 1; min-height: 0; overflow: auto; }
/* Split: the active pane sits beside the Chat pane (its "side"). */
.ws-panes.is-split { display: flex; align-items: stretch; overflow: hidden; }
.ws-panes.is-split > .ws-pane { min-height: 0; }
.ws-panes.is-split .ws-pane.is-active,
.ws-panes.is-split .ws-pane.is-side { flex: 1 1 0; min-width: 0; height: 100%; overflow: auto; }
.ws-panes.is-split .ws-pane.is-side { display: block; border-left: 1px solid var(--border); }

/* ==================================================================
   Pricing (#pricing) — Self-hosted (free) vs Managed.
   ================================================================== */
.pricing { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem;
  max-width: 860px; margin: 2.75rem auto 0; align-items: stretch; }
@media (max-width: 720px) { .pricing { grid-template-columns: 1fr; } }
.price-card { position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card);
  padding: 2rem 1.8rem; box-shadow: var(--shadow-sm); }
.price-card--featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow-md); }
.price-card__badge { position: absolute; top: -0.72rem; left: 1.8rem;
  background: var(--accent); color: #fff; font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; }
.price-card__name { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-muted); }
.price-card__price { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.02em;
  margin: 0.35rem 0 0.15rem; color: var(--text); line-height: 1.1; }
.price-card__price span { font-size: 0.9rem; font-weight: 500; color: var(--text-muted); margin-left: 0.4rem; }
.price-card__tag { font-size: 0.9rem; color: var(--text-muted); margin: 0.35rem 0 1.2rem; line-height: 1.5; }
.price-list { list-style: none; padding: 0; margin: 0 0 1.7rem; display: grid; gap: 0.62rem; }
.price-list li { position: relative; padding-left: 1.7rem; font-size: 0.9rem; color: var(--text); line-height: 1.45; }
.price-list li::before { content: "✓"; position: absolute; left: 0; top: 0.05rem;
  width: 1.15rem; height: 1.15rem; display: grid; place-items: center; font-size: 0.68rem; font-weight: 700;
  color: var(--accent); background: var(--accent-soft); border-radius: 999px; }
.price-card__cta { margin-top: auto; align-self: flex-start; }

/* Waitlist form (Managed plan card) */
/* `display:flex` below would otherwise override the HTML `hidden` attribute
   used to toggle between the form and its success panel — restore it. */
.waitlist[hidden], .waitlist__done[hidden] { display: none; }
.waitlist { display: flex; flex-direction: column; gap: 0.55rem; margin-top: auto; }
.waitlist__input {
  width: 100%;
  padding: 0.7rem 1.1rem;
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-input);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.waitlist__input::placeholder { color: var(--text-faint); }
.waitlist__input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.waitlist__submit { width: 100%; justify-content: center; margin-top: 0.15rem; }
.waitlist__note { margin: 0.15rem 0 0; font-size: 0.78rem; color: var(--text-faint); text-align: center; }
/* Honeypot: kept in the DOM for bots, invisible + unfocusable for humans. */
.waitlist__honey { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.waitlist.is-submitting .waitlist__submit { opacity: 0.65; pointer-events: none; }
.waitlist__done {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.95rem 1.1rem;
  border-radius: var(--radius-card);
  background: var(--success-bg);
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 0.9rem;
  color: var(--text);
}
.waitlist__done strong { color: var(--success); font-size: 0.98rem; }
