/**
 * Klydexa Website Audit - website styles.
 *
 * Design system
 * -------------
 * Inherited from the plugin's own assets/css/admin.css rather than invented,
 * so the site and the admin screens read as one product. Same token names,
 * same bento-panel layout, same severity vocabulary.
 *
 * Type ....... System UI stack. Deliberately no webfont - the plugin audits
 *              sites for render-blocking Google Fonts, so neither it nor its
 *              website may ship one. This is the typographic position.
 * Themes ..... Tokens are redefined for dark; components only ever read
 *              tokens, never raw hex, so both themes stay in sync.
 */

/* ================================================================== Tokens */

:root {
	/* Surfaces */
	--canvas: #f6f8fb;
	--surface: #ffffff;
	--surface-2: #f8fafc;
	--surface-3: #f1f5f9;

	/* Ink - all pass 4.5:1 on the canvas */
	--ink: #0f172a;
	--ink-2: #475569;
	--ink-3: #64748b;

	/* Lines */
	--line: #e2e8f0;
	--line-soft: #eef2f7;

	/* Brand */
	--brand: #2563eb;
	--brand-2: #3b82f6;
	--brand-soft: #eff6ff;
	--brand-line: #bfdbfe;

	/* Semantic - separate from the accent, encodes severity only */
	--good: #15803d;
	--good-2: #22c55e;
	--good-soft: #ecfdf5;
	--good-line: #a7f3d0;

	--ok: #b45309;
	--ok-2: #f59e0b;
	--ok-soft: #fffbeb;
	--ok-line: #fde68a;

	--bad: #dc2626;
	--bad-2: #f87171;
	--bad-soft: #fef2f2;
	--bad-line: #fecaca;

	--info: #1d4ed8;
	--info-soft: #eff6ff;
	--info-line: #bfdbfe;

	/* Radii */
	--r-sm: 8px;
	--r: 12px;
	--r-lg: 16px;
	--r-xl: 22px;
	--r-pill: 999px;

	/* Depth */
	--shadow-xs: 0 1px 2px rgba(15, 23, 42, .05);
	--shadow-sm: 0 1px 3px rgba(15, 23, 42, .06), 0 1px 2px rgba(15, 23, 42, .04);
	--shadow: 0 4px 14px -4px rgba(15, 23, 42, .1), 0 2px 5px -2px rgba(15, 23, 42, .05);
	--shadow-lg: 0 18px 40px -14px rgba(15, 23, 42, .18), 0 6px 14px -6px rgba(15, 23, 42, .08);

	/* Motion */
	--ease: cubic-bezier(.22, 1, .36, 1);
	--fast: 160ms;
	--mid: 240ms;

	/* Type */
	--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

	--shell: 1180px;
}

/*
 * Dark theme. Only tokens are redefined - no component rule is duplicated.
 * Surfaces lift as they stack (canvas darkest, surface-3 lightest) which is
 * the inverse of light mode, so depth still reads without shadows carrying it.
 */
@media (prefers-color-scheme: dark) {
	:root {
		--canvas: #0a0f1c;
		--surface: #111827;
		--surface-2: #161f30;
		--surface-3: #1e293b;

		--ink: #e8edf6;
		--ink-2: #aab6c8;
		--ink-3: #8797ad;

		--line: #24314a;
		--line-soft: #1c2740;

		--brand: #6ba3fb;
		--brand-2: #8dbaff;
		--brand-soft: #131f38;
		--brand-line: #2b4573;

		--good: #5cd68b;
		--good-2: #34d399;
		--good-soft: #0e2620;
		--good-line: #1f5340;

		--ok: #f7bd4f;
		--ok-2: #fbbf24;
		--ok-soft: #251c0c;
		--ok-line: #55401a;

		--bad: #f98a8a;
		--bad-2: #f87171;
		--bad-soft: #2a1417;
		--bad-line: #5d2529;

		--info: #7fb0ff;
		--info-soft: #131f38;
		--info-line: #2b4573;

		--shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
		--shadow-sm: 0 1px 3px rgba(0, 0, 0, .45), 0 1px 2px rgba(0, 0, 0, .3);
		--shadow: 0 4px 14px -4px rgba(0, 0, 0, .6), 0 2px 5px -2px rgba(0, 0, 0, .4);
		--shadow-lg: 0 18px 40px -14px rgba(0, 0, 0, .75), 0 6px 14px -6px rgba(0, 0, 0, .5);
	}
}

