/* ─────────────────────────────────────────────────────────────────────────
   Kynexium — paper & ink with a signal flare.

   Palette is intentionally tight:
     paper        warm cream surfaces
     ink          deep near-black text
     signal       one vivid coral that earns every appearance

   Type is mono-leaning — eyebrow tags, prompts, numbers, buttons all
   monospace; only body copy and big headlines use sans. Effect is a
   developer's notebook, not a marketing site.
   ───────────────────────────────────────────────────────────────────── */

:root {
	/* Surfaces — cool off-white "tech paper", a hint of blue undertone
	   so it reads as futuristic, not vintage cream. */
	--paper:       #f7f8fc;
	--paper-deep:  #eef0f7;
	--paper-soft:  #fcfcfe;

	/* Text — cool deep ink */
	--ink:         #0d0e16;
	--ink-soft:    #4a4d5e;
	--ink-faint:   #7e8094;
	--ink-mute:    #b1b3c4;

	/* Brand colors — pulled directly from the Kynexium logo. The page
	   uses them sparingly; the gradient (--g-brand) is the signature. */
	--cyan:        #06b6d4;
	--cyan-bright: #22d3ee;
	--purple:      #a855f7;
	--magenta:     #d946ef;
	--pink:        #ec4899;
	--lavender:    #c4b5fd;

	/* Signal — primary accent (magenta). Existing CSS that references
	   --signal/--signal-deep continues to work; values are now logo-derived. */
	--signal:       #d946ef;
	--signal-deep:  #a21caf;
	--signal-faint: rgba(217, 70, 239, 0.10);
	--signal-line:  rgba(217, 70, 239, 0.30);
	--signal-glow:  0 0 28px rgba(217, 70, 239, 0.30);

	/* "mint" alias kept for backward-compat — points at cyan now so live
	   indicators, success states, code-fn highlights all carry the
	   logo's secondary tone. */
	--mint:         #06b6d4;
	--mint-deep:    #0891b2;
	--mint-faint:   rgba(6, 182, 212, 0.12);
	--mint-glow:    0 0 24px rgba(34, 211, 238, 0.40);

	/* Logo gradient — used on signature elements only (hero stamp,
	   key CTAs, marquee dots, scrollbar). NEVER as page background. */
	--g-brand:      linear-gradient(135deg, #21b2cf 0%, #993eee 50%, #f28b42d8 100%);
	--g-brand-soft: linear-gradient(135deg, rgba(6, 182, 212, 0.10), rgba(168, 85, 247, 0.10) 50%, rgba(236, 72, 153, 0.10));

	/* Lines — translucent dark strokes on the light surface */
	--line:         rgba(13, 14, 22, 0.08);
	--line-strong:  rgba(13, 14, 22, 0.18);

	/* Code editor (kept dark as a deliberate inverted island in code blocks) */
	--code-bg:       #0d0e16;
	--code-bg-2:     #161825;
	--code-text:     #f0f1f8;
	--code-dim:      #7e8094;
	--code-line:     rgba(240, 241, 248, 0.10);
	--code-keyword:  #e879f9;   /* magenta-bright */
	--code-fn:       #22d3ee;   /* cyan-bright */
	--code-string:   #f0abfc;   /* pink-soft */
	--code-comment:  #6b6e85;

	/* Type */
	--font-display: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
	--font-mono:    "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
}

/* ─── Base ──────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-display);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	min-height: 100vh;
	overflow-x: hidden;
	position: relative;
}

/* ─── Live ticker (fixed bottom-right "agent feed" widget) ─────────── */
.live-ticker {
	position: fixed;
	bottom: 18px;
	right: 18px;
	z-index: 40;
	background: rgba(252, 252, 254, 0.88);
	backdrop-filter: blur(14px) saturate(140%);
	-webkit-backdrop-filter: blur(14px) saturate(140%);
	border: 1px solid var(--line-strong);
	border-radius: 999px;
	padding: 7px 16px 7px 12px;
	font-family: var(--font-mono);
	font-size: 0.74rem;
	color: var(--ink-soft);
	display: inline-flex;
	align-items: center;
	gap: 10px;
	box-shadow:
		0 8px 24px rgba(13, 14, 22, 0.08),
		0 0 0 1px rgba(217, 70, 239, 0.10),
		0 0 18px rgba(6, 182, 212, 0.08);
}
.live-ticker .pip {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--cyan);
	box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.16), 0 0 10px rgba(34, 211, 238, 0.6);
	animation: signal-pulse 1.6s infinite;
	flex: 0 0 auto;
}
.live-ticker .label { color: var(--ink-faint); }
.live-ticker .feed {
	color: var(--ink);
	transition: opacity 0.25s;
	display: inline-block;
	min-width: 160px;
}
.live-ticker .feed.fade { opacity: 0; }
@media (max-width: 767px) {
	.live-ticker {
		bottom: 12px;
		right: 12px;
		padding: 6px 12px 6px 10px;
		font-size: 0.7rem;
	}
	.live-ticker .feed {
		min-width: 0;
		max-width: 140px;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}
	.live-ticker .label { display: none; }
}

::selection { background: var(--magenta); color: #fff; }

a { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; text-decoration-color: var(--line-strong); transition: text-decoration-color 0.2s; }
a:hover { color: var(--signal); text-decoration-color: var(--signal); }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 4px; z-index: 100; }
.skip-link:focus { left: 12px; top: 12px; }

/* ─── Type ──────────────────────────────────────────────────────────── */
h1, h2, h3, h4 {
	font-family: var(--font-display);
	letter-spacing: -0.02em;
	color: var(--ink);
	margin: 0 0 16px;
	line-height: 1.1;
}
h1 { font-size: clamp(2.6rem, 6vw, 5.2rem); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); font-weight: 700; letter-spacing: -0.025em; }
h3 { font-size: 1.25rem; font-weight: 600; }
p  { color: var(--ink-soft); margin: 0 0 14px; }
p.lead { font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: var(--ink-soft); max-width: 600px; }
strong { color: var(--ink); font-weight: 600; }
em { font-style: italic; color: var(--signal); }

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

