/* ============================================================
   html-planner.com — marketing site
   Design tokens lifted verbatim from /src/styles.css to keep
   the site visually identical to the tool.
   ============================================================ */

:root, [data-theme="dark"] {
  --bg: #0b0d12;
  --bg-elev: #11141b;
  --bg-elev-2: #161a23;
  --border: #232836;
  --border-strong: #2d3344;
  --text: #e6e8ec;
  --text-dim: #a0a6b4;
  --text-faint: #6b7180;
  --accent: #7c9cff;
  --accent-dim: rgba(124, 156, 255, 0.15);
  --success: #4ade80;
  --success-dim: rgba(74, 222, 128, 0.15);
  --danger: #f87171;
  --danger-dim: rgba(248, 113, 113, 0.15);
  --warn: #fbbf24;
  --warn-dim: rgba(251, 191, 36, 0.15);
  --info: #60a5fa;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui, sans-serif;
  --nav-h: 60px;
  --container: 1200px;
}

[data-theme="light"] {
  --bg: #fafbfc;
  --bg-elev: #ffffff;
  --bg-elev-2: #f3f4f7;
  --border: #e4e7ec;
  --border-strong: #d0d4dc;
  --text: #15171c;
  --text-dim: #4b5161;
  --text-faint: #8a90a0;
  --accent: #3b66ff;
  --accent-dim: rgba(59, 102, 255, 0.1);
  --success: #16a34a;
  --success-dim: rgba(22, 163, 74, 0.1);
  --danger: #dc2626;
  --danger-dim: rgba(220, 38, 38, 0.1);
  --warn: #d97706;
  --warn-dim: rgba(217, 119, 6, 0.1);
  --info: #2563eb;
  --shadow: 0 6px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.16);
}

/* ─── Reset & base ──────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

/* Global custom scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-strong);
}
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.25s ease, color 0.25s ease;
}
a { color: var(--accent); text-decoration: none; transition: color 0.12s ease; }
a:hover { text-decoration: underline; }
img, svg, video { max-width: 100%; height: auto; display: block; }
button { font: inherit; cursor: pointer; }
code, pre, .mono { font-family: var(--mono); }
code {
  background: var(--bg-elev-2);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--text);
}
em { font-style: normal; color: var(--accent); }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* ─── Sticky nav ────────────────────────────────────────── */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 0 max(24px, calc((100vw - var(--container)) / 2 + 24px));
  padding-top: env(safe-area-inset-top, 0);
  background: rgba(11, 13, 18, 0.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
[data-theme="light"] .site-nav { background: rgba(250, 251, 252, 0.82); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.logo {
  font-size: 26px;
  color: var(--accent);
  line-height: 1;
  display: inline-block;
}
.brand-name { font-family: var(--mono); font-size: 16px; color: var(--text-dim); letter-spacing: -0.01em; }

.nav-links {
  display: flex;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}
.nav-links a {
  color: var(--text-dim);
  font-size: 14px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  transition: background 0.12s ease, color 0.12s ease;
}
.nav-links a:hover { background: var(--bg-elev-2); color: var(--text); text-decoration: none; }

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

.gh-stars {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--bg-elev);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  min-height: 36px;
  transition: border-color 0.12s ease, color 0.12s ease;
}
.gh-stars:hover { border-color: var(--accent); color: var(--text); text-decoration: none; }
.gh-stars-icon { color: var(--warn); }
.gh-stars-count[data-loaded] { color: var(--text); }

.btn-icon {
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text-dim);
  font-size: 14px;
  transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
}
.btn-icon:hover { border-color: var(--accent); color: var(--text); }

.theme-toggle .theme-icon-light { display: none; }
[data-theme="light"] .theme-toggle .theme-icon-dark { display: none; }
[data-theme="light"] .theme-toggle .theme-icon-light { display: inline; }

/* ─── Section primitives ────────────────────────────────── */
section { padding: 80px 0; position: relative; }
.section-eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin: 0 0 14px;
}
.section-title {
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.18;
  margin: 0 0 12px;
  max-width: 780px;
}
.section-lede {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--text-dim);
  max-width: 720px;
  margin: 0 0 36px;
  line-height: 1.55;
}

