/* knowledge-hub/generador/cuerpo.css — el aspecto del cuerpo de una guía (lo que pinta `cuerpo.ts`), todo bajo `.art`,
 * y lo que `cuerpo.js` pone sobre la página: la capa ampliada (`.velo`) y el aviso de enlace copiado (`.tostada`). Solo
 * colores de los tokens de Venuz DS: ni un color a mano; lo translúcido, con `opacity` o un token que ya lo sea. Medidas,
 * las de la maqueta aprobada. */

/* ---------- texto ---------- */
.art h2 { margin: 44px 0 0; font-family: var(--font-family-heading); font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: -0.015em; color: var(--text-heading); scroll-margin-top: 84px; }
.art h3 { margin: 28px 0 0; font-family: var(--font-family-heading); font-size: 17px; line-height: 26px; font-weight: 600; color: var(--text-heading); }
.art p { margin: 14px 0 0; }
/* El texto corrido, a unos 70 caracteres por línea (36em, más el relleno de su caja en avisos y respuestas): las capturas,
 * las tablas y el vídeo siguen al ancho de la columna. */
.art > p, .art > ul:not(.gtk), .art > ol { max-width: 36em; }
.art > .note { max-width: calc(36em + 66px); }
.art .faq-c p { max-width: calc(36em + 36px); }
.art p a, .art li a, .art .note a, .art td a { color: var(--text-link); text-decoration: underline; text-decoration-color: var(--accent-700); text-underline-offset: 3px; transition: text-decoration-color var(--duration-fast); }
.art p a:hover, .art li a:hover, .art .note a:hover, .art td a:hover { text-decoration-color: var(--accent-500); }
.art a, .art summary { -webkit-tap-highlight-color: transparent; }
.art code { font-size: 14px; padding: 1px 6px; border-radius: 6px; background: var(--surface-tertiary); border: 1px solid var(--border-color-default); }
.art > ul, .art > ol:not(.steps) { margin: 14px 0 0; padding-left: 22px; }
.art > ul li, .art > ol:not(.steps) li { margin-top: 8px; padding-left: 4px; }
.art h2 .ancla { opacity: 0; margin-left: 8px; color: var(--text-disabled); font-weight: 400; text-decoration: none; transition: opacity var(--duration-fast), color var(--duration-fast); }
.art h2:hover .ancla, .art h2 .ancla:focus-visible { opacity: 1; }
.art h2 .ancla:hover { color: var(--accent-500); }

/* ---------- etiquetas de pantalla ---------- */
.art .ui { display: inline-block; padding: 0 7px; margin: 0 1px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface-tertiary); font-size: 14px; line-height: 22px; font-weight: 500; color: var(--text-primary); white-space: nowrap; vertical-align: baseline; }
.art .ui.cta { background: var(--accent-500); border-color: var(--accent-500); color: var(--text-inverse); font-weight: 600; }
.art .ui.larga { white-space: normal; }

/* ---------- antes de empezar ---------- */
.art .before { margin-top: 24px; border: 1px solid var(--border-color-default); border-radius: 12px; background: var(--surface-secondary); padding: 16px 20px 6px; scroll-margin-top: 84px; }
.art .before h2 { font-size: 12px; line-height: 18px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-tertiary); margin: 0 0 6px; }
.art .before dl { margin: 0; display: grid; grid-template-columns: 132px 1fr; font-size: 15px; line-height: 23px; }
.art .before dt, .art .before dd { margin: 0; padding: 9px 0; border-top: 1px solid var(--card-border); }
.art .before dt { color: var(--text-muted); }
.art .before dd { color: var(--text-primary); }
.art .before dd:not(dt + dd) { grid-column: 1 / -1; }
.art .before dl > :first-child, .art .before dl > :first-child + dd { border-top: 0; }
.art .before ul { list-style: none; margin: 0; padding: 0; font-size: 15px; line-height: 23px; }
.art .before ul li { position: relative; margin: 0; padding: 9px 0 9px 28px; border-top: 1px solid var(--card-border); color: var(--text-primary); }
.art .before ul li:first-child { border-top: 0; }
.art .before ul li::before { content: ""; position: absolute; left: 2px; top: 14px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent-900); box-shadow: inset 0 0 0 1px var(--accent-500); }
.art .before ul li::after { content: ""; position: absolute; left: 6px; top: 18.5px; width: 6px; height: 3px; border-left: 1.5px solid var(--accent-400); border-bottom: 1.5px solid var(--accent-400); transform: rotate(-45deg); }

