/* Trabajo de un proyecto: fases, entregables, documentos y decisiones, sobre la estética del admin (admin.css). Mismos tokens. */
:root { --soft: rgba(10, 10, 10, .035); --radio: 2px; }
@media (prefers-color-scheme: dark) { :root { --soft: rgba(242, 242, 242, .05); } }

.es { max-width: 1180px; }
.es h2 a { color: var(--fg); }
.es-cab { margin: 8px 0; }
.es-cab h1 { font-size: clamp(40px, 6vw, 88px); letter-spacing: -.035em; margin-bottom: 14px; }
.es-lectura .es-cab h1 { font-size: clamp(32px, 4.2vw, 60px); max-width: 22ch; }
.es-lead { font-size: clamp(18px, 1.7vw, 22px); line-height: 1.4; max-width: 46ch; color: var(--strong); margin-bottom: 16px; }
.es-migas { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 40px; }
.es-migas i { font-style: normal; opacity: .5; }
.es-migas span { color: var(--fg); }

/* Chips de estado: discretos */
.es-chip { display: inline-flex; align-items: center; font-size: 12px; line-height: 20px; padding: 0 8px; border: 1px solid var(--line);
  border-radius: 99px; white-space: nowrap; color: var(--strong); }
.es-chip.ok { color: var(--ok); border-color: currentColor; }
.es-chip.warn { color: var(--warn); border-color: currentColor; }
.es-chip.off { color: var(--muted); border-style: dashed; }
.es-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--muted); font-size: 13px; }

/* Resumen de la cabecera */
.es-resumen { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); border-top: 1px solid var(--strong); margin-top: 32px; }
.es-resumen > div { padding: 14px 20px 18px 0; border-bottom: 1px solid var(--line); }
.es-resumen dt { color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.es-resumen dd { font-size: 17px; line-height: 1.35; }
.es-resumen dd small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }

/* Acciones y botones */
.es-acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; margin: 24px 0 8px; }
.es-acciones > a { border-bottom: 1px solid currentColor; padding-bottom: 1px; }
.es-acciones.mini { margin: 14px 0 0; gap: 8px 18px; font-size: 14px; }
.es-btn { font: inherit; font-size: 14px; color: var(--fg); background: none; border: 1px solid var(--strong); border-radius: 99px;
  padding: 6px 14px; cursor: pointer; }
.es-btn:hover { background: var(--soft); }
.es-btn.primario { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.es-btn.primario:hover { opacity: .8; }
.es-btn.peligro { color: var(--warn); border-color: currentColor; }
.es-btn.peligro-lleno { background: var(--warn); border-color: var(--warn); color: #fff; }
.es-btn.mini { font-size: 12px; padding: 2px 10px; }
.es-btn:disabled { opacity: .4; cursor: progress; }

/* Timeline de fases */
.es-fases { list-style: none; display: grid; grid-template-columns: repeat(6, 1fr); position: relative; }
.es-fases::before { content: ''; position: absolute; left: 0; right: 0; top: 7px; border-top: 1px solid var(--line); }
.es-fases li { position: relative; }
.es-fases a { display: flex; flex-direction: column; gap: 2px; padding: 0 12px 6px 0; }
.es-punto { width: 15px; height: 15px; border-radius: 50%; border: 1px solid var(--strong); background: var(--bg); margin-bottom: 14px; position: relative; }
.es-fases .en_curso .es-punto { background: linear-gradient(90deg, var(--fg) 50%, var(--bg) 50%); border-color: var(--fg); }
.es-fases .hecha .es-punto { background: var(--fg); border-color: var(--fg); }
.es-fases .actual .es-punto { box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--fg); }
.es-fases small { font-size: 11px; color: var(--muted); letter-spacing: .06em; }
.es-fases b { font-weight: 500; font-size: clamp(15px, 1.3vw, 18px); letter-spacing: -.01em; }
.es-fases em { font-style: normal; font-size: 13px; color: var(--muted); }
.es-fases em.n { font-size: 12px; }
.es-fases .pendiente b { color: var(--strong); }
.es-fases li.on b { text-decoration: underline; text-underline-offset: 4px; }

/* Índice de entregables */
.es-grupo { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 0 32px; padding: 28px 0; border-top: 1px solid var(--line); }
.es-grupo:first-of-type { margin-top: 40px; border-top-color: var(--strong); }
.es-grupo-t { margin: 0; flex-direction: column; justify-content: flex-start; gap: 4px; }
.es-grupo .es-grid { grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr)); }
.es-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 16px; }
.es-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-top: 2px solid var(--fg); background: var(--bg);
  padding: 24px 24px 20px; min-height: 248px; transition: border-color .15s; }
