/* VeilRoute landing — editorial dark layout.
   Identity matches the dashboard (app.veilroute.dev): teal signal on ink, Sora / IBM Plex. */

:root {
  --bg: #06080d;
  --bg-2: #080b12;
  --panel: #0b0f17;
  --panel-2: #0f141f;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .12);
  --fg: #eef2f8;
  --fg-2: #c9d1df;
  --muted: #8f99ad;
  --faint: #5d6679;
  --teal: #4fd8c4;
  --teal-2: #2fb8a6;
  --sky: #8fc8ff;
  --mint: #b8f3e6;
  --teal-soft: rgba(79, 216, 196, .10);
  --teal-line: rgba(79, 216, 196, .32);
  --ok: #45d39a;
  --warn: #e2b155;
  --accent-fg: #04201b;
  --code-bg: #070a10;
  --hl-kw: #ff8a80; --hl-title: #c8b6ff; --hl-attr: #8fc8ff; --hl-str: #b8f3e6;
  --hl-built: #ffc285; --hl-comment: #6b7489; --hl-name: #7ee7b8;
  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --maxw: 1152px;
  --r-sm: 8px;
  --r: 14px;
  --r-lg: 22px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--font-body); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; font-weight: 600; letter-spacing: -0.03em; text-wrap: balance; }
p { margin: 0; }
code { font-family: var(--font-mono); font-size: .9em; }
[hidden] { display: none !important; }
::selection { background: rgba(79, 216, 196, .3); color: #fff; }

.wrap {
  width: 100%; max-width: var(--maxw); margin-inline: auto;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--teal); color: var(--accent-fg); padding: 8px 14px; border-radius: 8px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- Primitives ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 14.5px/1 var(--font-body); white-space: nowrap; text-decoration: none; cursor: pointer;
  padding: 12px 18px; border-radius: var(--r-sm); border: 1px solid transparent;
  transition: background .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease), transform .12s ease, box-shadow .18s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn svg { flex: none; transition: transform .18s var(--ease); }
.btn:hover svg.mv { transform: translateX(2px); }
.btn-primary { background: var(--teal); color: var(--accent-fg); box-shadow: 0 0 0 1px rgba(79, 216, 196, .4), 0 10px 30px -12px rgba(79, 216, 196, .7); }
.btn-primary:hover { background: #68e2d0; }
.btn-ghost { background: rgba(255, 255, 255, .02); color: var(--fg); border-color: var(--line-2); }
.btn-ghost:hover { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .22); }
.btn-quiet { background: transparent; color: var(--muted); padding-inline: 10px; }
.btn-quiet:hover { color: var(--fg); }
.btn-sm { padding: 9px 14px; font-size: 13.5px; }
.btn-block { width: 100%; }

