/* Kit CV de Temporada · sistema visual de Vinci
   (Cerebro: comunicacion/identidad-visual-vinci.md). Papel y carbón dominan;
   el naranja es solo la acción principal y el paso actual, nunca texto sobre
   papel (2,97:1): siempre carbón sobre naranja. Sombra dura solo en botones. */
@font-face { font-family: "Bebas Neue"; src: url(/static/fonts/explorador/bebas-neue-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Space Mono"; src: url(/static/fonts/explorador/space-mono-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }

.kt {
  --papel: #F4EBDD; --papel2: #ECE1CF; --blanco: #FFFDF8;
  --tinta: #24201C; --tinta2: #5A5148; --naranja: #DF641F; --gris: #D6C9B4;
  --display: "Bebas Neue", "Oswald", "Arial Narrow", Impact, sans-serif;
  --texto: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Space Mono", ui-monospace, Menlo, Consolas, monospace;
  --linea: 2px solid var(--tinta);
  --sombra: 4px 4px 0 var(--tinta);
  font-family: var(--texto);
  color: var(--tinta);
  max-width: 1120px;
  margin: 0 auto 3rem;
}
body:has(.kt) { background: var(--papel, #F4EBDD); }
body:has(.kt) .page { max-width: 1180px; width: 100%; }
.kt *, .kt *::before, .kt *::after { box-sizing: border-box; }
.kt h1, .kt h2, .kt h3, .kt p, .kt pre, .kt blockquote { margin: 0; }
.kt h1 { font-family: var(--display); font-weight: 400; font-size: clamp(2.6rem, 9vw, 4rem); line-height: .92; letter-spacing: .01em; }
.kt h2 { font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 7vw, 2.6rem); line-height: .95; letter-spacing: .01em; }
.kt h3 { font-size: 1rem; font-weight: 750; }
.kt p { line-height: 1.55; }
.kt [hidden] { display: none !important; }
.kt [data-respaldo]:empty { display: none; }

.kt-rotulo, .kt h3.kt-rotulo {
  font-family: var(--mono); font-weight: 700; font-size: .72rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--tinta2);
}
.kt-heading { padding: 1.4rem 0 1.1rem; border-bottom: var(--linea); margin-bottom: 1rem; }
.kt-heading .kt-rotulo { margin-bottom: .55rem; }
.kt-heading p:last-child { margin-top: .6rem; color: var(--tinta2); max-width: 36ch; }


.kt-tools { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; padding: .8rem 0; }
.kt-tools [role="status"] { font-family: var(--mono); font-weight: 700; font-size: .7rem; letter-spacing: .05em; text-transform: uppercase; color: var(--tinta2); }
/* En el paso 1 todavía no hay aviso ni CV que mirar. */
/* En el capítulo 1 todavía no hay aviso; la vista previa tiene sentido recién con borrador. */
.kt[data-paso="1"] .kt-tools .kt-btn, .kt:not([data-paso="4"]) .kt-tools [data-dialog="cv"] { display: none; }
.kt[data-paso="1"] .kt-workspace { grid-template-columns: minmax(0, 1fr); }
.kt[data-paso="1"] .kt-offer { display: none; }
.kt-workspace { max-width: 100%; }
.kt[data-paso="1"] .kt-editor, .kt[data-pantalla="generar"] .kt-editor { max-width: 720px; }

.kt-workspace { display: grid; grid-template-columns: minmax(0, .76fr) minmax(0, 1.24fr); gap: 1rem; align-items: start; }
.kt-panel { min-width: 0; background: var(--blanco); padding: clamp(1rem, 3vw, 1.6rem); border: var(--linea); }
.kt-offer { position: sticky; top: 1rem; }
.kt-offer h2 { margin-bottom: .75rem; }
.kt-source { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; color: var(--tinta2); line-height: 1.55; }
.kt-offer .kt-source { max-height: 65vh; overflow-y: auto; }

/* Botones: borde carbón; la acción principal en naranja con sombra dura */
.kt-btn {
  appearance: none; display: inline-flex; align-items: center; justify-content: center;
  border: var(--linea); background: transparent; color: var(--tinta); cursor: pointer;
  padding: .7rem 1rem; min-height: 46px; border-radius: 0; font: 700 .95rem/1.2 var(--texto); max-width: 100%;
}
.kt-btn:hover { background: var(--papel2); }
.kt-primary { background: var(--naranja); box-shadow: var(--sombra); transition: transform .08s ease, box-shadow .08s ease; }
.kt-primary:hover { background: var(--naranja); transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--tinta); }
.kt-primary:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--tinta); }
.kt-btn:disabled { opacity: .6; cursor: wait; transform: none; }
.kt-link {
  appearance: none; border: 0; background: none; padding: .2rem 0; min-height: 32px; cursor: pointer;
  font: 700 .92rem/1.3 var(--texto); color: var(--tinta);
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px;
}
.kt-link:hover { text-decoration-color: var(--naranja); }
.kt :is(button, input, textarea, select, summary, label):focus-visible { outline: 3px solid var(--naranja); outline-offset: 3px; }

