:root {
  --bg: #f6f8fc;
  --card: #ffffff;
  --text: #1d2a39;
  --muted: #5d6b7d;
  --line: #dce3ee;
  --accent: #2ebc67;
  --accent-dark: #159447;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.container { width: min(1280px, calc(100% - 32px)); margin-inline: auto; }
.header_inner { display: flex; align-items: center; justify-content: space-between; min-height: 70px; gap: 14px; }
.logo img { max-height: 40px; width: auto; }
.menu-bar { display: none; cursor: pointer; }
.menu { display: flex; gap: 10px; align-items: center; }
.menu-item {
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; color: #0f172a; background: #ecfdf3;
  border: 1px solid #b6efce; padding: 8px 12px; border-radius: 10px; font-weight: 600;
}
main .container { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 22px; padding: 24px 0 50px; }
.sidebar {
  position: sticky; top: 90px; height: calc(100vh - 110px); overflow: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px;
}
.sidebar-header { display: none; }
.sidebar-item + .sidebar-item { margin-top: 14px; }
.sidebar-list__header { font-size: 14px; color: var(--muted); margin-bottom: 8px; font-weight: 700; text-transform: uppercase; }
.sidebar-list__item, .sidebar-list__header-subtitle {
  display: flex; align-items: center; gap: 10px; width: 100%;
  text-decoration: none; color: #334155; border-radius: 10px; padding: 8px 10px;
}
.sidebar-list__item:hover, .sidebar-list__header-subtitle:hover, .doc-link.active {
  background: #e8f6ee; color: #0f5132;
}
.sidebar-badge { width: 56px; flex: 0 0 56px; }
.badge { display: inline-block; min-width: 54px; text-align: center; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 4px 7px; }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-primary { background: #dbeafe; color: #1e3a8a; }
.badge-danger { background: #fee2e2; color: #991b1b !important; }
.content { min-width: 0; }
.content__item {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 24px; margin-bottom: 16px;
}
.content-title { margin: 0 0 10px; font-weight: 800; color: #0f172a; }
h1.content-title { font-size: clamp(24px, 3vw, 36px); margin-bottom: 8px; }
h4.content-title { font-size: 18px; margin-top: 18px; }
.content-desc, p { color: var(--muted); }
.content-info-api {
  background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.content-info-url { font-family: "JetBrains Mono", monospace; color: #0f172a; word-break: break-all; }
.content-info-copy, .code-viewer__header-copy {
  border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 6px 8px; cursor: pointer;
}
.code-viewer { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-top: 12px; }
.code-viewer__header {
  background: #0f172a; color: #e2e8f0; min-height: 42px;
  display: flex; align-items: center; justify-content: space-between; padding: 8px 12px;
}
.code-viewer__header-title { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.code-viewer__body pre {
  margin: 0; padding: 14px; background: #111827; color: #f3f4f6;
  font-family: "JetBrains Mono", monospace; font-size: 13px; overflow: auto;
}
.text--danger { color: #b91c1c; }
.sidebar-overlay { display: none; }
@media (max-width: 991px) {
  .menu-bar { display: block; }
  main .container { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: -110%; top: 0; width: min(360px, 90vw); height: 100vh;
    border-radius: 0; z-index: 60; transition: left .25s ease;
  }
  .sidebar.active { left: 0; }
  .sidebar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
  .sidebar-overlay.active {
    display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, .35); z-index: 50;
  }
}
