:root {
  --bg: #080b0f;
  --surface: #0e1318;
  --surface-strong: #111822;
  --border: #1a2230;
  --text: #c8d8e8;
  --text-strong: #e8f4ff;
  --muted: #4a6278;
  --accent: #3ddc97;
  --accent-dim: #1a4d38;
  --red: #e05c5c;
  --gold: #c8a84b;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "DM Mono", monospace;
  font-size: 14px;
  line-height: 1.7;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(61, 220, 151, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61, 220, 151, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  top: -20vh;
  left: 50%;
  transform: translateX(-50%);
  width: min(1000px, 100vw);
  height: 520px;
  background: radial-gradient(ellipse, rgba(61, 220, 151, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

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

a:hover {
  color: var(--accent);
}

code,
pre {
  font-family: "DM Mono", monospace;
}

.shell {
  position: relative;
  z-index: 1;
}

.wrap {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 0 32px;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: rgba(8, 11, 15, 0.88);
  backdrop-filter: blur(12px);
}

.topbar .wrap {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.nav-logo {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.nav-toggle {
  display: none;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-strong);
}

.hero {
  padding: 180px 0 110px;
  border: 0;
}

.hero-tag,
.section-tag,
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero-tag {
  color: var(--accent);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-tag::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--accent);
}

h1,
h2,
h3,
.display {
  margin: 0;
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  color: var(--text-strong);
}

h1 {
  font-size: clamp(52px, 8vw, 96px);
  line-height: 1;
  margin-bottom: 8px;
}

h2 {
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  margin-bottom: 18px;
}

h3 {
  font-size: 24px;
  line-height: 1.15;
}

em {
  font-style: italic;
  color: var(--accent);
}

.hero-sub,
.lede,
.muted {
  color: var(--muted);
}

.hero-sub,
.lede {
  font-size: 13px;
  max-width: 620px;
}

.hero-actions,
.inline-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 4px;
  border: 1px solid transparent;
  font-size: 12px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  font-weight: 500;
}

.btn-primary:hover {
  background: #5ae8a8;
  color: var(--bg);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.peer-badge,
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 11px;
  color: var(--muted);
}

.peer-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}

.peer-badge[data-extension-state="missing"] .peer-dot {
  background: var(--gold);
}

.peer-badge[data-extension-state="installed"] .peer-dot {
  background: var(--accent);
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

.terminal-wrap {
  margin: 80px 0 0;
}

.terminal {
  background: #060a0d;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.terminal-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.window-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.window-dot.red {
  background: var(--red);
}

.window-dot.gold {
  background: var(--gold);
}

.window-dot.green {
  background: var(--accent);
}

.terminal-label {
  margin-left: 8px;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.terminal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tline {
  display: flex;
  gap: 12px;
}

.prompt {
  color: var(--accent);
  user-select: none;
}

.cmd {
  color: var(--text-strong);
}

.out {
  color: var(--muted);
}

.out-green {
  color: var(--accent);
}

.out-gold {
  color: var(--gold);
}

main section {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

main section:first-of-type {
  border-top: 0;
}

.section-tag {
  color: var(--muted);
  margin-bottom: 36px;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 28px;
  align-items: start;
}

.steps,
.stats,
.doc-grid,
.info-grid {
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 48px;
}

.steps {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.stats {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 48px;
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: visible;
}

.doc-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.info-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.install-stack {
  display: grid;
  gap: 18px;
  margin-top: 48px;
}

.install-step-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 24px;
  align-items: start;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(14, 19, 24, 0.98), rgba(8, 11, 15, 0.98));
  padding: 28px;
  box-shadow: var(--shadow);
}

.install-copy {
  display: grid;
  gap: 10px;
}

.install-copy p {
  margin: 0;
  max-width: 60ch;
}

.install-step-card pre {
  margin: 0;
  min-height: 100%;
}

.panel,
.step,
.stat,
.feature,
.doc-card,
.info-card,
.callout,
.toc {
  background: var(--surface);
  padding: 28px;
}

.step,
.stat {
  background: var(--bg);
}

.step-num,
.mini-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.step p,
.feature p,
.doc-card p,
.info-card p,
.toc p,
.callout p,
li {
  font-size: 12px;
  color: var(--muted);
}

.feature h3,
.doc-card h3,
.info-card h3,
.panel h3 {
  font-size: 16px;
  font-family: "DM Mono", monospace;
  letter-spacing: 0.03em;
  margin-bottom: 10px;
}

.feature-icon {
  font-size: 20px;
  margin-bottom: 16px;
}

.doc-card {
  display: grid;
  gap: 10px;
  min-height: 100%;
  border: 1px solid var(--border);
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}

.doc-card p {
  line-height: 1.8;
}

.doc-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-dim);
  background: var(--surface-strong);
}

.doc-card:hover h3,
.doc-card:hover .doc-link {
  color: var(--text-strong);
}

.doc-link {
  margin-top: auto;
  padding-top: 12px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.feature h3 {
  font-size: 13px;
  font-weight: 500;
}

.feature p {
  line-height: 1.8;
}

.feature:hover {
  transform: translateY(-2px);
  border-color: var(--accent-dim);
}

.stat {
  text-align: center;
}

.stat-val {
  font-family: "Instrument Serif", serif;
  font-size: 48px;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

.article-hero {
  padding: 160px 0 70px;
  border: 0;
}

.article-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 28px;
}

.article {
  display: grid;
  gap: 24px;
}

.article-block {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 28px;
}

.article-block h2 {
  font-size: 34px;
  margin-bottom: 12px;
}

.article-block p,
.article-block li {
  max-width: 72ch;
}

.article-block ul {
  margin: 16px 0 0 18px;
  padding: 0;
}

.article-block ol {
  margin: 16px 0 0 18px;
  padding: 0;
}

.article-block li + li {
  margin-top: 10px;
}

.toc {
  position: sticky;
  top: 90px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.toc-title {
  color: var(--text-strong);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.toc-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.toc-links a {
  color: var(--muted);
  font-size: 12px;
}

.toc-links a:hover,
.toc-links a.active {
  color: var(--accent);
}

.code-block,
pre {
  background: #060a0d;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px 18px;
  color: var(--accent);
  overflow-x: auto;
  font-size: 12px;
}

.code-block .comment {
  color: var(--muted);
}

.link-list {
  list-style: none;
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 20px 0 0;
}

.link-list a {
  color: var(--text);
}

.link-list a:hover {
  color: var(--accent);
}

footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  margin-top: 80px;
}

footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-left {
  font-size: 11px;
  color: var(--muted);
}

.footer-left span {
  color: var(--accent);
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  font-size: 11px;
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--accent);
}

@media (max-width: 900px) {
  .grid-2,
  .article-shell,
  .install-step-card {
    grid-template-columns: 1fr;
  }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toc {
    position: static;
  }
}

@media (max-width: 700px) {
  .wrap {
    padding: 0 20px;
  }

  .topbar .wrap {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 10px;
  }

  .nav-links.open {
    display: flex;
  }

  .hero,
  .article-hero {
    padding-top: 150px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .terminal-body,
  .panel,
  .step,
  .feature,
  .doc-card,
  .info-card,
  .article-block,
  .toc {
    padding: 22px;
  }
}