.link { color: var(--teal); text-decoration: none; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.link svg { transition: transform .18s var(--ease); }
.link:hover svg { transform: translateX(3px); }
.link:hover { color: var(--mint); }

.eyebrow {
  font: 500 11.5px/1 var(--font-mono); letter-spacing: .16em; text-transform: uppercase;
  color: var(--teal); margin: 0 0 18px; display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow .idx { color: var(--faint); }
.eyebrow.sky { color: var(--sky); }

.mono { font-family: var(--font-mono); }
.ic-btn {
  width: 36px; height: 36px; border-radius: 9px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted); border: 1px solid var(--line); background: transparent; cursor: pointer; text-decoration: none;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.ic-btn:hover { color: var(--fg); border-color: var(--line-2); background: rgba(255, 255, 255, .04); }

.grad {
  background: linear-gradient(95deg, var(--mint) 0%, var(--teal) 38%, var(--sky) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.divider { height: 1px; max-width: var(--maxw); margin: 0 auto; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .09) 20%, rgba(255, 255, 255, .09) 80%, transparent); }

.status { display: inline-flex; align-items: center; gap: 7px; font: 500 11px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; padding: 5px 9px; border-radius: 999px; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.status.live { color: var(--ok); background: rgba(69, 211, 154, .09); border: 1px solid rgba(69, 211, 154, .25); }
.status.next { color: var(--sky); background: rgba(143, 200, 255, .08); border: 1px solid rgba(143, 200, 255, .22); }

.tag { display: inline-flex; align-items: center; font: 500 12px/1 var(--font-mono); color: var(--fg-2); padding: 7px 11px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .02); }

/* ---------- Header ---------- */
/* Floating capsule bar: transparent at the top, denser glass once the page scrolls */
.nav { position: sticky; top: 0; z-index: 50; padding: 14px 0 0; margin-bottom: -72px; pointer-events: none; }
.nav-inner {
  pointer-events: auto; position: relative;
  width: calc(100% - 32px); max-width: 1120px; height: 58px; margin: 0 auto; padding: 0 8px 0 18px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px;
  border: 1px solid rgba(255, 255, 255, .07); border-radius: 16px;
  background: rgba(11, 15, 23, .45); -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
  transition: background .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.nav-inner::after {
  content: ""; position: absolute; left: 18%; right: 18%; top: -1px; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(79, 216, 196, .55), transparent); opacity: .7;
}
.nav.scrolled .nav-inner { background: rgba(9, 12, 19, .82); border-color: rgba(255, 255, 255, .11); box-shadow: 0 18px 50px -24px rgba(0, 0, 0, .9); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 17.5px/1 var(--font-display); letter-spacing: -0.035em; justify-self: start; }
.brand .mark { width: 26px; height: 26px; transition: transform .3s var(--ease); }
.brand:hover .mark { transform: rotate(-6deg) scale(1.05); }
.nav-links { display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 11px; background: rgba(255, 255, 255, .025); border: 1px solid rgba(255, 255, 255, .05); }
.nav-links > a, .drop > button {
  font: 500 13.5px/1 var(--font-body); color: var(--muted); text-decoration: none; background: none; border: 0; cursor: pointer;
  padding: 9px 13px; border-radius: 8px; display: inline-flex; align-items: center; gap: 6px; transition: color .15s ease, background .15s ease;
}
.nav-links > a:hover, .drop > button:hover, .drop[data-open="true"] > button { color: var(--fg); background: rgba(255, 255, 255, .06); }
.nav-links > a.active { color: var(--fg); background: rgba(255, 255, 255, .06); }
.drop { position: relative; }
.drop .chev { transition: transform .18s var(--ease); opacity: .7; }
.drop[data-open="true"] .chev { transform: rotate(180deg); }
.drop-panel {
  position: absolute; top: calc(100% + 12px); left: 50%; width: 380px; transform: translate(-50%, -6px);
  background: rgba(11, 15, 23, .96); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid var(--line-2); border-radius: var(--r); padding: 8px;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .8);
  opacity: 0; visibility: hidden; transition: opacity .16s ease, transform .16s var(--ease), visibility .16s;
}
.drop[data-open="true"] .drop-panel { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.drop-item { display: block; padding: 12px 14px; border-radius: 10px; text-decoration: none; }
.drop-item:hover { background: rgba(255, 255, 255, .04); }
.drop-item strong { display: block; font: 600 14px/1.3 var(--font-display); }
.drop-item span span { display: block; color: var(--muted); font-size: 13px; line-height: 1.45; margin-top: 3px; }
.drop-foot { display: flex; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 6px; padding: 10px 12px 4px; font-size: 13px; }
.drop-foot a { color: var(--teal); text-decoration: none; }
.nav-right { display: flex; align-items: center; gap: 6px; justify-self: end; }
.nav-right .ic-btn { border-color: transparent; width: 34px; height: 34px; }
.nav-right .ic-btn:hover { border-color: transparent; background: rgba(255, 255, 255, .06); }
.nav-right .sep { width: 1px; height: 20px; background: rgba(255, 255, 255, .09); margin: 0 4px; }
.nav-right .btn-sm { padding: 10px 14px; border-radius: 10px; }
.menu-btn { display: none; }
.mobile-menu {
  display: none; pointer-events: auto; position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  width: calc(100% - 32px); max-width: 1120px; margin: 0 auto; padding: 6px 0 16px;
  border: 1px solid rgba(255, 255, 255, .11); border-radius: 16px; background: rgba(9, 12, 19, .96);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .9);
}
.mobile-menu .wrap { padding-left: 18px; padding-right: 18px; }
.mobile-menu .wrap > a { display: block; padding: 13px 0; text-decoration: none; font-weight: 500; border-bottom: 1px solid var(--line); }
.mm-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.nav[data-menu="open"] .mobile-menu { display: block; }
.nav[data-menu="open"] .nav-inner { background: rgba(9, 12, 19, .96); border-color: rgba(255, 255, 255, .11); }
@media (max-width: 940px) {
  .nav { padding-top: 10px; margin-bottom: -64px; }
  .nav-inner { grid-template-columns: 1fr auto; height: 54px; padding: 0 6px 0 14px; width: calc(100% - 24px); }
  .mobile-menu { width: calc(100% - 24px); }
  .nav-links, .nav-right .hide-sm { display: none; }
  .menu-btn { display: inline-flex; }
}

/* ---------- Sections ---------- */
section { position: relative; padding-block: 120px; }
.head { max-width: 640px; margin-bottom: 56px; }
.head h2 { font-size: clamp(30px, 4.4vw, 44px); line-height: 1.08; }
.head p { color: var(--muted); font-size: 17.5px; margin-top: 16px; }
.head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 56px; }
.head-row .head { margin-bottom: 0; }
@media (max-width: 720px) { section { padding-block: 88px; } .head, .head-row { margin-bottom: 40px; } }