/* The "tag" — monospace eyebrow with a leading bullet */
.tag {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: var(--font-mono);
	font-size: 0.78rem;
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ink-soft);
	padding: 5px 10px;
	border-radius: 4px;
	background: var(--paper-soft);
	border: 1px solid var(--line);
	margin-bottom: 22px;
}
.tag::before {
	content: '';
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--signal);
	box-shadow: 0 0 0 2px var(--signal-faint);
	animation: signal-pulse 2s ease-in-out infinite;
}
@keyframes signal-pulse {
	0%, 100% { box-shadow: 0 0 0 2px var(--signal-faint); }
	50%      { box-shadow: 0 0 0 5px var(--signal-faint); }
}

/* ─── Nav ───────────────────────────────────────────────────────────── */
.kn-nav {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(247, 248, 252, 0.78);
	backdrop-filter: blur(16px) saturate(140%);
	-webkit-backdrop-filter: blur(16px) saturate(140%);
	border-bottom: 1px solid var(--line);
}
.kn-nav .container { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; }
.kn-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.kn-brand img { width: 32px; height: 32px; border-radius: 8px; }
.kn-brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; letter-spacing: -0.02em; }
.kn-brand-name::after { content: '_'; color: var(--signal); margin-left: 1px; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }

.kn-nav-links { display: none; align-items: center; gap: 28px; }
@media (min-width: 768px) { .kn-nav-links { display: flex; } }
.kn-nav-links a {
	font-family: var(--font-mono);
	font-size: 0.86rem;
	color: var(--ink-soft);
	text-decoration: none;
	transition: color 0.2s;
	position: relative;
}
.kn-nav-links a:hover { color: var(--ink); }
.kn-nav-links a[aria-current="page"] { color: var(--ink); }
.kn-nav-links a[aria-current="page"]::before { content: '> '; color: var(--signal); }