/* The viewer's toggle must beat the media query in both directions. */
:root[data-theme="dark"] {
	--canvas: #0a0f1c;
	--surface: #111827;
	--surface-2: #161f30;
	--surface-3: #1e293b;

	--ink: #e8edf6;
	--ink-2: #aab6c8;
	--ink-3: #8797ad;

	--line: #24314a;
	--line-soft: #1c2740;

	--brand: #6ba3fb;
	--brand-2: #8dbaff;
	--brand-soft: #131f38;
	--brand-line: #2b4573;

	--good: #5cd68b;
	--good-2: #34d399;
	--good-soft: #0e2620;
	--good-line: #1f5340;

	--ok: #f7bd4f;
	--ok-2: #fbbf24;
	--ok-soft: #251c0c;
	--ok-line: #55401a;

	--bad: #f98a8a;
	--bad-2: #f87171;
	--bad-soft: #2a1417;
	--bad-line: #5d2529;

	--info: #7fb0ff;
	--info-soft: #131f38;
	--info-line: #2b4573;

	--shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
	--shadow-sm: 0 1px 3px rgba(0, 0, 0, .45), 0 1px 2px rgba(0, 0, 0, .3);
	--shadow: 0 4px 14px -4px rgba(0, 0, 0, .6), 0 2px 5px -2px rgba(0, 0, 0, .4);
	--shadow-lg: 0 18px 40px -14px rgba(0, 0, 0, .75), 0 6px 14px -6px rgba(0, 0, 0, .5);
}

:root[data-theme="light"] {
	--canvas: #f6f8fb;
	--surface: #ffffff;
	--surface-2: #f8fafc;
	--surface-3: #f1f5f9;

	--ink: #0f172a;
	--ink-2: #475569;
	--ink-3: #64748b;

	--line: #e2e8f0;
	--line-soft: #eef2f7;

	--brand: #2563eb;
	--brand-2: #3b82f6;
	--brand-soft: #eff6ff;
	--brand-line: #bfdbfe;

	--good: #15803d;
	--good-2: #22c55e;
	--good-soft: #ecfdf5;
	--good-line: #a7f3d0;

	--ok: #b45309;
	--ok-2: #f59e0b;
	--ok-soft: #fffbeb;
	--ok-line: #fde68a;

	--bad: #dc2626;
	--bad-2: #f87171;
	--bad-soft: #fef2f2;
	--bad-line: #fecaca;

	--info: #1d4ed8;
	--info-soft: #eff6ff;
	--info-line: #bfdbfe;

	--shadow-xs: 0 1px 2px rgba(15, 23, 42, .05);
	--shadow-sm: 0 1px 3px rgba(15, 23, 42, .06), 0 1px 2px rgba(15, 23, 42, .04);
	--shadow: 0 4px 14px -4px rgba(15, 23, 42, .1), 0 2px 5px -2px rgba(15, 23, 42, .05);
	--shadow-lg: 0 18px 40px -14px rgba(15, 23, 42, .18), 0 6px 14px -6px rgba(15, 23, 42, .08);
}

/* Score / severity tone - one class drives colour everywhere, as in the plugin. */
.t-good { --tone: var(--good); --tone-2: var(--good-2); --tone-soft: var(--good-soft); --tone-line: var(--good-line); }
.t-ok   { --tone: var(--ok);   --tone-2: var(--ok-2);   --tone-soft: var(--ok-soft);   --tone-line: var(--ok-line); }
.t-bad  { --tone: var(--bad);  --tone-2: var(--bad-2);  --tone-soft: var(--bad-soft);  --tone-line: var(--bad-line); }
.t-info { --tone: var(--info); --tone-2: var(--brand-2); --tone-soft: var(--info-soft); --tone-line: var(--info-line); }

/* ================================================================== Base */

*, *::before, *::after { box-sizing: border-box; }

html {
	scroll-behavior: smooth;
	scroll-padding-top: 88px;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--canvas);
	color: var(--ink);
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }
img { height: auto; }

a { color: var(--brand); }

h1, h2, h3, h4 {
	margin: 0;
	line-height: 1.2;
	letter-spacing: -.022em;
	color: var(--ink);
	text-wrap: balance;
}

