/* 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: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  padding: 1rem 2rem;
  transition: background .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.site-header { pointer-events: none; }
.site-header.scrolled { padding-top: 0.75rem; }

.header-inner {
  pointer-events: auto;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: max-width .45s cubic-bezier(.4, 0, .2, 1), padding .45s cubic-bezier(.4, 0, .2, 1), background .3s, border-color .3s, box-shadow .3s;
}
/* Scrolled: a narrower frosted pill with rounded edges */
.site-header.scrolled .header-inner {
  max-width: 900px;
  padding: 0.4rem 0.5rem 0.4rem 1.1rem;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  border-color: var(--border);
  box-shadow: 0 10px 36px rgba(0, 0, 0, .18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.site-header.scrolled .header-cta { position: static; transform: none; }
.site-header.scrolled .theme-toggle { border-radius: 50%; }

.header-cta {
  display: none;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}
.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 0;
  position: relative;
}


.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: none;
}

.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: 1rem 1.5rem 5rem;
  text-align: center;
  background: transparent;
}

.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;
}

/* Interactive demo: source in a mock browser, side panel summarizes it on click */
.demo-sources {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 1rem;
}

.demo-sources-label {
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-right: 4px;
}

.demo-source-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}

.demo-source-btn svg { width: 12px; height: 12px; }
.demo-source-btn:hover { color: var(--text); border-color: var(--text-muted); }

.demo-source-btn.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.demo-browser {
  --frame-bar: #3c3f47;
  --frame-url: #282a2f;
  --frame-text: #e8eaed;
  --frame-muted: #9aa0a6;
  --page-bg: #0f0f0f;
  --page-text: #f1f1f1;
  --page-muted: #aaa;
  --skeleton: rgba(255, 255, 255, .09);
  display: flex;
  flex-direction: column;
  height: 680px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 8px 32px rgba(0,0,0,.4), 0 24px 64px rgba(0,0,0,.45);
  background: var(--frame-bar);
}

[data-theme="light"] .demo-browser,
:root[data-theme="light"] .demo-browser {
  --frame-bar: #e9eef6;
  --frame-url: #fff;
  --frame-text: #202124;
  --frame-muted: #5f6368;
  --page-bg: #fff;
  --page-text: #0f0f0f;
  --page-muted: #606060;
  --skeleton: rgba(0, 0, 0, .07);
  border-color: rgba(0, 0, 0, .08);
  box-shadow: 0 8px 32px rgba(0,0,0,.15), 0 24px 48px rgba(0,0,0,.2);
}

.browser-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: var(--frame-bar);
}

.browser-dots { display: flex; gap: 6px; }
.browser-dots i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.browser-dots i:nth-child(2) { background: #febc2e; }
.browser-dots i:nth-child(3) { background: #28c840; }

.browser-url {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--frame-url);
  color: var(--frame-text);
  font-size: 0.75rem;
}

.browser-url svg { width: 12px; height: 12px; flex-shrink: 0; color: var(--frame-muted); }
.browser-url span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.browser-ext { display: flex; }

.browser-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8d6e63, #4e342e);
}

.browser-body {
  flex: 1;
  min-height: 0;
  display: flex;
  gap: 8px;
  padding: 0 8px 8px;
  background: var(--frame-bar);
}

.browser-page {
  flex: 1;
  min-width: 0;
  position: relative;
  overflow-y: auto;
  border-radius: 12px;
  background: var(--page-bg);
  color: var(--page-text);
}

/* Sweep across the page while the extension "reads" it */
.browser-page::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, rgba(138, 180, 248, .18), transparent);
  pointer-events: none;
  opacity: 0;
}

/* While the extension reads the page, the page card breathes with a soft accent edge */
.browser-page.is-reading { animation: page-breathe 1.6s ease-in-out infinite; }

@keyframes page-breathe {
  0%, 100% { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent); }
  50% { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 70%, transparent), inset 0 0 48px color-mix(in srgb, var(--accent) 12%, transparent); }
}

.source-view { display: none; }
.demo-browser[data-source="video"] .source-video,
.demo-browser[data-source="article"] .source-article,
.demo-browser[data-source="pdf"] .source-pdf { display: block; }

.skeleton-lines { display: flex; flex-direction: column; gap: 9px; margin: 14px 0; }
.skeleton-lines i { display: block; height: 9px; border-radius: 4px; background: var(--skeleton); }

/* Video source: a mock YouTube page whose captions come from the transcript */
.source-video { padding: 20px; }

.yt-still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.yt-player {
  position: relative;
  container-type: inline-size;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 30% 35%, rgba(120, 110, 160, .35), transparent 55%),
    radial-gradient(ellipse at 75% 60%, rgba(160, 120, 90, .25), transparent 50%),
    #121218;
  color: #fff;
}

.yt-lower-third {
  position: absolute;
  left: 24px;
  top: 22px;
  display: flex;
  flex-direction: column;
  padding: 6px 12px;
  border-left: 3px solid rgba(255, 255, 255, .6);
  background: rgba(0, 0, 0, .45);
  font-size: 0.85rem;
  line-height: 1.3;
}

.yt-lower-third small { font-size: 0.7rem; opacity: .75; }

.yt-captions {
  position: absolute;
  left: 50%;
  bottom: 56px;
  width: 82%;
  margin: 0;
  transform: translateX(-50%);
  padding: 6px 10px;
  border-radius: 4px;
  background: rgba(8, 8, 8, .75);
  font-size: 0.85rem;
  line-height: 1.45;
  text-align: center;
}

.yt-captions.flash { animation: caption-flash 1s ease; }

@container (max-width: 380px) {
  .yt-lower-third { display: none; }
  .yt-captions { bottom: 44px; width: 90%; padding: 4px 8px; font-size: 0.7rem; }
}