.kn-nav-mobile-toggle {
	display: inline-flex;
	background: none;
	border: 1px solid var(--line-strong);
	padding: 6px 10px;
	border-radius: 4px;
	cursor: pointer;
	font-family: var(--font-mono);
	font-size: 0.86rem;
	color: var(--ink);
}
@media (min-width: 768px) { .kn-nav-mobile-toggle { display: none; } }
.kn-nav-mobile {
	display: none;
	flex-direction: column;
	gap: 16px;
	padding: 18px 0 8px;
	border-top: 1px solid var(--line);
}
.kn-nav-mobile.open { display: flex; }
.kn-nav-mobile a { font-family: var(--font-mono); font-size: 0.94rem; text-decoration: none; color: var(--ink-soft); }
.kn-nav .btn-signal {
	color: #fff;
}
.mobile-nav-container {
    padding: 0 20px;
    overflow: hidden;
}
/* ─── Buttons ───────────────────────────────────────────────────────── */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 20px;
	border-radius: 8px;
	font-family: var(--font-mono);
	font-size: 0.92rem;
	font-weight: 500;
	cursor: pointer;
	border: 1px solid transparent;
	text-decoration: none;
	transition: transform 0.08s, background 0.15s, color 0.15s, box-shadow 0.2s;
	white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-signal {
	background: var(--g-brand);
	color: #fff;
	border-color: transparent;
	box-shadow: 0 4px 22px rgba(217, 70, 239, 0.36), inset 0 -3px 0 rgba(0,0,0,0.14);
	position: relative;
	overflow: hidden;
}
.btn-signal:hover {
	color: #fff;
	box-shadow: 0 6px 32px rgba(217, 70, 239, 0.50), 0 0 0 1px rgba(168, 85, 247, 0.4), inset 0 -3px 0 rgba(0,0,0,0.18);
	transform: translateY(-1px);
}
.btn-signal::after {
	content: '';
	position: absolute;
	top: 0; left: -120%;
	width: 80%; height: 100%;
	background: linear-gradient(90deg, transparent, rgba(255,255,255,0.32), transparent);
	transition: left 0.6s ease;
	pointer-events: none;
}
.btn-signal:hover::after { left: 130%; }
.btn-ink {
	background: var(--ink);
	color: var(--paper);
	border-color: var(--ink);
}
.btn-ink:hover { background: #1f1c1a; color: var(--paper); }
.btn-ghost {
	background: transparent;
	color: var(--ink);
	border-color: var(--line-strong);
}
.btn-ghost:hover { background: var(--paper-deep); border-color: var(--ink); }

/* ─── Sections ──────────────────────────────────────────────────────── */
section { padding: 80px 0; }
@media (max-width: 767px) { section { padding: 56px 0; } }
.section-paper-deep { background: var(--paper-deep); border-block: 1px solid var(--line); }
/* "Ink" sections are full dark islands inside the light page, with the
   logo gradient as a glowing top + bottom edge for visual rhythm. */
.section-ink {
	background:
		radial-gradient(80% 60% at 50% 0%, rgba(168, 85, 247, 0.18), transparent 70%),
		linear-gradient(180deg, #0f1019 0%, #0a0b12 100%);
	color: #f0f1f8;
	position: relative;
}
.section-ink h1, .section-ink h2, .section-ink h3 { color: #fff; }
.section-ink p, .section-ink p.lead { color: rgba(240, 241, 248, 0.72); }
.section-ink strong { color: #fff; }
.section-ink em { color: var(--cyan-bright); }
.section-ink .bullets li { color: rgba(240, 241, 248, 0.82); }
.section-ink .bullets li strong { color: #fff; }
.section-ink code {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.16);
	color: #fff;
}
.section-ink .tag { background: rgba(255, 255, 255, 0.06); color: rgba(240, 241, 248, 0.78); border-color: rgba(255, 255, 255, 0.12); }
.section-ink a { color: #fff; text-decoration-color: rgba(255, 255, 255, 0.4); }
.section-ink a:hover { color: var(--cyan-bright); text-decoration-color: var(--cyan-bright); }
.section-ink::before, .section-ink::after {
	content: '';
	position: absolute;
	left: 0; right: 0;
	height: 2px;
	background: var(--g-brand);
	opacity: 0.7;
}
.section-ink::before { top: 0; }
.section-ink::after  { bottom: 0; }

/* ─── Hero ──────────────────────────────────────────────────────────── */
.hero { padding: 44px 0 64px; position: relative; overflow: hidden; }
@media (min-width: 992px) { .hero { padding: 76px 0; } }
.hero h1 .stamp {
	display: inline-block;
	border: 2px solid var(--signal);
	color: var(--signal);
	padding: 0 14px;
	border-radius: 8px;
	transform: rotate(-1.5deg);
	font-size: 0.92em;
	margin: 0 0.05em;
	box-shadow: 0 0 32px rgba(255, 88, 65, 0.30), inset 0 0 20px rgba(255, 88, 65, 0.06);
	text-shadow: 0 0 18px rgba(255, 88, 65, 0.45);
}
.hero-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 16px 28px;
	margin-top: 28px;
	font-family: var(--font-mono);
	font-size: 0.82rem;
	color: var(--ink-soft);
}
.hero-meta div { display: inline-flex; align-items: baseline; gap: 8px; }
.hero-meta .k { color: var(--ink-mute); }
.hero-meta .v { color: var(--ink); font-weight: 500; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* Hero logo art — large, gently floating, with a faint coral aura */
.hero-art {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px 0;
}
.hero-art img {
	width: clamp(180px, 22vw, 280px);
	height: auto;
	border-radius: 24px;
	box-shadow: 0 32px 64px rgba(12, 10, 9, 0.18), 0 4px 16px rgba(255, 88, 65, 0.18);
	animation: hero-float 7s ease-in-out infinite;
	z-index: 1;
}
.hero-art::before {
	content: '';
	position: absolute;
	width: 360px;
	height: 360px;
	background: radial-gradient(closest-side, rgba(255, 88, 65, 0.18), transparent 70%);
	z-index: 0;
	animation: hero-float 7s ease-in-out infinite reverse;
}
@keyframes hero-float {
	0%, 100% { transform: translateY(0) rotate(-2deg); }
	50%      { transform: translateY(-10px) rotate(2deg); }
}

/* Hero corner labels — same pill treatment as the .kn-node tags
   floating around the chat/editor stage (paper background, border,
   leading pulsing pip dot, slight rotation, gentle float). Sits
   inside the section, anchored to the section's top corners. */
.hero-corner {
	position: absolute;
	z-index: 3;
	font-family: var(--font-mono);
	font-size: 0.72rem;
	letter-spacing: 0.04em;
	color: var(--ink);
	background: var(--paper);
	border: 1px solid var(--line-strong);
	padding: 5px 10px 5px 8px;
	border-radius: 6px;
	box-shadow: 0 2px 8px rgba(12, 10, 9, 0.06);
	display: inline-flex;
	align-items: center;
	gap: 6px;
	white-space: nowrap;
	text-transform: none;
}
@keyframes hero-corner-a {
	0%, 100% { transform: translateY(0) rotate(-2deg); }
	50%      { transform: translateY(-4px) rotate(-1deg); }
}
@keyframes hero-corner-b {
	0%, 100% { transform: translateY(0) rotate(2deg); }
	50%      { transform: translateY(-4px) rotate(1deg); }
}

/* ─── Hero "stage" — chrome-less floating editor + chat composition ─ */
.hero-stage {
	position: relative;
	min-height: 560px;
	padding: 24px 0;
	perspective: 1600px;
}
@media (min-width: 992px) {
	.hero-stage { min-height: 580px; }
}
/* Faint coral aura backplate */
.hero-stage::before {
	content: '';
	position: absolute;
	inset: 0;
	background:
		radial-gradient(closest-side at 60% 50%, rgba(255, 88, 65, 0.20), transparent 65%),
		radial-gradient(closest-side at 30% 80%, rgba(12, 10, 9, 0.06), transparent 60%);
	z-index: 0;
	pointer-events: none;
	animation: hero-float 9s ease-in-out infinite;
}
/* Faint hairline tech grid */
.hero-stage::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 0;
	background:
		linear-gradient(rgba(12, 10, 9, 0.05) 1px, transparent 1px) 0 0 / 32px 32px,
		linear-gradient(90deg, rgba(12, 10, 9, 0.05) 1px, transparent 1px) 0 0 / 32px 32px;
	mask-image: radial-gradient(ellipse 60% 50% at center, black, transparent 75%);
	-webkit-mask-image: radial-gradient(ellipse 60% 50% at center, black, transparent 75%);
	pointer-events: none;
}

/* ───── Floating data nodes around the stage ────────────────────── */
.kn-node {
	position: absolute;
	z-index: 3;
	font-family: var(--font-mono);
	font-size: 0.7rem;
	letter-spacing: 0.04em;
	color: var(--ink);
	background: var(--paper);
	border: 1px solid var(--line-strong);
	padding: 5px 10px;
	border-radius: 6px;
	box-shadow: 0 2px 8px rgba(12, 10, 9, 0.06);
	display: inline-flex;
	align-items: center;
	gap: 6px;
	white-space: nowrap;
}
.kn-node .pip,
.hero-corner .pip {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--signal);
	box-shadow: 0 0 0 2px var(--signal-faint);
	animation: signal-pulse 1.8s ease-in-out infinite;
}
/* Both nodes positioned safely INSIDE the stage so they don't clip. */
.kn-node-tr { top: 8px; right: 8px; transform: rotate(1.5deg); animation: node-float-b 7s ease-in-out infinite; }
.kn-node-tl { top: -12px; left: -24px; transform: rotate(1.5deg); animation: node-float-b 7s ease-in-out infinite; }
.kn-node-ml { bottom: 150px; left: 4px; transform: rotate(1.5deg); animation: node-float-b 7s ease-in-out infinite; }
.kn-node-bl { bottom: -16px; right: 14px; transform: rotate(-1.5deg); animation: node-float-a 6.5s ease-in-out infinite; }
@keyframes node-float-a {
	0%, 100% { transform: translateY(0) rotate(-1.5deg); }
	50%      { transform: translateY(-5px) rotate(0deg); }
}
@keyframes node-float-b {
	0%, 100% { transform: translateY(0) rotate(1.5deg); }
	50%      { transform: translateY(-5px) rotate(0deg); }
}
@media (max-width: 991px) { .kn-node { display: none; } }

/* ───── Editor pane — deep code surface, gradient-edged ──────────── */
.stage-editor {
	position: absolute;
	top: 30px;
	left: 0;
	width: 72%;
	z-index: 1;
	background: linear-gradient(180deg, #0f1019 0%, #0a0b12 100%);
	color: #f0f1f8;
	border-radius: 14px;
	padding: 16px 18px 20px;
	transform: rotateY(-8deg) rotateX(3deg);
	transform-style: preserve-3d;
	transform-origin: center;
	box-shadow:
		0 28px 64px rgba(13, 14, 22, 0.32),
		0 6px 16px rgba(217, 70, 239, 0.20),
		inset 0 0 0 1px rgba(255, 255, 255, 0.06);
	overflow: hidden;
	transition: transform 0.6s cubic-bezier(.21,.73,.18,1);
}
.stage-editor::before {
	content: '';
	position: absolute;
	top: 0; left: 24px; right: 24px;
	height: 1.5px;
	background: var(--g-brand);
	opacity: 0.55;
	z-index: 3;
}
.hero-stage:hover .stage-editor { transform: rotateY(-4deg) rotateX(1deg) translateY(-2px); }

/* Subtle moving scanline on the editor — logo cyan */
.stage-editor::after {
	content: '';
	position: absolute;
	left: 0; right: 0;
	height: 80px;
	background: linear-gradient(180deg, transparent, rgba(34, 211, 238, 0.10), transparent);
	animation: stage-scan 5s linear infinite;
	pointer-events: none;
	z-index: 2;
}
@keyframes stage-scan {
	0%   { transform: translateY(-80px); opacity: 0; }
	8%   { opacity: 1; }
	92%  { opacity: 1; }
	100% { transform: translateY(420px); opacity: 0; }
}

/* Mono "filename meta" strip — replaces the title-bar */
.stage-meta, .stage-chat-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	font-family: var(--font-mono);
	font-size: 0.74rem;
	margin-bottom: 12px;
	letter-spacing: 0.04em;
}
.stage-meta { color: rgba(250, 246, 238, 0.6); }
.stage-chat-meta { color: var(--ink-faint); }
.stage-meta-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--signal);
	box-shadow: 0 0 0 2px rgba(255, 88, 65, 0.20);
	animation: signal-pulse 2s infinite;
	flex: 0 0 auto;
}

/* Code in the editor pane */
.stage-code {
	font-family: var(--font-mono);
	font-size: 0.78rem;
	line-height: 1.7;
	color: var(--paper);
	margin: 0;
	white-space: pre;
	overflow-x: auto;
}
.stage-code .ln  { color: rgba(250, 246, 238, 0.30); display: inline-block; width: 24px; user-select: none; }
.stage-code .kw  { color: var(--code-keyword); }
.stage-code .fn  { color: var(--code-fn); }
.stage-code .str { color: var(--code-string); }
.stage-code .com { color: var(--code-comment); font-style: italic; }
.stage-code .ghost {
	color: rgba(255, 88, 65, 0.85);
	background: rgba(255, 88, 65, 0.06);
	border-left: 2px solid var(--signal);
	padding-left: 6px;
	display: inline-block;
	width: calc(100% - 8px);
	font-style: italic;
	animation: ghost-pulse 2.4s ease-in-out infinite;
}

/* ───── Chat pane — front layer, glass paper, gradient-edged ─────── */
.stage-chat {
	position: absolute;
	bottom: 30px;
	right: 0;
	z-index: 2;
	width: 68%;
	background: rgba(252, 252, 254, 0.86);
	backdrop-filter: blur(18px);
	-webkit-backdrop-filter: blur(18px);
	color: var(--ink);
	border-radius: 14px;
	padding: 16px 18px;
	transform: rotateY(6deg) rotateX(-2deg);
	transform-style: preserve-3d;
	transform-origin: center;
	box-shadow:
		0 36px 72px rgba(13, 14, 22, 0.18),
		0 8px 28px rgba(217, 70, 239, 0.20);
	transition: transform 0.6s cubic-bezier(.21,.73,.18,1);
	overflow: hidden;
}
.stage-chat::before {
	content: '';
	position: absolute;
	top: 0; left: 24px; right: 24px;
	height: 1.5px;
	background: var(--g-brand);
	opacity: 0.55;
	z-index: 3;
}
.hero-stage:hover .stage-chat { transform: rotateY(3deg) rotateX(-1deg) translateY(-3px); }

.stage-chat-msgs {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.stage-chat .bubble {
	font-size: 0.84rem;
	padding: 8px 12px;
	border-radius: 10px;
	max-width: 92%;
	line-height: 1.5;
}
/* Stage-chat bubbles use the global .bubble rules (soft tri-color
   gradient on the assistant). No dark overrides — chat panel is glass
   paper now. */

.stage-chat-input {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 12px;
	background: var(--paper-deep);
	border: 1px solid var(--line);
	border-radius: 10px;
	margin-top: 4px;
	font-size: 0.84rem;
}
.prompt-glyph { color: var(--signal); font-family: var(--font-mono); font-weight: 700; }

/* ───── Mobile collapse ─────────────────────────────────────────── */
@media (max-width: 991px) {
	.hero-stage { min-height: auto; padding: 0; perspective: none; flex-direction: column; gap: 18px; }
	.stage-editor, .stage-chat { transform: none !important; max-width: 100%; }
	.stage-chat { position: relative; top: auto; right: auto; width: 100%; }
}

/* ─── Marquee strip ────────────────────────────────────────────────── */
.marquee-strip {
	border-block: 1px solid var(--line);
	background: var(--paper-deep);
	overflow: hidden;
	padding: 16px 0;
	mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
	-webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}
.marquee-track {
	display: flex;
	gap: 56px;
	width: max-content;
	animation: marquee 32s linear infinite;
	font-family: var(--font-mono);
	font-size: 0.86rem;
	color: var(--ink-soft);
	white-space: nowrap;
}
.marquee-track span { display: inline-flex; align-items: center; gap: 8px; }
.marquee-track .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--signal); flex: 0 0 auto; }
@keyframes marquee {
	from { transform: translateX(0); }
	to   { transform: translateX(-50%); }
}

