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

:root {
  color-scheme: dark;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Matte Obsidian (Plannotator + AG-UI dark tokens) */
  --bg: #09090b;
  --bg-elevated: #0f0f13;
  --surface: #121216;
  --surface-hover: #18181e;
  --code-bg: #060608;

  --ink: #f4f4f5;
  --ink-muted: #a1a1aa;
  --ink-subtle: #71717a;

  --border: rgba(255, 255, 255, 0.085);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-subtle: rgba(255, 255, 255, 0.05);

  --accent: #818cf8;
  --accent-strong: #6366f1;
  --accent-ink: #ffffff;
  --accent-soft: rgba(129, 140, 248, 0.12);
  --accent-border: rgba(129, 140, 248, 0.34);

  --canvas-blue: #3b82f6;
  --verified: #34d399;
  --verified-soft: rgba(52, 211, 153, 0.12);
  --warn: #f59e0b;

  --dot-color: rgba(255, 255, 255, 0.13);
  --header-bg: rgba(9, 9, 11, 0.82);
  --shadow-window: 0 24px 64px -18px rgba(0, 0, 0, 0.65);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --container-max: 1200px;
}

html[data-theme='light'] {
  color-scheme: light;
  --bg: #fbfaf8;
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --surface-hover: #f4f4f5;
  --code-bg: #f4f4f6;

  --ink: #09090b;
  --ink-muted: #52525b;
  --ink-subtle: #71717a;

  --border: rgba(9, 9, 11, 0.09);
  --border-strong: rgba(9, 9, 11, 0.18);
  --border-subtle: rgba(9, 9, 11, 0.05);

  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-ink: #ffffff;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --accent-border: rgba(37, 99, 235, 0.28);

  --canvas-blue: #2563eb;
  --verified: #059669;
  --verified-soft: rgba(5, 150, 105, 0.1);
  --warn: #d97706;

  --dot-color: rgba(9, 9, 11, 0.1);
  --header-bg: rgba(251, 250, 248, 0.86);
  --shadow-window: 0 20px 50px -18px rgba(15, 23, 42, 0.14);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: clip;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

code,
pre,
kbd,
.mono {
  font-family: var(--font-mono);
}

code {
  font-size: 0.86em;
  padding: 0.14em 0.38em;
  border-radius: 5px;
  background: var(--surface-hover);
  border: 1px solid var(--border-subtle);
  overflow-wrap: anywhere;
}

@media (min-width: 640px) {
  p code,
  .section-sub code,
  .top-banner code {
    white-space: nowrap;
  }
}

/* ---------- Structural Helpers ---------- */
.container {
  width: min(100% - 2.5rem, var(--container-max));
  margin-inline: auto;
}

.section {
  padding: 4.5rem 0;
  border-top: 1px solid var(--border);
}

.section-header {
  max-width: 680px;
  margin-bottom: 2.5rem;
}

.section-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.65rem;
}

.section-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.section-sub {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.98rem;
  line-height: 1.65;
}

/* ---------- Announcement Strip (Univer + Plannotator style) ---------- */
.top-banner {
  background: var(--accent-soft);
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
  line-height: 1.4;
}

.top-banner-inner {
  width: min(100% - 2.5rem, var(--container-max));
  margin-inline: auto;
  min-height: 36px;
  padding: 0.35rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  text-align: center;
}

.banner-pill {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: var(--accent-strong);
  color: var(--accent-ink);
}

