/* ghis - shared styles for the story page and the connect page.
   Chart colors follow a validated categorical palette (slot order is the CVD-safety
   mechanism, so keep it); dark mode is its own set of steps, not an inversion. */

:root {
	color-scheme: light;
	--page: #f9f9f7;
	--surface: #fcfcfb;
	--surface-2: #f3f2ee;
	--ink: #0b0b0b;
	--ink-2: #52514e;
	--muted: #6f6d67;
	--grid: #e1e0d9;
	--axis: #c3c2b7;
	--border: rgba(11, 11, 11, 0.1);
	--shadow: 0 1px 2px rgba(11, 11, 11, 0.04), 0 12px 32px rgba(11, 11, 11, 0.06);

	--s1: #2a78d6;
	--s2: #eb6834;
	--s3: #1baf7a;
	--s4: #eda100;
	--s5: #e87ba4;
	--s6: #008300;
	--other: #b5b3ab;

	--q0: #ebeae4;
	--q1: #b7d3f6;
	--q2: #6da7ec;
	--q3: #2a78d6;
	--q4: #184f95;

	--good: #006300;
	--bad: #b42828;
	--accent: #2a78d6;
	--accent-ink: #ffffff;
	--glow-1: rgba(42, 120, 214, 0.2);
	--glow-2: rgba(98, 80, 214, 0.14);
	--glow-3: rgba(27, 175, 122, 0.12);

	--radius: 18px;
	--font: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, monospace;
	--ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme='light']) {
		color-scheme: dark;
		--page: #0d0d0d;
		--surface: #1a1a19;
		--surface-2: #232321;
		--ink: #f0efec;
		--ink-2: #c3c2b7;
		--muted: #9a988f;
		--grid: #2c2c2a;
		--axis: #383835;
		--border: rgba(255, 255, 255, 0.1);
		--shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.35);
		--s1: #3987e5;
		--s2: #d95926;
		--s3: #199e70;
		--s4: #c98500;
		--s5: #d55181;
		--s6: #008300;
		--other: #5d5c57;
		--q0: #232321;
		--q1: #104281;
		--q2: #1c5cab;
		--q3: #3987e5;
		--q4: #86b6ef;
		--good: #0ca30c;
		--bad: #e66767;
		--accent: #3987e5;
		--glow-1: rgba(57, 135, 229, 0.22);
		--glow-2: rgba(144, 133, 233, 0.16);
		--glow-3: rgba(25, 158, 112, 0.12);
	}
}

:root[data-theme='dark'] {
	color-scheme: dark;
	--page: #0d0d0d;
	--surface: #1a1a19;
	--surface-2: #232321;
	--ink: #f0efec;
	--ink-2: #c3c2b7;
	--muted: #9a988f;
	--grid: #2c2c2a;
	--axis: #383835;
	--border: rgba(255, 255, 255, 0.1);
	--shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.35);
	--s1: #3987e5;
	--s2: #d95926;
	--s3: #199e70;
	--s4: #c98500;
	--s5: #d55181;
	--s6: #008300;
	--other: #5d5c57;
	--q0: #232321;
	--q1: #104281;
	--q2: #1c5cab;
	--q3: #3987e5;
	--q4: #86b6ef;
	--good: #0ca30c;
	--bad: #e66767;
	--accent: #3987e5;
	--glow-1: rgba(57, 135, 229, 0.22);
	--glow-2: rgba(144, 133, 233, 0.16);
	--glow-3: rgba(25, 158, 112, 0.12);
}

/* ------------------------------------------------------------------ base */

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

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--page);
	color: var(--ink);
	font: 16px/1.5 var(--font);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

a { color: inherit; text-decoration-color: var(--axis); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }

code { font: 0.9em var(--mono); background: var(--surface-2); padding: 0.1em 0.35em; border-radius: 6px; }

button, input, textarea, select { font: inherit; color: inherit; }

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

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

