/* ==========================================================================================================
   CardioTeca · casos clínicos publicados · HOJA COMÚN DE LA FICHA (va en /files/casos/ficha/ficha-caso.css)
   ----------------------------------------------------------------------------------------------------------
   La presentación web de cada caso recibido y aceptado: cabecera con autores y centros, dos maneras de leerlo
   («Leer el caso» y «Resolverlo como reto»), puntos clave, índice fijo con barra de lectura, cronología, pruebas
   en filas, figuras con visor y zoom, citas que enseñan la figura o la referencia al pasar por encima, pregunta
   para el lector con «qué eligió el resto», bibliografía con enlaces y pie con cómo citar.
   · Todo cuelga de .ct-ficha (y el visor y los globos, que van fuera, de .ctf-visor y .ctf-globo): nada de aquí
     toca la web. Clases con prefijo ctf-.
   · Paleta: los valores con nombre de la hoja de la web (--ct-…), cada uno con su valor de reserva.
   · Letras: las de la web. Barlow para el texto; Faustina 600 (--ct-letra-titulares) para los títulos de los
     apartados. Ningún peso que la web no cargue (Barlow 400, 600, 700; Faustina 600).
   · Sin modo oscuro: la web no lo tiene. Con impresión propia (para el PDF).
   · Se adapta al sitio donde la pongan (columna del artículo o página entera): consultas de contenedor.
   Cómo se monta y qué datos lleva: casos-clinicos/envio-de-casos/COMO-FUNCIONA.md.
   ========================================================================================================== */

