/* 171 · Public documentation (/documentation/). Self-contained: shares no rule with landing.css. */
:root { color-scheme: dark; }
/* base.html owns <body>: the «.docs» wrapper plays the body, so the real one only loses its margin. */
body:has(> .docs) { margin: 0; background: #0e1218; }
.docs {
  --bg: #0e1218;
  --panel: #121922;
  --tarjeta: #161e29;
  --linea: rgba(255, 255, 255, .09);
  --linea-fuerte: rgba(255, 255, 255, .16);
  --texto: #e6ecf3;
  --suave: #a8b3c2;
  --tenue: #7b8899;
  --accent: #22c8ff;
  --accent-fondo: rgba(34, 200, 255, .12);
  --aviso: #f5b94a;
  --aviso-fondo: rgba(245, 185, 74, .10);
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--texto);
  font: 16px/1.6 Inter, -apple-system, "Segoe UI", Arial, sans-serif; -webkit-font-smoothing: antialiased;
}
.docs *, .docs *::before, .docs *::after { box-sizing: border-box; }
.docs a { color: inherit; text-decoration: none; }
.docs :target { scroll-margin-top: 88px; }
.docs [id] { scroll-margin-top: 88px; }

/* Header */
.docs-cabecera {
  position: sticky; top: 0; z-index: 20; height: 64px; display: flex; align-items: center; gap: 16px;
  padding: 0 24px; border-bottom: 1px solid var(--linea); background: rgba(14, 18, 24, .86); backdrop-filter: blur(10px);
}
.docs-logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; }
.docs-logo img { width: 26px; height: 26px; }
.docs-logo small { padding-left: 10px; border-left: 1px solid var(--linea-fuerte); color: var(--suave); font-weight: 500; font-size: 15px; }
.docs-cabecera-fin { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.docs-enlace { font-size: 14px; color: var(--suave); }
.docs-enlace:hover { color: var(--accent); }
.docs-boton {
  display: inline-flex; align-items: center; padding: 8px 18px; border-radius: 9px; font-size: 14px; font-weight: 500;
  background: var(--accent); color: #06121a;
}
.docs-boton:hover { background: #5ad6ff; }
.docs-menu {
  display: none; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid var(--linea-fuerte); border-radius: 9px;
  background: transparent; color: var(--texto); font: inherit; font-size: 14px; cursor: pointer;
}
.docs-menu span { display: block; width: 14px; height: 2px; background: currentColor; box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor; }

/* Three columns: sections · content · on this page */
.docs-marco {
  display: grid; grid-template-columns: 248px minmax(0, 1fr) 208px; gap: 56px;
  max-width: 1360px; margin: 0 auto; padding: 0 24px;
}
.docs-nav { position: sticky; top: 64px; align-self: start; max-height: calc(100vh - 64px); overflow-y: auto; padding: 32px 0 40px; }
.docs-nav h2 { margin: 24px 0 8px; font-size: 12px; line-height: 18px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--tenue); }
.docs-nav h2:first-child { margin-top: 0; }
.docs-nav ul { list-style: none; margin: 0; padding: 0; }
.docs-nav a { display: block; padding: 5px 12px; margin-left: -12px; border-radius: 7px; font-size: 14px; line-height: 22px; color: var(--suave); }
.docs-nav a:hover { color: var(--texto); background: rgba(255, 255, 255, .04); }
.docs-nav a.activo { color: var(--accent); background: var(--accent-fondo); }

.docs-contenido { min-width: 0; max-width: 760px; padding: 48px 0 96px; }
.docs-toc { position: sticky; top: 64px; align-self: start; padding: 48px 0; }
.docs-toc p { margin: 0 0 10px; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--tenue); }
.docs-toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--linea); }
.docs-toc a { display: block; margin-left: -1px; padding: 4px 0 4px 14px; border-left: 1px solid transparent; font-size: 13px; line-height: 20px; color: var(--suave); }
.docs-toc a:hover { color: var(--texto); }
.docs-toc a.activo { color: var(--accent); border-left-color: var(--accent); }