/* ------------------------------------------------------------------ theme switch */

/* View Transitions: the browser's own crossfade between the two themes, slowed down and eased
   so the switch feels like a dimmer rather than a flash. */
::view-transition-old(root), ::view-transition-new(root) {
	animation-duration: 0.6s;
	animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Fallback for browsers without View Transitions: colors ease instead of snapping. */
.theme-fade, .theme-fade *, .theme-fade *::before, .theme-fade *::after {
	transition: background-color 0.6s ease, color 0.6s ease, border-color 0.6s ease,
		fill 0.6s ease, stroke 0.6s ease, box-shadow 0.6s ease !important;
}

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

.bar {
	position: sticky; top: 0; z-index: 20;
	display: flex; align-items: center; gap: 12px;
	padding: 10px max(16px, calc((100vw - 1120px) / 2));
	background: color-mix(in srgb, var(--page) 78%, transparent);
	backdrop-filter: saturate(1.4) blur(14px);
	-webkit-backdrop-filter: saturate(1.4) blur(14px);
	border-bottom: 1px solid var(--border);
}

.brand {
	display: inline-flex; align-items: center; gap: 8px;
	font-weight: 700; letter-spacing: -0.02em; font-size: 18px; text-decoration: none;
}
.brand svg { width: 22px; height: 22px; }

.bar-spacer { flex: 1; }

.years {
	display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
	padding: 3px; border-radius: 999px; background: var(--surface-2);
	max-width: 100%;
}
.years::-webkit-scrollbar { display: none; }

.pill {
	border: 0; background: transparent; cursor: pointer; white-space: nowrap;
	padding: 5px 12px; border-radius: 999px; font-size: 14px; color: var(--ink-2);
	transition: background 0.2s, color 0.2s;
}
.pill:hover { color: var(--ink); }
.pill[aria-pressed='true'] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); font-weight: 600; }

.icon-btn {
	display: inline-grid; place-items: center; flex: none;
	width: 36px; height: 36px; border-radius: 50%;
	border: 1px solid var(--border); background: var(--surface); cursor: pointer;
	color: var(--ink-2); text-decoration: none; transition: transform 0.2s var(--ease), color 0.2s;
}
.icon-btn:hover { color: var(--ink); transform: rotate(-12deg); }
.icon-btn svg { width: 18px; height: 18px; }

.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	border: 1px solid var(--border); background: var(--surface); color: var(--ink);
	padding: 10px 18px; border-radius: 999px; cursor: pointer; text-decoration: none;
	font-weight: 600; font-size: 15px;
	transition: transform 0.15s var(--ease), box-shadow 0.2s, background 0.2s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn.primary { background: var(--ink); color: var(--page); border-color: transparent; }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn[disabled] { opacity: 0.55; cursor: progress; transform: none; }

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

main { max-width: 1120px; margin: 0 auto; padding: 0 16px 80px; }

.section {
	margin-top: 28px; padding: clamp(20px, 4vw, 40px);
	background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
	box-shadow: var(--shadow);
}