/* Scroll-fade primitive */
.in-view-target {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.in-view-target.in-view { opacity: 1; transform: none; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  padding: clamp(28px, 4vw, 56px) 0 clamp(48px, 8vw, 100px);
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 20% 0%, rgba(124, 156, 255, 0.18), transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 100%, rgba(74, 222, 128, 0.10), transparent 55%),
    radial-gradient(ellipse 40% 30% at 50% 50%, rgba(251, 191, 36, 0.05), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
[data-theme="light"] .hero-bg {
  background:
    radial-gradient(ellipse 60% 40% at 20% 0%, rgba(59, 102, 255, 0.10), transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 100%, rgba(22, 163, 74, 0.08), transparent 55%);
}
.hero-inner { position: relative; z-index: 1; }

.hero-eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 10px 0 20px;
}
.hero-title {
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin: 0 0 22px;
}
.hero-title-lead {
  font-size: 0.6em;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.hero-title-accent {
  background: linear-gradient(135deg, var(--accent), var(--success) 110%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-logo-inline {
  display: inline-block;
  vertical-align: middle;
  margin-bottom: 0.12em;
}
.hero-logo-svg {
  display: block;
  width: 0.78em;
  height: 0.78em;
  transform-origin: center center;
}
.hero-sub {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.6;
  color: var(--text-dim);
  margin: 0 0 32px;
  max-width: 720px;
}
.hero-sub strong { color: var(--text); font-weight: 600; }

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 40px;
}

/* Click-to-copy install block */
.install-block {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px 12px 16px;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 14px;
  box-shadow: var(--shadow);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  max-width: 100%;
}
.install-block:hover { border-color: var(--accent); }
.install-prompt { color: var(--success); user-select: none; flex-shrink: 0; }
.install-command {
  background: none;
  padding: 0;
  color: var(--text);
  font-size: 14px;
  white-space: pre;
  overflow-x: auto;
  flex: 1 1 auto;
  min-width: 0;
}
.install-block-lg { padding: 18px 18px 18px 22px; font-size: 15px; width: 100%; }
.install-block-lg .install-command { font-size: 15px; line-height: 1.7; }

.btn-copy {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 12px;
  min-width: 76px;
  min-height: 34px;
  transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
  flex-shrink: 0;
}
.btn-copy:hover { border-color: var(--accent); color: var(--text); }
.btn-copy .copy-done { display: none; color: var(--success); }
.btn-copy[data-copied="true"] .copy-default { display: none; }
.btn-copy[data-copied="true"] .copy-done { display: inline; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 13px 20px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  min-height: 48px;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.btn-secondary:hover { border-color: var(--accent); background: var(--accent-dim); text-decoration: none; }

/* Hero terminal */
.hero-terminal {
  margin: 8px 0 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  max-width: 820px;
}
.term-chrome {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  background: var(--bg-elev-2);
  border-bottom: 1px solid var(--border);
}
.term-dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  display: inline-block;
}
.term-dot-red { background: #ff5f56; }
.term-dot-amber { background: #ffbd2e; }
.term-dot-green { background: #27c93f; }
.term-title {
  margin-left: 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-faint);
}
.term-body {
  padding: 16px 18px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
  height: 420px;
  overflow: hidden;
  white-space: pre-wrap;
  word-break: break-word;
}
.term-line { display: block; }
.term-prompt-char { color: var(--success); margin-right: 8px; }
.term-cmd { color: var(--text); }
.term-out-info { color: var(--text-dim); }
.term-out-success { color: var(--success); }
.term-out-accent { color: var(--accent); }
.term-out-dim { color: var(--text-faint); }
.term-logo { color: var(--accent); font-size: 0.55em; line-height: 1.3; letter-spacing: -0.02em; opacity: 0.9; }
.term-cursor {
  display: inline-block;
  width: 8px; height: 1.1em;
  background: var(--accent);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: term-blink 1s steps(2, jump-none) infinite;
}
@keyframes term-blink { 50% { opacity: 0; } }

.hero-trust {
  list-style: none;
  padding: 0; margin: 8px 0 0;
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  color: var(--text-dim);
  font-size: 14px;
}
.hero-trust li { display: inline-flex; align-items: center; gap: 8px; }
.trust-num {
  font-family: var(--mono);
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
}

/* Hero 2-col layout */
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(32px, 5vw, 56px);
  align-items: start;
}
.hero-content { min-width: 0; }

/* ─── Hero plan preview ─────────────────────────────────── */
.hero-preview {
  position: relative;
  top: 8px;
  min-height: 660px;
}
.pv-window {
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0,0,0,0.22), 0 0 0 1px var(--border);
  max-height: 480px;
  display: flex;
  flex-direction: column;
}

.pv-plan-window {
  position: absolute;
  top: 90px;
  left: 50%;
  right: -50%;
  z-index: 2;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0,0,0,0.28), 0 0 0 1px var(--border);
  max-height: 560px;
  display: flex;
  flex-direction: column;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.pv-plan-window.pv-screen--hidden {
  opacity: 0;
  transform: translateY(14px) scale(0.99);
  pointer-events: none;
}
.pv-plan-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 16px 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.pv-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--bg-elev-2);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.pv-dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.pv-dot-red   { background: #ff5f57; }
.pv-dot-amber { background: #ffbd2e; }
.pv-dot-green { background: #28c840; }
.pv-filename {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  margin-left: 6px;
}
.pv-body {
  position: relative;
  overflow: hidden;
  flex: 1;
  min-height: 420px;
}
.pv-prompt-screen,
.pv-plan-screen {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.pv-plan-screen {
  padding: 16px 16px 20px;
}
.pv-screen--hidden {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}
.pv-prompt-screen {
  padding: 18px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
}
/* ── Scaled-down replica of the real html-planner empty state ── */
.pv-ep-logo {
  font-family: var(--mono); font-size: 11px;
  color: var(--text-faint); letter-spacing: 0.04em;
}
.pv-ep-title {
  font-size: 15px; font-weight: 700; letter-spacing: -0.02em;
  color: var(--text); margin: 0; line-height: 1.2;
}
.pv-ep-composer {
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
.pv-ep-composer.pv-ep-composer--focus {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3), 0 0 0 2px rgba(124,156,255,0.12);
}
.pv-ep-textarea-wrap {
  padding: 11px 13px;
  font-size: 12px; color: var(--text); line-height: 1.6;
  min-height: 62px;
}
.pv-prompt-cursor {
  display: inline-block;
  width: 2px; height: 1em;
  background: var(--accent);
  vertical-align: text-bottom;
  margin-left: 1px;
  animation: term-blink 1s steps(2, jump-none) infinite;
}
.pv-ep-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 11px;
  border-top: 1px solid var(--border);
  background: var(--bg-elev-2);
}
.pv-ep-hint { font-size: 10px; color: var(--text-faint); font-family: var(--mono); }
.pv-ep-submit {
  background: var(--accent); color: #fff;
  border: none; border-radius: var(--radius-sm);
  padding: 4px 11px; font-size: 11px; font-weight: 600;
  cursor: pointer; letter-spacing: 0.01em; transition: opacity 0.15s;
}
.pv-ep-submit.pv-btn-flash { opacity: 0.6; }
.pv-ep-examples { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pv-ep-examples-label { font-size: 11px; color: var(--text-faint); font-family: var(--mono); }
.pv-ep-chip {
  font-size: 11px; color: var(--text-dim);
  background: var(--bg-elev); border: 1px solid var(--border);
  padding: 3px 9px; border-radius: 999px; cursor: default;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.pv-ep-chip.pv-ep-chip--active {
  background: var(--accent-dim); color: var(--accent); border-color: var(--accent);
}
.pv-ep-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
.pv-ep-feature-item {
  font-size: 10px;
  color: var(--text-dim);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  text-align: center;
  cursor: default;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pv-ep-feature-item.pv-ep-feat--active {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: var(--accent);
}
.pv-ep-depth { display: flex; align-items: center; gap: 8px; }
.pv-ep-depth-label { font-size: 11px; color: var(--text-faint); font-family: var(--mono); }
.pv-ep-depth-dial {
  display: flex;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-sm);
  overflow: hidden;
}
.pv-ep-depth-btn {
  font-size: 11px; color: var(--text-dim);
  background: transparent; border-right: 1px solid var(--border);
  padding: 3px 10px;
}
.pv-ep-depth-btn:last-child { border-right: none; }
.pv-ep-depth-btn.pv-ep-depth-active { background: var(--accent-dim); color: var(--accent); }

.pv-plan-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 14px;
  letter-spacing: -0.02em;
}

/* Section */
.pv-section { margin-bottom: 12px; }
.pv-section-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.pv-chevron { color: var(--text-faint); font-size: 10px; }
.pv-progress {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--success);
}

/* Step */
.pv-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 5px;
  background: var(--bg);
  transition: border-color 0.2s ease, background 0.2s ease;
  font-size: 12px;
  flex-wrap: wrap;
}
.pv-step[data-status="approved"] {
  border-color: rgba(74,222,128,0.3);
  background: rgba(74,222,128,0.04);
}
.pv-step-n {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--bg-elev-2);
  border: 1px solid var(--border-strong);
  font-family: var(--mono);
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  flex-shrink: 0;
}
.pv-step[data-status="approved"] .pv-step-n {
  background: var(--success-dim);
  border-color: var(--success);
  color: var(--success);
}
.pv-step-title { flex: 1; color: var(--text); min-width: 0; }
.pv-step[data-status="approved"] .pv-step-title { color: var(--text-dim); }

/* Pill */
.pv-pill {
  font-family: var(--mono);
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-faint);
  flex-shrink: 0;
  transition: all 0.25s ease;
}
.pv-pill-approved {
  background: var(--success-dim);
  border-color: var(--success);
  color: var(--success);
}

/* Step buttons */
.pv-step-btns {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.pv-btn-approve, .pv-btn-reject {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-elev-2);
  color: var(--text-dim);
  cursor: default;
  transition: all 0.15s ease;
}
.pv-btn-approve { color: var(--success); border-color: rgba(74,222,128,0.4); }
.pv-btn-approve.pv-btn-flash {
  background: var(--success-dim);
  border-color: var(--success);
  box-shadow: 0 0 0 2px rgba(74,222,128,0.25);
  transform: scale(1.06);
}
.pv-btn-reject { color: var(--danger); border-color: rgba(248,113,113,0.3); }
.pv-btn-reject.pv-btn-flash {
  background: var(--danger-dim);
  border-color: var(--danger);
  box-shadow: 0 0 0 2px rgba(248,113,113,0.25);
  transform: scale(1.06);
}

/* Rejected step */
.pv-step[data-status="rejected"] {
  border-color: rgba(248,113,113,0.3);
  background: rgba(248,113,113,0.04);
}
.pv-step[data-status="rejected"] .pv-step-n {
  background: var(--danger-dim);
  border-color: var(--danger);
  color: var(--danger);
}
.pv-step[data-status="rejected"] .pv-step-title {
  color: var(--text-faint);
  text-decoration: line-through;
}
.pv-pill-rejected {
  background: var(--danger-dim);
  border-color: var(--danger);
  color: var(--danger);
}

/* Inline comment — hidden until animated in */
.pv-comment {
  display: none;
  align-items: flex-start;
  gap: 5px;
  padding: 4px 8px;
  margin: -2px 0 6px 26px;
  border-left: 2px solid var(--accent);
  background: var(--accent-dim);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 10px;
  color: var(--text-dim);
}
.pv-comment.pv-comment--visible {
  display: flex;
  animation: pv-slide-down 0.28s ease;
}
@keyframes pv-slide-down {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}
.pv-comment-icon { flex-shrink: 0; }

/* Yellow inline highlight */
.pv-hl {
  border-radius: 2px;
  padding: 0 2px;
  transition: background 0.35s ease, box-shadow 0.35s ease;
}
.pv-hl--active {
  background: rgba(251,191,36,0.38);
  box-shadow: 0 0 0 2px rgba(251,191,36,0.18);
}

/* Mermaid-style diagram */
.pv-diagram {
  margin: 4px 0 10px;
  padding: 8px 6px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.pv-diagram-svg { width: 100%; height: auto; display: block; }

/* Step count badge next to plan title */
.pv-step-count {
  font-family: var(--mono);
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  color: var(--text-faint);
  vertical-align: middle;
  margin-left: 4px;
}

/* Done progress indicator */
.pv-progress-done { color: var(--success); }

/* Rule card */
.pv-rule {
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 12px;
}
.pv-rule-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}
.pv-badge-rule {
  font-family: var(--mono);
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--accent-dim);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.pv-rule-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-dim);
  padding: 3px 0;
  border-top: 1px solid var(--border);
}
.pv-rule-row:first-of-type { border-top: none; }
.pv-rule-val {
  font-family: var(--mono);
  font-size: 11px;
  background: var(--bg-elev-2);
  padding: 1px 6px;
  border-radius: 3px;
  color: var(--accent);
  transition: background 0.15s;
}