/* Typography */
.docs-eyebrow { margin: 0 0 12px; font-size: 13px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.docs-contenido h1 { margin: 0 0 14px; font-size: clamp(34px, 4.4vw, 48px); line-height: 1.08; font-weight: 600; letter-spacing: -.03em; color: #fff; }
.docs-entradilla { margin: 0 0 36px; max-width: 600px; font-size: 18px; line-height: 29px; color: var(--suave); }
.docs-seccion { padding-top: 56px; margin-top: 56px; border-top: 1px solid var(--linea); }
.docs-seccion > h2 { margin: 0 0 10px; font-size: 30px; line-height: 1.15; font-weight: 600; letter-spacing: -.02em; color: #fff; }
.docs-seccion > p.docs-lead { margin: 0 0 28px; font-size: 17px; color: var(--suave); }
.docs-contenido h3 { margin: 40px 0 8px; font-size: 20px; line-height: 28px; font-weight: 600; color: #fff; }
.docs-contenido p { margin: 0 0 14px; color: var(--suave); }
.docs-contenido strong { color: var(--texto); font-weight: 500; }

/* Home cards */
.docs-tarjetas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.docs-tarjeta {
  display: flex; flex-direction: column; padding: 22px; border: 1px solid var(--linea); border-radius: 14px;
  background: linear-gradient(180deg, rgba(34, 200, 255, .05), transparent 60%), var(--tarjeta);
  transition: border-color .15s, transform .15s;
}
.docs-tarjeta:hover { border-color: rgba(34, 200, 255, .45); }
.docs-tarjeta-icono { display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 16px; border-radius: 9px; background: var(--accent-fondo); color: var(--accent); font-weight: 600; }
.docs-tarjeta h3 { margin: 0 0 6px; font-size: 17px; line-height: 24px; }
.docs-tarjeta > p { margin: 0 0 14px; font-size: 14px; line-height: 22px; }
.docs-tarjeta ul { list-style: none; margin: auto 0 0; padding: 12px 0 0; border-top: 1px solid var(--linea); }
.docs-tarjeta li a { display: flex; justify-content: space-between; padding: 4px 0; font-size: 14px; color: var(--texto); }
.docs-tarjeta li a::after { content: "→"; color: var(--tenue); }
.docs-tarjeta li a:hover { color: var(--accent); }
.docs-tarjeta li a:hover::after { color: var(--accent); }

/* Callouts */
.docs-aviso {
  display: grid; grid-template-columns: 22px 1fr; gap: 12px; margin: 20px 0; padding: 14px 18px;
  border: 1px solid rgba(34, 200, 255, .28); border-radius: 12px; background: var(--accent-fondo);
  font-size: 15px; line-height: 24px; color: var(--texto);
}
.docs-aviso::before {
  content: "i"; display: grid; place-items: center; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%;
  background: var(--accent); color: #06121a; font-weight: 700; font-size: 13px; font-style: normal;
}
.docs-aviso-importante { border-color: rgba(245, 185, 74, .35); background: var(--aviso-fondo); }
.docs-aviso-importante::before { content: "!"; background: var(--aviso); }
.docs-aviso p { margin: 0; color: var(--texto); }

/* Labels */
.etiqueta-prevista {
  display: inline-block; margin-right: 6px; padding: 1px 8px; border: 1px dashed #5a6b82; border-radius: 999px;
  font-size: 12px; line-height: 18px; font-weight: 500; letter-spacing: .02em; color: var(--suave); vertical-align: 1px;
}
.docs-chip { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #123e52; color: var(--accent); font-size: 13px; line-height: 20px; white-space: nowrap; }
.docs-chip-tenue { background: rgba(255, 255, 255, .06); color: var(--suave); }

/* Schematics: the app's own cards and chips, few elements */
.esquema {
  margin: 24px 0; padding: 28px; border: 1px solid var(--linea); border-radius: 16px;
  background: radial-gradient(80% 100% at 50% 0%, rgba(34, 200, 255, .08), transparent 70%), var(--panel);
}
.esquema figcaption { margin-top: 18px; font-size: 13px; color: var(--tenue); text-align: center; }
.esquema-cadena { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 0; list-style: none; margin: 0; padding: 0; }
.esquema-cadena li { display: flex; align-items: center; }
.esquema-cadena li + li::before { content: ""; width: 28px; height: 2px; margin: 0 6px; background: linear-gradient(90deg, rgba(34, 200, 255, .2), var(--accent)); }
.esquema-nodo { padding: 8px 14px; border: 1px solid #2b3748; border-radius: 10px; background: #1e2632; font-size: 14px; font-weight: 500; color: var(--texto); white-space: nowrap; }
.esquema-nodo-final { border-color: rgba(34, 200, 255, .5); color: var(--accent); }

.esquema-flujo { display: grid; grid-template-columns: auto 48px 1fr; align-items: center; gap: 10px; }
.esquema-doc {
  width: 96px; height: 120px; padding: 12px; border-radius: 8px 20px 8px 8px; background: #e9eef5; color: #0e1218;
  display: flex; flex-direction: column; gap: 8px;
}
.esquema-doc b { align-self: flex-start; padding: 1px 7px; border-radius: 5px; background: #e5484d; color: #fff; font-size: 12px; }
.esquema-doc i { flex: 1; background: repeating-linear-gradient(#b8c3d1 0 3px, transparent 3px 11px); }
.esquema-flecha { position: relative; height: 2px; background: var(--accent); }
.esquema-flecha::after { content: ""; position: absolute; right: -2px; top: -6px; border-left: 11px solid var(--accent); border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.esquema-tarjetas { display: flex; flex-direction: column; gap: 10px; list-style: none; margin: 0; padding: 0; }
.esquema-tarjeta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; border: 1px solid #2b3748; border-radius: 10px; background: #1e2632; }
.esquema-linea { flex: 1 1 140px; height: 8px; border-radius: 4px; background: #3a4759; }
.esquema-linea.corta { flex-basis: 90px; max-width: 60%; }

.esquema-decision { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.esquema-caja { padding: 14px 16px; border: 1px solid #2b3748; border-radius: 12px; background: #1e2632; font-size: 14px; color: var(--suave); }
.esquema-caja b { display: block; margin-bottom: 4px; color: #fff; font-weight: 500; font-size: 15px; }
.esquema-botones { display: flex; gap: 8px; margin-top: 10px; }
.esquema-botones span { padding: 3px 10px; border-radius: 7px; font-size: 13px; }
.esquema-si { background: var(--accent); color: #06121a; }
.esquema-no { border: 1px solid var(--linea-fuerte); color: var(--texto); }

.esquema-charla { display: flex; flex-direction: column; gap: 10px; max-width: 520px; margin: 0 auto; }
.esquema-burbuja { max-width: 85%; padding: 10px 14px; border-radius: 14px; font-size: 14px; line-height: 21px; }
.esquema-pregunta { align-self: flex-end; border-bottom-right-radius: 4px; background: #24415a; color: #fff; }
.esquema-respuesta { align-self: flex-start; border-bottom-left-radius: 4px; border: 1px solid #2b3748; background: #1e2632; color: var(--suave); }
.esquema-respuesta b { display: block; margin-bottom: 2px; font-size: 12px; color: var(--accent); font-weight: 600; }
.esquema-fuentes { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 6px; }

.esquema-estado { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.esquema-estado div { padding: 14px; border: 1px solid #2b3748; border-radius: 12px; background: #1e2632; font-size: 13px; color: var(--suave); }
.esquema-estado i { display: block; height: 6px; margin-top: 12px; border-radius: 3px; background: linear-gradient(90deg, var(--accent) var(--p), #2b3748 var(--p)); }

/* Steps */
.docs-pasos { list-style: none; margin: 16px 0; padding: 0; counter-reset: paso; }
.docs-pasos li { position: relative; padding: 0 0 18px 44px; color: var(--suave); counter-increment: paso; }
.docs-pasos li::before {
  content: counter(paso); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 28px; height: 28px;
  border-radius: 50%; background: var(--accent-fondo); color: var(--accent); font-size: 14px; font-weight: 600;
}
.docs-pasos li:not(:last-child)::after { content: ""; position: absolute; left: 13.5px; top: 32px; bottom: 4px; width: 1px; background: var(--linea-fuerte); }
.docs-pasos strong { display: block; color: #fff; }

/* Today / planned */
.docs-columnas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.docs-columnas > div { padding: 22px; border: 1px solid var(--linea); border-radius: 14px; background: var(--tarjeta); }
.docs-columnas h3 { margin: 0 0 12px; font-size: 17px; }
.docs-lista { list-style: none; margin: 0; padding: 0; }
.docs-lista li { position: relative; padding: 6px 0 6px 26px; font-size: 15px; line-height: 23px; color: var(--suave); }
.docs-lista li::before { content: "✓"; position: absolute; left: 0; top: 6px; color: var(--accent); font-weight: 600; }
.docs-lista-prevista li { padding-left: 0; }
.docs-lista-prevista li::before { content: none; }

/* Footer */
.docs-pie { display: flex; justify-content: space-between; gap: 16px; padding: 24px; border-top: 1px solid var(--linea); color: var(--tenue); font-size: 13px; }
.docs-pie a:hover { color: var(--accent); }

/* Narrower screens: no "On this page" column */
@media (max-width: 1180px) {
  .docs-marco { grid-template-columns: 232px minmax(0, 1fr); gap: 48px; }
  .docs-toc { display: none; }
}
/* Mobile: the section menu folds under the header */
@media (max-width: 860px) {
  .docs-cabecera { padding: 0 16px; gap: 12px; }
  .docs-logo small, .docs-enlace { display: none; }
  .docs-menu { display: inline-flex; }
  .docs-marco { display: block; padding: 0 16px; }
  .docs-nav {
    position: fixed; top: 64px; left: 0; right: 0; bottom: 0; z-index: 15; max-height: none; padding: 24px 16px 40px;
    background: var(--bg); border-top: 1px solid var(--linea); display: none; align-self: stretch;
  }
  .docs-nav-abierta .docs-nav { display: block; }
  /* The page behind the open menu does not scroll (on <body>: on the wrapper it would unstick the header). */
  body:has(.docs-nav-abierta) { overflow: hidden; }
  .docs-contenido { padding: 32px 0 64px; }
  .docs-tarjetas, .docs-columnas { grid-template-columns: minmax(0, 1fr); }
  .esquema { padding: 20px 16px; }
  .esquema-flujo { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .esquema-flujo .esquema-flecha { width: 2px; height: 28px; }
  .esquema-flujo .esquema-flecha::after { right: -6px; top: auto; bottom: -2px; border-left: 7px solid transparent; border-right: 7px solid transparent; border-top: 11px solid var(--accent); border-bottom: 0; }
  .esquema-flujo .esquema-tarjetas { width: 100%; }
  .esquema-decision { grid-template-columns: minmax(0, 1fr); }
  .esquema-decision .esquema-flecha { justify-self: center; width: 2px; height: 24px; }
  .esquema-decision .esquema-flecha::after { right: -6px; top: auto; bottom: -2px; border-left: 7px solid transparent; border-right: 7px solid transparent; border-top: 11px solid var(--accent); border-bottom: 0; }
  .esquema-estado { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .docs-pie { flex-direction: column; padding: 20px 16px 56px; }
}
/* Without JavaScript the menu stays open on mobile: nothing is hidden for good. */
@media (max-width: 860px) {
  .no-js .docs-nav { display: block; position: static; padding: 24px 0 0; border: 0; }
  .no-js .docs-menu { display: none; }
}
.docs-tarjeta-mas { display: flex; justify-content: space-between; padding: 4px 0; font-size: 14px; color: var(--accent); }
.docs-tarjeta-mas::after { content: "→"; }

.docs-contenido p a, .docs-pasos a { color: var(--accent); }
.docs-contenido p a:hover, .docs-pasos a:hover { text-decoration: underline; }
.docs-tarjeta-paso { display: block; padding: 4px 0; font-size: 14px; color: var(--suave); }