@keyframes caption-flash {
  0% { box-shadow: 0 0 0 2px #facc15; }
  100% { box-shadow: 0 0 0 2px transparent; }
}

.yt-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px 12px 6px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .7));
  font-size: 0.72rem;
}

.yt-progress { height: 3px; margin-bottom: 6px; background: rgba(255, 255, 255, .3); }
.yt-progress-fill { position: relative; width: 0; height: 100%; background: rgba(255, 255, 255, .85); transition: width .25s ease; }
.yt-scrubber { position: absolute; right: -5px; top: -4px; width: 11px; height: 11px; border-radius: 50%; background: #fff; }

.yt-controls-row { display: flex; align-items: center; gap: 12px; }
.yt-controls-row svg { width: 18px; height: 18px; }



.yt-title { margin: 12px 0 8px; font-size: 0.95rem; font-weight: 600; line-height: 1.35; }

.yt-channel { display: flex; align-items: center; gap: 10px; font-size: 0.78rem; }
.yt-channel-name { display: flex; flex-direction: column; }
.yt-channel small { color: var(--page-muted); font-size: 0.7rem; }

.yt-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #3a3a3a;
  color: #fff;
  font-weight: 600;
}


.yt-description {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--skeleton);
}

.yt-description .skeleton-lines { margin: 0; }

/* Article source */
.source-article {
  max-width: 600px;
  margin: 0 auto;
  padding: 32px 28px 48px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.9rem;
  line-height: 1.7;
}

.article-kicker {
  font-family: "Instrument Sans", sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--page-muted);
  margin: 0 0 8px;
}

.article-title { margin: 0 0 8px; font-size: 1.45rem; line-height: 1.2; }

.article-byline {
  font-family: "Instrument Sans", sans-serif;
  font-size: 0.85rem;
  color: var(--page-muted);
  margin: 0 0 24px;
}

.article-more { margin-top: 1.5em; }
.article-more .skeleton-lines { margin: 0 0 1.4em; gap: 11px; }
.article-more .skeleton-lines i { height: 10px; }
.article-subhead { margin: 1.6em 0 0.8em; font-size: 1.1rem; font-weight: 700; }

.source-article p[data-para] { margin: 0 0 1em; padding: 2px 6px; margin-left: -6px; border-radius: 4px; }

.source-article p.flash { animation: ref-flash 1.6s ease; }
.pdf-page.flash { animation: page-flash 1.6s ease; }

@keyframes ref-flash {
  0%, 40% { background-color: rgba(250, 204, 21, .35); }
  100% { background-color: transparent; }
}

