/* HRMXN — UI kit. Plain CSS, no build step, no JavaScript.
   Archivo · mono red on paper · 1px lines · 0 radius · flush left. */
@import url("https://fonts.googleapis.com/css2?family=Archivo:wdth,wght@62..125,400..900&display=swap");

/* ── 01 Tokens ─────────────────────────────────────────── */
:root {
	--paper: #f8f4f4;
	--bg: #f3f2f2;
	--surface: #eae9e9;
	--ink: #201e1d;
	--ink-2: #444141;
	--muted: #605d5d;
	--faint: #9b9797;
	--line: #bab6b6;
	--line-soft: #d7d3d3;
	--n-200: #eae7e7;
	--n-300: #d7d3d3;
	--n-400: #bab6b6;
	--n-500: #9b9797;
	--n-600: #7d7979;
	--n-700: #605d5d;
	--n-800: #444141;
	--n-900: #2d2b2b;
	--accent: #ec3013;
	--a-100: #fff2ef;
	--a-200: #ffe0d9;
	--a-300: #ffc4b8;
	--a-400: #ff9783;
	--a-600: #dd2b0f;
	--a-700: #ae1800;
	--a-800: #7c1405;
	--a-900: #4d170e;
	--font: "Archivo", system-ui, sans-serif;
	--mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	--s1: 4px;
	--s2: 8px;
	--s3: 12px;
	--s4: 16px;
	--s5: 20px;
	--s6: 24px;
	--s8: 32px;
	--s10: 40px;
	--s12: 48px;
	--s16: 64px;
	--shadow-md: 0 3px 10px rgba(45, 43, 43, 0.16);
	--shadow-lg: 0 12px 32px rgba(45, 43, 43, 0.22);
	--side: 340px;
	--head: 56px;
}

/* ── Base ──────────────────────────────────────────────── */
*,
*::before,
*::after {
	box-sizing: border-box;
}
html {
	-webkit-text-size-adjust: 100%;
}
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.55;
}
img,
svg,
video {
	display: block;
	max-width: 100%;
}
h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd {
	margin: 0;
}
ol,
ul {
	margin: 0;
}
a {
	color: var(--a-700);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}
a:hover {
	color: var(--accent);
}
button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}
:focus {
	outline: none;
}
:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}
::selection {
	background: var(--a-200);
}
hr {
	border: 0;
	border-top: 1px solid var(--line);
	margin: var(--s6) 0;
}
hr.ink {
	border-top-color: var(--ink);
}
summary {
	list-style: none;
	cursor: pointer;
}
summary::-webkit-details-marker {
	display: none;
}
.sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* ── Icons (inline SVG sprite, Lucide-style) ───────────── */
.i {
	width: 20px;
	height: 20px;
	flex: none;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.5;
	stroke-linecap: square;
	stroke-linejoin: miter;
}
.i-sm {
	width: 16px;
	height: 16px;
}
.i-lg {
	width: 28px;
	height: 28px;
	stroke-width: 1.25;
}

/* ── Type ──────────────────────────────────────────────── */
.display {
	font-size: clamp(64px, 10vw, 160px);
	font-weight: 800;
	font-stretch: 125%;
	letter-spacing: -0.045em;
	line-height: 0.85;
}
.h1 {
	font-size: clamp(40px, 5vw, 64px);
	font-weight: 800;
	letter-spacing: -0.035em;
	line-height: 1;
}
.h2 {
	font-size: clamp(30px, 3.4vw, 44px);
	font-weight: 800;
	letter-spacing: -0.025em;
	line-height: 1.05;
}
.h3 {
	font-size: 28px;
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.1;
}
.h4 {
	font-size: 20px;
	font-weight: 800;
	letter-spacing: -0.01em;
	line-height: 1.2;
}
.h5 {
	font-size: 16px;
	font-weight: 800;
	line-height: 1.3;
}
.statement {
	font-size: clamp(30px, 3.6vw, 50px);
	line-height: 1.2;
	letter-spacing: -0.025em;
	text-wrap: pretty;
}
.statement b,
.statement strong {
	font-weight: 800;
}
.lede {
	font-size: 21px;
	line-height: 1.45;
	color: var(--ink-2);
	max-width: 60ch;
	text-wrap: pretty;
}
.label {
	font-size: 12px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--muted);
}
.label--red {
	color: var(--a-700);
}
.small {
	font-size: 14px;
}
.xsmall {
	font-size: 12px;
}
.muted {
	color: var(--muted);
}
.faint {
	color: var(--faint);
}
.red {
	color: var(--a-700);
}
.bold {
	font-weight: 800;
}
.prose {
	font-size: 18px;
	line-height: 1.65;
	max-width: 66ch;
	text-wrap: pretty;
}
.prose > * + * {
	margin-top: 1em;
}
.prose h2 {
	font-size: 28px;
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.15;
	margin-top: 1.6em;
}
.prose h3 {
	font-size: 20px;
	font-weight: 800;
	margin-top: 1.4em;
}
.prose ul,
.prose ol {
	padding-left: 1.2em;
}
.fn {
	color: var(--accent);
	font-weight: 800;
	font-size: 0.45em;
	vertical-align: super;
	line-height: 0;
	margin-left: 0.06em;
	text-decoration: none;
}
.prose .fn {
	font-size: 0.65em;
}
.notes {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: var(--s5) var(--s8);
	border-top: 1px solid var(--line);
	padding-top: var(--s4);
	font-size: 14px;
	line-height: 1.5;
	color: var(--ink-2);
}
.notes--stack {
	grid-template-columns: 1fr;
	border-top: 0;
	padding-top: 0;
	gap: var(--s6);
}
.note .n {
	color: var(--accent);
	font-weight: 800;
	margin-right: 0.6em;
}
.quote {
	border-top: 1px solid var(--ink);
	padding-top: var(--s4);
	font-size: 26px;
	line-height: 1.3;
	letter-spacing: -0.01em;
	max-width: 32ch;
}
.quote cite {
	display: block;
	font-style: normal;
	font-size: 13px;
	color: var(--a-700);
	margin-top: var(--s3);
}
.pull {
	font-size: clamp(28px, 3vw, 40px);
	line-height: 1.12;
	font-weight: 800;
	letter-spacing: -0.025em;
	text-wrap: balance;
}
.pull em {
	font-style: normal;
	color: var(--accent);
}
code,
kbd,
pre {
	font-family: var(--mono);
	font-size: 0.86em;
}
code {
	background: var(--n-200);
	padding: 1px 5px;
}
kbd {
	display: inline-block;
	min-width: 22px;
	padding: 0 6px;
	border: 1px solid var(--ink);
	background: var(--bg);
	font-size: 12px;
	line-height: 20px;
}
pre {
	margin: 0;
	background: var(--ink);
	color: var(--n-300);
	padding: var(--s5);
	overflow: auto;
	font-size: 13px;
	line-height: 1.65;
}
pre .c {
	color: var(--n-600);
}
pre .k {
	color: var(--a-400);
}
pre .s {
	color: var(--paper);
}
ul.dash {
	list-style: none;
	padding: 0;
}
ul.dash li {
	position: relative;
	padding-left: 22px;
}
ul.dash li + li {
	margin-top: 6px;
}
ul.dash li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.8em;
	width: 12px;
	border-top: 1px solid var(--accent);
}
.stamp {
	display: inline-block;
	border: 1px solid var(--accent);
	color: var(--a-700);
	padding: 3px 10px;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}
.divider {
	display: flex;
	align-items: center;
	gap: var(--s3);
	font-size: 12px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--muted);
}
.divider::after {
	content: "";
	flex: 1;
	border-top: 1px solid var(--line);
}

/* ── Links ─────────────────────────────────────────────── */
.link-arrow {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	text-decoration: none;
	color: var(--a-700);
}
.link-arrow .i {
	width: 16px;
	height: 16px;
	transition: transform 0.15s;
}
.link-arrow:hover .i {
	transform: translateX(3px);
}
.link-quiet {
	color: var(--ink);
	text-decoration-color: var(--line);
}
.link-quiet:hover {
	color: var(--ink);
	text-decoration-color: var(--accent);
}
.link-caps {
	font-size: 13px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--a-700);
}
.link-ext {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}
.link-ext .i {
	width: 14px;
	height: 14px;
}
.rowlink {
	display: grid;
	grid-template-columns: 56px minmax(0, 1fr) auto;
	align-items: baseline;
	gap: var(--s3);
	padding: 14px 0;
	border-top: 1px solid var(--line);
	color: var(--ink);
	text-decoration: none;
	font-size: 19px;
}
.rowlink:hover {
	color: var(--a-700);
}
.rowlink .n {
	color: var(--accent);
}
.rowlink .meta {
	font-size: 13px;
	color: var(--muted);
}
.rowlinks {
	border-bottom: 1px solid var(--line);
}
.rowlinks .rowlink:first-child {
	border-top-color: var(--ink);
}

/* ── Page shell (homepage 3b) ──────────────────────────── */
.page {
	display: grid;
	grid-template-columns: var(--side) minmax(0, 1fr);
	grid-template-rows: var(--head) 1fr auto;
	min-height: 100vh;
}
.head {
	grid-column: 1/-1;
	position: sticky;
	top: 0;
	z-index: 40;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--s6);
	padding: 0 var(--s12);
	background: var(--paper);
	border-bottom: 1px solid var(--line);
	font-size: 13px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.brand {
	font-weight: 800;
	color: var(--ink);
	text-decoration: none;
	letter-spacing: 0.08em;
}
.brand:hover {
	color: var(--ink);
}
.head-right {
	display: flex;
	align-items: center;
	gap: var(--s6);
}
.pageno {
	color: var(--muted);
}
.head a.login {
	color: var(--a-700);
	text-decoration: none;
}
.head a.login:hover {
	color: var(--accent);
}
.side {
	border-right: 1px solid var(--line);
	padding: 100px var(--s10) var(--s12) var(--s12);
}
.side-inner {
	position: sticky;
	top: calc(var(--head) + 40px);
	display: flex;
	flex-direction: column;
	gap: var(--s10);
}
.main {
	padding: 100px 96px var(--s16) var(--s16);
	min-width: 0;
	display: flex;
	flex-direction: column;
}
.main--tight {
	padding-top: var(--s16);
}
.foot {
	grid-column: 1/-1;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: var(--s6);
	min-height: 56px;
	padding: 0 var(--s12);
	border-top: 1px solid var(--line);
	font-size: 13px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--muted);
}
.foot nav {
	display: flex;
	gap: var(--s6);
}
.foot a {
	color: var(--a-700);
	text-decoration: none;
}
.foot a:hover {
	color: var(--accent);
}

