/* CasadeEmpleo CV maker — design system.
   Two-tier tokens (primitives → semantic) mirroring the extracted BetterCV
   system. UI chrome fonts (Roboto Serif / Nunito) are independent from the
   résumé document font (Montserrat) — never mix the two systems. */

:root {
  /* -- primitives (CasadeEmpleo brand: navy + orange) -- */
  --cde-navy: #103e6e;        /* marina — color de marca / primario */
  --cde-navy-2: #1a4f85;      /* navy más claro (hover, degradado IA) */
  --cde-navy-deep: #0c2e52;   /* superficies/hover oscuros */
  --cde-orange: #f08020;      /* naranja del logo — CTAs / acciones */
  --cde-orange-deep: #d96d15; /* hover de CTA */
  --navy-subtle-1: #eaf1f7;   /* fondos suaves (panel IA, chip activo) */
  --navy-subtle-2: #d6e3f0;
  --pattens-blue: #f6f8fb;
  --heading-ink: #17324a;
  --body-ink: #33414a;
  --muted-ink: #6d7c86;
  --border-subtle: #eef1f4;
  --green-ok: #2fb344;
  --amber: #f5b942;
  --red-warn: #ea5a5a;

  /* -- semantic -- */
  /* Navy es el primario omnipresente (stepper, foco, activos, seleccionados,
     checkboxes, niveles). Naranja se reserva para los botones de ACCIÓN. */
  --bg-brand-solid-1: var(--cde-navy);
  --bg-brand-solid-2: var(--cde-navy-deep);
  --text-brand-1: var(--cde-navy);
  --bg-brand-subtle-1: var(--navy-subtle-1);
  --bg-brand-subtle-2: var(--navy-subtle-2);
  --border-brand-1: var(--cde-navy);
  --cta: var(--cde-orange);
  --cta-hover: var(--cde-orange-deep);
  --bg-page: #ffffff;
  --bg-panel: var(--pattens-blue);

  /* -- spacing (4px ramp, extracted) -- */
  --sp-2: 2px; --sp-4: 4px; --sp-8: 8px; --sp-12: 12px;
  --sp-16: 16px; --sp-24: 24px; --sp-32: 32px; --sp-40: 40px; --sp-48: 48px;

  --radius-btn: 8px;
  --radius-input: 8px;
  --radius-card: 12px;
  --radius-modal: 16px;
  --shadow-cta: 4px 4px 20px 0 rgba(240, 128, 32, .28);
  --shadow-pop: 0 8px 32px rgba(12, 46, 82, .16);

  --font-display: "Roboto Serif", Georgia, serif;
  --font-ui: "Nunito", -apple-system, "Segoe UI", sans-serif;
  --font-doc: "Montserrat", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.cv-body {
  font-family: var(--font-ui);
  font-size: 16px;
  color: var(--body-ink);
  background: var(--bg-page);
  /* iOS: kill double-tap-to-zoom (keeps pinch-zoom + scrolling) */
  touch-action: manipulation;
}
[v-cloak] { display: none; }

button { font-family: var(--font-ui); cursor: pointer; }
input, select, textarea { font-family: var(--font-ui); }

/* ============ Top bar (editor) ============ */
.topbar {
  display: flex;
  align-items: center;
  gap: var(--sp-16);
  padding: 10px var(--sp-24);
  background: #fff;
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 30;
}
.topbar-brand { display: inline-flex; flex: 1; align-items: center; }
.topbar-brand img { display: block; height: 48px; width: auto; }
.topbar-saved { flex: 1; justify-content: flex-end; transition: opacity .3s; }

/* ============ Stepper ============ */
.stepper {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  padding: var(--sp-16) 0 0;
}
.stepper::-webkit-scrollbar { display: none; }
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-8);
  padding: 0 var(--sp-24) var(--sp-12);
  background: none;
  border: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted-ink);
  position: relative;
  white-space: nowrap;
}
.step::before {
  content: "";
  position: absolute;
  top: 28px;
  left: -40%;
  width: 80%;
  height: 1px;
  background: var(--border-subtle);
}
.step:first-child::before { display: none; }
.step .step-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  border: 2px solid #cfd8de;
  background: #fff;
  order: 2;
}
.step.done { color: var(--heading-ink); }
.step.done .step-dot { border-color: var(--bg-brand-solid-1); background: var(--bg-brand-solid-1); }
.step.active { color: var(--text-brand-1); }
.step.active .step-dot { border-color: var(--bg-brand-solid-1); background: #fff; box-shadow: inset 0 0 0 1.5px #fff, 0 0 0 3px var(--bg-brand-subtle-2); }

/* ============ Mobile bar (Editar/Vista previa + score) — desktop hidden ============ */
.mbar { display: none; }
.mtoggle {
  display: flex; gap: 4px; padding: 4px;
  background: var(--bg-panel); border-radius: 11px;
}
.mtoggle button {
  flex: 1; border: 0; background: none; padding: 10px 0;
  border-radius: 8px; font-size: 15px; font-weight: 700; color: var(--muted-ink);
  transition: background .12s, color .12s;
}
.mtoggle button.on { background: #fff; color: var(--text-brand-1); box-shadow: 0 1px 5px rgba(12,46,82,.12); }
.mscore { display: flex; align-items: center; gap: var(--sp-12); }
.mscore-ico { display: inline-flex; flex: none; }
.mscore-ico svg { display: block; }
.mscore-ico.s0 { color: #d6336c; }
.mscore-ico.s40 { color: #e5a50a; }
.mscore-ico.s75 { color: var(--green-ok); }
.mscore-ico.s100 { color: var(--cde-orange); }
.mscore-track { flex: 1; height: 8px; border-radius: 4px; background: #e6ebf0; overflow: hidden; }
.mscore-track i { display: block; height: 100%; border-radius: 4px; background: var(--green-ok); transition: width .45s ease; }
.mscore b { font-size: 14.5px; color: var(--heading-ink); flex: none; min-width: 40px; text-align: right; }

.mdesign { display: none; }
.step-dots { display: none; align-items: center; gap: 7px; }
.step-dots span {
  width: 8px; height: 8px; border-radius: 50%;
  background: #d3dae0; transition: background .15s, width .15s;
}
.step-dots span.on { background: var(--text-brand-1); width: 22px; border-radius: 4px; }

/* ============ Layout ============ */
.builder {
  display: flex;
  align-items: stretch;
  min-height: calc(100vh - 62px);
  position: relative;
}
.form-panel {
  flex: 0 0 50%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-subtle);
}
.form-scroll {
  flex: 1;
  padding: var(--sp-32) var(--sp-40) var(--sp-24);
  overflow-y: auto;
}
.preview-panel {
  flex: 0 0 50%;
  min-width: 0;
  background: var(--bg-panel);
  padding: var(--sp-16) var(--sp-32) var(--sp-32);
  position: relative;
}

/* section heading */
.sec-head { display: flex; align-items: center; gap: var(--sp-12); }
.sec-title {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  color: var(--heading-ink);
  margin: 0;
  line-height: 1.3;
}
.sec-sub { color: var(--muted-ink); font-size: 15px; margin: var(--sp-8) 0 var(--sp-24); }

/* tips dropdown */
.tips-wrap { margin-left: auto; position: relative; }
.tips-btn {
  display: inline-flex; align-items: center; gap: var(--sp-8);
  border: 0; background: var(--bg-brand-subtle-1);
  color: var(--heading-ink); font-size: 14px; font-weight: 600;
  padding: 9px 14px; border-radius: 20px;
}
.tips-btn .chev { transition: transform .15s; }
.tips-btn.open .chev { transform: rotate(180deg); }
.tips-pop {
  position: absolute; right: 0; top: calc(100% + 8px);
  width: 320px; background: #fff; border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card); box-shadow: var(--shadow-pop);
  padding: var(--sp-16); z-index: 20; font-size: 14px;
}
.tips-pop ul { margin: 0; padding-left: 18px; }
.tips-pop li { margin-bottom: var(--sp-8); }

/* ============ Inputs ============ */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-16) var(--sp-24); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 13.5px; font-weight: 600; color: var(--muted-ink); }
.input-wrap { position: relative; }
.input-wrap input, .input-wrap select {
  width: 100%;
  height: 48px;
  padding: 0 40px 0 14px;
  font-size: 15.5px;
  color: var(--body-ink);
  background: var(--bg-panel);
  border: 1px solid var(--bg-panel);
  border-radius: var(--radius-input);
  outline: none;
  transition: border-color .12s, background .12s, box-shadow .12s;
}
.input-wrap select { padding-right: 30px; appearance: none; }
.input-wrap input::placeholder { color: #a6b2ba; }
.input-wrap input:focus, .input-wrap select:focus {
  background: #fff;
  border-color: var(--border-brand-1);
  box-shadow: 0 0 0 3px rgba(16, 62, 110, .14);
}
.input-wrap .ok {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--green-ok);
  display: flex; align-items: center; justify-content: center;
}
.input-wrap .ok svg { display: block; }
.phone-row { display: flex; gap: var(--sp-8); }
.phone-row .code { width: 108px; flex: none; }
.phone-row .num { flex: 1; }

.reveal-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 0; padding: 0;
  color: var(--text-brand-1); font-size: 15px; font-weight: 600;
  margin-top: var(--sp-24);
}
.reveal-toggle .chev { transition: transform .15s; }
.reveal-toggle.open .chev { transform: rotate(180deg); }

.checkbox {
  display: inline-flex; align-items: center; gap: var(--sp-8);
  font-size: 15px; color: var(--body-ink); cursor: pointer; user-select: none;
}
.checkbox input { display: none; }
.checkbox .box {
  width: 20px; height: 20px; border-radius: 5px;
  border: 1.5px solid #c3cdd4; background: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .12s;
}
.checkbox input:checked + .box { background: var(--bg-brand-solid-1); border-color: var(--bg-brand-solid-1); }
.checkbox .box svg { opacity: 0; transform: scale(.5); transition: all .12s; }
.checkbox input:checked + .box svg { opacity: 1; transform: scale(1); }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-8);
  height: 48px; padding: 0 var(--sp-24);
  border-radius: var(--radius-btn);
  font-size: 16px; font-weight: 700;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background .12s, box-shadow .12s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--cta); color: #fff;
  border-color: var(--cta);
  box-shadow: var(--shadow-cta);
}
.btn-primary:hover { background: var(--cta-hover); border-color: var(--cta-hover); }
.btn-secondary {
  background: #fff; color: var(--text-brand-1);
  border-color: var(--border-brand-1);
}
.btn-secondary:hover { background: var(--bg-brand-subtle-1); }
.btn-ghost { background: none; border: 0; color: var(--text-brand-1); font-weight: 700; }
.btn-ai {
  display: inline-flex; align-items: center; gap: 7px;
  background: linear-gradient(92deg, var(--cde-navy-2), var(--cde-navy));
  color: #fff; border: 0; border-radius: 999px;
  height: 38px; padding: 0 var(--sp-16);
  font-size: 14.5px; font-weight: 700;
  box-shadow: 0 4px 14px rgba(122, 92, 255, .3);
}
.btn-ai:hover { filter: brightness(1.12); }
.btn-back { background: #fff; color: var(--heading-ink); border: 1px solid var(--border-subtle); }
.btn-back:hover { background: var(--bg-panel); }

.form-nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: var(--sp-16) var(--sp-40);
  border-top: 1px solid var(--border-subtle);
  background: #fff;
  position: sticky; bottom: 0; z-index: 10;
}
.form-nav .spacer { flex: 1; }

