/*
 * Year of the Linux Desktop: site styles.
 * Colours come only from the theme roles in themes.css.
 *
 * Concept: the page is a riced Linux session. A sidebar holds the numbered
 * sections (workspaces, keys 1-9 and 0); content sits in tiled windows with
 * 1px structure; the hero terminal is the one loud element.
 *
 * Type: Inter for everything you read, JetBrains Mono only where the Linux
 * vernacular is literal (terminals, commands, keys, workspace numbers).
 */

/* ---------- fonts (OFL, self-hosted; see include/yotld/fonts) ---------- */
@font-face {
	font-family: "Inter Variable";
	src: url("../fonts/inter-latin-opsz-normal.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Inter Variable";
	src: url("../fonts/inter-latin-opsz-italic.woff2") format("woff2");
	font-weight: 100 900;
	font-style: italic;
	font-display: swap;
}
@font-face {
	font-family: "JetBrains Mono Variable";
	src: url("../fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
	font-weight: 100 800;
	font-style: normal;
	font-display: swap;
}

/* ---------- base ---------- */
:root {
	--sans: "Inter Variable", "Inter", "Adwaita Sans", system-ui, sans-serif;
	--mono: "JetBrains Mono Variable", "JetBrains Mono", "Adwaita Mono", ui-monospace, monospace;
	--side-w: 272px;
	--top-h: 0px;
	--wrap: 1180px;
	--gutter: clamp(16px, 3vw, 44px);
	--apps-bar-h: 0px;
}

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

html {
	background: var(--bg);
	color: var(--ink);
	font: 400 16px/1.65 var(--sans);
	font-optical-sizing: auto;
	font-feature-settings: "cv11", "ss03";
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--top-h) + 20px);
}

/* A wide page scrollbar: the page is long, so make it easy to grab.
   Chromium and Safari take ::-webkit-scrollbar (setting scrollbar-color
   there would switch them to the thin standard bar, so only Firefox gets
   it); Firefox's widest option is its default "auto" width. */
@supports selector(::-webkit-scrollbar) {
	html::-webkit-scrollbar {
		width: 18px;
		height: 18px;
	}

	html::-webkit-scrollbar-track {
		background: var(--bg);
	}

	html::-webkit-scrollbar-thumb {
		min-height: 56px;
		border: 4px solid var(--bg);
		border-radius: 999px;
		background: var(--line-strong);
	}

	html::-webkit-scrollbar-thumb:hover {
		background: var(--ink-3);
	}

	html::-webkit-scrollbar-thumb:active {
		background: var(--accent);
	}
}

@supports not selector(::-webkit-scrollbar) {
	html {
		scrollbar-width: auto;
		scrollbar-color: var(--line-strong) var(--bg);
	}
}

body {
	margin: 0;
	min-height: 100vh;
	padding-left: var(--side-w);
	overflow-x: clip;
}

::selection {
	background: var(--sel);
	color: var(--ink);
}

/* load-bearing: width/height attributes reserve space, CSS keeps the ratio */
img,
video {
	max-width: 100%;
	height: auto;
}

a {
	color: var(--accent);
	text-underline-offset: 0.2em;
	text-decoration-thickness: 1px;
}

a:hover {
	text-decoration-thickness: 2px;
}

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
	border-radius: 2px;
}

h1,
h2,
h3,
h4,
h5 {
	color: var(--ink);
	text-wrap: balance;
}

p,
li,
dd {
	text-wrap: pretty;
}

code,
kbd,
pre {
	font-family: var(--mono);
}

code {
	font-size: 0.86em;
	padding: 0.1em 0.38em;
	border-radius: var(--radius-sm);
	background: var(--surface-3);
	color: var(--ink);
	overflow-wrap: break-word;
}

pre code {
	white-space: pre;
}

kbd {
	display: inline-block;
	min-width: 1.9em;
	padding: 0.1em 0.45em;
	font-size: 0.8em;
	line-height: 1.5;
	text-align: center;
	color: var(--ink);
	background: var(--surface-2);
	border: 1px solid var(--line-strong);
	border-bottom-width: 2px;
	border-radius: var(--radius-sm);
	white-space: nowrap;
}

strong,
b {
	font-weight: 650;
}

hr {
	border: 0;
	border-top: 1px solid var(--line);
	margin: 24px 0;
}

/* the hidden attribute always wins over component display rules */
[hidden] {
	display: none !important;
}

.sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: fixed;
	left: 12px;
	top: -60px;
	z-index: 100;
	padding: 10px 14px;
	background: var(--action);
	color: var(--on-action);
	border-radius: var(--radius-sm);
	font-weight: 600;
}

.skip-link:focus {
	top: 10px;
}

.wrap {
	width: 100%;
	max-width: calc(var(--wrap) + 2 * var(--gutter));
	margin-inline: auto;
	padding-inline: var(--gutter);
}

/* legacy palette names still used inside data-file HTML fragments */
.color.winblows { color: var(--blue); }
.color.terminal { color: var(--green); }
.color.halt { color: var(--red); }
.color.firefox { color: var(--orange); }
.color.loonix { color: var(--yellow); }
.color.nebula { color: var(--purple); }
.color.neutron { color: var(--ink-2); }
.strong,
.bold { font-weight: 650; }
.uppercase { text-transform: uppercase; }

/* tone hook: any element with data-tone exposes --tone */
[data-tone="blue"] { --tone: var(--blue); }
[data-tone="green"] { --tone: var(--green); }
[data-tone="red"] { --tone: var(--red); }
[data-tone="orange"] { --tone: var(--orange); }
[data-tone="yellow"] { --tone: var(--yellow); }
[data-tone="purple"] { --tone: var(--purple); }
[data-tone="cyan"] { --tone: var(--cyan); }

/* ---------- buttons ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 40px;
	padding: 0 16px;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius-sm);
	background: var(--surface-2);
	color: var(--ink);
	font: 550 14.5px/1.2 var(--sans);
	text-decoration: none;
	cursor: pointer;
	white-space: nowrap;
	transition: background-color 0.12s, border-color 0.12s, color 0.12s;
}

.btn:hover {
	background: var(--hover);
	text-decoration: none;
}

.btn i {
	font-size: 1.15em;
}

.btn-primary {
	background: var(--action);
	border-color: transparent;
	color: var(--on-action);
}

.btn-primary:hover {
	background: var(--action-hover);
}

.btn-sm {
	min-height: 34px;
	padding: 0 12px;
	font-size: 13.5px;
}

.btn-lg {
	min-height: 48px;
	padding: 0 22px;
	font-size: 15.5px;
}

.btn-row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 20px 0;
}

@media (pointer: coarse) {
	.btn-sm {
		min-height: 42px;
	}
}

.icon-btn {
	display: grid;
	place-items: center;
	flex: none;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 1px solid var(--panel-line);
	border-radius: var(--radius-sm);
	background: transparent;
	color: var(--panel-ink);
	font-size: 19px;
	cursor: pointer;
}

.icon-btn:hover {
	background: var(--panel-hover);
}

/* ---------- sidebar (global navigation) ---------- */
.sidebar,
.topbar {
	--p-accent: var(--panel-accent, var(--accent));
	color: var(--panel-ink);
	background: var(--panel);
}

.sidebar {
	position: fixed;
	inset: 0 auto 0 0;
	z-index: 60;
	display: flex;
	flex-direction: column;
	width: var(--side-w);
	border-right: 1px solid var(--panel-line);
}

.side-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	padding: 18px 16px 14px 18px;
}

.brand {
	--brand-hi: var(--yellow);
	display: flex;
	align-items: center;
	gap: 11px;
	min-width: 0;
	color: var(--panel-ink);
	text-decoration: none;
}

.brand:hover {
	text-decoration: none;
}

/* the mark: a terminal tile in the current rice's colours (the favicon is
   the Tokyo Night rendering of the same drawing, include/img/brand/) */
.brand-mark {
	--mk-tile: color-mix(in oklab, var(--panel) 88%, var(--panel-ink));
	--mk-edge: var(--panel-line);
	--mk-chev: var(--p-accent, var(--accent));
	--mk-cur: var(--yellow);
	flex: none;
	width: 36px;
	height: 36px;
	transition: transform 0.2s ease;
}

.brand:hover .brand-mark {
	transform: rotate(-4deg) scale(1.04);
}

.brand-name {
	display: grid;
	gap: 2px;
	min-width: 0;
	text-transform: uppercase;
}

.brand-pre {
	font: 650 10.5px/1 var(--sans);
	letter-spacing: 0.22em;
	color: var(--panel-ink-2);
}

.brand-main {
	font: 800 16px/1.05 var(--sans);
	letter-spacing: 0.03em;
	white-space: nowrap;
}

.brand-main b {
	font-weight: inherit;
	color: var(--brand-hi);
}

/* "A certified Mike project. I use Arch, btw" */
.brand-tag {
	--brand-tag: var(--blue);
	margin: 0;
	font: 650 10.5px/1.6 var(--sans);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--panel-ink-2);
}

.brand-tag span {
	display: block;
	color: var(--brand-tag);
	animation: tag-drop 1.5s ease-in-out both;
}

@keyframes tag-drop {
	from { opacity: 0; transform: translateY(-10px); }
	to { opacity: 1; transform: none; }
}

.side-head .brand-tag {
	flex-basis: 100%;
	margin-top: -4px;
	padding-left: 47px;
}

/* light appearances: deepen the brand hues a touch for >= 4.5:1 */
[data-mode="light"] .brand {
	--brand-hi: color-mix(in oklab, var(--yellow) 90%, black);
}

[data-mode="light"] .brand-tag {
	--brand-tag: color-mix(in oklab, var(--blue) 90%, black);
}

/* Signal light keeps dark chrome, so the bright hues read fine there */
[data-theme="signal"][data-mode="light"] :is(.sidebar, .topbar) .brand {
	--brand-hi: var(--yellow);
}

