/* TraceX marketing site. Framed sections with hairlines, the dashboard's palette and
   type, light and dark themes, and live product mocks instead of screenshots. */

:root {
  color-scheme: light;
  --bg: oklch(0.975 0.004 84);
  --bg-2: oklch(0.955 0.006 84);
  --bg-raised: #ffffff;
  --hover: oklch(0.94 0.006 260);
  --ink: oklch(0.199 0.041 268);
  --ink-soft: oklch(0.36 0.03 265);
  --muted: oklch(0.5 0.016 255);
  --line: oklch(0.9 0.006 260);
  --line-strong: oklch(0.84 0.01 260);
  --brand: oklch(0.305 0.192 266);
  --brand-hover: oklch(0.36 0.2 266);
  --brand-soft: oklch(0.94 0.035 270);
  --brand-ink: oklch(0.42 0.17 266);
  --brand-2: oklch(0.55 0.2 266);
  --brand-3: oklch(0.72 0.14 266);
  --plate: #0b0d13;
  --ok: oklch(0.58 0.14 155);
  --ok-soft: oklch(0.95 0.04 155);
  --bad: oklch(0.6 0.19 25);
  --bad-soft: oklch(0.95 0.035 25);
  --term: #0d1117;
  --shadow: rgba(16, 24, 64, .28);
  --radius: 14px;
  --max: 1200px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", "SFMono-Regular", ui-monospace, Menlo, monospace;
}
/* Dark: follows the system unless the visitor picked light; the toggle sets data-theme */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: oklch(0.165 0.012 265); --bg-2: oklch(0.19 0.013 265); --bg-raised: oklch(0.205 0.014 265); --hover: oklch(0.25 0.015 265);
    --ink: oklch(0.96 0.005 260); --ink-soft: oklch(0.83 0.01 260); --muted: oklch(0.66 0.015 260);
    --line: oklch(0.285 0.015 265); --line-strong: oklch(0.37 0.018 265);
    --brand: oklch(0.56 0.2 266); --brand-hover: oklch(0.62 0.2 266); --brand-soft: oklch(0.27 0.06 268); --brand-ink: oklch(0.77 0.12 266);
    --brand-2: oklch(0.7 0.15 266); --brand-3: oklch(0.8 0.11 266);
    --plate: oklch(0.27 0.02 265);
    --ok: oklch(0.74 0.15 155); --ok-soft: oklch(0.3 0.06 155); --bad: oklch(0.73 0.16 25); --bad-soft: oklch(0.31 0.07 25);
    --term: #0a0d13; --shadow: rgba(0, 0, 0, .55);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: oklch(0.165 0.012 265); --bg-2: oklch(0.19 0.013 265); --bg-raised: oklch(0.205 0.014 265); --hover: oklch(0.25 0.015 265);
  --ink: oklch(0.96 0.005 260); --ink-soft: oklch(0.83 0.01 260); --muted: oklch(0.66 0.015 260);
  --line: oklch(0.285 0.015 265); --line-strong: oklch(0.37 0.018 265);
  --brand: oklch(0.56 0.2 266); --brand-hover: oklch(0.62 0.2 266); --brand-soft: oklch(0.27 0.06 268); --brand-ink: oklch(0.77 0.12 266);
  --brand-2: oklch(0.7 0.15 266); --brand-3: oklch(0.8 0.11 266);
  --plate: oklch(0.27 0.02 265);
  --ok: oklch(0.74 0.15 155); --ok-soft: oklch(0.3 0.06 155); --bad: oklch(0.73 0.16 25); --bad-soft: oklch(0.31 0.07 25);
  --term: #0a0d13; --shadow: rgba(0, 0, 0, .55);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; overflow-x: clip; background: var(--bg); color: var(--ink);
  font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  transition: background .25s, color .25s;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
code, pre { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* --- the mark: eight cubes around a dimmer core ---------------------------------- */
.mark { --s: 30px; width: var(--s); height: var(--s); flex: none; border-radius: 26%; background: var(--plate);
  display: inline-grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr);
  gap: calc(var(--s) * .085); padding: calc(var(--s) * .17); }
.mark i { border-radius: 22%; background: #eef0f5; }
.mark i.core { opacity: .45; }
.mark.live i { animation: cube 3.6s ease-in-out infinite; animation-delay: calc(var(--n) * .12s); }
.mark.live i.core { animation-name: core-glow; }
@keyframes cube { 0%, 70%, 100% { opacity: 1; } 35% { opacity: .35; } }
@keyframes core-glow { 0%, 100% { opacity: .45; background: #eef0f5; } 50% { opacity: 1; background: var(--brand-3); } }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; font-size: 19px; letter-spacing: -0.02em; }

/* --- header ------------------------------------------------------------------ */
.header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklch, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav-item {
  position: relative; display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 12px; border-radius: 8px; border: 0; background: none;
  font: 500 14.5px var(--font); color: var(--ink-soft); cursor: pointer;
}
.nav-item:hover, .nav-item[aria-expanded="true"], .nav-item.current { color: var(--ink); background: var(--hover); }
.nav-item svg { width: 14px; height: 14px; transition: transform .2s; }
.nav-item[aria-expanded="true"] svg { transform: rotate(180deg); }
.dropdown { position: relative; }
.menu {
  position: absolute; top: calc(100% + 10px); left: -8px; width: 560px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 10px;
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 24px 60px -20px var(--shadow), 0 2px 6px rgba(16, 24, 64, .06);
  opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity .16s, transform .16s;
}
.dropdown.open .menu { opacity: 1; transform: none; pointer-events: auto; }
.menu a { display: flex; gap: 12px; padding: 12px; border-radius: 10px; }
.menu a:hover { background: var(--bg); }
.menu .ico { flex: none; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); }
.menu .ico svg { width: 18px; height: 18px; }
.menu b { display: block; font-size: 14.5px; font-weight: 600; }
.menu span { display: block; font-size: 13px; color: var(--muted); line-height: 1.45; }
.actions { display: flex; align-items: center; gap: 10px; }
.menu-toggle, .theme-toggle { border: 0; background: none; padding: 8px; cursor: pointer; color: var(--ink-soft); border-radius: 8px; display: grid; place-items: center; }
.menu-toggle { display: none; }
.theme-toggle:hover { background: var(--hover); color: var(--ink); }
.menu-toggle svg, .theme-toggle svg { width: 20px; height: 20px; }
.menu-toggle svg { width: 24px; height: 24px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
}

/* --- buttons ----------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  height: 40px; padding: 0 16px; border-radius: 10px;
  font: 600 14.5px var(--font); letter-spacing: -0.01em;
  border: 1px solid var(--line-strong); background: var(--bg-raised); color: var(--ink);
  transition: background .15s, transform .15s, box-shadow .15s;
}
.btn:hover { background: var(--hover); }
.btn svg { width: 16px; height: 16px; transition: transform .15s; }
.btn:hover svg { transform: translateX(2px); }
.btn-primary {
  background: var(--brand); color: #fff; border-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 1px 2px rgba(16,24,64,.25), 0 6px 16px -6px color-mix(in oklch, var(--brand) 55%, transparent);
}
.btn-primary:hover { background: var(--brand-hover); }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15.5px; border-radius: 12px; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13.5px; }

/* --- framed sections (hairlines with corner crosses) ------------------------- */
.frame { position: relative; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.rule { position: relative; height: 1px; background: var(--line); }
.rule::before, .rule::after {
  content: ""; position: absolute; top: -4px; width: 9px; height: 9px;
  background:
    linear-gradient(var(--line-strong), var(--line-strong)) center / 9px 1px no-repeat,
    linear-gradient(var(--line-strong), var(--line-strong)) center / 1px 9px no-repeat;
}
.rule::before { left: -4px; }
.rule::after { right: -4px; }
.section { padding: 96px 56px; }
.section.tight { padding: 64px 56px; }
.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 12.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--brand-ink);
}
.kicker::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--brand); }
h1, h2, h3 { letter-spacing: -0.035em; line-height: 1.08; margin: 0; font-weight: 650; }
h1 { font-size: clamp(42px, 6.2vw, 76px); }
h2 { font-size: clamp(32px, 4.2vw, 50px); }
h3 { font-size: 20px; letter-spacing: -0.02em; line-height: 1.25; font-weight: 600; }
.muted { color: var(--muted); }
.lede { font-size: 19px; color: var(--ink-soft); max-width: 640px; margin: 22px 0 0; line-height: 1.55; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 48px; }
.section-head h2 { margin-top: 14px; }
.section-head.center { justify-content: center; text-align: center; }
.section-head.center .lede { margin-left: auto; margin-right: auto; }
.text-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; color: var(--brand-ink); white-space: nowrap; }
.text-link svg { width: 16px; height: 16px; transition: transform .15s; }
.text-link:hover svg { transform: translateX(3px); }

