:root[data-theme="dark"] {
	--crust:      #11111b;
	--mantle:     #181825;
	--base:       #1e1e2e;
	--surface0:   #313244;
	--surface1:   #45475a;
	--surface2:   #585b70;
	--overlay0:   #6c7086;
	--overlay1:   #7f849c;
	--subtext0:   #a6adc8;
	--subtext1:   #bac2de;
	--text:       #cdd6f4;

	--blue:       #89b4fa;
	--sapphire:   #74c7ec;
	--sky:        #89dceb;
	--lavender:   #b4befe;
	--peach:      #fab387;
	--red:        #f38ba8;

	--glow-rgb:    137, 180, 250;
	--peach-rgb:   250, 179, 135;
	--overlay-rgb: 108, 112, 134;

	--header-bg:        rgba(17, 17, 27, 0.92);
	--btn-primary-text: #11111b;
}

:root[data-theme="light"] {
	--crust:      #dce0e8;
	--mantle:     #e6e9ef;
	--base:       #eff1f5;
	--surface0:   #ccd0da;
	--surface1:   #bcc0cc;
	--surface2:   #acb0be;
	--overlay0:   #9ca0b0;
	--overlay1:   #8c8fa1;
	--subtext0:   #6c6f85;
	--subtext1:   #5c5f77;
	--text:       #4c4f69;

	--blue:       #1e66f5;
	--sapphire:   #209fb5;
	--sky:        #04a5e5;
	--lavender:   #7287fd;
	--peach:      #fe640b;
	--red:        #d20f39;

	--glow-rgb:    30, 102, 245;
	--peach-rgb:   254, 100, 11;
	--overlay-rgb: 156, 160, 176;

	--header-bg:        rgba(239, 241, 245, 0.92);
	--btn-primary-text: #ffffff;
}

:root {
	--radius:    10px;
	--radius-sm: 6px;
	--max:       68rem;
	--read:      44rem;

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

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

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--base);
	color: var(--text);
	font-family: var(--sans);
	font-size: 16px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	transition: background 0.2s ease, color 0.2s ease;
}

.wrap {
	max-width: var(--max);
	margin: 0 auto;
	padding: 0 1.5rem;
}

a {
	color: var(--blue);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

code {
	font-family: var(--mono);
	font-size: 0.875em;
	background: var(--surface0);
	color: var(--sapphire);
	padding: 0.1em 0.4em;
	border-radius: var(--radius-sm);
}

[hidden] {
	display: none !important;
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 10;
	background: var(--header-bg);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--surface0);
}

.site-header .wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.25rem;
	min-height: 3.75rem;
}

.site-nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.25rem;
	font-size: 0.925rem;
}

.site-nav a {
	color: var(--subtext1);
	padding: 0.4rem 0.9rem;
	border-radius: var(--radius-sm);
}

.site-nav a:hover {
	color: var(--blue);
	background: var(--surface0);
	text-decoration: none;
}

.site-nav a.current {
	color: var(--blue);
	background: rgba(var(--glow-rgb), 0.1);
}

.site-nav .gh {
	color: var(--sapphire);
}

.site-nav .nav-download {
	margin-left: 0.5rem;
	background: var(--blue);
	color: var(--btn-primary-text);
	font-weight: 600;
	padding: 0.45rem 1.1rem;
}

.site-nav .nav-download:hover,
.site-nav .nav-download.current {
	background: var(--sapphire);
	color: var(--btn-primary-text);
}

.theme-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-left: 0.25rem;
	width: 2.1rem;
	height: 2.1rem;
	padding: 0;
	border: 1px solid var(--surface0);
	border-radius: var(--radius-sm);
	background: transparent;
	color: var(--subtext1);
	cursor: pointer;
	transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.theme-toggle:hover {
	color: var(--blue);
	background: var(--surface0);
	border-color: var(--surface1);
}

.theme-toggle:focus-visible {
	outline: 2px solid var(--blue);
	outline-offset: 2px;
}

.theme-toggle .icon-moon { display: none; }
.theme-toggle .icon-sun  { display: block; }

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