/* Contents list (numbered nav) */
.contents {
	list-style: none;
	padding: 0;
	margin: 0;
	border-bottom: 1px solid var(--line);
}
.contents li {
	border-top: 1px solid var(--line);
}
.contents li:first-child {
	border-top-color: var(--ink);
}
.contents a {
	display: grid;
	grid-template-columns: 44px minmax(0, 1fr) auto;
	align-items: center;
	padding: 11px 0;
	font-size: 19px;
	color: var(--ink);
	text-decoration: none;
}
.contents a:hover {
	color: var(--a-700);
}
.contents .n {
	color: var(--accent);
}
.contents a[aria-current] {
	font-weight: 800;
}
.contents a[aria-current]::after {
	content: "";
	width: 8px;
	height: 8px;
	background: var(--accent);
}
.contents--sm a {
	font-size: 16px;
	padding: 8px 0;
	grid-template-columns: 36px minmax(0, 1fr) auto;
}
.contents--sm .n {
	color: var(--muted);
}
.side-group {
	display: flex;
	flex-direction: column;
	gap: var(--s3);
}

/* Layout helpers */
.stack {
	display: flex;
	flex-direction: column;
	gap: var(--gap, var(--s6));
}
.row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--gap, var(--s3));
}
.row--between {
	justify-content: space-between;
}
.row--top {
	align-items: flex-start;
}
.grid-2,
.grid-3,
.grid-4 {
	display: grid;
	gap: var(--gap, var(--s6));
}
.grid-2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid-4 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}
.split {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: var(--s12);
	align-items: start;
}
.split--wide-aside {
	grid-template-columns: minmax(0, 1fr) 360px;
}
.sticky {
	position: sticky;
	top: calc(var(--head) + 32px);
}
.section {
	border-top: 1px solid var(--ink);
	padding-top: var(--s6);
	margin-top: var(--s16);
}
.section-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	flex-wrap: wrap;
	gap: var(--s4);
	margin-bottom: var(--s6);
}
.pagehead {
	display: flex;
	flex-direction: column;
	gap: var(--s3);
	margin-bottom: var(--s12);
}
.mt-2 {
	margin-top: var(--s2);
}
.mt-4 {
	margin-top: var(--s4);
}
.mt-6 {
	margin-top: var(--s6);
}
.mt-8 {
	margin-top: var(--s8);
}
.mt-12 {
	margin-top: var(--s12);
}
.ml-auto {
	margin-left: auto;
}
.w-full {
	width: 100%;
}

/* ── Buttons ───────────────────────────────────────────── */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: flex-start;
	gap: var(--s2);
	height: 40px;
	padding: 0 var(--s4);
	border: 1px solid var(--ink);
	background: transparent;
	color: var(--ink);
	font-family: var(--font);
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition:
		background 0.12s,
		color 0.12s,
		border-color 0.12s;
}
.btn:hover {
	background: var(--ink);
	color: var(--paper);
}
.btn:active {
	background: var(--n-800);
	border-color: var(--n-800);
	color: var(--paper);
}
.btn .i {
	width: 18px;
	height: 18px;
}
.btn .push {
	margin-left: auto;
}
.btn-primary {
	background: var(--accent);
	border-color: var(--accent);
	color: var(--bg);
}
.btn-primary:hover {
	background: var(--a-600);
	border-color: var(--a-600);
	color: var(--bg);
}
.btn-primary:active {
	background: var(--a-700);
	border-color: var(--a-700);
}
.btn-ink {
	background: var(--ink);
	color: var(--paper);
}
.btn-ink:hover {
	background: var(--n-800);
	border-color: var(--n-800);
}
.btn-quiet {
	border-color: var(--line);
}
.btn-quiet:hover {
	border-color: var(--ink);
	background: rgba(32, 30, 29, 0.06);
	color: var(--ink);
}
.btn-ghost {
	border-color: transparent;
}
.btn-ghost:hover {
	background: rgba(32, 30, 29, 0.07);
	color: var(--ink);
}
.btn-ghost:active {
	background: rgba(32, 30, 29, 0.14);
	color: var(--ink);
	border-color: transparent;
}
.btn-danger {
	border-color: var(--a-700);
	color: var(--a-700);
}
.btn-danger:hover {
	background: var(--a-700);
	border-color: var(--a-700);
	color: var(--paper);
}
.btn-text {
	height: auto;
	padding: 0;
	border: 0;
	color: var(--a-700);
	font-weight: 600;
}
.btn-text:hover,
.btn-text:active {
	background: none;
	color: var(--accent);
	text-decoration: underline;
	text-underline-offset: 3px;
}
.btn-on-dark {
	border-color: var(--n-600);
	color: var(--paper);
}
.btn-on-dark:hover {
	background: var(--paper);
	color: var(--ink);
	border-color: var(--paper);
}
.btn-sm {
	height: 32px;
	padding: 0 var(--s3);
	font-size: 13px;
}
.btn-sm .i {
	width: 16px;
	height: 16px;
}
.btn-lg {
	height: 52px;
	padding: 0 22px;
	font-size: 17px;
}
.btn-block {
	display: flex;
	width: 100%;
}
.btn-icon {
	width: 40px;
	padding: 0;
	justify-content: center;
}
.btn-icon.btn-sm {
	width: 32px;
}
.btn-icon.btn-lg {
	width: 52px;
}
.btn[disabled],
.btn.is-disabled {
	opacity: 0.45;
	pointer-events: none;
}
.btn[aria-pressed="true"] {
	background: var(--ink);
	color: var(--paper);
}
.btn.is-loading::before {
	content: "";
	width: 14px;
	height: 14px;
	border-radius: 50%;
	/* ring with a fading tail: color fades from solid to transparent around the circle */
	background: conic-gradient(from 90deg, transparent 0deg, currentColor 330deg, transparent 331deg);
	/* cut out the middle so only a 2px ring is left */
	-webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px));
	mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px));
	animation: spin 0.9s linear infinite;
}
.btn-group {
	display: inline-flex;
}
.btn-group .btn + .btn {
	margin-left: -1px;
}
.btn-group .btn[aria-pressed="true"] {
	position: relative;
	z-index: 1;
}
.fab {
	position: fixed;
	right: var(--s6);
	bottom: var(--s6);
	width: 56px;
	height: 56px;
	display: grid;
	place-items: center;
	background: var(--accent);
	color: var(--bg);
	border: 0;
	box-shadow: var(--shadow-md);
	cursor: pointer;
	z-index: 45;
}
.fab:hover {
	background: var(--a-600);
}
.fab.is-static {
	position: static;
}

/* ── Tags, badges, status ──────────────────────────────── */
.tag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 24px;
	padding: 0 8px;
	border: 1px solid var(--line);
	color: var(--ink-2);
	font-size: 12px;
	letter-spacing: 0.02em;
	text-decoration: none;
	white-space: nowrap;
}
a.tag:hover {
	border-color: var(--ink);
	color: var(--ink);
}
.tag .i {
	width: 12px;
	height: 12px;
}
.tag-ink {
	background: var(--ink);
	border-color: var(--ink);
	color: var(--paper);
}
.tag-red {
	border-color: var(--accent);
	color: var(--a-700);
}
.tag-fill {
	background: var(--a-100);
	border-color: var(--a-200);
	color: var(--a-800);
}
.tag-soft {
	background: var(--n-200);
	border-color: var(--n-200);
}
.chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 32px;
	padding: 0 12px;
	border: 1px solid var(--line);
	font-size: 14px;
	cursor: pointer;
	user-select: none;
}
.chip:hover {
	border-color: var(--ink);
}
.chip input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}
.chip:has(input:checked) {
	background: var(--ink);
	border-color: var(--ink);
	color: var(--paper);
}
.chip:has(input:focus-visible) {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}
.chip .x {
	width: 14px;
	height: 14px;
	margin-right: -4px;
}
.badge {
	display: inline-grid;
	place-items: center;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	background: var(--accent);
	color: var(--bg);
	font-size: 11px;
	font-weight: 800;
	line-height: 1;
}
.badge-ink {
	background: var(--ink);
	color: var(--paper);
}
.badge-line {
	background: transparent;
	border: 1px solid var(--ink);
	color: var(--ink);
}
.has-badge {
	position: relative;
}
.has-badge > .badge {
	position: absolute;
	top: 4px;
	right: 4px;
	min-width: 8px;
	width: 8px;
	height: 8px;
	padding: 0;
}
.status {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
}
.status::before {
	content: "";
	width: 8px;
	height: 8px;
	background: var(--accent);
}
.status--idle::before {
	background: var(--n-500);
}
.status--off::before {
	background: transparent;
	border: 1px solid var(--n-600);
}
.status--warn::before {
	background: var(--a-300);
}
.status--live::before {
	animation: blink 1.6s steps(1) infinite;
}
.count {
	font-size: 12px;
	color: var(--muted);
	font-variant-numeric: tabular-nums;
}

