/* kilasifen: estilos del sitio (la portada y las guías). Papel y guías. */

/* ---------- fuentes, servidas desde fonts/ (subconjunto Latin1) ---------- */
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/IBMPlexMono-Regular-Latin1.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/IBMPlexMono-Italic-Latin1.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/IBMPlexMono-Medium-Latin1.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/IBMPlexMono-SemiBold-Latin1.woff2") format("woff2"); }
/* Las vocales nasales del guaraní (ẽ, ỹ) no están en Latin1: este subconjunto se descarga solo en una página que las usa. */
@font-face {
  font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/IBMPlexMono-Regular-Latin3.woff2") format("woff2");
  unicode-range: U+0102-0103, U+01CD-01DC, U+1E0C-1E0D, U+1E12-1E13, U+1E24-1E25, U+1E36-1E37, U+1E3C-1E3D, U+1E40-1E47, U+1E4A-1E4B, U+1E62-1E63, U+1E6C-1E6D, U+1E70-1E71, U+1E92-1E93, U+1EA0-1EF9, U+20AB;
}
@font-face { font-family: "IBM Plex Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/IBMPlexSerif-Regular-Latin1.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/IBMPlexSerif-Italic-Latin1.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Serif"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/IBMPlexSerif-Medium-Latin1.woff2") format("woff2"); }

:root {
  --paper: #f2efea;
  --paper-2: #e9e4dd;
  --sheet: #fcfbf9;
  --ink: #1d1c1a;
  --ink-2: #3a3936;
  --grey: #5e6269;
  --grey-2: #6c7077;
  --line: #dcd5cc;
  --line-2: #cbc3b8;
  --dots: #b9b0a4;
  --guide: rgba(84, 62, 40, .14);
  --guide-2: rgba(84, 62, 40, .08);
  --blue: #1d4fd8;
  --blue-deep: #1843bb;
  --navy: #1e3a7b;
  --blue-wash: #e2e7f5;
  --serif: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  /* portada: la columna central y sus guías */
  --half: 560px;
  --gut: 24px;
  --edge-l: calc(50% - min(var(--half), 50% - var(--gut)));
  --edge-r: calc(50% + min(var(--half), 50% - var(--gut)) - 1px);
  /* guías: las tres columnas */
  --side: 272px;
  --bar: 56px;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .33 0 0 0 0 .25 0 0 0 0 .17 0 0 0 .7 -.3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  /* El motivo de las guías: una marca de registro de imprenta, como en un formulario preimpreso. */
  --mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 15 15'%3E%3Ccircle cx='7.5' cy='7.5' r='4' fill='%23f2efea' stroke='%23a69c8f'/%3E%3Cpath d='M7.5 0v15M0 7.5h15' stroke='%23a69c8f'/%3E%3C/svg%3E");
}
@media (max-width: 699px) { :root { --gut: 16px; } }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--bar) + 24px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper) var(--grain);
  color: var(--ink);
  font: 400 15px/1.7 var(--mono);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-underline-offset: 3px; text-decoration-thickness: 1px; }
