/* Kepr 3: Kepr 2's look (kepr.uk, gold theme), ported only as far as the pages that exist use it. */

:root {
	--bg: #090706;
	--bg-surface: #0e0c09;
	--bg-elevated: #1b1710;
	--border: #2a2018;
	--text: #c8b898;
	--text-secondary: #7a6a50;
	--text-muted: #7a6a50;
	--text-faint: #4a3a28;
	--text-heading: #e8d8b8;
	--accent: #c89a5a;
	--accent-bright: #d9b88c;
	--accent-dim: #85663c;
	--accent-flash: #5a88c8;
	--red-flash: #c8483a;
	--accent-tint-04: rgba(200, 154, 90, 0.04);
	--accent-tint-12: rgba(200, 154, 90, 0.12);
	--sage: #7a9a68;
	--sans: "Quicksand", system-ui, sans-serif;
	--mono: "Martian Mono", ui-monospace, monospace;
}

* {
	box-sizing: border-box;
	scrollbar-width: thin;
	scrollbar-color: var(--border) transparent;
}

html,
body {
	margin: 0;
	padding: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--sans);
	font-size: 16px;
	line-height: 1.6;
	overflow-x: hidden;
}

a {
	color: inherit;
	text-decoration: none;
}
a:hover {
	text-decoration: underline;
	text-decoration-color: var(--accent);
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
}

/* ----- top bar ------------------------------------------------------------ */

body > nav {
	display: flex;
	align-items: center;
	padding: 24px 48px;
	font-size: 0.6875rem;
	letter-spacing: 0.04em;
}
.wordmark {
	display: flex;
	color: var(--accent);
}
.wordmark:hover {
	text-decoration: none;
}
.wordmark-icon {
	display: block;
	width: 32px;
	height: 32px;
	color: var(--accent);
}
.wordmark-icon polygon {
	fill: none;
	stroke: currentColor;
	stroke-linejoin: round;
}
.tri-outer polygon {
	stroke-width: 2;
}
.tri-inner polygon {
	stroke-width: 1.5;
}
.tri-outer,
.tri-inner {
	transform-origin: 16px 16px;
}
/* The outer triangle stays gold; the inner one flashes red now and then. */
.tri-outer {
	animation: tri-ccw 12s linear infinite;
}
.tri-inner {
	animation:
		tri-cw 8s linear infinite,
		red-flash 11s ease-in-out infinite;
}
@keyframes tri-ccw {
	to {
		transform: rotate(-360deg);
	}
}
@keyframes tri-cw {
	to {
		transform: rotate(360deg);
	}
}
@keyframes red-flash {
	0%,
	90%,
	100% {
		color: var(--accent);
	}
	95% {
		color: var(--red-flash);
	}
}
.wordmark-by {
	margin-left: 10px;
	font-size: 0.625rem;
	color: var(--text-faint);
	letter-spacing: 0.03em;
}
.nav-links {
	margin-left: auto;
	display: inline-flex;
	gap: 28px;
	font-family: var(--mono);
}
.nav-links a {
	color: var(--text-secondary);
}
.nav-logout {
	margin: 0;
}
.nav-toggle {
	display: none;
}
.nav-logout button {
	border: 0;
	padding: 0;
	background: none;
	color: var(--text-secondary);
	font: inherit;
	letter-spacing: inherit;
	cursor: pointer;
}
.nav-logout button:hover {
	text-decoration: underline;
	text-decoration-color: var(--accent);
}

main {
	max-width: 980px;
	margin: 0 auto;
	padding: 24px 48px 120px;
}

footer {
	text-align: center;
	padding: 80px 24px 48px;
}
footer .credit {
	font-family: var(--mono);
	font-size: 0.6875rem;
	color: var(--text-muted);
}

.mono {
	font-family: var(--mono);
	font-size: 0.8125rem;
	color: var(--text-secondary);
}
.muted {
	color: var(--text-muted);
}

@keyframes fadeUp {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}
@keyframes fadeIn {
	from {
		opacity: 0;
	}
}

/* ----- repo header -------------------------------------------------------- */

.repo-head {
	margin: 20px 0 24px;
}
.repo-name {
	font-family: "Comfortaa", var(--sans);
	font-weight: 700;
	font-size: 4rem;
	line-height: 1.05;
	margin: -0.1em 0 10px;
	color: var(--text);
	overflow-wrap: anywhere;
	animation: fadeUp 280ms ease both;
}
.repo-contributor {
	margin: 4px 0 0;
	font-size: 0.8125rem;
	animation: fadeUp 280ms 40ms ease both;
}
.repo-contributor a:hover {
	color: var(--accent);
}
.repo-desc,
.repo-homepage {
	margin: 0 0 10px;
	font-size: 1.0625rem;
	color: var(--text-secondary);
	line-height: 1.75;
	animation: fadeUp 280ms 30ms ease both;
}
.repo-desc p {
	margin: 12px 0 0;
}
.repo-desc a,
.repo-homepage a {
	color: var(--accent);
}
.repo-desc code {
	font-family: var(--mono);
	font-size: 0.85em;
	color: var(--accent);
}
.lang-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 8px 0 6px;
}
.lang-badge {
	font-family: var(--mono);
	font-size: 0.6875rem;
	color: var(--accent-dim);
	background: var(--bg-surface);
	border: 1px solid var(--border);
	border-radius: 3px;
	padding: 1px 7px;
	letter-spacing: 0.02em;
}
.repo-meta {
	margin: 0;
	font-size: 0.875rem;
	color: var(--text-muted);
	line-height: 1.7;
	animation: fadeUp 280ms 60ms ease both;
}
.repo-tabbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 14px 20px;
	margin-top: 22px;
}
.repo-tabs {
	display: flex;
	gap: 24px;
	flex-wrap: wrap;
	font-family: var(--mono);
	animation: fadeUp 280ms 90ms ease both;
}
.repo-tab {
	font-size: 0.6875rem;
	color: var(--text-muted);
	padding: 0 0 11px;
	border-bottom: 1px solid transparent;
	transition:
		color 140ms,
		border-color 140ms;
}
.repo-tab:hover {
	color: var(--accent);
	text-decoration: none;
}
.repo-tab.active {
	color: var(--accent);
	border-bottom-color: var(--accent);
}
.repo-panel {
	padding: 10px 0 16px;
	animation: fadeIn 220ms ease both;
}
.repo-panel[hidden] {
	display: none;
}
/* Inline, archives and builds show about five entries and scroll; their own pages show all. */
.repo-panel .repo-section:has(> .archive-row, > .release-latest) {
	max-height: 420px;
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: var(--border) transparent;
}
.repo-steal-btn {
	display: block;
	width: fit-content;
	max-width: 100%;
	font-family: var(--mono);
	font-size: 0.75rem;
	color: var(--text-muted);
	background: var(--bg-surface);
	border: 1px solid var(--border);
	border-radius: 3px;
	padding: 5px 11px;
	cursor: pointer;
	letter-spacing: 0.03em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	transition:
		color 120ms,
		border-color 120ms;
}
.repo-steal-btn:hover,
.repo-steal-btn.copied {
	color: var(--accent);
	border-color: var(--accent-dim);
}
.install-lines {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 6px;
	max-width: 100%;
	margin-left: auto;
	animation: fadeUp 280ms 120ms ease both;
}
.install-line {
	display: flex;
	align-items: center;
	gap: 12px;
	max-width: 100%;
	font-family: var(--mono);
	font-size: 0.75rem;
	color: var(--text-muted);
	background: var(--bg-surface);
	border: 1px solid var(--border);
	border-radius: 3px;
	padding: 5px 11px;
}
.install-line code {
	white-space: pre;
	overflow-x: auto;
	font-family: inherit;
}
.copy-btn {
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
	font: inherit;
	font-size: 0.625rem;
	color: var(--text-faint);
	letter-spacing: 0.04em;
}
.copy-btn:hover,
.copy-btn.copied {
	color: var(--accent);
}

