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

:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #555555;
  --border: #e5e5e5;
  --code-bg: #f4f4f4;
  --max-w: 740px;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.65;
}

a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:hover { color: #444; }

code, pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

/* ── Nav ── */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.4rem 0;
}

.brand {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.nav-docs {
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
}

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

/* ── Main ── */
main {
  max-width: var(--max-w);
  margin: 0 auto;
}

/* ── Hero ── */
.hero {
  padding: 4.5rem 0 4rem;
  border-bottom: 1px solid var(--border);
}

.tag {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.25rem;
}

h1 {
  font-size: clamp(1.9rem, 4.5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0 0 1.1rem;
  max-width: 22ch;
}

h2 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
}

h3 {
  font-size: 0.97rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
}

.sub {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 54ch;
  margin: 0 0 1.75rem;
}

/* Install box */
.install-box {
  display: inline-flex;
  align-items: center;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 1rem;
  margin-bottom: 1.5rem;
}

.install-box code {
  font-size: 0.9rem;
  color: var(--text);
}

/* Buttons */
.actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: 6px;
  text-decoration: none;
  color: var(--text);
  background: var(--bg);
}

.btn:hover {
  background: #f5f5f5;
  color: var(--text);
}

.btn.primary {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

.btn.primary:hover {
  background: #333;
  color: #fff;
}

/* ── Sections ── */
.section {
  padding: 3.5rem 0;
  border-bottom: 1px solid var(--border);
}

.section:last-child {
  border-bottom: none;
}

.section-sub {
  color: var(--muted);
  margin: -0.5rem 0 1.75rem;
  font-size: 0.97rem;
}

/* ── Why grid ── */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 1.5rem;
}

.why-item p {
  color: var(--muted);
  font-size: 0.93rem;
  margin: 0;
}

.why-item code {
  background: var(--code-bg);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  font-size: 0.83rem;
}

/* ── Quickstart steps ── */
.qs-step {
  margin-bottom: 1.5rem;
}

.qs-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  overflow-x: auto;
  margin: 0 0 0.4rem;
}

pre code {
  font-size: 0.875rem;
  color: var(--text);
}

.qs-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0.35rem 0 0;
}

/* ── Commands table ── */
.cmd-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.cmd-table td {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.cmd-table td:first-child {
  width: 42%;
  padding-right: 1.5rem;
  white-space: nowrap;
}

.cmd-table code {
  background: var(--code-bg);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.82rem;
}

.cmd-table td:last-child {
  color: var(--muted);
}

/* ── Docs links ── */
.docs-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.docs-links a {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1rem 1.25rem;
  text-decoration: none;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.docs-links a:hover {
  background: var(--code-bg);
}

.docs-links a:nth-child(2n) {
  border-right: none;
}

.docs-links a:nth-last-child(-n+2) {
  border-bottom: none;
}

.docs-links strong {
  font-size: 0.93rem;
  font-weight: 600;
}

.docs-links span {
  font-size: 0.83rem;
  color: var(--muted);
}

/* ── Footer ── */
footer {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 0;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

/* ── Responsive ── */
@media (max-width: 640px) {
  nav, main, footer {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .why-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .docs-links {
    grid-template-columns: 1fr;
  }

  .docs-links a {
    border-right: none;
  }

  .docs-links a:nth-last-child(-n+2) {
    border-bottom: 1px solid var(--border);
  }

  .docs-links a:last-child {
    border-bottom: none;
  }

  .cmd-table td:first-child {
    white-space: normal;
  }
}
