.purple-survey[hidden], #module-workspace[hidden]{display:none}
.purple-survey,.purple-retention{--survey-border:#e6dcee;--survey-accent:#6719a0;--survey-soft:#f7f0fc;color:var(--text,#281736)}
.purple-survey{max-width:850px;margin:1.25rem auto;padding:clamp(1rem,4vw,2rem);background:#fff;color:#281736;border:1px solid var(--survey-border);border-radius:22px}
.purple-survey header,.purple-retention-hero{border-radius:16px;background:linear-gradient(120deg,#301044,#62268e);color:#fff;padding:clamp(1rem,4vw,2rem)}
.purple-survey header h3,.purple-retention-hero h2{color:inherit;margin:.5rem 0;font-size:clamp(1.4rem,3vw,2.1rem)}
.purple-survey header p,.purple-retention-hero p{color:inherit;margin:0;line-height:1.5}
.purple-survey header small,.purple-retention-hero small{color:#ead1fb;letter-spacing:.12em;font-weight:700}
.purple-survey progress{width:100%;height:12px;accent-color:var(--survey-accent);margin:1.25rem 0}
.purple-survey h4{font-size:1.15rem;margin:0 0 1rem}
.purple-survey fieldset{border:0;border-bottom:1px solid var(--survey-border);padding:0 0 1rem;margin:0 0 1rem;min-width:0}
.purple-survey legend{font-weight:700;margin-bottom:.65rem;padding:0}
.purple-survey-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr));gap:.5rem}
.purple-survey .purple-survey-options label{display:flex;align-items:center;gap:.55rem;min-height:44px;padding:.55rem .7rem;border:1px solid var(--survey-border);border-radius:10px;margin:0;color:inherit;font-size:.9rem;font-weight:500;cursor:pointer;letter-spacing:normal}
.purple-survey-options label:has(input:checked){background:var(--survey-soft);border-color:var(--survey-accent)}
.purple-survey .purple-survey-options input{appearance:auto;width:1rem;height:1rem;min-height:0;flex:none;accent-color:var(--survey-accent);margin:0}
.purple-survey textarea{display:block;width:100%;font:inherit;padding:.75rem;border:1px solid var(--survey-border);border-radius:10px;resize:vertical}
.purple-survey-actions{display:flex;justify-content:flex-end;gap:.65rem}
.purple-survey-actions button[type=submit]{background:var(--survey-accent);color:#fff}
.purple-retention{display:grid;gap:1rem}
.purple-retention-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:.75rem}
.purple-retention-metrics article,.purple-retention-list{background:var(--surface,#fff);border:1px solid var(--border,var(--survey-border));padding:1rem;border-radius:14px}
.purple-retention-metrics strong{display:block;font-size:1.6rem}
.purple-retention-tools{display:flex;flex-wrap:wrap;gap:.65rem;margin-bottom:1rem}
.purple-retention-tools input,.purple-retention-tools select{min-height:42px;padding:.5rem;border:1px solid var(--border,var(--survey-border));border-radius:8px}
.purple-retention summary{cursor:pointer;list-style-position:inside;padding:.8rem 0}
.purple-retention details+details{border-top:1px solid var(--border,var(--survey-border))}
.purple-retention details p,.purple-retention details dd{white-space:pre-wrap;overflow-wrap:anywhere}
.purple-retention details dl{margin:1rem 0}
.purple-retention details dt{font-weight:700;margin-top:.5rem}
.purple-retention details dd{margin:0}
.purple-retention-score{display:inline-block;border-radius:999px;padding:.18rem .6rem;margin-left:.5rem;background:#efe8f5;color:#42215b}
.purple-retention-score[data-level=priority]{background:#fbe3e8;color:#8b1632}
.purple-retention-score[data-level=watch]{background:#ffefcf;color:#754606}
.purple-survey:not([hidden]){width:100%;overflow-y:auto;min-height:0}
@media(max-width:899px){.purple-survey:not([hidden]){overflow:visible}.module-nav{flex-wrap:wrap}.module-nav button{flex:1 1 42%}}
.purple-retention-brief{background:var(--survey-soft);color:#311440;border-radius:10px;padding:.75rem;margin:.75rem 0}
.purple-retention-brief p{margin:.25rem 0}
#individual-survey:not([hidden]){max-height:none;flex:none}
.portal:has(#individual-survey:not([hidden])){height:auto;min-height:100svh;grid-template-columns:1fr;grid-template-rows:auto}
.portal:has(#individual-survey:not([hidden])) .brand{display:none}
.portal:has(#individual-survey:not([hidden])) .content{height:auto;min-height:100svh;justify-content:flex-start;overflow:visible}
/* Purple Escuta — confidencial */
.portal:has(#individual-survey:not([hidden])) .content{background:radial-gradient(ellipse at 15% 0%,#e8dcff,transparent 55%),linear-gradient(145deg,#faf8ff,#f0ebfa);padding:clamp(12px,3vw,36px)}
.purple-survey{max-width:880px;box-sizing:border-box;border:1px solid #e8e0f4;box-shadow:0 18px 65px #37235b12;border-radius:26px;padding:clamp(20px,4vw,40px);font-family:Inter,system-ui,sans-serif;text-transform:none;letter-spacing:normal}
.purple-survey *{box-sizing:border-box}
.purple-survey [hidden]{display:none!important}
.purple-survey header{background:linear-gradient(130deg,#26123f,#54218a 60%,#7441aa);padding:clamp(24px,5vw,42px);border-radius:20px}
.purple-survey header h3{font-size:clamp(28px,5vw,42px);line-height:1.12;letter-spacing:-.035em;max-width:640px;margin:16px 0}
.purple-survey p{line-height:1.65;font-size:15px;color:inherit}
.purple-survey .survey-eyebrow{display:block;font-size:11px;font-weight:750;letter-spacing:.14em;color:#70419a}
.purple-survey header .survey-eyebrow{color:#e5cffb}
.survey-introduction{padding:12px 0}
.purple-survey .survey-privacy{background:#f6f2fc;border:1px solid #e9def8;border-radius:16px;padding:20px;margin:24px 0;color:#3e2a55}
.purple-survey .survey-privacy h4{margin:0;font-size:18px}
.purple-survey .survey-privacy p:last-child{margin-bottom:0}
.purple-survey .survey-student{font-weight:700}
.purple-survey button{font:inherit;text-transform:none;letter-spacing:normal;min-height:46px;border-radius:12px;padding:12px 20px;cursor:pointer;white-space:normal}
.purple-survey button.survey-primary{background:linear-gradient(110deg,#6d28d9,#7c3aed);color:#fff;border:1px solid #6d28d9;box-shadow:0 7px 16px #6d28d929;font-weight:700}
.purple-survey button.survey-secondary{background:#fff;color:#54218a;border:1px solid #d9c8eb}
.purple-survey button.survey-clear{background:transparent;border:0;color:#694385;padding:6px 0;font-size:12px;min-height:36px;text-decoration:underline}
.purple-survey button:disabled{opacity:.6;cursor:wait}
.purple-survey :is(button,input,textarea):focus-visible{outline:3px solid #a080d1;outline-offset:3px}
.purple-survey .purple-survey-actions{flex-wrap:wrap;margin-top:24px;align-items:center}
.purple-survey .purple-survey-options{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.purple-survey .purple-survey-options label{min-height:56px;padding:14px;border-color:#e1d7ee;border-radius:13px;line-height:1.45;font-size:14px;transition:background .15s}
.purple-survey .purple-survey-options label:has(input:checked){background:#f0e7ff;border-color:#7c3aed;box-shadow:inset 0 0 0 1px #7c3aed}
.purple-survey fieldset{margin:0 0 26px;padding:0 0 26px}
.purple-survey legend{font-size:16px;line-height:1.5}
.purple-survey .survey-hint{color:#71617f;font-size:13px;margin:0 0 12px}
.purple-survey textarea{background:#fff;color:#281736;border:1px solid #d9c8eb;font-size:15px}
.survey-review dt{font-weight:650;margin-top:18px;font-size:14px}.survey-review dd{margin:6px 0 0;color:#64536e;white-space:pre-wrap;overflow-wrap:anywhere}.survey-review .survey-review-section{font-size:20px;border-top:1px solid #e9def8;padding-top:22px;color:#54218a}
@media(max-width:560px){.purple-survey .purple-survey-options{grid-template-columns:1fr}.purple-survey .purple-survey-actions button{width:100%}.purple-survey{border-radius:20px}.purple-survey header{padding:24px}.purple-survey .survey-privacy{padding:16px}}
.purple-survey :is(h3,h4)[tabindex="-1"]:focus{outline:none}
.purple-survey .purple-survey-options.survey-scale{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:560px){.purple-survey .purple-survey-options.survey-scale{grid-template-columns:repeat(2,minmax(0,1fr))}}
.survey-link-row{border:1px solid var(--survey-border,#e6dcee);border-radius:14px;padding:16px;margin:12px 0}.survey-link-title{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-bottom:12px}.survey-link-row .purple-retention-tools{margin-bottom:0}.survey-link-row button{min-height:46px}.survey-link-row p:empty{display:none}
.survey-qr-dialog{box-sizing:border-box;width:min(94vw,760px);max-width:94vw;max-height:96dvh;overflow:auto;border:0;border-radius:24px;background:#fff;color:#29183c;padding:24px;text-align:center;box-shadow:0 24px 100px #16072966}
.survey-qr-dialog::backdrop{background:#130820f5}.survey-qr-dialog small{display:block;font-size:12px;letter-spacing:.12em;color:#6d28d9;margin:12px 0}.survey-qr-dialog h2{font-size:clamp(23px,4vw,34px);color:#29183c;margin:8px 0;overflow-wrap:anywhere}.survey-qr-dialog p{margin:8px 0;line-height:1.4;color:#58476b}.survey-qr-dialog button{font:inherit;min-height:46px;padding:10px 18px;border:1px solid #ddd0ef;background:#f7f1ff;color:#54218a;border-radius:12px;cursor:pointer}.survey-qr-dialog button:focus-visible{outline:3px solid #8e65cf;outline-offset:3px}.survey-qr-dialog button:disabled{opacity:.45;cursor:default}.survey-qr-dialog .survey-qr-close{display:block;margin-left:auto;background:#fff}.survey-qr-area{display:grid;place-items:center;min-height:80px;background:#fff;margin:10px auto}.survey-qr-area canvas{display:block;width:min(100%,460px,55dvh);height:auto;aspect-ratio:1;background:#fff}.survey-qr-actions{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:20px}.survey-qr-hint{max-width:490px;margin:12px auto!important}.survey-qr-course:empty{display:none}@media(max-width:500px){.survey-qr-dialog{padding:16px}.survey-qr-actions button{padding:10px}.survey-qr-actions span{font-size:12px}}
.survey-qr-area{min-width:0}.survey-qr-area canvas{width:min(74vw,460px,55dvh);max-width:100%}
.survey-qr-dialog{font-family:system-ui,-apple-system,Segoe UI,sans-serif}
