:root {
  --bg: #f6f8fb;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e2e8f0;
  --primary: #4e79a7;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
}

* {
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  margin: 0;
  padding: 24px;
  background: var(--bg);
  color: var(--text);
}

.doc-shell {
  max-width: 1400px;
  margin: 0 auto;
}

.doc-header {
  background: var(--panel);
  border-radius: 16px;
  padding: 24px 28px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  border: 1px solid var(--border);
}

.doc-body {
  background: var(--panel);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.doc-meta {
  color: var(--muted);
  font-size: 15px;
  margin-top: 6px;
}

.top-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.doc-link-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1;
  border: 1px solid #dbe7f5;
  background: #f6f0ff;
  color: #4b5563;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: 0.18s ease;
}

.doc-link-button:hover {
  background: #efe4ff;
  border-color: #cbb7f6;
  color: #1f2937;
  transform: translateY(-1px);
}

.doc-link-button.is-current {
  background: #e8f0ff;
  border-color: #bfd3fb;
  color: #1d4ed8;
}

.prose {
  max-width: 100%;
  margin: 0 auto;
}

.prose h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--border);
  color: #111827;
}

.prose h2:first-of-type {
  margin-top: 0.5rem;
}

.prose h3 {
  font-size: 1.15rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: #1f2937;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
  margin-bottom: 1.5rem;
}

.tool-card {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: #cbd5e1;
}

.tool-card p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #4b5563;
}

.section-desc {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.syntax-section {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-top: 1.5rem;
}

.syntax-section h3 {
  font-size: 1.25rem;
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.syntax-section p,
.syntax-section li {
  color: #4b5563;
  line-height: 1.65;
}

.syntax-section ul {
  margin: 0.5rem 0 0 0;
  padding-left: 1.2rem;
}

.footer-text {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 32px 0 0 0;
  text-align: center;
  line-height: 1.6;
}

.footer-text a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.footer-text a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  body {
    padding: 14px;
  }

  .doc-header,
  .doc-body {
    padding: 18px;
    border-radius: 12px;
  }

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