.menu-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 2.4rem;
	height: 2.4rem;
	padding: 0;
	border: 1px solid var(--surface0);
	border-radius: var(--radius-sm);
	background: transparent;
	color: var(--text);
	cursor: pointer;
	transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.menu-toggle:hover {
	color: var(--blue);
	background: var(--surface0);
	border-color: var(--surface1);
}

.menu-toggle:focus-visible {
	outline: 2px solid var(--blue);
	outline-offset: 2px;
}

.menu-toggle .icon-close { display: none; }
.menu-toggle .icon-menu  { display: block; }

.menu-toggle[aria-expanded="true"] .icon-close { display: block; }
.menu-toggle[aria-expanded="true"] .icon-menu  { display: none; }

.hero {
	padding: 8rem 0 6rem;
	text-align: center;
	background:
		radial-gradient(ellipse 70% 60% at 50% 0%, rgba(var(--glow-rgb), 0.12) 0%, rgba(var(--glow-rgb), 0) 70%),
		var(--base);
}

.wordmark {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 2.5rem;
	margin: 0 0 1.75rem;
	font-size: clamp(4rem, 10vw, 7rem);
	font-weight: 700;
	line-height: 1.25;
	padding-bottom: 0.15em;
	letter-spacing: -0.04em;
	background: linear-gradient(135deg, var(--sky) 0%, var(--blue) 50%, var(--lavender) 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

.wordmark img {
	display: block;
	width: clamp(11rem, 24vw, 17rem);
	height: auto;
	filter: drop-shadow(0 0 48px rgba(var(--glow-rgb), 0.4));
	-webkit-text-fill-color: initial;
}

.tagline {
	font-size: 1.35rem;
	color: var(--subtext1);
	margin: 0 0 2.5rem;
	text-align: center;
}

.lede-tight {
	max-width: var(--read);
	margin: 0 auto 2rem;
	color: var(--overlay1);
	text-align: center;
}

.center-text {
	text-align: center;
}

.actions {
	display: flex;
	gap: 0.75rem;
	justify-content: center;
	flex-wrap: wrap;
}

.btn {
	display: inline-block;
	padding: 0.7rem 1.4rem;
	border: 1px solid var(--surface1);
	border-radius: var(--radius);
	color: var(--text);
	font-weight: 500;
	background: var(--surface0);
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:hover {
	text-decoration: none;
	border-color: var(--surface2);
	background: var(--surface1);
	color: var(--text);
}

.btn.primary {
	background: var(--blue);
	border-color: var(--blue);
	color: var(--btn-primary-text);
	font-weight: 600;
}

.btn.primary:hover {
	background: var(--sapphire);
	border-color: var(--sapphire);
	color: var(--btn-primary-text);
}

.btn.large {
	padding: 0.95rem 2rem;
	font-size: 1.05rem;
}

.facts {
	border-top: 1px solid var(--surface0);
	border-bottom: 1px solid var(--surface0);
	background: var(--mantle);
}

.fact-grid {
	list-style: none;
	margin: 0;
	padding: 1.75rem 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
	gap: 1.25rem 2rem;
}

.fact-grid li {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

.fact-grid .k {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--overlay0);
}

.fact-grid .v {
	color: var(--text);
	font-weight: 500;
}

.spotlight {
	padding: 6rem 0;
}

h2.center {
	font-size: clamp(1.75rem, 4vw, 2.25rem);
	text-align: center;
	margin: 0 0 0.75rem;
	letter-spacing: -0.02em;
}

.spotlight-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
	gap: 1.25rem;
	margin-top: 3rem;
}

.spot {
	background: var(--mantle);
	border: 1px solid var(--surface0);
	border-radius: var(--radius);
	padding: 2rem 1.75rem;
}

.spot-num {
	display: block;
	font-family: var(--mono);
	font-size: 0.85rem;
	color: var(--blue);
	letter-spacing: 0.15em;
	margin-bottom: 1rem;
}

.spot h3 {
	margin: 0 0 0.6rem;
	font-size: 1.2rem;
	color: var(--text);
	letter-spacing: -0.01em;
}

.spot p {
	margin: 0;
	color: var(--subtext0);
	font-size: 0.95rem;
}

.support-strip {
	padding: 6rem 0;
	text-align: center;
	border-top: 1px solid var(--surface0);
}

.support-strip .address-box {
	max-width: 44rem;
	margin: 1.5rem auto 1rem;
	text-align: left;
}

.cta {
	padding: 6rem 0;
	text-align: center;
	background:
		radial-gradient(ellipse 60% 80% at 50% 100%, rgba(var(--glow-rgb), 0.1) 0%, rgba(var(--glow-rgb), 0) 70%),
		var(--mantle);
	border-top: 1px solid var(--surface0);
}

.cta h2 {
	font-size: clamp(1.75rem, 4vw, 2.25rem);
	margin: 0 0 0.75rem;
	letter-spacing: -0.02em;
}

.cta p {
	margin: 0 auto 2rem;
	max-width: var(--read);
	color: var(--subtext0);
}

.page-head {
	padding: 4.5rem 0 2.5rem;
}

.page-head h1 {
	font-size: clamp(2rem, 5vw, 2.75rem);
	margin: 0 0 0.75rem;
	letter-spacing: -0.02em;
	color: var(--text);
}

.page-head p {
	max-width: var(--read);
	margin: 0;
	color: var(--subtext0);
	font-size: 1.05rem;
}

section.block {
	padding: 0 0 3rem;
}

section.block + section.block {
	border-top: 1px solid var(--surface0);
	padding-top: 3rem;
}

h2.section {
	font-size: 1.6rem;
	margin: 0 0 1rem;
	letter-spacing: -0.01em;
	color: var(--text);
}

.section-lede {
	max-width: var(--read);
	color: var(--subtext0);
	margin: 0 0 1.5rem;
}

.cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
	gap: 1rem;
}

.card {
	background: var(--mantle);
	border: 1px solid var(--surface0);
	border-radius: var(--radius);
	padding: 1.5rem;
}

.card h3 {
	margin: 0 0 0.5rem;
	font-size: 1.05rem;
	color: var(--sapphire);
	letter-spacing: -0.005em;
}

.card p {
	margin: 0;
	color: var(--subtext0);
	font-size: 0.95rem;
}

.pkg-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem;
	margin-bottom: 1.2rem;
}