/* Question card */
.pv-question {
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-top: 12px;
}
.pv-question-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--text);
  margin-bottom: 8px;
}
.pv-q-icon {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.pv-question-opts { display: flex; flex-direction: column; gap: 5px; }
.pv-opt {
  font-size: 11px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elev-2);
  color: var(--text-dim);
  text-align: left;
  cursor: default;
  transition: all 0.2s ease;
}
.pv-opt.pv-opt-selected {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
}
.pv-opt.pv-opt-flash {
  transform: scale(0.98);
  background: var(--bg-elev);
}

/* ============================================================
   PROBLEM — side-by-side comparison
   ============================================================ */
.section-problem { background: var(--bg-elev); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.compare {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 12px 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
  overflow: hidden;
  min-height: 520px;
  margin-top: 12px;
}
.compare-pane {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative;
}
.compare-pane-md { background: var(--bg-elev-2); }
.compare-pane-html { background: var(--bg-elev); }

.compare-label {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.compare-label-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.compare-label-dot-md { background: var(--text-faint); }
.compare-label-dot-html { background: var(--success); }

.compare-md {
  flex: 1;
  margin: 0;
  background: transparent;
  border: none;
  padding: 0;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-dim);
  overflow: hidden;
  position: relative;
  white-space: pre-wrap;
}
.compare-md code { background: none; padding: 0; color: inherit; }
.compare-fade {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, var(--bg-elev-2));
  pointer-events: none;
}

