/* TLDL/R — Demo-first marketing */

:root {
  --bg: #fafafa;
  --text: #0a0a0a;
  --text-muted: #737373;
  --border: #e5e5e5;
  --accent: #7c3aed;
  --accent-soft: rgba(124, 58, 237, .12);
  --gradient-accent: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
  --radius: 10px;
}

[data-theme="light"] {
  --accent: #7c3aed;
  --accent-soft: rgba(124, 58, 237, .12);
  --gradient-accent: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
  --cta-bg: #A7C7FF;
}

[data-theme="dark"] {
  --bg: #0a0a0a;
  --text: #fafafa;
  --text-muted: #a3a3a3;
  --border: #262626;
  --accent: #8ab4f8;
  --accent-soft: rgba(138, 180, 248, .15);
  --gradient-accent: linear-gradient(135deg, #8ab4f8 0%, #6b9ed9 100%);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0a0a;
    --text: #fafafa;
    --text-muted: #a3a3a3;
    --border: #262626;
    --accent: #8ab4f8;
    --accent-soft: rgba(138, 180, 248, .15);
    --gradient-accent: linear-gradient(135deg, #8ab4f8 0%, #6b9ed9 100%);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4rem; }

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

body {
  margin: 0;
  font-family: "Instrument Sans", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  transition: background .25s ease, color .25s ease;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-top: 2px solid var(--accent);
  padding: 1rem 2rem;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
}

.header-cta {
  display: none;
  align-items: center;
  gap: 0.5rem;
  position: absolute;
  right: 4rem;
  top: 50%;
  transform: translateY(-50%);
}
.header-cta.visible {
  display: flex;
}
.header-cta .btn-cta-compact {
  flex: 0 0 6.5rem;
  width: 6.5rem;
  height: 2.375rem;
  min-height: 2.375rem;
  min-width: 0;
  max-width: 6.5rem;
}
.btn-cta-compact {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 6px;
  box-sizing: border-box;
  justify-content: center;
  text-decoration: none;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color .2s, background .2s, border-color .2s;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.btn-cta-compact .btn-icon {
  width: 0.9rem;
  height: 0.9rem;
  flex-shrink: 0;
}
.btn-cta-compact:hover {
  opacity: 0.92;
}
.btn-cta-github {
  background: #fff;
  color: #0a0a0a;
  border-color: rgba(0,0,0,.15);
}
[data-theme="dark"] .btn-cta-github,
:root:not([data-theme="light"]) .btn-cta-github {
  background: #fff;
  color: #0a0a0a;
  border-color: rgba(255,255,255,.25);
}
.btn-cta-primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--text);
  text-decoration: none;
}
.logo:hover { color: var(--accent); }
/* Compact header (scrolled): show icon only for CTAs */
.site-header.compact .logo-text { display: none; }
.logo-icon {
  display: block;
  border-radius: 50%;
  flex-shrink: 0;
}

.nav { display: flex; gap: 2rem; }
.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
}
.nav a:hover { color: var(--accent); }

@media (max-width: 768px) {
  .nav { display: none; }
  .hero-ctas .btn {
    min-height: 43px;
  }
}

.theme-toggle {
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.theme-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}
.theme-icon svg {
  width: 1.125rem;
  height: 1.125rem;
}
.theme-icon.sun { display: none; }
.theme-icon.moon { display: flex; }
[data-theme="dark"] .theme-icon.sun,
:root:not([data-theme="light"]) .theme-icon.sun { display: flex; }
[data-theme="dark"] .theme-icon.moon,
:root:not([data-theme="light"]) .theme-icon.moon { display: none; }

/* Scroll animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}
.features-list .feature-item.animate-on-scroll:nth-child(1) { transition-delay: 0s; }
.features-list .feature-item.animate-on-scroll:nth-child(2) { transition-delay: 0.05s; }
.features-list .feature-item.animate-on-scroll:nth-child(3) { transition-delay: 0.1s; }
.features-list .feature-item.animate-on-scroll:nth-child(4) { transition-delay: 0.15s; }
.features-list .feature-item.animate-on-scroll:nth-child(5) { transition-delay: 0.2s; }
.features-list .feature-item.animate-on-scroll:nth-child(6) { transition-delay: 0.25s; }

/* Hero — black in dark mode, white in light mode */
.hero {
  padding: 2rem 2rem 1.5rem;
  text-align: left;
  background: #000;
  transition: transform 0.1s linear;
}

[data-theme="light"] .hero,
:root[data-theme="light"] .hero {
  background: #fff;
}

[data-theme="light"] .hero-title,
:root[data-theme="light"] .hero-title {
  color: #1a1a1a;
}

[data-theme="light"] .hero-subtitle,
:root[data-theme="light"] .hero-subtitle {
  color: rgba(0, 0, 0, .6);
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.hero-title {
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(1.75rem, 4.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 0.5rem;
  color: #fff;
}

.hero-title em {
  font-style: italic;
}


.hero-accent {
  color: var(--accent);
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, .7);
  margin: 0 0 1rem;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: flex-start;
}

/* Demo — contained middle section with bg image (Cursor-style) */
.demo {
  padding: 2.5rem 2rem;
  background: #000;
}

[data-theme="light"] .demo,
:root[data-theme="light"] .demo {
  background: #fff;
}

.demo-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 2rem;
  background-image: url("assets/demo-bg.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
}

.demo-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.3) 0%, rgba(0,0,0,.15) 40%, rgba(0,0,0,.2) 100%);
  border-radius: 12px;
  pointer-events: none;
}