/* ---------- Hero ---------- */
.hero { padding: 184px 0 96px; text-align: center; overflow: hidden; isolation: isolate; }
@media (max-width: 940px) { .hero { padding-top: 160px; } }
.hero-field { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-field::before {
  content: ""; position: absolute; inset: -10% -10% 0;
  background:
    radial-gradient(42% 38% at 50% 0%, rgba(79, 216, 196, .20), transparent 70%),
    radial-gradient(30% 30% at 82% 22%, rgba(143, 200, 255, .10), transparent 70%),
    radial-gradient(30% 30% at 16% 30%, rgba(79, 216, 196, .07), transparent 70%);
}
.hero-field svg { position: absolute; left: 50%; top: 0; width: 1600px; max-width: none; height: 100%; transform: translateX(-50%); opacity: .55;
  -webkit-mask-image: radial-gradient(60% 70% at 50% 35%, #000 30%, transparent 80%); mask-image: radial-gradient(60% 70% at 50% 35%, #000 30%, transparent 80%); }
.hero-field path { fill: none; stroke: rgba(79, 216, 196, .16); stroke-width: 1; }
.hero-field path.hot { stroke: url(#routeGrad); stroke-width: 1.4; stroke-dasharray: 6 14; animation: flow 6s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -200; } }

.pill-link {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 34px; text-decoration: none;
  padding: 6px 14px 6px 6px; border-radius: 999px; font-size: 13.5px; color: var(--fg-2);
  border: 1px solid var(--line-2); background: rgba(11, 15, 23, .7); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: border-color .18s ease;
}
.pill-link:hover { border-color: var(--teal-line); }
.pill-link .b { font: 600 10.5px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent-fg); background: var(--teal); padding: 5px 8px; border-radius: 999px; }
.hero h1 { font-size: clamp(44px, 7.6vw, 92px); line-height: 1.0; letter-spacing: -0.045em; max-width: 15ch; margin: 0 auto; }
.hero .lede { color: var(--muted); font-size: clamp(17px, 1.6vw, 19.5px); max-width: 60ch; margin: 28px auto 0; }
.hero .lede code { color: var(--fg); }
.hero-cta { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 38px; }
.meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 0; margin: 36px auto 0; padding: 0; list-style: none; font: 400 12.5px/1 var(--font-mono); color: var(--muted); }
.meta li { display: inline-flex; align-items: center; gap: 8px; }
.meta li + li::before { content: "/"; color: var(--faint); margin: 0 16px; }
.meta .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
@media (max-width: 560px) {
  .meta { flex-direction: column; align-items: center; gap: 12px; }
  .meta li + li::before { display: none; }
}

/* Pipeline (signature visual) */
.pipeline {
  position: relative; margin: 72px auto 0; max-width: 940px; text-align: left;
  display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: stretch;
  border: 1px solid var(--line-2); border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .01));
  box-shadow: 0 40px 120px -60px rgba(79, 216, 196, .45), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.pipeline::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(120deg, transparent 20%, rgba(79, 216, 196, .5), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.stage { padding: 24px 24px 26px; min-width: 0; position: relative; }
.stage + .stage { border-left: 1px dashed var(--line-2); }
.stage .who { font: 500 11px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); display: flex; align-items: center; gap: 8px; }
.stage .who i { font-style: normal; color: var(--teal); }
.stage h3 { font-size: 16px; margin: 12px 0 10px; }
.stage .line { font: 400 12.5px/1.75 var(--font-mono); color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage .line .k { color: var(--teal); }
.stage .line .s { color: var(--muted); }
.stage.core { background: radial-gradient(80% 120% at 50% 0%, rgba(79, 216, 196, .09), transparent 70%); }
.stage.core .ms { position: absolute; top: 20px; right: 20px; font: 500 11px/1 var(--font-mono); color: var(--ok); }
.packet { position: absolute; top: 50%; width: 42px; height: 2px; margin-top: -1px; border-radius: 2px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--teal), var(--mint)); box-shadow: 0 0 12px var(--teal); opacity: 0; }
.packet.p1 { left: calc(33.3% - 50px); animation: hop 3.2s var(--ease) infinite; }
.packet.p2 { left: calc(66.6% - 30px); animation: hop 3.2s var(--ease) 1.6s infinite; }
@keyframes hop { 0% { opacity: 0; transform: translateX(-20px); } 15% { opacity: 1; } 45% { opacity: 1; transform: translateX(40px); } 60%, 100% { opacity: 0; transform: translateX(60px); } }
@media (max-width: 820px) {
  .pipeline { grid-template-columns: 1fr; }
  .stage + .stage { border-left: 0; border-top: 1px dashed var(--line-2); }
  .packet { display: none; }
}

/* ---------- Drop-in panel ---------- */
.panel {
  position: relative; overflow: hidden; border-radius: var(--r-lg); border: 1px solid var(--line-2);
  background: linear-gradient(160deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .012) 55%), var(--panel);
  padding: 48px;
}
.panel::after { content: ""; position: absolute; right: -160px; bottom: -200px; width: 520px; height: 520px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(79, 216, 196, .12), transparent); }
.dropin { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; position: relative; z-index: 1; }
.dropin .lead { grid-column: 1 / -1; display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px 56px; align-items: end; padding-bottom: 36px; border-bottom: 1px solid var(--line); }
.dropin .lead .eyebrow { grid-column: 1 / -1; margin-bottom: 0; }
.dropin h2 { font-size: clamp(28px, 3.4vw, 38px); line-height: 1.1; }
.dropin .lead p { color: var(--muted); font-size: 16px; }
.dropin .col .eyebrow { margin-bottom: 14px; }
.dropin .col h3 { font-size: 21px; line-height: 1.2; margin-bottom: 10px; }
.dropin .col p { color: var(--muted); font-size: 14.5px; }
.dropin .col .host { margin: 12px 0 14px; width: 100%; justify-content: space-between; }
.dropin .col .sdk-links { display: flex; align-items: center; gap: 16px; margin-top: 14px; font-size: 13.5px; }
.panel-foot { position: relative; z-index: 1; margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14.5px; }
.panel-foot strong { color: var(--fg); font-weight: 600; }
@media (max-width: 860px) { .dropin { grid-template-columns: 1fr 1fr; } .dropin .lead { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .panel { padding: 30px 22px; } .dropin { grid-template-columns: 1fr; gap: 28px; } .dropin .lead { padding-bottom: 28px; } }

/* ---------- Quickstart ---------- */
.qs { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: center; }
.qs .head { margin-bottom: 0; }
.qs .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 30px; }
@media (max-width: 960px) { .qs { grid-template-columns: 1fr; gap: 40px; } }