/* ── Forms ─────────────────────────────────────────────── */
.field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}
.field-label {
	font-size: 13px;
	color: var(--ink-2);
}
.field-label .opt {
	color: var(--faint);
}
.help {
	font-size: 13px;
	color: var(--muted);
}
.error-text {
	font-size: 13px;
	color: var(--a-700);
}
.input,
.select,
.textarea {
	width: 100%;
	height: 44px;
	padding: 0 12px;
	border: 1px solid var(--line);
	border-radius: 0;
	background: var(--bg);
	color: var(--ink);
	font-size: 16px;
	caret-color: var(--accent);
	transition: border-color 0.12s;
}
.input::placeholder,
.textarea::placeholder {
	color: var(--faint);
}
.input:hover,
.select:hover,
.textarea:hover {
	border-color: var(--n-600);
}
.input:focus,
.select:focus,
.textarea:focus {
	border-color: var(--ink);
	outline: none;
	box-shadow: inset 0 -1px 0 var(--accent);
}
.field.is-error .input,
.field.is-error .textarea {
	border-color: var(--accent);
}
.input[disabled],
.select[disabled],
.textarea[disabled] {
	opacity: 0.5;
	cursor: not-allowed;
}
.input[readonly] {
	background: transparent;
	border-style: dashed;
}
.textarea {
	height: auto;
	min-height: 120px;
	padding: 12px;
	line-height: 1.5;
	resize: vertical;
}
.select {
	appearance: none;
	-webkit-appearance: none;
	padding-right: 40px;
	cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23201e1d' stroke-width='1.5' stroke-linecap='square'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 18px;
}
.input-line {
	border: 0;
	border-bottom: 1px solid var(--ink);
	background: transparent;
	padding: 0;
}
.input-line:focus {
	box-shadow: inset 0 -1px 0 var(--accent);
}
.input-lg {
	height: 56px;
	font-size: 20px;
}
.input-sm {
	height: 34px;
	font-size: 14px;
}
.input-icon {
	position: relative;
}
.input-icon > .i {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--muted);
	pointer-events: none;
}
.input-icon > .input {
	padding-left: 42px;
}
.input-icon > kbd {
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
}
.input-group {
	display: flex;
}
.input-group > .input {
	flex: 1;
	min-width: 0;
}
.input-group > .btn {
	height: 44px;
	margin-left: -1px;
}
.input-group > .addon {
	display: flex;
	align-items: center;
	padding: 0 12px;
	border: 1px solid var(--line);
	border-right: 0;
	background: var(--surface);
	color: var(--muted);
	font-size: 14px;
	white-space: nowrap;
}
.input[type="file"] {
	height: auto;
	padding: 6px;
	font-size: 14px;
	color: var(--muted);
}
.input[type="file"]::file-selector-button {
	height: 32px;
	margin-right: 12px;
	padding: 0 12px;
	border: 1px solid var(--ink);
	background: transparent;
	color: var(--ink);
	font: 600 13px var(--font);
	cursor: pointer;
}
.input[type="file"]::file-selector-button:hover {
	background: var(--ink);
	color: var(--paper);
}
fieldset {
	margin: 0;
	padding: var(--s4) 0 0;
	border: 0;
	border-top: 1px solid var(--ink);
	min-width: 0;
}
legend {
	padding: 0 var(--s3) 0 0;
	font-size: 12px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--muted);
}
.form-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--s5) var(--s6);
}
.form-grid .span-2 {
	grid-column: 1/-1;
}
.form-actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--s3);
	padding-top: var(--s6);
	border-top: 1px solid var(--line);
}
.setting {
	display: grid;
	grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
	gap: var(--s4) var(--s12);
	padding: var(--s6) 0;
	border-top: 1px solid var(--line);
}
.setting:first-child {
	border-top-color: var(--ink);
}
.setting-label {
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.setting-label p {
	font-size: 14px;
	color: var(--muted);
}

/* Choices */
.check,
.radio,
.switch {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: 15px;
	cursor: pointer;
	user-select: none;
}
.check input,
.radio input {
	appearance: none;
	-webkit-appearance: none;
	flex: none;
	width: 18px;
	height: 18px;
	margin: 0;
	border: 1px solid var(--ink);
	border-radius: 0;
	background: var(--bg);
	cursor: pointer;
	display: grid;
	place-items: center;
}
.check input:hover,
.radio input:hover {
	border-color: var(--accent);
}
.check input:checked {
	background: var(--ink)
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f8f4f4' stroke-width='2.5' stroke-linecap='square'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E")
		center/14px no-repeat;
}
.check input:indeterminate {
	background: var(--ink) linear-gradient(var(--paper), var(--paper)) center/8px 2px no-repeat;
}
.radio input:checked {
	border-color: var(--accent);
	background: var(--accent);
	box-shadow: inset 0 0 0 4px var(--bg);
}
.check input:disabled,
.radio input:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}
.switch input {
	appearance: none;
	-webkit-appearance: none;
	flex: none;
	width: 40px;
	height: 22px;
	margin: 0;
	border: 1px solid var(--ink);
	border-radius: 0;
	cursor: pointer;
	background: var(--bg) linear-gradient(var(--ink), var(--ink)) no-repeat 3px 50%/14px 14px;
	transition:
		background-position 0.15s,
		background-color 0.15s;
}
.switch input:checked {
	background-color: var(--accent);
	border-color: var(--accent);
	background-image: linear-gradient(var(--bg), var(--bg));
	background-position: calc(100% - 3px) 50%;
}
.switch input:disabled {
	opacity: 0.45;
}
.choices {
	display: flex;
	flex-direction: column;
	gap: var(--s3);
}
.choice-card {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 4px 12px;
	padding: var(--s4);
	border: 1px solid var(--line);
	cursor: pointer;
}
.choice-card:hover {
	border-color: var(--ink);
}
.choice-card:has(input:checked) {
	border-color: var(--ink);
	box-shadow: inset 0 0 0 1px var(--ink);
}
.choice-card input {
	grid-row: span 2;
	appearance: none;
	-webkit-appearance: none;
	width: 18px;
	height: 18px;
	margin: 2px 0 0;
	border: 1px solid var(--ink);
	border-radius: 0;
	background: var(--bg);
	cursor: pointer;
}
.choice-card input:checked {
	border-color: var(--accent);
	background: var(--accent);
	box-shadow: inset 0 0 0 4px var(--bg);
}
.choice-card input[type="checkbox"]:checked {
	background: var(--ink)
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f8f4f4' stroke-width='2.5' stroke-linecap='square'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E")
		center/14px no-repeat;
	border-color: var(--ink);
	box-shadow: none;
}
.choice-card small {
	grid-column: 2;
	color: var(--muted);
	font-size: 14px;
}
.seg {
	display: inline-flex;
	border: 1px solid var(--ink);
}
.seg label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 36px;
	padding: 0 14px;
	font-size: 14px;
	cursor: pointer;
}
.seg label + label {
	border-left: 1px solid var(--ink);
}
.seg input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}
.seg label:has(input:checked) {
	background: var(--ink);
	color: var(--paper);
}
.seg label:not(:has(input:checked)):hover {
	background: rgba(32, 30, 29, 0.07);
}
.seg label:has(input:focus-visible) {
	outline: 2px solid var(--accent);
	outline-offset: -2px;
}
.seg .i {
	width: 16px;
	height: 16px;
}
.range {
	appearance: none;
	-webkit-appearance: none;
	width: 100%;
	height: 20px;
	background: transparent;
	cursor: pointer;
}
.range::-webkit-slider-runnable-track {
	height: 1px;
	background: var(--ink);
}
.range::-moz-range-track {
	height: 1px;
	background: var(--ink);
}
.range::-moz-range-progress {
	height: 1px;
	background: var(--accent);
}
.range::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 16px;
	height: 16px;
	margin-top: -7.5px;
	border: 0;
	border-radius: 0;
	background: var(--accent);
}
.range::-moz-range-thumb {
	width: 16px;
	height: 16px;
	border: 0;
	border-radius: 0;
	background: var(--accent);
}
.dropzone {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--s3);
	padding: var(--s10) var(--s8);
	border: 1px dashed var(--n-600);
	background: var(--bg);
	cursor: pointer;
	transition:
		border-color 0.12s,
		background 0.12s;
}
.dropzone:hover {
	border-color: var(--accent);
	background: var(--a-100);
}
.dropzone input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}
.dropzone .i {
	width: 32px;
	height: 32px;
	stroke-width: 1.25;
	color: var(--accent);
}
.dropzone b {
	font-size: 22px;
	font-weight: 800;
	letter-spacing: -0.015em;
}

/* ── Avatars ───────────────────────────────────────────── */
.av {
	position: relative;
	display: inline-grid;
	place-items: center;
	flex: none;
	width: 40px;
	height: 40px;
	background: var(--ink);
	color: var(--paper);
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-decoration: none;
	overflow: visible;
}
.av img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: grayscale(1) contrast(1.08);
}
.av-xs {
	width: 24px;
	height: 24px;
	font-size: 9px;
}
.av-sm {
	width: 32px;
	height: 32px;
	font-size: 11px;
}
.av-lg {
	width: 64px;
	height: 64px;
	font-size: 20px;
}
.av-xl {
	width: 140px;
	height: 140px;
	font-size: 40px;
}
.av-red {
	background: var(--accent);
	color: var(--ink);
}
.av-line {
	background: transparent;
	color: var(--ink);
	border: 1px solid var(--ink);
}
.av-soft {
	background: var(--n-300);
	color: var(--ink);
}
.av.is-on::after {
	content: "";
	position: absolute;
	right: -3px;
	bottom: -3px;
	width: 10px;
	height: 10px;
	background: var(--accent);
	border: 2px solid var(--paper);
}
.av-stack {
	display: flex;
}
.av-stack .av {
	box-shadow: 0 0 0 2px var(--paper);
}
.av-stack .av + .av {
	margin-left: -6px;
}
.ident {
	display: flex;
	align-items: center;
	gap: var(--s3);
	min-width: 0;
}
.ident-text {
	display: flex;
	flex-direction: column;
	min-width: 0;
	line-height: 1.3;
}
.ident-name {
	font-weight: 800;
	color: var(--ink);
	text-decoration: none;
}
.ident-sub {
	font-size: 13px;
	color: var(--muted);
}

/* ── Media & placeholders ──────────────────────────────── */
.bw {
	filter: grayscale(1) contrast(1.08);
}
.media {
	display: block;
	width: 100%;
	aspect-ratio: var(--r, 4/3);
	object-fit: cover;
	filter: grayscale(1) contrast(1.08);
	background: var(--n-300);
}
.ph {
	display: flex;
	align-items: flex-end;
	width: 100%;
	aspect-ratio: var(--r, 4/3);
	padding: 10px;
	background: var(--n-300);
	color: var(--muted);
	font-size: 12px;
}
.ph-dark {
	background: var(--n-800);
	color: var(--n-400);
}
.ph-red {
	background: var(--accent);
	color: var(--ink);
}
.ph-line {
	background: transparent;
	border: 1px solid var(--line);
}