[data-theme="signal"][data-mode="light"] .sidebar .brand-tag {
	--brand-tag: var(--blue);
}

.sprite {
	position: absolute;
	width: 0;
	height: 0;
	overflow: hidden;
}

.side-close {
	display: none;
	margin-left: auto;
}

.side-nav {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	padding: 6px 10px 16px;
	scrollbar-width: thin;
	scrollbar-color: var(--panel-line) transparent;
}

.ws-list,
.sub-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ws-link {
	display: flex;
	align-items: center;
	gap: 11px;
	min-height: 38px;
	padding: 0 10px;
	border-radius: var(--radius-sm);
	color: var(--panel-ink-2);
	text-decoration: none;
	font: 500 14.5px/1.2 var(--sans);
	transition: background-color 0.12s, color 0.12s;
}

.ws-link:hover {
	background: var(--panel-hover);
	color: var(--panel-ink);
	text-decoration: none;
}

.ws-icon {
	flex: none;
	font-size: 18px;
	color: var(--tone, var(--panel-ink-2));
}

.ws-label {
	flex: 1;
	min-width: 0;
}

/* the workspace number doubles as its keyboard shortcut */
.ws-n {
	order: 3;
	display: grid;
	place-items: center;
	flex: none;
	width: 20px;
	height: 20px;
	border: 1px solid var(--panel-line);
	border-radius: 4px;
	color: var(--panel-ink-2);
	font: 600 11px/1 var(--mono);
}

.ws-item.is-current > .ws-link {
	background: color-mix(in oklab, var(--p-accent) 15%, var(--panel));
	color: var(--panel-ink);
	font-weight: 600;
}

.ws-item.is-current > .ws-link .ws-n {
	border-color: transparent;
	background: var(--p-accent);
	color: var(--panel);
}

.sub-list {
	display: none;
	margin: 4px 0 10px 19px;
	padding-left: 12px;
	border-left: 1px solid var(--panel-line);
}

.ws-item.is-current > .sub-list {
	display: block;
}

.sub-list--long {
	position: relative;
	max-height: 42vh;
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: var(--panel-line) transparent;
}

.sub-list a {
	position: relative;
	display: block;
	padding: 5px 10px;
	border-radius: var(--radius-sm);
	color: var(--panel-ink-2);
	font-size: 13.5px;
	line-height: 1.35;
	text-decoration: none;
}

.sub-list a:hover {
	color: var(--panel-ink);
	background: var(--panel-hover);
}

.sub-list a[aria-current="true"] {
	color: var(--panel-ink);
	font-weight: 600;
}

.sub-list a[aria-current="true"]::before {
	content: "";
	position: absolute;
	left: -13px;
	top: 6px;
	bottom: 6px;
	width: 2px;
	border-radius: 2px;
	background: var(--p-accent);
}

.side-projects {
	padding: 10px 10px 12px;
	border-top: 1px solid var(--panel-line);
}

.side-label {
	margin: 0 10px 6px;
	font-size: 12px;
	font-weight: 600;
	color: var(--panel-ink-2);
}

.side-projects ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.side-projects a {
	display: flex;
	align-items: center;
	gap: 11px;
	min-height: 34px;
	padding: 0 10px;
	border-radius: var(--radius-sm);
	color: var(--panel-ink);
	font-size: 14px;
	font-weight: 550;
	text-decoration: none;
}

.side-projects a:hover {
	background: var(--panel-hover);
}

.side-projects i {
	font-size: 18px;
	color: var(--tone);
}

.side-foot {
	display: flex;
	gap: 8px;
	padding: 12px;
	border-top: 1px solid var(--panel-line);
}

/* theme ("rice") picker */
.rice {
	position: relative;
	flex: 1;
	min-width: 0;
}

.rice-btn {
	display: flex;
	align-items: center;
	gap: 9px;
	width: 100%;
	height: 38px;
	padding: 0 10px;
	border: 1px solid var(--panel-line);
	border-radius: var(--radius-sm);
	background: transparent;
	color: var(--panel-ink);
	font: 500 13.5px/1 var(--sans);
	cursor: pointer;
	white-space: nowrap;
}

.rice-btn:hover {
	background: var(--panel-hover);
}

.rice-name {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	text-align: left;
}

.rice-btn > .bx {
	font-size: 16px;
	color: var(--panel-ink-2);
}

.swatch-row {
	display: inline-grid;
	grid-auto-flow: column;
	gap: 2px;
}

.swatch-row i {
	display: block;
	width: 6px;
	height: 16px;
	border-radius: 1px;
}

.swatch-row i:nth-child(1) { background: var(--red); }
.swatch-row i:nth-child(2) { background: var(--green); }
.swatch-row i:nth-child(3) { background: var(--yellow); }
.swatch-row i:nth-child(4) { background: var(--blue); }
.swatch-row i:nth-child(5) { background: var(--purple); }
.swatch-row i:nth-child(6) { background: var(--cyan); }

.rice-menu {
	position: absolute;
	left: 0;
	bottom: calc(100% + 10px);
	width: 290px;
	padding: 12px;
	background: var(--surface);
	color: var(--ink);
	border: 1px solid var(--line-strong);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	z-index: 70;
}

.rice-menu-label {
	margin: 2px 4px 8px;
	font-size: 13px;
	font-weight: 600;
	color: var(--ink-2);
}

.rice-options {
	display: grid;
	gap: 6px;
	margin: 0 0 14px;
	padding: 0;
	list-style: none;
}

/* each option is painted in its own theme (data-theme on the button) */
.rice-option {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	gap: 6px 10px;
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: var(--bg);
	color: var(--ink);
	font: 600 14px/1.2 var(--sans);
	text-align: left;
	cursor: pointer;
}

.rice-option:hover {
	border-color: var(--line-strong);
}

.rice-option[aria-pressed="true"] {
	border-color: transparent;
	background:
		linear-gradient(var(--bg), var(--bg)) padding-box,
		var(--win-active) border-box;
	border-width: 2px;
	padding: 9px 11px;
}

.rice-option .swatch-row i {
	width: 18px;
	height: 7px;
}

.rice-check {
	grid-row: 1 / span 2;
	grid-column: 2;
	font-size: 20px;
	color: var(--accent);
	visibility: hidden;
}

.rice-option[aria-pressed="true"] .rice-check {
	visibility: visible;
}

.seg {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4px;
	padding: 4px;
	border-radius: var(--radius-sm);
	background: var(--surface-3);
}

.seg button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 34px;
	border: 0;
	border-radius: max(2px, calc(var(--radius-sm) - 2px));
	background: transparent;
	color: var(--ink-2);
	font: 550 14px/1 var(--sans);
	cursor: pointer;
}

.seg button[aria-pressed="true"] {
	background: var(--surface);
	color: var(--ink);
	box-shadow: 0 1px 2px rgb(0 0 0 / 0.2);
}

/* touch fast-scroll handle (site.js initFastScroll) */
.fastscroll {
	position: fixed;
	inset: 0 0 auto auto;
	z-index: 50;
	width: 0;
	height: 0;
}

.fastscroll-thumb {
	position: absolute;
	top: 0;
	right: 4px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 58px;
	border: 1px solid var(--line-strong);
	border-radius: 17px;
	background: color-mix(in oklab, var(--surface-2) 92%, transparent);
	box-shadow: var(--shadow);
	color: var(--ink-2);
	font-size: 18px;
	line-height: 0.9;
	opacity: 0;
	pointer-events: none;
	touch-action: none;
	transition: opacity 0.25s ease;
}

.fastscroll.is-visible .fastscroll-thumb {
	opacity: 1;
	pointer-events: auto;
}

.fastscroll.is-dragging .fastscroll-thumb {
	border-color: var(--accent);
	color: var(--accent);
}

/* mobile: a top bar, and the sidebar becomes a drawer */
.topbar,
.scrim {
	display: none;
}

/* ---------- sections ---------- */
.sec {
	padding: 88px 0 24px;
	scroll-margin-top: -20px;
}

.sec + .sec {
	border-top: 1px solid var(--line);
}

.sec-head {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 4px 16px;
	align-items: center;
	max-width: 860px;
	margin-bottom: 36px;
}

.ws-tag {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	margin: 0;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius-sm);
	background: var(--surface);
	color: var(--accent);
	font: 600 15px/1 var(--mono);
}

.sec-title {
	margin: 0;
	font-size: clamp(28px, 3vw, 38px);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.03em;
}

.sec-lead {
	grid-column: 2;
	margin: 8px 0 0;
	max-width: 62ch;
	font-size: 17.5px;
	line-height: 1.55;
	color: var(--ink-2);
}

/* copy-a-link anchors on headings (added by site.js) */
.h-anchor {
	display: inline-grid;
	place-items: center;
	width: 1.4em;
	height: 1.4em;
	margin-left: 0.3em;
	vertical-align: 0.05em;
	border-radius: var(--radius-sm);
	color: var(--ink-3);
	font-size: 0.62em;
	text-decoration: none;
	opacity: 0;
	transition: opacity 0.12s, background-color 0.12s;
}

.h-anchor i {
	font-size: 1.25em;
}

:is(h2, h3, h4):hover > .h-anchor,
.h-anchor:focus-visible {
	opacity: 1;
}

.h-anchor:hover {
	color: var(--accent);
	background: var(--hover);
}

@media (hover: none) {
	.h-anchor {
		opacity: 0.6;
	}
}

.prose {
	max-width: 70ch;
}

.prose > p,
.prose > ul,
.prose > ol {
	margin: 0 0 14px;
}

.sub-head {
	margin: 8px 0 18px;
	max-width: 70ch;
}

.sub-title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 4px;
	font-size: 21px;
	font-weight: 650;
	line-height: 1.3;
	letter-spacing: -0.015em;
}