/* ============ Entry cards (experience / education / extras) ============ */
.entry-card {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  margin-bottom: var(--sp-16);
  background: #fff;
}
.entry-head {
  display: flex; align-items: center; gap: var(--sp-12);
  padding: var(--sp-16) var(--sp-24);
  cursor: pointer;
}
.entry-head .entry-label { flex: 1; min-width: 0; }
.entry-head .entry-label .l1 { font-weight: 700; color: var(--heading-ink); font-size: 15.5px; }
.entry-head .entry-label .l2 { color: var(--muted-ink); font-size: 13.5px; margin-top: 2px; }
.icon-btn {
  background: none; border: 0; padding: 6px;
  color: var(--muted-ink); border-radius: 6px;
  display: inline-flex;
}
.icon-btn:hover { background: var(--bg-panel); color: var(--heading-ink); }
.entry-body { padding: 0 var(--sp-24) var(--sp-24); }
.entry-body .grid-2 { margin-bottom: var(--sp-16); }
.add-more {
  display: inline-flex; align-items: center; gap: var(--sp-8);
  background: none; border: 0; padding: var(--sp-8) 0;
  color: var(--text-brand-1); font-size: 15.5px; font-weight: 700;
}

/* dates */
.dates-row { display: flex; align-items: center; gap: var(--sp-8); }
.dates-row .sep { color: var(--muted-ink); }
.date-field { position: relative; flex: 1; }
.date-pop {
  position: absolute; top: calc(100% + 6px); left: 0;
  width: 216px; background: #fff;
  border: 1px solid var(--border-subtle); border-radius: var(--radius-card);
  box-shadow: var(--shadow-pop); z-index: 25;
  padding: var(--sp-12);
}
.date-pop .year-head {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-weight: 700; color: var(--text-brand-1);
  padding: 6px; border-radius: 6px; cursor: pointer;
  background: var(--bg-brand-subtle-1);
}
.date-pop .months {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 4px; margin-top: var(--sp-8);
}
.date-pop .months button {
  border: 0; background: none; padding: 9px 0;
  border-radius: 6px; font-size: 14px; color: var(--body-ink); font-weight: 600;
}
.date-pop .months button:hover { background: var(--bg-brand-subtle-1); color: var(--text-brand-1); }
.date-pop .years {
  max-height: 200px; overflow-y: auto; margin-top: var(--sp-8);
}
.date-pop .years button {
  display: block; width: 100%; text-align: center;
  border: 0; background: none; padding: 8px 0;
  font-size: 14.5px; color: var(--body-ink); border-radius: 6px; font-weight: 600;
}
.date-pop .years button:hover { background: var(--bg-brand-subtle-1); }
.date-pop .years button.sel { color: var(--text-brand-1); font-weight: 800; }

