/* SiteGrade – Website Audit
 * All rules are scoped under .sg-root to avoid clashing with themes.
 */
.sg-root {
	--sg-accent: #6366f1;
	--sg-ink: #0f172a;
	--sg-ink-2: #334155;
	--sg-muted: #64748b;
	--sg-line: #e2e8f0;
	--sg-soft: #f8fafc;
	--sg-card: #ffffff;
	--sg-night: #0b1020;
	--sg-night-2: #121a33;
	--sg-A: #10b981;
	--sg-B: #84cc16;
	--sg-C: #f59e0b;
	--sg-D: #f97316;
	--sg-F: #ef4444;
	--sg-good: #10b981;
	--sg-warn: #f59e0b;
	--sg-bad: #ef4444;
	--sg-radius: 18px;
	--sg-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 30px rgba(15, 23, 42, .06);
	font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--sg-ink);
	line-height: 1.5;
	max-width: 1040px;
	margin: 0 auto;
	-webkit-font-smoothing: antialiased;
}
.sg-root *, .sg-root *::before, .sg-root *::after { box-sizing: border-box; }
.sg-root h2, .sg-root h3, .sg-root h4, .sg-root p, .sg-root ul, .sg-root ol { margin: 0; padding: 0; }
.sg-root ul, .sg-root ol { list-style: none; }
.sg-root button, .sg-root input { font: inherit; letter-spacing: normal; text-transform: none; }
.sg-root svg { display: block; }
.sg-root [hidden] { display: none !important; }

/* ---------------- Hero ---------------- */
.sg-hero {
	position: relative;
	overflow: hidden;
	background: radial-gradient(120% 140% at 50% 0%, var(--sg-night-2) 0%, var(--sg-night) 60%);
	border-radius: 24px;
	padding: 56px 28px 44px;
	text-align: center;
	color: #fff;
	isolation: isolate;
}
.sg-hero-glow {
	position: absolute; inset: -40% -10% auto; height: 120%;
	background:
		radial-gradient(40% 50% at 30% 30%, color-mix(in srgb, var(--sg-accent) 55%, transparent), transparent 70%),
		radial-gradient(35% 45% at 75% 20%, rgba(16, 185, 129, .25), transparent 70%);
	filter: blur(30px); opacity: .7; z-index: -1;
	animation: sg-drift 14s ease-in-out infinite alternate;
}
@keyframes sg-drift { to { transform: translate3d(4%, 6%, 0) scale(1.08); } }
.sg-logo { max-height: 40px; max-width: 200px; margin: 0 auto 22px; display: block; }
.sg-eyebrow {
	display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
	color: #c7d2fe; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12);
	padding: 6px 12px; border-radius: 999px;
}
.sg-root .sg-title {
	font-size: clamp(28px, 4.6vw, 46px); line-height: 1.1; font-weight: 800; letter-spacing: -.02em;
	margin: 18px auto 12px; max-width: 760px; color: #fff;
}
.sg-root .sg-sub { color: #cbd5e1; font-size: clamp(15px, 1.8vw, 18px); max-width: 620px; margin: 0 auto 28px; }

.sg-form {
	display: flex; gap: 10px; max-width: 640px; margin: 0 auto;
	background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14);
	padding: 8px; border-radius: 16px; backdrop-filter: blur(8px);
}
.sg-input-wrap { position: relative; flex: 1; min-width: 0; }
.sg-input-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; fill: #94a3b8; }
.sg-root .sg-input {
	width: 100%; height: 54px; border: 0; outline: 0; border-radius: 11px;
	background: #fff; color: var(--sg-ink); padding: 0 16px 0 44px; font-size: 16px; box-shadow: none; margin: 0;
}
.sg-root .sg-input:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--sg-accent) 45%, transparent); }
.sg-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