.demo-inner > * {
  position: relative;
  z-index: 1;
}

.demo-inner .demo-panel {
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.demo-label {
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, .9);
  margin: 1rem 0 0;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0,0,0,.4);
}

[data-theme="light"] .demo-label,
:root[data-theme="light"] .demo-label {
  color: var(--text-muted);
  text-shadow: none;
}

.demo-panel {
  --demo-bg: #1a1a1a;
  --demo-text: #e8e8e8;
  --demo-muted: #9aa0a6;
  --demo-border: #3c4043;
  --demo-accent: #8ab4f8;
}

[data-theme="light"] .demo-panel,
:root[data-theme="light"] .demo-panel {
  --demo-bg: #ffffff;
  --demo-text: #1a1a1a;
  --demo-muted: #5f6368;
  --demo-border: #e8eaed;
  --demo-accent: #7c3aed;
}

.demo-panel {
  background: var(--demo-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.15), 0 0 0 1px rgba(0,0,0,.05), 0 24px 48px rgba(0,0,0,.25);
}

[data-theme="dark"] .demo-panel,
:root:not([data-theme="light"]) .demo-panel {
  box-shadow: 0 8px 32px rgba(0,0,0,.4), 0 0 0 1px rgba(255,255,255,.05), 0 24px 48px rgba(0,0,0,.5);
}

.demo-header {
  padding: 18px;
  border-bottom: 1px solid var(--demo-border);
  background: var(--demo-bg);
}

.demo-logo {
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--demo-text);
}

.demo-content {
  padding: 18px;
}

.demo-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 20px;
  color: var(--demo-text);
  line-height: 1.3;
}

.demo-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--demo-muted);
  margin: 0 0 12px;
}

.demo-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 18px;
}

.demo-tab {
  padding: 8px 18px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--demo-border);
  border-radius: 8px;
  background: transparent;
  color: var(--demo-muted);
  cursor: pointer;
  transition: color .2s, background .2s, border-color .2s;
}

.demo-tab:hover {
  color: var(--demo-text);
  background: rgba(255,255,255,.05);
  border-color: var(--demo-muted);
}

[data-theme="light"] .demo-tab:hover,
:root[data-theme="light"] .demo-tab:hover {
  background: rgba(0,0,0,.04);
}

