/* De los Datos a la Decisión con Modelos IA — Universidad de Cartagena · MinTIC
   ----------------------------------------------------------------------
   Diseño editorial, como una publicación institucional impresa: papel
   claro, tinta azul marino, titulares en serif y filetes finos en lugar de
   cajas. Sin sombras, sin degradados, sin esquinas redondeadas. El naranja
   de la casa se usa poco y solo para señalar.

   La mitad de la sala entra desde el celular: una columna, objetivos
   táctiles de 44 px y nada de desplazamiento horizontal. */

:root {
  --tinta: #13233A;
  --tinta-media: #4B5A6E;
  --tinta-suave: #8590A0;
  --azul: #1F4E79;
  --azul-claro: #DCE6F0;
  --naranja: #E8630A;
  --verde: #2F7D4F;
  --rojo: #B3362B;
  --ambar: #B07415;
  --papel: #EAF2FB;
  --papel-2: #D9E6F4;
  --filete: #C3D3E6;
  --govco: #0943B5;
  --filete-fuerte: #13233A;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", "Segoe UI", system-ui, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }
body {
  font-family: var(--sans); background: var(--papel); color: var(--tinta);
  font-size: 1.03rem; line-height: 1.6; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%;
}
a { color: var(--azul); text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.12; }
h3, h4 { font-family: var(--serif); font-weight: 600; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 .85rem; }
button, input, select, textarea { font: inherit; color: inherit; }
.oculto, [hidden] { display: none !important; }
.diminuto { font-size: .8rem; color: var(--tinta-suave); }
.sutil { color: var(--tinta-media); font-size: .93rem; }

/* ------------------------------------------------------------ cabecera */
.barra-sup {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: .8rem;
  padding: .7rem 1rem; background: var(--papel); border-bottom: 1px solid var(--filete-fuerte);
}
.logo {
  font-family: var(--serif); font-weight: 700; font-size: 1.35rem; line-height: 1; color: var(--tinta);
  padding-right: .8rem; border-right: 1px solid var(--filete); flex: 0 0 auto;
}
.logo::after { content: "."; color: var(--naranja); }
.marca-t { min-width: 0; flex: 1; line-height: 1.25; }
.marca-t b { display: block; font-size: .9rem; font-weight: 600; }
.marca-t span { display: block; font-size: .72rem; color: var(--tinta-suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.credencial { text-align: right; font-size: .66rem; color: var(--tinta-suave); line-height: 1.2; text-transform: uppercase; letter-spacing: .08em; }
.credencial b { display: block; font-family: var(--mono); font-size: 1rem; color: var(--tinta); letter-spacing: .14em; }
.progreso { height: 2px; background: transparent; position: sticky; top: 59px; z-index: 49; }
.progreso i { display: block; height: 100%; background: var(--naranja); transition: width .5s ease; }

/* ------------------------------------------------------------ lienzo */
.lienzo { max-width: 760px; margin: 0 auto; padding: 1.4rem 1.1rem 7rem; }
.tarjeta { border-top: 1px solid var(--filete-fuerte); padding: 1rem 0 1.2rem; margin: 0 0 1.4rem; }
.tarjeta > h3:first-child { margin-top: .1rem; }

/* ------------------------------------------------------------ hoja */
.hoja { animation: entra .35s ease-out; }
@keyframes entra { from { opacity: .2; } to { opacity: 1; } }
.hoja-cab { margin: .4rem 0 1.6rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--filete); }
.antetitulo {
  font-family: var(--mono); font-size: .72rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  color: var(--tinta-media); margin-bottom: .9rem; display: flex; align-items: center; gap: .6rem;
}
.antetitulo::before { content: ""; width: 26px; height: 2px; background: var(--naranja); flex: 0 0 auto; }
.hoja-titulo { font-family: var(--serif); font-weight: 600; font-size: clamp(1.75rem, 6vw, 2.7rem); letter-spacing: -.01em; }
.tipo-portada .hoja-cab { border-bottom: 0; padding: 1.4rem 0 .4rem; border-top: 6px solid var(--tinta); }
.tipo-portada .hoja-titulo { font-size: clamp(2.3rem, 9vw, 4rem); font-weight: 700; line-height: 1.02; }

.prosa { font-size: 1.04rem; color: #26364C; }
.prosa strong { color: var(--tinta); font-weight: 600; }
.prosa ul { padding-left: 1.1rem; margin: 0 0 1.1rem; }
.prosa ul li { margin-bottom: .55rem; padding-left: .2rem; }
.prosa ul li::marker { color: var(--naranja); }
.prosa h3 { font-size: 1.25rem; margin-top: 1.6rem; }
.prosa code { font-family: var(--mono); font-size: .86em; color: var(--azul); word-break: break-all; }
.codigo-linea code { display: block; padding: .8rem 0 .8rem .9rem; border-left: 2px solid var(--azul); font-size: .84rem; }
.lista-n { counter-reset: n; list-style: none; padding: 0 !important; margin: 0 0 1.2rem; }
.lista-n li { counter-increment: n; position: relative; padding: .7rem 0 .7rem 3.1rem; border-top: 1px solid var(--filete); margin: 0; }
.lista-n li:last-child { border-bottom: 1px solid var(--filete); }
.lista-n li::before {
  content: counter(n, decimal-leading-zero); position: absolute; left: 0; top: .62rem;
  font-family: var(--serif); font-size: 1.45rem; font-weight: 600; color: var(--naranja); line-height: 1.1;
}
.nota-clave {
  font-family: var(--serif); font-style: italic; font-size: 1.14rem; line-height: 1.5; color: var(--tinta);
  padding: 1rem 0 0; margin: 1.4rem 0; border-top: 2px solid var(--naranja); max-width: 40em;
}
.nota-clave strong { font-style: normal; }
.tabla-env { overflow-x: auto; margin: 0 0 1.2rem; }
.tabla-md { border-collapse: collapse; width: 100%; font-size: .94rem; }
.tabla-md th, .tabla-md td { text-align: left; padding: .65rem .8rem .65rem 0; border-bottom: 1px solid var(--filete); vertical-align: top; }
.tabla-md th { font-family: var(--mono); font-weight: 500; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--tinta-media); border-bottom: 1px solid var(--filete-fuerte); }
.tabla-md td:first-child { font-weight: 600; }
.muestra { font-size: .78rem; }
.muestra td { white-space: nowrap; max-width: 180px; overflow: hidden; text-overflow: ellipsis; font-weight: 400 !important; }

/* Pasos: una linea de tiempo, no fichas */
.flujo { list-style: none; padding: 0 !important; margin: .4rem 0 1.6rem; display: grid; gap: 0; }
.flujo li { display: grid; grid-template-columns: 2.6rem 1fr; align-items: baseline; padding: .55rem 0; border-top: 1px solid var(--filete); margin: 0 !important; }
.flujo li:last-child { border-bottom: 1px solid var(--filete); }
.flujo-n { font-family: var(--mono); font-size: .8rem; color: var(--naranja); font-weight: 500; }
.flujo-t { font-weight: 500; font-size: .98rem; line-height: 1.35; }
@media (min-width: 760px) {
  .flujo { grid-auto-flow: column; grid-auto-columns: 1fr; border-top: 2px solid var(--tinta); }
  .flujo li, .flujo li:last-child { display: block; border: 0; border-left: 1px solid var(--filete); padding: .7rem .8rem .2rem; }
  .flujo li:first-child { border-left: 0; padding-left: 0; }
  .flujo-n { display: block; margin-bottom: .3rem; }
}

/* Cifras: numeros grandes separados por filetes */
.cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); margin: .6rem 0 1.6rem; border-top: 1px solid var(--filete-fuerte); }
.cifra { padding: .8rem .9rem .4rem 0; border-right: 1px solid var(--filete); margin-right: .9rem; }
.cifra:last-child { border-right: 0; }
.cifra b { display: block; font-family: var(--serif); font-size: 2.3rem; font-weight: 600; line-height: 1; color: var(--tinta); overflow-wrap: anywhere; }
.cifra span { display: block; font-size: .8rem; color: var(--tinta-media); margin-top: .35rem; line-height: 1.3; }

