:root {
      --verde:        #1A6B5A;
      --verde-claro:  #E8F5F0;
      --verde-medio:  #2A8A73;
      --crema:        #F5F0EB;
      --crema-oscuro: #EDE6DC;
      --borde:        #DDD8D0;
      --gris-texto:   #5C5B58;
      --texto:        #2D2D2B;
    }
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    body {
      font-family: 'DM Sans', sans-serif;
      background: #FAFAF8;
      color: var(--texto);
      line-height: 1.6;
    }

    /* Hero */
    .page-hero {
      background: linear-gradient(135deg, var(--verde) 0%, var(--verde-medio) 100%);
      color: white;
      padding: 56px 24px 72px;
      text-align: center;
      position: relative;
      overflow: hidden;
    }
    .page-hero::before {
      content: '';
      position: absolute;
      inset: 0;
      background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    }
    .page-hero-inner { position: relative; max-width: 680px; margin: 0 auto; }
    .page-hero-badge {
      display: inline-block;
      background: rgba(255,255,255,.15);
      border: 1px solid rgba(255,255,255,.3);
      border-radius: 100px;
      padding: 5px 16px;
      font-size: 13px;
      font-weight: 500;
      letter-spacing: .04em;
      text-transform: uppercase;
      margin-bottom: 20px;
    }
    .page-hero h1 {
      font-family: 'Lora', serif;
      font-size: clamp(1.7rem, 4vw, 2.6rem);
      font-weight: 700;
      line-height: 1.2;
      margin-bottom: 14px;
    }
    .page-hero p { font-size: 1rem; opacity: .88; }

    /* Stepper */
    .stepper-wrap {
      background: white;
      border-bottom: 1px solid var(--borde);
      position: sticky;
      top: 0;
      z-index: 100;
    }
    .stepper {
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 0;
      max-width: 640px;
      margin: 0 auto;
      padding: 0 16px;
    }
    .step {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 18px 20px;
      font-size: 13px;
      font-weight: 600;
      color: #B0AAA0;
      transition: color .2s;
      white-space: nowrap;
    }
    .step.activo { color: var(--verde); }
    .step.completado { color: var(--gris-texto); }
    .step-num {
      width: 28px; height: 28px;
      border-radius: 50%;
      background: var(--crema-oscuro);
      display: flex; align-items: center; justify-content: center;
      font-size: 12px;
      font-weight: 700;
      flex-shrink: 0;
      transition: all .2s;
    }
    .step.activo .step-num { background: var(--verde); color: white; }
    .step.completado .step-num { background: var(--verde-claro); color: var(--verde); }
    .step.completado .step-num::after { content: '✓'; font-size: 13px; }
    .step.completado .step-num-n { display: none; }
    .step-sep {
      flex: 1;
      height: 1px;
      background: var(--crema-oscuro);
      min-width: 20px;
      max-width: 48px;
    }

    /* Layout */
    .main-wrap {
      max-width: 720px;
      margin: 0 auto;
      padding: 48px 24px 80px;
    }

    /* Panels */
    .panel { display: none; }
    .panel.activo { display: block; }

    /* Cabecera de escala */
    .escala-header {
      margin-bottom: 32px;
      padding-bottom: 20px;
      border-bottom: 1px solid var(--crema-oscuro);
    }
    .escala-badge {
      display: inline-block;
      background: var(--verde-claro);
      color: var(--verde);
      font-size: 12px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .06em;
      padding: 4px 12px;
      border-radius: 100px;
      margin-bottom: 12px;
    }
    .escala-header h2 {
      font-family: 'Lora', serif;
      font-size: 1.55rem;
      margin-bottom: 8px;
    }
    .escala-header p { font-size: .92rem; color: var(--gris-texto); }

    /* Progreso interno */
    .progreso-bar-wrap {
      margin-bottom: 28px;
    }
    .progreso-label {
      display: flex;
      justify-content: space-between;
      font-size: 12px;
      color: var(--gris-texto);
      margin-bottom: 6px;
    }
    .progreso-bar {
      height: 6px;
      background: var(--crema-oscuro);
      border-radius: 100px;
      overflow: hidden;
    }
    .progreso-fill {
      height: 100%;
      background: var(--verde);
      border-radius: 100px;
      transition: width .3s ease;
    }

    /* Puntaje flotante */
    .puntaje-live {
      display: flex;
      align-items: center;
      gap: 16px;
      background: white;
      border: 1px solid var(--borde);
      border-radius: 14px;
      padding: 14px 20px;
      margin-bottom: 28px;
      box-shadow: 0 2px 8px rgba(0,0,0,.04);
    }
    .puntaje-num {
      font-family: 'Lora', serif;
      font-size: 2rem;
      font-weight: 700;
      color: var(--verde);
      line-height: 1;
      min-width: 48px;
    }
    .puntaje-info { flex: 1; }
    .puntaje-info .p-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--gris-texto); margin-bottom: 2px; }
    .puntaje-info .p-cat { font-size: .9rem; font-weight: 600; color: var(--texto); }
    .puntaje-max { font-size: .8rem; color: #B0AAA0; }

    /* Items de escala */
    .item-grupo {
      margin-bottom: 8px;
      background: white;
      border: 1px solid var(--borde);
      border-radius: 14px;
      overflow: hidden;
      transition: border-color .2s;
    }
    .item-grupo.respondido { border-color: rgba(26,107,90,.3); }
    .item-titulo {
      padding: 14px 18px 10px;
      font-size: .92rem;
      font-weight: 600;
      color: var(--texto);
      display: flex;
      align-items: flex-start;
      gap: 10px;
    }
    .item-num-badge {
      background: var(--crema);
      color: var(--gris-texto);
      font-size: 11px;
      font-weight: 700;
      width: 22px; height: 22px;
      border-radius: 6px;
      display: flex; align-items: center; justify-content: center;
      flex-shrink: 0;
      margin-top: 1px;
    }
    .item-opciones {
      display: flex;
      flex-direction: column;
      gap: 0;
      padding: 0 18px 14px;
    }
    .opcion-label {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 8px 12px;
      border-radius: 8px;
      cursor: pointer;
      font-size: .88rem;
      color: var(--gris-texto);
      transition: background .12s;
    }
    .opcion-label:hover { background: var(--crema); }
    .opcion-label input[type="radio"] { display: none; }
    .opcion-radio {
      width: 18px; height: 18px;
      border-radius: 50%;
      border: 2px solid var(--borde);
      display: flex; align-items: center; justify-content: center;
      flex-shrink: 0;
      transition: all .15s;
    }
    .opcion-label input:checked ~ .opcion-radio {
      border-color: var(--verde);
      background: var(--verde);
    }
    .opcion-label input:checked ~ .opcion-radio::after {
      content: '';
      width: 7px; height: 7px;
      border-radius: 50%;
      background: white;
    }
    .opcion-label input:checked ~ .opcion-texto { color: var(--texto); font-weight: 500; }
    .opcion-pts {
      margin-left: auto;
      font-size: .78rem;
      font-weight: 600;
      color: #B0AAA0;
      flex-shrink: 0;
    }
    .opcion-label input:checked ~ .opcion-pts { color: var(--verde); }

    /* Botones de navegación */
    .nav-btns {
      display: flex;
      gap: 12px;
      margin-top: 36px;
      justify-content: flex-end;
    }
    .btn-secundario {
      padding: 12px 24px;
      border-radius: 10px;
      border: 1px solid var(--borde);
      background: white;
      font-family: 'DM Sans', sans-serif;
      font-size: .95rem;
      font-weight: 600;
      color: var(--gris-texto);
      cursor: pointer;
      transition: all .15s;
    }
    .btn-secundario:hover { background: var(--crema); }
    .btn-primario {
      padding: 12px 28px;
      border-radius: 10px;
      border: none;
      background: var(--verde);
      font-family: 'DM Sans', sans-serif;
      font-size: .95rem;
      font-weight: 700;
      color: white;
      cursor: pointer;
      transition: all .15s;
      display: flex; align-items: center; gap: 8px;
    }
    .btn-primario:hover { background: #155a4a; transform: translateY(-1px); }
    .btn-primario:disabled { background: var(--borde); cursor: not-allowed; transform: none; }

    /* Aviso sin responder */
    .aviso-pendientes {
      display: none;
      background: #FFF8E1;
      border: 1px solid #F59E0B;
      border-radius: 10px;
      padding: 10px 16px;
      font-size: .85rem;
      color: #92400E;
      margin-top: 12px;
    }
    .aviso-pendientes.visible { display: block; }

    /* Resultado combinado */
    .resultado-wrap { animation: fadeIn .4s ease; }
    @keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

    .resultado-hero {
      background: linear-gradient(135deg, var(--verde) 0%, var(--verde-medio) 100%);
      border-radius: 20px;
      padding: 36px 32px;
      color: white;
      text-align: center;
      margin-bottom: 24px;
    }
    .resultado-hero h2 {
      font-family: 'Lora', serif;
      font-size: 1.5rem;
      margin-bottom: 6px;
    }
    .resultado-hero .r-subtitulo { opacity: .85; font-size: .9rem; margin-bottom: 28px; }
    .resultado-scores {
      display: flex;
      justify-content: center;
      gap: 32px;
      flex-wrap: wrap;
    }
    .score-item { text-align: center; }
    .score-num {
      font-family: 'Lora', serif;
      font-size: 2.8rem;
      font-weight: 700;
      line-height: 1;
      margin-bottom: 4px;
    }
    .score-label { font-size: .8rem; opacity: .8; text-transform: uppercase; letter-spacing: .06em; }
    .score-max { font-size: .75rem; opacity: .6; }
    .score-sep { width: 1px; background: rgba(255,255,255,.2); align-self: stretch; }

    /* Cards de interpretación */
    .interp-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 16px;
      margin-bottom: 24px;
    }
    .interp-card {
      background: white;
      border: 1px solid var(--borde);
      border-radius: 16px;
      padding: 20px;
    }
    .interp-card .ic-badge {
      display: inline-block;
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .06em;
      padding: 3px 10px;
      border-radius: 100px;
      margin-bottom: 10px;
    }
    .interp-card h3 { font-family: 'Lora', serif; font-size: 1.05rem; margin-bottom: 6px; }
    .interp-card p { font-size: .84rem; color: var(--gris-texto); line-height: 1.5; }

    /* Card de perfil combinado */
    .perfil-combinado {
      border-radius: 16px;
      padding: 24px;
      margin-bottom: 24px;
    }
    .perfil-combinado h3 {
      font-family: 'Lora', serif;
      font-size: 1.15rem;
      margin-bottom: 8px;
    }
    .perfil-combinado p { font-size: .9rem; line-height: 1.55; margin-bottom: 16px; }
    .perfil-combinado .recursos-titulo {
      font-size: .8rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .06em;
      margin-bottom: 10px;
      opacity: .7;
    }
    .recursos-chips {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }
    .recurso-chip {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 7px 14px;
      border-radius: 100px;
      font-size: .83rem;
      font-weight: 600;
      text-decoration: none;
      transition: all .15s;
    }

    /* Colores perfil */
    .p-verde   { background: #F1F8E9; color: #2E7D32; border: 1px solid #C8E6C9; }
    .p-amarillo{ background: #FFFBEB; color: #92400E; border: 1px solid #FDE68A; }
    .p-naranja { background: #FFF3E0; color: #E07000; border: 1px solid #FFCC80; }
    .p-rojo    { background: #FFEBEE; color: #C62828; border: 1px solid #FFCDD2; }
    .chip-verde   { background: #E8F5E9; color: #2E7D32; border: 1px solid #C8E6C9; }
    .chip-verde:hover { background: #C8E6C9; }
    .chip-amarillo{ background: #FFFDE7; color: #F57F17; border: 1px solid #FFF59D; }
    .chip-amarillo:hover { background: #FFF59D; }
    .chip-naranja { background: #FFF3E0; color: #E65100; border: 1px solid #FFCC80; }
    .chip-naranja:hover { background: #FFE0B2; }
    .chip-rojo    { background: #FFEBEE; color: #B71C1C; border: 1px solid #FFCDD2; }
    .chip-rojo:hover { background: #FFCDD2; }
    .chip-neutro  { background: var(--crema); color: var(--gris-texto); border: 1px solid var(--borde); }
    .chip-neutro:hover { background: var(--crema-oscuro); }

    /* Botones resultado */
    .resultado-btns {
      display: flex;
      gap: 12px;
      flex-wrap: wrap;
      margin-top: 8px;
    }
    .btn-reiniciar {
      padding: 11px 22px;
      border-radius: 10px;
      border: 1px solid var(--borde);
      background: white;
      font-family: 'DM Sans', sans-serif;
      font-size: .9rem;
      font-weight: 600;
      color: var(--gris-texto);
      cursor: pointer;
      transition: all .15s;
    }
    .btn-reiniciar:hover { background: var(--crema); }
    .btn-evaluador {
      padding: 11px 22px;
      border-radius: 10px;
      border: none;
      background: var(--verde);
      font-family: 'DM Sans', sans-serif;
      font-size: .9rem;
      font-weight: 700;
      color: white;
      cursor: pointer;
      text-decoration: none;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      transition: all .15s;
    }
    .btn-evaluador:hover { background: #155a4a; }

    /* Nota clínica */
    .nota-clinica {
      background: var(--crema);
      border-radius: 12px;
      padding: 16px 20px;
      font-size: .82rem;
      color: var(--gris-texto);
      line-height: 1.5;
      margin-top: 24px;
    }
    .nota-clinica strong { color: var(--texto); }

    @media (max-width: 560px) {
      .page-hero { padding: 40px 20px 56px; }
      .interp-grid { grid-template-columns: 1fr; }
      .resultado-scores { gap: 20px; }
      .score-sep { display: none; }
      .nav-btns { flex-direction: column-reverse; }
      .btn-primario, .btn-secundario { width: 100%; justify-content: center; }
    }