/*
 * Minifree storefront stylesheet
 * Released under Creative Commons Zero 1.0 Universal:
 * https://creativecommons.org/publicdomain/zero/1.0/legalcode.txt
 */

:root {
	color-scheme: light dark;
	--page-width: 100rem;
	--content-width: 72ch;
	--radius-sm: 0.45rem;
	--radius: 0.8rem;
	--radius-lg: 1.2rem;
	--shadow-sm: 0 1px 2px rgb(28 19 26 / 8%), 0 4px 14px rgb(28 19 26 / 5%);
	--shadow: 0 10px 35px rgb(28 19 26 / 10%);

	--bg: #f4f3f5;
	--surface: #ffffff;
	--surface-soft: #f8f7f9;
	--surface-strong: #eeeaf0;
	--text: #201a1f;
	--text-muted: #655d64;
	--border: #ddd7dc;
	--brand: #5d173f;
	--brand-strong: #42102d;
	--brand-soft: #f3e8ef;
	--accent: #a52d63;
	--success: #176b4d;
	--focus: #d24983;
}

* {
	box-sizing: border-box;
}

html {
	min-height: 100%;
	background: var(--bg);
	color: var(--text);
	font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
		"Segoe UI", sans-serif;
	font-size: 120%;
	line-height: 1.65;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	padding: 1.25rem 1rem 6.5rem;
}

.page {
	width: min(100%, var(--page-width));
	margin: 0 auto;
	padding: clamp(1rem, 2.5vw, 2.25rem);
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow);
}

/* Typography */

h1,
h2,
h3,
h4 {
	margin: 0.5em 0 0.25em;
	color: var(--text);
	font-weight: 700;
	line-height: 1.18;
	letter-spacing: -0.025em;
}

h1 {
	font-size: clamp(1.85rem, 4vw, 3rem);
}

h2 {
	font-size: clamp(1.45rem, 2.7vw, 2rem);
}

h3 {
	font-size: clamp(1.2rem, 2vw, 1.5rem);
}

h4 {
	font-size: 1.12rem;
}

p,
ul,
ol,
blockquote,
pre,
table {
	margin-top: 0;
	margin-bottom: 1.25rem;
}

.page > p {
	max-width: var(--content-width);
	margin-right: auto;
	margin-left: auto;
}

strong {
	font-weight: 750;
}

small,
.date,
.author {
	color: var(--text-muted);
}

hr {
	display:none !important;
}

/* Links and focus */

a {
	color: var(--brand);
	font-weight: 600;
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.18em;
}

a:hover {
	color: var(--accent);
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--focus) 65%, transparent);
	outline-offset: 3px;
	border-radius: var(--radius-sm);
}

/* Header and shop navigation */

header {
	margin: calc(clamp(1rem, 2.5vw, 2.25rem) * -1);
	margin-bottom: 1.5rem;
	padding: clamp(1.1rem, 3vw, 1rem);
	padding-left: 2.2em;
	padding-right: 2.2em;
	color: #fff;
	background:
		radial-gradient(circle at top right, rgb(255 255 255 / 13%), transparent 35%),
		linear-gradient(135deg, var(--brand-strong), var(--brand));
	border-radius: calc(var(--radius-lg) - 1px) calc(var(--radius-lg) - 1px) 0 0;
}

header .title {
	position: relative;
	margin: 0;
	padding: 0;
}

header .title:hover {
	cursor: pointer;
}

header h1.title {
	max-width: 100%;
	margin: 0;
	padding: 0;
	color: #fff;
	font-size: clamp(1.65rem, 4vw, 2.3rem);
	font-weight: 800;
	letter-spacing: -0.035em;
}

header .title-logo {
	margin: 0 0 0.8rem;
}

header img.title-logo {
	width: 3rem;
	height: 3rem;
	padding: 0.2rem;
	background: #fff;
	border: 0;
	border-radius: 0.65rem;
	box-shadow: none;
}

header > ul, .quicknav, #footer > ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 1.25rem 0 0;
	padding: 0;
	list-style: none;
}

header > ul + ul {
	margin-top: 0.7rem;
	padding-top: 0.7rem;
	border-top: 1px solid rgb(255 255 255 / 18%);
}

header > ul > li {
	margin: 0;
}