/* ============ Rich text editor ============ */
.rt {
  border: 1px solid var(--bg-panel);
  background: var(--bg-panel);
  border-radius: var(--radius-card);
  transition: border-color .12s, background .12s;
}
.rt.focus { background: #fff; border-color: var(--border-brand-1); }
.rt-bar {
  display: flex; align-items: center; gap: 2px;
  padding: var(--sp-8) var(--sp-12);
}
.rt-bar .rt-btn {
  width: 30px; height: 30px; border: 0; background: none;
  border-radius: 6px; color: #5b6a74;
  display: inline-flex; align-items: center; justify-content: center;
}
.rt-bar .rt-btn:hover { background: var(--bg-brand-subtle-1); color: var(--heading-ink); }
.rt-bar .rt-ai { margin-left: auto; }
.rt-area {
  min-height: 150px;
  padding: var(--sp-8) var(--sp-16) var(--sp-16);
  font-size: 15px; line-height: 1.55; color: var(--body-ink);
  outline: none;
}
.rt-area:empty::before,
.rt-area.showghost::before {
  content: attr(data-ghost);
  color: #a6b2ba;
  white-space: pre-line;
  pointer-events: none;
  display: block;
}
.rt-area ul { margin: 0; padding-left: 22px; }
.rt-area li { margin-bottom: 4px; }

/* ============ AI panel ============ */
.ai-panel {
  position: absolute;
  top: var(--sp-16); right: var(--sp-16); bottom: var(--sp-16);
  width: min(460px, calc(100% - 32px));
  background: #fff;
  border-radius: var(--radius-modal);
  box-shadow: 0 12px 48px rgba(17, 42, 74, .22);
  z-index: 40;
  display: flex; flex-direction: column;
  padding: var(--sp-32);
  overflow: hidden;
}
.ai-panel h3 {
  font-family: var(--font-display); font-weight: 700;
  font-size: 24px; color: var(--heading-ink); margin: 0 0 var(--sp-8);
}
.ai-panel .ai-sub { color: var(--muted-ink); font-size: 14.5px; margin: 0 0 var(--sp-16); }
.ai-close {
  position: absolute; top: var(--sp-16); right: var(--sp-16);
  background: none; border: 0; color: var(--muted-ink); padding: 6px; border-radius: 6px;
}
.ai-close:hover { background: var(--bg-panel); }
.ai-list { overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: var(--sp-12); }
.ai-card {
  display: flex; gap: var(--sp-12); align-items: flex-start;
  border: 1px dashed #d5dde2; border-radius: var(--radius-card);
  padding: var(--sp-16);
  font-size: 14.5px; line-height: 1.5;
}
.ai-card.inserted { border-color: var(--border-brand-1); background: var(--bg-brand-subtle-1); border-style: solid; }
.ai-insert {
  flex: none; width: 32px; height: 32px;
  border: 1px solid var(--border-brand-1); background: #fff;
  color: var(--text-brand-1); border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .12s;
}
.ai-insert:hover { background: var(--bg-brand-subtle-2); }
.ai-card.inserted .ai-insert { background: var(--bg-brand-solid-1); border-color: var(--bg-brand-solid-1); color: #fff; cursor: default; }
.ts-widget { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 70; }
.ts-widget:empty { display: none; }

.ai-loading {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: var(--sp-16);
  color: var(--muted-ink); font-size: 15px; text-align: center;
}
.ai-spark {
  font-size: 40px;
  animation: sparkle 1.2s ease-in-out infinite;
}
@keyframes sparkle {
  0%, 100% { transform: scale(1); opacity: .75; }
  50% { transform: scale(1.18); opacity: 1; }
}

/* ============ Skills ============ */
.toggle {
  display: inline-flex; align-items: center; gap: var(--sp-12);
  cursor: pointer; user-select: none; font-size: 15.5px; font-weight: 600;
  color: var(--body-ink);
}
.toggle input { display: none; }
.toggle .tk {
  width: 46px; height: 26px; border-radius: 13px;
  background: #c3cdd4; position: relative; transition: background .15s;
}
.toggle .tk::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: left .15s;
}
.toggle input:checked + .tk { background: var(--bg-brand-solid-1); }
.toggle input:checked + .tk::after { left: 23px; }

.sugg-card {
  border: 1px solid var(--border-subtle); border-radius: var(--radius-card);
  background: #fff; margin-top: var(--sp-24); overflow: hidden;
}
.sugg-head {
  display: flex; align-items: center; gap: var(--sp-8);
  padding: var(--sp-16) var(--sp-24);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 15.5px; font-weight: 700; color: var(--heading-ink);
}
.sugg-head .who { color: var(--text-brand-1); }
.sugg-head .btn-ai { margin-left: auto; }
.chips { display: flex; flex-wrap: wrap; gap: var(--sp-12); padding: var(--sp-24); background: var(--bg-panel); }
.chip {
  border: 1px solid var(--border-subtle); background: #fff;
  border-radius: 8px; padding: 10px 16px;
  font-size: 14.5px; font-weight: 600; color: var(--body-ink);
  transition: all .12s;
}
.chip:hover { border-color: var(--border-brand-1); color: var(--text-brand-1); }
.chip.added { border-color: var(--border-brand-1); color: var(--text-brand-1); background: var(--bg-brand-subtle-1); }

.skill-row {
  display: flex; align-items: center; gap: var(--sp-12);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-card);
  padding: var(--sp-16) var(--sp-16);
  margin-top: var(--sp-16); background: #fff;
}
.skill-row .drag { color: #c3cdd4; flex: none; cursor: grab; }
.skill-row .field { flex: 1.2; }
.skill-row .lvl { flex: 1; }
.lvl-label { font-size: 13.5px; font-weight: 600; color: var(--muted-ink); }
.lvl-label b { color: var(--text-brand-1); font-weight: 700; }
.lvl-track { display: flex; gap: 3px; margin-top: 8px; }
.lvl-seg {
  flex: 1; height: 34px; border: 0; border-radius: 4px;
  background: var(--bg-brand-subtle-2); transition: background .12s;
}
.lvl-seg.on { background: var(--bg-brand-solid-1); }
.lvl-seg:first-child { border-radius: 8px 4px 4px 8px; }
.lvl-seg:last-child { border-radius: 4px 8px 8px 4px; }

/* ============ Summary structure cards ============ */
.struct-card {
  border: 1px solid var(--border-subtle); border-radius: var(--radius-card);
  background: var(--bg-panel);
  padding: var(--sp-24); margin-top: var(--sp-24);
}
.struct-card > .sc-t { font-weight: 700; color: var(--heading-ink); font-size: 15.5px; }
.struct-card > .sc-t .who { color: var(--text-brand-1); }
.struct-card > .sc-s { color: var(--muted-ink); font-size: 14px; margin: 4px 0 var(--sp-16); }
.struct-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-12); }
.struct-item {
  display: flex; gap: var(--sp-12); align-items: flex-start;
  background: #fff; border: 1px dashed #d5dde2; border-radius: var(--radius-card);
  padding: var(--sp-16); font-size: 13.5px; line-height: 1.5; text-align: left;
  cursor: pointer; transition: border-color .12s;
}
.struct-item:hover { border-color: var(--border-brand-1); }
.struct-item .plus {
  flex: none; width: 26px; height: 26px; border-radius: 7px;
  background: var(--bg-brand-solid-1); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700; line-height: 1;
}
.struct-item b { color: var(--heading-ink); }

