:root {
  --bg: #fafaf8;
  --paper: #ffffff;
  --ink: #1c2b33;
  --heading: #273f5b;
  --ink-2: #3f4b55;
  --muted: #66727c;
  --faint: #9aa4ad;
  --rule: #e6e8e8;
  --rule-2: #f0f1f1;
  --hover: #f4f6f7;
  --rule-strong: #c8ced2;
  --rule-head: #d9dddf;
  --hl-row: #fdf3f2;
  --tldr-bg: #edf2f8;
  --tldr-line: #e1e9f2;
  --sel-bg: #d9e8f1;

    --specialist: #26678f;  --specialist-soft: #edf4f9;  --specialist-panel: #f7fafd;  --specialist-line: #c6d9e6;
  --harness: #a3652b;     --harness-soft: #faf2e6;     --harness-panel: #fcf9f5;     --harness-line: #ead5bd;
  --agent: #08786d;       --agent-soft: #ebf5f1;       --agent-panel: #f7faf7;       --agent-line: #bfdcd3;
  --selection: #77529b;   --selection-soft: #f0e8f2;   --selection-panel: #faf5f8;   --selection-line: #dccbe6;
  --reject: #a45353;      --reject-soft: #fff8f7;
  --title-accent: #0064e0;

    --m-hace: #c44748;
  --m-metaharness: #bb9347;
  --m-openevolve: #8b71ae;
  --m-restem: #3d6280;
  --m-ttt: #258e8c;
  --m-dgm: #8994a3;
  --m-base: #a7afba;
  --m-base-label: #6a7582;

    --d-rec: #32628c;   --d-rec-soft: #eff4f9;
  --d-prot: #197c72;  --d-prot-soft: #edf6f3;
  --d-mat: #ad653c;   --d-mat-soft: #faf3ee;
  --dot: #b2bbc3;

    --grid: #e6e9ed;
  --spine: #57606b;
  --tick: #495360;
  --axis-label: #343c48;
  --fig-title: #202733;
  --fig-sub: #627080;

  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --serif: "Charter", "Bitstream Charter", "Sitka Text", "Iowan Old Style", Cambria, Georgia, serif;
  --mono: "SF Mono", "JetBrains Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace;
  --measure: 1000px;
  --wide: 1000px;
  --radius: 14px;
  --gutter: 32px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 19px/1.72 var(--serif);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
::selection { background: var(--sel-bg); }
a { color: var(--specialist); text-decoration: none; border-bottom: 1px solid var(--specialist-line); }
a:hover { border-bottom-color: var(--specialist); }
sub, sup { line-height: 0; }
[id] { scroll-margin-top: 24px; }
img { max-width: 100%; }

.col { max-width: var(--measure); margin: 0 auto; padding: 0 24px; }
.wide { max-width: var(--wide); margin: 0 auto; padding: 0 24px; }
section { padding: 34px 0 48px; }
section + section { border-top: 1px solid var(--rule-2); }
.nowrap { white-space: nowrap; }
.muted { color: var(--muted); }

h1, h2, h3 { font-family: var(--sans); color: var(--ink); }
h2 { font-size: 31px; line-height: 1.18; letter-spacing: -.018em; font-weight: 700; margin: 10px 0 18px; text-wrap: balance; }
p { text-wrap: pretty; }
.eyebrow { font: 650 11.5px/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 6px 0 4px; }
h3 { font-size: 20px; line-height: 1.3; letter-spacing: -.008em; font-weight: 650; margin: 30px 0 8px; }
p { margin: 0 0 1.05em; }
p.insight {
  font-size: 21px; line-height: 1.5; color: var(--ink); margin: 1.4em 0;
  padding: 2px 0 2px 20px; border-left: 3px solid var(--agent);
}

header.hero { padding: 84px 0 30px; text-align: center; }
.hero .logo { display: block; width: 84px; height: auto; margin: 0 auto 18px; }
h1 { font: 700 52px/1.05 var(--sans); letter-spacing: -.028em; margin: 0 0 14px; color: var(--heading); }
h1 .acc { color: var(--title-accent); }
.subtitle { font: 400 22px/1.38 var(--sans); color: var(--ink-2); margin: 0 auto 30px; max-width: 760px; letter-spacing: -.005em; }
.authors { font: 15.5px/1.85 var(--sans); color: var(--ink); max-width: 900px; margin: 0 auto; }
.authors span { margin: 0 7px; }
.authors sup { font-size: 11.5px; color: var(--muted); margin-left: 1px; }
.affil { font: 14px/1.7 var(--sans); color: var(--muted); margin: 8px auto 26px; }
.affil span { margin: 0 9px; }
.affil sup { font-size: 11.5px; margin-right: 2px; }
.links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 0 0 34px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 17px 9px 14px;
  font: 600 14.5px/1 var(--sans); color: var(--ink); background: var(--paper);
  border: 1px solid var(--rule); border-radius: 999px; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.btn:hover { border-color: var(--rule-strong); box-shadow: 0 2px 10px rgba(28, 43, 51, .07); transform: translateY(-1px); }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.tldr {
  text-align: left; max-width: 800px; margin: 0 auto; padding: 18px 20px;
  background: var(--tldr-bg); border: 1px solid var(--tldr-line); border-radius: var(--radius);
  font-size: 17px; line-height: 1.66; color: var(--ink-2);
}
.tldr .k { font: 700 12.5px/1 var(--sans); letter-spacing: .08em; color: var(--agent); margin-right: 8px; }

figure { margin: 28px 0; }
section > .wide:last-child > figure:last-child, section > .col:last-child > figure:last-child, section > figure:last-child { margin-bottom: 20px; }
figure.card { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 22px 22px 16px; }
figcaption { font: 14.5px/1.55 var(--sans); color: var(--muted); margin-top: 12px; max-width: none; }
figure sub, figure sup { font-size: max(11.5px, .83em); }
figcaption b, figcaption strong { color: var(--ink-2); font-weight: 600; }
.viz { position: relative; width: 100%; }
.viz svg { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--sans); }
.viz text { font-family: var(--sans); }
.fig-row { display: grid; gap: var(--gutter); grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { .fig-row { grid-template-columns: 1fr; } }

figure.loop .viz { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.swipe-hint { display: none; text-align: center; font-size: 13px; }
@media (max-width: 999px) { figure.loop .viz > svg { min-width: 906px; } .swipe-hint { display: block; } }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

.hc-axis line, .hc-axis path { stroke: var(--spine); stroke-width: 1; shape-rendering: crispEdges; }
.hc-axis text { fill: var(--tick); font-size: 12px; }
.hc-grid line { stroke: var(--grid); stroke-width: 1; shape-rendering: crispEdges; }
.hc-label, .hc-axis .hc-label { fill: var(--axis-label); font-size: 12.5px; font-weight: 600; }
.hc-title { fill: var(--fig-title); font-size: 14.5px; font-weight: 700; }
.hc-sub { fill: var(--fig-sub); font-size: 12.5px; }
.hc-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; margin: 4px 0 2px; font: 13px/1.4 var(--sans); color: var(--ink-2); }
.hc-legend > button, .hc-legend > span {
  display: inline-flex; align-items: center; gap: 7px; min-height: 28px; padding: 0 9px; border-radius: 999px;
  border: 1px solid transparent; background: none; font: inherit; color: inherit;
}
.hc-legend button { cursor: pointer; transition: background .15s; }
.hc-legend button:hover { background: var(--hover); }
.hc-legend button:focus-visible { outline: 2px solid var(--ink-2); outline-offset: 2px; }
.hc-legend button[aria-pressed="false"] { color: var(--muted); }
.hc-legend button[aria-pressed="false"] > span:last-child { text-decoration: line-through; }
.hc-legend button[aria-pressed="false"] .sw, .hc-legend button[aria-pressed="false"] .dot { background: transparent !important; box-shadow: inset 0 0 0 1.5px currentColor; }
.hc-legend .sw { width: 16px; height: 3px; border-radius: 2px; display: inline-block; flex: none; }
.hc-legend .sw.hace { height: 3.5px; }
.hc-legend .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.hc-legend .dot.hace { width: 12px; height: 12px; }
.hc-legend .base { width: 16px; height: 0; border-top: 1.5px dashed currentColor; display: inline-block; flex: none; }
.hc-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; min-height: 43px; padding: 0 0 10px; margin: 0 0 16px; border-bottom: 1px solid var(--rule); }
.hc-top > .hc-legend, .hc-top .hc-legend { margin: 0; justify-content: flex-start; }
.hc-top > .hc-btn:last-child, .hc-top > .hc-push { margin-left: auto; }
.hc-top > .hc-legend:first-child { margin-left: -9px; }
@media (max-width: 720px) { .hc-top > .hc-btn:last-child { align-self: flex-start; } }
.hc-tip {
  position: absolute; pointer-events: none; z-index: 5; min-width: 120px; max-width: 280px;
  padding: 8px 11px; background: rgba(255,255,255,.97); border: 1px solid var(--rule); border-radius: 9px;
  box-shadow: 0 6px 22px rgba(28,43,51,.10); font: 12.5px/1.45 var(--sans); color: var(--ink-2);
  opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s;
}
.hc-tip.on { opacity: 1; transform: none; }
.hc-tip b { color: var(--ink); }
.hc-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.hc-tabs button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 32px; padding: 0 14px;
  font: 600 13px/1 var(--sans); border-radius: 999px; cursor: pointer;
  border: 1px solid var(--rule); background: var(--paper); color: var(--ink-2); transition: border-color .15s, background .15s;
}
.hc-tabs button:hover { border-color: var(--rule-strong); }
.hc-tabs button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.hc-tabs button:focus-visible { outline: 2px solid var(--ink-2); outline-offset: 2px; }
.hc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; padding: 0 13px;
  font: 600 13px/1 var(--sans); border-radius: 999px; cursor: pointer; flex: none; align-self: center;
  border: 1px solid var(--rule); background: var(--paper); color: var(--ink-2); transition: border-color .15s, background .15s;
}
.hc-btn svg { width: 13px; height: 13px; flex: none; margin: 0; }
.hc-btn:hover { border-color: var(--rule-strong); }
.hc-btn:focus-visible { outline: 2px solid var(--ink-2); outline-offset: 2px; }
.hc-seg { display: inline-flex; align-items: center; padding: 2px; border: 1px solid var(--rule); border-radius: 999px; background: var(--paper); flex: none; }
.hc-seg button {
  display: inline-flex; align-items: center; justify-content: center; border: 0; background: none; border-radius: 999px;
  min-height: 26px; padding: 0 12px; font: 600 12.5px/1 var(--sans); color: var(--ink-2); cursor: pointer; transition: background .15s, color .15s;
}
.hc-seg button:hover { background: var(--hover); }
.hc-seg button[aria-pressed="true"] { background: var(--c, var(--ink)); color: var(--paper); }
.hc-seg button:focus-visible { outline: 2px solid var(--c, var(--ink-2)); outline-offset: 1px; }
.hc-seg-k { font: 650 12px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--fig-sub); }
@media (pointer: coarse) {
  .hc-legend > button, .hc-legend > span, .hc-seg button, .hc-tabs button, .hc-btn { min-height: 34px; }
}