@keyframes page-flash {
  0%, 40% { box-shadow: 0 0 0 4px #facc15, 0 2px 8px rgba(0,0,0,.3); }
  100% { box-shadow: 0 2px 8px rgba(0,0,0,.3); }
}

/* PDF source */
.source-pdf { height: 100%; }
.demo-browser[data-source="pdf"] .browser-page { overflow: hidden; background: #525659; }

.pdf-toolbar {
  display: flex;
  justify-content: space-between;
  padding: 8px 14px;
  background: #323639;
  color: #f1f1f1;
  font-size: 0.75rem;
}

.pdf-pages {
  height: calc(100% - 33px);
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.pdf-page {
  --skeleton: rgba(0, 0, 0, .08);
  flex-shrink: 0;
  width: 100%;
  max-width: 460px;
  aspect-ratio: 8.5 / 11;
  padding: 36px 40px;
  background: #fff;
  color: #111;
  font-family: "Times New Roman", Times, serif;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
  overflow: hidden;
}

.pdf-title { margin: 0 0 10px; font-size: 1.2rem; text-align: center; }
.pdf-authors { margin: 0 0 18px; font-size: 0.68rem; text-align: center; color: #333; }
.pdf-heading { margin: 14px 0 6px; font-size: 0.85rem; font-weight: 700; }
.pdf-center { text-align: center; }
.pdf-text { margin: 0; font-size: 0.68rem; line-height: 1.5; text-align: justify; }

.pdf-figure {
  margin: 12px 0;
  padding: 18px 12px;
  border: 1px dashed #bbb;
  font-size: 0.65rem;
  color: #555;
  text-align: center;
}

.pdf-formula { font-size: 0.85rem; color: #111; border-style: solid; border-color: #eee; }

/* Side panel inside the browser: a stripped-down take on src/sidepanel (latest design) */
.sp-shell {
  flex: 0 0 380px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.sp-chrome {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 4px 0 6px;
  color: var(--frame-muted);
}

.sp-chrome img { width: 16px; height: 16px; }
.sp-chrome-name { flex: 1; color: var(--frame-text); font-family: "Figtree", system-ui, sans-serif; font-size: 0.85rem; font-weight: 600; }
.sp-chrome svg { width: 15px; height: 15px; margin: 0 4px; }

.demo-inner .demo-browser .demo-panel {
  --demo-bg: #1b1b1d;
  --demo-text: #ececed;
  --demo-muted: #a3a3ab;
  --demo-border: #2c2c30;
  --demo-accent: #8ab4f8;
  --xp-tab: #9fb2e0;
  --xp-tab-bg: #2d3b4a;
  --xp-card-bg: #2a2a2e;
  --xp-card-border: #3b3b40;
  --xp-input-bg: #1f1f22;
  --xp-label: #a9a9b2;
  --xp-notes-bg: #1c1c1e;
  --xp-notes-text: #e5e5e7;
  --xp-notes-heading: #fff;
  --xp-cta: #7d93c9;
  --xp-cta-text: #141a29;
  flex: 1;
  min-height: 0;
  max-width: none;
  margin: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  border: none;
  border-radius: 12px;
  box-shadow: none;
  background: var(--demo-bg);
  font-family: "Figtree", "Source Sans 3", system-ui, sans-serif;
  font-size: 13px;
  color: var(--demo-text);
}

/* Paper light mode */
[data-theme="light"] .demo-inner .demo-browser .demo-panel,
:root[data-theme="light"] .demo-inner .demo-browser .demo-panel {
  --demo-bg: #f4f0e8;
  --demo-text: #2b2722;
  --demo-muted: #6e665b;
  --demo-border: #e2dbcd;
  --demo-accent: #3a5aa8;
  --xp-tab: #3a5aa8;
  --xp-tab-bg: #e6e3f0;
  --xp-card-bg: #faf7f1;
  --xp-card-border: #e2dbcd;
  --xp-input-bg: #fffdf9;
  --xp-label: #746c60;
  --xp-notes-bg: #faf7f1;
  --xp-notes-text: #2b2722;
  --xp-notes-heading: #1f1b16;
}

.xp-main {
  flex: 1;
  min-height: 0;
  position: relative;
}

.xp-home,
.xp-loading,
.xp-summary {
  position: absolute;
  inset: 0;
  display: none;
}

.demo-panel[data-state="idle"] .xp-home { display: block; }
.demo-panel[data-state="working"] .xp-loading { display: flex; }
.demo-panel[data-state="streaming"] .xp-summary,
.demo-panel[data-state="done"] .xp-summary { display: flex; }

/* Home: intro and the Summarize card, nothing else */
.xp-home { padding: 18px 14px 32px; overflow-y: auto; }
.demo-panel[data-state="idle"] .xp-home { display: block; }

.xp-home-title {
  margin: 0 0 6px;
  font-family: "IBM Plex Mono", "JetBrains Mono", monospace;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--demo-text);
}

.xp-home-tagline {
  margin: 0 0 18px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--demo-muted);
}

.xp-card {
  padding: 12px;
  background: var(--xp-card-bg);
  border: 1px solid var(--xp-card-border);
  border-radius: 12px;
}

.xp-card-label {
  margin: 2px 2px 10px;
  font-family: "IBM Plex Sans", "Figtree", system-ui, sans-serif;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--xp-label);
}

.xp-page-preview {
  padding: 9px 12px;
  background: var(--xp-input-bg);
  border-radius: 9px;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.xp-summarize {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 38px;
  margin-top: 10px;
  padding: 0 12px;
  font-family: "Figtree", system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--xp-cta-text);
  background: var(--xp-cta);
  border: none;
  border-radius: 9px;
  cursor: pointer;
  animation: summarize-pulse 2.4s ease-out infinite;
}

.xp-summarize { overflow: hidden; }
.xp-summarize:hover { filter: brightness(1.08); }

/* Invite a click: a soft glow breathes around the button and a light sweep crosses it */
.xp-summarize::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 45%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent);
  transform: skewX(-20deg);
  animation: summarize-sweep 3.2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes summarize-sweep {
  0%, 55% { left: -60%; }
  85%, 100% { left: 130%; }
}

.xp-shortcut {
  padding: 1px 5px;
  font-family: "IBM Plex Sans", "Figtree", system-ui, sans-serif;
  font-size: 10px;
  font-weight: 600;
  border: 1px solid rgba(20, 26, 41, .3);
  border-radius: 5px;
}

@keyframes summarize-pulse {
  0% { box-shadow: 0 0 0 0 rgba(125, 147, 201, .55), 0 0 18px rgba(125, 147, 201, .25); }
  60% { box-shadow: 0 0 0 10px rgba(125, 147, 201, 0), 0 0 26px rgba(125, 147, 201, .45); }
  100% { box-shadow: 0 0 0 10px rgba(125, 147, 201, 0), 0 0 18px rgba(125, 147, 201, .25); }
}

/* Loading */
.xp-loading {
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-top: 48px;
}

.xp-loading img { width: 40px; height: 40px; animation: spin 1.2s linear infinite; }
.xp-loading p { margin: 0; color: var(--demo-muted); font-size: 0.85rem; }

@keyframes spin { to { transform: rotate(360deg); } }

/* Summary view: title, tabs, content */
.xp-summary {
  flex-direction: column;
  padding: 16px 14px 0;
}

.xp-detail-title {
  margin: 0 0 10px;
  font-family: "Figtree", system-ui, sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
  text-align: center;
  color: var(--demo-text);
}

.xp-summary-header {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.demo-browser .demo-tabs { display: flex; gap: 6px; margin: 0; }
.demo-browser .demo-tabs.single { display: none; }

.demo-browser .demo-tab {
  padding: 3px 10px;
  font-family: "Figtree", system-ui, sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: var(--demo-text);
  background: transparent;
  border: 1px solid var(--xp-card-border);
  border-radius: 6px;
}

.demo-browser .demo-tab:hover { background: var(--xp-card-bg); }

.demo-browser .demo-tab.active {
  color: var(--xp-tab);
  background: var(--xp-tab-bg);
  border-color: var(--xp-tab);
}

.demo-browser .demo-body {
  flex: 1;
  min-height: 0;
  height: auto;
  padding: 0;
  position: relative;
}

.demo-browser .demo-pane {
  inset: 0 0 10px;
  padding: 16px;
  font-family: "Fira Code", "SF Mono", "JetBrains Mono", Menlo, monospace;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--xp-notes-text);
  background: var(--xp-notes-bg);
  border-radius: 8px;
}

.xp-read-time {
  display: flex;
  justify-content: space-between;
  margin: 0 0 0.9rem;
  font-size: 11px;
  color: var(--demo-muted);
}

.demo-browser .demo-summary .demo-heading { color: var(--xp-notes-heading); font-size: 11.5px; }
.demo-browser .demo-summary .demo-heading .demo-hash,
.demo-browser .demo-summary .demo-timestamp,
.demo-browser .demo-watch-yt { color: var(--demo-accent); }
.demo-browser .demo-summary .demo-timestamp { text-decoration: none; }
.demo-browser .demo-summary .demo-timestamp:hover { text-decoration: underline; }

.demo-caret {
  display: inline-block;
  width: 7px;
  height: 1em;
  margin-left: 1px;
  vertical-align: text-bottom;
  background: var(--demo-accent);
  animation: caret-blink 1s steps(1) infinite;
}

@keyframes caret-blink { 50% { opacity: 0; } }

.demo-ref {
  color: var(--demo-accent);
  text-decoration: none;
  cursor: pointer;
}

.demo-ref:hover { text-decoration: underline; }

/* Ask bar: only in the summary view */
.demo-browser .demo-chat {
  flex-shrink: 0;
  margin: 0;
  padding: 8px 14px 10px;
  border-top: 1px solid var(--demo-border);
  background: var(--demo-bg);
}

.demo-panel[data-state="idle"] .demo-chat,
.demo-panel[data-state="working"] .demo-chat { display: none; }
.demo-panel[data-state="streaming"] .demo-chat-suggestion { display: none; }

.demo-browser .demo-chat-suggestion {
  font-size: 0.72rem;
  padding: 4px 8px;
  margin-bottom: 6px;
  color: var(--xp-tab);
  background: var(--xp-tab-bg);
}

.demo-browser .demo-ask-bar {
  padding: 0;
  gap: 8px;
  background: transparent;
  border: none;
}

.demo-browser .demo-ask-input {
  min-height: 32px;
  padding: 6px 12px;
  font-family: "Figtree", system-ui, sans-serif;
  font-size: 12px;
  color: var(--demo-text);
  background: var(--xp-card-bg);
  border: 1px solid var(--demo-border);
  border-radius: 9999px;
}

.demo-browser .demo-ask-input:focus { border-color: var(--xp-tab); }
.demo-browser .demo-ask-input::placeholder { color: var(--demo-muted); }

.demo-browser .demo-send {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  padding: 7px;
  border-radius: 50%;
  background: var(--xp-card-bg);
  color: var(--xp-tab);
}

.demo-browser .demo-send svg { width: 100%; height: 100%; }
.demo-browser .demo-send:hover { background: var(--xp-tab-bg); }

.demo-browser .demo-chat-overlay { left: 14px; right: 14px; }

@media (max-width: 900px) {
  .demo { padding: 1.5rem 1rem; }
  .demo-inner { padding: 1rem; }
  .demo-browser { height: auto; }
  .browser-body { flex-direction: column; }
  .browser-page { flex: none; height: 300px; }
  .sp-shell { flex: none; height: 600px; }
  .source-article { padding: 20px 16px; }
  .article-title { font-size: 1.35rem; }
}

@media (prefers-reduced-motion: reduce) {
  .xp-summarize,
  .xp-summarize::after,
  .xp-loading img,
  .browser-page.is-reading,
  .demo-caret { animation: none; }
}



.demo-stage { --split: 1; }
.demo-stage.assembled { --split: 0; }

.demo .demo-inner { max-width: 1040px; }
.demo .demo-browser { height: min(680px, 78vh); }

/* Split view: with --split at 1 the frame fades away and the page and panel float apart;
   at 0 everything is a normal browser window. Scroll drives --split. */
.demo-stage .demo-browser,
[data-theme="light"] .demo-stage .demo-browser,
:root[data-theme="light"] .demo-stage .demo-browser {
  position: relative;
  overflow: visible;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}
/* The frame itself lives on a layer that fades in as the windows assemble */
.demo-stage .demo-browser::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 12px;
  background: var(--frame-bar);
  border: 1px solid rgba(127, 127, 127, .12);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
  opacity: calc(1 - var(--split));
  pointer-events: none;
}
.demo-stage .browser-bar,
.demo-stage .browser-body { position: relative; }
.demo-stage .browser-bar {
  opacity: calc(1 - var(--split));
  transform: translateY(calc(var(--split) * -12px));
  background: transparent;
}
.demo-stage .browser-body { background: transparent; overflow: visible; }
.demo-stage .browser-page {
  transform: translate(calc(var(--split) * -5%), calc(var(--split) * -5%)) scale(calc(1 - var(--split) * .03));
  box-shadow: 0 24px 60px rgba(0, 0, 0, calc(.3 * var(--split)));
  border: 1px solid rgba(127, 127, 127, calc(.18 * var(--split)));
}
.demo-stage .sp-shell {
  position: relative;
  z-index: 2;
  transform: translate(calc(var(--split) * -34%), calc(var(--split) * 11%)) scale(calc(1 + var(--split) * .06));
}
.demo-stage .sp-shell .demo-panel {
  box-shadow: 0 30px 70px rgba(0, 0, 0, calc(.4 * var(--split)));
  border: 1px solid rgba(127, 127, 127, calc(.18 * var(--split)));
}
.demo-stage .sp-chrome { opacity: calc(1 - var(--split)); }
.demo-stage .demo-browser[data-source="pdf"] .browser-page { overflow: hidden; }
.demo-stage:not(.assembled) .browser-page { overflow: hidden; }
.demo-stage:not(.assembled) .demo-label { opacity: 0; }
.demo-label { transition: opacity .3s; }

@media (max-width: 900px), (prefers-reduced-motion: reduce) {
  .demo-stage { --split: 0 !important; }
  .demo-stage .demo-label { opacity: 1; }
}
.demo-label { color: var(--text-muted); }


/* Podcast source: an episode page with a player; timestamps seek it */
.demo-browser[data-source="podcast"] .source-podcast { display: block; }
.source-podcast { padding: 24px; }
.pod-hero { display: flex; gap: 18px; align-items: flex-start; }
.pod-art {
  flex: 0 0 120px;
  aspect-ratio: 1;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #5b4b8a, #2d2a4a);
  color: #fff;
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: -0.04em;
}
.pod-show { margin: 0 0 4px; font-size: 0.78rem; font-weight: 600; color: var(--page-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.pod-title { margin: 0 0 6px; font-size: 1.05rem; font-weight: 600; line-height: 1.3; }
.pod-meta { margin: 0 0 12px; font-size: 0.78rem; color: var(--page-muted); }
.pod-play { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; background: var(--page-text); color: var(--page-bg); font-size: 0.8rem; font-weight: 600; }
.pod-play svg { width: 12px; height: 12px; }
.pod-player { margin-top: 22px; }
.pod-progress { height: 4px; border-radius: 2px; background: var(--skeleton); }
.pod-progress-fill { width: 0; height: 100%; border-radius: 2px; background: var(--page-text); transition: width .3s ease; }
.pod-times { display: flex; justify-content: space-between; margin-top: 6px; font-size: 0.72rem; color: var(--page-muted); font-variant-numeric: tabular-nums; }
.pod-notes-h { margin: 24px 0 6px; font-size: 0.85rem; font-weight: 600; }
.pod-notes { margin: 0; font-size: 0.85rem; line-height: 1.55; color: var(--page-muted); }

/* Ghosted History under the Summarize card: hints at what fills in once you've used it */
.xp-history-ghost {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--demo-border);
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 30%, transparent 100%);
}
.xp-history-ghost-h {
  margin: 0 0 12px;
  font-family: "IBM Plex Sans", "Figtree", system-ui, sans-serif;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--xp-label);
  opacity: .8;
}
.xp-ghost-item { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; filter: blur(2.5px); opacity: .55; }
.xp-ghost-item i { display: block; height: 10px; border-radius: 5px; background: var(--demo-muted); }
.xp-ghost-item i:last-child { height: 8px; opacity: .6; }

