/* VERCEL Grammar tokens for Winnow */
:root {
  --bg: #000000;
  --surface: #0a0a0a;
  --surface-2: #171717;
  --surface-3: #222222;
  --border: #262626;
  --border-hi: #404040;
  --text: #fafafa;
  --text-2: #a3a3a3;
  --text-3: #737373;
  --text-4: #525252;
  --accent: #2DD4BF;
  --accent-hi: #5EEAD4;
  --accent-bg: rgba(45, 212, 191, 0.08);
  --accent-wash: rgba(45, 212, 191, 0.06);

  --font-sans: "Geist Variable", "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono Variable", "Geist Mono", "JetBrains Mono", ui-monospace, monospace;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-fast: 120ms;
  --duration-med: 200ms;
}

[data-theme="light"] {
  --bg: #ffffff;
  --surface: #fafafa;
  --surface-2: #f4f4f5;
  --surface-3: #e4e4e7;
  --border: #e5e5e5;
  --border-hi: #d4d4d4;
  --text: #0a0a0a;
  --text-2: #525252;
  --text-3: #737373;
  --text-4: #a3a3a3;
  --accent: #2DD4BF;
  --accent-hi: #5EEAD4;
  --accent-bg: rgba(45, 212, 191, 0.12);
  --accent-wash: rgba(45, 212, 191, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  position: relative;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--duration-med) var(--ease-out), color var(--duration-med) var(--ease-out);
}

/* Ambient Background Wash & Grid */
.ambient-wash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 600px;
  background: radial-gradient(circle 800px at 50% -20%, var(--accent-wash), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.ambient-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.25;
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.header-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.brand-icon {
  stroke: var(--accent);
}

.brand-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-link {
  color: var(--text-2);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color var(--duration-fast) var(--ease-out);
}

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

.theme-toggle-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
}

.theme-toggle-btn:hover {
  color: var(--text);
  border-color: var(--border-hi);
}

[data-theme="dark"] .moon-icon { display: none; }
[data-theme="dark"] .sun-icon { display: block; }
[data-theme="light"] .sun-icon { display: none; }
[data-theme="light"] .moon-icon { display: block; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
}

.btn-primary {
  background: var(--accent);
  color: #000000;
  border: 1px solid var(--accent);
}

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

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--surface-2);
  border-color: var(--border-hi);
}

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

.btn-ghost:hover {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border-hi);
}

/* Typography & Hero */
.kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 12px;
}

.hero-section {
  padding: 80px 0 60px;
}

.hero-title {
  font-size: 48px;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: var(--text);
  max-width: 720px;
}

.hero-subhead {
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-2);
  margin-top: 18px;
  max-width: 620px;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

/* Live Demo Wrapper */
.demo-wrapper {
  margin-top: 48px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.demo-top-bar {
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.demo-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
}

.demo-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text-2);
}

.demo-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.control-label {
  font-size: 10.5px;
  font-family: var(--font-mono);
  color: var(--text-3);
  letter-spacing: 0.08em;
}

.demo-range {
  accent-color: var(--accent);
  cursor: pointer;
  width: 110px;
}

.threshold-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: var(--surface);
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.demo-body {
  padding: 18px;
}

.feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.feed-tabs {
  display: flex;
  gap: 6px;
}

.feed-tab {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-3);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.feed-tab:hover {
  color: var(--text);
  border-color: var(--border-hi);
}

.feed-tab.active {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--accent);
}

.feed-latency {
  font-size: 11.5px;
  color: var(--text-3);
}

.mono-text {
  font-family: var(--font-mono);
  color: var(--text-2);
}

.feed-stream {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feed-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px 16px;
  transition: opacity var(--duration-med) var(--ease-out), filter var(--duration-med) var(--ease-out), border-color var(--duration-med) var(--ease-out);
}

.feed-item.flagged-state {
  opacity: 0.28;
  filter: grayscale(80%);
  border-color: rgba(239, 68, 68, 0.3);
}

.item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  margin-bottom: 8px;
}

.platform-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-2);
}

.author {
  font-weight: 600;
  color: var(--text);
}

.handle, .post-time {
  color: var(--text-3);
}

.slop-badge {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
}

[data-theme="light"] .slop-badge {
  color: #dc2626;
  background: #fee2e2;
  border-color: #fca5a5;
}

.clean-badge {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-bg);
  border: 1px solid var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
}

[data-theme="light"] .clean-badge {
  color: #0f766e;
  background: #ccfbf1;
  border-color: #5eead4;
}

.item-content {
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--text);
}

.item-slop-reasons {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 11px;
}

.reason-label {
  color: var(--text-3);
  font-size: 11px;
}

.item-slop-reasons code {
  font-family: var(--font-mono);
  font-size: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2px 5px;
  border-radius: 3px;
  color: #fca5a5;
}

[data-theme="light"] .item-slop-reasons code {
  color: #b91c1c;
  background: #fef2f2;
  border-color: #fecaca;
}

/* Sections */
.section-block {
  padding: 64px 0;
}

.border-top {
  border-top: 1px solid var(--border);
}

.section-title {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--text);
}

.section-subhead {
  font-size: 14px;
  color: var(--text-2);
  margin-top: 8px;
  max-width: 560px;
}

/* Specs Grid */
.specs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.spec-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.spec-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 12px;
}

.spec-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.spec-desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.45;
  flex-grow: 1;
}

.spec-desc code {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--surface-2);
  padding: 1px 4px;
  border-radius: 3px;
}

.spec-metric {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

/* Coverage Grid */
.coverage-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 24px;
}

.coverage-row {
  display: grid;
  grid-template-columns: 160px 240px 1fr;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 13px;
}

.cov-platform {
  font-weight: 600;
  color: var(--text);
}

.cov-target code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
}

.cov-status {
  color: var(--text-3);
}

/* Install Steps */
.install-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 18px;
}

.step-badge {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 12px;
}

.step-heading {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.step-text {
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.4;
}

.step-text code {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--surface-2);
  padding: 1px 4px;
  border-radius: 3px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 48px;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-3);
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-link {
  color: var(--text-3);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

.footer-link:hover {
  color: var(--text);
}

/* Responsive */
@media (max-width: 768px) {
  .hero-title { font-size: 32px; }
  .specs-grid, .install-steps { grid-template-columns: 1fr; }
  .coverage-row { grid-template-columns: 1fr; gap: 4px; }
}

@media (max-width: 480px) {
  .header-container {
    padding: 10px 16px;
  }

  .header-actions {
    gap: 8px;
  }

  .header-actions .nav-link {
    display: none;
  }

  .header-actions .btn {
    white-space: nowrap;
    padding: 0 10px;
    font-size: 12px;
    height: 32px;
  }

  .hero-cta-group {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .hero-cta-group .btn {
    width: 100%;
  }
}
