/* Manual de uso — hoja de estilo de la wiki.
   Los mismos tokens que la web y las aplicaciones; aquí solo cambia la
   maquetación: índice lateral, contenido de lectura y capturas. */
:root {
  color-scheme: light dark;
  --tinta: #1f2933; --tinta-suave: #66737f; --papel: #ffffff;
  --fondo: #f6f7f9; --fondo-alt: #eef1f4; --borde: #dce2e7; --borde-fuerte: #c6d0d8;
  --acento: #d45d00; --acento-oscuro: #a94300; --acento-tenue: #fff2e7;
  --radio: .8rem; --radio-control: .6rem;
  --fuente: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  --sombra: 0 4px 16px rgba(31, 41, 51, .06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --tinta: #e9edf1; --tinta-suave: #9ba7b3; --papel: #171d23;
    --fondo: #11161b; --fondo-alt: #161d23; --borde: #2a343d; --borde-fuerte: #3a464f;
    --acento: #f0824a; --acento-oscuro: #f7a273; --acento-tenue: #2a1d12;
    --sombra: 0 4px 16px rgba(0, 0, 0, .35);
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--fondo); color: var(--tinta); font: 1rem/1.65 var(--fuente); }
a { color: var(--acento-oscuro); }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -.02em; font-weight: 800; }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.1rem); margin: 0 0 1rem; }
h2 { font-size: 1.3rem; margin: 2.2rem 0 .8rem; padding-top: .4rem; }
h3 { font-size: 1.1rem; margin: 1.6rem 0 .5rem; }
h4 { font-size: 1rem; margin: 1.2rem 0 .4rem; }
p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.3rem; }
li { margin-bottom: .35rem; }
li > ul, li > ol { margin-top: .35rem; }
code { font-family: var(--mono); font-size: .9em; background: var(--fondo-alt); padding: .1rem .3rem; border-radius: .3rem; }
hr { border: 0; border-top: 1px solid var(--borde); margin: 2rem 0; }
blockquote { margin: 0 0 1.2rem; padding: .8rem 1.1rem; border-left: 3px solid var(--acento); background: var(--papel); border-radius: 0 var(--radio) var(--radio) 0; color: var(--tinta-suave); }
blockquote p:last-child { margin-bottom: 0; }
.salto { position: absolute; left: -9999px; }
.salto:focus { left: 0; top: 0; background: var(--papel); padding: .6rem 1rem; z-index: 20; }

.barra { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--papel) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--borde); }
.barra__interior { width: min(100% - 2rem, 92rem); margin-inline: auto; min-height: 3.6rem; display: flex; align-items: center; gap: 1rem; }
.barra__marca { font-weight: 800; text-decoration: none; color: var(--tinta); letter-spacing: -.02em; }
.barra__volver { margin-left: auto; font-size: .9rem; text-decoration: none; }
.barra__volver:hover { text-decoration: underline; }
.barra__menu { display: none; background: var(--papel); color: var(--tinta); border: 1px solid var(--borde); border-radius: var(--radio-control); width: 2.5rem; height: 2.5rem; font-size: 1.1rem; cursor: pointer; }

.marco { width: min(100% - 2rem, 92rem); margin: 1.5rem auto 4rem; display: grid; grid-template-columns: 17rem 1fr; gap: 2rem; align-items: start; }

.indice { position: sticky; top: 5rem; max-height: calc(100vh - 7rem); overflow: auto; background: var(--papel); border: 1px solid var(--borde); border-radius: var(--radio); padding: 1rem; box-shadow: var(--sombra); }
.indice__buscar { display: block; margin-bottom: .9rem; }
.indice__buscar span { display: block; font-size: .7rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; color: var(--tinta-suave); margin-bottom: .3rem; }
.indice__buscar input { width: 100%; min-height: 2.4rem; padding: .45rem .6rem; font: inherit; font-size: .9rem; color: var(--tinta); background: var(--fondo); border: 1px solid var(--borde-fuerte); border-radius: var(--radio-control); }
.indice__grupo { margin-bottom: .35rem; }
.indice__grupo > summary { cursor: pointer; font-weight: 700; font-size: .92rem; padding: .35rem .2rem; }
.indice__grupo a, .indice__suelto a { display: block; padding: .3rem .5rem; font-size: .88rem; text-decoration: none; color: var(--tinta-suave); border-radius: .4rem; }
.indice__grupo a:hover, .indice__suelto a:hover { background: var(--fondo-alt); color: var(--tinta); }
.indice a[aria-current="page"] { background: var(--acento-tenue); color: var(--acento-oscuro); font-weight: 700; }
.indice__suelto { border-top: 1px solid var(--borde); margin-top: .6rem; padding-top: .6rem; }
.indice__grupo ul { padding-left: 0; list-style: none; margin: .1rem 0 .3rem; }
.indice__grupo li { margin: 0; }

