/* brand_id: 2f5c220a-502f-41ec-8444-9b1430ee145d
   Generador de CV (/candidatos/generador-de-cv/): asistente y vista previa con la identidad de LM (tinta #2D2C2C,
   dorado #E0AA30, Raleway). Las hojas del CV viven en cv-sheet.css. */
.cvb-body {
  --ink: #2D2C2C; --gold: #E0AA30; --paper: #FFFFFF; --mist: #F4F4F2; --line: #E2E1DD; --line-strong: #C9C8C3;
  --muted: #5F5E5A; --muted-ink: #CAC8C2; --danger: #9B1C1C; --ok: #1F6B45;
  --gutter: clamp(16px, 4vw, 56px); --ease: cubic-bezier(.2, .7, .2, 1);
  background: var(--mist); font-variant-numeric: lining-nums;
}
.cvb-wrap { width: min(1240px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.cvb-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cvb-gold { color: var(--gold); }

/* ---------- apertura ---------- */
.cvb-hero { background: var(--ink); color: var(--paper); padding-block: clamp(28px, 4vw, 56px) clamp(92px, 9vw, 128px); }
.cvb-crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .875rem; color: var(--muted-ink); margin-bottom: 20px; }
.cvb-crumbs a { color: var(--muted-ink); }
.cvb-eyebrow { margin: 0 0 12px; font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.cvb-hero h1 { margin: 0; max-width: 16em; color: var(--paper); font-size: clamp(2.2rem, 5vw, 3.8rem); line-height: 1.05; letter-spacing: -.02em; font-weight: 700; }
.cvb-lead { margin: 18px 0 0; max-width: 38em; font-size: clamp(1.05rem, 1.6vw, 1.2rem); line-height: 1.55; color: #E9E8E4; }
.cvb-checks { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 28px; }
.cvb-checks li { position: relative; padding-left: 30px; line-height: 1.5; color: #E9E8E4; }
.cvb-checks li::before { content: ""; position: absolute; left: 0; top: .15em; width: 20px; height: 20px; border-radius: 50%; background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232D2C2C' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center / 12px no-repeat; }
.cvb-checks b { color: var(--paper); }

/* ---------- asistente + vista previa ---------- */
.cvb-app { margin-top: clamp(-100px, -7vw, -64px); padding-bottom: clamp(48px, 7vw, 96px); }
.cvb-noscript { width: min(760px, 100% - 2 * var(--gutter)); margin: 0 auto 16px; padding: 16px 20px; border-radius: 12px; background: #FBF3DF; color: #6B4E0F; }
.cvb-grid { display: grid; gap: 28px; align-items: start; }
@media (min-width: 1000px) { .cvb-grid { grid-template-columns: minmax(0, 1fr) minmax(380px, 470px); } }
.cvb-panel { min-width: 0; background: var(--paper); border-radius: 20px; box-shadow: 0 30px 70px -40px rgb(45 44 44 / .45); padding: clamp(18px, 3.5vw, 40px); scroll-margin-top: 16px; }

.cvb-stepper ol { list-style: none; margin: 0 0 26px; padding: 0; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.cvb-stepper li { flex: 1; min-width: 0; }
.cvb-stepper button { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; padding: 6px 2px; border: 0; background: none; font: inherit; font-size: .8125rem; font-weight: 600; color: var(--muted); cursor: pointer; }
.cvb-stepper__n { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--line-strong); font-size: .875rem; font-weight: 700; transition: background-color .2s, box-shadow .2s; }
.cvb-stepper [aria-current="step"] { color: var(--ink); }
.cvb-stepper [aria-current="step"] .cvb-stepper__n { background: var(--gold); color: var(--ink); box-shadow: 0 0 0 5px rgb(224 170 48 / .22); }
.cvb-stepper .is-done .cvb-stepper__n { background: var(--ink); color: var(--paper); box-shadow: none; }
@media (max-width: 560px) { .cvb-stepper__l { display: none; } .cvb-stepper [aria-current="step"] .cvb-stepper__l { display: block; } }

.cvb-form { margin: 0; }
.cvb-step { margin: 0; padding: 0; border: 0; min-width: 0; }
.cvb-step[hidden] { display: none; }
.cvb-step legend { display: block; width: 100%; margin-bottom: 18px; padding: 0; font-size: clamp(1.35rem, 2.4vw, 1.7rem); font-weight: 700; line-height: 1.2; color: var(--ink); outline: none; }
.cvb-step__k { display: block; margin-bottom: 6px; font-size: .8125rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cvb-step__lead { margin: -6px 0 16px; color: var(--muted); }
.cvb-grid2 { display: grid; gap: 0 16px; }
@media (min-width: 640px) { .cvb-grid2 { grid-template-columns: 1fr 1fr; } .cvb-field--wide { grid-column: 1 / -1; } }
.cvb-field { margin-bottom: 16px; min-width: 0; }
.cvb-field label, .cvb-label { display: block; margin: 0 0 6px; font-size: .9375rem; font-weight: 600; color: var(--ink); }
.cvb-opt { font-weight: 500; font-size: .8125rem; color: var(--muted); }
.cvb-field input, .cvb-field select, .cvb-field textarea, .cvb-skill-add input {
  box-sizing: border-box; width: 100%; padding: 12px 14px; border: 1.5px solid var(--line-strong); border-radius: 10px; background: var(--paper);
  font: inherit; font-size: 1rem; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.cvb-field textarea { resize: vertical; min-height: 92px; line-height: 1.5; }
.cvb-field input:focus, .cvb-field select:focus, .cvb-field textarea:focus, .cvb-skill-add input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgb(224 170 48 / .28); }
.cvb-field [aria-invalid="true"] { border-color: var(--danger); }
.cvb-hint { margin: 6px 0 0; font-size: .8125rem; color: var(--muted); }
.cvb-count { margin: 4px 0 0; text-align: right; font-size: .75rem; color: var(--muted); }
.cvb-err { margin: 6px 0 0; font-size: .875rem; font-weight: 600; color: var(--danger); }
.cvb-err[hidden] { display: none; }

/* plantillas y colores */
.cvb-templates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
@media (min-width: 760px) { .cvb-templates { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cvb-tpl { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 10px; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .2s var(--ease); }
.cvb-tpl:hover { transform: translateY(-2px); }
.cvb-tpl input { position: absolute; opacity: 0; pointer-events: none; }
.cvb-tpl:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 3px rgb(224 170 48 / .55); }
.cvb-tpl:has(input:focus-visible) { outline: 3px solid var(--gold); outline-offset: 2px; }
.cvb-tpl__name { font-weight: 700; font-size: .9375rem; color: var(--ink); }
.cvb-tpl__note { font-size: .75rem; line-height: 1.4; color: var(--muted); }
.cvb-tpl__thumb { position: relative; display: block; aspect-ratio: 8.5 / 11; margin-bottom: 6px; border-radius: 6px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.cvb-tpl__thumb i { position: absolute; display: block; border-radius: 2px; background: #D9D7D1; }
.cvb-tpl__thumb i:nth-child(1) { left: 14%; right: 14%; top: 9%; height: 6%; background: var(--ink); }
.cvb-tpl__thumb i:nth-child(2) { left: 14%; right: 40%; top: 19%; height: 3%; background: var(--gold); }
.cvb-tpl__thumb i:nth-child(3) { left: 14%; right: 14%; top: 28%; height: 30%; background: repeating-linear-gradient(#D9D7D1 0 3px, transparent 3px 8px); }
.cvb-tpl__thumb i:nth-child(4) { left: 14%; right: 24%; top: 64%; height: 24%; background: repeating-linear-gradient(#D9D7D1 0 3px, transparent 3px 8px); }
.cvb-tpl__thumb--clasica i:nth-child(1) { left: 25%; right: 25%; }
.cvb-tpl__thumb--clasica i:nth-child(2) { left: 35%; right: 35%; background: #8B8A85; }
.cvb-tpl__thumb--moderna::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 32%; background: #FBF3DF; }
.cvb-tpl__thumb--moderna i { left: 40% !important; }
.cvb-tpl__thumb--ejecutiva::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 24%; background: var(--ink); border-top: 3px solid var(--gold); }
.cvb-tpl__thumb--ejecutiva i:nth-child(1) { background: #fff; }
.cvb-tpl__thumb--ejecutiva i:nth-child(3), .cvb-tpl__thumb--ejecutiva i:nth-child(4) { right: 36%; }
.cvb-tpl__thumb--operativa::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5%; background: var(--gold); }
.cvb-tpl__thumb--operativa i:nth-child(2) { left: 14%; right: 14%; height: 6%; background: #FBF3DF; }
.cvb-accents { display: flex; gap: 10px; margin-bottom: 22px; }
.cvb-swatch { position: relative; cursor: pointer; }
.cvb-swatch input { position: absolute; opacity: 0; pointer-events: none; }
.cvb-swatch__dot { display: block; width: 34px; height: 34px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 2px rgb(255 255 255 / .35); transition: box-shadow .15s, transform .15s; }
.cvb-swatch:hover .cvb-swatch__dot { transform: scale(1.08); }
.cvb-swatch input:checked + .cvb-swatch__dot { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--ink); }
.cvb-swatch input:focus-visible + .cvb-swatch__dot { outline: 3px solid var(--gold); outline-offset: 4px; }

/* foto */
.cvb-photo { margin: 4px 0 8px; }
.cvb-photo__row { display: flex; gap: 18px; align-items: flex-start; }
.cvb-photo__frame { flex: none; display: grid; place-items: center; width: 112px; height: 112px; border-radius: 50%; overflow: hidden; background: var(--mist); box-shadow: inset 0 0 0 1.5px var(--line-strong); font-size: .8125rem; color: var(--muted); touch-action: none; cursor: grab; }
.cvb-photo__frame img { width: 100%; height: 100%; object-fit: cover; }
.cvb-photo__frame img[hidden], .cvb-photo__frame span[hidden] { display: none; }
.cvb-photo__ctl { min-width: 0; flex: 1; }
.cvb-photo__adjust { margin-top: 12px; }
.cvb-photo__adjust[hidden] { display: none; }
.cvb-photo__adjust label { display: block; font-size: .875rem; font-weight: 600; }
.cvb-photo__adjust input[type="range"] { width: 100%; max-width: 240px; accent-color: var(--ink); }

/* elementos repetibles */
.cvb-items { display: grid; gap: 14px; margin-bottom: 12px; }
.cvb-item { padding: 16px 16px 4px; border: 1.5px solid var(--line); border-radius: 14px; background: #FCFCFB; }
.cvb-item__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.cvb-item__t { margin: 0; font-weight: 700; }
.cvb-item__tools { display: flex; gap: 4px; }
.cvb-item--row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 0 12px; align-items: end; padding-bottom: 0; }
.cvb-item--row .cvb-icon { margin-bottom: 20px; }
.cvb-icon { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; font: inherit; color: var(--muted); cursor: pointer; }
.cvb-icon:hover { background: var(--mist); color: var(--ink); }
.cvb-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; grid-column: 1 / -1; }
.cvb-dates [hidden] { visibility: hidden; display: block; }
.cvb-month { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(88px, 1fr); gap: 6px; }
.cvb-month select { padding-inline: 8px; }
@media (max-width: 520px) { .cvb-dates { grid-template-columns: 1fr; } .cvb-dates [hidden] { display: none; } }

.cvb-check { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 14px; line-height: 1.45; cursor: pointer; }
.cvb-check input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ink); }
.cvb-check--small { font-size: .9375rem; }

.cvb-example { margin: -4px 0 18px; padding: 14px 16px; border-left: 4px solid var(--gold); border-radius: 0 12px 12px 0; background: #FBF3DF; }
.cvb-example__text { margin: 0 0 10px; line-height: 1.55; }
.cvb-example[hidden], .cvb-suggest[hidden] { display: none; }

.cvb-skill-add { display: flex; gap: 8px; }
.cvb-skill-add .cvb-btn { flex: none; }
.cvb-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; padding: 0; }
.cvb-chips li { display: inline-flex; align-items: center; gap: 4px; padding: 6px 6px 6px 12px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: .875rem; font-weight: 600; }
.cvb-chips [data-skill-remove] { width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgb(255 255 255 / .16); color: inherit; font-size: .7rem; cursor: pointer; }
.cvb-chips--suggest li { padding: 0; background: none; }
.cvb-chips--suggest button { padding: 6px 12px; border: 1.5px dashed var(--line-strong); border-radius: 999px; background: var(--paper); font: inherit; font-size: .875rem; color: var(--ink); cursor: pointer; }
.cvb-chips--suggest button:hover { border-color: var(--ink); border-style: solid; }
.cvb-suggest { margin-bottom: 20px; }

.cvb-final { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.cvb-status { margin: 12px 0 0; font-weight: 600; color: var(--ok); }
.cvb-status:empty { display: none; }

/* botones */
.cvb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 22px; border: 0; border-radius: 10px; background: var(--gold); font: inherit; font-weight: 700; font-size: 1rem; color: var(--ink); cursor: pointer; text-decoration: none; transition: background-color .15s, transform .15s; }
.cvb-btn:hover { background: #EDC25E; }
.cvb-btn:active { transform: translateY(1px); }
.cvb-btn:focus-visible, .cvb-link:focus-visible, .cvb-icon:focus-visible, .cvb-stepper button:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.cvb-btn--ghost { background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.cvb-btn--ghost:hover { background: var(--mist); }
.cvb-btn--small { padding: 9px 14px; font-size: .9375rem; }
.cvb-btn--add { margin-bottom: 18px; }
.cvb-btn--add[hidden] { display: none; }
.cvb-btn--big { width: 100%; padding: 17px 22px; font-size: 1.125rem; box-shadow: 0 14px 30px -18px rgb(176 127 18 / .9); }
.cvb-btn--file { position: relative; overflow: hidden; }
.cvb-btn--file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.cvb-link { padding: 0; border: 0; background: none; font: inherit; font-size: .875rem; font-weight: 600; color: var(--ink); text-decoration: underline; cursor: pointer; }
.cvb-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; }

/* vista previa */
.cvb-preview { position: sticky; top: 84px; min-width: 0; }
.cvb-preview__bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.cvb-preview__tag { margin: 0; padding: 4px 12px; border-radius: 999px; background: rgb(255 255 255 / .92); font-size: .8125rem; font-weight: 700; letter-spacing: .04em; color: var(--ink); }
@media (min-width: 1000px) { .cvb-preview__close { display: none; } }
.cvb-preview__stage { position: relative; overflow: hidden; border-radius: 6px; box-shadow: 0 30px 60px -28px rgb(0 0 0 / .45), 0 0 0 1px rgb(0 0 0 / .04); background: #fff; }
.cvb-preview__sheet { position: absolute; left: 0; top: 0; width: 816px; transform-origin: 0 0; }
.cvb-break { position: absolute; left: 0; right: 0; height: 0; border-top: 2px dashed #E0AA30; }
.cvb-break::after { content: "Hoja siguiente"; position: absolute; right: 12px; top: 4px; padding: 2px 8px; border-radius: 4px; background: #E0AA30; font: 600 13px/1.4 system-ui, sans-serif; color: #2D2C2C; }
.cvb-fab { display: none; }
@media (max-width: 999px) {
  .cvb-preview { position: fixed; inset: 0; z-index: 60; padding: 16px; background: #222121; overflow-y: auto; visibility: hidden; opacity: 0; transition: opacity .2s; }
  .cvb-preview.is-open { visibility: visible; opacity: 1; }
  .cvb-preview__close { color: var(--paper); }
  .cvb-fab { display: block; position: fixed; right: 16px; bottom: 16px; z-index: 50; padding: 14px 20px; border: 0; border-radius: 999px; background: var(--ink); color: var(--paper); font: inherit; font-weight: 700; box-shadow: 0 14px 30px -12px rgb(0 0 0 / .55); cursor: pointer; }
  .cvb-lock, .cvb-lock body { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) { .cvb-tpl, .cvb-preview, .cvb-swatch__dot { transition: none; } }

/* guía y preguntas */
.cvb-guide { padding-block: clamp(40px, 6vw, 80px); background: var(--paper); }
.cvb-guide__grid { display: grid; gap: 40px; }
@media (min-width: 900px) { .cvb-guide__grid { grid-template-columns: 1.1fr 1fr; gap: 64px; } }
.cvb-guide h2 { margin: 0 0 18px; font-size: clamp(1.4rem, 2.6vw, 1.9rem); line-height: 1.2; }
.cvb-guide__list { margin: 0 0 18px; padding-left: 1.3em; display: grid; gap: 10px; line-height: 1.55; }
.cvb-guide a { color: var(--ink); font-weight: 600; }
.cvb-faq details { border-bottom: 1px solid var(--line); }
.cvb-faq summary { padding: 14px 0; font-weight: 700; cursor: pointer; }
.cvb-faq p { margin: 0 0 16px; line-height: 1.55; color: var(--muted); }

/* impresión: solo la hoja del CV */
.cvb-print { display: none; }
@media print {
  body > *:not(main), main > *:not(#cv-print), .cvb-fab { display: none !important; }
  .cvb-print { display: block !important; }
  main { margin: 0 !important; padding: 0 !important; }
}
