/* Nivoapps parent site — design system + components.
   One stylesheet, no build step. Sections, in order:
   fonts · tokens · base · layout · controls · header · section rail ·
   hero · marquee · cards & ecosystem · showcases · app windows ·
   feature explorer · task finder · principles · guides · FAQ · CTA ·
   product/page heroes · content pages · footer · motion · breakpoints.
   Color pairs were checked for WCAG AA contrast (≥ 4.5:1 for text). */

/* ------------------------------------------------------------------ */
/* Fonts — Geist (SIL OFL 1.1, see /assets/fonts/OFL-LICENSE.txt),     */
/* self-hosted so there's no third-party font request.                 */
/* ------------------------------------------------------------------ */
@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/assets/fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ------------------------------------------------------------------ */
/* Tokens                                                              */
/* ------------------------------------------------------------------ */
:root {
  color-scheme: light dark;
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --bg: #ffffff;
  --bg-raised: #f5f6fa;
  --surface: #ffffff;
  --surface-2: #f1f3f8;
  --fg: #0b1020;
  --fg-2: #2a3144;
  --muted: #566074;
  --border: #e3e6ee;
  --border-strong: #cdd2df;
  --accent: #2563eb;
  --accent-2: #7c3aed;
  --accent-fg: #ffffff;
  --focus: #2563eb;
  --grad: linear-gradient(115deg, #2563eb 0%, #7c3aed 55%, #c026d3 100%);
  --grad-soft: linear-gradient(135deg, color-mix(in srgb, #2563eb 12%, transparent), color-mix(in srgb, #7c3aed 12%, transparent));

  /* Product accent — the brand by default, overridden by .theme-* */
  --p: var(--accent);
  --p-2: var(--accent-2);
  --p-text: #1d4ed8;
  --p-soft: color-mix(in srgb, var(--p) 10%, transparent);
  --btn-bg: var(--accent);
  --btn-fg: #ffffff;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 30px -12px rgba(15, 23, 42, 0.14);
  --shadow-lg: 0 2px 4px rgba(15, 23, 42, 0.04), 0 30px 70px -28px rgba(15, 23, 42, 0.3);

  --radius-sm: 0.5rem;
  --radius: 0.875rem;
  --radius-lg: 1.25rem;
  --radius-xl: 1.75rem;

  --container: 76rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --section-y: clamp(4rem, 8vw, 6.25rem);
  --header-h: 4.25rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* App windows are always dark, like the real apps' editors. */
  --win-bg: #0d1117;
  --win-bar: #151b26;
  --win-raised: #121824;
  --win-border: #242c3b;
  --win-fg: #d6deeb;
  --win-muted: #8b95a7;
  --tk-key: #8ecbff;
  --tk-str: #a5e8b8;
  --tk-num: #ffb86b;
  --tk-bool: #c9b3ff;
  --tk-null: #ff8fa3;
  --tk-punc: #8b95a7;
  --tk-var: #fcd34d;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #07090f;
    --bg-raised: #0b0e16;
    --surface: #0f131d;
    --surface-2: #141925;
    --fg: #eef1f8;
    --fg-2: #c8cfdc;
    --muted: #98a1b3;
    --border: #1c2230;
    --border-strong: #2a3244;
    --accent: #7aa5ff;
    --accent-2: #a78bfa;
    --accent-fg: #07090f;
    --p-text: #7aa5ff;
    --focus: #7aa5ff;
    --grad: linear-gradient(115deg, #7aa5ff 0%, #a78bfa 55%, #e879f9 100%);
    --btn-bg: #7aa5ff;
    --btn-fg: #07090f;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -12px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.3), 0 30px 70px -24px rgba(0, 0, 0, 0.8);
  }
}

/* Product identities. JSON Editor Pro: the app's own cyan (oklch hue
   200) + its icon's violet. Voyager: its logo's signal red + ink. */
.theme-jep {
  --p: #0891b2;
  --p-2: #7c3aed;
  --p-text: #0e7490;
  --btn-bg: #0e7490;
  --btn-fg: #ffffff;
}
.theme-voyager {
  --p: #e5372b;
  --p-2: #f97316;
  --p-text: #c8331f;
  --btn-bg: #c8331f;
  --btn-fg: #ffffff;
}
@media (prefers-color-scheme: dark) {
  .theme-jep { --p: #22d3ee; --p-text: #22d3ee; --btn-bg: #22d3ee; --btn-fg: #07090f; }
  .theme-voyager { --p: #ff7a6b; --p-text: #ff7a6b; --btn-bg: #ff7a6b; --btn-fg: #07090f; }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  position: relative;
}

main { flex: 1; }

a { color: inherit; }
img, svg { max-width: 100%; }
img { display: block; height: auto; }

.icon {
  display: inline-block;
  width: 1.1em;
  height: 1.1em;
  flex-shrink: 0;
  vertical-align: -0.15em;
}

h1, h2, h3, h4 {
  margin: 0;
  color: var(--fg);
  font-weight: 640;
  letter-spacing: -0.028em;
  line-height: 1.1;
  text-wrap: balance;
}
h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.9rem, 3.8vw, 2.9rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.015em; line-height: 1.3; }
h4 { font-size: 1rem; letter-spacing: -0.01em; line-height: 1.35; }
p { margin: 0; color: var(--muted); text-wrap: pretty; }
strong { color: var(--fg); font-weight: 620; }

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6em;
  height: 1.6em;
  padding: 0 0.35em;
  font: 500 0.78rem/1 var(--font-mono);
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 0.35rem;
}

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

::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1rem;
  font: 500 0.75rem/1.2 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--p-text);
}
.eyebrow::before {
  content: "";
  width: 1.5rem;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}
.center .eyebrow, .eyebrow.center { justify-content: center; }

.lede {
  font-size: clamp(1.05rem, 1.35vw, 1.2rem);
  line-height: 1.65;
  max-width: 42rem;
  color: var(--muted);
}

.grad-text {
  background: var(--grad);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0.75rem;
  z-index: 100;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { left: 0.75rem; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Soft brand glow at the very top of every page. */
.page-glow {
  position: absolute;
  inset: 0 0 auto;
  height: 38rem;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(40rem 22rem at 15% -10%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
    radial-gradient(36rem 20rem at 85% -5%, color-mix(in srgb, var(--accent-2) 12%, transparent), transparent 70%);
}
.page-home .page-glow { display: none; }

/* ------------------------------------------------------------------ */
/* Layout                                                              */
/* ------------------------------------------------------------------ */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.container--narrow { max-width: calc(48rem + var(--gutter) * 2); }

.section { padding: var(--section-y) 0; position: relative; }
.section--tight { padding: clamp(3rem, 6vw, 5rem) 0; }
.section--flush-top { padding-top: 0; }
.section--raised { background: var(--bg-raised); }

.section-head { max-width: 46rem; margin-bottom: clamp(2.25rem, 4vw, 3.5rem); }
.section-head h1 + .lede,
.section-head h2 + .lede { margin-top: 1.1rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .lede { margin-inline: auto; }

.split-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: clamp(2.25rem, 4vw, 3.5rem);
}
.split-head .section-head { margin-bottom: 0; }

.split {
  display: grid;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.split--start { align-items: start; }
.split > * { min-width: 0; }
@media (min-width: 1024px) {
  .split { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); }
}

.muted-note { font-size: 0.95rem; max-width: 34rem; }

/* ------------------------------------------------------------------ */
/* Controls                                                            */
/* ------------------------------------------------------------------ */
.btn {
  --h: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: var(--h);
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 560 0.95rem/1.2 var(--font-sans);
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    translate 0.25s var(--ease-out),
    box-shadow 0.25s var(--ease-out),
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}
.btn .icon { transition: translate 0.25s var(--ease-out); }
.btn:hover { translate: 0 -1px; }
.btn:hover .icon { translate: 2px 0; }
.btn:active { translate: 0 0; }
.btn-sm { --h: 2.35rem; padding: 0.4rem 1rem; font-size: 0.9rem; }
.btn-lg { --h: 3.15rem; padding: 0.7rem 1.55rem; font-size: 1rem; }
.btn-block { width: 100%; white-space: normal; }

.btn-primary {
  background: var(--btn-bg);
  color: var(--btn-fg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 1px 2px rgba(15, 23, 42, 0.12),
    0 8px 20px -10px color-mix(in srgb, var(--btn-bg) 80%, transparent);
}
.btn-primary:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 2px 4px rgba(15, 23, 42, 0.12),
    0 14px 30px -12px color-mix(in srgb, var(--btn-bg) 90%, transparent);
}
.btn-secondary {
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  color: var(--fg);
  border-color: var(--border-strong);
}
.btn-secondary:hover { border-color: var(--p-text); }
.btn-ghost { background: transparent; color: var(--p-text); padding-inline: 0.85rem; }
.btn-ghost:hover { background: var(--p-soft); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--p-text);
  font-weight: 560;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.3s var(--ease-out);
}
.text-link:hover { background-size: 100% 1px; }
.text-link .icon { transition: translate 0.25s var(--ease-out); }
.text-link:hover .icon { translate: 2px 0; }

.link-btn {
  appearance: none;
  border: 0;
  background: none;
  padding: 0.25rem 0;
  font: 500 0.82rem var(--font-sans);
  color: var(--p-text);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
}
.link-btn:hover { text-decoration-color: currentColor; }

.badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  font: 500 0.7rem/1.2 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--p-soft);
  color: var(--p-text);
  border: 1px solid color-mix(in srgb, var(--p) 22%, transparent);
}

/* ------------------------------------------------------------------ */
/* Header                                                              */
/* ------------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  isolation: isolate;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
/* The frosted backdrop lives on a pseudo-element: backdrop-filter on the
   header itself would make it the containing block for the fixed-position
   mobile sheet inside it, collapsing the sheet to the header's height. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.site-header.is-scrolled, .nav-open .site-header, .no-js .site-header { border-bottom-color: var(--border); }
.site-header.is-scrolled::before, .nav-open .site-header::before, .no-js .site-header::before { opacity: 1; }
.nav-open .site-header::before { background: var(--bg); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: var(--header-h);
  transition: height 0.3s var(--ease-out);
}
.site-header.is-scrolled .header-inner { height: 3.6rem; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-weight: 650;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
  color: var(--fg);
  flex-shrink: 0;
  margin-right: auto;
}
.brand img { width: 1.9rem; height: 1.9rem; transition: rotate 0.5s var(--ease-out); }
.brand:hover img { rotate: -8deg; }

.primary-nav { display: none; }
.nav-links { display: flex; align-items: center; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.nav-links > li { position: relative; display: flex; align-items: center; }
.nav-link {
  position: relative;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--fg); }
.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0.15rem;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--grad);
}
.nav-item--menu .nav-link { padding-right: 0.2rem; }
.nav-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  margin-left: 0.1rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.nav-menu-toggle:hover { color: var(--fg); background: var(--surface-2); }
.nav-menu-toggle .icon { width: 0.95rem; height: 0.95rem; transition: rotate 0.3s var(--ease-out); }
.nav-item--menu.is-open .nav-menu-toggle .icon { rotate: 180deg; }

/* Products disclosure menu */
.mega {
  position: absolute;
  top: calc(100% + 0.9rem);
  left: 50%;
  width: min(44rem, calc(100vw - 2rem));
  translate: -42% 6px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, translate 0.3s var(--ease-out), visibility 0s linear 0.3s;
  z-index: 50;
}
.mega::before { /* hover bridge across the gap */
  content: "";
  position: absolute;
  inset: -1rem 0 100%;
}
.nav-item--menu.is-open .mega {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  translate: -42% 0;
  transition-delay: 0s;
}
.mega-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 0.5rem;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-lg);
}
.mega-products, .mega-aside { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.25rem; }
.mega-aside { padding: 0.5rem; border-radius: var(--radius); background: var(--bg-raised); align-content: start; }