h1 { font-size: clamp(2rem, 1.35rem + 2.6vw, 3.05rem); font-weight: 800; letter-spacing: -.035em; }
h2 { font-size: clamp(1.5rem, 1.24rem + 1.05vw, 2rem); font-weight: 750; letter-spacing: -.028em; }
h3 { font-size: 1.125rem; font-weight: 700; }

p { margin: 0; }

code, pre, kbd { font-family: var(--mono); }

:where(a, button, summary, input, select, [tabindex]):focus-visible {
	outline: 2px solid var(--brand);
	outline-offset: 2px;
	border-radius: var(--r-sm);
}

.sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.skip {
	position: absolute;
	left: 12px;
	top: -60px;
	z-index: 200;
	padding: 10px 18px;
	border-radius: var(--r-sm);
	background: var(--brand);
	color: #fff;
	font-size: 14px;
	font-weight: 650;
	text-decoration: none;
	transition: top var(--fast) var(--ease);
}

.skip:focus { top: 12px; }

/* ================================================================ Layout */

.shell {
	width: 100%;
	max-width: var(--shell);
	margin-inline: auto;
	padding-inline: 24px;
}

.section {
	padding-block: clamp(56px, 7vw, 92px);
}

.section--tight { padding-block: clamp(40px, 5vw, 64px); }

.section__head {
	display: flex;
	flex-direction: column;
	gap: 14px;
	max-width: 68ch;
	margin-bottom: 40px;
}

.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	font-weight: 750;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--brand);
}

.eyebrow::before {
	content: "";
	width: 22px;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
}

.lede {
	font-size: 1.0625rem;
	line-height: 1.7;
	color: var(--ink-2);
	max-width: 65ch;
}

/* ================================================================ Header */

.masthead {
	position: sticky;
	top: 0;
	z-index: 100;
	background: color-mix(in srgb, var(--surface) 88%, transparent);
	backdrop-filter: saturate(180%) blur(12px);
	-webkit-backdrop-filter: saturate(180%) blur(12px);
	border-bottom: 1px solid var(--line);
}

.masthead__inner {
	display: flex;
	align-items: center;
	gap: 18px;
	min-height: 68px;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 11px;
	text-decoration: none;
	color: var(--ink);
	margin-right: auto;
}

/* The product mark - pure CSS, no image request, as in the plugin header. */
.mark {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border-radius: 10px;
	background: linear-gradient(135deg, var(--brand-2), var(--brand));
	box-shadow: 0 6px 16px -6px rgba(37, 99, 235, .65);
	color: #fff;
}

.mark svg { width: 19px; height: 19px; }

.brand__name {
	font-size: 15.5px;
	font-weight: 750;
	letter-spacing: -.02em;
	white-space: nowrap;
}

.brand__name small {
	display: block;
	font-size: 10.5px;
	font-weight: 650;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--ink-3);
}

.nav {
	display: flex;
	align-items: center;
	gap: 4px;
}

.nav a {
	padding: 8px 12px;
	border-radius: var(--r-sm);
	font-size: 14px;
	font-weight: 600;
	color: var(--ink-2);
	text-decoration: none;
	white-space: nowrap;
	transition: background-color var(--fast) ease, color var(--fast) ease;
}

.nav a:hover { background: var(--brand-soft); color: var(--brand); }

.nav a[aria-current="page"] {
	background: var(--brand-soft);
	color: var(--brand);
}

/* Header download CTA - the one nav item that is deliberately loud. */
.nav a.nav__dl {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin-left: 6px;
	padding: 9px 15px;
	background: linear-gradient(180deg, var(--brand-2), var(--brand));
	color: #fff;
	box-shadow: 0 6px 16px -8px rgba(37, 99, 235, .85);
}

.nav a.nav__dl:hover {
	background: linear-gradient(180deg, var(--brand-2), var(--brand));
	color: #fff;
	box-shadow: 0 10px 22px -10px rgba(37, 99, 235, .95);
}

.nav a.nav__dl svg {
	width: 15px;
	height: 15px;
	flex: 0 0 auto;
}

/* Soft attention pull on first paint, then it stops for good. */
@keyframes dlpulse {
	0%, 100% { box-shadow: 0 6px 16px -8px rgba(37, 99, 235, .85), 0 0 0 0 rgba(37, 99, 235, .5); }
	50%      { box-shadow: 0 6px 16px -8px rgba(37, 99, 235, .85), 0 0 0 7px rgba(37, 99, 235, 0); }
}