.copy { background: transparent; border: 0; color: var(--faint); cursor: pointer; width: 30px; height: 30px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.copy:hover { color: var(--fg); background: rgba(255, 255, 255, .06); }
.copy .ok { color: var(--ok); }

/* Editor mockup — site palette */
.editor {
  background: var(--code-bg); border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; min-width: 0;
  font: 400 13px/1.75 var(--font-mono);
  box-shadow: 0 40px 100px -50px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .04), 0 30px 90px -60px rgba(79, 216, 196, .35);
}
.ed-title { position: relative; display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 10px 0 14px; background: var(--panel); border-bottom: 1px solid var(--line); }
.lights { display: flex; gap: 6px; }
.lights i { width: 10px; height: 10px; border-radius: 50%; background: #232a38; }
.ed-name { position: absolute; left: 50%; transform: translateX(-50%); font: 400 11.5px/1 var(--font-mono); color: var(--faint); white-space: nowrap; }
.ed-product { margin-left: auto; display: inline-flex; padding: 2px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); position: relative; z-index: 1; }
.ed-product button { font: 500 12px/1 var(--font-mono); color: var(--muted); background: transparent; border: 0; cursor: pointer; padding: 5px 10px; border-radius: 6px; transition: color .15s ease, background .15s ease; }
.ed-product button[aria-selected="true"] { color: var(--fg); background: rgba(255, 255, 255, .08); }
.ed-tabs { display: flex; align-items: stretch; background: var(--panel); border-bottom: 1px solid var(--line); padding-right: 6px; }
.ed-tablist { display: flex; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.ed-tablist::-webkit-scrollbar { display: none; }
.ed-tablist button {
  display: inline-flex; align-items: center; gap: 7px; padding: 0 16px; height: 36px; white-space: nowrap;
  font: 400 12px/1 var(--font-mono); color: var(--faint); background: transparent; cursor: pointer;
  border: 0; border-right: 1px solid var(--line); border-top: 1px solid transparent; transition: color .15s ease, background .15s ease;
}
.ed-tablist button:hover { color: var(--fg-2); }
.ed-tablist button[aria-selected="true"] { color: var(--fg); background: var(--code-bg); border-top-color: var(--teal); margin-bottom: -1px; }
.fi { font: 600 9.5px/1 var(--font-mono); letter-spacing: -0.02em; }
.fi.sh { color: var(--ok); font-size: 11px; }
.fi.py { color: var(--sky); }
.fi.js { color: var(--warn); }
.fi.go { color: var(--teal); }
.ed-tabs .copy { margin-left: auto; align-self: center; }
.ed-crumbs { display: flex; align-items: center; gap: 6px; padding: 7px 18px 2px; font: 400 11.5px/1.4 var(--font-mono); color: var(--faint); white-space: nowrap; overflow: hidden; }
.ed-crumbs i { font-style: normal; opacity: .7; }
.ed-crumbs b { font-weight: 400; color: var(--fg-2); }
.ed-body { display: grid; grid-template-columns: auto 1fr; min-height: 300px; padding: 10px 0 16px; }
.ed-gutter { padding: 0 14px 0 18px; text-align: right; color: #3a4357; user-select: none; white-space: pre; }
.ed-gutter span { display: block; }
.ed-gutter span.cur { color: var(--muted); }
.ed-body pre { margin: 0; overflow-x: auto; padding-right: 18px; }
.ed-body pre code { font: inherit; color: var(--fg-2); white-space: pre; display: block; }
.ed-status {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 26px; padding: 0 12px;
  background: var(--panel); border-top: 1px solid var(--line); font: 400 11px/1 var(--font-mono); color: var(--faint); white-space: nowrap; overflow: hidden;
}
.st-l, .st-r { display: inline-flex; align-items: center; gap: 14px; min-width: 0; }
.st-l { color: var(--fg-2); }
.st-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); flex: none; }
@media (max-width: 560px) {
  .ed-name, #edPos, #edIndent { display: none; }
  .ed-tablist button { padding: 0 12px; }
  .ed-body { min-height: 0; }
  .ed-gutter { padding: 0 10px 0 12px; }
}