/* ─── Pillar cards (3-up "What it is") ─────────────────────────────── */
.pillar {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 28px;
	border: 1px solid var(--line);
	border-radius: 12px;
	background: var(--paper);
	height: 100%;
	transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
	position: relative;
}
.pillar:hover {
	transform: translateY(-3px);
	border-color: var(--signal);
	box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--signal-line), 0 0 24px rgba(255, 88, 65, 0.18);
}
.pillar-num {
	font-family: var(--font-mono);
	font-size: 0.78rem;
	color: var(--signal);
	font-weight: 500;
	letter-spacing: 0.08em;
}
.pillar h3 { margin-bottom: 4px; }
.pillar p { margin: 0; font-size: 0.95rem; color: var(--ink-soft); }
.pillar svg { width: 48px; height: 48px; margin-bottom: 8px; }

/* ─── Editor mockup window ─────────────────────────────────────────── */
.frame {
	background: var(--paper);
	border: 1px solid var(--line-strong);
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 24px 56px rgba(12, 10, 9, 0.14), 0 4px 12px rgba(12, 10, 9, 0.08);
}
.frame-bar {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 16px;
	background: var(--paper-deep);
	border-bottom: 1px solid var(--line);
	font-family: var(--font-mono);
	font-size: 0.78rem;
	color: var(--ink-faint);
}
.frame-dots { display: inline-flex; gap: 6px; }
.frame-dots span { width: 11px; height: 11px; border-radius: 50%; }
.frame-dots span:nth-child(1) { background: #ff5f57; }
.frame-dots span:nth-child(2) { background: #ffbd2e; }
.frame-dots span:nth-child(3) { background: #28c840; }
.frame-body { display: grid; grid-template-columns: 1fr 240px; min-height: 320px; }
@media (max-width: 720px) { .frame-body { grid-template-columns: 1fr; } }
.frame-code {
	font-family: var(--font-mono);
	font-size: 0.78rem;
	line-height: 1.7;
	padding: 16px 18px;
	overflow: auto;
	color: var(--ink);
	background: var(--paper);
}
.frame-code .ln { color: var(--ink-mute); width: 22px; display: inline-block; user-select: none; }
.frame-code .kw { color: #b91c1c; }
.frame-code .fn { color: #1d4ed8; }
.frame-code .str { color: #15803d; }
.frame-code .com { color: var(--ink-mute); font-style: italic; }
.frame-code .ghost { color: var(--signal); border-left: 2px solid var(--signal); padding-left: 6px; margin-left: 4px; font-style: italic; animation: ghost-pulse 2.4s ease-in-out infinite; }
@keyframes ghost-pulse { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }
.frame-side {
	background: var(--paper-deep);
	border-left: 1px solid var(--line);
	padding: 14px 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.frame-side h6 { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 4px; font-weight: 500; }
.bubble { font-size: 0.84rem; line-height: 1.5; padding: 8px 12px; border-radius: 10px; max-width: 92%; }
.bubble.user { align-self: flex-end; background: var(--paper-soft); color: var(--ink); border: 1px solid var(--line); }
.bubble.assistant { align-self: flex-start; background: linear-gradient(135deg, rgba(6, 182, 212, 0.10), rgba(217, 70, 239, 0.10)); color: var(--ink); border: 1px solid var(--signal-line); }
.bubble.assistant code { background: rgba(13, 14, 22, 0.06); border-color: var(--signal-line); color: var(--ink); }
.typing { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-faint); display: inline-flex; align-items: center; gap: 6px; }
.typing::after { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--signal); animation: typing 1s infinite; }
@keyframes typing { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }

/* ─── Terminal block (dark) ────────────────────────────────────────── */
.terminal {
	background: var(--code-bg);
	border-radius: 12px;
	overflow: hidden;
	border: 1px solid var(--code-line);
	box-shadow: 0 18px 40px rgba(12, 10, 9, 0.28);
}
.terminal .frame-bar { background: var(--code-bg-2); border-bottom-color: var(--code-line); color: var(--code-dim); }
.terminal-body {
	font-family: var(--font-mono);
	font-size: 0.86rem;
	color: var(--code-text);
	padding: 18px 20px;
	line-height: 1.75;
}
.terminal-body .prompt { color: var(--signal); user-select: none; margin-right: 8px; }
.terminal-body .cmd { color: var(--code-text); }
.terminal-body .out { color: var(--code-dim); }
.terminal-body .ok { color: var(--code-fn); }

/* ─── Install section: outside-terminal tabs + step + CTA ─────────── */
.install-step {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 16px;
}
.install-step .step-pip {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--signal);
	color: var(--paper);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: var(--font-mono);
	font-weight: 700;
	font-size: 0.9rem;
	box-shadow: 0 0 0 4px var(--signal-faint);
	flex: 0 0 auto;
}
.install-step .step-label {
	font-family: var(--font-mono);
	font-size: 0.92rem;
	color: var(--ink);
	font-weight: 500;
}

.install-tabs {
	display: inline-flex;
	gap: 4px;
	margin-bottom: 12px;
	background: var(--paper);
	border: 1px solid var(--line-strong);
	border-radius: 10px;
	padding: 4px;
}
.install-tab {
	all: unset;
	cursor: pointer;
	padding: 8px 16px;
	border-radius: 7px;
	font-family: var(--font-mono);
	font-size: 0.86rem;
	color: var(--ink-soft);
	display: inline-flex;
	align-items: center;
	gap: 6px;
	transition: background 0.15s, color 0.15s;
}
.install-tab i { color: var(--ink-faint); transition: color 0.15s; }
.install-tab:hover { color: var(--ink); }
.install-tab.active {
	background: var(--ink);
	color: var(--paper);
	box-shadow: 0 2px 8px rgba(12, 10, 9, 0.18);
}
.install-tab.active i { color: var(--paper); }

.install-actions {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-top: 18px;
	flex-wrap: wrap;
}
.install-copy { padding: 12px 22px; font-size: 0.95rem; }
.install-hint {
	font-family: var(--font-mono);
	font-size: 0.86rem;
	color: var(--ink-soft);
	display: inline-flex;
	align-items: center;
	gap: 8px;
}
.install-hint .install-hint-pip {
	width: 8px;
	height: 8px;
	background: var(--signal);
	border-radius: 50%;
	box-shadow: 0 0 0 3px var(--signal-faint);
	animation: signal-pulse 1.6s infinite;
}

/* Subtle highlight for the post-install command in the terminal */
.terminal-body .cmd-after { color: var(--code-text); opacity: 0.85; }
.hidden { display: none !important; }

/* ─── Big alternating feature row ──────────────────────────────────── */
.feature-row {
	display: grid;
	grid-template-columns: 1fr;
	gap: 32px;
	align-items: center;
}
@media (min-width: 992px) {
	.feature-row { grid-template-columns: 1fr 1fr; gap: 64px; }
	.feature-row.flip .text { order: 2; }
	.feature-row.flip .visual { order: 1; }
}
.bullets { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-direction: column; gap: 10px; }
.bullets li { display: flex; align-items: flex-start; gap: 12px; color: var(--ink-soft); font-size: 0.96rem; line-height: 1.55; }
.bullets li::before {
	content: '↳';
	color: var(--signal);
	font-family: var(--font-mono);
	font-weight: 700;
	flex: 0 0 auto;
	margin-top: 2px;
}

/* ─── Diff view (pending edits) — readable on light surfaces ─────── */
.diff { font-family: var(--font-mono); font-size: 0.82rem; padding: 0; line-height: 1.7; }
.diff div { padding: 3px 16px; }
.diff .ctx { color: var(--ink-soft); background: var(--paper); }
.diff .add { background: rgba(34, 197, 94, 0.08); color: #15803d; }
.diff .del { background: rgba(217, 70, 239, 0.06); color: var(--signal-deep); text-decoration: line-through; opacity: 0.85; }
.diff-actions { display: flex; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--line); background: var(--paper-deep); }
.diff-actions button {
	font-family: var(--font-mono);
	font-size: 0.78rem;
	padding: 5px 14px;
	border-radius: 6px;
	border: 1px solid var(--line-strong);
	cursor: pointer;
}
.diff-actions .accept { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.diff-actions .reject { background: var(--paper); color: var(--ink); }

/* ─── Stats grid ───────────────────────────────────────────────────── */
.stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	border: 1px solid var(--line-strong);
	border-radius: 16px;
	overflow: hidden;
	background: var(--paper);
}
.stat {
	padding: 32px 20px;
	border-right: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.stat:last-child { border-right: 0; }
@media (max-width: 767px) { .stat { border-right: 0; } }
.stat-num { font-family: var(--font-mono); font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 700; color: var(--ink); letter-spacing: -0.02em; }
.stat-num .signal-text { color: var(--signal); }
.stat-label { font-family: var(--font-mono); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-faint); }

/* ─── Spec list ────────────────────────────────────────────────────── */
.specs { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--paper); }
.spec-row {
	display: grid;
	grid-template-columns: 200px 1fr;
	gap: 16px;
	padding: 14px 22px;
	border-bottom: 1px solid var(--line);
	font-size: 0.92rem;
}
.spec-row:last-child { border-bottom: 0; }
.spec-row .k { font-family: var(--font-mono); color: var(--ink-faint); font-size: 0.84rem; text-transform: uppercase; letter-spacing: 0.06em; }
.spec-row .v { font-family: var(--font-mono); color: var(--ink); }
.spec-row .v .pill { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--signal-faint); color: var(--signal-deep); border: 1px solid var(--signal-line); margin-right: 6px; font-size: 0.82rem; }
@media (max-width: 600px) { .spec-row { grid-template-columns: 1fr; gap: 4px; } }

/* ─── FAQ ──────────────────────────────────────────────────────────── */
.faq summary {
	cursor: pointer;
	padding: 18px 22px;
	font-weight: 600;
	font-size: 1rem;
	color: var(--ink);
	list-style: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid var(--line);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-family: var(--font-mono); color: var(--signal); font-weight: 400; font-size: 1.4rem; transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details[open] summary { color: var(--signal); }
.faq-body { padding: 8px 22px 22px; color: var(--ink-soft); border-bottom: 1px solid var(--line); }
.faq details:last-child summary, .faq details:last-child .faq-body { border-bottom: 0; }

/* ─── Inline code ──────────────────────────────────────────────────── */
code {
	font-family: var(--font-mono);
	font-size: 0.88em;
	background: var(--paper-deep);
	padding: 2px 6px;
	border-radius: 4px;
	border: 1px solid var(--line);
	color: var(--ink);
}

/* ─── Comparison table ────────────────────────────────────────────── */
.compare-table {
	overflow-x: auto;
	border: 1px solid var(--line-strong);
	border-radius: 14px;
	background: var(--paper);
	box-shadow: 0 12px 36px rgba(13, 14, 22, 0.08);
}
.compare-table table {
	width: 100%;
	border-collapse: collapse;
	font-family: var(--font-mono);
	font-size: 0.88rem;
	min-width: 640px;
}
.compare-table thead th {
	padding: 16px 18px;
	text-align: left;
	font-weight: 600;
	font-size: 0.82rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--ink-faint);
	border-bottom: 2px solid var(--line-strong);
	background: var(--paper-deep);
	white-space: nowrap;
}
.compare-table tbody td {
	padding: 14px 18px;
	border-bottom: 1px solid var(--line);
	color: var(--ink-soft);
	vertical-align: middle;
}
.compare-table tbody tr:last-child td { border-bottom: 0; }
.compare-table tbody tr:hover { background: var(--paper-deep); }
.compare-feature { font-weight: 600; color: var(--ink); }
.compare-highlight {
	background: rgba(217, 70, 239, 0.04) !important;
	border-left: 2px solid var(--signal);
	font-weight: 600;
	color: var(--ink);
}
.compare-highlight strong { color: var(--signal); }
thead .compare-highlight {
	color: var(--ink);
	font-size: 0.88rem;
	display: flex;
	align-items: center;
	gap: 8px;
}
.compare-logo { width: 20px; height: 20px; border-radius: 5px; }
.compare-yes { color: #15803d; font-weight: 700; }
.compare-no { color: #b91c1c; font-weight: 700; }
.compare-partial { color: #a16207; font-size: 0.82rem; }

/* ─── Footer ───────────────────────────────────────────────────────── */
.kn-footer {
	border-top: 1px solid var(--line);
	background: var(--paper);
	padding: 56px 0 32px;
	color: var(--ink-faint);
	font-size: 0.86rem;
}
.footer-grid {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr 1fr;
	gap: 40px;
	margin-bottom: 36px;
}
@media (max-width: 767px) {
	.footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
	.footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
	.footer-grid { grid-template-columns: 1fr; }
}
.footer-brand .kn-brand { margin-bottom: 12px; }
.footer-tagline { font-size: 0.88rem; color: var(--ink-faint); max-width: 360px; margin: 0 0 16px; line-height: 1.6; }
.footer-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.footer-badge {
	font-family: var(--font-mono);
	font-size: 0.72rem;
	padding: 3px 10px;
	border-radius: 4px;
	background: var(--paper-deep);
	border: 1px solid var(--line);
	color: var(--ink-faint);
	letter-spacing: 0.04em;
}
.footer-links-group h4 {
	font-family: var(--font-mono);
	font-size: 0.76rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--ink);
	margin: 0 0 14px;
	font-weight: 600;
}
.footer-links-group a {
	display: block;
	color: var(--ink-faint);
	text-decoration: none;
	font-size: 0.88rem;
	padding: 4px 0;
	transition: color 0.15s;
}
.footer-links-group a:hover { color: var(--signal); }
.footer-links-group a i { margin-right: 4px; }
.footer-bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	padding-top: 24px;
	border-top: 1px solid var(--line);
	font-family: var(--font-mono);
	font-size: 0.78rem;
	color: var(--ink-faint);
	gap: 12px;
}
.kn-footer a { color: var(--ink-faint); text-decoration: none; }
.kn-footer a:hover { color: var(--signal); }
.kn-footer .kn-brand { text-decoration: none; }
.kn-footer .kn-brand-name::after { display: none; }

/* ─── Scroll progress bar ──────────────────────────────────────────── */
.scroll-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--signal); z-index: 100; transition: width 0.06s linear; }

/* ─── Custom scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--paper-deep); }
::-webkit-scrollbar-thumb { background: var(--g-brand); border-radius: 5px; border: 2px solid var(--paper-deep); }
::-webkit-scrollbar-thumb:hover { box-shadow: 0 0 12px rgba(217, 70, 239, 0.55); }

/* ═══════════════════════════════════════════════════════════════════
   Futuristic layer — additive treatments threaded through every
   section: corner crosshairs (CAD-style ref points), mono section
   numbering, scroll-triggered reveals, status-bar marquee, animated
   counters, hairline tech-grid backplates.
   ═══════════════════════════════════════════════════════════════════ */

/* Section corner markers — slim hairline brackets pulled in tight to the
   container edge so they read as a frame, not orphan glyphs floating
   in whitespace. Only used on .section-mark sections. */
.section-mark { position: relative; }
.section-mark > .mark-tr,
.section-mark > .mark-br {
	position: absolute;
	width: 18px;
	height: 18px;
	border: 1px solid var(--line-strong);
	pointer-events: none;
	z-index: 1;
	opacity: 0.6;
}
.section-mark .mark-tr { top: 18px; right: 18px; border-left: 0; border-bottom: 0; }
.section-mark .mark-br { bottom: 18px; right: 18px; border-left: 0; border-top: 0; }
.section-mark::before,
.section-mark::after {
	content: '';
	position: absolute;
	width: 18px;
	height: 18px;
	border: 1px solid var(--line-strong);
	pointer-events: none;
	z-index: 1;
	opacity: 0.6;
}
.section-mark::before { top: 18px; left: 18px; border-right: 0; border-bottom: 0; }
.section-mark::after  { bottom: 18px; left: 18px; border-right: 0; border-top: 0; }
.section-ink.section-mark > .mark-tr,
.section-ink.section-mark > .mark-br,
.section-ink.section-mark::before,
.section-ink.section-mark::after { border-color: rgba(250, 246, 238, 0.25); }

/* Section heading numbering — vertical rule + mono "section / 03" */
.section-num {
	position: relative;
	padding-left: 24px;
	margin-bottom: 36px;
}
.section-num::before {
	content: '';
	position: absolute;
	left: 0;
	top: 4px;
	bottom: 4px;
	width: 2px;
	background: linear-gradient(180deg, var(--signal), transparent);
	border-radius: 2px;
}
.section-num .num-label {
	display: block;
	font-family: var(--font-mono);
	font-size: 0.78rem;
	letter-spacing: 0.08em;
	color: var(--ink-faint);
	text-transform: uppercase;
	margin-bottom: 10px;
}
.section-num .num-label .digit { color: var(--signal); margin-right: 8px; }

/* Scroll reveal — JS adds .in-view when element scrolls into the viewport */
.reveal {
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.6s ease, transform 0.6s cubic-bezier(.21,.73,.18,1);
	will-change: opacity, transform;
}
.reveal.in-view { opacity: 1; transform: none; }
.reveal-2 { transition-delay: 0.08s; }
.reveal-3 { transition-delay: 0.16s; }

/* Pillar card corner brackets + lighting on hover */
.pillar {
	overflow: hidden;
}
.pillar::before,
.pillar::after {
	content: '';
	position: absolute;
	width: 14px;
	height: 14px;
	border: 1px solid var(--line-strong);
	pointer-events: none;
	transition: border-color 0.25s, width 0.25s, height 0.25s;
}
.pillar::before {
	top: 10px;
	left: 10px;
	border-right: 0;
	border-bottom: 0;
}
.pillar::after {
	bottom: 10px;
	right: 10px;
	border-left: 0;
	border-top: 0;
}
.pillar:hover::before,
.pillar:hover::after {
	border-color: var(--signal);
	width: 18px;
	height: 18px;
}
/* Sweep light on hover */
.pillar > .sweep {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: linear-gradient(115deg, transparent 30%, rgba(255, 88, 65, 0.06) 50%, transparent 70%);
	transform: translateX(-100%);
	transition: transform 0.6s ease;
}
.pillar:hover > .sweep { transform: translateX(100%); }

/* Inline status row that sits ABOVE the marquee track inside the strip
   — no negative-position pseudo-elements, no clipping risk. */
.marquee-status {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 24px 6px;
	border-bottom: 1px dashed var(--line);
	font-family: var(--font-mono);
	font-size: 0.7rem;
	color: var(--ink-faint);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.marquee-status .live {
	color: var(--signal);
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.marquee-status .live::before {
	content: '';
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--signal);
	animation: signal-pulse 1.6s ease-in-out infinite;
}

/* Tech-grid backplate — opt-in via .grid-bg on a section */
.grid-bg { position: relative; }
.grid-bg::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 0;
	background:
		linear-gradient(rgba(12, 10, 9, 0.04) 1px, transparent 1px) 0 0 / 32px 32px,
		linear-gradient(90deg, rgba(12, 10, 9, 0.04) 1px, transparent 1px) 0 0 / 32px 32px;
	mask-image: radial-gradient(ellipse 80% 60% at center, black, transparent 80%);
	-webkit-mask-image: radial-gradient(ellipse 80% 60% at center, black, transparent 80%);
	pointer-events: none;
}
.section-ink.grid-bg::before {
	background:
		linear-gradient(rgba(250, 246, 238, 0.05) 1px, transparent 1px) 0 0 / 32px 32px,
		linear-gradient(90deg, rgba(250, 246, 238, 0.05) 1px, transparent 1px) 0 0 / 32px 32px;
}
.grid-bg > .container { position: relative; z-index: 1; }

/* Animated stat counter — number eases in via opacity + slight slide */
.stat-num.counted { animation: count-pop 0.6s ease-out backwards; }
@keyframes count-pop {
	from { opacity: 0; transform: translateY(8px); }
	to   { opacity: 1; transform: none; }
}

/* Live status dot — used in nav and elsewhere */
.live-dot {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-family: var(--font-mono);
	font-size: 0.74rem;
	color: var(--ink-faint);
}
.live-dot::before {
	content: '';
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--mint);
	box-shadow: 0 0 0 3px var(--mint-faint), 0 0 12px rgba(110, 231, 183, 0.6);
	animation: live-pulse 1.6s ease-in-out infinite;
}
@keyframes live-pulse {
	0%, 100% { box-shadow: 0 0 0 3px var(--mint-faint), 0 0 12px rgba(110, 231, 183, 0.5); }
	50%      { box-shadow: 0 0 0 6px var(--mint-faint), 0 0 18px rgba(110, 231, 183, 0.85); }
}