/* ── Cards ─────────────────────────────────────────────── */
.card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	border: 1px solid var(--line);
	background: var(--bg);
	color: var(--ink);
	text-decoration: none;
	transition: border-color 0.12s;
}
a.card:hover {
	border-color: var(--ink);
	color: var(--ink);
}
a.card:hover .card-title {
	color: var(--a-700);
}
.card-body {
	display: flex;
	flex-direction: column;
	gap: var(--s2);
	padding: var(--s5);
	flex: 1;
}
.card-kicker {
	font-size: 12px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--a-700);
}
.card-title {
	font-size: 20px;
	font-weight: 800;
	letter-spacing: -0.01em;
	line-height: 1.2;
}
.card-text {
	font-size: 15px;
	color: var(--ink-2);
	text-wrap: pretty;
}
.card-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--s3);
	padding: var(--s3) var(--s5);
	border-top: 1px solid var(--line);
	font-size: 13px;
	color: var(--muted);
}
.card-flat {
	border: 0;
	border-top: 1px solid var(--ink);
	background: transparent;
}
.card-flat .card-body {
	padding: var(--s4) 0 0;
}
.card-flat .card-foot {
	padding: var(--s3) 0 0;
	border-top: 0;
}
.card-ink {
	background: var(--ink);
	border-color: var(--ink);
	color: var(--paper);
}
.card-ink .card-text {
	color: var(--n-400);
}
.card-ink .card-kicker {
	color: var(--a-400);
}
.card-ink .card-foot {
	border-top-color: var(--n-700);
	color: var(--n-400);
}
a.card-ink:hover {
	color: var(--paper);
}
a.card-ink:hover .card-title {
	color: var(--a-400);
}
.card-num .card-body {
	gap: var(--s3);
}
.card-num .num {
	font-size: 44px;
	font-weight: 800;
	letter-spacing: -0.04em;
	line-height: 1;
	color: var(--accent);
}
.card-h {
	flex-direction: row;
}
.card-h > .media,
.card-h > .ph {
	width: 38%;
	aspect-ratio: auto;
	align-self: stretch;
}

/* ── Posts & comments ──────────────────────────────────── */
.post {
	display: grid;
	grid-template-columns: 40px minmax(0, 1fr);
	gap: 0 var(--s4);
	padding: var(--s5) 0 var(--s4);
	border-top: 1px solid var(--ink);
}
.post + .post {
	border-top-color: var(--line);
}
.post-head {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 4px 10px;
	min-width: 0;
}
.post-author {
	font-weight: 800;
	color: var(--ink);
	text-decoration: none;
}
.post-author:hover {
	color: var(--a-700);
}
.post-handle,
.post-time {
	font-size: 14px;
	color: var(--muted);
}
.post-time {
	margin-left: auto;
	text-decoration: none;
}
.post-body {
	margin: 6px 0 var(--s4);
	font-size: 17px;
	line-height: 1.55;
	text-wrap: pretty;
}
.post-body p + p {
	margin-top: 0.6em;
}
.post-media {
	display: grid;
	gap: 4px;
	margin-bottom: var(--s4);
}
.post-media--2 {
	grid-template-columns: 1fr 1fr;
}
.post-media--3 {
	grid-template-columns: 2fr 1fr;
	grid-template-rows: 1fr 1fr;
}
.post-media--3 > :first-child {
	grid-row: span 2;
}
.post-media--3 > * {
	aspect-ratio: auto;
	height: 100%;
}
.post-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 2px;
	margin-left: -10px;
}
.act {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 34px;
	padding: 0 10px;
	border: 0;
	background: none;
	color: var(--muted);
	font-size: 14px;
	text-decoration: none;
	cursor: pointer;
}
.act:hover {
	background: rgba(32, 30, 29, 0.06);
	color: var(--ink);
}
.act .i {
	width: 18px;
	height: 18px;
}
.act.is-on {
	color: var(--accent);
}
.act.is-on .i {
	fill: currentColor;
}
.act-end {
	margin-left: auto;
}
.post-quote {
	border: 1px solid var(--line);
	padding: var(--s4);
	margin-bottom: var(--s4);
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.post-quote .post-body {
	margin: 0;
	font-size: 15px;
}
.post-link {
	display: grid;
	grid-template-columns: 120px minmax(0, 1fr);
	border: 1px solid var(--line);
	margin-bottom: var(--s4);
	color: var(--ink);
	text-decoration: none;
}
.post-link:hover {
	border-color: var(--ink);
	color: var(--ink);
}
.post-link > div {
	padding: var(--s3) var(--s4);
	display: flex;
	flex-direction: column;
	gap: 2px;
	font-size: 14px;
}
.post-link .ph,
.post-link .media {
	aspect-ratio: auto;
	height: 100%;
}
.post-note {
	grid-column: 2;
	font-size: 13px;
	color: var(--muted);
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 6px;
}
.post-note .i {
	width: 14px;
	height: 14px;
}
.post--pinned {
	border-top: 1px solid var(--accent);
}
.composer {
	border: 1px solid var(--ink);
	background: var(--bg);
}
.composer-top {
	display: grid;
	grid-template-columns: 40px minmax(0, 1fr);
	gap: var(--s4);
	padding: var(--s4);
}
.composer textarea {
	width: 100%;
	min-height: 72px;
	border: 0;
	background: transparent;
	resize: vertical;
	font-size: 18px;
	line-height: 1.45;
	padding: 8px 0 0;
}
.composer textarea:focus {
	outline: none;
}
.composer textarea::placeholder {
	color: var(--faint);
}
.composer-bar {
	display: flex;
	align-items: center;
	gap: 2px;
	padding: var(--s2) var(--s2) var(--s2) var(--s3);
	border-top: 1px solid var(--line);
}
.composer-bar .btn-primary {
	margin-left: auto;
}
.comment {
	display: grid;
	grid-template-columns: 32px minmax(0, 1fr);
	gap: 0 var(--s3);
	padding: var(--s4) 0;
}
.comment + .comment {
	border-top: 1px solid var(--line-soft);
}
.comment-head {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 10px;
	align-items: baseline;
	font-size: 14px;
}
.comment-body {
	font-size: 16px;
	margin: 4px 0 6px;
	text-wrap: pretty;
}
.comment-actions {
	display: flex;
	gap: var(--s4);
	font-size: 13px;
}
.comment-actions a {
	color: var(--muted);
	text-decoration: none;
}
.comment-actions a:hover {
	color: var(--a-700);
}
.thread {
	grid-column: 2;
	margin-top: var(--s2);
	padding-left: var(--s4);
	border-left: 1px solid var(--line);
}
.pin {
	break-inside: avoid;
	margin: 0 0 var(--s6);
	display: flex;
	flex-direction: column;
	gap: var(--s2);
	color: var(--ink);
	text-decoration: none;
}
.pin:hover .pin-title {
	color: var(--a-700);
}
.pin-title {
	font-weight: 800;
	font-size: 16px;
	line-height: 1.25;
}
.pin-meta {
	display: flex;
	justify-content: space-between;
	gap: var(--s2);
	font-size: 13px;
	color: var(--muted);
}
.pin-text {
	padding: var(--s5);
	background: var(--bg);
	border: 1px solid var(--line);
	font-size: 19px;
	line-height: 1.35;
	letter-spacing: -0.01em;
}
.pin-text.is-red {
	background: var(--accent);
	border-color: var(--accent);
	font-weight: 600;
}
.pin-text.is-ink {
	background: var(--ink);
	border-color: var(--ink);
	color: var(--paper);
}
.masonry {
	columns: 3 220px;
	column-gap: var(--s6);
}

/* ── Feedback ──────────────────────────────────────────── */
.alert {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	gap: var(--s3);
	align-items: start;
	padding: 14px var(--s4);
	border: 1px solid var(--ink);
	background: var(--bg);
	font-size: 15px;
}
.alert .i {
	margin-top: 1px;
}
.alert-title {
	font-weight: 800;
}
.alert p {
	color: var(--ink-2);
}
.alert--red {
	border-color: var(--accent);
	background: var(--a-100);
	color: var(--a-900);
}
.alert--red .i {
	color: var(--accent);
}
.alert--red p {
	color: var(--a-800);
}
.alert--ink {
	background: var(--ink);
	border-color: var(--ink);
	color: var(--paper);
}
.alert--ink p {
	color: var(--n-400);
}
.alert--soft {
	border-color: var(--line);
	background: var(--surface);
}
.alert .close {
	color: inherit;
	opacity: 0.7;
	text-decoration: none;
	display: grid;
}
.alert .close:hover {
	opacity: 1;
	color: inherit;
}
.banner {
	display: flex;
	align-items: center;
	gap: var(--s4);
	padding: 10px var(--s12);
	background: var(--accent);
	color: var(--ink);
	font-size: 14px;
	font-weight: 600;
}
.banner a {
	color: var(--ink);
	font-weight: 800;
}
.toast {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	gap: var(--s3);
	align-items: start;
	width: 380px;
	max-width: 100%;
	padding: 14px var(--s4);
	background: var(--ink);
	color: var(--paper);
	box-shadow: var(--shadow-md);
	font-size: 14px;
}
.toast-title {
	font-weight: 800;
	font-size: 15px;
}
.toast-text {
	color: var(--n-400);
}
.toast-actions {
	display: flex;
	gap: var(--s4);
	margin-top: 6px;
}
.toast-actions a {
	color: var(--a-400);
	text-decoration: none;
	font-weight: 600;
}
.toast-actions a:hover {
	color: var(--paper);
}
.toast .x {
	color: var(--n-500);
}
.toast .x:hover {
	color: var(--paper);
}
.toast--ok .lead-i {
	color: var(--paper);
}
.toast--red {
	box-shadow:
		inset 0 2px 0 var(--accent),
		var(--shadow-md);
}
.toast--red .lead-i {
	color: var(--accent);
}
.toast--light {
	background: var(--bg);
	color: var(--ink);
	border: 1px solid var(--ink);
}
.toast--light .toast-text {
	color: var(--muted);
}
.toast--light .toast-actions a {
	color: var(--a-700);
}
.toast--light .x {
	color: var(--muted);
}
.toast-stack {
	position: fixed;
	right: var(--s6);
	bottom: var(--s6);
	z-index: 60;
	display: flex;
	flex-direction: column;
	gap: var(--s2);
}
.toast-stack .toast {
	animation:
		toast-in 0.3s ease-out both,
		toast-out 0.3s ease-in 6s forwards;
}
.toast-stack .toast:nth-child(2) {
	animation-delay: 0.15s, 6.3s;
}
.progress {
	position: relative;
	height: 3px;
	background: var(--line-soft);
	overflow: hidden;
}
.progress > span {
	position: absolute;
	inset: 0 auto 0 0;
	width: var(--v, 40%);
	background: var(--accent);
}
.progress--ink > span {
	background: var(--ink);
}
.progress--thin {
	height: 1px;
}
.progress--loop > span {
	width: 30%;
	animation: slide 1.2s ease-in-out infinite;
}
.progress-row {
	display: flex;
	justify-content: space-between;
	font-size: 13px;
	color: var(--muted);
	margin-bottom: 6px;
}
progress {
	appearance: none;
	-webkit-appearance: none;
	width: 100%;
	height: 3px;
	border: 0;
	background: var(--line-soft);
}
progress::-webkit-progress-bar {
	background: var(--line-soft);
}
progress::-webkit-progress-value {
	background: var(--accent);
}
progress::-moz-progress-bar {
	background: var(--accent);
}
.meter {
	display: grid;
	grid-template-columns: repeat(10, 1fr);
	gap: 3px;
	height: 14px;
}
.meter i {
	background: var(--line-soft);
}
.meter i.on {
	background: var(--ink);
}
.meter i.hot {
	background: var(--accent);
}
.spinner {
	display: inline-block;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	/* same fading-tail ring as the button spinner, in ink color */
	background: conic-gradient(from 90deg, transparent 0deg, var(--ink) 330deg, transparent 331deg);
	-webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px));
	mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px));
	animation: spin 0.9s linear infinite;
}
.loader {
	display: inline-flex;
	gap: 4px;
}
.loader i {
	width: 8px;
	height: 8px;
	background: var(--ink);
	animation: blink 1s steps(1) infinite;
}
.loader i:nth-child(2) {
	animation-delay: 0.33s;
}
.loader i:nth-child(3) {
	animation-delay: 0.66s;
	background: var(--accent);
}
.skeleton {
	background: linear-gradient(90deg, var(--n-200) 0 40%, var(--n-300) 50%, var(--n-200) 60% 100%) 0
		0/300% 100%;
	animation: shimmer 1.4s linear infinite;
	height: 14px;
}
.skeleton.sq {
	width: 40px;
	height: 40px;
}
.skeleton.media {
	aspect-ratio: 4/3;
	height: auto;
}
.empty {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--s3);
	padding: var(--s12) var(--s8);
	border: 1px dashed var(--n-500);
}
.empty .i {
	width: 32px;
	height: 32px;
	stroke-width: 1.25;
	color: var(--muted);
}
.empty p {
	color: var(--muted);
	max-width: 44ch;
}