.es-card:hover { border-color: var(--strong); border-top-color: var(--fg); }
.es-card-main { flex: 1; display: block; }
.es-card-main:hover { opacity: 1; }
.es-card-main:hover h3 { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.es-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.es-code { font-size: 13px; font-weight: 500; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.es-card h3 { font-size: clamp(21px, 1.8vw, 26px); font-weight: 400; letter-spacing: -.02em; line-height: 1.15; margin-bottom: 10px; }
.es-card p { color: var(--strong); font-size: 14px; line-height: 1.5; }
.es-card .es-meta { margin-top: 16px; }
.es-meta { color: var(--muted); font-size: 12px; }
.es-triada { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.es-triada > * { font-size: 14px; white-space: nowrap; }
.es-triada a { font-weight: 500; }
.es-triada a::after { content: ' →'; font-weight: 400; color: var(--muted); }
.es-triada small { color: var(--muted); font-weight: 400; }
.es-triada .no { color: var(--muted); opacity: .6; }
.es-card.futuro { border-top: 1px dashed var(--strong); border-style: dashed; background: transparent; }
.es-card.futuro h3, .es-card.futuro p { color: var(--muted); }

/* Entrada desde la ficha del proyecto */
.es-entrada { position: relative; display: block; margin: 28px 0 8px; padding: 24px 56px 24px 24px; border: 1px solid var(--strong); border-left: 3px solid var(--fg); }
.es-entrada:hover { opacity: 1; background: var(--soft); }
.es-entrada b { display: block; font-weight: 400; font-size: clamp(20px, 2vw, 26px); letter-spacing: -.015em; margin-bottom: 4px; }
.es-entrada small { color: var(--muted); font-size: 13px; }
.es-entrada i { position: absolute; right: 24px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 22px; }

/* Decisiones */
.es-decs { border-top: 1px solid var(--strong); }
.es-dec { padding: 18px 0 20px; border-bottom: 1px solid var(--line); }
.es-dec-cab { display: grid; grid-template-columns: 64px 1fr auto; gap: 4px 16px; align-items: baseline; }
.es-dec-cab b { font-weight: 400; font-size: 17px; line-height: 1.35; }
.es-decs.compacta .es-dec { padding: 12px 0; }
.es-decs.compacta .es-dec-cab b { font-size: 15px; }
.es-dec .es-meta { margin: 4px 0 0 80px; }
.es-dec > .es-prosa, .es-dec > .es-ficha, .es-dec > .es-acciones { margin-left: 80px; }
.es-dec > .es-prosa { margin-top: 12px; max-width: 70ch; }
.es-dec.rechazada .es-dec-cab b, .es-dec.sustituida .es-dec-cab b { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.es-ficha { display: grid; grid-template-columns: 130px 1fr; gap: 8px 16px; margin-top: 14px; font-size: 14px; max-width: 80ch; }
.es-ficha dt { color: var(--muted); }
.es-ficha dd p { margin: 0; }
.es-ficha dd small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.es-links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.es-links a { border-bottom: 1px solid var(--line); }

/* Entregable: los tres niveles */
.es-niveles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; }
.es-expl { font-size: 13px; }
.es-indice { margin: 12px 0 4px 18px; font-size: 14px; color: var(--muted); }
.es-indice li { padding: 2px 0; }
.es-indice li.hecho { color: var(--fg); }
.es-archivo-mini { font-size: 12px; color: var(--muted); }
.es-evs { list-style: none; width: 100%; margin: 6px 0 12px; }
.es-evs li { padding: 10px 0; border-top: 1px solid var(--line); }
.es-evs small { display: block; color: var(--muted); font-size: 12px; }
.es-futuro { margin-top: 32px; padding: 28px; border: 1px dashed var(--strong); max-width: 760px; }
.es-futuro h2 { margin-top: 0; }
.es-futuro h3 { font-size: 13px; font-weight: 500; margin: 16px 0 6px; }
.es-futuro ol { margin: 0 0 8px 20px; color: var(--strong); }
.es-futuro > p { margin: 18px 0; font-size: 14px; }

/* Listas de documentos */
.es-filas { border-top: 1px solid var(--strong); }
.es-fila { display: grid; grid-template-columns: 150px 1fr auto; gap: 4px 20px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); }
.es-fila:hover { opacity: 1; background: var(--soft); }
.es-fila-code { font-size: 12px; color: var(--muted); letter-spacing: .03em; }
.es-fila-t b { font-weight: 400; display: block; }
.es-fila-t small, .es-fila-m small { color: var(--muted); font-size: 12px; }
.es-fila-m { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }

/* Buscador */
.es-buscador { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 12px; margin: 28px 0 20px; }
.es-buscador label span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.es-buscador input, .es-buscador select, .es-campo input, .es-campo select, .es-campo textarea, .es-item input, .es-item select, .es-item textarea {
  width: 100%; font: inherit; font-size: 15px; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radio); padding: 9px 10px; }
.es-buscador input:focus, .es-buscador select:focus, .es-campo :focus, .es-item :focus { outline: 2px solid var(--fg); outline-offset: -1px; }

/* Lectura de un documento */
.es-saltos { display: inline-flex; border: 1px solid var(--line); border-radius: 99px; padding: 4px; margin-bottom: 24px; font-size: 14px; }
.es-saltos > * { padding: 5px 14px; border-radius: 99px; }
.es-saltos .on { background: var(--fg); color: var(--bg); }
.es-saltos .no { color: var(--muted); opacity: .55; }
.es-saltos small { opacity: .65; }
.es-aviso { margin: 20px 0; padding: 12px 16px; border: 1px solid var(--warn); color: var(--warn); font-size: 14px; }
.es-aviso a { border-bottom: 1px solid currentColor; }
.es-doc { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 56px; margin-top: 36px; align-items: start; }
.es-doc-lado { position: sticky; top: 80px; font-size: 14px; }
.es-doc-lado h3 { font-size: 14px; font-weight: 500; margin: 32px 0 8px; }
.es-doc-lado h3:first-child { margin-top: 0; }
.es-doc-lado .es-ficha { grid-template-columns: 90px 1fr; font-size: 13px; margin: 0; }
.es-versiones, .es-rel { list-style: none; border-top: 1px solid var(--line); }
.es-versiones li, .es-rel li { padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.es-versiones li:not(.actual) { color: var(--muted); }
.es-versiones a { word-break: break-all; border-bottom: 1px solid var(--line); align-self: flex-start; }
.es-versiones small, .es-rel small { color: var(--muted); font-size: 12px; display: block; }
.es-prosa { max-width: 68ch; font-size: 16px; line-height: 1.65; }
.es-prosa p + p, .es-prosa p + ul, .es-prosa ul + p, .es-prosa p + ol { margin-top: .8em; }
.es-prosa ul, .es-prosa ol { margin-left: 1.2em; }
.es-prosa li + li { margin-top: .3em; }
.es-nota { color: var(--strong); }
.es-brief section { padding: 28px 0 32px; border-top: 1px solid var(--line); }
.es-brief section:first-child { border-top: 1px solid var(--strong); }
.es-brief h2 { all: unset; display: flex; gap: 16px; align-items: baseline; font-size: clamp(22px, 2vw, 28px); letter-spacing: -.02em; line-height: 1.2; margin-bottom: 14px; }
.es-brief h2 span { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 18px; }
.es-pendiente { border-left: 2px solid var(--line); padding: 4px 0 4px 16px; color: var(--muted); font-size: 14px; }
.es-pendiente > span { display: block; font-size: 13px; font-style: italic; margin-bottom: 4px; }
.es-pendiente p, .es-pendiente li { font-size: 14px; }
.es-pendiente ol, .es-pendiente ul { margin-left: 1.2em; }
.es-visor { border: 1px solid var(--line); height: min(82vh, 980px); margin-bottom: 28px; background: var(--soft); }
.es-visor iframe { width: 100%; height: 100%; border: 0; display: block; }
.es-imagen { margin-bottom: 28px; }
.es-imagen img { max-width: 100%; display: block; border: 1px solid var(--line); }
.es-archivo { display: flex; align-items: center; gap: 16px; padding: 20px; border: 1px solid var(--line); margin-bottom: 8px; }
.es-archivo > b { font-size: 13px; font-weight: 500; padding: 14px 10px; border: 1px solid var(--strong); min-width: 56px; text-align: center; }
.es-archivo span { flex: 1; min-width: 0; word-break: break-word; }
.es-archivo small { display: block; color: var(--muted); font-size: 12px; }
.es-archivo a { border-bottom: 1px solid currentColor; }
.es-detalles { margin-top: 12px; }
.es-detalles summary { cursor: pointer; color: var(--muted); font-size: 14px; padding: 10px 0; border-top: 1px solid var(--line); }

/* Los entregables en marcha, grandes; las fases futuras, en una lista discreta */
.es-grid-grande { grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); }
.es-grid-grande .es-card { min-height: 296px; padding: 24px 24px 20px; }
.es-grid-grande .es-card h3 { font-size: clamp(24px, 2.2vw, 32px); }
.es-card-chips { margin-top: 16px; }
.es-card-pres { align-self: flex-start; margin-top: 10px; font-size: 13px; border-bottom: 1px solid currentColor; }
.es-futuras { border-top: 1px solid var(--strong); }
.es-futura { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto auto; gap: 4px 20px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--strong); }
.es-futura:hover { opacity: 1; background: var(--soft); }
.es-futura b { font-weight: 400; }
.es-futura small { color: var(--muted); font-size: 13px; }

