/* Any Media Boost — audit tool. Extends the site design system. */

.audit-form .hint { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.audit-form button { width: 100%; justify-content: center; }

.audit-error {
	margin-top: 18px; padding: 14px 16px; border-radius: var(--radius-sm);
	background: #fdecec; border: 1px solid #f6c9c9; color: #8f1f1f;
	font-size: 15px; line-height: 1.55;
}
.audit-error a { color: #8f1f1f; font-weight: 700; }

.audit-progress {
	background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
	padding: 32px; box-shadow: var(--shadow-md);
}
.audit-progress h2 { font-size: 20px; margin-bottom: 18px; }
.audit-progress .bar {
	height: 10px; background: var(--bg-tint); border-radius: 999px; overflow: hidden;
	border: 1px solid var(--line);
}
.audit-progress .bar span {
	display: block; height: 100%; border-radius: 999px;
	background: linear-gradient(90deg, var(--blue-600), var(--red-500));
	transition: width .5s ease;
}
.audit-count { margin: 14px 0 6px; font-size: 15px; color: var(--body); }
.audit-count b { color: var(--blue-800); font-size: 17px; }

/* ---------- Report ---------------------------------------------------- */

.score-wrap { display: grid; grid-template-columns: auto 1fr; gap: 34px; align-items: center; }
.score-dial { position: relative; width: 168px; height: 168px; flex: 0 0 auto; }
.score-dial svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-dial .val {
	position: absolute; inset: 0; display: flex; flex-direction: column;
	align-items: center; justify-content: center; line-height: 1;
}
.score-dial .val b { font-size: 42px; font-weight: 800; color: var(--ink); letter-spacing: -.03em; }
.score-dial .val span { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; margin-top: 6px; }

.sev-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 26px; }
.sev {
	border: 1px solid var(--line); border-radius: var(--radius-sm);
	padding: 18px 20px; background: #fff;
}
.sev b { display: block; font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.sev span { display: block; font-size: 13px; color: var(--muted); margin-top: 8px; font-weight: 600; }
.sev.error b { color: #c4161c; }
.sev.warning b { color: #b4690e; }
.sev.notice b { color: var(--blue-700); }

.issue {
	border: 1px solid var(--line); border-radius: var(--radius);
	background: #fff; margin-bottom: 14px; overflow: hidden;
}
.issue > summary {
	cursor: pointer; padding: 18px 22px; display: flex; gap: 14px;
	align-items: baseline; list-style: none; font-weight: 700;
}
.issue > summary::-webkit-details-marker { display: none; }
.issue > summary:hover { background: var(--bg-tint); }
.issue .tag {
	font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em;
	padding: 4px 9px; border-radius: 5px; flex: 0 0 auto;
}
.tag.error { background: #fdecec; color: #a5161c; }
.tag.warning { background: #fdf3e3; color: #8a5108; }
.tag.notice { background: #eef3fb; color: var(--blue-700); }
.issue .n { margin-left: auto; color: var(--muted); font-weight: 700; font-size: 14px; flex: 0 0 auto; }
.issue .body { padding: 4px 22px 22px; border-top: 1px solid var(--line-soft); }
.issue .body p { font-size: 15px; margin: 14px 0 0; }
.issue .body .fix {
	background: var(--bg-tint); border-left: 3px solid var(--blue-600);
	padding: 12px 16px; border-radius: 0 8px 8px 0; margin-top: 14px;
}
.issue .body h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 20px 0 8px; }
.url-list { list-style: none; margin: 0; padding: 0; }
.url-list li {
	font-size: 13.5px; padding: 7px 0; border-bottom: 1px solid var(--line-soft);
	word-break: break-all;
}
.url-list li:last-child { border-bottom: 0; }
.url-list .detail { color: var(--muted); }

.psi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.psi-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: #fff; }
.psi-card h3 { font-size: 16px; margin-bottom: 14px; }
.psi-score { font-size: 40px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.psi-good { color: #0f7a52; }
.psi-avg { color: #b4690e; }
.psi-poor { color: #c4161c; }
.psi-metrics { list-style: none; margin: 16px 0 0; padding: 0; font-size: 14px; }
.psi-metrics li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); }
.psi-metrics li:last-child { border-bottom: 0; }
.psi-metrics b { font-weight: 700; color: var(--ink); }

.pages-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pages-table th, .pages-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); }
.pages-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.pages-table td.u { word-break: break-all; max-width: 420px; }
.pages-table .pill { font-weight: 700; }
.pages-table .ok { color: #0f7a52; }
.pages-table .bad { color: #c4161c; }

@media (max-width: 860px) {
	.score-wrap { grid-template-columns: 1fr; gap: 24px; }
	.psi-grid { grid-template-columns: 1fr; }
	.sev-row { grid-template-columns: 1fr; }
	.pages-table thead { display: none; }
	.pages-table tr { display: block; border-bottom: 1px solid var(--line); padding: 10px 0; }
	.pages-table td { display: flex; justify-content: space-between; border: 0; padding: 5px 0; }
	.pages-table td::before { content: attr(data-l); color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
	.pages-table td.u { max-width: none; }
}

@media print {
	.audit-form, .audit-progress, .no-print { display: none !important; }
	.issue { break-inside: avoid; border-color: #ccc; }
	.issue .body { display: block !important; }
	details.issue > summary { list-style: none; }
}

/* The audit form should sit at the top of its column, not float in the middle. */
#main .split, #main .split.wide-left { align-items: start; }

/* ---------- Thematic reports, priorities and change-since-last ---------- */

.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.theme { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px 20px; }
.theme-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.theme-label { font-weight: 700; font-size: 15px; color: var(--ink); }
.theme-top b { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.theme.good b { color: #0f7a52; }
.theme.avg  b { color: #b4690e; }
.theme.poor b { color: #c4161c; }
.theme-bar { height: 6px; border-radius: 999px; background: var(--bg-tint); margin: 12px 0 10px; overflow: hidden; }
.theme-bar span { display: block; height: 100%; border-radius: 999px; }
.theme.good .theme-bar span { background: #0f7a52; }
.theme.avg  .theme-bar span { background: #b4690e; }
.theme.poor .theme-bar span { background: #c4161c; }
.theme-meta { font-size: 13px; color: var(--muted); margin: 0; }

.priority-list { list-style: none; margin: 0; padding: 0; counter-reset: p; }
.priority-list li {
	display: flex; gap: 18px; align-items: flex-start;
	background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
	padding: 20px 22px; margin-bottom: 12px;
}
.priority-list .rank {
	flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px;
	background: var(--blue-800); color: #fff; font-weight: 800; font-size: 16px;
	display: flex; align-items: center; justify-content: center;
}
.priority-list h3 { font-size: 17px; margin: 2px 0 6px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.priority-list .meta { font-size: 13px; color: var(--muted); margin: 0 0 10px; font-weight: 600; }
.priority-list p { font-size: 15px; margin: 0; }

.delta-row { display: grid; grid-template-columns: 220px 1fr 1fr; gap: 24px; align-items: start; }
.delta {
	background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
	padding: 26px 22px; text-align: center;
}
.delta b { display: block; font-size: 44px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.delta span { display: block; font-size: 13px; color: var(--muted); margin-top: 10px; font-weight: 600; }
.delta.up b { color: #0f7a52; }
.delta.down b { color: #c4161c; }
.delta.flat b { color: var(--muted); }
.delta-list h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 12px; }
.crosses { list-style: none; margin: 0; padding: 0; }
.crosses li { position: relative; padding-left: 26px; margin-bottom: 9px; font-size: 15px; }
.crosses li::before {
	content: "\00d7"; position: absolute; left: 0; top: -1px;
	color: #c4161c; font-weight: 800; font-size: 17px;
}

@media (max-width: 860px) {
	.delta-row { grid-template-columns: 1fr; }
	.theme-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}