/* --- hero ---------------------------------------------------------------------- */
.hero { padding: 88px 56px 0; text-align: center; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 50% at 50% 0%, color-mix(in oklch, var(--brand) 12%, transparent), transparent 70%),
    linear-gradient(to right, color-mix(in oklch, var(--line) 70%, transparent) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(to bottom, color-mix(in oklch, var(--line) 70%, transparent) 1px, transparent 1px) 0 0 / 56px 56px;
  mask-image: radial-gradient(70% 60% at 50% 20%, #000 40%, transparent 85%);
}
.pill {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 28px;
  padding: 5px 12px 5px 5px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--bg-raised); font-size: 13.5px; color: var(--ink-soft);
}
.pill b { padding: 3px 9px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; }
.pill svg { width: 14px; height: 14px; }
.hero h1 { max-width: 980px; margin: 0 auto; }
.hero h1 span { color: var(--muted); }
.hero .lede { margin: 24px auto 0; text-align: center; }
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 36px; }
.hero-media {
  margin: 64px auto 0; max-width: 1040px; padding: 10px; border-radius: 22px 22px 0 0;
  background: linear-gradient(var(--bg-raised), var(--bg));
  border: 1px solid var(--line); border-bottom: 0; text-align: left;
  box-shadow: 0 -30px 80px -40px color-mix(in oklch, var(--brand) 45%, transparent);
}
.hero-media .window { border-radius: 14px 14px 0 0; border-bottom: 0; box-shadow: none; }

/* --- beta strip ---------------------------------------------------------------- */
.beta { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; padding: 28px 24px; text-align: center; font-size: 15px; color: var(--ink-soft); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in oklch, var(--ok) 18%, transparent); }

/* --- numbers that count up -------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 44px 36px 48px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat .k { display: block; margin-bottom: 20px; font: 600 12px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--brand-ink); }
.stat .n { font-size: clamp(46px, 5.4vw, 68px); font-weight: 650; letter-spacing: -.045em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat .n small { font-size: .45em; letter-spacing: -.02em; margin-left: 4px; color: var(--muted); }
.stat p { margin: 14px 0 0; color: var(--muted); font-size: 15px; line-height: 1.45; max-width: 240px; }

/* --- grids and cards ----------------------------------------------------------- */
.grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.grid > * { background: var(--bg-raised); padding: 30px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.card-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); margin-bottom: 18px; }
.card-ico svg { width: 20px; height: 20px; }
.grid h3 { margin-bottom: 8px; }
.grid p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.step-n { font: 600 13px var(--mono); color: var(--brand-ink); margin-bottom: 14px; display: block; }

/* feature rows: text beside a live mock */
.feature { display: grid; grid-template-columns: 1fr 1.2fr; gap: 64px; align-items: center; }
.feature.flip { grid-template-columns: 1.2fr 1fr; }
.feature > * { min-width: 0; }
.feature.flip .feature-text { order: 2; }
.feature-text h2 { font-size: clamp(28px, 3.4vw, 42px); margin-top: 14px; }
.feature-text p { color: var(--ink-soft); font-size: 17px; margin: 18px 0 0; }
.ticks { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.ticks li { display: flex; gap: 12px; font-size: 15.5px; color: var(--ink-soft); }
.ticks svg { flex: none; width: 20px; height: 20px; color: var(--brand-ink); margin-top: 2px; }
/* the stage a mock sits on: a dotted plate, like a canvas */
.stage {
  position: relative; padding: clamp(16px, 3vw, 32px); border-radius: 18px; border: 1px solid var(--line);
  background: radial-gradient(circle, color-mix(in oklch, var(--line-strong) 80%, transparent) 1px, transparent 1.3px) 0 0 / 18px 18px, var(--bg-2);
  box-shadow: 0 30px 70px -40px var(--shadow);
}

/* integrations */
.logos { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); }
.logos > div { background: var(--bg-raised); display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 28px 12px; font-size: 14px; font-weight: 600; color: var(--ink-soft); }

/* code / terminal */
.install {
  display: flex; align-items: center; gap: 12px; max-width: min(560px, 100%); margin: 28px 0 0;
  padding: 8px 8px 8px 18px; border-radius: 12px; background: var(--term); color: #e8ebf2;
  font: 500 14.5px var(--mono); box-shadow: 0 16px 40px -18px rgba(11, 13, 19, .6); border: 1px solid rgba(255,255,255,.06);
}
.install code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.install .ps { color: #7aa2ff; }
.install button {
  flex: none; height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06); color: #e8ebf2; font: 600 13px var(--font); cursor: pointer;
}
.install button:hover { background: rgba(255,255,255,.12); }
.cmds { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg-raised); }
.cmds div { display: grid; grid-template-columns: 300px 1fr; gap: 24px; padding: 16px 24px; border-top: 1px solid var(--line); }
.cmds div:first-child { border-top: 0; }
.cmds code { font-size: 14px; color: var(--brand-ink); font-weight: 600; }
.cmds span { color: var(--muted); font-size: 15px; }

