-- ============================================================
-- seed.sql — Instrumento "Mapeo de Cuidadores" v2.1 — 44 preguntas
-- Fuente autoritativa: SEED_SPEC.md v2.1 (Jun 2026) — Etapa 3I2
-- Reemplaza v1 (34 preguntas con códigos A-H)
--
-- Estructura condicional:
--   cond-disc-propia:   1.1='Sí' → 1.2–1.5  (4 dependientes)
--   cond-familiar:      1.6='Sí' → 1.7–1.12 (6 dependientes)
--   cond-adulto-mayor: 1.13='Sí' → 1.14–1.16 (3 dependientes)
--   salto-triple (Cambio 4a): si 1.1, 1.6 y 1.13 son TODAS 'No', se ocultan
--     las secciones 2-5 completas y 6.1-6.3 (eq_any 'Sí' sobre 1.1/1.6/1.13)
--   Resto (incl. 6.4-6.6 y sección 7): top-level, siempre visibles
--
-- is_sensitive=true: 1.1-1.12, 1.14, 1.15, 3.4 (15 preguntas)
-- required=false en todas (equipo decidió captura completa; obligatoriedad se define luego)
--
-- UUIDs fijos:
--   org:      10000000-0000-0000-0000-000000000001
--   cv-v1:    20000000-0000-0000-0000-000000000001
--   survey:   30000000-0000-0000-0000-000000000001
--   preguntas 40000000-0000-0000-0000-00000000000{01..45} excepto 027 (2.4, eliminada)
--   → 44 preguntas activas
-- ============================================================

-- ── Organización demo ─────────────────────────────────────────
INSERT INTO public.organizations (id, name, sector, size_bucket)
VALUES ('10000000-0000-0000-0000-000000000001','Empresa Demo S.A.','Servicios','100-500')
ON CONFLICT (id) DO NOTHING;

-- ── Consent version v1 ────────────────────────────────────────
INSERT INTO public.consent_versions (id, version, body, scopes)
VALUES (
  '20000000-0000-0000-0000-000000000001', 'v1',
  'Esta encuesta es completamente anónima: no registramos tu nombre ni ningún dato que permita '
  'identificarte. Tus respuestas se usan para (1) ayudar a tu empresa con apoyos sobre cuidado y '
  'discapacidad, y (2) un estudio nacional anonimizado. Al ser anónima, no es posible retirar '
  'ni modificar tu respuesta una vez enviada.',
  '["operativo","macro_n1"]'::jsonb
) ON CONFLICT (id) DO NOTHING;

-- ── Survey ────────────────────────────────────────────────────
INSERT INTO public.surveys (
  id, org_id, title, status, is_anonymous,
  data_sensitivity, security_class, controller_role,
  consent_version_id, k_threshold
) VALUES (
  '30000000-0000-0000-0000-000000000001',
  '10000000-0000-0000-0000-000000000001',
  'Mapeo de Cuidadores — 2026', 'draft', true,
  'sensible', 'confidencial', 'A',
  '20000000-0000-0000-0000-000000000001', 5
) ON CONFLICT (id) DO NOTHING;

-- brand_config: org demo (el director actualiza con datos reales antes de enviar el link)
UPDATE public.surveys
SET brand_config = '{"org_name":"Empresa Demo","branch_name":"Oficina Central","branch_city":"Asunción"}'::jsonb
WHERE id = '30000000-0000-0000-0000-000000000001';

-- ══════════════════════════════════════════════════════════════
-- Etapa 3C — Encuestas piloto (espacio de pruebas real)
--   org InQuality:              10000000-0000-0000-0000-000000000002
--   org Fundación Solidaridad:  10000000-0000-0000-0000-000000000003
--   survey InQuality:           30000000-0000-0000-0000-000000000002
--   survey Fundación Solidaridad: 30000000-0000-0000-0000-000000000003
-- No tocan el survey demo (30000000-...-0001).
-- ══════════════════════════════════════════════════════════════

-- ── Organización InQuality ────────────────────────────────────
INSERT INTO public.organizations (id, name, sector, size_bucket)
VALUES (
  '10000000-0000-0000-0000-000000000002',
  'InQuality',
  'Consultoría/Tecnología',
  '1-50'
) ON CONFLICT (id) DO UPDATE SET
  name = EXCLUDED.name,
  sector = EXCLUDED.sector,
  size_bucket = EXCLUDED.size_bucket;

-- ── Organización Fundación Solidaridad ────────────────────────
INSERT INTO public.organizations (id, name, sector, size_bucket)
VALUES (
  '10000000-0000-0000-0000-000000000003',
  'Fundación Solidaridad',
  'Sociedad Civil/ONG',
  '1-50'
) ON CONFLICT (id) DO UPDATE SET
  name = EXCLUDED.name,
  sector = EXCLUDED.sector,
  size_bucket = EXCLUDED.size_bucket;

-- ── Survey InQuality ───────────────────────────────────────────
INSERT INTO public.surveys (
  id, org_id, title, status, is_anonymous,
  data_sensitivity, security_class, controller_role,
  consent_version_id, brand_config, k_threshold
) VALUES (
  '30000000-0000-0000-0000-000000000002',
  '10000000-0000-0000-0000-000000000002',
  'Mapeo de Cuidadores — 2026',
  'live',
  true,
  'sensible',
  'confidencial',
  'A',
  '20000000-0000-0000-0000-000000000001',
  '{"org_name": "InQuality", "branch_name": "Equipo InQuality", "branch_city": "Asunción"}',
  5
) ON CONFLICT (id) DO UPDATE SET
  brand_config = EXCLUDED.brand_config,
  status = EXCLUDED.status;

-- ── Survey Fundación Solidaridad ──────────────────────────────
INSERT INTO public.surveys (
  id, org_id, title, status, is_anonymous,
  data_sensitivity, security_class, controller_role,
  consent_version_id, brand_config, k_threshold
) VALUES (
  '30000000-0000-0000-0000-000000000003',
  '10000000-0000-0000-0000-000000000003',
  'Mapeo de Cuidadores — 2026',
  'live',
  true,
  'sensible',
  'confidencial',
  'A',
  '20000000-0000-0000-0000-000000000001',
  '{"org_name": "Fundación Solidaridad", "branch_name": "Equipo Fundación", "branch_city": "Asunción"}',
  5
) ON CONFLICT (id) DO UPDATE SET
  brand_config = EXCLUDED.brand_config,
  status = EXCLUDED.status;

-- ── Preguntas: DELETE + INSERT para idempotencia total ────────
DELETE FROM public.questions
WHERE survey_id = '30000000-0000-0000-0000-000000000001';


-- ══════════════════════════════════════════════════════════════
-- SECCIÓN A — Datos Generales (top-level, cuasi-identificadores)
-- A1=Departamento (single_choice, GeoSelectWidget), A2=Ciudad (single_choice, filtrado client-side)
-- A3=Barrio (text_short, opcional)
-- qi_sector ← A4 · qi_age_bucket ← A5 · qi_city/qi_country ← Sprint 3
-- ══════════════════════════════════════════════════════════════

-- A1: Departamento (18 opciones — los 18 departamentos de Paraguay + Capital)
INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options)
VALUES ('40000000-0000-0000-0000-000000000001','30000000-0000-0000-0000-000000000001',
  'A1','single_choice','Departamento',1,false,false,
  '[{"value":"Asunción (Capital)","label":"Asunción (Capital)"},
    {"value":"Alto Paraguay","label":"Alto Paraguay"},
    {"value":"Alto Paraná","label":"Alto Paraná"},
    {"value":"Amambay","label":"Amambay"},
    {"value":"Boquerón","label":"Boquerón"},
    {"value":"Caaguazú","label":"Caaguazú"},
    {"value":"Caazapá","label":"Caazapá"},
    {"value":"Canindeyú","label":"Canindeyú"},
    {"value":"Central","label":"Central"},
    {"value":"Concepción","label":"Concepción"},
    {"value":"Cordillera","label":"Cordillera"},
    {"value":"Guairá","label":"Guairá"},
    {"value":"Itapúa","label":"Itapúa"},
    {"value":"Misiones","label":"Misiones"},
    {"value":"Ñeembucú","label":"Ñeembucú"},
    {"value":"Paraguarí","label":"Paraguarí"},
    {"value":"Presidente Hayes","label":"Presidente Hayes"},
    {"value":"San Pedro","label":"San Pedro"}]'::jsonb);

-- A2: Ciudad (todas las ciudades; el GeoSelectWidget filtra client-side por departamento)
INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options)
VALUES ('40000000-0000-0000-0000-000000000002','30000000-0000-0000-0000-000000000001',
  'A2','single_choice','Ciudad',2,false,false,
  '[{"value":"Asunción","label":"Asunción"},
    {"value":"Fuerte Olimpo","label":"Fuerte Olimpo"},{"value":"Bahía Negra","label":"Bahía Negra"},{"value":"Carmelo Peralta","label":"Carmelo Peralta"},{"value":"La Victoria","label":"La Victoria"},
    {"value":"Ciudad del Este","label":"Ciudad del Este"},{"value":"Hernandarias","label":"Hernandarias"},{"value":"Minga Guazú","label":"Minga Guazú"},{"value":"Presidente Franco","label":"Presidente Franco"},{"value":"Minga Porã","label":"Minga Porã"},{"value":"Naranjal","label":"Naranjal"},{"value":"Ñacunday","label":"Ñacunday"},{"value":"San Alberto","label":"San Alberto"},{"value":"Santa Rita","label":"Santa Rita"},{"value":"Tavapy","label":"Tavapy"},{"value":"Yguazú","label":"Yguazú"},{"value":"Juan E. O''Leary","label":"Juan E. O''Leary"},{"value":"San Cristóbal","label":"San Cristóbal"},{"value":"Santa Fe del Paraná","label":"Santa Fe del Paraná"},{"value":"Dr. Juan León Mallorquín","label":"Dr. Juan León Mallorquín"},{"value":"Itakyry","label":"Itakyry"},{"value":"Domingo Martínez de Irala","label":"Domingo Martínez de Irala"},
    {"value":"Pedro Juan Caballero","label":"Pedro Juan Caballero"},{"value":"Bella Vista Norte","label":"Bella Vista Norte"},{"value":"Capitán Bado","label":"Capitán Bado"},{"value":"Zanja Pytã","label":"Zanja Pytã"},
    {"value":"Filadelfia","label":"Filadelfia"},{"value":"Loma Plata","label":"Loma Plata"},{"value":"Mariscal Estigarribia","label":"Mariscal Estigarribia"},{"value":"Neuland","label":"Neuland"},
    {"value":"Coronel Oviedo","label":"Coronel Oviedo"},{"value":"Caaguazú","label":"Caaguazú"},{"value":"Carayaó","label":"Carayaó"},{"value":"Dr. Juan Manuel Frutos","label":"Dr. Juan Manuel Frutos"},{"value":"Mbutuy","label":"Mbutuy"},{"value":"Nueva Londres","label":"Nueva Londres"},{"value":"Raúl Arsenio Oviedo","label":"Raúl Arsenio Oviedo"},{"value":"Repatriación","label":"Repatriación"},{"value":"San Joaquín","label":"San Joaquín"},{"value":"San José de los Arroyos","label":"San José de los Arroyos"},{"value":"Simón Bolívar","label":"Simón Bolívar"},{"value":"Vaquería","label":"Vaquería"},{"value":"Yhú","label":"Yhú"},{"value":"José Domingo Ocampos","label":"José Domingo Ocampos"},{"value":"3 de Febrero","label":"3 de Febrero"},{"value":"Mcal. Francisco Solano López","label":"Mcal. Francisco Solano López"},{"value":"Los Cedrales","label":"Los Cedrales"},
    {"value":"Caazapá","label":"Caazapá"},{"value":"Abai","label":"Abai"},{"value":"Buena Vista","label":"Buena Vista"},{"value":"General Higinio Morínigo","label":"General Higinio Morínigo"},{"value":"Huber Duré","label":"Huber Duré"},{"value":"Maciel","label":"Maciel"},{"value":"San Juan Nepomuceno","label":"San Juan Nepomuceno"},{"value":"Tavaí","label":"Tavaí"},{"value":"Yegros","label":"Yegros"},{"value":"Yuty","label":"Yuty"},
    {"value":"Salto del Guairá","label":"Salto del Guairá"},{"value":"Corpus Christi","label":"Corpus Christi"},{"value":"Curuguaty","label":"Curuguaty"},{"value":"General Francisco Caballero Álvarez","label":"General Francisco Caballero Álvarez"},{"value":"Itanará","label":"Itanará"},{"value":"Katueté","label":"Katueté"},{"value":"La Paloma","label":"La Paloma"},{"value":"Nueva Esperanza","label":"Nueva Esperanza"},{"value":"Yasy Kañy","label":"Yasy Kañy"},{"value":"Ypejhú","label":"Ypejhú"},
    {"value":"Areguá","label":"Areguá"},{"value":"Capiatá","label":"Capiatá"},{"value":"Fernando de la Mora","label":"Fernando de la Mora"},{"value":"Guarambaré","label":"Guarambaré"},{"value":"Itá","label":"Itá"},{"value":"Itauguá","label":"Itauguá"},{"value":"Juan Augusto Saldívar","label":"Juan Augusto Saldívar"},{"value":"Lambaré","label":"Lambaré"},{"value":"Limpio","label":"Limpio"},{"value":"Luque","label":"Luque"},{"value":"Mariano Roque Alonso","label":"Mariano Roque Alonso"},{"value":"Nueva Italia","label":"Nueva Italia"},{"value":"Ñemby","label":"Ñemby"},{"value":"San Antonio","label":"San Antonio"},{"value":"San Lorenzo","label":"San Lorenzo"},{"value":"Villa Elisa","label":"Villa Elisa"},{"value":"Villeta","label":"Villeta"},{"value":"Ypané","label":"Ypané"},{"value":"Ypacaraí","label":"Ypacaraí"},
    {"value":"Concepción","label":"Concepción"},{"value":"Belén","label":"Belén"},{"value":"Horqueta","label":"Horqueta"},{"value":"Loreto","label":"Loreto"},{"value":"San Lázaro","label":"San Lázaro"},{"value":"San Carlos del Apa","label":"San Carlos del Apa"},{"value":"Yby Yaú","label":"Yby Yaú"},{"value":"Azote''y","label":"Azote''y"},{"value":"Sgto. José Félix López","label":"Sgto. José Félix López"},
    {"value":"Caacupé","label":"Caacupé"},{"value":"Altos","label":"Altos"},{"value":"Arroyos y Esteros","label":"Arroyos y Esteros"},{"value":"Caraguatay","label":"Caraguatay"},{"value":"Emboscada","label":"Emboscada"},{"value":"Eusebio Ayala","label":"Eusebio Ayala"},{"value":"Isla Pucú","label":"Isla Pucú"},{"value":"Itacurubí de la Cordillera","label":"Itacurubí de la Cordillera"},{"value":"Juan de Mena","label":"Juan de Mena"},{"value":"Loma Grande","label":"Loma Grande"},{"value":"Mbocayaty del Yhaguy","label":"Mbocayaty del Yhaguy"},{"value":"Nueva Colombia","label":"Nueva Colombia"},{"value":"Pirayú","label":"Pirayú"},{"value":"Primero de Marzo","label":"Primero de Marzo"},{"value":"Tobatí","label":"Tobatí"},{"value":"Valenzuela","label":"Valenzuela"},
    {"value":"Villarrica","label":"Villarrica"},{"value":"Borja","label":"Borja"},{"value":"Capitán Mauricio José Troche","label":"Capitán Mauricio José Troche"},{"value":"Coronel Martínez","label":"Coronel Martínez"},{"value":"Félix Pérez Cardozo","label":"Félix Pérez Cardozo"},{"value":"General Eugenio A. Garay","label":"General Eugenio A. Garay"},{"value":"Independencia","label":"Independencia"},{"value":"Itapé","label":"Itapé"},{"value":"Iturbe","label":"Iturbe"},{"value":"José Fassardi","label":"José Fassardi"},{"value":"Mbocayaty","label":"Mbocayaty"},{"value":"Natalicio Talavera","label":"Natalicio Talavera"},{"value":"Ñumí","label":"Ñumí"},{"value":"San Salvador","label":"San Salvador"},{"value":"Yataity","label":"Yataity"},
    {"value":"Encarnación","label":"Encarnación"},{"value":"Alto Verá","label":"Alto Verá"},{"value":"Bella Vista","label":"Bella Vista"},{"value":"Cambyretá","label":"Cambyretá"},{"value":"Capitán Meza","label":"Capitán Meza"},{"value":"Capitán Miranda","label":"Capitán Miranda"},{"value":"Carlos A. López","label":"Carlos A. López"},{"value":"Carmen del Paraná","label":"Carmen del Paraná"},{"value":"Coronel Bogado","label":"Coronel Bogado"},{"value":"Cosme","label":"Cosme"},{"value":"Edelira","label":"Edelira"},{"value":"Fram","label":"Fram"},{"value":"General Artigas","label":"General Artigas"},{"value":"Hohenau","label":"Hohenau"},{"value":"Itapúa Poty","label":"Itapúa Poty"},{"value":"Jesús","label":"Jesús"},{"value":"La Paz","label":"La Paz"},{"value":"Leandro Oviedo","label":"Leandro Oviedo"},{"value":"Mayor Otaño","label":"Mayor Otaño"},{"value":"Natalio","label":"Natalio"},{"value":"Nueva Alborada","label":"Nueva Alborada"},{"value":"Obligado","label":"Obligado"},{"value":"Pirapó","label":"Pirapó"},{"value":"San Cosme y Damián","label":"San Cosme y Damián"},{"value":"San Juan del Paraná","label":"San Juan del Paraná"},{"value":"San Pedro del Paraná","label":"San Pedro del Paraná"},{"value":"San Rafael del Paraná","label":"San Rafael del Paraná"},{"value":"Trinidad","label":"Trinidad"},{"value":"Tomás Romero Pereira","label":"Tomás Romero Pereira"},
    {"value":"San Juan Bautista","label":"San Juan Bautista"},{"value":"Ayolas","label":"Ayolas"},{"value":"San Ignacio","label":"San Ignacio"},{"value":"San Miguel","label":"San Miguel"},{"value":"San Patricio","label":"San Patricio"},{"value":"Santa María","label":"Santa María"},{"value":"Santa Rosa","label":"Santa Rosa"},{"value":"Santiago","label":"Santiago"},{"value":"Villa Florida","label":"Villa Florida"},{"value":"Yabebyry","label":"Yabebyry"},
    {"value":"Pilar","label":"Pilar"},{"value":"Alberdi","label":"Alberdi"},{"value":"Cerrito","label":"Cerrito"},{"value":"Desmochados","label":"Desmochados"},{"value":"General José Eduvigis Díaz","label":"General José Eduvigis Díaz"},{"value":"Guazú Cuá","label":"Guazú Cuá"},{"value":"Humaitá","label":"Humaitá"},{"value":"Isla Umbú","label":"Isla Umbú"},{"value":"Laureles","label":"Laureles"},{"value":"Mayor José de J. Martínez","label":"Mayor José de J. Martínez"},{"value":"Paso de Patria","label":"Paso de Patria"},{"value":"San Juan Bautista del Ñeembucú","label":"San Juan Bautista del Ñeembucú"},{"value":"Tacuaras","label":"Tacuaras"},{"value":"Villa Franca","label":"Villa Franca"},{"value":"Villa Oliva","label":"Villa Oliva"},{"value":"Villalba","label":"Villalba"},
    {"value":"Paraguarí","label":"Paraguarí"},{"value":"Acahay","label":"Acahay"},{"value":"Carapeguá","label":"Carapeguá"},{"value":"Escobar","label":"Escobar"},{"value":"General Bernardino Caballero","label":"General Bernardino Caballero"},{"value":"La Colmena","label":"La Colmena"},{"value":"Mbuyapey","label":"Mbuyapey"},{"value":"Quiindy","label":"Quiindy"},{"value":"Quyquyhó","label":"Quyquyhó"},{"value":"San Roque González de Santa Cruz","label":"San Roque González de Santa Cruz"},{"value":"Sapucaí","label":"Sapucaí"},{"value":"Tebicuarymí","label":"Tebicuarymí"},{"value":"Ybycuí","label":"Ybycuí"},{"value":"Ybytymí","label":"Ybytymí"},{"value":"Yaguarón","label":"Yaguarón"},
    {"value":"Villa Hayes","label":"Villa Hayes"},{"value":"Benjamín Aceval","label":"Benjamín Aceval"},{"value":"José Falcón","label":"José Falcón"},{"value":"Nanawa","label":"Nanawa"},{"value":"Nueva Asunción","label":"Nueva Asunción"},{"value":"Pozo Colorado","label":"Pozo Colorado"},{"value":"Puerto Pinasco","label":"Puerto Pinasco"},{"value":"Teniente Primero Manuel Irala Fernández","label":"Teniente Primero Manuel Irala Fernández"},{"value":"Villa del Río","label":"Villa del Río"},
    {"value":"San Pedro del Ycuamandiyú","label":"San Pedro del Ycuamandiyú"},{"value":"Antequera","label":"Antequera"},{"value":"Choré","label":"Choré"},{"value":"General Elizardo Aquino","label":"General Elizardo Aquino"},{"value":"Guayaibí","label":"Guayaibí"},{"value":"Itacurubí del Rosario","label":"Itacurubí del Rosario"},{"value":"Lima","label":"Lima"},{"value":"Nueva Germania","label":"Nueva Germania"},{"value":"Río Verde","label":"Río Verde"},{"value":"San Estanislao (Santaní)","label":"San Estanislao (Santaní)"},{"value":"Tacuatí","label":"Tacuatí"},{"value":"Unión","label":"Unión"},{"value":"Villa del Rosario","label":"Villa del Rosario"},{"value":"Yataity del Norte","label":"Yataity del Norte"}
  ]'::jsonb);

