/* =========================================================
   Curso Básico de Excel · 2da edición · Franja Morada UNRC
   Estética: flyers (morado + verde Excel + celeste) + interfaz de Excel para la web
   ========================================================= */
:root {
  --morado: #5e1442;
  --morado-2: #4a0f34;
  --morado-3: #741a52;
  --verde: #1e7b45;
  --verde-2: #185c34;
  --verde-claro: #e8f3ec;
  --celeste: #3aa8f0;
  --celeste-2: #1f8ad2;
  --blanco: #ffffff;
  --tinta: #1f1f1f;
  --gris: #605e5c;
  --linea: #d6d6d6;
  --grid-head: #f3f2f1;
  --amarillo: #fff4ce;
  --ok: #107c10;
  --error: #c42b1c;
  --radio: 10px;
  --sombra: 0 10px 30px rgba(0, 0, 0, .25);
  --fuente-titulo: "Poppins", "Segoe UI", system-ui, sans-serif;
  --fuente: "Segoe UI", "Poppins", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Code", Consolas, "Courier New", monospace;
  --dock-ancho: 380px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--fuente);
  color: var(--blanco);
  background: var(--morado);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--celeste); }
img, svg { max-width: 100%; }
code, kbd, .mono { font-family: var(--mono); }

/* ---------- Elementos de marca (flyer) ---------- */
.franja {
  background: var(--verde);
  color: #fff;
  font-family: var(--fuente-titulo);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.etiqueta {
  display: inline-block;
  background: var(--celeste);
  color: var(--morado);
  font-family: var(--fuente-titulo);
  font-weight: 500;
  padding: .1em .55em;
  transform: rotate(-2deg);
  box-shadow: 0 3px 0 rgba(0, 0, 0, .15);
}
.etiqueta.recta { transform: none; }
.fecha-clase {
  display: inline-block;
  background: var(--celeste);
  color: var(--morado);
  font-family: var(--fuente-titulo);
  font-weight: 800;
  padding: .15em .5em;
  letter-spacing: -.5px;
}
.resalta { color: var(--celeste); }
.marca-pie {
  text-align: center;
  padding: 2.5rem 1rem 6rem;
  font-family: var(--fuente-titulo);
}
.marca-pie strong { display: block; font-size: 1.9rem; font-weight: 800; letter-spacing: 1px; line-height: 1; }
.marca-pie span { font-size: .95rem; font-weight: 500; opacity: .9; }

.icono-excel { display: inline-block; flex: none; }

/* ---------- Barra superior estilo Excel para la web ---------- */
.barra-app {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--verde);
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .45rem 1rem;
  min-height: 48px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .2);
}
.barra-app .waffle { width: 22px; height: 22px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; opacity: .9; }
.barra-app .waffle i { background: #fff; border-radius: 1px; }
.barra-app .nombre-libro { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barra-app .nombre-libro small { font-weight: 400; opacity: .85; margin-left: .4rem; }
.barra-app .espacio { flex: 1; }
.barra-app .buscar {
  background: rgba(255, 255, 255, .92);
  color: var(--tinta);
  border: 0;
  border-radius: 4px;
  padding: .35rem .7rem;
  width: min(320px, 40vw);
  font: inherit;
  font-size: .9rem;
}
.barra-app a.volver { color: #fff; text-decoration: none; font-size: .9rem; white-space: nowrap; }
.barra-app a.volver:hover { text-decoration: underline; }

/* ---------- Cinta de opciones ---------- */
.cinta {
  position: sticky;
  top: 48px;
  z-index: 45;
  background: #fff;
  color: var(--tinta);
  border-bottom: 1px solid var(--linea);
}
.cinta-pestanas {
  display: flex;
  gap: .1rem;
  padding: 0 .75rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.cinta-pestanas::-webkit-scrollbar { display: none; }
.cinta-pestanas a {
  color: var(--tinta);
  text-decoration: none;
  font-size: .9rem;
  padding: .55rem .8rem .45rem;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}
.cinta-pestanas a:hover { background: #f3f2f1; }
.cinta-pestanas a.activa { border-bottom-color: var(--verde); font-weight: 600; color: var(--verde-2); }
.cinta-pestanas .sep { flex: 1; }
.cinta-pestanas button.boton-ia {
  margin: .25rem 0;
  border: 1px solid var(--morado);
  background: var(--morado);
  color: #fff;
  border-radius: 999px;
  padding: .25rem .9rem;
  font: 600 .85rem var(--fuente);
  cursor: pointer;
  white-space: nowrap;
}
.cinta-pestanas button.boton-ia:hover { background: var(--morado-3); }

/* ---------- Barra de fórmulas ---------- */
.barra-formulas {
  display: flex;
  align-items: stretch;
  background: #fff;
  color: var(--tinta);
  border-top: 1px solid var(--linea);
  font-size: .9rem;
}
.cuadro-nombres {
  width: 92px;
  flex: none;
  padding: .35rem .6rem;
  border-right: 1px solid var(--linea);
  font-family: var(--mono);
}
.fx {
  flex: none;
  padding: .35rem .7rem;
  color: var(--gris);
  font-style: italic;
  font-family: Georgia, serif;
  border-right: 1px solid var(--linea);
}
.contenido-formula {
  flex: 1;
  padding: .35rem .7rem;
  font-family: var(--mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Layout principal ---------- */
.lienzo {
  transition: margin .25s ease;
}
.barra-app, .cinta { transition: margin .25s ease; }
body.dock-abierto.dock-derecha .lienzo,
body.dock-abierto.dock-derecha .barra-app,
body.dock-abierto.dock-derecha .cinta { margin-right: var(--dock-ancho); }
body.dock-abierto.dock-izquierda .lienzo,
body.dock-abierto.dock-izquierda .barra-app,
body.dock-abierto.dock-izquierda .cinta { margin-left: var(--dock-ancho); }
.contenedor { width: min(1080px, 100% - 32px); margin: 0 auto; }

/* Portada de clase (igual al flyer) */
.portada {
  padding: 3rem 0 2.5rem;
  position: relative;
  overflow: hidden;
}
.portada .franja-titulo {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--verde);
  padding: 1rem max(16px, calc((100% - 1080px) / 2));
  margin: 0 0 2rem;
}
.portada .franja-titulo .clase-n {
  font-family: var(--fuente-titulo);
  font-weight: 800;
  font-size: clamp(2.2rem, 6vw, 4.2rem);
  line-height: 1;
  white-space: nowrap;
}
.portada .franja-titulo .clase-tema {
  font-family: var(--fuente-titulo);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(1rem, 2.4vw, 1.6rem);
  line-height: 1.15;
  flex: 1;
}
.portada .lista-flyer { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.portada .lista-flyer li {
  display: flex;
  gap: .8rem;
  align-items: flex-start;
  font-family: var(--fuente-titulo);
  font-weight: 700;
  font-size: clamp(1.1rem, 2.5vw, 1.55rem);
  line-height: 1.3;
  margin: .6rem 0;
}
.chevron {
  flex: none;
  width: 1.6em;
  height: 1.6em;
  border-radius: 50%;
  background: var(--verde);
  display: grid;
  place-items: center;
  margin-top: .05em;
}
.chevron::before {
  content: "";
  width: .45em;
  height: .45em;
  border-right: .16em solid var(--morado-2);
  border-top: .16em solid var(--morado-2);
  transform: rotate(45deg) translate(-1px, 1px);
}

/* ---------- Secciones = "hojas" ---------- */
.seccion { padding: 2.5rem 0 1rem; scroll-margin-top: 140px; }
.seccion > .contenedor > h2,
.titulo-seccion {
  display: flex;
  align-items: center;
  gap: .8rem;
  font-family: var(--fuente-titulo);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.1;
  margin: 0 0 1.2rem;
}
.titulo-seccion .num {
  background: var(--verde);
  padding: .2em .45em;
  border-radius: 4px;
  font-size: .8em;
}
.subtitulo {
  font-family: var(--fuente-titulo);
  font-weight: 700;
  font-size: 1.2rem;
  margin: 1.8rem 0 .6rem;
}
.lead { font-size: 1.1rem; opacity: .95; max-width: 75ch; }

/* Tarjeta "hoja de cálculo" blanca */
.hoja-card {
  background: #fff;
  color: var(--tinta);
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  overflow: hidden;
  margin: 1rem 0 1.5rem;
}
.hoja-card .hoja-card-cab {
  display: flex;
  align-items: center;
  gap: .6rem;
  background: var(--grid-head);
  border-bottom: 1px solid var(--linea);
  padding: .5rem 1rem;
  font-weight: 600;
  font-size: .95rem;
  color: var(--verde-2);
}
.hoja-card .hoja-card-cab .pill {
  margin-left: auto;
  font-size: .75rem;
  font-weight: 600;
  background: var(--verde-claro);
  color: var(--verde-2);
  padding: .1rem .55rem;
  border-radius: 999px;
}
.hoja-card .hoja-card-cuerpo { padding: 1.1rem 1.25rem; }
.hoja-card h3 { font-family: var(--fuente-titulo); color: var(--morado); margin: .2rem 0 .6rem; font-size: 1.2rem; }
.hoja-card h4 { color: var(--verde-2); margin: 1rem 0 .4rem; }
.hoja-card p, .hoja-card li { color: #323130; }
.hoja-card a { color: var(--celeste-2); }
.hoja-card code {
  background: #f3f2f1;
  border: 1px solid #e1dfdd;
  padding: .05em .35em;
  border-radius: 4px;
  font-size: .9em;
  color: var(--verde-2);
}

.grilla-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.2rem; }
.grilla-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.grilla-2 > .hoja-card, .grilla-3 > .hoja-card { margin: 0; }

/* Nota / tip / atención */
.nota {
  border-left: 5px solid var(--celeste);
  background: #eef7fe;
  color: #1b3a52;
  padding: .7rem 1rem;
  border-radius: 6px;
  margin: .9rem 0;
}
.nota.tip { border-color: var(--verde); background: var(--verde-claro); color: #12391f; }
.nota.ojo { border-color: #d83b01; background: #fff1e8; color: #5a2400; }
.nota strong:first-child { display: block; margin-bottom: .15rem; }
.seccion > .contenedor > .nota { max-width: 80ch; }

.doc-oficial {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .85rem;
  text-decoration: none;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: .15rem .7rem;
  margin: .3rem .3rem 0 0;
}
.doc-oficial::before { content: "📘"; }
.docs { margin: .8rem 0 0; }
.seccion > .contenedor > .docs .doc-oficial { color: #fff; }

/* ---------- Mini hoja (grilla de Excel) ---------- */
.mini-hoja { overflow-x: auto; margin: .8rem 0; border: 1px solid var(--linea); border-radius: 6px; background: #fff; }
.mini-hoja .mh-formula {
  display: flex;
  border-bottom: 1px solid var(--linea);
  font-size: .85rem;
  color: var(--tinta);
  background: #fff;
}
.mini-hoja .mh-formula .mh-ref { width: 64px; padding: .3rem .5rem; border-right: 1px solid var(--linea); font-family: var(--mono); }
.mini-hoja .mh-formula .mh-fx { padding: .3rem .5rem; color: var(--gris); font-style: italic; font-family: Georgia, serif; border-right: 1px solid var(--linea); }
.mini-hoja .mh-formula .mh-txt { padding: .3rem .6rem; font-family: var(--mono); white-space: pre; color: var(--verde-2); }
.mini-hoja table { border-collapse: collapse; font-size: .88rem; color: var(--tinta); min-width: 100%; }
.mini-hoja th, .mini-hoja td { border: 1px solid #e1dfdd; padding: .25rem .6rem; white-space: nowrap; }
.mini-hoja thead th { background: var(--grid-head); color: var(--gris); font-weight: 400; text-align: center; min-width: 70px; }
.mini-hoja tbody th { background: var(--grid-head); color: var(--gris); font-weight: 400; width: 38px; text-align: center; }
.mini-hoja thead th.esq { min-width: 38px; }
.mini-hoja td { cursor: cell; }
.mini-hoja td.num { text-align: right; }
.mini-hoja td.enc { font-weight: 700; background: #fafafa; }
.mini-hoja td.f { background: var(--amarillo); }
.mini-hoja td.sel { outline: 2px solid var(--verde); outline-offset: -2px; }
.mini-hoja th.col-sel, .mini-hoja th.fila-sel { background: #d9ead3; color: var(--verde-2); font-weight: 600; }

/* ---------- Atajos ---------- */
kbd {
  display: inline-block;
  min-width: 1.6em;
  text-align: center;
  background: #fff;
  color: var(--tinta);
  border: 1px solid #c8c6c4;
  border-bottom-width: 3px;
  border-radius: 5px;
  padding: .05em .4em;
  font-size: .85em;
  font-family: var(--fuente);
  font-weight: 600;
}
.tabla-atajos { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tabla-atajos th { text-align: left; background: var(--verde); color: #fff; padding: .45rem .7rem; font-weight: 600; }
.tabla-atajos td { border-bottom: 1px solid #edebe9; padding: .45rem .7rem; vertical-align: top; color: var(--tinta); }
.tabla-atajos tr:nth-child(even) td { background: #faf9f8; }
.tabla-atajos td:first-child { white-space: nowrap; width: 1%; }
.tabla-atajos .cat { font-size: .75rem; background: var(--verde-claro); color: var(--verde-2); border-radius: 999px; padding: .05rem .5rem; white-space: nowrap; }
.filtro-atajos { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: .8rem; }
.filtro-atajos input {
  flex: 1;
  min-width: 200px;
  border: 1px solid #c8c6c4;
  border-radius: 6px;
  padding: .5rem .7rem;
  font: inherit;
}
.chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.chips button {
  border: 1px solid var(--verde);
  background: #fff;
  color: var(--verde-2);
  border-radius: 999px;
  padding: .25rem .7rem;
  font: 600 .8rem var(--fuente);
  cursor: pointer;
}
.chips button.activo { background: var(--verde); color: #fff; }

/* ---------- Tablas de funciones ---------- */
.tabla-funciones { width: 100%; border-collapse: collapse; font-size: .93rem; }
.tabla-funciones th { background: var(--morado); color: #fff; text-align: left; padding: .5rem .7rem; }
.tabla-funciones td { border-bottom: 1px solid #edebe9; padding: .5rem .7rem; color: var(--tinta); vertical-align: top; }
.tabla-funciones td:first-child { font-weight: 700; color: var(--verde-2); white-space: nowrap; }
.tabla-scroll { overflow-x: auto; }

/* ---------- Pasos ---------- */
.pasos { counter-reset: paso; list-style: none; padding: 0; margin: .5rem 0; }
.pasos > li { counter-increment: paso; position: relative; padding: .35rem 0 .35rem 2.6rem; }
.pasos > li::before {
  content: counter(paso);
  position: absolute;
  left: 0;
  top: .3rem;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--verde);
  color: #fff;
  font-weight: 700;
  display: grid;
  place-items: center;
  font-size: .9rem;
}

/* ---------- Ejercicios ---------- */
.ejercicio {
  background: #fff;
  color: var(--tinta);
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  margin: 0 0 1.1rem;
  overflow: hidden;
  border-left: 6px solid var(--celeste);
}
.ejercicio.resuelto { border-left-color: var(--ok); }
.ejercicio .ej-cab {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem;
  padding: .7rem 1.1rem;
  background: var(--grid-head);
  border-bottom: 1px solid var(--linea);
}
.ejercicio .ej-num {
  font-family: var(--fuente-titulo);
  font-weight: 800;
  color: var(--morado);
}
.ejercicio .ej-hoja { font-size: .78rem; background: var(--verde); color: #fff; border-radius: 3px; padding: .05rem .5rem; }
.ejercicio .ej-nivel { font-size: .78rem; color: var(--gris); }
.ejercicio .ej-estado { margin-left: auto; font-size: .85rem; font-weight: 700; color: var(--ok); }
.ejercicio .ej-cuerpo { padding: .9rem 1.1rem 1.1rem; }
.ejercicio .ej-consigna { margin: 0 0 .8rem; font-size: 1.02rem; }
.ej-respuesta { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.ej-respuesta input {
  border: 1px solid #8a8886;
  border-radius: 4px;
  padding: .45rem .6rem;
  font: inherit;
  width: min(260px, 100%);
}
.ej-respuesta input:focus { outline: 2px solid var(--verde); border-color: var(--verde); }
.btn {
  border: 0;
  border-radius: 6px;
  padding: .5rem .95rem;
  font: 600 .9rem var(--fuente);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.btn-verde { background: var(--verde); color: #fff; }
.btn-verde:hover { background: var(--verde-2); }
.btn-morado { background: var(--morado); color: #fff; }
.btn-morado:hover { background: var(--morado-3); }
.btn-celeste { background: var(--celeste); color: var(--morado); }
.btn-celeste:hover { background: var(--celeste-2); color: #fff; }
.btn-borde { background: #fff; color: var(--morado); border: 1px solid var(--morado); }
.btn-borde:hover { background: #f8eef4; }
.btn-grande { font-size: 1.05rem; padding: .75rem 1.3rem; }
.ej-feedback { font-weight: 600; min-height: 1.4em; margin: .5rem 0 0; }
.ej-feedback.ok { color: var(--ok); }
.ej-feedback.mal { color: var(--error); }
.ejercicio details { margin-top: .7rem; border-top: 1px dashed #e1dfdd; padding-top: .5rem; }
.ejercicio summary { cursor: pointer; font-weight: 600; color: var(--morado); }
.ejercicio .solucion-formula {
  display: block;
  background: #f3f2f1;
  border-left: 4px solid var(--verde);
  padding: .5rem .7rem;
  margin: .4rem 0;
  font-family: var(--mono);
  color: var(--verde-2);
  white-space: pre-wrap;
  word-break: break-word;
}
.ej-acciones { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .8rem; }
.autoeval { display: flex; align-items: center; gap: .5rem; font-weight: 600; }
.autoeval input { width: 1.2rem; height: 1.2rem; accent-color: var(--verde); }

.progreso {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #fff;
  color: var(--tinta);
  border-radius: var(--radio);
  padding: .8rem 1.1rem;
  margin: 0 0 1.2rem;
  box-shadow: var(--sombra);
}
.progreso .barra { flex: 1; height: 12px; background: #edebe9; border-radius: 999px; overflow: hidden; }
.progreso .barra i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--verde), var(--celeste)); transition: width .4s; }
.progreso strong { font-family: var(--fuente-titulo); color: var(--morado); white-space: nowrap; }

.descarga {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  background: var(--verde);
  border-radius: var(--radio);
  padding: 1.1rem 1.3rem;
  margin: 0 0 1.5rem;
  box-shadow: var(--sombra);
}
.descarga p { margin: 0; flex: 1; min-width: 240px; }

/* ---------- Quiz ---------- */
.quiz-preg { background: #fff; color: var(--tinta); border-radius: var(--radio); padding: 1rem 1.2rem; margin: 0 0 1rem; box-shadow: var(--sombra); }
.quiz-preg h4 { margin: 0 0 .6rem; color: var(--morado); font-family: var(--fuente-titulo); }
.quiz-preg label {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  padding: .45rem .6rem;
  border: 1px solid #edebe9;
  border-radius: 6px;
  margin: .35rem 0;
  cursor: pointer;
}
.quiz-preg label:hover { background: #faf9f8; }
.quiz-preg label.correcta { border-color: var(--ok); background: #dff6dd; }
.quiz-preg label.incorrecta { border-color: var(--error); background: #fde7e9; }
.quiz-preg .explica { display: none; margin: .5rem 0 0; font-size: .92rem; color: var(--gris); }
.quiz-preg.respondida .explica { display: block; }
.quiz-resultado { font-family: var(--fuente-titulo); font-weight: 800; font-size: 1.4rem; }

/* ---------- Panel acoplable de IA ---------- */
.dock {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  width: var(--dock-ancho);
  max-width: 100vw;
  background: #fff;
  color: var(--tinta);
  z-index: 80;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 30px rgba(0, 0, 0, .3);
  transform: translateX(105%);
  transition: transform .25s ease;
}
body.dock-izquierda .dock { right: auto; left: 0; transform: translateX(-105%); box-shadow: 8px 0 30px rgba(0, 0, 0, .3); }
body.dock-abierto .dock { transform: none; }
.dock-redimensionar { position: absolute; top: 0; bottom: 0; left: -4px; width: 8px; cursor: ew-resize; }
body.dock-izquierda .dock-redimensionar { left: auto; right: -4px; }
.dock-cab {
  display: flex;
  align-items: center;
  gap: .4rem;
  background: var(--morado);
  color: #fff;
  padding: .55rem .7rem;
}
.dock-cab strong { font-family: var(--fuente-titulo); flex: 1; font-size: 1rem; }
.dock-cab button {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .4);
  color: #fff;
  border-radius: 4px;
  padding: .15rem .5rem;
  cursor: pointer;
  font: 600 .8rem var(--fuente);
}
.dock-cab button:hover { background: rgba(255, 255, 255, .15); }
.dock-tabs { display: flex; border-bottom: 1px solid var(--linea); }
.dock-tabs button {
  flex: 1;
  border: 0;
  background: #fff;
  padding: .6rem;
  font: 600 .92rem var(--fuente);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  color: var(--gris);
}
.dock-tabs button.activo[data-ia="claude"] { border-bottom-color: #d97757; color: #a4502f; }
.dock-tabs button.activo[data-ia="chatgpt"] { border-bottom-color: #10a37f; color: #0b7a5f; }
.dock-tabs .punto { width: 10px; height: 10px; border-radius: 50%; }
.dock-cuerpo { flex: 1; overflow-y: auto; padding: .8rem; background: #faf9f8; }
.dock-intro { font-size: .85rem; color: var(--gris); margin: 0 0 .7rem; }
.dock-compositor {
  background: #fff;
  border: 1px solid var(--linea);
  border-radius: 8px;
  padding: .7rem;
  margin-bottom: .9rem;
}
.dock-compositor label { font-size: .8rem; font-weight: 700; color: var(--morado); display: block; margin-bottom: .25rem; }
.dock-compositor select,
.dock-compositor textarea {
  width: 100%;
  font: inherit;
  font-size: .88rem;
  border: 1px solid #c8c6c4;
  border-radius: 6px;
  padding: .4rem .5rem;
  margin-bottom: .5rem;
}
.dock-compositor textarea { min-height: 110px; resize: vertical; }
.dock-botones { display: flex; gap: .4rem; flex-wrap: wrap; }
.dock-botones .btn { font-size: .82rem; padding: .4rem .7rem; }
.btn-claude { background: #d97757; color: #fff; }
.btn-claude:hover { background: #c4623f; }
.btn-chatgpt { background: #10a37f; color: #fff; }
.btn-chatgpt:hover { background: #0b8a6a; }
.dock-grupo { font-size: .75rem; text-transform: uppercase; letter-spacing: .5px; font-weight: 700; color: var(--verde-2); margin: 1rem 0 .4rem; }
.prompt-card {
  background: #fff;
  border: 1px solid var(--linea);
  border-radius: 8px;
  padding: .6rem .7rem;
  margin-bottom: .55rem;
}
.prompt-card .pc-titulo { font-weight: 700; font-size: .88rem; color: var(--morado); margin-bottom: .25rem; }
.prompt-card .pc-texto { font-size: .8rem; color: #484644; max-height: 4.2em; overflow: hidden; position: relative; margin-bottom: .45rem; white-space: pre-wrap; }
.prompt-card.expandida .pc-texto { max-height: none; }
.prompt-card .pc-texto::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.4em; background: linear-gradient(transparent, #fff); }
.prompt-card.expandida .pc-texto::after { display: none; }
.prompt-card .dock-botones .btn { font-size: .76rem; padding: .3rem .55rem; }
.prompt-card.destacada { outline: 3px solid var(--celeste); animation: latido 1s ease 2; }
@keyframes latido { 50% { outline-color: var(--verde); } }
.dock-pie { font-size: .72rem; color: var(--gris); padding: .5rem .8rem; border-top: 1px solid var(--linea); background: #fff; }
.toast {
  position: fixed;
  left: 50%;
  bottom: 70px;
  transform: translateX(-50%) translateY(20px);
  background: var(--tinta);
  color: #fff;
  padding: .55rem 1rem;
  border-radius: 6px;
  font-size: .9rem;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: .25s;
}
.toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Pestañita flotante para abrir el dock */
.dock-lengueta {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 70;
  background: var(--celeste);
  color: var(--morado);
  border: 0;
  border-radius: 8px 0 0 8px;
  writing-mode: vertical-rl;
  padding: .9rem .45rem;
  font: 800 .85rem var(--fuente-titulo);
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: var(--sombra);
}
body.dock-izquierda .dock-lengueta { right: auto; left: 0; border-radius: 0 8px 8px 0; }
body.dock-abierto .dock-lengueta { display: none; }

/* ---------- Pestañas de hoja + barra de estado ---------- */
.hojas-pie {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: #f3f2f1;
  color: var(--tinta);
  border-top: 1px solid var(--linea);
  font-size: .85rem;
  transition: margin .25s ease;
}
body.dock-abierto.dock-derecha .hojas-pie { margin-right: var(--dock-ancho); }
body.dock-abierto.dock-izquierda .hojas-pie { margin-left: var(--dock-ancho); }
.hojas-tabs { display: flex; overflow-x: auto; scrollbar-width: none; padding: 0 .5rem; }
.hojas-tabs::-webkit-scrollbar { display: none; }
.hojas-tabs .mas { padding: .4rem .7rem; color: var(--gris); }
.hojas-tabs a {
  padding: .4rem .9rem;
  color: var(--tinta);
  text-decoration: none;
  border-right: 1px solid var(--linea);
  white-space: nowrap;
}
.hojas-tabs a:hover { background: #e8e6e4; }
.hojas-tabs a.activa { background: #fff; color: var(--verde-2); font-weight: 700; box-shadow: inset 0 -3px 0 var(--verde); }
.barra-estado {
  display: flex;
  gap: 1.2rem;
  justify-content: flex-end;
  align-items: center;
  padding: .2rem .9rem;
  background: var(--verde);
  color: #fff;
  font-size: .78rem;
}
.barra-estado .listo { margin-right: auto; }

/* ---------- Index ---------- */
.hero {
  position: relative;
  padding: 3.5rem 0 2rem;
  overflow: hidden;
}
.hero .franja-hero {
  position: absolute;
  left: 0;
  right: 0;
  top: 5.3rem;
  height: 9.5rem;
  background: var(--verde);
  z-index: 0;
}
.hero .contenedor { position: relative; z-index: 1; display: flex; gap: 2rem; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.hero h1 {
  font-family: var(--fuente-titulo);
  font-weight: 800;
  font-size: clamp(2.6rem, 8vw, 5.4rem);
  line-height: .95;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: -1px;
}
.hero .logo-grande { position: relative; }
.hero .logo-grande .etiqueta { position: absolute; right: -.6rem; bottom: -1.2rem; font-size: clamp(1.2rem, 3vw, 2rem); }
.hero-lista { list-style: none; padding: 0; margin: 3rem 0 1rem; }
.hero-lista li {
  font-family: var(--fuente-titulo);
  font-weight: 700;
  font-size: clamp(1.15rem, 2.8vw, 1.7rem);
  line-height: 1.3;
  margin: .9rem 0;
  padding-left: 1.6rem;
  position: relative;
}
.hero-lista li::before { content: "•"; position: absolute; left: 0; }
.tarjetas-clase { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 1.5rem; margin: 2rem 0; }
.tarjeta-clase {
  background: var(--morado-2);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--sombra);
  display: flex;
  flex-direction: column;
  border: 2px solid rgba(255, 255, 255, .08);
  position: relative;
}
.tarjeta-clase .tc-franja {
  background: var(--verde);
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.tarjeta-clase .tc-franja b { font-family: var(--fuente-titulo); font-size: 2.3rem; font-weight: 800; line-height: 1; white-space: nowrap; }
.tarjeta-clase .tc-franja span { font-family: var(--fuente-titulo); font-weight: 700; text-transform: uppercase; font-size: .95rem; line-height: 1.15; flex: 1; }
.tarjeta-clase .tc-cuerpo { padding: 1.2rem; flex: 1; display: flex; flex-direction: column; gap: .8rem; }
.tarjeta-clase ul { list-style: none; padding: 0; margin: 0; }
.tarjeta-clase li { display: flex; gap: .6rem; font-weight: 600; margin: .45rem 0; }
.tarjeta-clase li .chevron { font-size: .75rem; }
.tarjeta-clase .tc-pie { margin-top: auto; display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.tarjeta-clase.bloqueada .tc-cuerpo ul { filter: blur(0); opacity: .75; }
.candado {
  display: flex;
  align-items: center;
  gap: .6rem;
  background: rgba(0, 0, 0, .25);
  border-radius: 8px;
  padding: .7rem .9rem;
}
.cuenta {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}
.cuenta div {
  background: #fff;
  color: var(--morado);
  border-radius: 6px;
  min-width: 64px;
  text-align: center;
  padding: .35rem .4rem;
  font-family: var(--fuente-titulo);
  box-shadow: 0 3px 0 var(--celeste);
}
.cuenta b { display: block; font-size: 1.6rem; line-height: 1.1; }
.cuenta small { font-size: .7rem; text-transform: uppercase; font-weight: 700; color: var(--verde-2); }
.info-grilla { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.info-grilla .hoja-card { margin: 0; }

/* Página de espera clase 2 */
.espera { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 2rem 1rem; }
.espera .franja { padding: 1rem 1.5rem; display: inline-flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  :root { --dock-ancho: min(380px, 100vw); }
  body.dock-abierto .lienzo,
  body.dock-abierto .barra-app,
  body.dock-abierto .cinta,
  body.dock-abierto .hojas-pie { margin: 0 !important; }
  .barra-app .buscar { display: none; }
}
@media (max-width: 640px) {
  .portada .franja-titulo { flex-wrap: wrap; gap: .6rem; }
  .portada .franja-titulo .icono-excel { display: none; }
  .barra-estado .extra { display: none; }
  .cuadro-nombres { width: 64px; }
  .seccion { scroll-margin-top: 150px; }
  .hero .franja-hero { top: 4.6rem; height: 8.2rem; }
  .hero .logo-grande { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
@media print {
  .barra-app, .cinta, .dock, .dock-lengueta, .hojas-pie { display: none !important; }
  body { background: #fff; color: #000; }
}