/* product tour */
.tour { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #000; box-shadow: 0 40px 90px -50px var(--shadow); }
.tour video { width: 100%; aspect-ratio: 16 / 9; }

/* pricing */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.plan { position: relative; display: flex; flex-direction: column; padding: 30px; border-radius: 18px; background: var(--bg-raised); border: 1px solid var(--line); }
.plan.featured { border-color: var(--brand); box-shadow: 0 30px 60px -30px color-mix(in oklch, var(--brand) 45%, transparent); }
.plan .tag { position: absolute; top: -12px; left: 30px; padding: 3px 10px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 600; }
.plan h3 { font-size: 18px; }
.plan .tagline { color: var(--muted); font-size: 14.5px; margin: 6px 0 22px; min-height: 44px; }
.price { font-size: 44px; font-weight: 650; letter-spacing: -0.04em; line-height: 1; }
.price small { display: block; margin-top: 8px; font-size: 13.5px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.plan .ticks { margin: 24px 0 28px; flex: 1; }
.plan .ticks li { font-size: 14.5px; }
.plan .btn { justify-content: center; }
.plans-2 { grid-template-columns: repeat(2, 1fr); margin-top: 20px; }

/* faq */
.faq { display: grid; gap: 0; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 22px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 24px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 24px/1 var(--font); color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq p { margin: 12px 0 0; color: var(--ink-soft); max-width: 820px; }

/* page hero (inner pages) */
.page-hero { padding: 88px 56px 72px; }
.page-hero h1 { font-size: clamp(38px, 5.2vw, 64px); max-width: 900px; margin-top: 16px; }
.page-hero h1 span { color: var(--muted); }
.page-hero .cta-row { justify-content: flex-start; }

/* closing */
.closing { text-align: center; padding: 112px 24px; overflow: hidden; }
.closing::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(50% 70% at 50% 100%, color-mix(in oklch, var(--brand) 14%, transparent), transparent 70%);
}
.closing h2 { font-size: clamp(36px, 5vw, 60px); }
.closing .lede { margin: 22px auto 0; }
.closing .mark { --s: 56px; margin-bottom: 28px; }

/* footer */
.footer { border-top: 1px solid var(--line); overflow: hidden; }
.footer .grid-f { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; padding: 64px 56px; }
.footer p { color: var(--muted); font-size: 14.5px; margin: 14px 0 0; max-width: 300px; }
.footer h4 { margin: 0 0 14px; font: 600 12.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer li a { font-size: 14.5px; color: var(--ink-soft); }
.footer li a:hover { color: var(--brand-ink); }
.footer .bar { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px 56px; font-size: 13.5px; color: var(--muted); }
.status { display: inline-flex; align-items: center; gap: 10px; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.seen { opacity: 1; transform: none; }

/* --- brand logos (dashboard icon CDN) ------------------------------------------ */
.logo-tile {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: var(--bg); border: 1px solid var(--line); transition: transform .2s, box-shadow .2s;
}
.logo-tile img { width: 28px; height: 28px; object-fit: contain; }
.logo-tile b { font-size: 20px; color: var(--brand-ink); }
.logos > div:hover .logo-tile { transform: translateY(-2px); box-shadow: 0 10px 24px -12px var(--shadow); }
.model-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.model-row span {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px 6px 8px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--bg);
  font-size: 13px; font-weight: 600; color: var(--ink-soft);
}
.model-row img { width: 18px; height: 18px; object-fit: contain; }
/* GitHub's logo is black: lift it on dark backgrounds */
:root[data-theme="dark"] :is(img[src$="/github.svg"], img[src$="/sentry.svg"]) { filter: invert(1); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) :is(img[src$="/github.svg"], img[src$="/sentry.svg"]) { filter: invert(1); } }

/* --- lines that shine ----------------------------------------------------------- */
.rule {
  background:
    linear-gradient(90deg, transparent, color-mix(in oklch, var(--brand-2) 85%, white) 50%, transparent) no-repeat,
    var(--line);
  background-size: 18% 100%, 100% 100%;
  background-position: -20% 0, 0 0;
  animation: rule-shine 7s cubic-bezier(.45, 0, .2, 1) infinite;
  animation-delay: var(--delay, 0s);
}
@keyframes rule-shine { 0% { background-position: -20% 0, 0 0; } 55%, 100% { background-position: 120% 0, 0 0; } }
.frame::before, .frame::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 1px; pointer-events: none;
  background: linear-gradient(180deg, transparent, color-mix(in oklch, var(--brand-2) 70%, white) 50%, transparent) no-repeat;
  background-size: 100% 220px; background-position: 0 -220px;
  animation: frame-shine 9s ease-in-out infinite;
}
.frame::before { left: -1px; }
.frame::after { right: -1px; animation-delay: -4.5s; }
@keyframes frame-shine { 0% { background-position: 0 -220px; } 60%, 100% { background-position: 0 calc(100% + 220px); } }

@property --shine-angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.shine-border { position: relative; isolation: isolate; overflow: visible; }
.shine-border::before {
  content: ""; position: absolute; inset: -1px; padding: 1px; border-radius: inherit; z-index: 2; pointer-events: none;
  background: conic-gradient(from var(--shine-angle), transparent 0deg, transparent 250deg,
    color-mix(in oklch, var(--brand-2) 40%, transparent) 290deg, var(--brand-2) 330deg,
    color-mix(in oklch, var(--brand-2) 30%, white) 345deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: shine-spin 6s linear infinite;
}
@keyframes shine-spin { to { --shine-angle: 360deg; } }
.logos.shine-border > div:first-child { border-top-left-radius: var(--radius); }
.logos.shine-border > div:nth-child(5) { border-top-right-radius: var(--radius); }
.logos.shine-border > div:nth-last-child(5) { border-bottom-left-radius: var(--radius); }
.logos.shine-border > div:last-child { border-bottom-right-radius: var(--radius); }

/* =================================================================================
   Live product mocks. An .anim element gets .play when it scrolls into view (and
   again every data-loop ms); its a-* children animate after their --d delay.
   ================================================================================= */
.anim .a-up, .anim .a-pop, .anim .a-fade, .anim .a-left, .anim .a-right { opacity: 0; }
.anim .a-type { clip-path: inset(0 100% 0 0); }
.anim.play .a-up { animation: aUp .7s var(--ease) var(--d, 0s) both; }
.anim.play .a-pop { animation: aPop .6s var(--spring) var(--d, 0s) both; }
.anim.play .a-fade { animation: aFade .5s ease var(--d, 0s) both; }
.anim.play .a-left { animation: aLeft .7s var(--ease) var(--d, 0s) both; }
.anim.play .a-right { animation: aRight .7s var(--ease) var(--d, 0s) both; }
.anim.play .a-type { animation: aType var(--t, 1s) steps(var(--n, 36)) var(--d, 0s) both; }
@keyframes aUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes aPop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes aFade { to { opacity: 1; } }
@keyframes aLeft { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
@keyframes aRight { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes aType { to { clip-path: inset(0 0 0 0); } }
.window, .stage, .term, .anim, .diff, .review { min-width: 0; max-width: 100%; }
.anim[style*="grid"], .rows, .chat { grid-template-columns: minmax(0, 1fr); }

/* app window */
.window { background: var(--bg-raised); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: 0 30px 70px -36px var(--shadow); }
.window .bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--bg); font-size: 13.5px; color: var(--muted); }
.window .bar .mark { --s: 20px; }
.window .bar > svg { width: 16px; height: 16px; color: var(--brand-ink); }
.window .bar b { color: var(--ink); font-weight: 600; white-space: nowrap; }
.window .bar .livetag { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font: 600 11.5px var(--mono); letter-spacing: .08em; color: var(--ok); }
.window .bar .livetag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }
.window .body { padding: 20px; display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.window.wide .body { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 18px; padding: 22px; align-items: start; }
.window .col { display: grid; gap: 14px; min-width: 0; grid-template-columns: minmax(0, 1fr); }

/* message */
.msg { display: flex; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-raised); }
.msg > div { min-width: 0; }
.avatar { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 14px; }
.msg b { font-size: 14.5px; }
.msg p { margin: 2px 0 0; font-size: 14px; color: var(--ink-soft); line-height: 1.45; }
.msg small { color: var(--muted); font-size: 12.5px; }
.msg img { width: 22px; height: 22px; flex: none; margin-top: 2px; }

/* journey */
.steps { position: relative; display: flex; justify-content: space-between; padding: 4px 6px 0; }
.steps .track { position: absolute; left: 30px; right: 30px; top: 23px; height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.steps .track i { position: absolute; inset: 0; background: var(--brand); transform: scaleX(0); transform-origin: left; }
.anim.play .steps .track i { animation: fillX var(--t, 4s) linear var(--d, 0s) both; }
.steps .track::after { content: ""; position: absolute; top: 0; bottom: 0; width: 70px; left: -70px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.9), transparent); }
.anim.play .steps .track::after { animation: shineX 1.6s ease-in-out .4s infinite; }
@keyframes fillX { to { transform: scaleX(1); } }
@keyframes shineX { to { left: 100%; } }
.step { position: relative; display: flex; flex-direction: column; align-items: center; gap: 7px; width: 56px; font-size: 11.5px; font-weight: 600; color: var(--muted); text-align: center; line-height: 1.2; }
.step .ring { width: 38px; height: 38px; border-radius: 50%; background: var(--bg-raised); border: 2px solid var(--line); display: grid; place-items: center; }
.step .ring svg { width: 18px; height: 18px; color: #fff; opacity: 0; }
.anim.play .step .ring { animation: lit .45s var(--spring) var(--d) both; }
.anim.play .step .ring svg { animation: aFade .2s ease var(--d) both; }
.anim.play .step { animation: stepInk .2s ease var(--d) both; }
@keyframes lit { 0% { transform: scale(1); } 50% { transform: scale(1.16); } 100% { transform: scale(1); background: var(--brand); border-color: var(--brand);
  box-shadow: 0 0 0 6px color-mix(in oklch, var(--brand) 16%, transparent); } }
@keyframes stepInk { to { color: var(--ink); } }

/* evidence rows */
.rows { display: grid; gap: 8px; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; font-size: 13.5px; background: var(--bg-raised); }
.row img { width: 22px; height: 22px; flex: none; object-fit: contain; }
.row > svg { width: 20px; height: 20px; flex: none; color: var(--brand-ink); }
.rows .row > svg:first-child { color: var(--ok); }
.row .t { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row b { font-weight: 600; }
.row .t span { color: var(--muted); }
.row code.q { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; color: var(--ink-soft); }
.row .ok, .row .no { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.row .ok { background: var(--ok-soft); color: var(--ok); }
.row .no { background: var(--bad-soft); color: var(--bad); }
.row .ok svg, .row .no svg { width: 13px; height: 13px; }

/* root cause */
.rc { border: 1px solid color-mix(in oklch, var(--brand) 30%, var(--line)); background: linear-gradient(180deg, var(--brand-soft), var(--bg-raised) 75%); border-radius: 16px; padding: 16px 18px; }
.rc .t { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--brand-ink); }
.rc .t svg { width: 16px; height: 16px; }
.rc .t small { margin-left: auto; color: var(--muted); font-weight: 500; }
.rc p { margin: 8px 0 0; font-size: 14.5px; line-height: 1.55; color: var(--ink); }
.rc p > span { display: block; width: fit-content; max-width: 100%; }
.rc code, .chat code { font-size: 12.5px; padding: 1px 6px; border-radius: 6px; background: var(--bg-raised); border: 1px solid var(--line); color: var(--brand-ink); }
.conf { margin-top: 12px; display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; font-size: 12.5px; color: var(--muted); }
.conf b { color: var(--ink); font-size: 14px; font-variant-numeric: tabular-nums; }
.meter { grid-column: 1 / -1; height: 7px; border-radius: 7px; background: color-mix(in oklch, var(--brand) 14%, var(--bg-raised)); overflow: hidden; }
.meter i { display: block; height: 100%; width: var(--w, 93%); border-radius: inherit; background: var(--brand); transform: scaleX(0); transform-origin: left; }
.anim.play .meter i { animation: fillX 1.4s var(--ease) var(--d) both; }
.ea { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.ea div { padding: 10px 12px; border-radius: 12px; background: var(--bg-raised); border: 1px solid var(--line); font-size: 13px; color: var(--ink-soft); line-height: 1.45; }
.ea b { display: block; font: 600 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 4px; }

/* fix bar / diff */
.fixbar { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-raised); font-size: 13.5px; }
.fixbar > svg { width: 18px; height: 18px; flex: none; color: var(--brand-ink); }
.fixbar b, .risk { white-space: nowrap; }
.fixbar b { font-weight: 600; }
.risk { padding: 2px 9px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-size: 11.5px; font-weight: 600; }
.prbtn { margin-left: auto; position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 12.5px; font-weight: 600; overflow: hidden; white-space: nowrap; }
.prbtn svg { width: 14px; height: 14px; }
.prbtn .done { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 5px; background: oklch(0.58 0.14 155); opacity: 0; }
.anim.play .prbtn .done { animation: aFade .3s ease var(--d) both; }
.diff { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--bg-raised); font: 500 12.5px/1.8 var(--mono); color: var(--ink-soft); }
.diff .file { padding: 8px 14px; border-bottom: 1px solid var(--line); background: var(--bg); font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; }
.diff .ln { padding: 0 14px; white-space: pre; overflow: hidden; text-overflow: ellipsis; }
.diff .rm { background: var(--bad-soft); color: var(--bad); }
.diff .add { background: var(--ok-soft); color: var(--ok); }
.anim.play .diff .rm { animation: strikeIn .4s ease var(--d) both; }
@keyframes strikeIn { from { background: transparent; color: var(--ink-soft); } }

/* chat */
.chat { display: grid; gap: 10px; }
.chat .q { justify-self: end; max-width: 85%; padding: 10px 15px; border-radius: 18px 18px 4px 18px; background: var(--brand); color: #fff; font-size: 14.5px; }
.chat .tr { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); padding-left: 2px; }
.chat .tr svg { width: 16px; height: 16px; flex: none; }
.chat .tr b { color: var(--ink-soft); font-weight: 500; }
.chat .ans { padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-raised); font-size: 14px; line-height: 1.55; }
.cite { display: inline-block; padding: 0 6px; border-radius: 6px; background: var(--brand-soft); color: var(--brand-ink); font: 600 11px var(--mono); vertical-align: 1px; }
.chat table { margin-top: 10px; border-collapse: collapse; font-size: 13px; }
.chat td, .chat th { border: 1px solid var(--line); padding: 4px 12px; text-align: left; }
.chat th { background: var(--bg); font-weight: 600; }