.hljs { background: transparent; color: var(--fg-2); }
.hljs-keyword, .hljs-meta .hljs-keyword, .hljs-type, .hljs-doctag { color: var(--hl-kw); }
.hljs-title, .hljs-title.function_, .hljs-title.class_ { color: var(--hl-title); }
.hljs-attr, .hljs-attribute, .hljs-literal, .hljs-number, .hljs-variable, .hljs-meta, .hljs-operator { color: var(--hl-attr); }
.hljs-string, .hljs-regexp, .hljs-meta .hljs-string { color: var(--hl-str); }
.hljs-built_in, .hljs-symbol, .hljs-bullet { color: var(--hl-built); }
.hljs-comment, .hljs-quote { color: var(--hl-comment); font-style: italic; }
.hljs-name, .hljs-selector-tag { color: var(--hl-name); }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 88px; padding-top: 40px; border-top: 1px solid var(--line); }
.stat .n { font: 600 clamp(32px, 3.6vw, 44px)/1 var(--font-display); letter-spacing: -0.045em; }
.stat .n small { font-size: .5em; color: var(--muted); margin-left: 3px; letter-spacing: -0.02em; }
.stat .l { margin-top: 12px; font: 500 11px/1.4 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr 1fr; row-gap: 36px; } }

/* ---------- Products (numbered lineup) ---------- */
#products .head { margin-bottom: 40px; }
#products .head h2 { font-size: clamp(26px, 3.4vw, 36px); }
#products .head p { font-size: 16px; }
.lineup { border-top: 1px solid var(--line); }
.unit {
  position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr) minmax(0, 1.2fr) 36px; gap: 28px; align-items: start;
  padding: 28px 16px 28px 0; border-bottom: 1px solid var(--line);
  transition: background .25s var(--ease);
}
.unit::before {
  content: ""; position: absolute; left: -24px; top: 24px; bottom: 24px; width: 2px; border-radius: 2px;
  background: linear-gradient(var(--teal), var(--sky)); transform: scaleY(0); transform-origin: top; transition: transform .35s var(--ease);
}
.unit:hover { background: linear-gradient(90deg, rgba(79, 216, 196, .045), transparent 70%); }
.unit:hover::before { transform: scaleY(1); }
.unit-id { padding-top: 8px; }
.unit-n { font: 500 11px/1 var(--font-mono); letter-spacing: .12em; color: var(--faint); transition: color .25s ease; }
.unit:hover .unit-n { color: var(--teal); }
.unit-title { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.unit-title h3 { font-size: 21px; letter-spacing: -0.03em; }
.unit-title .status { font-size: 9.5px; padding: 4px 7px; }
.unit-main .sub { color: var(--muted); font-size: 14px; margin-top: 8px; max-width: 46ch; }
.unit-main .sub code { color: var(--fg); font-size: .88em; }
.host {
  margin-top: 14px; display: flex; align-items: center; gap: 2px; width: fit-content; max-width: 100%;
  font: 400 11.5px/1 var(--font-mono); color: var(--fg-2); padding: 4px 4px 4px 9px;
  border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, .02);
}
.host .v { color: var(--teal); margin-right: 6px; }
.host .u { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.host .copy { width: 26px; height: 26px; }
.unit-label { font: 500 10px/1 var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--faint); margin: 4px 0 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font: 400 11.5px/1 var(--font-mono); color: var(--fg-2); padding: 5px 8px; border-radius: 6px;
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, .02);
}
.chip.hot { color: var(--teal); border-color: var(--teal-line); background: var(--teal-soft); }
.kv { margin: 14px 0 0; display: grid; }
.kv > div { display: grid; grid-template-columns: 70px 1fr; gap: 12px; padding: 7px 0; border-top: 1px dashed var(--line-2); align-items: baseline; }
.kv dt { font: 500 10px/1.5 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.kv dd { margin: 0; font-size: 13px; color: var(--fg-2); min-width: 0; }
.kv dd code { font-size: .92em; }
.kv dd code { color: var(--fg); }
.kv dd.warn { color: var(--warn); }
.kv dd.ok { color: var(--ok); }
.unit-go {
  width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; align-self: center;
  color: var(--fg-2); border: 1px solid var(--line-2); text-decoration: none;
  transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s var(--ease);
}
.unit-go:hover, .unit:hover .unit-go { color: var(--accent-fg); background: var(--teal); border-color: var(--teal); }
.unit-go:hover { transform: rotate(-8deg) scale(1.05); }
.unit-next {
  display: grid; grid-template-columns: 32px 1fr auto; gap: 28px; align-items: center;
  padding: 18px 16px 18px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13.5px;
}
.unit-next .link { font-size: 13.5px; }
.unit-next strong { color: var(--fg); font-weight: 600; }
@media (max-width: 1000px) {
  .unit { grid-template-columns: 32px 1fr 36px; gap: 20px 24px; }
  .unit-specs { grid-column: 2 / 3; }
  .unit-go { grid-column: 3; grid-row: 1; align-self: start; }
  .unit-next { grid-template-columns: 32px 1fr; gap: 10px 24px; }
  .unit-next .link { grid-column: 2; }
}
@media (max-width: 620px) {
  .unit { grid-template-columns: 1fr 36px; padding: 24px 0; }
  .unit::before { display: none; }
  .unit-id { grid-column: 1; flex-direction: row; align-items: center; gap: 14px; }
  .unit-main, .unit-specs { grid-column: 1 / -1; }
  .unit-go { grid-column: 2; grid-row: 1; }
  .unit-title h3 { font-size: 20px; }
  .unit-next { grid-template-columns: 1fr; padding: 24px 0; }
  .unit-next .link { grid-column: 1; }
}

/* ---------- Use cases (2-col editorial grid) ---------- */
.uses { display: grid; grid-template-columns: 1fr 1fr; column-gap: 64px; }
.use { padding: 30px 0 34px; border-top: 1px solid var(--line); }
.use .eyebrow { margin-bottom: 14px; color: var(--sky); }
.use h3 { font-size: 20px; margin-bottom: 8px; }
.use p { color: var(--muted); font-size: 15px; max-width: 48ch; }
.use .link { margin-top: 14px; font-size: 14px; }
.use.custom .eyebrow { color: var(--faint); }
@media (max-width: 760px) { .uses { grid-template-columns: 1fr; } }

/* ---------- Compare ---------- */
.versus { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 40px; }
.vcol { border-top: 1px solid var(--line); }
.vcol .cost { padding: 26px 0 28px; }
.vcol .cost .big { font: 600 clamp(26px, 2.8vw, 34px)/1.05 var(--font-display); letter-spacing: -0.04em; color: #4b5466; text-decoration: line-through; text-decoration-color: rgba(255, 107, 107, .5); text-decoration-thickness: 2px; }
.vcol .cost .k { margin-top: 10px; font: 500 11px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.vcol .cost p { margin-top: 18px; color: var(--muted); font-size: 14.5px; }
.vcol .gain { padding: 26px 0 0; border-top: 1px dashed var(--line-2); }
.vcol .gain .eyebrow { font-size: 10.5px; margin-bottom: 12px; }
.vcol .gain h3 { font-size: 22px; margin-bottom: 8px; }
.vcol .gain p { color: var(--fg-2); font-size: 14.5px; }
@media (max-width: 860px) { .versus { grid-template-columns: 1fr; row-gap: 40px; } }

/* ---------- Onboarding (horizontal track) ---------- */
.track { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; counter-reset: none; }
.track li {
  position: relative; display: flex; flex-direction: column; padding: 22px 22px 20px; min-width: 0;
  border: 1px solid var(--line); border-radius: var(--r); background: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .008));
}
.track-top { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.track .n { font: 600 34px/1 var(--font-display); letter-spacing: -0.05em; color: transparent; -webkit-text-stroke: 1px var(--teal-line); }
.track .bar { flex: 1; height: 2px; border-radius: 2px; background: var(--line); position: relative; overflow: hidden; }
.track .bar::after { content: ""; position: absolute; inset: 0; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, var(--teal), var(--sky)); transition: transform 1s var(--ease); }
.track li.in .bar::after { transform: scaleX(1); }
.track li:nth-child(2).in .bar::after { transition-delay: .25s; }
.track li:nth-child(3).in .bar::after { transition-delay: .5s; }
.track li:nth-child(4).in .bar::after { transition-delay: .75s; }
.no-js .track .bar::after { transform: scaleX(1); }
.track h3 { font-size: 19px; margin-bottom: 8px; }
.track p { color: var(--muted); font-size: 14.5px; }
.track p { margin-bottom: 22px; }
.track .state {
  margin-top: auto; padding-top: 16px; border-top: 1px dashed var(--line-2); display: flex; align-items: center; gap: 8px;
  font: 400 12px/1 var(--font-mono); color: var(--fg-2);
}
.track .state i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.track li:last-child { border-color: var(--teal-line); background: radial-gradient(120% 90% at 100% 0%, rgba(79, 216, 196, .10), transparent 65%), var(--panel); }
@media (max-width: 1000px) { .track { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .track { grid-template-columns: 1fr; } }

/* ---------- Pricing ---------- */
.switch { display: inline-flex; padding: 4px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel); }
.switch button { font: 600 13.5px/1 var(--font-body); color: var(--muted); background: transparent; border: 0; cursor: pointer; padding: 10px 16px; border-radius: 7px; transition: color .15s ease, background .15s ease; }
.switch button[aria-selected="true"] { color: var(--accent-fg); background: var(--teal); }
.plans { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--line-2); border-radius: var(--r-lg); overflow: hidden; background: var(--panel); }
.plan { padding: 28px 24px; display: flex; flex-direction: column; min-width: 0; position: relative; }
.plan + .plan { border-left: 1px solid var(--line); }
.plan .name { font: 500 11.5px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 22px; white-space: nowrap; }
.plan .name .status { font-size: 9.5px; padding: 4px 7px; letter-spacing: .08em; }
.plan .price { font: 600 38px/1 var(--font-display); letter-spacing: -0.045em; margin-top: 22px; }
.plan .per { color: var(--faint); font-size: 13.5px; margin-top: 8px; }
.plan ul { list-style: none; padding: 0; margin: 24px 0 28px; display: grid; gap: 10px; font-size: 14px; color: var(--fg-2); }
.plan li { display: flex; gap: 9px; align-items: flex-start; }
.plan li svg { color: var(--teal); flex: none; margin-top: 4px; }
.plan .btn { margin-top: auto; }
.plan.best { background: radial-gradient(120% 80% at 50% 0%, rgba(79, 216, 196, .12), transparent 70%); }
.plan.best::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: linear-gradient(90deg, var(--mint), var(--teal), var(--sky)); }
.plan.best .name { color: var(--teal); }
.plans-note { margin-top: 22px; color: var(--muted); font-size: 14px; }
.plans-note a { color: var(--teal); text-decoration: none; }
@media (max-width: 1080px) {
  .plans { grid-template-columns: repeat(3, 1fr); }
  .plan { border-top: 1px solid var(--line); }
  .plan:nth-child(-n+3) { border-top: 0; }
  .plan:nth-child(4) { border-left: 0; }
}
@media (max-width: 680px) {
  .plans { grid-template-columns: 1fr; }
  .plan + .plan { border-left: 0; border-top: 1px solid var(--line); }
}