/* First screen: headline column on the left, demo on the right */
/* clip, not hidden: an anchor jump to #demo must not scroll the row's own content */
.hero-row { position: relative; overflow: hidden; overflow: clip; background: var(--bg); padding-top: var(--header-h, 71px); box-sizing: border-box; }
.hero-row .hero, .hero-row .demo,
[data-theme="light"] .hero-row .hero, [data-theme="light"] .hero-row .demo,
:root[data-theme="light"] .hero-row .hero, :root[data-theme="light"] .hero-row .demo { background: transparent; }
.hero-row > * { position: relative; z-index: 1; }
.hero-row > .glare { z-index: 0; }

@media (min-width: 1100px) {
  .hero-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(2rem, 4vw, 5rem);
    padding-inline: clamp(1rem, 3vw, 4rem);
  }
  .hero-row .hero { flex: 0 0 340px; padding: 0; }
  .hero-row .hero-inner { margin: 0; }
  .hero-row .hero-subtitle { margin-bottom: 1.5rem; }
  .hero-row .hero-ctas { flex-direction: column; align-items: flex-start; }
  .hero-row .demo { flex: 0 1 1040px; min-width: 0; padding: 2rem 0 2.5rem; }
  .hero-row .demo-inner { padding: 0; }
}
/* Feature visuals */
.feature-visual { min-width: 0; }