.pkg-search {
	flex: 1 1 18rem;
	max-width: 26rem;
	padding: 0.55rem 0.85rem;
	font: inherit;
	color: var(--text);
	background: var(--mantle);
	border: 1px solid var(--surface0);
	border-radius: 6px;
	outline: none;
}

.pkg-search:focus {
	border-color: var(--blue);
}

.pkg-summary {
	margin-left: auto;
	font-size: 0.9rem;
	color: var(--subtext0);
	opacity: 0.8;
	white-space: nowrap;
}

.pkg-table {
	width: 100%;
	border-collapse: collapse;
}

.pkg-table th,
.pkg-table td {
	padding: 0.6rem 0.75rem;
	text-align: left;
	border-bottom: 1px solid var(--surface0);
}

.pkg-table tbody tr:hover {
	background: var(--mantle);
}

.pkg-table .pkg-name {
	color: var(--blue);
}

.pkg-table .pkg-name a {
	color: inherit;
}

.pkg-table .pkg-name a:hover {
	text-decoration: underline;
}

.pkg-table td:last-child {
	max-width: 32rem;
}

.pkg-table .pkg-updated {
	white-space: nowrap;
	color: var(--subtext0);
}

.pkg-pager {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	margin-bottom: 1rem;
}

.pkg-pager-bottom {
	margin-top: 1.5rem;
	margin-bottom: 0;
	justify-content: flex-end;
}

.pkg-perpage {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	font-size: 0.9rem;
	color: var(--subtext0);
	white-space: nowrap;
}

