/* Pure SEO Audit — frontend styles (scoped to .psa-tool) */
.psa-tool {
	--psa-primary: #1769ff;
	--psa-accent: #0b1f3a;
	--psa-good: #16a34a;
	--psa-warn: #d97706;
	--psa-bad: #dc2626;
	--psa-bg: #ffffff;
	--psa-muted: #5b6472;
	--psa-border: #e6e9ef;
	max-width: 720px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--psa-accent);
	line-height: 1.5;
	box-sizing: border-box;
}
.psa-tool *,
.psa-tool *::before,
.psa-tool *::after { box-sizing: border-box; }

.psa-card {
	background: var(--psa-bg);
	border: 1px solid var(--psa-border);
	border-radius: 16px;
	padding: 32px;
	box-shadow: 0 10px 40px rgba( 11, 31, 58, 0.06 );
}

.psa-logo { max-height: 48px; width: auto; margin-bottom: 16px; }
.psa-heading { font-size: 1.6rem; margin: 0 0 8px; line-height: 1.2; }
.psa-subheading { margin: 0 0 24px; color: #5b6472; font-size: 1.02rem; }

.psa-field { margin-bottom: 16px; text-align: left; }
.psa-field label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 6px; }
.psa-field input {
	width: 100%;
	padding: 14px 16px;
	font-size: 1rem;
	border: 1px solid var(--psa-border);
	border-radius: 10px;
	background: #fff;
	color: var(--psa-accent);
}
.psa-field input:focus {
	outline: none;
	border-color: var(--psa-primary);
	box-shadow: 0 0 0 3px rgba( 23, 105, 255, 0.15 );
}

.psa-hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

.psa-consent {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	font-size: 0.85rem;
	color: #5b6472;
	margin: 4px 0 20px;
	text-align: left;
}
.psa-consent input { margin-top: 3px; }

.psa-submit {
	display: block;
	width: 100%;
	padding: 16px 24px;
	font-size: 1.05rem;
	font-weight: 700;
	color: #fff;
	background: var(--psa-primary);
	border: 0;
	border-radius: 10px;
	cursor: pointer;
	transition: transform 0.05s ease, filter 0.15s ease;
}
.psa-submit:hover { filter: brightness( 1.05 ); }
.psa-submit:active { transform: translateY( 1px ); }

.psa-error { color: var(--psa-bad); font-size: 0.9rem; margin: 12px 0 0; min-height: 1em; }