.fv-card {
  --fv-bg: #1c1c1e;
  --fv-text: #e5e5e7;
  --fv-muted: #9a9aa3;
  --fv-border: rgba(255, 255, 255, .08);
  --fv-link: #8ab4f8;
  position: relative;
  padding: 1.6rem;
  border-radius: 18px;
  background:
    radial-gradient(70% 45% at 50% 115%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
    var(--fv-bg);
  border: 1px solid var(--fv-border);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .35);
  color: var(--fv-text);
  overflow: hidden;
}

[data-theme="light"] .fv-card,
:root[data-theme="light"] .fv-card {
  --fv-bg: #faf7f1;
  --fv-text: #2b2722;
  --fv-muted: #6e665b;
  --fv-border: rgba(0, 0, 0, .08);
  --fv-link: #3a5aa8;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .12);
}

.fv-notes { font-family: "Fira Code", "JetBrains Mono", monospace; font-size: 13px; line-height: 1.7; }
.fv-notes p { margin: 0 0 0.8em; }
.fv-notes .fv-h { margin: 1.2em 0 0.3em; font-weight: 700; }
.fv-notes .fv-h span { color: var(--fv-link); font-weight: 400; }
.fv-notes a { color: var(--fv-link); }
.fv-notes ul { margin: 0; padding-left: 1.2em; }
.fv-notes-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--fv-muted); }

