/* Ensobre: páginas de documentos (formato, novedades, comentarios, términos,
   privacidad, reembolsos y el detalle de cada versión).
   Van con <body class="home doc">: el encabezado, el pie, los colores, el tema
   claro/oscuro y la tipografía salen de home.css; aquí solo está lo propio de
   un documento. Todo bajo body.doc para no tocar nada más. */

/* Ancho de la página */
body.doc .doc-shell{width:min(1160px,calc(100% - 88px));margin-inline:auto}
body.doc:not(:has(.doc-toc)) .doc-shell{width:min(800px,calc(100% - 88px))}

/* Cabecera del documento */
body.doc .doc-hero{padding:72px 0 56px;background:linear-gradient(180deg,var(--bg) 0%,var(--hero-end) 100%);border-bottom:1px solid var(--line)}
body.doc .doc-hero .eyebrow{display:inline-block;padding:6px 12px;margin:0 0 20px;background:var(--soft);border:1px solid var(--soft-line);border-radius:40px;color:var(--soft-ink);font-size:12px;letter-spacing:.08em}
body.doc .doc-hero h1{font-size:clamp(36px,4.6vw,58px);line-height:1.1;letter-spacing:-.05em;margin:0 0 20px;max-width:20ch}
body.doc .doc-hero p{font-size:18px;line-height:1.7;color:var(--muted);max-width:64ch;margin:0}
body.doc .doc-hero p+p{margin-top:14px;font-size:15px}
body.doc .doc-hero a{color:var(--green);text-decoration:underline;text-underline-offset:3px}
body.doc .doc-hero strong{color:var(--ink);font-weight:600}
body.doc .doc-body{padding:64px 0 96px}

/* Índice lateral */
body.doc .doc:has(.doc-toc){display:grid;grid-template-columns:240px minmax(0,1fr);gap:64px;align-items:start}
body.doc .doc-toc{position:sticky;top:104px;max-height:calc(100vh - 128px);overflow-y:auto;padding:0 0 0 18px;border-left:1px solid var(--line)}
body.doc .doc-toc__title{font-size:12px;font-weight:650;letter-spacing:.1em;text-transform:uppercase;color:var(--faint);margin:0 0 14px}
body.doc .doc-toc ol{list-style:none;margin:0;padding:0;display:grid;gap:2px}
body.doc .doc-toc a{display:block;padding:5px 0;font-size:14px;line-height:1.45;color:var(--muted)}
body.doc .doc-toc a:hover{color:var(--green)}
body.doc .doc-toc a.is-active{color:var(--green);font-weight:600}

/* Texto */
body.doc .doc article{min-width:0;max-width:760px}
body.doc .doc:not(:has(.doc-toc)) article{max-width:none}
body.doc .doc article section[id],body.doc .doc article h2,body.doc .doc article h3{scroll-margin-top:100px}
body.doc .doc article h2{font-size:clamp(26px,2.6vw,32px);line-height:1.2;letter-spacing:-.04em;margin:56px 0 16px}
body.doc .doc article>section:first-of-type h2{margin-top:0}
body.doc .doc article h3{font-size:19px;line-height:1.3;letter-spacing:-.025em;margin:32px 0 10px}
body.doc .doc article p{font-size:16px;line-height:1.8;color:var(--muted);margin:0 0 16px}
body.doc .doc article strong{color:var(--ink);font-weight:600}
body.doc .doc article a{color:var(--green);text-decoration:underline;text-underline-offset:3px;overflow-wrap:anywhere}
body.doc .doc article a:hover{color:var(--green-dark)}
body.doc .doc article ul,body.doc .doc article ol{color:var(--muted);margin:0 0 18px;padding-left:1.4em;line-height:1.8}
body.doc .doc article li+li{margin-top:8px}
body.doc .doc article li::marker{color:var(--faint)}
body.doc code{font-family:Consolas,"SFMono-Regular",Menlo,monospace;font-size:.9em;background:var(--surface);border:1px solid var(--line);border-radius:5px;padding:.08em .38em;color:var(--ink);overflow-wrap:anywhere}
body.doc .mono{font-family:Consolas,"SFMono-Regular",Menlo,monospace}
body.doc .doc-hero .mono{color:var(--green)}
body.doc .doc-hero code{font-size:.8em}

/* Tablas */
body.doc .doc-table-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:12px;background:var(--card);margin:0 0 24px}
body.doc table.spec{border-collapse:collapse;width:100%;min-width:480px;font-size:14px;line-height:1.6}
body.doc table.spec th,body.doc table.spec td{padding:13px 16px;text-align:left;vertical-align:top;border-bottom:1px solid var(--line);color:var(--muted)}
body.doc table.spec thead th{background:var(--surface);font-size:12px;font-weight:650;letter-spacing:.08em;text-transform:uppercase;color:var(--faint);white-space:nowrap}
body.doc table.spec tbody tr:hover td{background:var(--surface)}
body.doc table.spec tr:last-child td{border-bottom:0}
body.doc table.spec td code{white-space:nowrap}
body.doc table.spec.schema td:first-child{font-weight:600;color:var(--ink)}
body.doc table.spec.schema td:first-child code{white-space:normal;background:transparent;border:0;padding:0}