/* ----- sections ----------------------------------------------------------- */

.repo-section {
	margin: 36px 0 0;
	animation: fadeIn 320ms 80ms ease both;
}
.repo-section-toggle > summary,
.repo-details-toggle > summary {
	list-style: none;
	cursor: pointer;
	user-select: none;
}
.repo-section-toggle > summary::-webkit-details-marker,
.repo-details-toggle > summary::-webkit-details-marker {
	display: none;
}
.section-head {
	display: flex;
	align-items: baseline;
	gap: 12px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--border);
	margin-bottom: 4px;
}
.section-head::after,
.repo-details-head::after {
	content: "▸";
	font-size: 0.5625rem;
	opacity: 0.4;
	transition: transform 120ms;
}
.section-head::after {
	margin-left: auto;
}
details[open] > .section-head::after,
details[open] > .repo-details-head::after {
	transform: rotate(90deg);
}
.section-label {
	font-size: 0.6875rem;
	letter-spacing: 0.12em;
	color: var(--text-secondary);
	text-transform: uppercase;
}
.section-count {
	font-family: var(--mono);
	font-size: 0.6875rem;
	color: var(--accent);
}

/* ----- timeline ----------------------------------------------------------- */

.timeline {
	display: block;
	margin: 18px 0 4px;
	overflow: visible;
}
.timeline-line {
	stroke: var(--text-faint);
	stroke-width: 1;
	stroke-dasharray: 4 4;
}
.timeline .dot circle {
	fill: var(--accent);
	transition:
		fill-opacity 120ms,
		r 120ms;
}
.timeline .d0 circle {
	fill: var(--accent-dim);
	fill-opacity: 0.45;
}
.timeline .d1 circle {
	fill-opacity: 0.55;
}
.timeline .d2 circle {
	fill-opacity: 0.8;
}
.timeline .d3 circle {
	fill: var(--accent-bright);
	fill-opacity: 1;
}
.timeline .dot:hover circle,
.timeline .dot:focus circle {
	fill: var(--accent-bright);
	fill-opacity: 1;
}
.timeline-canvas {
	display: block;
	margin: 18px 0 4px;
	cursor: grab;
	touch-action: pan-y;
}
.timeline-tip {
	position: fixed;
	z-index: 200;
	max-width: 340px;
	padding: 0.45rem 0.7rem;
	background: #0f0c08;
	border: 1px solid var(--border);
	border-radius: 4px;
	pointer-events: none;
	line-height: 1.5;
}
.timeline-tip .tip-id {
	font-family: var(--mono);
	font-size: 12px;
	color: var(--accent);
}
.timeline-tip .tip-msg {
	margin-top: 3px;
	font-style: italic;
	font-size: 15px;
	color: var(--text-heading);
}
.timeline-tip .tip-meta {
	margin-top: 4px;
	font-family: var(--mono);
	font-size: 10px;
	color: var(--text-muted);
}

/* ----- history ------------------------------------------------------------ */

.history-row {
	position: relative;
	display: grid;
	grid-template-columns: 110px 1fr auto;
	align-items: baseline;
	gap: 0 10px;
	padding: 9px 8px;
	border-bottom: 1px solid var(--border);
	transition: background 100ms;
}
.history-row::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 2px;
	background: var(--accent);
	transform: scaleY(0);
	transition: transform 120ms ease;
}
.history-row:hover {
	background: var(--accent-tint-04);
	text-decoration: none;
}
.history-row:hover::before {
	transform: scaleY(1);
}
.history-id {
	font-family: var(--mono);
	font-size: 0.75rem;
	color: var(--text-secondary);
}
.history-msg {
	min-width: 0;
	line-height: 1.7;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	transition: color 100ms;
}
.history-row:hover .history-msg {
	color: var(--accent);
}
.history-when {
	font-family: var(--mono);
	font-size: 0.6875rem;
	color: var(--text-muted);
	white-space: nowrap;
}
/* Kepr 2's history: four rows at a time, the rest a scroll away. */
.save-list {
	max-height: 180px;
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: var(--border) transparent;
}
.pager {
	display: flex;
	justify-content: space-between;
	margin: 14px 0 0;
	font-size: 0.6875rem;
}
.pager a:last-child {
	margin-left: auto;
}
.pager a:hover {
	color: var(--accent);
}

/* ----- atlas -------------------------------------------------------------- */

.atlas-bar {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px 14px;
	margin: 10px 0 8px;
	font-size: 0.625rem;
}
.atlas-picker {
	position: relative;
}
/* Each section's fade-in makes it a stacking context, so the picker's popover would sit under the
   sections after it; the Atlas's section is lifted above them. */