.demo-tab.active {
  color: var(--demo-accent);
  background: rgba(138, 180, 248, .15);
  border-color: var(--demo-accent);
}

[data-theme="light"] .demo-tab.active,
:root[data-theme="light"] .demo-tab.active {
  background: rgba(124, 58, 237, .1);
  border-color: var(--demo-accent);
}

.demo-body {
  height: 450px;
  overflow-y: auto;
  padding: 18px 0;
  position: relative;
}

.demo-pane {
  font-family: "Fira Code", "SF Mono", "JetBrains Mono", "Menlo", monospace;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--demo-text);
  position: absolute;
  top: 18px;
  left: 0;
  right: 0;
  bottom: 18px;
  overflow-y: auto;
  transition: opacity 0.25s ease;
}
.demo-pane.hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}
.demo-pane:not(.hidden) {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.demo-summary .demo-paragraph {
  margin: 0 0 0.75rem;
  line-height: 1.6;
}

.demo-summary .demo-paragraph:last-of-type { margin-bottom: 0.5rem; }

.demo-summary .demo-paragraph:has(.demo-heading):not(:first-child) {
  margin-top: 2rem;
}

.demo-summary .demo-heading {
  font-weight: 700;
  font-size: 1em;
  color: var(--demo-text);
  display: block;
  margin-bottom: 0.35rem;
}

.demo-summary .demo-heading .demo-hash {
  color: var(--demo-accent);
  font-weight: 600;
  margin-right: 0.2em;
}

.demo-summary .demo-emphasis {
  font-weight: 600;
  color: inherit;
}

.demo-summary .demo-timestamp {
  color: var(--demo-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  font-weight: 500;
}

.demo-summary .demo-timestamp:hover {
  opacity: 0.9;
}

.demo-summary ul {
  margin: 0;
  padding-left: 1.2rem;
}

.demo-summary li {
  margin-bottom: 0.35rem;
}

.demo-watch-yt {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--demo-accent);
  text-decoration: none;
  transition: opacity 0.2s;
}

.demo-watch-yt:hover {
  opacity: 0.85;
}

.demo-watch-yt-icon {
  width: 0.75rem;
  height: 0.75rem;
  flex-shrink: 0;
}

.demo-timestamp {
  color: var(--demo-accent);
  text-decoration: none;
  cursor: pointer;
  padding: 0 2px;
  border-radius: 3px;
}

.demo-timestamp:hover {
  text-decoration: underline;
  background: rgba(138, 180, 248, .2);
}

[data-theme="light"] .demo-timestamp:hover,
:root[data-theme="light"] .demo-timestamp:hover {
  background: rgba(124, 58, 237, .15);
}

.demo-transcript p {
  margin: 0 0 0.4rem;
  padding: 4px 8px;
  margin-left: -8px;
  margin-right: -8px;
  color: var(--demo-text);
  border-radius: 6px;
  transition: background 0.2s;
}

.demo-transcript p.highlight {
  background: rgba(138, 180, 248, .2);
}

[data-theme="light"] .demo-transcript p.highlight,
:root[data-theme="light"] .demo-transcript p.highlight {
  background: rgba(124, 58, 237, .15);
}

.demo-ts {
  color: var(--demo-muted);
  font-variant-numeric: tabular-nums;
  margin-right: 0.4rem;
  cursor: pointer;
}

.demo-ts:hover { color: var(--demo-accent); }

.demo-chat {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--demo-border);
  position: relative;
}

.demo-chat-suggestion {
  font-size: 0.8rem;
  color: var(--demo-accent);
  margin-bottom: 8px;
  padding: 6px 10px;
  background: rgba(138, 180, 248, .1);
  border-radius: 6px;
  cursor: pointer;
  display: inline-block;
}

[data-theme="light"] .demo-chat-suggestion,
:root[data-theme="light"] .demo-chat-suggestion {
  background: rgba(124, 58, 237, .08);
}

