/* Xplorekit base: design-system tokens (light + dark), header, footer, theme toggle.
   Loaded on every page before the page stylesheet (styles.css or home.css).
   v2 (2026-11-17): "clean product directory" look. Bright neutral surfaces, one confident indigo brand colour, an orange accent for
   Make Money, larger radii and soft shadows. Every token is defined three times (light, dark by system, dark by toggle): keep them in sync. */

:root {
	color-scheme: light;
	--bg: #F8F9FB;
	--surface: #FFFFFF;
	--surface-2: #F2F4F7;
	--ink: #101828;
	--ink-soft: #344054;
	--ink-muted: #5B6472;
	--line: #E4E7EC;
	--line-strong: #D0D5DD;
	--control-border: #667085;
	--brand: #4F46E5;
	--on-brand: #FFFFFF;
	--brand-dark: #1E1B4B;
	--brand-tint: #EEF2FF;
	--brand-tint-2: #E0E7FF;
	--accent: #F97316;
	--on-accent: #111827;
	--accent-tint: #FFEDD5;
	--accent-soft: #FFF7ED;
	--accent-ink: #9A3412;
	--accent-on-dark: #FDBA74;
	--on-dark-muted: #C7D2FE;
	--success: #15803D;
	--danger: #DC2626;
	--header-bg: rgba(255, 255, 255, 0.82);
	--footer-bg: #0B1020;
	--footer-ink: #E4E7EC;
	--footer-muted: #98A2B3;
	--focus: #4F46E5;
	--shadow-1: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 1px rgba(16, 24, 40, 0.04);
	--shadow-2: 0 14px 30px -10px rgba(16, 24, 40, 0.16), 0 4px 10px -4px rgba(16, 24, 40, 0.06);
	--hero-glow: radial-gradient(90% 120% at 50% -25%, rgba(99, 102, 241, 0.17), rgba(99, 102, 241, 0));

	--font-display: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
	--font-sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
	--font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	--radius-sm: 10px;
	--radius-md: 14px;
	--radius-lg: 18px;
	--radius-xl: 28px;
	--radius-pill: 999px;
	--tap-min: 44px;
	--page-max: 1200px;
}