#atlas {
	position: relative;
	z-index: 2;
}
.atlas-picker [hidden] {
	display: none;
}
.atlas-ref-tab {
	list-style: none;
	cursor: pointer;
	padding: 4px 8px;
	background: var(--bg);
	border: 1px solid rgba(200, 154, 90, 0.45);
	border-radius: 2px;
	font-size: 0.625rem;
	color: var(--accent);
}
.atlas-ref-tab::-webkit-details-marker {
	display: none;
}
.atlas-ref-tab:hover {
	color: var(--accent-dim);
}
.atlas-picker-popover {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	z-index: 50;
	display: flex;
	flex-direction: column;
	width: min(420px, 90vw);
	max-height: 480px;
	background: var(--bg);
	border: 1px solid var(--text-faint);
	box-shadow: 0 18px 48px rgba(0, 0, 0, 0.48);
}
.atlas-picker-filter {
	padding: 8px 10px;
	background: var(--bg);
	border: 0;
	border-bottom: 1px solid var(--bg-elevated);
	outline: none;
	font-size: 0.6875rem;
	color: var(--text-heading);
}
.atlas-picker-filter::placeholder {
	color: var(--text-faint);
}
.atlas-picker-list {
	flex: 1 1 auto;
	min-height: 0;
	overflow: auto;
	scrollbar-width: thin;
	scrollbar-color: var(--border) transparent;
}
.atlas-picker-row {
	display: grid;
	grid-template-columns: 80px 1fr auto;
	align-items: center;
	gap: 8px;
	padding: 6px 10px;
	border-bottom: 1px solid rgba(42, 32, 24, 0.4);
	color: var(--text-muted);
}
.atlas-picker-row:hover {
	background: rgba(200, 154, 90, 0.06);
	text-decoration: none;
}
.atlas-picker-row.active {
	background: rgba(200, 154, 90, 0.1);
}
.atlas-picker-row:hover *,
.atlas-picker-row.active * {
	color: var(--accent);
}
.atlas-picker-id,
.atlas-picker-age {
	font-family: var(--mono);
	font-size: 0.5625rem;
	color: var(--text-faint);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.atlas-picker-msg {
	font-size: 0.6875rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.atlas-head-link {
	color: var(--accent);
}
.atlas-fold-btn {
	margin-left: auto;
}
.atlas-fold-btn,
.atlas-search-btn {
	padding: 4px 8px;
	background: transparent;
	border: 1px solid var(--border);
	border-radius: 2px;
	font: inherit;
	font-size: 0.625rem;
	color: var(--text-faint);
	cursor: pointer;
}
.atlas-fold-btn:hover,
.atlas-search-btn:hover {
	color: var(--accent);
	border-color: var(--accent-dim);
}
.atlas-fold-btn[hidden],
.atlas-search-btn[hidden],
.atlas-filter[hidden] {
	display: none;
}
.atlas-filter {
	width: 220px;
	max-width: 100%;
	padding: 5px 10px;
	background: transparent;
	border: 1px solid var(--border);
	border-radius: 3px;
	color: var(--text);
	font-size: 0.6875rem;
}
.atlas-filter:focus {
	outline: none;
	border-color: var(--accent-dim);
}
.atlas-filter::placeholder {
	color: var(--text-faint);
}
/* kepr.js fixes the height at the closed tree's, at most Kepr 2's 520px, and the tree and panel
   scroll inside it; without it, the whole box scrolls. */
.atlas {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	grid-template-rows: minmax(0, 1fr);
	gap: 0 20px;
	max-height: 520px;
	overflow-y: auto;
	border-top: 1px solid var(--bg-elevated);
	border-bottom: 1px solid var(--bg-elevated);
}
.atlas-tree,
.atlas-panel {
	min-height: 0;
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: var(--border) transparent;
}
.atlas:has(> .atlas-panel:not([hidden])) {
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
}
.atlas [hidden] {
	display: none;
}
.atlas-folder > summary {
	list-style: none;
}
.atlas-folder > summary::-webkit-details-marker {
	display: none;
}
.atlas-children {
	padding-left: 14px;
	border-left: 1px solid var(--border);
	margin-left: 6px;
}
.atlas-row {
	position: relative;
	display: grid;
	grid-template-columns: minmax(90px, auto) 1fr auto;
	align-items: baseline;
	gap: 0 12px;
	padding: 6px 8px;
	border-bottom: 1px solid rgba(42, 32, 24, 0.62);
	cursor: pointer;
	transition: background 100ms;
}
.atlas-row:hover,
.atlas-row:focus-visible,
.atlas-row.selected {
	outline: none;
	background: var(--accent-tint-04);
	text-decoration: none;
}
.atlas-row.selected {
	box-shadow: inset 2px 0 0 var(--accent);
}
.atlas-name {
	color: var(--text-heading);
	font-size: 0.875rem;
	white-space: nowrap;
}
.atlas-folder > summary .atlas-name {
	color: var(--accent);
}
.atlas-desc {
	min-width: 0;
	color: var(--text-muted);
	font-size: 0.8125rem;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.atlas-meta {
	font-size: 0.625rem;
	color: var(--text-faint);
	white-space: nowrap;
}
.atlas-panel {
	padding: 12px 0 12px 16px;
	border-left: 1px solid var(--border);
}
.atlas-hint {
	margin: 0;
	font-size: 0.625rem;
	color: var(--text-faint);
}
.atlas-info-name {
	margin: 0;
	font-weight: 400;
	font-size: 1.375rem;
	color: var(--text-heading);
	overflow-wrap: anywhere;
}
.atlas-info-path {
	margin: 0 0 12px;
	font-size: 0.625rem;
	color: var(--text-faint);
	overflow-wrap: anywhere;
}
.atlas-facts {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 3px 12px;
	margin: 0 0 12px;
	font-size: 0.625rem;
}
.atlas-facts dt {
	color: var(--text-faint);
}
.atlas-facts dd {
	margin: 0;
	color: var(--text);
}
.atlas-facts a {
	color: var(--accent);
}
.atlas-info-desc {
	font-size: 0.8125rem;
	color: var(--text-muted);
}
/* ----- README and rendered Markdown --------------------------------------- */

.repo-details {
	margin: 36px 0 0;
	animation: fadeIn 320ms 80ms ease both;
}
.repo-details-toggle {
	border-bottom: 1px solid var(--border);
	padding-bottom: 24px;
}
.repo-details-head {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 8px 0;
	font-family: var(--mono);
	font-size: 0.6875rem;
	letter-spacing: 0.12em;
	color: var(--text-secondary);
	text-transform: uppercase;
}
.markdown {
	font-size: 1.05rem;
	line-height: 1.7;
	overflow-wrap: break-word;
}
.markdown h1,
.markdown h2,
.markdown h3,
.markdown h4 {
	font-weight: 400;
	margin: 1.4em 0 0.4em;
	color: var(--text-heading);
}
.markdown h1 {
	font-size: 1.5rem;
}
.markdown h2 {
	font-size: 1.3rem;
}
.markdown h3 {
	font-size: 1.15rem;
}
.markdown p {
	margin: 0.8em 0;
}
.markdown ul,
.markdown ol {
	margin: 0.8em 0 0.8em 1.5em;
	padding: 0;
}
.markdown a {
	color: var(--accent);
}
.markdown code {
	font-family: var(--mono);
	font-size: 0.82em;
	color: var(--accent);
	background: var(--bg-surface);
	padding: 0.15em 0.35em;
	border-radius: 3px;
}
.markdown pre {
	background: var(--bg-surface);
	border-radius: 4px;
	padding: 1em 1.2em;
	overflow-x: auto;
	margin: 1em 0;
}
.markdown pre code {
	background: none;
	padding: 0;
	color: var(--text);
	font-size: 0.85em;
}
.markdown blockquote {
	border-left: 3px solid var(--border);
	margin: 1em 0;
	padding: 0.1em 1em;
	color: var(--text-secondary);
}
.markdown hr {
	border: none;
	border-top: 1px solid var(--border);
	margin: 1.5em 0;
}
.markdown img {
	max-width: 100%;
}
.markdown table {
	border-collapse: collapse;
	display: block;
	overflow-x: auto;
}
.markdown th,
.markdown td {
	border: 1px solid var(--border);
	padding: 4px 10px;
}

/* ----- file viewer -------------------------------------------------------- */

.breadcrumb {
	margin: 0 0 4px;
	font-size: 0.75rem;
	overflow-wrap: anywhere;
}
.breadcrumb a:hover {
	color: var(--accent);
}
.file-page-title {
	font-size: 1.75rem;
	font-weight: 400;
	margin: 4px 0 12px;
	overflow-wrap: anywhere;
}
.file-meta,
.file-toggle {
	margin: 0 0 12px;
	font-size: 0.6875rem;
}
.file-meta a,
.file-toggle a.active {
	color: var(--accent);
}
.file-image img {
	max-width: 100%;
	background: var(--bg-surface);
	border: 1px solid var(--border);
}
.file-view {
	border: 1px solid var(--border);
	background: var(--bg-surface);
	overflow-x: auto;
}
.code {
	margin: 0;
	padding: 16px 0;
	font-family: var(--mono);
	font-size: 0.8125rem;
	line-height: 1.65;
	tab-size: 4;
}
/* A grid, so tab stops count from the start of the code rather than the line number. */
.code .line {
	display: grid;
	grid-template-columns: 6em 1fr;
	padding-right: 24px;
	scroll-margin-top: 40vh;
}
.code .line:target,
.code .line.hl {
	background: var(--accent-tint-12);
}
.code .lc {
	white-space: pre;
}
.code .ln {
	padding-right: 1.5em;
	text-align: right;
	color: var(--text-faint);
	user-select: none;
}
.code .ln:hover {
	color: var(--accent);
	text-decoration: none;
}

/* Shiki's CSS-variables theme roles, in Kepr 2's highlight.js colours. */
.tk-comment {
	color: var(--text-muted);
	font-style: italic;
}
.tk-keyword {
	color: var(--accent);
}
.tk-string,
.tk-string-expression {
	color: var(--sage);
}
.tk-constant {
	color: var(--accent-bright);
}
.tk-function {
	color: var(--accent);
}
.tk-parameter {
	color: var(--text);
}
.tk-punctuation {
	color: var(--text-secondary);
}
.tk-link {
	color: var(--accent);
	text-decoration: underline;
}
.tk-inserted {
	color: var(--sage);
}
.tk-deleted {
	color: #c45c5c;
}
.tk-i {
	font-style: italic;
}

/* ----- save page ---------------------------------------------------------- */

.save-id {
	margin: 12px 0 0;
	font-size: 0.75rem;
	color: var(--text-secondary);
}
.save-flag {
	margin: 12px 0 0;
	padding: 8px 12px;
	border: 1px solid #6a3a2a;
	border-left: 2px solid #c45c5c;
	background: rgba(196, 92, 92, 0.08);
	color: var(--text-heading);
}
.save-flag-label {
	margin-right: 8px;
	font-size: 0.625rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #c45c5c;
}
.save-message-head {
	font-size: 2.25rem;
	font-weight: 400;
	line-height: 1.3;
	margin: 12px 0 8px;
	color: var(--text-heading);
	overflow-wrap: anywhere;
	animation: fadeUp 280ms ease both;
}
.save-message-body {
	margin: 0 0 12px;
	white-space: pre-wrap;
	color: var(--text-secondary);
}
.save-facts {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 2px 16px;
	margin: 16px 0;
	font-size: 0.75rem;
}
.save-facts dt {
	color: var(--text-faint);
}
.save-facts dd {
	margin: 0;
	overflow-wrap: anywhere;
}
.save-facts a,
.save-links a,
.diff-view a {
	color: var(--accent);
}
.save-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	margin: 0;
	font-size: 0.75rem;
}
.save-empty {
	font-size: 0.75rem;
}
.change-row,
.diff-head {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 12px;
	padding: 7px 8px;
	border-bottom: 1px solid var(--border);
	font-family: var(--mono);
	font-size: 0.8125rem;
}
.change-row:hover {
	background: var(--accent-tint-04);
	text-decoration: none;
}
.change-path {
	min-width: 0;
	overflow-wrap: anywhere;
}
.change-added .change-path {
	color: var(--sage);
}
.change-removed .change-path {
	color: var(--text-muted);
	text-decoration: line-through;
}
.change-modified .change-path {
	color: var(--accent-bright);
}
.change-stat {
	font-size: 0.75rem;
	white-space: nowrap;
}
.diff-add {
	color: var(--sage);
}
.diff-del {
	color: #c45c5c;
}
.diff-note {
	color: var(--text-faint);
	font-size: 0.6875rem;
}
.diff-file {
	margin: 0 0 20px;
}
.diff-head {
	cursor: pointer;
	list-style: none;
	border: 1px solid var(--border);
	background: var(--bg-surface);
}
.diff-head::-webkit-details-marker {
	display: none;
}
.diff-file > .file-view {
	border-top: 0;
}
.diff-file > .diff-note,
.diff-view {
	margin: 8px 0 0;
	font-size: 0.6875rem;
}
.code.diff {
	padding: 4px 0;
}
.diff .dl {
	display: grid;
	grid-template-columns: 3.5em 3.5em 1.5em 1fr;
	padding-right: 24px;
}
.diff .dh {
	display: block;
	padding: 4px 1em;
	color: var(--text-faint);
	background: var(--bg-elevated);
}
.diff .ln {
	padding-right: 0.75em;
	text-align: right;
	color: var(--text-faint);
	user-select: none;
}
.diff .ds {
	text-align: center;
	color: var(--text-faint);
	user-select: none;
}
.diff .dl-add {
	background: rgba(122, 154, 104, 0.1);
}
.diff .dl-add .ds {
	color: var(--sage);
}
.diff .dl-del {
	background: rgba(196, 92, 92, 0.08);
}
.diff .dl-del .ds {
	color: #c45c5c;
}

/* ----- archives ----------------------------------------------------------- */

.archive-row {
	padding: 12px 8px;
	border-bottom: 1px solid var(--border);
}
.archive-save {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 10px;
	margin: 0;
}
.archive-save .history-id {
	flex: 0 0 110px;
}
.archive-msg {
	flex: 1;
}
.archive-head {
	font-size: 0.625rem;
	letter-spacing: 0.08em;
	color: var(--accent);
	border: 1px solid var(--accent-dim);
	border-radius: 2px;
	padding: 0 6px;
}
.archive-save .history-id:hover {
	color: var(--accent);
}
.archive-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin: 6px 0;
	font-size: 0.75rem;
}
.archive-links a {
	color: var(--accent);
}
.archive-row .install-line {
	justify-content: space-between;
}
.archive-row--head {
	background: var(--accent-tint-04);
	border-top: 1px solid var(--accent-dim);
}

/* ----- phone -------------------------------------------------------------- */

@media (max-width: 768px) {
	body > nav {
		padding: 20px 16px;
	}
	/* Without the menu script the links wrap in the bar instead of running off it. */
	.nav-links {
		flex-wrap: wrap;
		justify-content: flex-end;
		gap: 8px 18px;
		min-width: 0;
	}
	.nav--menu {
		position: relative;
	}
	.nav--menu .nav-toggle {
		display: flex;
		flex-direction: column;
		justify-content: center;
		gap: 4px;
		width: 36px;
		height: 36px;
		margin: -8px -8px -8px auto;
		padding: 8px;
		border: 0;
		background: none;
		color: var(--text-secondary);
		cursor: pointer;
	}
	.nav-toggle span {
		height: 1.5px;
		background: currentColor;
		transition:
			transform 0.2s ease,
			opacity 0.2s ease;
	}
	.nav--open .nav-toggle {
		color: var(--accent);
	}
	.nav--open .nav-toggle span:nth-child(1) {
		transform: translateY(5.5px) rotate(45deg);
	}
	.nav--open .nav-toggle span:nth-child(2) {
		opacity: 0;
	}
	.nav--open .nav-toggle span:nth-child(3) {
		transform: translateY(-5.5px) rotate(-45deg);
	}
	.nav--menu .nav-links {
		display: none;
	}
	.nav--menu.nav--open .nav-links {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		z-index: 10;
		display: flex;
		flex-direction: column;
		gap: 0;
		padding: 0 16px 8px;
		background: var(--bg);
		border-bottom: 1px solid var(--border);
		font-size: 0.8125rem;
	}
	.nav--open .nav-links > * {
		padding: 14px 0;
		border-top: 1px solid var(--border);
	}
	main {
		padding: 16px 16px 80px;
	}
	.repo-name {
		font-size: 2.75rem;
	}
	.install-lines {
		align-items: stretch;
		margin-left: 0;
		width: 100%;
	}
	.history-row {
		grid-template-columns: 1fr auto;
	}
	.history-id {
		grid-column: 1 / -1;
	}
	.atlas-row {
		grid-template-columns: 1fr auto;
	}
	.atlas-desc {
		grid-column: 1 / -1;
		grid-row: 2;
	}
	.atlas:has(> .atlas-panel:not([hidden])) {
		grid-template-columns: minmax(0, 1fr);
	}
	.atlas-panel {
		display: none;
	}
	.code .line {
		grid-template-columns: 4.5em 1fr;
	}
	.save-message-head {
		font-size: 1.625rem;
	}
	.archive-msg {
		flex-basis: 100%;
		order: 1;
	}
	.diff .dl {
		grid-template-columns: 2.75em 2.75em 1.25em 1fr;
	}
	.code .ln {
		padding-right: 1em;
	}
}

/* ----- builds ------------------------------------------------------------- */

.release {
	padding: 20px 8px 24px;
	border-bottom: 1px solid var(--border);
}
.release-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 14px;
	margin: 0 0 8px;
}
.release-version {
	font-family: "Martian Mono", monospace;
	font-size: 1rem;
	color: var(--accent);
}
.release-latest .release-version {
	font-size: clamp(2rem, 5vw, 3.5rem);
	letter-spacing: -0.06em;
}
.release-latest > p {
	font-size: 0.6875rem;
	margin: 16px 8px 0;
}
.release-older > summary {
	padding: 16px 8px;
	font-size: 0.75rem;
	color: var(--text-muted);
	cursor: pointer;
	border-bottom: 1px solid var(--border);
}
.release-head .history-id:hover {
	color: var(--accent);
}
.release-notes {
	margin-bottom: 14px;
}
.release-file {
	padding: 10px 0;
	border-top: 1px solid var(--border);
}
.release-file-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 14px;
	margin: 0;
}
.release-platform {
	flex: 0 0 180px;
}
.release-download {
	flex: 1;
	font-size: 0.75rem;
	color: var(--accent);
	overflow-wrap: anywhere;
}
.release-meta,
.release-sha {
	font-size: 0.6875rem;
	color: var(--text-muted);
}
.release-sha {
	margin: 4px 0 0;
	overflow-wrap: anywhere;
}
.release-hint {
	margin: 4px 0 0;
	font-size: 0.8125rem;
}