.fv-skill { font-family: "Instrument Sans", system-ui, sans-serif; }
.fv-skill-editor { border: 1px solid var(--fv-border); border-radius: 10px; overflow: hidden; background: rgba(127, 127, 127, .06); }
.fv-skill-tabs { display: flex; gap: 2px; padding: 6px 6px 0; border-bottom: 1px solid var(--fv-border); font-family: "Fira Code", monospace; font-size: 11px; color: var(--fv-muted); }
.fv-skill-tabs span { padding: 5px 10px; border-radius: 6px 6px 0 0; }
.fv-skill-tabs span.on { background: var(--fv-bg); color: var(--fv-text); border: 1px solid var(--fv-border); border-bottom-color: var(--fv-bg); margin-bottom: -1px; }
.fv-skill-body { margin: 0; padding: 12px 14px; font-family: "Fira Code", monospace; font-size: 12px; line-height: 1.7; white-space: pre-wrap; }
.fv-skill-body .c { color: var(--fv-muted); }
.fv-skill-body .chg { background: color-mix(in srgb, var(--fv-link) 18%, transparent); border-left: 2px solid var(--fv-link); margin-left: -6px; padding-left: 4px; }
.fv-skill-out { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.fv-skill-col { position: relative; padding: 26px 12px 12px; border: 1px solid var(--fv-border); border-radius: 10px; }
.fv-skill-col--after { border-color: var(--fv-link); }
.fv-skill-col i { display: block; height: 7px; margin: 0 0 7px; border-radius: 4px; background: rgba(127, 127, 127, .28); }
.fv-skill-col i.b { position: relative; margin-left: 12px; background: rgba(127, 127, 127, .4); }
.fv-skill-col i.b::before { content: ""; position: absolute; left: -12px; top: 1px; width: 5px; height: 5px; border-radius: 50%; background: var(--fv-link); }
.fv-skill-tag { position: absolute; left: 10px; top: 8px; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--fv-muted); }
.fv-skill-col--after .fv-skill-tag { color: var(--fv-link); }
.fv-ask {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 1.4rem;
  padding: 0.6rem 0.6rem 0.6rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--fv-border);
  background: rgba(127, 127, 127, .1);
  font-size: 13px;
}
.fv-ask span { flex: 1; }
.fv-ask i { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--fv-link); color: #0a0a0a; font-style: normal; font-weight: 700; }

.fv-providers { display: flex; gap: 8px; flex-wrap: wrap; }
.fv-providers span { padding: 0.4rem 0.9rem; border-radius: 999px; border: 1px solid var(--fv-border); font-size: 13px; font-weight: 500; }
.fv-providers span:first-child { background: var(--fv-text); color: var(--fv-bg); border-color: transparent; }
.fv-shield {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin: 2rem 0;
  color: var(--fv-muted);
  font-size: 13px;
}
.fv-shield svg { width: 72px; height: 72px; color: var(--fv-text); filter: drop-shadow(0 0 24px color-mix(in srgb, var(--accent) 35%, transparent)); }
.fv-off { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--fv-border); font-family: "Fira Code", monospace; font-size: 12px; }
.fv-off li { display: flex; justify-content: space-between; padding: 0.6rem 0; border-bottom: 1px solid var(--fv-border); }
.fv-off em { font-style: normal; color: var(--fv-muted); }


.fv-chat-q { align-self: flex-end; max-width: 85%; margin: 0 0 12px auto; padding: 8px 12px; border-radius: 12px 12px 4px 12px; background: rgba(138, 180, 248, .18); font-size: 13px; line-height: 1.5; width: fit-content; }
.fv-chat-a { padding: 10px 12px; border-radius: 12px 12px 12px 4px; background: rgba(127, 127, 127, .12); font-size: 13px; line-height: 1.55; }
.fv-chat-a a { color: var(--fv-link); }
.fv-chat-step { display: block; margin-bottom: 6px; font-size: 11px; color: var(--fv-muted); }
.fv-ask--empty span { color: var(--fv-muted); }