.menu-product {
  position: relative;
  display: flex;
  gap: 0.85rem;
  padding: 0.85rem;
  border-radius: var(--radius);
  transition: background-color 0.2s ease;
}
.menu-product:hover { background: var(--surface-2); }
.menu-product img { width: 2.5rem; height: 2.5rem; border-radius: 0.65rem; flex-shrink: 0; }
.menu-product-body { display: grid; gap: 0.15rem; min-width: 0; }
.menu-product-name { font-weight: 620; color: var(--fg); text-decoration: none; }
.menu-product-name:hover { color: var(--p-text); }
.menu-product-tagline { font-size: 0.84rem; color: var(--muted); line-height: 1.45; }
.menu-product-open {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.3rem;
  width: fit-content;
  font-size: 0.8rem;
  font-weight: 560;
  color: var(--p-text);
  text-decoration: none;
}
.menu-product-open:hover { text-decoration: underline; text-underline-offset: 3px; }
.menu-product--jep { --p: #0891b2; --p-text: #0e7490; }
.menu-product--voyager { --p: #e5372b; --p-text: #c8331f; }
@media (prefers-color-scheme: dark) {
  .menu-product--jep { --p-text: #22d3ee; }
  .menu-product--voyager { --p-text: #ff7a6b; }
}

.mega-aside a {
  display: flex;
  gap: 0.7rem;
  padding: 0.65rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--fg);
  transition: background-color 0.2s ease;
}
.mega-aside a:hover { background: var(--surface); }
.mega-aside .icon { width: 1.15rem; height: 1.15rem; margin-top: 0.15rem; color: var(--accent); }
.mega-aside span { display: grid; }
.mega-aside strong { font-size: 0.9rem; font-weight: 600; }
.mega-aside small { font-size: 0.78rem; color: var(--muted); }

.nav-actions { display: flex; align-items: center; gap: 0.5rem; }
.nav-cta { display: none; }

.menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  color: var(--fg);
  cursor: pointer;
}
.menu-button-lines { position: relative; width: 1.1rem; height: 0.7rem; }
.menu-button-lines span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.6px;
  border-radius: 2px;
  background: currentColor;
  transition: translate 0.3s var(--ease-out), rotate 0.3s var(--ease-out), top 0.3s var(--ease-out);
}
.menu-button-lines span:first-child { top: 0; }
.menu-button-lines span:last-child { top: calc(100% - 1.6px); }
.menu-button[aria-expanded="true"] .menu-button-lines span:first-child { top: calc(50% - 0.8px); rotate: 45deg; }
.menu-button[aria-expanded="true"] .menu-button-lines span:last-child { top: calc(50% - 0.8px); rotate: -45deg; }

.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  pointer-events: none;
}
.scroll-progress span {
  display: block;
  height: 100%;
  background: var(--grad);
  transform-origin: 0 50%;
  transform: scaleX(var(--progress, 0));
}

/* Mobile navigation sheet */
.mobile-nav {
  position: fixed;
  inset: var(--header-h) 0 0;
  z-index: 39;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg);
  opacity: 0;
  visibility: hidden;
  translate: 0 -0.75rem;
  transition: opacity 0.25s ease, translate 0.35s var(--ease-out), visibility 0s linear 0.35s;
}
.site-header.is-scrolled .mobile-nav { top: 3.6rem; }
.mobile-nav.is-open {
  opacity: 1;
  visibility: visible;
  translate: 0 0;
  transition-delay: 0s;
}
.mobile-nav-inner { display: grid; gap: 1.25rem; padding: 1.25rem var(--gutter) 2.5rem; max-width: 40rem; margin: 0 auto; }
.mobile-nav-label { font: 500 0.72rem var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; }
.mobile-products { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.mobile-products .menu-product { border: 1px solid var(--border); background: var(--surface); }
.mobile-links { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.mobile-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0.25rem;
  border-bottom: 1px solid var(--border);
  font-size: 1.15rem;
  font-weight: 560;
  color: var(--fg);
  text-decoration: none;
}
.mobile-links a[aria-current="page"] { color: var(--p-text); }
.mobile-links .icon { color: var(--muted); }
.nav-open { overflow: hidden; }

@media (min-width: 640px) {
  .nav-cta { display: inline-flex; }
}
@media (min-width: 960px) {
  .primary-nav { display: block; }
  .brand { margin-right: 0; }
  .primary-nav { margin: 0 auto; }
  .menu-button, .mobile-nav { display: none; }
}

/* ------------------------------------------------------------------ */
/* Section rail (homepage, wide screens)                               */
/* ------------------------------------------------------------------ */
.section-rail { display: none; }
@media (min-width: 1360px) {
  .section-rail {
    display: block;
    position: fixed;
    right: 1.25rem;
    top: 50%;
    z-index: 30;
    translate: 0.75rem -50%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, translate 0.45s var(--ease-out), visibility 0s linear 0.45s;
  }
  .section-rail.is-visible { opacity: 1; visibility: visible; translate: 0 -50%; transition-delay: 0s; }
  .section-rail ol { list-style: none; margin: 0; padding: 0.4rem; display: grid; gap: 0.15rem; }
  .section-rail a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 1.5rem;
    height: 1.5rem;
    text-decoration: none;
  }
  .section-rail a::after {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 99px;
    background: var(--border-strong);
    transition: height 0.35s var(--ease-out), background-color 0.3s ease;
  }
  .section-rail a span {
    position: absolute;
    right: 1.75rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 500;
    white-space: nowrap;
    color: var(--fg);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    opacity: 0;
    translate: 0.4rem 0;
    pointer-events: none;
    transition: opacity 0.2s ease, translate 0.25s var(--ease-out);
  }
  .section-rail a:hover span, .section-rail a:focus-visible span { opacity: 1; translate: 0 0; }
  .section-rail a[aria-current="true"]::after { height: 1.25rem; background: var(--grad); }
}

