:root {
  --bg: #f6f8fa;
  --paper: #ffffff;
  --text: #1f2933;
  --muted: #64748b;
  --border: #d8dee4;
  --code-bg: #f1f5f9;
  --code-text: #0f172a;
  --accent: #94b41e;
  --accent-strong: #7a9516;
  --dark: #0b1117;
}

* {
  box-sizing: border-box;
}

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

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

a {
  color: var(--accent-strong);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.docs-header {
  background: var(--dark);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.docs-header-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.docs-brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  color: inherit;
  line-height: 0;
  text-decoration: none;
}

.docs-brand:hover {
  text-decoration: none;
}

.docs-brand img {
  display: block;
  width: 180px;
  height: auto;
}

.docs-menu-button {
  display: none;
}

.docs-nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 1rem;
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
}

.docs-nav a {
  color: var(--accent);
  flex: 0 0 auto;
}

.nav-label-short {
  display: none;
}

.docs-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 2rem auto 4rem;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.docs-sidebar {
  position: sticky;
  top: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--paper);
}

.docs-sidebar strong {
  display: block;
  margin-bottom: 0.75rem;
  color: var(--dark);
}

.docs-sidebar a {
  display: block;
  padding: 0.28rem 0;
  color: #334155;
  font-size: 0.94rem;
}

.docs-sidebar-section {
  display: block;
  margin: 1rem 0 0.25rem;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.docs-sidebar a.docs-sidebar-section {
  color: var(--accent-strong);
}

.docs-menu-overlay {
  display: none;
}

.docs-content {
  min-width: 0;
  max-width: 100%;
  padding: 2.25rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.docs-content h1 {
  margin-top: 0;
  color: var(--dark);
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.docs-content h2 {
  margin-top: 2.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--dark);
  font-size: clamp(1.45rem, 3vw, 2rem);
  letter-spacing: -0.03em;
}

.docs-content h3 {
  margin-top: 1.6rem;
  color: var(--dark);
}

.docs-content p,
.docs-content li {
  font-size: 1.03rem;
}

.docs-content p {
  margin: 1rem 0;
}

.docs-content ul,
.docs-content ol {
  padding-left: 1.4rem;
}

.docs-content code {
  padding: 0.15rem 0.35rem;
  border-radius: 0.35rem;
  background: var(--code-bg);
  color: var(--code-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.docs-content pre {
  max-width: 100%;
  overflow-x: auto;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  background: #0b1117;
  color: #d9f99d;
  -webkit-overflow-scrolling: touch;
}

.docs-content pre code {
  padding: 0;
  background: transparent;
  color: inherit;
  overflow-wrap: normal;
  word-break: normal;
}

.docs-content table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.docs-content th,
.docs-content td {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  text-align: left;
}

.docs-content th {
  background: #f8fafc;
}

.docs-content blockquote {
  margin: 1.25rem 0;
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--accent);
  background: rgba(148, 180, 30, 0.08);
  color: #334155;
}

.docs-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.docs-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 2rem 0 3rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

.docs-footer p {
  margin: 0.35rem 0;
}

@media (max-width: 900px) {
  .docs-header-inner {
    width: min(100% - 24px, 1180px);
    min-height: 68px;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    justify-content: normal;
    gap: 0.75rem;
    padding: 0.85rem 0 1rem;
  }

  .docs-menu-button {
    display: inline-flex;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    color: var(--accent);
    cursor: pointer;
    padding: 0;
  }

  .docs-menu-button span {
    display: block;
    width: 19px;
    height: 2px;
    margin: 0;
    border-radius: 999px;
    background: currentColor;
  }

  .docs-brand {
    min-width: 0;
  }

  .docs-brand img {
    width: 145px;
  }

  .docs-nav {
    grid-column: 1 / -1;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.25rem;
    font-size: clamp(0.68rem, 2.55vw, 0.82rem);
    line-height: 1.2;
    white-space: nowrap;
  }

  .docs-nav a {
    min-width: 0;
    text-align: center;
    white-space: nowrap;
  }

  .nav-label-full {
    display: none;
  }

  .nav-label-short {
    display: inline;
  }

  .docs-shell {
    width: min(100% - 24px, 1180px);
    max-width: calc(100% - 24px);
    margin: 1rem auto 3rem;
    display: block;
  }

  .docs-content {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 1.15rem;
    border-radius: 14px;
    overflow-x: hidden;
  }

  .docs-content > * {
    max-width: 100%;
  }

  .docs-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    width: min(84vw, 320px);
    max-width: 320px;
    height: 100dvh;
    overflow-y: auto;
    padding: 1rem;
    border-radius: 0;
    border: 0;
    border-right: 1px solid var(--border);
    transform: translateX(-105%);
    transition: transform 180ms ease;
    box-shadow: 24px 0 48px rgba(0, 0, 0, 0.22);
  }

  body.docs-menu-open .docs-sidebar {
    transform: translateX(0);
  }

  .docs-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(11, 17, 23, 0.48);
  }

  body.docs-menu-open .docs-menu-overlay {
    display: block;
  }

  body.docs-menu-open {
    overflow: hidden;
  }

  .docs-sidebar strong {
    margin-bottom: 0.5rem;
  }

  .docs-sidebar a {
    font-size: 1rem;
    padding: 0.36rem 0;
  }

  .docs-sidebar-section {
    margin-top: 1.1rem;
  }

  .docs-content h1 {
    font-size: clamp(2rem, 9vw, 2.6rem);
  }

  .docs-content h2 {
    font-size: clamp(1.45rem, 7vw, 1.9rem);
  }

  .docs-content p,
  .docs-content li {
    font-size: 1rem;
  }

  .docs-content pre {
    margin-left: -0.2rem;
    margin-right: -0.2rem;
    border-radius: 10px;
    font-size: 0.88rem;
  }

  .docs-content ul,
  .docs-content ol {
    padding-left: 1.2rem;
  }
}

@media (max-width: 380px) {
  .docs-nav {
    font-size: 0.68rem;
    gap: 0.18rem;
  }

  .docs-brand img {
    width: 136px;
  }

  .docs-content {
    padding: 1rem;
  }
}