.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 8px 24px; margin-bottom: 24px; }
.kicker { margin: 0 0 6px; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.section h2 { margin: 0; font-size: clamp(24px, 3.4vw, 34px); line-height: 1.15; letter-spacing: -0.025em; }
.section-head p.lede { margin: 6px 0 0; color: var(--ink-2); max-width: 60ch; }

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

.note { color: var(--muted); font-size: 14px; margin: 12px 0 0; }
.empty-note { color: var(--muted); padding: 24px 0; text-align: center; }

/* ------------------------------------------------------------------ reveal & motion */

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

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

.hero {
	position: relative; isolation: isolate;
	padding: clamp(56px, 10vw, 120px) 0 clamp(32px, 6vw, 64px);
	text-align: center;
	/* The glows below are wider than a phone; clipped here they cannot widen the page (which
	   phones answer by zooming the whole page out). `hidden` is the fallback for old Safari. */
	overflow-x: hidden;
	overflow-x: clip;
}
.hero::before, .hero::after {
	content: ''; position: absolute; z-index: -1; border-radius: 50%; filter: blur(60px);
	pointer-events: none; animation: drift 18s ease-in-out infinite alternate;
}
.hero::before {
	width: 520px; height: 520px; left: calc(50% - 460px); top: -80px;
	background: radial-gradient(circle, var(--glow-1), transparent 65%);
}
.hero::after {
	width: 460px; height: 460px; left: calc(50% - 20px); top: 40px;
	background: radial-gradient(circle, var(--glow-2), transparent 65%);
	animation-duration: 22s; animation-direction: alternate-reverse;
}
@keyframes drift {
	from { transform: translate3d(-30px, 0, 0) scale(1); }
	to { transform: translate3d(40px, 30px, 0) scale(1.12); }
}

.monogram {
	display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 22px;
	background: var(--ink); color: var(--page); font-weight: 700; font-size: 28px; letter-spacing: -0.03em;
	box-shadow: var(--shadow); margin-bottom: 20px;
	animation: pop 0.9s var(--ease) both;
}
@keyframes pop { from { transform: scale(0.6) rotate(-8deg); opacity: 0; } }

.eyebrow { margin: 0 0 10px; color: var(--ink-2); font-weight: 600; letter-spacing: 0.02em; }
.hero h1 {
	margin: 0; font-size: clamp(40px, 8vw, 84px); line-height: 1; letter-spacing: -0.045em; font-weight: 800;
	animation: rise 0.9s 0.1s var(--ease) both;
}
.hero .sub { margin: 14px 0 0; color: var(--ink-2); animation: rise 0.9s 0.2s var(--ease) both; }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }

.hero-figure { margin: clamp(36px, 6vw, 64px) 0 8px; animation: rise 1s 0.3s var(--ease) both; }
.hero-figure .value { display: block; font-size: clamp(64px, 14vw, 156px); font-weight: 800; line-height: 0.95; letter-spacing: -0.05em; }
.hero-figure .label { display: block; margin-top: 8px; font-size: clamp(16px, 2vw, 20px); color: var(--ink-2); }

.tiles {
	display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px;
	margin-top: clamp(28px, 5vw, 48px); text-align: left;
}
.tile {
	padding: 16px 18px; border-radius: 14px; background: var(--surface);
	border: 1px solid var(--border); box-shadow: var(--shadow);
}
.hero .tile { animation: rise 0.9s var(--ease) both; animation-delay: calc(0.4s + var(--i, 0) * 70ms); }
.tile .t-label { display: block; font-size: 13px; color: var(--ink-2); }
.tile .t-value { display: block; margin-top: 4px; font-size: 28px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; }
.tile .t-sub { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
.section .tile { box-shadow: none; background: var(--surface-2); border-color: transparent; }

.scroll-cue {
	margin-top: 40px; color: var(--muted); font-size: 14px;
	animation: rise 1s 0.9s var(--ease) both;
}
.scroll-cue span { display: inline-block; animation: bob 2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(5px); } }

.persona {
	display: inline-flex; align-items: center; gap: 10px;
	padding: 8px 16px 8px 10px; border-radius: 999px; background: var(--surface-2); font-weight: 600;
}
.persona .badge { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--surface); font-size: 16px; }

/* ------------------------------------------------------------------ charts */

.chart { position: relative; width: 100%; }
.chart svg { display: block; overflow: visible; }
.chart-scroll { overflow-x: auto; overflow-y: hidden; padding-bottom: 4px; scrollbar-width: thin; }