/* Loading */
.psa-loading { text-align: center; }
.psa-spinner {
	width: 52px; height: 52px;
	margin: 0 auto 20px;
	border: 5px solid var(--psa-border);
	border-top-color: var(--psa-primary);
	border-radius: 50%;
	animation: psa-spin 0.9s linear infinite;
}
@keyframes psa-spin { to { transform: rotate( 360deg ); } }
.psa-loading h3 { margin: 0 0 8px; font-size: 1.25rem; }
.psa-loading-step { margin: 0 0 4px; font-weight: 600; color: var(--psa-primary); }
.psa-loading-note { margin: 0; font-size: 0.85rem; color: #5b6472; }

/* Results */
.psa-overall {
	display: flex;
	align-items: center;
	gap: 24px;
	flex-wrap: wrap;
	margin-bottom: 24px;
}
.psa-gauge { width: 140px; height: 140px; flex: 0 0 auto; }
.psa-gauge-bg { fill: none; stroke: var(--psa-border); stroke-width: 12; }
.psa-gauge-fg { fill: none; stroke-width: 12; stroke-linecap: round; transition: stroke-dashoffset 0.8s ease; }
.psa-gauge-grade { font-size: 30px; font-weight: 800; fill: var(--psa-accent); }
.psa-gauge-num { font-size: 13px; fill: #5b6472; }
.psa-g-a .psa-gauge-fg, .psa-g-a .psa-bar-fill { stroke: var(--psa-good); background: var(--psa-good); }
.psa-g-b .psa-gauge-fg, .psa-g-b .psa-bar-fill { stroke: #65a30d; background: #65a30d; }
.psa-g-c .psa-gauge-fg, .psa-g-c .psa-bar-fill { stroke: var(--psa-warn); background: var(--psa-warn); }
.psa-g-f .psa-gauge-fg, .psa-g-f .psa-bar-fill { stroke: var(--psa-bad); background: var(--psa-bad); }

.psa-overall-text { flex: 1 1 220px; text-align: left; }
.psa-overall-label { margin: 0; font-size: 0.85rem; color: #5b6472; text-transform: uppercase; letter-spacing: 0.04em; }
.psa-overall-host { margin: 2px 0 8px; font-size: 1.3rem; font-weight: 700; word-break: break-word; }
.psa-overall-sub { margin: 0; font-size: 0.95rem; color: #5b6472; }

.psa-cats { display: flex; flex-direction: column; gap: 10px; }
.psa-cat { border: 1px solid var(--psa-border); border-radius: 12px; overflow: hidden; }
.psa-cat summary {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 18px;
	cursor: pointer;
	list-style: none;
	font-weight: 600;
}
.psa-cat summary::-webkit-details-marker { display: none; }
.psa-cat-grade {
	flex: 0 0 auto;
	width: 38px; height: 38px;
	border-radius: 9px;
	display: flex; align-items: center; justify-content: center;
	font-weight: 800;
	color: #fff;
}
.psa-g-a .psa-cat-grade { background: var(--psa-good); }
.psa-g-b .psa-cat-grade { background: #65a30d; }
.psa-g-c .psa-cat-grade { background: var(--psa-warn); }
.psa-g-f .psa-cat-grade { background: var(--psa-bad); }
.psa-cat-label { flex: 0 0 130px; }
.psa-bar { flex: 1 1 auto; height: 8px; background: var(--psa-border); border-radius: 999px; overflow: hidden; }
.psa-bar-fill { display: block; height: 100%; border-radius: 999px; transition: width 0.6s ease; }
.psa-cat-score { flex: 0 0 auto; font-size: 0.9rem; color: #5b6472; min-width: 56px; text-align: right; }

.psa-checks { list-style: none; margin: 0; padding: 0 18px 14px; }
.psa-check { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--psa-border); text-align: left; }
.psa-check-icon {
	flex: 0 0 auto;
	width: 22px; height: 22px;
	border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	font-size: 0.8rem; font-weight: 700; color: #fff;
}
.psa-good .psa-check-icon { background: var(--psa-good); }
.psa-warn .psa-check-icon { background: var(--psa-warn); }
.psa-bad .psa-check-icon { background: var(--psa-bad); }
.psa-check-body strong { display: block; font-size: 0.95rem; }
.psa-check-body span { font-size: 0.88rem; color: #5b6472; }

.psa-cta {
	margin-top: 24px;
	padding: 24px;
	border-radius: 12px;
	background: var(--psa-accent);
	color: #fff;
	text-align: center;
}
.psa-cta p { margin: 0 0 14px; font-size: 1.02rem; }
.psa-cta-btn {
	display: inline-block;
	padding: 14px 28px;
	background: var(--psa-primary);
	color: #fff !important;
	font-weight: 700;
	border-radius: 10px;
	text-decoration: none;
}
.psa-cta-btn:hover { filter: brightness( 1.06 ); }

.psa-restart {
	display: block;
	margin: 18px auto 0;
	background: none;
	border: 0;
	color: var(--psa-primary);
	font-weight: 600;
	cursor: pointer;
	text-decoration: underline;
}

/* Recommendations panel */
.psa-recs {
	margin: 0 0 24px;
	border: 1px solid var(--psa-border);
	border-radius: 12px;
	padding: 18px 20px;
	background: #f8fafc;
}
.psa-recs h3 { margin: 0 0 12px; font-size: 1.1rem; }
.psa-recs h3 span { color: #5b6472; font-weight: 500; }
.psa-recs ul { list-style: none; margin: 0; padding: 0; }
.psa-rec { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--psa-border); text-align: left; }
.psa-rec:first-child { border-top: 0; }
.psa-rec-pri {
	flex: 0 0 auto;
	align-self: flex-start;
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	padding: 3px 8px;
	border-radius: 6px;
	color: #fff;
	min-width: 48px;
	text-align: center;
}
.psa-pri-high { background: var(--psa-bad); }
.psa-pri-low { background: var(--psa-warn); }
.psa-rec-body strong { display: block; font-size: 0.95rem; }
.psa-rec-body em { font-style: normal; font-size: 0.78rem; color: var(--psa-primary); font-weight: 600; }
.psa-rec-body span { display: block; font-size: 0.86rem; color: #5b6472; }

/* Info sections (Technology, Local SEO) */
.psa-section summary { justify-content: space-between; }
.psa-section-tag {
	margin-left: auto;
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	color: #5b6472;
	background: var(--psa-border);
	padding: 3px 8px;
	border-radius: 6px;
}

@media ( max-width: 540px ) {
	.psa-card { padding: 22px; }
	.psa-cat-label { flex-basis: 90px; }
	.psa-bar { display: none; }
}