.banner-link {
  color: var(--accent);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.banner-link:hover {
  text-decoration: underline;
}

/* ---------- Sticky Crisp Navigation (NEVER wraps) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: 58px;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  width: min(100% - 2.5rem, var(--container-max));
  height: 100%;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-link svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 58px;
  padding: 0 0.72rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-muted);
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.nav-link:hover {
  color: var(--ink);
}

.nav-link.active {
  color: var(--ink);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  left: 0.6rem;
  right: 0.6rem;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}

.cmd-k-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 32px;
  padding: 0 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-subtle);
  font-size: 0.8rem;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.cmd-k-btn:hover {
  border-color: var(--border-strong);
  color: var(--ink);
}

.cmd-k-btn kbd {
  font-size: 0.7rem;
  padding: 0.05rem 0.35rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink-muted);
}

.release-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  height: 32px;
  padding: 0 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ink-muted);
  white-space: nowrap;
  flex-shrink: 0;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.release-pill:hover {
  border-color: var(--border-strong);
  color: var(--ink);
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--verified);
  flex-shrink: 0;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.icon-btn:hover {
  border-color: var(--border-strong);
  color: var(--ink);
  background: var(--surface);
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.62rem 1.15rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.btn-primary {
  background: var(--accent-strong);
  color: var(--accent-ink);
  border-color: transparent;
}

.btn-primary:hover {
  background: var(--accent);
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: var(--surface-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-muted);
  border-color: var(--border);
}

.btn-ghost:hover {
  color: var(--ink);
  border-color: var(--border-strong);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.copy-btn:hover {
  color: var(--ink);
  border-color: var(--border-strong);
}

.copy-btn.copied {
  color: var(--verified);
  border-color: var(--verified);
}

/* ---------- Hero Section (Plannotator + Univer hybrid) ---------- */
.hero {
  position: relative;
  padding: 2.75rem 0 3.25rem;
  overflow: hidden;
}

.hero-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--dot-color) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(ellipse 80% 75% at 50% 35%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 75% at 50% 35%, #000 40%, transparent 100%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  gap: 3rem;
  align-items: center;
}

.hero-title {
  margin: 0 0 1.15rem;
  font-size: clamp(2.35rem, 4.5vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.hero-accent {
  color: var(--accent);
}

.hero-subtitle {
  margin: 0;
  max-width: 48ch;
  font-size: 1rem;
  color: var(--ink-muted);
  line-height: 1.65;
}

.interactive-word {
  position: relative;
  color: var(--ink);
  font-weight: 600;
  border-bottom: 1.5px dashed var(--accent);
  cursor: pointer;
  padding-bottom: 1px;
  transition: color 0.15s ease;
}

.interactive-word:hover {
  color: var(--accent);
}

.hero-meta-line {
  margin: 0.75rem 0 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-subtle);
  letter-spacing: 0.02em;
}

/* Plannotator-style Client / Target Pill Selector */
.agent-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
  margin-bottom: 0.85rem;
}

.agent-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  height: 31px;
  padding: 0 0.68rem;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-muted);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.agent-btn:hover {
  color: var(--ink);
  border-color: var(--border-strong);
}

.agent-btn.active {
  color: var(--ink);
  background: var(--accent-soft);
  border-color: var(--accent-border);
}

.agent-dot {
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--ink-subtle);
}

.agent-btn.active .agent-dot {
  background: var(--accent);
}

.hero-grid > *,
.split-row > *,
.docs-shell > *,
.how-steps-3 > *,
.workstation-grid > * {
  min-width: 0;
  max-width: 100%;
}

.install-box {
  border: 1px solid var(--border-strong);
  background: var(--code-bg);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
  max-width: 100%;
}

.install-cmd {
  margin: 0;
  min-width: 0;
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink);
  overflow-x: auto;
  white-space: nowrap;
}

.install-cmd .prompt {
  color: var(--accent);
  margin-right: 0.45rem;
  user-select: none;
}

.hero-detail-steps {
  margin-top: 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  min-width: 0;
}

.detail-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.44rem 0.75rem;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ink-muted);
  min-width: 0;
}

.detail-step > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-step-num {
  color: var(--accent);
  font-weight: 600;
  margin-right: 0.45rem;
}

.hero-cta-row {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.smart-dl-meta {
  margin-top: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-subtle);
}

.os-switcher {
  margin-top: 0.6rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.os-detect-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--verified-border, rgba(52, 211, 153, 0.35));
  background: var(--verified-soft, rgba(52, 211, 153, 0.1));
  color: var(--verified);
  font-family: var(--font-mono);
  font-size: 0.69rem;
  font-weight: 600;
  white-space: nowrap;
}

.os-chip {
  height: 26px;
  padding: 0 0.58rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.71rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 140ms, background 140ms, color 140ms;
}

.os-chip:hover {
  color: var(--ink);
  border-color: var(--border-strong);
}

.os-chip.active {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent);
  font-weight: 600;
}

.os-chip-reset {
  border-style: dashed;
  color: var(--ink-subtle);
}

.agent-btn.is-user-os {
  border-color: var(--verified-border, rgba(52, 211, 153, 0.45));
}

