/* The ·modern palette, neutral here: each app brings its own hue (--h) as its identity. */
:root {
	--bg: oklch(99% 0.003 260);
	--surface: oklch(97.2% 0.004 260);
	--card: oklch(100% 0 0);
	--fg: oklch(17% 0.01 260);
	--muted: oklch(50% 0.012 260);
	--border: oklch(90.5% 0.006 260);
	--line: oklch(78% 0.01 260);
	--code-bg: oklch(95.5% 0.006 260);
	--shot-bg: oklch(94% 0.006 260);
	--ok: oklch(56% 0.14 150);
	--warn: oklch(60% 0.17 45);
	--bad: oklch(55% 0.2 25);
	/* An app's colour is oklch(var(--hl) var(--hc) var(--h)). */
	--hl: 60%;
	--hc: 0.15;
	--soft: 0.1;
	--sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
	--mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
	color-scheme: light;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme='light']) {
		--bg: oklch(13% 0.008 260); --surface: oklch(15.5% 0.009 260); --card: oklch(17% 0.01 260);
		--fg: oklch(96% 0.004 260); --muted: oklch(68% 0.012 260); --border: oklch(25% 0.01 260); --line: oklch(42% 0.012 260);
		--code-bg: oklch(20% 0.01 260); --shot-bg: oklch(19% 0.01 260);
		--ok: oklch(74% 0.15 150); --warn: oklch(76% 0.15 50); --bad: oklch(72% 0.17 25);
		--hl: 76%; --hc: 0.14; --soft: 0.16; color-scheme: dark;
	}
}
:root[data-theme='dark'] {
	--bg: oklch(13% 0.008 260); --surface: oklch(15.5% 0.009 260); --card: oklch(17% 0.01 260);
	--fg: oklch(96% 0.004 260); --muted: oklch(68% 0.012 260); --border: oklch(25% 0.01 260); --line: oklch(42% 0.012 260);
	--code-bg: oklch(20% 0.01 260); --shot-bg: oklch(19% 0.01 260);
	--ok: oklch(74% 0.15 150); --warn: oklch(76% 0.15 50); --bad: oklch(72% 0.17 25);
	--hl: 76%; --hc: 0.14; --soft: 0.16; color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15.5px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-color: color-mix(in oklch, currentColor 35%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 4px; }
code { font-family: var(--mono); font-size: 0.86em; background: var(--code-bg); padding: 0.08em 0.35em; border-radius: 5px; }
h1, h2, h3 { text-wrap: balance; letter-spacing: -0.025em; line-height: 1.15; margin: 0; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); font-weight: 600; }
h3 { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
ul { margin: 0; }

.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.band { padding-block: clamp(56px, 8vw, 104px); border-top: 1px solid var(--border); }
.band.alt { background: var(--surface); }
.eyebrow { font: 500 0.72rem/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.lede { display: grid; gap: 12px; max-width: 46rem; margin-bottom: 40px; }
.lede p { color: var(--muted); font-size: 1.06rem; }
.hue { --c: oklch(var(--hl) var(--hc) var(--h)); }
.muted { color: var(--muted); }

/* top bar */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: color-mix(in oklch, var(--bg) 86%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
.top .wrap { display: flex; align-items: center; gap: 20px; height: 58px; }
.brand { font-weight: 600; letter-spacing: -0.01em; text-decoration: none; display: flex; align-items: center; gap: 10px; }
.brand .dots { display: flex; gap: 3px; }
.brand .dots i { width: 7px; height: 7px; border-radius: 50%; background: oklch(var(--hl) var(--hc) var(--h)); }
.top nav { margin-left: auto; display: flex; gap: 20px; font-size: 0.88rem; color: var(--muted); }
.top nav a { text-decoration: none; white-space: nowrap; }
.top nav a:hover { color: var(--fg); }
@media (max-width: 760px) { .top .wrap { flex-wrap: wrap; row-gap: 6px; height: auto; padding-top: 12px; } .top nav { margin-left: 0; width: 100%; overflow-x: auto; gap: 14px; font-size: 0.84rem; padding-bottom: 8px; scrollbar-width: none; } }

/* hero */
.hero { padding-block: clamp(56px, 9vw, 112px) clamp(48px, 7vw, 88px); }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 650; letter-spacing: -0.045em; line-height: 1.02; max-width: 15ch; }
.hero .sub { color: var(--muted); font-size: clamp(1.05rem, 1.6vw, 1.2rem); margin-top: 22px; max-width: 40rem; }
.roster { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 40px; }
.roster a { display: flex; align-items: center; gap: 9px; padding: 7px 13px 7px 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: border-color 0.2s; }
.roster a:hover { border-color: oklch(var(--hl) var(--hc) var(--h) / 0.6); }
.roster img, .roster .ph { width: 26px; height: 26px; border-radius: 7px; }
.ph { display: grid; place-items: center; font: 600 0.8rem/1 var(--sans); color: var(--c); background: oklch(var(--hl) var(--hc) var(--h) / var(--soft)); border: 1px solid oklch(var(--hl) var(--hc) var(--h) / 0.35); }

/* where it started */
.start { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 14px; }
.start article { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 18px; display: grid; gap: 8px; align-content: start; }
.start article p { color: var(--muted); font-size: 0.93rem; }
.start .kind { font: 500 0.7rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* journey */
.journey { display: grid; gap: 0; position: relative; }
.chapter { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 0 24px; position: relative; padding-bottom: clamp(48px, 6vw, 80px); }
.chapter:last-child { padding-bottom: 0; }
.rail { position: relative; display: flex; flex-direction: column; align-items: center; }
.rail::after { content: ""; position: absolute; top: 62px; bottom: calc(-1 * clamp(48px, 6vw, 80px)); width: 2px; background: linear-gradient(var(--c), var(--border) 70%); left: calc(50% - 1px); opacity: 0.55; }
.chapter:last-child .rail::after { display: none; }
.rail img, .rail .ph { width: 56px; height: 56px; border-radius: 15px; position: relative; z-index: 1; }
.rail .ph { font-size: 1.2rem; }
.rail .n { font: 500 0.7rem/1 var(--mono); color: var(--muted); margin-top: 10px; position: relative; z-index: 1; background: var(--bg); padding: 2px 4px; }
.band.alt .rail .n { background: var(--surface); }
.body { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.25fr); gap: clamp(20px, 3vw, 40px); align-items: start; }
@media (max-width: 900px) { .body { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .chapter { grid-template-columns: 1fr; } .rail { flex-direction: row; gap: 12px; margin-bottom: 14px; } .rail::after { display: none; } .rail .n { margin-top: 0; } }
.text { display: grid; gap: 14px; }
.when { font: 500 0.75rem/1 var(--mono); color: var(--c); letter-spacing: 0.04em; }
.text h3 { font-size: clamp(1.45rem, 2.6vw, 1.85rem); letter-spacing: -0.03em; font-weight: 650; }
.text .tagline { font-size: 1.05rem; color: var(--muted); margin-top: -6px; }
.pf { display: grid; gap: 10px; }
.pf div { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 12px; font-size: 0.94rem; }
.pf dt, .pf .k { font: 500 0.7rem/1.9 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.pf .k.fix { color: var(--c); }
.feats { padding-left: 1.1em; display: grid; gap: 5px; font-size: 0.9rem; color: var(--muted); }
.feats b { color: var(--fg); font-weight: 500; }
.links { display: flex; flex-wrap: wrap; gap: 8px; font: 0.8rem/1 var(--mono); }
.links a, .links span { padding: 6px 9px; border: 1px solid var(--border); border-radius: 8px; text-decoration: none; color: var(--muted); background: var(--card); }
.links a:hover { color: var(--fg); border-color: var(--line); }

/* galleries */
.gallery { display: grid; gap: 10px; }
.shot { padding: 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--shot-bg); cursor: zoom-in; display: block; width: 100%; position: relative; }
.shot img { width: 100%; height: auto; transition: transform 0.4s; }
.shot:hover img { transform: scale(1.015); }
.shot figcaption, .shot .cap { position: absolute; left: 8px; bottom: 8px; font: 500 0.7rem/1 var(--mono); padding: 5px 7px; border-radius: 6px; background: color-mix(in oklch, var(--bg) 82%, transparent); color: var(--fg); backdrop-filter: blur(6px); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 10px; }
.thumbs .shot { aspect-ratio: 16 / 10; }
.thumbs .shot img { height: 100%; object-fit: cover; object-position: top left; }
.thumbs .shot.tall img { object-position: top center; }
.poster { border: 1px solid var(--border); border-radius: 14px; aspect-ratio: 16 / 10; max-width: 100%; display: grid; place-items: center; text-align: center; padding: 24px; position: relative; overflow: hidden;
	background: radial-gradient(120% 90% at 50% 0%, oklch(var(--hl) var(--hc) var(--h) / calc(var(--soft) * 1.6)), transparent 70%), var(--card); }
.poster img, .poster .ph { width: 88px; height: 88px; border-radius: 22px; margin: 0 auto 14px; }
.poster .ph { font-size: 1.8rem; }
.poster p { color: var(--muted); font-size: 0.86rem; max-width: 28rem; }
.poster .big { font-size: 1.05rem; font-weight: 600; color: var(--fg); margin-bottom: 6px; }

/* diagram */
.diagram { border: 1px solid var(--border); border-radius: 16px; background: var(--card); padding: clamp(10px, 2vw, 22px); overflow-x: auto; }
.diagram svg { display: block; width: 100%; min-width: 760px; height: auto; }
.diagram text { font-family: var(--sans); fill: var(--fg); }
.diagram .lbl { font-family: var(--mono); font-size: 11px; fill: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.diagram .small { font-size: 12px; fill: var(--muted); }
.diagram .tt { font-size: 15px; font-weight: 600; }
.diagram .app-t { font-size: 13px; font-weight: 500; }
.diagram .box { fill: var(--card); stroke: var(--line); stroke-width: 1.2; }
.diagram .zone { fill: var(--surface); stroke: var(--line); stroke-width: 1.2; stroke-dasharray: 6 5; }
.diagram .tile { fill: var(--bg); stroke: var(--border); stroke-width: 1; }
.diagram .infra { fill: var(--code-bg); stroke: none; }
.diagram .infra-t { font-family: var(--mono); font-size: 11.5px; fill: var(--fg); }
.diagram .wire { fill: none; stroke: var(--fg); stroke-width: 1.6; opacity: 0.7; }
.diagram .wire.dash { stroke-dasharray: 5 4; }
.diagram .num circle { fill: var(--fg); }
.diagram .num text { fill: var(--bg); font: 600 11px var(--mono); }
.diagram .lane { fill: var(--surface); stroke: var(--border); stroke-width: 1; }
.diagram .wl { font-family: var(--mono); font-size: 10.5px; fill: var(--muted); }
.diagram .accent { fill: oklch(var(--hl) var(--hc) var(--h) / var(--soft)); stroke: oklch(var(--hl) var(--hc) var(--h) / 0.6); stroke-width: 1.2; }
.wires { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 10px 28px; margin-top: 22px; padding: 0; list-style: none; counter-reset: w; }
.wires li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; font-size: 0.9rem; }
.wires li::before { counter-increment: w; content: counter(w); width: 20px; height: 20px; border-radius: 50%; background: var(--fg); color: var(--bg); font: 600 0.68rem/20px var(--mono); text-align: center; margin-top: 2px; }
.wires b { font-weight: 600; }
.wires span { color: var(--muted); }

/* foundations */
.stack { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--card); }
.stack > div { padding: 18px 20px; display: grid; gap: 6px; align-content: start; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); margin: 0 -1px -1px 0; }
.stack p { font-size: 0.9rem; color: var(--muted); }

/* security */
.sec { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 14px; }
.sec article { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 20px; display: grid; gap: 10px; align-content: start; }
.sec ul { padding-left: 1.1em; display: grid; gap: 8px; font-size: 0.9rem; }
.sec li::marker { color: var(--muted); }
.sec li b { font-weight: 600; }

/* gaps */
.gaps { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
@media (max-width: 860px) { .gaps { grid-template-columns: 1fr; } }
.item { padding-block: 14px; border-top: 1px solid var(--border); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; }
.item .sev { grid-row: span 2; margin-top: 5px; }
.item h3 { font-size: 0.98rem; }
.item p { grid-column: 2; color: var(--muted); font-size: 0.9rem; }
.item p b { color: var(--fg); font-weight: 500; }
.sev { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.sev.hi { background: var(--bad); } .sev.md { background: var(--warn); } .sev.lo { background: var(--muted); }
.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 0.82rem; color: var(--muted); margin-bottom: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }

footer { padding-block: 40px 56px; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.86rem; }
footer .wrap { display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }

/* lightbox */
dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: min(96vw, 1600px); max-height: 94vh; }
dialog.lightbox::backdrop { background: oklch(10% 0.01 260 / 0.82); backdrop-filter: blur(4px); }
dialog.lightbox img { max-height: 88vh; width: auto; margin: 0 auto; border-radius: 10px; box-shadow: 0 20px 60px oklch(0% 0 0 / 0.5); }
dialog.lightbox p { color: oklch(92% 0 0); text-align: center; font-size: 0.88rem; margin-top: 10px; }
dialog.lightbox button { position: fixed; top: max(14px, env(safe-area-inset-top, 0px)); right: max(14px, env(safe-area-inset-right, 0px)); width: 40px; height: 40px; border-radius: 50%; border: 0; background: oklch(100% 0 0 / 0.14); color: white; font-size: 1.3rem; cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.shot img, .roster a { transition: none; }
	.shot:hover img { transform: none; }
}

/* ---------- links in chapters ---------- */
.text h3 a { text-decoration: none; }
.text h3 a:hover { color: var(--c); }
.links a.more { color: var(--c); border-color: oklch(var(--hl) var(--hc) var(--h) / 0.45); background: oklch(var(--hl) var(--hc) var(--h) / var(--soft)); font-weight: 500; }
.links a.more:hover { color: var(--fg); }

/* ---------- app pages ---------- */
.hero.compact { padding-block: clamp(48px, 7vw, 84px) clamp(32px, 5vw, 56px); }
.hero.compact h1 { max-width: 20ch; }
.app-hero { padding-block: clamp(32px, 5vw, 56px) 28px; background: radial-gradient(80% 120% at 0% 0%, oklch(var(--hl) var(--hc) var(--h) / calc(var(--soft) * 0.9)), transparent 60%); }
.app-hero .wrap { display: grid; gap: 22px; }
.back { font: 500 0.8rem/1 var(--mono); color: var(--muted); text-decoration: none; }
.back:hover { color: var(--fg); }
.app-id { display: flex; align-items: center; gap: 20px; }
.app-id .big { width: 76px; height: 76px; border-radius: 20px; flex: none; }
.app-id .ph.big { font-size: 1.6rem; }
.app-id h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 650; letter-spacing: -0.04em; margin-top: 6px; }
.app-id .tagline { color: var(--muted); font-size: 1.1rem; margin-top: 4px; }
.app-id .eyebrow { color: var(--c); }
.pf.wide { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; max-width: 64rem; }
.pf.wide > div { grid-template-columns: 1fr; gap: 4px; }
@media (max-width: 700px) { .pf.wide { grid-template-columns: 1fr; } }
.hero-shot { padding-bottom: clamp(48px, 7vw, 80px); }
.hero-shot .shot { border-radius: 14px; box-shadow: 0 24px 60px -24px oklch(var(--hl) var(--hc) var(--h) / 0.35); }
.feat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.feat-grid article { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 18px; display: grid; gap: 6px; align-content: start; }
.feat-grid p { color: var(--muted); font-size: 0.92rem; }
.screens { display: grid; gap: 24px; }
.screens.with-phone { grid-template-columns: minmax(0, 1fr) minmax(0, 260px); align-items: start; }
@media (max-width: 900px) { .screens.with-phone { grid-template-columns: 1fr; } }
.screens .desk { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr)); gap: 24px; }
.screens figure { margin: 0; display: grid; gap: 8px; align-content: start; }
.screens figcaption { font-size: 0.85rem; color: var(--muted); }
.screens .phones { display: grid; gap: 24px; justify-items: center; }
.screens .phones figure { max-width: 260px; }
.screens .shot .cap { display: none; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 5vw, 64px); }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; } }
.two h2 { margin: 10px 0 18px; font-size: clamp(1.35rem, 2.6vw, 1.7rem); }
.conn { list-style: none; padding: 0; display: grid; gap: 0; }
.conn li { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: 12px; padding-block: 11px; border-top: 1px solid var(--border); font-size: 0.92rem; }
.conn li span { color: var(--muted); }
@media (max-width: 520px) { .conn li { grid-template-columns: 1fr; gap: 2px; } }
.small-note { font-size: 0.86rem; margin-top: 14px; }
.ticks { list-style: none; padding: 0; display: grid; gap: 10px; font-size: 0.92rem; }
.ticks li { padding-left: 22px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 10px; height: 10px; border-radius: 3px; background: var(--c, var(--ok)); opacity: 0.85; }
.gaps-list li::before { background: var(--warn); }
.facts { display: grid; gap: 0; margin: 0; font-size: 0.92rem; }
.facts > div { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 12px; padding-block: 10px; border-top: 1px solid var(--border); }
.facts dt { font: 500 0.72rem/1.9 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.run-notes { color: var(--muted); font-size: 0.92rem; margin-top: 14px; }
.pager { display: flex; justify-content: space-between; gap: 16px; padding-block: 40px 56px; flex-wrap: wrap; }
.pager a { display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; gap: 2px 12px; align-items: center; text-decoration: none; padding: 14px 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); min-width: min(100%, 240px); }
.pager a:hover { border-color: oklch(var(--hl) var(--hc) var(--h) / 0.6); }
.pager a span { grid-column: 1 / -1; font: 500 0.72rem/1 var(--mono); color: var(--muted); }
.pager a img, .pager a .ph { width: 32px; height: 32px; border-radius: 9px; }
.pager a.next { margin-left: auto; }