ol.steps { list-style: none; padding: 0; margin: 8px 0 22px; counter-reset: step; display: grid; gap: 12px; }
ol.steps li { counter-increment: step; position: relative; padding: 14px 18px 12px 58px; background: var(--paper); border: 1px solid var(--rule); border-radius: 12px; }
ol.steps li::before {
  content: counter(step); position: absolute; left: 16px; top: 15px; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; font: 700 14px/1 var(--sans); color: #fff; background: var(--c);
}
ol.steps h3 { margin: 2px 0 4px; font-size: 17px; color: var(--c); }
ol.steps p { margin: 0; font-size: 16.5px; line-height: 1.62; color: var(--ink-2); }
.step-harness { --c: var(--harness); }
.step-specialist { --c: var(--specialist); }
.step-selection { --c: var(--selection); }
.step-agent { --c: var(--agent); }


table.hc-table { width: 100%; border-collapse: collapse; font: 13px/1.45 var(--sans); color: var(--ink-2); }
table.hc-table th { text-align: left; font-weight: 650; color: var(--ink); border-bottom: 1.5px solid var(--rule-head); padding: 7px 10px; white-space: nowrap; }
table.hc-table td { border-bottom: 1px solid var(--rule-2); padding: 6px 10px; font-variant-numeric: tabular-nums; }
table.hc-table tr.hl td { color: var(--ink); font-weight: 650; background: var(--hl-row); }
table.hc-table tr > :first-child { padding-left: 0; }
table.hc-table tr > :last-child { padding-right: 0; }
table.hc-table td.num, table.hc-table th.num { text-align: right; }
.table-wrap { overflow-x: auto; }