.agent-btn.is-user-os .agent-dot {
  background: var(--verified);
}

.os-detected-tag {
  margin-left: 0.25rem;
  padding: 0.05rem 0.34rem;
  border-radius: 4px;
  background: var(--verified-soft, rgba(52, 211, 153, 0.14));
  color: var(--verified);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
}

.smart-dl-card {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 1.15rem 1.5rem;
  align-items: center;
  padding: 1.15rem 1.35rem;
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--accent-soft), var(--bg-elevated) 55%);
  min-width: 0;
  max-width: 100%;
}

.vault-card > .smart-dl-card {
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: linear-gradient(135deg, var(--accent-soft), var(--surface) 60%);
}

.smart-dl-card.is-compact {
  padding: 0.95rem 1.15rem;
  grid-template-columns: minmax(0, 1.4fr) auto;
}

.smart-dl-left,
.smart-dl-right {
  min-width: 0;
  max-width: 100%;
}

.smart-dl-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.42rem;
}

.smart-dl-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
  color: var(--ink);
  line-height: 1.3;
}

.smart-dl-file-row {
  margin-top: 0.32rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ink-muted);
}

.smart-dl-file-row code {
  font-size: 0.76rem;
  word-break: break-word;
}

.smart-dl-note {
  margin: 0.45rem 0 0;
  font-size: 0.8rem;
  color: var(--ink-muted);
  line-height: 1.45;
}

.smart-dl-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.smart-dl-secondary-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

@media (max-width: 860px) {
  .smart-dl-card,
  .smart-dl-card.is-compact {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    overflow: hidden;
  }
  .smart-dl-actions {
    width: 100%;
    align-items: stretch;
  }
  .smart-dl-actions .btn-primary {
    width: 100%;
    max-width: 100%;
    white-space: normal;
    text-align: center;
    justify-content: center;
    height: auto;
    min-height: 40px;
    padding: 0.58rem 0.9rem;
    line-height: 1.3;
  }
  .smart-dl-secondary-row {
    justify-content: flex-start;
  }
}

/* ---------- Univer-Inspired Studio Window + NLE Grid Canvas ---------- */
.studio-frame {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-window);
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
}

.window-chrome {
  min-height: 40px;
  padding: 0.35rem 0.9rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.window-chrome .banner-link,
.window-chrome button {
  white-space: nowrap;
  flex-shrink: 0;
}

.window-label {
  flex: 1;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.traffic-lights {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.traffic-lights span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.tl-r { background: #ef4444; opacity: 0.85; }
.tl-y { background: #f59e0b; opacity: 0.85; }
.tl-g { background: #22c55e; opacity: 0.85; }

.window-label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Univer Formula Bar */
.formula-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  padding: 0.42rem 0.75rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.formula-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  overflow: hidden;
}

.formula-cell {
  padding: 0.1rem 0.42rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  flex-shrink: 0;
}

.formula-fx {
  color: var(--ink-subtle);
  font-style: italic;
  flex-shrink: 0;
}

.formula-expr {
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.collab-avatars {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.collab-badge {
  padding: 0.1rem 0.42rem;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 600;
}

.collab-human {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warn);
}

.collab-agent {
  background: var(--accent-soft);
  color: var(--accent);
}

/* Univer Track Grid + Stage */
.nle-grid-wrap {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
}

.nle-col-corner {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.nle-col-headers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--ink-subtle);
}

.nle-col-headers span {
  padding: 0.2rem 0.45rem;
  border-right: 1px solid var(--border-subtle);
  text-align: center;
}

.nle-col-headers span:last-child {
  border-right: none;
}

.nle-row-headers {
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  border-right: 1px solid var(--border);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--ink-subtle);
}

.nle-row-headers span {
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border-subtle);
}

.canvas-stage {
  position: relative;
  background: #07090d;
  overflow: hidden;
}

#hero-preview-canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

/* Univer blue selection bounding box + agent cursor */
.selection-box {
  position: absolute;
  top: 10%;
  bottom: 10%;
  left: 35%;
  right: 35%;
  border: 1.5px solid var(--canvas-blue);
  pointer-events: none;
  transition: left 0.25s ease, right 0.25s ease;
}

.selection-box.is-wide {
  left: 6%;
  right: 6%;
}

.selection-handle {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 7px;
  height: 7px;
  background: var(--canvas-blue);
  border: 1px solid #fff;
}

.agent-cursor-tag {
  position: absolute;
  right: -6px;
  bottom: -24px;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: var(--canvas-blue);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  white-space: nowrap;
}

.canvas-toolbar {
  padding: 0.6rem 0.75rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pill-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
}

.chip-btn {
  padding: 0.26rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.chip-btn:hover {
  color: var(--ink);
  border-color: var(--border-strong);
}

.chip-btn.active {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent-border);
}

/* Interactive Scrub Timeline Rail inside Studio Window */
.timeline-dock {
  padding: 0.65rem 0.75rem 0.75rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.timeline-track-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-subtle);
  margin-bottom: 0.4rem;
}

.timeline-rail {
  position: relative;
  height: 36px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  gap: 2px;
  padding: 3px;
  cursor: pointer;
}

.clip-block {
  height: 100%;
  border-radius: 4px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  padding: 0 0.45rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--ink);
  overflow: hidden;
}

.clip-block.is-slate {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.35);
}