/* video */
.video { position: relative; aspect-ratio: 16 / 9; background: var(--tinta); margin: .4rem 0 .6rem; }
.video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.video.vacio {
  display: grid; place-items: center; text-align: center; padding: 1rem; color: var(--tinta-media);
  background: repeating-linear-gradient(135deg, var(--papel) 0 10px, var(--papel-2) 10px 11px);
  border: 1px solid var(--filete);
}
.video.vacio b { display: block; font-family: var(--serif); font-size: 1.35rem; color: var(--tinta); font-weight: 600; }

/* grafico */
.figura { margin: .4rem 0 1.4rem; padding: .8rem 0 0; border-top: 1px solid var(--filete-fuerte); }
.grafico { width: 100%; height: auto; display: block; }
.g-rejilla { stroke: var(--filete); stroke-width: 1; }
.g-eje { fill: var(--tinta-suave); font-size: 12px; font-family: var(--mono); }
.g-validacion { fill: rgba(19, 35, 58, .06); }
.g-banda { fill: rgba(232, 99, 10, .14); }
.g-historia { fill: none; stroke: var(--tinta); stroke-width: 2.4; stroke-linejoin: round; }
.g-valpunt { fill: none; stroke: var(--tinta-suave); stroke-width: 2; stroke-dasharray: 2 4; }
.g-proy { fill: none; stroke: var(--naranja); stroke-width: 2.4; stroke-dasharray: 7 5; }
.g-hoy { stroke: var(--tinta-suave); stroke-dasharray: 3 3; }
.g-etq { fill: var(--tinta-media); font-size: 12px; font-family: var(--mono); }
.leyenda { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; font-size: .8rem; color: var(--tinta-media); padding: .6rem 0 0; }
.ley::before { content: ""; display: inline-block; width: 20px; height: 2px; margin-right: .45rem; vertical-align: middle; }
.ley-hist::before { background: var(--tinta); height: 3px; }
.ley-val::before { background: rgba(19, 35, 58, .15); height: 10px; }
.ley-proy::before { background: repeating-linear-gradient(90deg, var(--naranja) 0 6px, transparent 6px 10px); height: 3px; }
.ley-banda::before { background: rgba(232, 99, 10, .25); height: 10px; }

