/* SiteGrade public widget — intentionally neutral so it inherits the theme. */
.sgp-widget {
	max-width: 720px;
	margin: 0 auto;
}

.sgp-heading {
	margin-bottom: 0.25em;
}

.sgp-sub {
	opacity: 0.8;
	margin-top: 0;
}

.sgp-form {
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 12px;
	padding: 24px;
	background: rgba(0, 0, 0, 0.02);
}

.sgp-fields {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 14px;
	margin-bottom: 16px;
}

.sgp-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 0.9em;
	font-weight: 600;
}

.sgp-field input {
	padding: 10px 12px;
	border: 1px solid rgba(0, 0, 0, 0.2);
	border-radius: 8px;
	font: inherit;
	font-weight: 400;
	width: 100%;
	box-sizing: border-box;
}

.sgp-run {
	padding: 12px 28px;
	border: 0;
	border-radius: 8px;
	background: #1d2327;
	color: #fff;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.sgp-run:disabled {
	opacity: 0.6;
	cursor: wait;
}

.sgp-run:focus-visible {
	outline: 3px solid #7aa7ff;
	outline-offset: 2px;
}

.sgp-status {
	min-height: 1.4em;
	margin: 12px 0 0;
	font-size: 0.9em;
}

.sgp-privacy {
	margin: 8px 0 0;
	font-size: 0.8em;
	opacity: 0.65;
}

/* Results */
.sgp-results {
	margin-top: 28px;
}

.sgp-overall {
	display: flex;
	align-items: center;
	gap: 20px;
	margin-bottom: 20px;
}

.sgp-overall h3 {
	margin: 0 0 4px;
}

.sgp-overall p {
	margin: 0;
	opacity: 0.7;
	word-break: break-all;
}

.sgp-ring-grade {
	font-size: 24px;
	font-weight: 700;
	fill: currentColor;
}

.sgp-ring-score {
	font-size: 10px;
	fill: currentColor;
	opacity: 0.7;
}

.sgp-section {
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 10px;
	padding: 12px 16px;
	margin-bottom: 12px;
}

.sgp-section summary {
	display: flex;
	align-items: center;
	gap: 14px;
	cursor: pointer;
	list-style: none;
}

.sgp-section summary::-webkit-details-marker {
	display: none;
}

.sgp-section-title {
	font-weight: 700;
}

.sgp-checks {
	list-style: none;
	margin: 14px 0 0;
	padding: 0;
}

.sgp-checks li {
	display: flex;
	gap: 10px;
	padding: 8px 0;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
	font-size: 0.92em;
}

.sgp-badge {
	flex: 0 0 20px;
	height: 20px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	margin-top: 2px;
}

