/* Live activity follows received events, without invented percentages or passes. */
body:not(.is-dashboard) .proof{display:none;padding:30px 0 0;background:none;border:0}
body:not(.is-dashboard) .proof.is-active{display:block}
:is(body:not(.is-dashboard),.app) .scan-surface{border:1px solid #344b57;border-radius:13px;background:linear-gradient(130deg,#101f2a,#08141d);box-shadow:0 15px 50px #0004;transform:none;padding:28px 32px;color:#e5edf2}
.scan-surface-header{display:flex;align-items:center;justify-content:space-between;gap:20px}
.scan-surface-header .eyebrow{margin-bottom:7px;font-size:8px}
.scan-surface-header h2{font-size:23px!important;overflow-wrap:anywhere;margin:0!important}
.scan-live-state{font-size:10px;border:1px solid #9d893e55;border-radius:20px;padding:5px 11px;color:#e7cf69;white-space:nowrap}
.scan-progress-layout{display:grid;grid-template-columns:1.5fr 1fr;gap:45px;align-items:center;padding:20px 0 12px}
#scan-current{font-size:12px;color:#d8e4ec;min-height:20px;margin:0 0 16px}
.activity-track{height:3px;border-radius:3px;background:#263942;overflow:hidden}
.activity-track span{display:block;width:30%;height:100%;background:#ffda32;animation:scan-activity 2s ease-in-out infinite}
.scan-surface[data-state=finished] .activity-track span,.scan-surface[data-state=error] .activity-track span{animation:none;width:100%;background:#8ba5b4}
.scan-surface[data-state=error] .scan-live-state{color:#ff8e9b}
#scan-log{max-height:270px;overflow-y:auto;padding:8px 0;margin-top:12px;font:11px/1.7 Inter,sans-serif;color:#93aab9}
#scan-log p{padding:8px 0 8px 25px;margin:0;position:relative}
#scan-log p::before{content:'•';position:absolute;left:4px;color:#78939f}
#scan-log p.is-current{color:#ffe16a}
#scan-log p.is-current::before{content:'◉';color:#ffda32}
#scan-log .line-error{color:#ff8e9b}
#scan-log .line-done{color:#8ddaad}
.scan-globe{width:210px;height:210px;color:#b99b28;max-width:100%;stroke-width:.65;opacity:.9}
.globe-wrap{text-align:center}
.globe-wrap p{font-size:11px;line-height:1.6;margin:0;color:#b9cad3}
.scan-surface-foot{margin:5px 0 0;padding-top:14px;border-top:1px solid #243640;color:#8faaba;font-size:10px}
@keyframes scan-activity{0%{transform:translateX(-100%)}100%{transform:translateX(440%)}}
/* Report primitives: the server still owns every entitlement decision. */
body:not(.is-dashboard) .output{display:none;padding:27px 0 15px;background:none;border:0}
body:not(.is-dashboard) .output:has(#result-panel:not([hidden])){display:block}
body:not(.is-dashboard) #result-placeholder{display:none}
:is(body:not(.is-dashboard),.app) .grade-card{background:linear-gradient(125deg,#13232c,#08141d);border:1px solid #3d4b46;border-radius:12px;box-shadow:0 8px 35px #0003;color:#ecf2f5;padding:24px 30px;transform:none}
:is(body:not(.is-dashboard),.app) .grade-card::before,:is(body:not(.is-dashboard),.app) .grade-card::after{display:none}
:is(body:not(.is-dashboard),.app) .grade-card-top{margin:0;padding:0 0 20px;border-bottom:1px solid #293a43;background:none;color:#9bb1bf;font-size:10px;display:flex;justify-content:space-between;gap:12px}
.grade-layout{display:flex;align-items:center;gap:32px;padding:27px 0}
.grade-assessment{flex:1}
.grade-assessment h2{font-size:26px!important;margin:0 0 9px!important}
.grade-assessment>p{font-size:12px;color:#a8bac6;margin:0 0 9px}
.score-explainer{font-size:10px!important;color:#91aabb!important}
:is(body:not(.is-dashboard),.app) #grade-letter{color:#f5f8fa;font-family:Inter,sans-serif;font-size:56px;line-height:1.1;text-shadow:none;animation:none}
:is(body:not(.is-dashboard),.app) .counts{display:flex;gap:10px;border:0;padding:0;margin:18px 0 0;background:none}
:is(body:not(.is-dashboard),.app) .counts>div{flex:1;max-width:110px;padding:8px 16px;border:1px solid #2a3942;border-radius:7px;background:#0a1720;text-align:center}
:is(body:not(.is-dashboard),.app) .counts b{font-size:23px;line-height:1.5}
:is(body:not(.is-dashboard),.app) .counts span{font-size:9px;color:#9cb4c5}
:is(body:not(.is-dashboard),.app) .grade-foot-note{display:flex;justify-content:space-between;gap:15px;font-size:9px;border-top:1px solid #293b44;padding-top:14px;margin:0;color:#92a8b7}
:is(body:not(.is-dashboard),.app) .grade-roast{display:none}
:is(body:not(.is-dashboard),.app) .findings-heading{margin:31px 0 17px;font-size:21px;font-weight:600}
.result .example,.result .locked{overflow-wrap:anywhere}
:is(body:not(.is-dashboard),.app) :is(.example,.locked){border:1px solid #293d49;border-radius:10px;padding:22px 25px;background:linear-gradient(125deg,#101f2a,#0a161f);box-shadow:none;margin:0 0 14px}
:is(body:not(.is-dashboard),.app) :is(.example,.locked)>strong{display:block;font-size:15px;margin:9px 0 7px}
:is(body:not(.is-dashboard),.app) :is(.example-plain,.locked-plain){font-size:13px;line-height:1.8;color:#a6bbc9;margin:0 0 16px}
:is(body:not(.is-dashboard),.app) .locked-list{margin-top:0}
/* The line above the unlocked findings reads like the results text around it, and wraps. */
:is(body:not(.is-dashboard),.app) .locked-list-head{font-family:Inter,system-ui,sans-serif;font-size:12px;line-height:1.8;letter-spacing:0;color:#a6bbc9;margin:12px 0;white-space:normal;overflow-wrap:anywhere}
/* Long unbreakable words (variable names, masked keys, URLs) wrap inside their card. */
:is(body:not(.is-dashboard),.app) :is(#example-card,#locked-findings) :is(.finding-title,p){overflow-wrap:anywhere}
.locked-detail{display:flex!important;flex-wrap:wrap;gap:8px;border-top:1px solid #243741;padding:13px 0 0!important;min-height:0!important;background:none!important;overflow:visible!important;margin-top:12px}
.locked-feature{font-size:10px;color:#a0b6c5;border:1px solid #293c46;border-radius:5px;background:#0a161f;padding:6px 9px;display:inline-flex;align-items:center;gap:7px}
.locked-feature svg{width:12px;height:12px;fill:none;stroke:#c9b550;stroke-width:1.5}
.locked-feature small{font-size:7px;color:#d8c464;margin-left:4px}
:is(body:not(.is-dashboard),.app) .finding-access-note{font-size:10px;color:#9bb0be;border:0;padding:0;margin:15px 0 0}
:is(body:not(.is-dashboard),.app) .pro-cta{margin:30px 0 0;padding:30px;border:1px solid #9d8b37;border-radius:12px;background:radial-gradient(ellipse at 100% 0,#ffda3212,transparent 65%),#0d1b24;box-shadow:none}
:is(body:not(.is-dashboard),.app) .unlock-head{display:flex;align-items:center;gap:10px}
:is(body:not(.is-dashboard),.app) .unlock-head h3{font-size:26px;line-height:1.25;margin:0}
:is(body:not(.is-dashboard),.app) .unlock-icon{width:20px;height:20px;color:#ffda32}
:is(body:not(.is-dashboard),.app) .unlock-sub{font-size:13px;line-height:1.8;color:#a9becb;max-width:660px;margin:16px 0}
:is(body:not(.is-dashboard),.app) .pro-features{max-width:620px;padding:0;list-style:none}
:is(body:not(.is-dashboard),.app) .pro-features li{padding:9px 0;font-size:12px;border-color:#293c45}
.pro-lock{font-size:9px!important}
:is(body:not(.is-dashboard),.app) .pro-price{font-size:12px;border:0}
:is(body:not(.is-dashboard),.app) #unlock-panel{padding:28px 0;background:none;border:0;box-shadow:none}
:is(body:not(.is-dashboard),.app) #unlock-panel h3{font-size:19px}
:is(body:not(.is-dashboard),.app) .unlock-fineprint{font-size:10px;color:#829caa;margin-top:14px}
.pro-availability{font-size:11px;color:#a4b5c2;margin:10px 0}
.result .example-detail:empty,.result .example-location:empty{display:none}
:is(body:not(.is-dashboard),.app) .share{border:1px solid #293d46;border-radius:10px;padding:22px;background:#0b1821}
:is(body:not(.is-dashboard),.app) .share-title{font-size:16px}
.result .score-ring.is-unscored{--score:0}
[hidden]{display:none!important}
/* Scan flow: the hero button's progress state, the inline progress bar, the scan
   panel's next step and the status pill. Steps come from received events only. */
.btn-spinner{display:none;flex:none;width:14px;height:14px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:scan-spin .8s linear infinite}
#scan-submit.is-scanning .btn-spinner{display:inline-block}
body:not(.is-dashboard) #scan-submit.is-scanning svg{display:none}
#scan-submit.is-scanning,#scan-submit.is-scanning:disabled{opacity:1;cursor:progress}
#scan-submit-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* One width idle and scanning, so the field never shifts as the step text changes. */
body:not(.is-dashboard) .scan-row .btn{width:236px;max-width:100%;gap:9px}
.scan-progress{margin:8px 2px 2px}
.scan-progress-bar{height:3px;border-radius:3px;background:#263942;overflow:hidden}
.scan-progress-bar span{display:block;width:0;min-width:6%;height:100%;border-radius:inherit;background:#ffda32;box-shadow:0 0 10px #ffda3260;transition:width .45s ease}
.scan-progress[data-state=partial] .scan-progress-bar span{background:#8ba5b4;box-shadow:none}
.scan-progress[data-state=error] .scan-progress-bar span{background:#ff8e9b;box-shadow:none}
#scan-domain:focus{outline:none}
#scan-domain:focus-visible{outline:2px solid #ffda32;outline-offset:4px;border-radius:3px}
#result-panel:focus{outline:none}
.scan-outcome{display:flex;align-items:center;justify-content:space-between;gap:16px 28px;flex-wrap:wrap;margin:20px 0 0;padding:18px 20px;border:1px solid #9d893e66;border-radius:10px;background:linear-gradient(110deg,#ffda320d,#0d1c2600)}
.scan-outcome[data-state=error]{border-color:#ff8e9b55;background:linear-gradient(110deg,#ff727d0d,#0d1c2600)}
.scan-outcome[data-state=partial]{border-color:#3d5563}
.scan-outcome-text{flex:1 1 300px;margin:0;font-size:13px;line-height:1.6;color:#d8e4ec;overflow-wrap:anywhere}
.scan-outcome-actions{display:flex;flex-wrap:wrap;gap:10px}
.scan-outcome-actions .btn{min-height:50px;padding:13px 22px;font-size:14px;white-space:nowrap}
.scan-pill{position:fixed;left:50%;bottom:max(20px,env(safe-area-inset-bottom));z-index:45;display:inline-flex;align-items:center;gap:10px;max-width:calc(100% - 32px);min-height:44px;padding:10px 18px;border:1px solid #d0b62e;border-radius:999px;background:#0b1822f2;box-shadow:0 10px 30px #0008;backdrop-filter:blur(8px);color:#f2f5f8;font:600 13px/1.3 Inter,system-ui,sans-serif;white-space:nowrap;cursor:pointer;transform:translateX(-50%);transition:background .18s,border-color .18s}
.scan-pill:hover{background:#10202cf5;border-color:#ffe568}
.scan-pill:focus-visible{outline:2px solid #ffda32;outline-offset:3px}
#scan-pill-text{min-width:0;overflow:hidden;text-overflow:ellipsis}
#scan-pill-arrow{flex:none;margin-left:-6px}
.scan-pill-dot{flex:none;width:8px;height:8px;border-radius:50%;background:#ffda32;box-shadow:0 0 9px #ffda3290}
.scan-pill[data-state=scanning] .scan-pill-dot{animation:scan-pulse 1.2s ease-in-out infinite}
.scan-pill[data-state=partial] .scan-pill-dot{background:#8ba5b4;box-shadow:none}
.scan-pill[data-state=error]{border-color:#ff8e9b88}
.scan-pill[data-state=error] .scan-pill-dot{background:#ff8e9b;box-shadow:none}
body.has-scan-pill .offer-sticky{display:none!important}
body.is-dashboard :is(.scan-pill,.scan-outcome,.scan-progress,.btn-spinner){display:none!important}
@keyframes scan-spin{to{transform:rotate(360deg)}}
@keyframes scan-pulse{50%{opacity:.35}}
@media(max-width:640px){
body:not(.is-dashboard) .scan-row .btn{width:100%}
.scan-outcome{padding:16px}
.scan-outcome-actions,.scan-outcome-actions .btn{width:100%}
.scan-pill{bottom:max(12px,env(safe-area-inset-bottom));font-size:12.5px;padding:10px 16px}}
/* The report gate under the teaser finding: one email unlocks the full free report. */
.report-gate{margin:18px 0 6px;border:1px solid #2f4a55;border-radius:10px;padding:20px 22px;background:#0b1821}
.report-gate h3{margin:0 0 6px;font-size:18px}
.report-gate-count{margin:0 0 14px;color:var(--muted)}
.report-gate .consent{margin-top:12px;align-items:flex-start;font-size:13px}
.report-gate-note{margin:10px 0 0;font-size:12px;color:var(--muted)}
.report-gate-note a{color:inherit;text-decoration:underline}
/* G-15: the stored report's private link, on screen after the unlock. It wraps
   anywhere, so a 43-character token never widens a phone screen. */
.report-link{margin:18px 0 6px;border:1px solid #2f4a55;border-radius:10px;padding:16px 20px;background:#0b1821}
.report-link-title{margin:0 0 8px;font-size:15px}
.report-link-row{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.report-link-url{flex:1 1 220px;min-width:0;overflow-wrap:anywhere;word-break:break-all;font-size:12.5px;color:inherit;text-decoration:underline}
.report-link-actions{display:flex}
.report-link-note{margin:10px 0 0;font-size:12px;color:var(--muted)}

/* PH2-08: the code scan (an uploaded ZIP), apart from the URL scan. Its findings use the
   report's own finding cards (.result .locked); only the card, form and header are new. */
.code-scan{background:var(--bg);padding:0 0 110px}
.code-scan-card{max-width:860px;border:1px solid #293d49;border-radius:12px;padding:30px 32px;background:linear-gradient(125deg,#101f2a,#0a161f)}
.code-scan-card>.eyebrow{text-transform:uppercase;margin-bottom:12px}
.code-scan-title{margin:0 0 10px;font-size:26px;line-height:1.25}
.code-scan-sub{margin:0 0 20px;max-width:640px;font-size:14px;line-height:1.7;color:#a6bbc9}
.code-scan-form{display:grid;gap:4px;justify-items:start}
.code-scan-file{display:grid;gap:8px;max-width:100%}
.code-scan-file-label{font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:#ffd84a}
.code-scan-file input{max-width:100%;font:inherit;font-size:13px;color:var(--text)}
.code-scan-form .consent{align-items:flex-start;max-width:640px;line-height:1.55}
.code-scan-form .btn{margin-top:14px}
.code-scan-progress{width:100%;max-width:420px;margin:12px 2px 0}
.code-scan-status{min-height:1.4em}
.code-scan-status:empty{display:none}
.code-scan-result{margin-top:26px;padding-top:22px;border-top:1px solid #243741}
.code-scan-head h3{margin:0 0 6px;font-size:20px}
.code-scan-head>.eyebrow{text-transform:uppercase;margin-bottom:8px}
.code-scan-files,.code-scan-note{margin:0 0 12px;font-size:13px;line-height:1.7;color:#a6bbc9}
.code-scan-counts{display:grid;grid-template-columns:repeat(3,minmax(0,110px));gap:10px;margin:4px 0 14px}
.code-scan-counts>div{display:grid;gap:2px;padding:8px 10px;border:1px solid #293c46;border-radius:7px;background:#0a161f}
.code-scan-counts b{font-size:20px}
.code-scan-counts span{font-size:12px;color:#a6bbc9}
.code-scan-findings .finding-card{margin:0 0 12px}
.code-scan-upgrade{margin-top:18px}
.code-scan-actions{display:flex;flex-wrap:wrap;gap:10px}
.code-scan-entry{margin:14px 0 0;font-size:13px}
.code-scan-entry a{color:#ffd84a;text-decoration:underline;text-underline-offset:3px}
body.is-dashboard .dash-code-scan{padding:22px 24px}
body.is-dashboard .dash-code-scan:empty{display:none}
body.is-dashboard .code-scan-card{max-width:none;border:0;padding:0;background:none}
@media(max-width:640px){.code-scan{padding-bottom:70px}.code-scan-card{padding:22px 18px}.code-scan-title{font-size:22px}
  .code-scan-counts{grid-template-columns:repeat(3,minmax(0,1fr))}}