/* modelos: indice tipografico */
.chips { display: flex; flex-wrap: wrap; gap: .2rem 1.1rem; margin: 0 0 .8rem; }
.chip { border: 0; background: none; padding: .4rem 0; font-size: .86rem; cursor: pointer; color: var(--tinta-media); border-bottom: 2px solid transparent; min-height: 36px; }
.chip:hover { color: var(--tinta); }
.chip.activa { color: var(--tinta); border-bottom-color: var(--naranja); font-weight: 600; }
.modelos-grid { display: grid; grid-template-columns: 1fr; margin-bottom: 1.4rem; border-top: 1px solid var(--filete-fuerte); }
@media (min-width: 700px) { .modelos-grid { grid-template-columns: 1fr 1fr; column-gap: 2rem; } }
.modelo { display: block; text-decoration: none; color: inherit; padding: .85rem 0 .8rem; border-bottom: 1px solid var(--filete); }
.modelo:hover b { color: var(--azul); text-decoration: underline; text-underline-offset: 3px; }
.modelo b { display: block; font-family: var(--serif); font-size: 1.08rem; font-weight: 600; line-height: 1.25; margin: .15rem 0 .25rem; }
.modelo p { font-size: .86rem; color: var(--tinta-media); margin: 0 0 .3rem; }
.modelo-sector { font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--naranja); }
.modelo-pie { display: flex; gap: 1rem; font-size: .74rem; color: var(--tinta-suave); }
.accion-centro { margin: .4rem 0 1rem; }