/* ------------------------------------------------------------------ */
/* Hero                                                                */
/* ------------------------------------------------------------------ */
.hero {
  position: relative;
  /* Pulled up under the transparent sticky header so the backdrop runs
     to the top edge; padding puts the content back below it. */
  margin-top: calc(var(--header-h) * -1);
  padding: calc(var(--header-h) + clamp(2.5rem, 7vw, 5rem)) 0 clamp(4.5rem, 8vw, 6.5rem);
  overflow: clip;
  isolation: isolate;
}
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-mesh { position: absolute; inset: -10% -5% 0; filter: blur(60px); opacity: 0.9; }
.hero-mesh i {
  position: absolute;
  border-radius: 50%;
  animation: drift 22s var(--ease-in-out) infinite alternate;
}
.hero-mesh i:nth-child(1) { width: 46vw; height: 36vw; left: -8%; top: -12%; background: color-mix(in srgb, #2563eb 26%, transparent); }
.hero-mesh i:nth-child(2) { width: 40vw; height: 34vw; right: -6%; top: 2%; background: color-mix(in srgb, #7c3aed 22%, transparent); animation-duration: 26s; animation-delay: -6s; }
.hero-mesh i:nth-child(3) { width: 34vw; height: 26vw; left: 30%; bottom: -10%; background: color-mix(in srgb, #06b6d4 16%, transparent); animation-duration: 30s; animation-delay: -12s; }
@media (prefers-color-scheme: dark) {
  .hero-mesh { opacity: 0.75; }
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--fg) 7%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--fg) 7%, transparent) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 60% 35%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 60% 35%, #000 20%, transparent 75%);
}

.hero-layout {
  display: grid;
  gap: clamp(3rem, 6vw, 4rem);
  align-items: center;
}
.hero-copy { max-width: 40rem; }
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
  padding: 0.35rem 0.85rem 0.35rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font: 500 0.78rem/1.3 var(--font-mono);
  letter-spacing: 0.04em;
  color: var(--fg-2);
}
.pulse-dot {
  position: relative;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #22c55e;
}
.pulse-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: inherit;
  animation: ping 2.4s var(--ease-out) infinite;
}
.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  font-weight: 660;
  line-height: 1.02;
  letter-spacing: -0.045em;
}
.hero-line { display: block; }
.hero h1 .grad-text { padding-bottom: 0.06em; }
.hero-lede { margin-top: 1.5rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  color: var(--fg-2);
}
.hero-points li { display: inline-flex; align-items: center; gap: 0.4rem; }
.hero-points .icon { color: #16a34a; }
@media (prefers-color-scheme: dark) { .hero-points .icon { color: #4ade80; } }

/* Staggered entrance — CSS only, so it runs before main.js loads. */
.hero-kicker, .hero .hero-line, .hero-lede, .hero .hero-ctas, .hero-points {
  animation: rise 0.9s var(--ease-out) both;
}
.hero-kicker { animation-delay: 0.05s; }
.hero .hero-line:nth-child(1) { animation-delay: 0.12s; }
.hero .hero-line:nth-child(2) { animation-delay: 0.22s; }
.hero-lede { animation-delay: 0.34s; }
.hero .hero-ctas { animation-delay: 0.44s; }
.hero-points { animation-delay: 0.54s; }
.hero h1 .hero-line.grad-text { animation: rise 0.9s var(--ease-out) 0.22s both, grad-pan 9s ease-in-out 1.2s infinite alternate; }

/* Ecosystem illustration */
.hero-art {
  --px: 0;
  --py: 0;
  position: relative;
  width: 100%;
  max-width: 35rem;
  aspect-ratio: 560 / 520;
  margin-inline: auto;
  container-type: inline-size;
  animation: fade-in 1.2s var(--ease-out) 0.3s both;
}
.hero-art > * {
  position: absolute;
  translate: calc(var(--px) * var(--depth, 0) * 16px) calc(var(--py) * var(--depth, 0) * 16px);
  transition: translate 0.9s var(--ease-out);
}
.hero-art-glow {
  inset: 12% 8% 6% 14%;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 22%, transparent), transparent);
  filter: blur(30px);
}
.hero-links { inset: 0; width: 100%; height: 100%; overflow: visible; }
.hero-ring { fill: none; stroke: color-mix(in srgb, var(--fg) 12%, transparent); stroke-width: 1; stroke-dasharray: 2 6; }
.hero-ring--outer { stroke: color-mix(in srgb, var(--fg) 8%, transparent); }
.hero-link {
  fill: none;
  stroke: color-mix(in srgb, var(--accent) 55%, transparent);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-dasharray: 0.04 0.035;
  animation: draw-in 1.4s var(--ease-out) 0.6s both, flow 2.8s linear 2s infinite;
}
.hero-link--b, .hero-link--f { stroke: color-mix(in srgb, #e5372b 55%, transparent); }
.hero-link--e { stroke: color-mix(in srgb, #0891b2 60%, transparent); }
.hero-link--c { animation-delay: 0.75s, 2.2s; }
.hero-link--d { animation-delay: 0.85s, 2.4s; }

.hero-node {
  left: 71.43%;
  top: 25%;
  width: 4.5rem;
  height: 4.5rem;
  margin: -2.25rem 0 0 -2.25rem;
  display: grid;
  place-items: center;
  border-radius: 1.25rem;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg), 0 0 0 6px color-mix(in srgb, var(--accent) 8%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.hero-node img { width: 2.9rem; height: 2.9rem; }
.hero-node-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 1.6rem;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  animation: ring-pulse 3.2s var(--ease-out) infinite;
}

.hero-panel {
  width: 53.6%;
  font-family: var(--font-mono);
  font-size: clamp(9px, 2.05cqi, 12px);
  color: var(--win-fg);
  background: color-mix(in srgb, var(--win-bg) 94%, transparent);
  border: 1px solid var(--win-border);
  border-radius: 12px;
  box-shadow: 0 40px 80px -30px rgba(2, 6, 23, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  overflow: hidden;
  animation: float 9s var(--ease-in-out) infinite alternate;
}
.hero-panel--jep { left: 0; top: 5.8%; rotate: -2deg; }
.hero-panel--voy { left: 46.4%; top: 54.8%; rotate: 1.5deg; animation-duration: 11s; animation-delay: -4s; }
.hp-bar {
  display: flex;
  align-items: center;
  gap: 0.75em;
  padding: 0.7em 0.9em;
  background: var(--win-bar);
  border-bottom: 1px solid var(--win-border);
  color: var(--win-muted);
}
.hp-bar img { margin-left: auto; width: 1.5em; height: 1.5em; border-radius: 0.3em; }
.hp-code { margin: 0; padding: 0.8em 0; font: inherit; line-height: 1.65; counter-reset: ln; }
.hp-code .line { display: block; padding: 0 1em 0 3.2em; position: relative; white-space: pre; }
.hp-code .line::before {
  counter-increment: ln;
  content: counter(ln);
  position: absolute;
  left: 0;
  width: 2.3em;
  text-align: right;
  color: #4a5466;
}
.hp-status {
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.6em 0.9em;
  border-top: 1px solid var(--win-border);
  color: #4ade80;
  background: #0a0e14;
}
.hp-status span { margin-left: auto; color: var(--win-muted); }
.hp-req { display: flex; align-items: center; gap: 0.7em; padding: 0.85em 0.9em 0.5em; }
.hp-req b { color: #34d399; font-weight: 600; }
.hp-resp { display: flex; align-items: center; gap: 0.7em; padding: 0.2em 0.9em 0.3em; color: var(--win-muted); }
.hp-pill { padding: 0.15em 0.55em; border-radius: 99px; background: rgba(52, 211, 153, 0.14); color: #34d399; font-weight: 600; }

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.55em 0.9em;
  border-radius: 999px;
  font-size: clamp(10px, 2.2cqi, 13px);
  font-weight: 550;
  white-space: nowrap;
  color: var(--fg);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: float 7s var(--ease-in-out) infinite alternate;
}
.hero-chip kbd { font-size: 0.85em; }
.hero-chip .icon { color: var(--accent); }
.hero-chip--a { right: 0; top: 1.5%; animation-delay: -2s; }
.hero-chip--b { right: 0; top: 43%; animation-delay: -5s; }
.hero-chip--b .icon { color: #e5372b; }
.hero-chip--c { left: 0; top: 61.5%; animation-delay: -1s; }
.hero-chip--c .icon { color: #0891b2; }
.hero-chip--d { left: 6%; top: 77%; animation-delay: -3.5s; }

.hero-particles { inset: 0; pointer-events: none; }
.hero-particles i {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 60%, transparent);
  animation: particle 12s linear infinite;
  animation-delay: calc(var(--i) * -1.3s);
  opacity: 0;
}
.hero-particles i:nth-child(1) { left: 62%; top: 70%; }
.hero-particles i:nth-child(2) { left: 84%; top: 34%; background: color-mix(in srgb, #7c3aed 60%, transparent); }
.hero-particles i:nth-child(3) { left: 30%; top: 56%; }
.hero-particles i:nth-child(4) { left: 92%; top: 86%; background: color-mix(in srgb, #e5372b 50%, transparent); }
.hero-particles i:nth-child(5) { left: 12%; top: 92%; }
.hero-particles i:nth-child(6) { left: 56%; top: 8%; background: color-mix(in srgb, #0891b2 60%, transparent); }
.hero-particles i:nth-child(7) { left: 40%; top: 96%; }
.hero-particles i:nth-child(8) { left: 74%; top: 52%; width: 3px; height: 3px; }
.hero-particles i:nth-child(9) { left: 22%; top: 50%; width: 3px; height: 3px; }
.hero-particles i:nth-child(10) { left: 96%; top: 14%; }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 1.5rem;
  translate: -50% 0;
  display: none;
  align-items: center;
  gap: 0.6rem;
  font: 500 0.72rem var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  animation: fade-in 1s ease 1.2s both;
}
.scroll-cue:hover { color: var(--fg); }
.scroll-cue-mouse {
  position: relative;
  width: 1.2rem;
  height: 1.85rem;
  border: 1.5px solid currentColor;
  border-radius: 1rem;
}
.scroll-cue-mouse i {
  position: absolute;
  left: 50%;
  top: 0.35rem;
  width: 3px;
  height: 6px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: currentColor;
  animation: scroll-dot 1.8s var(--ease-in-out) infinite;
}

/* Once the hero scrolls away, its looping decoration stops. */
.hero.is-offscreen *, .hero.is-offscreen *::before, .hero.is-offscreen *::after { animation-play-state: paused !important; }

/* Small screens: a simpler two-panel composition, no chips or wiring. */
@media (max-width: 639px) {
  .hero-art { aspect-ratio: 1 / 0.9; max-width: 26rem; }
  .hero-links, .hero-chip, .hero-node, .hero-particles { display: none; }
  .hero-panel { width: 82%; font-size: clamp(9.5px, 2.8cqi, 12px); }
  .hero-panel--jep { left: 0; top: 0; }
  .hero-panel--voy { left: auto; right: 0; top: 46%; }
}
@media (min-width: 640px) and (max-width: 1023px) {
  .hero-art { max-width: 32rem; }
}
@media (min-width: 1024px) {
  .hero { min-height: min(56rem, 100svh); display: flex; flex-direction: column; justify-content: center; }
  .hero-layout { grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr); }
  .scroll-cue { display: inline-flex; }
}

/* ------------------------------------------------------------------ */
/* Capability marquee                                                  */
/* ------------------------------------------------------------------ */
.marquee {
  position: relative;
  overflow: hidden;
  padding: 1.1rem 0;
  border-block: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-raised) 70%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-inner { display: flex; width: max-content; animation: marquee 60s linear infinite; }
.marquee:hover .marquee-inner { animation-play-state: paused; }
.marquee-track {
  display: flex;
  gap: 2.5rem;
  margin: 0;
  padding: 0 1.25rem;
  list-style: none;
}
.marquee-track li {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  white-space: nowrap;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--fg-2);
}
.marquee-track .icon { color: var(--accent); }

/* ------------------------------------------------------------------ */
/* Product cards + ecosystem                                           */
/* ------------------------------------------------------------------ */
.product-grid, .related-grid, .ecosystem-cards {
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.75rem);
}
@media (min-width: 860px) {
  .product-grid, .related-grid, .ecosystem-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .related-grid:has(> :only-child) { grid-template-columns: minmax(0, 36rem); }
}

.product-card {
  --rx: 0deg;
  --ry: 0deg;
  --mx: 50%;
  --my: 0%;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  padding: clamp(1.4rem, 3vw, 2.1rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  isolation: isolate;
  transform: perspective(1100px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.6s var(--ease-out), box-shadow 0.4s ease, border-color 0.3s ease;
}
.product-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--p), var(--p-2));
}
.product-card:hover {
  border-color: color-mix(in srgb, var(--p) 35%, var(--border));
  box-shadow: var(--shadow-lg);
}
.product-card-glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(28rem circle at var(--mx) var(--my), color-mix(in srgb, var(--p) 12%, transparent), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.product-card:hover .product-card-glow { opacity: 1; }
.product-card-top { display: flex; align-items: center; gap: 1rem; }
.product-card-top > div { display: grid; gap: 0.4rem; }
.product-card h2, .product-card h3 { font-size: clamp(1.35rem, 2.2vw, 1.6rem); letter-spacing: -0.025em; }
.product-icon {
  width: 3.75rem;
  height: 3.75rem;
  flex-shrink: 0;
  border-radius: 1rem;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
  box-shadow: 0 10px 24px -14px color-mix(in srgb, var(--p) 70%, transparent);
}
.product-icon img { width: 100%; height: 100%; object-fit: contain; }
.product-card-tagline { font-size: 1.02rem; color: var(--fg-2); }
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.feature-list li { display: flex; gap: 0.6rem; font-size: 0.94rem; color: var(--fg); }
.feature-list .icon { color: var(--p-text); margin-top: 0.2rem; }
.card-ctas { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: auto; padding-top: 0.5rem; }

.ecosystem { padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.foundations { position: relative; margin-top: 1.5rem; text-align: center; }
.foundations-links { display: none; }
@media (min-width: 860px) {
  .foundations { margin-top: 0; padding-top: 3.25rem; }
  .foundations-links {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3.25rem;
    overflow: visible;
  }
  .foundations-links path {
    fill: none;
    stroke: var(--border-strong);
    stroke-width: 1.5;
    vector-effect: non-scaling-stroke;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
  }
  .js .foundations.is-visible .foundations-links path { animation: dash-draw 1.1s var(--ease-out) 0.2s forwards; }
  .no-js .foundations-links path { stroke-dashoffset: 0; }
}
.foundations-label {
  display: inline-block;
  margin-bottom: 0.9rem;
  font: 500 0.72rem var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.foundations-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.foundations-list li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.9rem;
  font-weight: 520;
  box-shadow: var(--shadow-sm);
}
.foundations-list .icon { color: var(--accent); }

/* ------------------------------------------------------------------ */
/* Product showcases                                                   */
/* ------------------------------------------------------------------ */
.showcase {
  position: relative;
  padding: var(--section-y) 0;
  isolation: isolate;
}
.showcase-backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(48rem 28rem at 85% 8%, color-mix(in srgb, var(--p) 9%, transparent), transparent 70%),
    radial-gradient(40rem 26rem at 0% 60%, color-mix(in srgb, var(--p-2) 6%, transparent), transparent 70%);
}
/* Voyager's band is ink in both schemes — its brand is ink + signal red. */
.showcase.theme-voyager {
  --bg: #0b0f19;
  --bg-raised: #0f1420;
  --surface: #111624;
  --surface-2: #171d2d;
  --fg: #eef1f8;
  --fg-2: #c8cfdc;
  --muted: #9aa3b6;
  --border: #1f2637;
  --border-strong: #2c354a;
  --focus: #a5c3ff;
  --p: #ff7a6b;
  --p-text: #ff7a6b;
  --btn-bg: #ff7a6b;
  --btn-fg: #0b0f19;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -12px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.3), 0 30px 70px -24px rgba(0, 0, 0, 0.8);
  color-scheme: dark;
  background: var(--bg);
  color: var(--fg);
}
.showcase.theme-voyager .showcase-backdrop {
  background:
    radial-gradient(50rem 30rem at 10% 0%, rgba(255, 122, 107, 0.12), transparent 70%),
    radial-gradient(40rem 30rem at 100% 100%, rgba(249, 115, 22, 0.07), transparent 70%),
    linear-gradient(to right, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 64px 64px;
}

.showcase-grid { display: grid; gap: clamp(2.5rem, 5vw, 4.5rem); align-items: center; }
@media (min-width: 1100px) {
  .showcase-grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
  .showcase--reverse .showcase-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
  .showcase--reverse .showcase-story { order: 2; }
}
.showcase-story h2 { margin: 1.25rem 0 1.75rem; }
.showcase-story > .lede { margin-bottom: 1.75rem; }
.showcase-id { display: inline-flex; align-items: center; gap: 0.75rem; }
.showcase-id img { width: 2.75rem; height: 2.75rem; border-radius: 0.8rem; box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--p) 80%, transparent); }
.showcase-id > span { display: grid; line-height: 1.25; }
.showcase-id strong { font-size: 1rem; }
.showcase-id small { font: 500 0.72rem var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--p-text); }

.ps { display: grid; gap: 0.75rem; margin-bottom: 1.75rem; }
.ps-item {
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  border-left: 3px solid var(--border-strong);
}
.ps-item--solution { border-left-color: var(--p); }
.ps-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
  font: 600 0.74rem var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg);
}
.ps-item--problem .icon { color: #d97706; }
.ps-item--solution .icon { color: var(--p-text); }
.ps-item p:not(.ps-label) { font-size: 0.95rem; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 0 0 1.75rem;
  padding: 1.15rem 0;
  border-block: 1px solid var(--border);
}
.stat { display: flex; flex-direction: column; gap: 0.3rem; }
.stat dd { order: -1; }
.stat dt { font-size: 0.82rem; color: var(--muted); line-height: 1.35; }
.stat dd {
  margin: 0;
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  font-weight: 640;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(120deg, var(--p), var(--p-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.showcase .hero-ctas { margin-top: 0; }

.showcase-preview { min-width: 0; }
.showcase-sub { margin-top: clamp(4rem, 8vw, 6rem); }
.sub-heading {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
  font-size: clamp(1.3rem, 2.4vw, 1.65rem);
}
.sub-heading::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.showcase-foot {
  display: grid;
  gap: 2rem;
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}
@media (min-width: 1024px) {
  .showcase-foot { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 3.5rem; }
}
.audiences-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font: 500 0.72rem var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.audience-list {
  display: grid;
  gap: 1.25rem 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 640px) { .audience-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.audience-list li { padding-left: 1rem; border-left: 2px solid color-mix(in srgb, var(--p) 45%, transparent); }
.audience-list h3, .audience-list h4 { font-size: 1rem; margin-bottom: 0.25rem; }
.audience-list p { font-size: 0.92rem; }

.shortcuts { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.shortcuts li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--fg-2);
}
.shortcuts .keys { display: inline-flex; gap: 0.25rem; order: 2; }

.platforms {
  display: grid;
  gap: 1rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}
@media (min-width: 760px) { .platforms { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); } }
.platform {
  display: grid;
  gap: 0.35rem;
  align-content: start;
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
}
.platform strong { font-size: 1.1rem; }
.platform p { font-size: 0.92rem; }
.platform-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: fit-content;
  font: 500 0.7rem var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #15803d;
}
.platform-status::before { content: ""; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: currentColor; }
.platform--coming-soon { border-style: dashed; background: transparent; }
.platform--coming-soon .platform-status { color: var(--muted); }
@media (prefers-color-scheme: dark) { .platform-status { color: #4ade80; } }

.protocols {
  display: grid;
  gap: 1rem;
}
@media (min-width: 640px) { .protocols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .protocols { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.protocol-group {
  padding: 1.15rem 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 85%, transparent);
}
.protocol-group-name {
  margin-bottom: 0.6rem;
  font: 500 0.72rem var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--p-text);
}
.protocol-group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.15rem; }
.protocol-group li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.45rem 0;
  border-bottom: 1px dashed var(--border);
}
.protocol-group li:last-child { border-bottom: 0; }
.protocol-group li span { font-weight: 560; color: var(--fg); }
.protocol-group li small { font-size: 0.78rem; color: var(--muted); text-align: right; }

/* ------------------------------------------------------------------ */
/* App windows (always dark)                                           */
/* ------------------------------------------------------------------ */
.app-window {
  margin: 0;
  color: var(--win-fg);
  background: var(--win-bg);
  border: 1px solid var(--win-border);
  border-radius: 16px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 12.5px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 50px 100px -40px rgba(2, 6, 23, 0.55),
    0 20px 40px -24px color-mix(in srgb, var(--p) 40%, transparent);
  --focus: #7dd3fc;
  color-scheme: dark;
}
.win-bar {
  position: relative;
  display: flex;
  align-items: center;
  height: 2.4rem;
  padding: 0 0.9rem;
  background: var(--win-bar);
  border-bottom: 1px solid var(--win-border);
}
.win-dots { display: inline-flex; gap: 6px; }
.win-dots i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.win-dots i:nth-child(2) { background: #febc2e; }
.win-dots i:nth-child(3) { background: #28c840; }
.hp-bar .win-dots i { width: 0.75em; height: 0.75em; }
.win-title {
  position: absolute;
  left: 50%;
  translate: -50% 0;
  padding: 0.2rem 0.9rem;
  border-radius: 6px;
  background: #0d121b;
  border: 1px solid var(--win-border);
  font-size: 11px;
  color: var(--win-muted);
  white-space: nowrap;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.window-caption {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 0.9rem;
  border-top: 1px solid var(--win-border);
  background: #0a0d13;
  font: 11px/1.4 var(--font-mono);
  color: var(--win-muted);
}
.window-caption .icon { color: #fcd34d; }

.tk-key { color: var(--tk-key); }
.tk-str { color: var(--tk-str); }
.tk-num { color: var(--tk-num); }
.tk-bool { color: var(--tk-bool); }
.tk-null { color: var(--tk-null); }
.tk-punc { color: var(--tk-punc); }
.tk-var { color: var(--tk-var); }
.tk-kw { color: #c9b3ff; }
.tk-com { color: #6b7588; font-style: italic; }

.code {
  margin: 0;
  padding: 0.8rem 0;
  font: inherit;
  line-height: 1.7;
  counter-reset: ln;
  tab-size: 2;
}
.code .line { position: relative; display: block; padding: 0 1rem 0 3.4rem; white-space: pre; }
.code .line::before {
  counter-increment: ln;
  content: counter(ln);
  position: absolute;
  left: 0;
  width: 2.4rem;
  text-align: right;
  color: #4a5466;
}
.code--wrap .line { white-space: pre-wrap; word-break: break-all; }
.code .line--error { background: rgba(255, 95, 87, 0.12); box-shadow: inset 2px 0 0 #ff5f57; }
.code .line--error::before { color: #ff8f87; font-weight: 600; }

/* Segmented control (inside dark windows) */
.seg {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: #0a0e15;
  border: 1px solid var(--win-border);
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.seg::-webkit-scrollbar { display: none; }
.seg-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.38rem 0.7rem;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--win-muted);
  font: 500 12px/1.2 var(--font-sans);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.seg-btn:hover { color: var(--win-fg); }
.seg-btn[aria-selected="true"] { background: #1c2433; color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset; }
.seg-btn[aria-selected="true"] .icon { color: #22d3ee; }

.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--win-border);
  border-radius: 8px;
  background: #121823;
  color: var(--win-fg);
  font: 500 12px/1.2 var(--font-sans);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.chip-btn:hover:not(:disabled) { border-color: #3a4560; }
.chip-btn[aria-pressed="true"] { border-color: #22d3ee; background: rgba(34, 211, 238, 0.12); color: #fff; }
.chip-btn--danger[aria-pressed="true"] { border-color: #ff5f57; background: rgba(255, 95, 87, 0.14); }
.chip-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* JSON Editor Pro window */
.jep-doc-tabs {
  display: flex;
  gap: 1px;
  padding: 0 0.5rem;
  background: var(--win-bar);
  border-bottom: 1px solid var(--win-border);
  overflow: hidden;
}
.doc-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.85rem;
  color: var(--win-muted);
  font-size: 11.5px;
  white-space: nowrap;
  border-top: 2px solid transparent;
}
.doc-tab i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.doc-tab.is-active { background: var(--win-bg); color: var(--win-fg); border-top-color: #22d3ee; }
.jep-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--win-border);
}
.jep-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.jep-body { position: relative; height: 22.5rem; }
.view-panel { position: absolute; inset: 0; overflow: auto; outline-offset: -2px; }
.view-panel[hidden] { display: none; }
.view-panel.is-active { animation: panel-in 0.35s var(--ease-out); }

.jep-window [data-for] { display: none; }
.jep-window[data-state="formatted"] [data-for~="formatted"],
.jep-window[data-state="minified"] [data-for~="minified"],
.jep-window[data-state="broken"] [data-for~="broken"] { display: var(--d, block); }

.tree { list-style: none; margin: 0; padding: 0.8rem 1rem; line-height: 1.8; }
.tree ul { list-style: none; margin: 0 0 0 0.45rem; padding-left: 1rem; border-left: 1px dashed #263041; }
.tree summary {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0 0.35rem;
  border-radius: 5px;
  cursor: pointer;
  list-style: none;
}
.tree summary::-webkit-details-marker { display: none; }
.tree summary::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 5px solid var(--win-muted);
  border-block: 4px solid transparent;
  transition: rotate 0.2s ease;
}
.tree details[open] > summary::before { rotate: 90deg; }
.tree summary:hover { background: #151c28; }
.tree-leaf { padding-left: 1.05rem; }
.tree-key { color: var(--tk-key); }
.tree-count { color: var(--win-muted); font-size: 11px; }

.table-wrap { padding: 1rem; }
.jep-table { width: 100%; border-collapse: collapse; font: inherit; }
.jep-table caption { text-align: left; padding-bottom: 0.7rem; color: var(--tk-key); }
.jep-table caption span { color: var(--win-muted); }
.jep-table th, .jep-table td { padding: 0.55rem 0.75rem; border: 1px solid var(--win-border); text-align: left; }
.jep-table thead th { background: var(--win-raised); color: var(--win-fg); font-weight: 500; }
.jep-table tbody th { color: var(--win-muted); font-weight: 400; width: 2.5rem; }
.jep-table tbody tr:hover td { background: #121a26; }

.graph-wrap { padding: 0.75rem; height: 100%; display: grid; place-items: center; }
.graph { width: 100%; height: auto; max-height: 100%; font-family: var(--font-mono); font-size: 11px; }
.graph-link { fill: none; stroke: rgba(34, 211, 238, 0.55); stroke-width: 1.5; stroke-dasharray: 1; stroke-dashoffset: 0; }
.graph-node rect { fill: var(--win-raised); stroke: #2b3549; }
.graph-title { fill: #22d3ee; font-weight: 600; }
.graph-k { fill: var(--tk-key); }
.graph-v { fill: var(--win-fg); }
.view-panel.is-active .graph-link { animation: dash-draw-from 0.9s var(--ease-out) both; }
.view-panel.is-active .graph-node { animation: fade-in 0.5s var(--ease-out) both; animation-delay: calc(var(--i) * 70ms + 0.1s); }

.raw { margin: 0; padding: 0.9rem 1rem; font: inherit; line-height: 1.7; color: var(--win-fg); white-space: pre; }
.raw--wrap { white-space: pre-wrap; word-break: break-all; }

.view-invalid {
  height: 100%;
  padding: 2rem;
  place-content: center;
  justify-items: center;
  gap: 0.75rem;
  text-align: center;
  font-family: var(--font-sans);
}
.jep-window[data-state="broken"] .view-invalid { display: grid; }
.view-invalid .icon { width: 1.75rem; height: 1.75rem; color: #ff8f87; }
.view-invalid p { max-width: 32ch; font-size: 13px; color: var(--win-muted); }
.view-invalid strong { color: var(--win-fg); }

.jep-status {
  --d: inline-flex;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1rem;
  min-height: 2.25rem;
  padding: 0.45rem 0.9rem;
  border-top: 1px solid var(--win-border);
  background: #0a0e14;
  font-size: 11.5px;
  color: var(--win-muted);
}
.jep-status > span { align-items: center; gap: 0.35rem; }
.jep-status em { font-style: normal; color: #4ade80; }
.status-ok { color: #4ade80; }
.status-err { color: #ff8f87; }
.status-msg { color: var(--win-fg); }
.status-push { margin-left: auto; }

/* Voyager window */
.voyager-window { --p: #ff7a6b; }
.v-layout { display: grid; }
.v-sidebar { display: none; }
@media (min-width: 720px) {
  .v-layout { grid-template-columns: 11.5rem minmax(0, 1fr); }
  .v-sidebar {
    display: block;
    padding: 0.9rem 0.6rem;
    background: #0f141d;
    border-right: 1px solid var(--win-border);
    font-size: 11.5px;
  }
}
.v-ws { margin: 0 0.4rem 0.75rem; font: 600 11px var(--font-sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--win-fg); }
.v-folder { display: flex; align-items: center; gap: 0.4rem; margin: 0.6rem 0.4rem 0.2rem; color: var(--win-fg); }
.v-folder .icon { color: var(--win-muted); }
.v-folder--muted { margin-top: 1.2rem; color: var(--win-muted); }
.v-req { display: flex; align-items: center; gap: 0.5rem; margin: 0; padding: 0.3rem 0.4rem 0.3rem 1.3rem; border-radius: 6px; color: var(--win-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v-req b { color: var(--c); font-size: 10px; font-weight: 600; min-width: 2.4rem; }
.v-main { min-width: 0; display: flex; flex-direction: column; }
.v-protocols {
  display: flex;
  gap: 0.3rem;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--win-border);
  overflow-x: auto;
  scrollbar-width: none;
}
.v-protocols::-webkit-scrollbar { display: none; }
.v-proto {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  padding: 0.38rem 0.7rem;
  border: 1px solid var(--win-border);
  border-radius: 999px;
  background: transparent;
  color: var(--win-muted);
  font: 500 12px/1.2 var(--font-sans);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.v-proto i { width: 7px; height: 7px; border-radius: 50%; background: var(--proto); }
.v-proto:hover { color: var(--win-fg); border-color: #364057; }
.v-proto[aria-selected="true"] {
  color: #fff;
  border-color: color-mix(in srgb, var(--proto) 60%, transparent);
  background: color-mix(in srgb, var(--proto) 14%, transparent);
}
.v-panel { display: grid; gap: 0.8rem; padding: 0.9rem; min-height: 21rem; align-content: start; outline-offset: -2px; }
.v-panel[hidden] { display: none; }
.v-panel.is-active { animation: panel-in 0.35s var(--ease-out); }
.v-reqbar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.35rem 0.35rem 0.5rem;
  border: 1px solid var(--win-border);
  border-radius: 10px;
  background: var(--win-raised);
  min-width: 0;
}
.v-verb {
  flex-shrink: 0;
  padding: 0.22rem 0.5rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 11px;
  color: var(--proto);
  background: color-mix(in srgb, var(--proto) 14%, transparent);
}
.v-target { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--win-fg); }
.v-send {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  padding: 0.42rem 0.8rem;
  border: 0;
  border-radius: 7px;
  background: #c8331f;
  color: #fff;
  font: 600 12px/1.2 var(--font-sans);
  cursor: pointer;
  transition: background-color 0.2s ease, scale 0.15s ease;
}
.v-send:hover { background: #dc3b26; }
.v-send:active { scale: 0.96; }
.v-send .icon { width: 0.95rem; height: 0.95rem; }
.v-label { margin-bottom: 0.4rem; font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--win-muted); }
.v-kv { display: grid; gap: 0; margin: 0; border: 1px solid var(--win-border); border-radius: 8px; overflow: hidden; }
.v-kv div { display: grid; grid-template-columns: minmax(7rem, 0.4fr) 1fr; }
.v-kv div + div { border-top: 1px solid var(--win-border); }
.v-kv dt, .v-kv dd { margin: 0; padding: 0.4rem 0.6rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v-kv dt { color: var(--tk-key); border-right: 1px solid var(--win-border); }
.v-code {
  margin: 0;
  padding: 0.7rem 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--win-border);
  background: #0a0e15;
  font: inherit;
  line-height: 1.65;
  white-space: pre;
  overflow-x: auto;
}
.v-response-wrap { display: grid; gap: 0.5rem; }
.v-statusline { display: flex; align-items: center; gap: 0.7rem; color: var(--win-muted); }
.v-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-weight: 600;
  color: #34d399;
  background: rgba(52, 211, 153, 0.13);
}
.v-status--live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: blink 1.6s ease-in-out infinite;
}
.v-panel.is-active .v-status, .v-panel.is-replaying .v-status { animation: pop 0.5s var(--ease-out) 0.15s both; }
.v-panel.is-active .v-response { animation: fade-up 0.5s var(--ease-out) 0.25s both; }
.v-stream { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.v-msg {
  display: grid;
  grid-template-columns: 1.4rem minmax(0, 1fr);
  align-items: center;
  column-gap: 0.4rem;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--win-border);
  background: #0a0e15;
}
.v-panel.is-active .v-msg { animation: msg-in 0.45s var(--ease-out) both; animation-delay: calc(var(--i) * 220ms + 0.2s); }
.v-msg code { font: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v-msg small { grid-column: 2; font-size: 10.5px; color: var(--win-muted); }
.v-dir { font-weight: 700; text-align: center; }
.v-msg--out .v-dir { color: #fbbf24; }
.v-msg--in .v-dir { color: #34d399; }
.v-msg--sys { border-style: dashed; color: var(--win-muted); }
.v-msg--sys .v-dir { color: var(--win-muted); }
.v-where { display: flex; align-items: center; gap: 0.45rem; margin-top: auto; font-size: 11px; color: var(--win-muted); }

/* Code generation window */
.codegen-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.65rem 0.75rem;
  background: var(--win-bar);
  border-bottom: 1px solid var(--win-border);
}
.codegen-req { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--win-fg); }
.codegen-panel { padding: 0.8rem; height: 17rem; overflow: auto; }
.codegen-panel[hidden] { display: none; }
.codegen-panel .v-code { border: 0; background: transparent; padding: 0.2rem; overflow: visible; }
.codegen-panel.is-active { animation: panel-in 0.35s var(--ease-out); }

/* JSON playground */
.playground {
  display: grid;
  gap: 1rem;
  padding: clamp(1rem, 2.5vw, 1.5rem);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}
@media (min-width: 1024px) {
  .playground { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; }
  .pg-controls { flex-direction: column; justify-content: center; }
  .pg-status { grid-column: 1 / -1; }
}
.pg-pane { display: grid; grid-template-rows: auto 1fr; gap: 0.5rem; min-width: 0; }
.pg-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-weight: 600; font-size: 0.9rem; color: var(--fg); }
.pg-input, .pg-output {
  width: 100%;
  min-height: 18rem;
  margin: 0;
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--win-border);
  background: var(--win-bg);
  color: var(--win-fg);
  font: 13px/1.65 var(--font-mono);
  color-scheme: dark;
}
.pg-input { resize: vertical; }
.pg-input:focus-visible { outline-offset: 2px; }
.pg-output { overflow: auto; max-height: 26rem; padding: 0.8rem 0; }
.pg-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.pg-indent { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.85rem; color: var(--muted); }
.pg-indent select {
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--fg);
  font: inherit;
}
.pg-status { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; font-size: 0.9rem; }
.pg-status .status-ok, .pg-status .status-err { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 600; }
.pg-status .status-ok { color: #15803d; }
.pg-status .status-err { color: #c42b1c; }
@media (prefers-color-scheme: dark) {
  .pg-status .status-ok { color: #4ade80; }
  .pg-status .status-err { color: #ff8f87; }
}

/* ------------------------------------------------------------------ */
/* Feature explorer                                                    */
/* ------------------------------------------------------------------ */
.explorer {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 900px) {
  .explorer { grid-template-columns: 14rem minmax(0, 1fr); gap: 2.5rem; align-items: start; }
}
.explorer-tabs {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: thin;
}
@media (min-width: 900px) {
  .explorer-tabs { flex-direction: column; overflow: visible; position: sticky; top: calc(var(--header-h) + 1.5rem); }
}
.explorer-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
  padding: 0.7rem 0.95rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font: 560 0.95rem/1.2 var(--font-sans);
  text-align: left;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.25s ease, border-color 0.25s ease;
}
.explorer-tab:hover { color: var(--fg); background: var(--surface-2); }
.explorer-tab[aria-selected="true"] {
  color: var(--fg);
  background: var(--surface);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.explorer-tab[aria-selected="true"] .icon { color: var(--p-text); }
.explorer-tab[aria-selected="true"]::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 25%;
  bottom: 25%;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(var(--p), var(--p-2));
}
.explorer-panel { outline-offset: 6px; }
.explorer-panel[hidden] { display: none; }
.explorer-intro { margin-bottom: 1.5rem; max-width: 40rem; }
.explorer-intro h3 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); margin-bottom: 0.6rem; letter-spacing: -0.025em; }
.explorer-items {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 640px) { .explorer-items { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.explorer-items li {
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  transition: border-color 0.25s ease, translate 0.3s var(--ease-out);
}
.explorer-items li:hover { border-color: color-mix(in srgb, var(--p) 40%, var(--border)); translate: 0 -2px; }
.explorer-panel.is-active .explorer-items li { animation: fade-up 0.5s var(--ease-out) both; animation-delay: calc(var(--i) * 45ms); }
.explorer-items h4 { margin-bottom: 0.35rem; }
.explorer-items h4 a { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--fg); text-decoration: none; }
.explorer-items h4 a .icon { width: 0.9rem; height: 0.9rem; color: var(--p-text); transition: translate 0.25s var(--ease-out); }
.explorer-items h4 a:hover { color: var(--p-text); }
.explorer-items h4 a:hover .icon { translate: 2px -2px; }
.explorer-items li { position: relative; }
.explorer-items h4 a::after { content: ""; position: absolute; inset: 0; } /* whole card is the link */
.explorer-items p { font-size: 0.92rem; }
/* No JS: show every group stacked, without the tabs. */
.no-js .explorer-tabs { display: none; }
.no-js .explorer { grid-template-columns: 1fr; }
.no-js .explorer-panel[hidden] { display: block; margin-top: 2rem; }

.detail-keys { margin-top: 3rem; max-width: 34rem; }

/* ------------------------------------------------------------------ */
/* Task finder                                                         */
/* ------------------------------------------------------------------ */
.finder-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.filter-chip {
  padding: 0.55rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--fg-2);
  font: 520 0.9rem/1.2 var(--font-sans);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.filter-chip:hover { border-color: var(--accent); }
.filter-chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.no-js .finder-filters { display: none; }

.finder-grid {
  display: grid;
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 600px) { .finder-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .finder-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .finder-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.task[hidden] { display: none; }
.finder-more { display: none; justify-content: center; margin-top: 1.25rem; }
.task.is-entering { animation: fade-up 0.4s var(--ease-out) both; }
.task a {
  position: relative;
  display: grid;
  align-content: start;
  gap: 0.35rem;
  height: 100%;
  padding: 1.1rem 1.15rem 1.2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  transition: border-color 0.25s ease, box-shadow 0.3s ease, translate 0.3s var(--ease-out);
}
.task a:hover { border-color: color-mix(in srgb, var(--p) 50%, var(--border)); box-shadow: var(--shadow); translate: 0 -3px; }
.task-product {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.25rem;
  font: 500 0.7rem var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--p-text);
}
.task-product img { width: 1.1rem; height: 1.1rem; border-radius: 0.3rem; }
.task-title { padding-right: 1.5rem; font-weight: 600; line-height: 1.35; color: var(--fg); }
.task-detail { font-size: 0.88rem; color: var(--muted); }
.task-go {
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: var(--muted);
  transition: color 0.2s ease, translate 0.3s var(--ease-out);
}
.task a:hover .task-go { color: var(--p-text); translate: 2px -2px; }

/* ------------------------------------------------------------------ */
/* Why Nivoapps                                                        */
/* ------------------------------------------------------------------ */
.why { background: var(--bg-raised); overflow: clip; }
.why-layout { display: grid; gap: clamp(2.5rem, 5vw, 5rem); }
@media (min-width: 1024px) {
  .why-layout { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: start; }
  .why-intro { position: sticky; top: calc(var(--header-h) + 3rem); }
}
.why-intro h2 { margin-bottom: 1.25rem; }
.why-intro .lede { margin-bottom: 1.5rem; }
.principles { list-style: none; margin: 0; padding: 0; counter-reset: p; }
.principle {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  transition: opacity 0.4s ease;
}
.principle:last-child { border-bottom: 1px solid var(--border); }
.principle-num {
  font: 500 0.8rem var(--font-mono);
  color: var(--muted);
  padding-top: 0.55rem;
  min-width: 1.6rem;
  transition: color 0.3s ease;
}
.principle-icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.8rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--accent);
  transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease, scale 0.4s var(--ease-out);
}
.principle h3 { margin: 0.35rem 0 0.4rem; font-size: 1.15rem; }
.principle p { font-size: 0.97rem; }
.principles.is-tracking .principle { opacity: 0.55; }
.principles.is-tracking .principle.is-current { opacity: 1; }
.principle.is-current .principle-num { color: var(--accent); }
.principle.is-current .principle-icon { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); scale: 1.06; }

/* ------------------------------------------------------------------ */
/* Guides                                                              */
/* ------------------------------------------------------------------ */
.guide-grid { display: grid; gap: 1rem; }
@media (min-width: 640px) { .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .guide-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.guide-feature { display: grid; gap: 1rem; }
.guide-feature-side { display: grid; gap: 1rem; }
@media (min-width: 900px) {
  .guide-feature { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .guide-feature-main .guide-card { height: 100%; padding: 2rem; justify-content: flex-end; min-height: 20rem; }
  .guide-feature-main .guide-card .guide-card-meta { margin-top: 0.75rem; }
  .guide-feature-main .guide-card::before {
    content: "{ }";
    position: absolute;
    top: 1.25rem;
    right: 1.75rem;
    font: 600 clamp(5rem, 9vw, 7.5rem)/1 var(--font-mono);
    letter-spacing: -0.08em;
    color: color-mix(in srgb, var(--accent) 12%, transparent);
    pointer-events: none;
  }
  .guide-feature-main .guide-card h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); letter-spacing: -0.025em; }
}
.guide-feature-main .guide-card {
  background:
    radial-gradient(30rem 18rem at 100% 0%, color-mix(in srgb, var(--accent-2) 14%, transparent), transparent 70%),
    radial-gradient(26rem 18rem at 0% 100%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%),
    var(--surface);
}
.guide-topic { margin: clamp(2.5rem, 5vw, 3.5rem) 0 1.25rem; font-size: 1.4rem; scroll-margin-top: calc(var(--header-h) + 1rem); }
.guide-topic:first-child { margin-top: 0; }
.guide-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: border-color 0.25s ease, box-shadow 0.3s ease, translate 0.3s var(--ease-out);
}
.guide-card:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); box-shadow: var(--shadow); translate: 0 -3px; }
.guide-card h3 { font-size: 1.08rem; line-height: 1.35; letter-spacing: -0.015em; }
.guide-card h3 a { text-decoration: none; color: var(--fg); }
.guide-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.guide-card p { font-size: 0.92rem; }
.guide-card .guide-card-meta { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 0.25rem; font-size: 0.8rem; }
.guide-card-go { color: var(--accent); transition: translate 0.3s var(--ease-out); }
.guide-card:hover .guide-card-go { translate: 3px 0; }

/* ------------------------------------------------------------------ */
/* FAQ                                                                 */
/* ------------------------------------------------------------------ */
.faq-layout { display: grid; gap: 2rem; }
@media (min-width: 1024px) {
  .faq-layout { grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr); gap: 4rem; align-items: start; }
  .faq-intro { position: sticky; top: calc(var(--header-h) + 2rem); }
}
.faq-intro h2 { margin-bottom: 1rem; }
.faq-list { display: grid; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:first-child { border-top: 1px solid var(--border); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 0.25rem;
  font-size: 1.05rem;
  font-weight: 580;
  letter-spacing: -0.01em;
  color: var(--fg);
  cursor: pointer;
  list-style: none;
  transition: color 0.2s ease;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--p-text); }
.faq-icon {
  position: relative;
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  transition: background-color 0.25s ease, border-color 0.25s ease, rotate 0.35s var(--ease-out);
}
.faq-icon::before, .faq-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.7rem;
  height: 1.5px;
  margin: -0.75px 0 0 -0.35rem;
  border-radius: 2px;
  background: currentColor;
  transition: rotate 0.35s var(--ease-out), opacity 0.25s ease;
}
.faq-icon::after { rotate: 90deg; }
.faq-item[open] .faq-icon { background: var(--fg); border-color: var(--fg); color: var(--bg); rotate: 180deg; }
.faq-item[open] .faq-icon::after { rotate: 0deg; opacity: 0; }
.faq-answer { overflow: hidden; }
.faq-answer p { padding: 0 3rem 1.4rem 0.25rem; font-size: 0.98rem; }

/* ------------------------------------------------------------------ */
/* CTA banner                                                          */
/* ------------------------------------------------------------------ */
.cta-banner {
  --bg: #0b0f19;
  --fg: #ffffff;
  --muted: #b7bfd2;
  --border-strong: rgba(255, 255, 255, 0.26);
  --surface: transparent;
  --focus: #a5c3ff;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(2.75rem, 7vw, 5.5rem) clamp(1.25rem, 5vw, 4rem);
  border-radius: var(--radius-xl);
  background: #0b0f19;
  color: #fff;
  text-align: center;
  color-scheme: dark;
}
.cta-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 10%, transparent 70%);
  mask-image: radial-gradient(ellipse at center, #000 10%, transparent 70%);
}
.cta-orbs { position: absolute; inset: 0; z-index: -2; filter: blur(50px); }
.cta-orbs i { position: absolute; border-radius: 50%; animation: drift 18s var(--ease-in-out) infinite alternate; }
.cta-orbs i:nth-child(1) { width: 26rem; height: 20rem; left: -6rem; top: -8rem; background: rgba(37, 99, 235, 0.55); }
.cta-orbs i:nth-child(2) { width: 24rem; height: 20rem; right: -6rem; bottom: -10rem; background: rgba(124, 58, 237, 0.5); animation-delay: -6s; }
.cta-orbs i:nth-child(3) { width: 16rem; height: 14rem; left: 40%; top: 30%; background: rgba(6, 182, 212, 0.25); animation-delay: -10s; }
.theme-jep .cta-orbs i:nth-child(1) { background: rgba(8, 145, 178, 0.55); }
.theme-voyager .cta-orbs i:nth-child(1) { background: rgba(229, 55, 43, 0.5); }
.theme-voyager .cta-orbs i:nth-child(2) { background: rgba(249, 115, 22, 0.35); }
.cta-content { position: relative; max-width: 42rem; margin: 0 auto; }
.cta-banner .eyebrow { justify-content: center; color: #a5c3ff; }
.cta-banner h2 { color: #fff; font-size: clamp(1.9rem, 4.5vw, 3.1rem); }
.cta-banner p { margin-top: 1rem; color: var(--muted); font-size: 1.08rem; }
.cta-banner .hero-ctas { justify-content: center; }
.cta-banner .btn-primary { --btn-bg: #ffffff; --btn-fg: #0b0f19; }
.cta-banner .btn-secondary { background: rgba(255, 255, 255, 0.06); color: #fff; }
.cta-banner .btn-secondary:hover { border-color: #fff; }

/* ------------------------------------------------------------------ */
/* Product hero (detail pages) and page heroes                         */
/* ------------------------------------------------------------------ */
.product-hero { position: relative; padding: clamp(1.5rem, 4vw, 2.5rem) 0 var(--section-y); isolation: isolate; }
.product-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(46rem 30rem at 85% 10%, color-mix(in srgb, var(--p) 14%, transparent), transparent 70%),
    radial-gradient(36rem 24rem at 0% 0%, color-mix(in srgb, var(--p-2) 10%, transparent), transparent 70%);
}
.product-hero-grid { display: grid; gap: clamp(2.5rem, 5vw, 4rem); align-items: center; margin-top: 1.5rem; }
@media (min-width: 1100px) { .product-hero-grid { grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); } }
.product-hero-copy h1 { margin: 1.25rem 0 0.75rem; font-size: clamp(2.6rem, 6vw, 4.4rem); letter-spacing: -0.045em; }
.product-headline {
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  font-weight: 560;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--fg);
  margin-bottom: 1rem;
}
.product-hero-copy > .showcase-id, .product-hero-copy > h1, .product-hero-copy > .product-headline,
.product-hero-copy > .lede, .product-hero-copy > .hero-ctas, .product-hero-copy > .hero-points {
  animation: rise 0.85s var(--ease-out) both;
}
.product-hero-copy > h1 { animation-delay: 0.06s; }
.product-hero-copy > .product-headline { animation-delay: 0.14s; }
.product-hero-copy > .lede { animation-delay: 0.22s; }
.product-hero-copy > .hero-ctas { animation-delay: 0.3s; }
.product-hero-copy > .hero-points { animation-delay: 0.38s; }
.product-hero-preview { min-width: 0; animation: rise-scale 1s var(--ease-out) 0.25s both; }

.page-hero { padding: clamp(1.5rem, 4vw, 2.5rem) 0 clamp(2.5rem, 5vw, 4rem); }
.page-hero h1 { margin-bottom: 1.1rem; animation: rise 0.8s var(--ease-out) 0.05s both; }
.page-hero .eyebrow { animation: rise 0.8s var(--ease-out) both; }
.page-hero .lede { animation: rise 0.8s var(--ease-out) 0.15s both; }
.page-hero.center { text-align: center; }
.page-hero.center .eyebrow { justify-content: center; }
.page-hero.center .lede { margin-inline: auto; }
.page-hero .breadcrumbs { margin-bottom: 2rem; }

.topic-jump { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.75rem 0 0; padding: 0; list-style: none; }
.topic-jump a {
  display: inline-block;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  font-size: 0.88rem;
  font-weight: 520;
  text-decoration: none;
  color: var(--fg-2);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.topic-jump a:hover { border-color: var(--accent); color: var(--fg); }

/* ------------------------------------------------------------------ */
/* Content pages                                                       */
/* ------------------------------------------------------------------ */
.breadcrumbs { font-size: 0.85rem; color: var(--muted); margin-bottom: 1.5rem; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin: 0; padding: 0; list-style: none; }
.breadcrumbs li + li::before { content: "/"; margin-right: 0.4rem; opacity: 0.5; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--p-text); }
.breadcrumbs [aria-current="page"] { color: var(--fg); }

.use-case-list { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; gap: 0.6rem; }
@media (min-width: 760px) { .use-case-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.use-case-list li {
  display: flex;
  gap: 0.7rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--fg);
}
.use-case-list .icon { color: var(--p-text); margin-top: 0.25rem; }

.callout-grid { display: grid; gap: 1rem; }
@media (min-width: 860px) { .callout-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.callout {
  padding: 1.35rem 1.4rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.95rem;
}
.callout-title { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; font-weight: 620; color: var(--fg); }
.callout-title .icon { color: var(--p-text); }

.glance-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.glance { width: 100%; min-width: 36rem; border-collapse: collapse; font-size: 0.95rem; }
.glance th, .glance td { padding: 1rem 1.15rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.glance tr:last-child th, .glance tr:last-child td { border-bottom: 0; }
.glance thead th { font-size: 1.05rem; font-weight: 620; color: var(--fg); }
.glance thead th img { display: inline-block; vertical-align: middle; width: 1.75rem; height: 1.75rem; margin-right: 0.6rem; border-radius: 0.5rem; }
.glance tbody th { width: 9rem; font: 500 0.75rem var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.glance td { color: var(--fg-2); }
.glance td small { color: var(--muted); }
.glance td .text-link { margin-right: 1rem; }

.contact-grid { display: grid; gap: 1rem; max-width: 64rem; margin: 0 auto; }
@media (min-width: 860px) { .contact-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.contact-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.contact-card h2 { font-size: 1.15rem; letter-spacing: -0.015em; }
.contact-card p { font-size: 0.93rem; flex: 1; }
.contact-icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.8rem;
  background: var(--grad-soft);
  color: var(--accent);
}

.prose { max-width: 44rem; margin: 0 auto; font-size: 1.04rem; line-height: 1.75; }
.prose h2 { margin: 2.75rem 0 1rem; font-size: clamp(1.4rem, 2.6vw, 1.75rem); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 2rem 0 0.75rem; }
.prose p, .prose li { color: var(--fg-2); }
.prose p { margin-bottom: 1.1rem; }
.prose p:last-child { margin-bottom: 0; }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1.1rem; }
.prose li { margin-bottom: 0.4rem; }
.prose li::marker { color: var(--accent); }
.prose a { color: var(--accent); text-underline-offset: 3px; }
.prose .muted { color: var(--muted); font-size: 0.92rem; }
.prose .muted { padding: 1rem 1.15rem; border-radius: var(--radius); background: var(--bg-raised); border: 1px solid var(--border); }
.section-head .muted { color: var(--muted); margin-top: 0.6rem; }

/* Guide article */
.article-head { margin-bottom: 2.5rem; }
.article-head h1 { margin: 0.9rem 0; font-size: clamp(1.9rem, 4.5vw, 2.75rem); line-height: 1.15; }
.article-meta { color: var(--muted); font-size: 0.9rem; margin: 0; }
.article { max-width: none; }
.article code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 0.35rem;
  padding: 0.08em 0.35em;
}
.article pre {
  margin: 0 0 1.4rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid var(--win-border);
  background: var(--win-bg);
  color: var(--win-fg);
  overflow-x: auto;
  line-height: 1.6;
}
.article pre code { background: none; border: 0; padding: 0; font-size: 0.85rem; color: inherit; }
.article table { width: 100%; border-collapse: collapse; margin: 0 0 1.4rem; font-size: 0.9rem; display: block; overflow-x: auto; }
.article th, .article td { border: 1px solid var(--border); padding: 0.55rem 0.75rem; text-align: left; vertical-align: top; }
.article th { background: var(--bg-raised); color: var(--fg); }

/* 404 */
.not-found { padding: clamp(3rem, 8vw, 6rem) 0 var(--section-y); text-align: center; }
.not-found .eyebrow { justify-content: center; }
.not-found .lede { margin: 1rem auto 0; }
.not-found .hero-ctas { justify-content: center; }
.not-found-code {
  font-size: clamp(6rem, 22vw, 12rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 1;
  margin-bottom: 1rem;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rise 0.9s var(--ease-out) both;
}
.not-found-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
}
.not-found-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--fg-2);
}
.not-found-links a:hover { border-color: var(--accent); color: var(--fg); }
.not-found-links img { width: 1.25rem; height: 1.25rem; border-radius: 0.3rem; }

/* ------------------------------------------------------------------ */
/* Footer                                                              */
/* ------------------------------------------------------------------ */
.site-footer {
  position: relative;
  overflow: hidden;
  padding: clamp(3.5rem, 7vw, 5rem) 0 0;
  border-top: 1px solid var(--border);
  background: var(--bg-raised);
}
.footer-grid { display: grid; gap: 2.5rem 2rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.footer-brand-col { grid-column: 1 / -1; max-width: 24rem; display: grid; gap: 0.75rem; align-content: start; }
@media (min-width: 900px) {
  .footer-grid { grid-template-columns: minmax(0, 1.8fr) repeat(4, minmax(0, 1fr)); }
  .footer-brand-col { grid-column: auto; }
}
.footer-brand { display: inline-flex; align-items: center; gap: 0.55rem; font-weight: 650; font-size: 1.1rem; letter-spacing: -0.02em; text-decoration: none; color: var(--fg); }
.footer-brand img { width: 1.75rem; height: 1.75rem; }
.footer-tagline { font-weight: 560; color: var(--fg); }
.footer-brand-col p:not(.footer-tagline) { font-size: 0.92rem; }
.footer-mail { display: inline-flex; align-items: center; gap: 0.5rem; width: fit-content; font-size: 0.92rem; color: var(--fg-2); text-decoration: none; }
.footer-mail:hover { color: var(--accent); }
.footer-heading {
  margin-bottom: 1rem;
  font: 500 0.72rem var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.65rem; }
.footer-col a { font-size: 0.93rem; color: var(--fg-2); text-decoration: none; transition: color 0.2s ease; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
}
.footer-top { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--muted); text-decoration: none; }
.footer-top:hover { color: var(--fg); }
.footer-top .icon-up { rotate: -90deg; }
.footer-wordmark {
  margin: 0 0 -0.16em;
  font-size: clamp(4.5rem, 21vw, 18rem);
  font-weight: 700;
  letter-spacing: -0.065em;
  line-height: 0.85;
  text-align: center;
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
  background: linear-gradient(180deg, color-mix(in srgb, var(--fg) 9%, transparent), transparent 85%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ------------------------------------------------------------------ */
/* Scroll reveal                                                       */
/* Hidden states only apply under .js (set before first paint); if     */
/* main.js never initializes, the fallback animation reveals anyway.   */
/* Uses the individual `translate`/`scale` properties so it composes   */
/* with the product cards' pointer tilt (`transform`).                 */
/* ------------------------------------------------------------------ */
.js [data-reveal] {
  opacity: 0;
  translate: 0 22px;
  transition:
    opacity 0.8s var(--ease-out) var(--reveal-delay, 0s),
    translate 0.9s var(--ease-out) var(--reveal-delay, 0s),
    scale 0.9s var(--ease-out) var(--reveal-delay, 0s),
    transform 0.6s var(--ease-out),
    box-shadow 0.4s ease,
    border-color 0.3s ease;
}
.js [data-reveal="scale"] { translate: 0 30px; scale: 0.96; }
.js [data-reveal].is-visible { opacity: 1; translate: 0 0; scale: 1; }
.js:not(.reveal-ready) [data-reveal] { animation: reveal-fallback 0.6s ease 2.5s forwards; }

/* ------------------------------------------------------------------ */
/* Keyframes                                                           */
/* ------------------------------------------------------------------ */
@keyframes rise { from { opacity: 0; translate: 0 24px; } to { opacity: 1; translate: 0 0; } }
@keyframes rise-scale { from { opacity: 0; translate: 0 30px; scale: 0.96; } to { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-up { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }
@keyframes panel-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes msg-in { from { opacity: 0; translate: -8px 0; } to { opacity: 1; translate: 0 0; } }
@keyframes pop { 0% { scale: 0.85; opacity: 0; } 60% { scale: 1.06; opacity: 1; } 100% { scale: 1; } }
@keyframes reveal-fallback { to { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(4%, 6%, 0) scale(1.12); } }
@keyframes float { from { transform: translateY(-5px); } to { transform: translateY(7px); } }
@keyframes grad-pan { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
@keyframes ping { 0% { scale: 1; opacity: 0.6; } 80%, 100% { scale: 3; opacity: 0; } }
@keyframes ring-pulse { 0% { scale: 0.92; opacity: 0.9; } 100% { scale: 1.35; opacity: 0; } }
@keyframes draw-in { from { stroke-dashoffset: 1; opacity: 0; } to { opacity: 1; } }
@keyframes flow { to { stroke-dashoffset: -0.75; } }
@keyframes dash-draw { to { stroke-dashoffset: 0; } }
@keyframes dash-draw-from { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes particle {
  0% { opacity: 0; transform: translate(0, 0); }
  15% { opacity: 0.9; }
  85% { opacity: 0.6; }
  100% { opacity: 0; transform: translate(-18px, -60px); }
}
@keyframes scroll-dot { 0% { opacity: 0; translate: 0 0; } 30% { opacity: 1; } 100% { opacity: 0; translate: 0 9px; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes blink { 50% { opacity: 0.3; } }

/* ------------------------------------------------------------------ */
/* Reduced motion: no decorative loops, no entrances, instant UI.      */
/* All content is visible in its final state.                          */
/* ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  .js [data-reveal] { opacity: 1; translate: none; scale: none; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee-inner { width: auto; }
  .marquee-track { flex-wrap: wrap; justify-content: center; gap: 0.75rem 2rem; }
  .marquee-track[aria-hidden="true"] { display: none; }
  .hero-link { stroke-dasharray: none; }
  .foundations-links path { stroke-dashoffset: 0 !important; }
  .product-card { transform: none !important; }
}

/* Small-screen spacing tweaks */
@media (max-width: 639px) {
  .hero-ctas .btn-lg { flex: 1 1 auto; }
  .stats { gap: 0.75rem; }
  .stat dt { font-size: 0.76rem; }
  .jep-body { height: 19rem; }
  .app-window { font-size: 11.5px; border-radius: 12px; }
  .jep-toolbar .seg { width: 100%; }
  .win-title { display: none; }
  .faq-answer p { padding-right: 0.25rem; }
  .card-ctas .btn { flex: 1 1 auto; }
  /* Denser lists on phones: same content, less scrolling. */
  .explorer-items { gap: 0; }
  .explorer-items li { padding: 0.95rem 0; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: none; }
  .explorer-items li:hover { translate: none; }
  .showcase-keys { display: none; }
  .finder-filters { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding: 0 var(--gutter) 0.25rem; scrollbar-width: none; }
  .finder-filters::-webkit-scrollbar { display: none; }
  .filter-chip { flex-shrink: 0; }
  .finder-grid { gap: 0.5rem; }
  .task a { padding: 0.85rem 2.5rem 0.9rem 1rem; gap: 0.15rem; }
  .task-product { margin-bottom: 0.1rem; }
  .task-go { top: 50%; translate: 0 -50%; }
  .task a:hover .task-go { translate: 2px -50%; }
  .protocols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
  .protocol-group { padding: 0.85rem 0.9rem; }
  .protocol-group li { flex-direction: column; align-items: flex-start; gap: 0; padding: 0.35rem 0; }
  .protocol-group li small { text-align: left; font-size: 0.72rem; }
  .finder.is-collapsed .task:nth-child(n+7) { display: none; }
  .finder.is-collapsed .finder-more { display: flex; }
}