/* ----- issues ------------------------------------------------------------- */

.issues-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	font-size: 0.75rem;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--bg-elevated);
}
.issues-tab {
	color: var(--text-faint);
	border: 1px solid transparent;
	border-radius: 999px;
	padding: 4px 10px;
}
button.issues-tab {
	font: inherit;
	background: none;
	cursor: pointer;
}
.issues-tab.active {
	color: var(--accent);
	border-color: var(--accent-tint-12);
}
.issues-new {
	margin-left: auto;
	color: var(--text-muted);
}
.issue-row {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: baseline;
	gap: 2px 10px;
	padding: 16px 8px;
	border-bottom: 1px solid var(--border);
}
.issue-row:hover {
	text-decoration: none;
	background: var(--accent-tint-04);
}
.issue-title {
	grid-column: 2 / -1;
	overflow-wrap: anywhere;
	color: var(--text-heading);
}
.issues-new:hover,
.issue-row:hover .issue-title {
	color: var(--accent);
}
.issue-meta,
.issue-post-head {
	font-size: 0.6875rem;
	color: var(--text-muted);
}
.issue-symbol--open {
	color: var(--accent);
}
.issue-symbol--closed {
	color: var(--text-faint);
}
.issue-row .issue-meta {
	grid-column: 2;
}
.issue-reporter {
	font-size: 0.6875rem;
	color: var(--text-muted);
	overflow-wrap: anywhere;
}
.issues-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 16px;
}
.issue-post {
	margin: 18px 0;
	padding: 14px 18px;
	border: 1px solid var(--border);
	border-radius: 6px;
	background: var(--bg-surface);
}
.issue-post--operator {
	border-color: var(--accent-dim);
}
.issue-post-head {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 12px;
	margin: 0 0 8px;
}
.issue-author {
	color: var(--text);
}
.issue-badge {
	color: var(--accent);
	text-transform: uppercase;
	letter-spacing: 0.08em;
}
.issue-text {
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}
.issue-link {
	font-size: 0.75rem;
	overflow-wrap: anywhere;
	color: var(--accent);
}
.issues-form {
	display: flex;
	flex-direction: column;
	gap: 6px;
	max-width: 640px;
	margin-top: 18px;
}
.issues-label {
	font-family: var(--mono);
	font-size: 0.6875rem;
	margin-top: 6px;
	opacity: 0.8;
}
.issues-input,
.issues-textarea {
	font-family: var(--mono);
	font-size: 0.75rem;
	width: 100%;
	padding: 6px 8px;
	color: var(--text);
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: 4px;
	resize: vertical;
}
.issues-input:focus,
.issues-textarea:focus {
	outline: none;
	border-color: var(--accent);
}
.issues-filter .issues-input {
	width: auto;
	min-width: 0;
	flex: 1 1 140px;
}
.issues-submit {
	align-self: flex-start;
	margin-top: 10px;
	padding: 6px 14px;
	font-family: var(--mono);
	font-size: 0.75rem;
	color: var(--bg);
	background: var(--accent);
	border: none;
	border-radius: 4px;
	cursor: pointer;
}
.issues-submit:hover {
	opacity: 0.85;
}
.issues-submit:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}
.issues-actions {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 10px 0 0;
}
.issues-actions .issues-submit {
	align-self: auto;
	margin-top: 0;
}
.issues-cancel {
	font-size: 0.75rem;
	color: var(--text-muted);
}
.issues-cancel:hover {
	color: var(--accent);
}
button.issues-cancel {
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
}
.issues-error {
	font-size: 0.75rem;
	color: #c86a5a;
}
/* The honeypot: off-screen for people, still in the form for bots. */
.issues-hp {
	position: absolute;
	left: -9999px;
	height: 0;
	overflow: hidden;
	opacity: 0;
}

