/* ==========================================================================
   rcmate – website styles
   Light / dark theme via [data-theme] on <html>
   ========================================================================== */

:root {
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --maxw: 1180px;
  --radius: 20px;
  --radius-sm: 12px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --a1: #5865f2;
  --a2: #3ba99c;
  --a3: #d97757;
  --accent: var(--a1);
  --nav-h: 68px;
}

:root[data-theme="dark"] {
  --bg: #07080f;
  --bg-2: #0d0f1c;
  --surface: rgba(255, 255, 255, .04);
  --surface-2: rgba(255, 255, 255, .07);
  --border: rgba(255, 255, 255, .09);
  --text: #d9dcea;
  --muted: #9198b3;
  --heading: #ffffff;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, .75);
  --nav-bg: rgba(7, 8, 15, .62);
  --grid-line: rgba(255, 255, 255, .055);
  --blob-opacity: .55;
  --inline-code-bg: rgba(88, 101, 242, .16);
  --link: #3ba99c;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f7f8fc;
  --bg-2: #eceffa;
  --surface: rgba(255, 255, 255, .72);
  --surface-2: #ffffff;
  --border: rgba(15, 23, 42, .09);
  --text: #2a3045;
  --muted: #5d647d;
  --heading: #0b1020;
  --shadow: 0 30px 60px -30px rgba(40, 50, 110, .28);
  --nav-bg: rgba(247, 248, 252, .72);
  --grid-line: rgba(15, 23, 42, .06);
  --blob-opacity: .45;
  --inline-code-bg: rgba(88, 101, 242, .1);
  --link: #4654d8;
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { color: var(--heading); line-height: 1.12; letter-spacing: -.025em; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
::selection { background: rgba(88, 101, 242, .35); color: var(--heading); }

.container { width: min(100% - 40px, var(--maxw)); margin-inline: auto; }
.grad { color: var(--heading); }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--a1); color: #fff; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--a2); outline-offset: 3px; border-radius: 6px; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--nav-h);
  transition: background-color .3s var(--ease), border-color .3s var(--ease), backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  border-bottom-color: var(--border);
}
.nav__inner { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; color: var(--heading); letter-spacing: -.02em; }
.brand__mark { width: 32px; height: 32px; filter: drop-shadow(0 6px 16px rgba(88, 101, 242, .45)); transition: transform .5s var(--ease); }
.brand:hover .brand__mark { transform: rotate(-8deg) scale(1.06); }
.nav__links { display: flex; gap: 6px; margin-left: auto; }
.nav__links a { padding: 8px 14px; border-radius: 999px; font-size: .95rem; color: var(--muted); transition: color .2s, background-color .2s; }
.nav__links a:hover { color: var(--heading); background: var(--surface-2); }
.nav__actions { display: flex; align-items: center; gap: 10px; }
.nav__gh {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  color: var(--heading); font-size: .9rem; font-weight: 600; transition: border-color .2s, transform .2s;
}
.nav__gh svg { width: 18px; height: 18px; }
.nav__gh:hover { border-color: var(--a1); transform: translateY(-1px); }

.theme-toggle {
  position: relative; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface); color: var(--heading);
  cursor: pointer; display: grid; place-items: center; overflow: hidden;
  transition: border-color .2s, transform .2s;
}
.theme-toggle:hover { border-color: var(--a1); transform: rotate(15deg); }
.theme-toggle svg { position: absolute; width: 20px; height: 20px; transition: transform .5s var(--ease), opacity .3s; }
:root[data-theme="dark"] .icon-sun { transform: translateY(30px) rotate(90deg); opacity: 0; }
:root[data-theme="light"] .icon-moon { transform: translateY(-30px) rotate(-90deg); opacity: 0; }