.ax { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.ax-strong { fill: var(--ink); font-size: 12px; font-weight: 600; }
.gridline { stroke: var(--grid); stroke-width: 1; shape-rendering: crispEdges; }
.baseline { stroke: var(--axis); stroke-width: 1; shape-rendering: crispEdges; }

.col {
	fill: var(--s1);
	transform-box: fill-box; transform-origin: 50% 100%;
	transition: transform 0.9s var(--ease), opacity 0.2s;
	transition-delay: calc(var(--i, 0) * 22ms), 0s;
}
.hit { fill: transparent; cursor: default; }
.hit:hover + .col, .hit:focus-visible + .col { opacity: 0.75; }
.chart.pending .col, .reveal:not(.in) .col { transform: scaleY(0); }

/* calendar */
.cal-year + .cal-year { margin-top: 18px; }
.cal-year h3 { margin: 0 0 6px; font-size: 14px; color: var(--ink-2); font-weight: 600; }
.hm { transition: transform 0.6s var(--ease), opacity 0.6s var(--ease); transition-delay: calc(var(--w, 0) * 9ms); transform-box: fill-box; transform-origin: center; }
.chart.pending .hm, .reveal:not(.in) .hm { opacity: 0; transform: scale(0.3); }
.hm:hover { stroke: var(--ink); stroke-width: 1.5; }
.l0 { fill: var(--q0); } .l1 { fill: var(--q1); } .l2 { fill: var(--q2); } .l3 { fill: var(--q3); } .l4 { fill: var(--q4); }

.scale-legend { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.scale-legend i { width: 11px; height: 11px; border-radius: 2px; display: inline-block; }
.scale-legend .l0 { background: var(--q0); } .scale-legend .l1 { background: var(--q1); } .scale-legend .l2 { background: var(--q2); }
.scale-legend .l3 { background: var(--q3); } .scale-legend .l4 { background: var(--q4); }

/* punch card */
.pc { fill: var(--s1); transform-box: fill-box; transform-origin: center; transition: transform 0.7s var(--ease); transition-delay: calc(var(--i, 0) * 25ms); }
.pc0 { fill: var(--grid); }
.chart.pending .pc, .reveal:not(.in) .pc { transform: scale(0); }
.pc-hit { fill: transparent; }
.pc-hit:hover + .pc { fill: var(--q4); }

/* horizontal bars (repositories) */
.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hbar { display: grid; grid-template-columns: minmax(110px, 30%) 1fr auto; align-items: center; gap: 12px; border-radius: 8px; }
.hbar .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: var(--ink-2); }
.hbar .name b { color: var(--ink); font-weight: 600; }
.hbar .track { position: relative; height: 16px; }
.hbar .fill {
	position: absolute; inset: 0 auto 0 0; width: calc(var(--v) * 100%); min-width: 3px;
	background: var(--s1); border-radius: 0 4px 4px 0;
	transform-origin: left; transition: transform 1s var(--ease); transition-delay: calc(var(--i, 0) * 60ms);
}
.chart.pending .fill, .reveal:not(.in) .fill { transform: scaleX(0); }
.hbar .val { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 4ch; text-align: right; }
.hbar:hover .fill { filter: brightness(1.12); }

/* language stack */
.stack { display: flex; gap: 2px; height: 28px; border-radius: 6px; overflow: hidden; }
.stack span {
	flex: var(--v) 1 0; min-width: 3px; background: var(--c);
	transform-origin: left; transition: transform 1.1s var(--ease); transition-delay: calc(var(--i, 0) * 90ms);
}
.chart.pending .stack span, .reveal:not(.in) .stack span { transform: scaleX(0); }

.legend { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 24px; }
.legend li { display: grid; grid-template-columns: 12px 1fr auto; align-items: baseline; gap: 10px; font-size: 14px; }
.legend .sw { width: 12px; height: 12px; border-radius: 3px; background: var(--c); align-self: center; }
.legend .pct { font-weight: 600; font-variant-numeric: tabular-nums; }
.legend .sub { grid-column: 2 / -1; color: var(--muted); font-size: 12px; margin-top: -6px; }

/* ------------------------------------------------------------------ highlight cards */

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px; }
.card {
	position: relative; padding: 20px; border-radius: 16px; background: var(--surface-2); overflow: hidden;
	transition: transform 0.25s var(--ease);
}
.card:hover { transform: translateY(-3px); }
.card .c-icon { font-size: 22px; line-height: 1; }
.card .c-label { margin: 14px 0 4px; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.card .c-value { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; }
.card .c-detail { margin: 6px 0 0; font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
.reveal .card { opacity: 0; transform: translateY(16px) scale(0.98); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
.reveal.in .card { opacity: 1; transform: none; }
.reveal.in .card:hover { transform: translateY(-3px); transition-delay: 0s; }

.delta-up { color: var(--good); }
.delta-down { color: var(--bad); }

/* ------------------------------------------------------------------ words */

.words { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: baseline; justify-content: center; padding: 12px 0; }
.word {
	font-size: calc(14px + var(--w) * 26px); font-weight: calc(400 + var(--w) * 400);
	color: var(--ink); opacity: calc(0.45 + var(--w) * 0.55); letter-spacing: -0.02em;
	transition: transform 0.8s var(--ease), opacity 0.8s var(--ease); transition-delay: calc(var(--i, 0) * 40ms);
}
.reveal:not(.in) .word { transform: translateY(14px); opacity: 0; }

/* ------------------------------------------------------------------ tables */

details.table { margin-top: 18px; }
details.table summary { cursor: pointer; color: var(--ink-2); font-size: 14px; width: fit-content; }
details.table summary:hover { color: var(--ink); }
.table-wrap { overflow-x: auto; margin-top: 10px; max-height: 420px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--grid); white-space: nowrap; }
th { position: sticky; top: 0; background: var(--surface); font-weight: 600; color: var(--ink-2); }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }

/* ------------------------------------------------------------------ tooltip */

.tip {
	position: fixed; z-index: 50; pointer-events: none; max-width: 300px;
	padding: 8px 12px; border-radius: 10px; font-size: 13px; line-height: 1.45;
	background: var(--ink); color: var(--page); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
	transform: translate(-50%, calc(-100% - 14px));
}
.tip strong { display: block; font-weight: 600; }
.tip span { display: block; opacity: 0.85; }

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

.foot { margin-top: 48px; color: var(--muted); font-size: 14px; text-align: center; }
.foot details { margin-top: 10px; text-align: left; max-width: 760px; margin-inline: auto; }
.foot ul { padding-left: 18px; }
.foot .actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 16px; }