/* Código */
body.doc .code-block{position:relative;overflow-x:auto;background:var(--surface);border:1px solid var(--line);border-radius:12px;margin:0 0 24px}
body.doc .code-block pre{margin:0;padding:44px 22px 22px}
body.doc .code-block code{display:block;background:transparent;border:0;padding:0;font-size:13px;line-height:1.7;white-space:pre;color:var(--ink)}
body.doc .code-block__copy{position:absolute;top:10px;right:10px;padding:5px 13px;font-size:12px;font-weight:600;color:var(--muted);background:var(--card);border:1px solid var(--line);border-radius:30px}
body.doc .code-block__copy:hover{color:var(--green);border-color:var(--green)}

/* Nota destacada */
body.doc .doc-note{background:var(--soft);border:1px solid var(--soft-line);border-left:4px solid var(--green);border-radius:12px;padding:18px 22px;margin:24px 0 0}
body.doc .doc .doc-note p{color:var(--ink);margin:0}

/* Novedades: tarjetas de versión */
body.doc .release{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:30px 34px;box-shadow:0 3px 14px var(--shadow)}
body.doc .release+.release{margin-top:24px}
body.doc .doc article .release h2{font-size:30px;margin:0 0 4px;display:flex;align-items:baseline;gap:6px}
body.doc .release h2 [id]{scroll-margin-top:100px}
body.doc .release-date{font-size:13px;color:var(--faint);margin:0 0 16px;font-weight:600}
body.doc .doc article .release-date{font-size:13px;color:var(--faint);margin:0 0 16px}
body.doc .doc article .release-lead{font-size:18px;line-height:1.5;font-weight:600;color:var(--ink);margin:0 0 14px;letter-spacing:-.02em}
body.doc .permalink{font-size:16px;font-weight:400;color:var(--faint)!important;text-decoration:none!important}
body.doc .permalink:hover,body.doc .permalink:focus-visible{color:var(--green)!important;text-decoration:underline!important}
body.doc .release>p:last-child{margin:18px 0 0;padding-top:16px;border-top:1px solid var(--line)}
body.doc .release>p:last-child a{font-weight:600}
/* Detalle de una versión */
body.doc .changes h2 .release-date{display:inline;font-size:15px;margin:0 0 0 6px}
body.doc .doc article.changes h2{margin-top:48px}
body.doc .doc article.changes>h2:first-child{margin-top:0}
body.doc .changes ol li+li{margin-top:6px}

/* Comentarios: formulario */
body.doc .feedback-form{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:32px;box-shadow:0 3px 14px var(--shadow);max-width:640px}
body.doc .feedback-form .field{margin-bottom:22px}
body.doc .feedback-form .field input[type=text],body.doc .feedback-form .field input[type=email],body.doc .feedback-form .field textarea{background:var(--bg)}
body.doc .kind-choice{border:0;padding:0;margin:0 0 22px;display:grid;gap:10px;min-width:0}
body.doc .kind-choice legend{font-size:14px;font-weight:600;margin-bottom:10px;padding:0}
body.doc .kind-choice label{display:flex;align-items:center;gap:10px;font-size:15px;font-weight:400;margin:0;padding:12px 14px;border:1px solid var(--line);border-radius:10px;background:var(--bg);cursor:pointer}
body.doc .kind-choice label:has(input:checked){border-color:var(--green);background:var(--soft)}
body.doc .kind-choice input{width:auto;accent-color:var(--green);margin:0}
body.doc .hp{position:absolute;left:-10000px;width:1px;height:1px;overflow:hidden}
body.doc .feedback-form .button{width:100%}

@media(max-width:1000px){
body.doc .doc:has(.doc-toc){grid-template-columns:200px minmax(0,1fr);gap:40px}
}
@media(max-width:900px){
body.doc .doc-shell,body.doc:not(:has(.doc-toc)) .doc-shell{width:calc(100% - 48px)}
body.doc .doc-hero{padding:52px 0 40px}
body.doc .doc:has(.doc-toc){display:block}
body.doc .doc-toc{position:static;max-height:none;margin:0 0 40px;padding:20px 22px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}
body.doc .doc-toc ol{grid-template-columns:1fr 1fr;column-gap:24px}
}
@media(max-width:650px){
body.doc .doc-shell,body.doc:not(:has(.doc-toc)) .doc-shell{width:calc(100% - 36px)}
body.doc .doc-hero p{font-size:16px}
body.doc .doc-body{padding:40px 0 64px}
body.doc .doc-toc ol{grid-template-columns:1fr}
body.doc .release{padding:22px 20px}
body.doc .feedback-form{padding:22px 18px}
body.doc .doc article h2{margin-top:44px}
}