/* Página HTML de un entregable (con la identidad de la web) dentro del admin */
.es-pagina { height: min(86vh, 1100px); border: 1px solid var(--line); margin-bottom: 32px; }
.es-pagina iframe { width: 100%; height: 100%; border: 0; display: block; }
.es-pres .es-slide.pagina { aspect-ratio: auto; width: 100vw; height: 100vh; border: 0; }
.es-pres .es-slide.pagina iframe { width: 100%; height: 100%; border: 0; display: block; }
.es-pres:has(.pagina) { padding: 0; }

/* ---- Fase actual: el punto late (está ligado a fase_actual) ---- */
@keyframes es-latido { 0%, 100% { box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--fg); } 50% { box-shadow: 0 0 0 4px var(--bg), 0 0 0 9px transparent; } }
@keyframes es-parpadeo { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.es-fases .actual .es-punto { animation: es-latido 1.6s ease-in-out infinite; }
.es-fases .actual .es-punto::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--fg); animation: es-parpadeo 1.6s ease-in-out infinite; }
.es-fases .actual em { color: var(--fg); }
@media (prefers-reduced-motion: reduce) {
  .es-fases .actual .es-punto, .es-fases .actual .es-punto::after { animation: none; }
}

/* ---- Portada ---- */
.es-portada { font-size: 16px; }
.es-top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 40px; }
.es-top .es-migas { margin: 0; font-size: 14px; }
.es-buscar { font-size: 15px; border-bottom: 1px solid currentColor; padding-bottom: 2px; white-space: nowrap; }
.es-portada .es-cab { margin-bottom: 40px; }
.es-portada .es-lead { margin-bottom: 0; }
.es > h2, .es-hist-in h2, .es-pie-portada h2 { font-size: clamp(22px, 2vw, 28px); font-weight: 400; letter-spacing: -.02em; text-transform: none; margin: 64px 0 24px; }
.es > h2 small { font-size: 15px; letter-spacing: 0; margin-left: 16px; }
.es-portada .es-fases b { font-size: 18px; }
.es-portada .es-fases em { font-size: 14px; }
.es-portada .es-resumen { margin-top: 40px; }
.es-portada .es-resumen dt { font-size: 14px; margin-bottom: 8px; }
.es-portada .es-resumen dd { font-size: 18px; }
.es-portada .es-resumen dd small { font-size: 14px; margin-top: 4px; }
.es-portada .es-resumen > div { padding: 16px 24px 20px 0; }

