/* AI Website Audit page and report. */

.hero-audit { padding-bottom: clamp(56px, 8vw, 96px); }
.audit-hero { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; }
.audit-hero h1 { max-width: 14ch; }
.audit-hero .lead { margin: 22px auto 32px; }
.audit-hero .aform { width: 100%; max-width: 620px; }
.audit-small { margin-top: 16px; color: var(--dim); font-size: 13.5px; }

.audit-run { padding: 48px 0 24px; scroll-margin-top: 80px; }
.progress { max-width: 620px; margin: 0 auto; padding: 32px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line-2); }
.progress-host { font-weight: 600; font-size: 1.1rem; margin-bottom: 20px; word-break: break-all; }
.progress ol { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 12px; }
.progress li { display: flex; align-items: center; gap: 12px; color: var(--dim); transition: color .3s; }
.progress li::before { content: ""; width: 18px; height: 18px; flex: none; border-radius: 50%; border: 2px solid var(--line-2); }
.progress li.active { color: var(--text); }
.progress li.active::before { border-color: var(--accent); border-right-color: transparent; animation: spin .8s linear infinite; }
.progress li.done { color: var(--muted); }
.progress li.done::before { border-color: var(--accent); background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b1d45' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat; }
.progress-bar { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.progress-bar span { display: block; height: 100%; width: 8%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width 2.5s ease; }
@keyframes spin { to { transform: rotate(360deg); } }
.spin { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--accent); border-right-color: transparent; animation: spin .8s linear infinite; vertical-align: -3px; margin-right: 8px; }

.audit-error { max-width: 620px; margin: 0 auto; padding: 24px 28px; border-radius: 16px; background: rgba(248, 113, 113, .08); border: 1px solid rgba(248, 113, 113, .35); }
.audit-error strong { color: var(--bad); }
.audit-error p { margin-top: 6px; color: var(--muted); }

.report { display: grid; gap: 28px; }
.rep-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.rep-head .eyebrow { margin-bottom: 10px; }
.rep-head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); word-break: break-word; }
.rep-meta { margin-top: 8px; color: var(--muted); font-size: 14px; word-break: break-all; }
.rep-meta a { color: var(--accent); }
.rep-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.rep-scores { display: grid; grid-template-columns: auto minmax(220px, 1fr) 1.3fr; gap: 32px; align-items: center; padding: 28px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line-2); }
.ring-big { --size: 168px; }
.ring-big span { font-size: 3.2rem; }
.ring-good { background: radial-gradient(closest-side, var(--surface) 78%, transparent 79% 100%), conic-gradient(var(--good) calc(var(--v) * 1%), rgba(255, 255, 255, .08) 0); }
.ring-warn { background: radial-gradient(closest-side, var(--surface) 78%, transparent 79% 100%), conic-gradient(var(--warn) calc(var(--v) * 1%), rgba(255, 255, 255, .08) 0); }
.ring-bad { background: radial-gradient(closest-side, var(--surface) 78%, transparent 79% 100%), conic-gradient(var(--bad) calc(var(--v) * 1%), rgba(255, 255, 255, .08) 0); }
.rep-cats { display: grid; gap: 14px; }
.rep-cat { display: grid; grid-template-columns: 1fr 36px; gap: 6px 10px; align-items: center; font-size: 14px; color: var(--muted); }
.rep-cat span { grid-column: 1 / -1; }
.rep-cat:hover span { color: var(--text); }
.rep-cat em { font-style: normal; font-family: var(--mono); color: var(--text); text-align: right; }
.bar { height: 7px; border-radius: 7px; background: rgba(255, 255, 255, .08); position: relative; overflow: hidden; }
.bar::after { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--v) * 1%); border-radius: 7px; }
.bar-good::after { background: var(--good); }
.bar-warn::after { background: var(--warn); }
.bar-bad::after { background: var(--bad); }
.rep-verdict h3 { font-size: 1.3rem; margin-bottom: 10px; }
.rep-verdict p { color: var(--muted); }
.rep-source { margin-top: 14px; }

