/* Accio — Team AER apps landing.
 * Tokens follow apps/accio/docs/design-bundle/accio.css; agent colours follow ui/app/lib/agents.ts.
 * Neon (glow) is spent only on the relay and the console replica. Everything else is flat. */

:root {
  color-scheme: dark;
  --void: #050505;
  --panel: #0E0E10;
  --bone: #F2F2F2;
  --ash: #A8A8A8;
  --smoke: #8A8A8A;
  --muted: #8A8A8A;
  --line: #222226;
  --line-2: #3A3A3E;
  --cyan: #00F0FF;
  --cyan-soft: #25E1ED;
  --yellow: #F8EF00;
  --magenta: #ED1E79;
  --red: #FF003C;
  --purple: #9747FF;

  --ff-display: "Tomorrow", "IBM Plex Sans", system-ui, sans-serif;
  --ff-micro: "Barlow", "Tomorrow", system-ui, sans-serif;
  --ff-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --max-w: 1200px;
  --cut: 14px;
  --nav-h: 64px;

  --shell-bg: #000;
  --shell-fg: #F2F2F2;
  --footer-bg: #0A0A0B;
  --footer-fg: #F2F2F2;
  --focus-ring: #00F0FF;
  --selection-bg: #00F0FF;
  --selection-fg: #000;
}

/* Agent identity, exactly as the app maps it. */
.a-pln, .a-syn { --c: var(--yellow); }
.a-sch, .a-rdr, .a-wrt { --c: var(--cyan); }
.a-anl { --c: var(--magenta); }
.a-crt { --c: var(--red); }
.a-sys { --c: var(--bone); }