.pkg-perpage input {
	width: 2.8rem;
	padding: 0.35rem 0.4rem;
	font: inherit;
	font-size: 0.9rem;
	color: var(--text);
	background: var(--mantle);
	border: 1px solid var(--surface0);
	border-radius: 6px;
	outline: none;
	text-align: center;
	-moz-appearance: textfield;
}

.pkg-perpage input::-webkit-outer-spin-button,
.pkg-perpage input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.pkg-perpage input:focus {
	border-color: var(--blue);
}

.pkg-pagination {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 0.3rem;
	flex-wrap: wrap;
}

.pkg-pagination:empty {
	display: none;
}

.pkg-page {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.2rem;
	height: 2.2rem;
	padding: 0 0.6rem;
	font: inherit;
	font-size: 0.9rem;
	color: var(--subtext1);
	background: transparent;
	border: 1px solid transparent;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.pkg-page:hover:not(:disabled):not(.current) {
	color: var(--text);
	background: var(--surface0);
}

.pkg-page.current {
	background: var(--blue);
	color: var(--base);
	border-color: var(--blue);
	font-weight: 600;
	cursor: default;
}

.pkg-page.nav {
	color: var(--subtext0);
	opacity: 0.7;
}

.pkg-page.nav:hover:not(:disabled) {
	opacity: 1;
	color: var(--text);
	background: var(--surface0);
}

.pkg-page:disabled {
	opacity: 0.25;
	cursor: default;
}

.pkg-ellipsis {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.2rem;
	height: 2.2rem;
	font-size: 0.9rem;
	color: var(--overlay0);
	user-select: none;
}

.pkg-note {
	margin: -1rem 0 1.5rem;
	max-width: none;
}

.release {
	margin-bottom: 2.5rem;
}

.release-links {
	margin-left: 0.75rem;
	font-size: 0.875rem;
	font-weight: 400;
	color: var(--overlay0);
}

.release-links a {
	margin: 0 0.15rem;
}

.release:last-child {
	margin-bottom: 0;
}

.release h3 {
	margin: 0 0 0.5rem;
	font-size: 1.15rem;
	color: var(--text);
}

.release .date {
	margin-left: 0.6rem;
	font-size: 0.875rem;
	font-weight: 400;
	color: var(--overlay0);
}

.release ul {
	margin: 0;
	padding-left: 1.25rem;
	color: var(--subtext0);
	font-size: 0.95rem;
}

.release li {
	margin-bottom: 0.3rem;
}

.release li:last-child {
	margin-bottom: 0;
}

.steps {
	list-style: none;
	margin: 0 0 1rem;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
	gap: 0.5rem;
}

.steps li {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.6rem 0.9rem;
	border: 1px solid var(--surface0);
	border-radius: var(--radius-sm);
	background: var(--mantle);
	font-size: 0.925rem;
}

.steps .n {
	font-family: var(--mono);
	font-size: 0.75rem;
	color: var(--blue);
	letter-spacing: 0.05em;
}

.steps .t {
	color: var(--subtext1);
}

.note-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
	gap: 1rem;
	margin-bottom: 1rem;
}

.note {
	border-left: 3px solid var(--blue);
	background: var(--mantle);
	padding: 1.25rem 1.5rem;
	border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.note h4 {
	margin: 0 0 0.4rem;
	font-size: 0.95rem;
	color: var(--sapphire);
}

.note p {
	margin: 0;
	font-size: 0.925rem;
	color: var(--subtext0);
}

.table-wrap {
	overflow-x: auto;
	border: 1px solid var(--surface0);
	border-radius: var(--radius);
	margin-bottom: 1rem;
}

table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.925rem;
}

thead {
	background: var(--surface0);
}

th, td {
	text-align: left;
	padding: 0.7rem 1rem;
	border-bottom: 1px solid var(--surface0);
}