.clip-block.is-selected {
  outline: 1.5px solid var(--canvas-blue);
}

.clip-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clip-meta {
  color: var(--ink-subtle);
  margin-left: 0.35rem;
  flex-shrink: 0;
}

.playhead-needle {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 2px;
  background: var(--ink);
  pointer-events: none;
}

.duck-meters {
  margin-top: 0.55rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-subtle);
}

.meter-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 0.4rem;
}

.meter-track {
  height: 5px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.08s linear;
}

.meter-fill.voice { background: var(--verified); }
.meter-fill.music { background: var(--accent); }

/* ---------- Proof Strip (Plannotator Hairline Row) ---------- */
.proof-bar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.proof-item {
  padding: 1.15rem 1.25rem;
  border-right: 1px solid var(--border);
}

.proof-item:last-child {
  border-right: none;
}

.proof-val {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.proof-desc {
  font-size: 0.8rem;
  color: var(--ink-muted);
  margin-top: 0.15rem;
}

/* ---------- Editorial 3-Column Index (Exact Plannotator Rhythm) ---------- */
.index-3col {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem;
}

.index-col-title {
  margin: 0 0 1.25rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-subtle);
}

.index-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.index-entry h3 {
  margin: 0 0 0.25rem;
  font-size: 0.94rem;
  font-weight: 600;
}

.index-entry .cmd-accent {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: var(--accent);
}

.index-entry p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--ink-muted);
  line-height: 1.55;
}

/* ---------- Alternating Split Showcase ---------- */
.split-row {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 3.25rem;
  align-items: center;
}

.split-row.is-reversed .split-visual {
  order: 2;
}

.split-copy ul {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.split-copy li {
  position: relative;
  padding-left: 1.1rem;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.split-copy li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.56em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--verified);
}

/* Compare Slider Window */
.compare-box {
  position: relative;
  height: 240px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #07090d;
  margin: 0.85rem;
}

