.nav-inner.wide,
.wrap.wide { max-width: 1120px; }

html[lang="es"] .doc-en,
html:not([lang="es"]) .doc-es { display: none; }

.docs {
  display: grid; grid-template-columns: minmax(0, 1fr) 220px;
  gap: 56px; align-items: start; padding-bottom: 24px;
}
.doc { min-width: 0; max-width: 760px; }

.no-scrollbar,
.toc,
.table-wrap,
.tree { scrollbar-width: none; -ms-overflow-style: none; }
.toc::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar,
.tree::-webkit-scrollbar { display: none; }

.doc-hero { padding: 48px 0 8px; }
.doc-logo {
  border: 1px dashed var(--line-dash); border-radius: 16px;
  background: var(--surface); padding: 34px 40px; margin: 22px 0 0;
}
.doc-logo img { width: min(100%, 420px); margin: 0 auto; }
.doc-logo .logo-light { display: none; }
html[data-theme="light"] .doc-logo .logo-dark { display: none; }
html[data-theme="light"] .doc-logo .logo-light { display: block; }
.doc-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }

.doc section { padding: 0; }
.doc h2 {
  font-size: clamp(22px, 3.4vw, 27px); font-weight: 300; letter-spacing: -.025em;
  line-height: 1.25; margin: 0 0 16px; padding-top: 52px;
  border-top: 1px dashed var(--line-dash); margin-top: 52px;
}
.doc > section:first-of-type h2 { border-top: none; margin-top: 18px; padding-top: 0; }
.doc h3 { font-size: 17px; font-weight: 600; letter-spacing: -.01em; margin: 34px 0 10px; }
.doc h4 {
  font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--tx-mid); margin: 24px 0 8px;
}
.doc h2, .doc h3 { position: relative; scroll-margin-top: 84px; }
.doc .anchor {
  margin-left: 8px; color: var(--tx-dim); opacity: 0; font-weight: 400;
  transition: opacity .15s ease, color .15s ease;
}
.doc h2:hover .anchor, .doc h3:hover .anchor, .doc .anchor:focus { opacity: 1; }
.doc .anchor:hover { color: var(--tx); }

.doc p, .doc li { color: var(--tx-mid); font-size: 15px; line-height: 1.75; }
.doc p { margin: 0 0 14px; }
.doc strong { color: var(--tx); font-weight: 600; }
.doc a.link { color: var(--tx); text-decoration: underline; text-decoration-color: var(--line-dash); text-underline-offset: 3px; }
.doc a.link:hover { text-decoration-color: var(--tx); }
.doc ul, .doc ol { margin: 0 0 16px; padding-left: 20px; }
.doc li + li { margin-top: 6px; }
.doc li::marker { color: var(--tx-dim); }

.doc code {
  font-family: ui-monospace, SFMono-Regular, "Cascadia Mono", Menlo, Consolas, monospace;
  font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0;
  font-size: .86em; color: var(--tx);
  background: var(--surface-2); border: 1px solid var(--line-soft);
  border-radius: 5px; padding: 1px 6px;
}
.kbd {
  display: inline-block; min-width: 22px; text-align: center;
  font: 600 11.5px/1.6 ui-monospace, Consolas, monospace; color: var(--tx);
  border: 1px solid var(--chip-line); border-bottom-width: 2px; border-radius: 6px;
  padding: 0 6px; background: var(--surface);
}
.path { font-weight: 500; color: var(--tx); }