/* Por dónde empezar: la misma historia a tres profundidades */
.es-niveles-l { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 16px; }
.es-nivel-l { display: flex; flex-direction: column; gap: 12px; padding: 24px; border: 1px solid var(--strong); border-radius: 10px; }
.es-nivel-l h3 { font-size: clamp(22px, 2vw, 28px); font-weight: 400; letter-spacing: -.02em; line-height: 1.15; }
.es-nivel-l p { color: var(--strong); font-size: 16px; line-height: 1.5; flex: 1; }
.es-nivel-l .es-boton { align-self: flex-start; margin-top: 8px; }
.es-boton { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 20px; border-radius: 99px; background: var(--fg); color: var(--bg);
  font-size: 15px; font-weight: 500; border: 1px solid var(--fg); transition: opacity .15s ease-out; }
.es-boton:hover { opacity: .8; }

/* Entregables como carpetas: pestaña con el código, título, descripción y lo que hay dentro */
.es-carpetas { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 32px 16px; }
.es-carpeta { position: relative; display: flex; flex-direction: column; padding-top: 24px; color: var(--fg); }
.es-carpeta:hover { opacity: 1; }
.es-pestana { position: absolute; top: 0; left: 0; height: 25px; min-width: 72px; padding: 0 16px; display: flex; align-items: center;
  font-size: 14px; font-weight: 500; letter-spacing: .02em; font-variant-numeric: tabular-nums;
  border: 1px solid var(--strong); border-bottom: 0; border-radius: 8px 8px 0 0; background: var(--bg); }