.sgp-pass .sgp-badge { background: #2e9e5b; }
.sgp-warn .sgp-badge { background: #d99a1b; }
.sgp-fail .sgp-badge { background: #cf3f3f; }
.sgp-info .sgp-badge { background: #8c8f94; }

/* ---- Action plan (public) ---- */
.sgp-plan {
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 10px;
	padding: 20px;
	margin-bottom: 20px;
}

.sgp-plan h3 {
	margin-top: 0;
}

.sgp-plan-summary {
	background: rgba(34, 113, 177, 0.07);
	border-left: 4px solid #2271b1;
	padding: 10px 14px;
	border-radius: 0 6px 6px 0;
	font-size: 0.95em;
}

.sgp-plan-clear {
	color: #2e9e5b;
	font-weight: 600;
}

.sgp-plan-list {
	margin: 0;
	padding-left: 22px;
}

.sgp-plan-item {
	margin-bottom: 20px;
	font-size: 0.93em;
}

.sgp-plan-item p {
	margin: 6px 0;
}

.sgp-plan-title {
	font-size: 1.05em;
}

.sgp-plan-tag {
	display: inline-block;
	padding: 1px 9px;
	margin-left: 6px;
	border-radius: 999px;
	font-size: 0.75em;
	font-weight: 700;
	background: rgba(46, 158, 91, 0.12);
	color: #2e9e5b;
	vertical-align: middle;
}

.sgp-plan-steps {
	margin: 4px 0 8px 20px;
}

.sgp-plan-steps li {
	margin-bottom: 4px;
}

.sgp-plan-when {
	background: rgba(0, 0, 0, 0.04);
	border-radius: 6px;
	padding: 8px 12px;
}

.sgp-plan-more {
	border-top: 1px dashed rgba(0, 0, 0, 0.15);
	padding-top: 14px;
	font-weight: 600;
}

/* ---- Progress tracker (public) ---- */
.sgp-progress {
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 10px;
	padding: 20px;
}

.sgp-progress h3 { margin-top: 0; }

.sgp-progress-bar {
	height: 8px;
	background: rgba(0, 0, 0, 0.08);
	border-radius: 999px;
	overflow: hidden;
	margin: 14px 0 16px;
}

.sgp-progress-fill {
	height: 100%;
	width: 0;
	background: #2e9e5b;
	border-radius: 999px;
	transition: width 0.4s ease;
}

.sgp-progress-steps {
	list-style: none;
	margin: 0;
	padding: 0;
}

.sgp-progress-steps li {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 0;
	font-size: 0.95em;
}

.sgp-step-icon {
	flex: 0 0 22px;
	height: 22px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
}

.sgp-step-done .sgp-step-icon { color: #2e9e5b; }
.sgp-step-error .sgp-step-icon { color: #cf3f3f; }

.sgp-step-result {
	margin-left: auto;
	font-weight: 700;
}

.sgp-spinner {
	width: 16px;
	height: 16px;
	border: 2px solid rgba(0, 0, 0, 0.15);
	border-top-color: #2e9e5b;
	border-radius: 50%;
	animation: sgp-spin 0.8s linear infinite;
	display: inline-block;
}

@keyframes sgp-spin {
	to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
	.sgp-spinner { animation: none; }
	.sgp-progress-fill { transition: none; }
}

/* ---- Report cleanup (public) ---- */
.sgp-minis {
	display: flex;
	gap: 14px;
	margin-top: 10px;
	flex-wrap: wrap;
}

.sgp-mini {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 3px;
	font-size: 0.7em;
	font-weight: 700;
	opacity: 0.85;
}

.sgp-mini .sgp-ring-grade { font-size: 13px; }
.sgp-mini .sgp-ring-score { display: none; }

.sgp-section-title {
	display: flex;
	flex-direction: column;
}

.sgp-section-sub {
	font-size: 0.8em;
	font-weight: 400;
	opacity: 0.7;
}

.sgp-passed > summary {
	cursor: pointer;
	color: #2e9e5b;
	font-weight: 600;
	font-size: 0.88em;
	padding: 8px 0 2px;
	list-style: none;
}

.sgp-passed > summary::-webkit-details-marker { display: none; }

/* ---- GBP candidate chooser (public) ---- */
.sgp-step-waiting .sgp-step-icon {
	color: #d99a1b;
	font-weight: 700;
}

.sgp-chooser {
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 10px;
	padding: 20px;
	margin-top: 16px;
}

.sgp-chooser h3 {
	margin-top: 0;
}

.sgp-chooser-options {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 14px 0 16px;
}

.sgp-chooser-option {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 8px;
	padding: 12px 14px;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.sgp-chooser-option:hover {
	border-color: #2e9e5b;
}

.sgp-chooser-option:has(input:checked) {
	border-color: #2e9e5b;
	background: rgba(46, 158, 91, 0.06);
}

.sgp-chooser-option input {
	margin-top: 3px;
}

.sgp-chooser-body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	font-size: 0.92em;
}

.sgp-chooser-meta {
	opacity: 0.7;
}

.sgp-chooser-none {
	border-style: dashed;
}

.sgp-chooser-btn {
	padding: 10px 24px;
	border: 0;
	border-radius: 8px;
	background: #1d2327;
	color: #fff;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.sgp-chooser-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.sgp-chooser-btn:focus-visible {
	outline: 3px solid #7aa7ff;
	outline-offset: 2px;
}

/* ---- Manual checklist (public) ---- */
.sgp-manual {
	margin-top: 12px;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
	padding-top: 8px;
}

.sgp-manual > summary {
	cursor: pointer;
	font-weight: 600;
	font-size: 0.88em;
	padding: 6px 0;
	list-style: none;
	opacity: 0.85;
}

.sgp-manual > summary::-webkit-details-marker { display: none; }

.sgp-manual h4 {
	margin: 14px 0 6px;
	font-size: 0.78em;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	opacity: 0.7;
}

.sgp-manual ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.sgp-manual li {
	padding: 5px 0 5px 26px;
	position: relative;
	font-size: 0.88em;
}

.sgp-manual li::before {
	content: "";
	position: absolute;
	left: 2px;
	top: 8px;
	width: 12px;
	height: 12px;
	border: 2px solid rgba(0, 0, 0, 0.25);
	border-radius: 3px;
}

/* ---- Citation claim links ---- */
.sgp-claim-link {
	display: inline-block;
	margin-left: 6px;
	padding: 1px 8px;
	border: 1px solid #2b7de9;
	border-radius: 999px;
	font-size: 12px;
	text-decoration: none;
	white-space: nowrap;
}

.sgp-error {
	background: #fdf0f0;
	border: 1px solid #e5a3a3;
	border-radius: 8px;
	padding: 16px;
	color: #7a1f1f;
}

/* ---- Chooser search ---- */
.sgp-chooser-search {
	display: flex;
	gap: 8px;
	margin: 12px 0;
}

.sgp-chooser-query {
	flex: 1;
	padding: 9px 12px;
	border: 1px solid #cdd4da;
	border-radius: 6px;
	font-size: 14px;
}

.sgp-chooser-search-btn {
	padding: 9px 16px;
	border: 1px solid #2b7de9;
	background: #fff;
	color: #2b7de9;
	border-radius: 6px;
	cursor: pointer;
	font-size: 14px;
}

/* ---- How-to-fix accordions on check rows ---- */
.sgp-fix {
	margin-top: 6px;
}

.sgp-fix > summary {
	cursor: pointer;
	font-size: 12px;
	font-weight: 600;
	color: #2b7de9;
	width: fit-content;
}

.sgp-fix-body {
	margin: 8px 0 4px;
	padding: 10px 14px;
	background: #f5f8fc;
	border-left: 3px solid #2b7de9;
	border-radius: 0 6px 6px 0;
	font-size: 13px;
}

.sgp-fix-body ol {
	margin: 6px 0 6px 18px;
	padding: 0;
}

.sgp-fix-body li {
	margin-bottom: 4px;
}

.sgp-fix-why {
	margin: 0 0 6px;
}

.sgp-fix-meta {
	margin: 6px 0 0;
	color: #667;
	font-size: 12px;
}