/* Formularios */
.kt-fields { border: 0; margin: 0; padding: 0; min-inline-size: 0; }
.kt-stack { display: grid; gap: 1rem; }
.kt-row { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; }
.kt-acciones { margin-top: .4rem; gap: 1rem 1.4rem; }
.kt-label { display: grid; gap: .35rem; min-width: 0; }
.kt-label > span { font-weight: 700; font-size: .92rem; }
.kt input:not([type="checkbox"], [type="radio"]), .kt select, .kt textarea {
  display: block; width: 100%; min-width: 0; min-height: 46px; padding: .65rem .75rem;
  border: var(--linea); border-radius: 0; background: var(--blanco); color: var(--tinta);
  font: 400 1rem/1.5 var(--texto); scroll-margin-block: 1rem;
}
.kt :is(input, textarea, select)::placeholder { color: #756a5d; }
.kt textarea { min-height: 5rem; resize: vertical; }
.kt textarea.kt-tall { min-height: 11rem; }
.kt input[type="checkbox"] { width: 1.2rem; height: 1.2rem; accent-color: var(--tinta); margin: 0; }
.kt-check { display: flex; align-items: center; gap: .6rem; font-weight: 600; }
.kt-help { color: var(--tinta2); font-size: .92rem; }

/* Paso 1 */
.kt-resumen {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .3rem .75rem;
  padding: .6rem .75rem; background: var(--papel2); border: var(--linea);
}
.kt-resumen p { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kt-subir { display: grid; justify-items: start; gap: .6rem; padding: 1.2rem; border: 2px dashed var(--tinta); background: var(--papel); cursor: pointer; }
.kt-subir:focus-within { outline: 3px solid var(--naranja); outline-offset: 3px; }
.kt-bloque { display: grid; gap: .9rem; padding-top: 1rem; border-top: var(--linea); }
.kt-bloque > h3 { font-family: var(--display); font-weight: 400; font-size: 1.6rem; line-height: 1; letter-spacing: .01em; }

/* Tarjetas, citas y estados */
.kt-card { padding: .9rem; border: var(--linea); background: var(--blanco); min-width: 0; }
.kt-card summary { cursor: pointer; font-weight: 700; overflow-wrap: anywhere; }
.kt-card details > :not(summary), .kt-card > summary + * { margin-top: .6rem; }
.kt-quote {
  padding: .55rem .75rem; border-left: 6px solid var(--tinta); background: var(--papel2);
  color: var(--tinta); font-size: .88rem; line-height: 1.45; overflow-wrap: anywhere;
}
.kt-error {
  margin-bottom: 1rem !important; font-size: .92rem; font-weight: 600; color: var(--tinta);
  background: var(--blanco); border: var(--linea); border-left: 10px solid var(--naranja); padding: .7rem .8rem;
}
#kt-feedback { margin-bottom: .85rem; color: var(--tinta2); }
.kt-access { max-width: 670px; }
.kt-access > :not(:first-child) { margin-top: .9rem; }
.kt .kt-mobile-offer { display: none; }

.kt-dialog {
  width: min(680px, calc(100% - 1.5rem)); max-height: min(85dvh, 820px); padding: 0; border: var(--linea);
  border-radius: 0; color: var(--tinta); margin: auto; background: var(--blanco); overscroll-behavior: contain;
}
.kt-dialog::backdrop { background: #24201Ccc; }
.kt-dialog-head {
  display: flex; justify-content: space-between; align-items: center; gap: .5rem;
  background: var(--blanco); position: sticky; top: 0; padding: .8rem 1rem; border-bottom: var(--linea);
}
.kt-dialog-body { padding: 1rem; overflow-wrap: anywhere; }
.kt-paper p, .kt-paper li { white-space: pre-wrap; line-height: 1.5; }
.kt-paper section { padding-top: .7rem; margin-top: .8rem; border-top: 2px solid var(--gris); }
.kt-paper section h3 { margin-bottom: .4rem; }
.kt-paper ul { padding-left: 1.25rem; }
.kt-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.kt input.kt-sr { width: 1px; height: 1px; min-height: 0; padding: 0; border: 0; }
.kt-subir { position: relative; }

@media (max-width: 700px) {
  .kt-workspace { grid-template-columns: minmax(0, 1fr); }
  .kt .kt-offer { display: none; }
  .kt .kt-mobile-offer { display: inline-flex; }
  .kt-tools [role="status"] { flex-basis: 100%; }
  .kt-heading { padding-top: .6rem; }
  .kt-panel { padding: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .kt-primary, .kt-opcion { transition: none; }
}

/* Pasos 2 a 4 */
.kt-resumen-cargo { grid-template-columns: auto minmax(0, 1fr); }
.kt-resumen-cargo p { white-space: normal; font-weight: 700; font-size: 1rem; }
.kt-plegable { border: var(--linea); background: var(--blanco); }
.kt-plegable > summary { cursor: pointer; padding: .75rem .9rem; font-weight: 700; list-style-position: inside; }
.kt-plegable[open] > summary { border-bottom: var(--linea); }
.kt-plegable > .kt-stack { padding: .9rem; }
.kt-card .kt-plegable { border-width: 2px; }
.kt-marcada { font-weight: 600; color: var(--tinta2); }
.kt-falta { color: var(--tinta); font-weight: 600; border-left: 6px solid var(--naranja); padding-left: .6rem; }
.kt-descarga { padding-bottom: .2rem; }
.kt [data-respaldo] details > summary { cursor: pointer; font-weight: 700; font-size: .9rem; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.kt [data-respaldo] details[open] > summary { margin-bottom: .6rem; }
.kt textarea[data-path$=".redaccion"] { min-height: 9rem; }
.kt-vistas { display: grid; gap: .6rem; }
.kt-vista {
  appearance: none; display: grid; gap: .15rem; text-align: left; cursor: pointer; width: 100%;
  padding: .75rem .9rem; border: var(--linea); background: var(--blanco); color: var(--tinta); font: inherit;
}
.kt-vista strong { font-weight: 750; line-height: 1.3; }
.kt-vista span { color: var(--tinta2); font-size: .88rem; }
.kt-vista:hover { background: var(--papel2); }
.kt-o { padding-top: .9rem; border-top: var(--linea); }
.kt-tipos { border: 0; margin: 0; padding: 0; display: grid; gap: .5rem; min-width: 0; }
.kt-tipos legend { font-weight: 700; font-size: .92rem; padding: 0; margin-bottom: .35rem; }
.kt-tipo { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .65rem; align-items: start; padding: .7rem .8rem; border: var(--linea); background: var(--blanco); cursor: pointer; }
.kt-tipo:has(input:checked) { background: var(--papel2); box-shadow: inset 6px 0 0 var(--tinta); }
.kt-tipo input { width: 1.15rem; height: 1.15rem; margin: .15rem 0 0; accent-color: var(--tinta); }
.kt-tipo strong { display: block; font-weight: 700; }
.kt-tipo small { display: block; color: var(--tinta2); font-size: .86rem; line-height: 1.4; margin-top: .15rem; }
.kt textarea.kt-respuesta { min-height: 8rem; }

/* ── Recorrido narrativo (capítulos) ── */
.kt-progreso { display: grid; gap: .6rem; }
.kt-segmentos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; list-style: none; margin: 0; padding: 0; }
.kt-segmentos li { height: 10px; border: var(--linea); background: var(--blanco); position: relative; overflow: hidden; }
.kt-relleno { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--tinta); transition: width .3s ease; }
.kt-segmentos li.is-actual .kt-relleno { background: var(--naranja); }
.kt-segmentos li.is-actual { box-shadow: 0 0 0 1px var(--tinta); }
.kt-capitulo { display: flex; align-items: center; gap: .9rem; min-height: 32px; }
.kt-capitulo p { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .6rem; }
.kt-capitulo strong { font-family: var(--display); font-weight: 400; font-size: 1.35rem; line-height: 1; letter-spacing: .01em; }
.kt-atras { white-space: nowrap; }

.kt-pantalla { display: grid; gap: 1.1rem; }
@media (prefers-reduced-motion: no-preference) {
  .kt-pantalla { animation: kt-entra .18s ease-out; }
  @keyframes kt-entra { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}
.kt-apoyo { color: var(--tinta2); font-size: 1rem; max-width: 46ch; }
.kt-reaccion {
  font-weight: 600; padding: .7rem .85rem; background: var(--papel2); border-left: 6px solid var(--naranja); max-width: 52ch;
}
.kt-continuar { padding-top: .3rem; }

/* Tarjetas seleccionables: área táctil amplia, marca visible y aria-pressed. */
.kt-opciones { display: grid; gap: .7rem; }
.kt-opcion {
  appearance: none; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .8rem; align-items: center;
  width: 100%; min-height: 56px; padding: .85rem 1rem; text-align: left; cursor: pointer;
  border: var(--linea); background: var(--blanco); color: var(--tinta); font: inherit;
  transition: transform .08s ease, box-shadow .08s ease, background .12s ease;
}
.kt-opcion:hover { background: var(--papel2); }
.kt-opcion[aria-pressed="true"] { background: var(--papel2); box-shadow: inset 6px 0 0 var(--tinta); }
.kt-opcion-texto { display: grid; gap: .2rem; }
.kt-opcion strong { font-weight: 700; font-size: 1.02rem; line-height: 1.3; }
.kt-opcion-texto > span { color: var(--tinta2); font-size: .9rem; line-height: 1.4; }
.kt-marca { width: 1.3rem; height: 1.3rem; border: var(--linea); border-radius: 50%; background: var(--blanco); display: grid; place-items: center; }
.kt-multiple .kt-marca { border-radius: 0; }
.kt-opcion[aria-pressed="true"] .kt-marca { background: var(--tinta); }
.kt-opcion[aria-pressed="true"] .kt-marca::after { content: ""; width: .45rem; height: .45rem; background: var(--naranja); }
.kt-multiple[aria-pressed="true"] .kt-marca::after { content: "✓"; width: auto; height: auto; background: none; color: var(--blanco); font-size: .8rem; font-weight: 800; line-height: 1; }
.kt-chips { grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.kt-chips-chicos { grid-template-columns: repeat(auto-fill, minmax(min(100%, 9.5rem), 1fr)); }
.kt-chips-chicos .kt-opcion { min-height: 48px; padding: .6rem .75rem; }
.kt-extra { padding: 1rem; border: var(--linea); border-top-width: 0; background: var(--papel); margin-top: -.7rem; }
.kt-opcion + .kt-extra { margin-top: -.7rem; }

/* Hallazgos, consejos y avisos: información real, sin celebración. */
.kt-hallazgo { border: var(--linea); background: var(--blanco); padding: .9rem 1rem; display: grid; gap: .5rem; }
.kt-hallazgo ul, .kt-consejo ul { margin: 0; padding-left: 1.15rem; display: grid; gap: .35rem; }
.kt-consejo { border: var(--linea); border-left: 10px solid var(--tinta); background: var(--papel2); padding: .85rem 1rem; display: grid; gap: .45rem; }
.kt-aviso { border: var(--linea); border-left: 10px solid var(--naranja); background: var(--blanco); padding: .8rem .9rem; display: grid; gap: .4rem; }
.kt-motivo { display: grid; gap: .25rem; padding: .7rem .85rem; background: var(--papel2); font-size: .95rem; }

/* Capítulo 3 */
.kt-operaciones { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.kt-operaciones li { display: flex; align-items: center; gap: .7rem; font-weight: 600; }
.kt-operaciones li::before { content: ""; width: .9rem; height: .9rem; border: 2px solid var(--tinta); border-right-color: transparent; border-radius: 50%; flex-shrink: 0; }
@media (prefers-reduced-motion: no-preference) {
  .kt-operaciones li::before { animation: kt-gira 1s linear infinite; }
  .kt-operaciones li:nth-child(2)::before { animation-delay: -.25s; }
  .kt-operaciones li:nth-child(3)::before { animation-delay: -.5s; }
  .kt-operaciones li:nth-child(4)::before { animation-delay: -.75s; }
  @keyframes kt-gira { to { transform: rotate(360deg); } }
}
.kt-revelacion { display: grid; gap: 1rem; }
.kt-revelacion h2 { font-size: clamp(2.4rem, 9vw, 3.4rem); }
.kt-indicadores { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border: var(--linea); background: var(--blanco); }
.kt-indicadores li { display: grid; grid-template-columns: 3.2rem minmax(0, 1fr); align-items: center; gap: .8rem; padding: .7rem .9rem; }
.kt-indicadores li + li { border-top: 2px solid var(--gris); }
.kt-indicadores b { font-family: var(--display); font-weight: 400; font-size: 2.3rem; line-height: 1; }

/* Capítulo 4 */
.kt-seccion-cabeza { display: flex; justify-content: space-between; align-items: baseline; gap: .8rem; flex-wrap: wrap; }
.kt-mover { display: flex; gap: 1rem; }
.kt-seccion-cabeza h3 { font-family: var(--display); font-weight: 400; font-size: 1.6rem; line-height: 1; letter-spacing: .01em; }
.kt-cargo > summary { font-size: .92rem; }
[data-question] { display: grid; gap: 1.1rem; }
/* «Tus CVs» (página de CVs terminados) */
.kt-mis-cvs { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.kt-mis-cvs li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem;
  padding: .8rem; border: var(--linea); background: var(--blanco); }
.kt-mis-cvs li > div:first-child { display: grid; gap: .15rem; }
.kt-mis-cvs a.kt-btn { text-decoration: none; }
.kt-otro-cv { margin-top: 1rem; }
.kt-otro-cv form { margin: 0; }