/* ---------- architecture page ---------- */
.zones { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.zones article { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 20px; display: grid; gap: 10px; align-content: start; border-top: 3px solid oklch(var(--hl) var(--hc) var(--h)); }
.zones article > p:not(.eyebrow) { color: var(--muted); font-size: 0.92rem; }
.zones .facts > div { grid-template-columns: 6.5rem minmax(0, 1fr); }
.flows { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 14px; }
.flows article { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 18px; display: grid; gap: 8px; align-content: start; }
.flows p { color: var(--muted); font-size: 0.92rem; }
.brand-ico { display: inline-block; width: 1.15em; height: 1.15em; object-fit: contain; vertical-align: -0.2em; margin-right: 0.4em; }
.hero-shot .shot .cap { display: none; }
.stack-logos { display: flex; gap: 6px; } .stack-logos .brand-ico { width: 20px; height: 20px; margin: 0; }

/* ---------- automation page ---------- */
.pipeline { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 26px; position: relative; }
.pipeline .stage { position: relative; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 16px; display: grid; gap: 8px; align-content: start; }
.pipeline .stage:not(:last-child)::after { content: "→"; position: absolute; right: -21px; top: 22px; color: var(--muted); font: 500 1rem/1 var(--mono); }
.pipeline .stage.me { border-style: dashed; border-color: var(--line); }
.pipeline .logos { display: flex; gap: 5px; }
.pipeline .logos .brand-ico { width: 20px; height: 20px; margin: 0; border-radius: 5px; }
.pipeline h3 { font-size: 0.98rem; }
.pipeline p:not(.eyebrow) { color: var(--muted); font-size: 0.86rem; }
.pipeline code { justify-self: start; font-size: 0.72rem; }
.me-chip { display: inline-block; font: 600 0.66rem/1 var(--mono); padding: 3px 6px; border-radius: 5px; background: var(--fg); color: var(--bg); letter-spacing: 0.04em; text-transform: lowercase; vertical-align: 1px; }
@media (max-width: 1100px) { .pipeline { grid-template-columns: repeat(3, minmax(0, 1fr)); } .pipeline .stage:nth-child(3)::after { content: "↓"; right: 50%; top: auto; bottom: -22px; } }
@media (max-width: 640px) { .pipeline { grid-template-columns: 1fr; gap: 26px; } .pipeline .stage:not(:last-child)::after { content: "↓"; right: 50%; top: auto; bottom: -22px; } }
.lede .eyebrow .brand-ico { width: 1.3em; height: 1.3em; }
.sched { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 14px; }
.sched article { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 16px; align-items: start; }
.sched img { width: 36px; height: 36px; border-radius: 10px; }
.sched p { color: var(--muted); font-size: 0.88rem; margin-top: 4px; }

/* ---------- analysis page ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 12px; margin-top: 32px; max-width: 52rem; }
.kpis div { border: 1px solid var(--border); border-radius: 12px; background: var(--card); padding: 14px 16px; display: grid; gap: 2px; }
.kpis b { font-size: 1.7rem; font-weight: 650; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.kpis b.bad { color: var(--bad); }
.kpis span { font-size: 0.84rem; color: var(--muted); }
.layers { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 14px; }
.layers article { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 20px; display: grid; gap: 12px; align-content: start; }
.layers .ticks li::before { background: var(--ok); }
.layers .ticks b { font-weight: 600; }
.heat-wrap { display: grid; gap: 14px; justify-items: start; margin-bottom: 28px; overflow-x: auto; max-width: 100%; }
.heat { display: grid; grid-template-columns: 22px 70px repeat(3, minmax(96px, 150px)); gap: 6px; align-items: stretch; }
.heat .axis-y { grid-row: 1 / span 3; writing-mode: vertical-rl; transform: rotate(180deg); text-align: center; font: 500 0.7rem/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.heat .row-label, .heat .col-label { font: 500 0.74rem/1 var(--mono); color: var(--muted); display: flex; align-items: center; }
.heat .col-label { justify-content: center; padding-top: 4px; }
.heat .axis-x { grid-column: 3 / span 3; text-align: center; font: 500 0.7rem/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.heat .cell { min-height: 76px; border-radius: 10px; padding: 8px; display: flex; flex-wrap: wrap; gap: 5px; align-content: flex-start; border: 1px solid transparent; }
.heat .cell.hi { background: color-mix(in oklch, var(--bad) 16%, transparent); border-color: color-mix(in oklch, var(--bad) 35%, transparent); }
.heat .cell.md { background: color-mix(in oklch, var(--warn) 13%, transparent); border-color: color-mix(in oklch, var(--warn) 30%, transparent); }
.heat .cell.lo { background: var(--surface); border-color: var(--border); }
.heat .cell a { font: 600 0.74rem/1 var(--mono); padding: 5px 7px; border-radius: 6px; background: var(--card); border: 1px solid var(--border); text-decoration: none; }
.heat .cell a:hover { border-color: var(--fg); }
.heat-key { display: flex; gap: 16px; flex-wrap: wrap; font-size: 0.82rem; color: var(--muted); }
.heat-key span { display: inline-flex; gap: 7px; align-items: center; }
.risk-table table { min-width: 860px; }
.risk-table td:first-child { width: 34%; }
.risk-table td b { display: block; font-weight: 600; }
.risk-table td span:not(.rate) { display: block; color: var(--muted); font-size: 0.84rem; margin-top: 3px; }
.risk-table tr:target { background: color-mix(in oklch, var(--warn) 10%, transparent); }
.rate { display: inline-block; font: 600 0.72rem/1 var(--mono); padding: 4px 7px; border-radius: 6px; white-space: nowrap; }
.rate.hi { color: var(--bad); background: color-mix(in oklch, var(--bad) 14%, transparent); }
.rate.md { color: var(--warn); background: color-mix(in oklch, var(--warn) 14%, transparent); }
.rate.lo { color: var(--muted); background: var(--surface); }
.plan { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 14px; counter-reset: p; }
.plan li { counter-increment: p; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 18px 18px 16px 58px; position: relative; display: grid; gap: 6px; align-content: start; }
.plan li::before { content: counter(p); position: absolute; left: 18px; top: 16px; width: 26px; height: 26px; border-radius: 50%; background: var(--fg); color: var(--bg); font: 600 0.8rem/26px var(--mono); text-align: center; }
.plan p { color: var(--muted); font-size: 0.9rem; }
.plan span { font: 500 0.72rem/1 var(--mono); color: var(--muted); }

/* ---------- tables ---------- */
.table { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; background: var(--card); max-width: 100%; }
.table table { border-collapse: collapse; width: 100%; min-width: 680px; font-size: 0.88rem; }
.table th, .table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table th { font: 500 0.7rem/1.2 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); background: var(--surface); }
.table td.who { font-weight: 600; white-space: nowrap; }
.table td:not(.who) { color: var(--muted); }
.table td:first-child { color: var(--fg); }
.gates { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.gates article { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 18px; display: grid; gap: 8px; align-content: start; }
.g-head { display: flex; align-items: center; gap: 10px; }
.g-head .brand-ico { width: 28px; height: 28px; margin: 0; border-radius: 6px; }
.g-head h3 { font-size: 1.05rem; }
.when-chip { margin-left: auto; font: 500 0.68rem/1 var(--mono); color: var(--muted); border: 1px solid var(--border); border-radius: 6px; padding: 4px 6px; white-space: nowrap; }
.gates .what { font: 500 0.7rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.gates p:not(.what):not(.where) { font-size: 0.9rem; color: var(--muted); }
.where { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.where span { font: 500 0.72rem/1 var(--mono); padding: 5px 7px; border-radius: 6px; }
.where .on { color: var(--ok); background: color-mix(in oklch, var(--ok) 14%, transparent); }
.where .next { color: var(--warn); background: color-mix(in oklch, var(--warn) 14%, transparent); }
.pipeline .logos { flex-wrap: wrap; }
.pipeline code { white-space: normal; overflow-wrap: anywhere; }

/* ---------- summaries (home, case study) ---------- */
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--border); background: var(--card); color: var(--fg); font-weight: 500; text-decoration: none; }
.btn:hover { border-color: var(--line); }
.btn.primary { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.more-link { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.kpis.wide { max-width: none; margin: 0 0 18px; }
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.app-card { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 14px; align-items: start; padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); color: var(--fg); text-decoration: none; transition: border-color .15s, transform .15s; }
.app-card:hover { border-color: oklch(var(--hl) var(--hc) var(--h) / 0.6); transform: translateY(-1px); }
.app-card > img, .app-card > .ph { width: 44px; height: 44px; grid-row: span 2; }
.app-card b { display: block; font-weight: 600; }
.app-card .tagline { display: block; color: var(--muted); font-size: 0.9rem; margin-top: 2px; }
.app-card .when { grid-column: 2; font: 500 0.68rem/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.sum-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.sum-cards article { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 18px; display: grid; gap: 6px; align-content: start; }
.sum-cards p { color: var(--muted); font-size: 0.92rem; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.split article { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 20px; display: grid; gap: 8px; align-content: start; }
.split article.me { border-style: dashed; border-color: var(--line); }
.split .kind { font: 500 0.7rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.split ul { padding-left: 1.1em; display: grid; gap: 6px; font-size: 0.92rem; color: var(--muted); }
.sub-h { margin: 36px 0 12px; font-size: 1rem; }
.wrong-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 0 36px; }
.lessons { display: grid; gap: 14px; padding-left: 1.4em; max-width: 46rem; }
.lessons li::marker { font: 600 0.9rem var(--mono); color: var(--muted); }
.lessons b { font-weight: 600; }
.lessons span { color: var(--muted); }

/* charts */
.chart { margin: 0; border: 1px solid var(--border); border-radius: 16px; background: var(--card); padding: clamp(14px, 2vw, 22px); --s1: oklch(var(--hl) var(--hc) 255); --s2: var(--line); }
.chart svg { display: block; width: 100%; height: auto; }
.chart text { font-family: var(--sans); }
.chart .rl { font-size: 13px; fill: var(--fg); }
.chart .rv { font: 500 12px var(--mono); fill: var(--muted); }
.chart .s1 { fill: var(--s1); } .chart .s2 { fill: var(--s2); }
.chart .hit { fill: transparent; }
.chart .row:hover .hit { fill: var(--surface); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.84rem; color: var(--muted); margin-bottom: 10px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; }
.chart-legend i { width: 12px; height: 12px; border-radius: 3px; background: var(--s1); } .chart-legend i.s2 { background: var(--s2); }
.table-view { margin-top: 12px; font-size: 0.88rem; }
.table-view summary { cursor: pointer; color: var(--muted); }
.table-view table { border-collapse: collapse; width: 100%; margin-top: 10px; font-variant-numeric: tabular-nums; }
.table-view th, .table-view td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.table-view th { font-weight: 500; color: var(--muted); }
.diagram.timeline svg { min-width: 640px; }
.diagram .axis { stroke: var(--line); stroke-width: 2; }
.diagram .tick { stroke: var(--line); stroke-width: 1; }
.diagram .dot { fill: var(--fg); }
.diagram .tl { font-size: 11.5px; fill: var(--muted); }
.diagram.lab svg { min-width: 640px; }
.hero .kpis { max-width: 64rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }

/* case study: the problem list */
.problems { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.problems li { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 8px 24px; align-items: center; padding: 14px 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); }
.problems li > a { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; align-items: center; color: var(--fg); text-decoration: none; }
.problems li > a > img, .problems li > a > .ph { width: 36px; height: 36px; }
.problems li > a:hover b { color: oklch(var(--hl) var(--hc) var(--h)); }
.problems b { display: block; font-weight: 600; }
.problems .tagline { display: block; color: var(--muted); font-size: 0.86rem; margin-top: 2px; }
.problems p { margin: 0; }
.problems .k { display: inline-block; margin-right: 10px; font: 500 0.68rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 720px) { .problems li { grid-template-columns: minmax(0, 1fr); } }
.rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 12px; counter-reset: rule; }
.rules article { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 20px; counter-increment: rule; }
.rules article::before { content: counter(rule, decimal-leading-zero); font: 500 0.72rem/1 var(--mono); color: var(--muted); letter-spacing: 0.08em; }
.rules h3 { margin: 10px 0 6px; }
.rules p { margin: 0; color: var(--muted); }
