:root {
  --tinta: #26262E;
  --fondo: #E7E2DB;
  --papel: #F3F1F6;
  --linea: #DCD6CE;
  --ladrillo: #BA3440;
  --ladrillo-f: #97282F;
  --terracota: #CE8273;
  --oliva: #5C6A43;
  --salvia: #A7B4A8;
  --rosa: #A85765;
  --rojo: #BA3440;
  --amarillo: #CE8273;
  --verde: #5C6A43;
  --texto-sec: #3d3d44;
  --texto-ter: #6b6b70;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--fondo);
  color: var(--tinta);
  font-family: 'Montserrat', system-ui, sans-serif;
  line-height: 1.55;
}

body { padding: 32px 16px 64px; }
body.is-full-bleed { padding: 0; }

.pf { font-family: 'Playfair Display', Georgia, serif; }

.screen { display: none; }
.screen.active { display: block; }

.sheet {
  background: var(--papel);
  border: 1px solid var(--linea);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(38, 38, 46, .12);
}

.eyebrow {
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ladrillo);
  font-weight: 700;
  margin: 0 0 14px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* focus visibility (a11y) */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--rosa);
  outline-offset: 2px;
}

/* ---------- Botones genéricos (captura + informe) ---------- */
.btn {
  display: inline-block;
  text-decoration: none;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 14px;
  padding: 13px 24px;
  border-radius: 26px;
  border: none;
  cursor: pointer;
  transition: opacity .15s ease, transform .1s ease;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.p { background: var(--ladrillo); color: #fff; }
.btn.p:not(:disabled):hover { opacity: .92; }
.btn.s { background: transparent; color: var(--tinta); border: 1px solid var(--linea); }
.btn.s:not(:disabled):hover { background: rgba(38,38,46,.05); }
.btn.dark { background: transparent; color: #F3F1F6; border: 1px solid #565660; }
.btn-block { display: block; width: 100%; text-align: center; }

/* ---------- Campos de formulario (captura) ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 6px; color: var(--tinta); }
.field input {
  width: 100%; font: inherit; font-size: 15px; padding: 12px 14px;
  border: 1px solid var(--linea); border-radius: 10px; background: #fff; color: var(--tinta);
}
.field input:invalid[data-touched="true"] { border-color: var(--ladrillo); }
.field-error { font-size: 12px; color: var(--ladrillo-f); margin-top: 5px; min-height: 15px; }
.landing-actions { margin-top: 22px; }
.privacy-note { font-size: 11.5px; color: var(--texto-ter); margin: 14px 0 0; }

/* =====================================================================
   LANDING — página real de punta a punta (no una tarjeta flotante).
   Cada .land-band es una franja a todo el ancho con su propio fondo;
   .land-wrap centra el contenido con un ancho máximo, como un sitio real.
   ===================================================================== */
.land-page { font-family: 'Montserrat', system-ui, sans-serif; color: var(--tinta); line-height: 1.5; }
.land-band { width: 100%; }
.land-wrap { max-width: 1160px; margin: 0 auto; padding-left: 48px; padding-right: 48px; }

.land-band--nav { background: var(--papel); border-bottom: 1px solid var(--linea); }
.land-nav { display: flex; align-items: center; justify-content: space-between; padding-top: 22px; padding-bottom: 22px; }
.land-mark { height: 68px; width: auto; display: block; margin: 6px 0; }
.land-pill { font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ladrillo); border: 1px solid var(--ladrillo); padding: 6px 13px; border-radius: 20px; }

.land-band--hero { background: var(--fondo); }
.land-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; padding-top: 64px; padding-bottom: 64px; }
.land-eyebrow { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ladrillo-f); font-weight: 700; margin: 0 0 16px; }
.land-h1 { font-weight: 800; font-size: 52px; line-height: 1.05; margin: 0 0 20px; }
.land-h1 em { font-style: italic; color: var(--ladrillo); }
.land-sub { font-size: 17px; color: #3d3d44; margin: 0 0 24px; max-width: 42ch; }

.land-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 26px; }
.land-chip { font-size: 12.5px; font-weight: 600; background: var(--papel); border: 1px solid var(--linea); padding: 7px 14px; border-radius: 20px; display: inline-flex; gap: 6px; align-items: center; }
.land-chip b { color: var(--ladrillo); }