html { background: var(--void); }
.aer-strip, .aer-footer { --focus-ring: #00F0FF; }
body {
  background: var(--void);
  color: var(--bone);
  font: 400 17px/1.6 var(--ff-display);
  letter-spacing: 0.01em;
}
section[id], li[id] { scroll-margin-top: calc(var(--nav-h) + 24px); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  font: 600 15px/1.1 var(--ff-display); letter-spacing: 0.03em;
  text-decoration: none; text-align: center;
  transition: background-color 150ms ease, color 150ms ease;
}
.btn--primary {
  background: var(--cyan); color: #000;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}
.btn--primary:hover { background: #A6FAFF; }
.btn--primary:focus-visible { clip-path: none; }
.btn--ghost { color: var(--cyan); border: 1.5px dashed var(--cyan); }
.btn--ghost:hover { background: rgba(0, 240, 255, 0.08); }

/* ---------- page nav: the docked relay ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(5, 5, 5, 0.94);
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(8px)) { .nav { background: rgba(5, 5, 5, 0.82); backdrop-filter: blur(8px); } }
.nav__bar { display: flex; align-items: center; gap: 24px; min-height: var(--nav-h); }
.brand { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; text-decoration: none; flex: none; }
.brand__mark { width: 28px; height: 28px; box-shadow: 0 0 0 1px #2C2C30; }
.brand__name { font: 600 17px/1 var(--ff-display); letter-spacing: 0.3em; text-transform: uppercase; color: var(--yellow); }
.brand__tag { font: 500 14px/1 var(--ff-micro); color: var(--smoke); }

.relay-nav { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.relay-nav__list { display: flex; list-style: none; margin: 0; padding: 0; }
.relay-nav__list > li { position: relative; }
.relay-nav__list > li::before {
  content: ""; position: absolute; left: 0; right: 0; top: 15px; height: 2px;
  background: var(--line-2);
  transition: background-color 300ms ease;
}
.relay-nav__list > li:last-child::before { right: auto; width: 24px; }
.relay-nav__list > li.is-done::before { background: rgba(0, 240, 255, 0.45); }
.relay-nav__list > li.is-current::before { background: linear-gradient(90deg, rgba(0, 240, 255, 0.45), var(--line-2)); }
.relay-nav__link {
  position: relative;
  display: flex; flex-direction: column; justify-content: flex-start; gap: 9px;
  min-height: 52px; padding: 12px 18px 8px 0;
  font: 500 14px/1 var(--ff-micro); color: var(--ash); text-decoration: none;
  transition: color 200ms ease;
}
.relay-nav__link:hover, .relay-nav__link[aria-current] { color: var(--bone); }
.relay-nav__dots { display: flex; gap: 5px; }
.relay-nav__dots i, .nav__progress i { display: block; background: #2E2E33; transition: background-color 300ms ease, box-shadow 300ms ease, opacity 300ms ease; }
.relay-nav__dots i { width: 8px; height: 8px; box-shadow: 0 0 0 3px var(--void); }
.is-done .relay-nav__dots i { background: var(--c); opacity: 0.5; }
.is-current .relay-nav__dots i { background: var(--c); box-shadow: 0 0 0 3px var(--void), 0 0 10px var(--c); }
.nav__cta { min-height: 44px; padding: 0 18px; font-size: 14px; }
.nav__cta--bar { display: none; }

.nav__toggle {
  display: none; margin-left: auto;
  width: 44px; height: 44px; border: 1px solid var(--line-2);
  flex-direction: column; justify-content: center; align-items: center; gap: 6px;
}
.nav__toggle span { width: 20px; height: 2px; background: var(--bone); transition: transform 160ms ease; }
.nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
.nav__progress { display: none; }

@media (max-width: 1120px) { .brand__tag { display: none; } }
@media (min-width: 961px) { .relay-nav[hidden] { display: flex; } }
@media (max-width: 960px) {
  .nav__toggle { display: flex; margin-left: 0; }
  .nav__bar { gap: 10px; }
  .nav__cta--bar { display: inline-flex; margin-left: auto; padding: 0 12px; }
  .nav__cta--menu { display: none; }
  .relay-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--void); border-bottom: 1px solid var(--line-2);
    padding: 4px var(--gutter) 20px;
  }
  .relay-nav[hidden] { display: none; }
  .relay-nav__list { flex-direction: column; }
  .relay-nav__list > li::before { display: none; }
  .relay-nav__link {
    flex-direction: row; align-items: center; gap: 16px;
    min-height: 52px; padding: 0; border-bottom: 1px solid var(--line);
    font-size: 17px;
  }
  .relay-nav__dots { width: 34px; flex: none; }
  .nav__progress {
    display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px;
    height: 3px; position: absolute; left: 0; right: 0; bottom: -1px;
  }
  .nav__progress i.is-done { background: var(--c); opacity: 0.5; }
  .nav__progress i.is-current { background: var(--c); box-shadow: 0 0 6px var(--c); }
}

/* ---------- hero ---------- */
.hero { padding: clamp(40px, 6vw, 80px) 0 clamp(48px, 5vw, 72px); }
.hero__head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
  gap: 32px 56px; align-items: end;
}
.hero__title {
  font: 600 clamp(36px, 5.1vw, 68px)/1.05 var(--ff-display);
  letter-spacing: -0.02em;
}
.hero__title span { display: block; }
.hero__sub { text-wrap: pretty; margin-top: 22px; max-width: 33em; font-size: clamp(18px, 1.5vw, 21px); line-height: 1.5; color: var(--ash); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero__access { margin-top: 14px; font: 500 15px/1.5 var(--ff-micro); color: var(--smoke); }

.promise { position: relative; padding: 20px 0 4px; margin-bottom: 6px; }
.promise::before { content: ""; position: absolute; left: 0; top: 0; width: 48px; height: 2px; background: var(--cyan); }
.promise__line { font: 600 22px/1.25 var(--ff-display); }
.promise__body { margin-top: 10px; font-size: 15px; line-height: 1.55; color: var(--ash); }

/* ---------- the relay (the one orchestrated moment) ---------- */
.relay { position: relative; margin-top: clamp(48px, 6vw, 72px); padding-bottom: 64px; }
.relay__list { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); list-style: none; margin: 0; padding: 0; }
.relay__stop a {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  min-height: 92px; padding: 0 4px 8px; text-align: center; text-decoration: none;
}
.relay__dot {
  width: 18px; height: 18px; background: var(--c);
  box-shadow: 0 0 0 5px var(--void), 0 0 16px var(--c);
}
.relay__code { font: 500 13px/1 var(--ff-mono); letter-spacing: 0.08em; color: var(--c); }
.relay__name { font: 600 16px/1.2 var(--ff-display); color: var(--bone); }
.relay__stop a:hover .relay__name { text-decoration: underline; text-decoration-color: var(--c); text-underline-offset: 4px; }

.relay__rail {
  position: absolute; z-index: 1; top: 8px; height: 2px;
  left: calc(100% / 14); right: calc(100% / 14);
  background: #1E1E22;
}
.relay__fill { position: absolute; inset: 0; background: rgba(0, 240, 255, 0.55); transform-origin: left center; }
.relay__token {
  position: absolute; top: 50%; left: 100%; width: 10px; height: 10px; margin: -5px 0 0 -5px;
  border-radius: 50%; background: #fff; opacity: 0;
  box-shadow: 0 0 8px var(--cyan), 0 0 22px var(--cyan);
}
.relay__loop {
  position: absolute; top: 100px; height: 24px;
  left: calc(100% * 1.5 / 7); right: calc(100% * 1.5 / 7);
  border: 1.5px dashed #4A4A50; border-top: 0;
}
.relay__loop::before { /* arrowhead into the Searcher */
  content: ""; position: absolute; left: -6px; top: -8px;
  border: 5px solid transparent; border-bottom: 7px solid #4A4A50; border-top: 0;
}
.relay__loop span {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px);
  text-align: center; font: 500 14px/1.3 var(--ff-micro); color: var(--ash);
}

/* Load: the token travels once; each stop lights as it passes. Final state = all lit. */
@keyframes relay-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes relay-token { 0% { left: 0; opacity: 1; } 96% { left: 100%; opacity: 1; } 100% { left: 100%; opacity: 0; } }
@keyframes relay-dot {
  0% { background: #2A2A2E; box-shadow: 0 0 0 5px var(--void); transform: scale(1); }
  45% { transform: scale(1.4); }
  100% { background: var(--c); box-shadow: 0 0 0 5px var(--void), 0 0 16px var(--c); transform: scale(1); }
}
@keyframes relay-ink { from { color: var(--muted); } }
.relay__fill { animation: relay-fill 3.07s linear 0.5s both; }
.relay__token { animation: relay-token 3.2s linear 0.5s both; }
.relay__dot { animation: relay-dot 0.5s ease-out backwards; animation-delay: calc(0.4s + var(--i) * 0.512s); }
.relay__code, .relay__name { animation: relay-ink 0.5s ease-out both; animation-delay: calc(0.4s + var(--i) * 0.512s); }

/* ---------- console replica ---------- */
.console { margin-top: clamp(32px, 4vw, 48px); }
.console__screen {
  background: #000; border: 1px solid #1C1C21;
  font-family: var(--ff-display); color: var(--bone);
  overflow: hidden; letter-spacing: 0.04em;
}
.console__cap { margin-top: 14px; max-width: 60em; font: 500 15px/1.5 var(--ff-micro); color: var(--smoke); }

.cx-top {
  position: relative; display: flex; align-items: center; gap: 28px;
  height: 46px; padding: 0 18px;
  border-bottom: 1px solid rgba(37, 225, 237, 0.25);
  background: linear-gradient(180deg, rgba(0, 240, 255, 0.04), transparent);
}
.cx-top::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 30%; height: 1px; background: var(--magenta); }
.cx-brand { font: 600 14px/1 var(--ff-display); letter-spacing: 0.3em; color: var(--yellow); text-shadow: 0 0 8px rgba(248, 239, 0, 0.45); white-space: nowrap; }
.cx-brand em { font-style: normal; font-size: 10px; letter-spacing: 0.3em; color: var(--magenta); text-shadow: none; margin-left: 8px; }
.cx-tabs { display: flex; height: 100%; }
.cx-tabs span { display: flex; align-items: center; padding: 0 16px; font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ash); border-bottom: 2px solid transparent; white-space: nowrap; }
.cx-tabs b { margin-right: 8px; font: 400 9px/1 var(--ff-mono); letter-spacing: 0.04em; color: var(--muted); }
.cx-tabs .is-on { color: var(--cyan-soft); border-bottom-color: var(--cyan-soft); background: rgba(0, 240, 255, 0.1); }
.cx-tabs .is-on b { color: inherit; opacity: 0.7; }
.cx-ver { margin-left: auto; font: 400 11px/1 var(--ff-mono); white-space: nowrap; }
.cx-ver .k, .kv .k { color: var(--muted); }