.compare-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.compare-blur {
  background:
    radial-gradient(circle at 26% 35%, rgba(129, 140, 248, 0.56), transparent 52%),
    radial-gradient(circle at 74% 66%, rgba(52, 211, 153, 0.34), transparent 54%),
    linear-gradient(135deg, #12182b, #0c1623);
}

.compare-contain {
  background: linear-gradient(to bottom, #000000 0% 18%, #07090d 18% 82%, #000000 82% 100%);
  clip-path: inset(0 calc(100% - var(--split, 48%)) 0 0);
}

.compare-subject {
  width: 60%;
  height: 58%;
  border-radius: 8px;
  border: 1px solid rgba(129, 140, 248, 0.55);
  background: rgba(15, 23, 42, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.75rem;
  color: #f4f4f5;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.compare-subject.is-contain {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(10, 12, 18, 0.96);
  color: #d4d4d8;
}

.compare-wave {
  width: 56px;
  height: 4px;
  border-radius: 999px;
  margin-bottom: 0.45rem;
  background: linear-gradient(90deg, #818cf8, #34d399);
}

.compare-wave.is-dim {
  background: rgba(255, 255, 255, 0.22);
}

.compare-subject small {
  color: #a1a1aa;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  margin-top: 0.25rem;
}

.compare-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--split, 48%);
  width: 2px;
  background: var(--accent);
  pointer-events: none;
}

.compare-tag {
  position: absolute;
  bottom: 10px;
  padding: 0.16rem 0.5rem;
  border-radius: 999px;
  background: rgba(9, 9, 11, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f4f4f5;
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.compare-tag.left { left: 10px; }
.compare-tag.right { right: 10px; }

.range-wrap {
  padding: 0 0.95rem 0.9rem;
}

.slider-input {
  width: 100%;
  accent-color: var(--accent);
  cursor: ew-resize;
}

/* Code Window */
.code-window {
  margin: 0;
  padding: 1rem 1.1rem;
  background: var(--code-bg);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.6;
  max-width: 100%;
  overflow-x: auto;
  white-space: pre;
}

.window-code-body {
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ---------- "How it works... simple." 3-Step Track ---------- */
.steps-header {
  text-align: center;
  margin-bottom: 2.25rem;
}

.segmented-tabs {
  display: inline-flex;
  padding: 3px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  gap: 2px;
}

.seg-btn {
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--ink-muted);
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
}

.seg-btn.active {
  background: var(--surface-hover);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.how-steps-3 {
  margin-top: 2.25rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.how-step-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.55rem;
}

.step-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.how-step h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.how-step p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-muted);
  line-height: 1.6;
}

/* ---------- Releases Table & Vault ---------- */
.vault-card {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
}

.vault-toolbar {
  padding: 1.15rem 1.35rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.vault-toolbar > * {
  min-width: 0;
  max-width: 100%;
}

.release-select {
  max-width: 100%;
  padding: 0.42rem 0.75rem;
  border-radius: 7px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--ink);
  font-size: 0.84rem;
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  display: block;
}

.asset-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

.asset-table th {
  padding: 0.7rem 1.25rem;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-subtle);
}

.asset-table td {
  padding: 0.82rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.asset-table tr:last-child td {
  border-bottom: none;
}

.asset-table tr.is-recommended {
  background: var(--accent-soft);
}

.badge-rec {
  display: inline-block;
  padding: 0.12rem 0.48rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  border: 1px solid var(--border);
  color: var(--ink-muted);
}

.badge-rec.accent {
  border-color: var(--accent-border);
  color: var(--accent);
  background: var(--accent-soft);
}

.vault-footer-install {
  padding: 1.15rem 1.35rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

/* ---------- AG-UI + Stitch 3-Column Documentation Layout ---------- */
.docs-shell {
  width: min(100% - 2.5rem, 1280px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 195px;
  gap: 2.5rem;
  padding-top: 2.25rem;
  padding-bottom: 4.5rem;
  align-items: start;
}

.docs-sidebar {
  position: sticky;
  top: 78px;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  padding-right: 0.75rem;
}

.docs-nav-group {
  margin-bottom: 1.4rem;
}

.docs-nav-heading {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.45rem;
  padding: 0 0.65rem;
}

.docs-nav-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.docs-nav-item {
  display: block;
  padding: 0.36rem 0.65rem;
  border-radius: 7px;
  font-size: 0.84rem;
  color: var(--ink-muted);
  transition: background 0.12s ease, color 0.12s ease;
}

.docs-nav-item:hover {
  color: var(--ink);
  background: var(--surface-hover);
}

.docs-nav-item.active {
  color: var(--ink);
  font-weight: 600;
  background: var(--surface-hover);
}

.docs-prose {
  min-width: 0;
  max-width: 760px;
}

.docs-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.45rem;
}

.docs-prose h1 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.9rem, 3.2vw, 2.45rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.docs-prose .lead {
  margin: 0 0 1.75rem;
  font-size: 1.04rem;
  color: var(--ink-muted);
  line-height: 1.65;
}

.docs-prose section {
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid var(--border);
  scroll-margin-top: 84px;
}

.docs-prose h2 {
  margin: 0 0 0.75rem;
  font-size: 1.38rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.docs-prose p {
  margin: 0 0 1rem;
  color: var(--ink-muted);
}

/* AG-UI rounded callout box */
.callout {
  margin: 1.25rem 0;
  padding: 0.95rem 1.15rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--accent-border);
  background: var(--accent-soft);
  font-size: 0.88rem;
  color: var(--ink);
}

.callout strong {
  color: var(--accent);
}

.docs-toc {
  position: sticky;
  top: 78px;
  font-size: 0.8rem;
}

.toc-title {
  font-weight: 600;
  font-size: 0.74rem;
  color: var(--ink);
  margin: 0 0 0.6rem;
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
  border-left: 1px solid var(--border);
  padding-left: 0.75rem;
}

.toc-link {
  color: var(--ink-subtle);
  transition: color 0.12s ease;
}

.toc-link:hover,
.toc-link.active {
  color: var(--ink);
  font-weight: 500;
}

/* ---------- Inputs, Studio Controls & Tools Explorer ---------- */
.page-hero {
  padding: 2.75rem 0 2rem;
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.85rem, 3.5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.page-hero p {
  margin: 0;
  max-width: 64ch;
  color: var(--ink-muted);
}

.workstation-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 1.5rem;
  padding: 1.25rem;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
}

.control-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--ink-muted);
}

.control-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.input-box {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: 7px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.input-box:focus,
.release-select:focus {
  outline: 2px solid var(--accent-border);
  outline-offset: -1px;
}

.audit-strip {
  padding: 0.75rem 0.95rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--verified-soft);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* Tools Spec Rows */
.tools-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  overflow: hidden;
}

.tool-row {
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.tool-row:last-child {
  border-bottom: none;
}

.tool-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.38rem;
}

.tool-name {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
}

.param-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.65rem;
}

.param-chip {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.14rem 0.45rem;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-muted);
}