/* ---------- FAQ ---------- */
.faq { max-width: 780px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 0; font: 600 17px/1.35 var(--font-display); letter-spacing: -0.02em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .pm { width: 14px; height: 14px; flex: none; position: relative; color: var(--muted); }
.faq summary .pm::before, .faq summary .pm::after { content: ""; position: absolute; left: 0; top: 6.5px; width: 14px; height: 1.5px; background: currentColor; transition: transform .2s var(--ease); }
.faq summary .pm::after { transform: rotate(90deg); }
.faq details[open] summary .pm::after { transform: rotate(0); }
.faq summary:hover .pm { color: var(--teal); }
.faq details p { color: var(--muted); font-size: 15.5px; padding: 0 40px 24px 0; margin-top: -4px; }
.faq details p a { color: var(--teal); text-decoration: none; }

/* ---------- CTA ---------- */
.cta { display: grid; grid-template-columns: 1.4fr auto; align-items: center; gap: 32px; padding: 56px; }
.cta h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.06; }
.cta p { color: var(--muted); margin-top: 14px; font-size: 16.5px; max-width: 52ch; }
.cta .acts { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; position: relative; z-index: 1; }
.cta .mail { margin-top: 18px; font-size: 14px; color: var(--muted); }
.cta .mail a { color: var(--teal); text-decoration: none; }
.cta .mail button { font: inherit; color: var(--teal); background: none; border: 0; padding: 0; cursor: pointer; }
@media (max-width: 860px) { .cta { grid-template-columns: 1fr; padding: 36px 24px; } .cta .acts { justify-content: flex-start; } }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); padding: 64px 0 36px; background: linear-gradient(var(--bg-2), var(--bg)); }
.foot { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 32px; }
.foot h4 { font: 500 11px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin: 4px 0 18px; }
.foot a { display: block; color: var(--muted); text-decoration: none; font-size: 14px; margin: 10px 0; transition: color .15s ease; }
.foot a:hover { color: var(--fg); }
.foot a.mono { font-size: 12.5px; }
.foot .blurb { color: var(--muted); font-size: 14px; max-width: 34ch; margin-top: 16px; }
.foot .social { display: flex; gap: 8px; margin-top: 22px; }
.foot .social a { display: inline-flex; margin: 0; }
.legal { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; font-size: 12.5px; color: var(--faint); }
.legal p { max-width: 82ch; }
@media (max-width: 900px) { .foot { grid-template-columns: repeat(4, 1fr); } .foot > :first-child { grid-column: 1 / -1; } }
@media (max-width: 560px) { .foot { grid-template-columns: 1fr 1fr; } }