.nav a.nav__dl { animation: dlpulse 2.1s ease-out 3; }

.themetoggle {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 1px solid var(--line);
	border-radius: var(--r-sm);
	background: var(--surface);
	color: var(--ink-2);
	cursor: pointer;
	transition: border-color var(--fast) ease, color var(--fast) ease;
}

.themetoggle:hover { border-color: var(--brand-line); color: var(--brand); }
.themetoggle svg { width: 17px; height: 17px; }

.themetoggle .icon-sun { display: none; }
:root[data-theme="dark"] .themetoggle .icon-sun { display: block; }
:root[data-theme="dark"] .themetoggle .icon-moon { display: none; }

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .themetoggle .icon-sun { display: block; }
	:root:not([data-theme="light"]) .themetoggle .icon-moon { display: none; }
}

.navtoggle {
	display: none;
	place-items: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 1px solid var(--line);
	border-radius: var(--r-sm);
	background: var(--surface);
	color: var(--ink-2);
	cursor: pointer;
}

.navtoggle svg { width: 18px; height: 18px; }

/* ================================================================= Buttons */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 20px;
	border: 1px solid transparent;
	border-radius: var(--r-sm);
	background: var(--surface);
	font-family: inherit;
	font-size: 14.5px;
	font-weight: 650;
	line-height: 1;
	color: var(--ink);
	text-decoration: none;
	cursor: pointer;
	transition: background-color var(--fast) ease, border-color var(--fast) ease,
	            color var(--fast) ease, box-shadow var(--fast) ease,
	            transform var(--fast) var(--ease);
}

.btn svg { width: 17px; height: 17px; flex: 0 0 auto; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
	background: linear-gradient(180deg, var(--brand-2), var(--brand));
	border-color: var(--brand);
	color: #fff;
	box-shadow: 0 6px 16px -8px rgba(37, 99, 235, .8);
}

.btn--primary:hover {
	box-shadow: 0 10px 22px -10px rgba(37, 99, 235, .9);
	color: #fff;
}

.btn--ghost {
	border-color: var(--line);
	color: var(--ink-2);
	box-shadow: var(--shadow-xs);
}

.btn--ghost:hover {
	border-color: var(--brand-line);
	background: var(--brand-soft);
	color: var(--brand);
}

.btn--lg {
	min-height: 50px;
	padding: 0 26px;
	font-size: 15.5px;
}

.btn__sub {
	font-weight: 550;
	opacity: .82;
}

.btnrow {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
}

/* Sits under a download button: version, size, licence. */
.dlmeta {
	margin-top: 12px;
	font-size: 13px;
	color: var(--ink-3);
}

/* ==================================================================== Hero */

.hero {
	position: relative;
	overflow: hidden;
	border-bottom: 1px solid var(--line);
}

/* Soft aurora wash, lifted from the plugin's empty state. */
.hero::before {
	content: "";
	position: absolute;
	top: -260px;
	left: 50%;
	width: 900px;
	height: 520px;
	transform: translateX(-50%);
	background: radial-gradient(closest-side, rgba(59, 130, 246, .18), transparent 70%);
	pointer-events: none;
}

.hero__inner {
	position: relative;
	display: grid;
	grid-template-columns: 1.08fr .92fr;
	gap: clamp(32px, 5vw, 64px);
	align-items: center;
	padding-block: clamp(52px, 6.5vw, 88px);
}

.hero__copy {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 20px;
}

.hero h1 { max-width: 20ch; }

.hero .lede { font-size: 1.125rem; }

.hero__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 4px;
}

.pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border-radius: var(--r-pill);
	background: var(--surface);
	border: 1px solid var(--line);
	font-size: 12px;
	font-weight: 650;
	color: var(--ink-2);
	white-space: nowrap;
}

.pill svg { width: 14px; height: 14px; color: var(--ink-3); }

.pill--good {
	background: var(--good-soft);
	border-color: var(--good-line);
	color: var(--good);
}

.pill--good svg { color: currentColor; }

/* ------------------------------------------------- Hero report mock */

/*
 * A miniature of the plugin's own report screen. It is the most
 * characteristic thing in the product's world, so it opens the page.
 */
.mock {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--r-xl);
	box-shadow: var(--shadow-lg);
	overflow: hidden;
}

.mock__bar {
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 12px 16px;
	border-bottom: 1px solid var(--line-soft);
	background: var(--surface-2);
}

.mock__dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--line);
}