.cx-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); gap: 14px; padding: 16px; }
.cx-main {
  display: grid; gap: 14px; min-width: 0;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr) minmax(0, 196px);
  grid-template-areas: "head head ctrl" "matrix plan plan" "trace trace trace";
}
.cx-header { grid-area: head; }
.cx-control { grid-area: ctrl; }
.cx-matrix { grid-area: matrix; }
.cx-plan { grid-area: plan; }
.cx-trace { grid-area: trace; }

/* Chamfered panels (corner cuts top-right and bottom-left), as the app's ChamferPanel draws them. */
.cx-panel, .claim__card, .mode {
  --stroke: #4A4A50; --fill: #000; --sw: 1px;
  position: relative; isolation: isolate; padding: 14px 16px;
}
.cx-panel::before, .cx-panel::after, .claim__card::before, .claim__card::after, .mode::before, .mode::after {
  content: ""; position: absolute; z-index: -1;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
}
.cx-panel::before, .claim__card::before, .mode::before { inset: 0; background: var(--stroke); }
.cx-panel::after, .claim__card::after, .mode::after { inset: var(--sw); background: var(--fill); }
.cx-panel--cyan { --stroke: var(--cyan-soft); --fill: color-mix(in srgb, var(--cyan) 4%, #000); --sw: 1.5px; }
.cx-panel--magenta { --stroke: var(--magenta); --fill: color-mix(in srgb, var(--magenta) 5%, #000); --sw: 1.5px; }

.cx-row { display: flex; align-items: center; gap: 10px; }
.cx-panel__head { justify-content: space-between; margin-bottom: 10px; }
.cx-micro { font: 500 10px/1.4 var(--ff-micro); letter-spacing: 0.2em; text-transform: uppercase; color: var(--ash); }
.cx-lower { text-transform: none; letter-spacing: 0.12em; }
.cx-mono { font: 400 10px/1 var(--ff-mono); }
.cx-cyan { color: var(--cyan-soft); }
.cx-magenta { color: var(--magenta); }
.cx-yellow { color: var(--yellow); }
.cx-purple { color: var(--purple); }
.cx-faint { color: var(--muted); }

.cx-strip { justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; }
.cx-status { font: 400 11px/1.4 var(--ff-mono); color: var(--cyan-soft); }
.cx-title { margin-top: 8px; font: 600 19px/1.32 var(--ff-display); letter-spacing: 0.16em; text-transform: uppercase; }
.cx-progress { position: relative; height: 8px; margin-top: 14px; background: rgba(255, 255, 255, 0.06); }
.cx-progress::after {
  content: ""; position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(90deg, transparent calc(25% - 1px), rgba(0, 0, 0, 0.45) 0 25%, transparent 0 calc(50% - 1px), rgba(0, 0, 0, 0.45) 0 50%, transparent 0 calc(75% - 1px), rgba(0, 0, 0, 0.45) 0 75%, transparent 0);
}
.cx-progress__fill { position: absolute; left: 0; top: 0; bottom: 0; width: 46%; background: linear-gradient(90deg, var(--cyan-soft) 0%, var(--magenta) 70%, var(--cyan-soft) 100%); }
.cx-progress__head { position: absolute; left: 46%; top: -4px; bottom: -4px; width: 2px; background: var(--yellow); box-shadow: 0 0 8px var(--yellow); }
.cx-kvs { flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; }
.kv { font: 400 11px/1.4 var(--ff-mono); white-space: nowrap; }
.kv .v { color: var(--bone); }
.kv .v.cx-cyan { color: var(--cyan-soft); }
.kv .v.cx-magenta { color: var(--magenta); }
.kv .v.cx-yellow { color: var(--yellow); }

.cx-control { display: flex; flex-direction: column; gap: 9px; }
.cx-btn { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; font: 600 10px/1 var(--ff-display); letter-spacing: 0.2em; text-transform: uppercase; white-space: nowrap; }
.cx-btn--pause { background: var(--magenta); color: #000; }
.cx-btn--edit { border: 1px dashed var(--cyan-soft); color: var(--cyan-soft); }
.cx-btn--jump { border: 1px dashed var(--yellow); color: var(--yellow); }
.cx-btn--cancel { border: 1px dashed var(--red); color: var(--red); }

.cx-cells { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cx-cell {
  display: flex; align-items: center; gap: 8px; min-width: 0; padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font: 600 10px/1.2 var(--ff-display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ash);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cx-cell i { width: 8px; height: 8px; flex: none; background: var(--c); opacity: 0.3; }
.cx-cell b { width: 24px; flex: none; font: 400 9px/1 var(--ff-mono); letter-spacing: 0.04em; color: var(--muted); }
.cx-cell s { margin-left: auto; text-decoration: none; font: 400 9px/1 var(--ff-mono); color: var(--ash); }
.cx-cell.is-on {
  color: var(--c); border-color: var(--c);
  background: color-mix(in oklab, var(--c) 8%, transparent);
  box-shadow: 0 0 12px color-mix(in oklab, var(--c) 30%, transparent);
  text-shadow: 0 0 8px var(--c);
}
.cx-cell.is-on i { opacity: 1; box-shadow: 0 0 8px var(--c); }
.cx-cell.is-on s { color: var(--c); }

.cx-plan__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.cx-plan__list li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 30px; font-size: 13px; color: var(--bone); }
.cx-plan__list b { font: 400 11px/1 var(--ff-mono); color: var(--muted); }
.cx-plan__list span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-plan__list em { font: 400 9px/1 var(--ff-mono); font-style: normal; letter-spacing: 0.12em; text-transform: uppercase; }
.cx-plan__list .done { color: var(--cyan-soft); }
.cx-plan__list .live { color: var(--magenta); }
.cx-plan__list .is-live span { color: var(--cyan-soft); }

.cx-log { padding: 6px 4px 2px; font: 400 11px/1.7 var(--ff-mono); letter-spacing: 0.02em; color: var(--ash); }
.cx-log p { display: flex; gap: 10px; padding-left: 4px; border-left: 2px solid transparent; }
.cx-log time { flex: none; color: var(--muted); }
.cx-log b { flex: none; width: 40px; font-weight: 400; color: var(--c); }
.cx-log em { flex: none; width: 36px; font-style: normal; color: var(--ash); }
.cx-log em.ok { color: var(--cyan-soft); }
.cx-log span { min-width: 0; color: var(--bone); }
.cx-log .warn em, .cx-log .warn span { color: var(--yellow); }
.cx-log .is-new { border-left-color: var(--cyan-soft); }
.cx-log .cx-activity, .cx-log .cx-activity span, .cx-log .cx-activity b { color: var(--cyan-soft); width: auto; }
.cx-caret { display: inline-block; width: 7px; height: 12px; margin-left: 3px; vertical-align: -2px; background: var(--cyan-soft); }
.cx-tick {
  position: absolute; right: 0; bottom: -2px; height: 16px; padding: 0 8px 0 10px;
  display: flex; align-items: center; justify-content: center;
  background: #000; color: var(--yellow); border: 1px solid #4A4A50;
  font: 600 10px/1 var(--ff-micro); letter-spacing: 0.2em; text-transform: uppercase;
}
.cx-tick::before { content: ""; position: absolute; left: -2px; top: 0; bottom: 0; width: 2px; background: var(--magenta); box-shadow: 0 0 6px var(--magenta); }

.cx-sources { min-width: 0; }
.cx-src {
  display: flex; flex-direction: column; gap: 5px; margin-top: 10px; padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.cx-src > .cx-row { gap: 8px; }
.cx-src i { width: 6px; height: 6px; flex: none; background: var(--muted); }
.cx-src__t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 10.5px/1.3 var(--ff-display); letter-spacing: 0.14em; text-transform: uppercase; }
.cx-src__u { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 400 10px/1.3 var(--ff-mono); color: var(--muted); }
.cx-src__m { gap: 10px; }
.cx-src__m .kv { font-size: 10px; }
.cx-src em { margin-left: auto; font: 400 9px/1 var(--ff-mono); font-style: normal; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.cx-src.is-read { border-color: rgba(37, 225, 237, 0.3); background: rgba(0, 240, 255, 0.03); }
.cx-src.is-read i { background: var(--cyan-soft); box-shadow: 0 0 4px var(--cyan-soft); }
.cx-src.is-read em { color: var(--cyan-soft); }
.cx-src.is-reading { border-color: var(--yellow); background: rgba(248, 239, 0, 0.04); box-shadow: 0 0 12px rgba(248, 239, 0, 0.15), inset 0 0 8px rgba(248, 239, 0, 0.05); }
.cx-src.is-reading i { background: var(--yellow); box-shadow: 0 0 4px var(--yellow); }
.cx-src.is-reading em { color: var(--yellow); }
.cx-src.is-skipped .cx-src__t { color: var(--smoke); text-decoration: line-through; text-decoration-color: var(--magenta); }
.cx-src.is-skipped i { background: var(--magenta); }
.cx-src.is-skipped em { color: var(--magenta); }
.cx-ico { flex: none; width: 10px; height: 10px; }
.cx-ico--web { border: 1.5px solid var(--cyan-soft); border-radius: 50%; }
.cx-ico--lib { border: 1.5px solid var(--yellow); border-top-width: 3px; height: 8px; }

/* ---------- sections ---------- */
.section { padding: clamp(64px, 7.5vw, 108px) 0; border-top: 1px solid var(--line); }
.section__grid { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 0 clamp(24px, 4vw, 56px); }
.section__body { min-width: 0; }
.rail {
  position: sticky; top: calc(var(--nav-h) + 32px); align-self: start;
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 12px;
}
.rail__chip { display: inline-flex; align-items: center; gap: 10px; font: 500 14px/1 var(--ff-mono); letter-spacing: 0.08em; color: var(--c); }
.rail__chip i { width: 10px; height: 10px; background: var(--c); }
.rail__name { font: 500 14px/1.35 var(--ff-micro); color: var(--smoke); max-width: 14em; }
.rail__done { display: flex; gap: 4px; }
.rail__done i { width: 10px; height: 10px; background: var(--c); }

.section__title { font: 600 clamp(28px, 3.3vw, 42px)/1.12 var(--ff-display); letter-spacing: -0.015em; max-width: 26ch; text-wrap: balance; }
.lede { margin-top: 18px; max-width: 37em; font-size: clamp(18px, 1.45vw, 20px); line-height: 1.55; color: var(--ash); }
.lede--strong { color: var(--bone); }
.sub-title { margin-top: 72px; font: 600 22px/1.25 var(--ff-display); }
.sub-title--flush { margin-top: 0; }
.note { margin-top: 24px; max-width: 52em; font: 500 15px/1.6 var(--ff-micro); color: var(--smoke); }

/* the sequence */
.steps { margin-top: 48px; border-top: 1px solid var(--line); }
.step {
  display: grid; grid-template-columns: 40px 52px minmax(0, 190px) minmax(0, 1fr);
  align-items: baseline; gap: 6px 20px; padding: 24px 12px 24px 0;
  border-bottom: 1px solid var(--line);
  transition: background-color 300ms ease;
}
.step__n { font: 400 14px/1 var(--ff-mono); color: var(--smoke); }
.step__code { font: 500 14px/1 var(--ff-mono); letter-spacing: 0.08em; color: var(--c); }
.step__name { font: 600 20px/1.25 var(--ff-display); }
.step__text { color: var(--ash); max-width: 44em; }
.step:target { background: linear-gradient(90deg, color-mix(in srgb, var(--c) 9%, transparent), transparent 70%); box-shadow: inset 2px 0 0 var(--c); }
.step:target .step__n { padding-left: 12px; }

/* facts */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 48px; margin-top: 48px; }
.fact { border-top: 1px solid var(--line); padding-top: 18px; }
.fact dt { font: 600 18px/1.3 var(--ff-display); }
.fact dd { margin: 8px 0 0; color: var(--ash); }

/* screenshots */
.shot { margin-top: 48px; }
.shot img { width: 100%; height: auto; background: #000; border: 1px solid #26262B; }
.shot figcaption { margin-top: 12px; font: 500 15px/1.5 var(--ff-micro); color: var(--smoke); }
.shot__cue { display: none; }
@media (max-width: 640px) {
  /* A 1600px app screen shrunk to a phone is unreadable: show it at 85% in a sideways scroller instead. */
  .shot__scroll { overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
  .shot__scroll img { width: 1360px; max-width: none; }
  .shot__cue { display: inline; color: var(--cyan-soft); }
}

/* claims */
.claims { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 40px 56px; margin-top: 48px; align-items: start; }
.claim__card { --stroke: #4A4A50; --fill: var(--panel); padding: 22px 24px 20px; }
.claim__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font: 400 13px/1.4 var(--ff-mono); }
.claim__n { font-weight: 500; color: var(--magenta); }
.claim__src { color: var(--ash); }
.claim__ok { margin-left: auto; padding: 3px 9px; border: 1px dashed var(--cyan-soft); color: var(--cyan-soft); background: rgba(0, 240, 255, 0.08); }
.claim__text { margin-top: 16px; font: 600 19px/1.4 var(--ff-display); }
.claim__quote { position: relative; overflow: hidden; margin: 16px 0 0; padding: 14px 16px; background: rgba(237, 30, 121, 0.09); }
.claim__quote p { font: 400 14px/1.65 var(--ff-mono); color: var(--bone); }
.claim__meta { display: flex; gap: 20px; margin-top: 14px; }
.claim__meta .kv { font-size: 12px; }
.claim__meta .k { color: var(--smoke); }
.claim__meta .a-anl { color: var(--magenta); }
.claim figcaption { margin-top: 12px; font: 500 15px/1.5 var(--ff-micro); color: var(--smoke); }
.rules { list-style: none; margin: 0; padding: 0; }
.rules li { padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.rules li:last-child { margin-bottom: 0; }
.rules h3 { font: 600 18px/1.3 var(--ff-display); }
.rules p { margin-top: 6px; color: var(--ash); }

/* modes */
.modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 20px 0 0; padding: 0; list-style: none; }
.mode { --fill: var(--panel); padding: 18px 20px 20px; }
.mode--quick { --m: var(--cyan-soft); }
.mode--standard { --m: var(--yellow); }
.mode--deep { --m: var(--magenta); }
.mode__name { font: 600 20px/1.2 var(--ff-display); letter-spacing: 0.06em; color: var(--m); }
.mode__kv { margin: 14px 0 0; display: grid; gap: 4px; font: 400 13px/1.5 var(--ff-mono); }
.mode__kv div { display: flex; justify-content: space-between; gap: 12px; }
.mode__kv dt { color: var(--smoke); }
.mode__kv dd { margin: 0; color: var(--bone); }
.mode__bar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-top: 16px; }
.mode__bar i { height: 4px; background: #26262B; }
.mode__bar i.on { background: var(--m); }

/* report views */
.views { margin-top: 40px; }
.views__switch { display: inline-flex; border: 1px dashed var(--line-2); }
.views__switch[hidden] { display: none; }
.views__btn { min-height: 44px; padding: 0 20px; font: 600 14px/1 var(--ff-display); letter-spacing: 0.06em; color: var(--ash); transition: color 150ms ease, background-color 150ms ease; }
.views__btn:hover { color: var(--bone); }
.views__btn[aria-pressed="true"] { color: var(--cyan); background: rgba(0, 240, 255, 0.1); }
.views .shot { margin-top: 16px; }
.views .shot + .shot { margin-top: 32px; }
.views--js .shot + .shot { margin-top: 16px; }

.files { list-style: none; margin: 20px 0 0; padding: 0; border-top: 1px solid var(--line); }
.files li { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 4px 24px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.files code { font: 500 15px/1.5 var(--ff-mono); color: var(--cyan-soft); }
.files span { color: var(--ash); }

/* run block */
.facts--tight { margin-top: 40px; }
.run { margin-top: 64px; }
.run__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.copy { min-height: 44px; padding: 0 16px; border: 1px solid var(--line-2); font: 500 15px/1 var(--ff-micro); color: var(--bone); transition: border-color 150ms ease, color 150ms ease; }
.copy:hover, .copy[data-copied] { border-color: var(--cyan); color: var(--cyan); }
.run__pre, .run__post { margin-top: 12px; max-width: 46em; font-size: 16px; color: var(--ash); }
.run__code {
  margin: 16px 0 0; padding: 20px 22px; overflow-x: auto;
  background: var(--panel); border: 1px solid var(--line); border-top: 2px solid var(--cyan);
  font: 400 14px/1.8 var(--ff-mono); color: var(--bone); letter-spacing: 0;
}
.run__code .c { color: var(--smoke); }

.section--access { padding-bottom: clamp(72px, 8vw, 112px); }

/* footer */
.aer-footer { border-top: 1px solid var(--line); }
.aer-footer p { color: #BDBDBD; max-width: 30em; }
.aer-footer__links { margin-top: 12px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .cx-body { grid-template-columns: minmax(0, 1fr); }
  .cx-sources { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 10px; }
  .cx-sources .cx-panel__head { grid-column: 1 / -1; margin-bottom: 0; }
}
@media (max-width: 900px) {
  .hero__head { grid-template-columns: minmax(0, 1fr); }
  .promise { max-width: 34em; }
  .section__grid { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 0 0 18px; }
  .claims { grid-template-columns: minmax(0, 1fr); }
  .cx-main { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "matrix" "trace"; }
  .cx-control, .cx-plan { display: none; }
  .cx-tabs { display: none; }
}
@media (max-width: 760px) {
  /* Seven 16px names no longer fit side by side: codes only, the loop label carries the names. */
  .relay { padding-bottom: 76px; }
  .relay__stop a { min-height: 60px; gap: 9px; padding: 0 0 6px; }
  .relay__name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .relay__loop { top: 62px; height: 18px; }
  .relay__loop span { font-size: 13px; }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .modes { grid-template-columns: minmax(0, 1fr); }
  .step { grid-template-columns: 34px 44px minmax(0, 1fr); padding-right: 0; }
  .step__text { grid-column: 1 / -1; }
  .step:target { padding-left: 10px; }
  .step:target .step__n { padding-left: 0; }
  .files li { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .relay__dot { width: 14px; height: 14px; }
  .relay__rail { top: 6px; }
  .relay__code { font-size: 11px; letter-spacing: 0.02em; }
  .relay__loop span { left: -30%; right: -30%; }
  .cx-top { gap: 12px; padding: 0 12px; }
  .cx-brand em { display: none; }
  .cx-body { padding: 10px; gap: 10px; }
  .cx-main { gap: 10px; }
  .cx-panel { padding: 12px; }
  .cx-title { font-size: 15px; letter-spacing: 0.1em; }
  .cx-sources { grid-template-columns: minmax(0, 1fr); }
  .cx-src:not(.on-phone) { display: none; }
  .cx-log { font-size: 11px; }
  .cx-micro, .cx-mono, .cx-cell, .cx-cell s, .cx-src__t, .cx-src__u, .cx-src em, .cx-src__m .kv, .cx-ver, .cx-tick { font-size: 11px; }
  .cx-cell { letter-spacing: 0.1em; }
  .cx-src__t { letter-spacing: 0.1em; }
  .cx-tick { height: 18px; }
  .cx-log p { flex-wrap: wrap; gap: 0 8px; }
  .cx-log span { flex-basis: 100%; padding-bottom: 4px; }
  .cx-log .cx-activity span { flex-basis: auto; }
  .cx-log p:nth-child(-n + 4) { display: none; }
  .cx-cells { gap: 6px; }
  .cx-cell { padding: 8px 8px; gap: 6px; }
  .cx-cell b { display: none; }
  .hero__ctas .btn { flex: 1 1 100%; }
  .run__code .c { display: block; padding-left: 2ch; white-space: pre-wrap; }
  .aer-footer a { display: inline-flex; align-items: center; min-height: 44px; }
  .aer-footer ul { gap: 0; }
}

@media (max-width: 400px) { .brand__name { letter-spacing: 0.2em; } .brand { gap: 10px; } }
@media (max-width: 339px) {
  .nav__cta--bar { display: none; }
  .nav__cta--menu { display: inline-flex; margin-top: 16px; min-height: 48px; }
  .nav__toggle { margin-left: auto; }
}

/* Reduced motion: no travelling token, the track is simply lit. */
@media (prefers-reduced-motion: reduce) {
  .relay__fill, .relay__token, .relay__dot, .relay__code, .relay__name { animation: none !important; }
  .relay__token { display: none; }
}

/* ======================================================================
   Pass 2: motion. Everything here is transform/opacity, plays once and
   settles. Hidden starting states only exist under .ax, which page.js adds
   when JS runs and the visitor hasn't asked for reduced motion.
   ====================================================================== */
:root { --ease-out: cubic-bezier(.2, .7, .2, 1); }

/* Buttons and controls: lift on hover, press on tap. */
.btn { transition: background-color 150ms ease, color 150ms ease, transform 180ms var(--ease-out); }
.btn:active, .views__btn:active, .copy:active { transform: translateY(1px) scale(0.98); }
@media (hover: hover) {
  .btn:hover { transform: translateY(-2px); }
  .btn:hover:active { transform: translateY(0) scale(0.98); }
}
.btn--ghost:active { background: rgba(0, 240, 255, 0.14); }
.views__btn, .copy { transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease, transform 150ms var(--ease-out); }
.copy[data-copied] { animation: ax-copied 420ms var(--ease-out); }
@keyframes ax-copied { 0% { transform: scale(1); } 35% { transform: scale(1.06); } 100% { transform: scale(1); } }

/* Desktop nav: an underline in the section's agent colour sweeps under the label. */
@media (min-width: 961px) {
  .relay-nav__label { position: relative; }
  .relay-nav__label::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 1.5px;
    background: var(--cyan); transform: scaleX(0); transform-origin: left center;
    transition: transform 260ms var(--ease-out);
  }
  .relay-nav__link:hover .relay-nav__label::after, .relay-nav__link[aria-current] .relay-nav__label::after { transform: scaleX(1); }
}
.relay__dot { transition: transform 200ms var(--ease-out); }
.relay__stop a:hover .relay__dot, .relay__stop a:focus-visible .relay__dot { transform: scale(1.25); }

/* Phones: the bar CTA steps aside while a page CTA is already on screen. */
@media (max-width: 960px) {
  .nav__cta--bar.is-tucked { opacity: 0; visibility: hidden; pointer-events: none; }
  .ax .nav__cta--bar { transition: opacity 220ms ease, transform 220ms var(--ease-out), visibility 0s linear 0s; }
  .ax .nav__cta--bar.is-tucked { transform: translateY(-6px); transition: opacity 220ms ease, transform 220ms var(--ease-out), visibility 0s linear 220ms; }
}

@media (prefers-reduced-motion: no-preference) {
  /* Hero arrival (pure CSS so it finishes even without JS). */
  @keyframes ax-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
  .hero__title span, .hero__sub, .hero .hero__ctas, .hero__access, .promise { animation: ax-rise 640ms var(--ease-out) both; }
  .hero__title span:nth-child(2) { animation-delay: 80ms; }
  .hero__sub { animation-delay: 160ms; }
  .hero .hero__ctas { animation-delay: 230ms; }
  .hero__access { animation-delay: 290ms; }
  .promise { animation-delay: 360ms; }
  .promise::before { animation: ax-draw 600ms var(--ease-out) 520ms both; transform-origin: left center; }
  @keyframes ax-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }

  /* Staggered entrances: page.js tags items .rv and adds .is-in (with --d) as they arrive. */
  .ax .rv:not(.is-in) { opacity: 0; transform: translateY(18px); }
  .ax .rv.is-in { animation: ax-rise 600ms var(--ease-out) both; animation-delay: calc(var(--d, 0) * 70ms); }

  /* Console demo: plays once when the console scrolls in, then holds the real frame. */
  .ax .console:not(.is-live) .cx-panel,
  .ax .console:not(.is-live) .cx-log p,
  .ax .console:not(.is-live) .cx-plan__list li,
  .ax .console:not(.is-live) .cx-cell,
  .ax .console:not(.is-live) .cx-src { opacity: 0; }
  .ax .console.is-live .cx-panel { animation: ax-rise 560ms var(--ease-out) both; }
  .ax .console.is-live .cx-control { animation-delay: 80ms; }
  .ax .console.is-live .cx-matrix { animation-delay: 160ms; }
  .ax .console.is-live .cx-plan { animation-delay: 220ms; }
  .ax .console.is-live .cx-trace { animation-delay: 280ms; }
  .ax .console.is-live .cx-sources { animation-delay: 120ms; }
  @keyframes ax-in { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
  @keyframes ax-pop { 0% { opacity: 0; transform: scale(0.94); } 60% { opacity: 1; transform: scale(1.03); } 100% { opacity: 1; transform: none; } }
  .ax .console.is-live .cx-cell { animation: ax-in 380ms var(--ease-out) both; animation-delay: calc(360ms + var(--n, 0) * 50ms); }
  .ax .console.is-live .cx-cell.a-sch { animation: ax-pop 460ms var(--ease-out) 1150ms both; }
  .ax .console.is-live .cx-cell.a-rdr { animation: ax-pop 460ms var(--ease-out) 1650ms both; }
  .ax .console.is-live .cx-plan__list li { animation: ax-in 380ms var(--ease-out) both; animation-delay: calc(500ms + var(--n, 0) * 110ms); }
  .ax .console.is-live .cx-plan__list li.is-live { animation-delay: 1500ms; }
  .ax .console.is-live .cx-log p { animation: ax-in 340ms var(--ease-out) both; animation-delay: calc(600ms + var(--n, 0) * 170ms); }
  .ax .console.is-live .cx-src { animation: ax-in 380ms var(--ease-out) both; animation-delay: calc(700ms + var(--n, 0) * 140ms); }
  .ax .console.is-live .cx-progress { container-type: inline-size; }
  .ax .console.is-live .cx-progress__fill { transform-origin: left center; animation: ax-fill 2200ms cubic-bezier(.3, .6, .3, 1) 500ms both; }
  @keyframes ax-fill { from { transform: scaleX(0.6); } to { transform: scaleX(1); } }
  @supports (width: 1cqw) {
    .ax .console.is-live .cx-progress__head { left: 0; transform: translateX(46cqw); animation: ax-head 2200ms cubic-bezier(.3, .6, .3, 1) 500ms both; }
    @keyframes ax-head { from { transform: translateX(27.6cqw); } to { transform: translateX(46cqw); } }
  }
  .ax .console.is-live .cx-caret { animation: ax-blink 1s steps(1) 2.6s 6; }
  @keyframes ax-blink { 50% { opacity: 0; } }

  /* Claim card: a scan crosses the quote (the 40-character window check), then the badge stamps. */
  .ax .claim__quote::after {
    content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%;
    background: linear-gradient(90deg, transparent, rgba(237, 30, 121, 0.28), transparent);
    transform: translateX(-100%); opacity: 0; pointer-events: none;
  }
  .ax .claim.is-in .claim__quote::after { animation: ax-scan 1100ms ease-in-out 450ms both; }
  @keyframes ax-scan { 0% { transform: translateX(-100%); opacity: 1; } 90% { opacity: 1; } 100% { transform: translateX(260%); opacity: 0; } }
  .ax .claim:not(.is-in) .claim__ok { opacity: 0; }
  .ax .claim.is-in .claim__ok { animation: ax-pop 420ms var(--ease-out) 1500ms both; }

  /* Mode bars fill segment by segment. */
  .ax .mode:not(.is-in) .mode__bar i.on { transform: scaleX(0); }
  .ax .mode.is-in .mode__bar i.on { transform-origin: left center; animation: ax-draw 260ms var(--ease-out) both; animation-delay: calc(var(--d, 0) * 70ms + 300ms + var(--s, 0) * 120ms); }
  .mode__bar i:nth-child(2) { --s: 1; } .mode__bar i:nth-child(3) { --s: 2; } .mode__bar i:nth-child(4) { --s: 3; } .mode__bar i:nth-child(5) { --s: 4; }

  /* Run complete: the seven squares light in relay order. */
  .ax .rail.is-in .rail__done i { animation: ax-pop 360ms var(--ease-out) both; }
  .rail__done i:nth-child(2) { animation-delay: 90ms; } .rail__done i:nth-child(3) { animation-delay: 180ms; } .rail__done i:nth-child(4) { animation-delay: 270ms; }
  .rail__done i:nth-child(5) { animation-delay: 360ms; } .rail__done i:nth-child(6) { animation-delay: 450ms; } .rail__done i:nth-child(7) { animation-delay: 540ms; }

  /* Scroll-linked: each step draws its own agent-coloured segment in the gutter as you read down. */
  @supports (animation-timeline: view()) {
    @media (min-width: 901px) {
      .step { position: relative; }
      .step::before {
        content: ""; position: absolute; top: -1px; bottom: 0; left: calc(-1 * clamp(24px, 4vw, 56px) / 2); width: 2px;
        background: var(--c); opacity: 0.75; transform-origin: top center; transform: scaleY(0);
        animation: ax-grow linear both; animation-timeline: view(); animation-range: entry 60% cover 50%;
      }
      @keyframes ax-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
    }
  }
}

/* Phones: the run ends on its CTA, not on a tall empty band. */
@media (max-width: 640px) { .section--access { padding-bottom: 72px; } }
/* Desktop console: the header panel is as tall as the control column; keep its meter on the bottom edge. */
@media (min-width: 901px) { .cx-header { display: flex; flex-direction: column; } .cx-header .cx-title { flex: 1; } }