/* Dark theme: follows the system unless the visitor picked light; the toggle sets data-theme. */
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		color-scheme: dark;
		--bg: #0B0F19;
		--surface: #121826;
		--surface-2: #1A2232;
		--ink: #F2F4F7;
		--ink-soft: #D0D5DD;
		--ink-muted: #98A2B3;
		--line: #232C3D;
		--line-strong: #344054;
		--control-border: #7C8798;
		--brand: #818CF8;
		--on-brand: #0B0F19;
		--brand-dark: #14123A;
		--brand-tint: #1B2150;
		--brand-tint-2: #262D6B;
		--accent: #FB923C;
		--on-accent: #0B0F19;
		--accent-tint: #3B2411;
		--accent-soft: #231710;
		--accent-ink: #FDBA74;
		--accent-on-dark: #FDBA74;
		--on-dark-muted: #C7D2FE;
		--success: #4ADE80;
		--danger: #F87171;
		--header-bg: rgba(11, 15, 25, 0.82);
		--footer-bg: #070A12;
		--footer-ink: #E4E7EC;
		--footer-muted: #8A94A6;
		--focus: #A5B4FC;
		--shadow-1: 0 1px 2px rgba(0, 0, 0, 0.45);
		--shadow-2: 0 14px 30px -10px rgba(0, 0, 0, 0.65), 0 4px 10px -4px rgba(0, 0, 0, 0.4);
		--hero-glow: radial-gradient(90% 120% at 50% -25%, rgba(129, 140, 248, 0.2), rgba(129, 140, 248, 0));
	}
}
:root[data-theme="dark"] {
	color-scheme: dark;
	--bg: #0B0F19;
	--surface: #121826;
	--surface-2: #1A2232;
	--ink: #F2F4F7;
	--ink-soft: #D0D5DD;
	--ink-muted: #98A2B3;
	--line: #232C3D;
	--line-strong: #344054;
	--control-border: #7C8798;
	--brand: #818CF8;
	--on-brand: #0B0F19;
	--brand-dark: #14123A;
	--brand-tint: #1B2150;
	--brand-tint-2: #262D6B;
	--accent: #FB923C;
	--on-accent: #0B0F19;
	--accent-tint: #3B2411;
	--accent-soft: #231710;
	--accent-ink: #FDBA74;
	--accent-on-dark: #FDBA74;
	--on-dark-muted: #C7D2FE;
	--success: #4ADE80;
	--danger: #F87171;
	--header-bg: rgba(11, 15, 25, 0.82);
	--footer-bg: #070A12;
	--footer-ink: #E4E7EC;
	--footer-muted: #8A94A6;
	--focus: #A5B4FC;
	--shadow-1: 0 1px 2px rgba(0, 0, 0, 0.45);
	--shadow-2: 0 14px 30px -10px rgba(0, 0, 0, 0.65), 0 4px 10px -4px rgba(0, 0, 0, 0.4);
	--hero-glow: radial-gradient(90% 120% at 50% -25%, rgba(129, 140, 248, 0.2), rgba(129, 140, 248, 0));
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font-sans);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); letter-spacing: -0.025em; text-wrap: balance; }
code, kbd, pre, samp { font-family: var(--font-mono); }
::selection { background: var(--brand-tint-2); color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

.skip-link {
	position: absolute; left: 16px; top: -60px; z-index: 100;
	padding: 10px 16px; border-radius: var(--radius-sm);
	background: var(--brand); color: var(--on-brand); font-weight: 600; text-decoration: none;
	transition: top 150ms ease-out;
}
.skip-link:focus { top: 12px; }

/* ---------- Header ---------- */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: var(--header-bg);
	-webkit-backdrop-filter: saturate(160%) blur(12px);
	backdrop-filter: saturate(160%) blur(12px);
	border-bottom: 1px solid var(--line);
}
.header-inner {
	max-width: var(--page-max); margin: 0 auto; padding: 14px 24px;
	display: flex; align-items: center; gap: 32px;
}
.site-header .logo {
	display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0;
	font-family: var(--font-display); font-weight: 800; font-size: 21px; letter-spacing: -0.03em;
	color: var(--ink); text-decoration: none;
}
.logo-tile {
	width: 36px; height: 36px; border-radius: 11px;
	background: linear-gradient(135deg, #4F46E5, #7C3AED); display: inline-flex; align-items: center; justify-content: center;
	box-shadow: 0 2px 8px -2px rgba(79, 70, 229, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}
.logo-tile svg { display: block; }

.site-nav { display: flex; align-items: center; gap: 4px; flex: 1 1 auto; }
.site-nav .nav-link {
	display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px;
	border-radius: var(--radius-pill); border: 0;
	color: var(--ink-soft); font-weight: 500; font-size: 15px; text-decoration: none;
	transition: background-color 150ms ease-out, color 150ms ease-out;
}
.site-nav .nav-link:hover { background: var(--surface-2); color: var(--ink); }
.site-nav .nav-link[aria-current="page"] { background: var(--brand-tint); color: var(--brand); font-weight: 600; }
.site-nav .nav-money { background: var(--accent-tint); color: var(--accent-ink); font-weight: 700; margin-left: 6px; box-shadow: inset 0 0 0 1px rgba(249, 115, 22, 0.28); }
.site-nav .nav-money:hover { background: var(--accent-tint); color: var(--accent-ink); filter: brightness(0.97); }
.site-nav .nav-money[aria-current="page"] { background: var(--accent); color: var(--on-accent); }

.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.header-cta {
	display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 18px;
	border-radius: 12px; background: var(--brand); color: var(--on-brand);
	font-family: var(--font-sans); font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap;
	box-shadow: var(--shadow-1); transition: filter 150ms ease-out, transform 150ms ease-out;
}
.header-cta:hover { filter: brightness(1.08); transform: translateY(-1px); }

.theme-toggle, .nav-toggle {
	display: inline-flex; align-items: center; justify-content: center;
	width: 40px; height: 40px; padding: 0; flex-shrink: 0;
	border: 1px solid var(--line); border-radius: var(--radius-pill);
	background: var(--surface); color: var(--ink); cursor: pointer;
	transition: background-color 150ms ease-out, border-color 150ms ease-out;
}
.theme-toggle:hover, .nav-toggle:hover { background: var(--surface-2); border-color: var(--line-strong); }
.theme-toggle svg, .nav-toggle svg { width: 20px; height: 20px; display: block; }
/* Show the moon in light mode (switch to dark), the sun in dark mode (switch to light). */
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
	:root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}
.nav-toggle { display: none; }

@media (max-width: 980px) {
	.header-inner { gap: 12px; }
	.nav-toggle { display: inline-flex; }
	.site-nav {
		position: absolute; top: 100%; left: 0; right: 0;
		flex-direction: column; align-items: stretch; gap: 4px;
		padding: 0 16px; background: var(--surface);
		border-bottom: 1px solid var(--line);
		max-height: 0; overflow: hidden; visibility: hidden;
		transition: max-height 220ms ease-out, padding 220ms ease-out, visibility 220ms;
	}
	.site-nav.is-open { max-height: 480px; padding: 12px 16px 16px; visibility: visible; }
	.site-nav .nav-link { min-height: var(--tap-min); padding: 0 14px; border-radius: var(--radius-sm); }
	.site-nav .nav-money { margin-left: 0; }
}
@media (max-width: 560px) {
	.header-inner { padding: 10px 16px; }
	.header-cta { display: none; }
}

/* ---------- Footer ---------- */
.site-footer { margin-top: 80px; background: var(--footer-bg); color: var(--footer-muted); border-top: 1px solid var(--line); }
.footer-inner {
	max-width: var(--page-max); margin: 0 auto; padding: 48px 24px 40px;
	display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px 56px;
}
.footer-brand .brand { font-family: var(--font-display); font-weight: 800; font-size: 20px; color: #FFFFFF; letter-spacing: -0.03em; }
.footer-brand p { margin: 8px 0 0; max-width: 320px; font-size: 14px; line-height: 1.55; color: var(--footer-muted); }
.site-footer .footer-nav { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 0 26px; max-width: 520px; }
.site-footer .footer-nav a {
	display: inline-flex; align-items: center; min-height: var(--tap-min);
	color: var(--footer-ink); font-size: 14px; font-weight: 500; text-decoration: none;
}
.site-footer .footer-nav a:hover { color: #FFFFFF; text-decoration: underline; text-underline-offset: 3px; }
.site-footer :focus-visible { outline-color: #FCD34D; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* ---------- Slider controls and copy button (shared by the homepage and the hub pages) ---------- */
.slider-ctl { display: flex; gap: 8px; justify-content: flex-end; margin: 0 0 12px; }
.slider-ctl.in-head { margin: 0; margin-left: auto; }
.slider-btn {
	display: inline-flex; align-items: center; justify-content: center; width: var(--tap-min); height: var(--tap-min); padding: 0;
	border: 1px solid var(--control-border); border-radius: var(--radius-sm); background: var(--surface); color: var(--brand); cursor: pointer;
	transition: background-color 150ms ease-out, border-color 150ms ease-out;
}
.slider-btn:hover { background: var(--brand-tint); border-color: var(--brand); }
.slider-btn svg { width: 18px; height: 18px; display: block; }
.btn-copy {
	display: none; align-items: center; justify-content: center; min-height: var(--tap-min); padding: 0 18px;
	border: 0; border-radius: var(--radius-sm); background: var(--brand); color: var(--on-brand);
	font: 600 15px/1.2 var(--font-sans); cursor: pointer; transition: filter 150ms ease-out;
}
.copy-ok .btn-copy { display: inline-flex; }
.btn-copy:hover { filter: brightness(1.08); }
.btn-copy.is-done { background: var(--success); color: #FFFFFF; }

/* ---------------------------------------------------------------------------------------------
   Library layout (final UI, 2026-11-18). Used by the generated library blocks on the hub pages, the
   homepage "Latest" sliders, the entry pages and the search page. Prefix lb- so it never clashes
   with the older .card / .btn / .badge classes. Tokens only: dark mode comes for free. */
.lb { margin: 0 auto; max-width: var(--page-max); padding: 0 24px; }
.lb-sub { background: var(--surface); border-block: 1px solid var(--line); margin-top: 32px; }
.lb-sub-in { display: flex; flex-wrap: wrap; gap: 4px; max-width: var(--page-max); margin: 0 auto; padding: 0 24px; }
.lb-sub a { display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 14px; color: var(--ink-soft); text-decoration: none; font: 600 15px var(--font-sans); border-bottom: 3px solid transparent; }
.lb-sub a:hover { color: var(--brand); }
.lb-sub a.on { color: var(--ink); border-bottom-color: var(--accent); font-weight: 700; }
.lb-cnt { font: 600 12px var(--font-mono); background: var(--brand-tint); color: var(--brand); border-radius: 999px; padding: 1px 8px; }
.lb-lab { font: 600 12px/1.3 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--brand); }
.lb-sec { margin-top: 48px; }
.lb-sh { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 20px; }
.lb-sh h2 { margin: 6px 0 0; font-size: 28px; }
.lb-sh p { max-width: 640px; margin: 6px 0 0; color: var(--ink-muted); }
.lb-sh .slider-ctl { margin: 0; }
.lb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: var(--radius-sm); font: 700 15px/1.2 var(--font-sans); text-decoration: none; border: 1px solid transparent; cursor: pointer; }
.lb-btn.p { background: var(--brand); color: var(--on-brand); }
.lb-btn.a { background: var(--accent); color: var(--on-accent); }
.lb-btn.o { background: var(--surface); color: var(--brand); border-color: var(--control-border); }
.lb-btn.p:hover, .lb-btn.a:hover { filter: brightness(1.08); }
.lb-btn.o:hover { background: var(--brand-tint); }
.lb-chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink); font: 600 15px var(--font-sans); text-decoration: none; cursor: pointer; }
.lb-chip.on { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.lb-bd { display: inline-flex; align-items: center; background: var(--brand-tint); color: var(--brand); font: 600 12px/1.3 var(--font-sans); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.lb-bd.ok { background: color-mix(in srgb, var(--success) 14%, var(--surface)); color: var(--success); }
.lb-bd.am { background: var(--accent-tint); color: var(--accent-ink); }
.lb-tile { width: 48px; height: 48px; border-radius: 12px; background: var(--brand-tint-2); color: var(--brand); display: grid; place-items: center; font: 800 20px var(--font-display); flex: none; }
.lb-mono { font-family: var(--font-mono); }
.lb-muted { color: var(--ink-muted); }
.lb-xs { font-size: 13px; line-height: 1.5; }
.lb-sm { font-size: 15px; line-height: 1.55; }

.lb-slider { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 14px; scrollbar-width: thin; position: relative; }
.lb-slider > * { scroll-snap-align: start; flex: 0 0 340px; max-width: 88vw; }
.lb-card { display: flex; flex-direction: column; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; min-width: 0; transition: border-color 160ms ease-out; }
.lb-card:hover { border-color: var(--brand); }
.lb-card h3 { margin: 0; font-size: 21px; line-height: 1.25; }
.lb-card h3 a { color: var(--ink); text-decoration: none; }
.lb-card h3 a:hover { color: var(--brand); }
.lb-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lb-row.between { justify-content: space-between; }
.lb-row.nw { flex-wrap: nowrap; gap: 14px; }
.lb-pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font: 13.5px/1.6 var(--font-mono); color: var(--ink-soft); white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; max-height: 9.5em; overflow: hidden; }
.lb-pre.full { max-height: none; font-size: 15.5px; line-height: 1.8; padding: 20px 22px; }
.lb-pre b { color: var(--brand); font-weight: 600; }
.lb-fact { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; margin: 0; }
.lb-fact dt { color: var(--ink-muted); font: 600 12px var(--font-mono); text-transform: uppercase; letter-spacing: .04em; padding-top: 2px; }
.lb-fact dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.lb-fact dd.nos { font-weight: 500; color: var(--ink-muted); }
.lb-push { margin-top: auto; }
.lb-risk { color: var(--accent-ink); background: var(--accent-soft); border-radius: 10px; padding: 10px 12px; font-size: 15px; margin: 0; }
.lb-band { background: var(--brand-dark); border-radius: 24px; padding: 40px; color: #FFFFFF; margin-top: 56px; }
.lb-band h2, .lb-band h3 { color: #FFFFFF; }
.lb-band .lb-lab { color: var(--accent-on-dark); }
.lb-band .lb-sh p { color: var(--on-dark-muted); }
.lb-band .lb-card { color: var(--ink); }
.lb-band .lb-card h3 { color: var(--ink); }

.lb-lay { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; margin-top: 48px; }
.lb-rail { flex: 0 0 270px; max-width: 100%; }
.lb-main { flex: 1 1 640px; min-width: 0; }
.lb-side { flex: 0 0 320px; max-width: 100%; }
.lb-body { flex: 1 1 640px; min-width: 0; }
.lb-facet { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 12px; }
.lb-facet summary { cursor: pointer; min-height: 48px; display: flex; align-items: center; padding: 0 16px; font: 700 16px var(--font-display); }
.lb-facet .opts { padding: 0 16px 12px; }
.lb-ck { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 15px; cursor: pointer; }
.lb-ck input { width: 20px; height: 20px; accent-color: var(--brand); margin: 0; }
.lb-ck .lb-cnt { margin-left: auto; }
.lb-search { width: 100%; min-height: 48px; border: 1px solid var(--control-border); border-radius: 10px; padding: 0 14px; font: 16px var(--font-sans); background: var(--surface); color: var(--ink); }
.lb-bar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.lb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.lb-grid[hidden], .lb-card[hidden], .lb-empty[hidden] { display: none; }
.lb-empty { padding: 28px; border: 1px dashed var(--line-strong); border-radius: 14px; color: var(--ink-muted); text-align: center; }
.lb-box { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; }
.lb-box.tint { background: var(--brand-tint); border-color: var(--brand-tint-2); }
.lb-box h2, .lb-box h3 { margin: 0; font-size: 20px; }
.lb-note { background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 12px; padding: 16px 20px; color: var(--accent-ink); margin-top: 16px; }
.lb-jobs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 16px; }
.lb-job { display: block; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; }
.lb-job:hover { border-color: var(--brand); }
.lb-job h3 { margin: 0; font-size: 20px; }
.lb-checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.lb-check { background: var(--brand-tint); border: 1px solid var(--brand-tint-2); border-radius: 16px; padding: 20px 22px; }
.lb-check b { display: block; font: 800 24px var(--font-display); margin-top: 6px; }
.lb-check p { margin: 6px 0 0; font-size: 14px; color: var(--ink-soft); }

/* entry pages: README style */
.lb-readme { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 24px; }
.lb-readme-h { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 12px 20px; border-bottom: 1px solid var(--line); font: 600 13px var(--font-mono); color: var(--ink-soft); background: var(--surface-2); border-radius: 14px 14px 0 0; }
.lb-readme-b { padding: 8px 32px 32px; }
.lb-readme-b h2 { font-size: 26px; margin: 36px 0 0; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.lb-readme-b h2:first-child { margin-top: 20px; }
.lb-readme-b p, .lb-readme-b li { color: var(--ink-soft); }
.lb-readme-b p { margin: 14px 0 0; }
.lb-readme-b ul, .lb-readme-b ol { margin: 14px 0 0; padding-left: 24px; }
.lb-readme-b ul { list-style: disc; } .lb-readme-b ol { list-style: decimal; }
.lb-readme-b code { font: 14px var(--font-mono); background: var(--surface-2); padding: 2px 6px; border-radius: 6px; }
.lb-readme-b li { margin-bottom: 8px; }
.lb-tw { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-top: 16px; }
.lb-tw table { border-collapse: collapse; width: 100%; font-size: 15px; min-width: 560px; }
.lb-tw th, .lb-tw td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.lb-tw thead th { font: 600 12px var(--font-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-soft); background: var(--surface-2); }
.lb-tw tbody tr:last-child td, .lb-tw tbody tr:last-child th { border-bottom: 0; }
.lb-top { background: var(--surface); border-bottom: 1px solid var(--line); }
.lb-top .lb { padding-bottom: 24px; }
.lb-top h1 { margin: 10px 0 0; font-size: clamp(30px, 5vw, 46px); max-width: 860px; }
.lb-top .lead { margin: 12px 0 0; max-width: 740px; color: var(--ink-muted); font-size: 19px; }
.lb-crumb { padding: 20px 0 12px; font-size: 15px; color: var(--ink-muted); }
.lb-crumb a { color: var(--ink-muted); }
.lb-hero { background: var(--surface); border-bottom: 1px solid var(--line); }
.lb-hero-in { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; padding-top: 56px; padding-bottom: 56px; }
.lb-live { list-style: none; margin: 0; padding: 6px 0; }
.lb-live li { display: flex; gap: 12px; align-items: center; padding: 12px 22px; border-bottom: 1px solid var(--line); }
.lb-live li:last-child { border-bottom: 0; }
.lb-live a { flex: 1; font-weight: 600; font-size: 16px; color: var(--ink); text-decoration: none; }
.lb-live a:hover { color: var(--brand); }
@media (max-width: 720px) { .lb-band { padding: 24px 18px; border-radius: 18px; } .lb-readme-b { padding: 4px 18px 24px; } }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.lb-card .btn-copy, .lb-readme .btn-copy, .lb-box .btn-copy { min-height: 44px; }

/* header search (final UI) and the footer's job list */
.header-search { display: flex; align-items: center; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); min-height: var(--tap-min); padding-left: 12px; width: 220px; }
.header-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint-2); }
.header-search input { flex: 1; min-width: 0; border: 0; background: transparent; font: 15px var(--font-sans); color: var(--ink); min-height: 42px; outline: none; }
.header-search button { border: 0; background: transparent; color: var(--ink-muted); width: 42px; height: 42px; display: grid; place-items: center; cursor: pointer; }
.header-search button svg { width: 18px; height: 18px; }
@media (max-width: 1100px) { .header-search { width: 160px; } }
@media (max-width: 860px) { .header-search { width: auto; padding-left: 0; } .header-search input { display: none; } .header-search button { color: var(--ink); } }
.site-footer .footer-jobs { flex-direction: column; flex-wrap: nowrap; gap: 0; max-width: 180px; }
.footer-jobs .footer-h { color: var(--footer-ink); font: 700 14px var(--font-display); margin-bottom: 4px; }
.lb-hs { display: flex; flex-wrap: wrap; margin-top: 28px; max-width: 640px; background: var(--surface); border: 1.5px solid var(--control-border); border-radius: 12px; overflow: hidden; }
.lb-hs select { min-height: 56px; border: 0; border-right: 1px solid var(--line-strong); padding: 0 14px; font: 700 15px var(--font-sans); background: var(--brand-tint); color: var(--brand); }
.lb-hs input { flex: 1 1 240px; min-height: 56px; border: 0; padding: 0 18px; font: 17px var(--font-sans); color: var(--ink); background: transparent; min-width: 0; }
.lb-hs .lb-btn { border-radius: 0; min-height: 56px; padding: 0 28px; }
@media (max-width: 560px) { .lb-hs { flex-direction: column; } .lb-hs select { border-right: 0; border-bottom: 1px solid var(--line-strong); } .lb-hs .lb-btn { width: 100%; } .lb-sh .lb-btn { width: 100%; } }
.lb-pad { padding: 24px 28px; }
@media (max-width: 720px) { .lb-pad { padding: 14px; } .lb-pre.full { padding: 14px; font-size: 14px; } }
@media (max-width: 860px) { .lb-rail, .lb-side { flex: 1 1 100%; } .lb-lay { gap: 20px; } }

/* ---------------------------------------------------------------------------------------------
   Hand-written pages in the final-UI frame (scripts/restyle-pages.py wraps the breadcrumb and hero in .lb-top-wrap and puts the article of
   detail pages in a README-style card next to an About panel). Tokens only. */
.lb-top-wrap { background: var(--surface); border-bottom: 1px solid var(--line); }
.lb-top-wrap .page-hero { padding-block: var(--space-2) var(--space-8); }
.lb-top-wrap .page-hero h1 { max-width: 900px; }
.lb-top-in { padding-top: 20px; padding-bottom: 28px; }
.lb-top-wrap .ext-hero { background: none; border: 0; box-shadow: none; padding: 0; margin: 12px 0 0; gap: 20px; align-items: center; }
.lb-top-wrap .ext-icon-lg { width: 80px; height: 80px; border-radius: 20px; font-size: 34px; }
.lb-top-wrap .ext-hero-text h1 { font-size: clamp(30px, 4.6vw, 44px); }
.lb-top-wrap .ext-hero-actions .btn-primary { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.lb-pagebody { padding-block: 32px 64px; }
.lb-pagebody .prose, .guide .prose { max-width: none; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 32px 32px; margin-bottom: 24px; }
.guide .prose { max-width: none; } /* guide cards use the full container width (owner request 2026-11-18) */
.guide .prose > p, .guide .prose > ul, .guide .prose > ol { font-size: 1.125rem; }
.lb-pagebody .prose h2, .guide .prose h2 { padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-top: 36px; }
.lb-pagebody .prose h2:first-child, .guide .prose h2:first-child { margin-top: 20px; }
.lb-pagebody .callout { margin-top: 0; }
@media (max-width: 720px) { .lb-pagebody .prose, .guide .prose { padding: 4px 18px 24px; } }
.lb-top-wrap h1 { overflow-wrap: anywhere; }
@media (max-width: 560px) { .lb-top-wrap .ext-icon-lg { width: 60px; height: 60px; font-size: 26px; border-radius: 16px; } .lb-top-wrap .ext-hero-text h1 { font-size: 28px; } }

/* lists of page links shown as one card per page (scripts/cardify-links.py) */
.lb-linkgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 16px; margin: 16px 0 24px; }
.lb-linkcard { gap: 10px; padding: 18px 20px; align-items: flex-start; }
.lb-linkcard h3 { font-size: 18px; line-height: 1.3; margin: 0; }
.prose .lb-linkcard h3 a, .guide .lb-linkcard h3 a { color: var(--ink); text-decoration: none; font-weight: 700; }
.lb-linkcard h3 a:hover { color: var(--brand); }
.lb-clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.55; }
.prose .lb-more { margin-top: auto; font-weight: 700; font-size: 14px; text-decoration: none; color: var(--brand); }
.prose .lb-linkcard .lb-clamp { color: var(--ink-muted); font-size: 15px; }
.prose.lb-bare { background: none; border: 0; padding: 0; max-width: none; }
.prose.lb-bare > h2 { border-bottom: 0; margin-top: 44px; padding-bottom: 0; }
.prose.lb-bare > h2:first-child { margin-top: 8px; }
.prose.lb-bare > p { font-size: 15px; }
.guide .prose.lb-bare, .lb-pagebody .prose.lb-bare { max-width: none; background: none; border: 0; padding: 0; }
.guide .lb-linkcard h3, .prose .lb-linkcard h3 { margin: 0; }