.mock__addr {
	margin-left: 8px;
	padding: 4px 12px;
	border-radius: var(--r-pill);
	background: var(--surface-3);
	font-size: 10.5px;
	font-weight: 600;
	color: var(--ink-3);
	font-family: var(--mono);
}

.mock__body { padding: 20px; }

.mock__hero {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 18px;
	align-items: center;
	margin-bottom: 18px;
}

/* Score ring */
.ring {
	position: relative;
	width: 118px;
	height: 118px;
	flex: 0 0 auto;
}

.ring svg {
	width: 100%;
	height: 100%;
	transform: rotate(-90deg);
}

.ring__track { fill: none; stroke: var(--surface-3); stroke-width: 11; }

.ring__fill {
	fill: none;
	stroke: var(--tone, var(--brand));
	stroke-width: 11;
	stroke-linecap: round;
	stroke-dasharray: var(--circ, 314);
	stroke-dashoffset: var(--circ, 314);
	transition: stroke-dashoffset 1.4s var(--ease) 240ms;
}

.ring.is-live .ring__fill { stroke-dashoffset: var(--dash, 78); }

.ring__center {
	position: absolute;
	inset: 0;
	display: grid;
	place-content: center;
	justify-items: center;
	gap: 1px;
}

.ring__value {
	font-size: 34px;
	font-weight: 800;
	line-height: 1;
	letter-spacing: -.045em;
	color: var(--tone, var(--ink));
	font-variant-numeric: tabular-nums;
}

.ring__of {
	font-size: 9.5px;
	font-weight: 700;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: var(--ink-3);
}

.mock__stats {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 8px;
}

.ministat {
	position: relative;
	overflow: hidden;
	padding: 10px 12px;
	border: 1px solid var(--line);
	border-radius: var(--r-sm);
	background: var(--surface);
}

.ministat::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 3px;
	background: var(--tone, var(--ink-3));
}

.ministat b {
	display: block;
	font-size: 21px;
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -.03em;
	color: var(--tone, var(--ink));
	font-variant-numeric: tabular-nums;
}

.ministat span {
	font-size: 9.5px;
	font-weight: 750;
	letter-spacing: .07em;
	text-transform: uppercase;
	color: var(--ink-3);
}

/* Findings list inside the mock */
.mock__list {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--line);
	border-radius: var(--r);
	overflow: hidden;
}

.mockrow {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 11px 14px 11px 16px;
	border-bottom: 1px solid var(--line-soft);
	background: var(--surface);
}

.mockrow:last-child { border-bottom: 0; }

/* Severity rail */
.mockrow::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 3px;
	background: var(--tone);
}

.badge {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 62px;
	padding: 3px 8px;
	border-radius: var(--r-pill);
	background: var(--tone-soft);
	color: var(--tone);
	border: 1px solid currentColor;
	font-size: 9px;
	font-weight: 800;
	letter-spacing: .07em;
	text-transform: uppercase;
	line-height: 1.5;
}

.mockrow p {
	flex: 1;
	min-width: 0;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.45;
	color: var(--ink);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.mockrow__fix {
	flex: 0 0 auto;
	padding: 2px 8px;
	border-radius: var(--r-pill);
	background: var(--brand-soft);
	border: 1px solid var(--brand-line);
	font-size: 9px;
	font-weight: 750;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--brand);
}

/* ================================================================== Panels */

.panel {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--r-lg);
	box-shadow: var(--shadow-sm);
	overflow: hidden;
}

.panel__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 16px 22px;
	border-bottom: 1px solid var(--line-soft);
	background: linear-gradient(180deg, var(--surface), var(--surface-2));
}

.panel__head h2, .panel__head h3 {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 15.5px;
	font-weight: 700;
	letter-spacing: -.012em;
}

.panel__icon {
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	border-radius: 9px;
	background: var(--tone-soft, var(--surface-3));
	color: var(--tone, var(--ink-2));
	flex: 0 0 auto;
}

.panel__icon svg { width: 16px; height: 16px; }

.panel__score {
	display: inline-flex;
	align-items: baseline;
	gap: 2px;
	padding: 5px 12px;
	border-radius: var(--r-pill);
	background: var(--tone-soft, var(--surface-3));
	border: 1px solid var(--tone-line, var(--line));
	font-size: 13px;
	font-weight: 800;
	color: var(--tone, var(--ink-2));
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.panel__body { padding: 22px; }

/* =============================================================== Card grid */

.grid {
	display: grid;
	gap: 16px;
}

.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(216px, 1fr)); }