/* ----- front page --------------------------------------------------------- */

/* Kepr 2's hero band, full width, reaching up behind the nav (32px mark + 48px padding). */
body > nav {
	position: relative;
	z-index: 1;
}
.ticker {
	position: relative;
	height: 304px;
	margin: -104px calc(50% - 50vw) 0;
	padding: 96px 0 20px;
	display: flex;
	flex-direction: column;
	justify-content: space-evenly;
	overflow: hidden;
	pointer-events: none;
	user-select: none;
	border-bottom: 1px solid var(--border);
	font-family: var(--mono);
	color: var(--text-secondary);
	mask-image: linear-gradient(
		to right,
		transparent,
		#000 48px,
		#000 calc(100% - 48px),
		transparent
	);
}
.ticker-row {
	white-space: nowrap;
	line-height: 1.2;
	opacity: var(--o);
	animation: ticker-glow 83s var(--glow-at) ease-in-out infinite;
}
/* The drift's duration is set by kepr.js from the track's width, so every row keeps Kepr 2's
   pace in px/s (--speed) however long its messages are; this is the no-JavaScript fallback. */
.ticker-track {
	display: inline-flex;
	gap: 64px;
	padding-right: 64px;
	animation: ticker-drift 1500s linear infinite;
}
/* Kepr 2's depth bands: nearer rows are larger, brighter and faster. Each row takes its turn at
   the glow, a few seconds out of every 83, spaced so one or two glow at a time. */
.ticker-row:nth-child(1) {
	font-size: 9px;
	--o: 0.05;
	--speed: 12;
	--glow-at: -5s;
}
.ticker-row:nth-child(2) {
	font-size: 18px;
	--o: 0.1;
	--speed: 23;
	--glow-at: -41s;
}
.ticker-row:nth-child(3) {
	font-size: 7px;
	--o: 0.04;
	--speed: 9;
	--glow-at: -77s;
}
.ticker-row:nth-child(4) {
	font-size: 13px;
	--o: 0.07;
	--speed: 17;
	--glow-at: -29s;
}
.ticker-row:nth-child(5) {
	font-size: 22px;
	--o: 0.12;
	--speed: 29;
	--glow-at: -65s;
}
.ticker-row:nth-child(6) {
	font-size: 8px;
	--o: 0.045;
	--speed: 10;
	--glow-at: -17s;
}
.ticker-row:nth-child(7) {
	font-size: 15px;
	--o: 0.08;
	--speed: 20;
	--glow-at: -53s;
}
@keyframes ticker-drift {
	to {
		transform: translateX(-50%);
	}
}
@keyframes ticker-glow {
	0%,
	10%,
	100% {
		color: var(--text-secondary);
		opacity: var(--o);
		text-shadow: none;
	}
	5% {
		color: var(--accent);
		opacity: calc(var(--o) * 3.5);
		text-shadow: 0 0 3px var(--accent-tint-12);
	}
}

