/**
 * DA checker — module styles.
 * Inherits Solvid tokens (--svt-*) from .svt-wrap.
 */

.svt-wrap[data-tool="da-checker"] {
	max-width: 880px;
}

.svt-required {
	color: var(--svt-primary);
}

.svt-da-error {
	margin: 2px 0 0;
	color: #991b1b;
	font-size: 13.5px;
}

/* Form flow: input 2/3 + Check button 1/3 (matches the meta generator). */
.svt-da-form .svt-da-field {
	flex: 1 1 calc(66.666% - 7px);
	min-width: 220px;
}

/* Input and button share one fixed height so the row lines up exactly. */
.svt-da-form .svt-input--lg {
	height: 60px;
}

.svt-da-form .svt-button {
	flex: 1 1 calc(33.333% - 7px);
	min-width: 150px;
	height: 60px;
	padding-top: 0;
	padding-bottom: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

/* ---------- Hero: gauge + summary ---------- */

.svt-da-hero {
	display: grid;
	grid-template-columns: 200px minmax(0, 1fr);
	gap: 28px;
	align-items: center;
}

.svt-da-gauge {
	text-align: center;
}

.svt-da-gauge svg {
	width: 180px;
	height: 180px;
	display: block;
	margin: 0 auto;
}

.svt-da-track {
	fill: none;
	stroke: #eef0f5;
	stroke-width: 14;
}

.svt-da-fill {
	fill: none;
	stroke-width: 14;
	stroke-linecap: round;
	transition: stroke-dashoffset 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

/* DA colour bands: 0–29 red, 30–49 amber, 50–69 light green, 70+ green. */
.svt-da-fill.is-low   { stroke: var(--svt-danger); }
.svt-da-fill.is-mid   { stroke: var(--svt-warning); }
.svt-da-fill.is-good  { stroke: #4ade80; }
.svt-da-fill.is-great { stroke: #16a34a; }

.svt-da-num {
	font-size: 44px;
	font-weight: 700;
	fill: var(--svt-text);
	text-anchor: middle;
	dominant-baseline: middle;
	font-family: var(--svt-font);
}

.svt-da-cap {
	font-size: 13px;
	font-weight: 600;
	fill: var(--svt-muted);
	text-anchor: middle;
	font-family: var(--svt-font);
}

.svt-da-gauge-label {
	margin-top: 8px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--svt-slate);
}

.svt-da-summary {
	min-width: 0;
}

.svt-da-domain {
	font-size: 20px;
	font-weight: 700;
	color: var(--svt-text);
	overflow-wrap: anywhere;
}

.svt-da-exact {
	font-size: 13px;
	color: var(--svt-muted);
	margin-top: 2px;
	overflow-wrap: anywhere;
}

.svt-da-interpretation {
	margin: 12px 0 14px;
	font-size: 15px;
	line-height: 1.6;
	color: var(--svt-text);
}

.svt-da-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
	font-size: 12.5px;
	color: var(--svt-muted);
}

.svt-da-attribution {
	color: #9aa1b5;
}

/* ---------- Stat cards ---------- */

.svt-da-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 12px;
	margin-top: 24px;
}

.svt-da-card {
	background: var(--svt-tile);
	border: 2px solid var(--svt-border);
	border-radius: var(--svt-radius-sm);
	padding: 16px 18px;
	text-align: center;
}

.svt-da-card-value {
	font-size: 26px;
	font-weight: 700;
	color: var(--svt-text);
	line-height: 1.2;
}

.svt-da-card-value.is-great { color: #15803d; }
.svt-da-card-value.is-mid   { color: #a06a10; }
.svt-da-card-value.is-low   { color: #991b1b; }

.svt-da-card-label {
	margin-top: 5px;
	font-size: 12.5px;
	color: var(--svt-muted);
}

/* ---------- CTA banner ---------- */

.svt-da-cta {
	margin-top: 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	background: var(--svt-primary-soft);
	border: 2px solid rgba(98, 78, 222, 0.25);
	border-radius: var(--svt-radius-sm);
	padding: 18px 22px;
}

.svt-da-cta p {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	color: var(--svt-text);
	flex: 1 1 280px;
}

.svt-da-cta .svt-button {
	flex: 0 0 auto;
	text-decoration: none;
	display: inline-block;
}

/* ---------- Mobile ---------- */

@media (max-width: 640px) {
	.svt-da-hero {
		grid-template-columns: 1fr;
		gap: 18px;
		text-align: center;
	}

	.svt-da-summary {
		text-align: center;
	}

	.svt-da-meta {
		justify-content: center;
	}

	.svt-da-cta {
		flex-direction: column;
		text-align: center;
	}

	/* In a column, the desktop flex-basis (280px) would become HEIGHT —
	   a huge gap between the text and the button. */
	.svt-da-cta p {
		flex: 0 0 auto;
	}

	.svt-da-cta .svt-button {
		width: 100%;
	}
}