/* Film grain over everything, and soft warm glare behind the first and last screens */
.grain {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: .085;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .6 0 0 0 0 .6 0 0 0 0 .6 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
[data-theme="light"] .grain,
:root[data-theme="light"] .grain { opacity: .05; mix-blend-mode: multiply; }

.glare {
  position: absolute;
  pointer-events: none;
  filter: blur(54px);
  will-change: transform;
}
.glare-a {
  top: -14%;
  right: -14%;
  width: 78vw;
  height: 26vh;
  transform: rotate(-16deg);
  background: linear-gradient(90deg, transparent 0%, color-mix(in srgb, var(--accent) 34%, transparent) 45%, color-mix(in srgb, var(--accent) 18%, transparent) 65%, transparent 100%);
}
.glare-b {
  bottom: 18%;
  left: -18%;
  width: 60vw;
  height: 22vh;
  transform: rotate(-16deg);
  background: linear-gradient(90deg, transparent 0%, color-mix(in srgb, var(--accent) 20%, transparent) 50%, transparent 100%);
}
.glare-c {
  left: 50%;
  bottom: 14%;
  width: 90vw;
  height: 46vh;
  transform: translateX(-50%) rotate(-14deg);
  background: linear-gradient(90deg, transparent 0%, color-mix(in srgb, var(--accent) 12%, transparent) 50%, transparent 100%);
}
[data-theme="light"] .glare-a, :root[data-theme="light"] .glare-a,
[data-theme="light"] .glare-b, :root[data-theme="light"] .glare-b { opacity: .55; }
[data-theme="light"] .glare-c, :root[data-theme="light"] .glare-c { opacity: .4; }
.tail { position: relative; overflow: clip; }
.tail > .glare { position: absolute; z-index: 0; }
.tail > section, .tail > footer { position: relative; z-index: 1; background: transparent; }
.site-footer { border-top: none; }

/* Pinned demo: the row sticks for a few screens while the windows assemble and the summary runs */
@media (min-width: 1100px) {
  .demo-scroll { height: 280vh; }
  .hero-row {
    position: sticky;
    top: 0;
    height: 100vh;
  }
  .hero-row .demo { padding: 0; }
  .demo .demo-browser { height: min(640px, calc(100vh - var(--header-h, 71px) - 150px)); }
}

/* Pinned features: one screen, four steps, visual on the right crossfades */
.features { padding: 0; background: var(--bg); }
.feat-pin { padding: 3rem 2rem; }
.feat-inner { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: 1fr; gap: 2.5rem; align-items: center; }
.feat-kicker { margin: 0 0 1.25rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.feat-item { position: relative; display: block; width: 100%; padding: 1.1rem 0 1.1rem 3rem; border: none; border-top: 1px solid var(--border); background: none; font: inherit; text-align: left; color: inherit; cursor: pointer; transition: opacity .35s ease; }
.feat-item:hover { opacity: .75; }
.feat-item.active:hover { opacity: 1; }
.feat-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 6px; }
.feat-item:last-child { border-bottom: 1px solid var(--border); }
.feat-num { position: absolute; left: 0; top: 1.2rem; font-family: "JetBrains Mono", monospace; font-size: 0.8rem; color: var(--accent); }
.feat-item h3 { margin: 0; font-size: 1.15rem; font-weight: 600; color: var(--text); }
.feat-item p { margin: 0.5rem 0 0; font-size: 0.95rem; line-height: 1.55; color: var(--text-muted); }
.feat-visuals { position: relative; }
.feat-visual { transition: opacity .4s ease, transform .4s ease; }
.feat-progress { display: none; }

@media (min-width: 900px) {
  .feat-scroll { height: 400vh; }
  .feat-pin {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    padding: var(--header-h, 71px) 2rem 4rem;
    box-sizing: border-box;
  }
  /* Inactive items collapse to their heading so five always fit above the progress line */
  .feat-item { padding: clamp(0.6rem, 1.4vh, 1rem) 0 clamp(0.6rem, 1.4vh, 1rem) 3rem; }
  .feat-item h3 { font-size: clamp(1rem, 1.5vh, 1.12rem); }
  .feat-item p { font-size: 0.92rem; line-height: 1.5; }
  .feat-kicker { margin-bottom: 0.9rem; }
  .feat-item:not(.active) p { margin-top: 0; }
  .feat-inner { width: 100%; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 4rem; }
  .feat-item { opacity: .32; }
  .feat-item.active { opacity: 1; }
  .feat-item p { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s ease; margin: 0; }
  .feat-item p::before { content: ""; }
  .feat-item.active p { grid-template-rows: 1fr; margin-top: 0.5rem; }
  .feat-item p { overflow: hidden; }
  .feat-visuals { min-height: 420px; }
  .feat-visual { position: absolute; inset: 0; display: flex; align-items: center; opacity: 0; transform: translateY(14px); pointer-events: none; visibility: hidden; transition: opacity .4s ease, transform .4s ease, visibility 0s linear .4s; }
  .feat-visual.active { visibility: visible; transition-delay: 0s; }
  .feat-visual.active { opacity: 1; transform: none; pointer-events: auto; }
  .feat-visual .fv-card { width: 100%; }
  .feat-progress { display: block; position: absolute; left: 2rem; right: 2rem; bottom: 1.75rem; height: 2px; background: var(--border); }
  .feat-progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .15s linear; }
}

/* Scroll-driven "press" of the Summarize button */
.xp-summarize.is-hover { filter: brightness(1.1); }
.xp-summarize.is-pressed { transform: scale(.95); filter: brightness(.9); transition: transform .12s ease; }

/* FAQ */
.faq { padding: 0 1.5rem; }
.faq-pin { padding: 4rem 0 3rem; }
.faq-inner { max-width: 720px; margin: 0 auto; }
.faq .section-title { margin: 0 0 1.5rem; text-align: center; }
.faq-item { border-top: 1px solid var(--border); }
.faq-item:last-child { border-bottom: 1px solid var(--border); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  margin-right: 4px;
  transition: transform .2s ease;
}
.faq-item[open] summary::after { transform: rotate(-135deg); }
.faq-item p { margin: 0 0 1.2rem; font-size: 0.95rem; line-height: 1.6; color: var(--text-muted); max-width: 640px; }
.faq-item code { font-family: "Fira Code", monospace; font-size: 0.85em; padding: 1px 5px; border-radius: 4px; background: rgba(127, 127, 127, .15); }

/* Source pills live under the hero CTAs */
.hero-inner .demo-sources { justify-content: flex-start; gap: 6px; margin: 1.5rem 0 0; }
.hero-inner .demo-sources-label { width: 100%; margin: 0 0 2px; }
.hero-inner .demo-source-btn { padding: 5px 11px; font-size: 0.76rem; }

/* Hero CTAs share one height */
.hero-ctas .btn { height: 44px; padding-top: 0; padding-bottom: 0; box-sizing: border-box; border: 1px solid transparent; }
.hero-ctas .btn-white { border-color: rgba(0, 0, 0, .1); }

/* Demo caption: quieter */
.demo-label,
[data-theme="light"] .demo-label,
:root[data-theme="light"] .demo-label { font-size: 0.68rem; font-weight: 400; letter-spacing: 0.1em; color: var(--text-muted); opacity: .55; text-shadow: none; }

/* Skip link for keyboard users */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 300;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* Reduced motion: no pinning, no scroll-driven animation; everything readable in place */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .site-header, .glare, .feat-visual, .feat-item, .feat-item p, .demo-label, .xp-summarize { transition: none !important; }
  .demo-scroll { height: auto; }
  .hero-row { position: static; height: auto; }
  .feat-scroll { height: auto; }
  .feat-pin { position: static; height: auto; padding: 3rem 2rem; display: block; }
  .feat-inner { align-items: start; }
  .feat-item { opacity: 1; }
  .feat-item p { grid-template-rows: 1fr; margin-top: 0.5rem; }
  .feat-visuals { min-height: 0; display: grid; gap: 1.5rem; }
  .feat-visual { position: static; opacity: 1; transform: none; pointer-events: auto; }
  .feat-progress { display: none; }
}