.sub-title > .bx,
.sub-title > .bxf {
	color: var(--accent);
	font-size: 21px;
}

.sub-head p {
	margin: 0;
	color: var(--ink-2);
}

.sec-foot {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 24px;
}

.stack {
	display: grid;
	gap: 20px;
}

.stack > .sub-head {
	margin-top: 32px;
	margin-bottom: 0;
}

/* ---------- windows ---------- */
.win {
	position: relative;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: inset 0 1px 0 var(--edge);
}

.win-bar {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 36px;
	padding: 0 12px 0 14px;
	background: var(--surface-2);
	border-bottom: 1px solid var(--line);
	border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
	font: 500 12px/1 var(--mono);
	color: var(--ink-3);
}

.win-title {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* KDE Breeze-style controls on the right: minimise, maximise, close */
.win-ctl {
	display: flex;
	gap: 7px;
	flex: none;
}

.win-ctl i {
	display: block;
	width: 11px;
	height: 11px;
	border-radius: 50%;
	border: 1px solid var(--line-strong);
}

.win-ctl i:last-child {
	background: var(--red);
	border-color: transparent;
}

/* the focused window: Hyprland gradient border */
.win--active,
.win:focus-within {
	border: 1.5px solid transparent;
	background:
		linear-gradient(var(--surface), var(--surface)) padding-box,
		var(--win-active) border-box;
}

/* ---------- hero ---------- */
.hero {
	padding: clamp(48px, 8vw, 104px) 0 clamp(40px, 6vw, 80px);
	background:
		radial-gradient(900px 420px at 80% 20%, color-mix(in oklab, var(--accent) 8%, transparent), transparent 70%),
		var(--bg);
}

.hero-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 470px);
	gap: clamp(32px, 5vw, 64px);
	align-items: center;
}

.hero-title {
	margin: 0;
	max-width: 14ch;
	font-size: clamp(40px, 4.8vw, 64px);
	font-weight: 700;
	line-height: 1.04;
	letter-spacing: -0.04em;
}

.hero-answer {
	margin: 18px 0 0;
	font-size: clamp(22px, 2.1vw, 28px);
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: -0.02em;
	color: var(--ink-2);
}

.hero-answer .no {
	color: var(--red);
	text-decoration: line-through;
	text-decoration-thickness: 2px;
}

.hero-answer .yes {
	color: var(--green);
}

.hero-title .hl-year {
	color: var(--blue);
}

.hero-title .hl-linux {
	color: var(--yellow);
}

.hero-lead {
	margin: 20px 0 0;
	max-width: 44ch;
	font-size: 18px;
	line-height: 1.6;
	color: var(--ink-2);
}

.hero-cta {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 30px;
}

.hero-note {
	margin: 20px 0 0;
	font-size: 14px;
	color: var(--ink-3);
}

/* terminal: a fastfetch readout of Linux readiness */
.term {
	container: term / inline-size;
	min-width: 0;
	border: 1.5px solid transparent;
	background:
		linear-gradient(var(--surface), var(--surface)) padding-box,
		var(--win-active) border-box;
	box-shadow: var(--shadow);
}

.term .win-bar {
	border-radius: calc(var(--radius) - 2px) calc(var(--radius) - 2px) 0 0;
}

.term-body {
	padding: 16px 18px 18px;
	font: 400 13px/1.7 var(--mono);
	color: var(--ink-2);
	overflow-x: auto;
}

.term-body p {
	margin: 0;
	white-space: pre-wrap;
}

.prompt {
	color: var(--accent);
	font-weight: 600;
}

.prompt-sym {
	color: var(--green);
	font-weight: 600;
}

.term-cmd {
	color: var(--ink);
}

.ff {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 8px 22px;
	align-items: start;
	margin: 10px 0 12px;
}

.ff-logo {
	margin: 4px 0 0;
	font: inherit;
	font-size: 12px;
	line-height: 1.3;
	color: var(--ink);
}

.ff-logo b {
	color: var(--yellow);
	font-weight: 400;
}

.ff-info {
	min-width: 0;
}

.ff-head {
	color: var(--accent);
	font-weight: 600;
}

.ff-head span {
	color: var(--ink-3);
}

.ff-rule {
	height: 1px;
	margin: 3px 0 6px;
	background: var(--line-strong);
}

.ff-list {
	margin: 0;
}

.ff-list div {
	display: flex;
	gap: 10px;
}

.ff-list dt {
	flex: none;
	width: 8ch;
	color: var(--accent);
}

.ff-list dd {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	min-width: 0;
	color: var(--ink);
}

/* the freshness line: first in the readout, like fastfetch's uptime */
.ff-updated {
	margin-bottom: 4px;
}

.ff-updated dd {
	color: var(--green);
	font-weight: 600;
}

.ff-blocks {
	display: flex;
	margin-top: 10px;
}

.ff-blocks i {
	display: block;
	width: 22px;
	height: 12px;
}

.ff-blocks i:nth-child(1) { background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.ff-blocks i:nth-child(2) { background: var(--red); }
.ff-blocks i:nth-child(3) { background: var(--green); }
.ff-blocks i:nth-child(4) { background: var(--yellow); }
.ff-blocks i:nth-child(5) { background: var(--blue); }
.ff-blocks i:nth-child(6) { background: var(--purple); }
.ff-blocks i:nth-child(7) { background: var(--cyan); }
.ff-blocks i:nth-child(8) { background: var(--ink); }

.cursor {
	display: inline-block;
	width: 0.6em;
	height: 1.1em;
	vertical-align: text-bottom;
	background: var(--ink-2);
	animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
	50% {
		opacity: 0;
	}
}

@container term (max-width: 440px) {
	.ff {
		grid-template-columns: minmax(0, 1fr);
	}

	.ff-logo {
		display: none;
	}
}

/* typing sequence (progressive enhancement: site.js adds .is-typing) */
.term.is-typing [data-reveal] {
	visibility: hidden;
}

.term.is-typing [data-reveal].is-shown {
	visibility: visible;
}

/* ---------- shelves (tables rendered from data) ---------- */
.shelf {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: inset 0 1px 0 var(--edge);
	min-width: 0;
}

/* anchored app categories clear the sticky search bar */
#apps .shelf {
	scroll-margin-top: var(--apps-bar-h);
}

.shelf-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 14px;
	min-height: 50px;
	padding: 10px 18px;
	background: var(--surface-2);
	border-bottom: 1px solid var(--line);
	border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
}

.shelf-title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	min-width: 0;
	font-size: 16.5px;
	font-weight: 650;
	line-height: 1.3;
	letter-spacing: -0.01em;
}

.shelf-title > .bx,
.shelf-title > .bxf {
	flex: none;
	color: var(--accent);
	font-size: 19px;
}

.shelf-count {
	margin: 0 0 0 auto;
	font-size: 13px;
	color: var(--ink-3);
	white-space: nowrap;
}

.shelf-back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	white-space: nowrap;
}

.shelf-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
	gap: 12px;
	padding: 16px;
	container-type: inline-size;
}

.shelf-grid > :is(.shelf-sub, .shelf-rule, .callout, .fold, .raw) {
	grid-column: 1 / -1;
}

.shelf-sub {
	margin: 8px 2px 0;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--ink-3);
}

.shelf-sub:first-child {
	margin-top: 0;
}

.shelf-rule {
	margin: 4px 0;
}

.shelf-notes {
	margin: 0 16px 16px;
	padding: 12px 16px;
	border-left: 2px solid var(--line-strong);
	background: var(--surface-2);
	border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
	color: var(--ink-2);
	font-size: 14.5px;
	line-height: 1.6;
}

.shelf-notes-title {
	margin: 0 0 4px;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--ink-3);
}

.shelf-notes p {
	margin: 0 0 6px;
	max-width: 90ch;
}

.shelf-notes p:last-child {
	margin-bottom: 0;
}

.shelf-notes h5 {
	margin: 10px 0 2px;
	font-size: 14px;
}

.shelf-notes h5:first-of-type {
	margin-top: 0;
}

/* ---------- package tiles ---------- */
.pkg {
	display: flex;
	flex-direction: column;
	gap: 9px;
	min-width: 0;
	padding: 14px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
}

.pkg-top {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.pkg-icon {
	flex: none;
	width: 38px;
	height: 38px;
	object-fit: contain;
}

.pkg-id {
	min-width: 0;
}

.pkg-name {
	margin: 0;
	font-size: 16px;
	font-weight: 650;
	line-height: 1.25;
	letter-spacing: -0.01em;
	overflow-wrap: anywhere;
}

.pkg-detail {
	margin: 1px 0 0;
	font-size: 13px;
	line-height: 1.35;
	color: var(--ink-3);
}

.pkg-desc {
	margin: 0;
	font-size: 14.5px;
	line-height: 1.5;
	color: var(--ink-2);
}

.pkg-traits {
	margin: 0;
	font-size: 13.5px;
	line-height: 1.45;
	color: var(--ink-3);
}

.pkg-warn,
.pkg-note,
.pkg-de {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	font-size: 13.5px;
	line-height: 1.4;
}

.pkg-warn {
	color: var(--red);
}

.pkg-note {
	color: var(--ink-3);
}

.pkg-warn i,
.pkg-note i {
	flex: none;
	font-size: 15px;
}

.pkg-de {
	color: var(--ink-2);
	font-weight: 550;
}

.pkg-de-icon {
	width: 18px;
	height: 18px;
	object-fit: contain;
}

.pkg-traits a,
.pkg-warn a {
	color: inherit;
}

.pkg-actions {
	display: flex;
	gap: 6px;
	margin-top: auto;
	padding-top: 3px;
}

.pkg-actions .btn {
	flex: 1 1 0;
}

.pkg-actions .cmd-copy {
	flex: 0 0 34px;
	padding: 0;
	font-size: 17px;
	color: var(--ink-2);
}

.pkg-actions .cmd-copy.is-copied {
	color: var(--green);
	border-color: var(--green);
}

/* one saturated action per task area: in the catalog, Install is soft */
.pkg .btn-primary {
	background: color-mix(in oklab, var(--action) 16%, var(--surface));
	border-color: color-mix(in oklab, var(--action) 45%, var(--surface));
	color: var(--ink);
}

.pkg .btn-primary:hover {
	background: var(--action);
	border-color: transparent;
	color: var(--on-action);
}

@media (pointer: coarse) {
	.pkg-actions .cmd-copy {
		flex-basis: 42px;
	}
}

/* desktop showcase: screenshot on top */
.pkg--showcase {
	padding: 0 0 14px;
	overflow: clip;
}

.pkg--showcase > :not(.pkg-shot) {
	margin-inline: 14px;
}

.pkg-shot {
	margin: 0;
	aspect-ratio: 16 / 9;
	background: var(--surface-3);
	border-bottom: 1px solid var(--line);
	overflow: hidden;
}

.pkg-shot img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
}

