/* El constructor: la hoja del CV y el panel de mejoras.
   Usa los mismos tokens de color que index.html, así hereda los dos temas. */

.constructor { margin-top: 4.5rem; }
.constructor > h2 {
  font-family: Spectral, Georgia, serif; font-size: 1.55rem;
  font-weight: 600; margin: 0 0 .6rem; letter-spacing: -.01em;
}
.constructor > .intro {
  margin: 0 0 1.9rem; color: var(--tinta-2); font-size: .95rem;
  text-align: justify; hyphens: auto; -webkit-hyphens: auto;
}

/* ---------- elección de plantilla ---------- */
.plantillas { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .6rem; }
.plantilla {
  display: flex; flex-direction: column; gap: .2rem; text-align: left;
  padding: .8rem .95rem; cursor: pointer;
  background: var(--superficie); color: var(--tinta-2);
  border: 1px solid var(--regla); border-radius: 2px;
}
.plantilla b { color: var(--tinta); font-size: .9rem; font-weight: 600; }
.plantilla span { font-size: .78rem; line-height: 1.4; }
.plantilla:hover { border-color: var(--tinta-3); }
.plantilla.elegida { border-color: var(--acento); box-shadow: inset 0 0 0 1px var(--acento); }

.advertencia-plantilla {
  margin: .85rem 0 0; padding: .8rem 1rem;
  background: var(--media-sup); border-left: 2px solid var(--media);
  font-size: .85rem; line-height: 1.55; color: var(--tinta-2);
  text-align: justify; hyphens: auto; -webkit-hyphens: auto;
}

/* ---------- el taller: hoja + panel ---------- */
.taller { display: grid; gap: 1.6rem; margin-top: 1.9rem; }
@media (min-width: 60rem) {
  /* la hoja se sale de la columna de lectura a propósito: un CV necesita
     ancho de documento, no ancho de párrafo */
  .taller { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; }
  .constructor { width: min(72rem, calc(100vw - 3rem)); margin-left: 50%; transform: translateX(-50%); }
}