.headline {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 48px;
	align-items: center;
	padding: 56px 0 40px;
}
.headline h1 {
	font-size: clamp(2rem, 5vw, 3.5rem);
	font-weight: 400;
	line-height: 1.15;
	color: var(--text-heading);
	margin: 0 0 20px;
	animation: fadeUp 480ms ease both;
}
.headline-tagline {
	margin: 0;
	font-size: 0.9375rem;
	line-height: 1.7;
	color: var(--text-secondary);
	animation: fadeUp 480ms 80ms ease both;
}
.headline-cloud {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 10px 22px;
	padding: 20px;
	animation: fadeIn 600ms 160ms ease both;
}
.tc-tag {
	font-family: var(--mono);
	letter-spacing: 0.03em;
	white-space: nowrap;
	color: var(--accent-dim);
	transition:
		color 0.2s,
		opacity 0.2s,
		text-shadow 0.2s;
}
.tc-tag:hover {
	color: var(--accent);
	opacity: 1;
	text-shadow: 0 0 14px var(--accent-tint-12);
}
.tc-1 {
	font-size: 10px;
	opacity: 0.42;
}
.tc-2 {
	font-size: 12px;
	opacity: 0.56;
}
.tc-3 {
	font-size: 15px;
	opacity: 0.7;
}
.tc-4 {
	font-size: 18px;
	opacity: 0.85;
	font-weight: 500;
}
.tc-5 {
	font-size: 23px;
	opacity: 1;
	font-weight: 500;
}

.featured-label {
	font-size: 0.6875rem;
	font-weight: 400;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--text-secondary);
	margin: 0 0 12px;
}
.landing-self-host {
	margin: 32px 0 0;
	font-size: 0.75rem;
}
.landing-self-host a {
	color: var(--text-secondary);
}

/* ----- repo cards (front page, browse, profile) --------------------------- */

