@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --accent-500: #9c8160;
  --accent-600: #8a7052;
  --accent-700: #6f563c;
  --accent-50: #f5f1ed;
  --accent-100: #ede5df;
  --ink: #1d1d1f;
  --ink-soft: #3a3a3c;
  --ink-muted: #6e6e73;
  --bg-page: #faf9f7;
  --bg-card: #ffffff;
  --line: #e8e4de;
  --line-soft: #efece7;
  --topbar-bg: #191919;
  --radius: 12px;
  --shadow-card: 0 1px 2px rgba(29, 25, 18, 0.04), 0 8px 24px rgba(29, 25, 18, 0.05);
  --shadow-pop: 0 4px 10px rgba(29, 25, 18, 0.08), 0 18px 44px rgba(29, 25, 18, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-page);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

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

a:hover {
  color: var(--accent-700);
}

:focus-visible {
  outline: 2px solid var(--accent-500);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Top bar ---------- */

.docs-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--topbar-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.docs-topbar-inner {
  max-width: 1240px;
  height: 60px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.docs-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.docs-brand:hover {
  color: #ffffff;
}

.docs-brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.docs-topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.docs-toplinks {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  font-weight: 500;
}

.docs-toplinks a {
  color: rgba(255, 255, 255, 0.72);
  transition: color 120ms ease;
}

.docs-toplinks a:hover {
  color: #ffffff;
}

.docs-menu-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  cursor: pointer;
}

.docs-menu-toggle:hover {
  border-color: rgba(255, 255, 255, 0.5);
  color: #ffffff;
}

/* ---------- Layout ---------- */

.docs-shell {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  gap: 56px;
  padding: 36px 22px 80px;
}

/* ---------- Sidebar ---------- */

.docs-sidebar {
  position: sticky;
  top: 84px;
  align-self: start;
  max-height: calc(100vh - 104px);
  overflow: auto;
  padding-right: 10px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.docs-sidebar::-webkit-scrollbar {
  width: 6px;
}

.docs-sidebar::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 3px;
}

.docs-search {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%236e6e73' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='16.5' y1='16.5' x2='21' y2='21'/%3E%3C/svg%3E") no-repeat 12px center;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  padding: 10px 12px 10px 36px;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.docs-search::placeholder {
  color: var(--ink-muted);
}

.docs-search:focus {
  outline: none;
  border-color: var(--accent-500);
  box-shadow: 0 0 0 3px rgba(156, 129, 96, 0.18);
}

.docs-sidebar .docs-search {
  margin-bottom: 24px;
}

.docs-nav-section {
  margin-bottom: 26px;
}

.docs-nav-section-title {
  margin: 0 0 6px;
  padding-left: 12px;
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.docs-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.docs-nav-link {
  display: block;
  border-radius: 8px;
  padding: 6px 12px;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.45;
  transition: background 100ms ease, color 100ms ease;
}

.docs-nav-link:hover {
  background: var(--line-soft);
  color: var(--ink);
}

.docs-nav-link.active {
  background: var(--accent-50);
  color: var(--accent-700);
  font-weight: 600;
  box-shadow: inset 2.5px 0 0 var(--accent-500);
}

.docs-empty {
  display: none;
  margin: 12px 0 0;
  padding-left: 12px;
  color: var(--ink-muted);
  font-size: 14px;
}

.docs-sidebar.searching .docs-nav-section-title {
  display: none;
}

.docs-sidebar.searching .docs-nav-section {
  margin-bottom: 0;
}

/* ---------- Page header ---------- */

.docs-content {
  min-width: 0;
  max-width: 720px;
}

.docs-page-header {
  margin: 4px 0 34px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.docs-kicker {
  margin: 0 0 8px;
  color: var(--accent-600);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.docs-page-header h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(28px, 3.4vw, 38px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.docs-intro {
  margin: 12px 0 0;
  color: var(--ink-muted);
  font-size: 17px;
  line-height: 1.6;
}

/* ---------- Article ---------- */

.docs-article > :first-child {
  margin-top: 0;
}

.docs-article > :last-child {
  margin-bottom: 0;
}

.docs-article h2 {
  margin: 40px 0 12px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
  font-size: 22px;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.docs-article h3 {
  margin: 26px 0 8px;
  font-size: 17.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.docs-article p,
.docs-article ul,
.docs-article ol {
  margin: 0 0 16px;
  color: var(--ink-soft);
}

.docs-article ul,
.docs-article ol {
  padding-left: 22px;
}

.docs-article li {
  margin: 7px 0;
  padding-left: 3px;
}

.docs-article li::marker {
  color: var(--accent-500);
  font-weight: 600;
}

.docs-article strong {
  color: var(--ink);
  font-weight: 600;
}

.docs-article a {
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(156, 129, 96, 0.35);
  text-underline-offset: 3px;
  transition: text-decoration-color 120ms ease;
}

.docs-article a:hover {
  text-decoration-color: var(--accent-600);
}

/* ---------- Prev / next ---------- */

.docs-pagenav {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 52px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.docs-pagenav-link {
  flex: 0 1 48%;
  display: block;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-card);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.docs-pagenav-link:hover {
  border-color: var(--accent-100);
  box-shadow: var(--shadow-card);
}

.docs-pagenav-link.next {
  text-align: right;
  margin-left: auto;
}

.docs-pagenav-label {
  display: block;
  color: var(--ink-muted);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.docs-pagenav-title {
  display: block;
  margin-top: 2px;
  color: var(--accent-700);
  font-size: 14.5px;
  font-weight: 600;
}

/* ---------- Homepage ---------- */

.docs-home-header {
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 26px;
}

.docs-home-search-wrap {
  position: relative;
  max-width: 560px;
  margin-bottom: 40px;
}

.docs-home-search {
  font-size: 16px;
  padding: 14px 16px 14px 42px;
  border-radius: var(--radius);
  background-position: 15px center;
  box-shadow: var(--shadow-card);
}

.docs-home-results {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 10;
  list-style: none;
  margin: 0;
  padding: 6px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pop);
}

.docs-home-results a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 500;
}

.docs-home-results a:hover {
  background: var(--accent-50);
  color: var(--accent-700);
}

.docs-home-results a span {
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.docs-home-noresults {
  padding: 9px 12px;
  color: var(--ink-muted);
  font-size: 14px;
}

.docs-callout {
  margin-bottom: 40px;
  padding: 16px 20px;
  background: var(--accent-50);
  border: 1px solid var(--accent-100);
  border-radius: var(--radius);
  color: var(--ink-soft);
  font-size: 15px;
}

.docs-callout strong {
  color: var(--ink);
}

.docs-callout a {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(156, 129, 96, 0.4);
  text-underline-offset: 3px;
}

.docs-home-section {
  margin-bottom: 40px;
}

.docs-home-section h2 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.docs-task-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}

.docs-task-grid a {
  display: block;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink-soft);
  font-size: 14.5px;
  font-weight: 500;
  transition: border-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.docs-task-grid a:hover {
  border-color: var(--accent-100);
  color: var(--accent-700);
  box-shadow: var(--shadow-card);
}

.docs-home-help {
  margin: 0;
  color: var(--ink-muted);
  font-size: 15px;
}

.docs-home-help a {
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(156, 129, 96, 0.35);
  text-underline-offset: 3px;
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .docs-shell {
    display: block;
    padding: 20px 18px 56px;
  }

  .docs-menu-toggle {
    display: inline-flex;
  }

  .docs-sidebar {
    display: none;
    position: static;
    max-height: none;
    margin-bottom: 28px;
    padding: 18px 16px 8px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
  }

  .docs-sidebar.open {
    display: block;
  }

  .docs-toplinks {
    gap: 16px;
  }

  .docs-pagenav {
    flex-direction: column;
  }

  .docs-pagenav-link.next {
    margin-left: 0;
  }
}

@media (max-width: 560px) {
  .docs-brand span {
    display: none;
  }

  .docs-toplinks {
    font-size: 13px;
  }
}