/* ------------------------------------------------------------------ filters and comparisons */

.repo-pick { position: relative; }
.repo-button {
	display: inline-flex; align-items: center; gap: 10px; max-width: min(300px, 38vw); padding: 7px 12px 7px 16px;
	border: 0; border-radius: 999px; background: var(--surface-2); color: var(--ink); cursor: pointer;
	font-size: 14px; font-weight: 600; transition: box-shadow 0.2s, background 0.2s;
}
.repo-button:hover { box-shadow: inset 0 0 0 1px var(--border); }
.repo-button[aria-expanded='true'] { background: var(--surface); box-shadow: 0 0 0 2px var(--accent); }
.repo-current { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.repo-button svg { flex: none; width: 16px; height: 16px; color: var(--ink-2); transition: transform 0.25s var(--ease); }
.repo-button[aria-expanded='true'] svg { transform: rotate(180deg); }

.repo-panel {
	position: absolute; z-index: 40; top: calc(100% + 10px); right: 0; width: 380px; max-width: calc(100vw - 32px);
	padding: 8px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08), 0 24px 60px rgba(0, 0, 0, 0.22);
	opacity: 0; transform: translateY(-6px) scale(0.98); transform-origin: top right;
	transition: opacity 0.18s var(--ease), transform 0.22s var(--ease);
}
.repo-panel.open { opacity: 1; transform: none; }
.repo-search-wrap { padding: 2px 2px 8px; border-bottom: 1px solid var(--grid); margin-bottom: 6px; }
.repo-search {
	width: 100%; padding: 9px 12px 9px 34px; border-radius: 10px; border: 1px solid var(--border); background: var(--page);
	font-size: 14px; outline: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23898781' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: 11px center; background-size: 15px;
}
.repo-search:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.repo-search::-webkit-search-cancel-button { cursor: pointer; }
.repo-list { list-style: none; margin: 0; padding: 0; max-height: min(360px, 60vh); overflow-y: auto; overscroll-behavior: contain; }
.repo-list li {
	display: grid; grid-template-columns: minmax(0, 1fr) 48px 6ch 18px; /* fixed count column: the bars line up */ align-items: center; gap: 10px;
	padding: 9px 10px; border-radius: 10px; cursor: pointer; font-size: 14px;
}
.repo-list li.active { background: var(--surface-2); }
.repo-list li[aria-selected='true'] .ro-name b { color: var(--accent); }
.ro-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ro-name b { font-weight: 600; }
.ro-org { color: var(--muted); }
.ro-bar { height: 4px; border-radius: 2px; background: var(--grid); overflow: hidden; }
.ro-bar i { display: block; height: 100%; width: calc(var(--v) * 100%); background: var(--s1); border-radius: 2px; }
.ro-n { color: var(--ink-2); font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; }
.ro-check { display: grid; place-items: center; color: var(--accent); visibility: hidden; }
.ro-check svg { width: 16px; height: 16px; }
.repo-list li[aria-selected='true'] .ro-check { visibility: visible; }
.repo-empty { margin: 10px; color: var(--muted); font-size: 14px; text-align: center; }

