/* Interfaz de la plataforma editorial (paleta de la revista: navy #142A42, turquesa #009B9B, oro #E4A722). */
@font-face { font-family: "Noto Sans UI"; src: url(fonts/noto-sans-latin-400-normal.woff2) format("woff2"); font-weight: 400; }
@font-face { font-family: "Noto Sans UI"; src: url(fonts/noto-sans-latin-700-normal.woff2) format("woff2"); font-weight: 700; }
@font-face { font-family: "Noto Sans UI"; src: url(fonts/noto-sans-latin-ext-400-normal.woff2) format("woff2"); font-weight: 400; unicode-range: U+0100-024F, U+1E00-1EFF; }

:root {
  --navy: #142a42; --teal: #009b9b; --teal-osc: #007a7a; --oro: #e4a722;
  --fondo: #eef2f3; --borde: #d5dee0; --texto: #1d2a33; --suave: #5b6b74; --rojo: #b3261e;
  --sombra: 0 1px 2px rgba(20,42,66,.08), 0 6px 24px rgba(20,42,66,.08);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font-family: "Noto Sans UI", system-ui, sans-serif; font-size: 15px; color: var(--texto); background: var(--fondo); line-height: 1.45; }
a { color: var(--teal-osc); }
button, input, select, textarea { font: inherit; color: inherit; }