/* ---------- pasos (el número sale del `start` de la lista: counter(list-item)) ---------- */
.art .steps { list-style: none; margin: 18px 0 0; padding: 0; }
.art .steps li { position: relative; padding: 0 0 18px 46px; }
.art .steps li::before { content: counter(list-item); position: absolute; left: 0; top: -1px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--border-strong); background: var(--surface-secondary); font-size: 13px; font-weight: 600; color: var(--text-primary); transition: background var(--duration-fast), border-color var(--duration-fast), color var(--duration-fast), transform var(--duration-normal) var(--ease-out); }
.art .steps li::after { content: ""; position: absolute; left: 14px; top: 32px; bottom: 4px; width: 1px; background: var(--border-color-default); }
.art .steps li:last-child { padding-bottom: 0; }
.art .steps li:last-child::after { display: none; }
.art .steps li.luce::before { background: var(--accent-500); border-color: var(--accent-500); color: var(--text-inverse); transform: scale(1.08); }
.art .steps small { display: block; margin-top: 4px; font-size: 14px; line-height: 22px; color: var(--text-tertiary); }

/* ---------- capturas con sus marcas ---------- */
.art .fig { position: relative; margin: 22px 0 0; border: 1px solid var(--border-color-default); border-radius: 12px; overflow: hidden; background: var(--surface-secondary); transition: border-color var(--duration-normal); }
.art .fig:hover { border-color: var(--border-stronger); }
.art .fig .shot { position: relative; width: fit-content; max-width: 100%; margin-inline: auto; overflow: hidden; background: var(--surface-primary); cursor: zoom-in; }
/* El `width`/`height` del <img> es el tamaño máximo que le da `tamanoPintado` (`cuerpo.ts`); una más estrecha que la
   columna va centrada y `.shot` se ciñe a ella, así las marcas (fracción de la imagen) caen en su sitio. */