.land-cta {
  display: inline-block; background: var(--ladrillo); color: #fff; font-family: 'Montserrat', sans-serif;
  font-weight: 700; font-size: 15.5px; padding: 16px 28px; border-radius: 30px; border: none; cursor: pointer;
  box-shadow: 0 8px 22px rgba(186, 52, 64, .28); transition: opacity .15s ease;
}
.land-cta:hover { opacity: .93; }
.land-cta-dark { background: var(--tinta); box-shadow: none; }
.land-note { font-size: 12.5px; color: #6b6b70; margin: 14px 0 0; max-width: 36ch; }

.land-photo { position: relative; align-self: stretch; min-height: 380px; border-radius: 20px; overflow: hidden; box-shadow: 0 24px 50px rgba(38, 38, 46, .18); }
.land-photo-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; display: block; }

.land-teaser-pill {
  position: absolute; top: 16px; left: 16px; background: var(--papel); color: var(--tinta);
  font-size: 12px; font-weight: 700; padding: 8px 15px 8px 12px; border-radius: 20px;
  box-shadow: 0 8px 18px rgba(38, 38, 46, .22); display: inline-flex; align-items: center; gap: 7px;
}
.land-teaser-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--terracota); display: inline-block; flex: 0 0 auto; }

.land-band--find { background: var(--papel); }
.land-find { padding-top: 64px; padding-bottom: 12px; }
.land-find h3 { font-size: 26px; margin: 0 0 6px; }
.land-find-sub { font-size: 14px; color: #6b6b70; margin: 0 0 26px; }
.land-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.land-card { border: 1px solid var(--linea); border-radius: 14px; padding: 20px 20px 22px; background: var(--fondo); }
.land-card .ic { width: 32px; height: 32px; border-radius: 9px; background: var(--papel); display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.land-card .ic i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.land-card h4 { font-size: 14.5px; margin: 0 0 5px; font-weight: 700; }
.land-card p { font-size: 12.5px; color: #57575e; margin: 0; }

.land-band--pieces { background: var(--papel); }
.land-pieces { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; padding-top: 26px; padding-bottom: 20px; }
.land-pieces .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: #8a8a90; font-weight: 700; margin-right: 4px; }
.land-piece { font-size: 13.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.land-piece i { width: 8px; height: 8px; border-radius: 50%; background: var(--terracota); display: inline-block; }

.land-band--foot { background: var(--tinta); }
.land-foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 36px; padding-bottom: 36px; }
.land-foot-note { font-size: 13px; color: #c9c6cf; max-width: 44ch; margin: 0; }
.land-band--foot .land-cta-dark { background: var(--ladrillo); box-shadow: 0 8px 22px rgba(186, 52, 64, .28); }

@media (max-width: 900px) {
  .land-wrap { padding-left: 28px; padding-right: 28px; }
  .land-hero { grid-template-columns: 1fr; gap: 36px; padding-top: 44px; padding-bottom: 44px; }
  .land-h1 { font-size: 38px; }
  .land-photo { min-height: 440px; order: -1; }
  .land-cards { grid-template-columns: 1fr; }
  .land-foot { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .land-wrap { padding-left: 20px; padding-right: 20px; }
  .land-h1 { font-size: 32px; }
  .land-mark { height: 52px; margin: 4px 0; }
  .land-photo { min-height: 300px; }
}

/* =====================================================================
   CUESTIONARIO — ver Autodiagnostico_cuestionario_referencia.html
   ===================================================================== */
.bb-q { max-width: 680px; margin: 0 auto; }
.q-sheet {
  font-family: 'Montserrat', system-ui, sans-serif; color: var(--tinta); line-height: 1.5;
  background: var(--papel); border: 1px solid var(--linea); border-radius: 18px;
  overflow: hidden; box-shadow: 0 20px 50px rgba(38, 38, 46, .12);
}
.q-top { background: var(--fondo); padding: 20px 30px 22px; border-bottom: 1px solid var(--linea); }
.q-meta { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.q-meta-n { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #8a8a90; }
.q-meta-n b { color: var(--tinta); font-size: 15px; letter-spacing: 0; }
.q-meta-area { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ladrillo); display: inline-flex; align-items: center; gap: 7px; }
.q-meta-area i { width: 8px; height: 8px; border-radius: 50%; background: var(--ladrillo); display: inline-block; }

.q-segs { display: flex; gap: 6px; }
.q-seg { flex: 1; height: 6px; border-radius: 6px; background: #d5cec4; overflow: hidden; position: relative; }
.q-seg > i { display: block; height: 100%; background: var(--ladrillo); border-radius: 6px; width: 0; transition: width .2s ease; }
.q-seg.done > i { width: 100%; }
.q-seg.cur > i { width: 50%; }
.q-seg .lab { position: absolute; top: 11px; left: 0; font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: #a49c92; white-space: nowrap; }
.q-seg.done .lab, .q-seg.cur .lab { color: var(--ladrillo-f); font-weight: 700; }

.q-body { padding: 34px 30px 26px; }
.q-question { font-weight: 700; font-size: 27px; line-height: 1.22; margin: 0 0 24px; }
.q-opts { display: flex; flex-direction: column; gap: 12px; }
.q-opt {
  display: flex; align-items: center; gap: 15px; width: 100%; text-align: left; font: inherit; color: inherit;
  border: 1.5px solid var(--linea); background: #fff; border-radius: 14px; padding: 16px 18px; cursor: pointer;
  transition: border-color .12s, background .12s;
}
.q-opt:hover { border-color: var(--terracota); }
.q-opt .r { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #cbc3b8; position: relative; transition: border-color .12s; }
.q-opt .tx { font-size: 14.5px; color: #33333a; }
.q-opt[aria-pressed="true"] { border-color: var(--ladrillo); background: #FBF1F0; }
.q-opt[aria-pressed="true"] .r { border-color: var(--ladrillo); }
.q-opt[aria-pressed="true"] .r:after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--ladrillo); }
.q-opt[aria-pressed="true"] .tx { color: var(--tinta); font-weight: 600; }

.q-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 26px; }
.q-btn { font-weight: 700; font-size: 14.5px; padding: 13px 24px; border-radius: 28px; cursor: pointer; border: none; font-family: 'Montserrat', sans-serif; }
.q-btn.q-back { background: transparent; color: #8a8a90; border: 1px solid var(--linea); }
.q-btn.q-back:disabled { opacity: .4; cursor: not-allowed; }
.q-btn.q-next { background: var(--ladrillo); color: #fff; box-shadow: 0 6px 16px rgba(186, 52, 64, .26); }
.q-btn.q-next:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }

@media (max-width: 560px) {
  .q-question { font-size: 22px; }
  .q-seg .lab { display: none; }
}

/* =====================================================================
   CAPTURA (nombre/mail, al final del cuestionario)
   ===================================================================== */
.bb-gate { max-width: 520px; margin: 0 auto; }
.gate-sheet {
  background: var(--papel); border: 1px solid var(--linea); border-radius: 18px;
  padding: 34px 30px; box-shadow: 0 20px 50px rgba(38, 38, 46, .12);
}
.gate-sheet h1 { font-size: 24px; margin: 2px 0 22px; font-weight: 700; }

/* =====================================================================
   INFORME (#bb-report) — ver Autodiagnostico_informe_ejemplo_referencia.html
   ===================================================================== */
#bb-report { max-width: 660px; margin: 0 auto; }
#bb-report .hd { background: var(--fondo); padding: 30px 34px 26px; border-bottom: 1px solid var(--linea); }
.report-toolbar { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 34px 0; background: var(--papel); }
.report-toolbar .btn { font-size: 13px; padding: 10px 20px; }
.report-download-note { font-size: 11.5px; color: var(--ladrillo-f); margin: 0; text-align: center; max-width: 40ch; }
#bb-report .scorewrap { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
#bb-report .ring { flex: 0 0 auto; position: relative; width: 118px; height: 118px; }
#bb-report .ring .num { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
#bb-report .ring .num b { font-size: 34px; line-height: 1; }
#bb-report .ring .num span { font-size: 11px; color: var(--texto-ter); margin-top: 2px; }
#bb-report .arch h1 { font-size: 27px; margin: 2px 0 8px; font-weight: 700; }
#bb-report .arch p { margin: 0; font-size: 14px; color: var(--texto-sec); }
#bb-report .body { padding: 26px 34px 30px; }
#bb-report .sec-t { font-size: 20px; margin: 30px 0 4px; }
#bb-report .sec-t:first-child { margin-top: 0; }
#bb-report .sec-s { font-size: 13px; color: var(--texto-ter); margin: 0 0 18px; }
#bb-report .piece { border-top: 1px solid var(--linea); padding: 16px 0; }
#bb-report .piece-h { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; flex-wrap: wrap; }
#bb-report .dot { width: 11px; height: 11px; border-radius: 50%; flex: 0 0 auto; }
#bb-report .piece-h .name { font-weight: 700; font-size: 15px; flex: 1; }
#bb-report .piece-h .lvl { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 3px 9px; border-radius: 20px; }
#bb-report .lvl-verde { background: #e7ede2; color: var(--verde); }
#bb-report .lvl-amarillo { background: #f4e4dc; color: #a85a44; }
#bb-report .lvl-rojo { background: #f2dcdd; color: var(--ladrillo-f); }
#bb-report .bar { height: 7px; border-radius: 6px; background: #e3ded6; overflow: hidden; margin-bottom: 10px; }
#bb-report .bar > i { display: block; height: 100%; border-radius: 6px; }
#bb-report .piece p { margin: 0 0 8px; font-size: 13.5px; color: var(--texto-sec); }
#bb-report .step { font-size: 13px; background: var(--fondo); border-left: 3px solid var(--ladrillo); padding: 9px 13px; border-radius: 0 8px 8px 0; }
#bb-report .step b { color: var(--ladrillo-f); }
#bb-report .diag { background: var(--fondo); border-radius: 14px; padding: 20px 22px; margin-top: 6px; }
#bb-report .diag p { margin: 0; font-size: 14.5px; color: #2f2f36; }
#bb-report .diag .tag { display: inline-flex; flex-wrap: wrap; gap: 7px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--texto-ter); margin-bottom: 11px; }
#bb-report .diag .tag b { color: var(--oliva); }
#bb-report .diag .tag i { color: var(--ladrillo); font-style: normal; }
#bb-report .prio { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--linea); }
#bb-report .prio .n { font-size: 26px; color: var(--ladrillo); line-height: 1; flex: 0 0 auto; width: 26px; }
#bb-report .prio .pt { font-weight: 700; font-size: 14px; margin: 0 0 3px; }
#bb-report .prio .pd { font-size: 13px; color: var(--texto-sec); margin: 0; }
#bb-report .cta { background: var(--tinta); color: #F3F1F6; padding: 26px 34px 30px; }
#bb-report .cta h3 { font-size: 19px; margin: 0 0 6px; color: #fff; }
#bb-report .cta p { font-size: 13.5px; color: #c9c6cf; margin: 0 0 16px; }
#bb-report .cta .btn { margin: 0 8px 10px 0; }
#bb-report .sign { font-style: italic; font-size: 15px; color: #e7e2db; margin-top: 14px; }

/* ---------- Estados de carga ---------- */
.loading { text-align: center; padding: 60px 20px; color: var(--texto-ter); }

@media (max-width: 480px) {
  body { padding: 16px 0 48px; }
  body.is-full-bleed { padding: 0; }
  .q-top, .q-body,
  .gate-sheet,
  #bb-report .hd, #bb-report .body, #bb-report .cta { padding-left: 20px; padding-right: 20px; }
  .q-sheet, .gate-sheet, #bb-report .sheet { border-radius: 0; border-left: none; border-right: none; }
}

/* ---------- Descarga del informe (Ctrl/Cmd+P → Guardar como PDF, sin librerías) ---------- */
@media print {
  body { padding: 0; background: #fff; }
  .screen:not(#screen-report) { display: none !important; }
  .report-toolbar { display: none !important; }
  #bb-report { max-width: 100%; }
  #bb-report .sheet { box-shadow: none; border: none; border-radius: 0; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; color-adjust: exact; }
}