@container (min-width: 620px) {
	.pkg--showcase {
		grid-column: span 2;
	}
}

/* badges (ratings) */
.badges {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 2px 8px 2px 6px;
	border-radius: 4px;
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--ink);
	background: color-mix(in oklab, var(--tone) 15%, var(--surface));
}

.badge i {
	font-size: 14px;
	color: var(--tone);
}

.badge-rec { --tone: var(--blue); }
.badge-rec-high { --tone: var(--blue); background: color-mix(in oklab, var(--tone) 30%, var(--surface)); }
.badge-pick { --tone: var(--green); }
.badge-adv { --tone: var(--red); }
.badge-alpha,
.badge-beta { --tone: var(--purple); }
.badge-not { --tone: var(--orange); }

/* chips (source links on status rows, small labels) */
.chips {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.chip {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 13px;
	color: var(--ink-2);
}

.chip i {
	font-size: 14px;
}

.chip-link a {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	color: var(--accent);
}

/* ---------- callouts ---------- */
.callout {
	--tone: var(--blue);
	padding: 14px 18px;
	border: 1px solid color-mix(in oklab, var(--tone) 30%, var(--line));
	border-left: 3px solid var(--tone);
	border-radius: var(--radius-sm);
	background: color-mix(in oklab, var(--tone) 7%, var(--surface));
	color: var(--ink);
}

.callout + .callout {
	margin-top: 12px;
}

:is(.fold-body, .option-body, .proc > li) > .callout {
	margin-block: 14px;
}

.callout[data-tone="info"] { --tone: var(--blue); }
.callout[data-tone="warn"] { --tone: var(--yellow); }
.callout[data-tone="danger"] { --tone: var(--red); }
.callout[data-tone="ok"] { --tone: var(--green); }

.callout-title {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 10px;
	margin: 0 0 4px;
	font-weight: 650;
	font-size: 15.5px;
	line-height: 1.4;
}

.callout-title > i {
	font-size: 19px;
	color: var(--tone);
}

.callout-title .btn {
	margin-left: auto;
}

.callout-body {
	color: var(--ink-2);
	font-size: 15px;
}

.callout-body > :first-child {
	margin-top: 0;
}

.callout-body > :last-child {
	margin-bottom: 0;
}

.callout-body p {
	margin: 0 0 8px;
}

.callout-body ul {
	margin: 4px 0 0;
	padding-left: 20px;
}

.callout-body li + li {
	margin-top: 6px;
}

/* ---------- folds (details) ---------- */
.fold,
.gallery,
.option,
.faq-item {
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: var(--surface);
}

:is(.fold, .gallery, .option, .faq-item, .more) > summary {
	display: flex;
	align-items: center;
	gap: 10px;
	list-style: none;
	cursor: pointer;
	padding: 12px 16px;
	border-radius: var(--radius-sm);
}

:is(.fold, .gallery, .option, .faq-item, .more) > summary::-webkit-details-marker {
	display: none;
}

:is(.fold, .gallery, .option, .faq-item, .more) > summary::before {
	content: "";
	flex: none;
	width: 7px;
	height: 7px;
	margin: 0 4px 0 2px;
	border-right: 2px solid var(--ink-3);
	border-bottom: 2px solid var(--ink-3);
	transform: rotate(-45deg);
	transition: transform 0.15s;
}

:is(.fold, .gallery, .option, .faq-item, .more)[open] > summary::before {
	transform: rotate(45deg);
}

:is(.fold, .gallery, .option, .faq-item) > summary:hover {
	background: var(--hover);
}

.fold-label,
.gallery-title {
	font-weight: 600;
}

.fold-count {
	margin-left: auto;
	padding: 1px 8px;
	border-radius: var(--radius-sm);
	background: var(--surface-3);
	color: var(--ink-2);
	font-size: 12.5px;
	font-weight: 600;
}

.fold > .shelf-grid {
	padding-top: 4px;
}

.fold-list {
	display: grid;
	gap: 8px;
}

.fold-body,
.option-body {
	padding: 4px 18px 18px;
}

.fold > summary > i,
.option > summary > i {
	font-size: 19px;
	color: var(--accent);
}

.fold-body > p,
.fold-body > ul,
.fold-body > ol {
	max-width: 70ch;
}

.fold-body h4 {
	margin: 22px 0 8px;
	font-size: 16px;
	font-weight: 650;
}

/* gallery (per-desktop / per-family) */
.gallery-list {
	display: grid;
	gap: 10px;
}

.gallery > summary {
	padding-block: 14px;
}

.gallery-title {
	font-size: 16px;
}

.gallery-meta {
	margin-left: auto;
	font-size: 13.5px;
	color: var(--ink-3);
	text-align: right;
}

.gallery-body {
	display: grid;
	gap: 14px;
	padding: 4px 14px 14px;
}

.shots {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: min(82%, 500px);
	gap: 10px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	padding-bottom: 8px;
	overscroll-behavior-x: contain;
}

.shot {
	display: block;
	scroll-snap-align: start;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	overflow: hidden;
	background: var(--surface-3);
}

.shot img,
.shot-video {
	display: block;
	width: 100%;
	height: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	object-position: top center;
}

/* ---------- state: ease chart ---------- */
.state-grid {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: 20px;
	align-items: start;
}

.state-grid > * {
	grid-column: 1 / -1;
}

.state-grid > .shelf--ease,
.state-grid > .callout {
	grid-column: 1 / -1;
}

.state-grid > .sub-head {
	margin: 40px 0 0;
}

.state-grid > .sub-head:first-child {
	margin-top: 0;
}

.ease {
	display: grid;
	gap: 22px;
	padding: 20px;
}

/* the readiness ladder: every tier, best first, tasks placed on their rung */
/* rungs size to their content, so column height reads as task count */
.ladder {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
	align-items: start;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.rung {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
	padding: 12px;
	border: 1px solid var(--line);
	border-top: 3px solid var(--tone);
	border-radius: var(--radius-sm);
	background: color-mix(in oklab, var(--tone) 6%, var(--surface-2));
}

.rung-head {
	display: flex;
	align-items: center;
	gap: 7px;
	margin: 0;
	font-size: 14.5px;
	font-weight: 650;
	line-height: 1.25;
}

.rung-head i {
	flex: none;
	font-size: 17px;
	color: var(--tone);
}

.rung-name {
	flex: 1;
	min-width: 0;
}

.rung-n {
	font: 600 12px/1 var(--mono);
	color: var(--ink-3);
}

.rung-detail {
	margin: 0;
	font-size: 12.5px;
	line-height: 1.4;
	color: var(--ink-3);
}

.rung-tasks {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
	gap: 4px;
	margin: 4px 0 0;
	padding: 0;
	list-style: none;
}

.ladder-empty {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: -10px 0 0;
	font-size: 14px;
	color: var(--ink-2);
}

.ladder-empty i {
	font-size: 17px;
	color: var(--green);
}

.rung-tasks a {
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 5px 8px;
	border-radius: 4px;
	background: var(--surface);
	color: var(--ink);
	font-size: 13.5px;
	font-weight: 550;
	line-height: 1.25;
	text-decoration: none;
}

.rung-tasks a:hover {
	background: var(--hover);
}

.rung-tasks i {
	flex: none;
	font-size: 15px;
	color: var(--ink-3);
}

/* one card per task, best tier first */
.tasks {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
	gap: 12px;
}

.task {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 14px 16px;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: var(--surface-2);
	scroll-margin-top: calc(var(--top-h) + 20px);
}

.task:target {
	border-color: var(--tone);
	box-shadow: 0 0 0 1px var(--tone);
}

.task-top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
}

.task-top > .bx,
.task-top > .bxf,
.task-top > .bxl {
	flex: none;
	font-size: 20px;
	color: var(--ink-2);
}

.task-name {
	flex: 1;
	min-width: 0;
	margin: 0;
	font-size: 16px;
	font-weight: 650;
	line-height: 1.3;
}

.tier-badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 2px 8px 2px 6px;
	border-radius: 4px;
	background: color-mix(in oklab, var(--tone) 16%, var(--surface));
	color: var(--ink);
	font-size: 12.5px;
	font-weight: 600;
	white-space: nowrap;
}

.tier-badge i {
	font-size: 14px;
	color: var(--tone);
}

.task-avail {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	font-size: 13.5px;
	font-weight: 550;
	color: var(--ink-2);
}

.task-avail i {
	font-size: 15px;
	color: var(--ink-3);
}

.task-note {
	margin: 0;
	font-size: 14.5px;
	line-height: 1.55;
	color: var(--ink-2);
}

.task-links {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: auto 0 0;
	padding: 4px 0 0;
	list-style: none;
}