header > ul > li > a {
	display: inline-flex;
	align-items: center;
	min-height: 2.45rem;
	padding: 0.42rem 0.8rem;
	color: #fff;
	background: rgb(255 255 255 / 9%);
	border: 1px solid rgb(255 255 255 / 15%);
	border-radius: 999px;
	font-size: 0.93rem;
	font-weight: 650;
	text-decoration: none;
	transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

header > ul > li > a:hover {
	color: #fff;
	background: rgb(255 255 255 / 18%);
	border-color: rgb(255 255 255 / 32%);
	transform: translateY(-1px);
}

header > ul > li > strong > a {
	display: inline-flex;
	align-items: center;
	min-height: 2.45rem;
	padding: 0.42rem 0.85rem;
	color: var(--brand-strong);
	background: #fff;
	border: 1px solid #fff;
	border-radius: 999px;
	font-size: 0.93rem;
	font-weight: 800;
	text-decoration: none;
	box-shadow: 0 5px 16px rgb(20 4 15 / 18%);
}

header > ul > li > strong > a:hover {
	color: var(--accent);
	background: #fff;
}

header > ul > li > strong:first-child:not(:has(a)) {
	display: inline-flex;
	align-items: center;
	min-height: 2.45rem;
	color: rgb(255 255 255 / 78%);
	font-size: 0.82rem;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

header hr {
	display: none !important;
}

/* Product cards and specification panels */

.specs {
	float: none;
	margin: 0 0 1.5rem;
	margin-left:1.5rem;
	padding: clamp(1rem, 2vw, 1.4rem);
	overflow: hidden;
	background: var(--surface-soft);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-sm);
}

.page > .specs {
	display: inline-block;
	width: calc(50% - 0.7rem);
	margin-right: 1rem;
	vertical-align: top;
}

.page > .specs:nth-of-type(even) {
	margin-right: 0;
}

.pagetext > .specs {
	/* width: 100%; */
	max-width: 30em;
	float: right;
}

.specs center {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	text-align: center;
}

.specs center br {
	display: none;
}

.specs center > strong {
	flex-basis: 100%;
	padding: 0.9rem 1rem;
	color: var(--brand-strong);
	background: var(--brand-soft);
	border-radius: var(--radius-sm);
}

table {
	width: 100%;
	border-spacing: 0;
	border-collapse: separate;
	overflow: hidden;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
}

th,
td {
	padding: 0.78rem 0.9rem;
	vertical-align: top;
	text-align: left;
	border-bottom: 1px solid var(--border);
}

th {
	color: #fff;
	background: var(--brand);
	font-size: 0.86rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

th em {
	font-style: normal;
}

tr:last-child > td,
tbody:last-child tr:last-child > th {
	border-bottom: 0;
}

tbody tr:nth-child(even) td {
	background: var(--surface-soft);
}

td:first-child {
	width: 38%;
	color: var(--text-muted);
}

/* Product media */

img,
video,
iframe,
pre {
	max-width: 100%;
}

img {
	height: auto;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-sm);
}

img[tabindex],
a img {
	transition: transform 160ms ease, box-shadow 160ms ease;
}

img[tabindex]:hover,
a:hover img {
	transform: translateY(-2px);
	box-shadow: var(--shadow);
}

img[tabindex] {
	cursor: zoom-in;
}

header img,
.f img {
	transform: none;
}

.p {
	width: auto;
	max-width: min(100%, 15rem);
	max-height: 15rem;
	object-fit: contain;
}

.l,
.r {
	max-width: min(38%, 22rem);
	margin: 0.35rem 1.5rem 1rem;
}

.l {
	float: left;
	margin-left: 0;
}

.r {
	float: right;
	margin-right: 0;
}

iframe,
video {
	display: block;
	aspect-ratio: 16 / 9;
	margin: 1.5rem auto;
	background: #000;
	border: 0;
	border-radius: var(--radius);
	box-shadow: var(--shadow-sm);
}

/* Enlarged image overlay */

.f,
.f * {
	position: fixed;
	z-index: 1000;
	max-width: 100%;
	max-height: 100%;
}

.f {
	display: none;
	top: 0 !important;
	left: 0 !important;
	width: 100%;
	height: 100%;
	padding: 5vh 5vw;
	background: rgb(12 8 11 / 88%);
	backdrop-filter: blur(7px);
}

.f * {
	max-width: 90vw;
	max-height: 90vh;
	transform: translate(-50%, -50%);
	border-color: rgb(255 255 255 / 25%);
	box-shadow: 0 24px 80px rgb(0 0 0 / 55%);
}

*:focus + .f {
	display: block;
}

/* Product-page contents */

#TOC {
	margin: 0 0 1.5rem;
	padding: 1.1rem;
	background: var(--surface-soft);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-sm);
}

#TOC h2 {
	margin: 0 0 0.8rem;
	font-size: 0.83rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

#TOC ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

#TOC li + li {
	margin-top: 0.55rem;
}

#TOC a {
	display: block;
	padding: 0.45rem 0.6rem;
	color: var(--text-muted);
	border-radius: var(--radius-sm);
	font-size: 0.92rem;
	line-height: 1.35;
	text-decoration: none;
}

#TOC a:hover {
	color: var(--brand);
	background: var(--brand-soft);
}

.h {
	display: flex;
	align-items: baseline;
	gap: 0.55rem;
/*	clear: both; */
}

.h h2 {
	margin-right: 0;
}

.h > a {
	color: var(--text-muted);
	opacity: 0;
	text-decoration: none;
	transition: opacity 150ms ease;
}

.h:hover > a,
.h:focus-within > a {
	opacity: 1;
}