/* ── Overlays ──────────────────────────────────────────── */
.modal {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: none;
	place-items: center;
	padding: var(--s6);
	background: rgba(45, 43, 43, 0.55);
}
.modal:target {
	display: grid;
}
.modal-close-area {
	position: absolute;
	inset: 0;
}
.dialog {
	position: relative;
	width: min(480px, 100%);
	max-height: calc(100vh - 48px);
	overflow: auto;
	background: var(--bg);
	border: 1px solid var(--ink);
	box-shadow: var(--shadow-lg);
}
.dialog-lg {
	width: min(720px, 100%);
}
.dialog-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: var(--s4);
	padding: 14px var(--s5);
	border-bottom: 1px solid var(--line);
}
.dialog-head .x {
	color: var(--muted);
	display: grid;
}
.dialog-head .x:hover {
	color: var(--ink);
}
.dialog-body {
	padding: var(--s5);
	display: flex;
	flex-direction: column;
	gap: var(--s4);
}
.dialog-foot {
	display: flex;
	flex-wrap: wrap;
	gap: var(--s2);
	padding: 14px var(--s5);
	border-top: 1px solid var(--line);
}
.dialog--red {
	border-color: var(--accent);
}
.dialog--red .dialog-head {
	background: var(--accent);
	border-bottom-color: var(--accent);
}
.dialog--red .dialog-head .x {
	color: var(--ink);
}
.drawer {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: none;
	background: rgba(45, 43, 43, 0.45);
}
.drawer:target {
	display: block;
}
.drawer-panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(420px, 100%);
	background: var(--bg);
	border-left: 1px solid var(--ink);
	display: flex;
	flex-direction: column;
	animation: drawer-in 0.25s ease-out;
}
.dropdown {
	position: relative;
	display: inline-block;
}
.dropdown > summary {
	display: inline-flex;
}
.menu {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	z-index: 50;
	min-width: 220px;
	padding: 4px 0;
	background: var(--bg);
	border: 1px solid var(--ink);
	box-shadow: var(--shadow-md);
	font-size: 15px;
	letter-spacing: 0;
	text-transform: none;
}
.dropdown--right .menu {
	left: auto;
	right: 0;
}
.menu-static {
	position: static;
	display: inline-block;
}
.menu a,
.menu .menu-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 14px;
	color: var(--ink);
	text-decoration: none;
	white-space: nowrap;
}
.menu a:hover {
	background: var(--surface);
	color: var(--ink);
}
.menu a .i {
	width: 18px;
	height: 18px;
	color: var(--muted);
}
.menu a .k {
	margin-left: auto;
	font-size: 12px;
	color: var(--faint);
}
.menu hr {
	margin: 4px 0;
}
.menu .menu-label {
	padding: 8px 14px 4px;
	font-size: 11px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--muted);
}
.menu a.danger,
.menu a.danger .i {
	color: var(--a-700);
}
.menu--wide {
	width: 340px;
	white-space: normal;
}
.notif {
	display: grid !important;
	grid-template-columns: 32px minmax(0, 1fr) auto;
	gap: 10px;
	align-items: start;
	white-space: normal !important;
	font-size: 14px;
	line-height: 1.4;
}
.notif time {
	font-size: 12px;
	color: var(--faint);
}
.notif.is-unread {
	box-shadow: inset 2px 0 0 var(--accent);
}
[data-tip] {
	position: relative;
}
[data-tip]:hover::after,
[data-tip]:focus-visible::after {
	content: attr(data-tip);
	position: absolute;
	bottom: calc(100% + 8px);
	left: 0;
	z-index: 70;
	padding: 5px 9px;
	background: var(--ink);
	color: var(--paper);
	font-size: 12px;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
	line-height: 1.3;
	white-space: nowrap;
	pointer-events: none;
}
.popover {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	z-index: 50;
	width: 300px;
	padding: var(--s4);
	background: var(--bg);
	border: 1px solid var(--ink);
	box-shadow: var(--shadow-md);
	display: flex;
	flex-direction: column;
	gap: var(--s2);
	font-size: 14px;
}
.lightbox {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: none;
	grid-template-columns: minmax(0, 1fr) 320px;
	background: var(--ink);
	color: var(--paper);
}
.lightbox:target {
	display: grid;
}
.lightbox-stage {
	display: grid;
	place-items: center;
	padding: var(--s12);
	min-height: 0;
}
.lightbox-stage .media,
.lightbox-stage .ph {
	max-height: calc(100vh - 96px);
	width: auto;
	max-width: 100%;
	height: calc(100vh - 96px);
}
.lightbox-info {
	border-left: 1px solid var(--n-700);
	padding: var(--s6);
	display: flex;
	flex-direction: column;
	gap: var(--s4);
}
.lightbox-info .muted {
	color: var(--n-400);
}
.lightbox-nav {
	display: flex;
	gap: var(--s2);
	margin-top: auto;
}