.es-carpeta-cuerpo { flex: 1; display: flex; flex-direction: column; gap: 12px; min-height: 216px; padding: 24px;
  border: 1px solid var(--strong); border-radius: 0 10px 10px 10px; background: var(--bg); transition: border-color .15s ease-out; }
.es-carpeta:hover .es-carpeta-cuerpo, .es-carpeta:hover .es-pestana { border-color: var(--fg); }
.es-carpeta-cuerpo b { font-size: clamp(22px, 2vw, 28px); font-weight: 400; letter-spacing: -.02em; line-height: 1.15; }
.es-carpeta:hover .es-carpeta-cuerpo b { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.es-carpeta-desc { color: var(--strong); font-size: 16px; line-height: 1.5; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.es-carpeta-pie { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 15px; }
.es-carpeta-pie .es-chip { font-size: 13px; }
.es-carpeta.futuro .es-carpeta-cuerpo, .es-carpeta.futuro .es-pestana { border-style: dashed; }
.es-carpeta.futuro .es-carpeta-cuerpo b, .es-carpeta.futuro .es-carpeta-desc { color: var(--muted); }
.es-carpetas.pequenas { grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); }
.es-carpetas.pequenas .es-carpeta-cuerpo { min-height: 0; }
.es-carpetas.pequenas .es-carpeta-cuerpo b { font-size: 20px; }
.es-carpetas.pequenas .es-carpeta-desc { -webkit-line-clamp: 2; font-size: 15px; }

/* Decisiones en la portada */
.es-portada .es-dec-cab { font-size: 16px; }
.es-portada .es-code { font-size: 14px; }

/* Compartir: abajo a la izquierda */
.es-pie-portada { margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line); }
.es-pie-portada .es-btn { font-size: 15px; padding: 8px 20px; }
.es-enlace { display: flex; gap: 8px; margin-top: 16px; }
.es-enlace input { flex: 1; min-width: 0; font: inherit; font-size: 14px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); color: var(--fg); }

/* ---- Capas a pantalla entera: visor de documentos y resumen ---- */
.es-capa { position: fixed; inset: 0; z-index: 40; background: var(--bg); display: flex; flex-direction: column; }
.es-capa-barra { flex: none; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; height: 64px;
  padding: 0 16px; border-bottom: 1px solid var(--line); background: var(--bg); font-size: 15px; }
