:root {
  color-scheme: light;
  --ink: #291b3c;
  --muted: #665d70;
  --accent: #6339ab;
  --line: #e0d9e9;
  --soft: #f1ecf8;
  --paper: #fff;
  --canvas: #faf8fc;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button, input {
  font: inherit;
}

button, a, input {
  -webkit-tap-highlight-color: transparent;
}

button, a {
  touch-action: manipulation;
}

button {
  cursor: pointer;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: white;
}

button:disabled {
  opacity: .48;
  cursor: not-allowed;
}

button, .resource {
  min-height: 48px;
  border-radius: 12px;
  padding: 13px 22px;
  font-weight: 650;
}

.secondary {
  background: white;
  color: var(--accent);
  border-color: var(--line);
}

:focus-visible {
  outline: 3px solid #985ddd;
  outline-offset: 4px;
}

h1, h2, p {
  margin-top: 0;
}

h1 {
  font-size: clamp(1.8rem, 4.6vw, 3.2rem);
  line-height: 1.15;
  letter-spacing: -.035em;
}

h2 {
  font-size: 1.25rem;
  line-height: 1.4;
}

p {
  line-height: 1.7;
}

a {
  color: var(--accent);
}

.topbar {
  max-width: 1120px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 32px;
}

.brand {
  font-size: 2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
}

.brand img, .logo-yonggi {
  max-height: 38px;
  width: auto;
  display: block;
}

.tag {
  font-size: .8rem;
  border: 1px solid var(--line);
  padding: 7px 12px;
  border-radius: 99px;
  color: var(--muted);
}

main {
  max-width: 850px;
  margin: 30px auto 70px;
  padding: 0 28px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--accent);
  font-size: .74rem;
  font-weight: 750;
  margin-bottom: 14px;
}

.subtitle {
  font-size: 1.15rem;
  max-width: 680px;
  color: var(--muted);
}