.task-links a {
	display: inline-flex;
	align-items: center;
	min-height: 28px;
	padding: 0 9px;
	border: 1px solid var(--line-strong);
	border-radius: 4px;
	color: var(--ink);
	font-size: 13px;
	font-weight: 550;
	text-decoration: none;
}

.task-links a::after {
	content: "";
	width: 5px;
	height: 5px;
	margin-left: 7px;
	border-right: 1.5px solid var(--ink-3);
	border-bottom: 1.5px solid var(--ink-3);
	transform: rotate(-45deg);
}

.task-links a:hover {
	background: var(--hover);
	border-color: var(--accent);
}

/* ---------- state: feature status board ---------- */
[data-status="works"] { --tone: var(--green); }
[data-status="partial"] { --tone: var(--blue); }
[data-status="dev"] { --tone: var(--yellow); }
[data-status="broken"] { --tone: var(--red); }

.status-summary {
	display: grid;
	gap: 14px;
	padding: 20px;
	border-bottom: 1px solid var(--line);
}

.status-hero {
	margin: 0;
	font-size: 17px;
	color: var(--ink-2);
}

.status-hero-n {
	margin-right: 4px;
	font-size: 40px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.03em;
	color: var(--ink);
	vertical-align: -4px;
}

.status-bar {
	display: flex;
	gap: 2px;
	height: 12px;
}

.status-seg {
	flex-basis: 0;
	background: var(--tone);
}

.status-seg:first-child {
	border-radius: 4px 0 0 4px;
}

.status-seg:last-child {
	border-radius: 0 4px 4px 0;
}

.status-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 22px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 14px;
	color: var(--ink-2);
}

.status-legend li {
	display: flex;
	align-items: center;
	gap: 7px;
}

.status-legend i {
	font-size: 17px;
	color: var(--tone);
}

.status-legend b {
	color: var(--ink);
	font-variant-numeric: tabular-nums;
}

.status-group + .status-group {
	border-top: 1px solid var(--line);
}

.status-group-title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 16px 20px 2px;
	font-size: 14.5px;
	font-weight: 650;
	color: var(--ink);
}

.status-group-title i {
	font-size: 18px;
	color: var(--tone);
}

.status-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
	gap: 10px;
	margin: 0;
	padding: 10px 20px 20px;
	list-style: none;
}

.status-row {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 10px;
	padding: 12px 14px;
	border: 1px solid var(--line);
	border-left: 3px solid var(--tone);
	border-radius: var(--radius-sm);
	background: var(--surface-2);
}

.status-icon {
	font-size: 19px;
	line-height: 1.3;
	color: var(--tone);
}

.status-body {
	min-width: 0;
}

.status-name {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
}

.status-detail {
	margin: 1px 0 0;
	font-size: 13.5px;
	color: var(--ink-3);
}

.status-note {
	margin: 5px 0 0;
	font-size: 14px;
	line-height: 1.5;
	color: var(--ink-2);
}

.status-meta {
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid var(--line);
	font-size: 12.5px;
}

.checked {
	display: inline-flex;
	gap: 0.3em;
	font-size: 12.5px;
	color: var(--ink-3);
}

/* ---------- why: diff + reasons ---------- */
.diff {
	margin-bottom: 48px;
	overflow: hidden;
}

.diff-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
}

.diff-table th,
.diff-table td {
	padding: 10px 16px;
	text-align: left;
	vertical-align: top;
	border-top: 1px solid var(--line);
}

.diff-table thead th {
	border-top: 0;
	font: 500 12.5px/1.3 var(--mono);
	color: var(--ink-2);
	background: var(--surface-2);
}

.diff-table tbody th {
	width: 17%;
	font-weight: 600;
	color: var(--ink-2);
	font-size: 14px;
}

.diff-del,
.diff-add {
	position: relative;
	padding-left: 34px !important;
	width: 41.5%;
}

.diff-del {
	background: color-mix(in oklab, var(--red) 8%, var(--surface));
	color: var(--ink-2);
}

.diff-add {
	background: color-mix(in oklab, var(--green) 8%, var(--surface));
	color: var(--ink);
}

.diff-del::before,
.diff-add::before {
	position: absolute;
	left: 14px;
	top: 10px;
	font: 700 14px/1.6 var(--mono);
}

.diff-del::before {
	content: "-";
	color: var(--red);
}

.diff-add::before {
	content: "+";
	color: var(--green);
}

.reason-groups {
	display: grid;
	gap: 48px;
}

.reason-group {
	display: grid;
	grid-template-columns: minmax(180px, 1fr) 3fr;
	gap: 16px 40px;
	align-items: start;
}

.reason-group-title {
	position: sticky;
	top: calc(var(--top-h) + 24px);
	margin: 0;
	padding-top: 14px;
	border-top: 2px solid var(--accent);
	font-size: 19px;
	font-weight: 650;
	line-height: 1.25;
	letter-spacing: -0.015em;
}

.reason-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 32px;
}

.reason {
	padding: 16px 0 20px;
	border-top: 1px solid var(--line);
}

.reason-title {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0 0 6px;
	font-size: 16.5px;
	font-weight: 650;
	line-height: 1.35;
}

.reason-title > .bx,
.reason-title > .bxl,
.reason-title > .bxf {
	flex: none;
	margin-top: 1px;
	font-size: 20px;
	color: var(--accent);
}

.reason > p {
	margin: 0;
	color: var(--ink-2);
	font-size: 15.5px;
}

.more {
	margin-top: 6px;
}

.more > summary {
	display: inline-flex;
	padding: 4px 0;
	color: var(--accent);
	font-size: 14px;
	font-weight: 600;
}

.more > summary::before {
	border-color: var(--accent);
	width: 6px;
	height: 6px;
	margin: 0 2px 0 0;
}

.more[open] > summary {
	margin-bottom: 6px;
}

.more > p {
	margin: 0 0 12px;
	color: var(--ink-2);
	font-size: 15.5px;
}

.media {
	margin: 0 0 12px;
}

.media img {
	display: block;
	margin-inline: auto;
	border-radius: var(--radius-sm);
}

.media figcaption {
	margin-top: 6px;
	font-size: 13px;
	color: var(--ink-3);
}

.media.video-pair {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
	gap: 10px;
}

.media.video-pair figcaption {
	grid-column: 1 / -1;
	margin: 0;
}

.quote {
	margin: 0;
	padding: 12px 16px;
	border-left: 3px solid var(--accent);
	background: var(--surface-2);
	border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.quote p {
	margin: 0 0 6px;
	font-size: 15.5px;
	color: var(--ink);
}

.quote footer {
	font-size: 13.5px;
	color: var(--ink-3);
}

/* "Watch" disclosure: a clear button that opens an embedded video */
.watch {
	margin-top: 10px;
}

.watch > summary {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 38px;
	padding: 6px 14px 6px 10px;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius-sm);
	background: var(--surface);
	color: var(--ink);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	list-style: none;
	cursor: pointer;
}

.watch > summary::-webkit-details-marker {
	display: none;
}

.watch > summary > i {
	flex: none;
	font-size: 20px;
	color: var(--red);
}

.watch > summary::after {
	content: "";
	flex: none;
	width: 6px;
	height: 6px;
	margin-left: 4px;
	border-right: 2px solid var(--ink-3);
	border-bottom: 2px solid var(--ink-3);
	transform: rotate(45deg) translateY(-2px);
}

.watch[open] > summary::after {
	transform: rotate(-135deg) translateY(-2px);
}

.watch > summary:hover {
	background: var(--hover);
	border-color: var(--accent);
}

.watch[open] > .youtube-player {
	margin-top: 10px;
}

/* lite YouTube embed */
.youtube-player {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: var(--radius-sm);
	background: #000;
}

.youtube-player > div {
	position: absolute;
	inset: 0;
	cursor: pointer;
}

.youtube-player img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: opacity 0.15s;
}

.youtube-player > div:hover img {
	opacity: 0.85;
}

.youtube-player iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.youtube-player .play {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 64px;
	height: 44px;
	transform: translate(-50%, -50%);
	border-radius: 12px;
	background: rgb(20 20 20 / 0.8);
}

.youtube-player .play::after {
	content: "";
	position: absolute;
	left: 25px;
	top: 12px;
	border-style: solid;
	border-width: 10px 0 10px 17px;
	border-color: transparent transparent transparent #fff;
}

.youtube-player > div:hover .play {
	background: #f00;
}

/* ---------- guide: installer ---------- */
.guide {
	display: grid;
	grid-template-columns: 220px minmax(0, 1fr);
	gap: 44px;
	align-items: start;
}

.rail {
	position: sticky;
	top: calc(var(--top-h) + 24px);
	padding: 8px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
}

.rail ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

.rail a {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 38px;
	padding: 5px 9px;
	border-radius: var(--radius-sm);
	color: var(--ink-2);
	font-size: 14px;
	line-height: 1.25;
	text-decoration: none;
}

.rail a:hover {
	background: var(--hover);
	color: var(--ink);
}

.rail-n {
	display: grid;
	place-items: center;
	flex: none;
	width: 24px;
	height: 24px;
	border: 1px solid var(--line-strong);
	border-radius: 50%;
	font: 600 11.5px/1 var(--mono);
	color: var(--ink-2);
}

.rail ol ol a {
	min-height: 30px;
	padding-left: 43px;
	font-size: 13px;
}

.rail a.is-done .rail-n {
	border-color: transparent;
	background: color-mix(in oklab, var(--green) 22%, var(--surface));
	color: var(--green);
}

.rail a[aria-current="step"] {
	background: color-mix(in oklab, var(--accent) 14%, var(--surface));
	color: var(--ink);
	font-weight: 600;
}

.rail a[aria-current="step"] .rail-n {
	border-color: transparent;
	background: var(--accent);
	color: var(--surface);
}