.demo-chat-suggestion:hover {
  background: rgba(138, 180, 248, .2);
}

.demo-chat-suggestion.hidden {
  display: none;
}

[data-theme="light"] .demo-chat-suggestion:hover,
:root[data-theme="light"] .demo-chat-suggestion:hover {
  background: rgba(124, 58, 237, .15);
}

/* Chat overlay (extension-style) — sits above ask bar */
.demo-chat-overlay {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  margin-bottom: 8px;
  height: 200px;
  min-height: 100px;
  max-height: 320px;
  background: var(--demo-bg);
  border: 1px solid var(--demo-border);
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -4px 20px rgba(0,0,0,.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 20;
}

[data-theme="light"] .demo-chat-overlay,
:root[data-theme="light"] .demo-chat-overlay {
  box-shadow: 0 -4px 20px rgba(0,0,0,.08);
}

.demo-chat-overlay.hidden {
  display: none;
}

.demo-chat-overlay--tall {
  height: 320px;
}

.demo-chat-overlay-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--demo-border);
  background: var(--demo-bg);
}

.demo-chat-overlay-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--demo-text);
}

.demo-chat-overlay-close {
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--demo-muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.demo-chat-overlay-close:hover {
  background: rgba(255,255,255,.06);
  color: var(--demo-text);
}

.demo-chat-overlay-messages {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.demo-chat-msg {
  font-size: 0.85rem;
  line-height: 1.5;
  max-width: 95%;
}

.demo-chat-msg.user {
  align-self: flex-end;
  background: rgba(138, 180, 248, .2);
  color: var(--demo-text);
  padding: 8px 12px;
  border-radius: 12px 12px 4px 12px;
}

[data-theme="light"] .demo-chat-msg.user,
:root[data-theme="light"] .demo-chat-msg.user {
  background: rgba(124, 58, 237, .12);
}

.demo-chat-msg.assistant {
  align-self: flex-start;
  background: rgba(255,255,255,.05);
  padding: 8px 12px;
  border-radius: 12px 12px 12px 4px;
  white-space: pre-wrap;
  word-break: break-word;
}

[data-theme="light"] .demo-chat-msg.assistant,
:root[data-theme="light"] .demo-chat-msg.assistant {
  background: rgba(0,0,0,.04);
}

.demo-chat-msg.assistant a {
  color: var(--demo-accent);
  text-decoration: none;
}
.demo-chat-msg.assistant a:hover {
  text-decoration: underline;
}

.demo-ask-wrap {
  position: relative;
}
.demo-command-popup {
  position: absolute;
  left: 0;
  bottom: 100%;
  margin-bottom: 6px;
  min-width: 260px;
  max-width: 320px;
  padding: 6px 0;
  background: var(--demo-bg);
  border: 1px solid var(--demo-border);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
  z-index: 30;
}
.demo-command-popup.hidden {
  display: none;
}
.demo-command-hint {
  margin: 8px 14px 6px;
  padding-top: 8px;
  border-top: 1px solid var(--demo-border);
  font-size: 0.7rem;
  color: var(--demo-muted);
}
.demo-command-hint .kbd {
  display: inline-block;
  padding: 1px 4px;
  font-family: inherit;
  font-size: 0.65rem;
  background: rgba(255,255,255,.08);
  border: 1px solid var(--demo-border);
  border-radius: 4px;
  margin: 0 1px;
}
.demo-command-option {
  padding: 8px 14px;
  font-size: 13px;
  color: var(--demo-text);
  cursor: pointer;
}
.demo-command-option:hover {
  background: rgba(255,255,255,.06);
}
[data-theme="light"] .demo-command-option:hover,
:root[data-theme="light"] .demo-command-option:hover {
  background: rgba(0,0,0,.04);
}
.demo-ask-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255,255,255,.06);
  border-radius: 8px;
  border: 1px solid var(--demo-border);
}