/* PR review comment */
.review { border: 1px solid var(--line); border-radius: 14px; background: var(--bg-raised); overflow: hidden; }
.review .who { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.review .who .mark { --s: 22px; }
.review .who small { color: var(--muted); margin-left: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.review .tag { padding: 1px 8px; border-radius: 999px; background: var(--bad-soft); color: var(--bad); font-size: 11px; font-weight: 600; }
.review p { margin: 0; padding: 10px 14px; font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; }
.review .sugg { margin: 0 14px 12px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; font: 500 12px/1.8 var(--mono); }
.review .sugg div { padding: 0 10px; white-space: pre; overflow: hidden; text-overflow: ellipsis; }
.review .sugg .h { background: var(--bg); color: var(--muted); font-family: var(--font); font-size: 11.5px; padding: 4px 10px; }
.review .sugg .rm { background: var(--bad-soft); color: var(--bad); }
.review .sugg .add { background: var(--ok-soft); color: var(--ok); }
.review .apply { margin: 0 14px 14px; display: inline-flex; padding: 5px 11px; border-radius: 8px; border: 1px solid var(--line-strong); font-size: 12px; font-weight: 600; }

/* terminal (dark in both themes) */
.term { border-radius: 14px; background: var(--term); overflow: hidden; border: 1px solid rgba(255,255,255,.06); box-shadow: 0 30px 70px -34px rgba(11,13,19,.7); }
.term .tb { display: flex; gap: 7px; padding: 12px 14px; background: #161b22; }
.term .tb i { width: 11px; height: 11px; border-radius: 50%; }
.term pre { margin: 0; padding: 16px 18px 18px; font: 500 13px/1.7 var(--mono); color: #d0d4da; white-space: pre; overflow: hidden; }
.term .ps { color: #5fd787; } .term .dim { color: #7d8590; } .term .blue { color: #7aa2ff; } .term .red { color: #ff7b72; } .term .green { color: #5fd787; }
.term .ln { display: block; width: fit-content; }
.term .ln b { color: #fff; }

/* integrations hub */
.hub { position: relative; aspect-ratio: 11 / 8; width: 100%; max-width: 940px; margin: 0 auto; }
.hub > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hub .wire { stroke: var(--line-strong); stroke-width: 1.5; fill: none; }
.hub .flow { stroke: var(--brand-2); stroke-width: 2.5; fill: none; stroke-linecap: round; stroke-dasharray: 50 600; stroke-dashoffset: 650; opacity: 0; }
.anim.play .hub .flow { animation: flow 2.6s ease-in-out var(--d) infinite; }
@keyframes flow { 0% { stroke-dashoffset: 650; opacity: 0; } 15%, 80% { opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
.hub .core { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.hub .core .mark { --s: clamp(64px, 10vw, 112px); box-shadow: 0 0 0 14px color-mix(in oklch, var(--brand) 10%, transparent), 0 30px 70px -20px color-mix(in oklch, var(--brand) 60%, transparent); }
.hub .node { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
.hub .node span { width: clamp(46px, 6vw, 62px); aspect-ratio: 1; border-radius: 16px; display: grid; place-items: center; background: var(--bg-raised); border: 1px solid var(--line); box-shadow: 0 16px 30px -18px var(--shadow); }
.hub .node img { width: 55%; height: 55%; object-fit: contain; }

/* --- reduced motion: show every mock finished, still ------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .rule, .frame::before, .frame::after, .shine-border::before, .mark.live i { animation: none; }
  .frame::before, .frame::after { display: none; }
  .anim *, .anim *::before, .anim *::after, .window .bar .livetag::before { animation: none !important; }
  .anim .a-up, .anim .a-pop, .anim .a-fade, .anim .a-left, .anim .a-right { opacity: 1; }
  .anim .a-type { clip-path: none; }
  .steps .track i, .meter i { transform: none; }
  .step .ring { background: var(--brand); border-color: var(--brand); } .step .ring svg { opacity: 1; }
  .prbtn .done { opacity: 1; }
  .hub .flow { display: none; }
}

/* --- small screens --------------------------------------------------------------- */
@media (max-width: 960px) {
  .section, .section.tight, .hero, .page-hero { padding-left: 24px; padding-right: 24px; }
  .section { padding-top: 72px; padding-bottom: 72px; }
  .feature, .feature.flip { grid-template-columns: 1fr; gap: 36px; }
  .feature.flip .feature-text { order: 0; }
  .cols-3, .cols-4 { grid-template-columns: repeat(2, 1fr); }
  .logos { grid-template-columns: repeat(3, 1fr); }
  .plans, .plans-2 { grid-template-columns: 1fr; }
  .footer .grid-f { grid-template-columns: 1fr 1fr; padding: 48px 24px; }
  .footer .bar { padding: 20px 24px; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .section-head.center { align-items: center; }
  .cmds div { grid-template-columns: 1fr; gap: 6px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .window.wide .body { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
  .nav, .actions { display: none; }
  .theme-toggle { margin-left: auto; }
  .menu-toggle { display: grid; }
  .header.open .nav, .header.open .actions { display: flex; }
  .header.open .wrap { flex-wrap: wrap; height: auto; padding-top: 12px; padding-bottom: 16px; }
  .header.open .nav { order: 3; flex-basis: 100%; flex-direction: column; align-items: stretch; }
  .header.open .actions { order: 4; flex-basis: 100%; }
  .header.open .actions .btn { flex: 1; justify-content: center; }
  .menu { position: static; width: auto; grid-template-columns: 1fr; box-shadow: none; display: none; opacity: 1; transform: none; pointer-events: auto; margin-top: 4px; }
  .dropdown.open .menu { display: grid; }
}
@media (max-width: 560px) {
  .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; }
  .logos { grid-template-columns: repeat(2, 1fr); }
  .footer .grid-f { grid-template-columns: 1fr; }
  .hero { padding-top: 64px; }
  .lede { font-size: 17px; }
  .install { font-size: 12.5px; }
  .stats { grid-template-columns: 1fr; }
  .stat { border-left: 0; padding: 32px 24px; }
  .stat:nth-child(n+2) { border-top: 1px solid var(--line); }
  .hero-media { padding: 6px; margin-top: 44px; }
  .window .body, .window.wide .body { padding: 14px; }
  .window .bar .sub { display: none; }
  .ea { grid-template-columns: 1fr; }
  .step { width: 44px; font-size: 10px; }
  .step .ring { width: 32px; height: 32px; }
  .steps .track { top: 20px; }
  .term pre { font-size: 11px; padding: 14px; overflow-x: auto; }
  .diff, .review .sugg { font-size: 11px; }
  .fixbar { gap: 8px; }
  .hub .node b { display: none; }
}
.msg > svg { width: 22px; height: 22px; flex: none; color: var(--brand-ink); margin-top: 2px; }

/* =================================================================================
   Round 3: logo strip, stack grid, integration demos, polish
   ================================================================================= */

/* section labels as a highlighted chip */
.kicker { padding: 4px 10px; border-radius: 7px; background: var(--brand-soft); font: 500 14px var(--font); letter-spacing: 0; text-transform: none; }
.kicker::before { display: none; }

/* cards answer the pointer */
.grid > article { transition: background .2s; }
.grid > article:hover { background: color-mix(in oklch, var(--bg-raised) 90%, var(--brand-soft)); }
.grid > article .card-ico { transition: transform .25s var(--spring); }
.grid > article:hover .card-ico { transform: translateY(-2px) rotate(-4deg); }

/* a soft light follows the pointer across a stage */
.stage::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), color-mix(in oklch, var(--brand-2) 12%, transparent), transparent 65%); }
.stage:hover::after { opacity: 1; }

/* footer wordmark */
.giant { padding: 8px 24px 0; text-align: center; font-weight: 700; font-size: clamp(84px, 19vw, 250px); letter-spacing: -.065em; line-height: .78; user-select: none;
  background: linear-gradient(180deg, var(--line-strong), transparent 92%); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* --- logo strip ------------------------------------------------------------------ */
.trust { text-align: center; }
.trust > p { margin: 0; padding: 22px 24px; color: var(--muted); font-size: 15.5px; border-bottom: 1px solid var(--line); }
.lanes { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.lanes-run { display: flex; width: max-content; animation: lanes 46s linear infinite; }
.lanes:hover .lanes-run { animation-play-state: paused; }
.lanes-copy { display: contents; }
@keyframes lanes { to { transform: translateX(-50%); } }
.lane { flex: none; width: 236px; height: 128px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; border-right: 1px solid var(--line); }
.lane .lg { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; font-size: 21px; letter-spacing: -.03em; color: var(--ink); }
.lane img { width: 28px; height: 28px; filter: grayscale(1); opacity: .85; transition: filter .25s, opacity .25s; }
.lane:hover img { filter: none; opacity: 1; }
.lane a { display: inline-flex; align-items: center; gap: 4px; font: 600 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--brand-ink); opacity: .8; transition: opacity .2s, gap .2s; }
.lane a:hover { opacity: 1; gap: 8px; }
.lane a svg { width: 13px; height: 13px; }

/* --- connected by design: text beside a 3x3 grid ------------------------------------ */
.stack { display: grid; grid-template-columns: 1fr 1.05fr; gap: 64px; align-items: center; }
.stack > * { min-width: 0; }
.stack .feature-text p { color: var(--ink-soft); font-size: 17px; margin: 18px 0 0; max-width: 480px; }
.stack-grid { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); aspect-ratio: 1; max-width: 500px; margin-left: auto; }
.stack-grid > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.stack-grid .wire { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; fill: none; }
.stack-grid .flow { stroke: var(--brand-2); stroke-width: 2; stroke-linecap: round; fill: none; stroke-dasharray: 22 300; stroke-dashoffset: 22; opacity: 0; }
.stack-grid.play .flow { animation: pulseIn 7.2s ease-in var(--d) infinite; }
@keyframes pulseIn { 0% { stroke-dashoffset: 22; opacity: 1; } 11% { stroke-dashoffset: -150; opacity: 1; } 12%, 100% { stroke-dashoffset: -150; opacity: 0; } }
.stack-grid .cell { position: relative; display: grid; place-items: center; z-index: 1; }
.stack-grid .cell b { position: absolute; top: calc(50% + 40px); font-size: 15px; font-weight: 500; color: var(--muted); transition: color .2s; }
.stack-grid .ic { width: 62px; height: 62px; border-radius: 18px; display: grid; place-items: center; background: var(--bg-raised); border: 1px solid var(--line);
  box-shadow: 0 12px 26px -18px var(--shadow); transition: transform .25s var(--spring), border-color .2s; }
.stack-grid .ic img { width: 30px; height: 30px; object-fit: contain; }
.stack-grid.play .ic { animation: ping 7.2s ease-out var(--d) infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in oklch, var(--brand-2) 45%, transparent); border-color: var(--brand-2); }
  10% { box-shadow: 0 0 0 14px transparent; border-color: var(--brand-2); } 16%, 100% { box-shadow: 0 12px 26px -18px var(--shadow); border-color: var(--line); } }
.stack-grid a.cell:hover .ic { transform: translateY(-4px) scale(1.05); }
.stack-grid a.cell:hover b { color: var(--ink); }
.stack-grid .core .mark { --s: 72px; box-shadow: 0 0 0 10px color-mix(in oklch, var(--brand) 9%, transparent), 0 24px 50px -18px color-mix(in oklch, var(--brand) 60%, transparent); }

/* --- status headline in the hero ------------------------------------------------------- */
.anim .a-swap { opacity: 0; }
.anim.play .a-swap { animation: swap var(--t) linear var(--d) both; }
@keyframes swap { 0% { opacity: 0; transform: translateY(6px); } 14%, 86% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-6px); } }
.statusline { display: flex; align-items: center; gap: 10px; height: 22px; padding: 0 4px; font-size: 13.5px; font-weight: 500; color: var(--ink-soft); }
.statusline > .a-swap { display: grid; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--brand-2); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.swaps { position: relative; flex: 1; height: 22px; }
.swaps > span { position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.swaps .done { color: var(--ok); }
.swaps .done svg { width: 15px; height: 15px; }

/* --- integration demo player -------------------------------------------------------- */
.demos { display: grid; grid-template-columns: 250px minmax(0, 1fr); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--bg-raised);
  box-shadow: 0 40px 80px -50px var(--shadow); }
.demo-tabs { display: flex; flex-direction: column; gap: 2px; padding: 10px; border-right: 1px solid var(--line); background: var(--bg); }
.demo-tab { position: relative; display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 0; border-radius: 11px; background: none; cursor: pointer;
  font: 500 15px var(--font); color: var(--ink-soft); text-align: left; overflow: hidden; transition: background .15s, color .15s; }
.demo-tab:hover { background: var(--hover); color: var(--ink); }
.demo-tab img { width: 22px; height: 22px; flex: none; }
.demo-tab[aria-selected="true"] { background: var(--bg-raised); color: var(--ink); font-weight: 600; box-shadow: 0 0 0 1px var(--line), 0 6px 16px -10px var(--shadow); }
.demo-tab .prog { position: absolute; left: 14px; right: 14px; bottom: 5px; height: 2px; border-radius: 2px; background: var(--line); overflow: hidden; opacity: 0; }
.demos.auto .demo-tab[aria-selected="true"] .prog { opacity: 1; }
.demo-tab .prog i { display: block; height: 100%; background: var(--brand-2); transform: scaleX(0); transform-origin: left; }
.demos.auto.running .demo-tab[aria-selected="true"] .prog i { animation: fillX var(--t) linear both; }
.demo-panel { min-width: 0; display: grid; grid-template-rows: auto 1fr; }
.demo-panel[hidden] { display: none; }
.demo-panel .cap { padding: 26px 30px 0; }
.demo-panel .cap h3 { font-size: 22px; }
.demo-panel .cap p { margin: 6px 0 0; color: var(--muted); font-size: 15px; max-width: 620px; }
.demo-stage { margin: 20px; padding: clamp(14px, 2.4vw, 28px); border-radius: 14px; border: 1px solid var(--line); min-height: 340px; min-width: 0;
  background: radial-gradient(circle, color-mix(in oklch, var(--line-strong) 80%, transparent) 1px, transparent 1.3px) 0 0 / 18px 18px, var(--bg-2); }
.window .bar img { width: 18px; height: 18px; flex: none; }

/* pieces inside the demos */
.sql { margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--term); color: #d0d4da; font: 500 12.5px/1.75 var(--mono); overflow: hidden; }
.sql .ln { display: block; width: fit-content; white-space: pre; }
.sql .kw { color: #7aa2ff; } .sql .str { color: #a5d6a7; }
.tbl { width: 100%; border-collapse: collapse; font: 500 12.5px var(--mono); }
.tbl th { text-align: left; font-weight: 600; color: var(--muted); padding: 6px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 7px 10px; border-bottom: 1px solid var(--line); color: var(--ink-soft); white-space: nowrap; }
.tbl .more td { color: var(--muted); border-bottom: 0; }
.pill-s { padding: 1px 7px; border-radius: 6px; background: var(--bad-soft); color: var(--bad); font-size: 11.5px; }
.foot { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ok); }
.foot svg, .checks svg { width: 15px; height: 15px; }
.note { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; border: 1px solid color-mix(in oklch, var(--brand) 30%, var(--line));
  background: linear-gradient(180deg, var(--brand-soft), var(--bg-raised)); }
.note .mark { --s: 22px; margin-top: 1px; }
.note p { margin: 0; font-size: 14px; line-height: 1.5; }
.row.hl { transition: none; }
.anim.play .hl { animation: hl .5s ease var(--d) both, hl2 .6s ease calc(var(--d) + 1.2s) both; }
@keyframes hl { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
@keyframes hl2 { to { border-color: var(--brand-2); background: var(--brand-soft); } }
.tagx { margin-left: auto; flex: none; padding: 2px 9px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 11.5px; font-weight: 600; }
.prcard { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-raised); }
.prcard > svg { width: 20px; height: 20px; flex: none; color: var(--ok); }
.prcard > div { min-width: 0; flex: 1; }
.prcard b { font-size: 14px; }
.prcard p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.prcard .state { padding: 3px 10px; border-radius: 999px; background: oklch(0.58 0.14 155); color: #fff; font-size: 12px; font-weight: 600; }
.checks { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--ok); }
.checks span { display: inline-flex; align-items: center; gap: 6px; }
.issue { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-raised); }
.issue .lvl { display: inline-block; margin-bottom: 6px; padding: 1px 8px; border-radius: 6px; background: var(--bad-soft); color: var(--bad); font-size: 11.5px; font-weight: 600; }
.issue b { display: block; font: 600 13.5px var(--mono); overflow-wrap: anywhere; }
.issue p { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 48px; margin-top: 12px; }
.bars i { flex: 1; height: var(--h); border-radius: 3px 3px 0 0; background: color-mix(in oklch, var(--bad) 70%, var(--bg-raised)); transform: scaleY(0); transform-origin: bottom; }
.anim.play .bars i { animation: growY .5s var(--ease) var(--d) both; }
@keyframes growY { to { transform: scaleY(1); } }
.trace { display: grid; gap: 6px; }
.frame-l { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-raised); font-size: 12.5px; }
.frame-l code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-soft); }
.frame-l span { color: var(--muted); font-family: var(--mono); }
.spark { width: 100%; height: 56px; }
.spark polyline { fill: none; stroke: var(--brand-2); stroke-width: 2; vector-effect: non-scaling-stroke; }
.anim .spark { clip-path: inset(0 100% 0 0); }
.anim.play .spark { animation: aType 1.6s var(--ease) .2s both; }
.logs { border-radius: 10px; background: var(--term); padding: 8px 0; font: 500 12px/1.9 var(--mono); color: #c9d1d9; overflow: hidden; }
.log { display: flex; gap: 12px; padding: 0 12px; white-space: nowrap; }
.log .ts { color: #7d8590; } .log .lv { width: 34px; flex: none; } .lv.info { color: #7aa2ff; } .lv.warn { color: #e3b341; }
.log span:last-child { overflow: hidden; text-overflow: ellipsis; }
.anim.play .log.hl { animation: aFade .3s ease var(--d) both, logHl .5s ease calc(var(--d) + .8s) both; }
@keyframes logHl { to { background: rgba(255, 123, 114, .16); color: #ffb4ad; } }
.mail { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-raised); }
.mail .unread { width: 8px; height: 8px; margin-top: 7px; flex: none; border-radius: 50%; background: var(--brand-2); }
.mail > div { min-width: 0; flex: 1; }
.mail p { margin: 2px 0 0; font-size: 13.5px; color: var(--ink-soft); }
.mail small { color: var(--muted); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-s { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); font-size: 12.5px; font-weight: 600; }
.chip-s.ok { background: var(--ok-soft); color: var(--ok); }
.chip-s svg { width: 14px; height: 14px; }
.draft { padding: 14px 16px; border: 1px dashed var(--line-strong); border-radius: 12px; background: var(--bg-raised); }
.draft small { display: block; margin-bottom: 6px; font-size: 12px; color: var(--muted); }
.draft .ln { display: block; width: fit-content; max-width: 100%; font-size: 14px; white-space: nowrap; }
.sl { display: flex; gap: 12px; align-items: flex-start; }
.sl > .mark, .sl > span > .mark { --s: 34px; border-radius: 9px; }
.sl > div { min-width: 0; flex: 1; }
.sl small { color: var(--muted); font-size: 12px; }
.sl p { margin: 3px 0 0; font-size: 14px; line-height: 1.5; color: var(--ink-soft); }
.mention { padding: 0 3px; border-radius: 4px; background: color-mix(in oklch, #e8a33d 22%, transparent); color: oklch(0.55 0.13 70); font-weight: 600; }
.typing { display: flex; gap: 4px; height: 20px; align-items: center; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: dots 1s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 50% { transform: translateY(-4px); opacity: .5; } }
.sl .typing { position: absolute; }
.sl > div { position: relative; }
.reacts { display: flex; gap: 6px; margin-top: 8px; }
.reacts span { padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-raised); font-size: 12.5px; }
.ticket { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-raised); }
.ticket p { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }
.ticket .st { position: relative; flex: none; width: 92px; height: 24px; }
.ticket .st > span { position: absolute; right: 0; top: 0; padding: 3px 10px; border-radius: 6px; font: 600 11.5px var(--mono); text-transform: uppercase; letter-spacing: .04em; background: var(--hover); color: var(--ink-soft); white-space: nowrap; }
.ticket .st .rev { background: var(--brand-soft); color: var(--brand-ink); }

@media (prefers-reduced-motion: reduce) {
  .lanes-run { animation: none; flex-wrap: wrap; justify-content: center; width: auto; }
  .lanes-copy { display: none; }
  .anim .a-swap { display: none; }
  .anim .swaps .done { opacity: 1; }
  .anim .hl { border-color: var(--brand-2); background: var(--brand-soft); }
  .stack-grid .flow { display: none; }
  .bars i { transform: none; }
  .anim .spark { clip-path: none; }
  .typing { display: none; }
}
@media (max-width: 960px) {
  .stack { grid-template-columns: 1fr; gap: 40px; }
  .stack-grid { margin: 0 auto; }
  .demos { grid-template-columns: minmax(0, 1fr); }
  .demo-tabs { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .demo-tab { flex: none; }
}
@media (max-width: 560px) {
  .lane { width: 190px; height: 112px; }
  .lane .lg { font-size: 18px; }
  .stack-grid .ic { width: 50px; height: 50px; border-radius: 14px; }
  .stack-grid .ic img { width: 24px; height: 24px; }
  .stack-grid .cell b { top: calc(50% + 32px); font-size: 13px; }
  .stack-grid .core .mark { --s: 56px; }
  .demo-panel .cap { padding: 20px 18px 0; }
  .demo-stage { margin: 12px; min-height: 0; }
  .tbl th:last-child, .tbl td:last-child { display: none; }
}
.draft { overflow: hidden; }
.demo-stage { position: relative; }
.demo-stage::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), color-mix(in oklch, var(--brand-2) 12%, transparent), transparent 65%); }
.demo-stage:hover::after { opacity: 1; }
@media (max-width: 560px) { .fixbar .risk { display: none; } }

/* =================================================================================
   Round 4: menus, legal pages, motion polish
   ================================================================================= */

/* --- menus ---------------------------------------------------------------------------- */
.nav .menu { display: flex; gap: 8px; width: auto; padding: 8px; top: calc(100% + 12px); left: -12px; grid-template-columns: none;
  border-radius: 18px; transform: translateY(-8px) scale(.98); transform-origin: 20% 0; transition: opacity .18s ease, transform .22s var(--ease); }
.nav .dropdown.open .menu { transform: none; }
.nav .menu::before { content: ""; position: absolute; left: 0; right: 0; top: -16px; height: 16px; } /* bridge over the gap */
.menu .items { display: grid; grid-template-columns: repeat(2, 260px); gap: 2px; }
.menu a.mi { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 12px 34px 12px 12px; border-radius: 12px; transition: background .15s; }
.menu a.mi:hover, .menu a.mi:focus-visible { background: var(--hover); outline: none; }
.menu .ico { transition: background .2s, color .2s, transform .25s var(--spring); }
.menu a.mi:hover .ico, .menu a.mi:focus-visible .ico { background: var(--brand); color: #fff; transform: scale(1.06); }
.menu .tx { display: block; color: var(--ink); font-size: 14.5px; font-weight: 600; line-height: 1.35; }
.menu .tx small { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; font-weight: 400; line-height: 1.45; }
.menu .go { position: absolute; right: 12px; top: 14px; width: 15px; height: 15px; color: var(--muted); opacity: 0; transform: translateX(-4px); transition: opacity .15s, transform .15s; }
.menu a.mi:hover .go, .menu a.mi:focus-visible .go { opacity: 1; transform: none; }
.menu .feat { display: flex; flex-direction: column; gap: 4px; width: 230px; flex: none; padding: 10px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); transition: border-color .2s; }
.menu .feat:hover { border-color: var(--line-strong); }
.menu .feat .thumb { position: relative; display: block; margin-bottom: 8px; border-radius: 8px; overflow: hidden; aspect-ratio: 16 / 9; background: #000; }
.menu .feat .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.menu .feat:hover .thumb img { transform: scale(1.05); }
.menu .feat .play { position: absolute; inset: 0; margin: auto; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.92); color: #0b0d13; }
.menu .feat .play svg { width: 16px; height: 16px; fill: currentColor; margin-left: 2px; }
.menu .feat b { color: var(--ink); font-size: 14px; }
.menu .feat small { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.menu .feat.plain .ico { margin-bottom: 8px; }
.menu .feat.plain { justify-content: flex-end; background: linear-gradient(160deg, var(--brand-soft), var(--bg) 70%); }
@media (max-width: 820px) {
  .nav .menu { position: static; display: none; flex-direction: column; padding: 4px 0 8px; border: 0; box-shadow: none; background: none; transform: none; opacity: 1; pointer-events: auto; }
  .nav .dropdown.open .menu { display: flex; }
  .nav .menu::before { display: none; }
  .menu .items { grid-template-columns: 1fr; }
  .menu .feat { display: none; }
}

/* footer: five columns, legal links */
.footer .grid-f { grid-template-columns: 1.5fr repeat(4, 1fr); }
.legal-links { display: inline-flex; flex-wrap: wrap; gap: 8px 22px; }
.legal-links a:hover { color: var(--ink); }
@media (max-width: 960px) { .footer .grid-f { grid-template-columns: 1fr 1fr; } .footer .grid-f > div:first-child { grid-column: 1 / -1; } }
@media (max-width: 560px) { .footer .grid-f { grid-template-columns: 1fr 1fr; } }

/* --- legal pages ------------------------------------------------------------------------ */
.legal { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 64px; align-items: start; }
.toc { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.toc b { margin-bottom: 8px; font: 600 12px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.toc a { padding: 6px 10px; border-left: 2px solid var(--line); color: var(--muted); transition: color .15s, border-color .15s; }
.toc a:hover, .toc a.on { color: var(--ink); border-left-color: var(--brand-2); }
.prose { max-width: 720px; }
.prose .updated { margin: 0 0 8px; font: 500 13px var(--mono); color: var(--muted); }
.prose section { scroll-margin-top: 90px; padding-top: 8px; }
.prose h2 { font-size: 24px; letter-spacing: -.02em; margin: 36px 0 12px; }
.prose p, .prose li { color: var(--ink-soft); font-size: 16px; line-height: 1.7; }
.prose p { margin: 0 0 14px; }
.prose ul { margin: 0 0 14px; padding-left: 20px; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--brand-2); }
.prose a { color: var(--brand-ink); text-decoration: underline; text-underline-offset: 3px; }
.prose b { color: var(--ink); }
.ck { width: 100%; margin: 4px 0 16px; border-collapse: collapse; font-size: 14.5px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ck th, .ck td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; color: var(--ink-soft); }
.ck th { background: var(--bg); color: var(--ink); font-weight: 600; }
@media (max-width: 960px) { .legal { grid-template-columns: 1fr; gap: 28px; } .toc { position: static; flex-direction: row; flex-wrap: wrap; } .toc b { width: 100%; } .toc a { border-left: 0; border-bottom: 2px solid var(--line); } }

/* --- motion polish ------------------------------------------------------------------------ */
/* headlines rise in word by word */
.words .w { display: inline-block; opacity: 0; transform: translateY(.35em); filter: blur(8px);
  transition: opacity .6s ease, transform .8s var(--ease), filter .7s ease; transition-delay: calc(var(--i) * 55ms); }
.words.in .w { opacity: 1; transform: none; filter: none; }

/* reveals arrive a little softer */
.reveal { filter: blur(4px); transition: opacity .7s ease, transform .8s var(--ease), filter .7s ease; }
.reveal.seen { filter: none; }

/* the hero window rises in on load, then tilts toward the pointer */
.hero-media { animation: heroIn 1.2s var(--ease) .35s both; perspective: 1600px; }
@keyframes heroIn { from { opacity: 0; transform: translateY(48px) rotateX(14deg); } to { opacity: 1; transform: none; } }
.hero-media .window { transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .5s var(--ease); transform-style: preserve-3d; }

/* a pointer comes in and clicks "Open pull request" */
.fixbar { position: relative; }
.cursor { position: absolute; right: 52px; top: 55%; width: 22px; height: 22px; z-index: 3; opacity: 0; pointer-events: none; filter: drop-shadow(0 3px 4px rgba(0,0,0,.3)); }
.anim.play .cursor { animation: cursor 2.6s var(--ease) var(--d) both; }
@keyframes cursor {
  0% { opacity: 0; transform: translate(-170px, 70px); }
  12% { opacity: 1; }
  44% { transform: none; }
  50% { transform: scale(.8); }
  56% { transform: none; }
  85% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translate(8px, 6px); }
}

/* reading progress along the top */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; transform: scaleX(0); transform-origin: left;
  background: linear-gradient(90deg, var(--brand), var(--brand-2), oklch(0.65 0.17 300)); pointer-events: none; }
@supports (animation-timeline: scroll()) {
  .progress { animation: grow linear both; animation-timeline: scroll(root); }
  @keyframes grow { to { transform: scaleX(1); } }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { filter: none; }
  .hero-media { animation: none; }
  .hero-media .window { transform: none; }
  .cursor { display: none; }
  .progress { display: none; }
}
.hero h1 .w, .page-hero h1 .w { color: inherit; }
/* a closed menu can't be tabbed into */
@media (min-width: 821px) {
  .nav .menu { visibility: hidden; transition: opacity .18s ease, transform .22s var(--ease), visibility 0s linear .22s; }
  .nav .dropdown.open .menu { visibility: visible; transition-delay: 0s; }
}
/* typed lines: always end fully shown (a stepped clip can otherwise stop one character short) */
@keyframes aType { 98%, 100% { clip-path: inset(0 -4px 0 0); } }

/* --- the TraceX mark, exactly as the dashboard draws it ------------------------------------ */
/* plate: black with a white mark; inverted (light plate, dark mark) in the dark theme. The mark
   is 68% of the plate and the corners are 26% of its size, at every size. */
:root { --plate: oklch(0 0 0); --plate-ink: oklch(1 0 0); }
:root[data-theme="dark"] { --plate: oklch(0.97 0.003 84); --plate-ink: oklch(0.13 0 0); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --plate: oklch(0.97 0.003 84); --plate-ink: oklch(0.13 0 0); } }
.mark { display: inline-grid; place-items: center; grid-template-columns: none; grid-template-rows: none; gap: 0; padding: 0;
  border-radius: 26%; background: var(--plate); color: var(--plate-ink); }
.mark svg { display: block; width: 68%; height: 68%; }
.mark.live rect { animation: cube 3.6s ease-in-out infinite; animation-delay: calc(var(--n) * .12s); }
.mark.live rect.core { animation: core-breathe 3.6s ease-in-out .96s infinite; }
@keyframes cube { 0%, 70%, 100% { opacity: 1; } 35% { opacity: .5; } }
@keyframes core-breathe { 0%, 100% { opacity: .45; } 50% { opacity: .9; } }
/* the wordmark: 0.22em letterspacing, as in the app */
.brand { gap: 12px; font-size: 17px; font-weight: 600; letter-spacing: .22em; }
.header .brand .mark { --s: 32px; }
@media (prefers-reduced-motion: reduce) { .mark.live rect { animation: none; } }

/* the footer wordmark is decoration: it must never sit on top of the links */
.giant { position: relative; z-index: 0; pointer-events: none; margin-top: 18px; }
.footer .bar { position: relative; z-index: 1; }
/* the mark's own drawing always sits centred at 68% of its plate, whatever it's placed inside */
span.mark > svg { position: static; inset: auto; width: 68%; height: 68%; transform: none; }
/* the mark is never animated; a live one gets a soft pulse ring around its plate instead */
.mark.live rect { animation: none; }
.mark.live { position: relative; }
.mark.live::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: 0 0 0 0 color-mix(in oklch, var(--brand-2) 45%, transparent); animation: plate-pulse 2.8s ease-out infinite; }
@keyframes plate-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in oklch, var(--brand-2) 40%, transparent); } 70%, 100% { box-shadow: 0 0 0 16px transparent; } }
@media (prefers-reduced-motion: reduce) { .mark.live::after { animation: none; } }
/* a cleaner halo for the big centre marks */
.hub .core .mark, .stack-grid .core .mark { box-shadow: 0 0 0 8px color-mix(in oklch, var(--brand) 7%, transparent), 0 24px 50px -16px color-mix(in oklch, var(--brand) 45%, transparent); }
/* the NEW pill: a light runs around its border, and a glint crosses the badge */
.pill.shine-border::before { animation-duration: 4s; }
.pill b { position: relative; overflow: hidden; }
.pill b::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); animation: glint 4s ease-in-out 1s infinite; }
@keyframes glint { 0% { left: -60%; } 30%, 100% { left: 130%; } }
.pill:hover { border-color: var(--line-strong); }
@media (prefers-reduced-motion: reduce) { .pill b::after { display: none; } }
.pill.shine-border::before { inset: -1.5px; padding: 1.5px; }

