.docs-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--accent);
  z-index: 80;
  transition: width .08s linear;
}

.docs-head {
  border-bottom: 1.5px solid var(--ink);
  padding: 56px 0 48px;
}
.docs-head h1 {
  font-size: clamp(40px, 6vw, 76px);
  font-weight: 740;
  letter-spacing: -.05em;
  margin-top: 16px;
  line-height: .9;
  font-variation-settings: "opsz" 144, "wdth" 86;
}
.docs-head h1 .lime { background: var(--lime); color: var(--ink); padding: 0 .08em; }
.docs-head p { margin-top: 20px; font-size: 19px; max-width: 560px; }
.docs-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.docs-search { position: relative; flex: 1; min-width: 260px; max-width: 440px; }
.docs-search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.docs-search input {
  width: 100%;
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--ink);
  padding: 13px 16px 13px 42px;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  background: var(--surface);
  outline: none;
  transition: box-shadow .18s var(--ease);
}
.docs-search input:focus { box-shadow: 4px 4px 0 var(--accent); }
.docs-search input::placeholder { color: var(--muted); }
.docs-head-meta { margin-top: 24px; display: flex; gap: 22px; flex-wrap: wrap; font-family: var(--mono); font-size: 12.5px; color: var(--muted); letter-spacing: .02em; }
.docs-head-meta span { display: inline-flex; align-items: center; gap: 7px; }
.docs-head-meta svg { width: 15px; height: 15px; color: var(--accent); }

.docs-layout {
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  padding: 52px 0 96px;
}

.docs-nav {
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 104px);
  overflow-y: auto;
  padding-right: 6px;
}
.docs-nav::-webkit-scrollbar { width: 6px; }
.docs-nav::-webkit-scrollbar-thumb { background: var(--line-soft); }
.docs-nav-group { margin-bottom: 26px; }
.docs-nav-group .grp-ttl {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 12px;
  margin-bottom: 6px;
}
.docs-nav-group a {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: baseline;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  padding: 8px 12px;
  border-left: 2px solid transparent;
  line-height: 1.4;
}
.docs-nav-group a .idx { color: var(--muted); }
.docs-nav-group a:hover { color: var(--ink); background: var(--surface); border-left-color: var(--line-soft); }
.docs-nav-group a.active { color: var(--bg); background: var(--ink); border-left-color: var(--accent); }
.docs-nav-group a.active .idx { color: var(--lime); }

.docs-read { min-width: 0; max-width: 780px; margin: 0 auto; }
.docs-read .chapter { padding-top: 4px; margin-bottom: 56px; scroll-margin-top: 88px; }
.docs-read .ch-num {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}
.docs-read h2 {
  font-family: var(--display);
  font-size: clamp(30px, 3.4vw, 40px);
  font-weight: 700;
  letter-spacing: -.032em;
  margin-top: 10px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-variation-settings: "opsz" 96, "wdth" 96;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-soft);
}
.docs-read h2 .hash { color: var(--line-soft); font-weight: 400; opacity: 0; transition: opacity .2s; font-size: .8em; }
.docs-read h2:hover .hash { opacity: 1; }
.docs-read h3 { font-family: var(--display); font-size: 23px; font-weight: 660; margin-top: 38px; letter-spacing: -.025em; color: var(--ink); }
.docs-read p { margin: 16px 0; font-size: 16.5px; }
.docs-read ul, .docs-read ol { margin: 16px 0; padding-left: 22px; }
.docs-read li { margin: 8px 0; font-size: 16.5px; }
.docs-read li::marker { color: var(--accent); }
.docs-read strong { color: var(--ink); font-weight: 600; }
.docs-read a { color: var(--ink); }
.docs-read code, .docs-read .ic {
  font-family: var(--mono);
  font-size: .85em;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  padding: 1px 6px;
  color: var(--accent);
}