[data-theme="light"] .demo-ask-bar,
:root[data-theme="light"] .demo-ask-bar {
  background: rgba(0,0,0,.04);
}

.demo-ask-input {
  flex: 1;
  min-width: 0;
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--demo-text);
  background: transparent;
  border: none;
  outline: none;
}

.demo-ask-input-editable {
  min-height: 36px;
  padding: 6px 0;
  line-height: 1.5;
  overflow-y: auto;
  max-height: 100px;
}

.demo-ask-input-editable:empty::before {
  content: attr(data-placeholder);
  color: var(--demo-muted);
}

.demo-ask-input-editable:focus {
  outline: none;
}

/* Context pill – pasted/copied text from summary/transcript */
.demo-context-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  margin: 0 2px 6px 2px;
  border-radius: 10px;
  background: rgba(138, 180, 248, 0.2);
  color: var(--demo-text);
  font-size: 0.8rem;
  font-family: inherit;
  white-space: pre-wrap;
  word-break: break-word;
  max-width: 100%;
  max-height: 72px;
  overflow-y: auto;
  vertical-align: baseline;
  cursor: default;
  user-select: none;
}

[data-theme="light"] .demo-context-pill,
:root[data-theme="light"] .demo-context-pill {
  background: rgba(124, 58, 237, 0.12);
}

.demo-context-pill::before {
  content: "";
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  background: var(--demo-muted);
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='16' y1='13' x2='8' y2='13'/%3E%3Cline x1='16' y1='17' x2='8' y2='17'/%3E%3Cline x1='10' y1='9' x2='8' y2='9'/%3E%3C/svg%3E");
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
}

/* Floating "Add to chat" button on text selection */
.demo-selection-chat-btn {
  position: fixed;
  z-index: 100;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--demo-accent, #8ab4f8);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease, background 0.15s ease;
}
.demo-selection-chat-btn:hover {
  transform: scale(1.08);
  background: var(--demo-accent, #8ab4f8);
  filter: brightness(1.1);
}
.demo-selection-chat-btn::before {
  content: "";
  width: 18px;
  height: 18px;
  background: currentColor;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E");
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
}
.demo-selection-chat-btn.hidden {
  display: none;
}
[data-theme="light"] .demo-selection-chat-btn,
:root[data-theme="light"] .demo-selection-chat-btn {
  background: var(--demo-accent, #7c3aed);
}

.demo-send {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--demo-accent);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background .2s;
}

.demo-send:hover {
  background: rgba(138, 180, 248, .2);
}

/* Toast */
.demo-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 10px 18px;
  font-size: 0.875rem;
  background: var(--text);
  color: var(--bg);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
  opacity: 0;
  transition: transform .25s ease, opacity .25s ease;
  z-index: 1000;
  pointer-events: none;
}

.demo-toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Research */
.features {
  padding: 3rem 1.5rem;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.features-inner {
  max-width: 1000px;
  margin: 0 auto;
}

.features-inner .section-title {
  text-align: center;
  margin-bottom: 0.5rem;
}

.features-inner .section-lead {
  text-align: center;
  margin-bottom: 2rem;
}

.features-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 520px;
  margin: 0 auto;
}

@media (min-width: 720px) {
  .features-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 720px;
    gap: 1.5rem 2rem;
  }
}

.feature-item {
  padding-left: 1.5rem;
  border-left: 3px solid var(--accent);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.feature-item:hover {
  transform: translateX(2px);
}

.feature-text h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
  color: var(--text);
}

.feature-text p {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0;
}

.section-title {
  font-size: clamp(1.4rem, 3vw, 1.75rem);
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--text);
}

.section-lead {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0 0 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background .2s, color .2s;
}

.btn-primary {
  background: var(--gradient-accent);
  color: #0a0a0a;
}

[data-theme="light"] .btn-primary {
  background: var(--cta-bg);
}

.btn-primary:hover { filter: brightness(1.08); }