/* Terminal cursor (after a $ prompt) */
.cursor {
	display: inline-block;
	width: 9px;
	height: 1.05em;
	background: var(--signal);
	margin-left: 2px;
	vertical-align: -2px;
	animation: cursor-blink 1s steps(1) infinite;
}
@keyframes cursor-blink { 50% { opacity: 0; } }

/* Footer build hash plate */
.kn-footer .build-hash {
	font-family: var(--font-mono);
	font-size: 0.74rem;
	color: var(--ink-faint);
	background: var(--paper-deep);
	border: 1px solid var(--line);
	padding: 3px 10px;
	border-radius: 4px;
	letter-spacing: 0.04em;
}
.kn-footer .build-hash::before { content: '⊟ '; color: var(--signal); }

/* Diff-actions enhancement — used in pending-edit panel for status */
.live-meter {
	display: inline-flex;
	align-items: baseline;
	gap: 6px;
	font-family: var(--font-mono);
	font-size: 0.78rem;
	color: var(--ink-faint);
}
.live-meter strong { color: var(--ink); font-weight: 600; }
.live-meter::before {
	content: '';
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--signal);
	display: inline-block;
	transform: translateY(-1px);
	animation: signal-pulse 2s infinite;
}

/* ─── Inline-style extractions ─────────────────────────────────────── */