.nav__burger { display: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); cursor: pointer; position: relative; }
.nav__burger span { position: absolute; left: 11px; right: 11px; height: 2px; border-radius: 2px; background: var(--heading); transition: transform .3s var(--ease); }
.nav__burger span:first-child { top: 15px; }
.nav__burger span:last-child { top: 22px; }
.nav__burger[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 24px; border-radius: 999px; font-weight: 600; font-size: 1rem;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .25s, border-color .25s;
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--accent); background-size: 160% 160%; color: #fff; box-shadow: 0 14px 34px -12px rgba(88, 101, 242, .7); animation: gradShift 8s ease infinite; }
.btn--primary:hover { box-shadow: 0 20px 44px -12px rgba(88, 101, 242, .85); }
.btn--ghost { background: var(--surface); border-color: var(--border); color: var(--heading); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.btn--ghost:hover { border-color: var(--a1); }
.btn--light { background: #fff; color: #11132a; }
.btn--outline-light { border-color: rgba(255, 255, 255, .5); color: #fff; }
.btn--outline-light:hover { background: rgba(255, 255, 255, .12); }

@keyframes gradShift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

/* ---------- Parallax layers (shared) ---------- */
.layer { position: absolute; will-change: transform; pointer-events: none; }
.layer--grid {
  inset: -20% 0;
  background-image:
  background-size: 56px 56px;
}
.blob { border-radius: 50%; filter: blur(70px); opacity: var(--blob-opacity); }
.blob--1 { width: 520px; height: 520px; top: -120px; left: -120px; background: var(--a1); }
.blob--2 { width: 460px; height: 460px; top: 120px; right: -140px; background: var(--a2); }
.blob--3 { width: 380px; height: 380px; bottom: -160px; left: 35%; background: var(--a3); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: calc(var(--nav-h) + 40px) 0 90px; overflow: hidden; isolation: isolate; }
.hero__bg { position: absolute; inset: 0; z-index: -1; }
.hero__grid > * { min-width: 0; }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero__title { font-size: clamp(2.6rem, 6.2vw, 4.8rem); font-weight: 800; letter-spacing: -.045em; margin-bottom: 22px; }
.hero__lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 34em; margin-bottom: 34px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }

.pill {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 26px;
  padding: 7px 14px 7px 10px; border-radius: 999px; font-size: .88rem; font-weight: 500;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: border-color .2s;
}
.pill:hover { border-color: var(--a1); }
.pill__dot { width: 8px; height: 8px; border-radius: 50%; background: #42a883; box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); animation: ping 2.2s infinite; }
.pill__arrow { transition: transform .2s; }
.pill:hover .pill__arrow { transform: translateX(3px); }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .55); } 80%, 100% { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); } }

.shapes { inset: 0; }
.shape { position: absolute; display: block; }
.shape--ring { width: 120px; height: 120px; top: 18%; right: 8%; border-radius: 50%; border: 2px solid rgba(88, 101, 242, .45); animation: float 9s ease-in-out infinite; }
.shape--square { width: 54px; height: 54px; bottom: 22%; left: 6%; border-radius: 14px; border: 2px solid rgba(34, 211, 238, .45); transform: rotate(18deg); animation: float 11s ease-in-out infinite reverse; }
.shape--dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
.shape--d1 { top: 30%; left: 46%; }
.shape--d2 { bottom: 16%; right: 30%; width: 8px; height: 8px; }
.shape--plus { top: 14%; left: 22%; width: 22px; height: 22px; }
.shape--plus::before, .shape--plus::after { content: ""; position: absolute; inset: 9px 0; border-radius: 2px; background: rgba(244, 114, 182, .6); }
.shape--plus::after { inset: 0 9px; }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -18px; } }