/* ── Navigation ────────────────────────────────────────── */
.tabs {
	display: flex;
	flex-wrap: wrap;
	border-bottom: 0;
}
.tabs > input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}
.tabs > label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 0;
	margin-right: var(--s8);
	margin-bottom: -1px;
	border-bottom: 1px solid transparent;
	color: var(--muted);
	font-size: 16px;
	cursor: pointer;
	position: relative;
	z-index: 1;
}
.tabs > label:hover {
	color: var(--ink);
}
.tabs > input:checked + label {
	color: var(--ink);
	border-bottom-color: var(--accent);
}
.tabs > input:focus-visible + label {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}
.tabs > .tab-rule {
	order: 1;
	width: 100%;
	border-top: 1px solid var(--line);
}
.tabs > .tab-panel {
	order: 2;
	width: 100%;
	display: none;
	padding-top: var(--s8);
}
.tabs > input:nth-of-type(1):checked ~ .tab-panel:nth-of-type(2),
.tabs > input:nth-of-type(2):checked ~ .tab-panel:nth-of-type(3),
.tabs > input:nth-of-type(3):checked ~ .tab-panel:nth-of-type(4),
.tabs > input:nth-of-type(4):checked ~ .tab-panel:nth-of-type(5),
.tabs > input:nth-of-type(5):checked ~ .tab-panel:nth-of-type(6),
.tabs > input:nth-of-type(6):checked ~ .tab-panel:nth-of-type(7) {
	display: block;
}
.tabs .count {
	margin-left: 2px;
}
.tablinks {
	display: flex;
	flex-wrap: wrap;
	gap: 0 var(--s8);
	border-bottom: 1px solid var(--line);
}
.tablinks a {
	padding: 12px 0;
	margin-bottom: -1px;
	border-bottom: 1px solid transparent;
	color: var(--muted);
	text-decoration: none;
}
.tablinks a:hover {
	color: var(--ink);
}
.tablinks a[aria-current] {
	color: var(--ink);
	border-bottom-color: var(--accent);
}
.vtabs {
	display: flex;
	flex-direction: column;
}
.vtabs a {
	display: flex;
	justify-content: space-between;
	padding: 10px 0 10px 14px;
	border-left: 1px solid var(--line);
	color: var(--muted);
	text-decoration: none;
}
.vtabs a:hover {
	color: var(--ink);
}
.vtabs a[aria-current] {
	color: var(--ink);
	border-left-color: var(--accent);
	font-weight: 600;
}
.crumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	list-style: none;
	padding: 0;
	font-size: 13px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--muted);
}
.crumbs li + li::before {
	content: "/";
	margin-right: 8px;
	color: var(--faint);
}
.crumbs a {
	color: var(--muted);
	text-decoration: none;
}
.crumbs a:hover {
	color: var(--a-700);
}
.crumbs [aria-current] {
	color: var(--ink);
}
.pager {
	display: flex;
	flex-wrap: wrap;
}
.pager a,
.pager span {
	display: grid;
	place-items: center;
	min-width: 40px;
	height: 40px;
	padding: 0 10px;
	border: 1px solid var(--line);
	color: var(--ink);
	text-decoration: none;
	font-size: 15px;
	font-variant-numeric: tabular-nums;
}
.pager > * + * {
	margin-left: -1px;
}
.pager a:hover {
	border-color: var(--ink);
	position: relative;
	z-index: 1;
}
.pager [aria-current] {
	background: var(--ink);
	border-color: var(--ink);
	color: var(--paper);
	position: relative;
	z-index: 1;
}
.pager .gap {
	border-color: transparent;
}
.pager-simple {
	display: flex;
	justify-content: space-between;
	gap: var(--s6);
	border-top: 1px solid var(--ink);
	padding-top: var(--s4);
}
.pager-simple a {
	display: flex;
	flex-direction: column;
	gap: 2px;
	color: var(--ink);
	text-decoration: none;
	max-width: 45%;
}
.pager-simple a:last-child {
	text-align: left;
	margin-left: auto;
}
.pager-simple a:hover b {
	color: var(--a-700);
}
.pager-simple .label {
	display: flex;
	align-items: center;
	gap: 6px;
}
.steps {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	gap: var(--s4);
	list-style: none;
	padding: 0;
	counter-reset: step;
}
.steps li {
	counter-increment: step;
	border-top: 1px solid var(--line);
	padding-top: 10px;
	font-size: 14px;
	color: var(--muted);
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.steps li::before {
	content: counter(step, decimal-leading-zero);
	font-weight: 800;
	color: var(--faint);
}
.steps li.done {
	border-top-color: var(--ink);
	color: var(--ink);
}
.steps li.done::before {
	color: var(--ink);
}
.steps li.now {
	border-top-color: var(--accent);
	color: var(--ink);
	font-weight: 600;
}
.steps li.now::before {
	color: var(--accent);
}
.acc {
	border-top: 1px solid var(--line);
}
.acc:last-child {
	border-bottom: 1px solid var(--line);
}
.acc > summary {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: var(--s4);
	padding: var(--s4) 0;
	font-size: 19px;
}
.acc > summary:hover {
	color: var(--a-700);
}
.acc > summary::after {
	content: "+";
	font-size: 22px;
	line-height: 1;
	color: var(--accent);
}
.acc[open] > summary::after {
	content: "−";
}
.acc-body {
	padding: 0 0 var(--s5);
	max-width: 66ch;
	color: var(--ink-2);
}

/* ── Data ──────────────────────────────────────────────── */
.table-wrap {
	overflow-x: auto;
}
.table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
}
.table th {
	padding: 0 var(--s3) 10px 0;
	border-bottom: 1px solid var(--ink);
	text-align: left;
	font-size: 12px;
	font-weight: 400;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--muted);
	white-space: nowrap;
}
.table td {
	padding: 13px var(--s3) 13px 0;
	border-bottom: 1px solid var(--line);
	vertical-align: middle;
}
.table tbody tr:hover td {
	background: rgba(32, 30, 29, 0.03);
}
.table .muted {
	color: var(--muted);
}
.table .tnum {
	font-variant-numeric: tabular-nums;
}
.table--lg td {
	font-size: 17px;
	padding: 14px var(--s3) 14px 0;
}
.table--compact td {
	padding: 8px var(--s3) 8px 0;
	font-size: 14px;
}
.table tr.is-selected td {
	background: var(--a-100);
}
.table td.check-cell,
.table th.check-cell {
	width: 32px;
}
.dl {
	display: grid;
	grid-template-columns: minmax(0, 140px) minmax(0, 1fr);
	font-size: 15px;
}
.dl dt,
.dl dd {
	padding: 10px 0;
	border-top: 1px solid var(--line);
}
.dl dt {
	color: var(--muted);
	padding-right: var(--s4);
}
.dl--stack {
	grid-template-columns: 1fr;
}
.dl--stack dd {
	border-top: 0;
	padding-top: 0;
}
.timeline {
	list-style: none;
	padding: 0;
}
.timeline li {
	display: grid;
	grid-template-columns: 110px minmax(0, 1fr);
	gap: var(--s4);
	padding: 14px 0;
	border-top: 1px solid var(--line);
}
.timeline li:first-child {
	border-top-color: var(--ink);
}
.timeline time {
	font-size: 14px;
	color: var(--muted);
	font-variant-numeric: tabular-nums;
}
.timeline .t-title {
	font-weight: 800;
}
.timeline .t-text {
	font-size: 15px;
	color: var(--ink-2);
}
.timeline li.is-red time {
	color: var(--a-700);
}
.figure-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	border-top: 1px solid var(--ink);
}
.figure {
	padding: var(--s4) var(--s4) var(--s4) 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.figure + .figure {
	border-left: 1px solid var(--line);
	padding-left: var(--s4);
}
.figure b {
	font-size: 40px;
	font-weight: 800;
	letter-spacing: -0.04em;
	line-height: 1.05;
	font-variant-numeric: tabular-nums;
}
.figure b small {
	font-size: 18px;
	font-weight: 600;
	letter-spacing: 0;
	color: var(--muted);
}
.figure span {
	font-size: 13px;
	color: var(--muted);
}
.bars {
	display: grid;
	grid-template-columns: repeat(60, minmax(0, 1fr));
	gap: 2px;
	height: 26px;
}
.bars i {
	background: var(--ink);
}
.bars i.w {
	background: var(--a-300);
}
.bars i.d {
	background: var(--accent);
}
.bars-legend {
	display: flex;
	justify-content: space-between;
	font-size: 12px;
	color: var(--faint);
	margin-top: 4px;
}
.console {
	background: var(--ink);
	color: var(--n-300);
	font-family: var(--mono);
	font-size: 13px;
	line-height: 1.7;
	padding: var(--s4) var(--s5);
	overflow: auto;
	max-height: 320px;
}
.console .t {
	color: var(--n-600);
}
.console .e {
	color: var(--a-400);
}
.console .ok {
	color: var(--paper);
}

/* ── Tickets ───────────────────────────────────────────── */
.ticket {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) 170px;
	max-width: 680px;
	border: 1px solid var(--ink);
	background: var(--bg);
}
.ticket-main {
	padding: var(--s5) var(--s6);
	display: flex;
	flex-direction: column;
	gap: var(--s3);
}
.ticket-title {
	font-size: 30px;
	font-weight: 800;
	font-stretch: 112%;
	letter-spacing: -0.03em;
	line-height: 1;
}
.ticket-info {
	display: grid;
	grid-template-columns: repeat(4, auto);
	justify-content: start;
	gap: 4px var(--s8);
	margin-top: auto;
	padding-top: var(--s3);
	border-top: 1px solid var(--line);
	font-size: 14px;
}
.ticket-info span {
	font-size: 11px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--muted);
}
.ticket-stub {
	position: relative;
	padding: var(--s5);
	border-left: 1px dashed var(--ink);
	display: flex;
	flex-direction: column;
	gap: var(--s2);
}
.ticket-stub::before,
.ticket-stub::after {
	content: "";
	position: absolute;
	left: -9px;
	width: 16px;
	height: 9px;
	background: var(--paper);
	border: 1px solid var(--ink);
}
.ticket-stub::before {
	top: -1px;
	border-top: 0;
}
.ticket-stub::after {
	bottom: -1px;
	border-bottom: 0;
}
.ticket-no {
	font-size: 28px;
	font-weight: 800;
	letter-spacing: -0.03em;
	font-variant-numeric: tabular-nums;
}
.barcode {
	height: 44px;
	margin-top: auto;
	background: repeating-linear-gradient(
		90deg,
		var(--ink) 0 2px,
		transparent 2px 3px,
		var(--ink) 3px 4px,
		transparent 4px 7px,
		var(--ink) 7px 10px,
		transparent 10px 11px,
		var(--ink) 11px 12px,
		transparent 12px 15px,
		var(--ink) 15px 16px,
		transparent 16px 18px
	);
}
.ticket--red .ticket-main {
	background: var(--accent);
}
.ticket--red .ticket-info {
	border-top-color: var(--ink);
}
.ticket--red .ticket-info span {
	color: var(--ink);
}
.ticket--ink {
	background: var(--ink);
	color: var(--paper);
	border-color: var(--ink);
}
.ticket--ink .ticket-stub {
	border-left-color: var(--n-500);
}
.ticket--ink .ticket-stub::before,
.ticket--ink .ticket-stub::after {
	border-color: var(--ink);
}
.ticket--ink .ticket-info {
	border-top-color: var(--n-700);
}
.ticket--ink .ticket-info span {
	color: var(--n-400);
}
.ticket--ink .barcode {
	background: repeating-linear-gradient(
		90deg,
		var(--paper) 0 2px,
		transparent 2px 3px,
		var(--paper) 3px 4px,
		transparent 4px 7px,
		var(--paper) 7px 10px,
		transparent 10px 11px,
		var(--paper) 11px 12px,
		transparent 12px 15px
	);
}
.ticket--sm {
	grid-template-columns: minmax(0, 1fr) 110px;
}
.ticket--sm .ticket-title {
	font-size: 20px;
}
.ticket--sm .ticket-main,
.ticket--sm .ticket-stub {
	padding: var(--s4);
}
.ticket--sm .ticket-no {
	font-size: 18px;
}
.ticket--sm .barcode {
	height: 28px;
}
.issue {
	display: flex;
	flex-direction: column;
	gap: var(--s3);
	padding: var(--s4) var(--s5);
	border: 1px solid var(--line);
	background: var(--bg);
	color: var(--ink);
	text-decoration: none;
}
a.issue:hover {
	border-color: var(--ink);
	color: var(--ink);
}
.issue-top {
	display: flex;
	align-items: center;
	gap: var(--s3);
	font-size: 13px;
	color: var(--muted);
}
.issue-id {
	font-family: var(--mono);
	color: var(--ink);
}
.issue-title {
	font-size: 18px;
	font-weight: 800;
	line-height: 1.25;
}
.issue-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--s3);
	font-size: 13px;
	color: var(--muted);
}
.prio {
	display: inline-flex;
	gap: 2px;
	align-items: flex-end;
	height: 12px;
}
.prio i {
	width: 4px;
	background: var(--line);
}
.prio i:nth-child(1) {
	height: 5px;
}
.prio i:nth-child(2) {
	height: 8px;
}
.prio i:nth-child(3) {
	height: 12px;
}
.prio.p1 i:nth-child(1),
.prio.p2 i:nth-child(-n + 2),
.prio.p3 i {
	background: var(--ink);
}
.prio.p3 i {
	background: var(--accent);
}
.board {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: var(--s4);
}
.board-col {
	display: flex;
	flex-direction: column;
	gap: var(--s3);
}
.board-col > .label {
	display: flex;
	justify-content: space-between;
	padding-bottom: var(--s2);
	border-bottom: 1px solid var(--ink);
}