/* ---------- Subpage technical layout ---------- */
.subhero { padding: 156px 0 72px; position: relative; overflow: hidden; isolation: isolate; }
.subhero h1 { font-size: clamp(36px, 5.4vw, 64px); line-height: 1.04; letter-spacing: -0.04em; max-width: 18ch; }
.subhero .lede { color: var(--muted); font-size: clamp(16.5px, 1.5vw, 19px); max-width: 64ch; margin-top: 22px; }
.subhero .hero-cta { justify-content: flex-start; margin-top: 32px; }
.crumbs { display: inline-flex; align-items: center; gap: 8px; font: 400 12.5px/1 var(--font-mono); color: var(--muted); margin-bottom: 24px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--teal); }
.crumbs i { font-style: normal; color: var(--faint); }
.crumbs span { color: var(--teal); }
.spec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.spec-card { border: 1px solid var(--line-2); border-radius: var(--r); background: var(--panel); padding: 26px; }
.spec-card h3 { font-size: 19px; margin-bottom: 10px; }
.spec-card p { color: var(--muted); font-size: 14.5px; }
.spec-card code { color: var(--fg); }
.code-card { background: var(--code-bg); border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; font: 400 13px/1.7 var(--font-mono); }
.code-card-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: var(--panel); border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.code-card pre { margin: 0; padding: 18px 20px; overflow-x: auto; }
.code-card pre code { color: var(--fg-2); font: inherit; }
@media (max-width: 860px) { .spec-grid { grid-template-columns: 1fr; } }

/* ---------- Motion ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