.compare-divider {
  background: var(--border);
  position: relative;
  cursor: ew-resize;
  display: flex; align-items: center; justify-content: center;
}
.compare-divider:hover, .compare-divider:focus-within { background: var(--accent); }
.compare-divider-grip {
  position: absolute;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  color: var(--text-dim);
}

.compare-html-mock {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding-right: 4px;
}

/* Mock step cards inside compare */
.mock-step {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: var(--bg-elev-2);
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 10px;
  align-items: center;
  transition: border-color 0.18s ease;
}
.mock-step[data-status="approved"] { border-color: var(--success); box-shadow: 0 0 0 1px var(--success-dim) inset; }
.mock-step[data-status="rejected"] { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger-dim) inset; }
.mock-step-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  background: var(--bg);
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.mock-step-title {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}
.mock-step-controls {
  display: flex;
  gap: 4px;
}
.mock-pill {
  font-size: 11px;
  font-family: var(--mono);
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--text-faint);
  border: 1px solid var(--border);
}
.mock-pill-approved { color: var(--success); background: var(--success-dim); border-color: transparent; }
.mock-rule {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: var(--bg-elev-2);
  font-size: 12.5px;
}
.mock-rule-head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px;
}
.mock-badge {
  font-size: 10px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--accent-dim);
  color: var(--accent);
}
.mock-rule-field {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  color: var(--text-dim);
  border-bottom: 1px dashed var(--border);
  font-size: 12px;
}
.mock-rule-field:last-child { border-bottom: none; }
.mock-rule-field code { font-size: 11.5px; color: var(--text); }

