/**
 * CL DOM Demo - shared styles.
 *
 * Both variants load this single file, so the rendered result is identical.
 * The `.cl-w` wrapper rule (display:contents) is what lets the bloated page
 * pile up nodes without changing a single pixel.
 */

.cl-dom-demo {
	--cl-max-width: 1080px;
	--cl-gap: 1.25rem;
	--cl-radius: 12px;
	--cl-fg: #1e2430;
	--cl-muted: #5b6472;
	--cl-accent: #2f6feb;
	--cl-card-bg: #f6f8fb;
	--cl-border: #e3e8f0;

	max-width: var(--cl-max-width);
	margin-inline: auto;
	padding: 2rem 1rem 3rem;
	color: var(--cl-fg);
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	line-height: 1.55;
}

.cl-w {
	display: contents;
}

.cl-hidden {
	display: none !important;
}

.cl-deco {
	display: none;
}

.cl-hero {
	text-align: center;
	padding: 2.5rem 1rem 2rem;
}

.cl-hero-title {
	margin: 0 0 0.75rem;
	font-size: clamp(1.9rem, 4vw, 2.75rem);
	line-height: 1.15;
}

.cl-hero-sub {
	max-width: 42ch;
	margin: 0 auto 1.5rem;
	font-size: 1.1rem;
	color: var(--cl-muted);
}

.cl-btn {
	display: inline-block;
	padding: 0.6rem 1.1rem;
	border-radius: 999px;
	background: var(--cl-accent);
	color: #fff;
	font-weight: 600;
	font-size: 0.95rem;
	text-decoration: none;
}

.cl-btn-lg {
	padding: 0.8rem 1.6rem;
	font-size: 1.05rem;
}

.cl-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: var(--cl-gap);
	margin: 2.5rem 0;
}

.cl-card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.6rem;
	padding: 1.4rem;
	border: 1px solid var(--cl-border);
	border-radius: var(--cl-radius);
	background: var(--cl-card-bg);
}

.cl-ico {
	width: 32px;
	height: 32px;
	fill: none;
	stroke: var(--cl-accent);
	stroke-width: 2;
}

.cl-card-title {
	margin: 0;
	font-size: 1.15rem;
}

.cl-card-text {
	margin: 0;
	color: var(--cl-muted);
	font-size: 0.95rem;
}

.cl-card .cl-btn {
	margin-top: auto;
}

.cl-faq {
	display: grid;
	gap: 1rem;
	margin: 2.5rem 0;
}

.cl-faq-item {
	padding: 1.1rem 1.3rem;
	border: 1px solid var(--cl-border);
	border-radius: var(--cl-radius);
}

.cl-faq-item h3,
.cl-faq-q {
	margin: 0 0 0.4rem;
	font-size: 1.05rem;
	font-weight: 600;
}

.cl-faq-item p,
.cl-faq-a {
	margin: 0;
	color: var(--cl-muted);
	font-size: 0.95rem;
}

.cl-deep {
	padding: 1.5rem 0 0;
	color: var(--cl-muted);
	font-size: 0.9rem;
	text-align: center;
}

/* Live DOM stats badge (admins only). */
#cl-dom-demo-badge {
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 99999;
	min-width: 190px;
	max-width: 60vw;
	padding: 12px 14px;
	border-radius: 10px;
	background: #0f172a;
	color: #e2e8f0;
	font: 13px/1.4 system-ui, sans-serif;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.cl-dom-stats-inline {
	display: inline-block;
	min-width: 190px;
	padding: 12px 14px;
	border-radius: 10px;
	background: #0f172a;
	color: #e2e8f0;
	font: 13px/1.4 system-ui, sans-serif;
}

.cl-dds-title {
	margin-bottom: 6px;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.cl-dds-row {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 2px 0;
}

.cl-dds-value {
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.cl-dds-ok .cl-dds-value {
	color: #4ade80;
}

.cl-dds-warn .cl-dds-value {
	color: #fbbf24;
}

.cl-dds-bad .cl-dds-value {
	color: #f87171;
}

.cl-dds-close {
	margin-top: 8px;
	padding: 2px 8px;
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 6px;
	background: transparent;
	color: inherit;
	font-size: 14px;
	cursor: pointer;
}