/* Header — install button paddings & GitHub link */
.kn-nav .btn-signal { padding: 8px 14px; }
.kn-nav-mobile .btn-signal { align-self: flex-start; }
.nav-github {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}
.nav-github i { font-size: 1rem; }

/* Hero stage — meta badge fade text + chat input placeholder + keycap */
.stage-meta-aux { font-family: var(--font-mono); font-size: 0.7rem; color: rgba(250, 246, 238, 0.4); }
.stage-chat-input .ph { color: var(--ink-faint); }
.stage-chat-input .keycap { font-family: var(--font-mono); font-size: 0.7rem; color: var(--ink-faint); }

/* Pillar accent svg */
.pillar svg { color: var(--signal); }

/* Install — verified-before-install info box */
.install-verified {
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: 10px;
}
.install-verified > i { color: var(--signal); font-size: 1.4rem; }
.install-verified p { margin: 4px 0 0; font-size: 0.9rem; }

/* Terminal — frame-bar live meter (dark-context override) */
.terminal .frame-bar .live-meter { color: rgba(250, 246, 238, 0.5); }
.terminal .frame-bar .live-meter strong { color: rgba(250, 246, 238, 0.85); }

/* Frame variant — paper-bg (used for pending-edits panel) */
.frame--paper { background: var(--paper); }

