@font-face{font-family:IRANYekanX;src:url('../fonts/IRANYekanX-Regular.woff2') format('woff2');font-weight:400;font-display:swap}
@font-face{font-family:IRANYekanX;src:url('../fonts/IRANYekanX-Medium.woff2') format('woff2');font-weight:500 600;font-display:swap}
@font-face{font-family:IRANYekanX;src:url('../fonts/IRANYekanX-ExtraBold.woff2') format('woff2');font-weight:700 900;font-display:swap}
@font-face{font-family:MiracleMono;src:url('../fonts/Miracle-Mono-Regular.otf') format('opentype');font-weight:400;font-display:swap}
:root{--blue:#0b70f5;--green:#00c875;--green-dark:#008f4c;--orange:#ff9e24;--red:#ff3c42;--text:#202124;--muted:#5f6368;--line:#dadce0;--surface:#fff;--subtle:#f5f6f7;--font:Arial,Roboto,'Helvetica Neue',sans-serif;font-family:var(--font);color:var(--text);background:#fff}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:#fff;color:var(--text);font-family:var(--font);font-size:13px;line-height:1.5}button,a{font:inherit}button{cursor:pointer}a{color:var(--blue);text-decoration:none}.psi-header{height:50px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 12px;position:sticky;top:0;background:#fff;z-index:10}.psi-brand{display:flex;align-items:center;gap:8px;color:#5f6368;font-size:20px;font-weight:400}.psi-logo{color:#4285f4;font-size:21px;display:grid;place-items:center}.psi-header-actions{display:flex;align-items:center;gap:16px}.psi-header-actions>a{font-size:13px;font-weight:500}.header-action{border:1px solid var(--line);border-radius:4px;background:#fff;color:var(--blue);padding:6px 11px;display:flex;align-items:center;gap:7px;font-weight:500}.header-icon{border:0;background:transparent;color:#5f6368;padding:6px;font-family:IRANYekanX,Arial,sans-serif;font-weight:600}.device-bar{height:43px;display:flex;align-items:stretch;justify-content:center;gap:25px;border-bottom:1px solid transparent}.device-tab{display:flex;align-items:center;gap:8px;background:transparent;border:0;border-bottom:2px solid transparent;padding:0 3px;color:#5f6368;font-size:14px}.device-tab i{font-size:19px}.device-tab.active{color:var(--blue);border-bottom-color:var(--blue)}.report-shell{width:min(854px,100%);margin:0 auto;border-left:1px solid #e0e3e7;border-right:1px solid #e0e3e7;padding:0 7px 25px}.score-summary{height:96px;border-bottom:1px solid #e6e8eb;display:flex;align-items:center;justify-content:center;gap:30px}.mini-score{min-width:76px;display:flex;flex-direction:column;align-items:center;gap:6px;font-size:11px;color:#202124}.mini-gauge{width:44px;height:44px;position:relative;display:grid;place-items:center}.mini-gauge svg{width:44px;height:44px;transform:rotate(-90deg)}.mini-gauge circle{fill:none;stroke-width:2.6}.mini-gauge .track{stroke:#e8f6ef}.mini-gauge .value{stroke:var(--green);stroke-linecap:round;stroke-dasharray:125.66;stroke-dashoffset:calc(125.66 * (1 - var(--score)/100))}.mini-gauge b{position:absolute;font-weight:500;color:#008b50;font-size:14px}.agent-score{height:46px;min-width:64px;background:#e5f8ef;border-radius:24px;display:flex;align-items:center;justify-content:center;gap:7px;color:#008f55;font-size:13px;position:relative;padding:0 12px 0 10px}.agent-score small{position:absolute;top:49px;white-space:nowrap;color:#333;font-size:11px}.agent-dot{width:10px;height:10px;border-radius:50%;background:var(--green)}.performance-hero{height:332px;display:grid;grid-template-columns:1fr 1px 1fr;align-items:center;border-bottom:0}.hero-score-area{text-align:center;display:flex;align-items:center;flex-direction:column;padding:10px 22px 0}.main-gauge{width:112px;height:112px;position:relative;display:grid;place-items:center}.main-gauge svg{width:112px;height:112px;transform:rotate(-90deg)}.main-gauge circle{fill:none;stroke-width:6}.main-gauge .track{stroke:#e5f6ee}.main-gauge .value{stroke:var(--green);stroke-linecap:round;stroke-dasharray:320.44;stroke-dashoffset:calc(320.44 * (1 - var(--score)/100))}.main-gauge strong{position:absolute;color:var(--green);font-size:27px;font-weight:400}.hero-score-area h1{font-size:18px;font-weight:400;margin:17px 0 9px}.hero-score-area p{font-size:11px;color:#687078;max-width:370px;margin:0 auto;line-height:1.7}.legend{display:flex;align-items:center;gap:22px;margin-top:16px;color:#6f7479;font-size:10px}.legend span{display:flex;align-items:center;gap:8px}.legend i{display:inline-block;width:10px;height:10px}.legend-red{background:#f44336;clip-path:polygon(50% 0,0 100%,100% 100%)}.legend-orange{background:var(--orange)}.legend-green{border-radius:50%;background:var(--green)}.hero-divider{height:85px;background:#e6e8eb}.page-preview{height:240px;width:125px;border:1px solid #dadce0;border-radius:2px;justify-self:center;overflow:hidden;background:#fff;box-shadow:0 1px 2px #00000008}.preview-browser{height:21px;border-bottom:1px solid #e7e7e7;display:flex;align-items:center;gap:3px;padding:0 5px;color:#d74f55;font-size:5px}.preview-browser>span{width:4px;height:4px;border-radius:50%;background:#e9a6a8}.preview-browser b{font-family:IRANYekanX,Arial,sans-serif;font-size:7px;margin-inline:auto}.preview-page{height:calc(100% - 21px);background:linear-gradient(#fafafa,#f0f0f0);padding:28px 8px 0;text-align:center;font-family:IRANYekanX,Arial,sans-serif;color:#555}.preview-page>b{font-size:7px;display:block}.preview-page p{font-size:5px;line-height:1.9}.preview-button{font-size:6px;border:1px solid #d56b72;border-radius:4px;margin:22px auto 12px;padding:5px;color:#bd555b}.preview-dark{background:#666;color:white;padding:12px 5px}.preview-dark span,.preview-dark small{display:block;font-size:6px}.preview-dark small{font-size:5px;margin-top:6px}.metrics-section{margin-top:4px}.section-label{height:32px;display:flex;align-items:center;justify-content:space-between;color:#737980;font-size:10px;letter-spacing:.3px}.section-label button{border:0;background:transparent;color:#6d7379;font-size:10px}.metric-grid{display:grid;grid-template-columns:1fr 1fr;column-gap:22px}.metric-row{height:65px;border-top:1px solid #eceff1;display:flex;align-items:flex-start;gap:12px;padding:10px 12px}.metric-row>div{display:flex;flex-direction:column;gap:3px}.metric-row span{font-size:12px;color:#30343a}.metric-row strong{font-size:22px;font-weight:400;line-height:1.1}.metric-dot{width:11px;height:11px;border-radius:50%;margin-top:3px;flex:none}.metric-dot.good{background:var(--green)}.metric-dot.warn{background:var(--orange);border-radius:1px}.good-text{color:#008a47}.warn-text{color:#e65320}.metric-extra{display:none}.metric-grid.expanded .metric-extra{display:flex}.run-meta{background:#f4f5f6;border-radius:3px;padding:10px 14px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));row-gap:6px;column-gap:12px;margin-top:8px;color:#656b70;font-size:10px}.run-meta>div{display:flex;align-items:center;gap:6px;min-width:0}.run-meta i{font-size:12px;color:#555;flex:none}.run-meta span,.run-meta a{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:inherit;text-decoration:underline}.treemap-section{margin-top:12px}.treemap-btn{height:30px;border:1px solid #dadce0;background:#fff;border-radius:3px;color:var(--blue);padding:0 12px;display:flex;align-items:center;gap:7px;font-size:12px}.treemap-btn i{color:#5f6368;font-size:15px}.treemap-content.collapsed{display:none}.filmstrip{height:148px;display:grid;grid-template-columns:repeat(8,1fr);gap:22px;align-items:start;padding-top:17px;overflow:hidden}.frame{height:132px;border:1px solid #eceff1;background:white;position:relative;overflow:hidden}.frame.blank:after{content:"";position:absolute;bottom:0;left:0;right:0;height:1px;background:#c9cdd1}.frame.filled{background:linear-gradient(#fff,#f5f5f5);font-family:IRANYekanX,Arial,sans-serif;padding:13px 4px 0;text-align:center}.frame.filled b{display:block;color:#c64f55;font-size:6px}.frame.filled span{display:block;margin-top:25px;height:2px;background:#d9d9d9}.frame.filled small{display:block;margin:8px auto;background:#777;height:25px;width:100%}.filmstrip-filter{display:flex;align-items:center;justify-content:flex-end;gap:10px;color:#626970;font-size:11px;margin-top:-2px}.filmstrip-filter button{background:transparent;border:0;padding:2px;color:#666;text-decoration:underline;font-size:11px}.filmstrip-filter button.active{background:var(--blue);color:#fff;text-decoration:none;border-radius:2px;padding:2px 5px}.audit-section{margin-top:32px}.audit-section h2{font-size:11px;color:#747a80;font-weight:400;letter-spacing:.3px;margin:0 0 8px}.audit-list{border-top:1px solid #e8eaed}.audit-item{border-bottom:1px solid #e8eaed}.audit-trigger{width:100%;height:35px;border:0;background:#fff;display:flex;align-items:center;gap:11px;text-align:left;padding:0 12px;color:#30343a}.audit-trigger:hover{background:#f8f9fa}.audit-trigger>i{margin-left:auto;color:#788087;font-size:12px;transition:transform .2s}.audit-item.open .audit-trigger>i{transform:rotate(180deg)}.audit-mark{width:10px;height:10px;flex:none}.audit-mark.red{background:#f44336;clip-path:polygon(50% 0,0 100%,100% 100%)}.audit-mark.orange{background:var(--orange);width:9px;height:9px}.audit-mark.neutral{border:2px solid #b8bdc2;border-radius:50%}.audit-name{font-size:12px}.audit-saving{font-size:12px;color:#e65320;white-space:nowrap}.audit-detail{display:none;padding:1px 35px 13px;color:#646b72;font-size:11px;line-height:1.7;max-width:760px}.audit-item.open .audit-detail{display:block}.audit-footnote{font-size:10px;color:#777f86;margin:9px 0 0}.diagnostics{margin-top:55px}.sample-note{border:1px solid #e0e3e7;border-radius:4px;padding:10px 12px;margin-top:30px;display:flex;gap:9px;color:#71777e;font-size:10px;line-height:1.7}.sample-note i{color:#5f6368;font-size:14px;flex:none}footer{display:flex;justify-content:space-between;border-top:1px solid #e8eaed;margin-top:22px;padding-top:13px;color:#7a8086;font-size:10px}.loading-overlay{display:none;position:fixed;inset:0;background:#ffffffd9;z-index:30;align-items:center;justify-content:center}.loading-overlay.show{display:flex}.loading-box{display:flex;flex-direction:column;align-items:center;gap:8px;border:1px solid #dadce0;border-radius:8px;background:#fff;padding:28px 38px;color:#444}.loading-box span{color:#747980;font-size:11px}.loading-spinner{width:34px;height:34px;border:3px solid #e6edf7;border-top-color:var(--blue);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
html[dir=rtl] body{font-family:IRANYekanX,Arial,sans-serif}html[dir=rtl] .psi-brand,html[dir=rtl] .device-tab,html[dir=rtl] .hero-score-area,html[dir=rtl] .metric-row,html[dir=rtl] .run-meta,html[dir=rtl] .audit-trigger,html[dir=rtl] .audit-detail,html[dir=rtl] footer{font-family:IRANYekanX,Arial,sans-serif}html[dir=rtl] .audit-trigger{text-align:right}html[dir=rtl] .audit-trigger>i{margin-left:0;margin-right:auto}html[dir=rtl] .audit-saving{font-family:IRANYekanX,Arial,sans-serif}html[dir=rtl] .filmstrip-filter{font-family:IRANYekanX,Arial,sans-serif}html[dir=rtl] .header-icon{font-family:IRANYekanX,Arial,sans-serif;font-size:13px;font-weight:700}html[dir=rtl] .preview-page{font-family:IRANYekanX,Arial,sans-serif}
@media(max-width:680px){.psi-brand{font-size:16px}.psi-header-actions{gap:10px}.header-action{padding:5px 8px;font-size:11px}.report-shell{border:0;padding:0 12px 24px}.score-summary{gap:12px;justify-content:space-around;height:88px}.mini-score{min-width:58px;font-size:9px}.mini-gauge,.mini-gauge svg{width:40px;height:40px}.agent-score{min-width:48px;padding:0 8px;height:34px;font-size:11px}.agent-score small{top:38px;font-size:9px}.performance-hero{height:315px;grid-template-columns:1fr 1px .7fr}.hero-score-area{padding:10px 4px 0}.main-gauge,.main-gauge svg{width:100px;height:100px}.hero-score-area h1{font-size:16px;margin:14px 0 6px}.hero-score-area p{font-size:9px}.legend{gap:10px;font-size:8px;margin-top:12px}.page-preview{transform:scale(.86)}.metric-grid{column-gap:10px}.metric-row{padding:9px 4px;gap:8px;height:62px}.metric-row span{font-size:10px}.metric-row strong{font-size:19px}.metric-dot{width:9px;height:9px}.run-meta{grid-template-columns:1fr 1fr;font-size:9px;padding:9px}.filmstrip{gap:9px;height:125px}.frame{height:110px}.filmstrip-filter{font-size:9px;gap:6px}.filmstrip-filter button{font-size:9px}.audit-trigger{gap:8px;padding:0 7px}.audit-name,.audit-saving{font-size:10px}.audit-saving{white-space:normal}.audit-footnote{line-height:1.7}footer{font-size:9px;gap:10px}}
@media(max-width:390px){.psi-header-actions{gap:7px}.psi-header-actions>a{font-size:11px}.header-action span{display:none}.score-summary{gap:4px}.mini-score{min-width:50px}.agent-score{min-width:43px}.performance-hero{grid-template-columns:1fr 1px .55fr;height:290px}.page-preview{transform:scale(.75)}.hero-score-area p{max-width:230px}.legend{gap:7px}.run-meta{grid-template-columns:1fr}.run-meta>div{white-space:normal}}


/* Added PageSpeed field-data layer and theme system */
:root{--page-bg:#fff;--panel:#fff;--panel-soft:#f6f8fa;--ink:#202124;--muted-2:#687078;--border:#dadce0}
body{background:var(--page-bg);color:var(--ink);transition:background .2s,color .2s}
.psi-header,.field-card,.analyze-form input,.header-action,.treemap-btn,.audit-trigger,.loading-box{background:var(--panel);color:var(--ink)}
.psi-header,.field-card,.field-heading,.field-divider,.audit-list,.audit-item,.metric-row{border-color:var(--border)}
.analyzer-bar{background:var(--page-bg);padding:20px 16px 12px}
.analyzer-inner{width:min(990px,100%);margin:auto}
.report-date{display:flex;align-items:center;gap:9px;font-size:18px;font-weight:500;margin-bottom:13px}
.report-date small{margin-inline-start:auto;color:var(--muted-2);font-size:11px;font-weight:400}
.live-dot{width:9px;height:9px;border-radius:50%;background:var(--green);box-shadow:0 0 0 4px #00c8751c}
.analyze-form{display:flex;gap:10px}
.analyze-form input{height:48px;min-width:0;flex:1;border:1px solid #aeb4bb;border-radius:5px;padding:0 15px;font-size:14px;outline:none}
.analyze-form input:focus{border-color:var(--blue);box-shadow:0 0 0 2px #0b70f51a}
.analyze-button{height:48px;border:0;border-radius:5px;background:var(--blue);color:white;padding:0 23px;display:flex;align-items:center;gap:9px;font-weight:600}
.analyzer-hint{font-size:11px;color:var(--muted-2);display:flex;align-items:center;gap:7px;margin:8px 0 0}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.device-bar{border-bottom:1px solid var(--border);margin-bottom:16px}
.field-data-shell{width:min(990px,calc(100% - 28px));margin:0 auto 22px}
.field-heading{display:flex;justify-content:space-between;align-items:center;margin:0 0 10px;gap:12px}
.field-heading>div:first-child{display:flex;align-items:center;gap:12px}
.field-heading h2,.diagnose-heading h2{font-size:15px;font-weight:600;margin:0}
.field-heading p,.diagnose-heading p{font-size:10px;color:var(--muted-2);margin:3px 0 0}
.field-icon,.diagnose-icon{width:28px;height:28px;border-radius:50%;background:#e8f2ff;color:#4285f4;display:grid;place-items:center;font-size:14px}
.scope-switch{display:flex;border:1px solid var(--border);border-radius:4px;overflow:hidden;flex:none}
.scope-switch button{border:0;border-inline-end:1px solid var(--border);padding:5px 9px;background:var(--panel-soft);color:var(--muted-2);font-size:11px}
.scope-switch button:last-child{border:0}.scope-switch button.active{background:#e8f0fe;color:#1967d2;font-weight:600}
.field-card{border:1px solid var(--border);border-radius:8px;padding:18px 16px 0;box-shadow:0 1px 2px #00000008}
.cwv-status{display:flex;align-items:center;justify-content:center;gap:12px;position:relative;min-height:62px;margin-bottom:8px}
.status-icon{width:48px;height:48px;border-radius:50%;display:grid;place-items:center;font-size:19px}
.status-icon.failed{background:#fff0f0;color:#f44336}
.cwv-status strong{font-size:14px;font-weight:500}.cwv-status em{font-style:normal;color:#e53935}
.info-tip{border:0;background:transparent;color:var(--muted-2);padding:4px}
.expand-field{position:absolute;inset-inline-end:0;top:10px;border:0;background:transparent;color:var(--muted-2);font-size:11px}
.field-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:28px;padding:10px 10px 16px}
.field-metric{min-width:0;text-align:center}
.field-metric-head{display:flex;align-items:center;justify-content:center;gap:7px;white-space:nowrap}
.field-metric-head a{color:var(--ink);text-decoration:underline;text-underline-offset:2px;font-size:13px;overflow:hidden;text-overflow:ellipsis}
.status-square{width:9px;height:9px;flex:none}.status-square.good{background:var(--green);border-radius:50%}.status-square.warn{background:var(--orange)}
.field-metric>strong{display:block;font-size:20px;font-weight:400;margin:5px 0 6px}
.field-metric>small{display:block;color:var(--muted-2);font-size:9px;margin-top:5px}
.range-track{height:5px;width:100%;display:flex;position:relative;gap:3px}
.range-track i{display:block;height:5px}.good-range{background:#00c875;flex:7}.warn-range{background:#ffad25;flex:1.5}.bad-range{background:#f44336;flex:1}
.range-track b{position:absolute;top:-5px;width:2px;height:15px;background:#555;transform:translateX(-50%);border:1px solid white;box-shadow:0 0 0 1px #777}
.field-divider{border-top:1px solid var(--border);padding:14px 0 0;color:var(--muted-2);font-size:10px}
.field-metrics.secondary{grid-template-columns:repeat(2,minmax(0,1fr));max-width:680px;gap:28px;padding-top:12px}
.field-meta{background:var(--panel-soft);border-radius:4px;padding:13px 16px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px 18px;color:var(--muted-2);font-size:10px;margin:4px -7px 0}
.field-meta>span{display:flex;align-items:center;gap:7px;min-width:0}.field-meta i{font-size:12px;flex:none}.field-meta a{color:inherit;text-decoration:underline}
.field-expanded{display:none;border-top:1px solid var(--border);padding:14px 4px;color:var(--muted-2);font-size:11px;line-height:1.8}
.field-card.expanded .field-expanded{display:block}.field-expanded b{color:var(--ink)}.field-expanded p{margin:4px 0 10px}
.threshold-chips{display:flex;gap:7px;flex-wrap:wrap}.good-chip{background:#e6f7ee;color:#087c48;border-radius:20px;padding:3px 9px;font-size:10px}
.report-shell{width:min(990px,100%);padding-inline:10px}
.diagnose-heading{display:flex;align-items:center;gap:10px;padding:0 0 13px}
.diagnose-heading p{margin-top:2px}
.score-insight{display:flex;align-items:center;gap:6px;margin-top:9px;max-width:380px;background:var(--panel-soft);padding:6px 9px;border-radius:4px;color:var(--muted-2);font-size:9px;line-height:1.5}
.score-insight i{color:#f9ab00;flex:none;font-size:12px}
.metric-row small{font-size:9px;color:var(--muted-2);margin-top:2px}
.metric-row{height:72px}
.theme-toggle{font-size:16px;display:grid;place-items:center}
body[data-theme="dark"],html[data-theme="dark"]{--page-bg:#101318;--panel:#171c23;--panel-soft:#202731;--ink:#e8edf3;--text:#e8edf3;--muted:#aab4c0;--muted-2:#aab4c0;--border:#303945;background:var(--page-bg);color:var(--ink)}
html[data-theme="dark"] body{background:var(--page-bg);color:var(--ink)}
html[data-theme="dark"] .psi-header,html[data-theme="dark"] .device-bar,html[data-theme="dark"] .audit-trigger,html[data-theme="dark"] .treemap-btn,html[data-theme="dark"] .header-action{background:var(--panel);color:var(--ink)}
html[data-theme="dark"] .psi-brand,html[data-theme="dark"] .device-tab,html[data-theme="dark"] .mini-score,html[data-theme="dark"] .metric-row span,html[data-theme="dark"] .audit-trigger,html[data-theme="dark"] .field-metric-head a{color:var(--ink)}
html[data-theme="dark"] .field-icon,html[data-theme="dark"] .diagnose-icon{background:#1d3558;color:#8ab4f8}
html[data-theme="dark"] .scope-switch button{background:#202731;color:#bdc7d2}
html[data-theme="dark"] .scope-switch button.active{background:#1d3558;color:#8ab4f8}
html[data-theme="dark"] .status-icon.failed{background:#3a2225}
html[data-theme="dark"] .run-meta,html[data-theme="dark"] .field-meta,html[data-theme="dark"] .score-insight{background:var(--panel-soft);color:var(--muted-2)}
html[data-theme="dark"] .main-gauge .track,html[data-theme="dark"] .mini-gauge .track{stroke:#263a32}
html[data-theme="dark"] .preview-browser,html[data-theme="dark"] .preview-page{background:#e9e9e9;color:#555}
html[data-theme="dark"] .audit-trigger:hover{background:#202731}
html[data-theme="dark"] .sample-note{border-color:var(--border);color:var(--muted-2)}
html[data-theme="dark"] .loading-overlay{background:#101318d9}
html[data-theme="dark"] .loading-box{background:var(--panel);border-color:var(--border);color:var(--ink)}
html[dir=rtl] .report-date,html[dir=rtl] .analyzer-hint,html[dir=rtl] .field-heading,html[dir=rtl] .field-meta,html[dir=rtl] .field-expanded,html[dir=rtl] .score-insight{font-family:IRANYekanX,Arial,sans-serif}
html[dir=rtl] .analyze-form input{text-align:right;font-family:IRANYekanX,Arial,sans-serif}
html[dir=rtl] .field-metric-head{direction:rtl}
html[dir=rtl] .cwv-status{direction:rtl}
@media(max-width:760px){
 .analyzer-bar{padding:14px 12px 8px}.report-date{font-size:15px}.report-date small{font-size:9px}
 .analyze-form input,.analyze-button{height:43px}.analyze-button{padding:0 13px}
 .field-data-shell{width:calc(100% - 20px)}.field-card{padding:12px 9px 0}
 .field-heading h2{font-size:12px}.field-heading p{font-size:9px}.field-icon{width:25px;height:25px}
 .field-metrics{gap:12px;padding-inline:2px}.field-metric-head a{font-size:10px}.field-metric>strong{font-size:17px}.field-metric>small{font-size:8px}
 .field-meta{grid-template-columns:repeat(2,minmax(0,1fr));font-size:9px;padding:10px;margin-inline:-3px}
 .report-shell{padding-inline:10px}.diagnose-heading h2{font-size:13px}
}
@media(max-width:520px){
 .field-metrics{grid-template-columns:1fr;gap:16px}.field-metric{max-width:420px;width:100%;margin:auto}
 .field-metrics.secondary{grid-template-columns:1fr}
 .cwv-status{justify-content:flex-start;flex-wrap:wrap;padding-inline:3px}.cwv-status strong{font-size:12px}
 .expand-field{top:0}.field-heading{align-items:flex-start}.scope-switch button{font-size:9px;padding:4px 6px}
 .report-date small{display:none}.analyze-form{gap:6px}.analyze-button{font-size:11px;padding:0 10px}
 .score-insight{max-width:290px}.metric-row{height:66px}
}


/* V4 — refined spacing, softer geometry, and complete hover feedback */
:root{
 --page-bg:#f7f9fc;--panel:#ffffff;--panel-soft:#f2f5f9;--ink:#202938;
 --muted-2:#6b7788;--border:#e3e8ef;--blue:#2563eb;
 --green:#00bd72;--orange:#f5a524;
}
body{background:var(--page-bg);color:var(--ink);line-height:1.55}
.psi-header{box-shadow:0 1px 0 rgba(15,23,42,.04)}
.analyzer-bar{padding-block:24px 16px}
.analyzer-inner{max-width:980px}
.report-date{letter-spacing:-.02em}
.analyze-form input{border-radius:12px;border-color:var(--border);background:var(--panel);transition:border-color .2s,box-shadow .2s,background .2s}
.analyze-button{border-radius:12px;box-shadow:0 5px 14px rgba(37,99,235,.16);transition:transform .2s,box-shadow .2s,filter .2s}
.analyze-button:hover{transform:translateY(-1px);box-shadow:0 8px 18px rgba(37,99,235,.24);filter:brightness(1.04)}
.analyze-button:active{transform:translateY(0)}
.field-card,.score-summary,.performance-hero,.metrics-section,.insights-section,.diagnostics-section{
 border-radius:18px;overflow:hidden
}
.field-card{padding:22px 20px 0;box-shadow:0 8px 28px rgba(15,23,42,.045);transition:border-color .22s,box-shadow .22s,transform .22s}
.field-card:hover{border-color:#cbd5e1;box-shadow:0 12px 34px rgba(15,23,42,.075)}
.field-heading{margin-bottom:12px}
.field-icon,.diagnose-icon{border-radius:10px;width:34px;height:34px}
.scope-switch{border-radius:10px;padding:3px;background:var(--panel-soft);border:1px solid var(--border)}
.scope-switch button{border-radius:7px;border:0!important;background:transparent;padding:7px 11px;transition:background .18s,color .18s,box-shadow .18s}
.scope-switch button.active{box-shadow:0 1px 4px rgba(15,23,42,.10)}
.cwv-status{min-height:70px}
.status-icon{border-radius:16px}
.field-metrics{gap:22px;padding:14px 10px 20px}
.field-metric{padding:12px 12px 10px;border:1px solid transparent;border-radius:13px;transition:background .2s,border-color .2s,transform .2s,box-shadow .2s}
.field-metric:hover{background:var(--panel-soft);border-color:var(--border);transform:translateY(-2px);box-shadow:0 5px 16px rgba(15,23,42,.05)}
.field-metric-head a{transition:color .18s;text-decoration-thickness:1px}
.field-metric-head a:hover{color:var(--blue)}
.range-track{border-radius:99px;overflow:visible}
.range-track i{border-radius:99px}
.range-track b{border-radius:4px}
.field-meta{border-radius:12px;margin:8px -8px 0;padding:16px}
.field-meta>span{padding:5px 7px;border-radius:7px;transition:background .18s,color .18s}
.field-meta>span:hover{background:var(--panel);color:var(--ink)}
.field-expanded{padding:18px 8px}
.good-chip{border-radius:999px;padding:5px 11px}
.report-shell{max-width:1010px;padding:0 14px 50px}
.diagnose-heading{padding:10px 2px 15px}
.diagnose-icon{border-radius:11px}
.score-summary{padding:18px 22px;margin-bottom:14px;border:1px solid var(--border);background:var(--panel);box-shadow:0 6px 24px rgba(15,23,42,.035);gap:20px}
.mini-score,.agent-score{border-radius:13px;padding:9px 12px;transition:background .2s,transform .2s,box-shadow .2s;cursor:default}
.mini-score:hover,.agent-score:hover{background:var(--panel-soft);transform:translateY(-3px);box-shadow:0 6px 16px rgba(15,23,42,.06)}
.performance-hero{padding:28px 26px;margin-bottom:15px;border:1px solid var(--border);background:var(--panel);box-shadow:0 6px 24px rgba(15,23,42,.035);transition:box-shadow .22s,border-color .22s}
.performance-hero:hover{border-color:#cbd5e1;box-shadow:0 12px 32px rgba(15,23,42,.065)}
.hero-score-area{border-radius:16px;padding:10px 14px 14px;transition:background .22s,transform .22s}
.hero-score-area:hover{background:var(--panel-soft)}
.main-gauge{transition:transform .25s,filter .25s}
.hero-score-area:hover .main-gauge{transform:scale(1.045);filter:drop-shadow(0 7px 10px rgba(0,190,114,.14))}
.hero-score-area h1{font-size:22px;letter-spacing:-.03em;margin:14px 0 8px}
.hero-score-area p{max-width:430px;margin-inline:auto;color:var(--muted-2);font-size:12px;line-height:1.75}
.legend{display:flex;justify-content:center;gap:8px;margin-top:17px;flex-wrap:wrap}
.legend span{position:relative;display:inline-flex;align-items:center;gap:7px;padding:7px 11px;border:1px solid transparent;border-radius:9px;color:var(--muted-2);font-size:11px;transition:background .18s,border-color .18s,color .18s,transform .18s;cursor:help}
.legend span:hover,.legend span:focus-visible{background:var(--panel);border-color:var(--border);color:var(--ink);transform:translateY(-2px);outline:none}
.legend span::after{content:attr(data-tip);position:absolute;z-index:5;left:50%;bottom:calc(100% + 9px);transform:translate(-50%,5px);width:max-content;max-width:210px;white-space:normal;text-align:center;padding:8px 10px;border-radius:9px;background:#182230;color:#f8fafc;font-size:10px;line-height:1.5;box-shadow:0 8px 24px #0003;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .18s,transform .18s}
.legend span:hover::after,.legend span:focus-visible::after{opacity:1;visibility:visible;transform:translate(-50%,0)}
.score-insight{max-width:410px;margin:12px auto 0;padding:10px 12px;border-radius:11px;border:1px solid var(--border);font-size:10px;transition:background .2s,border-color .2s,transform .2s,box-shadow .2s;cursor:help}
.score-insight:hover{background:var(--panel);border-color:#f2c66d;transform:translateY(-2px);box-shadow:0 7px 18px rgba(245,165,36,.10)}
.metric-row{border-radius:12px;padding:12px 14px;transition:background .18s,border-color .18s,transform .18s,box-shadow .18s;cursor:default}
.metric-row:hover{background:var(--panel-soft);transform:translateY(-2px);box-shadow:0 5px 15px rgba(15,23,42,.045)}
.section-label button,.expand-field{border-radius:8px;padding:7px 10px;transition:background .18s,color .18s}
.section-label button:hover,.expand-field:hover{background:var(--panel-soft);color:var(--blue)}
.audit-trigger{border-radius:10px;padding:13px 15px;transition:background .18s,border-color .18s,transform .18s}
.audit-trigger:hover{transform:translateX(2px)}
.page-preview{border-radius:14px;overflow:hidden;box-shadow:0 8px 24px rgba(15,23,42,.10)}
.run-meta{border-radius:12px}
.header-icon,.theme-toggle{border-radius:10px;transition:background .18s,transform .18s}
.header-icon:hover,.theme-toggle:hover{background:var(--panel-soft);transform:translateY(-1px)}
/* A coherent dark palette: deep navy surfaces, readable muted text, restrained blue accent */
html[data-theme="dark"]{
 --page-bg:#0b1020;--panel:#111a2b;--panel-soft:#172338;--ink:#e8eef8;
 --text:#e8eef8;--muted:#a5b3c8;--muted-2:#9aaac1;--border:#263650;
 --blue:#78a9ff;--green:#25d99a;--orange:#ffbd59;
 color-scheme:dark;background:var(--page-bg);color:var(--ink)
}
html[data-theme="dark"] body{background:var(--page-bg);color:var(--ink)}
html[data-theme="dark"] .psi-header{background:#0d1525;border-color:#263650;box-shadow:0 1px 0 #ffffff08}
html[data-theme="dark"] .analyzer-bar{background:var(--page-bg)}
html[data-theme="dark"] .analyze-form input{background:#111a2b;border-color:#31435f;color:var(--ink)}
html[data-theme="dark"] .analyze-form input::placeholder{color:#71839d}
html[data-theme="dark"] .analyze-button{background:#326fe0;color:white;box-shadow:0 5px 18px #1e5acb40}
html[data-theme="dark"] .field-card,html[data-theme="dark"] .score-summary,html[data-theme="dark"] .performance-hero{background:linear-gradient(145deg,#121d30,#101827);border-color:#263650;box-shadow:0 10px 30px #0003}
html[data-theme="dark"] .field-card:hover,html[data-theme="dark"] .performance-hero:hover{border-color:#3b5275;box-shadow:0 14px 38px #0005}
html[data-theme="dark"] .field-metric:hover,html[data-theme="dark"] .metric-row:hover,html[data-theme="dark"] .mini-score:hover,html[data-theme="dark"] .agent-score:hover{background:#1b2a42;border-color:#304765;box-shadow:0 8px 22px #0003}
html[data-theme="dark"] .hero-score-area:hover{background:#17243a}
html[data-theme="dark"] .hero-divider{background:#263650}
html[data-theme="dark"] .field-meta{background:#0d1728}
html[data-theme="dark"] .field-meta>span:hover{background:#1a2a42;color:#e8eef8}
html[data-theme="dark"] .field-icon,html[data-theme="dark"] .diagnose-icon{background:#1a3154;color:#8bb8ff}
html[data-theme="dark"] .scope-switch{background:#0d1728;border-color:#2b3e5c}
html[data-theme="dark"] .scope-switch button{color:#a9bad2}
html[data-theme="dark"] .scope-switch button.active{background:#233b60;color:#c9ddff;box-shadow:0 1px 4px #0005}
html[data-theme="dark"] .status-icon.failed{background:#3b2634;color:#ff8795}
html[data-theme="dark"] .score-insight{background:#1b2639;border-color:#34445d;color:#b7c5d8}
html[data-theme="dark"] .score-insight:hover{background:#202f48;border-color:#8c6b35}
html[data-theme="dark"] .good-chip{background:#123b35;color:#75e6bd}
html[data-theme="dark"] .preview-browser,html[data-theme="dark"] .preview-page{background:#e9e9e9;color:#555}
html[data-theme="dark"] .loading-box{background:#111a2b;border-color:#263650;color:var(--ink)}
html[data-theme="dark"] .audit-trigger{background:#111a2b;color:var(--ink);border-color:#263650}
html[data-theme="dark"] .audit-trigger:hover{background:#1a2940}
html[data-theme="dark"] .treemap-btn,html[data-theme="dark"] .header-action{background:#111a2b;color:var(--ink);border-color:#263650}
html[data-theme="dark"] .section-label button:hover,html[data-theme="dark"] .expand-field:hover{background:#1c2d47;color:#9dc0ff}
html[data-theme="dark"] .legend span:hover,html[data-theme="dark"] .legend span:focus-visible{background:#1a2940;border-color:#334b6d;color:#e8eef8}
html[data-theme="dark"] .range-track b{background:#e8eef8;border-color:#111a2b;box-shadow:0 0 0 1px #8294ad}
html[data-theme="dark"] .metric-row{border-color:#263650}
html[data-theme="dark"] .sample-note{background:#111a2b;border-color:#263650}
@media(max-width:760px){
 .performance-hero{padding:18px 12px}
 .score-summary{padding:12px 8px;gap:5px}
 .field-card{padding:16px 12px 0}
 .field-metrics{gap:8px}
 .field-metric{padding:10px 7px}
}
@media(prefers-reduced-motion:reduce){
 *,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}
}

/* V5 correction: restore the original PageSpeed composition; micro-data appears on hover */
.performance-hero{height:332px;grid-template-columns:1fr 1px 1fr;padding:20px 18px;margin-bottom:14px;border-radius:12px}
.hero-score-area{padding:10px 22px 0;background:transparent!important;border-radius:0}
.hero-score-area:hover{background:transparent!important}
.gauge-wrap{width:220px;height:198px;position:relative;display:flex;align-items:center;justify-content:center;margin:0 auto}
.main-gauge{width:166px;height:166px;flex:none;z-index:1}
.main-gauge svg{width:166px;height:166px}
.main-gauge strong{font-size:34px}
.hero-score-area h1{font-size:20px;margin:3px 0 8px}
.hero-score-area p{font-size:11px;max-width:390px;line-height:1.7}
.legend{gap:20px;margin-top:15px}
.legend span{padding:4px 7px;border:0;border-radius:4px;cursor:default}
.legend span::after{display:none}
.score-insight{margin:8px auto 0;padding:7px 10px;max-width:390px;border-radius:7px;cursor:default}
.score-insight:hover{transform:none;box-shadow:none;background:var(--panel-soft);border-color:var(--border)}
/* small metric labels orbit the gauge; details are revealed by hover/focus */
.gauge-data{position:absolute;z-index:3;border:0;background:transparent;color:var(--ink);font-size:11px;font-weight:500;line-height:1;font-family:inherit;padding:4px 5px;border-radius:6px;cursor:help;transition:background .16s,color .16s,transform .16s}
.gauge-data:hover,.gauge-data:focus-visible{background:var(--panel);color:var(--blue);outline:none;transform:scale(1.08);box-shadow:0 2px 9px #0002}
.gauge-data::after{content:attr(data-tip-en);position:absolute;z-index:10;left:50%;bottom:calc(100% + 8px);transform:translate(-50%,4px);width:max-content;max-width:190px;white-space:normal;text-align:center;background:#202b3a;color:#fff;padding:8px 10px;border-radius:8px;font-size:10px;font-weight:500;line-height:1.5;font-family:inherit;box-shadow:0 7px 22px #0003;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .16s,transform .16s}
.gauge-data:hover::after,.gauge-data:focus-visible::after{opacity:1;visibility:visible;transform:translate(-50%,0)}
.data-si{top:0;left:calc(50% - 52px)}
.data-fcp{top:0;right:calc(50% - 52px)}
.data-lcp{top:76px;right:0}
.data-tbt{bottom:0;left:calc(50% - 16px)}
.data-cls{top:76px;left:0}
.agent-score{height:34px;min-width:58px;padding:0 10px;border-radius:18px;gap:6px;font-size:12px}
.agent-score .agent-dot{width:8px;height:8px}
.agent-score small{position:static;display:block;white-space:nowrap;font-size:10px;line-height:1.2;color:var(--muted-2);margin-inline-start:2px}
.score-summary{height:82px;padding:8px 16px;gap:22px;margin-bottom:14px;border-radius:12px}
.mini-score{padding:3px 8px;gap:4px}
.agent-score{align-self:center}
html[dir=rtl] .gauge-data::after{content:attr(data-tip-fa)}
html[data-theme="dark"] .gauge-data{color:#dce7f7}
html[data-theme="dark"] .gauge-data:hover,html[data-theme="dark"] .gauge-data:focus-visible{background:#1b2c45;color:#9fc2ff;box-shadow:0 3px 12px #0006}
html[data-theme="dark"] .gauge-data::after{background:#e8eef8;color:#162033}
html[data-theme="dark"] .agent-score{background:#153b34;color:#7ce5bd}
html[data-theme="dark"] .agent-score small{color:#a9bad2}
@media(max-width:760px){
 .performance-hero{height:auto;min-height:310px;padding:18px 12px;grid-template-columns:1fr}
 .hero-divider{display:none}
 .page-preview{margin:16px auto 0}
 .gauge-wrap{height:184px}
 .main-gauge,.main-gauge svg{width:150px;height:150px}
 .score-summary{height:auto;min-height:82px;gap:6px;flex-wrap:wrap}
 .agent-score{margin:4px}
}
@media(max-width:520px){
 .performance-hero{padding:16px 8px}
 .gauge-wrap{width:210px;height:180px}
 .main-gauge,.main-gauge svg{width:144px;height:144px}
 .gauge-data{font-size:10px}
 .score-summary{gap:2px;padding:10px 4px}
 .mini-score{min-width:65px}
 .agent-score small{font-size:9px}
}

/* V6 — requested layout tuning + un-clipped metric hover cards */
.metric-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:25px;
}
.performance-hero{
  height:auto;
  min-height:332px;
  grid-template-columns:1fr 1px 1fr;
  padding:20px 18px;
  margin-bottom:14px;
  border-radius:12px;
  overflow:visible !important;
}
.performance-hero .hero-score-area,
.performance-hero .gauge-wrap{
  overflow:visible !important;
}
.gauge-wrap{isolation:isolate}
.gauge-data{z-index:30;min-height:24px;min-width:24px}
.gauge-data::after{
  z-index:100;
  bottom:calc(100% + 10px);
  min-width:170px;
  max-width:220px;
  padding:10px 12px;
  border:1px solid #34465e;
  border-radius:10px;
  box-shadow:0 12px 28px rgba(10,20,35,.22);
  font-size:11px;
  line-height:1.65;
  white-space:normal;
}
.gauge-data:hover,.gauge-data:focus-visible{
  z-index:101;
  transform:translateY(-1px) scale(1.12);
  background:var(--panel);
  outline:2px solid color-mix(in srgb,var(--blue) 22%,transparent);
}
.data-si::after,.data-fcp::after{bottom:auto;top:calc(100% + 9px)}
.data-lcp::after{left:auto;right:0;transform:translate(0,4px)}
.data-lcp:hover::after,.data-lcp:focus-visible::after{transform:translate(0,0)}
.data-cls::after{left:0;transform:translate(0,4px)}
.data-cls:hover::after,.data-cls:focus-visible::after{transform:translate(0,0)}
html[dir="rtl"] .data-lcp::after{right:auto;left:0}
html[dir="rtl"] .data-cls::after{left:auto;right:0}
html[dir="rtl"] .data-lcp:hover::after,html[dir="rtl"] .data-lcp:focus-visible::after,
html[dir="rtl"] .data-cls:hover::after,html[dir="rtl"] .data-cls:focus-visible::after{transform:translate(0,0)}
@media(max-width:760px){
 .performance-hero{height:auto;min-height:0;grid-template-columns:1fr;overflow:visible!important}
 .metric-grid{grid-template-columns:1fr 1fr;gap:14px}
}
@media(max-width:520px){
 .metric-grid{grid-template-columns:1fr;gap:10px}
 .performance-hero{padding:20px 12px}
 .gauge-data::after{max-width:185px;min-width:145px}
}

/* V7 — exact idle/hover interaction from the supplied reference */
.gauge-wrap{
  width:230px;
  height:214px;
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  margin:0 auto;
  overflow:visible!important;
}
.gauge-wrap .main-gauge,
.gauge-wrap .main-gauge svg{
  width:150px;
  height:150px;
  transition:width .24s ease,height .24s ease,filter .24s ease;
}
.gauge-wrap .main-gauge{
  transform:scale(1);
  transform-origin:center;
}
.gauge-data{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .18s ease,visibility .18s ease,transform .2s ease,background .16s ease,color .16s ease;
}
.gauge-wrap:hover .gauge-data,
.gauge-wrap:focus-within .gauge-data{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}
.gauge-wrap:hover .main-gauge,
.gauge-wrap:focus-within .main-gauge{
  transform:scale(1.12);
  filter:drop-shadow(0 5px 12px rgba(0,190,114,.10));
}
.gauge-wrap:hover .main-gauge,
.gauge-wrap:focus-within .main-gauge{
  width:168px;
  height:168px;
}
.gauge-wrap:hover .main-gauge svg,
.gauge-wrap:focus-within .main-gauge svg{
  width:168px;
  height:168px;
}
.gauge-data:hover,.gauge-data:focus-visible{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  z-index:110;
}
.hero-score-area h1{margin-top:0}
@media(max-width:760px){
 .gauge-wrap{width:220px;height:204px}
 .gauge-wrap .main-gauge,.gauge-wrap .main-gauge svg{width:144px;height:144px}
 .gauge-wrap:hover .main-gauge,.gauge-wrap:focus-within .main-gauge,
 .gauge-wrap:hover .main-gauge svg,.gauge-wrap:focus-within .main-gauge svg{width:160px;height:160px}
}
@media(prefers-reduced-motion:reduce){
 .gauge-wrap .main-gauge,.gauge-wrap .main-gauge svg,.gauge-data{transition:none}
}

/* V8 — Lighthouse-style segmented metric arcs and delta labels */
.gauge-wrap{
 width:240px;height:240px;position:relative;display:flex;align-items:center;justify-content:center;
 margin:-10px auto 0;overflow:visible!important;isolation:isolate
}
.metric-arc-layer{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none;z-index:2}
.metric-arc{fill:none;stroke-width:7.5;stroke-linecap:round;opacity:0;transition:opacity .22s ease,stroke-width .22s ease}
.gauge-wrap:hover .metric-arc,.gauge-wrap:focus-within .metric-arc{opacity:1}
.gauge-wrap:hover .main-gauge .value,.gauge-wrap:focus-within .main-gauge .value{opacity:0}
.gauge-wrap .main-gauge,.gauge-wrap .main-gauge svg{width:150px;height:150px;transition:transform .22s ease}
.gauge-wrap:hover .main-gauge,.gauge-wrap:focus-within .main-gauge{transform:scale(.94);filter:none}
.gauge-wrap:hover .main-gauge svg,.gauge-wrap:focus-within .main-gauge svg{width:150px;height:150px}
.gauge-data{
 position:absolute;z-index:4;display:flex;flex-direction:column;align-items:center;gap:1px;
 border:0;background:transparent;color:var(--ink);padding:3px 5px;border-radius:7px;
 font-family:inherit;cursor:help;opacity:0;visibility:hidden;pointer-events:none;
 transition:opacity .18s ease,visibility .18s ease,background .16s ease,color .16s ease,transform .16s ease;
}
.gauge-wrap:hover .gauge-data,.gauge-wrap:focus-within .gauge-data{
 opacity:1;visibility:visible;pointer-events:auto
}
.metric-code{font-size:11px;line-height:1.2;font-weight:600}
.metric-delta{font-size:10px;line-height:1.2;font-weight:600;color:#00a965}
.metric-delta.average{color:#e59a16}
.gauge-data:hover,.gauge-data:focus-visible{background:var(--panel);color:var(--blue);outline:1px solid var(--border);transform:scale(1.08);z-index:8}
.gauge-data::after{
 content:attr(data-tip-en);position:absolute;z-index:20;left:50%;bottom:calc(100% + 7px);
 transform:translate(-50%,4px);width:max-content;max-width:190px;white-space:normal;text-align:center;
 background:#202b3a;color:#fff;padding:8px 10px;border-radius:8px;font-size:10px;line-height:1.55;
 box-shadow:0 7px 22px #0003;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .16s,transform .16s
}
.gauge-data:hover::after,.gauge-data:focus-visible::after{opacity:1;visibility:visible;transform:translate(-50%,0)}
.data-si{top:2px;left:57px}
.data-fcp{top:2px;right:57px}
.data-lcp{top:105px;right:0}
.data-tbt{bottom:0;left:calc(50% - 18px)}
.data-cls{top:105px;left:0}
.data-lcp::after{left:auto;right:0;transform:translate(0,4px)}
.data-lcp:hover::after,.data-lcp:focus-visible::after{transform:translate(0,0)}
.data-cls::after{left:0;transform:translate(0,4px)}
.data-cls:hover::after,.data-cls:focus-visible::after{transform:translate(0,0)}
html[dir="rtl"] .gauge-data::after{content:attr(data-tip-fa)}
html[data-theme="dark"] .gauge-data{color:#e5edf8}
html[data-theme="dark"] .gauge-data:hover{background:#1b2c45;color:#9fc2ff}
html[data-theme="dark"] .gauge-data::after{background:#e8eef8;color:#162033}
@media(max-width:760px){
 .gauge-wrap{width:224px;height:224px;margin:-6px auto 0}
 .gauge-data{font-size:10px}
 .data-lcp{top:98px}.data-cls{top:98px}
}

/* V9 — bring the five metric arcs close to the core gauge and animate them in */
.gauge-wrap{
  width:240px;
  height:240px;
  overflow:visible!important;
  isolation:isolate;
}
.gauge-wrap .metric-arc-layer{
  transform:scale(.84);
  transform-origin:50% 50%;
  transition:transform .42s cubic-bezier(.2,.75,.25,1);
}
.gauge-wrap .metric-arc{
  opacity:0;
  stroke-width:8;
  transform-box:fill-box;
  transform-origin:center;
  transform:scale(.94);
  transition:
    opacity .38s ease,
    transform .48s cubic-bezier(.2,.75,.25,1),
    stroke-width .38s ease;
}
.gauge-wrap:hover .metric-arc,
.gauge-wrap:focus-within .metric-arc{
  opacity:1;
  transform:scale(1);
  stroke-width:7.5;
}
.gauge-wrap .main-gauge .value{
  transition:opacity .38s ease,stroke .38s ease;
}
.gauge-wrap:hover .main-gauge .value,
.gauge-wrap:focus-within .main-gauge .value{
  opacity:0;
}
.gauge-wrap .main-gauge .track{
  transition:stroke .38s ease;
}
.gauge-wrap .gauge-data{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transform:translateY(5px) scale(.96);
  transition:
    opacity .34s ease,
    transform .42s cubic-bezier(.2,.75,.25,1),
    visibility 0s linear .42s,
    background .18s ease,
    color .18s ease;
}
.gauge-wrap:hover .gauge-data,
.gauge-wrap:focus-within .gauge-data{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transform:translateY(0) scale(1);
  transition:
    opacity .34s ease,
    transform .42s cubic-bezier(.2,.75,.25,1),
    visibility 0s,
    background .18s ease,
    color .18s ease;
}
/* Keep labels outside the arc endpoints and clear of the center ring */
.gauge-wrap .data-si{top:9px;left:57px}
.gauge-wrap .data-fcp{top:9px;right:57px}
.gauge-wrap .data-lcp{top:105px;right:-2px}
.gauge-wrap .data-cls{top:105px;left:-2px}
.gauge-wrap .data-tbt{bottom:5px;left:calc(50% - 18px)}
.gauge-wrap .gauge-data:hover,
.gauge-wrap .gauge-data:focus-visible{
  transform:translateY(-1px) scale(1.06);
}
@media(max-width:760px){
  .gauge-wrap{width:224px;height:224px}
  .gauge-wrap .metric-arc-layer{transform:scale(.84)}
  .gauge-wrap .data-lcp{top:98px;right:-1px}
  .gauge-wrap .data-cls{top:98px;left:-1px}
}
@media(prefers-reduced-motion:reduce){
  .gauge-wrap .metric-arc-layer,
  .gauge-wrap .metric-arc,
  .gauge-wrap .main-gauge .value,
  .gauge-wrap .main-gauge .track,
  .gauge-wrap .gauge-data{transition:none!important}
}


/* Initial state: keep the URL search inline directly below the header.
   The report sections remain hidden until the first successful AJAX analysis. */
body.psi-search-only .device-bar,
body.psi-search-only #fieldDataShell,
body.psi-search-only #reportShell {
  display: none !important;
}
body.psi-search-only .analyzer-bar {
  min-height: 0;
  display: block;
  padding: 24px 16px 18px;
  background: var(--page-bg);
}
body.psi-search-only .analyzer-inner {
  width: min(990px, 100%);
  margin: 0 auto;
}
body.psi-search-only .report-date {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
}
body.psi-search-only .report-date small {
  display: none;
}
body.psi-search-only .analyzer-hint {
  display: block;
  margin: 10px 2px 0;
}
body.psi-search-only .analyze-form {
  width: 100%;
  padding: 6px;
  gap: 8px;
  border: 1px solid var(--border, #dce3e9);
  border-radius: 12px;
  background: var(--panel, #fff);
  box-shadow: 0 4px 16px rgba(25, 65, 95, .05);
}
body.psi-search-only .analyze-form input {
  min-width: 0;
  min-height: 48px;
  border: 0;
  box-shadow: none;
  background: transparent;
  padding-inline: 14px;
  font-size: 15px;
}
body.psi-search-only .analyze-button {
  min-height: 48px;
  padding-inline: 22px;
  border-radius: 9px;
  flex: none;
}
.psi-results-pending { display: none !important; }
.request-message[hidden] { display: none !important; }
@media (max-width: 600px) {
  body.psi-search-only .analyzer-bar { padding: 18px 12px 14px; }
  body.psi-search-only .analyze-form { flex-direction: column; align-items: stretch; }
  body.psi-search-only .analyze-button { width: 100%; }
}


/* Live Lighthouse screenshots and content-safe metric cards */
.metric-row{
  height:auto !important;
  min-height:72px;
  align-items:flex-start;
}
.metric-row>div{min-width:0;display:flex;flex-direction:column;gap:5px}
.metric-row small{
  display:block;
  line-height:1.65;
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:normal;
  max-width:100%;
  margin-top:2px;
}
html[dir="rtl"] .metric-row small,
html[dir="rtl"] .metric-row span{line-height:1.9}
.page-preview{min-width:0;max-width:100%}
.preview-page{position:relative;overflow:auto;max-height:540px;background:#fff}
.lighthouse-page-shot{display:block;width:100%;height:auto;object-fit:contain;object-position:top center}
.page-preview.device-mobile{max-width:300px;width:100%;margin-inline:auto}
.page-preview.device-mobile .preview-page{max-height:560px}
.page-preview.device-desktop{max-width:100%;width:100%}
.page-preview.device-desktop .preview-page{max-height:520px}
.filmstrip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;align-items:start}
.filmstrip .frame{min-width:0;margin:0;overflow:hidden;border:1px solid var(--border);border-radius:8px;background:var(--panel)}
.filmstrip .frame img{display:block;width:100%;height:auto;aspect-ratio:16/10;object-fit:cover;object-position:top}
.filmstrip .frame figcaption{padding:5px 7px;font-size:10px;color:var(--muted);text-align:center}
#fieldDataShell[hidden],#treemapSection[hidden],.filmstrip[hidden]{display:none!important}
@media(max-width:680px){
 .filmstrip{grid-template-columns:repeat(2,minmax(0,1fr))}
 .page-preview.device-mobile{max-width:260px}
 .metric-row{min-height:0}
}

/* Keep audit rows LTR even when the surrounding interface is Persian. */
html[dir=rtl] .audit-list{direction:ltr;text-align:left}
html[dir=rtl] .audit-trigger{direction:ltr;text-align:left}
html[dir=rtl] .audit-detail{direction:ltr;text-align:left;margin-left:0;margin-right:auto}
html[dir=rtl] .audit-trigger>i{margin-left:auto;margin-right:0}
/* English-only dynamic content is explicitly aligned from left to right. */
html[dir=rtl] [dir="ltr"]{direction:ltr;text-align:left;unicode-bidi:plaintext}
/* The five outer score arcs are revealed only while hovering/focusing the gauge. */
.gauge-wrap .metric-arc{opacity:0}
.gauge-wrap:hover .metric-arc,.gauge-wrap:focus-within .metric-arc{opacity:1}

/* Real Lighthouse screenshot preview: responsive device frames */
.page-preview.device-mobile{
 width:160px!important;height:320px!important;max-width:160px!important;
 aspect-ratio:9/16;display:flex;flex-direction:column;
}
.page-preview.device-desktop{
 width:min(100%,420px)!important;height:260px!important;max-width:420px!important;
 aspect-ratio:16/10;display:flex;flex-direction:column;
}
.page-preview .preview-browser{flex:0 0 21px;min-height:21px}
.page-preview .preview-page{
 flex:1 1 auto;min-height:0;height:auto!important;max-height:none!important;
 padding:0!important;overflow:auto;text-align:initial;background:#fff!important;
}
.page-preview .lighthouse-page-shot{
 display:block;width:100%;height:auto;min-height:100%;object-fit:contain;
 object-position:top center;background:#fff;
}
.page-preview .preview-placeholder{
 min-height:100%;display:grid;place-items:center;padding:16px;text-align:center;
 font-size:11px;line-height:1.6;color:#687078;
}
@media(max-width:680px){
 .page-preview.device-desktop{width:min(100%,340px)!important;height:220px!important;max-width:340px!important}
 .page-preview.device-mobile{width:145px!important;height:290px!important;max-width:145px!important}
}

/* Live Lighthouse preview: keep desktop captures in a genuine wide viewport. */
.page-preview.device-desktop{width:min(100%,620px)!important;max-width:620px!important;height:360px!important;aspect-ratio:16/10;justify-self:center}
.page-preview.device-desktop .preview-page{max-height:none!important}
.page-preview.device-desktop .lighthouse-page-shot{width:100%;height:auto;object-fit:contain;object-position:top center}
@media(max-width:680px){.page-preview.device-desktop{width:min(100%,100%)!important;max-width:100%!important;height:260px!important}}
p {
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: normal;
    white-space: normal;
    max-width: 100%;
    box-sizing: border-box;
}
main#reportShell {
    overflow-x: hidden !important;
}
}