/* Affiliate Link Cloaker site. Palette shared with the WP Foundation site. */

:root {
	--bg: #ffffff;
	--bg-alt: #f5f7fb;
	--surface: #ffffff;
	--text: #1d2433;
	--text-muted: #4f5b70;
	--border: #dde3ee;
	--accent: #2f5bd3;
	--accent-strong: #1f44a8;
	--accent-text: #ffffff;
	--brand: #1f2a44;
	--highlight: #f2b84b;
	--code-bg: #18202f;
	--code-text: #e6ebf5;
	--inline-code-bg: #eef2f9;
	--note-bg: #fff8e6;
	--note-border: #f2b84b;
	--shadow: 0 10px 30px rgba(18, 28, 52, 0.08);
	--radius: 10px;
	--wrap: 1120px;
	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #0f1420;
		--bg-alt: #151c2b;
		--surface: #182133;
		--text: #e6ebf5;
		--text-muted: #a8b3c7;
		--border: #283349;
		--accent: #8fb3ff;
		--accent-strong: #b5ccff;
		--accent-text: #0f1420;
		--brand: #e6ebf5;
		--code-bg: #0b0f18;
		--inline-code-bg: #1f2a40;
		--note-bg: #2a2416;
		--shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
		color-scheme: dark;
	}
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 3px solid var(--highlight); outline-offset: 2px; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.2; color: var(--brand); }
h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 16px; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); margin: 0 0 12px; letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; margin: 0 0 6px; }
code, pre, kbd { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; font-size: 0.88em; }
:not(pre) > code { background: var(--inline-code-bg); padding: 0.1em 0.35em; border-radius: 4px; overflow-wrap: anywhere; }
pre { background: var(--code-bg); color: var(--code-text); padding: 16px 18px; border-radius: var(--radius); overflow-x: auto; line-height: 1.5; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 24px; } }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; z-index: 20; background: var(--surface); padding: 8px 12px; }

/* Header and footer */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--brand); text-decoration: none; }
.brand img { width: 28px; height: 28px; }
.nav { display: flex; gap: 4px 18px; flex-wrap: wrap; font-size: 0.95rem; }
.nav a { color: var(--text-muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent); }
.site-footer { border-top: 1px solid var(--border); padding: 28px 0 40px; color: var(--text-muted); font-size: 0.92rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* Buttons */
.btn { display: inline-block; padding: 10px 18px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; font-weight: 600; }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--accent-text); }

/* Home */
.hero { padding: 56px 0 40px; background: linear-gradient(180deg, var(--bg-alt), var(--bg)); }
.hero-inner { display: grid; gap: 32px; align-items: center; }
@media (min-width: 960px) { .hero-inner { grid-template-columns: 1fr 1.15fr; } }
.eyebrow { color: var(--text-muted); font-size: 0.9rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 10px; }
.lead { font-size: 1.15rem; color: var(--text-muted); margin: 0 0 22px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; }
.meta { color: var(--text-muted); font-size: 0.9rem; margin: 0; }
.shot { margin: 0; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; background: #f0f0f1; }
.shot img { display: block; width: 100%; }
figure figcaption { color: var(--text-muted); font-size: 0.9rem; margin-top: 8px; }
.section { padding: 56px 0; }
.section-alt { background: var(--bg-alt); }
.section-lead { color: var(--text-muted); max-width: 70ch; margin: 0 0 28px; }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.card p { margin: 0; color: var(--text-muted); }
.split { display: grid; gap: 32px; align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } .split.narrow-shot { grid-template-columns: 1.4fr 1fr; } }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { counter-increment: step; position: relative; padding-left: 46px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--accent-text); display: grid; place-items: center; font-weight: 700; font-size: 0.95rem; }
.networks { display: grid; gap: 18px; }
@media (min-width: 760px) { .networks { grid-template-columns: 1fr 1fr; } }
.networks ul { margin: 8px 0 0; padding-left: 20px; color: var(--text-muted); }
.ext-shot { max-width: 380px; margin: 0 auto; }

/* Guide pages */
.doc { display: grid; gap: 32px; padding: 40px 0 64px; }
@media (min-width: 960px) { .doc { grid-template-columns: 220px minmax(0, 1fr); } .toc { position: sticky; top: 84px; align-self: start; } }
.toc { font-size: 0.92rem; }
.toc strong { display: block; margin-bottom: 8px; color: var(--text-muted); text-transform: uppercase; font-size: 0.78rem; letter-spacing: 0.06em; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.toc a { color: var(--text-muted); text-decoration: none; }
.toc a:hover { color: var(--accent); }
.prose { max-width: 75ch; }
.prose h2 { margin-top: 48px; padding-top: 8px; }
.prose h2:first-of-type { margin-top: 8px; }
.prose li { margin: 4px 0; }
.prose figure { margin: 20px 0; }
.note { background: var(--note-bg); border-left: 4px solid var(--note-border); padding: 12px 16px; border-radius: 0 8px 8px 0; margin: 20px 0; }
.note p { margin: 0; }
table.plain { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
table.plain th, table.plain td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.doc > * { min-width: 0; }
table.plain th { white-space: nowrap; }
@media (max-width: 600px) { table.plain th { white-space: normal; } }