.hero__visual { position: relative; will-change: transform; }
.window {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: #0c0e1b; border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: var(--shadow), 0 0 0 1px rgba(88, 101, 242, .12), 0 40px 120px -40px rgba(88, 101, 242, .55);
}
.window__bar { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid rgba(255, 255, 255, .07); background: rgba(255, 255, 255, .03); }
.window__dot { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.window__dot:nth-child(2) { background: #febc2e; }
.window__dot:nth-child(3) { background: #28c840; }
.window__bar em { margin-left: auto; margin-right: auto; padding-right: 52px; font-style: normal; font-family: var(--font-mono); font-size: .8rem; color: #7d84a3; }
.window__body { margin: 0; padding: 22px 24px 28px; font-family: var(--font-mono); font-size: .9rem; line-height: 1.9; color: #c9cee6; overflow-x: auto; }
.window__body code { font-family: inherit; }
.t-line { display: block; white-space: pre; }
.t-cmd::before { content: "$ "; color: var(--a2); }
.t-out { color: #7d84a3; }
.t-ok { color: #42a883; }
.t-ok::before { content: "✓ "; }
.t-cursor::after { content: ""; display: inline-block; width: 9px; height: 1.1em; vertical-align: -3px; background: #c9cee6; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.float-card {
  position: absolute; display: flex; align-items: center; gap: 12px;
  padding: 12px 18px 12px 12px; border-radius: 16px;
  background: var(--nav-bg); border: 1px solid var(--border);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: var(--shadow); animation: float 7s ease-in-out infinite;
}
.float-card strong { display: block; color: var(--heading); font-size: 1.1rem; line-height: 1.1; }
.float-card small { color: var(--muted); font-size: .78rem; }
.float-card__icon svg { width: 18px; height: 18px; }
.float-card__icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--accent); color: #fff; font-size: 1.1rem; }
.float-card--a { left: -34px; bottom: -28px; }
.float-card--b { right: -24px; top: -26px; animation-delay: -3.5s; }

.hero__scroll { position: absolute; left: 50%; bottom: 28px; translate: -50% 0; width: 26px; height: 42px; border-radius: 14px; border: 2px solid var(--border); }
.hero__scroll span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--muted); animation: scrollHint 1.8s var(--ease) infinite; }
@keyframes scrollHint { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(14px); opacity: 0; } }

/* ---------- Sections ---------- */
.section { position: relative; padding: 120px 0; }
.section--tight { padding: 64px 0 110px; }
.section__head { text-align: center; max-width: 720px; margin: 0 auto 64px; }
.section__head--left { text-align: left; margin-left: 0; }
.section__head h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); font-weight: 800; }
.section__head p { color: var(--muted); font-size: 1.1rem; }
.section__head a { color: var(--link); }
.eyebrow { display: inline-block; margin-bottom: 14px; font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--a2); }
.eyebrow--link { transition: opacity .2s; }
.eyebrow--link:hover { opacity: .75; }

/* ---------- Feature cards ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  position: relative; padding: 30px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transition: transform .4s var(--ease), border-color .3s, box-shadow .4s var(--ease), opacity .8s var(--ease);
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: transparent;
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .3s; pointer-events: none;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card:hover::before { opacity: 1; }
.card h3 { font-size: 1.2rem; margin: 18px 0 8px; }
.card p { color: var(--muted); margin: 0; }
.card__icon { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 14px; background: var(--accent); box-shadow: 0 12px 28px -10px rgba(88, 101, 242, .7); }
.card__icon svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card--link { display: flex; flex-direction: column; }
.card--link h3 { margin-top: 0; }
.card__more { margin-top: 18px; font-weight: 600; font-size: .95rem; color: var(--link); }

/* ---------- Marquee (horizontal parallax) ---------- */
.marquee { padding: 40px 0; overflow: hidden; border-block: 1px solid var(--border); background: var(--bg-2); transition: background-color .4s var(--ease); }
.marquee__row { display: flex; align-items: center; gap: 36px; width: max-content; will-change: transform; margin-left: -25%; }
.marquee__row span { font-size: clamp(2.2rem, 6vw, 4.6rem); font-weight: 800; letter-spacing: -.04em; white-space: nowrap; color: var(--heading); }
.marquee__row i { font-style: normal; font-size: 1.8rem; background: var(--accent); -webkit-background-clip: text; background-clip: text; color: transparent; }
.marquee__row--outline span { color: transparent; -webkit-text-stroke: 1.5px var(--muted); }

/* ---------- Quick start ---------- */
.quickstart { display: grid; grid-template-columns: .8fr 1.2fr; gap: 64px; align-items: start; }
.quickstart .section__head { position: sticky; top: calc(var(--nav-h) + 40px); margin-bottom: 0; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; counter-reset: none; }
.step { display: grid; grid-template-columns: auto 1fr; gap: 20px; padding: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); transition: border-color .3s, transform .4s var(--ease), opacity .8s var(--ease); }
.step:hover { border-color: rgba(88, 101, 242, .5); }
.step__num { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--accent); }
.step h3 { font-size: 1.15rem; margin-bottom: 4px; }
.step p { color: var(--muted); margin-bottom: 14px; }
.step__body { min-width: 0; }