code, kbd, pre { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 2px; }
/* font-weight: un título oculto en negrita descargaría una fuente que no se ve */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; font-weight: 400; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 30; padding: 8px 12px; background: var(--blue); color: #fff; font-size: 13.5px; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- piezas comunes ---------- */
.wordmark { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; }
.wordmark svg { width: 20px; height: 24px; color: var(--blue); flex: none; }
.wordmark span { font: 500 21px/1 var(--serif); letter-spacing: -.01em; }
.tag {
  display: inline-block; padding: 2px 6px 3px; border: 1px solid var(--line-2); border-radius: 2px;
  font: 500 11px/1 var(--mono); color: var(--grey); letter-spacing: .02em; background: var(--sheet);
}
.menu-btn {
  display: none; align-items: center; gap: 8px; height: 30px; padding: 0 10px;
  border: 1px solid var(--line-2); border-radius: 3px; background: var(--paper-2);
  font: 500 12.5px/1 var(--mono); color: var(--ink); cursor: pointer;
}
.menu-btn svg { width: 14px; height: 14px; }
.site-foot { background: var(--blue); color: #fff; }
.site-foot .wordmark, .site-foot .wordmark svg { color: #fff; }
.site-foot a { color: #fff; font-size: 13.5px; }
.site-foot :focus-visible { outline-color: #fff; }

/* el resaltado de código: el azul y grises */
pre .k { color: var(--blue); }
pre .s, pre .n { color: var(--navy); }
pre .c { color: var(--grey-2); font-style: italic; }
pre .p { color: var(--grey-2); }
pre .f { color: var(--ink); font-weight: 500; }
pre .o { color: var(--ink-2); }

/* =================================================================
   Portada
   ================================================================= */
body.home { position: relative; overflow-x: hidden; }

/* ---------- la grilla de papel ---------- */
.wrap { width: min(calc(var(--half) * 2), calc(100% - var(--gut) * 2)); margin-inline: auto; }
.guides { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.guides i { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--guide); }
.guides i:nth-child(1) { left: var(--edge-l); }
.guides i:nth-child(2) { left: var(--edge-r); }
.guides i:nth-child(3) { left: 40px; background: var(--guide-2); }
.guides i:nth-child(4) { right: 40px; background: var(--guide-2); }
@media (max-width: 1279px) { .guides i:nth-child(n+3) { display: none; } }

.rule { position: relative; height: 1px; background: var(--line); }
.rule::before, .rule::after {
  content: ""; position: absolute; top: -7px; z-index: 6;
  width: 15px; height: 15px; background: var(--mark) no-repeat;
}
.rule::before { left: calc(var(--edge-l) - 7px); }
.rule::after { left: calc(var(--edge-r) - 7px); }

/* ---------- botones e instalación ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; height: 36px; padding: 0 9px 0 14px;
  border: 1px solid transparent; border-radius: 3px; font: 500 13.5px/1 var(--mono);
  text-decoration: none; white-space: nowrap; cursor: pointer;
}
.btn kbd {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px;
  border: 1px solid; border-radius: 2px; font: 500 10.5px/1 var(--mono);
}
.btn-primary {
  background: var(--blue); color: #fff; border-color: var(--blue-deep);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 1px 0 rgba(16, 36, 110, .22);
}
.btn-primary kbd { border-color: rgba(255, 255, 255, .55); color: #fff; }
.btn-primary:hover { background: var(--blue-deep); }
.btn-primary:focus-visible { outline-offset: 3px; }
.btn-secondary { background: var(--paper-2); color: var(--ink); border-color: var(--line-2); }
.btn-secondary kbd { border-color: var(--line-2); color: var(--grey); background: var(--sheet); }
.btn-secondary:hover { background: #e2dcd3; }
.btn-sm { height: 30px; font-size: 12.5px; padding: 0 7px 0 11px; gap: 8px; }
.btn-sm kbd { min-width: 16px; height: 16px; font-size: 10px; }

.install {
  display: inline-flex; align-items: center; gap: 12px; max-width: 100%;
  padding: 5px 5px 5px 14px; background: var(--sheet); border: 1px solid var(--line-2); border-radius: 3px;
  font-size: 15px; line-height: 1;
}
.install .prompt { color: var(--grey-2); user-select: none; }
.install code { color: var(--ink); white-space: nowrap; }
.copy {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 9px;
  border: 1px solid var(--line); border-radius: 2px; background: var(--paper-2);
  font: 500 12.5px/1 var(--mono); color: var(--ink-2); cursor: pointer;
}
.copy:hover { background: #e2dcd3; }
.copy svg { width: 13px; height: 13px; }
.copy.is-done { color: var(--blue); }

/* ---------- navegación ---------- */
.nav { display: flex; align-items: center; gap: 14px; height: 60px; padding-inline: 20px; }
.nav-links { display: flex; gap: 4px; margin-left: 22px; }
.nav-links a {
  padding: 6px 10px; border-radius: 2px; color: var(--ink-2); text-decoration: none; font-size: 13.5px;
}
.nav-links a:hover { color: var(--blue); background: rgba(29, 79, 216, .06); }
.nav-end { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* ---------- hero ---------- */
.hero { padding: clamp(56px, 7vw, 96px) 0 clamp(48px, 6vw, 80px); }
.hero-head {
  display: grid; grid-template-columns: 6fr 5fr; gap: 48px; align-items: end;
  padding: 0 28px clamp(36px, 4vw, 52px);
}
.hero h1 {
  margin: 0; max-width: 15ch; color: var(--ink);
  font: 400 clamp(34px, 4.4vw, 58px)/1.08 var(--serif); letter-spacing: -.018em; text-wrap: balance;
}
.lede { margin: 0; max-width: 46ch; color: var(--grey); font-size: 15px; line-height: 1.75; text-wrap: pretty; }
.hero .install { margin-top: 24px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 16px 0 0; font-size: 12.5px; color: var(--grey); }
.hero-meta a { color: var(--blue); }
.actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* ---------- franjas y secciones ---------- */
.grid { display: grid; margin-block: 0; padding: 0; list-style: none; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid > * + * { border-left: 1px solid var(--line); }
.cell { padding: 30px 28px 36px; }
.cell h3 { margin: 0 0 10px; font: 400 21px/1.3 var(--serif); color: var(--ink); letter-spacing: -.005em; }
.cell p { margin: 0; font-size: 13.5px; line-height: 1.8; color: var(--grey); }
.cell p + p { margin-top: 10px; }
.cell code, .sec-head code, .foot-note code, .ladder figcaption code {
  font-size: .94em; color: var(--ink); background: rgba(84, 62, 40, .07); padding: 1px 4px; border-radius: 2px; white-space: nowrap;
}

.sec { padding-top: clamp(64px, 8vw, 104px); }
.sec-head {
  display: grid; grid-template-columns: 5fr 7fr; gap: 48px; align-items: last baseline;
  padding: 0 28px clamp(36px, 4vw, 52px);
}
.sec-head h2 { margin: 0; font: 400 clamp(30px, 3.3vw, 44px)/1.1 var(--serif); letter-spacing: -.012em; }
.sec-head p { margin: 0; max-width: 58ch; color: var(--grey); font-size: 15px; line-height: 1.75; }
.inner { border-top: 1px solid var(--line); }

/* ---------- la ventana del editor ---------- */
.window {
  max-width: 1088px; margin: 0 auto; overflow: hidden; text-align: left;
  background: var(--sheet); border: 1px solid var(--line-2); border-radius: 5px;
  box-shadow: 0 1px 0 rgba(60, 40, 20, .04), 0 30px 60px -36px rgba(60, 40, 20, .35);
}
.win-bar { display: flex; align-items: stretch; height: 40px; background: #eeeae4; border-bottom: 1px solid var(--line); }
.win-project {
  display: flex; align-items: center; gap: 8px; width: 208px; padding: 0 16px; flex: none;
  border-right: 1px solid var(--line); font-size: 12.5px; color: var(--grey);
}
.win-project svg, .tree svg, .win-tab svg { width: 13px; height: 13px; flex: none; }
.win-tab {
  display: flex; align-items: center; gap: 8px; padding: 0 18px; margin-bottom: -1px;
  background: var(--sheet); border-right: 1px solid var(--line); font-size: 12.5px; color: var(--ink);
}
.win-tab svg { color: var(--blue); }
.win-bar .copy { margin: auto 8px auto auto; height: 26px; }
.win-body { display: grid; grid-template-columns: 208px minmax(0, 1fr); }
.tree { margin: 0; padding: 12px 0; list-style: none; border-right: 1px solid var(--line); background: #f7f5f1; font-size: 12.5px; }
.tree li { display: flex; align-items: center; gap: 8px; padding: 3px 16px; color: var(--grey); white-space: nowrap; }
.tree li.l2 { padding-left: 34px; }
.tree li.is-active { background: var(--blue-wash); color: var(--blue); }
.code-view { margin: 0; padding: 20px 0 22px; overflow-x: auto; font-size: 13.5px; line-height: 1.8; counter-reset: ln; tab-size: 2; }
.code-view code { display: block; min-width: max-content; padding-right: 28px; }
.code-view .ln::before {
  counter-increment: ln; content: counter(ln); display: inline-block; width: 2.8em; margin-right: 1.5em;
  text-align: right; color: var(--grey-2); user-select: none;
}

/* ---------- cómo funciona ---------- */
.step { padding: 30px 28px 36px; }
.step-n { display: block; margin-bottom: 20px; font: italic 400 34px/1 var(--serif); color: var(--blue); }
.step h3 { margin: 0 0 10px; font: 400 21px/1.3 var(--serif); }
.step p { margin: 0 0 18px; font-size: 13.5px; line-height: 1.8; color: var(--grey); }
.step p code { font-size: .94em; color: var(--ink); background: rgba(84, 62, 40, .07); padding: 1px 4px; border-radius: 2px; white-space: nowrap; }
.snip {
  margin: 0; padding: 8px 9px; overflow-x: auto; white-space: pre;
  background: var(--sheet); border: 1px solid var(--line); border-radius: 3px; font-size: 12px; line-height: 1.6;
}
.statuses { margin: 0; padding: 0; list-style: none; border-top: 1px dotted var(--line-2); }
.statuses li { padding: 8px 0 9px; border-bottom: 1px dotted var(--line-2); font-size: 12.5px; line-height: 1.5; color: var(--grey); }
.statuses code { display: block; color: var(--blue); font-weight: 500; font-size: 12.5px; }

/* ---------- el CLI ---------- */
.cmd {
  display: flex; align-items: center; gap: 9px; margin: 0 0 22px; padding: 10px 12px;
  background: var(--sheet); border: 1px solid var(--line); border-radius: 3px; font-size: 13.5px; line-height: 1.2; white-space: nowrap;
}
.cmd .prompt { color: var(--grey-2); user-select: none; }
.cmd .bin { color: var(--ink-2); }
.cmd .sub { color: var(--blue); font-weight: 500; }
.ladder { margin: 0; padding: 30px 28px 36px; border-top: 1px solid var(--line); }
.ladder ol { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) auto; margin: 0 0 22px; padding: 0; list-style: none; }
.ladder li { position: relative; padding-top: 24px; font-size: 13.5px; color: var(--ink-2); }
.ladder li:last-child { text-align: right; }
.ladder li:last-child::before { left: auto; right: 0; }
.ladder li::before {
  content: ""; position: absolute; top: 4px; left: 0; width: 11px; height: 11px; z-index: 1;
  border: 1px solid var(--blue); border-radius: 50%; background: var(--sheet);
}
.ladder li::after { content: ""; position: absolute; top: 9px; left: 11px; right: 0; height: 1px; background: var(--line-2); }
.ladder li:last-child::before { background: var(--blue); }
.ladder li:last-child::after { left: 0; right: 11px; }
.ladder figcaption { font-size: 13.5px; color: var(--grey); max-width: 70ch; }

/* ---------- lo que no hace ---------- */
.nope { padding: 26px 28px 30px; }
.nope svg { width: 16px; height: 16px; color: var(--grey-2); display: block; margin-bottom: 16px; }
.nope span { font: 400 21px/1.25 var(--serif); color: var(--ink); }
.foot-note { margin: 0; padding: 22px max(28px, calc(100% - 28px - 82ch)) 30px 28px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--grey); line-height: 1.8; }

/* ---------- cierre ---------- */
.cta { padding: clamp(80px, 10vw, 140px) 0; text-align: center; }
.cta h2 {
  max-width: 25ch; margin: 0 auto; color: var(--blue);
  font: italic 400 clamp(32px, 4.6vw, 62px)/1.08 var(--serif); letter-spacing: -.018em; text-wrap: balance;
}
.cta p { max-width: 54ch; margin: 24px auto 0; color: var(--grey); font-size: 15px; text-wrap: pretty; }
.cta .install { margin-top: 34px; }

/* ---------- pie ---------- */
.home .site-foot { position: relative; z-index: 7; overflow: hidden; }
.site-foot .guides { z-index: 0; }
.site-foot .guides i { background: rgba(255, 255, 255, .2); }
.site-foot .guides i:nth-child(n+3) { background: rgba(255, 255, 255, .12); }
.home .foot-in { position: relative; z-index: 1; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding: 60px 32px 34px; }
.foot-lede { margin: 18px 0 0; max-width: 40ch; font-size: 13.5px; line-height: 1.75; color: #dfe6fb; }
.home .foot-in h2 { margin: 2px 0 16px; font: 400 21px/1.2 var(--serif); }
.home .foot-in ul { margin: 0; padding: 0; list-style: none; }
.home .foot-in li + li { margin-top: 8px; }
.home .foot-in a:hover { text-decoration-thickness: 2px; }
.foot-base {
  position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 18px 32px 26px; border-top: 1px solid rgba(255, 255, 255, .24); font-size: 12.5px; color: #dfe6fb;
}

@media (max-width: 1023px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 > :nth-child(3) { border-left: 0; }
  .grid-4 > :nth-child(n+3) { border-top: 1px solid var(--line); }
  .grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-5 > :nth-child(4) { border-left: 0; }
  .grid-5 > :nth-child(n+4) { border-top: 1px solid var(--line); }
  .win-project { width: 180px; }
  .win-body { grid-template-columns: 180px minmax(0, 1fr); }
}
@media (max-width: 759px) {
  .nav { padding-inline: 14px; height: 56px; }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 56px; z-index: 9; margin: 0;
    flex-direction: column; gap: 0; padding: 8px var(--gut) 14px;
    background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 18px 30px -24px rgba(60, 40, 20, .4);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 12px 6px; font-size: 15px; border-bottom: 1px dotted var(--line-2); border-radius: 0; }
  .home .menu-btn { display: inline-flex; }
  .nav-end .btn { display: none; }
  .site-head { position: relative; }

  .grid-3, .grid-4, .grid-5 { grid-template-columns: minmax(0, 1fr); }
  .grid > * + * { border-left: 0; border-top: 1px solid var(--line); }
  .cell, .step, .nope { padding: 24px 20px 28px; }
  .nope { display: flex; align-items: center; gap: 14px; padding-block: 16px; }
  .nope svg { margin: 0; }
  .nope span { font-size: 19px; }
  .sec-head { grid-template-columns: 1fr; gap: 14px; padding-inline: 20px; }
  .foot-note, .ladder { padding-inline: 20px; }
  .ladder ol { grid-template-columns: 1fr; gap: 0; }
  .ladder li { padding: 0 0 14px 26px; }
  .ladder li::before { top: 5px; }
  .ladder li::after { top: 16px; left: 5px; right: auto; bottom: -5px; width: 1px; height: auto; }
  .ladder li:last-child { text-align: left; padding-bottom: 0; }
  .ladder li:last-child::before { left: 0; right: auto; }
  .ladder li:last-child::after { display: none; }

  .hero-head { grid-template-columns: 1fr; gap: 18px; padding-inline: 4px; }
  .hero .install, .cta .install { font-size: 13.5px; }
  .cta p { padding-inline: 8px; }
  .win-project, .tree { display: none; }
  .win-body { grid-template-columns: minmax(0, 1fr); }
  .code-view { font-size: 12.5px; }
  .code-view .ln::before { width: 2em; margin-right: 1em; }

  .home .foot-in { grid-template-columns: 1fr 1fr; padding: 44px 20px 28px; gap: 32px 20px; }
  .foot-brand { grid-column: 1 / -1; }
  .foot-base { padding-inline: 20px; }
}

/* =================================================================
   Guías
   ================================================================= */

/* ---------- barra superior ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; height: var(--bar);
  display: grid; grid-template-columns: var(--side) minmax(0, 1fr) var(--side); align-items: center;
  background: var(--paper) var(--grain); border-bottom: 1px solid var(--line);
}
.topbar::before, .topbar::after {
  content: ""; position: absolute; bottom: -8px; width: 15px; height: 15px; background: var(--mark) no-repeat; z-index: 2;
}
.topbar::before { left: calc(var(--side) - 8px); }
.topbar::after { right: calc(var(--side) - 7px); }
.bar-start { display: flex; align-items: center; gap: 12px; padding-left: 22px; }
.bar-end { grid-column: 3; display: flex; justify-content: flex-end; gap: 4px; padding-right: 18px; }
.bar-end a { padding: 6px 10px; border-radius: 2px; color: var(--ink-2); text-decoration: none; font-size: 13.5px; }
.bar-end a:hover { color: var(--blue); background: rgba(29, 79, 216, .06); }

/* ---------- tres columnas ---------- */
.docs { display: grid; grid-template-columns: var(--side) minmax(0, 1fr) var(--side); min-height: calc(100vh - var(--bar)); }
.sidebar {
  position: sticky; top: var(--bar); height: calc(100vh - var(--bar)); overflow-y: auto;
  padding: 26px 18px 40px 16px; border-right: 1px solid var(--line);
}
.group + .group { margin-top: 26px; }
.group h2 { margin: 0 0 6px; padding: 0 10px; font: 500 13.5px/1.4 var(--mono); color: var(--blue); }
.group ul { margin: 0; padding: 0; list-style: none; }
.group a {
  display: block; padding: 5px 10px; border-radius: 2px; color: var(--ink-2);
  text-decoration: none; font-size: 13.5px; line-height: 1.5;
}
.group a:hover { color: var(--blue); }
.group a[aria-current="page"] { background: var(--blue-wash); color: var(--blue); }

/* ---------- la guía ---------- */
.content { min-width: 0; padding: 56px 48px 96px; }
.prose { max-width: 680px; margin: 0 auto; }
.prose h1 {
  margin: 0 0 14px; color: var(--blue);
  font: 400 clamp(32px, 3.2vw, 44px)/1.12 var(--serif); letter-spacing: -.015em; text-wrap: balance;
}
.prose .doc-meta { margin: 0 0 40px; font-size: 12.5px; line-height: 1.6; color: var(--grey); }
.prose .doc-meta code { font-size: 1em; color: var(--ink-2); background: none; padding: 0; }
.prose h2, .prose h3 { font-weight: 400; font-family: var(--serif); color: var(--ink); border-bottom: 1px dotted var(--dots); }
.prose h2 { margin: 56px 0 18px; padding-bottom: 10px; font-size: 27px; line-height: 1.25; letter-spacing: -.008em; }
.prose h3 { margin: 40px 0 14px; padding-bottom: 8px; font-size: 21px; line-height: 1.3; }
.prose .anchor { color: inherit; text-decoration: none; }
.prose .anchor:hover { text-decoration: underline dotted; text-decoration-thickness: 1px; }
.prose p, .prose li { color: var(--ink-2); font-size: 15px; line-height: 1.8; }
.prose p { margin: 0 0 18px; }
.prose ul { margin: 0 0 20px; padding-left: 20px; list-style: square; }
.prose ol { margin: 0 0 20px; padding-left: 26px; }
.prose li { padding-left: 4px; }
.prose li + li { margin-top: 8px; }
.prose li::marker { color: var(--dots); }
.prose ol > li::marker { color: var(--grey); }
.prose li > ul, .prose li > ol { margin: 8px 0 0; }
.prose li > p { margin: 0; }
.prose strong { font-weight: 600; color: var(--ink); }
.prose :not(pre) > code {
  padding: 1px 5px; border-radius: 2px; background: rgba(84, 62, 40, .08);
  font-size: .9em; color: var(--ink); overflow-wrap: anywhere;
}

.code { position: relative; margin: 0 0 22px; }
.code pre {
  margin: 0; padding: 14px 16px; overflow-x: auto;
  background: var(--sheet); border: 1px solid var(--line-2); border-radius: 3px;
  font-size: 13.5px; line-height: 1.7; tab-size: 2;
}
.copy-code {
  position: absolute; top: 7px; right: 7px; height: 24px; padding: 0 8px;
  border: 1px solid var(--line); border-radius: 2px; background: var(--paper-2);
  font: 500 12px/1 var(--mono); color: var(--ink-2); cursor: pointer; opacity: 0;
}
.code:hover .copy-code, .copy-code:focus-visible, .copy-code.is-done { opacity: 1; }
.copy-code.is-done { color: var(--blue); }
@media (hover: none) { .copy-code { opacity: 1; } }

.table-wrap { margin: 0 0 24px; overflow-x: auto; border: 1px solid var(--line-2); border-radius: 3px; background: var(--sheet); }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 13.5px; line-height: 1.65; }
.table-wrap th { text-align: left; font-weight: 500; color: var(--ink); background: #efebe5; padding: 9px 14px; border-bottom: 1px solid var(--line-2); }
.table-wrap td { padding: 12px 14px; vertical-align: top; color: var(--ink-2); border-top: 1px solid var(--line); }
.table-wrap tr:first-child td { border-top: 0; }
.table-wrap .key-col td:first-child { width: 42%; }
.prose .table-wrap code { overflow-wrap: break-word; }
.table-wrap th + th, .table-wrap td + td { border-left: 1px solid var(--line); }
.table-wrap .al-center { text-align: center; }
.table-wrap .al-right { text-align: right; }

.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 64px; padding-top: 22px; border-top: 1px dotted var(--dots); }
.pager a {
  display: grid; gap: 4px; min-width: 240px; padding: 14px 18px;
  border: 1px solid var(--line-2); border-radius: 3px; background: var(--sheet); text-decoration: none;
}
.pager a:hover { border-color: var(--blue); }
.pager .next { margin-left: auto; text-align: right; }
.pager small { font-size: 12.5px; color: var(--grey); }
.pager span { font: 400 21px/1.2 var(--serif); color: var(--blue); }

/* ---------- en esta página ---------- */
.toc { position: sticky; top: var(--bar); height: calc(100vh - var(--bar)); overflow-y: auto; padding: 56px 22px 40px 24px; border-left: 1px solid var(--line); }
.toc-title { margin: 0 0 12px; font-size: 13.5px; font-weight: 500; color: var(--ink); }
.toc ol, .toc-m ol { margin: 0; padding: 0; list-style: none; }
.toc > nav > ol { border-left: 1px solid var(--line); }
.toc a, .toc-m a {
  display: block; padding: 4px 0 4px 12px; margin-left: -1px; border-left: 1px solid transparent;
  color: var(--grey); text-decoration: none; font-size: 12.5px; line-height: 1.5;
}
.toc ol ol a, .toc-m ol ol a { padding-left: 24px; }
.toc a:hover, .toc-m a:hover { color: var(--blue); }
.toc a.is-active { color: var(--blue); border-left-color: var(--blue); }
.toc-m { display: none; margin: 0 0 36px; border: 1px solid var(--line-2); border-radius: 3px; background: var(--sheet); }
.toc-m summary { padding: 10px 14px; cursor: pointer; font-size: 13.5px; font-weight: 500; }
.toc-m nav { padding: 0 14px 12px; }
.toc-m > nav > ol { border-left: 1px solid var(--line); }

/* ---------- pie ---------- */
.guide .foot-in {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px;
  padding: 34px 32px 36px var(--side);
}
.guide .foot-in p { margin: 0; font-size: 12.5px; color: #dfe6fb; }
.guide .foot-in ul { display: flex; gap: 22px; margin: 0; padding: 0; list-style: none; }
.guide .foot-brand { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }

@media (max-width: 1199px) {
  .topbar, .docs { grid-template-columns: var(--side) minmax(0, 1fr); }
  .topbar::after { display: none; }
  .bar-end { grid-column: 2; }
  .toc { display: none; }
  .toc-m { display: block; }
}
@media (max-width: 899px) {
  .topbar { display: flex; justify-content: space-between; padding: 0 12px 0 14px; }
  .topbar::before { display: none; }
  .bar-start { flex: 1; padding-left: 0; gap: 10px; }
  .bar-end { display: none; }
  .guide .menu-btn { display: inline-flex; order: 3; margin-left: auto; }
  .docs { display: block; }
  .sidebar {
    display: none; position: fixed; z-index: 15; top: var(--bar); left: 0; bottom: 0; height: auto;
    width: min(320px, 88vw); background: var(--paper) var(--grain);
    box-shadow: 0 0 0 100vmax rgba(29, 28, 26, .22);
  }
  .sidebar.is-open { display: block; }
  .content { padding: 36px 20px 72px; }
  .prose h2 { font-size: 24px; margin-top: 48px; }
  .prose h3 { font-size: 20px; }
  .prose p, .prose li { font-size: 14.5px; }
  .code pre { font-size: 12.5px; padding: 12px 14px; }
  .table-wrap { border: 0; background: none; overflow: visible; }
  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; width: auto; }
  .table-wrap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table-wrap tr { background: var(--sheet); border: 1px solid var(--line-2); border-radius: 3px; }
  .table-wrap tr + tr { margin-top: 10px; }
  .table-wrap td, .table-wrap .key-col td:first-child { width: auto; border: 0; padding: 10px 14px; }
  .table-wrap tr td + td, .table-wrap tr:first-child td + td { border-left: 0; border-top: 1px dotted var(--dots); }
  .table-wrap td::before { content: attr(data-label); display: block; margin-bottom: 4px; font-size: 12.5px; font-weight: 500; color: var(--blue); }
  .table-wrap td[data-label=""]::before { display: none; }
  .table-wrap .al-center, .table-wrap .al-right { text-align: left; }
  .pager { flex-direction: column; }
  .pager a { min-width: 0; width: 100%; }
  .guide .foot-in { padding: 32px 20px; }
}
