/* ============ Home page-specific styles ============ */

.eyebrow.soft { color: var(--accent); }
.serif-accent { font-family: "Fraunces", serif; font-style: italic; font-weight: 500; color: var(--accent); letter-spacing: -0.01em; }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 700ms ease, transform 700ms ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
.mono { font-family: var(--font-mono); }

/* ============ HERO ============ */
.hero {
  position: relative;
  padding: var(--s-6) 0 var(--s-5);
  overflow: hidden;
  background:
    radial-gradient(1100px 600px at 85% 30%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 55%),
    radial-gradient(800px 500px at 10% 80%, color-mix(in srgb, #1A1A19 5%, transparent), transparent 60%);
}
.hero-top { max-width: 960px; margin: 0 auto var(--s-5); text-align: center; }
.hero h1 {
  font-size: clamp(2.4rem, 5.2vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  margin-bottom: var(--s-3);
  color: #0A0A09;
}
.hero h1 .hl { position: relative; white-space: nowrap; z-index: 0; }
.hero h1 .hl::after {
  content: ""; position: absolute; left: -2%; right: -2%; bottom: 4%; height: 34%;
  background: color-mix(in srgb, var(--accent) 30%, transparent);
  z-index: -1; border-radius: 2px;
}
.hero-sub { font-size: var(--fs-lg); color: #2B2B29; max-width: 640px; margin: 0 auto var(--s-4); line-height: 1.5; }
.hero-cta { display:flex; gap: var(--s-3); flex-wrap: wrap; justify-content: center; }
.hero-meta { margin-top: var(--s-4); display:flex; gap: var(--s-5); font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--muted); justify-content: center; flex-wrap: wrap; }
.hero-meta b { color: #0A0A09; font-weight: 500; }

/* Hero mega-diagram */
.mega {
  position: relative;
  margin: 0 auto;
  max-width: 1240px;
  aspect-ratio: 16 / 8.2;
  border: 1px solid var(--hairline);
  background: #FAFAF9;
  background-image:
    linear-gradient(var(--hairline) 1px, transparent 1px),
    linear-gradient(90deg, var(--hairline) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: -1px -1px;
  overflow: hidden;
  border-radius: 4px;
}
.mega svg { width: 100%; height: 100%; display: block; }
.mega .caption-strip {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 10px 18px;
  background: #0A0A09; color: #E8E6E1;
  font-family: var(--font-mono); font-size: 11px;
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid #2A2A28;
}
.mega .cap-id { color: oklch(72% 0.14 155); }
.mega .cap-title b { color: #F2F1EE; font-weight: 500; }
.mega .cap-steps { display: flex; gap: 6px; }
.mega .cap-steps .d { width: 7px; height: 7px; border-radius: 50%; background: #2A2A28; }
.mega .cap-steps .d.on { background: oklch(72% 0.14 155); }

/* ============ Section shell ============ */
.flow-section { position: relative; padding: var(--s-8) 0; overflow: hidden; }
.flow-section.alt { background: var(--bg-2); }
.flow-section.dark { background: #0A0A09; color: #F2F1EE; }
.flow-section.dark .eyebrow { color: color-mix(in srgb, #F2F1EE 60%, transparent); }
.flow-section.dark .eyebrow.soft { color: oklch(72% 0.14 155); }
.flow-section.dark h2, .flow-section.dark h3, .flow-section.dark h4 { color: #F2F1EE; }
.flow-section.dark .section-head p { color: color-mix(in srgb, #F2F1EE 70%, transparent); }
.flow-section.dark .serif-accent { color: oklch(72% 0.14 155); }

.bg-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle, var(--hairline) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: .5;
  mask-image: radial-gradient(ellipse at 50% 50%, #000 35%, transparent 75%);
}
.flow-section.dark .bg-grid { background-image: radial-gradient(circle, #222220 1px, transparent 1px); opacity: .7; }

/* ============ Section: Problem vs TrueCom (kept) ============ */
.vs-grid { display:grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: var(--s-5); border: 1px solid var(--hairline); }
.vs-col { padding: var(--s-5); background: var(--bg); position: relative; }
.vs-col + .vs-col { border-left: 1px solid var(--hairline); }
.vs-col.bad { background: #FFF8F5; }
.vs-col.good { background: color-mix(in srgb, var(--accent) 4%, var(--bg)); }
.vs-col h3 { font-size: var(--fs-lg); margin-bottom: var(--s-3); display: flex; gap: 10px; align-items: center; }
.vs-col h3 .mk { font-family: var(--font-mono); font-size: 11px; padding: 3px 8px; border-radius: 3px; }
.vs-col.bad h3 .mk { background: oklch(55% 0.14 25); color: #FAFAF9; }
.vs-col.good h3 .mk { background: var(--accent); color: #FAFAF9; }
.vs-col .scenario-ui {
  background: #FAFAF9; border: 1px solid var(--hairline); border-radius: 4px;
  padding: 14px; font-family: var(--font-mono); font-size: 11px; line-height: 1.7;
  min-height: 240px; position: relative; overflow: hidden;
}
.vs-col.good .scenario-ui { background: #0A0A09; color: #E8E6E1; border-color: #2A2A28; }
.vs-line { opacity: 0; transform: translateX(-6px); transition: all 300ms; display: block; }
.vs-line.show { opacity: 1; transform: translateX(0); }
.vs-line .ok { color: oklch(68% 0.13 155); }
.vs-line .err { color: oklch(62% 0.15 25); }
.vs-line .warn { color: oklch(65% 0.12 80); }
.vs-line .muted { color: #6F6F6A; }
.vs-col.good .vs-line .muted { color: #6A6A65; }
.vs-col.good .vs-line .ok { color: oklch(75% 0.13 155); }

.vs-footer { margin-top: var(--s-3); padding-top: var(--s-3); border-top: 1px dashed var(--hairline); font-family: var(--font-mono); font-size: 10px; color: var(--muted); }
.vs-col.good .vs-footer { border-top-color: #2A2A28; color: #8B8B85; }
.vs-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.vs-chip { padding: 3px 8px; border-radius: 3px; font-size: 10px; border: 1px solid; }
.vs-col.bad .vs-chip { border-color: oklch(55% 0.14 25); color: oklch(55% 0.14 25); }
.vs-col.good .vs-chip { border-color: oklch(68% 0.13 155); color: oklch(75% 0.13 155); }

/* ============ Section: Discovery — bazaar vs TrueCom ============ */
.disc-wrap { display:grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: var(--s-5); border: 1px solid var(--hairline); background: var(--bg); border-radius: 4px; overflow: hidden; }
.disc-col { padding: var(--s-4); position: relative; min-height: 640px; display: flex; flex-direction: column; }
.disc-col + .disc-col { border-left: 1px solid var(--hairline); }
.disc-col.bad { background: #FFF8F5; }
.disc-col.good { background: color-mix(in srgb, var(--accent) 3%, var(--bg)); }
.disc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s-3); padding-bottom: var(--s-2); border-bottom: 1px dashed var(--hairline); }
.disc-head .title { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-md); display:flex; gap: 10px; align-items: center; }
.disc-head .title .mk { font-family: var(--font-mono); font-size: 10px; padding: 3px 8px; border-radius: 3px; color: #FAFAF9; }
.disc-col.bad .title .mk { background: oklch(55% 0.14 25); }
.disc-col.good .title .mk { background: var(--accent); }
.disc-head .count { font-family: var(--font-mono); font-size: 10px; color: var(--muted); }

.query-box {
  padding: 10px 12px; background: var(--bg); border: 1px solid var(--hairline); border-radius: 3px;
  font-family: var(--font-mono); font-size: 11px; margin-bottom: var(--s-3); display: flex; align-items: center; gap: 8px;
}
.query-box .q-pre { color: var(--accent); }
.query-box .q-cursor { width: 7px; height: 12px; background: var(--fg); animation: blink 1.1s steps(2) infinite; display: inline-block; margin-left: 2px; }
.query-box .q-text { color: var(--fg); }

.result-list { display: flex; flex-direction: column; gap: 6px; flex: 1; overflow: hidden; position: relative; }
.result-list.scrollable { overflow-y: auto; max-height: 460px; padding-right: 4px; }
.result-list.scrollable::-webkit-scrollbar { width: 4px; }
.result-list.scrollable::-webkit-scrollbar-thumb { background: var(--hairline-strong); }

.bazaar-item {
  display: grid; grid-template-columns: 16px 1fr auto; gap: 8px; align-items: center;
  padding: 8px 10px; background: var(--bg); border: 1px solid var(--hairline); border-radius: 3px;
  font-family: var(--font-mono); font-size: 10px;
  opacity: 0; transform: translateY(4px); transition: all 300ms;
}
.bazaar-item.show { opacity: 1; transform: translateY(0); }
.bazaar-item.spam { background: #FFF3EF; border-color: color-mix(in srgb, oklch(55% 0.14 25) 30%, transparent); }
.bazaar-item.dead { opacity: 0.5; text-decoration: line-through; }
.bazaar-item .badge { width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; font-size: 9px; }
.bazaar-item .badge.s { background: oklch(55% 0.14 25); color: #FAFAF9; }
.bazaar-item .badge.d { background: #8B8B85; color: #FAFAF9; }
.bazaar-item .badge.u { background: var(--bg-3); color: var(--fg); }
.bazaar-item .name { color: var(--fg); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bazaar-item .name .meta { color: var(--muted); font-weight: 400; margin-left: 6px; }
.bazaar-item .price { color: var(--fg-2); }

.tp-card {
  background: var(--bg); border: 1px solid var(--hairline); border-radius: 3px;
  padding: 12px; display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: start;
  opacity: 0; transform: translateY(4px); transition: all 400ms;
  font-family: var(--font-body); font-size: 12px;
}
.tp-card.show { opacity: 1; transform: translateY(0); }
.tp-card.top { border-color: var(--accent); box-shadow: 0 8px 20px -10px color-mix(in srgb, var(--accent) 50%, transparent); }
.tp-card .name { font-family: var(--font-display); font-weight: 600; font-size: 13px; color: var(--fg); margin-bottom: 3px; }
.tp-card .desc { color: var(--muted); font-size: 11px; line-height: 1.4; margin-bottom: 6px; }
.tp-card .chips { display: flex; gap: 6px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 9px; color: var(--muted); }
.tp-card .chips b { color: var(--accent); font-weight: 500; }
.tp-card .score { text-align: right; font-family: var(--font-mono); font-size: 10px; }
.tp-card .score .big { display: block; font-family: var(--font-display); font-size: 22px; color: var(--accent); font-weight: 600; line-height: 1; margin-bottom: 2px; }
.tp-card .score .sm { color: var(--muted); }
.tp-card .score .bars { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; align-items: flex-end; }
.tp-card .score .bars .br { display:flex; align-items: center; gap: 4px; font-size: 9px; color: var(--muted); }
.tp-card .score .bars .br .tr { width: 50px; height: 4px; background: var(--bg-3); position: relative; border-radius: 1px; overflow: hidden; }
.tp-card .score .bars .br .tr i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); }

.disc-footer {
  margin-top: var(--s-3); padding-top: var(--s-3); border-top: 1px dashed var(--hairline);
  font-family: var(--font-mono); font-size: 10px; color: var(--muted);
  display: flex; flex-direction: column; gap: 6px;
}
.disc-col.bad .disc-footer { border-top-color: color-mix(in srgb, oklch(55% 0.14 25) 30%, transparent); }
.disc-footer .stat { display: flex; justify-content: space-between; }
.disc-footer .stat b { font-weight: 500; }
.disc-col.bad .disc-footer .stat b { color: oklch(55% 0.14 25); }
.disc-col.good .disc-footer .stat b { color: var(--accent); }

/* ============ Section: Capability abstraction ============ */
.cap-wrap { margin-top: var(--s-5); display: grid; grid-template-columns: 1fr 80px 1fr; gap: var(--s-4); align-items: stretch; }
.cap-col { display: flex; flex-direction: column; gap: var(--s-3); }
.cap-col h3 { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-md); display: flex; gap: 10px; align-items: center; }
.cap-col h3 .mk { font-family: var(--font-mono); font-size: 10px; padding: 3px 8px; border-radius: 3px; color: #FAFAF9; }
.cap-col.bad h3 .mk { background: oklch(55% 0.14 25); }
.cap-col.good h3 .mk { background: var(--accent); }

.raw-doc, .cap-card {
  background: var(--bg); border: 1px solid var(--hairline); border-radius: 4px;
  padding: 14px; font-family: var(--font-mono); font-size: 11px;
  line-height: 1.6; flex: 1; overflow: hidden; position: relative;
}
.raw-doc { color: var(--muted); }
.raw-doc .scratch { position: absolute; top: 20%; left: 5%; right: 5%; height: 4px; background: oklch(55% 0.14 25); transform: rotate(-3deg); opacity: 0.5; }
.raw-doc .scratch.b { top: 40%; transform: rotate(2deg); }
.raw-doc .scratch.c { top: 55%; }
.raw-doc .mk-miss { color: oklch(55% 0.14 25); font-weight: 500; background: color-mix(in srgb, oklch(55% 0.14 25) 12%, transparent); padding: 1px 4px; }
.raw-doc .mk-maybe { color: oklch(62% 0.14 80); }
.raw-doc h5 { font-family: var(--font-display); font-size: 12px; color: var(--fg); margin-bottom: 8px; }

.cap-card { background: #0A0A09; color: #E8E6E1; border-color: #2A2A28; display: flex; flex-direction: column; gap: 10px; }
.cap-card .cap-head { display: flex; justify-content: space-between; padding-bottom: 8px; border-bottom: 1px solid #2A2A28; }
.cap-card .cap-head .tag { font-size: 9px; color: oklch(72% 0.14 155); letter-spacing: 0.08em; }
.cap-card .cap-row { display: grid; grid-template-columns: 70px 1fr; gap: 8px; font-size: 11px; }
.cap-card .cap-row .k { color: #8B8B85; font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; padding-top: 1px; }
.cap-card .cap-row .v { color: #E8E6E1; }
.cap-card .cap-row .v b { color: oklch(72% 0.14 155); font-weight: 500; }
.cap-card .cap-row .v .ck { color: oklch(75% 0.13 155); font-size: 10px; }
.cap-card .cap-sched { display:flex; gap: 4px; margin-top: 4px; }
.cap-card .cap-sched span { flex: 1; text-align: center; font-size: 9px; padding: 3px 0; background: #141413; border: 1px solid #2A2A28; color: #8B8B85; border-radius: 2px; }
.cap-card .cap-sched span.on { background: color-mix(in srgb, var(--accent) 30%, #141413); border-color: var(--accent); color: oklch(85% 0.12 155); }

.cap-arrow {
  display: grid; place-items: center;
  color: var(--accent); font-size: 32px;
  position: relative;
}
.cap-arrow::before { content: "abstracts into"; position: absolute; top: calc(50% - 30px); font-family: var(--font-mono); font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; white-space: nowrap; }

.cap-agent-demo {
  margin-top: var(--s-4);
  display:grid; grid-template-columns: 1fr 1fr; gap: var(--s-4);
}
.agent-attempt { padding: 14px; background: var(--bg); border: 1px solid var(--hairline); border-radius: 4px; font-family: var(--font-mono); font-size: 11px; line-height: 1.7; }
.agent-attempt.bad { background: #FFF8F5; }
.agent-attempt.good { background: color-mix(in srgb, var(--accent) 4%, var(--bg)); }
.agent-attempt h5 { font-family: var(--font-display); font-size: 12px; margin-bottom: 8px; color: var(--fg); display: flex; gap: 8px; align-items: center; }
.agent-attempt h5 .r { width: 14px; height: 14px; border-radius: 50%; display:grid; place-items: center; font-size: 9px; color: #FAFAF9; }
.agent-attempt.bad h5 .r { background: oklch(55% 0.14 25); }
.agent-attempt.good h5 .r { background: var(--accent); }
.agent-attempt .l { display: block; opacity: 0; transform: translateX(-4px); transition: all 300ms; }
.agent-attempt .l.show { opacity: 1; transform: translateX(0); }
.agent-attempt .l .err { color: oklch(55% 0.14 25); }
.agent-attempt .l .ok { color: oklch(48% 0.14 155); }
.agent-attempt .l .m { color: var(--muted); }

/* ============ Section: Integration — no-code first ============ */
.noco-intro {
  margin-top: var(--s-5); padding: var(--s-4); background: var(--bg); border: 1px solid var(--hairline); border-radius: 4px;
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--s-4);
}
.noco-card { display: flex; flex-direction: column; gap: 8px; padding: var(--s-3); border: 1px solid var(--hairline); border-radius: 3px; background: var(--bg-2); }
.noco-card .ico { width: 38px; height: 38px; border: 1px solid var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--bg)); color: var(--accent); display:grid; place-items: center; font-family: var(--font-mono); font-size: 10px; border-radius: 3px; letter-spacing: 0.05em; font-weight: 600; }
.noco-card h4 { font-family: var(--font-display); font-weight: 600; font-size: 14px; }
.noco-card p { color: var(--muted); font-size: 12px; line-height: 1.45; }

.noco-tabs {
  display:flex; gap: 2px; margin-top: var(--s-5); margin-bottom: 0;
  border-bottom: 1px solid var(--hairline);
  align-items: flex-end;
  flex-wrap: wrap;
}
.noco-label { font-family: var(--font-mono); font-size: 10px; color: var(--muted); margin-right: var(--s-3); padding: 10px 0; letter-spacing: 0.08em; text-transform: uppercase; }
.noco-tab {
  font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--muted);
  padding: 10px 14px; border: 1px solid transparent; border-bottom: 0;
  background: transparent; cursor: pointer; position: relative; top: 1px;
  transition: all 150ms;
  display: inline-flex; align-items: center; gap: 8px;
}
.noco-tab:hover { color: var(--fg); background: var(--bg-2); }
.noco-tab.active { color: var(--fg); border-color: var(--hairline); background: var(--bg); border-bottom-color: var(--bg); }
.noco-tab.active::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--accent); }
.noco-tab .mk { font-family: var(--font-body); font-size: 9px; color: #FAFAF9; background: var(--accent); padding: 2px 6px; border-radius: 8px; letter-spacing: 0; text-transform: none; }
.noco-tab.advanced { margin-left: auto; color: var(--muted-2); }
.noco-tab.advanced .mk { background: transparent; color: var(--muted); border: 1px solid var(--hairline); }

.noco-body { display:none; grid-template-columns: 1.05fr 1fr; gap: var(--s-5); align-items: stretch; margin-top: var(--s-4); }
.noco-body.active { display: grid; animation: fadeUp 400ms ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Settings UI mock */
.settings-mock {
  background: var(--bg); border: 1px solid var(--hairline); border-radius: 6px; overflow: hidden;
  display:flex; flex-direction: column;
  box-shadow: 0 24px 48px -24px rgba(0,0,0,.14);
}
.sm-head { padding: 10px 14px; border-bottom: 1px solid var(--hairline); display:flex; justify-content: space-between; align-items: center; background: var(--bg-2); }
.sm-head .crumbs { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.sm-head .crumbs b { color: var(--fg); font-weight: 500; }
.sm-body { padding: var(--s-4); display:flex; flex-direction: column; gap: var(--s-3); }
.sm-row { display:grid; grid-template-columns: 1fr auto; gap: var(--s-3); align-items: center; padding: var(--s-3); border: 1px solid var(--hairline); border-radius: 4px; background: var(--bg); }
.sm-row.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 4%, var(--bg)); }
.sm-row .label { font-family: var(--font-display); font-weight: 500; font-size: 13px; }
.sm-row .sub { color: var(--muted); font-size: 11px; margin-top: 2px; font-family: var(--font-mono); }
.sm-toggle { width: 44px; height: 24px; background: var(--bg-3); border-radius: 12px; position: relative; cursor: pointer; border: 0; padding: 0; }
.sm-toggle::before { content:""; position: absolute; left: 2px; top: 2px; width: 20px; height: 20px; border-radius: 50%; background: #FAFAF9; transition: transform 250ms cubic-bezier(.4,0,.2,1); box-shadow: 0 2px 4px rgba(0,0,0,.2); }
.sm-toggle.on { background: var(--accent); }
.sm-toggle.on::before { transform: translateX(20px); }
.sm-input { display: block; padding: 8px 10px; background: var(--bg-2); border: 1px solid var(--hairline); border-radius: 3px; font-family: var(--font-mono); font-size: 11px; width: 100%; box-sizing: border-box; color: var(--fg); }
.sm-input[disabled] { cursor: default; }
.sm-select { display:flex; gap: 4px; flex-wrap: wrap; }
.sm-select .pill { padding: 4px 10px; border: 1px solid var(--hairline); border-radius: 12px; font-family: var(--font-mono); font-size: 10px; color: var(--muted); cursor: pointer; background: var(--bg); }
.sm-select .pill.on { background: var(--fg); color: #FAFAF9; border-color: var(--fg); }
.sm-status { padding: 10px 14px; background: var(--bg-2); border-top: 1px solid var(--hairline); font-family: var(--font-mono); font-size: 10px; color: var(--muted); display:flex; justify-content: space-between; align-items: center; }
.sm-status .ok { color: var(--accent); }

/* Config file view */
.cfg-panel {
  background: #0A0A09; color: #E8E6E1; border-radius: 6px; overflow: hidden;
  border: 1px solid #262624; display:flex; flex-direction: column;
  font-family: var(--font-mono); font-size: 12px; line-height: 1.7;
}
.cfg-head { display:flex; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid #262624; color: #8B8B85; font-size: 11px; }
.cfg-head .copy { color: oklch(72% 0.14 155); cursor: pointer; background: none; border: 0; font-family: inherit; font-size: inherit; padding: 0; }
.cfg-body { padding: 14px 16px; white-space: pre; overflow-x: auto; margin: 0; flex: 1; }
.cfg-body .k { color: oklch(75% 0.12 270); }
.cfg-body .s { color: oklch(75% 0.13 155); }
.cfg-body .n { color: oklch(75% 0.12 80); }
.cfg-body .c { color: #6A6A65; font-style: italic; }
.cfg-body .p { color: oklch(78% 0.1 200); }
.cfg-body .add { background: color-mix(in srgb, oklch(62% 0.14 155) 16%, transparent); display: block; margin: 0 -16px; padding: 0 16px; border-left: 2px solid var(--accent); }

/* ============ Section: Commerce cycle (kept) ============ */
.flow1 { position: relative; margin-top: var(--s-5); }
.flow1-stages { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; position: relative; z-index: 2; }
.stage { position: relative; padding: var(--s-5) var(--s-4); border: 1px solid var(--hairline); background: var(--bg); min-height: 320px; display: flex; flex-direction: column; transition: all 400ms; }
.flow-section.dark .stage { background: #141413; border-color: #262624; }
.stage + .stage { border-left: 0; }
.stage.active { border-color: var(--accent); z-index: 3; transform: translateY(-6px); box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--accent) 70%, transparent); }
.flow-section.dark .stage.active { background: #1C1C1A; }
.stage .step-num { font-family: "Fraunces", serif; font-size: 52px; line-height: 1; color: var(--hairline-strong); font-weight: 500; margin-bottom: var(--s-2); }
.stage.active .step-num { color: var(--accent); }
.stage h3 { margin-bottom: var(--s-2); font-size: var(--fs-lg); }
.stage .sub { font-size: var(--fs-sm); color: var(--muted); margin-bottom: var(--s-3); line-height: 1.5; }
.flow-section.dark .stage .sub { color: #8B8B85; }
.stage .viz { flex: 1; font-family: var(--font-mono); font-size: 10px; display: flex; flex-direction: column; }

.radar { position: relative; width: 100%; aspect-ratio: 1/1; max-width: 180px; margin: 0 auto; }
.radar svg { width: 100%; height: 100%; }
.radar .sweep { stroke: var(--accent); stroke-width: 1.5; fill: url(#sweep-grad); transform-origin: 50% 50%; animation: sweep 3s linear infinite; }
@keyframes sweep { to { transform: rotate(360deg); } }
.radar .blip { fill: var(--accent); transform-origin: center; animation: blip 2s ease-in-out infinite; }
@keyframes blip { 0%, 80% { r: 3; opacity: 1; } 100% { r: 10; opacity: 0; } }

.neg-bars { display: flex; flex-direction: column; gap: 8px; padding: 10px 0; }
.neg-bar { display:grid; grid-template-columns: 50px 1fr 48px; align-items: center; gap: 6px; font-size: 10px; }
.neg-bar .track { height: 12px; background: var(--bg-3); position: relative; overflow: hidden; border-radius: 2px; }
.flow-section.dark .neg-bar .track { background: #262624; }
.neg-bar .fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); transition: width 600ms cubic-bezier(.4,0,.2,1); }
.neg-bar .fill.bid { background: oklch(62% 0.12 220); }
.neg-bar .fill.ask { background: oklch(62% 0.14 25); }
.neg-bar .val { font-variant-numeric: tabular-nums; text-align: right; color: var(--fg-2); }
.flow-section.dark .neg-bar .val { color: #D9D8D3; }
.neg-handshake { margin-top: 8px; padding: 8px; background: color-mix(in srgb, var(--accent) 10%, transparent); border: 1px dashed var(--accent); text-align: center; font-size: 10px; color: var(--accent); opacity: 0; transition: opacity 400ms; }
.stage.active[data-stage="1"] .neg-handshake { opacity: 1; }

.anchor-chain { display:flex; flex-direction: column; gap: 4px; padding: 4px 0; }
.anchor-link { border: 1px solid var(--hairline); padding: 6px 8px; font-family: var(--font-mono); font-size: 10px; display:flex; justify-content: space-between; align-items: center; background: var(--bg); transition: all 400ms; }
.flow-section.dark .anchor-link { background: #141413; border-color: #262624; color: #D9D8D3; }
.anchor-link.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--bg)); }
.flow-section.dark .anchor-link.active { background: color-mix(in srgb, var(--accent) 20%, #141413); }
.anchor-link .n { color: var(--muted); }
.anchor-link .h { color: var(--accent); }
.anchor-link.active .h { font-weight: 600; }

.rep-dials { display:flex; flex-direction: column; gap: 10px; padding: 4px 0; }
.rep-dial { display: grid; grid-template-columns: 1fr auto; gap: 4px; align-items: center; }
.rep-dial .name { font-size: 9px; color: var(--muted); }
.flow-section.dark .rep-dial .name { color: #8B8B85; }
.rep-dial .val { font-family: var(--font-mono); font-size: 11px; font-variant-numeric: tabular-nums; color: var(--fg); }
.flow-section.dark .rep-dial .val { color: #F2F1EE; }
.rep-dial svg { grid-column: 1 / -1; width: 100%; height: 24px; }
.rep-dial .delta { font-size: 9px; color: var(--accent); margin-left: 4px; }
.rep-dial .delta.down { color: oklch(62% 0.15 25); }

.flow-ticker {
  margin-top: var(--s-4); background: #0A0A09; color: #D9D8D3;
  padding: 10px 14px; font-family: var(--font-mono); font-size: 11px;
  border: 1px solid #2A2A28; border-radius: 4px;
  display: flex; justify-content: space-between; align-items: center;
}
.flow-ticker .evid { color: oklch(72% 0.14 155); }
.flow-ticker .progress { display: flex; gap: 6px; align-items: center; }
.flow-ticker .pdot { width: 8px; height: 8px; border-radius: 50%; background: #2A2A28; }
.flow-ticker .pdot.on { background: oklch(72% 0.14 155); }

/* ============ MCP + tool call ============ */
.split-calls { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); margin-top: var(--s-5); }
.call-card { border: 1px solid var(--hairline); background: var(--bg); border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; }
.call-head { padding: 12px 16px; border-bottom: 1px solid var(--hairline); display: flex; justify-content: space-between; align-items: center; }
.call-head h4 { font-family: var(--font-display); font-size: var(--fs-md); margin: 0; }
.call-head .tag { font-family: var(--font-mono); font-size: 10px; color: var(--accent); padding: 2px 8px; border: 1px solid var(--accent); border-radius: 3px; }
.call-flow { padding: 16px; display: flex; flex-direction: column; gap: 10px; font-family: var(--font-mono); font-size: 11px; min-height: 360px; }
.call-step { display: grid; grid-template-columns: 44px 1fr; gap: 10px; align-items: start; opacity: 0; transform: translateX(-6px); transition: all 400ms; }
.call-step.show { opacity: 1; transform: translateX(0); }
.call-step .tag { font-size: 9px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); padding-top: 6px; }
.call-step .body { padding: 10px 12px; border-radius: 4px; background: var(--bg-2); border: 1px solid var(--hairline); line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.call-step.req .body { border-left: 3px solid oklch(62% 0.12 220); }
.call-step.tp .body { border-left: 3px solid var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--bg)); }
.call-step.res .body { border-left: 3px solid oklch(55% 0.02 150); background: #0A0A09; color: #E8E6E1; border-color: #262624; }
.call-step.sig .body { border-left: 3px solid oklch(62% 0.14 80); font-size: 10px; }
.call-step .k { color: oklch(55% 0.14 270); }
.call-step .s { color: oklch(48% 0.12 155); }
.call-step .n { color: oklch(55% 0.14 25); }
.call-step.res .body .k { color: oklch(75% 0.12 270); }
.call-step.res .body .s { color: oklch(75% 0.13 155); }
.call-step.res .body .n { color: oklch(75% 0.14 80); }
.call-controls { padding: 10px 16px; border-top: 1px solid var(--hairline); display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: 10px; color: var(--muted); background: var(--bg-2); }
.call-controls button { font-family: inherit; font-size: inherit; padding: 4px 10px; border: 1px solid var(--hairline-strong); background: var(--bg); color: var(--fg); cursor: pointer; border-radius: 3px; }
.call-controls button:hover { border-color: var(--accent); color: var(--accent); }

/* ============ CTA ============ */
.cta-final { position: relative; padding: var(--s-8) 0; margin-top: var(--s-7); background: #0A0A09; color: #F2F1EE; overflow: hidden; }
.cta-final::before { content:""; position: absolute; inset: 0; background: radial-gradient(900px 400px at 20% 50%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 65%); }
.cta-final::after { content:""; position: absolute; inset: 0; background-image: radial-gradient(circle, #1C1C1A 1px, transparent 1px); background-size: 28px 28px; opacity: 0.4; mask-image: radial-gradient(ellipse at 80% 50%, #000 30%, transparent 65%); }
.cta-final .wrap { position: relative; z-index: 1; }
.cta-final h2 { font-size: clamp(2rem, 4vw, 3.2rem); color: #F2F1EE; margin-bottom: var(--s-4); letter-spacing: -0.03em; line-height: 1.05; }
.cta-final p { color: color-mix(in srgb, #F2F1EE 75%, transparent); font-size: var(--fs-lg); max-width: 620px; margin-bottom: var(--s-5); }

.marquee { overflow: hidden; position: relative; padding: 18px 0; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.marquee-track { display:flex; gap: 48px; animation: marq 42s linear infinite; width: max-content; font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--muted-2); }
@keyframes marq { to { transform: translateX(-50%); } }
.marquee::before, .marquee::after { content:""; position: absolute; top: 0; bottom: 0; width: 80px; z-index: 2; pointer-events: none; }
.marquee::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.marquee::after { right: 0; background: linear-gradient(270deg, var(--bg), transparent); }

@keyframes blink { 50% { opacity: 0; } }

/* Responsive */
@media (max-width: 1100px) {
  .disc-wrap { grid-template-columns: 1fr; }
  .disc-col + .disc-col { border-left: 0; border-top: 1px solid var(--hairline); }
  .cap-wrap { grid-template-columns: 1fr; }
  .cap-arrow { transform: rotate(90deg); justify-self: center; height: 40px; }
  .cap-arrow::before { top: -16px; }
  .noco-body.active { grid-template-columns: 1fr; }
  .noco-intro { grid-template-columns: 1fr; }
  .cap-agent-demo { grid-template-columns: 1fr; }
  .vs-grid { grid-template-columns: 1fr; }
  .vs-col + .vs-col { border-left: 0; border-top: 1px solid var(--hairline); }
  .split-calls { grid-template-columns: 1fr; }
  .flow1-stages { grid-template-columns: 1fr 1fr; }
  .stage + .stage { border-left: 1px solid var(--hairline); }
}
@media (max-width: 640px) {
  .flow1-stages { grid-template-columns: 1fr; }
  .hero-meta { flex-direction: column; gap: 8px; }
  .mega { aspect-ratio: 4 / 5; }
}

/* ============ Split-hero animation (chaos vs TrueCom) ============ */
.split-hero {
  position: relative;
  margin: 0 auto;
  max-width: 1480px;
  border: 1px solid var(--hairline);
  background: var(--bg);
  border-radius: 6px;
  overflow: hidden;
}
.split-header {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  border-bottom: 1px solid var(--hairline);
  background: var(--bg-2);
}
.split-header .sh-col {
  padding: 14px 22px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.split-header .sh-divider {
  background: var(--hairline);
}
.split-header .sh-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
}
.split-header .sh-label.on { color: oklch(55% 0.18 155); }
.split-header .sh-title {
  font-family: var(--font-tight, 'Inter Tight', sans-serif);
  font-size: 15px;
  font-weight: 600;
  color: #0A0A09;
}
.split-header .sh-col.chaos .sh-title { color: #8B3B3B; }

.split-svg-host {
  position: relative;
  width: 100%;
  aspect-ratio: 1600 / 760;
  background: var(--bg);
}
.split-svg-host svg { width: 100%; height: 100%; display: block; }

.split-footer {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  border-top: 1px solid var(--hairline);
  background: var(--bg-2);
}
.split-footer::before,
.split-footer::after { content: ''; }
.split-footer .sf-col {
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.split-footer .sf-col.order { grid-column: 3; }
.split-footer .sf-stat { display: flex; flex-direction: column; gap: 2px; min-width: 72px; }
.split-footer .sf-stat .v {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  color: #0A0A09;
}
.split-footer .sf-stat .v.burn { color: #B84343; }
.split-footer .sf-stat .l {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.split-footer .sf-verdict {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 11px;
  text-align: right;
  padding-left: 12px;
}
.split-footer .sf-verdict.bad { color: #B84343; }
.split-footer .sf-verdict.good { color: oklch(55% 0.18 155); }

@media (max-width: 900px) {
  .split-header { grid-template-columns: 1fr; }
  .split-header .sh-divider { display: none; }
  .split-header .sh-col + .sh-col { border-top: 1px solid var(--hairline); }
  .split-footer { grid-template-columns: 1fr; }
  .split-footer .sf-col.order { grid-column: 1; }
  .split-footer .sf-col + .sf-col { border-top: 1px solid var(--hairline); }
  .split-svg-host { aspect-ratio: 4 / 5; }
}