-- A3: Barrio (text_short, opcional — antes era "Sucursal o sede")
INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required)
VALUES ('40000000-0000-0000-0000-000000000003','30000000-0000-0000-0000-000000000001',
  'A3','text_short','¿En qué barrio vivís? (opcional)',3,false,false);

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options)
VALUES ('40000000-0000-0000-0000-000000000004','30000000-0000-0000-0000-000000000001',
  'A4','single_choice','¿En qué área o gerencia trabajás?',4,false,false,
  '[{"value":"Directorio","label":"Directorio"},
    {"value":"Gerencia","label":"Gerencia"},
    {"value":"Operaciones/Producción","label":"Operaciones/Producción"},
    {"value":"Comercial/Ventas","label":"Comercial/Ventas"},
    {"value":"Administración/Finanzas","label":"Administración/Finanzas"},
    {"value":"Recursos Humanos/Cultura","label":"Recursos Humanos/Cultura"},
    {"value":"Tecnología/Sistemas","label":"Tecnología/Sistemas"},
    {"value":"Logística/Distribución","label":"Logística/Distribución"},
    {"value":"Otra área","label":"Otra área"}]'::jsonb);

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options)
VALUES ('40000000-0000-0000-0000-000000000005','30000000-0000-0000-0000-000000000001',
  'A5','single_choice','¿Cuántos años tenés?',5,false,false,
  '[{"value":"Menos de 25 años","label":"Menos de 25 años"},
    {"value":"25 a 34 años","label":"25 a 34 años"},
    {"value":"35 a 44 años","label":"35 a 44 años"},
    {"value":"45 a 54 años","label":"45 a 54 años"},
    {"value":"55 años o más","label":"55 años o más"}]'::jsonb);

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options)
VALUES ('40000000-0000-0000-0000-000000000006','30000000-0000-0000-0000-000000000001',
  'A6','single_choice','¿Con qué género te identificás?',6,false,false,
  '[{"value":"Femenino","label":"Femenino"},
    {"value":"Masculino","label":"Masculino"},
    {"value":"No binario/Otro","label":"No binario/Otro"}]'::jsonb);

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options)
VALUES ('40000000-0000-0000-0000-000000000007','30000000-0000-0000-0000-000000000001',
  'A7','single_choice','¿Cuál es tu modalidad de trabajo actual?',7,false,false,
  '[{"value":"Presencial","label":"Presencial"},
    {"value":"Remoto (home office)","label":"Remoto (home office)"},
    {"value":"Híbrido","label":"Híbrido"}]'::jsonb);


-- ══════════════════════════════════════════════════════════════
-- SECCIÓN 1 — Prevalencia: cuidado y discapacidad (sensible)
-- Triggers: 1.1 (→1.2–1.5), 1.6 (→1.7–1.12), 1.13 (→1.14–1.16)
-- ══════════════════════════════════════════════════════════════

-- 1.1 trigger — is_sensitive=true, sin conditional_rules
INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options)
VALUES ('40000000-0000-0000-0000-000000000008','30000000-0000-0000-0000-000000000001',
  '1.1','single_choice',
  '¿Vos mismo/a vivís con alguna discapacidad o condición de salud que afecte tu funcionamiento cotidiano?',
  8,true,false,
  '[{"value":"Sí","label":"Sí"},
    {"value":"No","label":"No"}]'::jsonb);

-- cond-disc-propia: 1.2–1.5 se muestran si 1.1='Sí'
INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000009','30000000-0000-0000-0000-000000000001',
  '1.2','multiple_choice','¿Qué tipo de discapacidad o condición tenés?',9,true,false,
  '[{"value":"Discapacidad física/motriz","label":"Discapacidad física/motriz"},
    {"value":"Visual","label":"Visual"},
    {"value":"Auditiva","label":"Auditiva"},
    {"value":"Intelectual","label":"Intelectual"},
    {"value":"TEA","label":"TEA"},
    {"value":"Psicosocial/salud mental","label":"Psicosocial/salud mental"},
    {"value":"Condición crónica que genera limitaciones","label":"Condición crónica que genera limitaciones"},
    {"value":"Otra","label":"Otra"}]'::jsonb,
  '[{"if_question":"1.1","op":"eq","value":"Sí","action":"show"}]'::jsonb);

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000010','30000000-0000-0000-0000-000000000001',
  '1.3','multiple_choice','¿Usás algún elemento de apoyo para la movilidad o autonomía?',10,true,false,
  '[{"value":"Silla de ruedas","label":"Silla de ruedas"},
    {"value":"Bastón","label":"Bastón"},
    {"value":"Andador","label":"Andador"},
    {"value":"Muletas","label":"Muletas"},
    {"value":"Prótesis","label":"Prótesis"},
    {"value":"Tecnología asistiva","label":"Tecnología asistiva"},
    {"value":"No utilizo","label":"No utilizo"}]'::jsonb,
  '[{"if_question":"1.1","op":"eq","value":"Sí","action":"show"}]'::jsonb);

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000011','30000000-0000-0000-0000-000000000001',
  '1.4','single_choice','¿Contás con certificado oficial de discapacidad?',11,true,false,
  '[{"value":"Sí","label":"Sí"},
    {"value":"No, pero estoy en trámite","label":"No, pero estoy en trámite"},
    {"value":"No","label":"No"}]'::jsonb,
  '[{"if_question":"1.1","op":"eq","value":"Sí","action":"show"}]'::jsonb);

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000012','30000000-0000-0000-0000-000000000001',
  '1.5','single_choice','¿Tu condición afecta tu desempeño o comodidad en el trabajo?',12,true,false,
  '[{"value":"Sí, de forma significativa","label":"Sí, de forma significativa"},
    {"value":"Sí, pero en aspectos puntuales","label":"Sí, pero en aspectos puntuales"},
    {"value":"No, está bien gestionada","label":"No, está bien gestionada"}]'::jsonb,
  '[{"if_question":"1.1","op":"eq","value":"Sí","action":"show"}]'::jsonb);

-- 1.6 trigger — is_sensitive=true
INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options)
VALUES ('40000000-0000-0000-0000-000000000013','30000000-0000-0000-0000-000000000001',
  '1.6','single_choice',
  '¿Tenés algún familiar cercano (hijo/a, pareja, hermano/a, padre/madre) que viva con discapacidad?',
  13,true,false,
  '[{"value":"Sí","label":"Sí"},
    {"value":"No","label":"No"}]'::jsonb);

-- cond-familiar: 1.7–1.12 se muestran si 1.6='Sí'
INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000014','30000000-0000-0000-0000-000000000001',
  '1.7','multiple_choice','¿Cuál es tu vínculo con esa persona?',14,true,false,
  '[{"value":"Hijo/a","label":"Hijo/a"},
    {"value":"Cónyuge/pareja","label":"Cónyuge/pareja"},
    {"value":"Padre o madre","label":"Padre o madre"},
    {"value":"Hermano/a","label":"Hermano/a"},
    {"value":"Otro familiar","label":"Otro familiar"}]'::jsonb,
  '[{"if_question":"1.6","op":"eq","value":"Sí","action":"show"}]'::jsonb);

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000015','30000000-0000-0000-0000-000000000001',
  '1.8','multiple_choice','¿Qué tipo de discapacidad tiene?',15,true,false,
  '[{"value":"Física/motriz","label":"Física/motriz"},
    {"value":"Visual","label":"Visual"},
    {"value":"Auditiva","label":"Auditiva"},
    {"value":"Intelectual","label":"Intelectual"},
    {"value":"TEA","label":"TEA"},
    {"value":"Psicosocial/salud mental","label":"Psicosocial/salud mental"},
    {"value":"Condición crónica severa","label":"Condición crónica severa"},
    {"value":"Otra","label":"Otra"}]'::jsonb,
  '[{"if_question":"1.6","op":"eq","value":"Sí","action":"show"}]'::jsonb);

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000016','30000000-0000-0000-0000-000000000001',
  '1.9','multiple_choice','¿Qué tipo de apoyo o acompañamiento necesita principalmente?',16,true,false,
  '[{"value":"Movilidad física","label":"Movilidad física"},
    {"value":"Comunicación","label":"Comunicación"},
    {"value":"Apoyo escolar/educativo","label":"Apoyo escolar/educativo"},
    {"value":"Inclusión laboral","label":"Inclusión laboral"},
    {"value":"Terapias/rehabilitación","label":"Terapias/rehabilitación"},
    {"value":"Apoyo emocional/psicosocial","label":"Apoyo emocional/psicosocial"}]'::jsonb,
  '[{"if_question":"1.6","op":"eq","value":"Sí","action":"show"}]'::jsonb);

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000017','30000000-0000-0000-0000-000000000001',
  '1.10','multiple_choice','¿Usa algún elemento de apoyo para la movilidad o autonomía?',17,true,false,
  '[{"value":"Silla de ruedas","label":"Silla de ruedas"},
    {"value":"Bastón","label":"Bastón"},
    {"value":"Andador","label":"Andador"},
    {"value":"Muletas","label":"Muletas"},
    {"value":"Prótesis","label":"Prótesis"},
    {"value":"Tecnología asistiva","label":"Tecnología asistiva"},
    {"value":"No utiliza","label":"No utiliza"}]'::jsonb,
  '[{"if_question":"1.6","op":"eq","value":"Sí","action":"show"}]'::jsonb);

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000018','30000000-0000-0000-0000-000000000001',
  '1.11','single_choice',
  'Si es niño/a o adolescente en edad escolar: ¿está escolarizado/a y enfrenta barreras de aprendizaje?',
  18,true,false,
  '[{"value":"Escolarizado/a, sin barreras importantes","label":"Escolarizado/a, sin barreras importantes"},
    {"value":"Escolarizado/a, enfrenta barreras o faltan ajustes","label":"Escolarizado/a, enfrenta barreras o faltan ajustes"},
    {"value":"No está escolarizado/a","label":"No está escolarizado/a"},
    {"value":"No aplica","label":"No aplica"}]'::jsonb,
  '[{"if_question":"1.6","op":"eq","value":"Sí","action":"show"}]'::jsonb);

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000019','30000000-0000-0000-0000-000000000001',
  '1.12','single_choice','¿La persona con discapacidad se encuentra trabajando actualmente?',19,true,false,
  '[{"value":"Sí, está trabajando","label":"Sí, está trabajando"},
    {"value":"No, y está buscando empleo","label":"No, y está buscando empleo"},
    {"value":"No, y no está buscando","label":"No, y no está buscando"},
    {"value":"No aplica","label":"No aplica"}]'::jsonb,
  '[{"if_question":"1.6","op":"eq","value":"Sí","action":"show"}]'::jsonb);

-- 1.13 trigger — NOT sensitive
INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options)
VALUES ('40000000-0000-0000-0000-000000000020','30000000-0000-0000-0000-000000000001',
  '1.13','single_choice','¿Tenés algún adulto mayor (60+ años) a tu cuidado o bajo tu responsabilidad?',
  20,false,false,
  '[{"value":"Sí","label":"Sí"},
    {"value":"No","label":"No"}]'::jsonb);

-- cond-adulto-mayor: 1.14–1.16 se muestran si 1.13='Sí'
INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000021','30000000-0000-0000-0000-000000000001',
  '1.14','single_choice','¿Qué nivel de dependencia tiene? (la más representativa)',21,true,false,
  '[{"value":"Independiente, pero necesita supervisión","label":"Independiente, pero necesita supervisión"},
    {"value":"Dependencia leve","label":"Dependencia leve"},
    {"value":"Dependencia moderada","label":"Dependencia moderada"},
    {"value":"Dependencia severa","label":"Dependencia severa"}]'::jsonb,
  '[{"if_question":"1.13","op":"eq","value":"Sí","action":"show"}]'::jsonb);

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000022','30000000-0000-0000-0000-000000000001',
  '1.15','multiple_choice','¿Tiene una condición de salud que genere mayor necesidad de cuidado?',22,true,false,
  '[{"value":"Demencia/Alzheimer","label":"Demencia/Alzheimer"},
    {"value":"ACV/Parálisis","label":"ACV/Parálisis"},
    {"value":"Enfermedad crónica grave","label":"Enfermedad crónica grave"},
    {"value":"Movilidad reducida","label":"Movilidad reducida"},
    {"value":"Deterioro cognitivo","label":"Deterioro cognitivo"},
    {"value":"Sin condición específica","label":"Sin condición específica"}]'::jsonb,
  '[{"if_question":"1.13","op":"eq","value":"Sí","action":"show"}]'::jsonb);

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000023','30000000-0000-0000-0000-000000000001',
  '1.16','single_choice','¿Vive con vos o en otra vivienda?',23,false,false,
  '[{"value":"Vive en mi hogar","label":"Vive en mi hogar"},
    {"value":"Vive en otra vivienda","label":"Vive en otra vivienda"},
    {"value":"Está en residencia/institución","label":"Está en residencia/institución"}]'::jsonb,
  '[{"if_question":"1.13","op":"eq","value":"Sí","action":"show"}]'::jsonb);