.steps {
	display: grid;
	gap: 64px;
	min-width: 0;
}

.step {
	min-width: 0;
}

.step > :not(.step-head, .step-wide) {
	max-width: 70ch;
}

.step-head {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin-bottom: 18px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--line);
}

.step-n {
	font: 500 12.5px/1.2 var(--mono);
	color: var(--accent);
}

.step-title {
	margin: 0;
	font-size: clamp(22px, 2.2vw, 26px);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.025em;
}

.step h4 {
	margin: 32px 0 10px;
	font-size: 18px;
	font-weight: 650;
	letter-spacing: -0.01em;
}

.step h5 {
	margin: 20px 0 6px;
	font-size: 15px;
	font-weight: 650;
}

.step p {
	margin: 0 0 14px;
	font-size: 16px;
}

.step > .callout,
.step > .fold,
.step > .option,
.step > .figure,
.step > .btn-row,
.step > .fold-list {
	margin: 18px 0;
}

/* numbered procedure */
.proc {
	counter-reset: proc;
	margin: 0 0 16px;
	padding: 0;
	list-style: none;
}

.proc > li {
	counter-increment: proc;
	position: relative;
	padding: 7px 0 7px 40px;
	min-height: 38px;
}

.proc > li::before {
	content: counter(proc);
	position: absolute;
	left: 0;
	top: 7px;
	display: grid;
	place-items: center;
	width: 26px;
	height: 26px;
	border-radius: var(--radius-sm);
	background: var(--surface-3);
	color: var(--ink);
	font: 600 12px/1 var(--mono);
}

.proc > li > p {
	margin: 8px 0 0;
}

.proc > li > .callout,
.proc > li > details {
	margin-top: 12px;
}

.options {
	display: grid;
	gap: 10px;
	margin: 18px 0;
}

.option > summary {
	flex-wrap: wrap;
	padding: 14px 16px;
}

.option-title {
	font-size: 16px;
	font-weight: 650;
}

.option-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin-left: auto;
}

.os-icons {
	display: inline-flex;
	gap: 4px;
	font-size: 18px;
	color: var(--ink-2);
}

.option[open] {
	border-color: var(--line-strong);
}

.figure {
	margin: 20px 0;
}

.figure figcaption {
	margin-top: 10px;
	font-size: 13.5px;
	color: var(--ink-3);
}

.modules {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
	gap: 10px;
	margin: 14px 0;
	padding: 0;
	list-style: none;
}

.modules li {
	padding: 12px 14px;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: var(--surface-2);
	font-size: 14.5px;
	color: var(--ink-2);
}

.modules li strong {
	display: block;
	margin-bottom: 2px;
	color: var(--ink);
}

.care {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
	gap: 12px;
}

.dirs {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 6px 16px;
	margin: 12px 0 16px;
}

.dirs dd {
	margin: 0;
	color: var(--ink-2);
}

/* ---------- desktop map (rebuilt from the Excalidraw DE chart) ---------- */
[data-de="pantheon"] { --tone: var(--ink-2); }
[data-de="gnome"] { --tone: var(--red); }
[data-de="cosmic"] { --tone: var(--orange); }
[data-de="cinnamon"] { --tone: var(--green); }
[data-de="kde"] { --tone: var(--blue); }
[data-de="hyprland"] { --tone: var(--purple); }

.demap-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
	gap: 14px;
}

.demap-panel {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.spectrum {
	flex: 1;
	padding: 18px 18px 14px;
}

.spectrum-rows {
	display: grid;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
	background: linear-gradient(to right, var(--line) 1px, transparent 1px) 0 0 / 25% 100% repeat-x;
}

.range {
	position: relative;
	height: 28px;
}

.range span {
	position: absolute;
	left: calc(var(--from) * 1%);
	width: calc((var(--to) - var(--from)) * 1%);
	top: 0;
	bottom: 0;
	display: flex;
	align-items: center;
	padding: 0 10px;
	min-width: max-content;
	border-radius: var(--radius-sm);
	background: color-mix(in oklab, var(--tone) 20%, var(--surface));
	box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--tone) 55%, var(--surface));
	font-size: 13.5px;
	font-weight: 600;
	color: var(--ink);
	white-space: nowrap;
}

.range[data-de="cinnamon"] span,
.range[data-de="kde"] span {
	justify-content: flex-end;
}

.range[data-de="cinnamon"] span {
	left: auto;
	right: calc((100 - var(--to)) * 1%);
}

.spectrum-axis {
	display: flex;
	justify-content: space-between;
	margin-top: 12px;
	padding-top: 8px;
	border-top: 1px solid var(--line-strong);
	font: 500 12px/1 var(--mono);
	color: var(--ink-2);
}

.spectrum-axis i {
	font-size: 14px;
	vertical-align: -2px;
}

.plot-wrap,
.quad-wrap {
	position: relative;
	flex: 1;
	padding: 18px 20px 34px 38px;
}

.quad-wrap {
	padding: 30px 22px;
}

.plot,
.quad {
	position: relative;
	aspect-ratio: 4 / 3;
	color: var(--purple);
}

.plot {
	border-left: 1px solid var(--line-strong);
	border-bottom: 1px solid var(--line-strong);
	background:
		linear-gradient(to right, color-mix(in oklab, var(--line) 55%, transparent) 1px, transparent 1px) 0 0 / 25% 100%,
		linear-gradient(to top, color-mix(in oklab, var(--line) 55%, transparent) 1px, transparent 1px) 0 100% / 100% 25%;
}

.plot-svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: visible;
}

.plot-x,
.plot-y {
	position: absolute;
	font: 500 11.5px/1 var(--mono);
	color: var(--ink-2);
}

.plot-x {
	left: 38px;
	right: 20px;
	bottom: 10px;
	text-align: center;
}

.plot-y {
	left: 14px;
	top: 50%;
	transform: translate(-50%, -50%) rotate(-90deg);
	white-space: nowrap;
}

.plot-note {
	position: absolute;
	left: calc(var(--x) * 1%);
	bottom: calc(var(--y) * 1%);
	transform: translate(-50%, 0) rotate(-19deg);
	font: 500 11.5px/1 var(--mono);
	color: var(--purple);
	white-space: nowrap;
}

.dot {
	position: absolute;
	left: calc(var(--x) * 1%);
	bottom: calc(var(--y) * 1%);
	width: 13px;
	height: 13px;
	margin: 0 0 -6.5px -6.5px;
	border-radius: 50%;
	background: var(--tone);
	box-shadow: 0 0 0 2px var(--surface);
}

.dot.is-riced {
	background: var(--surface);
	box-shadow: inset 0 0 0 3px var(--tone), 0 0 0 2px var(--surface);
}

.dot span {
	position: absolute;
	left: calc(100% + 7px);
	top: 50%;
	transform: translateY(-50%);
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	color: var(--ink);
	white-space: nowrap;
}

.dot.is-left span {
	left: auto;
	right: calc(100% + 7px);
}

.quad {
	background:
		linear-gradient(var(--line-strong), var(--line-strong)) 50% 0 / 1px 100% no-repeat,
		linear-gradient(var(--line-strong), var(--line-strong)) 0 50% / 100% 1px no-repeat;
}

.quad .dot {
	left: calc(50% + var(--x) * 0.5%);
	bottom: calc(50% + var(--y) * 0.5%);
}

.quad-label {
	position: absolute;
	padding: 2px 4px;
	font: 500 11.5px/1 var(--mono);
	color: var(--ink-2);
	background: var(--surface);
}

.quad-top { top: -22px; left: 50%; transform: translateX(-50%); }
.quad-bottom { bottom: -22px; left: 50%; transform: translateX(-50%); }
.quad-left { left: -16px; top: 50%; transform: translateY(-50%); }
.quad-right { right: -16px; top: 50%; transform: translateY(-50%); }

.figure-src,
.picker-src {
	margin: 12px 0 0;
	font-size: 13.5px;
	color: var(--ink-3);
}

/* ---------- distro quiz (rebuilt from the flowchart) ---------- */
.quiz {
	margin: 26px 0;
}

.quiz-body {
	display: grid;
	gap: 14px;
	padding: 20px;
}

.quiz-app {
	display: grid;
	gap: 16px;
}

.quiz-progress {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 13px;
	color: var(--ink-3);
}

.quiz-meter {
	flex: 1;
	height: 4px;
	border-radius: 2px;
	background: linear-gradient(var(--accent), var(--accent)) 0 0 / var(--p, 0%) 100% no-repeat, var(--surface-3);
	transition: background-size 0.2s;
}

.quiz-q {
	margin: 4px 0 0;
	font-size: 21px;
	font-weight: 650;
	line-height: 1.3;
	letter-spacing: -0.015em;
}

.quiz-q:focus {
	outline: none;
}

.quiz-hint {
	margin: -10px 0 0;
	font-size: 14px;
	color: var(--ink-3);
}

.quiz-options {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
	gap: 10px;
}

.quiz-opt {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: center;
	gap: 2px 12px;
	min-height: 64px;
	padding: 12px 14px;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius-sm);
	background: var(--surface-2);
	color: var(--ink);
	font: 600 15px/1.3 var(--sans);
	text-align: left;
	cursor: pointer;
	transition: border-color 0.12s, background-color 0.12s;
}

.quiz-opt:hover {
	border-color: var(--accent);
	background: color-mix(in oklab, var(--accent) 8%, var(--surface-2));
}

.quiz-opt[aria-pressed="true"] {
	border-color: var(--accent);
	background: color-mix(in oklab, var(--accent) 16%, var(--surface-2));
}

.quiz-opt > i {
	grid-row: span 2;
	font-size: 22px;
	color: var(--accent);
}

.quiz-opt small {
	grid-column: 2;
	font-size: 13px;
	font-weight: 400;
	color: var(--ink-3);
}