/* ------------------------------------------------------------ botones */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 46px; padding: .65rem 1.2rem; border-radius: 0; border: 1px solid var(--tinta);
  font-weight: 600; font-size: .95rem; cursor: pointer; text-decoration: none; line-height: 1.2;
  background: transparent; color: var(--tinta); transition: background .12s, color .12s;
}
.boton:disabled { opacity: .35; cursor: default; }
.boton.primario { background: var(--tinta); color: var(--papel); }
.boton.primario:hover { background: var(--azul); border-color: var(--azul); }
.boton.naranja { background: var(--naranja); border-color: var(--naranja); color: #fff; }
.boton.naranja:hover { background: #C8540A; }
.boton.secundario:hover:not(:disabled) { background: var(--tinta); color: var(--papel); }
.boton.peligro { border-color: var(--rojo); color: var(--rojo); }
.boton.peligro:hover { background: var(--rojo); color: #fff; }
.boton.chico { min-height: 36px; padding: .35rem .8rem; font-size: .84rem; }
.boton.ancho { width: 100%; }
.enlace-boton { background: none; border: 0; color: var(--azul); font-weight: 600; cursor: pointer; padding: .3rem 0; text-decoration: underline; }

/* ------------------------------------------------------------ formularios */
.campo { display: block; margin-bottom: 1.1rem; }
.campo > span { display: block; font-weight: 600; font-size: .88rem; margin-bottom: .35rem; }
.campo > small { display: block; color: var(--tinta-suave); font-size: .78rem; margin-top: .3rem; }
input[type=text], input[type=password], input[type=url], input[type=number], input[type=search], select, textarea {
  width: 100%; min-height: 46px; padding: .65rem .75rem; border-radius: 0;
  border: 1px solid #B9B3A4; background: #fff; font-size: 1rem;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--azul); outline-offset: -1px; border-color: var(--azul); }
.fila-campos { display: grid; gap: 0 1rem; }
@media (min-width: 640px) { .fila-campos { grid-template-columns: 1fr 1fr; } }
.con-boton { display: flex; gap: 0; }
.con-boton input { flex: 1; min-width: 0; border-right: 0; }
.segmentado { display: flex; gap: 1.4rem; margin-bottom: 1.2rem; border-bottom: 1px solid var(--filete); }
.segmentado button { border: 0; background: none; padding: .6rem 0; font-weight: 600; cursor: pointer; color: var(--tinta-suave); border-bottom: 3px solid transparent; margin-bottom: -1px; min-height: 44px; }
.segmentado button.activa { color: var(--tinta); border-bottom-color: var(--naranja); }
.checks { display: grid; gap: 0; border-top: 1px solid var(--filete); }
@media (min-width: 640px) { .checks { grid-template-columns: 1fr 1fr; column-gap: 1.4rem; } }
.check { display: flex; gap: .7rem; align-items: flex-start; padding: .6rem 0; border-bottom: 1px solid var(--filete); cursor: pointer; font-size: .92rem; }
.check input { width: 19px; height: 19px; margin-top: .15rem; accent-color: var(--tinta); flex: 0 0 auto; }
.zona-archivo { display: block; border: 1px dashed #A9A291; padding: 1.2rem; text-align: center; cursor: pointer; background: #fff; }
.zona-archivo:hover, .zona-archivo.encima { border-color: var(--tinta); border-style: solid; }
.zona-archivo input { display: none; }
.zona-archivo b { display: block; font-weight: 600; }
.carga { height: 3px; background: var(--filete); overflow: hidden; margin-top: .7rem; }
.carga i { display: block; height: 100%; width: 0; background: var(--naranja); transition: width .2s; }
.error-form { color: var(--rojo); font-size: .88rem; min-height: 1.2em; margin: .2rem 0 .6rem; }

/* ------------------------------------------------------------ pulso */
.pulso { margin-top: 1.6rem; }
.pulso h3 { font-size: 1.2rem; }
.pulso h3::before { content: "Pulso de la sala"; display: block; font-family: var(--mono); font-weight: 500; font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--naranja); margin-bottom: .35rem; }
.barras { display: grid; gap: 0; border-top: 1px solid var(--filete); }
.barra {
  position: relative; display: grid; grid-template-columns: 1fr auto; gap: .2rem 1rem; align-items: baseline;
  padding: .7rem 0 .95rem; border: 0; border-bottom: 1px solid var(--filete); background: none; text-align: left; width: 100%;
}
.votable .barra { cursor: pointer; }
.votable .barra:hover .barra-t { text-decoration: underline; text-underline-offset: 3px; }
.barra-relleno { position: absolute; left: 0; bottom: .35rem; height: 4px; background: var(--azul-claro); transition: width .6s ease; }
.barra.marcada .barra-relleno { background: var(--naranja); }
.barra.marcada .barra-t { font-weight: 700; }
.barra.marcada .barra-t::before { content: "● "; color: var(--naranja); }
.barra-t { font-weight: 500; }
.barra-n { font-family: var(--mono); font-size: .9rem; color: var(--tinta); }
.barras-total { text-align: right; padding-top: .4rem; }

/* ------------------------------------------------------------ navegacion inferior */
.nav-inf {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; gap: .5rem; align-items: center; justify-content: space-between;
  padding: .55rem .9rem calc(.55rem + env(safe-area-inset-bottom)); background: var(--papel); border-top: 1px solid var(--filete-fuerte);
}
.nav-inf .boton { min-width: 52px; border-color: var(--filete); }
.en-vivo { display: inline-flex; align-items: center; gap: .45rem; font-size: .78rem; font-weight: 600; border: 0; background: none; color: var(--naranja); cursor: pointer; padding: .4rem .2rem; }
.en-vivo i { width: 7px; height: 7px; border-radius: 50%; background: var(--naranja); }
.en-vivo:not(.siguiendo) { text-decoration: underline; text-underline-offset: 3px; font-size: .86rem; }
.en-vivo.siguiendo { color: var(--verde); text-transform: uppercase; letter-spacing: .06em; }
.en-vivo.siguiendo i { background: var(--verde); animation: late 2s infinite; }
@keyframes late { 50% { opacity: .25; } }
.nav-pos { font-family: var(--mono); font-size: .74rem; color: var(--tinta-suave); }

/* ------------------------------------------------------------ registro */
.registro { max-width: 560px; margin: 0 auto; }
.registro-hero { border-top: 6px solid var(--tinta); padding: 1.4rem 0 1.4rem; margin: .2rem 0 1rem; border-bottom: 1px solid var(--filete); }
.registro-hero h1 { font-family: var(--serif); font-size: clamp(2.2rem, 9vw, 3.2rem); font-weight: 700; line-height: 1.02; }
.registro-hero p { color: var(--tinta-media); margin: 0; }
.registro details summary { padding: .2rem 0; }

/* ------------------------------------------------------------ fichas */
.fichas { display: grid; gap: 0; border-top: 1px solid var(--filete-fuerte); }
@media (min-width: 760px) { .fichas.dos { grid-template-columns: 1fr 1fr; column-gap: 2.2rem; } }
.ficha { padding: 1rem 0 1.2rem; border-bottom: 1px solid var(--filete); }
.ficha h4 { font-size: 1.25rem; margin: .4rem 0 .25rem; }
.ficha p { font-size: .93rem; margin-bottom: .45rem; color: #2C3B50; }
.ficha p b { font-weight: 600; }
.ficha-cab { display: flex; flex-wrap: wrap; gap: .2rem .9rem; }
.ficha-autor { font-size: .82rem; color: var(--tinta-suave); margin-bottom: .6rem; }
.insignia { font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--tinta-suave); }
.insignia.sector { color: var(--naranja); }
.insignia.portal, .insignia.propio { color: var(--tinta-media); }
.calidad-chips { display: flex; flex-wrap: wrap; gap: .15rem .9rem; margin: .5rem 0 .7rem; font-size: .8rem; }
.calidad-chips .si { color: var(--verde); font-weight: 600; }
.calidad-chips .si::before { content: "✓ "; }
.calidad-chips .no { color: var(--tinta-suave); }
.calidad-chips .no::before { content: "– "; }
.archivo-fila { display: flex; align-items: center; gap: .7rem; padding: .55rem 0; border-top: 1px solid var(--filete); font-size: .9rem; }
.archivo-fila > a, .archivo-fila > span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.archivo-ico { font-family: var(--mono); font-size: .66rem; color: var(--tinta-media); border: 1px solid var(--filete); padding: .1rem .35rem; flex: 0 0 auto; }
.punto-sem { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: 0 0 auto; background: var(--tinta-suave); }
.sem-verde, .semaforo-verde .punto-sem { background: var(--verde); }
.sem-ambar, .semaforo-ambar .punto-sem { background: var(--ambar); }
.sem-rojo, .semaforo-rojo .punto-sem { background: var(--rojo); }
.ficha-acciones { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .8rem; }

.lectura { padding: .8rem 0 .4rem .9rem; margin: .5rem 0; border-left: 3px solid var(--tinta-suave); }
.semaforo-verde { border-left-color: var(--verde); }
.semaforo-ambar { border-left-color: var(--ambar); }
.semaforo-rojo { border-left-color: var(--rojo); }
.lectura-cab { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .4rem; }
.lectura-cab b { font-family: var(--serif); font-size: 1.05rem; font-weight: 600; }
.hallazgos { list-style: none; padding: 0; margin: 0 0 .5rem; font-size: .88rem; }
.hallazgos li { padding-left: 1.4rem; position: relative; margin-bottom: .3rem; }
.hallazgos li::before { position: absolute; left: 0; font-weight: 700; font-family: var(--mono); }
.hallazgos .si::before { content: "✓"; color: var(--verde); }
.hallazgos .no::before { content: "!"; color: var(--rojo); left: .25rem; }
.columnas-chips { display: flex; flex-wrap: wrap; gap: .25rem .9rem; margin: .6rem 0; font-family: var(--mono); font-size: .74rem; }
.col-chip small { color: var(--tinta-suave); }
.col-chip.terr { color: var(--azul); font-weight: 600; }
.col-chip.fec { color: var(--verde); font-weight: 600; }
.col-chip.personal { color: var(--rojo); font-weight: 600; text-decoration: underline wavy; }
details summary { cursor: pointer; font-size: .86rem; font-weight: 600; color: var(--azul); }

.portal-tarjeta { padding: .7rem 0 .2rem .9rem; margin: .6rem 0; border-left: 3px solid var(--azul); }
.portal-tarjeta b { display: block; font-family: var(--serif); font-size: 1.08rem; font-weight: 600; margin: .3rem 0 .1rem; line-height: 1.3; }
.portal-cab { display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-size: .82rem; }
.portal-cab .insignia { color: var(--azul); }
.portal-datos { display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; margin-top: .6rem; }
.portal-datos span { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; }
.portal-datos small { display: block; font-family: var(--mono); font-weight: 400; font-size: .64rem; color: var(--tinta-suave); text-transform: uppercase; letter-spacing: .05em; }
.fresco-si { color: var(--verde); }
.fresco-medio { color: var(--ambar); }
.fresco-no { color: var(--rojo); }

.resultados-busqueda { display: grid; gap: 0; margin-top: 1rem; }
.resultado { padding: .9rem 0; border-bottom: 1px solid var(--filete); }
.resultado b { display: block; font-family: var(--serif); font-size: 1.08rem; font-weight: 600; line-height: 1.3; }
.resultado p { font-size: .86rem; color: var(--tinta-media); margin: .3rem 0 .5rem; }
.resultado-pie { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; font-size: .8rem; color: var(--tinta-suave); }
.resultado-pie code { font-family: var(--mono); color: var(--tinta); font-weight: 600; }

.sectores { display: grid; gap: .1rem; }
.sector-fila { display: grid; grid-template-columns: minmax(90px, 36%) 1fr 2.2rem; gap: .7rem; align-items: center; font-size: .88rem; padding: .3rem 0; }
.sector-n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sector-barra { height: 6px; background: var(--papel-2); }
.sector-barra i { display: block; height: 100%; background: var(--tinta); transition: width .6s; }
.sector-fila b { font-family: var(--mono); font-weight: 500; text-align: right; }

.estrellas { display: flex; gap: 0; border: 1px solid var(--tinta); }
.estrellas button { flex: 1; min-height: 50px; border: 0; border-left: 1px solid var(--tinta); background: none; font-family: var(--serif); font-size: 1.25rem; font-weight: 600; cursor: pointer; }
.estrellas button:first-child { border-left: 0; }
.estrellas button.activa { background: var(--tinta); color: var(--papel); }

/* ------------------------------------------------------------ avisos */
#avisos { position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%); z-index: 100; display: grid; gap: .4rem; width: min(92vw, 440px); }
.aviso { background: var(--tinta); color: var(--papel); padding: .75rem 1rem; font-size: .92rem; border-left: 4px solid var(--azul-claro); transition: opacity .5s; }
.aviso.ok { border-left-color: #7FC79A; }
.aviso.error { border-left-color: #F08A7E; }
.aviso.fuera { opacity: 0; }

/* ============================================================ TABLERO (proyeccion)
   Papel claro y tinta oscura: se lee mejor en un video beam con la luz
   encendida que un fondo negro. */
body.tablero { background: var(--papel); color: var(--tinta); min-height: 100vh; overflow: hidden; }
.tablero .escenario { position: fixed; inset: 0 0 78px 0; padding: 4vh 5.5vw 2vh; overflow: hidden; display: flex; flex-direction: column; border-top: 10px solid var(--tinta); }
.tablero .escenario > .hoja { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
.tablero .hoja-cab { margin-bottom: 3vh; padding-bottom: 2.4vh; }
.tablero .antetitulo { font-size: clamp(.8rem, 1vw, 1.05rem); }
.tablero .hoja-titulo { font-size: clamp(2.2rem, 4vw, 4.4rem); max-width: 24ch; }
.tablero .tipo-portada .hoja-cab { border-top: 0; padding-top: 0; }
.tablero .tipo-portada .hoja-titulo { font-size: clamp(3rem, 6.2vw, 6.8rem); max-width: 14ch; }
.tablero .prosa { font-size: clamp(1.1rem, 1.6vw, 1.7rem); max-width: 62ch; line-height: 1.5; }
.tablero .nota-clave { font-size: clamp(1.2rem, 1.8vw, 1.9rem); }
.tablero .flujo-t { font-size: clamp(1rem, 1.3vw, 1.45rem); }
.tablero .flujo-n { font-size: clamp(.85rem, 1vw, 1.1rem); }
.tablero .cifra b { font-size: clamp(2.4rem, 4.2vw, 4.6rem); }
.tablero .cifra span { font-size: clamp(.85rem, 1.1vw, 1.2rem); }
.tablero .modelos-grid { grid-template-columns: repeat(3, 1fr); column-gap: 2.4vw; }
.tablero .modelo { padding: .9vh 0; }
.tablero .modelo b { font-size: clamp(.95rem, 1.15vw, 1.3rem); }
.tablero .tipo-modelos .chips, .tablero .tipo-modelos .modelo p { display: none; }
.tablero .tipo-modelos .accion-centro .boton { font-size: clamp(1rem, 1.3vw, 1.4rem); }
.tablero .barra { padding: 1.2vh 0 1.6vh; }
.tablero .barra-t, .tablero .barra-n { font-size: clamp(1rem, 1.45vw, 1.6rem); }
.tablero .barra-relleno { height: 7px; bottom: .45vh; }
.tablero .sector-fila { font-size: clamp(.95rem, 1.25vw, 1.35rem); }
.tablero .video { height: 60vh; width: auto; align-self: flex-start; }
.dos-col { display: grid; grid-template-columns: 1.2fr .8fr; gap: 4vw; min-height: 0; flex: 1; }
.dos-col > * { min-height: 0; overflow: hidden; }
.dos-col > :last-child { border-left: 1px solid var(--filete); padding-left: 3vw; }
.tablero .fichas { grid-template-columns: repeat(3, 1fr); column-gap: 2.4vw; }
.tablero .grande-num { font-family: var(--serif); font-size: clamp(5rem, 11vw, 11rem); font-weight: 700; line-height: .9; color: var(--tinta); }
.tablero .grande-etq { color: var(--tinta-media); font-size: clamp(1rem, 1.4vw, 1.5rem); }
.tablero .qr-caja { background: #fff; padding: 12px; border: 1px solid var(--filete); display: inline-block; }

.pie-tablero {
  position: fixed; left: 0; right: 0; bottom: 0; height: 78px; z-index: 5;
  display: flex; align-items: center; gap: 1.4rem; padding: 0 5.5vw; background: var(--papel); border-top: 1px solid var(--filete-fuerte);
}
.pie-tablero .qr { background: #fff; padding: 4px; width: 60px; height: 60px; flex: 0 0 auto; }
.pie-tablero .qr img, .pie-tablero .qr canvas { width: 52px !important; height: 52px !important; display: block; }
.pie-tablero .url { font-family: var(--serif); font-size: 1.5rem; font-weight: 700; color: var(--tinta); }
.pie-tablero .url small { display: block; font-family: var(--sans); font-size: .76rem; font-weight: 400; color: var(--tinta-suave); }
.pie-tablero .contadores { margin-left: auto; display: flex; gap: 0; }
.pie-tablero .contador { padding: 0 1.4rem; border-left: 1px solid var(--filete); }
.pie-tablero .contador b { display: block; font-family: var(--serif); font-size: 1.7rem; font-weight: 600; line-height: 1; }
.pie-tablero .contador span { font-family: var(--mono); font-size: .64rem; color: var(--tinta-suave); text-transform: uppercase; letter-spacing: .06em; }
.pie-tablero .pos { font-family: var(--mono) !important; font-size: 1.1rem !important; color: var(--tinta-media); }
.pie-tablero .barra-prog { position: absolute; left: 0; top: -2px; height: 3px; background: var(--naranja); transition: width .5s; }
.qr-grande { position: fixed; inset: 0; z-index: 90; background: var(--papel); display: grid; place-items: center; text-align: center; border-top: 10px solid var(--tinta); }
.qr-grande .qr-caja { background: #fff; padding: 20px; border: 1px solid var(--filete); display: inline-block; }
.qr-grande .url { margin-top: 1.4rem; font-family: var(--serif); font-size: 3rem; font-weight: 700; }
.qr-grande p { color: var(--tinta-media); font-size: 1.2rem; }
.ayuda-teclas { position: fixed; top: 18px; right: 22px; font-family: var(--mono); font-size: .7rem; color: var(--tinta-suave); z-index: 6; }

/* ============================================================ PANEL (profesor / revision) */
.pestanas { display: flex; gap: 1.6rem; overflow-x: auto; padding: 0 1rem; background: var(--papel); border-bottom: 1px solid var(--filete); scrollbar-width: none; position: sticky; top: 59px; z-index: 48; }
.pestanas::-webkit-scrollbar { display: none; }
.pestanas button { border: 0; background: none; color: var(--tinta-suave); padding: .75rem 0; font-weight: 600; font-size: .9rem; border-bottom: 3px solid transparent; white-space: nowrap; cursor: pointer; margin-bottom: -1px; }
.pestanas button.activa { color: var(--tinta); border-bottom-color: var(--naranja); }
.pestanas .cuenta { font-family: var(--mono); font-weight: 400; font-size: .74rem; margin-left: .3rem; color: var(--tinta-suave); }
.panel-lienzo { max-width: 1200px; margin: 0 auto; padding: 1.4rem 1rem 4rem; }
.metricas { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 1.6rem; border-top: 1px solid var(--filete-fuerte); border-bottom: 1px solid var(--filete); }
.metrica { padding: .8rem 1rem .8rem 0; border-right: 1px solid var(--filete); margin-right: 1rem; }
.metrica:last-child { border-right: 0; }
.metrica b { display: block; font-family: var(--serif); font-size: 2rem; font-weight: 600; line-height: 1.05; }
.metrica span { font-size: .8rem; color: var(--tinta-media); }
.conducir { display: grid; gap: 2rem; }
@media (min-width: 980px) { .conducir { grid-template-columns: 1fr 330px; } }
.mando { display: flex; gap: .6rem; margin-bottom: 1rem; }
.mando .boton { flex: 1; min-height: 62px; font-size: 1.05rem; }
.vista-previa { padding: 1rem 1.2rem; border: 1px solid var(--filete); background: #fff; max-height: 62vh; overflow: auto; }
.lista-hojas { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--filete); }
.lista-hojas li button { width: 100%; text-align: left; display: flex; gap: .7rem; align-items: baseline; padding: .55rem .2rem; border: 0; border-bottom: 1px solid var(--filete); background: none; cursor: pointer; font-size: .9rem; }
.lista-hojas li button:hover { background: var(--papel-2); }
.lista-hojas li.actual button { font-weight: 700; box-shadow: inset 3px 0 0 var(--naranja); padding-left: .7rem; }
.lista-hojas li.oculta button { opacity: .45; }
.lista-hojas .n { font-family: var(--mono); font-size: .74rem; color: var(--tinta-suave); width: 1.4rem; flex: 0 0 auto; }
.lista-hojas .tp { margin-left: auto; font-family: var(--mono); font-size: .64rem; color: var(--tinta-suave); text-transform: uppercase; }
.notas-prof { border-left: 3px solid var(--ambar); padding: .3rem 0 .3rem .9rem; font-size: .92rem; white-space: pre-wrap; }
.editor { display: grid; gap: 2rem; }
@media (min-width: 980px) { .editor { grid-template-columns: 300px 1fr; } }
.tabla { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tabla th, .tabla td { padding: .55rem .8rem .55rem 0; border-bottom: 1px solid var(--filete); text-align: left; vertical-align: top; }
.tabla th { font-family: var(--mono); font-weight: 500; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--tinta-suave); border-bottom-color: var(--filete-fuerte); }
.tabla code { font-family: var(--mono); letter-spacing: .1em; }
.punto-linea { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--filete); }
.punto-linea.si { background: var(--verde); }
.interruptor { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .95rem 0; border-bottom: 1px solid var(--filete); }
.interruptor:last-child { border-bottom: 0; }
.interruptor b { display: block; }
.interruptor small { color: var(--tinta-suave); }
.conmutador { position: relative; width: 46px; height: 24px; flex: 0 0 auto; }
.conmutador input { opacity: 0; width: 0; height: 0; }
.conmutador span { position: absolute; inset: 0; background: #fff; border: 1px solid var(--tinta); cursor: pointer; }
.conmutador span::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: var(--tinta-suave); transition: transform .15s; }
.conmutador input:checked + span { background: var(--tinta); }
.conmutador input:checked + span::before { transform: translateX(22px); background: var(--papel); }
.enlace-generado { border-left: 3px solid var(--verde); padding: .5rem 0 .5rem .9rem; word-break: break-all; font-family: var(--mono); font-size: .86rem; }
.login-caja { max-width: 420px; margin: 8vh auto; }
.marco-vista { border: 1px solid var(--filete); padding: 1.2rem; background: #fff; }
.pres-nav { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: 1rem; }
.comentarios { display: grid; gap: 0; border-top: 1px solid var(--filete); }
.comentario { font-family: var(--serif); font-style: italic; padding: .7rem 0; border-bottom: 1px solid var(--filete); }
.encuesta-externa { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.2rem; padding: 1.2rem 0; border-top: 1px solid var(--filete-fuerte); border-bottom: 1px solid var(--filete); margin: .6rem 0 1.2rem; }
.encuesta-externa .diminuto { font-family: var(--mono); word-break: break-all; }

/* Vista de revision: indice de hojas en la barra inferior */
.indice-hojas { display: flex; flex-direction: column; align-items: center; gap: .15rem; min-width: 0; flex: 1; max-width: 420px; }
.indice-hojas select { min-height: 38px; padding: .3rem .5rem; font-size: .88rem; text-align: center; }

/* ============================================================ GOV.CO
   Franja superior y barra de accesibilidad como en mintic.gov.co. */
.franja-govco { background: var(--govco); height: 48px; display: flex; align-items: center; padding: 0 1rem; }
.franja-govco a { display: inline-flex; align-items: center; }
.franja-govco img { height: 28px; width: auto; display: block; }
.tablero .franja-govco { position: fixed; top: 0; left: 0; right: 0; z-index: 7; height: 40px; padding: 0 5.5vw; }
.tablero .franja-govco img { height: 24px; }
.tablero .escenario { top: 40px; border-top: 0; }
.tablero .ayuda-teclas { top: 52px; }
.tablero .qr-grande { top: 40px; border-top: 0; }

.accesibilidad { position: fixed; right: 0; top: 50%; transform: translateY(-50%); z-index: 80; list-style: none; margin: 0; padding: .45rem .4rem; display: grid; gap: .45rem; background: var(--govco); border-radius: 8px 0 0 8px; }
.accesibilidad button, .accesibilidad a { position: relative; width: 38px; height: 38px; display: grid; place-items: center; border: 0; padding: 0; cursor: pointer; background: transparent; color: #fff; }
.accesibilidad svg { width: 30px; height: 30px; display: block; }
.accesibilidad .etq { position: absolute; right: calc(100% + .7rem); top: 50%; transform: translateY(-50%); white-space: nowrap; background: var(--govco); color: #fff; font-size: .8rem; font-weight: 600; padding: .35rem .7rem; border-radius: 4px; opacity: 0; pointer-events: none; transition: opacity .15s; }
.accesibilidad button:hover .etq, .accesibilidad a:hover .etq, .accesibilidad button:focus-visible .etq, .accesibilidad a:focus-visible .etq { opacity: 1; }
.accesibilidad button:focus-visible, .accesibilidad a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.accesibilidad button[aria-pressed="true"] svg rect { fill: #FFDE00; }
@media (max-width: 640px) { .accesibilidad { top: auto; bottom: 86px; transform: none; padding: .3rem; gap: .3rem; } .accesibilidad button, .accesibilidad a { width: 32px; height: 32px; } .accesibilidad svg { width: 26px; height: 26px; } }

/* Alto contraste: fondo negro, texto blanco, enlaces y acentos en amarillo */
html.contraste { --papel: #000; --papel-2: #1a1a1a; --tinta: #fff; --tinta-media: #fff; --tinta-suave: #e6e6e6; --filete: #fff; --filete-fuerte: #fff; --azul: #FFDE00; --azul-claro: #555; --naranja: #FFDE00; --verde: #7CFC9A; --rojo: #FF8A80; --ambar: #FFDE00; }
html.contraste .prosa, html.contraste .ficha p, html.contraste .prosa strong { color: #fff; }
html.contraste input, html.contraste select, html.contraste textarea, html.contraste .zona-archivo, html.contraste .vista-previa, html.contraste .marco-vista { background: #000; color: #fff; border-color: #fff; }
html.contraste .boton.primario { background: #FFDE00; color: #000; border-color: #FFDE00; }
html.contraste .boton.naranja { background: #FFDE00; color: #000; border-color: #FFDE00; }
html.contraste .video.vacio { background: #000; }
html.contraste .qr-caja, html.contraste .pie-tablero .qr { background: #fff; }
html.contraste a { color: #FFDE00; }

/* Entidad con sugerencias del catalogo */
.auto-campo { position: relative; }
.campo > label > span { display: block; font-weight: 600; font-size: .88rem; margin-bottom: .35rem; }
.auto-lista { position: absolute; left: 0; right: 0; top: 100%; z-index: 40; list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--tinta); border-top: 0; max-height: 320px; overflow-y: auto; }
.auto-op { padding: .6rem .75rem; border-bottom: 1px solid var(--filete); cursor: pointer; line-height: 1.3; }
.auto-op b { display: block; font-weight: 600; font-size: .9rem; }
.auto-op small { display: block; font-size: .76rem; color: var(--tinta-suave); margin-top: .1rem; }
.auto-op:hover, .auto-op.activa { background: var(--papel-2); }
.auto-op.nueva b { color: var(--naranja); }
.auto-mas { padding: .5rem .75rem; font-size: .76rem; color: var(--tinta-suave); font-style: italic; }
.auto-aviso { display: block; min-height: 1.1em; font-size: .8rem; margin-top: .3rem; color: var(--tinta-suave); }
.auto-aviso.si { color: var(--verde); font-weight: 600; }
.auto-aviso.nueva { color: var(--ambar); }
html.contraste .auto-lista { background: #000; border-color: #fff; }