-- ══════════════════════════════════════════════════════════════
-- SECCIÓN 2 — Intensidad y rol del cuidado (top-level)
-- Cambio 4a: visible si 1.1='Sí' OR 1.6='Sí' OR 1.13='Sí' (eq_any)
-- ══════════════════════════════════════════════════════════════

-- 2.1: Cambio 5 — pasa a multiple_choice (TECH-DEBT: ranking, ver TECH_DEBT.md)
INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000024','30000000-0000-0000-0000-000000000001',
  '2.1','multiple_choice','¿Quién es el/la responsable principal del cuidado?',24,false,false,
  '[{"value":"Yo soy el/la principal","label":"Yo soy el/la principal"},
    {"value":"Comparto con otro familiar","label":"Comparto con otro familiar"},
    {"value":"Hay cuidador/a pagado/a","label":"Hay cuidador/a pagado/a"},
    {"value":"Está en institución/centro de día","label":"Está en institución/centro de día"}]'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb);

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000025','30000000-0000-0000-0000-000000000001',
  '2.2','single_choice','¿Cuántas horas por día dedicás, en promedio, al cuidado directo?',25,false,false,
  '[{"value":"Menos de 1h","label":"Menos de 1h"},
    {"value":"Entre 1 y 3h","label":"Entre 1 y 3h"},
    {"value":"Entre 3 y 6h","label":"Entre 3 y 6h"},
    {"value":"Más de 6h","label":"Más de 6h"},
    {"value":"Varía mucho","label":"Varía mucho"}]'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb);

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000026','30000000-0000-0000-0000-000000000001',
  '2.3','multiple_choice','¿En qué momentos del día cuidás principalmente?',26,false,false,
  '[{"value":"Antes del trabajo","label":"Antes del trabajo"},
    {"value":"Durante horario laboral (llamadas/emergencias)","label":"Durante horario laboral (llamadas/emergencias)"},
    {"value":"Al llegar del trabajo","label":"Al llegar del trabajo"},
    {"value":"Durante la noche","label":"Durante la noche"},
    {"value":"Los fines de semana","label":"Los fines de semana"},
    {"value":"Es continuo sin horario fijo","label":"Es continuo sin horario fijo"}]'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb);

-- 2.4 eliminada (Cambio 6 — feedback equipo médico, similar a 2.1). Ver OBSERVATIONS.md.

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000028','30000000-0000-0000-0000-000000000001',
  '2.5','single_choice',
  'Como cuidador/a primario, ¿presentás signos de agotamiento o estrés crónico?',27,false,false,
  '[{"value":"Sí, frecuentemente","label":"Sí, frecuentemente"},
    {"value":"A veces","label":"A veces"},
    {"value":"No, lo llevo bien","label":"No, lo llevo bien"}]'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb);


-- ══════════════════════════════════════════════════════════════
-- SECCIÓN 3 — Impacto económico del cuidado (top-level)
-- 3.4: is_sensitive=true + analyst-only (no exponer a org_admin)
-- Cambio 4a: visible si 1.1='Sí' OR 1.6='Sí' OR 1.13='Sí' (eq_any)
-- ══════════════════════════════════════════════════════════════

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000029','30000000-0000-0000-0000-000000000001',
  '3.1','single_choice','¿Cuánto estimás que gastás por mes en el cuidado?',28,false,false,
  '[{"value":"Menos de Gs. 500.000","label":"Menos de Gs. 500.000"},
    {"value":"Gs. 500.000–1.500.000","label":"Gs. 500.000–1.500.000"},
    {"value":"Gs. 1.500.000–3.000.000","label":"Gs. 1.500.000–3.000.000"},
    {"value":"Gs. 3.000.000–6.000.000","label":"Gs. 3.000.000–6.000.000"},
    {"value":"Más de Gs. 6.000.000","label":"Más de Gs. 6.000.000"}]'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb);

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000030','30000000-0000-0000-0000-000000000001',
  '3.2','multiple_choice','¿Qué servicios o apoyos utilizás actualmente?',29,false,false,
  '[{"value":"Terapias especializadas","label":"Terapias especializadas"},
    {"value":"Cuidador/a particular","label":"Cuidador/a particular"},
    {"value":"Centro de día/institución","label":"Centro de día/institución"},
    {"value":"Transporte adaptado","label":"Transporte adaptado"},
    {"value":"Medicación alto costo","label":"Medicación alto costo"},
    {"value":"Equipamiento médico/tecnología asistiva","label":"Equipamiento médico/tecnología asistiva"},
    {"value":"No utilizo servicios formales","label":"No utilizo servicios formales"}]'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb);

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000031','30000000-0000-0000-0000-000000000001',
  '3.3','multiple_choice','¿Cómo sostenés los gastos y responsabilidades del cuidado?',30,false,false,
  '[{"value":"Con mi empleo de tiempo completo","label":"Con mi empleo de tiempo completo"},
    {"value":"Con mi empleo de tiempo parcial","label":"Con mi empleo de tiempo parcial"},
    {"value":"Con trabajo independiente/emprendimiento","label":"Con trabajo independiente/emprendimiento"},
    {"value":"Me ayudan mis familiares","label":"Me ayudan mis familiares"},
    {"value":"No puedo sostenerlo con mis ingresos","label":"No puedo sostenerlo con mis ingresos"}]'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb);

-- 3.4: CONFIDENCIAL — is_sensitive=true, analyst-only
-- No exponer en ninguna vista accesible a org_admin (ADR-001 addendum)
INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000032','30000000-0000-0000-0000-000000000001',
  '3.4','single_choice','¿En qué franja salarial mensual te ubicás?',31,true,false,
  '[{"value":"Sueldo mínimo","label":"Sueldo mínimo"},
    {"value":"Gs. 3.000.000 a 5.000.000","label":"Gs. 3.000.000 a 5.000.000"},
    {"value":"Gs. 5.000.001–8.000.000","label":"Gs. 5.000.001–8.000.000"},
    {"value":"Gs. 8.000.001–12.000.000","label":"Gs. 8.000.001–12.000.000"},
    {"value":"Gs. 12.000.001–15.000.000","label":"Gs. 12.000.001–15.000.000"},
    {"value":"Gs. 15.000.001–18.000.000","label":"Gs. 15.000.001–18.000.000"},
    {"value":"Gs. 18.000.001–25.000.000","label":"Gs. 18.000.001–25.000.000"},
    {"value":"Gs. 25.000.001–50.000.000","label":"Gs. 25.000.001–50.000.000"},
    {"value":"Gs. 50.000.001 o más","label":"Gs. 50.000.001 o más"}]'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb);

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000033','30000000-0000-0000-0000-000000000001',
  '3.5','rating','¿Los gastos de cuidado impactan en tu situación económica personal?',32,false,false,
  '{"min":1,"max":5,"min_label":"Sin impacto","max_label":"Muy alto impacto"}'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb);


-- ══════════════════════════════════════════════════════════════
-- SECCIÓN 4 — Tiempo y descanso (top-level)
-- Cambio 4a: visible si 1.1='Sí' OR 1.6='Sí' OR 1.13='Sí' (eq_any)
-- ══════════════════════════════════════════════════════════════

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000034','30000000-0000-0000-0000-000000000001',
  '4.1','single_choice','¿Cómo describirías tu nivel de descanso habitual?',33,false,false,
  '[{"value":"Descanso bien, me siento recuperado/a","label":"Descanso bien, me siento recuperado/a"},
    {"value":"Descanso de forma irregular, pero lo manejo","label":"Descanso de forma irregular, pero lo manejo"},
    {"value":"Me cuesta descansar, me siento cansado/a con frecuencia","label":"Me cuesta descansar, me siento cansado/a con frecuencia"},
    {"value":"Descanso muy poco, el agotamiento afecta mi día a día","label":"Descanso muy poco, el agotamiento afecta mi día a día"}]'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb);

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000035','30000000-0000-0000-0000-000000000001',
  '4.2','multiple_choice','¿Qué aspectos de tu vida se ven más afectados por tu rol de cuidador/a?',34,false,false,
  '[{"value":"Tiempo libre y ocio","label":"Tiempo libre y ocio"},
    {"value":"Sueño y descanso","label":"Sueño y descanso"},
    {"value":"Vida social y amistades","label":"Vida social y amistades"},
    {"value":"Vida en pareja/familiar","label":"Vida en pareja/familiar"},
    {"value":"Salud física personal","label":"Salud física personal"},
    {"value":"Salud emocional/mental","label":"Salud emocional/mental"},
    {"value":"Desarrollo profesional","label":"Desarrollo profesional"},
    {"value":"Situación económica","label":"Situación económica"}]'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb);

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000036','30000000-0000-0000-0000-000000000001',
  '4.3','rating','En una escala del 1 al 5, ¿cómo evaluás tu bienestar general en este momento?',35,false,false,
  '{"min":1,"max":5,"min_label":"Muy mal","max_label":"Muy bien"}'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb);


-- ══════════════════════════════════════════════════════════════
-- SECCIÓN 5 — Impacto en el trabajo (top-level)
-- Cambio 4a: visible si 1.1='Sí' OR 1.6='Sí' OR 1.13='Sí' (eq_any)
-- ══════════════════════════════════════════════════════════════

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000037','30000000-0000-0000-0000-000000000001',
  '5.1','single_choice',
  'En los últimos 3 meses, ¿con qué frecuencia sentiste que el cuidado afectó tu concentración o rendimiento?',
  36,false,false,
  '[{"value":"Nunca o casi nunca","label":"Nunca o casi nunca"},
    {"value":"Algunas veces al mes","label":"Algunas veces al mes"},
    {"value":"Varias veces por semana","label":"Varias veces por semana"},
    {"value":"Casi todos los días","label":"Casi todos los días"}]'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb);

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000038','30000000-0000-0000-0000-000000000001',
  '5.2','single_choice',
  'En el último año, ¿faltaste al trabajo por situaciones relacionadas al cuidado?',37,false,false,
  '[{"value":"Nunca","label":"Nunca"},
    {"value":"Pocas veces (1–3 veces al año)","label":"Pocas veces (1–3 veces al año)"},
    {"value":"Varias veces (4–10 veces al año)","label":"Varias veces (4–10 veces al año)"},
    {"value":"Con frecuencia (más de 10 veces al año)","label":"Con frecuencia (más de 10 veces al año)"}]'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb);


-- ══════════════════════════════════════════════════════════════
-- SECCIÓN 6 — Conciencia organizacional (top-level)
-- 6.1-6.3: Cambio 4a — visible si 1.1='Sí' OR 1.6='Sí' OR 1.13='Sí' (eq_any)
-- 6.4-6.6: siempre visibles (destino del salto triple)
-- 6.2: multiple_choice max_select=3 (ranking en backlog)
-- 6.4/6.5: códigos corregidos (eran 6.2/6.3 duplicados en el HTML original)
-- 6.6: nueva pregunta (Cambio 4b)
-- ══════════════════════════════════════════════════════════════

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000039','30000000-0000-0000-0000-000000000001',
  '6.1','single_choice',
  '¿Sentís que tu empresa conoce o comprende la realidad del cuidado y la discapacidad de su gente?',
  38,false,false,
  '[{"value":"Sí, me siento acompañado/a","label":"Sí, me siento acompañado/a"},
    {"value":"Parcialmente, hay cierta comprensión","label":"Parcialmente, hay cierta comprensión"},
    {"value":"No, es algo bastante invisible","label":"No, es algo bastante invisible"},
    {"value":"No, no se puede hablar del tema","label":"No, no se puede hablar del tema"}]'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb);

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,max_select,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000040','30000000-0000-0000-0000-000000000001',
  '6.2','multiple_choice','¿Qué apoyos de la empresa te ayudarían más? Elegí hasta 3',39,false,false,3,
  '[{"value":"Flexibilidad horaria o trabajo remoto","label":"Flexibilidad horaria o trabajo remoto"},
    {"value":"Apoyo económico o convenios/descuentos","label":"Apoyo económico o convenios/descuentos"},
    {"value":"Acceso a terapias o salud","label":"Acceso a terapias o salud"},
    {"value":"Contención/apoyo emocional o psicológico","label":"Contención/apoyo emocional o psicológico"},
    {"value":"Capacitación y autocuidado","label":"Capacitación y autocuidado"},
    {"value":"Redes de apoyo/grupos de pares","label":"Redes de apoyo/grupos de pares"},
    {"value":"Información sobre recursos y servicios disponibles","label":"Información sobre recursos y servicios disponibles"}]'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb);

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000041','30000000-0000-0000-0000-000000000001',
  '6.3','single_choice',
  '¿Estarías dispuesto/a a participar en un grupo de apoyo para cuidadores dentro de la empresa?',
  40,false,false,
  '[{"value":"Sí, definitivamente","label":"Sí, definitivamente"},
    {"value":"Tal vez, si hay más personas en la misma situación","label":"Tal vez, si hay más personas en la misma situación"},
    {"value":"No por ahora","label":"No por ahora"},
    {"value":"Prefiero mantenerlo en privado","label":"Prefiero mantenerlo en privado"}]'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb);

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options)
VALUES ('40000000-0000-0000-0000-000000000042','30000000-0000-0000-0000-000000000001',
  '6.4','single_choice',
  '¿Conocés a algún compañero/a de trabajo que esté al cuidado de una persona con discapacidad o dependiente?',
  41,false,false,
  '[{"value":"Sí, conozco a varias personas","label":"Sí, conozco a varias personas"},
    {"value":"Sí, conozco a una persona","label":"Sí, conozco a una persona"},
    {"value":"No conozco a nadie","label":"No conozco a nadie"},
    {"value":"No estoy seguro/a","label":"No estoy seguro/a"}]'::jsonb);

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options)
VALUES ('40000000-0000-0000-0000-000000000043','30000000-0000-0000-0000-000000000001',
  '6.5','single_choice',
  '¿Considerás que la empresa debería ofrecer apoyos a quienes cuidan a una persona dependiente?',
  42,false,false,
  '[{"value":"Sí, definitivamente","label":"Sí, definitivamente"},
    {"value":"Tal vez, dependería del caso","label":"Tal vez, dependería del caso"},
    {"value":"No lo considero necesario","label":"No lo considero necesario"},
    {"value":"No lo sé","label":"No lo sé"}]'::jsonb);

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options)
VALUES ('40000000-0000-0000-0000-000000000045','30000000-0000-0000-0000-000000000001',
  '6.6','single_choice',
  '¿Estarías dispuesto/a a ser voluntario/a en iniciativas y/o redes de apoyo a personas con discapacidad y/o cuidadores?',
  43,false,false,
  '[{"value":"Sí","label":"Sí"},
    {"value":"No","label":"No"},
    {"value":"Tal vez","label":"Tal vez"}]'::jsonb);


-- ══════════════════════════════════════════════════════════════
-- SECCIÓN 7 — Para cerrar (top-level)
-- 7.1: text_long — NO exponer en agg_segment ni store analítico (regla 4 CLAUDE.md)
-- ══════════════════════════════════════════════════════════════

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required)
VALUES ('40000000-0000-0000-0000-000000000044','30000000-0000-0000-0000-000000000001',
  '7.1','text_long','¿Te gustaría dejar un comentario o sugerencia especial? (opcional)',44,false,false);

-- ══════════════════════════════════════════════════════════════
-- Etapa 3C — Preguntas survey InQuality (0002)
-- Mismas 44 preguntas que el survey demo (30000000-...-0001),
-- IDs 40000000-0000-0000-0000-00000000002NN.
-- ══════════════════════════════════════════════════════════════

-- ── Preguntas: DELETE + INSERT para idempotencia total ────────
DELETE FROM public.questions
WHERE survey_id = '30000000-0000-0000-0000-000000000002';




-- ══════════════════════════════════════════════════════════════
-- SECCIÓN A — Datos Generales (top-level, cuasi-identificadores)
-- A1=Departamento (single_choice, GeoSelectWidget), A2=Ciudad (single_choice, filtrado client-side)
-- A3=Barrio (text_short, opcional)
-- qi_sector ← A4 · qi_age_bucket ← A5 · qi_city/qi_country ← Sprint 3
-- ══════════════════════════════════════════════════════════════