.btn-ghost {
  background: var(--accent-soft);
  color: var(--text);
  border: 1px solid var(--border);
}

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

.btn-white {
  background: #ffffff;
  color: #0a0a0a;
  border: 1px solid rgba(0,0,0,.1);
}

.btn-white:hover {
  background: #f5f5f5;
  border-color: rgba(0,0,0,.15);
}

[data-theme="dark"] .btn-white,
:root:not([data-theme="light"]) .btn-white {
  background: #ffffff;
  color: #0a0a0a;
  border-color: rgba(255,255,255,.2);
}

[data-theme="dark"] .btn-white:hover,
:root:not([data-theme="light"]) .btn-white:hover {
  background: #f0f0f0;
}
[data-theme="dark"] .btn-ghost:hover,
:root:not([data-theme="light"]) .btn-ghost:hover { background: rgba(138, 180, 248, .25); }

.btn-icon { width: 1.1rem; height: 1.1rem; }

/* CTA claim */
.cta-claim {
  padding: 3rem 1.5rem;
  text-align: center;
  background: var(--bg);
}

.cta-claim::before {
  content: '';
  display: block;
  width: 3rem;
  height: 2px;
  margin: 0 auto 3rem;
  background: var(--border);
}

.cta-claim-inner {
  max-width: 560px;
  margin: 0 auto;
}

.cta-claim-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--text);
}

.cta-claim-icon svg {
  width: 2.5rem;
  height: 2.5rem;
}

.cta-claim-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
  color: var(--text);
}

.cta-claim-sub {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-brand {
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

.footer-links { display: flex; gap: 1.5rem; }
.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
}
.footer-links a:hover { color: var(--accent); }

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
  width: 100%;
  text-align: center;
}

/* Waitlist modal */
.waitlist-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  animation: waitlist-fade-in 0.25s ease-out;
}
.waitlist-modal.hidden {
  display: none;
}
@keyframes waitlist-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.waitlist-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.2s ease;
}
.waitlist-modal-content {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.75rem 2rem;
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.03);
  animation: waitlist-scale-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
[data-theme="dark"] .waitlist-modal-content,
:root:not([data-theme="light"]) .waitlist-modal-content {
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06);
}
@keyframes waitlist-scale-in {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(-8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
.waitlist-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background 0.15s ease;
}
.waitlist-modal-close:hover {
  color: var(--text);
  background: var(--accent-soft);
}
.waitlist-modal-title {
  font-family: "JetBrains Mono", monospace;
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 1.25rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
.waitlist-form input {
  width: 100%;
  padding: 0.75rem 0;
  font-family: inherit;
  font-size: 1.05rem;
  border: none;
  border-bottom: 2px solid var(--border);
  background: transparent;
  color: var(--text);
  margin-bottom: 0.5rem;
  box-sizing: border-box;
  transition: border-color 0.2s ease;
}
.waitlist-form input::placeholder {
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.waitlist-form input:focus {
  outline: none;
  border-bottom-color: var(--accent);
}
.waitlist-form input.invalid {
  border-bottom-color: #dc2626;
}
.waitlist-error {
  font-size: 0.85rem;
  color: #dc2626;
  margin: 0.5rem 0 0;
}
.waitlist-error.hidden,
.waitlist-success.hidden {
  display: none;
}
.waitlist-success {
  font-size: 0.9rem;
  color: #16a34a;
  margin: 0.5rem 0 0.75rem;
}
.waitlist-form button[type="submit"] {
  width: 100%;
  margin-top: 1.25rem;
  padding: 0.9rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 10px;
  transition: filter 0.2s ease, transform 0.1s ease;
}
.waitlist-form button[type="submit"]:hover {
  filter: brightness(1.05);
}
.waitlist-form button[type="submit"]:active {
  transform: scale(0.99);
}
.waitlist-form .kbd-hint {
  font-size: 0.8em;
  opacity: 0.7;
  margin-left: 0.35em;
}
