/* AI Development page (Company Brain + Company Agents). Engineering blue.
   ai-development.js drives the animated blocks while they're on screen; with reduced motion
   every block shows its finished state. The .aid- prefix keeps all of it to this page. */

/* ── Hero subheading: the H1 says what we do, this line names the product ── */
.aid-subhead {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--accent-blue);
  margin: 0 0 14px;
}

/* A closing line under a section's cards */
.aid-note {
  max-width: 720px;
  margin: 40px auto 0;
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
}
.aid-note strong { color: var(--text-primary); }

/* Small mono labels used across the page (machine voice: tags and telemetry only) */
.aid-col-label, .aid-memory-tag, .aid-lens-tag, .aid-rail-key span {
  margin: 0 0 12px;
  font: 600 0.64rem/1.2 var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-blue);
}

/* The house check: a small circle that fills blue with a tick when its row lights */
.aid-tick {
  position: relative; flex: 0 0 auto; width: 16px; height: 16px; border-radius: 50%;
  border: 1.5px solid rgba(0, 98, 255, 0.25); background: #fff;
  transition: background 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.aid-tick::after {
  content: ""; position: absolute; left: 4.5px; top: 2px; width: 4px; height: 7px;
  border: solid #fff; border-width: 0 1.8px 1.8px 0; transform: rotate(45deg); opacity: 0; transition: opacity 0.3s ease;
}
.is-ticked > .aid-tick { background: var(--accent-blue); border-color: var(--accent-blue); transform: scale(1.06); }
.is-ticked > .aid-tick::after { opacity: 1; }

/* ── The problem: the peel-off paper (peel.css), as blue blueprint paper here ── */
#the-problem { --mkt-accent: var(--accent-blue); }
#the-problem .bd-peel-label small { color: #4b5f86; }
#the-problem .bd-peel-label b { color: #14213d; }
#the-problem .bd-peel-paper {
  background-color: #eef4ff;
  background-image:
    linear-gradient(135deg, rgba(10, 40, 110, 0.2) var(--fold, 0px), rgba(10, 40, 110, 0.06) calc(var(--fold, 0px) + 18px), rgba(10, 40, 110, 0) calc(var(--fold, 0px) + 70px)),
    linear-gradient(rgba(0, 98, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 98, 255, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, #f3f7ff, #e9f0fe);
  background-size: auto, 24px 24px, 24px 24px, auto;
}
#the-problem .bd-peel-back { background-image: linear-gradient(135deg, #f4f8ff 0px, #e8effd calc(var(--fold, 0px) - 60px), #d3e0fa calc(var(--fold, 0px) - 8px), #c3d4f5 var(--fold, 0px)); }

/* ── Company Brain: sources → the Brain (find, think, record) → a sourced answer ── */
.aid-brain {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 210px) 76px minmax(0, 1fr) 76px minmax(0, 300px);
  align-items: center; gap: 0; margin-top: 4px;
}
.aid-brain-col { display: flex; flex-direction: column; min-width: 0; }
.aid-brain-mid { align-items: center; text-align: center; }

.aid-src { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.aid-src { gap: 4px; }
.aid-src li {
  display: flex; align-items: center; gap: 10px; padding: 6px 0;
  font: 500 0.86rem/1.25 var(--font-display); color: var(--text-primary);
  animation: aidSrc 6s ease infinite;
}
.aid-src li svg { width: 16px; height: 16px; flex: 0 0 auto; color: var(--text-muted); animation: aidSrcIco 6s ease infinite; animation-delay: inherit; }
.aid-src li:nth-child(2) { animation-delay: 1s; }
.aid-src li:nth-child(3) { animation-delay: 2s; }
.aid-src li:nth-child(4) { animation-delay: 3s; }
.aid-src li:nth-child(5) { animation-delay: 4s; }
.aid-src li:nth-child(6) { animation-delay: 5s; }
@keyframes aidSrc { 0%, 22%, 100% { color: var(--text-primary); } 6%, 14% { color: var(--aid-lit, var(--accent-blue)); } }
@keyframes aidSrcIco { 0%, 22%, 100% { color: var(--text-muted); transform: none; } 6%, 14% { color: var(--aid-lit, var(--accent-blue)); transform: scale(1.12); } }

/* the pipes, with information running through them (the Voice Agents pipe, in this page's blue) */
.aid-pipe { position: relative; align-self: center; height: 2px; margin: 0 6px; background: linear-gradient(90deg, rgba(56, 189, 248, 0.5), rgba(0, 98, 255, 0.5)); }
.aid-pipe-out { background: linear-gradient(90deg, rgba(0, 98, 255, 0.5), rgba(255, 107, 0, 0.45)); }
.aid-pipe i { position: absolute; top: -3px; left: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-blue); box-shadow: 0 0 8px rgba(0, 98, 255, 0.6); animation: aidRun 2.4s linear infinite; }
.aid-pipe-out i { background: var(--accent-orange); box-shadow: 0 0 8px rgba(255, 107, 0, 0.55); }
.aid-pipe i:nth-child(2) { animation-delay: 0.8s; }
.aid-pipe i:nth-child(3) { animation-delay: 1.6s; }
@keyframes aidRun { 0% { left: 0; opacity: 0; } 15%, 85% { opacity: 1; } 100% { left: calc(100% - 8px); opacity: 0; } }
@keyframes aidRunDown { 0% { top: 0; opacity: 0; } 15%, 85% { opacity: 1; } 100% { top: calc(100% - 8px); opacity: 0; } }

/* the core: a glass disc with a slow dashed ring turning round it */
.aid-core { position: relative; width: 112px; height: 112px; margin: 2px 0 18px; display: grid; place-items: center; }
.aid-core-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1.5px dashed rgba(0, 98, 255, 0.4);
  animation: aidSpin 24s linear infinite;
}
.aid-core-ring::after { content: ""; position: absolute; top: -4px; left: 50%; width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%; background: var(--accent-orange); box-shadow: 0 0 8px rgba(255, 107, 0, 0.7); }
.aid-core-face {
  position: relative; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #ffffff, #e8f0ff 70%);
  border: 1px solid rgba(0, 98, 255, 0.18);
  box-shadow: 0 18px 40px -18px rgba(0, 98, 255, 0.55), inset 0 1px 0 #fff;
}
.aid-core-face svg { width: 38px; height: 38px; color: var(--accent-blue); stroke-width: 1.6; }
@keyframes aidSpin { to { transform: rotate(360deg); } }

.aid-stack { list-style: none; margin: 0; padding: 0; width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.aid-stack li {
  display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; align-items: baseline;
  padding: 9px 12px; border-radius: 10px; border: 1px solid rgba(15, 23, 42, 0.06); background: rgba(255, 255, 255, 0.75);
  transition: border-color 0.5s ease, box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1), background 0.5s ease;
}
.aid-stack b { font: 600 0.64rem/1.4 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-blue); }
.aid-stack span { font-size: 0.82rem; line-height: 1.45; color: var(--text-secondary); }
.aid-brain[data-step="0"] .aid-stack li[data-s="0"],
.aid-brain[data-step="1"] .aid-stack li[data-s="1"],
.aid-brain[data-step="2"] .aid-stack li[data-s="2"] {
  border-color: rgba(0, 98, 255, 0.32); background: #fff;
  box-shadow: 0 0 0 4px rgba(0, 98, 255, 0.06), 0 10px 24px -14px rgba(0, 98, 255, 0.55);
}

