*{box-sizing:border-box}body{margin:0;background:#f7f4f1;color:#241d18;font:16px/1.6 system-ui,sans-serif}header,main,footer{max-width:1050px;margin:auto;padding:24px}header{display:flex;justify-content:space-between;border-bottom:1px solid #ddd}header a{font-weight:700;text-decoration:none}header span{font-weight:400;margin-left:14px}a{color:inherit;overflow-wrap:anywhere}h1{font-size:clamp(28px,5vw,44px);line-height:1.2}h2{line-height:1.3}form,.card{background:#fffdfb;padding:24px;border:1px solid #e2dad4;border-radius:14px;margin:20px 0}label{display:block;font-weight:600;margin-top:10px}input,select,button{font:inherit;padding:12px;border-radius:7px;border:1px solid #aaa}input,select{display:block;width:100%;margin:6px 0 16px}button{background:#2a211b;color:white;cursor:pointer}button:disabled{opacity:.6;cursor:wait}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:20px}.score{font-size:48px;font-weight:700}.good{color:#24713d}.medium{color:#a15a00}.poor,.error{color:#ae2929}.muted,footer{color:#6b6058;font-size:14px}pre{white-space:pre-wrap;overflow-wrap:anywhere;background:#f4f1ee;padding:10px}table{border-collapse:collapse;width:100%;font-size:14px}td,th{padding:9px;text-align:left;border-bottom:1px solid #ddd;overflow-wrap:anywhere}details{border-top:1px solid #ddd;padding:12px 0}summary{cursor:pointer}li{margin:6px 0}.notice{border-left:4px solid #b36d18;padding:14px;background:#fff8eb}.scroll{overflow-x:auto}footer{border-top:1px solid #ddd;margin-top:30px}

[hidden]{display:none!important}input[type=hidden]{display:none!important}html{scroll-behavior:smooth}.brand{display:flex;align-items:center;gap:18px}.brand img{object-fit:contain;max-width:125px;height:auto}.brand span{font-size:22px;margin:0}header{align-items:center;gap:16px}.logout{margin:0;padding:0;border:0;background:none}.logout button{padding:9px 15px}.test-status{display:flex;align-items:center;gap:20px;padding:22px;border:2px solid #b89763;background:#fff7e6;border-radius:14px;margin:20px 0}.test-status strong{font-size:20px}.test-status p{margin:6px 0}.spinner{width:38px;height:38px;border:5px solid #e0d6c6;border-top-color:#6e4f28;border-radius:50%;flex-shrink:0;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.scores{display:flex;justify-content:center;gap:48px;flex-wrap:wrap}.score-link{display:flex;flex-direction:column;align-items:center;text-align:center;text-decoration:none;min-width:140px;padding:12px;border-radius:12px}.score-link[href]:hover{background:#f4f1ed}.score-link>span{font-size:22px;font-weight:650}.score-link small{font-size:13px;color:#6b6058}.gauge{width:140px;height:140px}.missing{display:grid;place-items:center;min-height:140px}.result-hero{text-align:center;background:#fff}.priority-high{color:#ae2929}.priority-medium{color:#a15a00}.priority-other{color:#000}.priority{font-weight:700}.savings{display:block;color:#5e554f;font-size:13px;margin:4px 0 0 20px}.device-title{font-size:21px;font-weight:650}details details{margin-left:10px}details{scroll-margin-top:18px}summary:focus-visible,a:focus-visible,button:focus-visible{outline:3px solid #316ca5;outline-offset:4px}h4{margin-bottom:8px}.stat{padding:14px;background:#f6f3ef;border-radius:9px}.stat h3{font-size:15px;margin:0}.stat strong{font-size:30px}.spark{width:100%;max-width:300px;height:65px;display:block}.grid{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}@media(max-width:600px){header,main,footer{padding:16px}.brand span{font-size:17px}.brand img{max-width:90px}.scores{gap:12px}.card,form{padding:18px}.test-status{align-items:flex-start}.test-status strong{font-size:18px}.gauge{width:115px;height:115px}}@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.spinner{animation:none}}


/* SAFI_CELEBRATION_V111 */
.result-hero.perfect-score{position:relative;overflow:hidden;border:2px solid #b48a27;background:linear-gradient(145deg,#fffdf6,#fff 60%,#fff7db);box-shadow:0 0 0 4px #f8edc8,0 10px 30px #9c782018}
.perfect-score .scores,.perfect-score>h2,.perfect-score>.muted,.perfect-badge{position:relative;z-index:1}
.perfect-score .gauge{filter:drop-shadow(0 0 5px #c7a54355)}
.perfect-badge{margin:18px auto 4px;padding:14px 18px;max-width:620px;border-top:1px solid #ddc784;color:#5e4610}
.perfect-badge h3{margin:0 0 6px;font-size:clamp(21px,4vw,28px);line-height:1.3}
.perfect-badge p{margin:0;font-size:15px}
.perfect-confetti{position:absolute;inset:0;pointer-events:none;overflow:hidden;z-index:2}
.perfect-confetti-piece{position:absolute;top:-22px;width:8px;height:13px;background:#d6a72c;opacity:0;animation:safi-confetti-fall 3.6s ease-in forwards}
.perfect-confetti-piece:nth-child(3n){background:#267543;border-radius:50%;width:9px;height:9px}
.perfect-confetti-piece:nth-child(3n+1){background:#dbb855}
.perfect-confetti-piece:nth-child(3n+2){background:#84b8d2}
@keyframes safi-confetti-fall{0%{transform:translate3d(-10px,-15px,0) rotate(0);opacity:0}10%{opacity:1}80%{opacity:.9}100%{transform:translate3d(32px,560px,0) rotate(720deg);opacity:0}}
.perfect-confetti-piece:nth-child(1){left:37%;animation-delay:0.49s}
.perfect-confetti-piece:nth-child(2){left:74%;animation-delay:0.21s}
.perfect-confetti-piece:nth-child(3){left:14%;animation-delay:0.7s}
.perfect-confetti-piece:nth-child(4){left:51%;animation-delay:0.42s}
.perfect-confetti-piece:nth-child(5){left:88%;animation-delay:0.14s}
.perfect-confetti-piece:nth-child(6){left:28%;animation-delay:0.63s}
.perfect-confetti-piece:nth-child(7){left:65%;animation-delay:0.35s}
.perfect-confetti-piece:nth-child(8){left:5%;animation-delay:0.07s}
.perfect-confetti-piece:nth-child(9){left:42%;animation-delay:0.56s}
.perfect-confetti-piece:nth-child(10){left:79%;animation-delay:0.28s}
.perfect-confetti-piece:nth-child(11){left:19%;animation-delay:0.0s}
.perfect-confetti-piece:nth-child(12){left:56%;animation-delay:0.49s}
.perfect-confetti-piece:nth-child(13){left:93%;animation-delay:0.21s}
.perfect-confetti-piece:nth-child(14){left:33%;animation-delay:0.7s}
.perfect-confetti-piece:nth-child(15){left:70%;animation-delay:0.42s}
.perfect-confetti-piece:nth-child(16){left:10%;animation-delay:0.14s}
.perfect-confetti-piece:nth-child(17){left:47%;animation-delay:0.63s}
.perfect-confetti-piece:nth-child(18){left:84%;animation-delay:0.35s}
.perfect-confetti-piece:nth-child(19){left:24%;animation-delay:0.07s}
.perfect-confetti-piece:nth-child(20){left:61%;animation-delay:0.56s}
.perfect-confetti-piece:nth-child(21){left:1%;animation-delay:0.28s}
.perfect-confetti-piece:nth-child(22){left:38%;animation-delay:0.0s}
.perfect-confetti-piece:nth-child(23){left:75%;animation-delay:0.49s}
.perfect-confetti-piece:nth-child(24){left:15%;animation-delay:0.21s}
.perfect-confetti-piece:nth-child(25){left:52%;animation-delay:0.7s}
.perfect-confetti-piece:nth-child(26){left:89%;animation-delay:0.42s}
.perfect-confetti-piece:nth-child(27){left:29%;animation-delay:0.14s}
.perfect-confetti-piece:nth-child(28){left:66%;animation-delay:0.63s}
.perfect-confetti-piece:nth-child(29){left:6%;animation-delay:0.35s}
.perfect-confetti-piece:nth-child(30){left:43%;animation-delay:0.07s}
.perfect-confetti-piece:nth-child(31){left:80%;animation-delay:0.56s}
.perfect-confetti-piece:nth-child(32){left:20%;animation-delay:0.28s}
@media(prefers-reduced-motion:reduce){.perfect-confetti{display:none!important}.perfect-confetti-piece{animation:none!important}}
/* END_SAFI_CELEBRATION_V111 */