.card-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}
.repo-card {
	display: flex;
	flex-direction: column;
	padding: 20px 22px 16px;
	border: 1px solid var(--bg-elevated);
	border-radius: 4px;
	background: var(--bg);
	transition:
		border-color 120ms,
		background 120ms;
	animation: fadeUp 350ms ease both;
}
.repo-card:hover {
	text-decoration: none;
	border-color: var(--text-faint);
	background: var(--accent-tint-04);
}
.repo-card-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
}
.repo-card-name {
	font-size: 1.375rem;
	line-height: 1.1;
	color: var(--accent);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.repo-card-saves {
	font-size: 0.6875rem;
	white-space: nowrap;
}
.repo-card-desc {
	margin: 8px 0 0;
	font-size: 0.8125rem;
	line-height: 1.5;
	color: var(--text-secondary);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.repo-card-cat {
	margin: 10px 0 0;
	font-size: 0.9375rem;
	color: var(--text);
}

/* ----- profile ------------------------------------------------------------ */

/* The cover runs the full width of the window while the page keeps its column. */
.profile-cover {
	position: relative;
	height: 380px;
	margin: -24px calc(50% - 50vw) 0;
	overflow: hidden;
	border-bottom: 1px solid var(--bg-surface);
}
.hex-backdrop {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: row-reverse;
	justify-content: center;
	align-items: center;
	gap: 13px;
	pointer-events: none;
	user-select: none;
	font-family: var(--mono);
	font-size: 13px;
	line-height: 16px;
	color: var(--accent-dim);
}
/* Characters top to bottom, columns right to left, each breathing on its own clock. */
.hex-col {
	writing-mode: vertical-rl;
	text-orientation: upright;
	letter-spacing: 3px;
	opacity: 0.05;
	animation: hex-breathe 17s ease-in-out infinite;
	transition:
		color 1.6s ease,
		text-shadow 1.6s ease;
}
.hex-col:nth-child(3n) {
	color: var(--accent);
	animation-duration: 23s;
	animation-delay: -7s;
}
.hex-col:nth-child(4n + 1) {
	animation-duration: 29s;
	animation-delay: -13s;
}
.hex-col:nth-child(5n + 2) {
	animation-duration: 19s;
	animation-delay: -3s;
}
.hex-col:nth-child(7n) {
	animation-delay: -21s;
}
.hex-col.glow {
	color: var(--accent-bright);
	text-shadow: 0 0 6px var(--accent-tint-12);
}
@keyframes hex-breathe {
	0%,
	100% {
		opacity: 0.05;
	}
	50% {
		opacity: 0.22;
	}
}
.profile-cover-fade {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 55%;
	background: linear-gradient(to bottom, transparent, var(--bg));
	pointer-events: none;
}
.profile-identity {
	position: absolute;
	bottom: 40px;
	left: 0;
	right: 0;
	max-width: 980px;
	margin: 0 auto;
	padding: 0 48px;
}
.profile-username {
	margin: 0 0 8px;
	font-family: "Sacramento", cursive;
	font-weight: 400;
	font-size: 3.625rem;
	line-height: 1;
	letter-spacing: -0.02em;
	text-transform: lowercase;
	color: var(--text-heading);
	user-select: none;
	animation: fadeUp 500ms ease both;
}
.profile-signature {
	display: block;
	max-height: 96px;
	max-width: min(360px, 100%);
}
.profile-tagline {
	margin: 0 0 6px;
	font-family: var(--mono);
	font-size: 0.75rem;
	letter-spacing: 0.15em;
	color: var(--text-faint);
}
.profile-op-badge {
	display: block;
	font-size: 0.6875rem;
	letter-spacing: 0.18em;
	color: var(--accent);
}

.profile-portrait-section {
	display: grid;
	grid-template-columns: 320px minmax(0, 1fr);
	gap: 40px;
	align-items: start;
	padding-top: 40px;
}
.profile-left {
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.profile-identity-card,
.profile-languages-bar {
	padding: 20px 24px;
	border: 1px solid var(--bg-elevated);
	border-radius: 4px;
}
.profile-identity-bio {
	margin: 0;
	font-size: 0.875rem;
	line-height: 1.5;
	color: var(--text-muted);
}
.profile-identity-location {
	margin: 6px 0 0;
	font-family: var(--mono);
	font-size: 0.8125rem;
	color: var(--text-muted);
}
.profile-website-pill {
	display: inline-block;
	max-width: 100%;
	margin-top: 10px;
	padding: 3px 8px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	border: 1px solid var(--text-faint);
	border-radius: 3px;
	background: var(--bg-surface);
	font-family: var(--mono);
	font-size: 0.6875rem;
	color: var(--accent);
}
.profile-website-pill:hover {
	border-color: var(--accent);
	text-decoration: none;
}
.profile-stats-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	border: 1px solid var(--bg-elevated);
	border-radius: 4px;
	overflow: hidden;
}
.profile-stat-tile {
	padding: 16px;
	border-right: 1px solid var(--bg-elevated);
	border-bottom: 1px solid var(--bg-elevated);
}
.profile-stat-tile:nth-child(2n) {
	border-right: none;
}
.profile-stat-tile:nth-last-child(-n + 2) {
	border-bottom: none;
}
.profile-stat-number {
	margin-bottom: 4px;
	font-weight: 600;
	font-size: 1.75rem;
	line-height: 1;
	color: var(--accent);
}
.profile-stat-label,
.profile-section-label {
	font-family: var(--mono);
	font-size: 0.625rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--text-faint);
}
.profile-lang-bar {
	display: block;
	width: 100%;
	height: 6px;
	margin-bottom: 8px;
	border-radius: 3px;
	background: var(--bg-surface);
}
.profile-lang-bar rect {
	fill: var(--accent);
	opacity: 0.6;
}
.profile-lang-bar rect:nth-child(2) {
	fill: var(--sage);
}
.profile-lang-bar rect:nth-child(3) {
	fill: var(--accent-flash);
	opacity: 0.45;
}
.profile-lang-bar rect:nth-child(4) {
	fill: var(--accent-dim);
}
.profile-lang-labels {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	font-family: var(--mono);
	font-size: 0.625rem;
	color: var(--text-muted);
}
.profile-section-label {
	margin-bottom: 16px;
	letter-spacing: 0.2em;
}
.profile-timeline {
	display: grid;
	grid-auto-rows: 2.25rem;
	max-height: 13.5rem;
	overflow-y: auto;
	scrollbar-width: thin;
}
.profile-event {
	display: grid;
	grid-template-columns: 96px 12px minmax(0, 1fr) auto;
	gap: 10px;
	align-items: baseline;
	padding: 7px 0;
	border-bottom: 1px solid var(--bg-surface);
	font-family: var(--mono);
	font-size: 0.6875rem;
	animation: fadeUp 300ms ease both;
}
.profile-event-repo,
.profile-event-message {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.profile-event-repo,
.profile-event-glyph {
	color: var(--accent);
}
.profile-event-glyph {
	font-size: 0.625rem;
}
.profile-event-message {
	color: var(--text-muted);
}
.profile-event-message:hover {
	color: var(--text-heading);
}
.profile-event-time {
	font-size: 0.625rem;
	white-space: nowrap;
	color: var(--text-faint);
}
.profile-empty-state {
	font-style: italic;
	font-size: 0.8125rem;
	color: var(--text-faint);
}
.profile-repos-section {
	margin-top: 40px;
	padding-top: 40px;
	border-top: 1px solid var(--bg-surface);
}

/* ----- docs and support --------------------------------------------------- */

.admin-layout {
	display: grid;
	grid-template-columns: 160px minmax(0, 1fr);
	gap: 48px;
	min-height: 70vh;
}
.admin-sidebar {
	position: sticky;
	top: 24px;
	align-self: start;
	padding: 24px 0;
	font-size: 0.75rem;
}
.admin-sidebar nav,
.admin-sidebar-foot {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-top: 20px;
}
.admin-sidebar a {
	color: var(--text-secondary);
}
.admin-unread {
	display: inline-block;
	min-width: 1.5em;
	padding: 0 5px;
	border-radius: 999px;
	background: var(--accent);
	color: var(--bg);
	font-size: 0.6875rem;
	text-align: center;
}
.notification-unread {
	box-shadow: inset 2px 0 0 var(--accent);
	background: var(--accent-tint-04);
}
.admin-sidebar a[aria-current] {
	color: var(--accent);
	border-left: 2px solid var(--accent);
	padding-left: 12px;
}
.admin-sidebar-foot {
	border-top: 1px solid var(--border);
	padding-top: 24px;
	margin-top: 40px;
}
.admin-content {
	min-width: 0;
}
.admin-heading {
	border-bottom: 1px solid var(--border);
	padding: 24px 0;
	margin-bottom: 32px;
}
.admin-heading h1 {
	font-size: 2rem;
	font-weight: 400;
	margin: 8px 0 0;
	color: var(--text-heading);
}
.admin-intro {
	color: var(--text-secondary);
	margin-bottom: 24px;
}
.admin-notice {
	color: var(--sage);
	border-left: 2px solid var(--sage);
	padding-left: 16px;
}
.admin-content .profile-signature {
	max-width: 240px;
	max-height: 120px;
	object-fit: contain;
}
.admin-vitals {
	display: flex;
	flex-wrap: wrap;
	gap: 24px 40px;
	padding: 0 0 24px;
	border-bottom: 1px solid var(--border);
}
.admin-vitals strong {
	display: block;
	font-size: 1.75rem;
	font-weight: 400;
	color: var(--accent);
}
.admin-days {
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 0.6875rem;
}
.admin-days li {
	display: grid;
	grid-template-columns: 11ch minmax(0, 1fr) 5ch;
	gap: 12px;
	align-items: center;
	padding: 2px 0;
}
.admin-days meter {
	appearance: none;
	width: 100%;
	height: 6px;
	background: var(--border);
	border: 0;
}
.admin-days meter::-webkit-meter-bar {
	height: 6px;
	background: var(--border);
	border: 0;
	border-radius: 0;
}
.admin-days meter::-webkit-meter-optimum-value {
	background: var(--accent);
}
.admin-days meter::-moz-meter-bar {
	background: var(--accent);
}
.admin-days li > span:last-child {
	text-align: right;
}
.admin-select-row {
	display: flex;
	gap: 12px;
	align-items: center;
}
.admin-select-row .issue-row {
	flex: 1;
	min-width: 0;
}
.admin-content form.issue-row {
	align-items: center;
}
.admin-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.6875rem;
}
.admin-table th,
.admin-table td {
	padding: 6px 12px 6px 0;
	border-bottom: 1px solid var(--border);
	text-align: left;
	font-weight: 400;
	overflow-wrap: anywhere;
}
.admin-table th {
	color: var(--text-muted);
}
.admin-releases {
	margin: 12px 0 0;
	padding: 0;
	list-style: none;
	font-size: 0.6875rem;
}
.admin-releases li {
	padding: 4px 0;
}
.admin-repos {
	display: grid;
	grid-template-columns: minmax(120px, 0.7fr) minmax(0, 1.3fr);
	gap: 24px;
	margin-top: 24px;
}
.admin-repos .issue-row {
	flex-wrap: wrap;
}
.admin-repos [aria-current] {
	border-left: 2px solid var(--accent);
	padding-left: 12px;
}
@media (max-width: 680px) {
	.admin-repos {
		grid-template-columns: minmax(0, 1fr);
	}
	.admin-layout {
		grid-template-columns: minmax(0, 1fr);
		gap: 0;
	}
	.admin-sidebar {
		position: static;
		padding: 8px 0;
	}
	.admin-sidebar nav,
	.admin-sidebar-foot {
		flex-flow: row wrap;
		gap: 12px 20px;
	}
	.admin-sidebar-foot {
		margin-top: 16px;
		padding-top: 16px;
	}
}

.site-doc {
	max-width: 72ch;
	margin-top: 16px;
}
.site-doc h1 {
	font-size: clamp(2rem, 5vw, 3rem);
	font-weight: 400;
	color: var(--text-heading);
}
.site-doc h2 {
	margin-top: 2.4em;
	scroll-margin-top: 24px;
}
.site-doc-layout {
	display: grid;
	grid-template-columns: 180px minmax(0, 72ch);
	gap: 48px;
}
.site-doc-nav {
	position: sticky;
	top: 24px;
	align-self: start;
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 32px;
	font-size: 0.8125rem;
}
.site-doc-nav a {
	color: var(--text-secondary);
	text-decoration: none;
}
.site-doc-nav a:hover {
	color: var(--text-heading);
}
@media (max-width: 860px) {
	.site-doc-layout {
		grid-template-columns: minmax(0, 1fr);
		gap: 0;
	}
	.site-doc-nav {
		position: static;
		flex-flow: row wrap;
		gap: 8px 16px;
		margin-top: 24px;
	}
}

@media (max-width: 860px) {
	.headline,
	.profile-portrait-section {
		grid-template-columns: minmax(0, 1fr);
	}
	.headline {
		gap: 8px;
		padding-top: 48px;
	}
	.card-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}
@media (max-width: 768px) {
	.ticker {
		height: 226px;
		margin-top: -88px;
		padding-top: 80px;
	}
	.profile-cover {
		height: 280px;
		margin-top: -16px;
	}
	.profile-identity {
		bottom: 24px;
		padding: 0 16px;
	}
	.profile-username {
		font-size: 2.5rem;
	}
	.profile-event {
		grid-template-columns: 72px 12px minmax(0, 1fr);
	}
	.profile-event-time {
		display: none;
	}
}

/* ----- media in Markdown and the signed-in editor ------------------------- */

/* Sizes and places from an image's options (markdown.ts); classes, as the policy allows no inline
   style. */
.markdown .media {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 12px auto;
	border-radius: 3px;
}
.markdown .media-left {
	margin-left: 0;
}
.markdown .media-right {
	margin-right: 0;
}
.markdown .media-w25 {
	width: 25%;
}
.markdown .media-w33 {
	width: 33%;
}
.markdown .media-w50 {
	width: 50%;
}
.markdown .media-w66 {
	width: 66%;
}
.markdown .media-w75 {
	width: 75%;
}
.markdown .media-w100 {
	width: 100%;
}
.edit-btn {
	margin-left: 12px;
	padding: 1px 7px;
	background: transparent;
	border: 1px solid rgba(200, 154, 90, 0.2);
	border-radius: 2px;
	font-size: 0.625rem;
	color: var(--text-faint);
	cursor: pointer;
	vertical-align: middle;
}
.repo-desc-editable:not(:has(.editor)) {
	cursor: text;
}
.edit-btn:hover {
	color: var(--accent);
	border-color: var(--accent-dim);
}
.editor {
	display: grid;
	gap: 8px;
	margin: 8px 0 16px;
}
.editor-toolbar,
.editor-media,
.editor-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px;
}
.editor-media[hidden] {
	display: none;
}
.editor-label,
.editor-status {
	margin: 0 6px;
	font-size: 0.625rem;
	color: var(--text-faint);
}
.editor-panes {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 12px;
}
@media (max-width: 768px) {
	.editor-panes {
		grid-template-columns: minmax(0, 1fr);
	}
}
.editor-input {
	width: 100%;
	min-height: 4lh;
	max-height: 70vh;
	field-sizing: content;
	resize: vertical;
	padding: 10px 12px;
	background: var(--bg-surface);
	border: 1px solid var(--border);
	border-radius: 3px;
	color: var(--text);
	font-size: 0.75rem;
	line-height: 1.6;
}
.editor-input:focus {
	outline: none;
	border-color: var(--accent-dim);
}
.editor-preview {
	min-width: 0;
	max-height: 70vh;
	overflow-y: auto;
	padding: 0 4px;
}
.editor-preview:empty::before {
	content: attr(data-empty);
	font-family: var(--mono);
	font-size: 0.625rem;
	color: var(--text-faint);
}