/* Frame-side variant — bare (no left border, even padding) */
.frame-side--bare { border-left: 0; padding: 18px; }

/* Diff — inline syntax token colors */
.diff .tok-kw  { color: #a21caf; }
.diff .tok-fn  { color: #0e7490; }
.diff .tok-num { color: #a16207; }

/* Diff-actions counter — used on the "1 of 1" hunk indicator */
.diff-actions .counter {
	font-family: var(--font-mono);
	font-size: 0.78rem;
	color: var(--ink-faint);
	align-self: center;
}

/* Terminal-body — tokens, inline ghost suggestion, status row */
.terminal-body .kw { color: var(--code-keyword); }
.terminal-body .fn { color: var(--code-fn); }
.terminal-body .ghost {
	color: var(--signal);
	font-style: italic;
	border-left: 2px solid var(--signal);
	padding-left: 6px;
}
.terminal-body .status { color: var(--code-dim); font-size: 0.78rem; }

/* Account profile (features page) */
.account-card { padding: 24px; background: var(--paper); }
.account-avatar {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--ink);
	color: var(--paper);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 1.2rem;
}
.account-email { font-weight: 600; }
.account-plan {
	font-family: var(--font-mono);
	font-size: 0.8rem;
	color: var(--signal);
	text-transform: uppercase;
	letter-spacing: 0.06em;
}
.account-actions .btn-ghost { font-size: 0.84rem; padding: 8px 14px; }
.account-meta {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid var(--line);
	font-family: var(--font-mono);
	font-size: 0.78rem;
	color: var(--ink-faint);
}

/* FAQ wrapper surface */
.faq {
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: 12px;
	overflow: hidden;
}

/* Ghost button on dark (section-ink) backgrounds */
.section-ink .btn-ghost {
	border-color: rgba(250, 246, 238, 0.25);
	color: var(--paper);
}

/* ─── Reduced motion ───────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