.quiz-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

.quiz-skip {
	margin-left: auto;
}

.quiz-result {
	display: grid;
	gap: 14px;
}

.quiz-result h4 {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	color: var(--ink-3);
}

.pick-card {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 4px 16px;
	padding: 16px;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: var(--surface-2);
}

.pick-card--best {
	border: 1.5px solid transparent;
	background:
		linear-gradient(var(--surface-2), var(--surface-2)) padding-box,
		var(--win-active) border-box;
	padding: 20px;
}

.pick-card img.pick-logo {
	grid-row: span 3;
	width: 44px;
	height: 44px;
	object-fit: contain;
}

.pick-card--best img.pick-logo {
	width: 56px;
	height: 56px;
}

.pick-name {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.015em;
}

.pick-card--best .pick-name {
	font-size: 24px;
}

.pick-de {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-left: 8px;
	font-size: 13.5px;
	font-weight: 550;
	color: var(--ink-2);
	letter-spacing: 0;
	vertical-align: 2px;
}

.pick-de img {
	width: 16px;
	height: 16px;
	object-fit: contain;
}

.pick-blurb {
	margin: 0;
	font-size: 15px;
	color: var(--ink-2);
}

.pick-why {
	grid-column: 2;
	display: grid;
	gap: 4px;
	margin: 6px 0 0;
	padding: 0;
	list-style: none;
	font-size: 14px;
	color: var(--ink);
}

.pick-why li {
	display: flex;
	gap: 8px;
}

.pick-why li::before {
	content: "✓";
	color: var(--green);
	font-weight: 700;
}

.pick-actions {
	grid-column: 2;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
}

.pick-alts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
	gap: 10px;
}

.quiz-note {
	margin: 0;
	padding: 10px 14px;
	border-radius: var(--radius-sm);
	background: color-mix(in oklab, var(--yellow) 10%, var(--surface));
	border-left: 3px solid var(--yellow);
	font-size: 14px;
	color: var(--ink-2);
}

.quiz-answers {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 13px;
	color: var(--ink-3);
}

.quiz-answers li {
	padding: 2px 9px;
	border-radius: var(--radius-sm);
	background: var(--surface-3);
	color: var(--ink-2);
}

.picks {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
}

.picks th,
.picks td {
	padding: 9px 12px 9px 0;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid var(--line);
}

.picks thead th {
	font-size: 13px;
	font-weight: 600;
	color: var(--ink-3);
}

.picks tbody th {
	width: 36%;
	font-weight: 600;
}

.picks td {
	color: var(--ink-2);
}

/* ---------- permissions (rebuilt from the permissions chart) ---------- */
.perm {
	display: grid;
	gap: 14px;
	margin: 16px 0;
}

.perm > p,
.perm > h4 {
	margin: 0;
}

.perm-levels {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
	gap: 10px;
}

.perm-level {
	padding: 12px 14px;
	border-radius: var(--radius-sm);
	border: 1px solid color-mix(in oklab, var(--tone) 45%, var(--line));
	border-top-width: 3px;
	background: color-mix(in oklab, var(--tone) 7%, var(--surface));
}

.perm-level p {
	margin: 0 !important;
	font-size: 14.5px;
	color: var(--ink-2);
}

.perm-level .perm-who {
	margin-bottom: 6px !important;
}

.perm-bridge {
	position: relative;
	padding-left: 26px;
	color: var(--ink-2);
}

.perm-bridge > i {
	position: absolute;
	left: 0;
	top: 3px;
	font-size: 18px;
	color: var(--accent);
}

.term-snippet {
	overflow-x: auto;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: var(--bg);
}

.term-snippet pre {
	margin: 0;
	padding: 12px 14px;
	font-size: 12.5px;
	line-height: 1.75;
	color: var(--ink);
}

.term-snippet mark {
	padding: 0 3px;
	border-radius: 2px;
	background: color-mix(in oklab, var(--green) 25%, transparent);
	color: var(--ink);
}

.t-note { color: var(--ink-3); }
.t-bad { color: var(--red); }
.t-good { color: var(--green); }
.t-perm { color: var(--yellow); }

.t-bad i,
.t-good i {
	vertical-align: -2px;
}

.rwx {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 4px 0 0;
	font-family: var(--mono);
}

.rwx-part {
	display: grid;
	justify-items: center;
	gap: 4px;
	padding: 10px 14px 8px;
	border-radius: var(--radius-sm);
	background: color-mix(in oklab, var(--tone, var(--ink-3)) 10%, var(--surface));
	box-shadow: inset 0 -3px 0 var(--tone, var(--line-strong));
}

.rwx-chars {
	font-size: 28px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.04em;
	color: var(--ink);
}

.rwx-label {
	font-size: 11.5px;
	color: var(--ink-2);
}

.rwx-num {
	font-size: 20px;
	font-weight: 700;
	line-height: 1;
	color: var(--tone);
}

.rwx-key {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 14.5px;
	color: var(--ink-2);
}

.octal {
	width: 100%;
	max-width: 480px;
	border-collapse: collapse;
	font-size: 14px;
	font-variant-numeric: tabular-nums;
}

.octal th,
.octal td {
	padding: 5px 10px;
	border-bottom: 1px solid var(--line);
	text-align: left;
}

.octal thead th {
	font-size: 12.5px;
	font-weight: 600;
	color: var(--ink-3);
}

.octal tbody th {
	font: 600 15px/1 var(--mono);
}

.octal td.yes,
.octal td.no {
	position: relative;
	padding-left: 28px;
	color: var(--ink-2);
}

.octal td.yes::before,
.octal td.no::before {
	position: absolute;
	left: 10px;
	font-weight: 700;
}

.octal td.yes::before {
	content: "✓";
	color: var(--green);
}

.octal td.no::before {
	content: "✕";
	color: var(--red);
}

.chmod-body {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 18px 28px;
	align-items: center;
	padding: 16px 18px;
}

.chmod-grid {
	display: grid;
	grid-template-columns: auto repeat(3, 54px);
	gap: 6px 4px;
	align-items: center;
	justify-items: center;
	margin: 0;
	padding: 0;
	border: 0;
}

.chmod-col {
	font-size: 12px;
	font-weight: 600;
	color: var(--ink-3);
}

.chmod-row {
	justify-self: start;
	padding: 0 10px;
	font-weight: 600;
	font-size: 14.5px;
	box-shadow: inset 3px 0 0 var(--tone);
}

.chmod-grid label {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: var(--radius-sm);
	cursor: pointer;
}

.chmod-grid label:hover {
	background: var(--hover);
}

.chmod-grid input {
	width: 19px;
	height: 19px;
	accent-color: var(--accent);
	cursor: pointer;
}

.chmod-out p {
	margin: 0 0 8px !important;
}

.chmod-cmd,
.chmod-ls {
	font: 500 14px/1.4 var(--mono);
	color: var(--ink);
}

.chmod-cmd b {
	color: var(--accent);
}

.chmod-ls span {
	color: var(--yellow);
}

.chmod-say {
	color: var(--ink-2);
	font-size: 14.5px !important;
}

.families {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 16px;
	padding: 0;
	list-style: none;
}

.families .chip {
	padding: 3px 10px;
	border-radius: 4px;
	background: var(--surface-3);
	color: var(--ink);
}

/* ---------- chips nav (in-section jump links) ---------- */
.jump {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 24px;
	padding: 0;
	list-style: none;
}

.jump a {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	min-height: 36px;
	padding: 0 13px;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: var(--surface);
	color: var(--ink-2);
	font-size: 14px;
	font-weight: 550;
	text-decoration: none;
}

.jump a:hover {
	border-color: var(--line-strong);
	color: var(--ink);
}

.jump i {
	color: var(--accent);
	font-size: 16px;
}

/* ---------- apps: sticky search + category strip ---------- */
.apps-intro {
	display: grid;
	grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
	gap: 20px 40px;
	margin-bottom: 24px;
}

.apps-intro p {
	margin: 0 0 12px;
}

.apps-bar {
	position: sticky;
	top: var(--top-h);
	z-index: 40;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 10px;
	margin: 0 calc(-1 * var(--gutter)) 20px;
	padding: 12px var(--gutter) 10px;
	background: color-mix(in oklab, var(--bg) 94%, transparent);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--line);
}

.apps-tools {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 12px;
}

.search {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 1 1 260px;
	max-width: 420px;
	min-height: 40px;
	padding: 0 8px 0 12px;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius-sm);
	background: var(--surface);
	color: var(--ink-3);
}

.search:focus-within {
	border-color: var(--accent);
	outline: 1px solid var(--accent);
}

.search i {
	font-size: 18px;
}

.search input {
	flex: 1;
	min-width: 0;
	height: 38px;
	border: 0;
	background: transparent;
	color: var(--ink);
	font: 400 15.5px/1 var(--sans);
	outline: none;
}

.search input::placeholder {
	color: var(--ink-3);
}

.filters {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.filter {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 36px;
	padding: 0 12px;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: var(--surface);
	color: var(--ink-2);
	font: 550 13.5px/1 var(--sans);
	white-space: nowrap;
	cursor: pointer;
}

.filter:hover {
	border-color: var(--line-strong);
	color: var(--ink);
}

.filter i {
	font-size: 15px;
	color: var(--tone, var(--ink-3));
}

.filter[aria-pressed="true"] {
	border-color: transparent;
	background: color-mix(in oklab, var(--tone, var(--accent)) 20%, var(--surface));
	box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--tone, var(--accent)) 55%, var(--surface));
	color: var(--ink);
}

.apps-count {
	margin: 0 0 0 auto;
	font-size: 13.5px;
	color: var(--ink-3);
	white-space: nowrap;
}

/* one scrolling row of categories; the current one is highlighted */
.cat-strip {
	position: relative;
	min-width: 0;
	margin: 0 calc(-1 * var(--gutter));
}