.code {
  position: relative; margin: 0 0 18px;
  border: 1px dashed var(--line-dash); border-radius: 12px;
  background: var(--surface); overflow: hidden;
}
.code-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 8px 7px 14px; border-bottom: 1px dashed var(--line-dash);
  font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--tx-dim);
}
.copy-btn {
  background: none; border: 1px solid transparent; border-radius: 6px; cursor: pointer;
  color: var(--tx-mid); font: 600 11px/1 inherit; letter-spacing: .06em; padding: 6px 8px;
  transition: background .15s ease, color .15s ease;
}
.copy-btn:hover { background: var(--surface-2); color: var(--tx); }
.code pre { margin: 0; padding: 16px 18px; overflow: hidden; }
.code pre code {
  display: block; background: none; border: none; padding: 0; font-size: 13px; line-height: 1.7;
  color: var(--tx-soft); white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 4;
}
.tk-k { color: #c678dd; }
.tk-t { color: #56b6c2; }
.tk-s { color: #98c379; }
.tk-n { color: #d19a66; }
html[data-theme="light"] .tk-k { color: #a626a4; }
html[data-theme="light"] .tk-t { color: #0184bc; }
html[data-theme="light"] .tk-s { color: #50a14f; }
html[data-theme="light"] .tk-n { color: #986801; }

.callout {
  border: 1px dashed var(--line-dash); border-radius: 12px;
  padding: 14px 18px; margin: 0 0 18px; background: var(--bg);
}
.callout .label { margin-bottom: 6px; }
.doc .callout p { margin: 0; font-size: 14px; }

.table-wrap { overflow-x: auto; margin: 0 0 18px; border: 1px dashed var(--line-dash); border-radius: 12px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 14px; }
.doc th, .doc td { text-align: left; padding: 10px 14px; vertical-align: top; }
.doc th {
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--tx-dim); border-bottom: 1px dashed var(--line-dash);
}
.doc td { color: var(--tx-mid); line-height: 1.6; }
.doc tr + tr td { border-top: 1px solid var(--line-soft); }
.doc td:first-child { white-space: nowrap; color: var(--tx); }

.feat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0 0 18px; }
.feat {
  border: 1px dashed var(--line-dash); border-radius: 12px; padding: 16px 17px;
  transition: border-color .2s ease;
}
.feat:hover { border-color: var(--tx-dim); }
.doc .feat h3 { margin: 0 0 6px; font-size: 15px; }
.doc .feat p { margin: 0; font-size: 13.5px; line-height: 1.6; }

.tree {
  border: 1px dashed var(--line-dash); border-radius: 12px; background: var(--surface);
  padding: 16px 18px; margin: 0 0 18px; overflow-x: auto;
  font: 13px/1.85 ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--tx);
  white-space: pre;
}
.tree .dim { color: var(--tx-dim); }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 18px; }
.doc .steps > li { position: relative; padding-left: 40px; margin: 0; }
.doc .steps > li + li { margin-top: 14px; }
.steps > li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 2px;
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: var(--tx);
  border: 1px dashed var(--line-dash);
}

.toc { position: sticky; top: 85px; max-height: calc(100vh - 110px); overflow-y: auto; padding: 48px 0 24px; }
.toc .label { margin-bottom: 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a {
  display: block; padding: 4px 0 4px 14px; margin-left: -1px;
  border-left: 1px solid transparent;
  font-size: 13px; line-height: 1.45; color: var(--tx-dim);
  transition: color .15s ease, border-color .15s ease;
}
.toc a:hover { color: var(--tx); }
.toc a.sub { padding-left: 26px; font-size: 12.5px; }
.toc a.on { color: var(--tx); border-left-color: var(--tx); }

.toc-inline {
  display: none; border: 1px dashed var(--line-dash); border-radius: 12px;
  padding: 0; margin: 26px 0 0;
}
.toc-inline summary {
  cursor: pointer; padding: 13px 18px; list-style: none;
  font-size: 11px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; color: var(--tx-mid);
}
.toc-inline summary::-webkit-details-marker { display: none; }
.toc-inline ol { list-style: none; margin: 0; padding: 0 18px 14px; columns: 2; column-gap: 24px; }
.toc-inline a { display: block; padding: 3px 0; font-size: 13.5px; color: var(--tx-mid); break-inside: avoid; }
.toc-inline a:hover { color: var(--tx); }

@media (max-width: 1000px) {
  .docs { grid-template-columns: 1fr; }
  .toc { display: none; }
  .toc-inline { display: block; }
}

@media (max-width: 600px) {
  .feat-grid { grid-template-columns: 1fr; }
  .toc-inline ol { columns: 1; }
  .doc-logo { padding: 24px; }
  .doc h2 { padding-top: 40px; margin-top: 40px; }
  .doc td:first-child { white-space: normal; }
}