.rep-sec { padding: 28px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.rep-title { font-size: 1.3rem; margin-bottom: 20px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.rep-title small { font: 500 12px var(--mono); color: var(--dim); letter-spacing: .04em; }

.fixes { list-style: none; margin: 0; padding: 0; counter-reset: fix; display: grid; gap: 14px; }
.fix { counter-increment: fix; position: relative; padding: 20px 20px 20px 64px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
.fix::before { content: counter(fix); position: absolute; left: 20px; top: 20px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: rgba(47, 211, 197, .1); color: var(--accent); font: 600 14px var(--mono); }
.fix-head { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.fix h4 { margin: 0 0 6px; font-size: 1.08rem; letter-spacing: -.01em; }
.fix p { color: var(--muted); font-size: 15px; }
.fix-how { margin-top: 8px; }
.fix-how strong { color: var(--text); }
.imp { padding: 4px 10px; border-radius: 999px; font: 600 11.5px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .05em; }
.imp-high { background: rgba(248, 113, 113, .12); color: var(--bad); }
.imp-medium { background: rgba(251, 191, 36, .12); color: var(--warn); }
.imp-low { background: rgba(52, 211, 153, .12); color: var(--good); }

.rewrites { display: grid; gap: 14px; }
.rw { position: relative; padding: 18px 20px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
.rw-label { font: 500 12px var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
.rw-old, .rw-new { display: grid; grid-template-columns: 90px 1fr; gap: 10px; font-size: 15px; }
.rw-old { color: var(--dim); text-decoration: line-through; text-decoration-color: rgba(248, 113, 113, .5); }
.rw-old em { font-style: normal; text-decoration: none; }
.rw-new { margin-top: 8px; color: var(--text); font-weight: 500; }
.rw span { font: 500 12px var(--mono); color: var(--dim); text-decoration: none; padding-top: 2px; }
.rw-new span { color: var(--accent); }
.rw-copy { position: absolute; top: 14px; right: 16px; background: none; border: 0; cursor: pointer; font: 600 13px var(--font); }
.tips li { color: var(--text); }
.tip-dot { color: var(--accent); flex: none; }

.psi-grid { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; }
.psi-ms { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.psi-m { padding: 14px 16px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.psi-m span { display: block; color: var(--dim); font-size: 12.5px; margin-bottom: 4px; }
.psi-m strong { font-size: 1.25rem; font-family: var(--mono); font-weight: 500; }
.psi-wait { color: var(--muted); }
.psi-note { margin-top: 16px; color: var(--dim); font-size: 13.5px; }
.t-good { color: var(--good); }
.t-warn { color: var(--warn); }
.t-bad { color: var(--bad); }

.checks { display: grid; gap: 10px; }
.check-cat { border-radius: 14px; background: var(--bg); border: 1px solid var(--line); scroll-margin-top: 90px; }
.check-cat summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 12px; padding: 18px 20px; font-weight: 600; }
.check-cat summary::-webkit-details-marker { display: none; }
.check-cat summary em { font-style: normal; font-family: var(--mono); font-size: 14px; }
.check-cat summary small { margin-left: auto; color: var(--dim); font-weight: 400; font-size: 13px; }
.check-cat ul { list-style: none; margin: 0; padding: 0 20px 14px; }
.chk { display: grid; grid-template-columns: 26px 1fr; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.chk b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 700 12px var(--mono); margin-top: 1px; }
.chk-pass b { background: rgba(52, 211, 153, .14); color: var(--good); }
.chk-warn b { background: rgba(251, 191, 36, .14); color: var(--warn); }
.chk-fail b { background: rgba(248, 113, 113, .14); color: var(--bad); }
.chk strong { font-size: 15px; }
.chk p { color: var(--muted); font-size: 14px; word-break: break-word; }
.chk .chk-fix { margin-top: 4px; color: var(--text); }
.chk .chk-fix::before { content: "Fix: "; color: var(--accent); font-weight: 600; }

.rep-lead { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: start; padding: clamp(24px, 4vw, 40px); border-radius: 24px; border: 1px solid rgba(47, 211, 197, .3); background: radial-gradient(500px 300px at 0% 0%, rgba(47, 211, 197, .16), transparent 70%), var(--surface); scroll-margin-top: 90px; }
.rep-lead h3 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 12px; }
.rep-lead p:not(.eyebrow) { color: var(--muted); }
.rep-lead .cform { box-shadow: none; background: var(--bg); }

@media (max-width: 1080px) {
	.rep-scores { grid-template-columns: auto 1fr; }
	.rep-verdict { grid-column: 1 / -1; }
	.rep-lead { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
	.rep-scores { grid-template-columns: 1fr; justify-items: center; padding: 22px; }
	.rep-cats { width: 100%; }
	.rep-sec { padding: 20px; }
	.fix { padding: 56px 16px 18px; }
	.fix::before { left: 16px; top: 16px; }
	.rw-old, .rw-new { grid-template-columns: 1fr; gap: 2px; }
	.rw-copy { position: static; margin-top: 10px; }
	.psi-grid { grid-template-columns: 1fr; justify-items: center; }
	.psi-ms { width: 100%; }
	.progress { padding: 22px; }
}