-- A1: Departamento (18 opciones — los 18 departamentos de Paraguay + Capital)
INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options)
VALUES ('40000000-0000-0000-0000-000000000201','30000000-0000-0000-0000-000000000002',
  'A1','single_choice','Departamento',1,false,false,
  '[{"value":"Asunción (Capital)","label":"Asunción (Capital)"},
    {"value":"Alto Paraguay","label":"Alto Paraguay"},
    {"value":"Alto Paraná","label":"Alto Paraná"},
    {"value":"Amambay","label":"Amambay"},
    {"value":"Boquerón","label":"Boquerón"},
    {"value":"Caaguazú","label":"Caaguazú"},
    {"value":"Caazapá","label":"Caazapá"},
    {"value":"Canindeyú","label":"Canindeyú"},
    {"value":"Central","label":"Central"},
    {"value":"Concepción","label":"Concepción"},
    {"value":"Cordillera","label":"Cordillera"},
    {"value":"Guairá","label":"Guairá"},
    {"value":"Itapúa","label":"Itapúa"},
    {"value":"Misiones","label":"Misiones"},
    {"value":"Ñeembucú","label":"Ñeembucú"},
    {"value":"Paraguarí","label":"Paraguarí"},
    {"value":"Presidente Hayes","label":"Presidente Hayes"},
    {"value":"San Pedro","label":"San Pedro"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options;

-- A2: Ciudad (todas las ciudades; el GeoSelectWidget filtra client-side por departamento)
INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options)
VALUES ('40000000-0000-0000-0000-000000000202','30000000-0000-0000-0000-000000000002',
  'A2','single_choice','Ciudad',2,false,false,
  '[{"value":"Asunción","label":"Asunción"},
    {"value":"Fuerte Olimpo","label":"Fuerte Olimpo"},{"value":"Bahía Negra","label":"Bahía Negra"},{"value":"Carmelo Peralta","label":"Carmelo Peralta"},{"value":"La Victoria","label":"La Victoria"},
    {"value":"Ciudad del Este","label":"Ciudad del Este"},{"value":"Hernandarias","label":"Hernandarias"},{"value":"Minga Guazú","label":"Minga Guazú"},{"value":"Presidente Franco","label":"Presidente Franco"},{"value":"Minga Porã","label":"Minga Porã"},{"value":"Naranjal","label":"Naranjal"},{"value":"Ñacunday","label":"Ñacunday"},{"value":"San Alberto","label":"San Alberto"},{"value":"Santa Rita","label":"Santa Rita"},{"value":"Tavapy","label":"Tavapy"},{"value":"Yguazú","label":"Yguazú"},{"value":"Juan E. O''Leary","label":"Juan E. O''Leary"},{"value":"San Cristóbal","label":"San Cristóbal"},{"value":"Santa Fe del Paraná","label":"Santa Fe del Paraná"},{"value":"Dr. Juan León Mallorquín","label":"Dr. Juan León Mallorquín"},{"value":"Itakyry","label":"Itakyry"},{"value":"Domingo Martínez de Irala","label":"Domingo Martínez de Irala"},
    {"value":"Pedro Juan Caballero","label":"Pedro Juan Caballero"},{"value":"Bella Vista Norte","label":"Bella Vista Norte"},{"value":"Capitán Bado","label":"Capitán Bado"},{"value":"Zanja Pytã","label":"Zanja Pytã"},
    {"value":"Filadelfia","label":"Filadelfia"},{"value":"Loma Plata","label":"Loma Plata"},{"value":"Mariscal Estigarribia","label":"Mariscal Estigarribia"},{"value":"Neuland","label":"Neuland"},
    {"value":"Coronel Oviedo","label":"Coronel Oviedo"},{"value":"Caaguazú","label":"Caaguazú"},{"value":"Carayaó","label":"Carayaó"},{"value":"Dr. Juan Manuel Frutos","label":"Dr. Juan Manuel Frutos"},{"value":"Mbutuy","label":"Mbutuy"},{"value":"Nueva Londres","label":"Nueva Londres"},{"value":"Raúl Arsenio Oviedo","label":"Raúl Arsenio Oviedo"},{"value":"Repatriación","label":"Repatriación"},{"value":"San Joaquín","label":"San Joaquín"},{"value":"San José de los Arroyos","label":"San José de los Arroyos"},{"value":"Simón Bolívar","label":"Simón Bolívar"},{"value":"Vaquería","label":"Vaquería"},{"value":"Yhú","label":"Yhú"},{"value":"José Domingo Ocampos","label":"José Domingo Ocampos"},{"value":"3 de Febrero","label":"3 de Febrero"},{"value":"Mcal. Francisco Solano López","label":"Mcal. Francisco Solano López"},{"value":"Los Cedrales","label":"Los Cedrales"},
    {"value":"Caazapá","label":"Caazapá"},{"value":"Abai","label":"Abai"},{"value":"Buena Vista","label":"Buena Vista"},{"value":"General Higinio Morínigo","label":"General Higinio Morínigo"},{"value":"Huber Duré","label":"Huber Duré"},{"value":"Maciel","label":"Maciel"},{"value":"San Juan Nepomuceno","label":"San Juan Nepomuceno"},{"value":"Tavaí","label":"Tavaí"},{"value":"Yegros","label":"Yegros"},{"value":"Yuty","label":"Yuty"},
    {"value":"Salto del Guairá","label":"Salto del Guairá"},{"value":"Corpus Christi","label":"Corpus Christi"},{"value":"Curuguaty","label":"Curuguaty"},{"value":"General Francisco Caballero Álvarez","label":"General Francisco Caballero Álvarez"},{"value":"Itanará","label":"Itanará"},{"value":"Katueté","label":"Katueté"},{"value":"La Paloma","label":"La Paloma"},{"value":"Nueva Esperanza","label":"Nueva Esperanza"},{"value":"Yasy Kañy","label":"Yasy Kañy"},{"value":"Ypejhú","label":"Ypejhú"},
    {"value":"Areguá","label":"Areguá"},{"value":"Capiatá","label":"Capiatá"},{"value":"Fernando de la Mora","label":"Fernando de la Mora"},{"value":"Guarambaré","label":"Guarambaré"},{"value":"Itá","label":"Itá"},{"value":"Itauguá","label":"Itauguá"},{"value":"Juan Augusto Saldívar","label":"Juan Augusto Saldívar"},{"value":"Lambaré","label":"Lambaré"},{"value":"Limpio","label":"Limpio"},{"value":"Luque","label":"Luque"},{"value":"Mariano Roque Alonso","label":"Mariano Roque Alonso"},{"value":"Nueva Italia","label":"Nueva Italia"},{"value":"Ñemby","label":"Ñemby"},{"value":"San Antonio","label":"San Antonio"},{"value":"San Lorenzo","label":"San Lorenzo"},{"value":"Villa Elisa","label":"Villa Elisa"},{"value":"Villeta","label":"Villeta"},{"value":"Ypané","label":"Ypané"},{"value":"Ypacaraí","label":"Ypacaraí"},
    {"value":"Concepción","label":"Concepción"},{"value":"Belén","label":"Belén"},{"value":"Horqueta","label":"Horqueta"},{"value":"Loreto","label":"Loreto"},{"value":"San Lázaro","label":"San Lázaro"},{"value":"San Carlos del Apa","label":"San Carlos del Apa"},{"value":"Yby Yaú","label":"Yby Yaú"},{"value":"Azote''y","label":"Azote''y"},{"value":"Sgto. José Félix López","label":"Sgto. José Félix López"},
    {"value":"Caacupé","label":"Caacupé"},{"value":"Altos","label":"Altos"},{"value":"Arroyos y Esteros","label":"Arroyos y Esteros"},{"value":"Caraguatay","label":"Caraguatay"},{"value":"Emboscada","label":"Emboscada"},{"value":"Eusebio Ayala","label":"Eusebio Ayala"},{"value":"Isla Pucú","label":"Isla Pucú"},{"value":"Itacurubí de la Cordillera","label":"Itacurubí de la Cordillera"},{"value":"Juan de Mena","label":"Juan de Mena"},{"value":"Loma Grande","label":"Loma Grande"},{"value":"Mbocayaty del Yhaguy","label":"Mbocayaty del Yhaguy"},{"value":"Nueva Colombia","label":"Nueva Colombia"},{"value":"Pirayú","label":"Pirayú"},{"value":"Primero de Marzo","label":"Primero de Marzo"},{"value":"Tobatí","label":"Tobatí"},{"value":"Valenzuela","label":"Valenzuela"},
    {"value":"Villarrica","label":"Villarrica"},{"value":"Borja","label":"Borja"},{"value":"Capitán Mauricio José Troche","label":"Capitán Mauricio José Troche"},{"value":"Coronel Martínez","label":"Coronel Martínez"},{"value":"Félix Pérez Cardozo","label":"Félix Pérez Cardozo"},{"value":"General Eugenio A. Garay","label":"General Eugenio A. Garay"},{"value":"Independencia","label":"Independencia"},{"value":"Itapé","label":"Itapé"},{"value":"Iturbe","label":"Iturbe"},{"value":"José Fassardi","label":"José Fassardi"},{"value":"Mbocayaty","label":"Mbocayaty"},{"value":"Natalicio Talavera","label":"Natalicio Talavera"},{"value":"Ñumí","label":"Ñumí"},{"value":"San Salvador","label":"San Salvador"},{"value":"Yataity","label":"Yataity"},
    {"value":"Encarnación","label":"Encarnación"},{"value":"Alto Verá","label":"Alto Verá"},{"value":"Bella Vista","label":"Bella Vista"},{"value":"Cambyretá","label":"Cambyretá"},{"value":"Capitán Meza","label":"Capitán Meza"},{"value":"Capitán Miranda","label":"Capitán Miranda"},{"value":"Carlos A. López","label":"Carlos A. López"},{"value":"Carmen del Paraná","label":"Carmen del Paraná"},{"value":"Coronel Bogado","label":"Coronel Bogado"},{"value":"Cosme","label":"Cosme"},{"value":"Edelira","label":"Edelira"},{"value":"Fram","label":"Fram"},{"value":"General Artigas","label":"General Artigas"},{"value":"Hohenau","label":"Hohenau"},{"value":"Itapúa Poty","label":"Itapúa Poty"},{"value":"Jesús","label":"Jesús"},{"value":"La Paz","label":"La Paz"},{"value":"Leandro Oviedo","label":"Leandro Oviedo"},{"value":"Mayor Otaño","label":"Mayor Otaño"},{"value":"Natalio","label":"Natalio"},{"value":"Nueva Alborada","label":"Nueva Alborada"},{"value":"Obligado","label":"Obligado"},{"value":"Pirapó","label":"Pirapó"},{"value":"San Cosme y Damián","label":"San Cosme y Damián"},{"value":"San Juan del Paraná","label":"San Juan del Paraná"},{"value":"San Pedro del Paraná","label":"San Pedro del Paraná"},{"value":"San Rafael del Paraná","label":"San Rafael del Paraná"},{"value":"Trinidad","label":"Trinidad"},{"value":"Tomás Romero Pereira","label":"Tomás Romero Pereira"},
    {"value":"San Juan Bautista","label":"San Juan Bautista"},{"value":"Ayolas","label":"Ayolas"},{"value":"San Ignacio","label":"San Ignacio"},{"value":"San Miguel","label":"San Miguel"},{"value":"San Patricio","label":"San Patricio"},{"value":"Santa María","label":"Santa María"},{"value":"Santa Rosa","label":"Santa Rosa"},{"value":"Santiago","label":"Santiago"},{"value":"Villa Florida","label":"Villa Florida"},{"value":"Yabebyry","label":"Yabebyry"},
    {"value":"Pilar","label":"Pilar"},{"value":"Alberdi","label":"Alberdi"},{"value":"Cerrito","label":"Cerrito"},{"value":"Desmochados","label":"Desmochados"},{"value":"General José Eduvigis Díaz","label":"General José Eduvigis Díaz"},{"value":"Guazú Cuá","label":"Guazú Cuá"},{"value":"Humaitá","label":"Humaitá"},{"value":"Isla Umbú","label":"Isla Umbú"},{"value":"Laureles","label":"Laureles"},{"value":"Mayor José de J. Martínez","label":"Mayor José de J. Martínez"},{"value":"Paso de Patria","label":"Paso de Patria"},{"value":"San Juan Bautista del Ñeembucú","label":"San Juan Bautista del Ñeembucú"},{"value":"Tacuaras","label":"Tacuaras"},{"value":"Villa Franca","label":"Villa Franca"},{"value":"Villa Oliva","label":"Villa Oliva"},{"value":"Villalba","label":"Villalba"},
    {"value":"Paraguarí","label":"Paraguarí"},{"value":"Acahay","label":"Acahay"},{"value":"Carapeguá","label":"Carapeguá"},{"value":"Escobar","label":"Escobar"},{"value":"General Bernardino Caballero","label":"General Bernardino Caballero"},{"value":"La Colmena","label":"La Colmena"},{"value":"Mbuyapey","label":"Mbuyapey"},{"value":"Quiindy","label":"Quiindy"},{"value":"Quyquyhó","label":"Quyquyhó"},{"value":"San Roque González de Santa Cruz","label":"San Roque González de Santa Cruz"},{"value":"Sapucaí","label":"Sapucaí"},{"value":"Tebicuarymí","label":"Tebicuarymí"},{"value":"Ybycuí","label":"Ybycuí"},{"value":"Ybytymí","label":"Ybytymí"},{"value":"Yaguarón","label":"Yaguarón"},
    {"value":"Villa Hayes","label":"Villa Hayes"},{"value":"Benjamín Aceval","label":"Benjamín Aceval"},{"value":"José Falcón","label":"José Falcón"},{"value":"Nanawa","label":"Nanawa"},{"value":"Nueva Asunción","label":"Nueva Asunción"},{"value":"Pozo Colorado","label":"Pozo Colorado"},{"value":"Puerto Pinasco","label":"Puerto Pinasco"},{"value":"Teniente Primero Manuel Irala Fernández","label":"Teniente Primero Manuel Irala Fernández"},{"value":"Villa del Río","label":"Villa del Río"},
    {"value":"San Pedro del Ycuamandiyú","label":"San Pedro del Ycuamandiyú"},{"value":"Antequera","label":"Antequera"},{"value":"Choré","label":"Choré"},{"value":"General Elizardo Aquino","label":"General Elizardo Aquino"},{"value":"Guayaibí","label":"Guayaibí"},{"value":"Itacurubí del Rosario","label":"Itacurubí del Rosario"},{"value":"Lima","label":"Lima"},{"value":"Nueva Germania","label":"Nueva Germania"},{"value":"Río Verde","label":"Río Verde"},{"value":"San Estanislao (Santaní)","label":"San Estanislao (Santaní)"},{"value":"Tacuatí","label":"Tacuatí"},{"value":"Unión","label":"Unión"},{"value":"Villa del Rosario","label":"Villa del Rosario"},{"value":"Yataity del Norte","label":"Yataity del Norte"}
  ]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options;

-- A3: Barrio (text_short, opcional — antes era "Sucursal o sede")
INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required)
VALUES ('40000000-0000-0000-0000-000000000203','30000000-0000-0000-0000-000000000002',
  'A3','text_short','¿En qué barrio vivís? (opcional)',3,false,false)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options)