.cats {
	display: flex;
	gap: 4px;
	margin: 0;
	padding: 2px var(--gutter) 4px;
	list-style: none;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	scrollbar-width: none;
	-webkit-mask-image: linear-gradient(to right, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent);
	mask-image: linear-gradient(to right, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent);
}

.cats::-webkit-scrollbar {
	display: none;
}

.cats li {
	flex: none;
	scroll-snap-align: start;
}

.cat {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	min-height: 32px;
	padding: 0 11px;
	border-radius: var(--radius-sm);
	color: var(--ink-2);
	font-size: 13.5px;
	font-weight: 550;
	text-decoration: none;
	white-space: nowrap;
}

.cat:hover {
	background: var(--hover);
	color: var(--ink);
	text-decoration: none;
}

.cat i {
	font-size: 16px;
	color: var(--ink-3);
}

.cat-n {
	font: 500 11px/1 var(--mono);
	color: var(--ink-3);
}

.cat[aria-current="true"] {
	background: color-mix(in oklab, var(--accent) 16%, var(--surface));
	color: var(--ink);
}

.cat[aria-current="true"] i {
	color: var(--accent);
}

.apps-empty {
	padding: 32px;
	text-align: center;
	border: 1px dashed var(--line-strong);
	border-radius: var(--radius);
	color: var(--ink-2);
}

.link-btn {
	padding: 0;
	border: 0;
	background: none;
	color: var(--accent);
	font: inherit;
	text-decoration: underline;
	cursor: pointer;
}

/* ---------- FAQ ---------- */
.faq-grid {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
	gap: 32px 56px;
	align-items: start;
}

.about p {
	margin: 0 0 14px;
	color: var(--ink-2);
	font-size: 15.5px;
}

.about p:first-of-type {
	color: var(--ink);
}

.faq-list {
	display: grid;
	gap: 8px;
}

.faq-item > summary {
	font-weight: 600;
	padding-block: 13px;
}

.faq-body {
	padding: 0 18px 16px 42px;
	color: var(--ink-2);
	font-size: 15.5px;
}

.faq-body p {
	margin: 0 0 10px;
}

.faq-body > :last-child {
	margin-bottom: 0;
}

/* ---------- toast ---------- */
.toast {
	position: fixed;
	left: calc(50% + var(--side-w) / 2);
	bottom: 24px;
	z-index: 90;
	display: flex;
	align-items: center;
	gap: 10px;
	max-width: min(92vw, 560px);
	padding: 10px 16px;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius-sm);
	background: var(--surface);
	box-shadow: var(--shadow);
	color: var(--ink);
	font-size: 14px;
	transform: translate(-50%, 20px);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.15s, transform 0.15s;
}

.toast.is-shown {
	opacity: 1;
	transform: translate(-50%, 0);
}

.toast i {
	flex: none;
	font-size: 18px;
	color: var(--green);
}

.toast code {
	white-space: normal;
	overflow-wrap: anywhere;
}

/* ---------- footer ---------- */
.foot {
	margin-top: 96px;
	padding: 44px 0 32px;
	border-top: 1px solid var(--line);
	background: var(--surface);
}

.foot-grid {
	display: grid;
	grid-template-columns: 1.4fr repeat(3, 1fr);
	gap: 32px;
}

.foot .brand {
	gap: 11px;
	color: var(--ink);
}

.foot .brand:hover {
	color: var(--ink);
	text-decoration: none;
}

.foot .brand-pre,
.foot .brand-tag {
	color: var(--ink-2);
}

.foot .brand-mark {
	--mk-tile: var(--surface-2);
	--mk-edge: var(--line);
	--mk-chev: var(--accent);
}

.foot .brand-tag {
	margin-top: 14px;
}

.foot h2 {
	margin: 0 0 12px;
	font-size: 13px;
	font-weight: 600;
	color: var(--ink-3);
}

.foot ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.foot li + li {
	margin-top: 8px;
}

.foot a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--ink-2);
	text-decoration: none;
	font-size: 14.5px;
}

.foot a:hover {
	color: var(--ink);
	text-decoration: underline;
}

.foot a i {
	font-size: 17px;
	color: var(--accent);
}

.foot-brand .brand-tag {
	padding-left: 47px;
}

.foot-line {
	margin: 40px 0 0;
	padding-top: 18px;
	border-top: 1px solid var(--line);
	font-size: 13px;
	color: var(--ink-3);
}

/* controls that need site.js stay out of the way without it */
html:not(.js) .rice,
html:not(.js) .mode-btn,
html:not(.js) .menu-btn,
html:not(.js) .apps-tools {
	display: none !important;
}

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
	.hero-grid {
		grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
	}
}

@media (max-width: 1099px) {
	:root {
		--side-w: 0px;
		--top-h: 56px;
	}

	.topbar {
		position: sticky;
		top: 0;
		z-index: 55;
		display: flex;
		align-items: center;
		gap: 10px;
		height: var(--top-h);
		padding: 0 var(--gutter);
		border-bottom: 1px solid var(--panel-line);
		background: color-mix(in oklab, var(--panel) 95%, transparent);
		-webkit-backdrop-filter: blur(12px);
		backdrop-filter: blur(12px);
	}

	.topbar .brand-name {
		white-space: nowrap;
	}

	.ws-current {
		flex: 1;
		min-width: 0;
		margin: 0;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
		text-align: right;
		font-size: 13.5px;
		color: var(--panel-ink-2);
	}

	.sidebar {
		width: min(320px, 86vw);
		transform: translateX(-102%);
		transition: transform 0.2s ease;
		box-shadow: var(--shadow);
		visibility: hidden;
	}

	.sidebar.is-open {
		transform: none;
		visibility: visible;
	}

	.side-close {
		display: grid;
	}

	.scrim {
		position: fixed;
		inset: 0;
		z-index: 58;
		display: block;
		background: rgb(0 0 0 / 0.45);
	}

	.hero-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.hero-title {
		max-width: 16ch;
	}

	.guide {
		grid-template-columns: minmax(0, 1fr);
		gap: 24px;
	}

	.rail {
		top: var(--top-h);
		z-index: 30;
		margin: 0 calc(-1 * var(--gutter));
		padding: 8px var(--gutter);
		border-width: 0 0 1px;
		border-radius: 0;
		background: color-mix(in oklab, var(--bg) 94%, transparent);
		-webkit-backdrop-filter: blur(12px);
		backdrop-filter: blur(12px);
		overflow-x: auto;
		scrollbar-width: none;
	}

	.rail > ol {
		display: flex;
		gap: 6px;
		width: max-content;
	}

	.rail ol ol {
		display: none;
	}

	.rail a {
		min-height: 36px;
		white-space: nowrap;
		font-size: 13.5px;
	}

	/* clear the sticky horizontal step rail */
	.step,
	.step h4[id] {
		scroll-margin-top: 60px;
	}

	.reason-group {
		grid-template-columns: minmax(0, 1fr);
	}

	.reason-group-title {
		position: static;
	}

	.faq-grid,
	.apps-intro {
		grid-template-columns: minmax(0, 1fr);
	}

	.foot-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.foot-brand {
		grid-column: 1 / -1;
	}

	.toast {
		left: 50%;
	}
}

@media (max-width: 720px) {
	.sec {
		padding-top: 60px;
	}

	.sec-head {
		grid-template-columns: minmax(0, 1fr);
		gap: 10px;
	}

	.sec-lead {
		grid-column: 1;
		font-size: 16.5px;
	}

	.topbar .brand-name {
		display: none;
	}

	.reason-list {
		grid-template-columns: minmax(0, 1fr);
	}

	.ease {
		padding: 14px;
	}

	.status-summary,
	.status-group-title,
	.status-list {
		padding-inline: 14px;
	}

	.shelf-grid {
		padding: 10px;
		gap: 10px;
	}

	.shelf-notes {
		margin: 0 10px 10px;
	}

	/* the diff becomes unified: topic, then - line, then + line */
	.diff-table thead {
		display: none;
	}

	.diff-table,
	.diff-table tbody,
	.diff-table tr,
	.diff-table th,
	.diff-table td {
		display: block;
		width: auto;
	}

	.diff-table tbody th {
		width: auto;
		padding-bottom: 6px;
		background: var(--surface-2);
	}

	.diff-table td {
		border-top: 0;
	}

	.apps-tools .filters {
		flex-wrap: nowrap;
		overflow-x: auto;
		scrollbar-width: none;
	}

	.apps-count {
		display: none;
	}

	.hero-cta .btn {
		flex: 1 1 100%;
	}

	.term-body {
		padding: 14px;
		font-size: 12.5px;
	}

	.proc > li {
		padding-left: 36px;
	}

	.faq-body {
		padding-left: 18px;
	}

	.foot-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.gallery > summary {
		flex-wrap: wrap;
	}

	.gallery-meta {
		margin-left: 24px;
		width: 100%;
		text-align: left;
	}

	.chmod-body {
		grid-template-columns: minmax(0, 1fr);
	}

	.rwx-chars {
		font-size: 22px;
	}

	.dot span {
		font-size: 12px;
	}

	.quiz-body {
		padding: 16px;
	}

	.pick-card {
		grid-template-columns: minmax(0, 1fr);
	}

	.pick-card img.pick-logo {
		grid-row: auto;
	}

	.pick-why,
	.pick-actions {
		grid-column: 1;
	}
}

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

	*,
	*::before,
	*::after {
		animation: none !important;
		transition: none !important;
	}
}

@media print {
	body {
		padding-left: 0;
	}

	.sidebar,
	.topbar,
	.apps-bar,
	.rail,
	.cmd-copy,
	.foot {
		display: none;
	}

	html {
		background: #fff;
		color: #000;
	}
}
