.docs-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 62% -12%, rgb(160 84 38 / 0.12), transparent 34rem),
    var(--bg);
}

.docs-page::before { z-index: 300; }
.docs-page .site-header { position: fixed; inset: 0 0 auto; }
.docs-page .header-inner { height: 72px; }
.docs-page .site-nav a.active::after { transform: scaleX(1); }
.docs-mobile-bar { display: none; }

.docs-layout {
  display: grid;
  grid-template-columns: minmax(250px, 294px) minmax(0, 820px) minmax(190px, 230px);
  max-width: 1480px;
  min-height: 100vh;
  margin: 0 auto;
  padding-top: 72px;
}

.docs-sidebar { border-right: 1px solid var(--line); }
.docs-sidebar-inner {
  position: sticky;
  top: 72px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 72px);
  padding: 30px 25px 24px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-bright) transparent;
}

.docs-home-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}
.docs-home-link b { color: var(--copper-bright); font-size: 17px; }
.docs-home-link.active { color: var(--copper-bright); }

.docs-search {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.docs-search:focus-within { border-color: var(--copper); box-shadow: 0 0 0 3px rgb(221 140 81 / 0.1); }
.docs-search svg { width: 17px; height: 17px; fill: none; stroke: var(--muted); stroke-linecap: round; stroke-width: 1.8; }
.docs-search input { min-width: 0; width: 100%; padding: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 13px; }
.docs-search input::placeholder { color: var(--muted); }
.docs-search-status { min-height: 16px; margin: 7px 2px 0; color: var(--muted); font-size: 11px; }

.docs-nav-group { margin: 19px 0 0; }
.docs-nav-group h2 { margin: 0 10px 7px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 0.105em; text-transform: uppercase; }
.docs-nav-group a { display: block; margin: 1px 0; padding: 7px 10px; border-radius: 8px; color: var(--text-soft); font-size: 13px; line-height: 1.35; transition: color 150ms ease, background 150ms ease; }
.docs-nav-group a:hover { color: var(--text); background: rgb(255 255 255 / 0.025); }
.docs-nav-group a.active { color: var(--copper-bright); background: rgb(221 140 81 / 0.1); }
.docs-nav-group a[hidden], .docs-nav-group[hidden] { display: none; }
.docs-sidebar-footer { display: flex; flex-direction: column; gap: 5px; margin-top: auto; padding: 24px 10px 0; color: var(--muted); font-size: 11px; }
.docs-sidebar-footer a { color: var(--text-soft); font-weight: 650; }

.docs-site-footer { position: relative; z-index: 1; }

.docs-main { min-width: 0; padding: 62px clamp(40px, 5.5vw, 82px) 110px; }
.doc-article[hidden] { display: none; }
.article-header { margin-bottom: 42px; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.article-kicker { margin: 0 0 13px; color: var(--copper-bright); font-size: 12px; font-weight: 760; letter-spacing: 0.12em; text-transform: uppercase; }
.article-header h1, .docs-welcome > h1 { max-width: 770px; margin: 0; color: var(--text); font-size: clamp(38px, 5vw, 58px); line-height: 1.06; letter-spacing: -0.045em; }
.article-lede { max-width: 700px; margin: 19px 0 0; color: var(--text-soft); font-size: 18px; line-height: 1.65; }
.article-meta { display: flex; gap: 18px; margin-top: 20px; color: var(--muted); font-size: 12px; }
.article-meta a { color: var(--text-soft); }
.article-meta a:hover { color: var(--copper-bright); }

.markdown-body { color: var(--text-soft); font-size: 15.5px; line-height: 1.78; }
.markdown-body h2, .markdown-body h3, .markdown-body h4, .markdown-body h5, .markdown-body h6 { position: relative; color: var(--text); line-height: 1.25; letter-spacing: -0.025em; scroll-margin-top: 102px; }
.markdown-body h2 { margin: 56px 0 18px; padding-top: 4px; font-size: 30px; }
.markdown-body h3 { margin: 38px 0 13px; font-size: 22px; }
.markdown-body h4 { margin: 28px 0 10px; font-size: 17px; }
.heading-anchor { margin-left: 8px; color: transparent; font-size: 0.72em; font-weight: 500; transition: color 150ms ease; }
.markdown-body h2:hover .heading-anchor, .markdown-body h3:hover .heading-anchor, .heading-anchor:focus { color: var(--copper); }
.markdown-body p { margin: 0 0 18px; }
.markdown-body a { color: var(--copper-bright); text-decoration: underline; text-decoration-color: rgb(240 173 116 / 0.35); text-underline-offset: 3px; }
.markdown-body a:hover { text-decoration-color: var(--copper-bright); }
.markdown-body strong { color: var(--text); font-weight: 680; }
.markdown-body ul, .markdown-body ol { margin: 14px 0 22px; padding-left: 24px; }
.markdown-body ul ul, .markdown-body ol ol, .markdown-body ul ol, .markdown-body ol ul { margin: 7px 0; }
.markdown-body li { margin: 6px 0; padding-left: 5px; }
.markdown-body li::marker { color: var(--copper); }
.markdown-body :not(pre) > code, .quick-command-list code { padding: 0.15em 0.42em; border: 1px solid var(--line); border-radius: 5px; background: var(--panel); color: #eed3be; font-size: 0.88em; }

.code-block { margin: 24px 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #0b0a09; box-shadow: inset 0 1px rgb(255 255 255 / 0.025); }
.code-label { display: flex; align-items: center; justify-content: space-between; padding: 7px 12px; border-bottom: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: 11px; text-transform: uppercase; }
.code-label button { padding: 2px 5px; border: 0; background: transparent; color: var(--text-soft); cursor: pointer; font-size: 11px; text-transform: none; }
.code-block pre { margin: 0; padding: 18px 20px; overflow-x: auto; color: #e9ded4; font-size: 12.5px; line-height: 1.65; }
.markdown-body blockquote, .docs-note { margin: 24px 0; padding: 17px 20px; border-left: 3px solid var(--copper); border-radius: 0 10px 10px 0; background: rgb(221 140 81 / 0.07); color: var(--text-soft); }
.markdown-body blockquote p:last-child, .docs-note p:last-child { margin-bottom: 0; }
.markdown-body hr { height: 1px; margin: 44px 0; border: 0; background: var(--line); }

.table-wrap { max-width: 100%; margin: 24px 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 11px; }
.markdown-body table { width: 100%; border-collapse: collapse; font-size: 13px; }
.markdown-body th, .markdown-body td { min-width: 130px; padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.markdown-body th { background: var(--panel); color: var(--text); font-size: 11px; letter-spacing: 0.03em; text-transform: uppercase; }
.markdown-body tr:last-child td { border-bottom: 0; }
.doc-image { margin: 28px 0; overflow: hidden; border: 1px solid var(--line-bright); border-radius: 14px; background: var(--panel); }
.doc-image img { width: 100%; }

.article-pagination { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 70px; padding-top: 24px; border-top: 1px solid var(--line); }
.article-pagination a { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; color: var(--text-soft); transition: border-color 150ms ease, background 150ms ease; }
.article-pagination a:hover { border-color: var(--copper-dark); background: rgb(221 140 81 / 0.05); }
.article-pagination a.next { align-items: flex-end; text-align: right; }
.article-pagination span { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.article-pagination strong { color: var(--text); font-size: 13px; }

.docs-toc { border-left: 1px solid var(--line); }
.docs-toc > div { position: sticky; top: 104px; padding: 0 24px; }
.docs-toc h2 { margin: 0 0 12px; color: var(--muted); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.docs-toc nav { display: flex; flex-direction: column; gap: 2px; max-height: calc(100vh - 210px); overflow-y: auto; }
.docs-toc nav a { padding: 4px 0; color: var(--muted); font-size: 11.5px; line-height: 1.4; transition: color 150ms ease; }
.docs-toc nav a:hover, .docs-toc nav a.active { color: var(--copper-bright); }
.docs-toc nav .toc-level-3 { padding-left: 12px; }
.toc-empty { color: var(--muted); font-size: 11.5px; line-height: 1.5; }
.toc-github { display: inline-block; margin-top: 18px; color: var(--text-soft); font-size: 11.5px; }
.mobile-toc { display: none; }

.docs-path-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; margin: 42px 0 50px; }
.docs-path-card { display: flex; min-height: 240px; flex-direction: column; padding: 22px; border: 1px solid var(--line); border-radius: 15px; background: linear-gradient(145deg, rgb(255 255 255 / 0.025), transparent 56%); transition: transform 180ms ease, border-color 180ms ease, background 180ms ease; }
.docs-path-card:hover { transform: translateY(-3px); border-color: var(--copper-dark); background: rgb(221 140 81 / 0.045); }
.docs-path-card > span { color: var(--copper); font-size: 11px; font-weight: 750; letter-spacing: 0.1em; }
.docs-path-card strong { margin-top: 28px; color: var(--text); font-size: 18px; }
.docs-path-card p { margin: 9px 0 20px; color: var(--text-soft); font-size: 13px; line-height: 1.55; }
.docs-path-card b { margin-top: auto; color: var(--copper-bright); font-size: 12px; }

.quick-command-panel { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 34px; margin: 50px 0 28px; padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.quick-command-panel h2, .all-guides h2 { margin: 0 0 12px; color: var(--text); font-size: 27px; line-height: 1.2; }
.quick-command-panel p:not(.article-kicker) { margin: 0; color: var(--text-soft); font-size: 13px; }
.quick-command-list { display: flex; flex-direction: column; gap: 9px; }
.quick-command-list div { display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: center; gap: 9px; }
.quick-command-list span { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.quick-command-list code { overflow-x: auto; white-space: nowrap; }
.docs-note { display: grid; grid-template-columns: 145px 1fr; gap: 18px; align-items: start; font-size: 13px; }
.docs-note strong { color: var(--text); }
.docs-note p { margin: 0; }
.docs-note a { color: var(--copper-bright); }

.all-guides { margin-top: 64px; }
.all-guides-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 26px; }
.all-guides-grid section { padding: 20px; border: 1px solid var(--line); border-radius: 13px; }
.all-guides-grid h3 { margin: 0 0 10px; color: var(--text); font-size: 14px; }
.all-guides-grid a { display: flex; flex-direction: column; gap: 1px; padding: 9px 0; border-bottom: 1px solid rgb(81 66 52 / 0.45); }
.all-guides-grid a:last-child { border-bottom: 0; }
.all-guides-grid strong { color: var(--text-soft); font-size: 12.5px; }
.all-guides-grid span { color: var(--muted); font-size: 11px; line-height: 1.45; }
.all-guides-grid a:hover strong { color: var(--copper-bright); }
.sidebar-backdrop { display: none; }

@media (max-width: 1180px) {
  .docs-layout { grid-template-columns: 255px minmax(0, 1fr); }
  .docs-toc { display: none; }
  .mobile-toc { display: block; margin: -18px 0 35px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
  .mobile-toc button { display: flex; width: 100%; align-items: center; justify-content: space-between; padding: 10px 13px; border: 0; background: transparent; color: var(--text-soft); cursor: pointer; font-size: 12px; }
  .mobile-toc nav { display: none; flex-direction: column; gap: 3px; padding: 0 13px 12px; }
  .mobile-toc.open nav { display: flex; }
  .mobile-toc nav a { color: var(--muted); font-size: 11.5px; }
}

@media (max-width: 820px) {
  .docs-page .site-nav a:nth-child(2), .docs-page .site-nav a:nth-child(3) { display: none; }
  .docs-mobile-bar { position: sticky; top: 72px; z-index: 90; display: block; padding: 10px 18px; border-bottom: 1px solid var(--line); background: rgb(16 15 13 / 0.95); backdrop-filter: blur(16px); }
  .docs-mobile-bar button { display: flex; width: 100%; align-items: center; justify-content: space-between; padding: 4px 0; border: 0; background: transparent; color: var(--text-soft); font-size: 12px; }
  .docs-layout { display: block; padding-top: 72px; }
  .docs-sidebar { position: fixed; z-index: 200; top: 72px; bottom: 0; left: 0; width: min(330px, 88vw); border-right: 1px solid var(--line-bright); background: var(--bg-soft); transform: translateX(-102%); transition: transform 190ms ease; }
  .docs-sidebar.open { transform: translateX(0); }
  .docs-sidebar-inner { position: static; height: 100%; }
  .sidebar-backdrop { position: fixed; z-index: 190; inset: 72px 0 0; background: rgb(0 0 0 / 0.58); }
  .sidebar-backdrop.open { display: block; }
  .docs-main { padding: 44px 24px 80px; }
  .docs-path-grid, .quick-command-panel, .all-guides-grid { grid-template-columns: 1fr; }
  .docs-path-card { min-height: 190px; }
  .docs-note { grid-template-columns: 1fr; gap: 4px; }
}

@media (max-width: 560px) {
  .docs-page .header-inner { width: calc(100% - 32px); }
  .docs-page .site-nav, .docs-page .menu-button { display: none; }
  .article-header h1, .docs-welcome > h1 { font-size: 38px; }
  .article-lede { font-size: 16px; }
  .docs-main { padding-inline: 18px; }
  .article-meta { flex-direction: column; gap: 4px; }
  .article-pagination { grid-template-columns: 1fr; }
  .quick-command-panel { padding: 21px; }
  .quick-command-list div { grid-template-columns: 1fr; gap: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  .docs-path-card, .docs-sidebar { transition: none; }
}