/* A category card, matching the plugin's .kwa-cat. */
.card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 20px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--r-lg);
	box-shadow: var(--shadow-sm);
	color: var(--ink);
	text-decoration: none;
	transition: transform var(--mid) var(--ease), box-shadow var(--mid) ease,
	            border-color var(--fast) ease;
}

a.card:hover, a.card:focus-visible {
	transform: translateY(-3px);
	box-shadow: var(--shadow-lg);
	border-color: var(--tone-line, var(--brand-line));
}

.card__icon {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: var(--tone-soft, var(--brand-soft));
	color: var(--tone, var(--brand));
	flex: 0 0 auto;
}

.card__icon svg { width: 19px; height: 19px; }

.card h3 { font-size: 15px; font-weight: 700; }

.card p {
	font-size: 13.5px;
	line-height: 1.65;
	color: var(--ink-2);
}

.card__meter {
	height: 6px;
	border-radius: var(--r-pill);
	background: var(--surface-3);
	overflow: hidden;
}

.card__meter i {
	display: block;
	height: 100%;
	width: var(--fill, 0%);
	border-radius: var(--r-pill);
	background: linear-gradient(90deg, var(--tone-2), var(--tone));
}

.card__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	font-size: 11.5px;
	font-weight: 650;
	color: var(--ink-3);
	margin-top: auto;
}

.card__count {
	font-variant-numeric: tabular-nums;
	color: var(--tone, var(--ink-2));
	font-weight: 750;
}

/* ================================================================= Prose */

.prose {
	font-size: 15.5px;
	line-height: 1.75;
	color: var(--ink-2);
}

.prose > * + * { margin-top: 1em; }

.prose h2 { margin-top: 2.1em; }
.prose h3 { margin-top: 1.9em; }
.prose h2 + *, .prose h3 + * { margin-top: .7em; }
.prose > :first-child { margin-top: 0; }

.prose p, .prose li { max-width: 74ch; }

.prose ul, .prose ol {
	margin-left: 0;
	padding-left: 22px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.prose li::marker { color: var(--ink-3); }

.prose strong { color: var(--ink); font-weight: 650; }

.prose code {
	padding: 2px 6px;
	border-radius: 5px;
	background: var(--surface-3);
	border: 1px solid var(--line);
	font-size: .875em;
	color: var(--ink);
	overflow-wrap: anywhere;
}

.prose a { font-weight: 600; }

/* Code blocks scroll inside their own container. */
.codewrap {
	overflow-x: auto;
	background: var(--surface-2);
	border: 1px solid var(--line);
	border-radius: var(--r-sm);
}

.codewrap pre {
	margin: 0;
	padding: 16px 18px;
	font-size: 13px;
	line-height: 1.65;
	color: var(--ink);
}

.codewrap code {
	padding: 0;
	border: 0;
	background: none;
	font-size: inherit;
}

/* ================================================================= Tables */

.tablewrap {
	overflow-x: auto;
	border: 1px solid var(--line);
	border-radius: var(--r);
	background: var(--surface);
}

table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

th, td {
	padding: 12px 16px;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid var(--line-soft);
}

thead th {
	background: var(--surface-2);
	font-size: 11.5px;
	font-weight: 750;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--ink-3);
	white-space: nowrap;
}

tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-2); }

td code { white-space: nowrap; }

.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

/* ================================================================ Callout */

.callout {
	display: flex;
	gap: 13px;
	padding: 16px 20px;
	border: 1px solid var(--tone-line, var(--brand-line));
	border-left: 3px solid var(--tone, var(--brand));
	border-radius: var(--r-sm);
	background: var(--tone-soft, var(--brand-soft));
	font-size: 14.5px;
	line-height: 1.65;
	color: var(--ink-2);
}

.callout svg {
	flex: 0 0 auto;
	width: 19px;
	height: 19px;
	margin-top: 2px;
	color: var(--tone, var(--brand));
}

.callout strong { color: var(--ink); }
.callout > div > * + * { margin-top: .55em; }

/* ================================================================== Steps */

/*
 * Numbered because the install and first-run flow genuinely is a sequence -
 * the order carries information the reader needs.
 */
.steps {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
	counter-reset: step;
}