.code { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 18px; border-radius: var(--radius-sm); background: #0c0e1b; border: 1px solid rgba(255, 255, 255, .08); }
.code code { flex: 1; min-width: 0; overflow-x: auto; white-space: pre; font-family: var(--font-mono); font-size: .9rem; color: #c9cee6; }
.code code::before { content: "$ "; color: var(--a2); }
.code__copy, .prose .copy-btn {
  flex: none; height: 32px; padding: 0 12px; border-radius: 8px; cursor: pointer;
  font: 600 .78rem var(--font-sans); color: #c9cee6;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1);
  transition: background-color .2s, color .2s;
}
.code__copy:hover, .prose .copy-btn:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.code__copy.is-copied, .prose .copy-btn.is-copied { color: #42a883; }

/* ---------- Stats band (vertical parallax) ---------- */
.band { position: relative; padding: 140px 0; overflow: hidden; isolation: isolate; color: #fff; text-align: center; }
.band__bg {
  position: absolute; inset: -40% 0; z-index: -2; will-change: transform;
  background: #151927;
}
.band__glow {
  position: absolute; inset: -30% 0; z-index: -1; will-change: transform;
  background-size: 28px 28px;
}
.band h2 { color: #fff; font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; }
.band p { color: rgba(255, 255, 255, .8); font-size: 1.1rem; margin-bottom: 52px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 0; }
.stat { padding: 28px 18px; border-radius: var(--radius); background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.stat dt { font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .7); }
.stat dd { margin: 6px 0 0; font-size: clamp(1.7rem, 3.2vw, 2.5rem); font-weight: 800; letter-spacing: -.03em; }

/* ---------- CTA ---------- */
.cta {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
  padding: 56px; border-radius: 28px; overflow: hidden; color: #fff;
  background: var(--accent); background-size: 180% 180%; animation: gradShift 12s ease infinite;
  box-shadow: 0 40px 90px -40px rgba(88, 101, 242, .8);
}
.cta::after { content: ""; position: absolute; inset: 0; background: transparent; pointer-events: none; }
.cta h2 { color: #fff; font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 800; }
.cta p { margin: 0; color: rgba(255, 255, 255, .88); }
.cta__actions { position: relative; z-index: 1; display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 48px 0; }
.footer__inner { display: grid; grid-template-columns: 1fr auto; gap: 24px 40px; align-items: center; }
.footer__brand .brand__name { font-weight: 800; color: var(--heading); font-size: 1.1rem; }
.footer__brand p { margin: 4px 0 0; color: var(--muted); font-size: .95rem; }
.footer__links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer__links a { color: var(--muted); font-size: .95rem; transition: color .2s; }
.footer__links a:hover { color: var(--heading); }
.footer__copy { grid-column: 1 / -1; margin: 0; padding-top: 24px; border-top: 1px solid var(--border); font-size: .88rem; color: var(--muted); }
.footer__copy a { color: var(--link); }

/* ---------- Page hero (docs) ---------- */
.page-hero { position: relative; padding: calc(var(--nav-h) + 90px) 0 80px; overflow: hidden; isolation: isolate; border-bottom: 1px solid var(--border); }
.page-hero--small { padding-bottom: 60px; }
.page-hero__bg { position: absolute; inset: 0; z-index: -1; }
.page-hero h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); font-weight: 800; letter-spacing: -.04em; }
.page-hero p { color: var(--muted); font-size: 1.15rem; max-width: 40em; margin: 0; }
.doc-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 40px; }

/* ---------- Docs layout ---------- */
.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr) 200px; gap: 56px; padding: 64px 0 110px; }
.docs__nav, .docs__toc { position: sticky; top: calc(var(--nav-h) + 32px); align-self: start; display: flex; flex-direction: column; gap: 2px; }
.docs__label { margin: 0 0 10px; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.docs__nav a, .docs__toc a { padding: 7px 12px; border-radius: 10px; font-size: .94rem; color: var(--muted); border-left: 2px solid transparent; transition: color .2s, background-color .2s; }
.docs__nav a:hover, .docs__toc a:hover { color: var(--heading); background: var(--surface-2); }
.docs__nav a.is-active { color: var(--heading); background: var(--surface-2); border-left-color: var(--a1); font-weight: 600; }
.docs__toc a { font-size: .88rem; padding: 5px 12px; }

/* ---------- Prose (markdown) ---------- */
.prose { font-size: 1.05rem; }
.prose--intro { max-width: 760px; color: var(--muted); }
.prose h2 { font-size: 1.75rem; margin: 2.2em 0 .6em; padding-top: .2em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.3rem; margin: 1.8em 0 .5em; }
.prose a { color: var(--link); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--link) 35%, transparent); text-underline-offset: 3px; transition: text-decoration-color .2s; }
.prose a:hover { text-decoration-color: var(--link); }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin: .35em 0; }
.prose li::marker { color: var(--a1); }
.prose :not(pre) > code { font-family: var(--font-mono); font-size: .88em; padding: .15em .45em; border-radius: 6px; background: var(--inline-code-bg); color: var(--heading); }
.prose pre { position: relative; margin: 0 0 1.5em; padding: 20px 22px; border-radius: var(--radius-sm); background: #0c0e1b; border: 1px solid rgba(255, 255, 255, .08); overflow-x: auto; }
.prose pre code { font-family: var(--font-mono); font-size: .9rem; line-height: 1.75; color: #c9cee6; }
.prose pre .copy-btn { position: absolute; top: 10px; right: 10px; opacity: 0; transition: opacity .2s; }
.prose pre:hover .copy-btn, .prose pre .copy-btn:focus-visible { opacity: 1; }
.prose blockquote { margin: 0 0 1.5em; padding: 16px 20px; border-radius: var(--radius-sm); border: 1px solid var(--border); border-left: 3px solid var(--a1); background: var(--surface); }
.prose blockquote p:last-child { margin: 0; }
.prose table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 0 0 1.5em; font-size: .95rem; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.prose th, .prose td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.prose th { background: var(--surface-2); color: var(--heading); font-weight: 600; }
.prose tr:last-child td { border-bottom: 0; }
.prose hr { border: 0; height: 1px; background: var(--border); margin: 2.5em 0; }
.prose img { border-radius: var(--radius-sm); }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--border); }
.prose .pager__link { display: flex; flex-direction: column; padding: 18px 20px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); color: var(--heading); font-weight: 600; text-decoration: none; transition: border-color .2s, transform .2s; }
.prose .pager__link:hover { border-color: var(--a1); transform: translateY(-2px); }
.pager__link small { color: var(--muted); font-weight: 500; font-size: .8rem; }
.pager__link--next { text-align: right; grid-column: 2; }