.es-volver { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px 0 12px; border: 1px solid var(--line); border-radius: 99px; font-weight: 500; }
.es-capa-barra .es-cerrar { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; font-size: 16px; }
.es-volver:hover, .es-capa-barra .es-cerrar:hover { opacity: 1; border-color: var(--fg); }
.es-capa-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; text-align: center; line-height: 1.25; }
.es-capa-t b, .es-capa-t small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.es-capa-t b { font-weight: 500; font-size: 16px; }
.es-capa-t small { color: var(--muted); font-size: 14px; }
.es-capa-acc { display: flex; align-items: center; gap: 12px 20px; }
.es-capa-acc > a:not(.es-cerrar) { border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.es-capa-acc button { font: inherit; min-height: 40px; padding: 0 20px; border-radius: 99px; cursor: pointer; background: var(--fg); color: var(--bg); border: 1px solid var(--fg); font-weight: 500; }
.es-capa-acc button:hover { opacity: .8; }
.es-capa > iframe { flex: 1; width: 100%; border: 0; display: block; background: var(--bg); }

/* Resumen */
.es-hist-scroll { flex: 1; overflow-y: auto; }
.es-hist-in { max-width: 1080px; margin: 0 auto; padding: 32px clamp(16px, 4vw, 48px) 64px; }
.es-hist-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 15px; color: var(--muted); margin-bottom: clamp(40px, 8vh, 80px); }
.es-hist-nav span { color: var(--fg); font-weight: 500; border-bottom: 1px solid var(--fg); padding-bottom: 2px; }
.es-hist h1 { font-size: clamp(36px, 5.4vw, 72px); font-weight: 400; letter-spacing: -.035em; line-height: 1.04; max-width: 18ch; margin-bottom: 24px; }
.es-hist .es-lead { max-width: 52ch; font-size: clamp(18px, 1.7vw, 22px); }
.es-hist h2 { font-size: clamp(22px, 2.2vw, 30px); font-weight: 400; letter-spacing: -.02em; margin: 64px 0 16px; }
.es-hist-puntos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 40px 32px; margin-top: 48px; }
.es-hist-puntos article { border-top: 1px solid var(--fg); padding-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.es-hist-puntos h3 { font-size: 20px; font-weight: 500; letter-spacing: -.01em; line-height: 1.25; }
.es-hist-puntos p { color: var(--strong); font-size: 16px; line-height: 1.55; flex: 1; }
.es-hist-ref { font-size: 15px; color: var(--strong); align-self: flex-start; border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.es-hist-ref:hover { color: var(--fg); opacity: 1; border-color: currentColor; }
.es-hist-pasos { list-style: none; margin-top: 48px; max-width: 760px; border-top: 1px solid var(--strong); }
.es-hist-pasos a { display: flex; flex-direction: column; gap: 6px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.es-hist-pasos a:hover { opacity: 1; }
.es-hist-pasos a:hover b { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.es-hist-pasos b { font-size: clamp(20px, 2vw, 26px); font-weight: 400; letter-spacing: -.015em; }
.es-hist-pasos small { font-size: 16px; color: var(--strong); line-height: 1.5; }
.es-hist-decs { list-style: none; margin-top: 48px; border-top: 1px solid var(--fg); }
.es-hist-decs li { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.es-hist-decs .es-code { font-size: 15px; padding-top: 2px; }
.es-hist-decs b { font-weight: 500; font-size: 18px; }
.es-hist-decs p { color: var(--strong); font-size: 16px; margin-top: 4px; }
.es-hist-no { list-style: none; border-top: 1px solid var(--line); }
.es-hist-no li { padding: 12px 0 12px 28px; position: relative; color: var(--strong); border-bottom: 1px solid var(--line); font-size: 16px; }
.es-hist-no li::before { content: "✕"; position: absolute; left: 2px; top: 13px; color: var(--muted); font-size: 13px; }
.es-hist-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 20px; }
.es-hist-pie { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 16px; }
.es-hist-pie > a:first-child { color: var(--strong); }

@media (max-width: 760px) {
  .es-top { flex-direction: column; gap: 12px; }
  .es-capa-barra { gap: 8px; padding: 0 8px; }
  .es-capa-acc > a:not(.es-cerrar) { display: none; }
  .es-volver { padding: 0 12px; }
  .es-capa-acc button { padding: 0 14px; }
}
@media print { .es-capa-barra, .es-hist-nav, .es-hist-pie, .es-pie-portada, .es-buscar { display: none !important; } .es-capa { position: static; } }
.es-checks input[type=checkbox] { width: auto; min-height: 0; padding: 0; flex: none; margin: 0; }
.es-checks { gap: 10px; padding: 12px; font-size: 15px; }
.es-checks label { align-items: center; }

/* Cómo seguir: bloque en negro, distinto de las carpetas */
.es-seguir { margin-top: 64px; padding: 32px; border-radius: 12px; background: var(--fg); color: var(--bg); }
.es-seguir h2 { margin: 0 0 32px; color: var(--bg); font-size: clamp(22px, 2vw, 28px); font-weight: 400; letter-spacing: -.02em; text-transform: none; }
.es-seguir-in { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 32px; }
.es-seguir-p { display: flex; flex-direction: column; gap: 12px; padding-top: 20px; border-top: 1px solid color-mix(in srgb, var(--bg) 35%, transparent); }
.es-seguir-p h3 { font-size: clamp(22px, 2vw, 28px); font-weight: 400; letter-spacing: -.02em; line-height: 1.15; }
.es-seguir-p p { flex: 1; font-size: 16px; line-height: 1.5; color: color-mix(in srgb, var(--bg) 78%, transparent); }
.es-boton.claro { align-self: flex-start; margin-top: 8px; background: var(--bg); color: var(--fg); border-color: var(--bg); }

/* Próximas fases: lista */
.es-proximas { list-style: none; border-top: 1px solid var(--strong); }
.es-proximas a { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 4px 20px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--line); color: var(--strong); font-size: 17px; }
.es-proximas a:hover { opacity: 1; background: var(--soft); }
.es-proximas b { font-weight: 400; }
.es-proximas small { color: var(--muted); font-size: 15px; }
.es-proximas .es-code { color: var(--muted); }
@media (max-width: 760px) { .es-seguir { padding: 24px 16px; } .es-proximas a { grid-template-columns: 44px minmax(0, 1fr); } .es-proximas small { grid-column: 2; } }

/* Cómo seguir y carpetas: respuesta al pasar el ratón, sin saltos */
.es-carpeta .es-pestana { transition: border-color .15s ease-out, transform .18s cubic-bezier(.22, 1, .36, 1); }
.es-carpeta:hover .es-pestana { transform: translateY(-2px); }
.es-boton.claro:hover { opacity: .88; }

@media (prefers-reduced-motion: reduce) {
  .es-dialogo[open], .es-dialogo[open]::backdrop, .es-sacude, .es-destello, .es-copiable { animation: none; opacity: 1; }
  .es-listo-ok circle, .es-listo-ok path, .es-btn svg { animation: none; stroke-dashoffset: 0; }
  .es-btn.cargando::before { animation-duration: 1.6s; }
  .es-carpeta:hover .es-pestana, .es-btn:active:not(:disabled), .es-boton:active { transform: none; }
}

/* Resumen: el capítulo entra por el lado de la flecha */
@keyframes es-desde-dcha { from { opacity: 0; transform: translateX(32px); } to { opacity: 1; transform: none; } }
@keyframes es-desde-izda { from { opacity: 0; transform: translateX(-32px); } to { opacity: 1; transform: none; } }
.es-hist-in.entra-sig { animation: es-desde-dcha .32s cubic-bezier(.22, 1, .36, 1); }
.es-hist-in.entra-ant { animation: es-desde-izda .32s cubic-bezier(.22, 1, .36, 1); }
@media (prefers-reduced-motion: reduce) { .es-hist-in.entra-sig, .es-hist-in.entra-ant, #es-git { animation: none; } }

/* Con una capa abierta (visor o resumen) no se ve la cabecera del admin */
body.presentando header, body.presentando footer { display: none; }
body.presentando main { padding: 0; max-width: none; }

/* Pruebas: el registro de lo que se ha probado y lo que se ha aprendido */
.es-tres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 36px; }
.es-tres h3 { font-size: 16px; font-weight: 500; margin-bottom: 12px; }
.es-hallazgos { list-style: none; border-top: 1px solid var(--strong); }
.es-hallazgos li { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.5; }
.es-hallazgos a { font-size: 13px; color: var(--muted); margin-right: 8px; }
.es-exp section { margin-bottom: 32px; }
.es-exp h2 { margin-top: 0; }
.es-dos { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
@media (max-width: 800px) { .es-tres, .es-dos { grid-template-columns: 1fr; } }
.es-pie-portada h2 { margin-top: 0; margin-bottom: 12px; }
.es-pie-portada p { font-size: 16px; max-width: 70ch; }
.es-pie-portada p + p { margin-top: 12px; }
.es-pie-portada code { font-size: 14px; color: var(--fg); }