th {
	font-weight: 600;
	color: var(--subtext1);
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

tbody tr:last-child td {
	border-bottom: none;
}

td.muted {
	color: var(--overlay0);
	font-style: italic;
}

.term {
	background: var(--crust);
	border: 1px solid var(--surface0);
	border-radius: var(--radius);
	padding: 1.25rem 1.5rem;
	overflow-x: auto;
	font-family: var(--mono);
	font-size: 0.875rem;
	line-height: 1.7;
	margin: 1rem 0 1.5rem;
	max-width: 100%;
}

.term code {
	background: none;
	padding: 0;
	color: var(--subtext1);
	font-size: inherit;
}

.small {
	font-size: 0.925rem;
	color: var(--subtext0);
	max-width: var(--read);
}

.download-note {
	margin: 0.75rem 0 0;
	font-size: 0.875rem;
	color: var(--overlay0);
}

.coin {
	margin: 1.75rem 0 0.25rem;
	font-size: 1.05rem;
	font-weight: 600;
	color: var(--text);
	letter-spacing: -0.005em;
}

.coin:first-of-type {
	margin-top: 0.5rem;
}

.address-box {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	background: var(--mantle);
	border: 1px solid var(--surface0);
	border-radius: var(--radius);
	padding: 0.5rem 0.5rem 0.5rem 0.9rem;
	margin: 1rem 0 1.25rem;
	max-width: 100%;
}

.btc-icon {
	flex-shrink: 0;
	display: block;
}

.address {
	flex: 1;
	min-width: 0;
	display: flex;
	align-items: center;
	font-family: var(--mono);
	font-size: 0.9rem;
	color: var(--sapphire);
	background: none;
	padding: 0.5rem 0.25rem;
	border-radius: var(--radius-sm);
	overflow-wrap: anywhere;
	word-break: break-all;
	line-height: 1.4;
}

.copy-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.5rem 1rem;
	border: 1px solid var(--blue);
	border-radius: var(--radius-sm);
	background: var(--blue);
	color: var(--btn-primary-text);
	font-family: inherit;
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
	white-space: nowrap;
}

.copy-btn:hover {
	background: var(--sapphire);
	border-color: var(--sapphire);
}

.copy-btn:focus-visible {
	outline: 2px solid var(--blue);
	outline-offset: 2px;
}

.copy-btn.copied {
	background: transparent;
	color: var(--blue);
}

.site-footer {
	border-top: 1px solid var(--surface0);
	background: var(--crust);
	padding: 2.5rem 0;
	color: var(--overlay0);
	font-size: 0.9rem;
	text-align: center;
}

.site-footer a {
	color: var(--subtext0);
}

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

@media (max-width: 720px) {
	.site-header .wrap {
		justify-content: flex-end;
		gap: 0.5rem;
		min-height: 3.25rem;
	}

	.menu-toggle {
		display: inline-flex;
	}

	.theme-toggle {
		margin-left: 0;
		width: 2.4rem;
		height: 2.4rem;
	}

	.site-nav {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding: 0.5rem 1rem 1rem;
		background: var(--header-bg);
		backdrop-filter: blur(12px);
		-webkit-backdrop-filter: blur(12px);
		border-bottom: 1px solid var(--surface0);
	}

	.site-nav.open {
		display: flex;
	}

	.site-nav a {
		padding: 0.85rem 1rem;
		text-align: center;
		border-radius: var(--radius-sm);
	}

	.site-nav .nav-download {
		margin: 0.5rem 0 0;
		padding: 0.85rem 1rem;
	}

	.hero {
		padding: 5rem 0 4rem;
	}

	.wordmark {
		gap: 1.25rem;
	}

	.spotlight,
	.support-strip,
	.cta {
		padding: 4rem 0;
	}

	.page-head {
		padding: 3.5rem 0 2rem;
	}

	.address-box {
		flex-direction: column;
		align-items: stretch;
		gap: 0.75rem;
		padding: 0.9rem;
	}

	.btc-icon {
		align-self: center;
	}

	.address {
		flex: none;
		width: 100%;
		padding: 0;
		font-size: 0.85rem;
	}

	.copy-btn {
		align-self: stretch;
		width: 100%;
		padding: 0.65rem 1rem;
	}
}

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

	body {
		transition: none;
	}

	.btn,
	.theme-toggle,
	.copy-btn,
	.menu-toggle {
		transition: none;
	}
}
