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

:root {
  --bg: #fafbfc;
  --text: #1a1a2e;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --code-bg: #f1f5f9;
  --code-text: #0f172a;
  --sidebar-bg: #f8fafc;
  --border: #e2e8f0;
  --muted: #64748b;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 {
  font-size: 2.25rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.75rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.35rem;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

h4 {
  font-size: 1.1rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

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

strong {
  font-weight: 600;
}

em {
  font-style: italic;
}

code {
  font-family: "JetBrains Mono", "Fira Code", "Cascadia Code", monospace;
  font-size: 0.9em;
  background: var(--code-bg);
  color: var(--code-text);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

pre {
  font-family: "JetBrains Mono", "Fira Code", "Cascadia Code", monospace;
  font-size: 0.875rem;
  line-height: 1.7;
  background: var(--code-bg);
  color: var(--code-text);
  padding: 1.25rem 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
}

pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}

ul, ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.35rem;
}

li > ul,
li > ol {
  margin-top: 0.35rem;
  margin-bottom: 0;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.header-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header .logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 1.1rem;
}

.site-header .logo:hover {
  text-decoration: none;
}

.site-header .logo svg {
  width: 28px;
  height: 28px;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.site-header nav a {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.site-header nav a:hover {
  color: var(--accent);
  text-decoration: none;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  color: var(--text);
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
}

.hero {
  text-align: center;
  padding: 8rem 1.5rem 5rem;
  max-width: 720px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 1.25rem;
}

.hero .subtitle {
  font-size: 1.2rem;
  color: var(--muted);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero .install-line {
  display: inline-block;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 1.25rem;
  font-family: "JetBrains Mono", "Fira Code", "Cascadia Code", monospace;
  font-size: 0.9rem;
  color: var(--code-text);
  margin-bottom: 2.5rem;
}

.hero .cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.features {
  max-width: 1140px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.feature-card {
  padding: 1.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.feature-card .icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.feature-card h3 {
  font-size: 1.1rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 0;
}

.quickstart {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem 5rem;
}

.quickstart h2 {
  text-align: center;
  margin-top: 0;
  margin-bottom: 1.5rem;
}

.not-found {
  max-width: 680px;
  margin: 0 auto;
  padding: 8rem 1.5rem 4rem;
  text-align: center;
}

.not-found h1 {
  font-size: 3rem;
  margin-bottom: 0.75rem;
}

.not-found p {
  color: var(--muted);
}

.not-found .actions {
  color: var(--text);
}

.not-found .actions a {
  margin: 0 0.25rem;
}

.docs-layout {
  display: flex;
  min-height: calc(100vh - 56px);
  padding-top: 56px;
}

.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  padding: 1.5rem 0;
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  overflow-y: auto;
}

.sidebar .section-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  padding: 0.5rem 1.25rem;
  margin-top: 1rem;
}

.sidebar .section-title:first-child {
  margin-top: 0;
}

.sidebar a {
  display: block;
  padding: 0.35rem 1.25rem;
  font-size: 0.9rem;
  color: var(--text);
  border-left: 3px solid transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.sidebar a:hover {
  color: var(--accent);
  text-decoration: none;
  background: var(--code-bg);
}

.sidebar a.active {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 500;
}

.content {
  flex: 1;
  max-width: 780px;
  padding: 2.5rem 3rem;
}

.content > h1:first-child {
  margin-top: 0;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.875rem;
}

.site-footer a {
  color: var(--muted);
}

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

.btn {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  background: var(--accent);
  color: #fff;
}

.btn:hover {
  background: var(--accent-hover);
  color: #fff;
  text-decoration: none;
}

.btn-outline {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-outline:hover {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.15em 0.55em;
  border-radius: 999px;
  background: var(--code-bg);
  color: var(--muted);
  border: 1px solid var(--border);
  vertical-align: middle;
}

.code-block {
  margin-bottom: 1.5rem;
}

.code-block .code-title {
  display: inline-block;
  background: var(--border);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.3rem 0.9rem;
  border-radius: 8px 8px 0 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.code-block pre {
  margin-bottom: 0;
  border-top-left-radius: 0;
}

.code-block .code-title + pre {
  border-top-left-radius: 0;
  border-top-right-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

th {
  text-align: left;
  font-weight: 600;
  padding: 0.6rem 0.75rem;
  border-bottom: 2px solid var(--border);
}

td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

tr:nth-child(even) td {
  background: var(--code-bg);
}

.kw {
  color: #2563eb;
}

.str {
  color: #16a34a;
}

.cm {
  color: #94a3b8;
  font-style: italic;
}

.fn {
  color: #7c3aed;
}

.num {
  color: #ea580c;
}

@media (max-width: 768px) {
  .site-header nav {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 0.75rem;
  }

  .site-header nav.open {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .hero {
    padding: 6rem 1.25rem 3rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero .subtitle {
    font-size: 1.05rem;
  }

  .features {
    grid-template-columns: 1fr;
    padding: 2rem 1.25rem 3rem;
  }

  .sidebar {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    bottom: 0;
    z-index: 90;
    width: 260px;
  }

  .sidebar.open {
    display: block;
  }

  .content {
    max-width: 100%;
    padding: 1.5rem 1.25rem;
  }

  .docs-layout {
    display: block;
  }

  .not-found {
    padding: 6rem 1.25rem 3rem;
  }

  .not-found h1 {
    font-size: 2.4rem;
  }
}
