/* cc.c14.software
 *
 * Design tokens are lifted verbatim from c14.software so the two sites read as
 * a family. That site inlines its CSS and duplicates it into 404.html; this one
 * has several pages, so the same values live here once instead.
 */

:root {
	color-scheme: dark;

	--bg: linear-gradient(135deg, oklch(8% 0.02 15) 0%, oklch(4% 0 0) 50%, oklch(7% 0.02 15) 100%);
	--brand: linear-gradient(135deg, #e8a060, #a855f7);

	--fg: oklch(100% 0 0 / 0.85);
	--fg-dim: oklch(100% 0 0 / 0.7);
	--fg-faint: oklch(100% 0 0 / 0.45);

	--line: oklch(100% 0 0 / 0.12);
	--surface: oklch(100% 0 0 / 0.04);
	--surface-hover: oklch(100% 0 0 / 0.08);

	--accent: oklch(75% 0.18 50);
	--accent-line: oklch(75% 0.18 50 / 0.6);
	--ok: oklch(78% 0.17 150);

	--radius: 0.6rem;
	--ease: 0.15s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { min-height: 100%; }

body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
	background: var(--bg);
	background-attachment: fixed;
	color: var(--fg);
	line-height: 1.6;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	overflow-x: hidden;
}

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

.topbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.25rem 2rem;
	border-bottom: 1px solid var(--line);
}

.brand {
	font-weight: 800;
	font-size: 1.05rem;
	letter-spacing: -0.01em;
	text-decoration: none;
	background: var(--brand);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

.topnav { display: flex; gap: 1.25rem; flex-wrap: wrap; }

.topnav a {
	color: var(--fg-dim);
	text-decoration: none;
	font-size: 0.95rem;
	font-weight: 600;
	padding-bottom: 2px;
	border-bottom: 2px solid transparent;
	transition: color var(--ease), border-color var(--ease);
}

.topnav a:hover,
.topnav a:focus-visible { color: var(--fg); }
.topnav a[aria-current="page"] { color: var(--fg); border-bottom-color: var(--accent); }

/* --- layout ------------------------------------------------------------- */

.wrap {
	flex: 1;
	width: 100%;
	max-width: 58rem;
	margin: 0 auto;
	padding: 3rem 2rem 4rem;
	position: relative;
}

.wrap > section { margin-bottom: 3.5rem; }
.wrap > section:last-child { margin-bottom: 0; }

/* --- hero --------------------------------------------------------------- */

.hero { text-align: center; }
.hero.compact { margin-bottom: 2.5rem; }

h1 {
	font-size: clamp(2.25rem, 8vw, 3.5rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.1;
	background: var(--brand);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

h1.code { font-size: clamp(4rem, 18vw, 8rem); }

.callout {
	display: inline-block;
	font-size: 0.85rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--accent);
	border: 1px solid var(--accent-line);
	border-radius: 2rem;
	padding: 0.35rem 1rem;
	margin-bottom: 1.25rem;
	background: oklch(75% 0.18 50 / 0.08);
}

.subtitle {
	margin-top: 1rem;
	font-size: 1.15rem;
	color: var(--fg-dim);
	max-width: 42rem;
	margin-inline: auto;
}

.rule {
	width: 4rem;
	height: 2px;
	margin: 2rem auto;
	border-radius: 2px;
	background: linear-gradient(90deg, #e8a060, #a855f7);
	opacity: 0.7;
}

h2 {
	font-size: 1.35rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	margin-bottom: 1rem;
}

h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.35rem; }

/* --- text --------------------------------------------------------------- */

.prose p { margin-bottom: 1rem; max-width: 46rem; }
.prose .goal { color: var(--fg-dim); border-left: 2px solid var(--accent-line); padding-left: 1rem; }

.muted { color: var(--fg-dim); }
.small { font-size: 0.875rem; }
.legal { color: var(--fg-faint); font-size: 0.85rem; }

code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.9em;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 0.3rem;
	padding: 0.1rem 0.35rem;
	overflow-wrap: anywhere;
}

.textlink { color: var(--accent); text-decoration: none; font-weight: 600; }
.textlink:hover, .textlink:focus-visible { text-decoration: underline; }

/* --- bumper sticker ------------------------------------------------------ */

.bumper-sticker {
	position: absolute;
	top: var(--top-offset, 8rem);
	transform: rotate(var(--rotation, -3deg));
	z-index: 2;
	pointer-events: none;
	user-select: none;
	width: 12rem;
	max-width: 14rem;
}

.bumper-left {
	right: calc(100% + 1.25rem);
}

.bumper-right {
	left: calc(100% + 1.25rem);
}

.bumper-inner {
	display: block;
	background: #fdf6e2;
	color: #111;
	font-family: Impact, Haettenschweiler, "Arial Black", -apple-system, sans-serif;
	font-size: 0.88rem;
	font-weight: 900;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	line-height: 1.25;
	text-align: center;
	padding: 0.55rem 0.85rem;
	border-radius: 4px;
	border: 3px solid #111;
	outline: 2px solid #fdf6e2;
	box-shadow: 0 10px 25px oklch(0% 0 0 / 0.65), 0 3px 6px oklch(0% 0 0 / 0.4);
}

@media (max-width: 77.99rem) {
	.bumper-sticker {
		top: 1rem;
		width: 10.5rem;
	}
	.bumper-left {
		left: 0.75rem;
		right: auto;
	}
	.bumper-right {
		right: 0.75rem;
		left: auto;
	}
}

@media (max-width: 48rem) {
	.bumper-sticker {
		position: static;
		width: auto;
		max-width: 18rem;
		margin: 0 auto 1.5rem auto;
	}
}

/* --- panels and cards --------------------------------------------------- */

.panel {
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
	padding: 1.25rem 1.4rem;
}

.panel.compact { padding: 1rem 1.15rem; }
.panel + .panel { margin-top: 1rem; }
.panel p + p { margin-top: 0.75rem; }

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

.notice { border-color: var(--accent-line); }
.empty { text-align: center; }
.license p { color: var(--fg-dim); }
.license p:first-of-type { color: var(--fg); }

/* --- buttons ------------------------------------------------------------ */

.cta { margin-top: 1.5rem; }
.cta-empty { margin-top: 1.5rem; color: var(--fg-dim); }

.button {
	display: inline-block;
	padding: 0.85rem 1.6rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
	color: var(--fg);
	font-size: 1rem;
	font-weight: 600;
	text-decoration: none;
	transition: transform var(--ease), border-color var(--ease), background var(--ease);
}

.button:hover,
.button:focus-visible {
	transform: translateY(-2px);
	border-color: var(--accent-line);
	background: var(--surface-hover);
}

/* --- releases ----------------------------------------------------------- */

.assetlist { list-style: none; margin-top: 1rem; display: grid; gap: 0.6rem; }

.asset {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.75rem;
	padding: 0.75rem 1rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
	color: var(--fg);
	text-decoration: none;
	transition: transform var(--ease), border-color var(--ease), background var(--ease);
}

.asset:hover,
.asset:focus-visible {
	transform: translateY(-2px);
	border-color: var(--accent-line);
	background: var(--surface-hover);
}

.asset-platform { font-weight: 700; min-width: 5rem; }
.asset-name { color: var(--fg-dim); font-size: 0.9rem; overflow-wrap: anywhere; flex: 1; }
.asset-size { color: var(--fg-faint); font-size: 0.85rem; }

/* Sits after the size and reads as an aside — it is context for the build, not
   a reason to pick it. `white-space: nowrap` keeps "1.2k downloads" from
   breaking across lines when the row wraps on a narrow screen. */
.asset-count {
	color: var(--fg-faint);
	font-size: 0.85rem;
	white-space: nowrap;
}

.changelog { margin-top: 1rem; }
.changelog summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 0.9rem; }
.changelog pre {
	margin-top: 0.75rem;
	padding: 1rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: oklch(0% 0 0 / 0.25);
	color: var(--fg-dim);
	font-size: 0.85rem;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

.tag {
	display: inline-block;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 0.15rem 0.45rem;
	border: 1px solid var(--line);
	border-radius: 0.3rem;
	color: var(--fg-dim);
	vertical-align: middle;
}

.tag.ok { color: var(--ok); border-color: oklch(78% 0.17 150 / 0.4); }

/* --- ccnet -------------------------------------------------------------- */

.statgrid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
	gap: 1rem;
	margin-top: 1rem;
}