/* ── Posters ───────────────────────────────────────────── */
.poster {
	position: relative;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: var(--s6);
	aspect-ratio: 3/4;
	min-height: max-content;
	padding: var(--s6);
	background: var(--accent);
	color: var(--ink);
	container-type: inline-size;
}
.poster-top {
	display: flex;
	justify-content: space-between;
	gap: var(--s4);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}
.poster-title {
	font-size: 23cqi;
	font-weight: 800;
	font-stretch: 125%;
	letter-spacing: -0.05em;
	line-height: 0.84;
	margin-left: -0.04em;
}
.poster-meta {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--s4);
	padding-top: var(--s3);
	border-top: 1px solid currentColor;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
}
.poster--ink {
	background: var(--ink);
	color: var(--paper);
}
.poster--ink .poster-title em {
	font-style: normal;
	color: var(--accent);
}
.poster--paper {
	background: var(--bg);
	border: 1px solid var(--ink);
}
.poster--paper .poster-title {
	color: var(--ink);
}
.poster--paper .poster-title em {
	font-style: normal;
	color: var(--accent);
}
.poster--sheet {
	background-color: var(--surface);
	border: 1px solid var(--ink);
	background-image: linear-gradient(to right, var(--line) 1px, transparent 1px),
		linear-gradient(to bottom, var(--line) 1px, transparent 1px);
	background-size: 25% 20%;
}
.poster--wide {
	aspect-ratio: auto;
	min-height: 340px;
}
.poster-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: var(--s6);
}
.popover-static {
	position: static;
	box-shadow: var(--shadow-md);
}
.poster--wide .poster-title {
	font-size: 13cqi;
}
.poster-bleed {
	white-space: nowrap;
	margin-right: -30%;
}
.poster .btn {
	border-color: currentColor;
	color: inherit;
}
.poster .btn:hover {
	background: var(--ink);
	color: var(--accent);
}
.poster--ink .btn:hover {
	background: var(--paper);
	color: var(--ink);
}

/* ── Frames ────────────────────────────────────────────── */
.frame {
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-width: 0;
}
.frame-box {
	border: 1px solid var(--ink);
	padding: var(--s3);
	background: var(--bg);
}
.frame figcaption,
.caption {
	display: flex;
	gap: var(--s3);
	font-size: 13px;
	line-height: 1.4;
	color: var(--muted);
}
.fig-no {
	color: var(--a-700);
	font-weight: 800;
	white-space: nowrap;
}
.frame--bare .frame-box {
	border: 0;
	padding: 0;
	background: none;
}
.frame--mat .frame-box {
	padding: var(--s10);
	background: var(--surface);
	border-color: var(--line);
}
.frame--mat .frame-box > * {
	outline: 1px solid var(--ink);
	outline-offset: 0;
}
.frame--ink .frame-box {
	background: var(--ink);
	border-color: var(--ink);
	padding: var(--s4);
}
.frame--crop .frame-box {
	border: 0;
	padding: var(--s6);
	background:
		linear-gradient(var(--ink), var(--ink)) 0 0/16px 1px no-repeat,
		linear-gradient(var(--ink), var(--ink)) 0 0/1px 16px no-repeat,
		linear-gradient(var(--ink), var(--ink)) 100% 0/16px 1px no-repeat,
		linear-gradient(var(--ink), var(--ink)) 100% 0/1px 16px no-repeat,
		linear-gradient(var(--ink), var(--ink)) 0 100%/16px 1px no-repeat,
		linear-gradient(var(--ink), var(--ink)) 0 100%/1px 16px no-repeat,
		linear-gradient(var(--ink), var(--ink)) 100% 100%/16px 1px no-repeat,
		linear-gradient(var(--ink), var(--ink)) 100% 100%/1px 16px no-repeat;
}
.frame--plate {
	display: grid;
	grid-template-columns: 56px minmax(0, 1fr);
	gap: 0;
}
.frame--plate .plate-no {
	border-top: 1px solid var(--ink);
	padding-top: 8px;
	font-size: 28px;
	font-weight: 800;
	letter-spacing: -0.03em;
	color: var(--accent);
}
.frame--plate .plate-body {
	border-top: 1px solid var(--ink);
	padding-top: var(--s3);
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.sheet {
	position: relative;
	border: 1px solid var(--ink);
	background-color: var(--surface);
	background-image: linear-gradient(to right, var(--line) 1px, transparent 1px),
		linear-gradient(to bottom, var(--line) 1px, transparent 1px);
	background-size: 20% 25%;
	background-position: 24px 20px;
	padding: 44px var(--s5) var(--s5) 48px;
	min-height: 280px;
}
.sheet::before {
	content: "A\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0B";
	position: absolute;
	left: 24px;
	right: 0;
	top: 0;
	height: 20px;
	padding: 3px 6px;
	border-bottom: 1px solid var(--ink);
	background: var(--surface);
	font-size: 10px;
	color: var(--muted);
	white-space: pre;
	overflow: hidden;
}
.sheet::after {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 24px;
	border-right: 1px solid var(--ink);
	background: var(--surface);
}
.titleblock {
	display: inline-grid;
	grid-template-columns: auto auto;
	gap: 2px var(--s4);
	padding: 8px 12px;
	border: 1px solid var(--ink);
	background: var(--surface);
	font-size: 11px;
	color: var(--muted);
}
.titleblock b {
	color: var(--ink);
	font-weight: 600;
}
.sheet .titleblock {
	position: absolute;
	right: var(--s3);
	bottom: var(--s3);
}
.coord {
	font-size: 11px;
	color: var(--a-700);
}
.mark {
	display: inline-block;
	width: 18px;
	height: 18px;
	border: 1px solid var(--accent);
}

/* ── Player ────────────────────────────────────────────── */
.player {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	gap: var(--s4);
	align-items: center;
	padding: var(--s3) var(--s4) var(--s3) var(--s3);
	border: 1px solid var(--ink);
	background: var(--bg);
}
.play {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border: 0;
	background: var(--accent);
	color: var(--bg);
	cursor: pointer;
	flex: none;
}
.play:hover {
	background: var(--a-600);
}
.play .i {
	fill: currentColor;
	stroke: none;
}
.play--ink {
	background: var(--ink);
}
.play--ink:hover {
	background: var(--n-800);
}
.play--sm {
	width: 32px;
	height: 32px;
}
.play--sm .i {
	width: 14px;
	height: 14px;
}
.track {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}
.track-title {
	font-weight: 800;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.track-sub {
	font-size: 13px;
	color: var(--muted);
}
.scrub {
	position: relative;
	height: 9px;
	cursor: pointer;
}
.scrub::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 4px;
	border-top: 1px solid var(--line);
}
.scrub > span {
	position: absolute;
	left: 0;
	top: 4px;
	width: var(--v, 35%);
	border-top: 1px solid var(--accent);
}
.scrub > span::after {
	content: "";
	position: absolute;
	right: -4px;
	top: -5px;
	width: 9px;
	height: 9px;
	background: var(--accent);
}
.times {
	display: flex;
	justify-content: space-between;
	font-size: 12px;
	color: var(--muted);
	font-variant-numeric: tabular-nums;
}
.player-ctrls {
	display: flex;
	gap: 2px;
}
.player--big {
	grid-template-columns: 1fr;
	padding: var(--s5);
	gap: var(--s4);
}
.player--big .player-row {
	display: flex;
	align-items: center;
	gap: var(--s3);
}
.player--ink {
	background: var(--ink);
	color: var(--paper);
	border-color: var(--ink);
}
.player--ink .track-sub,
.player--ink .times {
	color: var(--n-400);
}
.player--ink .scrub::before {
	border-top-color: var(--n-700);
}
.player--ink .act {
	color: var(--n-400);
}
.player--ink .act:hover {
	color: var(--paper);
	background: rgba(248, 244, 244, 0.08);
}
.video {
	position: relative;
	aspect-ratio: 16/9;
	background: var(--ink);
	color: var(--paper);
	overflow: hidden;
}
.video > .media,
.video > .ph {
	position: absolute;
	inset: 0;
	height: 100%;
	aspect-ratio: auto;
}
.video-bar {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	gap: var(--s3);
	align-items: center;
	padding: var(--s3) var(--s4) var(--s3) var(--s3);
	background: linear-gradient(transparent, rgba(32, 30, 29, 0.85));
}
.video-bar .scrub::before {
	border-top-color: var(--n-500);
}
.video-bar .times {
	color: var(--n-300);
}
.eq {
	display: inline-flex;
	gap: 2px;
	align-items: flex-end;
	height: 14px;
}
.eq i {
	width: 3px;
	background: var(--accent);
	animation: eq 1s ease-in-out infinite;
}
.eq i:nth-child(2) {
	animation-delay: 0.2s;
}
.eq i:nth-child(3) {
	animation-delay: 0.4s;
}
.eq i:nth-child(4) {
	animation-delay: 0.1s;
}
.playlist .is-playing td {
	color: var(--a-700);
}

/* ── View switch (pure CSS, used on the wall) ──────────── */
.view-a,
.view-b {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}
.view-a:checked ~ .pane-b,
.view-b:checked ~ .pane-a {
	display: none;
}
.viewbar label {
	cursor: pointer;
}
.view-a:checked ~ .viewbar .lbl-a,
.view-b:checked ~ .viewbar .lbl-b {
	background: var(--ink);
	color: var(--paper);
}

/* Gallery filter (pure CSS): one rule per category */
.gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: var(--s8) var(--s6);
}
.gfilter input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}
.gwrap:has(#gf-places:checked) .gallery > :not([data-k~="places"]),
.gwrap:has(#gf-objects:checked) .gallery > :not([data-k~="objects"]),
.gwrap:has(#gf-pages:checked) .gallery > :not([data-k~="pages"]),
.gwrap:has(#gf-screens:checked) .gallery > :not([data-k~="screens"]) {
	display: none;
}
.gallery a {
	color: inherit;
	text-decoration: none;
}
.gallery a:hover .fig-no {
	color: var(--accent);
}
.gallery a:hover .frame-box {
	border-color: var(--accent);
}
.grid-sq {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 4px;
}
.grid-sq > * {
	aspect-ratio: 1;
	height: auto;
}

/* Profile */
.profile-head {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: var(--s8);
	align-items: end;
	padding-bottom: var(--s8);
	border-bottom: 1px solid var(--ink);
}
.profile-name {
	font-size: clamp(56px, 8vw, 120px);
	font-weight: 800;
	font-stretch: 125%;
	letter-spacing: -0.05em;
	line-height: 0.85;
}
.profile-meta {
	display: flex;
	flex-wrap: wrap;
	gap: var(--s2) var(--s6);
	font-size: 14px;
	color: var(--muted);
}
.profile-meta b {
	color: var(--ink);
}

/* Kit page */
.kit {
	padding: var(--s12) 0;
	border-top: 1px solid var(--ink);
	scroll-margin-top: var(--head);
}
.kit:first-of-type {
	border-top: 0;
	padding-top: 0;
}
.kit-head {
	display: grid;
	grid-template-columns: 56px minmax(0, 1fr);
	gap: 4px 0;
	margin-bottom: var(--s6);
}
.kit-head .n {
	font-size: 28px;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--accent);
	line-height: 1.1;
}
.kit-head p {
	grid-column: 2;
	font-size: 14px;
	color: var(--muted);
}
.spec {
	display: flex;
	flex-direction: column;
	gap: var(--s4);
	padding: var(--s6) 0;
	border-top: 1px solid var(--line-soft);
}
.spec-label {
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--muted);
}
.spec-label code {
	text-transform: none;
	letter-spacing: 0;
	color: var(--a-700);
	background: none;
	padding: 0;
	margin-left: 6px;
}
.swatch {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 13px;
}
.swatch i {
	display: block;
	height: 72px;
	border: 1px solid var(--line);
}
.swatch span {
	color: var(--muted);
}
.ramp {
	display: grid;
	grid-template-columns: repeat(9, minmax(0, 1fr));
}
.ramp i {
	height: 40px;
}
.icon-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
	border-top: 1px solid var(--line);
	border-left: 1px solid var(--line);
}
.icon-grid div {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 14px;
	border-right: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
	font-size: 11px;
	color: var(--muted);
}
.icon-grid .i {
	width: 24px;
	height: 24px;
	color: var(--ink);
}