.art .fig img { display: block; max-width: 100%; height: auto; }
.art .fig figcaption { padding: 11px 16px; border-top: 1px solid var(--border-color-default); font-size: 13px; line-height: 20px; color: var(--text-tertiary); }
.art .fig .shot:focus-visible { outline: 2px solid var(--accent-500); outline-offset: -2px; }
.art .fig .lupa { position: absolute; right: 12px; top: 12px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; background: var(--surface-primary); border: 1px solid var(--border-strong); color: var(--text-primary); opacity: 0; transform: scale(0.9); transition: opacity var(--duration-fast), transform var(--duration-normal) var(--ease-out); pointer-events: none; }
.art .fig:hover .lupa { opacity: 1; transform: none; }
.art .fig .lupa svg.ic { width: 16px; height: 16px; }
/* Las marcas, igual en la página y en la capa ampliada: un <svg> encima de la imagen, cada marca en su x/y. */
.art .marcas, .velo .marcas { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.art .pin, .velo .pin { overflow: visible; pointer-events: auto; }
.art .pin g { transition: transform var(--duration-normal) var(--ease-out); }
.art .pin .halo, .velo .pin .halo { fill: var(--accent-500); opacity: 0.22; }
.art .pin .punto, .velo .pin .punto { fill: var(--accent-500); stroke: var(--surface-primary); stroke-width: 3; }
.art .pin text, .velo .pin text { fill: var(--text-inverse); font-family: var(--font-family-body); font-size: 13px; font-weight: 600; }
.art .pin.luce g { transform: scale(1.3); }
.art .pin.luce .halo { opacity: 0.35; }

/* ---------- notas ---------- */
.art .note { position: relative; margin-top: 16px; padding: 14px 16px 14px 46px; border: 1px solid var(--border-color-default); border-left: 3px solid var(--secondary-500); border-radius: 10px; background: var(--surface-secondary); font-size: 15px; line-height: 24px; }
.art .note svg.ic { position: absolute; left: 15px; top: 17px; width: 18px; height: 18px; color: var(--secondary-300); }
.art .note > strong { display: block; color: var(--text-primary); font-weight: 600; }
.art .note p { margin: 0; }
.art .note.warn { border-left-color: var(--warning-500); }
.art .note.warn svg.ic { color: var(--warning-500); }
.art .note.tip { border-left-color: var(--success-500); }
.art .note.tip svg.ic { color: var(--success-300); }

/* ---------- de un vistazo ---------- */
.art .glance { margin-top: 24px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.art .glance a { position: relative; padding: 16px 16px 14px; border: 1px solid var(--border-color-default); border-radius: 12px; background: var(--surface-secondary); color: inherit; text-decoration: none; transition: border-color var(--duration-normal), transform var(--duration-normal) var(--ease-out), background var(--duration-normal); }
.art .glance a:hover { border-color: var(--border-stronger); background: var(--surface-tertiary); transform: translateY(-2px); }
.art .glance b { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-500); color: var(--text-inverse); font-size: 13px; font-weight: 600; }
.art .glance strong { display: block; margin-top: 12px; font-size: 15px; line-height: 22px; font-weight: 600; color: var(--text-primary); }
.art .glance span { display: block; margin-top: 2px; font-size: 13px; line-height: 19px; color: var(--text-tertiary); }
.art .glance a:not(:last-child)::after { content: ""; position: absolute; top: 28px; right: -13px; width: 13px; height: 1px; background: var(--border-strong); }

/* ---------- tarjetas de definición ---------- */
.art .defs { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.art .def { border: 1px solid var(--border-color-default); border-radius: 12px; background: var(--surface-secondary); padding: 16px 18px 8px; }
.art .def h3 { margin: 0; font-size: 15px; line-height: 22px; display: flex; gap: 8px; align-items: center; }
.art .def h3 svg { width: 17px; height: 17px; color: var(--accent-500); }
.art .def > p { margin: 4px 0 8px; font-size: 13px; line-height: 20px; color: var(--text-tertiary); }
.art .def ul { list-style: none; margin: 0; padding: 0; }
.art .def li { margin: 0; padding: 8px 0; border-top: 1px solid var(--card-border); font-size: 14px; line-height: 21px; color: var(--text-tertiary); }
.art .def li strong { color: var(--text-primary); font-weight: 500; }

/* ---------- tablas ---------- */
.art .tabla-w { overflow-x: auto; margin-top: 18px; }
.art .tbl { width: 100%; min-width: 520px; border: 1px solid var(--border-color-default); border-radius: 12px; border-spacing: 0; overflow: hidden; font-size: 15px; line-height: 23px; background: var(--surface-secondary); }
.art .tbl th { text-align: left; padding: 10px 16px; font-size: 12px; line-height: 18px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-tertiary); font-weight: 600; background: var(--surface-tertiary); }
.art .tbl td { padding: 11px 16px; border-top: 1px solid var(--border-color-default); vertical-align: top; transition: background var(--duration-fast); }
.art .tbl.dos td:first-child { width: 46%; }
.art .tbl tr:hover td { background: var(--state-hover-on-dark); }

/* ---------- Good to know ---------- */
.art > ul.gtk { list-style: none; margin: 16px 0 0; padding: 0; border: 1px solid var(--border-color-default); border-radius: 12px; background: var(--surface-secondary); }
.art > ul.gtk li { margin-top: 0; position: relative; padding: 13px 18px 13px 44px; border-top: 1px solid var(--card-border); font-size: 15px; line-height: 24px; }
.art > ul.gtk li:first-child { border-top: 0; }
.art > ul.gtk li::before { content: ""; position: absolute; left: 19px; top: 23px; width: 6px; height: 6px; border-radius: 50%; background: var(--secondary-500); }

/* ---------- acordeón ---------- */
.art .faq { margin-top: 16px; border: 1px solid var(--border-color-default); border-radius: 12px; background: var(--surface-secondary); overflow: hidden; }
.art .faq details { border-top: 1px solid var(--border-color-default); }
.art .faq details:first-child { border-top: 0; }
.art .faq summary { list-style: none; cursor: pointer; padding: 14px 18px; display: flex; align-items: center; gap: 12px; font-size: 15px; line-height: 23px; font-weight: 500; color: var(--text-primary); user-select: none; transition: background var(--duration-fast); }
.art .faq summary:hover { background: var(--surface-tertiary); }
.art .faq summary::-webkit-details-marker { display: none; }
.art .faq summary svg.ic { margin-left: auto; width: 16px; height: 16px; flex: none; color: var(--text-muted); transform: rotate(90deg); transition: transform var(--duration-normal) var(--ease-out); }
.art .faq details[open] summary svg.ic { transform: rotate(-90deg); }
.art .faq-c { overflow: hidden; }
.art .faq-c p { margin: 0; padding: 0 18px 16px; font-size: 15px; line-height: 24px; color: var(--text-secondary); }

/* ---------- capa ampliada y aviso (fuera de `.art`: `cuerpo.js` los pone sobre la página) ---------- */
:root:has(.velo) { overflow: hidden; }
.velo { position: fixed; inset: 0; z-index: var(--z-dialog-scrim); background: var(--overlay-backdrop); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 24px; transition: opacity 160ms ease; }
.velo.fuera { opacity: 0; transition-duration: 140ms; }
.velo-x { position: fixed; right: 18px; top: 16px; z-index: var(--z-dialog); width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--surface-secondary); border: 1px solid var(--border-strong); color: var(--text-primary); cursor: pointer; transition: background var(--duration-fast); }
.velo-x:hover { background: var(--surface-tertiary); }
.velo-x:focus-visible { outline: 2px solid var(--accent-500); outline-offset: 2px; }
.velo-x svg.ic { width: 18px; height: 18px; }
/* La captura ampliada mide lo que diga el atributo `width` que le pone `cuerpo.js`; las marcas la cubren entera. */
.velo .luz-img { position: relative; max-width: 100%; border-radius: 12px; border: 1px solid var(--border-strong); box-shadow: var(--shadow-5); overflow: hidden; cursor: zoom-out; transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out); }
.velo .luz-img img { display: block; max-width: 100%; height: auto; }
.tostada { position: fixed; z-index: var(--z-tooltip); left: 50%; bottom: 28px; transform: translateX(-50%); display: flex; gap: 8px; align-items: center; padding: 10px 16px; border-radius: 10px; background: var(--surface-inverse); color: var(--text-inverse); font-size: 14px; font-weight: 500; box-shadow: var(--shadow-5); transition: opacity 200ms, transform 220ms var(--ease-out); }
.tostada.fuera { opacity: 0; }
.tostada svg.ic { width: 16px; height: 16px; }
@starting-style {
  .velo { opacity: 0; }
  .velo .luz-img { opacity: 0; transform: scale(0.94); }
  .tostada { opacity: 0; transform: translate(-50%, 10px); }
}