.statgrid dt { color: var(--fg-faint); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; }
.statgrid dd { font-size: 1.4rem; font-weight: 700; margin-top: 0.15rem; }

.live-dot {
	display: inline-block;
	width: 0.5rem;
	height: 0.5rem;
	margin-left: 0.5rem;
	border-radius: 50%;
	background: var(--ok);
	vertical-align: middle;
}

.is-offline .live-dot { background: var(--fg-faint); }
.is-offline { border-color: var(--line); }

.datatable { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.datatable th, .datatable td { text-align: left; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--line); }
.datatable th { color: var(--fg-faint); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.datatable tbody tr:last-child td { border-bottom: none; }

/* --- lists -------------------------------------------------------------- */

.steps { margin: 1rem 0 0 1.25rem; display: grid; gap: 0.5rem; color: var(--fg-dim); }
.steps li { padding-left: 0.35rem; }

.deflist { margin-top: 1rem; display: grid; gap: 0.5rem 1rem; }
.deflist dt { font-weight: 700; }
.deflist dd { color: var(--fg-dim); margin-bottom: 0.5rem; }

.linklist { list-style: none; display: grid; gap: 0.6rem; }
.linklist a { color: var(--accent); text-decoration: none; font-weight: 600; }
.linklist a:hover, .linklist a:focus-visible { text-decoration: underline; }

/* --- footer ------------------------------------------------------------- */

.sitefoot {
	border-top: 1px solid var(--line);
	padding: 2rem;
	text-align: center;
	color: var(--fg-faint);
	font-size: 0.9rem;
}

.sitefoot a { color: var(--accent); text-decoration: none; }
.sitefoot a:hover, .sitefoot a:focus-visible { text-decoration: underline; }
.sitefoot p + p { margin-top: 0.5rem; }

/* --- a11y --------------------------------------------------------------- */

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

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; }
	.button:hover, .asset:hover { transform: none; }
}

@media (max-width: 40rem) {
	.wrap { padding: 2rem 1.25rem 3rem; }
	.topbar { padding: 1rem 1.25rem; }
	.statgrid dd { font-size: 1.2rem; }
}

/* Friends' guide (unlisted /f/<slug>) */
.guide { list-style: none; counter-reset: guide; padding: 0; margin: 1.5rem 0; display: grid; gap: 1rem; }
.guide > li { counter-increment: guide; }
.guide > li > h2 { margin-top: 0; }
.guide > li > h2::before { content: counter(guide) ". "; color: var(--accent); }
.guide p { color: var(--fg-dim); }
.guide .cta { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.guide-platform { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: 0.75rem; }
.guide-platform h3 { margin: 0 0 0.4rem; font-size: 1rem; color: var(--fg); }
pre.cmd { margin: 0.5rem 0; padding: 0.6rem 0.8rem; overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 0.4rem; user-select: all; }
pre.cmd code { background: none; border: 0; padding: 0; }
.button.disabled { opacity: 0.45; cursor: not-allowed; }