.delta { display: inline-flex; align-items: center; gap: 3px; margin-left: 8px; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hero .tile .delta { background: var(--page); margin-left: auto; }
.tile .t-label { display: flex; align-items: center; gap: 6px; }
.hero-figure .vs { display: block; margin-top: 10px; font-size: 15px; color: var(--muted); }
.hero-figure .vs .delta { margin: 0 4px 0 0; font-size: 14px; }

/* ------------------------------------------------------------------ people */

.people { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.people li { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--page); font-size: 13px; font-weight: 700; }
.people .who { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people .n { color: var(--ink-2); font-size: 14px; font-variant-numeric: tabular-nums; }
.reveal .people li { opacity: 0; transform: translateX(-12px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.reveal.in .people li { opacity: 1; transform: none; }

/* ------------------------------------------------------------------ milestones */

.timeline { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; display: grid; gap: 18px; }
.timeline::before { content: ''; position: absolute; left: 21px; top: 18px; bottom: 18px; width: 2px; background: var(--grid); }
.timeline li { position: relative; display: grid; grid-template-columns: 36px 1fr; gap: 16px; align-items: start; }
.ms-icon { position: relative; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--surface-2); box-shadow: 0 0 0 3px var(--surface); font-size: 17px; line-height: 1; }
.timeline time { display: block; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.timeline b { display: block; font-size: 17px; letter-spacing: -0.01em; }
.timeline div > span { display: block; color: var(--ink-2); font-size: 14px; overflow-wrap: anywhere; }
.reveal .timeline li { opacity: 0; transform: translateY(12px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); transition-delay: calc(var(--i, 0) * 60ms); }
.reveal.in .timeline li { opacity: 1; transform: none; }

/* ------------------------------------------------------------------ share */

.share { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 28px; align-items: center; }
.share-card { margin: 0; }
.share-card img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; border-radius: 14px; background: #0d0d0d; box-shadow: var(--shadow); }
.share-actions { display: grid; gap: 10px; align-content: start; }
.share-actions .btn { justify-content: center; }

.dialog { width: min(480px, calc(100vw - 32px)); padding: 24px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.dialog::backdrop { background: rgba(0, 0, 0, 0.45); backdrop-filter: blur(2px); }
.dialog h3 { margin: 0 0 6px; font-size: 20px; }
.dialog p { margin: 0 0 16px; color: var(--ink-2); font-size: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; font-size: 15px; cursor: pointer; }
.check input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--accent); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* ------------------------------------------------------------------ connect page */

.connect { max-width: 1120px; margin: 0 auto; padding: 0 16px 80px; }
.connect .hero { padding-bottom: 24px; }
.connect .hero h1 { font-size: clamp(40px, 7.5vw, 76px); }
.connect .hero h1 em { font-style: normal; background: linear-gradient(100deg, var(--s1), #6250d6 55%, var(--s3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.connect .lead { max-width: 56ch; margin: 18px auto 0; font-size: clamp(16px, 2vw, 19px); color: var(--ink-2); animation: rise 0.9s 0.2s var(--ease) both; }

.preview { display: flex; justify-content: center; gap: 3px; margin: 34px auto 0; animation: rise 1s 0.3s var(--ease) both; }
.preview i { width: 11px; height: 11px; border-radius: 3px; background: var(--b, var(--q0)); animation: shimmer 3.2s ease-in-out infinite; animation-delay: calc(var(--d) * 1ms); }
.preview .c { display: grid; gap: 3px; }
@keyframes shimmer { 0%, 100% { background: var(--q0); } 30% { background: var(--q2); } 45% { background: var(--q3); } 60% { background: var(--q1); } }

.panel {
	max-width: 640px; margin: 24px auto 0; padding: clamp(20px, 4vw, 32px);
	background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow);
	animation: rise 1s 0.35s var(--ease) both;
}

.providers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 22px; }
.provider {
	display: grid; justify-items: center; gap: 6px; padding: 12px 6px; cursor: pointer;
	border: 1px solid var(--border); border-radius: 14px; background: var(--surface);
	font-size: 13px; font-weight: 600; color: var(--ink-2); text-align: center; line-height: 1.2;
	transition: border-color 0.2s, background 0.2s, color 0.2s, transform 0.15s var(--ease);
}
.provider:hover { transform: translateY(-1px); color: var(--ink); }
.provider svg { width: 26px; height: 26px; }
.provider[aria-checked='true'] { border-color: var(--ink); color: var(--ink); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--ink); }
.provider small { font-weight: 400; color: var(--muted); font-size: 11px; }

.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label, .field .label { font-size: 14px; font-weight: 600; }
.field .hint { font-size: 13px; color: var(--muted); }
.field .hint a { color: var(--ink-2); }
.input {
	width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--border);
	background: var(--page); transition: border-color 0.2s, box-shadow 0.2s;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
textarea.input { min-height: 96px; resize: vertical; font-family: var(--mono); font-size: 13px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

details.more summary { cursor: pointer; font-size: 14px; color: var(--ink-2); margin-bottom: 12px; }

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 8px; }
.form-actions .btn.primary { flex: 1 1 200px; padding: 13px 22px; font-size: 16px; }

.privacy { display: flex; gap: 10px; margin-top: 18px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-size: 13px; color: var(--ink-2); }
.privacy svg { flex: none; width: 18px; height: 18px; margin-top: 1px; }

.alt { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }
.drop { border: 1.5px dashed var(--axis); border-radius: 14px; padding: 14px; text-align: center; color: var(--ink-2); font-size: 14px; margin-top: 16px; transition: border-color 0.2s, background 0.2s; }
.drop.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }

.error { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--ink); font-size: 14px; }

.optional { font-weight: 400; color: var(--muted); font-size: 13px; margin-left: 4px; }

.mode-chip {
	display: inline-flex; align-items: center; gap: 8px; margin: 22px auto 0; padding: 6px 14px;
	border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
	font-size: 14px; font-weight: 600; color: var(--ink-2); animation: rise 0.9s 0.25s var(--ease) both;
}
.mode-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px color-mix(in srgb, var(--good) 20%, transparent); }