/* ---------- la hoja del CV ---------- */
.hoja-cv {
  background: #FFFFFF; color: #16181B;
  border: 1px solid var(--regla); border-radius: 2px;
  padding: 2.2rem 2.1rem 2.6rem;
  box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 8px 24px rgba(0,0,0,.06);
  font-size: .87rem; line-height: 1.55;
  overflow-wrap: anywhere;
}
.cv-enc { display: flex; gap: 1.2rem; align-items: flex-start; padding-bottom: 1.1rem; }
.cv-foto {
  flex: 0 0 5.2rem; height: 6.4rem; border-radius: 2px;
  background: #EDEFF2; border: 1px dashed #C3C8CE;
  display: flex; align-items: center; justify-content: center;
  font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: #98A0A8;
}
.cv-ident { min-width: 0; }
.cv-nombre {
  font-family: Spectral, Georgia, serif; font-size: 1.55rem; font-weight: 600;
  margin: 0 0 .18rem; line-height: 1.15; letter-spacing: -.015em; color: #101215;
}
.cv-titular { margin: 0 0 .45rem; font-size: .93rem; color: #3E464E; font-weight: 500; }
.cv-contacto { margin: 0; font-size: .78rem; color: #6B737B; }

.cv-seccion {
  margin: 1.6rem 0 .7rem; padding-bottom: .28rem;
  border-bottom: 1px solid #DFE3E7;
  font-size: .68rem; letter-spacing: .14em; text-transform: uppercase;
  font-weight: 700; color: #4A525A;
}
.cv-puesto { margin-bottom: 1.15rem; }
.cv-puesto-enc {
  display: flex; justify-content: space-between; gap: 1rem;
  align-items: baseline; flex-wrap: wrap; margin-bottom: .3rem;
}
.cv-cargo { font-weight: 600; color: #16181B; }
.cv-fechas { font-size: .76rem; color: #79818A; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cv-lineas { margin: 0; padding-left: 1.05rem; }
.cv-lineas li { margin-bottom: .22rem; }
.cv-lineas li.floja { background: #FFF6E6; box-shadow: 0 0 0 .18rem #FFF6E6; border-radius: 1px; }
.marca, .vieja {
  display: inline-block; margin-left: .45rem; vertical-align: baseline;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .6rem; letter-spacing: .09em; text-transform: uppercase;
  padding: .1rem .35rem; border-radius: 2px;
}
.marca { background: #E9A93C; color: #3A2A05; border: 0; cursor: pointer; }
.marca:hover { filter: brightness(1.08); }
.vieja { background: #EDEFF2; color: #6B737B; }
.cv-perfil {
  margin: 0 0 .5rem; text-align: justify; hyphens: auto; -webkit-hyphens: auto;
}
.cv-previo { margin: .9rem 0 0; font-size: .82rem; color: #5A626A; font-style: italic; }

/* variantes de plantilla */
.p-ats .cv-nombre, .p-ats .cv-seccion { font-family: "Public Sans", system-ui, sans-serif; }
.p-ats .cv-nombre { font-size: 1.35rem; letter-spacing: 0; }
.p-ats .cv-seccion { border-bottom-width: 2px; border-color: #16181B; color: #16181B; }
.p-sobria .cv-enc { flex-direction: column; align-items: center; text-align: center; gap: .3rem; }
.p-sobria .cv-enc { border-bottom: 2px solid #16181B; }

/* ---------- panel de mejoras ---------- */
.mejoras > * + * { margin-top: 1.15rem; }
.mejoras h4 {
  font-family: Spectral, Georgia, serif; font-size: 1.05rem;
  font-weight: 600; margin: 0 0 .4rem;
}
.mejoras-cab p {
  margin: 0; font-size: .87rem; color: var(--tinta-2);
  text-align: justify; hyphens: auto; -webkit-hyphens: auto;
}
.quitados {
  padding: 1rem 1.15rem; background: var(--superficie);
  border: 1px solid var(--regla-2); border-left: 2px solid var(--baja); border-radius: 2px;
}
.quitados ul { margin: 0; padding-left: 1.05rem; font-size: .84rem; }
.quitados li { margin-bottom: .5rem; }
.q-texto { display: block; color: var(--tinta); text-decoration: line-through; }
.q-porque { display: block; color: var(--tinta-3); font-size: .78rem; }
.aviso {
  margin: 0; padding: .8rem 1rem; font-size: .85rem; line-height: 1.55;
  background: var(--media-sup); border-left: 2px solid var(--media); color: var(--tinta-2);
}
.sin-flojas { font-size: .9rem; color: var(--acento); }

.mejora {
  padding: 1rem 1.15rem; background: var(--superficie);
  border: 1px solid var(--regla); border-radius: 2px;
}
.mejora-original {
  margin: 0 0 .75rem; font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .77rem; line-height: 1.5; color: var(--tinta-3);
}
.pregunta { display: block; margin-bottom: .6rem; }
.pregunta span { display: block; font-size: .82rem; color: var(--tinta-2); margin-bottom: .25rem; }
.pregunta input {
  width: 100%; padding: .5rem .7rem; font-family: inherit; font-size: .88rem;
  background: var(--papel); color: var(--tinta);
  border: 1px solid var(--regla); border-radius: 2px;
}
.pregunta input:focus-visible { outline: 2px solid var(--acento); outline-offset: 1px; border-color: transparent; }

/* ---------- cargar el archivo ---------- */
.cargar {
  display: flex; align-items: center; gap: .85rem; flex-wrap: wrap;
  margin-bottom: 1.4rem;
}
.cargar-nota {
  flex: 1 1 16rem; min-width: 0;
  font-size: .82rem; line-height: 1.5; color: var(--tinta-3);
}
.cargar-nota b { color: var(--tinta-2); font-weight: 600; }

.estado-archivo {
  margin: -.6rem 0 1.3rem; padding: .75rem 1rem;
  font-size: .86rem; line-height: 1.55;
  background: var(--acento-sup); border-left: 2px solid var(--acento);
  color: var(--tinta-2);
}
.estado-archivo.mal {
  background: var(--alta-sup); border-left-color: var(--alta); color: var(--tinta);
}

/* mientras se arrastra un archivo encima del recuadro */
textarea.encima {
  border-color: var(--acento);
  box-shadow: inset 0 0 0 1px var(--acento);
}