/* ----- file viewer (Kepr 2's Atlas modal) -------------------------------- */

body:has(> .fv-overlay) {
	overflow: hidden;
}
.fv-overlay {
	position: fixed;
	inset: 0;
	z-index: 2000;
	display: flex;
	flex-direction: column;
	background: rgba(8, 7, 5, 0.97);
	outline: none;
	animation: fv-in 200ms ease both;
}
@keyframes fv-in {
	from {
		opacity: 0;
		transform: translateY(6px) scale(0.97);
	}
}
.fv-header {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-shrink: 0;
	height: 48px;
	padding: 0 20px;
	background: var(--bg);
	border-bottom: 1px solid var(--bg-elevated);
}
.fv-close {
	background: none;
	border: 0;
	padding: 0 4px;
	font-size: 1.375rem;
	line-height: 1;
	color: var(--text-faint);
	cursor: pointer;
}
.fv-close:hover {
	color: var(--accent);
}
.fv-title {
	display: flex;
	align-items: baseline;
	gap: 8px;
	flex: 1;
	min-width: 0;
}
.fv-name {
	font-size: 1.25rem;
	color: var(--text-heading);
	white-space: nowrap;
}
.fv-path {
	font-size: 0.625rem;
	color: var(--text-faint);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.fv-controls,
.fv-nav {
	display: flex;
	align-items: center;
	gap: 4px;
	flex-shrink: 0;
}
.fv-ctrl-btn {
	background: transparent;
	border: 1px solid rgba(200, 154, 90, 0.2);
	border-radius: 2px;
	padding: 3px 7px;
	font: inherit;
	font-size: 0.625rem;
	color: var(--text-faint);
	cursor: pointer;
	transition:
		color 100ms,
		border-color 100ms;
}
.fv-ctrl-btn:hover:not(:disabled),
.fv-ctrl-btn.active {
	color: var(--accent);
	border-color: rgba(200, 154, 90, 0.5);
	text-decoration: none;
}
.fv-ctrl-btn:disabled {
	opacity: 0.3;
	cursor: default;
}
.fv-pos {
	min-width: 48px;
	text-align: center;
	font-size: 0.625rem;
	color: var(--text-faint);
}
.fv-body {
	flex: 1;
	min-height: 0;
	display: grid;
	grid-template-columns: minmax(0, 1fr) 280px;
}
.fv-source {
	min-height: 0;
	overflow: auto;
	padding: 16px 28px 32px;
	font-family: var(--mono);
	font-size: 0.6875rem;
	color: var(--text-faint);
}
.fv-source .file-view {
	margin: -16px -28px 0;
	border: 0;
	background: none;
	overflow: visible;
}
.fv-source .code {
	font-size: var(--fv-size);
	color: var(--text);
}
.fv-wrap .fv-source .lc {
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}
.fv-source .file-markdown {
	font-family: var(--sans);
	font-size: calc(var(--fv-size) + 2px);
	color: var(--text);
}
.fv-detail .atlas-info-desc {
	font-size: 0.8125rem;
}
.fv-detail {
	overflow-y: auto;
	padding: 18px 20px 24px;
	background: var(--bg);
	border-left: 1px solid var(--bg-elevated);
}
/* After the viewer's own rules, which would otherwise win at equal specificity. */
@media (max-width: 768px) {
	.fv-overlay {
		background: var(--bg);
	}
	.fv-header {
		flex-wrap: wrap;
		height: auto;
		padding: 8px 12px;
		gap: 8px 12px;
	}
	.fv-title {
		flex-basis: calc(100% - 40px);
	}
	.fv-body {
		grid-template-columns: minmax(0, 1fr);
	}
	.fv-detail {
		display: none;
	}
	.fv-source {
		padding: 12px 16px 24px;
	}
	.fv-source .file-view {
		margin: -12px -16px 0;
	}
}

/* Last in the file, after every animation it stops, so it wins without !important. */
@media (prefers-reduced-motion: reduce) {
	.tri-outer,
	.tri-inner,
	.repo-name,
	.repo-contributor,
	.repo-desc,
	.repo-homepage,
	.repo-meta,
	.repo-tabs,
	.install-lines,
	.repo-section,
	.repo-details,
	.save-message-head,
	.ticker-row,
	.ticker-track,
	.hex-col,
	.headline h1,
	.headline-tagline,
	.headline-cloud,
	.repo-card,
	.profile-username,
	.profile-event,
	.fv-overlay,
	.repo-panel {
		animation: none;
	}
	.nav-toggle span {
		transition: none;
	}
	.hex-col {
		opacity: 0.12;
	}
}