/* "Last updated" at the top of a library page: the day something was last added (owner request 2026-11-18) */
.lb-upd { margin-left: auto; align-self: center; font: 600 14px var(--font-sans); color: var(--ink-soft); padding: 0 14px; }
.lb-upd time { color: var(--ink); }
@media (max-width: 640px) { .lb-upd { margin-left: 0; width: 100%; padding: 8px 14px; } }

/* Prompt library (owner request 2026-11-18): curated prompts by field, each with its output attached. Tokens only, so dark mode works. */
.pl { padding-block: var(--space-8) var(--space-12); }
.pl-bar { display: grid; gap: 12px; margin: 20px 0 24px; }
.pl-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pl-chip { min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-soft); font: 600 14px var(--font-sans); cursor: pointer; }
.pl-chip:hover { border-color: var(--brand); color: var(--brand); }
.pl-chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.pl-chip.on .lb-cnt { background: rgba(255,255,255,.22); color: #fff; }
.pl-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 640px) { .pl-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .pl-grid { grid-template-columns: repeat(3, 1fr); } }
.pl-card { display: flex; flex-direction: column; gap: 12px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); min-width: 0; }
.pl-card[hidden] { display: none; }
.pl-card h3 { font: 700 20px/1.25 var(--font-display); margin: 0; }
.pl-top { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; }
.pl-tools { font: 500 13px var(--font-sans); color: var(--ink-muted); }
.pl-prompt { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 400 14px/1.7 var(--font-mono); max-height: 17em; overflow: auto; }
.pl-note { margin: 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--ink-soft); font-size: 14px; }
.pl-out { border: 1px dashed var(--line); border-radius: var(--radius-md); padding: 14px; background: var(--bg); }
.pl-out-h { margin: 0 0 10px; font: 700 12px var(--font-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-muted); }
.pl-out-t { margin: 0 0 6px; font-size: 15px; color: var(--ink-soft); }
.pl-out-pre { margin: 0 0 10px; white-space: pre-wrap; overflow-wrap: anywhere; font: 400 13.5px/1.65 var(--font-mono); color: var(--ink-soft); }
.pl-dgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.pl-dg { margin: 0; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.pl-dg svg { display: block; width: 100%; height: auto; color: var(--ink-soft); }
.pl-dg figcaption { margin-top: 4px; font: 600 12px/1.35 var(--font-sans); color: var(--ink-soft); }
.pl-dg .dg-sub { fill: var(--line); stroke: none; }
.pl-dg .dg-cam rect, .pl-dg .dg-cam path { fill: var(--brand); stroke: none; }
.pl-dg .dg-sight { stroke: var(--brand); stroke-width: 1.5; stroke-dasharray: 4 3; }
.pl-dg .dg-move { stroke: var(--accent); stroke-width: 2.4; fill: none; stroke-linecap: round; }
.pl-dg .dg-ground { stroke: var(--line); stroke-width: 2; }
.pl-dg .dg-ring { fill: none; stroke: var(--line); stroke-width: 2; stroke-dasharray: 3 4; }
.pl-dg .dg-pupil { fill: var(--ink); }
.pl-tips summary { cursor: pointer; font: 600 14px var(--font-sans); color: var(--brand); }
.pl-tips ul { margin: 8px 0 0; padding-left: 20px; color: var(--ink-soft); font-size: 14.5px; line-height: 1.6; }

/* Prompt hub: glow cards with a short output teaser; each opens its own page (owner request 2026-11-19). Tokens only, so dark mode works. */
.pc { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 20px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; isolation: isolate; overflow: hidden; transition: transform 180ms ease-out, box-shadow 180ms ease-out, border-color 180ms ease-out; }
.pc::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity 200ms ease-out; background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--brand) 20%, transparent), transparent 65%); }
.pc:hover, .pc:focus-visible { transform: translateY(-3px); border-color: var(--brand); box-shadow: 0 16px 44px -16px color-mix(in srgb, var(--brand) 60%, transparent), 0 0 0 1px color-mix(in srgb, var(--brand) 40%, transparent); }
.pc:hover::before, .pc:focus-visible::before { opacity: 1; }
.pc[hidden] { display: none; }
.pc h3 { font: 700 19px/1.3 var(--font-display); margin: 0; min-height: 2.6em; } /* two lines, so the teasers line up across a row */
.pc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pc-n { font: 600 12px var(--font-mono); color: var(--ink-muted); }
.pc-out { display: block; border: 1px dashed var(--line); border-radius: var(--radius-md); background: var(--bg); padding: 10px; min-height: 112px; }
.pc-dgs { display: flex; gap: 6px; align-items: center; }
.pc-dgs svg { flex: 1 1 0; min-width: 0; height: auto; color: var(--ink-soft); }
.pc-snip { font: 400 13px/1.55 var(--font-mono); color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.pc-cta { margin-top: auto; display: inline-flex; gap: 6px; align-items: center; font: 700 14px var(--font-sans); color: var(--brand); }
.pc .dg-sub { fill: var(--line); stroke: none; }
.pc .dg-cam rect, .pc .dg-cam path { fill: var(--brand); stroke: none; }
.pc .dg-sight { stroke: var(--brand); stroke-width: 1.5; stroke-dasharray: 4 3; }
.pc .dg-move { stroke: var(--accent); stroke-width: 2.4; fill: none; stroke-linecap: round; }
.pc .dg-ground { stroke: var(--line); stroke-width: 2; }
.pc .dg-ring { fill: none; stroke: var(--line); stroke-width: 2; stroke-dasharray: 3 4; }
.pc .dg-pupil { fill: var(--ink); }
@media (prefers-reduced-motion: reduce) { .pc, .pc::before { transition: none; } .pc:hover, .pc:focus-visible { transform: none; } }
/* a prompt's own page */
.pl-dgsbig { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin: 16px 0; }
.pl-dgbig p { margin: 8px 0 0 !important; font-size: 14.5px !important; line-height: 1.55 !important; color: var(--ink-soft); }
.pl-prompt.pl-final { max-height: none; font-size: 15px; padding: 18px 20px; }
.pl-more { padding-top: 0; }