.ct-ficha {
  --ctf-tinta: var(--ct-tinta, #13233b);
  --ctf-marino: var(--ct-azul, #163a63);
  --ctf-marino-osc: var(--ct-marino-oscuro, #122f52);
  --ctf-azul: var(--ct-categoria, #1d5a9e);
  --ctf-granate: var(--ct-acento, #97112a);
  --ctf-granate-suave: #f8eef0;
  --ctf-suave: var(--ct-suave, #f2f5f9);
  --ctf-suave-2: var(--ct-suave-2, #e6edf5);
  --ctf-linea: var(--ct-linea, #dbe3ec);
  --ctf-linea-f: var(--ct-linea-fuerte, #b5c7da);
  --ctf-gris: var(--ct-gris, #5f6b7a);
  --ctf-gris-az: var(--ct-gris-azulado, #44505f);
  --ctf-ok: var(--ct-acierto, #2e7d32);
  --ctf-ok-suave: var(--ct-acierto-suave, #f0f7f1);
  --ctf-mal: #a3221b;
  --ctf-mal-suave: var(--ct-error-suave, #faecee);
  --ctf-aviso-suave: var(--ct-aviso-suave, #fdf3e7);
  --ctf-r-s: var(--ct-radio-s, 4px);
  --ctf-r-m: var(--ct-radio-m, 6px);
  --ctf-r-l: var(--ct-radio-l, 12px);
  --ctf-s1: var(--ct-sombra-1, 0 1px 2px rgba(19, 35, 59, .05), 0 6px 18px rgba(19, 35, 59, .07));
  --ctf-s2: var(--ct-sombra-2, 0 2px 4px rgba(19, 35, 59, .06), 0 14px 30px rgba(19, 35, 59, .13));
  --ctf-letra: var(--ct-letra, "Barlow", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
  --ctf-titulares: var(--ct-letra-titulares, "Faustina", Georgia, "Times New Roman", serif);
  --ctf-tope: 56px;                                         /* alto de la cabecera fija de la web */
  --ctf-aro: 0 0 0 3px rgba(29, 90, 158, .35);
  container: ctficha / inline-size;
  position: relative;
  max-width: 860px;
  margin: 0 auto 32px;
  color: var(--ctf-tinta);
  font-family: var(--ctf-letra);
  font-size: 17px;
  line-height: 1.65;
  text-align: left;
  font-variant-numeric: tabular-nums;
}
.ct-ficha *,
.ct-ficha *::before,
.ct-ficha *::after { box-sizing: border-box; }
.ct-ficha p,
.ct-ficha ol,
.ct-ficha ul,
.ct-ficha figure,
.ct-ficha h2,
.ct-ficha h3,
.ct-ficha h4,
.ct-ficha blockquote { margin: 0; padding: 0; }
.ct-ficha h2,
.ct-ficha h3,
.ct-ficha h4 { color: var(--ctf-tinta); letter-spacing: 0; text-transform: none; border: 0; background: none; }
/* la web da a los h2 y h3 de los artículos margen, peso y letra con una regla más fuerte (.com-content-article
   .com-content-article__body h2): aquí se iguala su fuerza y, como esta hoja va después, manda la de la ficha */
.ct-ficha.ct-ficha h1,
.ct-ficha.ct-ficha h2,
.ct-ficha.ct-ficha h3,
.ct-ficha.ct-ficha h4,
.ct-ficha.ct-ficha figcaption { margin: 0; letter-spacing: 0; }
.ct-ficha sup { position: relative; top: -.42em; vertical-align: baseline; line-height: 0; }   /* igual dentro y fuera de la web */
.ct-ficha h2::before,
.ct-ficha h2::after,
.ct-ficha h3::before,
.ct-ficha h3::after { content: none; }
.ct-ficha a { color: var(--ctf-azul); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.ct-ficha a:hover { color: var(--ctf-marino); }
.ct-ficha img,
.ct-ficha video { max-width: 100%; height: auto; display: block; vertical-align: top; border: 0; }
.ct-ficha button { font: inherit; color: inherit; }
.ct-ficha :focus-visible { outline: none; box-shadow: var(--ctf-aro); border-radius: var(--ctf-r-s); }
.ct-ficha [hidden] { display: none !important; }
.ct-ficha .ctf-oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- piezas pequeñas ---------- */
.ct-ficha .ctf-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 2px 11px;
  border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; line-height: 1.2;
  border: 1px solid var(--ctf-linea-f); color: var(--ctf-marino); background: #fff; text-decoration: none; white-space: nowrap;
}
.ct-ficha .ctf-chip-lleno { background: var(--ctf-marino); border-color: var(--ctf-marino); color: #fff; }
.ct-ficha .ctf-chip-ref { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .02em; text-transform: none; font-weight: 600; color: var(--ctf-gris-az); }
.ct-ficha .ctf-ceja { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ctf-granate); }
.ct-ficha .ctf-boton {
  -webkit-appearance: none; appearance: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 40px; padding: 7px 14px; border-radius: var(--ctf-r-m); border: 1px solid var(--ctf-marino);
  background: var(--ctf-marino); color: #fff; font-size: 14.5px; font-weight: 600; line-height: 1.2; text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.ct-ficha .ctf-boton:hover { background: var(--ctf-azul); border-color: var(--ctf-azul); color: #fff; }
.ct-ficha .ctf-boton-sec { background: #fff; color: var(--ctf-marino); }
.ct-ficha .ctf-boton-sec:hover { background: var(--ctf-suave-2); color: var(--ctf-marino); border-color: var(--ctf-marino); }
.ct-ficha .ctf-boton-peq { min-height: 34px; padding: 5px 11px; font-size: 13.5px; }
.ct-ficha .ctf-icono { width: 16px; height: 16px; flex: none; background: currentColor; -webkit-mask: var(--ctf-i) center / contain no-repeat; mask: var(--ctf-i) center / contain no-repeat; }
.ct-ficha .ctf-i-cita,
.ctf-globo .ctf-i-cita { --ctf-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V20c0 1 0 1 1 1z'/%3E%3Cpath d='M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3c0 1 0 1 1 1z'/%3E%3C/svg%3E"); }
.ct-ficha .ctf-i-pdf { --ctf-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='7 10 12 15 17 10'/%3E%3Cline x1='12' y1='15' x2='12' y2='3'/%3E%3C/svg%3E"); }
.ct-ficha .ctf-i-enlace { --ctf-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71'/%3E%3Cpath d='M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71'/%3E%3C/svg%3E"); }
.ct-ficha .ctf-i-ampliar { --ctf-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cpolyline points='9 21 3 21 3 15'/%3E%3Cline x1='21' y1='3' x2='14' y2='10'/%3E%3Cline x1='3' y1='21' x2='10' y2='14'/%3E%3C/svg%3E"); }
.ct-ficha .ctf-i-reto { --ctf-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Ccircle cx='12' cy='12' r='6'/%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3C/svg%3E"); }
.ct-ficha .ctf-i-leer { --ctf-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z'/%3E%3Cpath d='M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z'/%3E%3C/svg%3E"); }
.ct-ficha .ctf-i-reloj { --ctf-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12 6 12 12 16 14'/%3E%3C/svg%3E"); }
.ct-ficha .ctf-i-imagen { --ctf-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpolyline points='21 15 16 10 5 21'/%3E%3C/svg%3E"); }
.ct-ficha .ctf-i-play { --ctf-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 4.5v15l12.5-7.5z' fill='black'/%3E%3C/svg%3E"); }
.ct-ficha .ctf-i-calendario { --ctf-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E"); }
.ct-ficha .ctf-i-flecha { --ctf-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3Cpolyline points='12 5 19 12 12 19'/%3E%3C/svg%3E"); }

/* ---------- cabecera ---------- */
.ct-ficha .ctf-cabecera {
  position: relative; display: grid; gap: 14px; padding: 22px 24px 20px; margin-bottom: 18px;
  border: 1px solid var(--ctf-linea); border-top: 4px solid var(--ctf-granate); border-radius: var(--ctf-r-l);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .55), #fff 72%),
    repeating-linear-gradient(0deg, rgba(151, 17, 42, .045) 0 1px, transparent 1px 12px),
    repeating-linear-gradient(90deg, rgba(151, 17, 42, .045) 0 1px, transparent 1px 12px),
    #fdfbfb;
  box-shadow: var(--ctf-s1);
  overflow: hidden;
}
.ct-ficha .ctf-cabecera::after {                               /* un latido muy tenue, a la derecha */
  content: ""; position: absolute; right: -6px; top: 18px; width: 210px; height: 54px; opacity: .16; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 210 54'%3E%3Cpath d='M0 34 H70 L78 34 L84 26 L90 34 L98 34 L104 6 L111 48 L117 34 L134 34 Q146 22 158 34 H210' fill='none' stroke='%2397112a' stroke-width='2.4' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right center / contain;
}
.ct-ficha .ctf-cab-chips { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.ct-ficha .ctf-titulo { font-family: var(--ctf-titulares); font-weight: 600; font-size: 30px; line-height: 1.18; color: var(--ctf-tinta); max-width: 26ch; }
.ct-ficha .ctf-autores { display: grid; gap: 10px; }
.ct-ficha .ctf-lista-autores { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.ct-ficha .ctf-autor { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 0 10px; align-items: center; min-width: 0; }
.ct-ficha .ctf-avatar {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; grid-row: span 2;
  font-size: 14px; font-weight: 700; letter-spacing: .02em; color: #fff; background: var(--ctf-marino); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--ctf-linea-f);
}
.ct-ficha .ctf-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ct-ficha .ctf-avatar[data-tono="1"] { background: var(--ctf-granate); }
.ct-ficha .ctf-avatar[data-tono="2"] { background: var(--ctf-azul); }
.ct-ficha .ctf-avatar[data-tono="3"] { background: #3b6e5a; }
.ct-ficha .ctf-autor-nombre { font-weight: 700; font-size: 15.5px; line-height: 1.25; color: var(--ctf-tinta); }
.ct-ficha .ctf-autor-nombre a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--ctf-linea-f); }
.ct-ficha .ctf-autor-nombre a:hover { color: var(--ctf-azul); border-color: var(--ctf-azul); }
.ct-ficha .ctf-autor-nombre sup { font-size: 11px; color: var(--ctf-granate); font-weight: 700; margin-left: 1px; }
.ct-ficha .ctf-autor-cargo { font-size: 13.5px; line-height: 1.3; color: var(--ctf-gris-az); }
.ct-ficha .ctf-centros { list-style: none; display: grid; gap: 2px; font-size: 13.5px; color: var(--ctf-gris-az); line-height: 1.4; }
.ct-ficha .ctf-centros sup { color: var(--ctf-granate); font-weight: 700; margin-right: 4px; font-size: 11px; }
.ct-ficha .ctf-datos { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13.5px; color: var(--ctf-gris-az); }
.ct-ficha .ctf-datos span { display: inline-flex; align-items: center; gap: 6px; }
.ct-ficha .ctf-datos .ctf-icono { width: 15px; height: 15px; color: var(--ctf-gris); }
.ct-ficha .ctf-acciones { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 4px; }

/* ---------- las dos maneras de leer ---------- */
.ct-ficha .ctf-modos {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0 0 18px; padding: 4px; border-radius: 12px;
  background: var(--ctf-suave-2); border: 1px solid var(--ctf-linea);
}
.ct-ficha .ctf-modo {
  -webkit-appearance: none; appearance: none; cursor: pointer; border: 0; background: transparent; border-radius: 9px;
  display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 1px 10px; align-items: center; text-align: left;
  padding: 10px 14px; color: var(--ctf-gris-az); transition: background-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.ct-ficha .ctf-modo .ctf-icono { width: 20px; height: 20px; grid-row: span 2; }
.ct-ficha .ctf-modo b { font-size: 15px; line-height: 1.25; color: inherit; font-weight: 700; }
.ct-ficha .ctf-modo small { font-size: 12.5px; line-height: 1.3; color: var(--ctf-gris); }
.ct-ficha .ctf-modo:hover { color: var(--ctf-marino); }
.ct-ficha .ctf-modo[aria-pressed="true"] { background: #fff; color: var(--ctf-marino); box-shadow: 0 1px 2px rgba(19, 35, 59, .08), 0 4px 12px rgba(19, 35, 59, .08); }
.ct-ficha .ctf-modo[data-ctf-modo="reto"][aria-pressed="true"] { color: var(--ctf-granate); }

/* ---------- galería ---------- */
.ct-ficha .ctf-galeria { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 0 18px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.ct-ficha .ctf-mini {
  -webkit-appearance: none; appearance: none; cursor: zoom-in; flex: 0 0 auto; position: relative; width: 132px; height: 92px; padding: 0;
  border: 1px solid var(--ctf-linea-f); border-radius: 10px; overflow: hidden; background: #0e0e0e; scroll-snap-align: start;
  transition: transform .18s ease, box-shadow .18s ease;
}
.ct-ficha .ctf-mini img { width: 100%; height: 100%; object-fit: cover; opacity: .94; }
.ct-ficha .ctf-mini-num {
  position: absolute; left: 6px; top: 6px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; line-height: 1.5;
  color: #fff; background: rgba(151, 17, 42, .92);
}
.ct-ficha .ctf-mini[data-tipo="video"] .ctf-mini-num { background: rgba(29, 90, 158, .94); }
.ct-ficha .ctf-mini .ctf-icono { position: absolute; right: 7px; bottom: 7px; width: 18px; height: 18px; color: #fff; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .6)); }
@media (hover: hover) and (pointer: fine) {
  .ct-ficha .ctf-mini:hover { transform: translateY(-2px); box-shadow: var(--ctf-s2); }
}

/* ---------- el caso en 30 segundos ---------- */
.ct-ficha .ctf-resumen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0 0 18px; border: 1px solid var(--ctf-linea); border-radius: var(--ctf-r-l); overflow: hidden; background: #fff; }
.ct-ficha .ctf-resumen > div { padding: 13px 16px; border-left: 1px solid var(--ctf-linea); display: grid; gap: 3px; align-content: start; }
.ct-ficha .ctf-resumen > div:first-child { border-left: 0; }
.ct-ficha .ctf-resumen b { font-size: 11.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--ctf-gris); font-weight: 700; }
.ct-ficha .ctf-resumen span { font-size: 15.5px; line-height: 1.35; font-weight: 600; color: var(--ctf-tinta); }
.ct-ficha .ctf-resumen .ctf-res-dx span { color: var(--ctf-granate); }

/* ---------- puntos clave ---------- */
.ct-ficha .ctf-puntos { margin: 0 0 22px; padding: 18px 20px 20px; border-radius: var(--ctf-r-l); background: var(--ctf-marino); color: #fff; box-shadow: var(--ctf-s1); position: relative; overflow: hidden; }
.ct-ficha .ctf-puntos::before { content: ""; position: absolute; inset: 0 0 auto auto; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .09), transparent 70%); transform: translate(40%, -40%); }
.ct-ficha .ctf-puntos h2 { font-family: var(--ctf-letra); line-height: 1.3; font-size: 12.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #cfe0f5; margin-bottom: 12px; }
.ct-ficha.ct-ficha .ctf-puntos h2 { margin: 0 0 20px; }   /* más aire entre «Puntos clave» y el primero (05/11/2026, Laura) */
.ct-ficha .ctf-puntos ol { list-style: none; display: grid; gap: 12px; counter-reset: ctfp; }
.ct-ficha .ctf-puntos li { counter-increment: ctfp; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: start; font-size: 16px; line-height: 1.5; color: #fff; }
.ct-ficha .ctf-puntos .ctf-vacio { color: #cfe0f5; }
.ct-ficha .ctf-puntos li::before {
  content: counter(ctfp); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: 14px; color: var(--ctf-marino); background: #fff; margin-top: 1px;
}

/* ---------- índice fijo y barra de lectura ---------- */
.ct-ficha .ctf-nav {
  position: sticky; top: var(--ctf-tope); z-index: 20; margin: 0 -2px 18px; padding: 8px 2px 0;
  background: rgba(255, 255, 255, .96); -webkit-backdrop-filter: saturate(1.4) blur(6px); backdrop-filter: saturate(1.4) blur(6px);
}
.ct-ficha .ctf-nav-lista { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 8px; }
.ct-ficha .ctf-nav-lista::-webkit-scrollbar { display: none; }
.ct-ficha .ctf-nav a {
  flex: none; display: inline-flex; align-items: center; min-height: 32px; padding: 4px 12px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600; line-height: 1.2; color: var(--ctf-gris-az); text-decoration: none; border: 1px solid var(--ctf-linea); background: #fff; white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.ct-ficha .ctf-nav a:hover { color: var(--ctf-marino); border-color: var(--ctf-linea-f); }
.ct-ficha .ctf-nav a[aria-current="true"] { background: var(--ctf-marino); border-color: var(--ctf-marino); color: #fff; }
.ct-ficha .ctf-nav a.ctf-nav-bloqueado { color: #9aa6b4; border-style: dashed; }
.ct-ficha .ctf-progreso { height: 3px; background: var(--ctf-linea); border-radius: 3px; overflow: hidden; }
.ct-ficha .ctf-progreso i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--ctf-granate), #c2384f); transition: width .1s linear; }

/* ---------- cronología ---------- */
.ct-ficha .ctf-cronologia { margin: 0 0 26px; padding: 16px 18px 6px; border: 1px solid var(--ctf-linea); border-radius: var(--ctf-r-l); background: #fff; }
.ct-ficha .ctf-cronologia h2 { font-family: var(--ctf-letra); line-height: 1.3; font-size: 12.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ctf-gris); margin-bottom: 12px; }
.ct-ficha .ctf-linea-tiempo { list-style: none; display: grid; gap: 0; padding: 2px 0 10px; }
.ct-ficha .ctf-hito { position: relative; display: grid; grid-template-columns: 134px minmax(0, 1fr); gap: 0 34px; padding: 0 0 12px; }
.ct-ficha .ctf-hito::before { content: ""; position: absolute; left: 150px; top: 14px; bottom: -4px; width: 2px; background: var(--ctf-linea-f); }
.ct-ficha .ctf-hito:last-child::before { display: none; }
.ct-ficha .ctf-hito::after { content: ""; position: absolute; left: 144px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--ctf-marino); }
.ct-ficha .ctf-hito-clave::after { border-color: var(--ctf-granate); background: var(--ctf-granate); box-shadow: 0 0 0 4px var(--ctf-granate-suave); }
.ct-ficha .ctf-hito b { display: block; text-align: right; font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--ctf-granate); font-weight: 700; line-height: 1.35; padding-top: 3px; }
.ct-ficha .ctf-hito span { display: block; font-size: 15px; line-height: 1.45; color: var(--ctf-tinta); }

/* ---------- apartados ---------- */
.ct-ficha .ctf-apartado { margin: 0 0 30px; scroll-margin-top: calc(var(--ctf-tope) + 64px); }
.ct-ficha .ctf-apartado-cab { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--ctf-linea); }
.ct-ficha .ctf-num { font-size: 13px; font-weight: 700; letter-spacing: .06em; color: var(--ctf-granate); min-width: 22px; }
.ct-ficha .ctf-num-raya { align-self: center; height: 3px; min-width: 18px; width: 18px; background: var(--ctf-granate); border-radius: 2px; }
.ct-ficha .ctf-apartado h2 { font-family: var(--ctf-titulares); font-weight: 600; font-size: 25px; line-height: 1.2; color: var(--ctf-tinta); }
.ct-ficha .ctf-cuerpo { display: grid; gap: 14px; }
.ct-ficha .ctf-cuerpo p { font-size: 17px; line-height: 1.68; color: var(--ctf-tinta); }
.ct-ficha .ctf-cuerpo p strong { color: var(--ctf-marino); font-weight: 700; }
.ct-ficha .ctf-filas { display: grid; gap: 0; border: 1px solid var(--ctf-linea); border-radius: var(--ctf-r-l); overflow: hidden; background: #fff; }
.ct-ficha .ctf-fila { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; padding: 13px 16px; border-top: 1px solid var(--ctf-linea); }
.ct-ficha .ctf-fila:first-child { border-top: 0; }
.ct-ficha .ctf-fila:nth-child(even) { background: #fbfcfe; }
.ct-ficha .ctf-fila-nombre { font-size: 14.5px; font-weight: 700; letter-spacing: .01em; color: var(--ctf-marino); padding-top: 2px; line-height: 1.4; }   /* tal como lo escribe el autor: en mayúsculas, «99mTc» o «NT-proBNP» dirían otra cosa */
.ct-ficha .ctf-fila p { font-size: 16px; line-height: 1.6; }
/* el juicio clínico, destacado en verde suave (05/11/2026, Laura: el granate parecía una alarma) */
.ct-ficha .ctf-sec-juicio .ctf-cuerpo > p:first-child { font-family: var(--ctf-titulares); font-weight: 600; font-size: 21px; line-height: 1.4; color: #1f4d2a; padding: 14px 18px; border-left: 4px solid #8fc49b; background: #eef7f0; border-radius: 0 var(--ctf-r-m) var(--ctf-r-m) 0; }

/* ---------- citas dentro del texto ---------- */
.ct-ficha a.ctf-cita {
  color: var(--ctf-azul); font-weight: 700; text-decoration: none; border-bottom: 1.5px dotted rgba(29, 90, 158, .55); cursor: zoom-in; white-space: nowrap;
}
.ct-ficha a.ctf-cita:hover { color: var(--ctf-marino); border-bottom-style: solid; }
.ct-ficha a.ctf-cita-mal { color: var(--ctf-mal); border-bottom: 2px wavy var(--ctf-mal); cursor: help; }
.ct-ficha sup.ctf-ref { font-size: .72em; margin-left: 1px; }
.ct-ficha sup.ctf-ref a { color: var(--ctf-azul); font-weight: 700; text-decoration: none; padding: 0 2px; border-radius: 3px; }
.ct-ficha sup.ctf-ref a:hover { background: var(--ctf-suave-2); color: var(--ctf-marino); }

/* ---------- figuras y vídeos ---------- */
.ct-ficha .ctf-figura { margin: 6px 0 4px; display: grid; gap: 0; border: 1px solid var(--ctf-linea); border-radius: var(--ctf-r-l); overflow: hidden; background: #fff; box-shadow: var(--ctf-s1); scroll-margin-top: calc(var(--ctf-tope) + 64px); }
.ct-ficha .ctf-figura-marco { position: relative; display: block; width: 100%; padding: 0; border: 0; background: #0b0b0b; cursor: zoom-in; overflow: hidden; }
.ct-ficha .ctf-figura-marco img { width: 100%; max-height: 560px; object-fit: contain; margin: 0 auto; transition: transform .35s ease; }
.ct-ficha .ctf-figura-marco video { width: 100%; max-height: 560px; background: #000; }
.ct-ficha .ctf-figura-num {
  position: absolute; left: 12px; top: 12px; z-index: 2; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; line-height: 1.5;
  color: #fff; background: rgba(151, 17, 42, .94); box-shadow: 0 1px 4px rgba(0, 0, 0, .3); pointer-events: none;
}
.ct-ficha .ctf-video .ctf-figura-num { background: rgba(29, 90, 158, .95); }
.ct-ficha .ctf-figura-zoom {
  position: absolute; right: 12px; bottom: 12px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; padding: 0; border: 0; cursor: zoom-in;
  background: rgba(255, 255, 255, .94); color: var(--ctf-marino); box-shadow: 0 1px 4px rgba(0, 0, 0, .25); opacity: 0; transition: opacity .2s ease;
}
.ct-ficha .ctf-figura-marco:hover .ctf-figura-zoom,
.ct-ficha .ctf-figura-marco:focus-visible .ctf-figura-zoom,
.ct-ficha .ctf-figura-video .ctf-figura-zoom { opacity: 1; }
.ct-ficha .ctf-figura-video .ctf-figura-zoom { top: 12px; bottom: auto; }
@media (hover: hover) and (pointer: fine) { .ct-ficha .ctf-figura-marco:hover img { transform: scale(1.012); } }
.ct-ficha .ctf-figura figcaption { padding: 12px 16px 14px; font-size: 14.5px; line-height: 1.5; color: var(--ctf-gris-az); border-top: 1px solid var(--ctf-linea); }
.ct-ficha .ctf-figura figcaption b { color: var(--ctf-tinta); font-weight: 700; }
.ct-ficha .ctf-figura figcaption .ctf-etq { color: var(--ctf-granate); font-weight: 700; margin-right: 4px; }
.ct-ficha .ctf-video figcaption .ctf-etq { color: var(--ctf-azul); }
.ct-ficha .ctf-figura-vacia { padding: 36px 16px; text-align: center; color: #cfd6df; font-size: 14px; }
.ct-ficha .ctf-sin-cita { font-size: 12.5px; color: var(--ctf-gris); font-style: italic; }

/* ---------- reto: la decisión ---------- */
.ct-ficha .ctf-decision {
  display: none; margin: 4px 0 32px; padding: 22px 22px 20px; border-radius: 16px; position: relative; overflow: hidden;
  color: #fff; background: linear-gradient(135deg, var(--ctf-granate) 0%, #6f0c1f 100%); box-shadow: var(--ctf-s2);
}
.ct-ficha .ctf-decision::after {
  content: ""; position: absolute; right: -20px; bottom: -14px; width: 260px; height: 70px; opacity: .18; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 260 70'%3E%3Cpath d='M0 44 H90 L99 44 L106 34 L113 44 L123 44 L130 8 L139 62 L146 44 L168 44 Q183 28 198 44 H260' fill='none' stroke='white' stroke-width='3' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain;
}
.ct-ficha.ctf-en-reto .ctf-decision { display: grid; gap: 12px; }
.ct-ficha .ctf-decision .ctf-ceja { color: #ffd2d9; }
.ct-ficha .ctf-decision h2 { font-family: var(--ctf-titulares); font-weight: 600; font-size: 26px; line-height: 1.2; color: #fff; }
.ct-ficha .ctf-decision > p { font-size: 16px; line-height: 1.55; color: #fbe9ec; max-width: 60ch; }
.ct-ficha .ctf-decision .ctf-boton { background: #fff; color: var(--ctf-granate); border-color: #fff; }
.ct-ficha .ctf-decision .ctf-boton:hover { background: #fde8ec; color: #6f0c1f; }
.ct-ficha .ctf-decision .ctf-pregunta { background: #fff; color: var(--ctf-tinta); margin: 4px 0 0; box-shadow: 0 8px 26px rgba(0, 0, 0, .18); }
@media screen { .ct-ficha.ctf-en-reto:not(.ctf-revelado) [data-ctf-revela] { display: none !important; } }   /* al imprimir, todo a la vista */
.ct-ficha.ctf-en-reto.ctf-revelado .ctf-decision-abrir { display: none; }
.ct-ficha .ctf-recien { animation: ctf-entra .55s ease both; }
@keyframes ctf-entra { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- pregunta para el lector ---------- */
.ct-ficha .ctf-pregunta { margin: 4px 0 30px; padding: 20px 22px; border-radius: 16px; border: 1px solid var(--ctf-linea-f); background: linear-gradient(180deg, #fff, var(--ctf-suave)); display: grid; gap: 14px; scroll-margin-top: calc(var(--ctf-tope) + 64px); }
.ct-ficha .ctf-pregunta .ctf-ceja { color: var(--ctf-marino); }
.ct-ficha .ctf-pregunta-texto { font-size: 18px; line-height: 1.5; font-weight: 600; color: var(--ctf-tinta); }
.ct-ficha .ctf-opciones { list-style: none; display: grid; gap: 8px; counter-reset: ctfo; }
.ct-ficha .ctf-opciones li { counter-increment: ctfo; }
.ct-ficha .ctf-opcion {
  -webkit-appearance: none; appearance: none; width: 100%; cursor: pointer; text-align: left; position: relative; overflow: hidden;
  display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 48px; padding: 9px 14px;
  border: 1.5px solid var(--ctf-linea-f); border-radius: 10px; background: #fff; color: var(--ctf-tinta); font-size: 15.5px; line-height: 1.4;
  transition: border-color .15s ease, background-color .15s ease;
}
.ct-ficha .ctf-opcion::before {
  content: counter(ctfo, upper-alpha); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: 13.5px; color: var(--ctf-marino); background: var(--ctf-suave-2); position: relative; z-index: 1;
}
.ct-ficha .ctf-opcion > span { position: relative; z-index: 1; }
.ct-ficha .ctf-opcion .ctf-pct { font-size: 13px; font-weight: 700; color: var(--ctf-gris-az); }
.ct-ficha .ctf-opcion .ctf-barra { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--ctf-suave-2); z-index: 0; transition: width .6s ease; }
@media (hover: hover) and (pointer: fine) { .ct-ficha .ctf-opcion:not([disabled]):hover { border-color: var(--ctf-marino); background: var(--ctf-suave); } }
.ct-ficha .ctf-opcion[disabled] { cursor: default; }
.ct-ficha .ctf-opcion.ctf-correcta { border-color: var(--ctf-ok); background: var(--ctf-ok-suave); }
.ct-ficha .ctf-opcion.ctf-correcta::before { background: var(--ctf-ok); color: #fff; content: "✓"; }
.ct-ficha .ctf-opcion.ctf-elegida-mal { border-color: var(--ctf-mal); background: var(--ctf-mal-suave); }
.ct-ficha .ctf-opcion.ctf-elegida-mal::before { background: var(--ctf-mal); color: #fff; content: "✕"; }
.ct-ficha .ctf-opcion.ctf-correcta .ctf-barra { background: rgba(46, 125, 50, .14); }
.ct-ficha .ctf-opcion.ctf-elegida-mal .ctf-barra { background: rgba(163, 34, 27, .12); }
.ct-ficha .ctf-veredicto { font-weight: 700; font-size: 16px; }
.ct-ficha .ctf-veredicto.ctf-bien { color: var(--ctf-ok); }
.ct-ficha .ctf-veredicto.ctf-mal { color: var(--ctf-mal); }
.ct-ficha .ctf-explicacion { padding: 14px 16px; border-radius: 10px; background: #fff; border: 1px solid var(--ctf-linea); font-size: 15.5px; line-height: 1.6; }
.ct-ficha .ctf-explicacion summary { cursor: pointer; font-weight: 700; color: var(--ctf-marino); }
.ct-ficha .ctf-explicacion[open] summary { margin-bottom: 8px; }
.ct-ficha .ctf-resto { font-size: 13px; color: var(--ctf-gris); }

/* ---------- bibliografía ---------- */
.ct-ficha .ctf-biblio { list-style: none; display: grid; gap: 10px; counter-reset: ctfb; }
.ct-ficha .ctf-biblio li { counter-increment: ctfb; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; font-size: 14.5px; line-height: 1.55; color: var(--ctf-tinta); padding: 10px 12px; border-radius: 10px; scroll-margin-top: calc(var(--ctf-tope) + 64px); transition: background-color .4s ease; }
.ct-ficha .ctf-biblio li::before { content: counter(ctfb); font-weight: 700; color: var(--ctf-granate); text-align: right; }
.ct-ficha .ctf-biblio li.ctf-destacada { background: var(--ctf-aviso-suave); }
.ct-ficha .ctf-biblio-enlaces { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ct-ficha .ctf-biblio-enlaces a { display: inline-flex; align-items: center; min-height: 26px; padding: 1px 10px; border-radius: 999px; border: 1px solid var(--ctf-linea-f); font-size: 12.5px; font-weight: 700; text-decoration: none; color: var(--ctf-marino); background: #fff; }
.ct-ficha .ctf-biblio-enlaces a:hover { background: var(--ctf-suave-2); }

/* ---------- para seguir aprendiendo ---------- */
.ct-ficha .ctf-seguir { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.ct-ficha .ctf-tarjeta { display: grid; gap: 6px; align-content: start; padding: 14px 16px; border-radius: var(--ctf-r-l); border: 1px solid var(--ctf-linea); background: #fff; text-decoration: none; color: var(--ctf-tinta); box-shadow: var(--ctf-s1); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.ct-ficha .ctf-tarjeta b { font-size: 11.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--ctf-granate); }
.ct-ficha .ctf-tarjeta span { font-size: 15.5px; line-height: 1.4; font-weight: 600; color: var(--ctf-marino); }
@media (hover: hover) and (pointer: fine) { .ct-ficha .ctf-tarjeta:hover { transform: translateY(-2px); box-shadow: var(--ctf-s2); border-color: var(--ctf-linea-f); color: var(--ctf-tinta); } }

/* ---------- pie del caso ---------- */
.ct-ficha .ctf-pie { display: grid; gap: 16px; margin-top: 8px; padding-top: 20px; border-top: 2px solid var(--ctf-marino); position: relative; }
.ct-ficha .ctf-pie::before { content: ""; position: absolute; left: 0; top: -2px; width: 64px; height: 4px; background: var(--ctf-granate); }
.ct-ficha .ctf-claves { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ct-ficha .ctf-claves b { font-size: 12px; letter-spacing: .09em; text-transform: uppercase; color: var(--ctf-gris); margin-right: 4px; }
.ct-ficha .ctf-claves span { font-size: 13px; padding: 2px 10px; border-radius: 999px; background: var(--ctf-suave-2); color: var(--ctf-marino); font-weight: 600; }
.ct-ficha .ctf-citar { display: grid; gap: 8px; padding: 14px 16px; border-radius: var(--ctf-r-l); background: var(--ctf-suave); border: 1px solid var(--ctf-linea); scroll-margin-top: calc(var(--ctf-tope) + 64px); }
.ct-ficha .ctf-citar b { font-size: 12px; letter-spacing: .09em; text-transform: uppercase; color: var(--ctf-gris); }
.ct-ficha .ctf-citar p { font-size: 14px; line-height: 1.55; color: var(--ctf-tinta); word-break: break-word; }
.ct-ficha .ctf-citar .ctf-boton { justify-self: start; }
.ct-ficha .ctf-historial { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--ctf-gris-az); }
.ct-ficha .ctf-declaraciones { font-size: 13px; line-height: 1.55; color: var(--ctf-gris); display: grid; gap: 4px; }
.ct-ficha .ctf-envia {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 18px; align-items: center; padding: 18px 20px; border-radius: 16px;
  background: linear-gradient(135deg, var(--ctf-marino), var(--ctf-marino-osc)); color: #fff;
}
.ct-ficha .ctf-envia b { display: block; font-size: 18px; line-height: 1.3; color: #fff; }
.ct-ficha .ctf-envia span { font-size: 14.5px; color: #dfe8f3; }
.ct-ficha .ctf-envia .ctf-boton { background: #fff; color: var(--ctf-marino); border-color: #fff; }
.ct-ficha .ctf-envia .ctf-boton:hover { background: var(--ctf-suave-2); }
.ct-ficha .ctf-aviso-muestra { padding: 10px 14px; border-radius: var(--ctf-r-m); background: var(--ctf-aviso-suave); border: 1px solid #f1d3b0; color: #7a3d06; font-size: 13.5px; }

/* ---------- vista previa dentro del formulario ---------- */
.ct-ficha.ctf-previa { font-size: 16px; }
.ct-ficha.ctf-previa .ctf-nav { position: static; }
.ct-ficha .ctf-vacio { color: var(--ctf-gris); font-style: italic; }

/* ---------- tamaños ---------- */
@container ctficha (max-width: 640px) {
  .ct-ficha .ctf-cabecera { padding: 18px 16px 16px; }
  .ct-ficha .ctf-cabecera::after { width: 150px; opacity: .1; }
  .ct-ficha .ctf-titulo { font-size: 25px; }
  .ct-ficha .ctf-resumen { grid-template-columns: minmax(0, 1fr); }
  .ct-ficha .ctf-resumen > div { border-left: 0; border-top: 1px solid var(--ctf-linea); }
  .ct-ficha .ctf-resumen > div:first-child { border-top: 0; }
  .ct-ficha .ctf-fila { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .ct-ficha .ctf-fila-nombre { padding-top: 0; }
  .ct-ficha .ctf-hito { grid-template-columns: minmax(0, 1fr); padding: 0 0 12px 26px; }
  .ct-ficha .ctf-hito::before { left: 6px; top: 16px; }
  .ct-ficha .ctf-hito::after { left: 0; top: 2px; }
  .ct-ficha .ctf-hito b { text-align: left; padding-top: 0; }
  .ct-ficha .ctf-apartado h2 { font-size: 22px; }
  .ct-ficha .ctf-sec-juicio .ctf-cuerpo > p:first-child { font-size: 19px; }
  .ct-ficha .ctf-envia { grid-template-columns: minmax(0, 1fr); }
  .ct-ficha .ctf-modo { padding: 9px 10px; grid-template-columns: 18px minmax(0, 1fr); gap: 1px 8px; }
  .ct-ficha .ctf-modo .ctf-icono { width: 17px; height: 17px; }
  .ct-ficha .ctf-modo small { display: none; }
  .ct-ficha .ctf-decision { padding: 18px 16px; }
  .ct-ficha .ctf-pregunta { padding: 16px; }
}
@container ctficha (max-width: 420px) {
  .ct-ficha { font-size: 16px; }
  .ct-ficha .ctf-cuerpo p { font-size: 16px; }
  .ct-ficha .ctf-lista-autores { gap: 10px 16px; }
  .ct-ficha .ctf-mini { width: 112px; height: 80px; }
}
@media (prefers-reduced-motion: reduce) {
  .ct-ficha *, .ctf-visor * { transition: none !important; animation: none !important; }
}

/* ==========================================================================================================
   VISOR DE FIGURAS (va colgado del <body>, fuera de la ficha)
   ========================================================================================================== */
.ctf-visor {
  --ctf-letra: var(--ct-letra, "Barlow", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
  position: fixed; inset: 0; z-index: 2147483000; display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  background: rgba(8, 12, 20, .96); color: #fff; font-family: var(--ctf-letra); font-size: 15px; line-height: 1.5;
  opacity: 0; transition: opacity .2s ease; touch-action: none;
}
.ctf-visor.ctf-abierto { opacity: 1; }
.ctf-visor *, .ctf-visor *::before, .ctf-visor *::after { box-sizing: border-box; }
.ctf-visor-barra { display: flex; align-items: center; gap: 8px; padding: 10px 14px; }
.ctf-visor-contador { font-weight: 700; font-size: 14px; color: #cfd8e3; margin-right: auto; font-variant-numeric: tabular-nums; }
.ctf-visor button {
  -webkit-appearance: none; appearance: none; cursor: pointer; display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 10px;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .08); color: #fff; font: 600 15px/1 var(--ctf-letra);
}
.ctf-visor button:hover { background: rgba(255, 255, 255, .18); }
.ctf-visor button:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(207, 224, 245, .6); }
.ctf-visor button[disabled] { opacity: .35; cursor: default; }
.ctf-visor-escena { position: relative; overflow: hidden; display: grid; place-items: center; cursor: grab; }
.ctf-visor-escena.ctf-arrastrando { cursor: grabbing; }
.ctf-visor-escena img, .ctf-visor-escena video { max-width: 100%; max-height: 100%; transform-origin: 0 0; user-select: none; -webkit-user-drag: none; will-change: transform; }
.ctf-visor-escena video { cursor: default; }
.ctf-visor-flecha { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; }
.ctf-visor-flecha.ctf-ant { left: 12px; }
.ctf-visor-flecha.ctf-sig { right: 12px; }
.ctf-visor-pie { padding: 12px 18px 16px; max-height: 32vh; overflow: auto; background: rgba(0, 0, 0, .35); border-top: 1px solid rgba(255, 255, 255, .1); }
.ctf-visor-pie b { color: #fff; }
.ctf-visor-pie .ctf-etq { color: #ffb3c0; font-weight: 700; margin-right: 6px; }
.ctf-visor-pie p { margin: 0; color: #dbe3ec; max-width: 90ch; }
.ctf-visor-ayuda { font-size: 12.5px; color: #93a1b3; margin-top: 4px; }
html.ctf-sin-scroll { overflow: hidden; }

/* ---------- globos al pasar por encima de una cita ---------- */
.ctf-globo {
  position: absolute; z-index: 2147482000; width: 300px; max-width: calc(100vw - 24px); padding: 10px; border-radius: 12px;
  background: #fff; color: var(--ct-tinta, #13233b); border: 1px solid var(--ct-linea, #dbe3ec);
  box-shadow: 0 2px 4px rgba(19, 35, 59, .08), 0 18px 40px rgba(19, 35, 59, .2);
  font: 400 14px/1.45 var(--ct-letra, "Barlow", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
  opacity: 0; transform: translateY(4px); transition: opacity .15s ease, transform .15s ease; pointer-events: none;
}
.ctf-globo.ctf-visible { opacity: 1; transform: none; pointer-events: auto; }
.ctf-globo img { display: block; width: 100%; max-height: 170px; object-fit: contain; background: #0b0b0b; border-radius: 8px; margin-bottom: 8px; }
.ctf-globo b { color: var(--ct-acento, #97112a); }
.ctf-globo .ctf-globo-ayuda { display: block; margin-top: 6px; font-size: 12px; color: var(--ct-gris, #5f6b7a); }

/* ==========================================================================================================
   IMPRESIÓN (y el PDF de cada caso, que sale de aquí)
   ========================================================================================================== */
@media print {
  .ct-ficha { max-width: none; font-size: 11pt; line-height: 1.5; }
  .ct-ficha .ctf-nav, .ct-ficha .ctf-modos, .ct-ficha .ctf-acciones, .ct-ficha .ctf-galeria, .ct-ficha .ctf-decision,
  .ct-ficha .ctf-envia, .ct-ficha .ctf-figura-zoom, .ct-ficha .ctf-citar .ctf-boton, .ctf-visor, .ctf-globo { display: none !important; }
  .ct-ficha .ctf-cabecera, .ct-ficha .ctf-puntos, .ct-ficha .ctf-figura, .ct-ficha .ctf-pregunta, .ct-ficha .ctf-cronologia { box-shadow: none; break-inside: avoid; }
  .ct-ficha .ctf-puntos { background: #fff; color: var(--ctf-tinta); border: 1.5px solid var(--ctf-marino); }
  .ct-ficha .ctf-puntos h2, .ct-ficha .ctf-puntos li { color: var(--ctf-tinta); }
  .ct-ficha .ctf-puntos li::before { background: var(--ctf-marino); color: #fff; }
  .ct-ficha .ctf-figura-marco { background: #fff; }
  .ct-ficha .ctf-figura-marco img { max-height: 9cm; }
  .ct-ficha .ctf-apartado h2 { break-after: avoid; }
  .ct-ficha a { color: inherit; text-decoration: none; }
  .ct-ficha .ctf-biblio-enlaces a { border: 0; padding: 0; }
  .ct-ficha .ctf-explicacion { display: block; }
}