/* ─── Mock: enriched elements ──────────────────────────── */

.mock-hero { padding: 2px 0 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.mock-hero-title { font-size: 14px; font-weight: 700; color: var(--text); margin: 0 0 5px; line-height: 1.3; text-align: center; }
.mock-hero-intro { font-size: 11.5px; color: var(--text-dim); line-height: 1.6; margin: 0; }

.mock-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-family: var(--mono);
  flex-wrap: wrap;
}
.mock-summary-ok { color: var(--success); }
.mock-summary-danger { color: var(--danger); }
.mock-summary-dim { color: var(--text-faint); }
.mock-summary-sep { color: var(--border-strong); }
.mock-summary-track {
  flex: 1;
  min-width: 60px;
  height: 4px;
  background: var(--bg-elev-2);
  border-radius: 99px;
  overflow: hidden;
  display: flex;
}
.mock-summary-fill { height: 100%; background: var(--success); }
.mock-summary-fill-danger { height: 100%; background: var(--danger); }

.mock-section-hd {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 0 2px;
  margin-top: 2px;
}
.mock-section-toggle { color: var(--text-faint); font-size: 10px; user-select: none; }
.mock-section-name {
  font-size: 10.5px;
  font-weight: 700;
  font-family: var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.mock-section-meta {
  font-size: 10px;
  color: var(--text-faint);
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 1px 6px;
  font-family: var(--mono);
}

.mock-diagram {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px 8px;
  background: var(--bg-elev-2);
}
.mock-diagram-lbl {
  font-size: 10px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.mock-diagram-lbl::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  flex-shrink: 0;
}
.mock-diag-svg { width: 100%; display: block; }
.mock-diag-svg .diag-line { stroke: var(--border-strong); stroke-width: 1.2; fill: none; }
.mock-diag-svg .diag-arrow { stroke: var(--border-strong); stroke-width: 1.2; fill: none; }
.mock-diag-svg .diag-node { fill: var(--bg); stroke: var(--border-strong); stroke-width: 1; }
.mock-diag-svg .diag-node-new { stroke: var(--success); stroke-width: 1.5; }
.mock-diag-svg .diag-node-dim { stroke: var(--border); }
.mock-diag-svg text {
  font-size: 9px;
  font-family: monospace;
  dominant-baseline: central;
  text-anchor: middle;
  fill: var(--text-dim);
}
.mock-diag-svg .diag-text-hi { fill: var(--text); }

.mock-step-inner { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mock-step-note {
  font-size: 11px;
  line-height: 1.4;
  border-radius: 3px;
  padding: 3px 6px;
  font-style: italic;
}
.mock-step-note-comment { color: var(--accent); background: var(--accent-dim); }
.mock-step-note-reject { color: var(--danger); background: var(--danger-dim); }

.mock-hl { background: rgba(251, 191, 36, 0.62); border-radius: 2px; padding: 0 3px; }

.mock-pill-rejected { color: var(--danger); background: var(--danger-dim); border-color: transparent; }
.mock-badge-config { background: transparent; color: var(--text-faint); border: 1px solid var(--border); }

.mock-question {
  border: 1px solid var(--warn);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: var(--bg-elev-2);
}
.mock-question-hd { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.mock-question-text { font-size: 12.5px; color: var(--text); font-weight: 500; line-height: 1.4; }
.mock-question-opts { display: flex; flex-direction: column; gap: 6px; }
.mock-question-opt {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-dim);
  cursor: default;
}
.mock-question-opt input[type="radio"] { accent-color: var(--accent); cursor: default; flex-shrink: 0; }

.mock-question-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.mock-qcard {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  background: var(--bg);
  cursor: default;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mock-qcard input[type="radio"] { display: none; }
.mock-qcard-title {
  font-weight: 600;
  font-size: 11.5px;
  color: var(--text);
}
.mock-qcard-desc {
  font-size: 10.5px;
  color: var(--text-dim);
  line-height: 1.35;
}
.mock-qcard:has(input[type="radio"]:checked) {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.mock-qcard:has(input[type="radio"]:checked) .mock-qcard-title {
  color: var(--accent);
}
.mock-badge-q { background: var(--warn-dim); color: var(--warn); }

.mock-rule-field-editing { background: var(--accent-dim); border-radius: 3px; padding: 4px 0; }
.mock-field-input {
  background: var(--bg-elev-2);
  border: 1px solid var(--accent);
  border-radius: 3px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
  padding: 1px 5px;
  outline: none;
  box-shadow: 0 0 0 2px var(--accent-dim);
  width: 58px;
}
.mock-field-save {
  font-size: 10px;
  font-family: var(--mono);
  background: var(--accent);
  color: var(--bg);
  border-radius: 3px;
  padding: 2px 6px;
  cursor: default;
  white-space: nowrap;
  flex-shrink: 0;
}

.compare-hint {
  text-align: center;
  color: var(--text-faint);
  font-size: 13px;
  margin: 14px 0 0;
}

/* ============================================================
   PLAYGROUND
   ============================================================ */
.playground-examples {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 16px;
}
.chip {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-family: var(--mono);
  min-height: 36px;
  transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
}
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip[aria-selected="true"] {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}
.chip-reset { margin-left: auto; }

.playground {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  padding: 16px;
  min-height: 600px;
  container-type: inline-size;
}
.playground-editor-pane,
.playground-preview-pane {
  display: flex;
  flex-direction: column;
  min-height: 480px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.playground-pane-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: var(--bg-elev-2);
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.playground-pane-meta { color: var(--text-dim); font-size: 11px; text-transform: none; letter-spacing: 0.05em; }
.playground-editor {
  flex: 1;
  border: none;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  padding: 16px 18px;
  resize: none;
  outline: none;
  width: 100%;
  min-height: 440px;
  tab-size: 2;
}
.playground-editor:focus { background: var(--bg); }
.playground-iframe {
  flex: 1;
  border: none;
  width: 100%;
  background: var(--bg);
  min-height: 440px;
}

/* ============================================================
   FEATURES
   ============================================================ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  container-type: inline-size;
}
.feature-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 22px;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.feature-card h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}
.feature-card p {
  margin: 0;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.6;
}
.feature-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.feature-icon-success { background: var(--success-dim); color: var(--success); }
.feature-icon-accent { background: var(--accent-dim); color: var(--accent); }
.feature-icon-warn { background: var(--warn-dim); color: var(--warn); }
.feature-icon-info { background: var(--accent-dim); color: var(--info); }
.feature-icon-danger { background: var(--danger-dim); color: var(--danger); }

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.section-how { background: var(--bg-elev); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.how-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 14px;
  align-items: stretch;
}
.how-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
}
.how-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 14px 0 8px;
}
.how-card p { color: var(--text-dim); font-size: 14px; line-height: 1.6; margin: 0; }
.how-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
}
.how-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--text-faint);
  padding: 0 4px;
}

/* ============================================================
   AGENT COMPATIBILITY
   ============================================================ */
.agents-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.agents-tab {
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 12px 18px;
  font-size: 14px;
  border-bottom: 2px solid transparent;
  transition: color 0.12s ease, border-color 0.12s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-bottom: -1px;
}
.agents-tab:hover { color: var(--text); }
.agents-tab[aria-selected="true"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.agent-logo { font-size: 16px; color: var(--accent); }

.agents-panel p { color: var(--text-dim); font-size: 15px; max-width: 720px; line-height: 1.6; }

.code-block {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.55;
  margin: 16px 0;
}
.code-block code { background: none; padding: 0; color: var(--text); white-space: pre; }

/* ============================================================
   DEMO VIDEO
   ============================================================ */
.section-video { background: var(--bg-elev); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.video-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

/* ── Demo loop ──────────────────────────────────────────── */
.demo-loop {
  position: absolute; inset: 0;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse at center, var(--accent-dim), transparent 60%),
    var(--bg-elev);
}
.demo-phase-bar {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 16px 0 0;
  flex-shrink: 0;
}
.demo-phase-pip {
  font-size: 12px;
  color: var(--text-faint);
  padding: 4px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.3s ease;
  font-family: var(--mono);
}
.demo-phase-pip--active {
  color: var(--accent);
  background: var(--accent-dim);
  border-color: rgba(124, 156, 255, 0.25);
}

.demo-scene {
  position: absolute;
  inset: 48px 0 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}
.demo-scene--active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.demo-card {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  max-width: 440px;
  width: 100%;
  box-shadow: var(--shadow);
}
.demo-brand {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 8px;
  font-weight: 600;
}
.demo-scene-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 14px;
}
.demo-prompt-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  min-height: 36px;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 12px;
}
.demo-prompt-cursor {
  display: inline-block;
  width: 2px; height: 1em;
  background: var(--accent);
  vertical-align: text-bottom;
  margin-left: 1px;
  animation: term-blink 1s steps(2, jump-none) infinite;
}
.demo-features {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.demo-feat {
  font-size: 11px;
  color: var(--text-dim);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}
.demo-feat.demo-feat--active {
  color: var(--accent);
  background: var(--accent-dim);
  border-color: var(--accent);
}
.demo-depth-zone {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.demo-depth-label {
  font-size: 11px;
  color: var(--text-faint);
  font-family: var(--mono);
}
.demo-depth-dial {
  display: flex;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.demo-depth-btn {
  font-size: 11px;
  color: var(--text-dim);
  background: transparent;
  border-right: 1px solid var(--border);
  padding: 3px 10px;
}
.demo-depth-btn:last-child {
  border-right: none;
}
.demo-depth-btn.demo-depth-btn--active {
  background: var(--accent-dim);
  color: var(--accent);
}
.demo-submit {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: default;
  transition: opacity 0.15s;
  width: 100%;
}
.demo-submit.demo-flash { opacity: 0.6; }

/* Phase 2: Review */
.demo-card-review { padding: 20px 24px; }
.demo-plan-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--text);
}
.demo-step-count {
  font-size: 11px;
  color: var(--text-faint);
  font-family: var(--mono);
}
.demo-step-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
  font-size: 12px;
  background: var(--bg);
  transition: border-color 0.25s, background 0.25s;
}
.demo-step-row[data-s="approved"] {
  border-color: rgba(74, 222, 128, 0.3);
  background: rgba(74, 222, 128, 0.04);
}
.demo-step-row[data-s="rejected"] {
  border-color: rgba(248, 113, 113, 0.3);
  background: rgba(248, 113, 113, 0.04);
}
.demo-sn {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--bg-elev-2);
  color: var(--text-faint);
  font-size: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
  flex-shrink: 0;
}
.demo-st { flex: 1; color: var(--text); }
.demo-pill {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-faint);
  font-family: var(--mono);
  transition: all 0.2s ease;
}
.demo-pill.demo-pill--approved {
  color: var(--success);
  background: var(--success-dim);
  border-color: rgba(74, 222, 128, 0.3);
}
.demo-pill.demo-pill--rejected {
  color: var(--danger);
  background: var(--danger-dim);
  border-color: rgba(248, 113, 113, 0.3);
}
.demo-comment {
  font-size: 11px;
  color: var(--accent);
  padding: 4px 10px 4px 28px;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.3s ease, max-height 0.3s ease;
}
.demo-comment.demo-comment--visible {
  opacity: 1;
  max-height: 40px;
}
.demo-progress-bar {
  height: 3px;
  background: var(--bg);
  border-radius: 2px;
  margin-top: 10px;
  overflow: hidden;
}
.demo-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--success));
  border-radius: 2px;
  transition: width 0.4s ease;
}