/* Feature visual: content types */
.fv-types { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 1rem; }
.fv-types span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); font-family: "Instrument Sans", system-ui, sans-serif; font-size: 0.8rem; color: var(--text-muted); }
.fv-types span.on { background: var(--text); color: var(--bg); border-color: transparent; }
.fv-types svg { width: 12px; height: 12px; }

/* Feature visual: your keys, your data (one wire from the browser to the provider, no server on it) */
.fv-keys { font-family: "Instrument Sans", system-ui, sans-serif; }
.fv-keys-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 1.5rem; }
.fv-key-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px; background: rgba(127, 127, 127, .12); border: 1px solid var(--fv-border); font-family: "Fira Code", monospace; font-size: 12px; }
.fv-dot { width: 7px; height: 7px; border-radius: 50%; background: #3dd68c; box-shadow: 0 0 0 0 rgba(61, 214, 140, .5); animation: fv-dot 2.2s ease-out infinite; }
@keyframes fv-dot { 0% { box-shadow: 0 0 0 0 rgba(61, 214, 140, .5); } 70%, 100% { box-shadow: 0 0 0 7px rgba(61, 214, 140, 0); } }
.fv-keys-where { font-size: 12px; color: var(--fv-muted); }
.fv-route { display: flex; align-items: center; gap: 10px; }
.fv-node { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-width: 104px; min-height: 104px; padding: 12px 10px; border-radius: 12px; border: 1px solid var(--fv-border); background: rgba(127, 127, 127, .06); font-size: 12px; color: var(--fv-muted); text-align: center; }
.fv-node svg { width: 26px; height: 26px; color: var(--fv-text); }
.fv-node--you { border-color: var(--fv-link); }
.fv-node--prov { border-color: var(--fv-link); }
.fv-node sup { font-size: 13px; line-height: 0; margin-left: 2px; color: var(--fv-text); }
.fv-wire { position: relative; flex: 1; height: 2px; background: rgba(127, 127, 127, .25); border-radius: 1px; }
.fv-wire i { position: absolute; top: -2px; left: -12%; width: 12%; height: 6px; border-radius: 3px; background: var(--fv-link); animation: fv-packet 2.4s linear infinite; }
.fv-wire i:nth-child(2) { animation-delay: .8s; }
.fv-wire i:nth-child(3) { animation-delay: 1.6s; }
@keyframes fv-packet { to { left: 100%; } }
.fv-keys-note { margin: 1.3rem 0 0; font-size: 12px; line-height: 1.5; color: var(--fv-muted); text-align: right; }
.fv-keys-note sup { font-size: 12px; line-height: 0; margin-right: 2px; color: var(--fv-text); }
.fv-providers { display: flex; gap: 8px; flex-wrap: wrap; }
.fv-providers span { padding: 0.4rem 0.9rem; border-radius: 999px; border: 1px solid var(--fv-border); font-size: 13px; font-weight: 500; }

/* Feature visual: off on sensitive sites (a settings list with toggles) */
.fv-offcard { font-family: "Instrument Sans", system-ui, sans-serif; }
.fv-offcard-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.6rem; font-size: 13px; font-weight: 600; }
.fv-offcard-count { font-weight: 400; font-size: 12px; color: var(--fv-muted); }
.fv-offcard .fv-off { font-family: inherit; font-size: 13px; }
.fv-offcard .fv-off li { align-items: center; padding: 0.7rem 0; }
.fv-site { display: inline-flex; align-items: center; gap: 10px; }
.fv-fav { display: inline-flex; width: 18px; height: 18px; color: var(--fv-text); }
.fv-fav svg { width: 100%; height: 100%; }
.fv-toggle { position: relative; display: inline-block; width: 34px; height: 20px; border-radius: 10px; background: rgba(127, 127, 127, .35); transition: background .3s; }
.fv-toggle b { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .3s; }
.fv-toggle.off { background: rgba(127, 127, 127, .35); }
.fv-offcard li:nth-child(4) .fv-toggle { animation: fv-toggle-off 5s ease-in-out infinite; }
.fv-offcard li:nth-child(4) .fv-toggle b { animation: fv-toggle-knob 5s ease-in-out infinite; }
@keyframes fv-toggle-off { 0%, 20% { background: #3dd68c; } 35%, 100% { background: rgba(127, 127, 127, .35); } }
@keyframes fv-toggle-knob { 0%, 20% { left: 16px; } 35%, 100% { left: 2px; } }
.fv-add { margin-top: 0.8rem; font-size: 13px; color: var(--fv-link); }

/* CTA under each feature visual */
.fv-cta { margin-top: 1.1rem; align-self: flex-start; }
@media (min-width: 900px) {
  .feat-visual { flex-direction: column; align-items: stretch; justify-content: center; }
  .feat-visual .fv-cta { align-self: center; }
}

/* Video being analyzed: a soft light passes over the player */
.browser-page.is-reading .yt-player::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, color-mix(in srgb, var(--accent) 18%, transparent) 50%, transparent 70%);
  background-size: 250% 100%;
  animation: yt-analyze 2.2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes yt-analyze { from { background-position: 120% 0; } to { background-position: -40% 0; } }
.browser-page.is-reading .yt-captions { outline: 1px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .browser-page.is-reading .yt-player::after, .fv-wire i, .fv-dot, .fv-offcard .fv-toggle, .fv-offcard .fv-toggle b { animation: none; }
}

/* FAQ pins for a screen so it can be read before the page moves on */
@media (min-width: 900px) and (prefers-reduced-motion: no-preference) {
  .faq-scroll { height: 170vh; }
  .faq-pin { position: sticky; top: 0; min-height: 100vh; box-sizing: border-box; padding-top: calc(var(--header-h, 71px) + 1.5rem); }
}