.param-chip.req {
  border-color: var(--accent-border);
  color: var(--ink);
}

/* Dropzone (Releases Verifier) */
.verify-dropzone {
  padding: 1.65rem;
  border-radius: var(--radius-lg);
  border: 1.5px dashed var(--border-strong);
  background: var(--surface);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.verify-dropzone:hover,
.verify-dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* ---------- Command Palette Modal (⌘K, AG-UI inspired) ---------- */
.cmdk-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(4px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 1rem 1rem;
}

.cmdk-backdrop.open {
  display: flex;
}

.cmdk-dialog {
  width: min(100%, 560px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-window);
  overflow: hidden;
}

.cmdk-input-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
}

.cmdk-input-row input {
  width: 100%;
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.94rem;
}

.cmdk-results {
  max-height: 360px;
  overflow-y: auto;
  padding: 0.45rem;
}

.cmdk-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  font-size: 0.86rem;
}

.cmdk-item:hover {
  background: var(--surface-hover);
}

.cmdk-kind {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-subtle);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.75rem 0;
  font-size: 0.84rem;
  color: var(--ink-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.footer-col-title {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.65rem;
}

.footer-col-list {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
}

.footer-col-list a:hover {
  color: var(--ink);
}

/* ---------- Immediate Visibility (no scroll-hidden voids) ---------- */
[data-reveal] {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive Breakpoints ---------- */
@media (max-width: 1080px) {
  .docs-shell {
    grid-template-columns: 205px minmax(0, 1fr);
  }
  .docs-toc {
    display: none;
  }
}

@media (max-width: 960px) {
  .hero-grid,
  .split-row,
  .workstation-grid,
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .split-row.is-reversed .split-visual {
    order: 0;
  }
  .proof-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .proof-item {
    border-bottom: 1px solid var(--border);
  }
  .index-3col,
  .how-steps-3 {
    grid-template-columns: minmax(0, 1fr);
  }
  .docs-shell {
    grid-template-columns: minmax(0, 1fr);
  }
  .docs-sidebar {
    position: static;
    max-height: none;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
  }
}

@media (max-width: 820px) {
  .menu-toggle {
    display: inline-flex;
  }
  .header-nav {
    display: none;
    position: fixed;
    top: 58px;
    left: 0;
    right: 0;
    padding: 0.75rem 1.25rem 1rem;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
  }
  .header-nav.open {
    display: flex;
  }
  .nav-link {
    height: 40px;
  }
  .nav-link.active::after {
    display: none;
  }
  .cmd-k-btn .cmd-k-text {
    display: none;
  }
  .control-grid-3,
  .duck-meters {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .proof-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .proof-item {
    border-right: none;
  }
  .release-pill {
    display: none;
  }
}
