/*
 * Pi Pocket's site. Same theme as the app: Tokyo Night colors, Omarchy's square shapes and thin borders,
 * JetBrains Mono throughout, and the cyan-to-green active gradient as the accent.
 */
@font-face {
	font-family: "Pocket Mono";
	src: url("fonts/JetBrainsMono.woff2") format("woff2");
	font-weight: 100 800;
	font-display: swap;
}

:root {
	--bg: #13141c;
	--panel: #16161e;
	--card: #1a1b26;
	--card-2: #1f2335;
	--raised: #24283b;
	--line: #292e42;
	--line-strong: #3b4261;
	--text: #c0caf5;
	--body: #a9b1d6;
	--muted: #7a82ad;
	--accent: #7aa2f7;
	--accent-ink: #0e0e14;
	--accent-soft: rgba(122, 162, 247, 0.12);
	--brand: #ff9e64;
	--ok: #9ece6a;
	--ok-soft: rgba(158, 206, 106, 0.1);
	--warn: #e0af68;
	--warn-soft: rgba(224, 175, 104, 0.08);
	--warn-line: rgba(224, 175, 104, 0.6);
	--err: #f7768e;
	--err-soft: rgba(247, 118, 142, 0.1);
	--purple: #bb9af7;
	--code-bg: #0e0e14;
	--active: linear-gradient(45deg, #33ccff, #00ff99);
	--mono: "Pocket Mono", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	--max: 1160px;
	color-scheme: dark;
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	scroll-padding-top: 76px;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--body);
	font: 15px/1.7 var(--mono);
	font-variant-ligatures: none;
	-webkit-text-size-adjust: 100%;
	-webkit-font-smoothing: antialiased;
}

a {
	color: var(--accent);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

img,
svg {
	display: block;
}

h1,
h2,
h3 {
	color: var(--text);
	margin: 0;
	font-weight: 700;
	letter-spacing: -0.02em;
}

p {
	margin: 0;
}

code {
	font-family: inherit;
	color: var(--text);
	background: var(--card-2);
	border: 1px solid var(--line);
	padding: 0 0.3em;
	font-size: 0.9em;
}

:focus-visible {
	outline: 2px solid #33ccff;
	outline-offset: 2px;
}

.wrap {
	max-width: var(--max);
	margin: 0 auto;
	padding: 0 24px;
}

.skip {
	position: absolute;
	left: -9999px;
}

.skip:focus {
	left: 16px;
	top: 12px;
	z-index: 20;
	background: var(--card);
	padding: 8px 12px;
}

/* ── Buttons ─────────────────────────────────────────────── */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	height: 44px;
	padding: 0 20px;
	border: 1px solid var(--line-strong);
	background: var(--card);
	color: var(--text);
	font: 600 14px var(--mono);
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s, filter 0.15s;
}

.btn:hover {
	border-color: var(--accent);
	text-decoration: none;
}

.btn-primary {
	border: 0;
	background: var(--active);
	color: var(--accent-ink);
}

.btn-primary:hover {
	filter: brightness(1.1);
}

.btn-sm {
	height: 34px;
	padding: 0 13px;
	font-size: 13px;
}

.btn svg {
	width: 17px;
	height: 17px;
	flex: none;
}

/* ── Navigation ──────────────────────────────────────────── */

.nav {
	position: sticky;
	top: 0;
	z-index: 10;
	background: rgba(19, 20, 28, 0.94);
	border-bottom: 1px solid var(--line);
}

.nav .wrap {
	display: flex;
	align-items: center;
	gap: 28px;
	height: 62px;
}

.logo {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--text);
	font-weight: 700;
	font-size: 15px;
}

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

.logo img {
	width: 28px;
	height: 28px;
}

.nav-links {
	display: flex;
	gap: 24px;
	margin-left: auto;
	font-size: 13px;
}

.nav-links a {
	color: var(--muted);
}

.nav-links a:hover {
	color: var(--text);
	text-decoration: none;
}

/* ── Hero ────────────────────────────────────────────────── */

.hero {
	position: relative;
	overflow: hidden;
	border-bottom: 1px solid var(--line);
}

.hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
	background-size: 48px 48px;
	opacity: 0.45;
	-webkit-mask-image: radial-gradient(ellipse 75% 65% at 72% 45%, #000 20%, transparent 72%);
	mask-image: radial-gradient(ellipse 75% 65% at 72% 45%, #000 20%, transparent 72%);
	pointer-events: none;
}

.hero .wrap {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
	gap: 56px;
	align-items: center;
	padding-top: 84px;
	padding-bottom: 92px;
}

.badge {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	border: 1px solid var(--line-strong);
	background: var(--card);
	padding: 5px 12px 5px 6px;
	font-size: 12px;
	color: var(--body);
}

.badge:hover {
	border-color: var(--accent);
	text-decoration: none;
}

.badge b {
	background: var(--active);
	color: var(--accent-ink);
	padding: 1px 7px;
	font-size: 11px;
	letter-spacing: 0.04em;
}

.hero h1 {
	margin: 24px 0 22px;
	font-size: clamp(32px, 4.6vw, 54px);
	line-height: 1.06;
	letter-spacing: -0.045em;
}

.grad {
	background: var(--active);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.lead {
	font-size: 17px;
	line-height: 1.7;
	max-width: 34em;
}

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

.install {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 26px;
	max-width: 460px;
	background: var(--code-bg);
	border: 1px solid var(--line);
	padding: 6px 6px 6px 16px;
	font-size: 14px;
	color: var(--text);
}

.install .prompt {
	color: var(--ok);
	user-select: none;
}

.install code {
	all: unset;
	flex: 1;
	min-width: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.copy {
	flex: none;
	height: 32px;
	padding: 0 11px;
	border: 1px solid var(--line);
	background: var(--card);
	color: var(--muted);
	font: 12px var(--mono);
	cursor: pointer;
}

.copy:hover {
	color: var(--text);
	border-color: var(--line-strong);
}

.copy.done {
	color: var(--ok);
	border-color: var(--ok);
}

.facts {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	margin-top: 20px;
	font-size: 12px;
	color: var(--muted);
}

.facts span::before {
	content: "■ ";
	color: var(--ok);
	font-size: 9px;
	vertical-align: 2px;
}

/* ── Device mockup: a faithful, static rendering of the app's chat screen ── */

.device {
	position: relative;
	width: 100%;
	max-width: 372px;
	margin: 0 auto;
	padding: 2px;
	background: var(--active);
}

.device::before {
	content: "";
	position: absolute;
	inset: -40px;
	z-index: -1;
	background: radial-gradient(closest-side, rgba(51, 204, 255, 0.16), transparent);
}

.screen {
	display: flex;
	flex-direction: column;
	height: 640px;
	background: var(--bg);
	font-size: 12px;
	line-height: 1.55;
	overflow: hidden;
	text-align: left;
}

.ui-top {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border-bottom: 1px solid var(--line);
}

.ui-menu {
	width: 15px;
	height: 11px;
	flex: none;
	border-top: 1.5px solid var(--muted);
	border-bottom: 1.5px solid var(--muted);
	position: relative;
}

.ui-menu::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 3.25px;
	border-top: 1.5px solid var(--muted);
}

.ui-title {
	flex: 1;
	min-width: 0;
	line-height: 1.35;
}

.ui-title b {
	display: block;
	color: var(--text);
	font-size: 12.5px;
}

.ui-title span {
	color: var(--muted);
	font-size: 10.5px;
}

.avatars {
	display: flex;
}

.av {
	display: grid;
	place-items: center;
	width: 23px;
	height: 23px;
	flex: none;
	background: var(--card-2);
	color: var(--who, var(--accent));
	border: 1px solid var(--who, var(--accent));
	font-size: 10px;
	font-weight: 700;
	line-height: 1;
}

.avatars .av + .av {
	margin-left: -4px;
}

.av.away {
	opacity: 0.45;
}

.ui-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 11px;
	padding: 14px 12px;
	overflow: hidden;
}

.ui-author {
	align-self: flex-end;
	margin-bottom: -7px;
	font-size: 10px;
	color: var(--muted);
}

.ui-bubble {
	align-self: flex-end;
	max-width: 88%;
	background: var(--raised);
	border: 1px solid var(--line);
	border-right: 2px solid var(--accent);
	padding: 7px 10px;
	color: var(--text);
}

.ui-text code {
	font-size: 11px;
}

.ui-tool {
	border: 1px solid var(--line);
	border-left: 2px solid var(--ok);
	background: var(--card);
}

.ui-tool.running {
	border-left-color: var(--accent);
}

.ui-tool-head {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 9px;
	min-height: 32px;
}

.ui-tool-head .ic {
	width: 16px;
	flex: none;
	text-align: center;
	color: var(--accent);
	font-size: 11px;
}

.ui-tool-head .lbl {
	color: var(--text);
	font-weight: 600;
}

.ui-tool-head .subj {
	flex: 1;
	min-width: 0;
	color: var(--muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ui-tool-head .ok {
	color: var(--ok);
}

.ui-diff {
	margin: 0;
	padding: 6px 0;
	background: var(--code-bg);
	border-top: 1px solid var(--line);
	font: 10.5px/1.6 var(--mono);
	white-space: pre;
	overflow: hidden;
	color: var(--muted);
}

.ui-diff span {
	display: block;
	padding: 0 9px;
}

.ui-diff .del {
	color: var(--err);
	background: var(--err-soft);
}

.ui-diff .add {
	color: var(--ok);
	background: var(--ok-soft);
}

.ui-out {
	margin: 0;
	padding: 6px 9px;
	background: var(--code-bg);
	border-top: 1px solid var(--line);
	font: 10.5px/1.6 var(--mono);
	color: var(--muted);
	white-space: pre;
	overflow: hidden;
}

.ui-out .pass {
	color: var(--ok);
}

.spin {
	width: 11px;
	height: 11px;
	flex: none;
	border: 1.5px solid var(--line-strong);
	border-top-color: var(--accent);
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

.ui-typing {
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: 10.5px;
	color: var(--muted);
	margin-top: auto;
}

.dots {
	display: inline-flex;
	gap: 3px;
}

.dots i {
	width: 4px;
	height: 4px;
	background: var(--who, var(--muted));
	animation: blink 1.2s infinite;
}

.dots i:nth-child(2) {
	animation-delay: 0.2s;
}

.dots i:nth-child(3) {
	animation-delay: 0.4s;
}

.ui-compose {
	padding: 8px 10px 8px;
	border-top: 1px solid var(--line);
}

.ui-input {
	padding: 1px;
	background: var(--active);
}

.ui-input-inner {
	background: var(--card);
	padding: 9px 10px 8px;
}

.ui-placeholder {
	color: var(--text);
}

.caret {
	display: inline-block;
	width: 6px;
	height: 13px;
	vertical-align: -2px;
	background: #33ccff;
	animation: caret 1s steps(1) infinite;
}

.ui-row {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 8px;
}

.chip {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	height: 23px;
	padding: 0 8px;
	border: 1px solid var(--line);
	background: var(--card-2);
	color: var(--body);
	font-size: 10.5px;
	white-space: nowrap;
}

.chip .glyph {
	color: var(--brand);
}

.chip.on {
	border-color: var(--accent);
	color: var(--accent);
	background: var(--accent-soft);
}

.ui-round {
	display: grid;
	place-items: center;
	width: 27px;
	height: 27px;
	margin-left: auto;
	border: 1px solid var(--err);
	color: var(--err);
}

.ui-round i {
	width: 8px;
	height: 8px;
	background: currentColor;
}

.ui-status {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 5px;
	padding-top: 7px;
	font-size: 9.5px;
	color: var(--muted);
}

.ui-status .sep {
	opacity: 0.6;
}

.ui-status .guard {
	color: var(--ok);
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

@keyframes blink {
	0%,
	100% {
		opacity: 0.25;
	}
	40% {
		opacity: 1;
	}
}

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

/* ── Stats strip ─────────────────────────────────────────── */

.stats {
	border-bottom: 1px solid var(--line);
	background: var(--panel);
}

.stats .wrap {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
}

.stat {
	padding: 30px 24px;
	border-left: 1px solid var(--line);
}

.stat:last-child {
	border-right: 1px solid var(--line);
}

.stat b {
	display: block;
	font-size: 30px;
	line-height: 1.1;
	color: var(--text);
	letter-spacing: -0.03em;
}

.stat span {
	font-size: 12.5px;
	color: var(--muted);
}

/* ── Sections ────────────────────────────────────────────── */

.section {
	padding: 104px 0;
	border-bottom: 1px solid var(--line);
}

.section.alt {
	background: var(--panel);
}

.kicker {
	display: inline-block;
	margin-bottom: 14px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--accent);
}

.kicker::before {
	content: "// ";
	color: var(--muted);
}

.section h2 {
	font-size: clamp(28px, 3.6vw, 40px);
	line-height: 1.15;
	letter-spacing: -0.035em;
}

.section-head {
	max-width: 680px;
	margin-bottom: 52px;
}

.section-head p,
.split-copy > p {
	margin-top: 16px;
	font-size: 16px;
}

/* Feature grid */

.grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	border-top: 1px solid var(--line);
	border-left: 1px solid var(--line);
}

.card {
	padding: 30px 28px 32px;
	border-right: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
	background: var(--bg);
	transition: background 0.2s;
}

.card:hover {
	background: var(--card);
}

.icon {
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	margin-bottom: 20px;
	border: 1px solid var(--line-strong);
	background: var(--card);
	color: var(--accent);
}

.icon svg {
	width: 20px;
	height: 20px;
}

.card h3 {
	margin-bottom: 9px;
	font-size: 16px;
}

.card p {
	font-size: 13.5px;
	line-height: 1.7;
}

.tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 28px;
}

.tag {
	border: 1px solid var(--line);
	background: var(--card);
	padding: 4px 11px;
	font-size: 12px;
	color: var(--body);
}

/* Split sections: copy beside an illustration */

.split {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 72px;
	align-items: center;
}

.split.flip .split-copy {
	order: 2;
}

.points {
	list-style: none;
	margin: 30px 0 0;
	padding: 0;
	display: grid;
	gap: 18px;
}

.points li {
	position: relative;
	padding-left: 28px;
	font-size: 14px;
}

.points li::before {
	content: "";
	position: absolute;
	left: 2px;
	top: 0.55em;
	width: 10px;
	height: 10px;
	background: var(--active);
}

.points b {
	color: var(--text);
}

/* Panels used for illustrations */

.panel {
	background: var(--card);
	border: 1px solid var(--line);
}

.panel-head {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 11px 16px;
	border-bottom: 1px solid var(--line);
	font-size: 12px;
	color: var(--muted);
}

.panel-head b {
	color: var(--text);
	font-weight: 600;
}

.panel-head .right {
	margin-left: auto;
}

/* Durable timeline */

.timeline {
	list-style: none;
	margin: 0;
	padding: 10px 0;
	font-size: 13px;
}

.timeline li {
	display: grid;
	grid-template-columns: 22px minmax(0, 1fr) auto;
	gap: 12px;
	align-items: center;
	padding: 10px 18px;
}

.timeline .mark {
	display: grid;
	place-items: center;
	width: 22px;
	height: 22px;
	border: 1px solid var(--ok);
	color: var(--ok);
	font-size: 11px;
}

.timeline .what {
	color: var(--text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.timeline .what em {
	font-style: normal;
	color: var(--muted);
}

.timeline .state {
	font-size: 11.5px;
	color: var(--muted);
}

.timeline .crash {
	background: var(--err-soft);
	border-top: 1px dashed rgba(247, 118, 142, 0.5);
	border-bottom: 1px dashed rgba(247, 118, 142, 0.5);
}

.timeline .crash .mark {
	border-color: var(--err);
	color: var(--err);
}

.timeline .crash .state {
	color: var(--err);
}

.timeline .resume .mark {
	border-color: var(--accent);
	color: var(--accent);
}

.timeline .resume .state {
	color: var(--accent);
}

/* People panel */

.tabs {
	display: flex;
	border-bottom: 1px solid var(--line);
	font-size: 12px;
}

.tabs span {
	padding: 9px 16px;
	color: var(--muted);
	border-bottom: 2px solid transparent;
}

.tabs .on {
	color: var(--text);
	border-bottom-color: var(--accent);
}

.chat {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 18px 16px;
	font-size: 13px;
}

.msg {
	display: grid;
	grid-template-columns: 26px minmax(0, 1fr);
	gap: 10px;
}

.msg .av {
	width: 26px;
	height: 26px;
	font-size: 11px;
}

.msg-name {
	font-size: 11.5px;
	color: var(--who);
	font-weight: 600;
}

.msg-name time {
	margin-left: 6px;
	color: var(--muted);
	font-weight: 400;
}

.msg-text {
	color: var(--text);
}

.mention {
	color: var(--accent);
	background: var(--accent-soft);
	padding: 0 3px;
}

.quote {
	margin-top: 6px;
	border-left: 2px solid var(--brand);
	padding: 3px 9px;
	background: var(--card-2);
	color: var(--body);
	font-size: 12px;
}

.event {
	text-align: center;
	font-size: 11.5px;
	color: var(--muted);
}

.event b {
	color: var(--body);
	font-weight: 500;
}

.drive {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 11px 16px;
	border-top: 1px solid var(--line);
	background: var(--card-2);
	font-size: 12px;
}

.drive .grow {
	flex: 1;
}

/* Live-edit band */

.flow {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0;
	border: 1px solid var(--line);
}

.step {
	position: relative;
	padding: 28px 26px 30px;
	border-right: 1px solid var(--line);
	background: var(--bg);
}

.step:last-child {
	border-right: 0;
}

.step code {
	display: inline-block;
	margin-bottom: 14px;
	font-size: 13px;
	color: var(--brand);
}

.step h3 {
	font-size: 15px;
	margin-bottom: 6px;
}

.step p {
	font-size: 13.5px;
}

/* Access cards */

.access {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
}

.mode {
	padding: 24px 22px 26px;
	background: var(--card);
	border: 1px solid var(--line);
	border-top: 2px solid var(--line-strong);
}

.mode.featured {
	position: relative;
	border-top-color: transparent;
}

.mode.featured::before {
	content: "";
	position: absolute;
	left: -1px;
	right: -1px;
	top: -2px;
	height: 2px;
	background: var(--active);
}

.mode code {
	font-size: 12px;
	color: var(--muted);
}

.mode h3 {
	margin: 12px 0 8px;
	font-size: 15px;
}

.mode p {
	font-size: 13px;
}

.note {
	margin-top: 28px;
	font-size: 13.5px;
	color: var(--muted);
}

/* Guard approval */

.approval {
	border: 2px solid var(--warn);
	background: var(--warn-soft);
	padding: 18px 20px 20px;
}

.approval-head {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	color: var(--warn);
	font-weight: 700;
}

.approval-head .verdict {
	margin-left: auto;
	border: 1px solid var(--warn-line);
	padding: 1px 8px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.approval pre {
	margin: 14px 0 12px;
	padding: 10px 12px;
	background: var(--code-bg);
	border: 1px solid var(--line);
	color: var(--text);
	font: 13px/1.6 var(--mono);
	white-space: pre-wrap;
	word-break: break-word;
}

.approval-reason {
	font-size: 13px;
}

.approval-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 16px;
}

.approval-actions .btn {
	height: 36px;
	padding: 0 16px;
	font-size: 13px;
}

.btn-allow {
	background: var(--ok);
	color: var(--accent-ink);
	border: 0;
}

.btn-deny {
	color: var(--err);
	border-color: var(--err);
	background: transparent;
}

.approval-actions small {
	margin-left: auto;
	font-size: 11.5px;
	color: var(--muted);
}

.callout {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 14px;
	margin-top: 28px;
	padding: 16px 18px;
	border: 1px solid var(--line);
	border-left: 2px solid var(--err);
	background: var(--err-soft);
	font-size: 13.5px;
}

.callout b {
	color: var(--err);
}

/* Get started */

.start {
	display: grid;
	grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
	gap: 64px;
	align-items: start;
}

.steps {
	list-style: none;
	margin: 30px 0 0;
	padding: 0;
	counter-reset: step;
	display: grid;
	gap: 22px;
}

.steps li {
	counter-increment: step;
	display: grid;
	grid-template-columns: 34px minmax(0, 1fr);
	gap: 14px;
	font-size: 14px;
}

.steps li::before {
	content: counter(step);
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border: 1px solid var(--line-strong);
	background: var(--card);
	color: var(--text);
	font-weight: 700;
}

.steps b {
	display: block;
	color: var(--text);
}

.term {
	background: var(--code-bg);
	border: 1px solid var(--line);
}

.term-tabs {
	display: flex;
	align-items: stretch;
	border-bottom: 1px solid var(--line);
	background: var(--card);
}

.term-tablist {
	display: flex;
}

.term-tabs button {
	padding: 12px 18px;
	border: 0;
	border-right: 1px solid var(--line);
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
	background: none;
	color: var(--muted);
	font: 13px var(--mono);
	cursor: pointer;
}

.term-tabs button[aria-selected="true"] {
	color: var(--text);
	background: var(--code-bg);
	border-bottom-color: #33ccff;
}

.term-tabs .copy {
	margin: 7px 8px 7px auto;
}

.term pre {
	margin: 0;
	padding: 20px 22px;
	overflow-x: auto;
	font: 13.5px/1.85 var(--mono);
	color: var(--text);
}

.term .c {
	color: var(--muted);
}

.term .p {
	color: var(--ok);
	user-select: none;
}

.term-foot {
	padding: 12px 22px;
	border-top: 1px solid var(--line);
	font-size: 12.5px;
	color: var(--muted);
}

/* ── Footer ──────────────────────────────────────────────── */

.footer {
	padding: 48px 0 56px;
	font-size: 13px;
	color: var(--muted);
}

.footer .wrap {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 28px;
}

.footer .logo {
	margin-bottom: 10px;
}

.footer-links {
	display: flex;
	flex-wrap: wrap;
	gap: 22px;
}

.footer-links a {
	color: var(--body);
}

.footer small {
	display: block;
	margin-top: 4px;
	font-size: 12px;
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 1000px) {
	.hero .wrap,
	.split,
	.start {
		grid-template-columns: minmax(0, 1fr);
		gap: 56px;
	}

	.split.flip .split-copy {
		order: 0;
	}

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

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

	.hero .wrap {
		padding-top: 64px;
		padding-bottom: 72px;
	}
}

@media (max-width: 720px) {
	body {
		font-size: 14px;
	}

	.wrap {
		padding: 0 18px;
	}

	.nav-links {
		display: none;
	}

	.nav .btn {
		margin-left: auto;
	}

	.lead {
		font-size: 15.5px;
	}

	.cta .btn {
		flex: 1 1 auto;
	}

	.section {
		padding: 72px 0;
	}

	.section-head {
		margin-bottom: 36px;
	}

	.stats .wrap {
		grid-template-columns: repeat(2, 1fr);
		padding: 0;
	}

	.stat {
		padding: 22px 18px;
		border-left: 0;
		border-bottom: 1px solid var(--line);
	}

	.stat:nth-child(odd) {
		border-right: 1px solid var(--line);
	}

	.stat:last-child {
		border-right: 0;
	}

	.stat:nth-last-child(-n + 2) {
		border-bottom: 0;
	}

	.stat b {
		font-size: 24px;
	}

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

	.step {
		border-right: 0;
		border-bottom: 1px solid var(--line);
	}

	.step:last-child {
		border-bottom: 0;
	}

	.screen {
		height: 600px;
	}

	.timeline li {
		padding: 9px 14px;
		gap: 10px;
	}

	.timeline .state {
		display: none;
	}

	.approval-actions small {
		display: none;
	}

	.term pre {
		padding: 16px;
		font-size: 12.5px;
	}
}

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

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