.card {
  padding: clamp(22px, 4vw, 36px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
  margin: 28px 0;
  box-shadow: 0 8px 30px #291b3c05;
}

.intro-copy p:last-child {
  margin-bottom: 0;
}

.facts {
  display: flex;
  gap: 22px;
  color: var(--muted);
  font-size: .9rem;
  margin: 24px 0;
}

.navigation {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
}

.progress-label {
  color: var(--muted);
  font-size: .9rem;
  margin: 0 0 10px;
}

progress {
  width: 100%;
  height: 6px;
  accent-color: var(--accent);
  display: block;
  margin-bottom: 28px;
  border: 0;
  border-radius: 99px;
  overflow: hidden;
}

progress::-webkit-progress-bar {
  background: var(--line);
}

progress::-webkit-progress-value {
  background: var(--accent);
}

fieldset {
  padding: 0;
  margin: 0;
  border: 0;
  min-width: 0;
}

legend {
  font-size: clamp(1.3rem, 3.1vw, 1.8rem);
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 25px;
  letter-spacing: -.02em;
}

.options {
  display: grid;
  gap: 12px;
}

.option {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  line-height: 1.55;
  cursor: pointer;
  background: white;
}

.option:hover {
  border-color: #aa90cd;
}

.option:has(input:checked) {
  background: var(--soft);
  border-color: var(--accent);
}

.option input {
  accent-color: var(--accent);
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  margin: 3px 0 0;
}

.hint, .privacy {
  font-size: .85rem;
  color: var(--muted);
}

.summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.summary section {
  border-radius: 14px;
  background: var(--soft);
  padding: 24px;
}

.summary section:last-child {
  background: #f7f5fa;
}

.summary ul {
  padding-left: 19px;
  margin-bottom: 0;
}

.summary li {
  margin: 10px 0;
  line-height: 1.5;
}

.summary p {
  font-size: .92rem;
  margin-bottom: 0;
}

.summary + h2 {
  margin-top: 28px;
}

.contact-form {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  font-weight: 650;
}

.field input {
  width: 100%;
  min-height: 48px;
  padding: 12px;
  border: 1px solid #a99cb8;
  border-radius: 10px;
  background: white;
  color: var(--ink);
}

.contact-form button {
  justify-self: start;
}

.privacy {
  margin: 0;
}

.notice {
  color: #713045;
  font-size: .9rem;
  line-height: 1.6;
}

.notice:empty {
  display: none;
}

.resources {
  display: grid;
  gap: 12px;
}

.resource {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  text-decoration: none;
  border: 1px solid var(--line);
  background: white;
  color: var(--accent);
  width: 100%;
  text-align: left;
}

.resource:first-child {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.resource:hover {
  box-shadow: 0 3px 12px #291b3c17;
}

.resource span:last-child {
  font-size: 1.2rem;
}

.resource + .resource {
  margin-top: 0px;
}

.further {
  margin-top: 24px;
  padding: 20px;
  background: #f3f2f5;
  color: #635b6d;
  border-top: 1px solid #d5d0dc;
  border-radius: 12px;
}

.further h2 {
  font-size: 1rem;
}

.further p {
  font-size: .9rem;
  margin-bottom: 0;
}

.email-frame {
  width: 100%;
  height: 2100px;
  border: 1px solid #d5d0dc;
  background: #f2f1f5;
}

.email-status {
  font-size: .9rem;
  color: var(--muted);
  margin: 18px 0 12px;
}

footer {
  max-width: 1120px;
  padding: 24px 32px;
  margin: auto;
  border-top: 1px solid var(--line);
  font-size: .8rem;
  color: var(--muted);
}

pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  line-height: 1.65;
}

details {
  margin: 20px 0;
}

summary {
  cursor: pointer;
  font-weight: 650;
}

select {
  display: block;
  margin: 12px 0;
  padding: 10px;
}

[hidden] {
  display: none !important;
}

/* Responsivo */
@media (max-width: 600px) {
  .topbar {
    padding: 22px 20px;
  }
  main {
    padding: 0 20px;
    margin-top: 24px;
  }
  .summary {
    grid-template-columns: 1fr;
  }
  .card {
    margin: 22px 0;
  }
  .option {
    padding: 16px;
  }
  .tag {
    font-size: .72rem;
  }
  .contact-form button {
    width: 100%;
  }
  .facts {
    gap: 16px;
    flex-wrap: wrap;
  }
  .navigation button {
    flex: 1;
  }
  footer {
    padding: 24px 20px;
  }
}

/* Reglas de Impresión y Bloqueo previo a capturar lead */
.print-email {
  display: none;
}

@page {
  size: A4;
  margin: 10mm;
}

@media print {
  /* Si NO se ha capturado el correo, bloquea la impresión */
  body:not(.lead-capturado) * {
    display: none !important;
  }

  body:not(.lead-capturado)::before {
    content: "Debes registrar tu nombre y correo en la plataforma para acceder a los recursos gratuitos y obtener una copia de este reporte.";
    display: block !important;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    padding: 80px 20px;
    color: #291b3c;
    font-family: system-ui, -apple-system, sans-serif;
  }

  /* Si YA se capturó el correo, imprime el documento normalmente */
  body.lead-capturado {
    background: white;
    color: #342e3e;
  }
  body.lead-capturado .topbar, 
  body.lead-capturado footer, 
  body.lead-capturado noscript, 
  body.lead-capturado #app > :not(.print-email) {
    display: none !important;
  }
  body.lead-capturado main {
    max-width: none;
    margin: 0;
    padding: 0;
  }
  body.lead-capturado .print-email {
    display: block !important;
    font: 16px/1.6 Arial, sans-serif;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  body.lead-capturado .print-email tr {
    break-inside: avoid;
  }
  body.lead-capturado .print-email a {
    display: inline !important;
    padding: 0 !important;
    background: none !important;
    color: #38244d !important;
    border-radius: 0 !important;
    text-decoration: none;
  }
}