/* Shared styles (src/layouts/Page.astro links this file). */
:root {
	color-scheme: light dark;
	--bg: #f8fafc;
	--surface: #fff;
	--text: #172033;
	--muted: #526176;
	--border: #dce3ee;
	--brand: #2166d9;
	--brand-strong: #1755c5;
	--brand-soft: #eaf1fd;
	--link: #1755c5;
	--btn: #2166d9;
	--btn-text: #fff;
	--image-bg: #fff;
	--shadow: 0 1px 2px rgba(23, 32, 51, 0.06), 0 8px 24px rgba(23, 32, 51, 0.08);
	--font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
		sans-serif;
}
@media (prefers-color-scheme: dark) {
	:root {
		--bg: #0f1521;
		--surface: #172031;
		--text: #e6ebf3;
		--muted: #9aa8bc;
		--border: #2a3548;
		--brand-soft: #1a2a47;
		--link: #8ab4ff;
		--btn: #2563eb;
		--shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
	}
}
* {
	box-sizing: border-box;
}
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 17px / 1.65 var(--font);
}
a {
	color: var(--link);
	text-underline-offset: 3px;
}
:focus-visible {
	outline: 3px solid var(--link);
	outline-offset: 3px;
	border-radius: 4px;
}
.wrap,
main {
	width: min(1120px, calc(100% - 32px));
	margin: 0 auto;
}
main {
	padding: 32px 0 64px;
}
h1 {
	font-size: clamp(32px, 5vw, 48px);
	line-height: 1.15;
	letter-spacing: -.025em;
	margin: 0 0 16px;
}
h2 {
	font-size: 24px;
	line-height: 1.3;
	margin: 40px 0 12px;
	letter-spacing: -.01em;
}
h3 {
	font-size: 19px;
	line-height: 1.35;
}
p,
li {
	max-width: 76ch;
}
.muted {
	color: var(--muted);
	font-size: 15px;
}
.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}
.site-header {
	background: var(--surface);
	border-bottom: 1px solid var(--border);
}
.header-inner {
	display: flex;
	align-items: center;
	gap: 24px;
	min-height: 68px;
	padding: 10px 0;
}
.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--text);
	font-size: 21px;
	font-weight: 750;
	letter-spacing: -.02em;
	text-decoration: none;
	flex: none;
}
.logo {
	display: block;
	flex: none;
}
.main-nav {
	display: flex;
	gap: 20px;
	font-size: 15px;
	font-weight: 550;
}
.main-nav a {
	color: var(--text);
	text-decoration: none;
}
.main-nav a:hover {
	color: var(--link);
	text-decoration: underline;
}
.search {
	display: flex;
	flex: 1;
	min-width: 0;
	max-width: 360px;
	margin-left: auto;
}
.search input {
	flex: 1;
	width: 100%;
	min-width: 0;
	height: 40px;
	padding: 0 12px;
	border: 1px solid var(--border);
	border-right: 0;
	border-radius: 8px 0 0 8px;
	background: var(--bg);
	color: var(--text);
	font: inherit;
	font-size: 15px;
}
.search input::placeholder {
	color: var(--muted);
}
.search button {
	height: 40px;
	padding: 0 14px;
	border: 1px solid var(--btn);
	border-radius: 0 8px 8px 0;
	background: var(--btn);
	color: var(--btn-text);
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}
.search-large {
	max-width: 520px;
	margin: 20px 0;
}
.search-large input,
.search-large button {
	height: 48px;
	font-size: 17px;
}
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 18px;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 650;
	text-decoration: none;
	white-space: nowrap;
	border: 2px solid transparent;
}
.btn-primary {
	background: var(--btn);
	border-color: var(--btn);
	color: var(--btn-text);
}
.btn-outline {
	border-color: var(--btn);
	color: var(--link);
	background: transparent;
}
.btn-light {
	background: #fff;
	color: #1755c5;
}
.btn-light-outline {
	border-color: #fff;
	color: #fff;
}
.btn:hover {
	filter: brightness(1.08);
}
.btn-small {
	min-height: 40px;
	padding: 8px 14px;
	font-size: 15px;
}
.header-cta {
	flex: none;
}
.store-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}
.install-cta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	margin: 40px 0;
	padding: 24px;
	border: 1px solid var(--border);
	border-radius: 12px;
	background: var(--brand-soft);
}
.install-cta p {
	margin: 0 0 6px;
}
.install-cta-title {
	font-size: 20px;
	font-weight: 700;
}
.install-cta-note {
	margin: 0 !important;
}
.site-footer {
	margin-top: 24px;
	border-top: 1px solid var(--border);
	background: var(--surface);
	color: var(--muted);
	font-size: 15px;
}
.footer-grid {
	display: grid;
	grid-template-columns: 1.4fr repeat(4, 1fr);
	gap: 32px;
	padding: 48px 0 32px;
}
.footer-grid h2 {
	margin: 0 0 12px;
	font-size: 15px;
	color: var(--text);
}
.footer-grid ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 8px;
}
.footer-grid a {
	color: var(--muted);
	text-decoration: none;
}
.footer-grid a:hover {
	color: var(--link);
	text-decoration: underline;
}
.footer-brand {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 12px;
	color: var(--text);
	font-size: 18px;
	font-weight: 750;
}
.footer-grid p {
	margin: 0;
}
.footer-bottom {
	border-top: 1px solid var(--border);
	padding: 20px 0 32px;
	font-size: 14px;
}
.footer-bottom p {
	margin: 4px 0;
	max-width: none;
}
.narrow {
	max-width: 820px;
}
.narrow h1 {
	font-size: 40px;
}
.narrow h2 {
	margin-top: 32px;
}
.data-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 16px;
	font-variant-numeric: tabular-nums;
}
.data-table th,
.data-table td {
	padding: 8px 12px 8px 0;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid var(--border);
}
.data-table thead th {
	font-size: 14px;
	font-weight: 600;
	color: var(--muted);
}
.data-table .num {
	text-align: right;
}
.table-scroll {
	overflow-x: auto;
}
@media (max-width: 860px) {
	.header-inner {
		flex-wrap: wrap;
		gap: 8px 16px;
	}
	.main-nav {
		margin-left: auto;
		gap: 16px;
	}
	.search {
		order: 3;
		flex-basis: 100%;
		max-width: none;
		margin: 0 0 4px;
	}
	.header-cta {
		display: none;
	}
	.footer-grid {
		grid-template-columns: 1fr 1fr;
	}
	.footer-grid > div:first-child {
		grid-column: 1 / -1;
	}
	.install-cta {
		flex-direction: column;
		align-items: flex-start;
	}
}
@media (max-width: 400px) {
	.price-table td,
	.price-table thead th {
		padding-right: 6px;
	}
	body {
		font-size: 16px;
	}
	.brand {
		font-size: 19px;
	}
	.main-nav {
		gap: 12px;
		font-size: 14px;
	}
	main {
		padding-top: 20px;
	}
	.data-table {
		font-size: 14px;
	}
	.data-table th,
	.data-table td {
		padding-right: 8px;
	}
	.price-table td,
	.price-table thead th {
		padding-left: 8px;
	}
}
/* Breadcrumbs (src/components/Breadcrumbs.astro) */
.crumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 8px;
	list-style: none;
	padding: 0;
	margin: 0 0 20px;
	font-size: 14px;
	color: #526176;
}
.crumbs li + li:before {
	content: "›";
	margin-right: 8px;
}
/* Set pages (src/pages/sets/[setNumber].astro) */
.set-intro {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
	gap: 40px;
	align-items: start;
}
.set-image {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: contain;
	padding: 12px;
	background: var(--image-bg);
	border: 1px solid var(--border);
	border-radius: 12px;
}
.set-media {
	position: sticky;
	top: 24px;
}
.facts {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 6px 24px;
	margin: 0;
}
.facts dt {
	color: var(--muted);
}
.facts dd {
	margin: 0;
	font-weight: 600;
}
.summary {
	font-size: 18px;
	margin: 0 0 20px;
}
.price-unknown {
	margin-top: 24px;
}
.price-table td,
.price-table thead th {
	text-align: right;
	padding-left: 12px;
}
.price-table th:first-child {
	text-align: left;
	padding-left: 0;
}
.price-table td {
	font-weight: 650;
	white-space: nowrap;
}
.price-table thead th {
	white-space: normal;
	vertical-align: bottom;
}
.price-table thead small {
	display: block;
	font-weight: 400;
}
.per-piece {
	display: block;
	font-size: 13px;
	font-weight: 400;
	color: var(--muted);
	white-space: normal;
}
.related {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 4px 24px;
	padding-left: 20px;
}
.related-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
	margin: 12px 0 0;
}
.related-links p {
	margin: 0;
}
.nearby {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 12px;
	margin: 32px 0;
	font-size: 15px;
}
.source {
	margin-top: 28px;
}
@media (max-width: 480px) {
	.price-table thead th:first-child,
	.price-table tbody th {
		position: absolute;
		width: 1px;
		height: 1px;
		padding: 0;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}
	.price-table td:nth-child(2),
	.price-table thead th:nth-child(2) {
		padding-left: 0;
	}
	.price-table td,
	.price-table thead th {
		text-align: left;
		padding-left: 0;
	}
	.price-table td {
		font-size: clamp(13px, 4vw, 15px);
	}
}
@media (max-width: 760px) {
	.set-intro {
		grid-template-columns: minmax(0, 1fr);
		gap: 24px;
	}
	.set-media {
		position: static;
	}
}
/* Year, theme and search result pages */
@media (max-width: 420px) {
	.set-table th:nth-child(3),
	.set-table td:nth-child(3) {
		display: none;
	}
}
.set-table td:first-child {
	white-space: nowrap;
}
.year-heading {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 16px;
}
.year-heading h2 {
	margin-bottom: 8px;
}
.year-heading a {
	font-size: 15px;
}
.pages {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 28px 0;
}
.pages a,
.pages span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 6px 10px;
	border-radius: 8px;
}
.pages span {
	background: var(--brand-soft);
	font-weight: 700;
}
/* Try it (src/components/TryIt.astro) */
.try-it {
	margin: 32px 0;
	padding: 24px;
	border: 1px solid var(--border);
	border-radius: 12px;
	background: var(--brand-soft);
}
.try-it p {
	margin: 0 0 8px;
}
.try-it-title {
	font-size: 20px;
	font-weight: 700;
}
.try-it-listing {
	margin: 12px 0 16px;
	padding: 16px;
	border: 1px solid var(--border);
	border-radius: 8px;
	background: var(--surface);
}
.try-it-listing p {
	margin: 0;
	font-weight: 600;
}
.try-it-price {
	font-size: 22px;
	font-weight: 750 !important;
}
/* 404 and search results */
.not-found ul {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
	list-style: none;
	padding: 0;
	margin: 24px 0 0;
	font-weight: 600;
}
.set-table td:first-child {
	white-space: nowrap;
}
.search-tips {
	margin-top: 32px;
}