.ed-barra { display: flex; align-items: center; gap: 18px; padding: 8px 18px; background: var(--navy); color: #fff; }
.ed-marca { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.ed-marca img { width: 34px; height: 34px; background: #fff; border-radius: 50%; padding: 2px; }
.ed-marca span { display: flex; flex-direction: column; line-height: 1.15; }
.ed-marca small { color: #b9c9d6; font-size: 12px; }
.ed-nav { display: flex; gap: 14px; }
.ed-nav a { color: #fff; text-decoration: none; opacity: .9; }
.ed-usuario { margin-left: auto; display: flex; gap: 12px; align-items: center; font-size: 14px; }
.ed-usuario a { color: var(--oro); }

.ed-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--borde); background: #fff; border-radius: 8px;
  padding: 7px 13px; cursor: pointer; text-decoration: none; color: var(--texto); font-size: 14px; white-space: nowrap; }
.ed-btn:hover { border-color: var(--teal); }
.ed-btn:focus-visible, .ed-bb button:focus-visible, .ed-bf button:focus-visible { outline: 3px solid rgba(0,155,155,.35); outline-offset: 1px; }
.ed-btn-pri { background: var(--teal); border-color: var(--teal); color: #fff; font-weight: 700; }
.ed-btn-pri:hover { background: var(--teal-osc); }
.ed-btn-sec { padding: 5px 10px; font-size: 13px; }
.ed-btn[disabled] { opacity: .55; cursor: wait; }
.ed-ayuda { color: var(--suave); font-size: 14px; margin: 4px 0 12px; }
.ed-error { background: #fdecea; color: var(--rojo); border: 1px solid #f3c2bd; border-radius: 8px; padding: 10px 14px; }
.ed-esp { flex: 1; }

/* login */
.ed-login-caja { max-width: 420px; margin: 8vh auto; background: #fff; border-radius: 14px; padding: 28px; box-shadow: var(--sombra); }
.ed-login-caja h1 { margin: 0 0 4px; color: var(--navy); }
.ed-login-caja form, .ed-form { display: flex; flex-direction: column; gap: 12px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 700; color: var(--navy); }
label input, label select, label textarea, .ed-form > textarea { font-weight: 400; border: 1px solid var(--borde); border-radius: 8px; padding: 8px 10px; background: #fff; width: 100%; }
textarea { resize: vertical; }

/* inicio */
.ed-main { max-width: 1050px; margin: 0 auto; padding: 24px 18px 60px; }
.ed-cabeza { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.ed-cabeza h1 { margin: 0; color: var(--navy); }
.ed-vacio { background: #fff; border: 2px dashed var(--borde); border-radius: 14px; padding: 26px; text-align: center; color: var(--suave); }
.ed-lista { list-style: none; padding: 0; margin: 16px 0; display: flex; flex-direction: column; gap: 10px; }
.ed-lista a { display: block; background: #fff; border-radius: 12px; padding: 14px 18px; text-decoration: none; color: var(--texto); box-shadow: var(--sombra); border-left: 4px solid var(--teal); }
.ed-lista a:hover { border-left-color: var(--oro); }
.ed-lista-tit { display: block; font-weight: 700; color: var(--navy); }
.ed-lista-meta { display: block; font-size: 13px; color: var(--suave); margin-top: 4px; }
.ed-chip { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 99px; background: #e6f4f4; color: var(--teal-osc); font-weight: 700; margin-right: 6px; }

/* diálogos */
.ed-dlg { border: 0; border-radius: 14px; padding: 0; width: min(560px, calc(100vw - 24px)); max-height: 90vh; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.ed-dlg-ancho { width: min(880px, calc(100vw - 24px)); }
.ed-dlg::backdrop { background: rgba(20,42,66,.45); }
.ed-dlg .ed-form { padding: 22px 24px; }
.ed-dlg h2 { margin: 0; color: var(--navy); font-size: 20px; }
.ed-dlg h3 { margin: 10px 0 0; color: var(--navy); font-size: 16px; }
.ed-dlg h3 small { font-weight: 400; color: var(--suave); font-size: 13px; }
.ed-acciones { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.ed-cargando { color: var(--teal-osc); font-weight: 700; }
.ed-rejilla { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.ed-c2 { grid-column: span 2; }
.ed-autor { display: grid; grid-template-columns: 1.1fr 1.1fr 165px 1.2fr 64px auto auto; gap: 6px; align-items: end; padding: 8px; border: 1px solid var(--borde); border-radius: 10px; margin-bottom: 6px; }
.ed-autor label { font-size: 12px; }
.ed-autor .ed-check { flex-direction: row; align-items: center; gap: 4px; font-weight: 400; white-space: nowrap; }
.ed-autor .ed-check input { width: auto; }
.ed-avisos { padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.ed-avisos li { display: flex; gap: 10px; align-items: flex-start; background: #fff8e6; border: 1px solid #f2dca1; border-radius: 8px; padding: 8px 10px; font-size: 14px; }
.ed-avisos li span { flex: 1; }
.ed-versiones { padding-left: 18px; font-size: 14px; }
.ed-versiones li { margin-bottom: 8px; }
.ed-versiones span { color: var(--suave); }

/* editor */
body.ed-editor { background: #d9e1e4; }
.ed-herr { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: #fff; border-bottom: 1px solid var(--borde); flex-wrap: wrap; }
.ed-herr-tit { font-size: 13px; color: var(--suave); }
.ed-estado-guardado { font-size: 13px; color: var(--teal-osc); }
.ed-estado-guardado.guardando { color: var(--suave); }
.ed-estado-guardado.error { color: var(--rojo); font-weight: 700; }
.ed-area { display: flex; align-items: flex-start; gap: 0; }
.ed-hoja-marco { flex: 1; min-width: 0; padding: 26px 70px 80px; }
.ed-pdf { position: sticky; top: 52px; width: min(46vw, 720px); height: calc(100vh - 52px); background: #525659; display: flex; flex-direction: column; border-left: 1px solid #333; }
.ed-pdf[hidden] { display: none; }
.ed-pdf-barra { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--navy); color: #fff; font-size: 14px; }
.ed-pdf iframe { flex: 1; border: 0; width: 100%; background: #525659; }
.ed-pdf-cargando { color: #fff; padding: 16px; margin: 0; }
.ed-pdf-cargando[hidden] { display: none; }

/* bloques editables */
.ed-editor .ha-art .blq { position: relative; border-radius: 3px; outline: 1px solid transparent; outline-offset: 3px; transition: outline-color .12s, background-color .12s; cursor: text; }
.ed-editor .ha-art .blq:hover { outline-color: rgba(0,155,155,.35); }
.ed-editor .ha-art .blq.activo { outline: 2px solid var(--teal); background: rgba(0,155,155,.04); }
.ed-editor .ha-art .blq.guardando { outline-color: var(--oro); }
.ed-editor .ha-art .blq.error { outline: 2px solid var(--rojo); }
.ed-editor .ha-art [contenteditable="true"] { outline: none; caret-color: var(--teal-osc); }
.ed-editor .ha-art [contenteditable="true"]:empty::before { content: "Escriba aquí…"; color: #9aa; }
.ed-editor .ha-p:empty::before, .ed-editor .ha-ref:empty::before { content: "(párrafo vacío)"; color: #b55; }
.ed-editor .ha-leyenda-tx:empty::before { content: "Título de la tabla o figura (falta)"; color: #b55; font-style: italic; }
.ed-editor .ha-nota:empty { display: block; min-height: 0; }
.ed-editor .blq.activo .ha-nota:empty::before { content: "Nota (opcional)…"; color: #9aa; font-size: 7.5pt; }
.ed-editor .ha-tabla.ancho-pagina::after, .ed-editor .ha-figura.ancho-pagina::after { content: "ocupa las dos columnas en el PDF"; position: absolute; top: -14px; right: 0; font: 11px "Noto Sans UI", sans-serif; color: var(--teal-osc); }
.ed-editor .ha-cab { cursor: pointer; }
.ed-editor .ha-cab:hover { outline: 2px dashed rgba(0,155,155,.5); outline-offset: 4px; }
.ed-editor .ha-cab:hover::after { content: "Clic para editar los datos del artículo"; position: absolute; right: 0; top: 130px; background: var(--navy); color: #fff; font: 12px "Noto Sans UI", sans-serif; padding: 4px 8px; border-radius: 6px; }
.ed-editor .ha-tabla td:focus, .ed-editor .ha-tabla th:focus { background: rgba(0,155,155,.10); }
.ed-editor .ha-tabla-marco { overflow-x: auto; }
.ed-editor .ha-decls:empty::before { content: "Declaraciones: use «＋» en un bloque para añadirlas."; color: #9aa; font-size: 12px; }

.ed-bb { position: absolute; z-index: 25; display: flex; gap: 2px; padding: 3px; background: var(--navy); border-radius: 9px; box-shadow: var(--sombra); }
.ed-bb[hidden], .ed-bf[hidden], .ed-menu[hidden] { display: none; }
.ed-bb.lateral { flex-wrap: wrap; }
.ed-bb.lateral select { flex: 1 1 100%; }
.ed-bb button, .ed-bf button { border: 0; background: transparent; color: #fff; border-radius: 6px; padding: 4px 8px; cursor: pointer; font-size: 13px; }
.ed-bb button:hover, .ed-bf button:hover { background: rgba(255,255,255,.15); }
.ed-bb button[hidden] { display: none; }
.ed-bb select { border: 0; border-radius: 6px; padding: 3px 6px; font-size: 13px; }
.ed-bf { position: absolute; z-index: 26; display: flex; gap: 1px; padding: 3px; background: #1d2a33; border-radius: 8px; box-shadow: var(--sombra); }
.ed-menu { position: absolute; z-index: 27; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--borde); border-radius: 10px; padding: 6px; box-shadow: var(--sombra); min-width: 190px; }
.ed-menu button { text-align: left; border: 0; background: transparent; padding: 7px 10px; border-radius: 6px; cursor: pointer; }
.ed-menu button:hover { background: #e6f4f4; }
.ed-menu hr { border: 0; border-top: 1px solid var(--borde); margin: 4px 0; width: 100%; }

@media (max-width: 1100px) {
  .ed-hoja-marco { padding: 16px 10px 60px; }
  .ed-pdf { position: fixed; inset: 52px 0 0 auto; width: 100vw; z-index: 40; }
}
@media (max-width: 640px) {
  .ed-rejilla { grid-template-columns: 1fr; }
  .ed-c2 { grid-column: auto; }
  .ed-autor { grid-template-columns: 1fr 1fr; }
  body.pantalla .ha-art { padding: 0 14px 30px; }
  body.pantalla .ha-banner { width: calc(100% + 28px); margin-left: -14px; margin-bottom: -40px; }
  .ha-etiqueta { position: static; display: inline-block; margin-top: 6px; }
  .ha-titulo-en { padding-right: 0; }
}
.ed-editor .ha-tabla td:empty, .ed-editor .ha-tabla th:empty { height: 1.5em; }   /* filas vacías: mismo alto activas o no (el clic no cae en otra fila) */
.ed-editor .ha-leyenda-tx:empty { display: inline-block; min-height: 1.2em; }

/* panel de revisión */
.ed-ok { background: #e8f6ef; color: #145c38; border: 1px solid #b9e2cb; border-radius: 8px; padding: 10px 14px; }
.ed-nota { background: #fff8e6; border: 1px solid #f2dca1; border-radius: 8px; padding: 8px 12px; font-size: 14px; }
.ed-caja { background: #fff; border-radius: 12px; padding: 16px 20px; box-shadow: var(--sombra); margin: 16px 0; }
.ed-caja h2 { margin: 0 0 8px; color: var(--navy); font-size: 19px; }
.ed-caja h2 small { font-weight: 400; color: var(--suave); font-size: 14px; }
.ed-caja h3 { color: var(--navy); margin: 18px 0 8px; }
.ed-tabla { width: 100%; border-collapse: collapse; font-size: 14px; }
.ed-tabla th { text-align: left; color: var(--suave); font-weight: 700; border-bottom: 2px solid var(--borde); padding: 6px; }
.ed-tabla td { border-bottom: 1px solid var(--borde); padding: 8px 6px; vertical-align: top; }
.ed-tabla .ed-acc { display: flex; gap: 6px; flex-wrap: wrap; }
.ed-tenue { opacity: .5; }
.ed-chip-invitado { background: #eef1f5; color: #4a5866; }
.ed-chip-aceptado { background: #e6f4f4; color: var(--teal-osc); }
.ed-chip-enviado { background: #e8f6ef; color: #145c38; }
.ed-chip-rechazado, .ed-chip-cancelado { background: #fdecea; color: var(--rojo); }
.ed-asignar { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 10px; align-items: end; margin-top: 14px; }
.ed-fila-autor { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 6px 0; }
.ed-correo { white-space: pre-wrap; background: #f6f8f9; border: 1px solid var(--borde); border-radius: 8px; padding: 10px; font: 13px/1.45 "Noto Sans UI", sans-serif; }
.ed-correos { list-style: none; padding: 0; }
.ed-correos li { margin: 6px 0; font-size: 14px; }
.ed-copiable { font-family: monospace; font-size: 13px; }
.ed-copiable.copiado { outline: 2px solid #3cb371; }
@media (max-width: 760px) { .ed-asignar { grid-template-columns: 1fr; } }

/* espacio de revisión */
body.ed-espacio { background: #d9e1e4; }
.es-area { display: grid; grid-template-columns: minmax(0, 1fr) clamp(290px, 34vw, 410px); align-items: start; }
.es-hoja { padding: 24px 22px 80px; min-width: 0; overflow-x: auto; }
.es-lateral { position: sticky; top: 52px; height: calc(100vh - 52px); overflow: auto; background: #fff; border-left: 1px solid var(--borde); display: flex; flex-direction: column; }
.es-pestanas { display: flex; border-bottom: 1px solid var(--borde); position: sticky; top: 0; background: #fff; z-index: 2; }
.es-pestanas button { flex: 1; border: 0; background: none; padding: 11px 8px; cursor: pointer; font-weight: 700; color: var(--suave); border-bottom: 3px solid transparent; }
.es-pestanas button.activa { color: var(--navy); border-bottom-color: var(--teal); }
.es-panel { padding: 12px 14px 40px; }
.es-ayuda { color: var(--suave); font-size: 13px; margin: 4px 0 10px; }
.es-enlace { border: 0; background: none; color: var(--teal-osc); text-decoration: underline; cursor: pointer; padding: 0; font: inherit; }
.es-vivo { font-size: 12px; color: #2e9b5f; }
.es-vivo.caido { color: var(--rojo); }
.es-vivo.caido::after { content: " (sin conexión)"; }
.es-compositor { background: #f2fafa; border: 1px solid #bfe3e3; border-radius: 10px; padding: 10px; margin-bottom: 12px; }
.es-compositor blockquote, .es-hilo blockquote { margin: 0 0 6px; padding: 4px 8px; border-left: 3px solid var(--oro); background: #fffaf0; font-size: 13px; font-style: italic; color: #4a3b12; max-height: 6.5em; overflow: hidden; }
.es-compositor textarea, .es-responder textarea, .es-edicion { width: 100%; border: 1px solid var(--borde); border-radius: 8px; padding: 7px 9px; font-size: 14px; }
.es-nuevos { background: #fff8e6; border: 1px solid #f2dca1; border-radius: 8px; padding: 6px 10px; font-size: 13px; }
.es-hilos { display: flex; flex-direction: column; gap: 10px; }
.es-hilo { border: 1px solid var(--borde); border-radius: 10px; padding: 9px 10px; cursor: pointer; background: #fff; }
.es-hilo.activo { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(0,155,155,.2); }
.es-hilo.resuelto { opacity: .7; }
.es-hilo.oculto { background: repeating-linear-gradient(135deg, #fff, #fff 8px, #fbf3f2 8px, #fbf3f2 16px); }
.es-com { font-size: 14px; }
.es-com.respuesta { margin: 8px 0 0 12px; padding-left: 9px; border-left: 2px solid var(--borde); }
.es-com-cab { font-size: 12px; color: var(--suave); margin-bottom: 3px; }
.es-com-cab b { color: var(--navy); }
.es-com.t-revisor.r1 .es-com-cab b { color: #8a5a00; }
.es-com.t-revisor.r2 .es-com-cab b { color: #6b3fa0; }
.es-com.t-revisor.r3 .es-com-cab b { color: #1f6fb2; }
.es-com.t-revisor.r4 .es-com-cab b { color: #a03a3a; }
.es-tx { margin: 0 0 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.es-etq { background: #fdecea; color: var(--rojo); border-radius: 99px; padding: 0 6px; font-size: 11px; }
.es-etq.ok { background: #e8f6ef; color: #145c38; }
.es-acc { display: flex; gap: 4px; flex-wrap: wrap; }
.es-mini { border: 1px solid var(--borde); background: #fff; border-radius: 6px; padding: 2px 8px; font-size: 12px; cursor: pointer; }
.es-mini:hover { border-color: var(--teal); }
.es-mini.pri { background: var(--teal); color: #fff; border-color: var(--teal); }
.es-responder { display: flex; gap: 6px; align-items: flex-end; margin-top: 8px; }
.es-flotante { position: absolute; z-index: 30; border: 0; background: var(--navy); color: #fff; border-radius: 99px; padding: 7px 14px; font-weight: 700; cursor: pointer; box-shadow: var(--sombra); }
.es-flotante[hidden] { display: none; }
mark.es-marca { background: rgba(229,168,35,.28); color: inherit; border-bottom: 2px solid #e5a823; cursor: pointer; padding: 0; }
mark.es-marca.r2 { background: rgba(107,63,160,.16); border-bottom-color: #6b3fa0; }
mark.es-marca.r3 { background: rgba(31,111,178,.16); border-bottom-color: #1f6fb2; }
mark.es-marca.r4 { background: rgba(160,58,58,.16); border-bottom-color: #a03a3a; }
mark.es-marca.t-editor { background: rgba(0,155,155,.18); border-bottom-color: var(--teal); }
mark.es-marca.resuelto { background: transparent; border-bottom-style: dotted; }
mark.es-marca.activa { outline: 2px solid var(--teal); }
.es-informe fieldset { border: 1px solid var(--borde); border-radius: 8px; padding: 6px 10px; margin: 0; }
.es-informe legend { font-weight: 700; font-size: 13px; color: var(--navy); padding: 0 4px; }
.es-informe fieldset label { display: inline-flex; flex-direction: row; gap: 4px; margin-right: 12px; font-weight: 400; color: var(--texto); }
.es-informe h3 { margin: 4px 0; color: var(--navy); }
.es-guardado { font-size: 12px; color: var(--suave); margin-right: auto; align-self: center; }
.es-informe-ver { border-bottom: 1px solid var(--borde); padding-bottom: 12px; margin-bottom: 12px; font-size: 14px; }
.es-informe-ver h3 { margin: 0; color: var(--navy); }
.es-crit-ver { padding-left: 18px; }
.es-pre { background: #f6f8f9; border-radius: 8px; padding: 8px 10px; }
.es-conf { background: #fff4f3; }
.es-alerta { color: var(--rojo); }
.es-invitacion .es-check { flex-direction: row; gap: 8px; align-items: flex-start; font-weight: 400; color: var(--texto); }
.es-invitacion .es-check input { width: auto; margin-top: 4px; }
@media (max-width: 820px) {
  .es-area { grid-template-columns: 1fr; }
  .es-lateral { position: static; height: auto; border-left: 0; border-top: 1px solid var(--borde); }
  .es-hoja { padding: 12px 8px 30px; }
}
label input[type="radio"], label input[type="checkbox"] { width: auto; padding: 0; border: 0; margin: 0; accent-color: var(--teal); }
.es-informe fieldset label { white-space: nowrap; align-items: center; }

/* comparación de versiones */
.cmp-form { display: flex; gap: 6px; align-items: center; font-size: 14px; flex-wrap: wrap; }
.cmp-form select { max-width: 220px; border: 1px solid var(--borde); border-radius: 6px; padding: 3px 6px; }
.cmp-leyenda ins, .cmp-hoja ins, .cmp-resumen ins { background: #d9f3e3; color: #0d5b2e; text-decoration: none; border-bottom: 1px solid #3cb371; }
.cmp-leyenda del, .cmp-hoja del, .cmp-resumen del { background: #fde3e1; color: #9b1c14; text-decoration: line-through; }
.cmp-area { display: grid; grid-template-columns: 300px minmax(0, 1fr); align-items: start; }
.cmp-resumen { position: sticky; top: 52px; padding: 16px; background: #fff; border-right: 1px solid var(--borde); height: calc(100vh - 52px); overflow: auto; font-size: 14px; }
.cmp-resumen h2 { margin: 0 0 6px; color: var(--navy); font-size: 18px; }
.cmp-hoja { padding: 24px 22px 80px; min-width: 0; }
.cmp-hoja [data-cambio="nuevo"] { background: #effaf3; box-shadow: -6px 0 0 #3cb371; }
.cmp-hoja [data-cambio="borrado"] { background: #fff3f2; box-shadow: -6px 0 0 #d9534f; opacity: .85; }
.cmp-hoja [data-cambio="editado"] { box-shadow: -6px 0 0 #e5a823; }
.cmp-actual { outline: 3px solid var(--teal); outline-offset: 2px; }
@media (max-width: 820px) { .cmp-area { grid-template-columns: 1fr; } .cmp-resumen { position: static; height: auto; } }

.ed-check-linea { flex-direction: row !important; align-items: center; gap: 8px; font-weight: 400 !important; color: var(--texto) !important; }
.ed-decisiones { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 6px 14px; padding: 8px 10px; border: 1px solid var(--borde); border-radius: 10px; }

.es-decision { border: 1px solid #f2dca1; background: #fffaf0; border-radius: 10px; padding: 8px 10px; margin-bottom: 12px; font-size: 14px; }
.es-decision summary { cursor: pointer; }
.ed-corregir { margin: 6px 0 0 4px; }

/* publicar */
.pub-ver { list-style: none; padding: 0; margin: 6px 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.pub-error { color: var(--rojo); }
.pub-aviso { color: #8a5a00; }
.pub-form { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; align-items: end; }
.pub-form .ed-acciones, .pub-form .ed-cargando { grid-column: 1 / -1; }
@media (max-width: 760px) { .pub-form { grid-template-columns: 1fr; } }

/* sugerencias de título */
.ed-btn-magia { border-color: #e4c26b; background: linear-gradient(135deg, #fffaf0, #fff3d6); color: #6b4a00; font-weight: 700; }
.ed-sugerencias { width: 400px; max-width: calc(100vw - 16px); gap: 4px; }
.ed-sugerencias .sug-tit { margin: 2px 4px 6px; font-weight: 700; color: var(--navy); font-size: 14px; }
.ed-sugerencias .sug-op { display: flex; flex-direction: column; gap: 2px; text-align: left; border: 1px solid var(--borde) !important; border-radius: 8px; padding: 8px 10px !important; cursor: pointer; background: #fff; }
.ed-sugerencias .sug-op:hover { border-color: var(--teal) !important; background: #f2fafa; }
.ed-sugerencias .sug-op span { font-style: italic; color: var(--texto); }
.ed-sugerencias .sug-op small, .faltan-op small { color: var(--suave); font-size: 12px; }
.faltan-lista { display: flex; flex-direction: column; gap: 12px; }
.faltan-item { border: 1px solid var(--borde); border-radius: 12px; padding: 12px; background: #fff; transition: background .3s, border-color .3s; }
.faltan-item.faltan-hecho { background: #f1faf5; border-color: #b9e2cb; }
.faltan-cab { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.faltan-cab b { color: var(--navy); white-space: nowrap; }
.faltan-cab img { max-height: 60px; max-width: 120px; border: 1px solid var(--borde); border-radius: 4px; }
.faltan-vista { flex: 1; font-size: 12px; color: var(--suave); background: #f6f8f9; border-radius: 6px; padding: 4px 8px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.faltan-ops { display: flex; flex-direction: column; gap: 4px; }
.faltan-op { flex-direction: row !important; align-items: baseline; gap: 8px; font-weight: 400 !important; color: var(--texto) !important; cursor: pointer; flex-wrap: wrap; }
.faltan-op span { font-style: italic; }
.faltan-fila { display: flex; gap: 8px; margin-top: 8px; }
.faltan-campo { flex: 1; border: 1px solid var(--borde); border-radius: 8px; padding: 7px 10px; font-style: italic; }
.am-destello { animation: am-destello 1.8s ease-out; }
@keyframes am-destello { 0%, 40% { box-shadow: 0 0 0 4px rgba(228,167,34,.7); } 100% { box-shadow: 0 0 0 0 rgba(228,167,34,0); } }

/* ---------------------------------------------------------------- fase 5: el autor escribe en la plantilla */
.ed-trampa { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.ed-campo-error { color: var(--rojo); font-weight: 400; font-size: 12.5px; }
.ed-registro .am-login { max-width: 1040px; }
.ed-privacidad { font-size: 12px; max-height: 90px; overflow: auto; background: #f6f8f9; border-radius: 8px; padding: 8px 10px; margin: -4px 0 0; }
.am-registro-cta { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; background: #fff8e6; border: 1px solid #f1d9a0; border-radius: 10px; padding: 10px 12px; font-size: 14px; color: var(--navy); font-weight: 700; }
.es-autor .solo-editor { display: none !important; }
.contador { font-weight: 400; color: var(--suave); font-size: 12px; }
.contador.pasado { color: var(--rojo); font-weight: 700; }

/* guías de la plantilla dentro de los párrafos vacíos y títulos fijos */
.ed-editor .ha-p[data-guia]:empty::before, .ed-editor .ha-p[data-guia][contenteditable="true"]:empty::before,
.ed-editor .ha-decl-tx[data-guia]:empty::before, .ed-editor .ha-decl-tx[data-guia][contenteditable="true"]:empty::before {
  content: attr(data-guia); color: #8a9aa3; font-style: italic; }
.ed-editor .ha-h1[data-fijo] { cursor: default; }
.ed-editor .ha-h1[data-fijo]:hover::after { content: "Sección de la plantilla · use ＋ para añadir contenido"; position: absolute; right: 0; top: -16px; font: 11px "Noto Sans UI", sans-serif; color: var(--teal-osc); font-weight: 400; }
.ed-editor .ha-decl[data-fijo] .ha-decl-et { cursor: default; }
.ed-editor .ha-falta { color: #8a9aa3; font-style: italic; font-weight: 400; }
.ed-editor .ha-refs-vacio { color: #8a9aa3; font-style: italic; font-size: 12px; }
.ed-editor .blq.recien { animation: ed-recien 2.4s ease-out; }
@keyframes ed-recien { 0%, 30% { background: rgba(228,167,34,.28); } 100% { background: transparent; } }

.ed-bienvenida-plantilla, .ed-aviso-editor { margin: 14px auto 0; max-width: 860px; background: #fff; border-radius: 14px; box-shadow: var(--sombra); padding: 14px 18px; border-left: 5px solid var(--oro); }
.ed-bienvenida-plantilla b, .ed-aviso-editor b { color: var(--navy); }
.ed-bienvenida-plantilla ol { margin: 8px 0 10px 18px; padding: 0; line-height: 1.5; font-size: 14px; }
.ed-aviso-editor { border-left-color: var(--teal); }
.ed-aviso-editor p { margin: 6px 0 0; }

/* asistente de formato */
.ed-btn-asist { position: relative; }
.asist-cuenta { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 99px; font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; background: #e6ecef; color: var(--suave); }
.asist-cuenta.hay-errores { background: var(--rojo); color: #fff; }
.asist-cuenta.hay-avisos, .asist-cuenta.todo-bien { background: var(--teal); color: #fff; }
.ed-asist { position: sticky; top: 52px; width: min(30vw, 380px); height: calc(100vh - 52px); overflow-y: auto; background: #fff; border-left: 1px solid var(--borde); display: flex; flex-direction: column; }
.ed-asist[hidden] { display: none; }
.ed-asist > .ed-ayuda { padding: 8px 14px 0; margin: 0; }
#asist-lista { padding: 4px 14px 30px; }
#asist-lista h3 { font-size: 14px; color: var(--navy); margin: 14px 0 4px; display: flex; align-items: center; gap: 6px; }
.asist-n { background: var(--rojo); color: #fff; border-radius: 99px; font-size: 11px; padding: 0 6px; line-height: 18px; }
#asist-lista ul { list-style: none; margin: 0; padding: 0; }
#asist-lista li { position: relative; padding: 5px 6px 5px 22px; font-size: 13px; line-height: 1.35; border-radius: 6px; }
#asist-lista li::before, .asist-leyenda i { content: ""; position: absolute; left: 6px; top: 10px; width: 9px; height: 9px; border-radius: 50%; }
.asist-leyenda i { position: relative; display: inline-block; left: 0; top: 0; margin: 0 2px 0 8px; }
.n-error::before, .asist-leyenda .n-error { background: var(--rojo); }
.n-aviso::before, .asist-leyenda .n-aviso { background: var(--oro); }
.n-ok::before, .asist-leyenda .n-ok { background: var(--teal); }
#asist-lista li.n-ok { color: var(--suave); }
#asist-lista li.con-destino { cursor: pointer; }
#asist-lista li.con-destino:hover, #asist-lista li.con-destino:focus { background: #eef6f6; outline: none; }
.asist-listo { background: #e6f4f4; color: var(--teal-osc); font-weight: 700; border-radius: 10px; padding: 10px 12px; margin: 10px 0 0; }
@media (max-width: 1100px) { .ed-asist { position: fixed; inset: 52px 0 0 auto; width: min(100vw, 420px); z-index: 41; box-shadow: var(--sombra); } }

/* inicio del autor */
.au-acciones { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 18px; }
.au-tipos { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin: 14px 0; }
.au-tipo { display: flex; flex-direction: column; gap: 6px; text-align: left; background: #fff; border: 2px solid transparent; border-radius: 14px; padding: 16px; box-shadow: var(--sombra); cursor: pointer; font: inherit; color: var(--texto); transition: border-color .15s, transform .15s; }
.au-tipo:hover, .au-tipo:focus { border-color: var(--teal); transform: translateY(-2px); outline: none; }
.au-tipo b { color: var(--navy); font-size: 17px; }
.au-tipo small { color: var(--suave); }
.au-tipo .au-secciones { font-size: 12.5px; color: var(--teal-osc); }
.ed-lista .au-estado { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 9px; border-radius: 99px; background: #fff3d6; color: #8a5a00; margin-left: 6px; }
.ed-lista .au-estado.recibido, .ed-lista .au-estado.revision { background: #e6f4f4; color: var(--teal-osc); }
.ed-lista .au-estado.rechazado { background: #fde8e8; color: var(--rojo); }
.ed-lista li { position: relative; }
.ed-lista .au-borrar { position: absolute; right: 12px; top: 12px; }
.ed-tarjeta { background: #fff; border-radius: 14px; box-shadow: var(--sombra); padding: 16px 20px; margin: 0 0 16px; }
.ed-tarjeta h2 { margin: 0 0 6px; color: var(--navy); font-size: 18px; }
.ed-enviar { max-width: 860px; }
.ed-enviar-tit { font-size: 20px !important; }
.ed-aviso { background: #fff8e6; border: 1px solid #f1d9a0; border-radius: 10px; padding: 10px 14px; }
.ed-enviar .ed-error ul { margin: 6px 0 10px 18px; padding: 0; font-weight: 400; }
.ed-lista-sin-enlace { display: block; background: #fff; border-radius: 12px; padding: 14px 18px; box-shadow: var(--sombra); border-left: 4px solid var(--oro); }
.ed-decisiones { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; align-items: start; }
.ed-decisiones h3 { margin: 0; color: var(--navy); }
.ed-evaluar { max-width: 1000px; }
.ed-msg { border-left: 3px solid var(--teal); padding: 4px 10px; margin: 8px 0; }
.ed-msg-autor { border-left-color: var(--oro); }
.ed-msg small { color: var(--suave); }
.ed-msg p { margin: 4px 0 0; }
.ed-avisos-lista { list-style: none; padding: 0; margin: 8px 0 0; }
.ed-avisos-lista li { position: relative; padding: 3px 0 3px 18px; font-size: 13.5px; }
.ed-avisos-lista li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 9px; height: 9px; border-radius: 50%; }
.ed-error-txt { color: var(--rojo); }
.ed-nuevos h2 { display: flex; align-items: center; gap: 8px; margin-top: 0; color: var(--navy); }
.ed-chip-recibido { background: #fff3d6; color: #8a5a00; }
.ed-chip-ajustes { background: #f0e8ff; color: #5b3a9e; }
.ed-btn-peligro { background: #fff; border-color: var(--rojo); color: var(--rojo); font-weight: 700; }
.ed-btn-peligro:hover { background: var(--rojo); color: #fff; }
.ed-lista a.ed-btn.ed-corregir { display: inline-flex; width: auto; margin: 8px 0 4px 18px; padding: 7px 16px; border: 1px solid var(--teal); border-radius: 8px; box-shadow: none; background: var(--teal); color: #fff; font-weight: 700; }
.ed-lista a.ed-btn.ed-corregir:hover { background: var(--teal-osc); }