/* ---------- móvil ---------- */
@media (max-width: 900px) {
  .art h2 { margin-top: 36px; font-size: 21px; line-height: 28px; scroll-margin-top: 112px; }
  .art .before { scroll-margin-top: 112px; }
  .art h2 .ancla { display: none; }
  .art .before dl { grid-template-columns: 104px 1fr; }
  .art .steps li { padding-left: 40px; }
  .art .pin .halo, .velo .pin .halo { r: 16px; }
  .art .pin .punto, .velo .pin .punto { r: 10px; stroke-width: 2; }
  .art .pin text, .velo .pin text { font-size: 11px; }
  .art .fig .lupa { display: none; }
  .art .glance { grid-template-columns: 1fr 1fr; }
  .art .glance a::after { display: none; }
  .art .defs { grid-template-columns: 1fr; }
  .art .tbl.dos td:first-child { width: 50%; }
  .art > ul.gtk li { padding-left: 38px; }
  .art > ul.gtk li::before { left: 16px; }
  .velo { padding: 12px; }
}
/* Columna estrecha: toda captura llena el ancho. */
@media (max-width: 600px) {
  .art .fig .shot { width: auto; }
  .art .fig img { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .art *, .art *::before, .velo, .velo *, .tostada { transition-duration: 1ms; }
}