.bib { position: relative; }
.bib pre {
  margin: 0; padding: 18px 20px; background: var(--paper); border: 1px solid var(--rule); border-radius: 12px;
  font: 13.5px/1.6 var(--mono); color: var(--ink-2); overflow-x: auto;
}
.bib .copy { position: absolute; top: 10px; right: 10px; }
.bib .copy { min-height: 32px; font: 600 12.5px/1 var(--sans); padding: 7px 12px; border-radius: 999px; border: 1px solid var(--rule); background: var(--paper); cursor: pointer; color: var(--ink-2); }

footer { padding: 30px 0 60px; border-top: 1px solid var(--rule-2); font: 14px/1.6 var(--sans); color: var(--ink-2); text-align: center; }

@media (max-width: 720px) {
  body { font-size: 17.5px; }
  header.hero { padding: 56px 0 24px; }
  h1 { font-size: 36px; }
  .subtitle { font-size: 18.5px; }
  h2 { font-size: 25px; }
  figure.card { padding: 16px 12px 12px; border-radius: 12px; }
  .tldr { padding: 18px 16px; border-radius: 12px; }
  .col, .wide { padding: 0 16px; }
  ol.steps li { padding-left: 52px; }
}

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 800px; margin: 14px auto 0; text-align: left; }
.stat { background: var(--paper); border: 1px solid var(--rule); border-radius: 12px; padding: 14px 20px 12px; font: 13.5px/1.45 var(--sans); color: var(--ink-2); }
.stat b { display: block; font: 700 26px/1.1 var(--sans); letter-spacing: -.02em; color: var(--m-hace); margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.stat b small { font-size: 15px; font-weight: 600; color: var(--m-base-label); letter-spacing: 0; }



body.solo { min-height: 100vh; display: flex; align-items: center; }
body.solo main { width: 100%; }
body.solo section { border: 0; padding: 40px 0; }
body.solo h2 { font-size: 46px; }
body.solo .wide { max-width: 1600px; }

@media (max-width: 720px) {
  .stats { grid-template-columns: 1fr; }
  .stat { padding: 14px 16px 12px; }
  .bib pre { padding: 48px 14px 14px; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
}