.detect { list-style: none; margin: 0 0 22px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); display: grid; gap: 8px; font-size: 14px; color: var(--ink-2); }
.detect li { display: grid; grid-template-columns: 20px 1fr; gap: 8px; animation: rise 0.4s var(--ease) both; overflow-wrap: anywhere; }
.detect b { color: var(--ink); font-weight: 600; }
.d-mark { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: 12px; font-weight: 700; }
.d-ok .d-mark { background: color-mix(in srgb, var(--good) 18%, transparent); color: var(--good); }
.d-no .d-mark { background: var(--surface); color: var(--muted); }
.d-busy .d-mark { color: var(--muted); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }

details.help { margin-top: 2px; font-size: 13px; color: var(--ink-2); }
details.help summary { cursor: pointer; width: fit-content; color: var(--ink-2); }
details.help summary:hover { color: var(--ink); }
details.help ol { margin: 8px 0 4px; padding: 12px 14px 12px 34px; border-radius: 12px; background: var(--surface-2); display: grid; gap: 6px; }
details.help a { color: var(--ink); }

.how { margin-top: 64px; text-align: center; }
.how h2 { margin: 0 0 24px; font-size: clamp(24px, 3.4vw, 34px); letter-spacing: -0.025em; }
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 14px; text-align: left; }
.steps li { counter-increment: step; position: relative; padding: 20px 20px 20px 64px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.steps li::before {
	content: counter(step); position: absolute; left: 20px; top: 18px; display: grid; place-items: center;
	width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--page); font-weight: 700; font-size: 14px;
}
.steps b { display: block; margin-bottom: 4px; }
.steps span { color: var(--ink-2); font-size: 14px; }