/* ── Motion ────────────────────────────────────────────── */
@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}
@keyframes blink {
	50% {
		opacity: 0.25;
	}
}
@keyframes shimmer {
	to {
		background-position: -150% 0;
	}
}
@keyframes slide {
	0% {
		left: -30%;
	}
	100% {
		left: 100%;
	}
}
@keyframes toast-in {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
}
@keyframes toast-out {
	to {
		opacity: 0;
		transform: translateY(8px);
		visibility: hidden;
	}
}
@keyframes drawer-in {
	from {
		transform: translateX(24px);
		opacity: 0;
	}
}
@keyframes eq {
	0%,
	100% {
		height: 4px;
	}
	50% {
		height: 14px;
	}
}
@media (prefers-reduced-motion: reduce) {
	* {
		animation: none !important;
		transition: none !important;
	}
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 1100px) {
	.grid-3 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.main {
		padding: 64px 48px 64px 48px;
	}
	.split,
	.split--wide-aside {
		grid-template-columns: minmax(0, 1fr);
	}
	.split > aside {
		order: 2;
	}
	.lightbox {
		grid-template-columns: 1fr;
		grid-template-rows: 1fr auto;
	}
	.lightbox-info {
		border-left: 0;
		border-top: 1px solid var(--n-700);
	}
}
@media (max-width: 860px) {
	.page {
		grid-template-columns: minmax(0, 1fr);
	}
	.head,
	.foot {
		padding: 0 var(--s5);
	}
	.side {
		border-right: 0;
		border-bottom: 1px solid var(--line);
		padding: var(--s8) var(--s5);
	}
	.side-inner {
		position: static;
	}
	.main {
		padding: var(--s10) var(--s5) var(--s12);
	}
	.grid-3,
	.grid-4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.setting {
		grid-template-columns: 1fr;
	}
	.profile-head {
		grid-template-columns: 1fr;
	}
}
@media (max-width: 560px) {
	.grid-2,
	.grid-3,
	.grid-4,
	.form-grid {
		grid-template-columns: minmax(0, 1fr);
	}
	.ticket {
		grid-template-columns: 1fr;
	}
	.ticket-stub {
		border-left: 0;
		border-top: 1px dashed var(--ink);
	}
	.ticket-stub::before,
	.ticket-stub::after {
		display: none;
	}
	.ticket-info {
		grid-template-columns: repeat(2, auto);
	}
	.pageno {
		display: none;
	}
}

/* ── Showcase (one image or video at a time) ───────────── */
/* Built on .frame + .frame-box + .media (grayscale) + .progress + .caption.
   New here: stacking, the fade between items, and the slow slide (pan). Script: showcase.js */
.showcase-stage {
	position: relative;
	aspect-ratio: var(--r, 3/2);
	background: var(--surface);
	overflow: hidden;
}
.showcase-stage > .media {
	position: absolute;
	inset: 0;
	height: 100%;
	aspect-ratio: auto;
	object-fit: cover; /* fill the box; the part that does not fit is cropped... */
	object-position: 50% 50%;
	filter: none; /* showcase shows media in color (other .media stays grayscale) */
	opacity: 0;
	transition: opacity 0.8s ease;
}
.showcase-stage > .media.is-active {
	opacity: 1;
}
/* ...and slides slowly from one edge to the other. --pan (set by the script) = how long the item shows.
   .is-leaving keeps the slide going while the old item fades out, so it does not jump. */
.showcase-stage > .media.is-active,
.showcase-stage > .media.is-leaving {
	animation: showcase-pan var(--pan, 6s) ease-in-out forwards;
}
.showcase-stage > .media:nth-child(even) {
	animation-direction: reverse; /* every second item slides the other way */
}
.showcase.is-paused .media {
	animation-play-state: paused;
}
/* slides across 90% of the cropped part (5% → 95%), not edge to edge */
@keyframes showcase-pan {
	from {
		object-position: 5% 5%;
	}
	to {
		object-position: 95% 95%;
	}
}

/* .page--fit: the page is exactly one screen tall, so the top bar and the bottom bar
   are always visible. A .showcase inside .main fills the space between them.
   Below 860px the page stacks into one column and scrolls as normal. */
@media (min-width: 861px) {
	.page--fit {
		height: 100vh;
		height: 100dvh;
		min-height: 0;
	}
	.page--fit .side,
	.page--fit .main {
		min-height: 0;
		overflow: auto;
	}
	.page--fit .side-inner,
	.page--fit .head {
		position: static; /* the page is one screen, so nothing needs to be sticky; keeps Contents
		   aligned and stops the top bar from sliding down over the footer when the page moves up */
	}
	/* less empty space above and below, so the showcase is taller; both columns stay aligned */
	.page--fit .side {
		padding-top: var(--s12);
	}
	.page--fit .main {
		padding-top: var(--s12);
		padding-bottom: var(--s12);
	}
	.page--fit .showcase {
		flex: 1;
		min-height: 0;
	}
	.page--fit .showcase .frame-box {
		flex: 1;
		min-height: 0;
		display: flex;
	}
	.page--fit .showcase-stage {
		flex: 1;
		aspect-ratio: auto;
	}
}
.showcase-bar {
	align-items: center;
}
.showcase-place {
	margin-bottom: 2px; /* 10px frame gap + 2px = 12px, same as "Contents" above its list */
}
.showcase-count {
	font-variant-numeric: tabular-nums;
}

/* ── Screens & slide-up (reusable) ─────────────────────── */
/* A page can have more than one full-screen part. A link to "#id" slides the whole page
   up (or down) to that part. Respects "Reduce motion": then it jumps without sliding. */
@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}
/* .screen: one full-screen section below the page, e.g. <section class="screen" id="log"> */
.screen {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100dvh;
}
.screen > .main {
	flex: 1;
}
/* .slide-up: content that slides up into place when its screen is opened (via #id link).
   Use --delay to start items one after another, e.g. style="--delay: 0.4s" */
:target .slide-up {
	animation: slide-up 0.7s ease-out var(--delay, 0.3s) both;
}
@keyframes slide-up {
	from {
		opacity: 0;
		transform: translateY(32px);
	}
}