VALUES ('40000000-0000-0000-0000-000000000204','30000000-0000-0000-0000-000000000002',
  'A4','single_choice','¿En qué área o gerencia trabajás?',4,false,false,
  '[{"value":"Directorio","label":"Directorio"},
    {"value":"Gerencia","label":"Gerencia"},
    {"value":"Operaciones/Producción","label":"Operaciones/Producción"},
    {"value":"Comercial/Ventas","label":"Comercial/Ventas"},
    {"value":"Administración/Finanzas","label":"Administración/Finanzas"},
    {"value":"Recursos Humanos/Cultura","label":"Recursos Humanos/Cultura"},
    {"value":"Tecnología/Sistemas","label":"Tecnología/Sistemas"},
    {"value":"Logística/Distribución","label":"Logística/Distribución"},
    {"value":"Otra área","label":"Otra área"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options)
VALUES ('40000000-0000-0000-0000-000000000205','30000000-0000-0000-0000-000000000002',
  'A5','single_choice','¿Cuántos años tenés?',5,false,false,
  '[{"value":"Menos de 25 años","label":"Menos de 25 años"},
    {"value":"25 a 34 años","label":"25 a 34 años"},
    {"value":"35 a 44 años","label":"35 a 44 años"},
    {"value":"45 a 54 años","label":"45 a 54 años"},
    {"value":"55 años o más","label":"55 años o más"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options)
VALUES ('40000000-0000-0000-0000-000000000206','30000000-0000-0000-0000-000000000002',
  'A6','single_choice','¿Con qué género te identificás?',6,false,false,
  '[{"value":"Femenino","label":"Femenino"},
    {"value":"Masculino","label":"Masculino"},
    {"value":"No binario/Otro","label":"No binario/Otro"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options)
VALUES ('40000000-0000-0000-0000-000000000207','30000000-0000-0000-0000-000000000002',
  'A7','single_choice','¿Cuál es tu modalidad de trabajo actual?',7,false,false,
  '[{"value":"Presencial","label":"Presencial"},
    {"value":"Remoto (home office)","label":"Remoto (home office)"},
    {"value":"Híbrido","label":"Híbrido"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options;


-- ══════════════════════════════════════════════════════════════
-- SECCIÓN 1 — Prevalencia: cuidado y discapacidad (sensible)
-- Triggers: 1.1 (→1.2–1.5), 1.6 (→1.7–1.12), 1.13 (→1.14–1.16)
-- ══════════════════════════════════════════════════════════════

-- 1.1 trigger — is_sensitive=true, sin conditional_rules
INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options)
VALUES ('40000000-0000-0000-0000-000000000208','30000000-0000-0000-0000-000000000002',
  '1.1','single_choice',
  '¿Vos mismo/a vivís con alguna discapacidad o condición de salud que afecte tu funcionamiento cotidiano?',
  8,true,false,
  '[{"value":"Sí","label":"Sí"},
    {"value":"No","label":"No"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options;

-- cond-disc-propia: 1.2–1.5 se muestran si 1.1='Sí'
INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000209','30000000-0000-0000-0000-000000000002',
  '1.2','multiple_choice','¿Qué tipo de discapacidad o condición tenés?',9,true,false,
  '[{"value":"Discapacidad física/motriz","label":"Discapacidad física/motriz"},
    {"value":"Visual","label":"Visual"},
    {"value":"Auditiva","label":"Auditiva"},
    {"value":"Intelectual","label":"Intelectual"},
    {"value":"TEA","label":"TEA"},
    {"value":"Psicosocial/salud mental","label":"Psicosocial/salud mental"},
    {"value":"Condición crónica que genera limitaciones","label":"Condición crónica que genera limitaciones"},
    {"value":"Otra","label":"Otra"}]'::jsonb,
  '[{"if_question":"1.1","op":"eq","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000210','30000000-0000-0000-0000-000000000002',
  '1.3','multiple_choice','¿Usás algún elemento de apoyo para la movilidad o autonomía?',10,true,false,
  '[{"value":"Silla de ruedas","label":"Silla de ruedas"},
    {"value":"Bastón","label":"Bastón"},
    {"value":"Andador","label":"Andador"},
    {"value":"Muletas","label":"Muletas"},
    {"value":"Prótesis","label":"Prótesis"},
    {"value":"Tecnología asistiva","label":"Tecnología asistiva"},
    {"value":"No utilizo","label":"No utilizo"}]'::jsonb,
  '[{"if_question":"1.1","op":"eq","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000211','30000000-0000-0000-0000-000000000002',
  '1.4','single_choice','¿Contás con certificado oficial de discapacidad?',11,true,false,
  '[{"value":"Sí","label":"Sí"},
    {"value":"No, pero estoy en trámite","label":"No, pero estoy en trámite"},
    {"value":"No","label":"No"}]'::jsonb,
  '[{"if_question":"1.1","op":"eq","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000212','30000000-0000-0000-0000-000000000002',
  '1.5','single_choice','¿Tu condición afecta tu desempeño o comodidad en el trabajo?',12,true,false,
  '[{"value":"Sí, de forma significativa","label":"Sí, de forma significativa"},
    {"value":"Sí, pero en aspectos puntuales","label":"Sí, pero en aspectos puntuales"},
    {"value":"No, está bien gestionada","label":"No, está bien gestionada"}]'::jsonb,
  '[{"if_question":"1.1","op":"eq","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

-- 1.6 trigger — is_sensitive=true
INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options)
VALUES ('40000000-0000-0000-0000-000000000213','30000000-0000-0000-0000-000000000002',
  '1.6','single_choice',
  '¿Tenés algún familiar cercano (hijo/a, pareja, hermano/a, padre/madre) que viva con discapacidad?',
  13,true,false,
  '[{"value":"Sí","label":"Sí"},
    {"value":"No","label":"No"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options;

-- cond-familiar: 1.7–1.12 se muestran si 1.6='Sí'
INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000214','30000000-0000-0000-0000-000000000002',
  '1.7','multiple_choice','¿Cuál es tu vínculo con esa persona?',14,true,false,
  '[{"value":"Hijo/a","label":"Hijo/a"},
    {"value":"Cónyuge/pareja","label":"Cónyuge/pareja"},
    {"value":"Padre o madre","label":"Padre o madre"},
    {"value":"Hermano/a","label":"Hermano/a"},
    {"value":"Otro familiar","label":"Otro familiar"}]'::jsonb,
  '[{"if_question":"1.6","op":"eq","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000215','30000000-0000-0000-0000-000000000002',
  '1.8','multiple_choice','¿Qué tipo de discapacidad tiene?',15,true,false,
  '[{"value":"Física/motriz","label":"Física/motriz"},
    {"value":"Visual","label":"Visual"},
    {"value":"Auditiva","label":"Auditiva"},
    {"value":"Intelectual","label":"Intelectual"},
    {"value":"TEA","label":"TEA"},
    {"value":"Psicosocial/salud mental","label":"Psicosocial/salud mental"},
    {"value":"Condición crónica severa","label":"Condición crónica severa"},
    {"value":"Otra","label":"Otra"}]'::jsonb,
  '[{"if_question":"1.6","op":"eq","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000216','30000000-0000-0000-0000-000000000002',
  '1.9','multiple_choice','¿Qué tipo de apoyo o acompañamiento necesita principalmente?',16,true,false,
  '[{"value":"Movilidad física","label":"Movilidad física"},
    {"value":"Comunicación","label":"Comunicación"},
    {"value":"Apoyo escolar/educativo","label":"Apoyo escolar/educativo"},
    {"value":"Inclusión laboral","label":"Inclusión laboral"},
    {"value":"Terapias/rehabilitación","label":"Terapias/rehabilitación"},
    {"value":"Apoyo emocional/psicosocial","label":"Apoyo emocional/psicosocial"}]'::jsonb,
  '[{"if_question":"1.6","op":"eq","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000217','30000000-0000-0000-0000-000000000002',
  '1.10','multiple_choice','¿Usa algún elemento de apoyo para la movilidad o autonomía?',17,true,false,
  '[{"value":"Silla de ruedas","label":"Silla de ruedas"},
    {"value":"Bastón","label":"Bastón"},
    {"value":"Andador","label":"Andador"},
    {"value":"Muletas","label":"Muletas"},
    {"value":"Prótesis","label":"Prótesis"},
    {"value":"Tecnología asistiva","label":"Tecnología asistiva"},
    {"value":"No utiliza","label":"No utiliza"}]'::jsonb,
  '[{"if_question":"1.6","op":"eq","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000218','30000000-0000-0000-0000-000000000002',
  '1.11','single_choice',
  'Si es niño/a o adolescente en edad escolar: ¿está escolarizado/a y enfrenta barreras de aprendizaje?',
  18,true,false,
  '[{"value":"Escolarizado/a, sin barreras importantes","label":"Escolarizado/a, sin barreras importantes"},
    {"value":"Escolarizado/a, enfrenta barreras o faltan ajustes","label":"Escolarizado/a, enfrenta barreras o faltan ajustes"},
    {"value":"No está escolarizado/a","label":"No está escolarizado/a"},
    {"value":"No aplica","label":"No aplica"}]'::jsonb,
  '[{"if_question":"1.6","op":"eq","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000219','30000000-0000-0000-0000-000000000002',
  '1.12','single_choice','¿La persona con discapacidad se encuentra trabajando actualmente?',19,true,false,
  '[{"value":"Sí, está trabajando","label":"Sí, está trabajando"},
    {"value":"No, y está buscando empleo","label":"No, y está buscando empleo"},
    {"value":"No, y no está buscando","label":"No, y no está buscando"},
    {"value":"No aplica","label":"No aplica"}]'::jsonb,
  '[{"if_question":"1.6","op":"eq","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

-- 1.13 trigger — NOT sensitive
INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options)
VALUES ('40000000-0000-0000-0000-000000000220','30000000-0000-0000-0000-000000000002',
  '1.13','single_choice','¿Tenés algún adulto mayor (60+ años) a tu cuidado o bajo tu responsabilidad?',
  20,false,false,
  '[{"value":"Sí","label":"Sí"},
    {"value":"No","label":"No"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options;

-- cond-adulto-mayor: 1.14–1.16 se muestran si 1.13='Sí'
INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000221','30000000-0000-0000-0000-000000000002',
  '1.14','single_choice','¿Qué nivel de dependencia tiene? (la más representativa)',21,true,false,
  '[{"value":"Independiente, pero necesita supervisión","label":"Independiente, pero necesita supervisión"},
    {"value":"Dependencia leve","label":"Dependencia leve"},
    {"value":"Dependencia moderada","label":"Dependencia moderada"},
    {"value":"Dependencia severa","label":"Dependencia severa"}]'::jsonb,
  '[{"if_question":"1.13","op":"eq","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000222','30000000-0000-0000-0000-000000000002',
  '1.15','multiple_choice','¿Tiene una condición de salud que genere mayor necesidad de cuidado?',22,true,false,
  '[{"value":"Demencia/Alzheimer","label":"Demencia/Alzheimer"},
    {"value":"ACV/Parálisis","label":"ACV/Parálisis"},
    {"value":"Enfermedad crónica grave","label":"Enfermedad crónica grave"},
    {"value":"Movilidad reducida","label":"Movilidad reducida"},
    {"value":"Deterioro cognitivo","label":"Deterioro cognitivo"},
    {"value":"Sin condición específica","label":"Sin condición específica"}]'::jsonb,
  '[{"if_question":"1.13","op":"eq","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000223','30000000-0000-0000-0000-000000000002',
  '1.16','single_choice','¿Vive con vos o en otra vivienda?',23,false,false,
  '[{"value":"Vive en mi hogar","label":"Vive en mi hogar"},
    {"value":"Vive en otra vivienda","label":"Vive en otra vivienda"},
    {"value":"Está en residencia/institución","label":"Está en residencia/institución"}]'::jsonb,
  '[{"if_question":"1.13","op":"eq","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;


-- ══════════════════════════════════════════════════════════════
-- SECCIÓN 2 — Intensidad y rol del cuidado (top-level)
-- Cambio 4a: visible si 1.1='Sí' OR 1.6='Sí' OR 1.13='Sí' (eq_any)
-- ══════════════════════════════════════════════════════════════

-- 2.1: Cambio 5 — pasa a multiple_choice (TECH-DEBT: ranking, ver TECH_DEBT.md)
INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000224','30000000-0000-0000-0000-000000000002',
  '2.1','multiple_choice','¿Quién es el/la responsable principal del cuidado?',24,false,false,
  '[{"value":"Yo soy el/la principal","label":"Yo soy el/la principal"},
    {"value":"Comparto con otro familiar","label":"Comparto con otro familiar"},
    {"value":"Hay cuidador/a pagado/a","label":"Hay cuidador/a pagado/a"},
    {"value":"Está en institución/centro de día","label":"Está en institución/centro de día"}]'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000225','30000000-0000-0000-0000-000000000002',
  '2.2','single_choice','¿Cuántas horas por día dedicás, en promedio, al cuidado directo?',25,false,false,
  '[{"value":"Menos de 1h","label":"Menos de 1h"},
    {"value":"Entre 1 y 3h","label":"Entre 1 y 3h"},
    {"value":"Entre 3 y 6h","label":"Entre 3 y 6h"},
    {"value":"Más de 6h","label":"Más de 6h"},
    {"value":"Varía mucho","label":"Varía mucho"}]'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000226','30000000-0000-0000-0000-000000000002',
  '2.3','multiple_choice','¿En qué momentos del día cuidás principalmente?',26,false,false,
  '[{"value":"Antes del trabajo","label":"Antes del trabajo"},
    {"value":"Durante horario laboral (llamadas/emergencias)","label":"Durante horario laboral (llamadas/emergencias)"},
    {"value":"Al llegar del trabajo","label":"Al llegar del trabajo"},
    {"value":"Durante la noche","label":"Durante la noche"},
    {"value":"Los fines de semana","label":"Los fines de semana"},
    {"value":"Es continuo sin horario fijo","label":"Es continuo sin horario fijo"}]'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

-- 2.4 eliminada (Cambio 6 — feedback equipo médico, similar a 2.1). Ver OBSERVATIONS.md.

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000228','30000000-0000-0000-0000-000000000002',
  '2.5','single_choice',
  'Como cuidador/a primario, ¿presentás signos de agotamiento o estrés crónico?',27,false,false,
  '[{"value":"Sí, frecuentemente","label":"Sí, frecuentemente"},
    {"value":"A veces","label":"A veces"},
    {"value":"No, lo llevo bien","label":"No, lo llevo bien"}]'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;


-- ══════════════════════════════════════════════════════════════
-- SECCIÓN 3 — Impacto económico del cuidado (top-level)
-- 3.4: is_sensitive=true + analyst-only (no exponer a org_admin)
-- Cambio 4a: visible si 1.1='Sí' OR 1.6='Sí' OR 1.13='Sí' (eq_any)
-- ══════════════════════════════════════════════════════════════

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000229','30000000-0000-0000-0000-000000000002',
  '3.1','single_choice','¿Cuánto estimás que gastás por mes en el cuidado?',28,false,false,
  '[{"value":"Menos de Gs. 500.000","label":"Menos de Gs. 500.000"},
    {"value":"Gs. 500.000–1.500.000","label":"Gs. 500.000–1.500.000"},
    {"value":"Gs. 1.500.000–3.000.000","label":"Gs. 1.500.000–3.000.000"},
    {"value":"Gs. 3.000.000–6.000.000","label":"Gs. 3.000.000–6.000.000"},
    {"value":"Más de Gs. 6.000.000","label":"Más de Gs. 6.000.000"}]'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000230','30000000-0000-0000-0000-000000000002',
  '3.2','multiple_choice','¿Qué servicios o apoyos utilizás actualmente?',29,false,false,
  '[{"value":"Terapias especializadas","label":"Terapias especializadas"},
    {"value":"Cuidador/a particular","label":"Cuidador/a particular"},
    {"value":"Centro de día/institución","label":"Centro de día/institución"},
    {"value":"Transporte adaptado","label":"Transporte adaptado"},
    {"value":"Medicación alto costo","label":"Medicación alto costo"},
    {"value":"Equipamiento médico/tecnología asistiva","label":"Equipamiento médico/tecnología asistiva"},
    {"value":"No utilizo servicios formales","label":"No utilizo servicios formales"}]'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000231','30000000-0000-0000-0000-000000000002',
  '3.3','multiple_choice','¿Cómo sostenés los gastos y responsabilidades del cuidado?',30,false,false,
  '[{"value":"Con mi empleo de tiempo completo","label":"Con mi empleo de tiempo completo"},
    {"value":"Con mi empleo de tiempo parcial","label":"Con mi empleo de tiempo parcial"},
    {"value":"Con trabajo independiente/emprendimiento","label":"Con trabajo independiente/emprendimiento"},
    {"value":"Me ayudan mis familiares","label":"Me ayudan mis familiares"},
    {"value":"No puedo sostenerlo con mis ingresos","label":"No puedo sostenerlo con mis ingresos"}]'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

-- 3.4: CONFIDENCIAL — is_sensitive=true, analyst-only
-- No exponer en ninguna vista accesible a org_admin (ADR-001 addendum)
INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000232','30000000-0000-0000-0000-000000000002',
  '3.4','single_choice','¿En qué franja salarial mensual te ubicás?',31,true,false,
  '[{"value":"Sueldo mínimo","label":"Sueldo mínimo"},
    {"value":"Gs. 3.000.000 a 5.000.000","label":"Gs. 3.000.000 a 5.000.000"},
    {"value":"Gs. 5.000.001–8.000.000","label":"Gs. 5.000.001–8.000.000"},
    {"value":"Gs. 8.000.001–12.000.000","label":"Gs. 8.000.001–12.000.000"},
    {"value":"Gs. 12.000.001–15.000.000","label":"Gs. 12.000.001–15.000.000"},
    {"value":"Gs. 15.000.001–18.000.000","label":"Gs. 15.000.001–18.000.000"},
    {"value":"Gs. 18.000.001–25.000.000","label":"Gs. 18.000.001–25.000.000"},
    {"value":"Gs. 25.000.001–50.000.000","label":"Gs. 25.000.001–50.000.000"},
    {"value":"Gs. 50.000.001 o más","label":"Gs. 50.000.001 o más"}]'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000233','30000000-0000-0000-0000-000000000002',
  '3.5','rating','¿Los gastos de cuidado impactan en tu situación económica personal?',32,false,false,
  '{"min":1,"max":5,"min_label":"Sin impacto","max_label":"Muy alto impacto"}'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;