/* progress */
.progress { text-align: center; }
.orb { position: relative; width: 92px; height: 92px; margin: 8px auto 20px; }
.orb i { position: absolute; inset: 0; border-radius: 50%; border: 3px solid transparent; border-top-color: var(--s1); animation: spin 1.1s linear infinite; }
.orb i:nth-child(2) { inset: 12px; border-top-color: #6250d6; animation-duration: 1.6s; animation-direction: reverse; }
.orb i:nth-child(3) { inset: 24px; border-top-color: var(--s3); animation-duration: 2.2s; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress h2 { margin: 0; font-size: 24px; letter-spacing: -0.02em; }
.progress .status { margin: 6px 0 18px; color: var(--ink-2); min-height: 1.5em; }
.log {
	text-align: left; max-height: 240px; overflow-y: auto; margin: 0; padding: 12px 14px; list-style: none;
	border-radius: 12px; background: var(--page); border: 1px solid var(--border);
	font: 12.5px/1.6 var(--mono); color: var(--ink-2);
}
.log li { animation: rise 0.4s var(--ease) both; overflow-wrap: anywhere; }
.log li:last-child { color: var(--ink); }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 14px; margin-top: 56px; }
.feature { padding: 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.feature b { display: block; margin-bottom: 4px; }
.feature p { margin: 0; color: var(--ink-2); font-size: 14px; }

/* ------------------------------------------------------------------ responsive & preferences */

@media (max-width: 640px) {
	.bar { flex-wrap: wrap; }
	.repo-pick { order: 3; flex-basis: 100%; }
	.repo-button { width: 100%; max-width: none; justify-content: space-between; }
	.repo-panel { left: 0; right: 0; width: auto; max-width: none; transform-origin: top center; }
	.share { grid-template-columns: 1fr; }
	.years { order: 3; flex-basis: 100%; }
	.hbar { grid-template-columns: minmax(90px, 36%) 1fr auto; gap: 8px; }
	.providers { grid-template-columns: repeat(2, 1fr); }
	.row { grid-template-columns: 1fr; }
	.tile .t-value { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
	.reveal { opacity: 1; transform: none; }
	html { scroll-behavior: auto; }
}

@media print {
	.bar, .scroll-cue, .foot .actions { display: none; }
	.section { box-shadow: none; break-inside: avoid; }
}
