.assessment {
  /* ===== Safe-U · Autodiagnóstico ISO 27001 — branding ===== */
  & {
    --navy: #090b52;
    --navy-2: #12153f;
    --blue: #1201ff;
    --mint: #03ff9e;
    --white: #ffffff;
    --ink: #0d0f2b;
    --muted: #6b6f8a;
    --line: #e7e8f0;
    --bg: #f4f5fa;
    --radius: 16px;
    --shadow: 0 12px 40px rgba(9, 11, 82, 0.1);
    --font: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  }

  * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  & {
    scroll-behavior: smooth;
  }

  & {
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
  }

  /* ===== Screens ===== */
  .screen {
    display: none;
    min-height: 100vh;
  }
  .screen.is-active {
    display: block;
  }

  /* ===== Buttons ===== */
  .btn {
    font-family: inherit;
    font-weight: 700;
    font-size: 15px;
    border: none;
    border-radius: 10px;
    padding: 13px 22px;
    cursor: pointer;
    transition:
      transform 0.12s ease,
      background 0.15s ease,
      opacity 0.15s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  .btn:active {
    transform: translateY(1px);
  }
  .btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
  }
  .btn--lg {
    padding: 16px 30px;
    font-size: 16px;
  }
  .btn--block {
    width: 100%;
    justify-content: center;
  }
  .btn--accent {
    background: var(--mint);
    color: var(--navy);
  }
  .btn--accent:hover:not(:disabled) {
    background: #00e88f;
  }
  .btn--primary {
    background: var(--blue);
    color: #fff;
  }
  .btn--primary:hover:not(:disabled) {
    background: #1a0fff;
  }
  .btn--ghost {
    background: transparent;
    color: var(--navy);
    border: 1.5px solid var(--line);
  }
  .btn--ghost:hover {
    border-color: var(--navy);
  }

  /* ===== Hero / portada ===== */
  .screen--hero {
    background: var(--navy);
    color: #fff;
    position: relative;
    display: none;
    place-items: center;
    overflow: hidden;
  }
  .screen--hero.is-active {
    display: grid;
  }
  .hero-stripe {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
      -45deg,
      transparent 0,
      transparent 38px,
      rgba(3, 255, 158, 0.05) 38px,
      rgba(3, 255, 158, 0.05) 40px
    );
    pointer-events: none;
  }
  .hero-inner {
    position: relative;
    max-width: 720px;
    padding: 48px 24px;
    text-align: center;
  }
  .hero-logo {
    height: 30px;
    width: auto;
    margin-bottom: 40px;
  }
  .quiz-logo {
    height: 22px;
    width: auto;
  }
  .eyebrow {
    color: var(--mint);
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-weight: 700;
    font-size: 12px;
    margin-bottom: 18px;
  }
  .hero-inner h1 {
    font-size: clamp(28px, 5vw, 46px);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.02em;
  }
  .hero-sub {
    color: rgba(255, 255, 255, 0.8);
    font-size: clamp(16px, 2.4vw, 19px);
    margin: 22px auto 34px;
    max-width: 560px;
  }
  .hero-note {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    margin-top: 20px;
  }

  /* ===== Quiz ===== */
  #screen-quiz.is-active {
    display: flex;
    flex-direction: column;
  }
  .quiz-top {
    background: var(--navy);
    padding: 18px 24px;
    display: flex;
    align-items: center;
    gap: 28px;
  }
  .progress {
    flex: 1;
  }
  .progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 99px;
    overflow: hidden;
  }
  .progress-fill {
    height: 100%;
    width: 0;
    background: var(--mint);
    border-radius: 99px;
    transition: width 0.3s ease;
  }
  .progress-label {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
  }
  .quiz-& {
    flex: 1;
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 40px 24px;
  }
  .q-code {
    color: var(--blue);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 12px;
  }
  .q-title {
    font-size: clamp(24px, 4vw, 34px);
    font-weight: 800;
    margin: 6px 0 6px;
    letter-spacing: -0.02em;
  }
  .q-intro {
    color: var(--muted);
    font-size: 16px;
    margin-bottom: 26px;
  }
  .options {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .option {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    border: 2px solid var(--line);
    background: #fff;
    border-radius: 12px;
    padding: 16px 18px;
    cursor: pointer;
    transition:
      border-color 0.12s ease,
      background 0.12s ease,
      box-shadow 0.12s ease;
    text-align: left;
  }
  .option:hover {
    border-color: #c9cbe0;
  }
  .option.is-selected {
    border-color: var(--blue);
    background: rgba(18, 1, 255, 0.03);
    box-shadow: 0 0 0 3px rgba(18, 1, 255, 0.08);
  }
  .option-num {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--bg);
    color: var(--navy);
    font-weight: 800;
    display: grid;
    place-items: center;
    font-size: 15px;
  }
  .option.is-selected .option-num {
    background: var(--blue);
    color: #fff;
  }
  .option-text {
    font-size: 15px;
    padding-top: 3px;
  }
  .quiz-nav {
    border-top: 1px solid var(--line);
    background: #fff;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    max-width: 760px;
    margin: 0 auto;
    width: 100%;
  }

  /* ===== Lead (popup sobre el informe bloqueado) ===== */

  /* CAPA DE FONDO — el informe completo, blurreado y no interactivo. Conserva su
   alto real, así que se puede scrollear por detrás del popup. */
  .is-locked .report-gated {
    filter: blur(7px);
    pointer-events: none;
    user-select: none;
  }

  /* CAPA SUPERIOR — el popup, fijo en pantalla mientras se scrollea el informe.
   El contenedor NO intercepta el puntero (pointer-events: none) para que la
   rueda del mouse siga scrolleando la página; solo la tarjeta es interactiva.
   Sin velo ni fondo: el blur se ve alrededor del popup. */
  .report-gate {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    pointer-events: none;
  }
  .report-gate[hidden] {
    display: none;
  }
  .report-gate .lead-card {
    pointer-events: auto;
    background: #fff; /* fondo plano, sin transparencias */
    max-width: 480px;
    padding: 32px;
    /* si la tarjeta no entra en la pantalla, scrollea ella misma en vez de
     quedar recortada (importante en mobile) */
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    box-shadow: 0 24px 70px rgba(9, 11, 82, 0.35);
  }

  .lead-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px;
    max-width: 520px;
    width: 100%;
  }
  .pill {
    display: inline-block;
    background: rgba(3, 255, 158, 0.16);
    color: #067a4c;
    font-weight: 700;
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 99px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }
  .lead-card h2 {
    font-size: 26px;
    font-weight: 800;
    margin: 14px 0 6px;
    letter-spacing: -0.02em;
  }
  .lead-sub {
    color: var(--muted);
    margin-bottom: 26px;
  }
  .field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  .field {
    display: block;
    margin-bottom: 16px;
  }
  .field > span {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
  }
  .field > span em {
    color: var(--muted);
    font-weight: 400;
    font-style: normal;
  }
  .field input {
    width: 100%;
    font-family: inherit;
    font-size: 15px;
    padding: 12px 14px;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    transition: border-color 0.12s ease;
  }
  .field input:focus {
    outline: none;
    border-color: var(--blue);
  }
  .consent {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 13px;
    color: var(--muted);
    margin: 6px 0 18px;
    cursor: pointer;
  }
  .consent input {
    margin-top: 3px;
    flex-shrink: 0;
  }
  .form-error {
    color: #d81f4a;
    font-size: 13px;
    min-height: 18px;
    margin-bottom: 8px;
  }

  /* ===== Report ===== */
  #screen-report.is-active {
    display: block;
    padding: 32px 20px 60px;
  }
  .report {
    max-width: 860px;
    margin: 0 auto;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
  }
  .report-head {
    background: var(--navy);
    color: #fff;
    padding: 30px 36px;
    position: relative;
    overflow: hidden;
  }
  .report-head .accent-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: repeating-linear-gradient(-45deg, var(--mint) 0 14px, var(--blue) 14px 28px);
  }
  .report-head-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
  }
  .report-head .eyebrow {
    margin-bottom: 8px;
  }
  .report-head h2 {
    font-size: 24px;
    font-weight: 800;
  }
  .report-head .meta {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    margin-top: 6px;
  }
  .report-head .rlogo {
    height: 22px;
  }
  .report-section {
    padding: 30px 36px;
    border-bottom: 1px solid var(--line);
  }
  .report-section:last-child {
    border-bottom: none;
  }
  .report-section h3 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
    margin-bottom: 18px;
  }

  .score-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 30px;
    align-items: center;
  }
  .gauge-wrap {
    text-align: center;
  }
  .gauge-num {
    font-size: 52px;
    font-weight: 900;
    color: var(--blue);
    line-height: 1;
  }
  .gauge-max {
    font-size: 16px;
    color: var(--muted);
    font-weight: 600;
  }
  .band-name {
    font-size: 22px;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -0.01em;
  }
  .band-sub {
    color: var(--muted);
    margin-top: 8px;
    font-size: 15px;
  }
  .band-scale {
    display: flex;
    gap: 4px;
    margin-top: 18px;
  }
  .band-seg {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: var(--line);
  }
  .band-seg.on {
    background: var(--mint);
  }

  .radar-wrap {
    display: grid;
    place-items: center;
  }
  .radar-wrap svg {
    max-width: 100%;
    height: auto;
  }

  .dim-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
  }
  .dim-table th {
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    border-bottom: 1px solid var(--line);
    padding: 8px 10px;
  }
  .dim-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #f1f2f8;
    vertical-align: top;
  }
  .dim-table tr:last-child td {
    border-bottom: none;
  }
  .dim-name {
    font-weight: 700;
    color: var(--navy);
    width: 26%;
  }
  .dim-step {
    display: block;
    font-weight: 500;
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 3px;
  }
  .lvl-badge {
    display: inline-block;
    font-weight: 800;
    font-size: 13px;
    color: var(--blue);
    white-space: nowrap;
  }
  .dim-next {
    color: var(--muted);
  }
  .dim-next strong {
    color: var(--ink);
    font-weight: 600;
  }

  /* Prioridades (3 pasos más débiles) */
  .section-sub {
    color: var(--muted);
    font-size: 14px;
    margin: -8px 0 18px;
  }
  .prio-list {
    list-style: none;
    counter-reset: prio;
    display: grid;
    gap: 14px;
  }
  .prio-list li {
    counter-increment: prio;
    position: relative;
    padding: 14px 18px 14px 52px;
    background: var(--bg);
    border-radius: 12px;
    border-left: 3px solid var(--blue);
  }
  .prio-list li::before {
    content: counter(prio);
    position: absolute;
    left: 16px;
    top: 13px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    display: grid;
    place-items: center;
  }
  .prio-list strong {
    color: var(--navy);
    font-size: 15px;
  }
  .prio-lvl {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    background: var(--blue);
    color: #fff;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 800;
    vertical-align: middle;
  }
  .prio-step {
    display: block;
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 4px;
  }
  .prio-list p {
    color: var(--ink);
    font-size: 14px;
    margin-top: 8px;
  }

  .cta {
    background: var(--navy);
    color: #fff;
    padding: 30px 36px;
    text-align: center;
  }
  .cta h3 {
    color: #fff;
    text-transform: none;
    letter-spacing: -0.01em;
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 8px;
  }
  .cta p {
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 20px;
  }

  .report-actions {
    max-width: 860px;
    margin: 22px auto 0;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
  }
  /* `display: flex` le gana a la regla [hidden] del navegador: hay que declararlo. */
  .report-actions[hidden] {
    display: none;
  }
  .report-foot {
    font-size: 11px;
    color: var(--muted);
    padding: 18px 36px;
  }

  /* ===== Responsive ===== */
  @media (max-width: 620px) {
    /* el popup necesita todo el alto posible: mismo nivel de especificidad que
     `.report-gate .lead-card`, si no el padding de 32px no cede */
    .report-gate {
      padding: 12px;
    }
    .report-gate .lead-card {
      padding: 24px 20px;
      max-height: calc(100vh - 24px);
    }
    .field-row {
      grid-template-columns: 1fr;
    }
    .score-grid {
      grid-template-columns: 1fr;
      gap: 18px;
      text-align: center;
    }
    .lead-card,
    .report-section,
    .report-head,
    .cta {
      padding-left: 22px;
      padding-right: 22px;
    }
    .lead-card {
      padding: 28px 22px;
    }
    .dim-table thead {
      display: none;
    }
    .dim-table td {
      display: block;
      padding: 4px 0;
      border: none;
    }
    .dim-table tr {
      display: block;
      padding: 14px 0;
      border-bottom: 1px solid var(--line);
    }
    .dim-name {
      width: auto;
    }
  }

  /* ===== Print / PDF ===== */
  @media print {
    .no-print {
      display: none !important;
    }
    & {
      background: #fff;
    }
    .report {
      box-shadow: none;
      border-radius: 0;
      max-width: none;
    }
  }
}