.callout {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 14px;
  padding: 16px 18px;
  border: 1.5px solid var(--ink);
  margin: 24px 0;
  background: var(--surface);
}
.callout .ico { width: 22px; height: 22px; margin-top: 1px; }
.callout .ico svg { width: 22px; height: 22px; }
.callout p { margin: 0; font-size: 15px; }
.callout p + p { margin-top: 8px; }
.callout strong { display: block; font-family: var(--display); font-weight: 660; font-size: 16px; margin-bottom: 2px; letter-spacing: -.02em; }
.callout--tip { background: var(--accent-soft); border-color: var(--accent); }
.callout--tip .ico { color: var(--accent); }
.callout--note { background: var(--surface); }
.callout--note .ico { color: var(--ink); }
.callout--warn { background: #FBF1DA; border-color: var(--gold); }
.callout--warn .ico { color: var(--gold); }

.code {
  margin: 24px 0;
  border: 1.5px solid var(--ink);
  background: var(--surface);
}
.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 8px 9px 14px;
  background: var(--bg);
  border-bottom: 1.5px solid var(--ink);
}
.code-head .lang {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.code-head .lang::before { content: ""; width: 8px; height: 8px; background: var(--accent); }
.copy-btn {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: var(--surface);
  border: 1.5px solid var(--ink);
  padding: 5px 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.copy-btn svg { width: 13px; height: 13px; }
.copy-btn:hover { background: var(--ink); color: var(--lime); }
.copy-btn.done { background: var(--accent); color: #fff; border-color: var(--accent); }
.code pre { margin: 0; padding: 18px 20px; overflow-x: auto; }
.code pre::-webkit-scrollbar { height: 8px; }
.code pre::-webkit-scrollbar-thumb { background: var(--line-soft); }
.code code {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink);
  background: none;
  border: 0;
  padding: 0;
}
.code .t-k { color: var(--accent); }
.code .t-s { color: var(--red); }
.code .t-v { color: var(--ink-2); }
.code .t-c { color: var(--muted); }
.code .t-f { color: #6E34D6; }

.steps-list { counter-reset: step; list-style: none; padding: 0; margin: 22px 0; border-top: 1px solid var(--line-soft); }
.steps-list li {
  position: relative;
  padding: 20px 0 20px 52px;
  font-size: 16px;
  counter-increment: step;
  border-bottom: 1px solid var(--line-soft);
}
.steps-list li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 22px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 13px;
  color: var(--accent);
}
.steps-list li strong { display: block; margin-bottom: 3px; font-size: 16px; }

.kbd {
  font-family: var(--mono);
  font-size: 12.5px;
  background: var(--surface);
  border: 1.5px solid var(--ink);
  border-bottom-width: 2.5px;
  padding: 1px 7px;
  color: var(--ink);
}

.docs-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 60px;
  padding-top: 30px;
  border-top: 1.5px solid var(--ink);
}
.docs-pager a {
  display: block;
  padding: 20px 24px;
  border: 1.5px solid var(--ink);
  text-decoration: none;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}
.docs-pager a:hover { transform: translate(-3px, -3px); box-shadow: 5px 5px 0 var(--accent); background: var(--surface); }
.docs-pager .lbl { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.docs-pager .nm { font-family: var(--display); font-weight: 660; color: var(--ink); font-size: 20px; margin-top: 6px; letter-spacing: -.025em; }
.docs-pager .next { text-align: right; }

.docs-foot {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 34px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
  letter-spacing: .02em;
}
.docs-foot a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink-2); }
.docs-foot a:hover { color: var(--accent); }
.docs-foot svg { width: 15px; height: 15px; }

.sidebar-toggle {
  display: none;
  width: 100%;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--ink);
  padding: 13px 16px;
  margin-bottom: 20px;
  cursor: pointer;
  align-items: center;
  justify-content: space-between;
}
.sidebar-toggle svg { width: 18px; height: 18px; color: var(--ink); }

@media (max-width: 900px) {
  .docs-layout { grid-template-columns: 1fr; gap: 24px; }
  .docs-nav {
    position: static;
    max-height: none;
    overflow: visible;
    display: none;
    border: 1.5px solid var(--ink);
    padding: 16px;
    background: var(--surface);
  }
  .docs-nav.open { display: block; }
  .sidebar-toggle { display: flex; }
  .docs-pager { grid-template-columns: 1fr; }
}
