:root {
  --color-bg: #ffffff;
  --color-text: #191a15;
  --color-muted: #64748b;
  --color-primary: #2bb673;
  --color-primary-hover: #249a61;
  --color-border: #e2e8f0;
  --color-surface: #f8faf9;
  --color-card-hover: #eef8f3;
  --color-code-bg: #f1f5f9;
  --sidebar-width: 280px;
  --max-width: 1100px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}
a { color: var(--color-primary); }
nav.top {
  border-bottom: 1px solid var(--color-border);
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}
nav.top .logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
nav.top .logo img { height: 28px; width: auto; }
nav.top a.nav-link {
  color: var(--color-muted);
  text-decoration: none;
  font-size: 0.9rem;
}
nav.top a.nav-link:hover { color: var(--color-primary); }
nav.top .spacer { flex: 1; }
.lang-switch {
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 0.25rem 0.6rem;
}
.lang-switch:hover { background: var(--color-surface); }
.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 2rem 3rem;
}
.hero h1 { font-size: 2.4rem; font-weight: 700; margin-bottom: 1rem; }
.hero p { font-size: 1.1rem; color: var(--color-muted); max-width: 680px; margin-bottom: 2rem; }
.hero-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-links a {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-hover); }
.btn-secondary { border: 1px solid var(--color-border); color: var(--color-text); }
.btn-secondary:hover { background: var(--color-surface); }
.section-title {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem 1rem;
  font-size: 1.3rem;
  font-weight: 600;
}
.cards {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.card {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.4rem;
  text-decoration: none;
  color: var(--color-text);
  transition: background 0.15s;
}
.card:hover { background: var(--color-card-hover); }
.card h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.card p { font-size: 0.9rem; color: var(--color-muted); }
.layout { display: flex; min-height: calc(100vh - 120px); }
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  border-right: 1px solid var(--color-border);
  background: var(--color-surface);
  padding: 1.5rem 1rem 2rem;
}
.sidebar .group { margin-bottom: 1.5rem; }
.sidebar .group-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
  padding: 0 0.6rem 0.4rem;
}
.sidebar a {
  display: block;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.88rem;
}
.sidebar a:hover { background: #e6f6ee; }
.sidebar a.active { background: #e6f9ef; font-weight: 600; color: #0f5132; }
.content {
  flex: 1;
  min-width: 0;
  max-width: 820px;
  padding: 2.25rem 2rem 4rem;
}
.content h1 { font-size: 2rem; font-weight: 700; margin-bottom: 1.25rem; }
.content h2 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-top: 2.4rem;
  margin-bottom: 0.7rem;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.35rem;
}
.content h3 { font-size: 1.08rem; font-weight: 600; margin-top: 1.6rem; margin-bottom: 0.45rem; }
.content p { margin-bottom: 0.9rem; }
.content ul, .content ol { margin-bottom: 1rem; padding-left: 1.5rem; }
.content li { margin-bottom: 0.25rem; }
.content table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; font-size: 0.9rem; }
.content th, .content td { text-align: left; padding: 0.5rem 0.7rem; border: 1px solid var(--color-border); }
.content th { background: var(--color-surface); font-weight: 600; }
.content code {
  font-family: "SF Mono", "Fira Code", Menlo, monospace;
  font-size: 0.88em;
  background: var(--color-code-bg);
  padding: 0.15em 0.35em;
  border-radius: 4px;
}
.content pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 1rem 1.2rem;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 1.4rem;
  font-size: 0.86rem;
  line-height: 1.5;
}
.content pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
.content blockquote {
  border-left: 3px solid var(--color-primary);
  padding: 0.7rem 1rem;
  margin-bottom: 1rem;
  background: var(--color-surface);
  color: var(--color-muted);
}
.content img { max-width: 100%; height: auto; border-radius: 8px; margin: 1rem 0 1.5rem; border: 1px solid var(--color-border); }
footer.site {
  border-top: 1px solid var(--color-border);
  padding: 1.5rem;
  text-align: center;
  color: var(--color-muted);
  font-size: 0.85rem;
}
@media (max-width: 800px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; border-right: 0; border-bottom: 1px solid var(--color-border); }
}