-- ══════════════════════════════════════════════════════════════
-- SECCIÓN 4 — Tiempo y descanso (top-level)
-- Cambio 4a: visible si 1.1='Sí' OR 1.6='Sí' OR 1.13='Sí' (eq_any)
-- ══════════════════════════════════════════════════════════════

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000234','30000000-0000-0000-0000-000000000002',
  '4.1','single_choice','¿Cómo describirías tu nivel de descanso habitual?',33,false,false,
  '[{"value":"Descanso bien, me siento recuperado/a","label":"Descanso bien, me siento recuperado/a"},
    {"value":"Descanso de forma irregular, pero lo manejo","label":"Descanso de forma irregular, pero lo manejo"},
    {"value":"Me cuesta descansar, me siento cansado/a con frecuencia","label":"Me cuesta descansar, me siento cansado/a con frecuencia"},
    {"value":"Descanso muy poco, el agotamiento afecta mi día a día","label":"Descanso muy poco, el agotamiento afecta mi día a día"}]'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000235','30000000-0000-0000-0000-000000000002',
  '4.2','multiple_choice','¿Qué aspectos de tu vida se ven más afectados por tu rol de cuidador/a?',34,false,false,
  '[{"value":"Tiempo libre y ocio","label":"Tiempo libre y ocio"},
    {"value":"Sueño y descanso","label":"Sueño y descanso"},
    {"value":"Vida social y amistades","label":"Vida social y amistades"},
    {"value":"Vida en pareja/familiar","label":"Vida en pareja/familiar"},
    {"value":"Salud física personal","label":"Salud física personal"},
    {"value":"Salud emocional/mental","label":"Salud emocional/mental"},
    {"value":"Desarrollo profesional","label":"Desarrollo profesional"},
    {"value":"Situación económica","label":"Situación económica"}]'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000236','30000000-0000-0000-0000-000000000002',
  '4.3','rating','En una escala del 1 al 5, ¿cómo evaluás tu bienestar general en este momento?',35,false,false,
  '{"min":1,"max":5,"min_label":"Muy mal","max_label":"Muy bien"}'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;


-- ══════════════════════════════════════════════════════════════
-- SECCIÓN 5 — Impacto en el trabajo (top-level)
-- Cambio 4a: visible si 1.1='Sí' OR 1.6='Sí' OR 1.13='Sí' (eq_any)
-- ══════════════════════════════════════════════════════════════

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000237','30000000-0000-0000-0000-000000000002',
  '5.1','single_choice',
  'En los últimos 3 meses, ¿con qué frecuencia sentiste que el cuidado afectó tu concentración o rendimiento?',
  36,false,false,
  '[{"value":"Nunca o casi nunca","label":"Nunca o casi nunca"},
    {"value":"Algunas veces al mes","label":"Algunas veces al mes"},
    {"value":"Varias veces por semana","label":"Varias veces por semana"},
    {"value":"Casi todos los días","label":"Casi todos los días"}]'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000238','30000000-0000-0000-0000-000000000002',
  '5.2','single_choice',
  'En el último año, ¿faltaste al trabajo por situaciones relacionadas al cuidado?',37,false,false,
  '[{"value":"Nunca","label":"Nunca"},
    {"value":"Pocas veces (1–3 veces al año)","label":"Pocas veces (1–3 veces al año)"},
    {"value":"Varias veces (4–10 veces al año)","label":"Varias veces (4–10 veces al año)"},
    {"value":"Con frecuencia (más de 10 veces al año)","label":"Con frecuencia (más de 10 veces al año)"}]'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;


-- ══════════════════════════════════════════════════════════════
-- SECCIÓN 6 — Conciencia organizacional (top-level)
-- 6.1-6.3: Cambio 4a — visible si 1.1='Sí' OR 1.6='Sí' OR 1.13='Sí' (eq_any)
-- 6.4-6.6: siempre visibles (destino del salto triple)
-- 6.2: multiple_choice max_select=3 (ranking en backlog)
-- 6.4/6.5: códigos corregidos (eran 6.2/6.3 duplicados en el HTML original)
-- 6.6: nueva pregunta (Cambio 4b)
-- ══════════════════════════════════════════════════════════════

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000239','30000000-0000-0000-0000-000000000002',
  '6.1','single_choice',
  '¿Sentís que tu empresa conoce o comprende la realidad del cuidado y la discapacidad de su gente?',
  38,false,false,
  '[{"value":"Sí, me siento acompañado/a","label":"Sí, me siento acompañado/a"},
    {"value":"Parcialmente, hay cierta comprensión","label":"Parcialmente, hay cierta comprensión"},
    {"value":"No, es algo bastante invisible","label":"No, es algo bastante invisible"},
    {"value":"No, no se puede hablar del tema","label":"No, no se puede hablar del tema"}]'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,max_select,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000240','30000000-0000-0000-0000-000000000002',
  '6.2','multiple_choice','¿Qué apoyos de la empresa te ayudarían más? Elegí hasta 3',39,false,false,3,
  '[{"value":"Flexibilidad horaria o trabajo remoto","label":"Flexibilidad horaria o trabajo remoto"},
    {"value":"Apoyo económico o convenios/descuentos","label":"Apoyo económico o convenios/descuentos"},
    {"value":"Acceso a terapias o salud","label":"Acceso a terapias o salud"},
    {"value":"Contención/apoyo emocional o psicológico","label":"Contención/apoyo emocional o psicológico"},
    {"value":"Capacitación y autocuidado","label":"Capacitación y autocuidado"},
    {"value":"Redes de apoyo/grupos de pares","label":"Redes de apoyo/grupos de pares"},
    {"value":"Información sobre recursos y servicios disponibles","label":"Información sobre recursos y servicios disponibles"}]'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, max_select = EXCLUDED.max_select, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000241','30000000-0000-0000-0000-000000000002',
  '6.3','single_choice',
  '¿Estarías dispuesto/a a participar en un grupo de apoyo para cuidadores dentro de la empresa?',
  40,false,false,
  '[{"value":"Sí, definitivamente","label":"Sí, definitivamente"},
    {"value":"Tal vez, si hay más personas en la misma situación","label":"Tal vez, si hay más personas en la misma situación"},
    {"value":"No por ahora","label":"No por ahora"},
    {"value":"Prefiero mantenerlo en privado","label":"Prefiero mantenerlo en privado"}]'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options)
