/*
 * Page chrome for the standalone example pages — the header, footer and typography
 * around the map. It is deliberately NOT part of any example: everything a given
 * example needs to work lives in that page's own <style> and <script> blocks.
 */

:root {
	color-scheme: light dark;

	--bg: #ffffff;
	--bg-soft: #f6f7f9;
	--border: #e3e6ea;
	--text: #16191d;
	--text-soft: #5b6570;
	--text-faint: #8a939d;
	--accent: #1f6feb;

	--mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
	--sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #0f1215;
		--bg-soft: #15191e;
		--border: #262c34;
		--text: #e7ebef;
		--text-soft: #a3adb8;
		--text-faint: #6f7982;
		--accent: #4c9aff;
	}
}

* { box-sizing: border-box; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--sans);
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
	font-family: var(--mono);
	font-size: 0.875em;
	background: var(--bg-soft);
	border: 1px solid var(--border);
	border-radius: 4px;
	padding: 0.1em 0.35em;
}

.wrap { max-width: 900px; margin: 0 auto; padding: 0 24px; }

/* ---------- header ---------- */

.example-head { padding: 28px 0 20px; }

.crumbs {
	font-size: 0.85rem;
	color: var(--text-faint);
	margin-bottom: 14px;
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
}
.crumbs a { color: var(--text-soft); }
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { color: var(--border); }

.example-head h1 {
	font-size: clamp(1.6rem, 4vw, 2.1rem);
	letter-spacing: -0.025em;
	margin: 0 0 8px;
	font-weight: 660;
	line-height: 1.15;
}

.example-head p { margin: 0; color: var(--text-soft); max-width: 66ch; }

/* ---------- map ---------- */

#map {
	border: 1px solid var(--border);
	border-radius: 10px;
	/* Each page sets its own height — see the <style> block in the page source */
}

/* ---------- notes ---------- */

.notes { padding: 24px 0 8px; }
.notes h2 { font-size: 1.05rem; margin: 0 0 8px; font-weight: 620; }
.notes ul { margin: 0; padding-left: 20px; color: var(--text-soft); }
.notes li { margin-bottom: 6px; max-width: 66ch; }
.notes li:last-child { margin-bottom: 0; }

.hint {
	border: 1px solid var(--border);
	border-left: 3px solid var(--accent);
	border-radius: 8px;
	background: var(--bg-soft);
	padding: 12px 16px;
	margin: 20px 0 0;
	font-size: 0.92rem;
	color: var(--text-soft);
}
.hint strong { color: var(--text); font-weight: 620; }

.view-source {
	margin: 20px 0 0;
	font-size: 0.9rem;
	color: var(--text-soft);
}

/* ---------- footer ---------- */

.example-foot {
	border-top: 1px solid var(--border);
	margin-top: 32px;
	padding: 20px 0 48px;
	font-size: 0.85rem;
	color: var(--text-faint);
}
.example-foot p { margin: 0; }

/* ---------- index page ---------- */

.example-list {
	list-style: none;
	padding: 0;
	margin: 24px 0 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 12px;
}

.example-list li { margin: 0; }

.example-list a {
	display: block;
	border: 1px solid var(--border);
	border-radius: 10px;
	padding: 14px 16px;
	height: 100%;
	color: inherit;
}
.example-list a:hover { border-color: var(--accent); text-decoration: none; }

.example-list strong { display: block; font-weight: 620; margin-bottom: 3px; }
.example-list span { font-size: 0.87rem; color: var(--text-soft); }