code,
pre {
	font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

code {
	padding: 0.12em 0.35em;
	border-radius: 0.3em;
	font-size: 0.92em;
}

pre {
	overflow: auto;
	background: #423640;
}

.uri {
	overflow-wrap: anywhere;
}

/* Footer */

#footer {
	clear: both;
	margin: 3rem calc(clamp(1rem, 2.5vw, 2.25rem) * -1)
		calc(clamp(1rem, 2.5vw, 2.25rem) * -1);
	padding: 1.5rem clamp(1rem, 2.5vw, 2.25rem);
	color: var(--text-muted);
	background: var(--surface-soft);
	border-top: 1px solid var(--border);
	border-radius: 0 0 calc(var(--radius-lg) - 1px) calc(var(--radius-lg) - 1px);
	font-size: 0.9rem;
}

#footer p {
	margin-bottom: 0.65rem;
}

#footer hr {
	display: none !important;
}

/* Fixed purchase bar */

.fcc,
.fcc_mobile {
	position: fixed;
	z-index: 900;
	right: 0;
	bottom: 0;
	left: 0;
	min-height: 3.8rem;
	padding: 0.75rem max(1rem, env(safe-area-inset-right))
		calc(0.75rem + env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
	color: #fff;
	background: rgb(46 10 32 / 96%);
	border-top: 1px solid rgb(255 255 255 / 14%);
	box-shadow: 0 -8px 30px rgb(31 9 24 / 20%);
	backdrop-filter: blur(10px);
	text-align: center;
}

.fcc p,
.fcc_mobile p {
	margin: 0;
}

.fcc a,
.fcc_mobile a {
	display: inline-block;
	margin: 0.1rem 0.12rem;
	padding: 0.28rem 0.55rem;
	color: var(--brand-strong);
	background: #fff;
	border-radius: 999px;
	font-weight: 800;
	text-decoration: none;
}

.fcc a:hover,
.fcc_mobile a:hover {
	color: var(--accent);
	background: #fff;
}

.fcc {
	display: none !important;
}

.fcc_mobile {
	display: block !important;
	font-size: 0.83rem;
}

/* Desktop product layout */

@media (min-width: 65rem) {
	html {
		font-size:100%;
	}

	body {
		padding: 2rem 1.5rem 6.5rem;
	}

	header .title-logo {
		display: none;
	}

	header h1.title {
		min-height: 5.5rem;
		padding-right: 5.5rem;
		background: url("/favicon.ico") no-repeat right center / 5.5rem 5.5rem;
	}

	.page > #TOC {
		position: sticky;
		top: 1.5rem;
		float: right;
		width: 17.5rem;
		max-height: calc(100vh - 3rem);
		overflow: auto;
	}

	.page > #TOC + .pagetext {
		margin-right: 19rem;
	}

	.fcc {
		display: block !important;
	}

	.fcc_mobile {
		display: none !important;
	}
}

@media (min-width: 100rem) {
	html {
		font-size:110%;
	}
}

@media (max-width: 48rem) {
	body {
		padding: 0;
	}

	.page {
		padding: 1rem;
		border-right: 0;
		border-left: 0;
		border-radius: 0;
		box-shadow: none;
	}

	header {
		margin: -1rem -1rem 1.5rem;
		padding: 1.2rem 1rem;
		border-radius: 0;
	}

	header > ul {
		gap: 0.4rem;
	}

	header > ul > li > a,
	header > ul > li > strong > a {
		min-height: 2.2rem;
		padding: 0.35rem 0.65rem;
		font-size: 0.86rem;
	}

	.page > .specs {
		display: block;
		width: 100%;
		margin-right: 0;
	}

	th,
	td {
		padding: 0.65rem 0.7rem;
		font-size: 0.92rem;
	}

	td:first-child {
		width: 44%;
	}

	.l,
	.r {
		float: none;
		display: block;
		max-width: 100%;
		margin: 1rem auto;
	}

	#footer {
		margin-right: -1rem;
		margin-bottom: -1rem;
		margin-left: -1rem;
		border-radius: 0;
	}
}

@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;
	}
}

.specs img {
	max-width: 45%;
}

@media (prefers-color-scheme: light) {
	pre, code {
		background: #eee;
	}
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #151215;
		--surface: #201b20;
		--surface-soft: #282228;
		--surface-strong: #352d34;
		--text: #f1e9ef;
		--text-muted: #c3b7c0;
		--border: #453b43;
		--brand: #d781aa;
		--brand-strong: #fff;
		--brand-soft: #3b2532;
		--accent: #f0a2c6;
		--focus: #f0a2c6;
		--shadow-sm: 0 1px 2px rgb(0 0 0 / 25%), 0 6px 18px rgb(0 0 0 / 18%);
		--shadow: 0 18px 45px rgb(0 0 0 / 28%);
	}

	header {
		background:
			radial-gradient(circle at top right, rgb(255 255 255 / 10%), transparent 35%),
			linear-gradient(135deg, #341022, #5b173f);
	}

	header > ul > li > strong > a,
	.fcc a,
	.fcc_mobile a {
		color: #4a1233;
	}

	th {
		color: #fff;
		background: #662249;
	}

	img {
		background: #f5f2f4;
	}
}

/* duplicated in the page text as well. hide it in the header. */
.author, .date {display: none; }