/* ============ Finalize tiles ============ */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-16); }
.tile {
  display: flex; align-items: center; gap: var(--sp-12);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-card);
  background: #fff; padding: var(--sp-16) var(--sp-24);
  font-size: 15.5px; font-weight: 600; color: var(--heading-ink);
  transition: border-color .12s, box-shadow .12s;
}
.tile:hover { border-color: var(--border-brand-1); box-shadow: 0 4px 16px rgba(16,62,110,.12); }
.tile .t-ico {
  width: 38px; height: 38px; flex: none; border-radius: 10px;
  background: var(--bg-brand-subtle-1);
  display: inline-flex; align-items: center; justify-content: center; font-size: 19px;
}
.tile .t-plus { margin-left: auto; color: var(--muted-ink); font-size: 20px; font-weight: 400; }

/* ============ Preview panel ============ */
.preview-top {
  display: flex; align-items: center; gap: var(--sp-12);
  margin-bottom: var(--sp-16);
  flex-wrap: wrap;
}
.score-badge {
  display: inline-flex; align-items: center; gap: var(--sp-8);
  background: #fff; border-radius: 12px;
  padding: 9px 14px 9px 9px;
  box-shadow: 0 2px 10px rgba(17,42,74,.07);
  font-size: 15px; font-weight: 600; color: var(--heading-ink);
}
.score-pill {
  border-radius: 8px; padding: 4px 9px;
  font-size: 13.5px; font-weight: 800;
  transition: background .3s, color .3s;
}
.score-pill.s0 { background: #fde6ee; color: #d6336c; }
.score-pill.s40 { background: #fdf3d8; color: #a97a12; }
.score-pill.s75 { background: #e3f6e6; color: #2b8a3e; }
.score-pill.s100 { background: var(--green-ok); color: #fff; }
.score-emoji { display: inline-flex; }
.score-emoji svg { display: block; }
.score-emoji.s0 { color: #d6336c; }
.score-emoji.s40 { color: #e5a50a; }
.score-emoji.s75 { color: #2fb344; }
.score-emoji.s100 { color: #f76707; }
.tpl-wrap { margin-left: auto; position: relative; }
.tpl-btn {
  display: inline-flex; align-items: center; gap: var(--sp-8);
  background: #fff; border: 0; border-radius: 12px;
  padding: 12px 16px; font-size: 15px; font-weight: 700; color: var(--heading-ink);
  box-shadow: 0 2px 10px rgba(17,42,74,.07);
}
.tpl-btn:hover { color: var(--text-brand-1); }
.tpl-pop {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: #fff; border-radius: var(--radius-card);
  box-shadow: var(--shadow-pop); padding: var(--sp-16);
  display: flex; gap: var(--sp-12); z-index: 25;
}
.swatch {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid #fff; box-shadow: 0 0 0 1px #d5dde2;
  padding: 0;
}
.swatch.sel { box-shadow: 0 0 0 2px var(--bg-brand-solid-1); }

.sheet-wrap { position: relative; overflow: hidden; }
.sheet-scaler { transform-origin: top left; }
.sheet {
  width: 794px;
  min-height: 1123px;
  background: #fff;
  box-shadow: 0 6px 30px rgba(17, 42, 74, .12);
}

/* saved indicator */
.saved-dot {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--muted-ink); font-size: 13.5px; font-weight: 600;
}
.saved-dot .d { width: 8px; height: 8px; border-radius: 50%; background: var(--green-ok); }

/* ============ Résumé document (Celestial) ============ */
.doc {
  font-family: var(--font-doc);
  display: flex;
  min-height: 1123px;
  color: #2b2b2b;
}
.doc-side { width: 300px; flex: none; padding: 48px 30px; }
.doc-name {
  font-size: 26px; font-weight: 700; letter-spacing: .04em;
  line-height: 1.25; word-break: break-word;
}
.doc-name.ghost { opacity: .35; }
.doc-title { font-size: 13px; margin-top: 10px; font-weight: 500; }
.doc-side-h {
  font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  margin: 30px 0 12px; padding-bottom: 7px;
  border-bottom: 1px solid;
}
.doc-detail {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 10.5px; margin-bottom: 9px; line-height: 1.45;
  word-break: break-word;
}
.doc-detail svg { flex: none; margin-top: 2px; }
.doc-skill { font-size: 10.5px; margin-bottom: 9px; }
.doc-dots { display: inline-flex; gap: 3px; margin-top: 4px; margin-left: 10px; }
.doc-dot { width: 7px; height: 7px; border-radius: 1px; background: rgba(127,127,127,.25); }
.doc-dot.on { background: currentColor; }
.doc-ghost-line { height: 8px; border-radius: 4px; background: rgba(127,127,127,.14); margin-bottom: 8px; }
.doc-ghost-line.short { width: 60%; }

.doc-main { flex: 1; padding: 48px 40px; min-width: 0; }
.doc-section { margin-bottom: 26px; }
.doc-h {
  font-size: 12.5px; font-weight: 700; letter-spacing: .16em;
  border-bottom: 1.5px solid currentColor;
  padding-bottom: 7px; margin-bottom: 14px;
}
.doc-entry { margin-bottom: 16px; }
.doc-entry-dates { font-size: 10px; color: #8a9096; margin-bottom: 3px; }
.doc-entry-role { font-size: 12px; font-weight: 700; }
.doc-entry-org { font-size: 11px; color: #55595e; margin-top: 2px; }
.doc-body { font-size: 10.8px; line-height: 1.6; margin-top: 6px; }
.doc-body ul { margin: 0; padding-left: 16px; }
.doc-body li { margin-bottom: 3px; }
.doc-ghost-p { font-size: 10.8px; line-height: 1.6; color: #b3b9be; margin: 0; }

/* ============ Résumé document — Clásico (una columna serif) ============ */
.doc-clasico {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  padding: 44px 52px;
}
.dc-head { text-align: center; margin-bottom: 22px; }
.dc-name { font-size: 24px; font-weight: 700; letter-spacing: .08em; }
.dc-name.ghost { opacity: .35; }
.dc-title { font-size: 12px; font-style: italic; margin-top: 5px; }
.dc-contact { font-size: 10px; margin-top: 8px; color: #44484c; }
.dc-h {
  text-align: center; background: #efefef;
  font-size: 11px; font-weight: 700; letter-spacing: .18em;
  padding: 5px 0; margin: 18px 0 10px;
}
.dc-entry { margin-bottom: 12px; }
.dc-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.dc-role { font-size: 12px; font-weight: 700; }
.dc-dates { font-size: 10px; color: #6b7075; white-space: nowrap; }
.dc-org { font-size: 11px; font-style: italic; color: #44484c; margin-top: 1px; }
.dc-body { font-family: Georgia, serif; }
.dc-skills { font-size: 10.8px; text-align: center; line-height: 1.8; }

/* ============ Résumé document — Moderno (banda superior) ============ */
.doc-moderno { display: block; }
.dm-head { padding: 40px 48px 30px; }
.dm-name { font-size: 27px; font-weight: 700; letter-spacing: .02em; }
.dm-name.ghost { opacity: .5; }
.dm-title { font-size: 13px; margin-top: 5px; opacity: .92; }
.dm-contact { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 14px; font-size: 10px; opacity: .92; }
.dm-contact span { display: inline-flex; align-items: center; gap: 6px; }
.dm-cols { display: flex; gap: 36px; padding: 30px 48px; }
.dm-main { flex: 1.55; min-width: 0; }
.dm-aside { flex: 1; min-width: 0; }
.dm-sec { margin-bottom: 22px; }
.dm-h {
  font-size: 12px; font-weight: 700; letter-spacing: .14em;
  margin-bottom: 12px; position: relative; padding-bottom: 7px;
}
.dm-h i { position: absolute; left: 0; bottom: 0; width: 30px; height: 3px; border-radius: 2px; }
.dm-skill { font-size: 10.8px; margin-bottom: 9px; }
.dm-skill .dm-detail { color: #6b7075; margin-left: 6px; }
.dm-bar { display: block; height: 4px; background: #edf0f2; border-radius: 2px; margin-top: 4px; }
.dm-bar i { display: block; height: 100%; border-radius: 2px; }

/* ============ Résumé document — Mínimo ============ */
.doc-minimo { display: block; padding: 52px 56px; }
.dn-head { margin-bottom: 26px; }
.dn-name { font-size: 30px; font-weight: 400; letter-spacing: -.01em; }
.dn-name.ghost { opacity: .35; }
.dn-title { font-size: 11px; font-weight: 700; letter-spacing: .2em; margin-top: 6px; }
.dn-contact { font-size: 10px; color: #6b7075; margin-top: 10px; }
.dn-sec { margin-bottom: 20px; }
.dn-h {
  font-size: 10.5px; font-weight: 700; letter-spacing: .18em; color: #8a9096;
  border-top: 1px solid #e3e7ea; padding-top: 10px; margin-bottom: 10px;
}
.dn-entry { margin-bottom: 11px; }
.dn-row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.dn-role { font-size: 11.5px; font-weight: 700; }
.dn-org { font-weight: 400; color: #55595e; }
.dn-dates { font-size: 10px; color: #8a9096; white-space: nowrap; }
.dn-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.dn-pill {
  font-size: 9.8px; border: 1px solid #dde2e6; border-radius: 999px;
  padding: 3px 10px; color: #44484c;
}

/* ============ Résumé document — Ejecutivo (barra derecha) ============ */
.doc-ejecutivo { display: flex; }
.de-main { flex: 1; min-width: 0; padding: 48px 36px 48px 44px; }
.de-side { width: 264px; flex: none; padding: 48px 26px; }
.de-name-wrap { margin-bottom: 22px; }
.de-name { font-family: "Roboto Serif", Georgia, serif; font-size: 27px; font-weight: 700; }
.de-name.ghost { opacity: .35; }
.de-title { font-size: 12px; color: #55595e; margin-top: 4px; }
.de-h {
  font-family: "Roboto Serif", Georgia, serif;
  font-size: 12.5px; font-weight: 700; letter-spacing: .1em;
  border-bottom: 2.5px solid; padding-bottom: 6px; margin: 20px 0 12px;
}

/* ============ Résumé document — Línea (cronología) ============ */
.doc-linea { display: block; padding: 48px 54px; }
.dl-head { margin-bottom: 24px; }
.dl-name { font-size: 27px; font-weight: 700; }
.dl-name.ghost { opacity: .35; }
.dl-title { font-size: 12.5px; color: #55595e; margin-top: 3px; }
.dl-rule { width: 46px; height: 4px; border-radius: 2px; margin-top: 12px; }
.dl-contact { font-size: 10px; color: #6b7075; margin-top: 12px; }
.dl-sec { margin-bottom: 20px; }
.dl-h {
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .16em; margin-bottom: 12px;
}
.dl-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dl-timeline { border-left: 1.5px solid #e3e7ea; padding-left: 18px; margin-left: 3px; }
.dl-entry { position: relative; margin-bottom: 14px; }
.dl-mark {
  position: absolute; left: -23.5px; top: 3px;
  width: 7px; height: 7px; border-radius: 50%;
  background: #fff; border: 2px solid;
}

/* ============ Gallery (onboarding paso 1) ============ */
.gal-progress {
  display: flex; align-items: center; justify-content: center;
  gap: 0; padding: var(--sp-24) var(--sp-16) 0;
}
.gal-progress .gp-step { display: flex; align-items: center; gap: var(--sp-8); }
.gal-progress .gp-num {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  border: 1.5px solid #c3cdd4; color: var(--muted-ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; background: #fff;
}
.gal-progress .gp-label { font-size: 14.5px; font-weight: 600; color: var(--muted-ink); white-space: nowrap; }
.gal-progress .gp-step.active .gp-num { background: var(--bg-brand-solid-1); border-color: var(--bg-brand-solid-1); color: #fff; }
.gal-progress .gp-step.active .gp-label { color: var(--heading-ink); }
.gal-progress .gp-line { width: 72px; height: 1.5px; background: #dde4e9; margin: 0 var(--sp-16); }

.resume-banner {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: var(--sp-16);
  max-width: 720px; margin: var(--sp-24) auto 0;
  background: var(--bg-brand-subtle-1);
  border: 1px solid var(--bg-brand-subtle-2);
  border-radius: var(--radius-card);
  padding: var(--sp-16) var(--sp-24);
  font-size: 15.5px; color: var(--heading-ink);
}
.fork-wrap .resume-banner { margin-bottom: var(--sp-32); margin-top: 0; }

.gal-hero { text-align: center; padding: var(--sp-32) var(--sp-16) 0; }
.gal-hero h1 {
  font-family: var(--font-display); font-size: 44px; font-weight: 700;
  color: var(--heading-ink); margin: 0 0 var(--sp-12); line-height: 1.25;
}
.gal-hero p { color: var(--muted-ink); font-size: 16.5px; margin: 0 0 var(--sp-12); }

.gal-tabs {
  display: flex; justify-content: center; gap: var(--sp-8);
  border-bottom: 1px solid var(--border-subtle);
  margin: var(--sp-32) auto 0; padding: 0 var(--sp-16);
  max-width: 1240px; overflow-x: auto;
}
.gal-tab {
  background: none; border: 0; padding: 12px 18px;
  font-size: 15.5px; font-weight: 600; color: var(--muted-ink);
  border-bottom: 2.5px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.gal-tab.active { color: var(--text-brand-1); border-bottom-color: var(--cta); }
.gal-tab:hover { color: var(--heading-ink); }
.gal-tab.active:hover { color: var(--text-brand-1); }

.gal-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-40) var(--sp-32);
  max-width: 1240px; margin: var(--sp-40) auto; padding: 0 var(--sp-24) var(--sp-48);
}
.tcard { min-width: 0; }
.tcard-prev {
  position: relative; overflow: hidden; cursor: pointer;
  border: 1px solid var(--border-subtle); border-radius: var(--radius-card);
  background: #fff; height: 500px;
  box-shadow: 0 4px 18px rgba(17,42,74,.06);
  transition: box-shadow .15s, transform .15s;
}
.tcard-prev:hover { box-shadow: 0 10px 32px rgba(17,42,74,.14); }
.tcard-scaler { transform-origin: top left; pointer-events: none; }
.tcard-hover {
  position: absolute; inset: 0; z-index: 3;
  background: rgba(46, 64, 74, .38);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .15s;
}
.tcard-prev:hover .tcard-hover, .tcard-prev:focus-within .tcard-hover { opacity: 1; }
.tcard-meta { display: flex; align-items: center; gap: var(--sp-8); margin-top: var(--sp-16); }
.tcard-meta .badge {
  margin-left: auto; background: #aebac3; color: #fff;
  font-size: 11.5px; font-weight: 800; letter-spacing: .04em;
  border-radius: 4px; padding: 3px 8px;
}
.tcard h3 {
  font-family: var(--font-display); font-size: 21px; font-weight: 700;
  color: var(--heading-ink); margin: var(--sp-8) 0 var(--sp-4);
}
.tcard .tdesc { color: var(--muted-ink); font-size: 14.5px; line-height: 1.5; margin: 0; }

@media (max-width: 1023px) { .gal-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) {
  .gal-grid { grid-template-columns: 1fr; max-width: 420px; }
  .gal-hero h1 { font-size: 32px; }
  .gal-progress .gp-label { display: none; }
  .gal-progress .gp-step.active .gp-label { display: inline; }
  .gal-progress .gp-line { width: 32px; }
}

/* ============ Fork (onboarding paso 1.5) ============ */
.fork-wrap {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 90px var(--sp-24) 110px;
}
.fork-wrap h1 {
  font-family: var(--font-display); font-size: 36px; font-weight: 700;
  color: var(--heading-ink); margin: 0 0 var(--sp-40); text-align: center; line-height: 1.3;
}
.fork-cards { display: flex; gap: var(--sp-24); flex-wrap: wrap; justify-content: center; }
.fork-card {
  width: 300px; background: #fff; text-align: left;
  border: 1px solid var(--border-subtle); border-radius: var(--radius-modal);
  padding: var(--sp-32) var(--sp-24);
  transition: box-shadow .15s, transform .15s, border-color .15s;
  position: relative;
}
.fork-card:not(.disabled):hover {
  box-shadow: 0 12px 36px rgba(17,42,74,.13);
  transform: translateY(-3px); border-color: var(--border-brand-1); cursor: pointer;
}
.fork-card .f-ico { font-size: 34px; }
.fork-card .f-t { font-size: 19px; font-weight: 800; color: var(--heading-ink); margin: var(--sp-12) 0 var(--sp-8); }
.fork-card .f-s { font-size: 14.5px; color: var(--muted-ink); line-height: 1.5; }
.fork-card.disabled { opacity: .62; }
.fork-card .f-soon {
  position: absolute; top: var(--sp-16); right: var(--sp-16);
  background: var(--navy-subtle-2); color: var(--cde-navy);
  font-size: 11.5px; font-weight: 800; border-radius: 999px; padding: 4px 10px;
}
.fork-foot { margin-top: var(--sp-48); color: var(--muted-ink); font-size: 13px; }

/* ============ Template switcher popover (editor) ============ */
.tpl-pop-big {
  width: 420px; flex-direction: column; gap: var(--sp-16);
}
.tplgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-12); }
.tpl-thumb {
  border: 2px solid var(--border-subtle); border-radius: 10px;
  background: #fff; padding: 0 0 6px; overflow: hidden;
  font-size: 12.5px; font-weight: 700; color: var(--body-ink);
  transition: border-color .12s;
}
.tpl-thumb:hover { border-color: var(--cde-navy-2); }
.tpl-thumb.sel { border-color: var(--bg-brand-solid-1); color: var(--text-brand-1); }
.tpl-thumb-prev { height: 148px; overflow: hidden; pointer-events: none; margin-bottom: 6px; background: #fff; display: flex; justify-content: center; align-items: flex-start; }
.tpl-swatches { display: flex; gap: var(--sp-12); justify-content: center; padding-top: var(--sp-4); }

/* ============ Mini preview (tablet/mobile) ============ */
.mini-preview {
  display: none;
  position: fixed; right: 16px; bottom: 84px; z-index: 45;
  width: 118px; height: 167px;
  border-radius: 10px; overflow: hidden;
  box-shadow: 0 8px 28px rgba(17,42,74,.3);
  border: 0; padding: 0; background: #fff;
}
.mini-preview .sheet-scaler { pointer-events: none; }
.preview-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(17, 42, 74, .55);
  display: flex; align-items: flex-start; justify-content: center;
  padding: var(--sp-24); overflow-y: auto;
}
.preview-overlay .ov-close {
  position: fixed; top: 16px; right: 16px;
  width: 42px; height: 42px; border-radius: 50%;
  border: 0; background: #fff; color: var(--heading-ink);
  font-size: 20px; z-index: 61;
}

/* ============ Responsive ============ */
/* ============ Post-download CTA overlay ============ */
.done-overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(12, 46, 82, .55);
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-24);
}
.done-card {
  position: relative;
  width: 100%; max-width: 440px;
  background: #fff; border-radius: var(--radius-modal);
  padding: var(--sp-40) var(--sp-32) var(--sp-32);
  text-align: center;
  box-shadow: 0 20px 60px rgba(12, 46, 82, .35);
}
.done-x {
  position: absolute; top: var(--sp-16); right: var(--sp-16);
  background: none; border: 0; color: var(--muted-ink); padding: 6px; border-radius: 6px;
}
.done-x:hover { background: var(--bg-panel); }
.done-ico {
  width: 62px; height: 62px; border-radius: 50%;
  background: var(--green-ok);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: var(--sp-16);
  box-shadow: 0 6px 20px rgba(47, 179, 68, .4);
}
.done-card h2 {
  font-family: var(--font-display); font-size: 26px; font-weight: 700;
  color: var(--heading-ink); margin: 0 0 var(--sp-12);
}
.done-card p {
  color: var(--muted-ink); font-size: 15.5px; line-height: 1.55;
  margin: 0 auto var(--sp-24); max-width: 340px;
}
.done-cta {
  display: flex; width: 100%; margin-bottom: var(--sp-12);
}
.done-card .btn-ghost { width: 100%; height: 40px; }

/* ============ Responsive: BetterCV-style mobile (Editar / Vista previa) ============ */
@media (max-width: 1199px) {
  /* top bar keeps only the logo; stepper labels give way to the toggle + dots */
  .topbar { padding: 8px var(--sp-16); }
  .topbar .stepper { display: none; }
  .topbar-saved { display: none; }

  /* mobile bar visible + sticky under the top bar */
  .mbar {
    display: flex; flex-direction: column; gap: var(--sp-12);
    padding: var(--sp-12) var(--sp-16);
    background: #fff; border-bottom: 1px solid var(--border-subtle);
    position: sticky; top: 56px; z-index: 25;
  }

  .builder { flex-direction: column; min-height: 0; }
  .form-panel { flex: none; width: 100%; border-right: 0; }
  .form-scroll { max-width: 720px; margin: 0 auto; width: 100%; }
  .form-nav { padding: var(--sp-12) var(--sp-16); }

  /* the mini-thumbnail + tap overlay are replaced by the toggle */
  .mini-preview, .preview-overlay { display: none !important; }

  /* Editar mode → form only */
  .builder.m-edit .preview-panel { display: none; }
  /* Vista previa mode → résumé only, Diseño bar at the bottom */
  .builder.m-preview .form-panel { display: none; }
  .builder.m-preview .preview-panel {
    display: block; flex: none; width: 100%;
    background: var(--bg-panel);
    padding: var(--sp-24) var(--sp-16) 88px;
    min-height: calc(100vh - 160px);
  }
  /* hide the desktop score badge + top trigger, but keep .tpl-wrap so the
     Diseño button can still open the (fixed) bottom-sheet popover */
  .builder.m-preview .score-badge,
  .builder.m-preview .preview-top .tpl-btn { display: none; }
  .builder.m-preview .preview-top { margin: 0; min-height: 0; }
  /* scaled sheet fills the panel width from the left; transform:scale keeps a
     794px layout box, so centering would clip it — keep it flush-left. */
  .builder.m-preview .sheet-wrap { margin: 0 auto; }
  .builder.m-preview .mdesign {
    display: flex; justify-content: center; gap: var(--sp-12);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: var(--sp-12) var(--sp-16);
    background: #fff; border-top: 1px solid var(--border-subtle);
  }
  .mdesign .btn { padding: 0 var(--sp-16); }
  .mdesign-design { flex: 0 0 auto; }
  .mdesign-dl { flex: 1 1 auto; max-width: 260px; }

  /* template popover → bottom sheet */
  .tpl-pop-big {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto;
    width: 100%; max-height: 82vh; overflow-y: auto;
    border-radius: 18px 18px 0 0; z-index: 80;
    box-shadow: 0 -8px 32px rgba(12,46,82,.22);
  }
  .tplgrid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 767px) {
  .form-scroll { padding: var(--sp-24) var(--sp-16); }
  .grid-2 { grid-template-columns: 1fr; }
  .struct-grid { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: 1fr; }
  .sec-title { font-size: 24px; }
  .topbar { gap: var(--sp-8); padding: 8px var(--sp-12); }
  .topbar-brand { flex: none; }
  .topbar-brand img { height: 40px; }
  .form-nav { gap: var(--sp-8); padding: var(--sp-12) var(--sp-16); }
  .form-nav .next-label { display: none; }
  .step-dots { display: flex; }
  .tips-wrap { display: none; }
  .skill-row { flex-wrap: wrap; }
  .skill-row .field { flex: 1 1 100%; }
  .skill-row .lvl { flex: 1 1 70%; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ============ Print — the sheet IS the PDF ============ */
/* Base rule FIRST: the @media print overrides below must win the cascade. */
.print-root { position: absolute; left: -9999px; top: 0; width: 794px; }

@media print {
  /* remove the app entirely so it contributes zero pages */
  .topbar, .mbar, .stepper, .builder, .mini-preview, .preview-overlay { display: none !important; }
  body.cv-body { background: #fff; }
  .print-root {
    position: static !important;
    width: 210mm;
  }
  .print-root, .print-root * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .print-root .sheet { box-shadow: none; width: 210mm; min-height: auto; }
  /* Content-height, NOT a forced full page: iOS Safari ignores the margin:0
     below and adds its own margins, so a ~full-page block overflows onto a
     spurious 2nd page. Let the sheet be only as tall as the résumé. */
  .print-root .doc { min-height: 0; }
  @page { size: A4; margin: 0; }
}