.sg-root .sg-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	height: 54px; padding: 0 24px; border: 0; border-radius: 11px; cursor: pointer;
	font-size: 16px; font-weight: 700; white-space: nowrap; text-decoration: none; line-height: 1;
	transition: transform .15s ease, box-shadow .2s ease, filter .2s ease, opacity .2s;
}
.sg-root .sg-btn svg { width: 18px; height: 18px; fill: currentColor; }
.sg-root .sg-btn-primary {
	background: var(--sg-accent); color: #fff;
	box-shadow: 0 8px 24px color-mix(in srgb, var(--sg-accent) 45%, transparent);
}
.sg-root .sg-btn-primary:hover { transform: translateY(-1px); filter: brightness(1.08); color: #fff; }
.sg-root .sg-btn[disabled] { opacity: .65; cursor: progress; transform: none; }
.sg-root .sg-btn-ghost { background: transparent; color: var(--sg-ink-2); border: 1px solid var(--sg-line); height: 44px; font-size: 14px; }
.sg-root .sg-btn-ghost:hover { background: var(--sg-soft); }

.sg-form-error { color: #fecaca; margin-top: 14px; font-size: 14px; }
.sg-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 26px !important; }
.sg-pills li { font-size: 13px; color: #cbd5e1; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); padding: 6px 12px; border-radius: 999px; }

.sg-root.is-running .sg-hero { padding: 28px 24px; }
.sg-root.is-running .sg-sub, .sg-root.is-running .sg-pills, .sg-root.is-running .sg-eyebrow { display: none; }
.sg-root.is-running .sg-title { font-size: 22px; margin: 0 auto 16px; }

/* ---------------- Report ---------------- */
.sg-report { margin-top: 24px; display: grid; gap: 20px; }

.sg-card {
	background: var(--sg-card); border: 1px solid var(--sg-line); border-radius: var(--sg-radius);
	box-shadow: var(--sg-shadow); position: relative; overflow: hidden;
}

/* Status bar */
.sg-status { padding: 18px 22px; display: grid; gap: 12px; }
.sg-status-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sg-status-domain { font-weight: 800; font-size: 18px; word-break: break-all; }
.sg-status-label { color: var(--sg-muted); font-size: 14px; }
.sg-status-time { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--sg-muted); font-size: 14px; display: flex; align-items: center; gap: 6px; }
.sg-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sg-accent); box-shadow: 0 0 0 0 var(--sg-accent); animation: sg-pulse 1.6s infinite; }
.sg-status.is-done .sg-live-dot { background: var(--sg-A); animation: none; }
@keyframes sg-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--sg-accent) 60%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
.sg-bar { height: 8px; border-radius: 999px; background: #eef2f7; overflow: hidden; }
.sg-bar > i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--sg-accent), color-mix(in srgb, var(--sg-accent) 50%, #22d3ee)); transition: width .6s ease; }

/* Overall */
.sg-overall { padding: 28px; display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; }
.sg-overall-ring { position: relative; width: 168px; height: 168px; }
.sg-overall-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.sg-ring-track { stroke: #eef2f7; }
.sg-ring-val { stroke: var(--sg-grade, var(--sg-accent)); stroke-linecap: round; transition: stroke-dashoffset 1.2s cubic-bezier(.2, .8, .2, 1), stroke .4s; }
.sg-overall-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.sg-overall-grade { font-size: 52px; font-weight: 900; line-height: 1; color: var(--sg-grade, var(--sg-ink)); letter-spacing: -.03em; }
.sg-overall-score { font-size: 14px; color: var(--sg-muted); margin-top: 4px; font-variant-numeric: tabular-nums; }
.sg-overall h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: var(--sg-muted); font-weight: 700; }
.sg-overall-verdict { font-size: clamp(20px, 2.6vw, 26px); font-weight: 800; letter-spacing: -.01em; margin: 6px 0 14px !important; line-height: 1.25; }
.sg-mini-grades { display: flex; flex-wrap: wrap; gap: 8px; }
.sg-mini {
	display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px;
	border: 1px solid var(--sg-line); border-radius: 10px; font-size: 13px; color: var(--sg-ink-2); background: #fff;
	cursor: pointer; transition: border-color .2s, transform .15s;
}
.sg-mini:hover { border-color: var(--sg-accent); transform: translateY(-1px); }
.sg-mini b { min-width: 30px; height: 24px; display: grid; place-content: center; border-radius: 7px; color: #fff; font-size: 12px; background: #cbd5e1; }
.sg-mini.is-pending b { background: #e2e8f0; color: transparent; position: relative; }
.sg-mini.is-pending b::after { content: ""; position: absolute; inset: 6px 9px; border: 2px solid #94a3b8; border-right-color: transparent; border-radius: 50%; animation: sg-spin .8s linear infinite; }
@keyframes sg-spin { to { transform: rotate(360deg); } }

/* Grade colors */
[data-grade^="A"] { --sg-grade: var(--sg-A); }
[data-grade^="B"] { --sg-grade: var(--sg-B); }
[data-grade^="C"] { --sg-grade: var(--sg-C); }
[data-grade^="D"] { --sg-grade: var(--sg-D); }
[data-grade^="F"] { --sg-grade: var(--sg-F); }
.sg-mini[data-grade] b, .sg-badge[data-grade] { background: var(--sg-grade); }

/* Section card */
.sg-section { border-top: 0; }
.sg-section::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--sg-grade, #e2e8f0); transition: background .4s; }
.sg-sec-head { display: flex; align-items: center; gap: 14px; padding: 22px 24px 0; }
.sg-sec-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-content: center; flex: none; background: color-mix(in srgb, var(--sg-accent) 10%, #fff); color: var(--sg-accent); }
.sg-sec-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sg-sec-title { font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.sg-sec-sub { font-size: 13px; color: var(--sg-muted); }
.sg-sec-grade { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.sg-sec-score { text-align: right; font-size: 12px; color: var(--sg-muted); line-height: 1.2; font-variant-numeric: tabular-nums; }
.sg-sec-score strong { display: block; font-size: 20px; color: var(--sg-ink); }
.sg-badge {
	width: 62px; height: 62px; border-radius: 16px; display: grid; place-content: center;
	color: #fff; font-weight: 900; font-size: 26px; letter-spacing: -.02em; background: #cbd5e1;
	box-shadow: 0 8px 20px color-mix(in srgb, var(--sg-grade, #94a3b8) 40%, transparent);
}
.sg-badge.is-in { animation: sg-pop .55s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes sg-pop { 0% { transform: scale(.4) rotate(-12deg); opacity: 0; } 100% { transform: none; opacity: 1; } }

.sg-root .sg-sec-summary { padding: 12px 24px 0; color: var(--sg-ink-2); font-size: 15px; }
.sg-sec-body { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; padding: 20px 24px 8px; }

/* Loader inside a section */
.sg-loader { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; padding: 22px 24px 26px; }
.sg-load-ring { position: relative; width: 96px; height: 96px; }
.sg-load-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.sg-load-ring .sg-ring-val { stroke: var(--sg-accent); transition: stroke-dashoffset .35s linear; }
.sg-load-pct { position: absolute; inset: 0; display: grid; place-content: center; font-weight: 800; font-size: 22px; font-variant-numeric: tabular-nums; }
.sg-load-pct small { font-size: 12px; font-weight: 700; color: var(--sg-muted); }
.sg-load-msg { font-weight: 600; font-size: 15px; min-height: 22px; transition: opacity .25s; }
.sg-load-msg.is-fading { opacity: 0; }
.sg-load-stats { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 10px; font-size: 13px; color: var(--sg-muted); font-variant-numeric: tabular-nums; }
.sg-load-stats b { color: var(--sg-ink); }
.sg-skel { height: 10px; border-radius: 6px; margin-top: 12px; background: linear-gradient(90deg, #eef2f7 0%, #f8fafc 50%, #eef2f7 100%); background-size: 200% 100%; animation: sg-shimmer 1.4s infinite; }
.sg-skel.w60 { width: 60%; } .sg-skel.w80 { width: 80%; } .sg-skel.w40 { width: 40%; }
@keyframes sg-shimmer { to { background-position: -200% 0; } }

/* Metrics */
.sg-metrics { display: grid; gap: 0; align-content: start; }
.sg-metric { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 11px 0; border-bottom: 1px dashed var(--sg-line); }
.sg-metric:last-child { border-bottom: 0; }
.sg-dot { width: 10px; height: 10px; border-radius: 50%; background: #cbd5e1; }
.sg-dot.good { background: var(--sg-good); } .sg-dot.warn { background: var(--sg-warn); } .sg-dot.bad { background: var(--sg-bad); }
.sg-metric-label { font-size: 14px; color: var(--sg-ink-2); }
.sg-metric-hint { display: block; font-size: 12px; color: var(--sg-muted); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 340px; }
.sg-metric-val { font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; text-align: right; }

/* Extras */
.sg-extra { background: var(--sg-soft); border-radius: 14px; padding: 16px 18px; align-self: start; }
.sg-extra-note { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--sg-muted); font-weight: 700; margin-bottom: 12px !important; }
.sg-gauges { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.sg-gauge { display: flex; align-items: center; gap: 10px; }
.sg-gauge-ring { position: relative; width: 56px; height: 56px; flex: none; }
.sg-gauge-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.sg-gauge-ring span { position: absolute; inset: 0; display: grid; place-content: center; font-weight: 800; font-size: 15px; }
.sg-gauge-label { font-size: 13px; color: var(--sg-ink-2); font-weight: 600; line-height: 1.2; }

.sg-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
.sg-check { display: flex; gap: 8px; font-size: 13px; color: var(--sg-ink-2); align-items: flex-start; line-height: 1.35; }
.sg-check i { flex: none; width: 18px; height: 18px; border-radius: 50%; display: grid; place-content: center; font-style: normal; font-size: 11px; font-weight: 900; color: #fff; margin-top: 1px; }
.sg-check.ok i { background: var(--sg-good); } .sg-check.no i { background: var(--sg-bad); }

.sg-bars { display: grid; gap: 9px; }
.sg-barrow { display: grid; grid-template-columns: 56px 1fr 60px; gap: 10px; align-items: center; font-size: 13px; }
.sg-barrow span:last-child { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.sg-barrow .sg-bar { height: 10px; background: #e7ecf3; }
.sg-barrow .sg-bar > i { transition: width 1s cubic-bezier(.2, .8, .2, 1); }

.sg-kwtable { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 14px; }
.sg-kwtable th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--sg-muted); font-weight: 700; padding: 6px 0; border-bottom: 1px solid var(--sg-line); background: none; }
.sg-kwtable td { padding: 7px 0; border-bottom: 1px solid #eef2f7; background: none; }
.sg-kwtable th:not(:first-child), .sg-kwtable td:not(:first-child) { text-align: right; padding-left: 10px; white-space: nowrap; }
.sg-pos { display: inline-block; min-width: 30px; text-align: center; padding: 2px 6px; border-radius: 6px; font-weight: 700; font-size: 12px; background: #e2e8f0; }
.sg-pos.top3 { background: color-mix(in srgb, var(--sg-A) 18%, #fff); color: #047857; }
.sg-pos.top10 { background: color-mix(in srgb, var(--sg-B) 22%, #fff); color: #3f6212; }

.sg-platforms { display: grid; gap: 10px; margin-bottom: 14px; }
.sg-platform { display: flex; align-items: center; justify-content: space-between; background: #fff; border: 1px solid var(--sg-line); border-radius: 10px; padding: 10px 12px; font-size: 14px; font-weight: 600; }
.sg-tag { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.sg-tag.yes { background: color-mix(in srgb, var(--sg-A) 16%, #fff); color: #047857; }
.sg-tag.no { background: color-mix(in srgb, var(--sg-F) 12%, #fff); color: #b91c1c; }
.sg-tag.na { background: #f1f5f9; color: var(--sg-muted); }
.sg-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sg-chip { font-size: 12px; background: #fff; border: 1px solid var(--sg-line); padding: 4px 9px; border-radius: 999px; }
.sg-empty { font-size: 13px; color: var(--sg-muted); }

/* Recommendations */
.sg-recs { margin: 8px 24px 22px; border-top: 1px solid var(--sg-line); padding-top: 4px; }
.sg-recs summary {
	list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 12px 0 8px;
	font-weight: 700; font-size: 14px; color: var(--sg-accent);
}
.sg-recs summary::-webkit-details-marker { display: none; }
.sg-recs summary::after { content: "▾"; transition: transform .2s; font-size: 12px; }
.sg-recs[open] summary::after { transform: rotate(180deg); }
.sg-recs ol { counter-reset: sgr; display: grid; gap: 8px; padding-bottom: 4px; }
.sg-recs li { counter-increment: sgr; display: grid; grid-template-columns: 24px 1fr; gap: 10px; font-size: 14px; color: var(--sg-ink-2); }
.sg-recs li::before { content: counter(sgr); width: 22px; height: 22px; border-radius: 7px; background: color-mix(in srgb, var(--sg-accent) 12%, #fff); color: var(--sg-accent); font-weight: 800; font-size: 12px; display: grid; place-content: center; }

/* Error state */
.sg-error { padding: 20px 24px 24px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.sg-error p { flex: 1; min-width: 200px; color: #b91c1c; font-size: 14px; }

/* Email capture */
.sg-email { padding: 32px 28px; text-align: center; background: linear-gradient(160deg, var(--sg-night-2), var(--sg-night)); color: #fff; border: 0; }
.sg-email h3 { font-size: clamp(20px, 2.6vw, 26px); font-weight: 800; color: #fff; letter-spacing: -.01em; }
.sg-email > p { color: #cbd5e1; margin: 8px auto 20px !important; max-width: 520px; }
.sg-email-form { display: flex; flex-wrap: wrap; gap: 10px; max-width: 620px; margin: 0 auto; }
.sg-root .sg-email-form .sg-input { padding-left: 16px; flex: 1 1 180px; width: auto; }
.sg-email-form .sg-input[name="email"] { flex: 2 1 220px; }
.sg-email-note { font-size: 12px; color: #94a3b8; margin-top: 12px !important; }
.sg-email-msg { margin-top: 12px !important; font-weight: 600; }
.sg-email-msg.ok { color: #6ee7b7; } .sg-email-msg.err { color: #fecaca; }
.sg-email.is-locked { opacity: .55; pointer-events: none; }

.sg-cta { padding: 26px 28px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.sg-root .sg-cta p { flex: 1; min-width: 240px; font-size: 17px; font-weight: 700; }
.sg-again { text-align: center; }

.sg-fade-in { animation: sg-fade .5s ease both; }
@keyframes sg-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------------- Business profile ---------------- */
.sg-profile { overflow: visible; }
.sg-profile::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; border-radius: var(--sg-radius) var(--sg-radius) 0 0; background: linear-gradient(90deg, var(--sg-accent), #22d3ee); }
.sg-loader.is-compact { padding: 18px 24px 22px; }
.sg-loader.is-compact .sg-load-ring { width: 72px; height: 72px; }
.sg-loader.is-compact .sg-load-pct { font-size: 17px; }
.sg-prof-body { display: grid; grid-template-columns: 1fr 1.1fr; gap: 24px; padding: 16px 24px 22px; }
.sg-prof-name { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.sg-pchips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 12px; }
.sg-pchip { display: inline-flex; flex-direction: column; padding: 7px 12px; border-radius: 10px; background: color-mix(in srgb, var(--sg-accent) 9%, #fff); border: 1px solid color-mix(in srgb, var(--sg-accent) 22%, #fff); font-weight: 700; font-size: 15px; text-transform: capitalize; }
.sg-pchip small { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--sg-muted); }
.sg-root .sg-prof-sum { color: var(--sg-ink-2); font-size: 14px; }
.sg-prof-services { margin-top: 10px; }
.sg-root .sg-link { background: none; border: 0; padding: 0; margin-top: 12px; color: var(--sg-accent); font-weight: 600; font-size: 13px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.sg-prof-q { background: var(--sg-soft); border-radius: 14px; padding: 16px 18px; align-self: start; }
.sg-prof-q ol { counter-reset: q; display: grid; gap: 8px; }
.sg-prof-q li { counter-increment: q; display: grid; grid-template-columns: 22px 1fr; gap: 8px; font-size: 14px; font-weight: 600; color: var(--sg-ink); }
.sg-prof-q li::before { content: counter(q); width: 22px; height: 22px; border-radius: 50%; background: var(--sg-ink); color: #fff; font-size: 11px; display: grid; place-content: center; }
.sg-prof-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 0 24px 22px; padding: 16px; border: 1px dashed color-mix(in srgb, var(--sg-accent) 45%, #fff); border-radius: 14px; background: color-mix(in srgb, var(--sg-accent) 4%, #fff); }
.sg-prof-form label { flex: 1 1 200px; display: grid; gap: 6px; font-size: 13px; font-weight: 700; color: var(--sg-ink-2); }
.sg-root .sg-prof-form .sg-input { height: 46px; padding-left: 14px; border: 1px solid var(--sg-line); }
.sg-root .sg-prof-form .sg-btn { height: 46px; font-size: 14px; }
.sg-root .sg-prof-need { flex-basis: 100%; font-weight: 600; color: var(--sg-ink); }
.sg-root .sg-prof-err { flex-basis: 100%; color: #b91c1c; font-size: 13px; }

.sg-waiting { display: flex; align-items: center; gap: 14px; padding: 22px 24px 26px; color: var(--sg-muted); font-size: 15px; }
.sg-spin { width: 28px; height: 28px; flex: none; border-radius: 50%; border: 3px solid #e2e8f0; border-top-color: var(--sg-accent); animation: sg-spin .9s linear infinite; }
.sg-spin.is-idle { animation: none; border-color: var(--sg-warn); }

/* ---------------- AI grid ---------------- */
.sg-sec-body.is-stack { grid-template-columns: 1fr; }
.sg-ai-split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; }
.sg-aigrid-wrap { overflow-x: auto; border: 1px solid var(--sg-line); border-radius: 14px; }
.sg-aigrid { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 520px; }
.sg-aigrid th { background: var(--sg-soft); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--sg-muted); font-weight: 700; padding: 10px 12px; text-align: center; border-bottom: 1px solid var(--sg-line); }
.sg-aigrid th:first-child { text-align: left; }
.sg-aigrid td { padding: 12px; border-bottom: 1px solid #eef2f7; text-align: center; background: #fff; }
.sg-aigrid tr:last-child td { border-bottom: 0; }
.sg-aigrid td.sg-q { text-align: left; font-weight: 600; color: var(--sg-ink); }
.sg-cell { display: inline-grid; place-content: center; width: 30px; height: 30px; border-radius: 9px; font-weight: 900; font-size: 14px; font-style: normal; color: #fff; background: #cbd5e1; }
.sg-cell.s-both, .sg-cell.s-mentioned { background: var(--sg-good); }
.sg-cell.s-cited { background: var(--sg-warn); }
.sg-cell.s-none { background: color-mix(in srgb, var(--sg-bad) 14%, #fff); color: var(--sg-bad); }
.sg-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; font-size: 12px; color: var(--sg-muted); }
.sg-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sg-legend .sg-cell { width: 20px; height: 20px; font-size: 11px; border-radius: 6px; }
.sg-quotes { display: grid; gap: 8px; margin-top: 14px; }
.sg-root .sg-quotes blockquote { margin: 0; padding: 10px 14px; border-left: 3px solid var(--sg-good); background: color-mix(in srgb, var(--sg-good) 6%, #fff); border-radius: 0 10px 10px 0; font-size: 13px; color: var(--sg-ink-2); font-style: normal; }
.sg-bars.is-wide .sg-barrow { grid-template-columns: minmax(0, 150px) 1fr 32px; }
.sg-barrow span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-root .sg-pre { margin: 0; padding: 10px 12px; background: #0f172a; color: #e2e8f0; border-radius: 10px; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; word-break: break-word; max-height: 180px; overflow: auto; }

@media (max-width: 760px) {
	.sg-prof-body { grid-template-columns: 1fr; padding: 14px 18px 18px; }
	.sg-prof-form { margin: 0 18px 18px; }
	.sg-root .sg-prof-form .sg-btn { width: 100%; }
	.sg-ai-split { grid-template-columns: 1fr; }
	.sg-waiting { padding: 18px; }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 760px) {
	.sg-hero { padding: 40px 18px 32px; border-radius: 18px; }
	.sg-form { flex-direction: column; }
	.sg-root .sg-btn-primary { width: 100%; }
	.sg-overall { grid-template-columns: 1fr; text-align: center; justify-items: center; padding: 24px 18px; }
	.sg-mini-grades { justify-content: center; }
	.sg-sec-head { padding: 20px 18px 0; flex-wrap: wrap; }
	.sg-root .sg-sec-summary { padding: 12px 18px 0; }
	.sg-sec-body { grid-template-columns: 1fr; padding: 16px 18px 6px; }
	.sg-recs { margin: 6px 18px 18px; }
	.sg-loader { padding: 18px; gap: 16px; }
	.sg-load-ring { width: 80px; height: 80px; }
	.sg-checks { grid-template-columns: 1fr; }
	.sg-metric-hint { max-width: 220px; }
	.sg-badge { width: 54px; height: 54px; font-size: 22px; }
	.sg-email { padding: 26px 18px; }
	.sg-root .sg-email-form .sg-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.sg-root *, .sg-root *::before, .sg-root *::after { animation: none !important; transition: none !important; }
}

/* Unverified check (firewall blocked) */
.sg-root .sg-check.unk i { background: #94a3b8; }
.sg-root .sg-check.unk { color: var(--sg-muted); }

/* Captcha slot (Turnstile shows here only if the visitor must click) */
.sg-captcha { display: flex; justify-content: center; margin-top: 12px; min-height: 0; }
.sg-captcha:empty { margin: 0; }

/* Broken backlinks table */
.sg-broken { padding: 4px 24px 6px; }
.sg-bltable { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 560px; }
.sg-bltable th { background: var(--sg-soft); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--sg-muted); font-weight: 700; padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--sg-line); }
.sg-bltable td { padding: 9px 12px; border-bottom: 1px solid #eef2f7; background: #fff; vertical-align: top; }
.sg-bltable tr:last-child td { border-bottom: 0; }
.sg-bltable a { color: var(--sg-ink); text-decoration: none; }
.sg-bltable a:hover { color: var(--sg-accent); text-decoration: underline; }
.sg-bl-url { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.sg-bl-from small { color: var(--sg-muted); }
.sg-http { display: inline-block; padding: 1px 7px; border-radius: 6px; background: color-mix(in srgb, var(--sg-bad) 12%, #fff); color: #b91c1c; font-weight: 700; font-size: 12px; }
@media (max-width: 760px) { .sg-broken { padding: 4px 18px 6px; } }

/* Locked / upsell rows */
.sg-bltable tr.sg-locked td { filter: blur(4px); user-select: none; pointer-events: none; color: var(--sg-muted); }
.sg-upsell { position: relative; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: -70px 12px 12px; padding: 16px 18px; background: rgba(255,255,255,.94); border: 1px solid color-mix(in srgb, var(--sg-accent) 30%, #fff); border-radius: 14px; box-shadow: 0 10px 30px rgba(15,23,42,.12); backdrop-filter: blur(2px); }
.sg-upsell-lock { width: 40px; height: 40px; border-radius: 12px; display: grid; place-content: center; background: color-mix(in srgb, var(--sg-accent) 12%, #fff); font-size: 18px; flex: none; }
.sg-upsell-body { flex: 1 1 220px; display: grid; gap: 2px; font-size: 14px; }
.sg-upsell-body span { color: var(--sg-ink-2); font-size: 13px; }
.sg-root .sg-upsell .sg-btn { height: 42px; font-size: 14px; padding: 0 18px; }
.sg-aigrid-wrap:has(.sg-upsell) { overflow: visible; }
@media (max-width: 760px) { .sg-upsell { margin: -40px 6px 10px; } .sg-root .sg-upsell .sg-btn { width: 100%; } }