/* ---------- 404 ---------- */
.notfound { text-align: center; }
.notfound__code { font-size: clamp(6rem, 22vw, 13rem); font-weight: 900; line-height: 1; letter-spacing: -.06em; margin: 0 0 10px; }
.notfound .hero__lead { margin-inline: auto; }


/* ---------- TUI mockup ---------- */
.tui__body { padding: 18px; font-family: var(--font-mono); font-size: .82rem; color: #c9cee6; }
.tui__box { position: relative; border: 1px solid rgba(88, 101, 242, .55); border-radius: 6px; padding: 18px 10px 10px; }
.tui__title { position: absolute; top: -10px; left: 12px; padding: 0 6px; background: #0c0e1b; color: #9aa4ff; font-weight: 700; }
.tui__row { display: grid; grid-template-columns: 28px minmax(0, 1fr) 58px 1fr 62px; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 4px; white-space: nowrap; }
.tui__row.is-highlight { background: rgba(88, 101, 242, .2); }
.tui__check { color: #7d84a3; }
.tui__name { overflow: hidden; text-overflow: ellipsis; color: #e6e9f7; }
.tui__type { display: inline-block; justify-self: start; padding: 1px 8px; border-radius: 4px; font-family: var(--font-mono); font-size: .76rem; font-weight: 600; }
.tui__type--sync { background: rgba(34, 211, 238, .16); color: #3ba99c; }
.tui__type--bisync { background: rgba(88, 101, 242, .2); color: #9aa4ff; }
.tui__type--copy { background: rgba(52, 211, 153, .16); color: #42a883; }
.tui__type--move { background: rgba(244, 114, 182, .16); color: #d97757; }
.tui__bar { position: relative; height: 8px; border-radius: 2px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.tui__bar i { position: absolute; inset: 0 auto 0 0; width: var(--p); background: var(--accent); }
.tui__bar--running i { animation: tuiFill 4s var(--ease) infinite alternate; }
.tui__bar--done i { background: #42a883; }
@keyframes tuiFill { from { width: calc(var(--p) - 30%); } to { width: calc(var(--p) + 20%); } }
.tui__state { text-align: right; color: #7d84a3; }
.tui__state--done { color: #42a883; }
.tui__state--running { color: #3ba99c; }
.tui__state--error { color: #f87171; }
.tui__keys { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; color: #7d84a3; font-size: .76rem; }
.tui__keys b { color: #c9cee6; background: rgba(255, 255, 255, .08); padding: 0 5px; border-radius: 3px; font-weight: 600; }

/* ---------- Config / modes split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split .section__head { margin-bottom: 32px; }
.modes { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 10px; }
.mode { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); }
.mode .tui__type { min-width: 64px; text-align: center; }
:root[data-theme="light"] .mode .tui__type--sync { color: #287f76; }
:root[data-theme="light"] .mode .tui__type--bisync { color: #4654d8; }
:root[data-theme="light"] .mode .tui__type--copy { color: #28785f; }
:root[data-theme="light"] .mode .tui__type--move { color: #b45f45; }
.link-more { font-weight: 600; color: var(--link); }
.link-more:hover { text-decoration: underline; text-underline-offset: 3px; }
code.inline { font-family: var(--font-mono); font-size: .88em; padding: .15em .45em; border-radius: 6px; background: var(--inline-code-bg); color: var(--heading); }
.toml .c { color: #9aa4ff; }
.toml .k { color: #3ba99c; }
.toml .s { color: #42a883; }
.toml .b { color: #d97757; }
.section--alt { background: var(--bg-2); border-block: 1px solid var(--border); transition: background-color .4s var(--ease); }

/* ---------- Keybindings ---------- */
.keys { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 36px; }
.key { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 18px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); transition: border-color .3s, transform .3s var(--ease), opacity .8s var(--ease); }
.key:hover { border-color: rgba(88, 101, 242, .5); transform: translateY(-3px); }
.key__combo { display: flex; gap: 6px; }
.key__text { color: var(--muted); font-size: .95rem; }
kbd { display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 9px; border-radius: 8px; font: 600 .85rem var(--font-mono); color: var(--heading); background: var(--surface-2); border: 1px solid var(--border); box-shadow: 0 3px 0 var(--border); }
.prose kbd { min-width: 26px; height: 26px; padding: 0 7px; font-size: .8rem; }
.center { text-align: center; }

/* ---------- Reveal on scroll (only when JS is active) ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--i, 0) * 60ms); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .docs { grid-template-columns: 200px minmax(0, 1fr); }
  .docs__toc { display: none; }
}
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; gap: 72px; }
  .hero__visual { max-width: 560px; margin: 0 auto; width: 100%; }
  .features, .doc-cards { grid-template-columns: repeat(2, 1fr); }
  .quickstart { grid-template-columns: 1fr; gap: 40px; }
  .quickstart .section__head { position: static; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 40px; }
  .keys { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav__links {
    position: fixed; top: var(--nav-h); left: 12px; right: 12px; flex-direction: column; gap: 4px; padding: 12px;
    border-radius: 18px; background: var(--nav-bg); border: 1px solid var(--border);
    -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: var(--shadow);
    opacity: 0; transform: translateY(-10px); pointer-events: none; transition: opacity .25s, transform .25s var(--ease);
  }
  .nav__links.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav__links a { padding: 12px 14px; }
  .nav__burger { display: block; }
  .hero__scroll { display: none; }
  .nav__actions { margin-left: auto; }
  .nav__gh { display: none; }
  .nav.menu-open { background: var(--nav-bg); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
  .section { padding: 84px 0; }
  .features, .doc-cards { grid-template-columns: 1fr; }
  .docs { grid-template-columns: 1fr; gap: 24px; padding-top: 40px; }
  .docs__nav { position: static; flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .docs__nav .docs__label { width: 100%; }
  .float-card--a { left: -6px; }
  .float-card--b { right: -6px; }
  .cta { padding: 36px 28px; }
  .footer__inner { grid-template-columns: 1fr; }
  .step { grid-template-columns: 1fr; padding: 22px; }
  .keys { grid-template-columns: repeat(2, 1fr); }
  .tui__row { grid-template-columns: 26px minmax(0, 1fr) 56px 50px; }
  .tui__bar { display: none; }
}

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

.brand__logo { object-fit: contain; border-radius: 7px; }
.brand:hover .brand__logo { transform: none; }