.contenido { background: var(--papel); border: 1px solid var(--borde); border-radius: var(--radio); padding: clamp(1.4rem, 3vw, 2.6rem); box-shadow: var(--sombra); min-width: 0; }
.pagina { max-width: 44rem; }
.pagina--portada { max-width: none; }
.pagina .captura { margin: 1.4rem 0; }
.pagina .captura img { width: 100%; height: auto; border: 1px solid var(--borde); border-radius: var(--radio); box-shadow: var(--sombra); }
.pagina img { max-width: 100%; height: auto; }
.tabla-envoltorio { overflow-x: auto; margin: 0 0 1.4rem; }
.tabla-envoltorio table { border-collapse: collapse; width: 100%; font-size: .92rem; }
.tabla-envoltorio th { background: var(--acento-tenue); color: var(--acento-oscuro); text-align: left; }
.tabla-envoltorio th, .tabla-envoltorio td { border: 1px solid var(--borde); padding: .5rem .65rem; }
.migas { font-size: .82rem; color: var(--tinta-suave); margin-bottom: 1rem; }
.migas a { text-decoration: none; }
.migas a:hover { text-decoration: underline; }
.pie-pagina { border-top: 1px solid var(--borde); margin-top: 2.5rem; padding-top: 1rem; font-size: .85rem; color: var(--tinta-suave); }

.portada__titulo { font-size: clamp(2rem, 1.5rem + 2vw, 2.6rem); }
.portada__entrada { font-size: 1.05rem; color: var(--tinta-suave); max-width: 42rem; }
.portada__mapa { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 23rem), 1fr)); gap: 1rem; margin: 1.8rem 0 2.4rem; align-items: start; }
.portada__mapa .mapa-app { background: var(--fondo); border: 1px solid var(--borde); border-radius: var(--radio); padding: 1rem; container-type: inline-size; }
.portada__mapa .mapa-app h3 { display: flex; align-items: center; gap: .5rem; font-size: 1.02rem; margin: 0; }
.portada__mapa .mapa-app .punto { width: .55rem; height: .55rem; border-radius: 50%; display: inline-block; }
.portada__mapa .mapa-app .enlace { margin: .15rem 0 .3rem; color: var(--tinta-suave); font-size: .82rem; }
.mapa-app__diagrama { position: relative; height: 12rem; margin-block: .6rem; }
.mapa-app__diagrama svg { position: absolute; inset: 0; width: 100%; height: 100%; stroke-width: 1.5; stroke-opacity: .55; }
.mapa-app__raiz, .mapa-app__nodo { position: absolute; left: var(--x, 50%); top: var(--y, 50%); transform: translate(-50%, -50%); display: flex; align-items: center; gap: .4rem; padding: .4rem .55rem; border-radius: .5rem; font-size: .9rem; font-weight: 700; line-height: 1.35; background: var(--fondo); color: var(--tinta); max-width: 48%; }
.mapa-app__raiz { background: var(--nodo); color: #fff; font-size: 1rem; padding: .6rem .9rem; }
.mapa-app__nodo::before { content: ''; width: .55rem; height: .55rem; flex: 0 0 auto; border-radius: 50%; background: var(--nodo); }
.mapa-app__canales { font-size: .85rem; line-height: 1.5; color: var(--tinta-suave); margin: .5rem 0 1rem; }
.mapa-app__procedimientos { border-top: 1px solid var(--borde); padding-top: .75rem; }
.mapa-app__procedimientos summary { cursor: pointer; font-size: .9rem; font-weight: 600; }
.portada__mapa .mapa-app__roles { display: grid; gap: .8rem; margin: .8rem 0 0; padding: 0; list-style: none; }
.portada__mapa .mapa-app__roles li { font-size: .9rem; line-height: 1.5; margin: 0; padding: 0; }
.portada__mapa .mapa-app__roles b { display: block; }
.portada__mapa .mapa-app__roles span { color: var(--tinta-suave); }
.mapa-app__diagrama--arbol { height: auto; display: grid; gap: .5rem; }
.mapa-app__diagrama--arbol svg { display: none; }
.mapa-app__diagrama--arbol > span { position: relative; inset: auto; transform: none; max-width: none; justify-self: start; }
@container (max-width: 20rem) {
  .mapa-app__diagrama { height: auto; display: grid; gap: .3rem; margin-block: 1rem; }
  .mapa-app__diagrama svg { display: none; }
  .mapa-app__raiz, .mapa-app__nodo { position: relative; inset: auto; transform: none; max-width: none; justify-self: start; }
  .mapa-app__raiz { margin-bottom: .3rem; }
  .mapa-app__nodo { margin-left: 1rem; }
  .mapa-app__nodo::after { content: ''; position: absolute; left: -.5rem; top: -.3rem; width: .5rem; height: calc(50% + .3rem); border-left: 1px solid var(--borde-fuerte); border-bottom: 1px solid var(--borde-fuerte); }
}
.portada__apps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 2rem; }
.portada__app { background: var(--fondo); border: 1px solid var(--borde); border-radius: var(--radio); padding: 1rem 1.1rem; }
.portada__app h3 { margin: 0 0 .3rem; font-size: 1.05rem; }
.portada__app h3 a { text-decoration: none; }
.portada__app h3 a:hover { text-decoration: underline; }
.portada__app p { margin: 0; color: var(--tinta-suave); font-size: .92rem; }
.portada__roles { margin-top: .5rem !important; font-size: .86rem !important; }
.portada__roles a { margin-right: .15rem; }

@media (max-width: 900px) {
  .marco { grid-template-columns: 1fr; }
  .portada__mapa, .portada__apps { grid-template-columns: 1fr; }
  .barra__menu { display: block; }
  .indice { position: static; max-height: none; display: none; }
  body.indice-abierto .indice { display: block; }
}
@media print { .barra, .indice, .pie-pagina { display: none; } .marco { grid-template-columns: 1fr; } .contenido { border: 0; box-shadow: none; } }