/* =================================================================================
   Round 5: live trace, hypotheses and checks, timeline, charts, PR checks
   ================================================================================= */

/* two layers in one grid cell: the trace, then the result that replaces it */
.stackcell { display: grid; }
.stackcell > * { grid-area: 1 / 1; min-width: 0; }
.anim .a-out { opacity: 1; }
.anim.play .a-out { animation: aOut .45s ease var(--d) both; }
@keyframes aOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-10px) scale(.98); visibility: hidden; } }
.stackcell > .col { align-content: start; }

/* the live trace */
.feed { border: 1px solid var(--line); border-radius: 14px; background: var(--bg-raised); overflow: hidden; }
.feed-h { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--bg); font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.feed-h svg { width: 15px; height: 15px; color: var(--brand-2); }
.feed-h .n { margin-left: auto; font: 600 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ok); }
.fl { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--ink-soft); }
.fl:last-child { border-bottom: 0; }
.fl > svg { width: 16px; height: 16px; flex: none; color: var(--brand-ink); }
.fl .what { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl .what code { font-size: 11.5px; color: var(--ink); }
.fl .res { flex: none; font: 500 11.5px var(--mono); color: var(--muted); padding: 2px 7px; border-radius: 6px; background: var(--bg); }
.fl:last-child .res { background: var(--ok-soft); color: var(--ok); }
/* the newest line glows as it lands */
.anim.play .fl { animation: aLeft .6s var(--ease) var(--d) both, flGlow 1s ease var(--d) both; }
@keyframes flGlow { from { background: var(--brand-soft); } to { background: transparent; } }

/* hypotheses and claim checks */
.verdicts { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
.vh { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 0 2px 2px; }
.vh b { font-size: 14.5px; }
.vh span { font: 500 12px var(--mono); color: var(--muted); }
.vr { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-raised); }
.vtx { min-width: 0; flex: 1; }
.vtx .claim { display: inline; font-size: 14px; font-weight: 600; color: var(--ink);
  background: linear-gradient(currentColor, currentColor) 0 58% / 0% 1.5px no-repeat; }
.vtx small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.vt { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.vt svg { width: 13px; height: 13px; }
.vt.ok { background: var(--ok-soft); color: var(--ok); }
.vt.no { background: var(--bad-soft); color: var(--bad); }
.anim.play .vr.bad .claim { animation: strike .5s ease var(--s) both, dim .5s ease var(--s) both; }
@keyframes strike { to { background-size: 100% 1.5px; } }
@keyframes dim { to { color: var(--muted); } }
.anim.play .vr:not(.bad) { animation: aLeft .7s var(--ease) var(--d) both, okRow .6s ease var(--s) both; }
@keyframes okRow { to { border-color: color-mix(in oklch, var(--ok) 45%, var(--line)); box-shadow: 0 0 0 3px color-mix(in oklch, var(--ok) 12%, transparent); } }

/* timeline: the line draws down, events land on it */
.tline { position: relative; display: grid; gap: 14px; padding-left: 4px; }
.tline .rail { position: absolute; left: 21px; top: 12px; bottom: 12px; width: 2px; border-radius: 2px; background: var(--line-strong); transform: scaleY(0); transform-origin: top; }
.anim.play .tline .rail { animation: fillY var(--t) linear var(--d) both; }
@keyframes fillY { to { transform: scaleY(1); } }
.te { position: relative; display: flex; gap: 14px; align-items: flex-start; }
.te .dot { position: relative; z-index: 1; flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg-raised); border: 1px solid var(--line); color: var(--ink-soft); }
.te .dot svg { width: 16px; height: 16px; }
.te.k-deploy .dot { color: var(--brand-ink); }
.te.k-error .dot, .te.k-alert .dot { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.te.k-mail .dot { color: oklch(0.6 0.15 40); }
.te.k-tracex .dot { background: var(--brand); color: #fff; border-color: transparent; box-shadow: 0 0 0 5px color-mix(in oklch, var(--brand) 15%, transparent); }
.te.k-fix .dot { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.te > div { min-width: 0; padding: 2px 0 0; }
.te small { font: 500 11.5px var(--mono); color: var(--muted); }
.te b { display: block; font-size: 14.5px; margin-top: 1px; }
.te p { margin: 2px 0 0; font-size: 13px; color: var(--ink-soft); }

/* bar chart inside an answer */
.chart { display: flex; align-items: flex-end; gap: 10px; height: 150px; margin-top: 14px; padding: 0 2px; border-bottom: 1px solid var(--line); }
.bc { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 0; }
.bc i { width: 100%; max-width: 46px; height: var(--h); border-radius: 6px 6px 0 0; background: linear-gradient(180deg, var(--brand-2), var(--brand));
  transform: scaleY(0); transform-origin: bottom; }
.anim.play .bc i { animation: growY .7s var(--ease) var(--d) both; }
.bc .v { font: 600 11.5px var(--mono); color: var(--ink-soft); }
.bc small { margin-bottom: -22px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.ans .chart { margin-bottom: 22px; }

/* pull request checks */
.ck-list { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg-raised); }
.ck-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.ck-row:last-child { border-bottom: 0; }
.ck-row .muted { margin-left: auto; font-size: 12.5px; }
.ck-st { position: relative; width: 18px; height: 18px; flex: none; display: grid; place-items: center; }
.ck-st > span { grid-area: 1 / 1; display: grid; place-items: center; }
.okc { width: 18px; height: 18px; border-radius: 50%; background: oklch(0.58 0.14 155); color: #fff; }
.okc svg { width: 11px; height: 11px; }
.merge { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; border: 1px solid color-mix(in oklch, var(--ok) 35%, var(--line)); background: var(--ok-soft); color: var(--ok); font-size: 13.5px; font-weight: 600; }
.merge > svg { width: 16px; height: 16px; }
.merge .btnx { margin-left: auto; padding: 6px 12px; border-radius: 8px; background: oklch(0.58 0.14 155); color: #fff; font-size: 12.5px; }

@media (prefers-reduced-motion: reduce) {
  .anim .a-out { display: none; }
  .anim .vr.bad .claim { background-size: 100% 1.5px; color: var(--muted); }
  .tline .rail, .bc i { transform: none; }
}
@media (max-width: 560px) {
  .fl .res { display: none; }
  .vr { flex-wrap: wrap; }
  .chart { height: 120px; gap: 6px; }
}
.vt.fixd { background: color-mix(in oklch, oklch(0.75 0.15 75) 20%, transparent); color: oklch(0.62 0.14 70); }
.anim.play .vr.fixd { animation: aLeft .7s var(--ease) var(--d) both, fixRow .6s ease var(--s) both; }
@keyframes fixRow { to { border-color: color-mix(in oklch, oklch(0.75 0.15 75) 55%, var(--line)); box-shadow: 0 0 0 3px color-mix(in oklch, oklch(0.75 0.15 75) 14%, transparent); } }

/* skip link for keyboard users */
.skip { position: absolute; left: 12px; top: -48px; z-index: 100; padding: 10px 14px; border-radius: 10px; background: var(--brand); color: #fff; font-weight: 600; transition: top .15s; }
.skip:focus { top: 12px; }

/* --- mobile polish ---------------------------------------------------------------------------- */
.theme-toggle, .menu-toggle { min-width: 44px; min-height: 44px; }
.trace { grid-template-columns: minmax(0, 1fr); }
.frame-l { min-width: 0; }
@media (max-width: 820px) {
  .header .wrap { gap: 8px; }
  .header.open .nav { gap: 2px; max-height: calc(100dvh - 140px); overflow-y: auto; }
  .header.open .nav-item { padding: 12px; font-size: 16px; }
  .header.open .menu a.mi { padding: 12px 10px; }
}
@media (max-width: 560px) {
  h1 { font-size: clamp(36px, 10.5vw, 44px); }
  .page-hero h1 { font-size: clamp(32px, 9.5vw, 40px); }
  .page-hero { padding-top: 56px; padding-bottom: 48px; }
  .section { padding-top: 56px; padding-bottom: 56px; }
  .cta-row .btn { flex: 1 1 100%; justify-content: center; }
  .pill { font-size: 12.5px; max-width: 100%; }
  .stage { border-radius: 14px; }
  .giant { font-size: 25vw; }
  .legal-links { gap: 6px 16px; }
}

/* --- phones: one gutter, not two ---------------------------------------------------------------
   The frame's padding and each section's padding stacked to ~48px a side, leaving ~280px for
   content on a 375px screen. On phones the frame sits 12px from the edge and sections add 16px. */
.pill b { flex: none; }
@media (max-width: 560px) {
  .wrap { padding-left: 12px; padding-right: 12px; }
  .section, .section.tight, .hero, .page-hero { padding-left: 16px; padding-right: 16px; }
  .footer .grid-f { padding: 40px 16px; gap: 28px 16px; }
  .footer .bar { padding: 18px 16px; }
  .beta { padding: 22px 16px; font-size: 14.5px; }
  .section-head { margin-bottom: 32px; gap: 16px; }
  h2 { font-size: clamp(28px, 8.4vw, 34px); }
  .lede { font-size: 16.5px; }

  /* the hero demo runs edge to edge inside the frame */
  .hero .hero-media { margin-left: -12px; margin-right: -12px; padding: 4px 4px 0; border-radius: 16px 16px 0 0; }
  .hero-media .window { border-radius: 12px 12px 0 0; }
  .window .body, .window.wide .body { padding: 10px; gap: 10px; }
  .window .bar { padding-left: 12px; padding-right: 12px; }
  .msg { padding: 12px; gap: 10px; }

  /* the six investigation steps: smaller rings, labels that fit */
  .steps { padding: 2px 0 0; }
  .step { width: auto; flex: 1 1 0; min-width: 0; font-size: 9.5px; gap: 6px; }
  .step .ring { width: 28px; height: 28px; }
  .step .ring svg { width: 14px; height: 14px; }
  .steps .track { top: 15px; left: 8%; right: 8%; }

  /* numbers sit two to a row instead of one per screen */
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 26px 16px 28px; border-left: 0; }
  .stat:nth-child(even) { border-left: 1px solid var(--line); }
  .stat:nth-child(n+2) { border-top: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .stat .k { margin-bottom: 12px; font-size: 10.5px; letter-spacing: .08em; }
  .stat .n { font-size: 40px; }
  .stat p { font-size: 13.5px; margin-top: 10px; }

  .cmds, .term, .demo-panel, .stage { min-width: 0; }
  /* product-page demos: a thin stage so the window gets the width */
  .stage { padding: 6px; margin-left: -8px; margin-right: -8px; }
  .demo-stage { margin: 10px; padding: 12px; }
}