/* Phase 3: Build */
.demo-card-build { text-align: center; padding: 32px; }
.demo-build-icon {
  font-size: 28px;
  color: var(--accent);
  margin-bottom: 8px;
  animation: demo-spin 3s linear infinite;
}
@keyframes demo-spin { to { transform: rotate(360deg); } }
.demo-activity {
  text-align: left;
  margin-top: 16px;
}
.demo-activity-item {
  font-size: 12px;
  color: var(--success);
  padding: 3px 0;
  font-family: var(--mono);
}
.demo-activity-current {
  color: var(--accent);
  animation: pulse-text 1.5s ease-in-out infinite;
}
@keyframes pulse-text { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ============================================================
   INSTALL TABS
   ============================================================ */
.install-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.install-tab {
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 12px 18px;
  font-size: 14px;
  border-bottom: 2px solid transparent;
  transition: color 0.12s ease, border-color 0.12s ease;
  min-height: 44px;
  margin-bottom: -1px;
}
.install-tab:hover { color: var(--text); }
.install-tab[aria-selected="true"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.install-panel p { color: var(--text-dim); font-size: 15px; margin: 0 0 16px; }
.install-meta { color: var(--text-faint); font-size: 13px; margin-top: 12px; }
.install-requirements {
  margin-top: 28px;
  text-align: center;
  color: var(--text-faint);
  font-size: 14px;
}
.install-requirements strong { color: var(--text); }



/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  padding: 48px 0 40px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.footer-inner {
  display: grid;
  gap: 16px;
  text-align: center;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.footer-brand .brand-name { font-size: 15px; color: var(--text); }
.footer-tagline { color: var(--text-faint); font-size: 13px; }
.footer-links {
  display: inline-flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--text-dim);
  font-size: 14px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}
.footer-links a:hover { background: var(--bg-elev-2); color: var(--text); text-decoration: none; }
.footer-meta { color: var(--text-faint); font-size: 13px; margin: 0; }

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-preview { display: none; }
}

/* md — 768px and down: stack two-col layouts, switch playground to vertical */
@media (max-width: 1023px) {
  section { padding: 64px 0; }
  .nav-links { display: none; } /* compact mobile nav */
  .nav-actions { gap: 6px; }
  .playground { grid-template-columns: 1fr; min-height: auto; }
  .playground-editor-pane { min-height: 280px; }
  .playground-preview-pane { min-height: 540px; }
  .playground-editor { min-height: 240px; }
  .playground-iframe { min-height: 500px; }
  .compare { grid-template-columns: 1fr; min-height: auto; }
  .compare-divider { display: none; }
  .compare-pane { min-height: 320px; }
  .how-grid { grid-template-columns: 1fr; gap: 12px; }
  .how-arrow { transform: rotate(90deg); padding: 0; }
}

/* sm — 600px and down */
@media (max-width: 600px) {
  .container { padding: 0 18px; }
  .hero { padding-top: 48px; padding-bottom: 56px; }
  .hero-eyebrow { font-size: 11px; }
  .hero-ctas { flex-direction: column; align-items: stretch; gap: 12px; }
  .install-block { width: 100%; flex-wrap: wrap; }
  .install-command { font-size: 13px; }
  .btn-secondary { justify-content: center; }
  .hero-terminal { font-size: 12px; }
  .term-body { font-size: 12px; padding: 12px 14px; height: 340px; }
  .hero-trust { gap: 18px; font-size: 13px; }
  .footer-links { gap: 2px; }
  .compare-html-mock { gap: 8px; }
  .agents-tab, .install-tab { padding: 10px 14px; }
}

/* xs — 380px and down */
@media (max-width: 380px) {
  .site-nav { gap: 12px; padding: 0 14px; }
  .gh-stars { padding: 5px 9px; font-size: 11px; }
  .brand-name { font-size: 13px; }
  section { padding: 48px 0; }
  .section-title { font-size: clamp(1.4rem, 6vw, 1.8rem); }
  .hero-title { font-size: clamp(1.7rem, 8vw, 2.4rem); }
}

/* xl — center container above 1440px */
@media (min-width: 1440px) {
  :root { --container: 1200px; }
}

/* prefers-reduced-motion */
@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;
  }
  .term-cursor { animation: none; opacity: 1; }
}