VALUES ('40000000-0000-0000-0000-000000000242','30000000-0000-0000-0000-000000000002',
  '6.4','single_choice',
  '¿Conocés a algún compañero/a de trabajo que esté al cuidado de una persona con discapacidad o dependiente?',
  41,false,false,
  '[{"value":"Sí, conozco a varias personas","label":"Sí, conozco a varias personas"},
    {"value":"Sí, conozco a una persona","label":"Sí, conozco a una persona"},
    {"value":"No conozco a nadie","label":"No conozco a nadie"},
    {"value":"No estoy seguro/a","label":"No estoy seguro/a"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options)
VALUES ('40000000-0000-0000-0000-000000000243','30000000-0000-0000-0000-000000000002',
  '6.5','single_choice',
  '¿Considerás que la empresa debería ofrecer apoyos a quienes cuidan a una persona dependiente?',
  42,false,false,
  '[{"value":"Sí, definitivamente","label":"Sí, definitivamente"},
    {"value":"Tal vez, dependería del caso","label":"Tal vez, dependería del caso"},
    {"value":"No lo considero necesario","label":"No lo considero necesario"},
    {"value":"No lo sé","label":"No lo sé"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options)
VALUES ('40000000-0000-0000-0000-000000000245','30000000-0000-0000-0000-000000000002',
  '6.6','single_choice',
  '¿Estarías dispuesto/a a ser voluntario/a en iniciativas y/o redes de apoyo a personas con discapacidad y/o cuidadores?',
  43,false,false,
  '[{"value":"Sí","label":"Sí"},
    {"value":"No","label":"No"},
    {"value":"Tal vez","label":"Tal vez"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options;


-- ══════════════════════════════════════════════════════════════
-- SECCIÓN 7 — Para cerrar (top-level)
-- 7.1: text_long — NO exponer en agg_segment ni store analítico (regla 4 CLAUDE.md)
-- ══════════════════════════════════════════════════════════════

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required)
VALUES ('40000000-0000-0000-0000-000000000244','30000000-0000-0000-0000-000000000002',
  '7.1','text_long','¿Te gustaría dejar un comentario o sugerencia especial? (opcional)',44,false,false)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required;

-- ══════════════════════════════════════════════════════════════
-- Etapa 3C — Preguntas survey Fundación Solidaridad (0003)
-- Mismas 44 preguntas que el survey demo (30000000-...-0001),
-- IDs 40000000-0000-0000-0000-00000000003NN.
-- ══════════════════════════════════════════════════════════════

-- ── Preguntas: DELETE + INSERT para idempotencia total ────────
DELETE FROM public.questions
WHERE survey_id = '30000000-0000-0000-0000-000000000003';




-- ══════════════════════════════════════════════════════════════
-- SECCIÓN A — Datos Generales (top-level, cuasi-identificadores)
-- A1=Departamento (single_choice, GeoSelectWidget), A2=Ciudad (single_choice, filtrado client-side)
-- A3=Barrio (text_short, opcional)
-- qi_sector ← A4 · qi_age_bucket ← A5 · qi_city/qi_country ← Sprint 3
-- ══════════════════════════════════════════════════════════════

-- A1: Departamento (18 opciones — los 18 departamentos de Paraguay + Capital)
INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options)
VALUES ('40000000-0000-0000-0000-000000000301','30000000-0000-0000-0000-000000000003',
  'A1','single_choice','Departamento',1,false,false,
  '[{"value":"Asunción (Capital)","label":"Asunción (Capital)"},
    {"value":"Alto Paraguay","label":"Alto Paraguay"},
    {"value":"Alto Paraná","label":"Alto Paraná"},
    {"value":"Amambay","label":"Amambay"},
    {"value":"Boquerón","label":"Boquerón"},
    {"value":"Caaguazú","label":"Caaguazú"},
    {"value":"Caazapá","label":"Caazapá"},
    {"value":"Canindeyú","label":"Canindeyú"},
    {"value":"Central","label":"Central"},
    {"value":"Concepción","label":"Concepción"},
    {"value":"Cordillera","label":"Cordillera"},
    {"value":"Guairá","label":"Guairá"},
    {"value":"Itapúa","label":"Itapúa"},
    {"value":"Misiones","label":"Misiones"},
    {"value":"Ñeembucú","label":"Ñeembucú"},
    {"value":"Paraguarí","label":"Paraguarí"},
    {"value":"Presidente Hayes","label":"Presidente Hayes"},
    {"value":"San Pedro","label":"San Pedro"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options;

-- A2: Ciudad (todas las ciudades; el GeoSelectWidget filtra client-side por departamento)
INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options)
VALUES ('40000000-0000-0000-0000-000000000302','30000000-0000-0000-0000-000000000003',
  'A2','single_choice','Ciudad',2,false,false,
  '[{"value":"Asunción","label":"Asunción"},
    {"value":"Fuerte Olimpo","label":"Fuerte Olimpo"},{"value":"Bahía Negra","label":"Bahía Negra"},{"value":"Carmelo Peralta","label":"Carmelo Peralta"},{"value":"La Victoria","label":"La Victoria"},
    {"value":"Ciudad del Este","label":"Ciudad del Este"},{"value":"Hernandarias","label":"Hernandarias"},{"value":"Minga Guazú","label":"Minga Guazú"},{"value":"Presidente Franco","label":"Presidente Franco"},{"value":"Minga Porã","label":"Minga Porã"},{"value":"Naranjal","label":"Naranjal"},{"value":"Ñacunday","label":"Ñacunday"},{"value":"San Alberto","label":"San Alberto"},{"value":"Santa Rita","label":"Santa Rita"},{"value":"Tavapy","label":"Tavapy"},{"value":"Yguazú","label":"Yguazú"},{"value":"Juan E. O''Leary","label":"Juan E. O''Leary"},{"value":"San Cristóbal","label":"San Cristóbal"},{"value":"Santa Fe del Paraná","label":"Santa Fe del Paraná"},{"value":"Dr. Juan León Mallorquín","label":"Dr. Juan León Mallorquín"},{"value":"Itakyry","label":"Itakyry"},{"value":"Domingo Martínez de Irala","label":"Domingo Martínez de Irala"},
    {"value":"Pedro Juan Caballero","label":"Pedro Juan Caballero"},{"value":"Bella Vista Norte","label":"Bella Vista Norte"},{"value":"Capitán Bado","label":"Capitán Bado"},{"value":"Zanja Pytã","label":"Zanja Pytã"},
    {"value":"Filadelfia","label":"Filadelfia"},{"value":"Loma Plata","label":"Loma Plata"},{"value":"Mariscal Estigarribia","label":"Mariscal Estigarribia"},{"value":"Neuland","label":"Neuland"},
    {"value":"Coronel Oviedo","label":"Coronel Oviedo"},{"value":"Caaguazú","label":"Caaguazú"},{"value":"Carayaó","label":"Carayaó"},{"value":"Dr. Juan Manuel Frutos","label":"Dr. Juan Manuel Frutos"},{"value":"Mbutuy","label":"Mbutuy"},{"value":"Nueva Londres","label":"Nueva Londres"},{"value":"Raúl Arsenio Oviedo","label":"Raúl Arsenio Oviedo"},{"value":"Repatriación","label":"Repatriación"},{"value":"San Joaquín","label":"San Joaquín"},{"value":"San José de los Arroyos","label":"San José de los Arroyos"},{"value":"Simón Bolívar","label":"Simón Bolívar"},{"value":"Vaquería","label":"Vaquería"},{"value":"Yhú","label":"Yhú"},{"value":"José Domingo Ocampos","label":"José Domingo Ocampos"},{"value":"3 de Febrero","label":"3 de Febrero"},{"value":"Mcal. Francisco Solano López","label":"Mcal. Francisco Solano López"},{"value":"Los Cedrales","label":"Los Cedrales"},
    {"value":"Caazapá","label":"Caazapá"},{"value":"Abai","label":"Abai"},{"value":"Buena Vista","label":"Buena Vista"},{"value":"General Higinio Morínigo","label":"General Higinio Morínigo"},{"value":"Huber Duré","label":"Huber Duré"},{"value":"Maciel","label":"Maciel"},{"value":"San Juan Nepomuceno","label":"San Juan Nepomuceno"},{"value":"Tavaí","label":"Tavaí"},{"value":"Yegros","label":"Yegros"},{"value":"Yuty","label":"Yuty"},
    {"value":"Salto del Guairá","label":"Salto del Guairá"},{"value":"Corpus Christi","label":"Corpus Christi"},{"value":"Curuguaty","label":"Curuguaty"},{"value":"General Francisco Caballero Álvarez","label":"General Francisco Caballero Álvarez"},{"value":"Itanará","label":"Itanará"},{"value":"Katueté","label":"Katueté"},{"value":"La Paloma","label":"La Paloma"},{"value":"Nueva Esperanza","label":"Nueva Esperanza"},{"value":"Yasy Kañy","label":"Yasy Kañy"},{"value":"Ypejhú","label":"Ypejhú"},
    {"value":"Areguá","label":"Areguá"},{"value":"Capiatá","label":"Capiatá"},{"value":"Fernando de la Mora","label":"Fernando de la Mora"},{"value":"Guarambaré","label":"Guarambaré"},{"value":"Itá","label":"Itá"},{"value":"Itauguá","label":"Itauguá"},{"value":"Juan Augusto Saldívar","label":"Juan Augusto Saldívar"},{"value":"Lambaré","label":"Lambaré"},{"value":"Limpio","label":"Limpio"},{"value":"Luque","label":"Luque"},{"value":"Mariano Roque Alonso","label":"Mariano Roque Alonso"},{"value":"Nueva Italia","label":"Nueva Italia"},{"value":"Ñemby","label":"Ñemby"},{"value":"San Antonio","label":"San Antonio"},{"value":"San Lorenzo","label":"San Lorenzo"},{"value":"Villa Elisa","label":"Villa Elisa"},{"value":"Villeta","label":"Villeta"},{"value":"Ypané","label":"Ypané"},{"value":"Ypacaraí","label":"Ypacaraí"},
    {"value":"Concepción","label":"Concepción"},{"value":"Belén","label":"Belén"},{"value":"Horqueta","label":"Horqueta"},{"value":"Loreto","label":"Loreto"},{"value":"San Lázaro","label":"San Lázaro"},{"value":"San Carlos del Apa","label":"San Carlos del Apa"},{"value":"Yby Yaú","label":"Yby Yaú"},{"value":"Azote''y","label":"Azote''y"},{"value":"Sgto. José Félix López","label":"Sgto. José Félix López"},
    {"value":"Caacupé","label":"Caacupé"},{"value":"Altos","label":"Altos"},{"value":"Arroyos y Esteros","label":"Arroyos y Esteros"},{"value":"Caraguatay","label":"Caraguatay"},{"value":"Emboscada","label":"Emboscada"},{"value":"Eusebio Ayala","label":"Eusebio Ayala"},{"value":"Isla Pucú","label":"Isla Pucú"},{"value":"Itacurubí de la Cordillera","label":"Itacurubí de la Cordillera"},{"value":"Juan de Mena","label":"Juan de Mena"},{"value":"Loma Grande","label":"Loma Grande"},{"value":"Mbocayaty del Yhaguy","label":"Mbocayaty del Yhaguy"},{"value":"Nueva Colombia","label":"Nueva Colombia"},{"value":"Pirayú","label":"Pirayú"},{"value":"Primero de Marzo","label":"Primero de Marzo"},{"value":"Tobatí","label":"Tobatí"},{"value":"Valenzuela","label":"Valenzuela"},
    {"value":"Villarrica","label":"Villarrica"},{"value":"Borja","label":"Borja"},{"value":"Capitán Mauricio José Troche","label":"Capitán Mauricio José Troche"},{"value":"Coronel Martínez","label":"Coronel Martínez"},{"value":"Félix Pérez Cardozo","label":"Félix Pérez Cardozo"},{"value":"General Eugenio A. Garay","label":"General Eugenio A. Garay"},{"value":"Independencia","label":"Independencia"},{"value":"Itapé","label":"Itapé"},{"value":"Iturbe","label":"Iturbe"},{"value":"José Fassardi","label":"José Fassardi"},{"value":"Mbocayaty","label":"Mbocayaty"},{"value":"Natalicio Talavera","label":"Natalicio Talavera"},{"value":"Ñumí","label":"Ñumí"},{"value":"San Salvador","label":"San Salvador"},{"value":"Yataity","label":"Yataity"},
    {"value":"Encarnación","label":"Encarnación"},{"value":"Alto Verá","label":"Alto Verá"},{"value":"Bella Vista","label":"Bella Vista"},{"value":"Cambyretá","label":"Cambyretá"},{"value":"Capitán Meza","label":"Capitán Meza"},{"value":"Capitán Miranda","label":"Capitán Miranda"},{"value":"Carlos A. López","label":"Carlos A. López"},{"value":"Carmen del Paraná","label":"Carmen del Paraná"},{"value":"Coronel Bogado","label":"Coronel Bogado"},{"value":"Cosme","label":"Cosme"},{"value":"Edelira","label":"Edelira"},{"value":"Fram","label":"Fram"},{"value":"General Artigas","label":"General Artigas"},{"value":"Hohenau","label":"Hohenau"},{"value":"Itapúa Poty","label":"Itapúa Poty"},{"value":"Jesús","label":"Jesús"},{"value":"La Paz","label":"La Paz"},{"value":"Leandro Oviedo","label":"Leandro Oviedo"},{"value":"Mayor Otaño","label":"Mayor Otaño"},{"value":"Natalio","label":"Natalio"},{"value":"Nueva Alborada","label":"Nueva Alborada"},{"value":"Obligado","label":"Obligado"},{"value":"Pirapó","label":"Pirapó"},{"value":"San Cosme y Damián","label":"San Cosme y Damián"},{"value":"San Juan del Paraná","label":"San Juan del Paraná"},{"value":"San Pedro del Paraná","label":"San Pedro del Paraná"},{"value":"San Rafael del Paraná","label":"San Rafael del Paraná"},{"value":"Trinidad","label":"Trinidad"},{"value":"Tomás Romero Pereira","label":"Tomás Romero Pereira"},
    {"value":"San Juan Bautista","label":"San Juan Bautista"},{"value":"Ayolas","label":"Ayolas"},{"value":"San Ignacio","label":"San Ignacio"},{"value":"San Miguel","label":"San Miguel"},{"value":"San Patricio","label":"San Patricio"},{"value":"Santa María","label":"Santa María"},{"value":"Santa Rosa","label":"Santa Rosa"},{"value":"Santiago","label":"Santiago"},{"value":"Villa Florida","label":"Villa Florida"},{"value":"Yabebyry","label":"Yabebyry"},
    {"value":"Pilar","label":"Pilar"},{"value":"Alberdi","label":"Alberdi"},{"value":"Cerrito","label":"Cerrito"},{"value":"Desmochados","label":"Desmochados"},{"value":"General José Eduvigis Díaz","label":"General José Eduvigis Díaz"},{"value":"Guazú Cuá","label":"Guazú Cuá"},{"value":"Humaitá","label":"Humaitá"},{"value":"Isla Umbú","label":"Isla Umbú"},{"value":"Laureles","label":"Laureles"},{"value":"Mayor José de J. Martínez","label":"Mayor José de J. Martínez"},{"value":"Paso de Patria","label":"Paso de Patria"},{"value":"San Juan Bautista del Ñeembucú","label":"San Juan Bautista del Ñeembucú"},{"value":"Tacuaras","label":"Tacuaras"},{"value":"Villa Franca","label":"Villa Franca"},{"value":"Villa Oliva","label":"Villa Oliva"},{"value":"Villalba","label":"Villalba"},
    {"value":"Paraguarí","label":"Paraguarí"},{"value":"Acahay","label":"Acahay"},{"value":"Carapeguá","label":"Carapeguá"},{"value":"Escobar","label":"Escobar"},{"value":"General Bernardino Caballero","label":"General Bernardino Caballero"},{"value":"La Colmena","label":"La Colmena"},{"value":"Mbuyapey","label":"Mbuyapey"},{"value":"Quiindy","label":"Quiindy"},{"value":"Quyquyhó","label":"Quyquyhó"},{"value":"San Roque González de Santa Cruz","label":"San Roque González de Santa Cruz"},{"value":"Sapucaí","label":"Sapucaí"},{"value":"Tebicuarymí","label":"Tebicuarymí"},{"value":"Ybycuí","label":"Ybycuí"},{"value":"Ybytymí","label":"Ybytymí"},{"value":"Yaguarón","label":"Yaguarón"},
    {"value":"Villa Hayes","label":"Villa Hayes"},{"value":"Benjamín Aceval","label":"Benjamín Aceval"},{"value":"José Falcón","label":"José Falcón"},{"value":"Nanawa","label":"Nanawa"},{"value":"Nueva Asunción","label":"Nueva Asunción"},{"value":"Pozo Colorado","label":"Pozo Colorado"},{"value":"Puerto Pinasco","label":"Puerto Pinasco"},{"value":"Teniente Primero Manuel Irala Fernández","label":"Teniente Primero Manuel Irala Fernández"},{"value":"Villa del Río","label":"Villa del Río"},
    {"value":"San Pedro del Ycuamandiyú","label":"San Pedro del Ycuamandiyú"},{"value":"Antequera","label":"Antequera"},{"value":"Choré","label":"Choré"},{"value":"General Elizardo Aquino","label":"General Elizardo Aquino"},{"value":"Guayaibí","label":"Guayaibí"},{"value":"Itacurubí del Rosario","label":"Itacurubí del Rosario"},{"value":"Lima","label":"Lima"},{"value":"Nueva Germania","label":"Nueva Germania"},{"value":"Río Verde","label":"Río Verde"},{"value":"San Estanislao (Santaní)","label":"San Estanislao (Santaní)"},{"value":"Tacuatí","label":"Tacuatí"},{"value":"Unión","label":"Unión"},{"value":"Villa del Rosario","label":"Villa del Rosario"},{"value":"Yataity del Norte","label":"Yataity del Norte"}
  ]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options;

-- A3: Barrio (text_short, opcional — antes era "Sucursal o sede")
INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required)
VALUES ('40000000-0000-0000-0000-000000000303','30000000-0000-0000-0000-000000000003',
  'A3','text_short','¿En qué barrio vivís? (opcional)',3,false,false)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options)
VALUES ('40000000-0000-0000-0000-000000000304','30000000-0000-0000-0000-000000000003',
  'A4','single_choice','¿En qué área o gerencia trabajás?',4,false,false,
  '[{"value":"Directorio","label":"Directorio"},
    {"value":"Gerencia","label":"Gerencia"},
    {"value":"Operaciones/Producción","label":"Operaciones/Producción"},
    {"value":"Comercial/Ventas","label":"Comercial/Ventas"},
    {"value":"Administración/Finanzas","label":"Administración/Finanzas"},
    {"value":"Recursos Humanos/Cultura","label":"Recursos Humanos/Cultura"},
    {"value":"Tecnología/Sistemas","label":"Tecnología/Sistemas"},
    {"value":"Logística/Distribución","label":"Logística/Distribución"},
    {"value":"Otra área","label":"Otra área"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options)
VALUES ('40000000-0000-0000-0000-000000000305','30000000-0000-0000-0000-000000000003',
  'A5','single_choice','¿Cuántos años tenés?',5,false,false,
  '[{"value":"Menos de 25 años","label":"Menos de 25 años"},
    {"value":"25 a 34 años","label":"25 a 34 años"},
    {"value":"35 a 44 años","label":"35 a 44 años"},
    {"value":"45 a 54 años","label":"45 a 54 años"},
    {"value":"55 años o más","label":"55 años o más"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options)
VALUES ('40000000-0000-0000-0000-000000000306','30000000-0000-0000-0000-000000000003',
  'A6','single_choice','¿Con qué género te identificás?',6,false,false,
  '[{"value":"Femenino","label":"Femenino"},
    {"value":"Masculino","label":"Masculino"},
    {"value":"No binario/Otro","label":"No binario/Otro"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options)
VALUES ('40000000-0000-0000-0000-000000000307','30000000-0000-0000-0000-000000000003',
  'A7','single_choice','¿Cuál es tu modalidad de trabajo actual?',7,false,false,
  '[{"value":"Presencial","label":"Presencial"},
    {"value":"Remoto (home office)","label":"Remoto (home office)"},
    {"value":"Híbrido","label":"Híbrido"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options;


-- ══════════════════════════════════════════════════════════════
-- SECCIÓN 1 — Prevalencia: cuidado y discapacidad (sensible)
-- Triggers: 1.1 (→1.2–1.5), 1.6 (→1.7–1.12), 1.13 (→1.14–1.16)
-- ══════════════════════════════════════════════════════════════

-- 1.1 trigger — is_sensitive=true, sin conditional_rules
INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options)
VALUES ('40000000-0000-0000-0000-000000000308','30000000-0000-0000-0000-000000000003',
  '1.1','single_choice',
  '¿Vos mismo/a vivís con alguna discapacidad o condición de salud que afecte tu funcionamiento cotidiano?',
  8,true,false,
  '[{"value":"Sí","label":"Sí"},
    {"value":"No","label":"No"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options;

-- cond-disc-propia: 1.2–1.5 se muestran si 1.1='Sí'
INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000309','30000000-0000-0000-0000-000000000003',
  '1.2','multiple_choice','¿Qué tipo de discapacidad o condición tenés?',9,true,false,
  '[{"value":"Discapacidad física/motriz","label":"Discapacidad física/motriz"},
    {"value":"Visual","label":"Visual"},
    {"value":"Auditiva","label":"Auditiva"},
    {"value":"Intelectual","label":"Intelectual"},
    {"value":"TEA","label":"TEA"},
    {"value":"Psicosocial/salud mental","label":"Psicosocial/salud mental"},
    {"value":"Condición crónica que genera limitaciones","label":"Condición crónica que genera limitaciones"},
    {"value":"Otra","label":"Otra"}]'::jsonb,
  '[{"if_question":"1.1","op":"eq","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000310','30000000-0000-0000-0000-000000000003',
  '1.3','multiple_choice','¿Usás algún elemento de apoyo para la movilidad o autonomía?',10,true,false,
  '[{"value":"Silla de ruedas","label":"Silla de ruedas"},
    {"value":"Bastón","label":"Bastón"},
    {"value":"Andador","label":"Andador"},
    {"value":"Muletas","label":"Muletas"},
    {"value":"Prótesis","label":"Prótesis"},
    {"value":"Tecnología asistiva","label":"Tecnología asistiva"},
    {"value":"No utilizo","label":"No utilizo"}]'::jsonb,
  '[{"if_question":"1.1","op":"eq","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000311','30000000-0000-0000-0000-000000000003',
  '1.4','single_choice','¿Contás con certificado oficial de discapacidad?',11,true,false,
  '[{"value":"Sí","label":"Sí"},
    {"value":"No, pero estoy en trámite","label":"No, pero estoy en trámite"},
    {"value":"No","label":"No"}]'::jsonb,
  '[{"if_question":"1.1","op":"eq","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000312','30000000-0000-0000-0000-000000000003',
  '1.5','single_choice','¿Tu condición afecta tu desempeño o comodidad en el trabajo?',12,true,false,
  '[{"value":"Sí, de forma significativa","label":"Sí, de forma significativa"},
    {"value":"Sí, pero en aspectos puntuales","label":"Sí, pero en aspectos puntuales"},
    {"value":"No, está bien gestionada","label":"No, está bien gestionada"}]'::jsonb,
  '[{"if_question":"1.1","op":"eq","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

-- 1.6 trigger — is_sensitive=true
INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options)
VALUES ('40000000-0000-0000-0000-000000000313','30000000-0000-0000-0000-000000000003',
  '1.6','single_choice',
  '¿Tenés algún familiar cercano (hijo/a, pareja, hermano/a, padre/madre) que viva con discapacidad?',
  13,true,false,
  '[{"value":"Sí","label":"Sí"},
    {"value":"No","label":"No"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options;

-- cond-familiar: 1.7–1.12 se muestran si 1.6='Sí'
INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000314','30000000-0000-0000-0000-000000000003',
  '1.7','multiple_choice','¿Cuál es tu vínculo con esa persona?',14,true,false,
  '[{"value":"Hijo/a","label":"Hijo/a"},
    {"value":"Cónyuge/pareja","label":"Cónyuge/pareja"},
    {"value":"Padre o madre","label":"Padre o madre"},
    {"value":"Hermano/a","label":"Hermano/a"},
    {"value":"Otro familiar","label":"Otro familiar"}]'::jsonb,
  '[{"if_question":"1.6","op":"eq","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000315','30000000-0000-0000-0000-000000000003',
  '1.8','multiple_choice','¿Qué tipo de discapacidad tiene?',15,true,false,
  '[{"value":"Física/motriz","label":"Física/motriz"},
    {"value":"Visual","label":"Visual"},
    {"value":"Auditiva","label":"Auditiva"},
    {"value":"Intelectual","label":"Intelectual"},
    {"value":"TEA","label":"TEA"},
    {"value":"Psicosocial/salud mental","label":"Psicosocial/salud mental"},
    {"value":"Condición crónica severa","label":"Condición crónica severa"},
    {"value":"Otra","label":"Otra"}]'::jsonb,
  '[{"if_question":"1.6","op":"eq","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000316','30000000-0000-0000-0000-000000000003',
  '1.9','multiple_choice','¿Qué tipo de apoyo o acompañamiento necesita principalmente?',16,true,false,
  '[{"value":"Movilidad física","label":"Movilidad física"},
    {"value":"Comunicación","label":"Comunicación"},
    {"value":"Apoyo escolar/educativo","label":"Apoyo escolar/educativo"},
    {"value":"Inclusión laboral","label":"Inclusión laboral"},
    {"value":"Terapias/rehabilitación","label":"Terapias/rehabilitación"},
    {"value":"Apoyo emocional/psicosocial","label":"Apoyo emocional/psicosocial"}]'::jsonb,
  '[{"if_question":"1.6","op":"eq","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000317','30000000-0000-0000-0000-000000000003',
  '1.10','multiple_choice','¿Usa algún elemento de apoyo para la movilidad o autonomía?',17,true,false,
  '[{"value":"Silla de ruedas","label":"Silla de ruedas"},
    {"value":"Bastón","label":"Bastón"},
    {"value":"Andador","label":"Andador"},
    {"value":"Muletas","label":"Muletas"},
    {"value":"Prótesis","label":"Prótesis"},
    {"value":"Tecnología asistiva","label":"Tecnología asistiva"},
    {"value":"No utiliza","label":"No utiliza"}]'::jsonb,
  '[{"if_question":"1.6","op":"eq","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000318','30000000-0000-0000-0000-000000000003',
  '1.11','single_choice',
  'Si es niño/a o adolescente en edad escolar: ¿está escolarizado/a y enfrenta barreras de aprendizaje?',
  18,true,false,
  '[{"value":"Escolarizado/a, sin barreras importantes","label":"Escolarizado/a, sin barreras importantes"},
    {"value":"Escolarizado/a, enfrenta barreras o faltan ajustes","label":"Escolarizado/a, enfrenta barreras o faltan ajustes"},
    {"value":"No está escolarizado/a","label":"No está escolarizado/a"},
    {"value":"No aplica","label":"No aplica"}]'::jsonb,
  '[{"if_question":"1.6","op":"eq","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000319','30000000-0000-0000-0000-000000000003',
  '1.12','single_choice','¿La persona con discapacidad se encuentra trabajando actualmente?',19,true,false,
  '[{"value":"Sí, está trabajando","label":"Sí, está trabajando"},
    {"value":"No, y está buscando empleo","label":"No, y está buscando empleo"},
    {"value":"No, y no está buscando","label":"No, y no está buscando"},
    {"value":"No aplica","label":"No aplica"}]'::jsonb,
  '[{"if_question":"1.6","op":"eq","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