.assessment {
  margin-top: 80px;
  background: #f4f5fa;
  color: #0d0f2b;
  min-height: 70vh;
}
.assessment [hidden] {
  display: none !important;
}
.assessment #assessment-intro {
  background: #090b52;
  color: white;
}
.assessment .hero-inner {
  padding: 80px 24px;
  margin: auto;
}
.assessment .editorial {
  max-width: 1000px;
  margin: auto;
  padding: 32px 24px;
  white-space: pre-line;
}
.assessment #assessment-quiz {
  max-width: 900px;
  margin: auto;
  padding: 40px 24px;
}
.assessment progress {
  width: 100%;
  accent-color: #1201ff;
}
.assessment #assessment-gate {
  padding: 40px 24px;
}
.assessment .lead-card {
  margin: auto;
}
.assessment .option[aria-checked="true"] {
  border-color: #1201ff;
  background: #eeedff;
}
.assessment .report-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 24px;
}
.assessment .report-section {
  overflow-x: auto;
}
.assessment .field input {
  color: #0d0f2b;
  background: white;
}
.assessment h2:focus {
  outline: none;
}
@media print {
  body > nav,
  body > footer,
  .report-actions,
  #assessment-intro,
  #assessment-quiz,
  #assessment-gate {
    display: none !important;
  }
  .assessment {
    margin: 0;
  }
}

.assessment {
  scroll-margin-top: 96px;
}
.assessment .radar-wrap svg {
  width: min(100%, 420px);
  height: auto;
}
.assessment .prio-list {
  list-style: none;
}