.steps li {
	position: relative;
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 16px;
	align-items: start;
	padding: 18px 0;
	border-bottom: 1px solid var(--line-soft);
	max-width: none;
}

.steps li:last-child { border-bottom: 0; }

.steps li::before {
	counter-increment: step;
	content: counter(step);
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--brand-soft);
	border: 1px solid var(--brand-line);
	color: var(--brand);
	font-size: 13px;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
}

.steps h3 { font-size: 15px; margin-bottom: 4px; }
.steps p { font-size: 14.5px; color: var(--ink-2); max-width: 72ch; }

/* ==================================================================== FAQ */

.faq {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.qa {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--r);
	box-shadow: var(--shadow-xs);
	overflow: hidden;
	transition: border-color var(--fast) ease;
}

.qa[open] { border-color: var(--brand-line); }

.qa > summary {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px 20px;
	font-size: 15px;
	font-weight: 650;
	color: var(--ink);
	cursor: pointer;
	list-style: none;
}

.qa > summary::-webkit-details-marker { display: none; }
.qa > summary::marker { content: ""; }
.qa > summary:hover { background: var(--surface-2); }

.qa__caret {
	margin-left: auto;
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	color: var(--ink-3);
	transition: transform var(--mid) var(--ease), background-color var(--fast) ease;
}

.qa__caret svg { width: 16px; height: 16px; }

.qa[open] .qa__caret {
	transform: rotate(180deg);
	background: var(--surface-3);
	color: var(--brand);
}

.qa__body {
	padding: 0 20px 20px;
	font-size: 14.5px;
	line-height: 1.7;
	color: var(--ink-2);
}

.qa__body > * + * { margin-top: .8em; }
.qa__body p, .qa__body li { max-width: 76ch; }

/* ================================================================== Chips */

.chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 14px;
	border-radius: var(--r-pill);
	background: var(--surface-2);
	border: 1px solid var(--line);
	font-size: 12.5px;
	font-weight: 650;
	color: var(--ink-2);
}

.chip svg { width: 14px; height: 14px; color: var(--brand); }

.tag {
	display: inline-flex;
	align-items: center;
	padding: 3px 10px;
	border-radius: var(--r-pill);
	border: 1px solid transparent;
	font-size: 11px;
	font-weight: 750;
	letter-spacing: .03em;
	white-space: nowrap;
}

.tag--toggle { background: var(--good-soft); border-color: var(--good-line); color: var(--good); }
.tag--action { background: var(--surface-3); border-color: var(--line); color: var(--ink-2); }
.tag--safe   { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand); }
.tag--risk   { background: var(--ok-soft); border-color: var(--ok-line); color: var(--ok); }

/* ============================================================= Local nav */

.toc {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.toc a {
	padding: 8px 15px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--r-pill);
	font-size: 13px;
	font-weight: 650;
	color: var(--ink-2);
	text-decoration: none;
	box-shadow: var(--shadow-xs);
	transition: background-color var(--fast) ease, border-color var(--fast) ease, color var(--fast) ease;
}

.toc a:hover, .toc a:focus-visible {
	background: var(--brand-soft);
	border-color: var(--brand-line);
	color: var(--brand);
}

/* Page banner for interior pages. */
.pagehead {
	border-bottom: 1px solid var(--line);
	background: linear-gradient(180deg, var(--surface), var(--canvas));
}

.pagehead__inner {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding-block: clamp(40px, 5vw, 60px);
}

.crumbs {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--ink-3);
}

.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--brand); }

/* Two-column docs layout with a sticky rail. */
.docs {
	display: grid;
	grid-template-columns: 232px minmax(0, 1fr);
	gap: clamp(28px, 4vw, 52px);
	align-items: start;
}