-- 1.13 trigger — NOT sensitive
INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options)
VALUES ('40000000-0000-0000-0000-000000000320','30000000-0000-0000-0000-000000000003',
  '1.13','single_choice','¿Tenés algún adulto mayor (60+ años) a tu cuidado o bajo tu responsabilidad?',
  20,false,false,
  '[{"value":"Sí","label":"Sí"},
    {"value":"No","label":"No"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options;

-- cond-adulto-mayor: 1.14–1.16 se muestran si 1.13='Sí'
INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000321','30000000-0000-0000-0000-000000000003',
  '1.14','single_choice','¿Qué nivel de dependencia tiene? (la más representativa)',21,true,false,
  '[{"value":"Independiente, pero necesita supervisión","label":"Independiente, pero necesita supervisión"},
    {"value":"Dependencia leve","label":"Dependencia leve"},
    {"value":"Dependencia moderada","label":"Dependencia moderada"},
    {"value":"Dependencia severa","label":"Dependencia severa"}]'::jsonb,
  '[{"if_question":"1.13","op":"eq","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000322','30000000-0000-0000-0000-000000000003',
  '1.15','multiple_choice','¿Tiene una condición de salud que genere mayor necesidad de cuidado?',22,true,false,
  '[{"value":"Demencia/Alzheimer","label":"Demencia/Alzheimer"},
    {"value":"ACV/Parálisis","label":"ACV/Parálisis"},
    {"value":"Enfermedad crónica grave","label":"Enfermedad crónica grave"},
    {"value":"Movilidad reducida","label":"Movilidad reducida"},
    {"value":"Deterioro cognitivo","label":"Deterioro cognitivo"},
    {"value":"Sin condición específica","label":"Sin condición específica"}]'::jsonb,
  '[{"if_question":"1.13","op":"eq","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000323','30000000-0000-0000-0000-000000000003',
  '1.16','single_choice','¿Vive con vos o en otra vivienda?',23,false,false,
  '[{"value":"Vive en mi hogar","label":"Vive en mi hogar"},
    {"value":"Vive en otra vivienda","label":"Vive en otra vivienda"},
    {"value":"Está en residencia/institución","label":"Está en residencia/institución"}]'::jsonb,
  '[{"if_question":"1.13","op":"eq","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;


-- ══════════════════════════════════════════════════════════════
-- SECCIÓN 2 — Intensidad y rol del cuidado (top-level)
-- Cambio 4a: visible si 1.1='Sí' OR 1.6='Sí' OR 1.13='Sí' (eq_any)
-- ══════════════════════════════════════════════════════════════

-- 2.1: Cambio 5 — pasa a multiple_choice (TECH-DEBT: ranking, ver TECH_DEBT.md)
INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000324','30000000-0000-0000-0000-000000000003',
  '2.1','multiple_choice','¿Quién es el/la responsable principal del cuidado?',24,false,false,
  '[{"value":"Yo soy el/la principal","label":"Yo soy el/la principal"},
    {"value":"Comparto con otro familiar","label":"Comparto con otro familiar"},
    {"value":"Hay cuidador/a pagado/a","label":"Hay cuidador/a pagado/a"},
    {"value":"Está en institución/centro de día","label":"Está en institución/centro de día"}]'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000325','30000000-0000-0000-0000-000000000003',
  '2.2','single_choice','¿Cuántas horas por día dedicás, en promedio, al cuidado directo?',25,false,false,
  '[{"value":"Menos de 1h","label":"Menos de 1h"},
    {"value":"Entre 1 y 3h","label":"Entre 1 y 3h"},
    {"value":"Entre 3 y 6h","label":"Entre 3 y 6h"},
    {"value":"Más de 6h","label":"Más de 6h"},
    {"value":"Varía mucho","label":"Varía mucho"}]'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000326','30000000-0000-0000-0000-000000000003',
  '2.3','multiple_choice','¿En qué momentos del día cuidás principalmente?',26,false,false,
  '[{"value":"Antes del trabajo","label":"Antes del trabajo"},
    {"value":"Durante horario laboral (llamadas/emergencias)","label":"Durante horario laboral (llamadas/emergencias)"},
    {"value":"Al llegar del trabajo","label":"Al llegar del trabajo"},
    {"value":"Durante la noche","label":"Durante la noche"},
    {"value":"Los fines de semana","label":"Los fines de semana"},
    {"value":"Es continuo sin horario fijo","label":"Es continuo sin horario fijo"}]'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

-- 2.4 eliminada (Cambio 6 — feedback equipo médico, similar a 2.1). Ver OBSERVATIONS.md.

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000328','30000000-0000-0000-0000-000000000003',
  '2.5','single_choice',
  'Como cuidador/a primario, ¿presentás signos de agotamiento o estrés crónico?',27,false,false,
  '[{"value":"Sí, frecuentemente","label":"Sí, frecuentemente"},
    {"value":"A veces","label":"A veces"},
    {"value":"No, lo llevo bien","label":"No, lo llevo bien"}]'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;


-- ══════════════════════════════════════════════════════════════
-- SECCIÓN 3 — Impacto económico del cuidado (top-level)
-- 3.4: is_sensitive=true + analyst-only (no exponer a org_admin)
-- Cambio 4a: visible si 1.1='Sí' OR 1.6='Sí' OR 1.13='Sí' (eq_any)
-- ══════════════════════════════════════════════════════════════

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000329','30000000-0000-0000-0000-000000000003',
  '3.1','single_choice','¿Cuánto estimás que gastás por mes en el cuidado?',28,false,false,
  '[{"value":"Menos de Gs. 500.000","label":"Menos de Gs. 500.000"},
    {"value":"Gs. 500.000–1.500.000","label":"Gs. 500.000–1.500.000"},
    {"value":"Gs. 1.500.000–3.000.000","label":"Gs. 1.500.000–3.000.000"},
    {"value":"Gs. 3.000.000–6.000.000","label":"Gs. 3.000.000–6.000.000"},
    {"value":"Más de Gs. 6.000.000","label":"Más de Gs. 6.000.000"}]'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000330','30000000-0000-0000-0000-000000000003',
  '3.2','multiple_choice','¿Qué servicios o apoyos utilizás actualmente?',29,false,false,
  '[{"value":"Terapias especializadas","label":"Terapias especializadas"},
    {"value":"Cuidador/a particular","label":"Cuidador/a particular"},
    {"value":"Centro de día/institución","label":"Centro de día/institución"},
    {"value":"Transporte adaptado","label":"Transporte adaptado"},
    {"value":"Medicación alto costo","label":"Medicación alto costo"},
    {"value":"Equipamiento médico/tecnología asistiva","label":"Equipamiento médico/tecnología asistiva"},
    {"value":"No utilizo servicios formales","label":"No utilizo servicios formales"}]'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000331','30000000-0000-0000-0000-000000000003',
  '3.3','multiple_choice','¿Cómo sostenés los gastos y responsabilidades del cuidado?',30,false,false,
  '[{"value":"Con mi empleo de tiempo completo","label":"Con mi empleo de tiempo completo"},
    {"value":"Con mi empleo de tiempo parcial","label":"Con mi empleo de tiempo parcial"},
    {"value":"Con trabajo independiente/emprendimiento","label":"Con trabajo independiente/emprendimiento"},
    {"value":"Me ayudan mis familiares","label":"Me ayudan mis familiares"},
    {"value":"No puedo sostenerlo con mis ingresos","label":"No puedo sostenerlo con mis ingresos"}]'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

-- 3.4: CONFIDENCIAL — is_sensitive=true, analyst-only
-- No exponer en ninguna vista accesible a org_admin (ADR-001 addendum)
INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000332','30000000-0000-0000-0000-000000000003',
  '3.4','single_choice','¿En qué franja salarial mensual te ubicás?',31,true,false,
  '[{"value":"Sueldo mínimo","label":"Sueldo mínimo"},
    {"value":"Gs. 3.000.000 a 5.000.000","label":"Gs. 3.000.000 a 5.000.000"},
    {"value":"Gs. 5.000.001–8.000.000","label":"Gs. 5.000.001–8.000.000"},
    {"value":"Gs. 8.000.001–12.000.000","label":"Gs. 8.000.001–12.000.000"},
    {"value":"Gs. 12.000.001–15.000.000","label":"Gs. 12.000.001–15.000.000"},
    {"value":"Gs. 15.000.001–18.000.000","label":"Gs. 15.000.001–18.000.000"},
    {"value":"Gs. 18.000.001–25.000.000","label":"Gs. 18.000.001–25.000.000"},
    {"value":"Gs. 25.000.001–50.000.000","label":"Gs. 25.000.001–50.000.000"},
    {"value":"Gs. 50.000.001 o más","label":"Gs. 50.000.001 o más"}]'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000333','30000000-0000-0000-0000-000000000003',
  '3.5','rating','¿Los gastos de cuidado impactan en tu situación económica personal?',32,false,false,
  '{"min":1,"max":5,"min_label":"Sin impacto","max_label":"Muy alto impacto"}'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;


-- ══════════════════════════════════════════════════════════════
-- SECCIÓN 4 — Tiempo y descanso (top-level)
-- Cambio 4a: visible si 1.1='Sí' OR 1.6='Sí' OR 1.13='Sí' (eq_any)
-- ══════════════════════════════════════════════════════════════

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000334','30000000-0000-0000-0000-000000000003',
  '4.1','single_choice','¿Cómo describirías tu nivel de descanso habitual?',33,false,false,
  '[{"value":"Descanso bien, me siento recuperado/a","label":"Descanso bien, me siento recuperado/a"},
    {"value":"Descanso de forma irregular, pero lo manejo","label":"Descanso de forma irregular, pero lo manejo"},
    {"value":"Me cuesta descansar, me siento cansado/a con frecuencia","label":"Me cuesta descansar, me siento cansado/a con frecuencia"},
    {"value":"Descanso muy poco, el agotamiento afecta mi día a día","label":"Descanso muy poco, el agotamiento afecta mi día a día"}]'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000335','30000000-0000-0000-0000-000000000003',
  '4.2','multiple_choice','¿Qué aspectos de tu vida se ven más afectados por tu rol de cuidador/a?',34,false,false,
  '[{"value":"Tiempo libre y ocio","label":"Tiempo libre y ocio"},
    {"value":"Sueño y descanso","label":"Sueño y descanso"},
    {"value":"Vida social y amistades","label":"Vida social y amistades"},
    {"value":"Vida en pareja/familiar","label":"Vida en pareja/familiar"},
    {"value":"Salud física personal","label":"Salud física personal"},
    {"value":"Salud emocional/mental","label":"Salud emocional/mental"},
    {"value":"Desarrollo profesional","label":"Desarrollo profesional"},
    {"value":"Situación económica","label":"Situación económica"}]'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000336','30000000-0000-0000-0000-000000000003',
  '4.3','rating','En una escala del 1 al 5, ¿cómo evaluás tu bienestar general en este momento?',35,false,false,
  '{"min":1,"max":5,"min_label":"Muy mal","max_label":"Muy bien"}'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;


-- ══════════════════════════════════════════════════════════════
-- SECCIÓN 5 — Impacto en el trabajo (top-level)
-- Cambio 4a: visible si 1.1='Sí' OR 1.6='Sí' OR 1.13='Sí' (eq_any)
-- ══════════════════════════════════════════════════════════════

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000337','30000000-0000-0000-0000-000000000003',
  '5.1','single_choice',
  'En los últimos 3 meses, ¿con qué frecuencia sentiste que el cuidado afectó tu concentración o rendimiento?',
  36,false,false,
  '[{"value":"Nunca o casi nunca","label":"Nunca o casi nunca"},
    {"value":"Algunas veces al mes","label":"Algunas veces al mes"},
    {"value":"Varias veces por semana","label":"Varias veces por semana"},
    {"value":"Casi todos los días","label":"Casi todos los días"}]'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000338','30000000-0000-0000-0000-000000000003',
  '5.2','single_choice',
  'En el último año, ¿faltaste al trabajo por situaciones relacionadas al cuidado?',37,false,false,
  '[{"value":"Nunca","label":"Nunca"},
    {"value":"Pocas veces (1–3 veces al año)","label":"Pocas veces (1–3 veces al año)"},
    {"value":"Varias veces (4–10 veces al año)","label":"Varias veces (4–10 veces al año)"},
    {"value":"Con frecuencia (más de 10 veces al año)","label":"Con frecuencia (más de 10 veces al año)"}]'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;


-- ══════════════════════════════════════════════════════════════
-- SECCIÓN 6 — Conciencia organizacional (top-level)
-- 6.1-6.3: Cambio 4a — visible si 1.1='Sí' OR 1.6='Sí' OR 1.13='Sí' (eq_any)
-- 6.4-6.6: siempre visibles (destino del salto triple)
-- 6.2: multiple_choice max_select=3 (ranking en backlog)
-- 6.4/6.5: códigos corregidos (eran 6.2/6.3 duplicados en el HTML original)
-- 6.6: nueva pregunta (Cambio 4b)
-- ══════════════════════════════════════════════════════════════

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000339','30000000-0000-0000-0000-000000000003',
  '6.1','single_choice',
  '¿Sentís que tu empresa conoce o comprende la realidad del cuidado y la discapacidad de su gente?',
  38,false,false,
  '[{"value":"Sí, me siento acompañado/a","label":"Sí, me siento acompañado/a"},
    {"value":"Parcialmente, hay cierta comprensión","label":"Parcialmente, hay cierta comprensión"},
    {"value":"No, es algo bastante invisible","label":"No, es algo bastante invisible"},
    {"value":"No, no se puede hablar del tema","label":"No, no se puede hablar del tema"}]'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,max_select,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000340','30000000-0000-0000-0000-000000000003',
  '6.2','multiple_choice','¿Qué apoyos de la empresa te ayudarían más? Elegí hasta 3',39,false,false,3,
  '[{"value":"Flexibilidad horaria o trabajo remoto","label":"Flexibilidad horaria o trabajo remoto"},
    {"value":"Apoyo económico o convenios/descuentos","label":"Apoyo económico o convenios/descuentos"},
    {"value":"Acceso a terapias o salud","label":"Acceso a terapias o salud"},
    {"value":"Contención/apoyo emocional o psicológico","label":"Contención/apoyo emocional o psicológico"},
    {"value":"Capacitación y autocuidado","label":"Capacitación y autocuidado"},
    {"value":"Redes de apoyo/grupos de pares","label":"Redes de apoyo/grupos de pares"},
    {"value":"Información sobre recursos y servicios disponibles","label":"Información sobre recursos y servicios disponibles"}]'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, max_select = EXCLUDED.max_select, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options,conditional_rules)
VALUES ('40000000-0000-0000-0000-000000000341','30000000-0000-0000-0000-000000000003',
  '6.3','single_choice',
  '¿Estarías dispuesto/a a participar en un grupo de apoyo para cuidadores dentro de la empresa?',
  40,false,false,
  '[{"value":"Sí, definitivamente","label":"Sí, definitivamente"},
    {"value":"Tal vez, si hay más personas en la misma situación","label":"Tal vez, si hay más personas en la misma situación"},
    {"value":"No por ahora","label":"No por ahora"},
    {"value":"Prefiero mantenerlo en privado","label":"Prefiero mantenerlo en privado"}]'::jsonb,
  '[{"if_question":["1.1","1.6","1.13"],"op":"eq_any","value":"Sí","action":"show"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options, conditional_rules = EXCLUDED.conditional_rules;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options)
VALUES ('40000000-0000-0000-0000-000000000342','30000000-0000-0000-0000-000000000003',
  '6.4','single_choice',
  '¿Conocés a algún compañero/a de trabajo que esté al cuidado de una persona con discapacidad o dependiente?',
  41,false,false,
  '[{"value":"Sí, conozco a varias personas","label":"Sí, conozco a varias personas"},
    {"value":"Sí, conozco a una persona","label":"Sí, conozco a una persona"},
    {"value":"No conozco a nadie","label":"No conozco a nadie"},
    {"value":"No estoy seguro/a","label":"No estoy seguro/a"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options)
VALUES ('40000000-0000-0000-0000-000000000343','30000000-0000-0000-0000-000000000003',
  '6.5','single_choice',
  '¿Considerás que la empresa debería ofrecer apoyos a quienes cuidan a una persona dependiente?',
  42,false,false,
  '[{"value":"Sí, definitivamente","label":"Sí, definitivamente"},
    {"value":"Tal vez, dependería del caso","label":"Tal vez, dependería del caso"},
    {"value":"No lo considero necesario","label":"No lo considero necesario"},
    {"value":"No lo sé","label":"No lo sé"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options;

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required,options)
VALUES ('40000000-0000-0000-0000-000000000345','30000000-0000-0000-0000-000000000003',
  '6.6','single_choice',
  '¿Estarías dispuesto/a a ser voluntario/a en iniciativas y/o redes de apoyo a personas con discapacidad y/o cuidadores?',
  43,false,false,
  '[{"value":"Sí","label":"Sí"},
    {"value":"No","label":"No"},
    {"value":"Tal vez","label":"Tal vez"}]'::jsonb)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required, options = EXCLUDED.options;


-- ══════════════════════════════════════════════════════════════
-- SECCIÓN 7 — Para cerrar (top-level)
-- 7.1: text_long — NO exponer en agg_segment ni store analítico (regla 4 CLAUDE.md)
-- ══════════════════════════════════════════════════════════════

INSERT INTO public.questions (id,survey_id,code,type,prompt,position,is_sensitive,required)
VALUES ('40000000-0000-0000-0000-000000000344','30000000-0000-0000-0000-000000000003',
  '7.1','text_long','¿Te gustaría dejar un comentario o sugerencia especial? (opcional)',44,false,false)
ON CONFLICT (id) DO UPDATE SET survey_id = EXCLUDED.survey_id, code = EXCLUDED.code, type = EXCLUDED.type, prompt = EXCLUDED.prompt, position = EXCLUDED.position, is_sensitive = EXCLUDED.is_sensitive, required = EXCLUDED.required;