/* the answer card */
.aid-answer {
  padding: 16px; border-radius: 12px; background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.07); box-shadow: 0 18px 40px -26px rgba(15, 23, 42, 0.35);
}
.aid-answer-q {
  margin: 0 0 10px; padding: 9px 12px; border-radius: 10px 10px 10px 2px;
  background: rgba(15, 23, 42, 0.035); font-size: 0.84rem; line-height: 1.45; color: var(--text-primary);
}
.aid-answer-a { margin: 0 0 12px; font: 500 0.9rem/1.45 var(--font-display); color: var(--text-primary); }
.aid-answer-label { margin: 0 0 6px; font: 600 0.6rem/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); }
.aid-answer-src { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.aid-answer-src li {
  display: flex; align-items: center; gap: 8px;
  font: 500 0.74rem/1.3 var(--font-mono); color: var(--text-secondary);
  transition: opacity 0.4s ease, color 0.4s ease;
}
.aid-answer-src li > svg { width: 14px; height: 14px; flex: 0 0 auto; color: var(--accent-blue); }
.aid-answer-src li > span { flex: 1; min-width: 0; }
.aid-brain.is-live .aid-answer-src li { opacity: 0.4; }
.aid-brain.is-live .aid-answer-src li.is-ticked { opacity: 1; color: var(--text-primary); }
.aid-brain:not(.is-live) .aid-answer-src li { }
.aid-brain:not(.is-live) .aid-answer-src .aid-tick { background: var(--accent-blue); border-color: var(--accent-blue); }
.aid-brain:not(.is-live) .aid-answer-src .aid-tick::after { opacity: 1; }
.aid-answer-foot {
  display: flex; align-items: center; gap: 7px; margin: 0; padding-top: 10px; border-top: 1px dashed rgba(15, 23, 42, 0.1);
  font-size: 0.76rem; color: var(--text-secondary);
}
.aid-answer-foot svg { width: 13px; height: 13px; color: var(--accent-orange); flex: 0 0 auto; }

.aid-built {
  position: relative; z-index: 1;
  display: flex; align-items: flex-start; gap: 12px; max-width: 760px; margin: 32px 0 0; padding-top: 22px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  font-size: 0.92rem; line-height: 1.6; color: var(--text-secondary);
}
.aid-built strong { color: var(--text-primary); }
.aid-built svg { width: 20px; height: 20px; flex: 0 0 auto; margin-top: 2px; color: var(--accent-blue); }
.aid-brain-card .esb-header, .aid-brain-card h2, .aid-brain-card .esb-desc { position: relative; z-index: 1; }

/* ── Company Agents: the long-term memory lockup, the loop and the memory strip ── */
.aid-equation {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 14px;
  margin: 40px auto 0; font: 700 clamp(1.05rem, 2.1vw, 1.45rem)/1.2 var(--font-display); color: var(--text-primary);
}
.aid-eq-tok {
  position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px;
  border-radius: 12px; background: rgba(255, 255, 255, 0.85); border: 1px solid rgba(15, 23, 42, 0.07);
  box-shadow: 0 14px 30px -22px rgba(15, 23, 42, 0.35);
}
.aid-eq-tok svg { width: 20px; height: 20px; color: var(--accent-blue); flex: 0 0 auto; }
.aid-eq-op { color: var(--text-muted); font-weight: 500; }
.aid-eq-result { color: var(--accent-blue); border-color: rgba(0, 98, 255, 0.22); background: #fff; box-shadow: 0 0 0 4px rgba(0, 98, 255, 0.05), 0 16px 34px -20px rgba(0, 98, 255, 0.5); }
.aid-eq-tok .aid-scribe { position: absolute; left: 10%; bottom: 3px; width: 80%; height: 9px; color: inherit; overflow: visible; pointer-events: none; }
.aid-scribe path {
  fill: none; stroke: var(--accent-orange); stroke-width: 3; stroke-linecap: round; vector-effect: non-scaling-stroke;
  stroke-dasharray: 400; stroke-dashoffset: 400; transition: stroke-dashoffset 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.3s;
}
.aid-equation.is-seen .aid-scribe path { stroke-dashoffset: 0; }
.aid-eq-note { margin: 16px auto 0; max-width: 560px; font-size: 0.9rem; line-height: 1.5; color: var(--text-secondary); text-align: center; }
.aid-eq-note svg { display: inline-block; width: 16px; height: 16px; margin-right: 7px; vertical-align: -3px; color: var(--accent-blue); }

.aid-loop {
  display: grid; grid-template-columns: 170px minmax(0, 1fr) 170px; align-items: center;
  max-width: 820px; margin: 28px auto 0;
}
.aid-loop-node {
  position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 12px;
  border-radius: 14px; background: #fff; border: 1px solid rgba(15, 23, 42, 0.07);
  box-shadow: 0 18px 38px -24px rgba(15, 23, 42, 0.4); text-align: center;
}
.aid-loop-agents { box-shadow: 6px 6px 0 -1px rgba(255, 255, 255, 0.9), 6px 6px 0 0 rgba(15, 23, 42, 0.07), 12px 12px 0 -1px rgba(255, 255, 255, 0.8), 12px 12px 0 0 rgba(15, 23, 42, 0.05), 0 18px 38px -24px rgba(15, 23, 42, 0.4); }
.aid-loop-ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: rgba(0, 98, 255, 0.08); }
.aid-loop-ico svg { width: 22px; height: 22px; color: var(--accent-blue); }
.aid-loop-agents .aid-loop-ico { background: rgba(255, 107, 0, 0.09); }
.aid-loop-agents .aid-loop-ico svg { color: var(--accent-orange); }
.aid-loop-node b { font: 600 0.92rem/1.2 var(--font-display); color: var(--text-primary); }
.aid-loop-node small { font: 500 0.6rem/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); }
.aid-loop-mid { position: relative; display: flex; flex-direction: column; align-items: center; margin: 0 -2px; }
.aid-loop-svg { display: block; width: 100%; height: 130px; overflow: visible; }
.aid-arc { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-dasharray: 2 6; stroke-linecap: round; }
.aid-arc-out { stroke: rgba(0, 98, 255, 0.45); }
.aid-arc-back { stroke: rgba(255, 107, 0, 0.45); }
.aid-arc-dots path { fill: none; stroke-width: 9; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.aid-arc-dots-out path { stroke: var(--accent-blue); }
.aid-arc-dots-back path { stroke: var(--accent-orange); }
.aid-loop-tag { font: 600 0.62rem/1 var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase; white-space: nowrap; }
.aid-loop-tag-top { color: var(--accent-blue); margin-bottom: -6px; }
.aid-loop-tag-bot { color: #c2560a; margin-top: -6px; }

.aid-memory { max-width: 980px; margin: 56px auto 0; text-align: center; }
.aid-memory-tag { color: var(--accent-orange); }
.aid-memory h3 { margin: 0 0 26px; font: 500 clamp(1.15rem, 2vw, 1.4rem)/1.3 var(--font-display); color: var(--text-primary); }
.aid-memory-strip { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; text-align: left; }
.aid-memory-strip::before { content: ""; position: absolute; left: 16.6%; right: 16.6%; top: 11px; height: 2px; background: rgba(15, 23, 42, 0.08); }
.aid-memory-strip::after {
  content: ""; position: absolute; left: 16.6%; top: 11px; height: 2px; width: calc(66.8% * var(--fill, 1));
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-orange));
  transition: width 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.aid-memory-strip li { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.aid-memory-when {
  display: inline-block; padding: 5px 10px; border-radius: 6px; background: #fff; border: 1px solid rgba(0, 98, 255, 0.2);
  font: 600 0.62rem/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-blue);
  transition: background 0.5s ease, color 0.5s ease, border-color 0.5s ease;
}
.aid-memory-strip li > svg { width: 22px; height: 22px; color: var(--accent-blue); }
.aid-memory-strip p {
  margin: 0; padding: 16px 18px; width: 100%; box-sizing: border-box; border-radius: 12px;
  background: rgba(255, 255, 255, 0.85); border: 1px solid rgba(15, 23, 42, 0.07); box-shadow: 0 16px 34px -26px rgba(15, 23, 42, 0.4);
  font-size: 0.9rem; line-height: 1.55; color: var(--text-secondary);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.5s ease;
}
.aid-memory.is-live .aid-memory-strip li p { opacity: 0.35; transform: translateY(8px); }
.aid-memory.is-live .aid-memory-strip li.is-on p { opacity: 1; transform: none; border-color: rgba(0, 98, 255, 0.2); }
.aid-memory.is-live .aid-memory-strip li.is-on .aid-memory-when { background: var(--accent-blue); border-color: var(--accent-blue); color: #fff; }
.aid-memory.is-live .aid-memory-strip li:last-child.is-on .aid-memory-when { background: var(--accent-orange); border-color: var(--accent-orange); }

/* ── Our own systems: the near-black slab, tinted blue for this page ── */
#our-pilot .esb-showcase {
  border-color: rgba(0, 98, 255, 0.22);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.45), 0 0 50px rgba(0, 98, 255, 0.04) inset;
}
#our-pilot .esb-feature i,
#our-pilot .esb-feature svg,
#our-pilot .esb-label { color: var(--accent-blue); }
#our-pilot .esb-feature svg { color: #4d8dff; width: 22px; height: 22px; flex: 0 0 22px; margin-top: 2px; }
/* the two systems it runs on across the top, the three things we run on it below */
#our-pilot .esb-features { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 22px 36px; }
#our-pilot .esb-feature { grid-column: span 2; }
#our-pilot .esb-feature:nth-child(-n+2) { grid-column: span 3; }
#our-pilot .pilot-line {
  color: #e6edf3;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  margin: 32px 0 0;
}
.aid-pilot-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: 32px; align-items: start; margin-bottom: 8px; }
.aid-vmlog {
  border-radius: 10px; overflow: hidden; background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(0, 98, 255, 0.28); box-shadow: 0 0 40px -18px rgba(0, 98, 255, 0.45);
}
.aid-vmlog-head {
  display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font: 600 0.6rem/1 var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase; color: #8b949e;
}
.aid-vmlog-dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 8px rgba(34, 197, 94, 0.7); animation: aidBlip 2s ease-in-out infinite; }
@keyframes aidBlip { 50% { opacity: 0.35; } }
.aid-vmlog-body { list-style: none; margin: 0; padding: 12px 14px 14px; min-height: 118px; display: flex; flex-direction: column; gap: 7px; }
.aid-vmlog-body li { display: flex; gap: 8px; font: 400 0.78rem/1.35 var(--font-mono); color: #c9d4e2; transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
.aid-vmlog-body li span { color: #4d8dff; }
.aid-vmlog-body li.is-done { color: #86efac; }
.aid-vmlog-body li.is-done span { color: #22c55e; }
.aid-vmlog.is-live .aid-vmlog-body li { opacity: 0; transform: translateY(4px); }
.aid-vmlog.is-live .aid-vmlog-body li.is-on { opacity: 1; transform: none; }
.aid-vmlog.is-live .aid-vmlog-body li.is-cur::after { content: ""; display: inline-block; width: 7px; height: 13px; margin-left: 2px; background: #4d8dff; vertical-align: -2px; animation: aidCaret 1s steps(1) infinite; }
@keyframes aidCaret { 50% { opacity: 0; } }

/* ── Agents or workflows: one invoice, two paths ── */
.aid-vs { max-width: 1080px; margin: 44px auto 0; }
.aid-vs-source { display: flex; justify-content: center; }
.aid-vs-doc {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 12px; background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08); box-shadow: 0 16px 34px -22px rgba(15, 23, 42, 0.45);
  font: 600 0.95rem/1.2 var(--font-display); color: var(--text-primary);
}
.aid-vs-doc svg { width: 20px; height: 20px; color: var(--accent-blue); }
.aid-vs-fork { display: block; width: 100%; height: 48px; overflow: visible; }
.aid-vs-fork path { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-dasharray: 2 6; stroke-linecap: round; }
.aid-fork-wf { stroke: rgba(16, 185, 129, 0.6); }
.aid-fork-ag { stroke: rgba(0, 98, 255, 0.55); }
.aid-vs-lanes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.aid-lane {
  position: relative; display: flex; flex-direction: column; border-radius: 14px; overflow: hidden;
  background: rgba(255, 255, 255, 0.82); border: 1px solid rgba(15, 23, 42, 0.07); box-shadow: 0 22px 50px -34px rgba(15, 23, 42, 0.45);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.aid-lane:hover { transform: translateY(-2px); box-shadow: 0 26px 56px -32px rgba(15, 23, 42, 0.5); }
.aid-lane-wf { --lane: 16, 185, 129; }
.aid-lane-ag { --lane: 0, 98, 255; }
.aid-track { position: relative; height: 170px; margin: 0; border-bottom: 1px solid rgba(15, 23, 42, 0.06); background: linear-gradient(180deg, rgba(var(--lane), 0.05), rgba(var(--lane), 0.015)); }
.aid-lane-copy { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.aid-lane-copy .card-indicator { margin-bottom: 12px; }
.aid-lane-copy h3 { margin: 0 0 8px; font: 500 1.2rem/1.3 var(--font-display); color: var(--text-primary); }
.aid-lane-copy p { margin: 0; font-size: 0.9rem; line-height: 1.6; color: var(--text-secondary); }
.aid-lane-copy .aid-lane-best { margin-top: 10px; }
.aid-lane-best strong { color: var(--text-primary); }
.aid-lane-more { margin-top: auto; padding-top: 16px; font: 600 0.82rem/1.2 var(--font-display); color: var(--accent-blue); text-decoration: none; align-self: flex-start; }
.aid-lane-more:hover { text-decoration: underline; }
.aid-lane-more:focus-visible { outline: 2px solid var(--accent-blue); outline-offset: 3px; border-radius: 3px; }

/* the stops: a round icon node with its label under it */
.aid-stop { position: absolute; z-index: 2; left: var(--x); top: var(--y); width: 0; height: 0; }
.aid-stop svg {
  position: absolute; left: -17px; top: -17px; width: 34px; height: 34px; padding: 8px; box-sizing: border-box; border-radius: 50%;
  background: #fff; color: rgb(var(--lane)); border: 1.5px solid rgba(var(--lane), 0.3);
  transition: background 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
.aid-stop em {
  position: absolute; top: 24px; left: 0; transform: translateX(-50%); width: 112px; text-align: center;
  font: 500 0.74rem/1.25 var(--font-display); font-style: normal; color: var(--text-secondary); transition: color 0.4s ease;
}
.aid-stop.is-at svg { background: rgb(var(--lane)); color: #fff; border-color: rgb(var(--lane)); box-shadow: 0 0 0 5px rgba(var(--lane), 0.12); }
.aid-stop.is-at em, .aid-stop.is-past em { color: var(--text-primary); }
.aid-stop.is-past svg { border-color: rgba(var(--lane), 0.7); }
.aid-stop-up em { top: auto; bottom: 24px; }
.aid-token {
  position: absolute; z-index: 1; left: var(--tx, 8%); top: var(--ty, 50%); width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  background: rgb(var(--lane)); box-shadow: 0 0 0 6px rgba(var(--lane), 0.15), 0 0 14px rgba(var(--lane), 0.6);
  opacity: 0;
}

/* workflow: a perfectly straight rail, stations evenly spaced, a fixed linear rhythm */
.aid-track-wf .aid-stop[data-k="0"] { --x: 16%; --y: 46%; }
.aid-track-wf .aid-stop[data-k="1"] { --x: 50%; --y: 46%; }
.aid-track-wf .aid-stop[data-k="2"] { --x: 84%; --y: 46%; }
.aid-wf-line { position: absolute; left: 16%; right: 16%; top: 46%; height: 2px; margin-top: -1px; background: rgba(16, 185, 129, 0.35); }
.aid-track-wf .aid-token { --ty: 46%; transition: left 0.9s linear, opacity 0.3s ease; }

/* agent: a path that detours to the Brain, then stops at your OK */
.aid-ag-path { position: absolute; inset: 0; width: 100%; height: 100%; }
.aid-ag-path path { fill: none; stroke: rgba(0, 98, 255, 0.35); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-dasharray: 2 6; stroke-linecap: round; }
.aid-track-ag .aid-token { transition: left 1s cubic-bezier(0.16, 1, 0.3, 1), top 1s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease; }
.aid-stop-ok { --lane: 255, 107, 0; }
.aid-stop-ok.is-at svg { animation: aidOk 1.6s ease-out infinite; }
@keyframes aidOk { 0% { box-shadow: 0 0 0 0 rgba(255, 107, 0, 0.5); } 70%, 100% { box-shadow: 0 0 0 12px rgba(255, 107, 0, 0); } }
.aid-ask {
  position: absolute; z-index: 3; left: 3%; top: 52px; padding: 7px 11px; border-radius: 10px 10px 10px 2px;
  background: #fff; border: 1px solid rgba(15, 23, 42, 0.08); box-shadow: 0 10px 24px -16px rgba(15, 23, 42, 0.45);
  font: 500 0.76rem/1.2 var(--font-display); color: var(--text-primary);
  max-width: calc(37% - 32px); box-sizing: border-box; /* wraps before it reaches the Brain stop */
  transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.aid-track-ag .aid-stop[data-k="0"] em { left: -10px; transform: none; text-align: left; }
.aid-track-ag .aid-stop-ok em { left: auto; right: -14px; transform: none; text-align: right; width: 120px; }
.aid-track-wf .aid-stop em { width: 96px; }

/* the phases (ai-development.js): 0 to 3 move the tokens, 4 rests with both jobs done */
.aid-vs.is-live .aid-token { opacity: 1; }
.aid-vs.is-live[data-phase="0"] .aid-track-wf .aid-token { left: 16%; }
.aid-vs.is-live[data-phase="1"] .aid-track-wf .aid-token { left: 50%; }
.aid-vs.is-live[data-phase="2"] .aid-track-wf .aid-token,
.aid-vs.is-live[data-phase="3"] .aid-track-wf .aid-token,
.aid-vs.is-live[data-phase="4"] .aid-track-wf .aid-token { left: 84%; }
.aid-vs.is-live[data-phase="0"] .aid-track-ag .aid-token { left: 8%; top: 68%; }
.aid-vs.is-live[data-phase="1"] .aid-track-ag .aid-token { left: 37%; top: 32%; }
.aid-vs.is-live[data-phase="2"] .aid-track-ag .aid-token { left: 64%; top: 68%; }
.aid-vs.is-live[data-phase="3"] .aid-track-ag .aid-token,
.aid-vs.is-live[data-phase="4"] .aid-track-ag .aid-token { left: 92%; top: 68%; }
.aid-vs.is-live:not([data-phase="0"]) .aid-ask { opacity: 0; transform: translateY(-6px); }
.aid-vs.is-live[data-phase="0"] .aid-ask { opacity: 1; }
.aid-vs:not(.is-live) .aid-stop svg { border-color: rgba(var(--lane), 0.7); }
.aid-vs:not(.is-live) .aid-stop em { color: var(--text-primary); }
.aid-vs:not(.is-live) .aid-stop-ok svg { background: rgb(var(--lane)); color: #fff; }

/* ── How we deliver it: the permission rail ── */
.aid-rail-key { margin: 40px 0 0; text-align: center; }
.aid-rail-key span { display: inline-block; margin: 0; color: var(--text-muted); }
.aid-rail { position: relative; list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.aid-stn { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; --on: 0; }
.aid-stn:nth-child(1) { --c: 148, 163, 184; }
.aid-stn:nth-child(2) { --c: 96, 155, 255; }
.aid-stn:nth-child(3) { --c: 0, 98, 255; }
.aid-stn:nth-child(4) { --c: 255, 107, 0; }
.aid-stn:nth-child(5) { --c: 16, 185, 129; }
.aid-acc {
  position: relative; width: 100%; height: 46px; box-sizing: border-box; padding: 0 6px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font: 600 0.62rem/1.2 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted); background: rgba(15, 23, 42, 0.03); border: 1px dashed rgba(15, 23, 42, 0.12);
  transition: background 0.6s ease, color 0.6s ease, border-color 0.6s ease;
}
.aid-node {
  position: relative; z-index: 2; display: grid; place-items: center; width: 52px; height: 52px; margin: 22px 0 16px; border-radius: 50%;
  background: #fff; border: 1.5px solid rgba(15, 23, 42, 0.12); color: var(--text-muted);
  transition: border-color 0.6s ease, color 0.6s ease, box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.aid-node svg { width: 22px; height: 22px; }
/* the track: each station draws the stretch to the next one, filled once it's reached */
.aid-stn:not(:last-child)::before, .aid-stn:not(:last-child)::after {
  content: ""; position: absolute; z-index: 1; top: 93px; left: calc(50% + 26px); width: calc(100% + 16px - 52px); height: 2px;
}
.aid-stn:not(:last-child)::before { background: rgba(15, 23, 42, 0.08); }
.aid-stn:not(:last-child)::after { background: linear-gradient(90deg, rgb(var(--c)), rgba(var(--c), 0.5)); transform-origin: left center; transform: scaleX(0); transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1); }
.aid-stn.is-passed::after { transform: scaleX(1); }
.aid-stn.is-reached .aid-acc { color: rgb(var(--c)); background: rgba(var(--c), 0.09); border: 1px solid rgba(var(--c), 0.35); }
.aid-stn.is-reached .aid-node { border-color: rgb(var(--c)); color: rgb(var(--c)); }
.aid-stn.is-current .aid-node { box-shadow: 0 0 0 6px rgba(var(--c), 0.12), 0 0 22px rgba(var(--c), 0.45); transform: scale(1.06); }
.aid-stn-copy { display: flex; flex-direction: column; align-items: center; }
.aid-stn-num { font: 600 0.66rem/1 var(--font-mono); letter-spacing: 0.12em; color: var(--text-muted); margin-bottom: 8px; }
.aid-stn h4 { margin: 0 0 6px; font: 600 1rem/1.3 var(--font-display); color: var(--text-primary); }
.aid-stn p { margin: 0; font-size: 0.86rem; line-height: 1.55; color: var(--text-secondary); }
.aid-rail:not(.is-live) .aid-stn .aid-acc { color: rgb(var(--c)); background: rgba(var(--c), 0.09); border: 1px solid rgba(var(--c), 0.35); }
.aid-rail:not(.is-live) .aid-stn .aid-node { border-color: rgb(var(--c)); color: rgb(var(--c)); }
.aid-rail:not(.is-live) .aid-stn::after { transform: scaleX(1); }

/* ── Your data, your rules: the rules beside two example panels ── */
.aid-rules { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 44px; align-items: center; }
.aid-rules > * { position: relative; z-index: 1; }
.aid-rules-lead { margin: 0 0 26px; font-size: 0.95rem; line-height: 1.7; color: var(--text-secondary); max-width: 560px; }
.aid-rules-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.aid-rules-list li {
  display: grid; grid-template-columns: 24px minmax(0, 1fr) 16px; gap: 14px; align-items: start; padding: 12px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}
.aid-rules-list li:last-child { border-bottom: 0; }
.aid-rules-list li > svg { width: 22px; height: 22px; color: var(--accent-blue); margin-top: 1px; }
.aid-rules-list strong { display: block; font-size: 0.95rem; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.aid-rules-list span { font-size: 0.86rem; line-height: 1.5; color: var(--text-secondary); }
.aid-rules-list .aid-tick { margin-top: 3px; }
.aid-rules:not(.is-live) .aid-rules-list li .aid-tick { background: var(--accent-blue); border-color: var(--accent-blue); }
.aid-rules:not(.is-live) .aid-rules-list li .aid-tick::after { opacity: 1; }

.aid-lens { display: flex; flex-direction: column; gap: 14px; }
.aid-lens-card { padding: 18px; border-radius: 14px; background: #fff; border: 1px solid rgba(15, 23, 42, 0.07); box-shadow: 0 18px 40px -26px rgba(15, 23, 42, 0.4); }
.aid-lens-tag { margin-bottom: 12px; color: var(--text-muted); }
.aid-switch { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 10px; background: rgba(15, 23, 42, 0.05); }
.aid-switch-glide {
  position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 7px; background: #fff;
  box-shadow: 0 2px 8px -2px rgba(15, 23, 42, 0.2); transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.aid-switch.is-lead .aid-switch-glide { transform: translateX(100%); }
.aid-switch button {
  position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 10px; border: 0; background: none; cursor: pointer;
  font: 600 0.84rem/1.2 var(--font-display); color: var(--text-secondary); border-radius: 7px; transition: color 0.3s ease;
}
.aid-switch button svg { width: 15px; height: 15px; }
.aid-switch button[aria-selected="true"] { color: var(--accent-blue); }
.aid-switch button:focus-visible { outline: 2px solid var(--accent-blue); outline-offset: 1px; }
.aid-lens-q { margin: 14px 0 10px; padding: 9px 12px; border-radius: 10px 10px 10px 2px; background: rgba(15, 23, 42, 0.035); font-size: 0.86rem; line-height: 1.45; color: var(--text-primary); }
.aid-lens-answers { display: grid; }
.aid-lens-a {
  grid-area: 1 / 1; align-self: start; padding: 11px 13px; border-radius: 10px 10px 2px 10px; background: rgba(0, 98, 255, 0.05); border: 1px solid rgba(0, 98, 255, 0.12);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s;
}
.aid-lens-a[hidden] { display: block; visibility: hidden; opacity: 0; transform: translateY(6px); }
.aid-lens-a p { margin: 0; font-size: 0.86rem; line-height: 1.5; color: var(--text-primary); }
.aid-lens-src { display: flex; align-items: center; gap: 6px; margin-top: 8px; font: 500 0.7rem/1.3 var(--font-mono); color: var(--accent-blue); }
.aid-lens-src svg { width: 13px; height: 13px; }
.aid-lens-no { background: rgba(255, 107, 0, 0.05); border-color: rgba(255, 107, 0, 0.18); }
.aid-lens-no p { display: flex; gap: 8px; align-items: flex-start; }
.aid-lens-no p svg { width: 15px; height: 15px; flex: 0 0 auto; margin-top: 2px; color: var(--accent-orange); }
@keyframes aidIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.aid-log { border-radius: 12px; overflow: hidden; background: #070a13; border: 1px solid rgba(0, 98, 255, 0.25); box-shadow: 0 20px 44px -26px rgba(0, 0, 0, 0.6); }
.aid-log-head {
  display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font: 600 0.6rem/1 var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase; color: #8b949e;
}
.aid-log-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-blue); box-shadow: 0 0 8px rgba(0, 98, 255, 0.8); animation: aidBlip 2s ease-in-out infinite; }
.aid-log-body { list-style: none; margin: 0; padding: 10px 14px 12px; min-height: 124px; display: flex; flex-direction: column; gap: 6px; }
.aid-log-body li {
  display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 10px; align-items: baseline;
  font: 400 0.72rem/1.4 var(--font-mono); color: #c9d4e2; transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.aid-log-body b { font-weight: 600; color: #e6edf3; }
.aid-log-body em { font-style: normal; font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; }
.aid-log-body .is-wait { color: #fdba74; }
.aid-log-body .is-was { color: #8b949e; }
.aid-log-body .is-ok { color: #86efac; }
.aid-log-body .is-no { color: #fca5a5; }
.aid-log.is-live .aid-log-body li { opacity: 0; transform: translateY(4px); }
.aid-log.is-live .aid-log-body li.is-on { opacity: 1; transform: none; }

/* ── The demo: four scripted jobs ── */
.aid-demo { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 28px; align-items: start; max-width: 1040px; margin: 0 auto; }
.aid-demo-tabs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.aid-demo-tabs button {
  position: relative; width: 100%; text-align: left; cursor: pointer;
  padding: 14px 16px 14px 18px; border: 0; border-radius: 12px; background: transparent;
  font: inherit; color: inherit; transition: background 0.3s ease;
}
.aid-demo-tabs button::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 2px; background: rgba(0, 98, 255, 0.14); }
.aid-demo-tabs button::after { content: ""; position: absolute; left: 0; top: 14px; width: 3px; height: 0; border-radius: 2px; background: var(--accent-blue); }
.aid-demo-tabs button[aria-selected="true"] { background: rgba(0, 98, 255, 0.05); }
.aid-demo-tabs button[aria-selected="true"]::after { animation: aidBeat var(--beat, 9s) linear forwards; }
.aid-demo.is-touched .aid-demo-tabs button[aria-selected="true"]::after,
.aid-demo.is-still .aid-demo-tabs button[aria-selected="true"]::after { animation: none; height: calc(100% - 28px); }
@keyframes aidBeat { to { height: calc(100% - 28px); } }
.aid-demo-tabs b { display: block; font: 600 0.98rem/1.3 var(--font-display); color: var(--text-muted); transition: color 0.3s ease; }
.aid-demo-tabs span { display: block; margin-top: 3px; font-size: 0.84rem; line-height: 1.45; color: var(--text-secondary); }
.aid-demo-tabs button[aria-selected="true"] b { color: var(--text-primary); }
.aid-demo-tabs button:focus-visible { outline: 2px solid var(--accent-blue); outline-offset: 2px; }

#demo .aid-demo-console { height: auto !important; min-height: 430px; background: #fff; box-shadow: 0 24px 56px -34px rgba(15, 23, 42, 0.45); border-color: rgba(15, 23, 42, 0.07); border-radius: 12px; }
#demo .console-body { padding: 18px !important; overflow: visible; gap: 12px; }
#demo .console-title { color: var(--text-secondary); font-family: var(--font-display); }
.aid-demo-tag { margin-left: auto; padding: 4px 8px; border-radius: 5px; background: rgba(0, 98, 255, 0.07); font: 600 0.58rem/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-blue); }
#demo .chat-bubble { font-size: 0.88rem; line-height: 1.5; max-width: 88%; }
#demo .chat-bubble.typing { display: inline-flex; gap: 4px; padding: 13px 15px; }
#demo .chat-bubble.typing i { width: 6px; height: 6px; border-radius: 50%; background: rgba(0, 98, 255, 0.45); animation: aidDot 1.3s infinite; }
#demo .chat-bubble.typing i:nth-child(2) { animation-delay: 0.18s; }
#demo .chat-bubble.typing i:nth-child(3) { animation-delay: 0.36s; }
@keyframes aidDot { 0%, 60%, 100% { opacity: 0.3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-4px); } }
.aid-demo-list { list-style: none; margin: 10px 0 0; padding: 10px 0 0; border-top: 1px dashed rgba(0, 98, 255, 0.18); display: flex; flex-direction: column; gap: 5px; }
.aid-demo-list li { display: flex; align-items: center; gap: 8px; font: 500 0.7rem/1.3 var(--font-mono); color: var(--text-secondary); }
.aid-demo-list li svg { width: 13px; height: 13px; flex: 0 0 auto; color: var(--accent-blue); }
.aid-demo-list-label { margin: 10px 0 0; font: 600 0.58rem/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); }
.aid-demo-list-label + .aid-demo-list { margin-top: 6px; }
.aid-trail { align-self: flex-end; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 14px; max-width: 88%; font: 600 0.62rem/1.2 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); animation: aidIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) both; }
.aid-trail span { display: inline-flex; align-items: center; gap: 6px; transition: color 0.3s ease; }
.aid-trail span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid currentColor; box-sizing: border-box; transition: background 0.3s ease; }
.aid-trail span.is-on { color: var(--accent-blue); }
.aid-trail span.is-on::before { background: currentColor; }
.aid-approve { align-self: flex-end; display: flex; align-items: center; gap: 8px; animation: aidIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both; }
.aid-approve span { padding: 8px 14px; border-radius: 8px; font: 600 0.8rem/1 var(--font-display); }
.aid-approve .yes { background: var(--accent-blue); color: #fff; box-shadow: 0 8px 18px -10px rgba(0, 98, 255, 0.7); }
.aid-approve .no { background: #fff; color: var(--text-secondary); border: 1px solid rgba(15, 23, 42, 0.12); }
.aid-hand {
  align-self: stretch; display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-radius: 10px;
  border: 1px solid rgba(255, 107, 0, 0.3); background: rgba(255, 107, 0, 0.06);
  font: 500 0.8rem/1.4 var(--font-display); color: var(--text-primary); animation: aidIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.aid-hand svg { width: 16px; height: 16px; color: var(--accent-orange); flex: 0 0 auto; }

/* ── Tablet and phone ── */
@media (max-width: 1100px) {
  .aid-brain { grid-template-columns: minmax(0, 190px) 44px minmax(0, 1fr) 44px minmax(0, 260px); }
  .aid-stack li { grid-template-columns: 1fr; gap: 2px; }
}
@media (max-width: 900px) {
  .aid-brain { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
  .aid-src { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .aid-pipe { justify-self: center; width: 2px; height: 64px; margin: 14px 0; background: linear-gradient(180deg, rgba(56, 189, 248, 0.5), rgba(0, 98, 255, 0.5)); }
  .aid-pipe-out { background: linear-gradient(180deg, rgba(0, 98, 255, 0.5), rgba(255, 107, 0, 0.45)); }
  .aid-pipe i { left: -3px; animation-name: aidRunDown; }
  .aid-brain-col .aid-col-label { text-align: center; }
  .aid-stack li { grid-template-columns: 92px minmax(0, 1fr); gap: 10px; }

  .aid-pilot-top { grid-template-columns: 1fr; gap: 8px; margin-bottom: 26px; }
  #our-pilot .esb-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #our-pilot .esb-feature, #our-pilot .esb-feature:nth-child(-n+2) { grid-column: auto; }
  #our-pilot .esb-feature:last-child { grid-column: 1 / -1; }

  .aid-rail { grid-template-columns: 1fr; gap: 0; max-width: 560px; margin-left: auto; margin-right: auto; }
  .aid-stn { display: grid; grid-template-columns: 52px minmax(0, 1fr); grid-template-areas: "node acc" "node copy"; column-gap: 18px; align-items: start; text-align: left; padding-bottom: 26px; }
  .aid-acc { grid-area: acc; width: auto; height: auto; justify-self: start; padding: 6px 9px; margin-bottom: 8px; }
  .aid-node { grid-area: node; margin: 0; }
  .aid-stn-copy { grid-area: copy; align-items: flex-start; }
  .aid-stn-num { margin-bottom: 4px; }
  .aid-stn:not(:last-child)::before, .aid-stn:not(:last-child)::after { top: 56px; left: 25px; width: 2px; height: calc(100% - 60px); }
  .aid-stn:not(:last-child)::after { transform-origin: center top; transform: scaleY(0); background: linear-gradient(180deg, rgb(var(--c)), rgba(var(--c), 0.5)); }
  .aid-stn.is-passed::after, .aid-rail:not(.is-live) .aid-stn::after { transform: scaleY(1); }

  .aid-rules { grid-template-columns: 1fr; gap: 28px; }

  .aid-demo { grid-template-columns: 1fr; gap: 16px; }
  .aid-demo-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .aid-demo-tabs button { padding: 10px 10px 12px; }
  .aid-demo-tabs button::before, .aid-demo-tabs button::after { left: 10px; right: 10px; top: auto; bottom: 0; width: auto; height: 3px; }
  .aid-demo-tabs button::after { width: 0; right: auto; }
  .aid-demo-tabs button[aria-selected="true"]::after { animation-name: aidBeatX; }
  .aid-demo.is-touched .aid-demo-tabs button[aria-selected="true"]::after,
  .aid-demo.is-still .aid-demo-tabs button[aria-selected="true"]::after { width: calc(100% - 20px); height: 3px; }
  @keyframes aidBeatX { to { width: calc(100% - 20px); } }
  .aid-demo-tabs b { font-size: 0.86rem; }
  .aid-demo-tabs span { font-size: 0.76rem; }
}
@media (max-width: 768px) {
  #company-brain .extended-service-block, #our-pilot .extended-service-block { padding: 26px 18px !important; }
  #your-data .aid-rules { padding: 26px 18px !important; }
  .aid-equation { flex-direction: column; gap: 4px; margin-top: 28px; }
  .aid-eq-op { line-height: 1; }
  .aid-eq-tok { padding: 9px 12px; gap: 7px; }
  .aid-eq-tok svg { width: 16px; height: 16px; }
  .aid-loop { grid-template-columns: 104px minmax(0, 1fr) 104px; margin-top: 22px; }
  .aid-loop-node { padding: 12px 6px; gap: 4px; }
  .aid-loop-ico { width: 34px; height: 34px; border-radius: 10px; }
  .aid-loop-ico svg { width: 18px; height: 18px; }
  .aid-loop-node b { font-size: 0.76rem; }
  .aid-loop-node small { font-size: 0.52rem; letter-spacing: 0.1em; }
  .aid-loop-agents { margin-right: 8px; box-shadow: 4px 4px 0 -1px rgba(255, 255, 255, 0.9), 4px 4px 0 0 rgba(15, 23, 42, 0.07), 8px 8px 0 -1px rgba(255, 255, 255, 0.8), 8px 8px 0 0 rgba(15, 23, 42, 0.05), 0 18px 38px -24px rgba(15, 23, 42, 0.4); }
  .aid-loop-svg { height: 96px; }
  .aid-loop-tag { font-size: 0.52rem; letter-spacing: 0.1em; }
  .aid-memory { margin-top: 44px; }
  .aid-memory-strip { grid-template-columns: 1fr; gap: 14px; }
  .aid-memory-strip::before, .aid-memory-strip::after { display: none; }
  .aid-memory-strip li { display: grid; grid-template-columns: 74px minmax(0, 1fr); align-items: center; gap: 12px; text-align: left; }
  .aid-memory-strip li > svg { display: none; }
  .aid-memory-when { justify-self: start; }

  #our-pilot .esb-features { grid-template-columns: 1fr; gap: 18px; }
  #our-pilot .esb-feature:last-child { grid-column: auto; }

  .aid-vs { margin-top: 32px; }
  .aid-vs-fork { display: none; }
  .aid-vs-source { position: relative; padding-bottom: 34px; }
  .aid-vs-source::after { content: ""; position: absolute; left: 50%; bottom: 6px; width: 2px; height: 22px; margin-left: -1px; background: repeating-linear-gradient(180deg, rgba(15, 23, 42, 0.25) 0 2px, transparent 2px 7px); }
  .aid-vs-lanes { grid-template-columns: 1fr; gap: 16px; }
  .aid-track { height: 170px; }
  .aid-stop em { width: 84px; font-size: 0.68rem; }
  .aid-track-wf .aid-stop em { width: 84px; }
  .aid-track-ag .aid-stop-ok em { width: 70px; right: -12px; top: auto; bottom: 24px; }
  .aid-ask { font-size: 0.7rem; padding: 6px 9px; top: 56px; }
  .aid-lane-copy { padding: 18px 18px 20px; }
  .aid-lane-copy h3 { font-size: 1.08rem; }

  .aid-lens-card { padding: 14px; }
  .aid-log-body li { grid-template-columns: 80px minmax(0, 1fr); }
  .aid-log-body em { grid-column: 2; }

  #demo .aid-demo-console { min-height: 400px; }
  #aid-demo-log { min-height: 400px; }
  #demo .chat-bubble { max-width: 94%; font-size: 0.84rem; }
}

@media (prefers-reduced-motion: reduce) {
  .aid-src li, .aid-src li svg, .aid-pipe i, .aid-core-ring, .aid-vmlog-dot, .aid-log-dot, .aid-stop-ok.is-at svg, #demo .chat-bubble.typing i { animation: none !important; }
  .aid-pipe i { left: 45%; }
  .aid-pipe i:nth-child(n+2) { display: none; }
  .aid-scribe path { transition: none; stroke-dashoffset: 0; }
  .aid-arc-dots { display: none; }
  .aid-brain *, .aid-memory *, .aid-vs *, .aid-rail *, .aid-rail *::after, .aid-rules *, .aid-demo *, .aid-switch-glide { transition: none !important; }
  .aid-trail, .aid-approve, .aid-hand { animation: none; }
  .aid-lens-a { transition: none; }
}
@media (max-width: 900px) and (prefers-reduced-motion: reduce) {
  .aid-pipe i { left: -3px; top: 45%; }
}

/* ===== Dark mode ===== */
/* Levels: direct card = --surface-solid, card in a card = --surface-raised, recess = --dk-s1. No shadows, no glows. */
:root[data-theme="dark"]{--aid-lit:var(--blue-text)}
/* hero badge has an inline accent colour (inline style: !important is the only way) */
:root[data-theme="dark"] body:not(.pillar-marketing) .service-hero-badge[style*="--accent-blue"]{color:var(--blue-text) !important;border-color:rgba(129,170,247,.35) !important}
/* tints for text and icons */
:root[data-theme="dark"] .aid-subhead,:root[data-theme="dark"] .aid-col-label,:root[data-theme="dark"] .aid-stack b,
:root[data-theme="dark"] .aid-core-face svg,:root[data-theme="dark"] .aid-answer-src li > svg,:root[data-theme="dark"] .aid-built svg,
:root[data-theme="dark"] .aid-eq-tok svg,:root[data-theme="dark"] .aid-eq-note svg,:root[data-theme="dark"] .aid-eq-result,
:root[data-theme="dark"] .aid-loop-ico svg,:root[data-theme="dark"] .aid-loop-tag-top,:root[data-theme="dark"] .aid-memory-when,
:root[data-theme="dark"] .aid-memory-strip li > svg,:root[data-theme="dark"] .aid-vs-doc svg,:root[data-theme="dark"] .aid-lane-more,
:root[data-theme="dark"] .aid-rules-list li > svg,:root[data-theme="dark"] .aid-lens-src,:root[data-theme="dark"] .aid-demo-tag,
:root[data-theme="dark"] .aid-demo-list li svg,:root[data-theme="dark"] .aid-trail span.is-on,
:root[data-theme="dark"] .aid-switch button[aria-selected="true"]{color:var(--blue-text)}
:root[data-theme="dark"] .aid-memory-tag,:root[data-theme="dark"] .aid-loop-tag-bot,:root[data-theme="dark"] .aid-answer-foot svg,
:root[data-theme="dark"] .aid-loop-agents .aid-loop-ico svg,:root[data-theme="dark"] .aid-lens-no p svg,:root[data-theme="dark"] .aid-hand svg{color:var(--orange-text)}
/* tick, core, pipes */
:root[data-theme="dark"] .aid-tick{background:var(--surface-sunken);border-color:rgba(129,170,247,.45)}
:root[data-theme="dark"] .is-ticked > .aid-tick,:root[data-theme="dark"] .aid-brain:not(.is-live) .aid-answer-src .aid-tick,:root[data-theme="dark"] .aid-rules:not(.is-live) .aid-rules-list li .aid-tick{background:var(--btn-blue);border-color:var(--btn-blue)}
:root[data-theme="dark"] .aid-core-ring{border-color:rgba(129,170,247,.50)}
:root[data-theme="dark"] .aid-core-ring::after{background:var(--orange-text);box-shadow:none}
:root[data-theme="dark"] .aid-core-face{background:var(--surface-raised);border-color:rgba(129,170,247,.45);box-shadow:inset 0 1px 0 var(--dk-light-top)}
:root[data-theme="dark"] .aid-pipe{background:linear-gradient(90deg,rgba(129,170,247,.30),rgba(129,170,247,.65))}
:root[data-theme="dark"] .aid-pipe-out{background:linear-gradient(90deg,rgba(129,170,247,.65),rgba(243,157,94,.60))}
:root[data-theme="dark"] .aid-pipe i{background:var(--blue-text);box-shadow:0 0 0 1px rgba(129,170,247,.40)}
:root[data-theme="dark"] .aid-pipe-out i{background:var(--orange-text);box-shadow:0 0 0 1px rgba(243,157,94,.40)}
:root[data-theme="dark"] .aid-arc-dots-out path{stroke:var(--blue-text)}
/* brain (card in a band: rows are tint plates, lit row and answer are one level up) */
:root[data-theme="dark"] .aid-stack li{background:rgba(150,175,230,.06);border-color:var(--dk-line-3)}
:root[data-theme="dark"] .aid-brain[data-step="0"] .aid-stack li[data-s="0"],
:root[data-theme="dark"] .aid-brain[data-step="1"] .aid-stack li[data-s="1"],
:root[data-theme="dark"] .aid-brain[data-step="2"] .aid-stack li[data-s="2"]{background:var(--surface-raised);border-color:rgba(129,170,247,.55);box-shadow:none}
:root[data-theme="dark"] .aid-answer{background:var(--surface-raised);border-color:var(--dk-line-3);box-shadow:inset 0 1px 0 var(--dk-light-top)}
:root[data-theme="dark"] .aid-answer-q{background:var(--dk-s4)}
:root[data-theme="dark"] .aid-lens-q{background:var(--dk-s3)}
:root[data-theme="dark"] .aid-answer-foot{border-top-color:var(--dk-line-3)}
:root[data-theme="dark"] .aid-built{border-top-color:var(--dk-line-2)}
/* equation, loop, memory (these sit directly on a canvas section) */
:root[data-theme="dark"] .aid-eq-tok,:root[data-theme="dark"] .aid-vs-doc,:root[data-theme="dark"] .aid-loop-node{background:var(--surface-solid);border-color:var(--dk-line-3);box-shadow:inset 0 1px 0 var(--dk-light-top)}
:root[data-theme="dark"] .aid-eq-result{background:var(--surface-raised);border-color:rgba(129,170,247,.55);box-shadow:none}
/* stacked-cards effect: zero-blur offset layers, no soft shadow */
:root[data-theme="dark"] .aid-loop-agents{box-shadow:6px 6px 0 -1px var(--dk-s1),6px 6px 0 0 var(--dk-line-3),12px 12px 0 -1px var(--dk-canvas),12px 12px 0 0 var(--dk-line-2)}
@media (max-width:768px){:root[data-theme="dark"] .aid-loop-agents{box-shadow:4px 4px 0 -1px var(--dk-s1),4px 4px 0 0 var(--dk-line-3),8px 8px 0 -1px var(--dk-canvas),8px 8px 0 0 var(--dk-line-2)}}
:root[data-theme="dark"] .aid-loop-ico{background:rgba(129,170,247,.14)}
:root[data-theme="dark"] .aid-loop-agents .aid-loop-ico{background:rgba(243,157,94,.14)}
:root[data-theme="dark"] .aid-memory-strip::before{background:var(--dk-line-3)}
:root[data-theme="dark"] .aid-memory-when{background:var(--surface-solid);border-color:rgba(129,170,247,.40)}
:root[data-theme="dark"] .aid-memory.is-live .aid-memory-strip li.is-on .aid-memory-when{background:var(--btn-blue);border-color:var(--btn-blue);color:#fff}
:root[data-theme="dark"] .aid-memory.is-live .aid-memory-strip li:last-child.is-on .aid-memory-when{background:var(--btn-orange);border-color:var(--btn-orange);color:var(--btn-orange-ink)}
:root[data-theme="dark"] .aid-memory-strip p{background:var(--surface-solid);border-color:var(--dk-line-3);box-shadow:inset 0 1px 0 var(--dk-light-top)}
:root[data-theme="dark"] .aid-memory.is-live .aid-memory-strip li.is-on p{background:var(--surface-raised);border-color:rgba(129,170,247,.50)}
/* agents vs workflows: lane tints are the soft tints; the lit stop is a deep fill with white ink */
:root[data-theme="dark"] .aid-lane-wf{--lane:107,207,157}
:root[data-theme="dark"] .aid-lane-ag{--lane:129,170,247}
:root[data-theme="dark"] .aid-lane{background:var(--surface-solid);border-color:var(--dk-line-2);box-shadow:inset 0 1px 0 var(--dk-light-top)}
:root[data-theme="dark"] .aid-lane:hover{background:var(--surface-raised);border-color:var(--dk-line-3);box-shadow:inset 0 1px 0 var(--dk-light-top)}
:root[data-theme="dark"] .aid-track{border-bottom-color:var(--dk-line-2);background:linear-gradient(180deg,rgba(var(--lane),.14),rgba(var(--lane),.05))}
:root[data-theme="dark"] .aid-stop svg{background:var(--surface-raised)}
:root[data-theme="dark"] .aid-lane-wf .aid-stop.is-at svg,:root[data-theme="dark"] .aid-lane-wf .aid-vs:not(.is-live) .aid-stop-ok svg,:root[data-theme="dark"] .aid-vs:not(.is-live) .aid-lane-wf .aid-stop-ok svg{background:#0b7a52;color:#fff;border-color:rgb(var(--lane));box-shadow:0 0 0 5px rgba(var(--lane),.14)}
:root[data-theme="dark"] .aid-lane-ag .aid-stop.is-at svg,:root[data-theme="dark"] .aid-vs:not(.is-live) .aid-lane-ag .aid-stop-ok svg{background:var(--btn-blue);color:#fff;border-color:rgb(var(--lane));box-shadow:0 0 0 5px rgba(var(--lane),.14)}
:root[data-theme="dark"] .aid-token{box-shadow:0 0 0 6px rgba(var(--lane),.16)}
:root[data-theme="dark"] .aid-ask{background:var(--surface-raised);border-color:var(--dk-line-3);box-shadow:none}
@media (max-width:768px){:root[data-theme="dark"] .aid-vs-source::after{background:repeating-linear-gradient(180deg,rgba(176,184,197,.40) 0 2px,transparent 2px 7px)}}
/* delivery rail (band): stations take soft tints (the inline --c is gone, see 4a) */
:root[data-theme="dark"] .aid-stn:nth-child(1){--c:176,184,197}
:root[data-theme="dark"] .aid-stn:nth-child(2){--c:147,184,250}
:root[data-theme="dark"] .aid-stn:nth-child(3){--c:129,170,247}
:root[data-theme="dark"] .aid-stn:nth-child(4){--c:243,157,94}
:root[data-theme="dark"] .aid-stn:nth-child(5){--c:107,207,157}
:root[data-theme="dark"] .aid-acc{background:var(--surface-solid);border-color:var(--dk-line-3)}
:root[data-theme="dark"] .aid-node{background:var(--surface-solid);border-color:var(--dk-line-3)}
:root[data-theme="dark"] .aid-stn:not(:last-child)::before{background:var(--dk-line-3)}
:root[data-theme="dark"] .aid-stn.is-reached .aid-acc,:root[data-theme="dark"] .aid-rail:not(.is-live) .aid-stn .aid-acc{background:linear-gradient(rgba(var(--c),.14),rgba(var(--c),.14)),var(--surface-solid);border-color:rgba(var(--c),.45)}
:root[data-theme="dark"] .aid-stn.is-current .aid-node{box-shadow:0 0 0 6px rgba(var(--c),.16)}
/* your data: the lens card is a window panel one level above its s1 card; the log is a foundation stage */
:root[data-theme="dark"] .aid-rules-list li{border-bottom-color:var(--dk-line-2)}
:root[data-theme="dark"] .aid-lens-card{background:var(--surface-raised);border-color:var(--dk-line-3);box-shadow:inset 0 1px 0 var(--dk-light-top)}
:root[data-theme="dark"] .aid-switch{background:var(--dk-s1);box-shadow:inset 0 0 0 1px var(--dk-line-3)}
:root[data-theme="dark"] .aid-switch-glide{background:var(--dk-s3);box-shadow:inset 0 0 0 1px var(--dk-line-3)}
:root[data-theme="dark"] .aid-lens-a{background:rgba(129,170,247,.10);border-color:rgba(129,170,247,.35)}
:root[data-theme="dark"] .aid-lens-no{background:rgba(243,157,94,.09);border-color:rgba(243,157,94,.35)}
:root[data-theme="dark"] .aid-log-head{color:var(--text-secondary)}
:root[data-theme="dark"] .aid-log-dot{background:var(--blue-text);box-shadow:0 0 0 1px rgba(129,170,247,.40)}
:root[data-theme="dark"] .aid-log-body li{color:var(--text-secondary)}
:root[data-theme="dark"] .aid-log-body b{color:var(--text-primary)}
:root[data-theme="dark"] .aid-log-body .is-wait{color:var(--orange-text)}
:root[data-theme="dark"] .aid-log-body .is-was{color:var(--text-secondary)}
:root[data-theme="dark"] .aid-log-body .is-ok{color:var(--green-text)}
:root[data-theme="dark"] .aid-log-body .is-no{color:var(--red-text)}
/* demo window (band: body s2 via --surface-solid; the foundation already gives .console-header s3; customer bubble is the named recess) */
:root[data-theme="dark"] .aid-demo-tabs button::before{background:rgba(129,170,247,.24)}
:root[data-theme="dark"] .aid-demo-tabs button[aria-selected="true"]{background:rgba(129,170,247,.10)}
:root[data-theme="dark"] #demo .aid-demo-console{background:var(--surface-solid);border-color:var(--dk-edge);box-shadow:inset 0 1px 0 var(--dk-edge-hi)}
:root[data-theme="dark"] .aid-demo-tag{background:rgba(129,170,247,.12)}
:root[data-theme="dark"] #demo .chat-bubble.typing i{background:var(--blue-text)}
:root[data-theme="dark"] .aid-demo-list{border-top-color:rgba(129,170,247,.30)}
:root[data-theme="dark"] #demo .chat-bubble.customer{background:var(--dk-s1);border-color:var(--dk-line-2)}
:root[data-theme="dark"] #demo .chat-bubble.agent{background:rgba(129,170,247,.12);border-color:rgba(129,170,247,.35)}
:root[data-theme="dark"] #demo .chat-bubble.agent .speaker{color:var(--blue-text)}
:root[data-theme="dark"] .aid-approve .no{background:rgba(150,175,230,.08);border-color:var(--dk-line-3);color:var(--text-secondary)}
:root[data-theme="dark"] .aid-hand{background:rgba(243,157,94,.10);border-color:rgba(243,157,94,.35)}
/* our own systems: #our-pilot .esb-showcase is a foundation stage; finish its text and the example terminal (a plate) */
:root[data-theme="dark"] #our-pilot .esb-label,:root[data-theme="dark"] #our-pilot .esb-feature i,:root[data-theme="dark"] #our-pilot .esb-feature svg{color:var(--blue-text)}
:root[data-theme="dark"] #our-pilot .pilot-line,:root[data-theme="dark"] #our-pilot .esb-showcase h2,:root[data-theme="dark"] #our-pilot .esb-feature strong{color:var(--text-primary)}
:root[data-theme="dark"] #our-pilot .esb-showcase .esb-desc{color:var(--text-secondary)}
:root[data-theme="dark"] .aid-vmlog{background:var(--stage-plate);border-color:var(--dk-edge);box-shadow:none}
:root[data-theme="dark"] .aid-vmlog-head{border-bottom-color:var(--dk-edge);color:var(--text-secondary)}
:root[data-theme="dark"] .aid-vmlog-dot{background:var(--green-text);box-shadow:0 0 0 1px rgba(107,207,157,.40)}
:root[data-theme="dark"] .aid-vmlog-body li{color:var(--text-primary)}
:root[data-theme="dark"] .aid-vmlog-body li span{color:var(--blue-text)}
:root[data-theme="dark"] .aid-vmlog-body li.is-done{color:var(--green-text)}
:root[data-theme="dark"] .aid-vmlog-body li.is-done span{color:var(--green-text)}
:root[data-theme="dark"] .aid-vmlog.is-live .aid-vmlog-body li.is-cur::after{background:var(--blue-text)}

/* ai-development: lane colour for the 'waits for your OK' stop: tint instead of #ff6b00 */
:root[data-theme="dark"] .aid-stop-ok{--lane:243,157,94}
@keyframes aidOkDk{0%{box-shadow:0 0 0 0 rgba(243,157,94,.40)}70%,100%{box-shadow:0 0 0 12px rgba(243,157,94,0)}}
:root[data-theme="dark"] .aid-stop-ok.is-at svg{animation-name:aidOkDk}
/* workflow rail and agent path */
:root[data-theme="dark"] .aid-wf-line{background:rgba(107,207,157,.45)}
:root[data-theme="dark"] .aid-ag-path path{stroke:rgba(129,170,247,.50)}
/* loop arcs and dots */
:root[data-theme="dark"] .aid-arc-out{stroke:rgba(129,170,247,.50)}
:root[data-theme="dark"] .aid-arc-back{stroke:rgba(243,157,94,.50)}
:root[data-theme="dark"] .aid-arc-dots-back path,
:root[data-theme="dark"] .aid-scribe path{stroke:var(--orange-text)}
/* memory strip: filled line */
:root[data-theme="dark"] .aid-memory-strip::after{background:linear-gradient(90deg,var(--blue-text),var(--orange-text))}
/* ai-development: approval stop keeps its orange meaning in dark (matches .int-tool-approve and .cs-gate-eye: --btn-orange fill, --btn-orange-ink) */
:root[data-theme="dark"] .aid-lane-ag .aid-stop-ok.is-at svg,
:root[data-theme="dark"] .aid-vs:not(.is-live) .aid-lane-ag .aid-stop-ok svg{background:var(--btn-orange);color:var(--btn-orange-ink);border-color:var(--btn-orange);box-shadow:0 0 0 5px rgba(243,157,94,.14)}
/* fork lines from 'One supplier invoice': tints, not saturated brand colours */
:root[data-theme="dark"] .aid-fork-wf{stroke:rgba(107,207,157,.50)}
:root[data-theme="dark"] .aid-fork-ag{stroke:rgba(129,170,247,.50)}