.rail {
	position: sticky;
	top: 88px;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.rail__title {
	font-size: 11px;
	font-weight: 750;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: var(--ink-3);
	padding: 0 12px 8px;
}

.rail a {
	padding: 8px 12px;
	border-left: 2px solid var(--line);
	font-size: 13.5px;
	font-weight: 600;
	color: var(--ink-2);
	text-decoration: none;
	transition: border-color var(--fast) ease, color var(--fast) ease, background-color var(--fast) ease;
}

.rail a:hover {
	border-left-color: var(--brand-line);
	color: var(--brand);
	background: var(--brand-soft);
}

.rail a.is-active {
	border-left-color: var(--brand);
	color: var(--brand);
	font-weight: 700;
}

.docsection + .docsection { margin-top: 52px; }
.docsection { scroll-margin-top: 88px; }

/* ==================================================================== CTA */

.cta {
	position: relative;
	overflow: hidden;
	padding: clamp(40px, 5vw, 60px);
	border: 1px solid var(--brand-line);
	border-radius: var(--r-xl);
	background: var(--brand-soft);
	text-align: center;
}

.cta::before {
	content: "";
	position: absolute;
	top: -180px;
	left: 50%;
	width: 700px;
	height: 380px;
	transform: translateX(-50%);
	background: radial-gradient(closest-side, rgba(59, 130, 246, .22), transparent 70%);
	pointer-events: none;
}

.cta > * { position: relative; }
.cta h2 { margin-bottom: 12px; }

.cta p {
	max-width: 58ch;
	margin: 0 auto 24px;
	font-size: 1.0625rem;
	line-height: 1.7;
	color: var(--ink-2);
}

.cta .btnrow { justify-content: center; }

/* ================================================================= Footer */

.footer {
	border-top: 1px solid var(--line);
	background: var(--surface);
	padding-block: 44px 32px;
	font-size: 14px;
	color: var(--ink-3);
}

.footer__grid {
	display: grid;
	grid-template-columns: minmax(240px, 1.4fr) repeat(auto-fit, minmax(150px, 1fr));
	gap: 32px;
	margin-bottom: 36px;
}

.footer h2 {
	font-size: 11px;
	font-weight: 750;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: var(--ink-3);
	margin-bottom: 14px;
}

.footer ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 9px;
}

.footer a {
	color: var(--ink-2);
	text-decoration: none;
	font-weight: 550;
}

.footer a:hover { color: var(--brand); }

.footer__about p {
	max-width: 42ch;
	margin-top: 12px;
	line-height: 1.7;
}

.footer__base {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 24px;
	align-items: center;
	justify-content: space-between;
	padding-top: 24px;
	border-top: 1px solid var(--line-soft);
	font-size: 13px;
}

/* ============================================================= Responsive */

@media (max-width: 1000px) {
	.hero__inner { grid-template-columns: 1fr; }
	.hero__copy { max-width: 62ch; }

	.docs { grid-template-columns: 1fr; }

	.rail {
		position: static;
		flex-direction: row;
		flex-wrap: wrap;
		gap: 8px;
		padding-bottom: 8px;
	}

	.rail__title { display: none; }

	.rail a {
		border-left: 0;
		padding: 8px 15px;
		border: 1px solid var(--line);
		border-radius: var(--r-pill);
		background: var(--surface);
	}

	.rail a.is-active { border-color: var(--brand); background: var(--brand-soft); }
}

@media (max-width: 860px) {
	.navtoggle { display: grid; }

	.nav {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		flex-direction: column;
		align-items: stretch;
		gap: 2px;
		padding: 12px;
		background: var(--surface);
		border-bottom: 1px solid var(--line);
		box-shadow: var(--shadow);
	}

	.nav[hidden] { display: none; }
	.nav a { padding: 11px 14px; font-size: 15px; }

	/* In the collapsed menu the CTA becomes a full-width row like the rest. */
	.nav a.nav__dl {
		justify-content: center;
		margin-left: 0;
		margin-top: 6px;
		padding: 12px 14px;
		animation: none;
	}
}

@media (min-width: 861px) {
	/* The mobile disclosure must never hide the desktop nav. */
	.nav[hidden] { display: flex; }
}

@media (max-width: 620px) {
	.shell { padding-inline: 18px; }
	.mock__hero { grid-template-columns: 1fr; justify-items: center; text-align: center; }
	.mock__stats { width: 100%; }
	.btnrow .btn { flex: 1 1 auto; }
	.footer__grid { grid-template-columns: 1fr; gap: 26px; }
}

/* ================================================================= Motion */

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }

	*, *::before, *::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
	}

	.btn:hover, a.card:hover { transform: none; }
	.ring__fill { stroke-dashoffset: var(--dash, 78); }
}

@media (forced-colors: active) {
	.card, .panel, .ministat, .badge, .qa { border: 1px solid CanvasText; }
}

/* ================================================================== Print */

@media print {
	.masthead, .footer, .cta, .skip, .rail { display: none; }
	body { background: #fff; }
	.panel, .card { box-shadow: none; break-inside: avoid; }
}
