/* Layout: one 760px reading column (Distill-style), a tinted title band, figures inside the column.
   Colour: white page with a champagne bronze accent. In data charts, blue is the agent-built MCP and orange is computer use, matching the run videos. */
:root {
  --bg: #ffffff;            /* white page */
  --card: #ffffff;
  --fg: #1d1d1f;
  --fg-2: #6e6e73;
  --band-a: #ffffff;
  --band-b: #ffffff;
  --band: #f5f5f7;
  --panel: #f5f5f7;
  --line: #d2d2d7;
  --rule: rgba(0, 0, 0, 0.1);
  --code-bg: #f5f5f7;
  --accent: #a8874a;        /* champagne bronze: page accent, diagrams, the agent */
  --accent-ink: #7a5f2c;    /* small accent text */
  --accent-soft: #f6efe2;
  --on-accent: #ffffff;
  --mcp: #3b76d9;           /* data colour for MCP-server runs: blue, as in the run videos */
  --gui: #e8710a;           /* data colour for computer-use runs: orange, as in the run videos */
  --gui-ink: #b4500a;
  --gui-soft: #fbe3cf;
  --mem: #8e8e93;           /* memory-only runs (hatched) */
  --mem-soft: #e5e5ea;
  --ok: #2e8b57;
  --bad: #bf3a32;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 12px 32px rgba(0, 0, 0, 0.08);
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Helvetica, Arial, sans-serif;
  --mono: 'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f0f10; --card: #1c1c1e; --fg: #f5f5f7; --fg-2: #a1a1a6; --band-a: #0f0f10; --band-b: #0f0f10; --band: #1c1c1e; --panel: #1c1c1e;
    --line: #48484a; --rule: rgba(255, 255, 255, 0.14); --code-bg: #2c2c2e;
    --accent: #d2b077; --accent-ink: #e0c391; --accent-soft: #33291a; --on-accent: #1d1d1f;
    --mcp: #6fa3f2; --gui: #f59545; --gui-ink: #f7ac6b; --gui-soft: #3a2413; --mem: #8e8e93; --mem-soft: #2c2c2e;
    --ok: #5cc48d; --bad: #ec6a60; --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f0f10; --card: #1c1c1e; --fg: #f5f5f7; --fg-2: #a1a1a6; --band-a: #0f0f10; --band-b: #0f0f10; --band: #1c1c1e; --panel: #1c1c1e;
  --line: #48484a; --rule: rgba(255, 255, 255, 0.14); --code-bg: #2c2c2e;
  --accent: #d2b077; --accent-ink: #e0c391; --accent-soft: #33291a; --on-accent: #1d1d1f;
  --mcp: #6fa3f2; --gui: #f59545; --gui-ink: #f7ac6b; --gui-soft: #3a2413; --mem: #8e8e93; --mem-soft: #2c2c2e;
  --ok: #5cc48d; --bad: #ec6a60; --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
img { max-width: 100%; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}
@media (min-width: 1024px) { body { font-size: 17px; } }

.col {
  max-width: 792px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

a { color: var(--fg); text-decoration: underline 2px; text-underline-offset: 3px; text-decoration-color: var(--accent); }
a:hover { color: var(--accent-ink); }
code, .mono { font-family: var(--mono); }
p code, li code, td code, .card code, figcaption code {
  font-size: 0.84em;
  padding: 1px 5px;
  background: var(--code-bg);
  border-radius: 4px;
  overflow-wrap: anywhere;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Title band ---------- */
.band { background: var(--bg); padding-block: 84px 28px; }
h1 {
  margin: 0;
  font-size: 48px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
h1 .hl { color: var(--accent); background: linear-gradient(100deg, #c9a45c 0%, #8f6f37 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
h1 .nw { white-space: nowrap; }
h1 .sub { display: block; margin-top: 12px; font-size: 0.62em; font-weight: 700; line-height: 1.18; letter-spacing: -0.02em; text-wrap: balance; }

@media (max-width: 600px) { .band { padding-block: 44px 32px; } h1 { font-size: 30px; } h1 .sub { font-size: 0.68em; } }
.byline {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding-block: 20px;
  border-bottom: 1px solid var(--rule);
  font-size: 15px;
  line-height: 1.6;
}
.byline h3 { margin: 0 0 2px; font-size: 13px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; }
.byline p { margin: 0; }

/* ---------- Article text ---------- */
article { padding-block: 26px 80px; }
article > p, article li { max-width: 46em; }
h2 {
  margin: 72px 0 16px;
  font-size: 31px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
@media (max-width: 600px) { h2 { font-size: 25px; margin-top: 56px; } }
h3 { margin: 36px 0 10px; font-size: 21px; font-weight: 600; line-height: 1.25; letter-spacing: -0.015em; text-wrap: balance; }
.exp-head { margin: 46px 0 12px; }
.exp-num { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); font-size: 12.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent-ink); }
.exp-head h3 { margin: 4px 0 0; font-size: 21px; font-weight: 600; line-height: 1.3; }

.tldr {
  margin: 4px 0 24px;
  padding: 20px 24px 22px;
  background: var(--card);
  border: 0;
  border-radius: 20px;
  box-shadow: var(--shadow);
  font-size: 17.5px;
  line-height: 1.6;
}
.tldr > b:first-child { display: block; margin-bottom: 4px; font-size: 12.5px; letter-spacing: 0.09em; text-transform: uppercase; }
.tldr p { margin: 0 0 8px; }
.tldr p:last-child { margin-bottom: 0; }

.findings { margin: 26px 0 8px; padding: 16px 20px 16px; border: 1px solid var(--rule); border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0; background: var(--panel); }
.findings > b:first-child { display: block; margin-bottom: 6px; font-size: 12.5px; letter-spacing: 0.09em; text-transform: uppercase; }
.findings ol { margin: 0; padding-left: 22px; }
.findings li { margin: 7px 0; max-width: none; }
.findings p { margin: 12px 0 0; font-size: 16px; color: var(--fg-2); }
.limits { padding-left: 22px; }
.limits li { margin: 9px 0; }
table.rel td { font-size: 14px; }
table.rel td:first-child { font-weight: 600; }
table.rel tr.ours td { background: var(--accent-soft); }
#fig-video .fig-tools { justify-content: flex-start; }
.cost { margin-top: 0; }

.takeaway {
  margin: 22px 0 26px;
  padding: 14px 18px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 8px 8px 0;
}
.takeaway p { margin: 0; }

figure { margin: 32px 0 40px; }
/* A figure's title states its finding; the caption below explains how to read it. */
.fig-title { margin: 0 0 14px; font-size: 17.5px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; text-wrap: balance; }
figcaption { max-width: 700px; margin: 14px auto 0; font-size: 14.5px; line-height: 1.5; text-align: center; color: var(--fg-2); }
figcaption b { font-weight: 600; color: var(--fg); }

/* ---------- Teaser ---------- */

/* ---------- Figure 1: the pipeline ---------- */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; gap: 2px; background: var(--bg); flex-wrap: wrap; }
.seg button {
  font: inherit; font-size: 14.5px; line-height: 1.2;
  padding: 6px 13px; border: 0; border-radius: 999px; background: transparent; color: var(--fg); cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.fig-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin-bottom: 10px; font-size: 15px; }

.pipe-svg { display: block; width: 100%; height: auto; color: var(--fg-2); font-family: var(--sans); }
.pipe-tall { display: none; max-width: 420px; margin: 0 auto; }
@media (max-width: 620px) { .pipe-wide { display: none; } .pipe-tall { display: block; } }
.pipe-svg text { fill: var(--fg); font-size: 10.8px; }
.pipe-svg .t-h { font-size: 13.5px; font-weight: 600; }
.pipe-svg .t-cap { fill: var(--fg-2); font-size: 12px; }
.pipe-svg .t-mono { font-family: var(--mono); font-size: 10.5px; }
.pipe-svg .t-neg { fill: var(--fg-2); }
.pipe-svg .t-strong { font-weight: 600; fill: var(--accent-ink); }
.pipe-svg .io rect { fill: var(--bg); stroke: var(--line); stroke-width: 1.2; }
.pipe-svg .io line { stroke: var(--rule); }
.pipe-svg .loop { fill: var(--panel); stroke: var(--line); stroke-dasharray: 5 4; }
.pipe-svg .io rect, .pipe-svg .stage rect { fill: var(--card); }
.pipe-svg .stage { cursor: pointer; outline: none; }
.pipe-svg .stage rect { fill: var(--bg); stroke: var(--line); stroke-width: 1.3; transition: fill .15s, stroke .15s; }
.pipe-svg .stage:hover rect { stroke: var(--accent); }
.pipe-svg .stage.is-active rect { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 2.2; }
.pipe-svg .stage:focus-visible rect { stroke: var(--accent); stroke-width: 3; stroke-dasharray: 6 3; }
.pipe-svg .badge { fill: var(--accent); }
.pipe-svg .badge-t { fill: var(--on-accent); font-size: 11.5px; font-weight: 700; }
.pipe-svg .t-st { font-size: 13.5px; font-weight: 600; }
.pipe-svg .t-sub { fill: var(--fg-2); font-size: 10.4px; }
.pipe-svg .flow { stroke: var(--fg-2); stroke-width: 1.4; fill: none; }
.pipe-svg .fb { stroke: var(--accent); stroke-width: 1.5; fill: none; stroke-dasharray: 5 3; }
.pipe-svg .t-fb { fill: var(--accent-ink); font-size: 11px; }
.pipe-svg .mk { fill: var(--fg-2); }
.pipe-svg .mk-acc { fill: var(--accent); }
.pipe-svg .rail rect { fill: var(--bg); stroke: var(--line); }
.pipe-svg .rail text { font-size: 10px; }
.pipe-svg .rail.rea rect { fill: var(--accent-soft); stroke: var(--accent); }
.pipe-svg .tool-link { stroke: var(--line); stroke-width: 1.2; stroke-dasharray: 2 3; }
.pipe-svg .t-tool { fill: var(--accent-ink); font-size: 10.5px; font-weight: 600; }

.stage-detail {
  margin-top: 14px;
  padding: 16px 18px 18px;
  background: var(--card);
  border: 0;
  border-radius: 18px;
  box-shadow: var(--shadow);
  font-size: 15.5px;
  line-height: 1.55;
}
.sd-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 6px; }
.sd-num { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: 13px; font-weight: 700; transform: translateY(3px); }
.sd-title { font-size: 20px; font-weight: 600; }
.sd-when { font-size: 14.5px; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.stage-detail p { margin: 6px 0; }
.stage-detail ul { margin: 6px 0 4px; padding-left: 20px; }
.stage-detail li { margin: 3px 0; }
.sd-label { margin-top: 12px !important; font-size: 13px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; }
.quote {
  margin: 10px 0 0;
  padding: 9px 13px;
  font-size: 15.5px;
  line-height: 1.45;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
}
.quote cite { display: block; margin-top: 4px; font-style: normal; font-size: 13.5px; color: var(--fg-2); }
.quote code { font-size: 0.86em; padding: 0 4px; background: var(--code-bg); border-radius: 3px; overflow-wrap: anywhere; }

/* Contract */
pre {
  margin: 0;
  padding: 12px 14px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.55;
  background: var(--code-bg);
  border-radius: 8px;
}
pre .c { color: var(--fg-2); }
pre .k { color: var(--accent-ink); }
.rules { margin: 14px 0 0; padding-left: 20px; font-size: 16px; }
.rules li { margin: 3px 0; }

/* ---------- Figure A1: timeline ---------- */
.tl { --h: 30px; }
.tl-area { position: relative; margin: 0 6px; }
.tl-marks { position: relative; height: 30px; }
.tl-mark {
  position: absolute; top: 2px; transform: translateX(-50%);
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  font: 600 11.5px/1 var(--sans);
  border: 1.5px solid var(--accent); background: var(--bg); color: var(--fg);
  cursor: pointer; padding: 0;
}
.tl-mark[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.tl-track { position: relative; height: var(--h); border-radius: 4px; overflow: hidden; background: var(--panel); }
.tl-seg { position: absolute; top: 0; bottom: 0; border-right: 1px solid var(--bg); }
.st-1 { background: var(--mem-soft); }
.st-2 { background: var(--accent-soft); }
.st-3 { background: color-mix(in srgb, var(--accent) 55%, var(--bg)); }
.st-4 { background: color-mix(in srgb, var(--ok) 28%, var(--bg)); }
.tl-ticks { position: relative; height: 24px; margin-top: 4px; }
.tl-tick { position: absolute; top: 0; width: 1.5px; height: 10px; background: var(--fg-2); opacity: 0.55; }
.tl-tick.r { height: 16px; background: var(--accent); opacity: 1; }
.tl-tick.b, .tl-tick.s { height: 22px; width: 2.5px; background: var(--ok); opacity: 1; }
.tl-axis { position: relative; height: 20px; font-size: 13px; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.tl-axis span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.tl-unit { margin: 2px 0 0; text-align: center; font-size: 13px; color: var(--fg-2); }
.tl-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 14.5px; }
.tl-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 14px; height: 12px; border-radius: 2px; border: 1px solid var(--rule); }
.sw-tick { width: 2px; height: 14px; border: 0; }
.tl-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 6px; }
.tl-item {
  display: grid; grid-template-columns: 30px 64px minmax(0, 1fr); gap: 4px 10px; align-items: start;
  padding: 8px 10px; border: 1px solid transparent; border-radius: 8px; font-size: 15.5px; line-height: 1.45;
  cursor: pointer;
}
.tl-item { display: none; }
.tl-item.is-active { display: grid; cursor: default; }
.tl-item.is-active { background: var(--accent-soft); border-color: var(--accent); }
.tl-n { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--accent); font-size: 11.5px; font-weight: 600; margin-top: 1px; }
.tl-min { font-variant-numeric: tabular-nums; color: var(--fg-2); font-size: 14.5px; padding-top: 1px; white-space: nowrap; }
.tl-q code { font-size: 0.85em; padding: 0 4px; background: var(--code-bg); border-radius: 3px; overflow-wrap: anywhere; }
.chip { display: inline-block; margin-right: 6px; padding: 0 7px; border-radius: 999px; font-size: 12.5px; font-weight: 600; line-height: 1.6; color: var(--fg); vertical-align: 1px; }
@media (max-width: 520px) { .tl-item { grid-template-columns: 26px minmax(0, 1fr); } .tl-min { grid-column: 2; padding-top: 0; } .tl-q { grid-column: 2; } .tl-n { grid-row: span 2; } }

/* ---------- Figure 3: findings ---------- */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 700px) { .cards { grid-template-columns: 1fr; } }
.card { min-width: 0; padding: 13px 15px 14px; border: 1px solid var(--rule); border-radius: 8px; background: var(--bg); font-size: 15.5px; line-height: 1.45; }
.card-top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-2); }
.card-top span:last-child { font-weight: 500; letter-spacing: 0; text-transform: none; font-variant-numeric: tabular-nums; }
.card p { margin: 0; }
.card .arrow { margin: 8px 0 0; padding-top: 8px; border-top: 1px dashed var(--line); }
.card .arrow b { color: var(--accent-ink); font-weight: 600; }

/* ---------- Figure 2: how a tool call reaches the program ---------- */
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.mech { min-width: 640px; }
.mech text { fill: var(--fg); font-size: 11.3px; }
.mech .t-h { font-size: 13.5px; font-weight: 600; }
.mech .t-mono { font-family: var(--mono); font-size: 11px; }
.mech .t-sub { fill: var(--fg-2); font-size: 11.5px; }
.mech .t-lab { fill: var(--fg-2); font-size: 11px; }
.mech .t-acc { fill: var(--accent-ink); font-size: 11px; }
.mech .box { fill: var(--bg); stroke: var(--line); stroke-width: 1.2; }
.mech .proc { fill: var(--panel); stroke: var(--fg-2); stroke-width: 1.3; }
.mech .inj { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.6; }
.mech .flow { stroke: var(--fg-2); stroke-width: 1.3; fill: none; }
.mech .flow-acc { stroke: var(--accent); stroke-width: 1.5; fill: none; }
.mech .mk { fill: var(--fg-2); }
.mech .mk-acc { fill: var(--accent); }
.mech .zone { stroke: var(--fg-2); stroke-width: 1.2; fill: none; }
.mech .zone-acc { stroke: var(--accent); stroke-width: 1.4; fill: none; }
.mech .t-zone { font-size: 13.5px; font-weight: 600; }
.mech .t-zone-acc { fill: var(--accent-ink); font-size: 13.5px; font-weight: 600; }
.codefig pre { font-size: 12.5px; }

/* ---------- Setup and tasks ---------- */
.setup { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 18px; margin: 18px 0; padding: 16px 18px; border: 1px solid var(--rule); border-radius: 10px; font-size: 16px; line-height: 1.5; }
.setup dt { font-weight: 600; }
.setup dd { margin: 0; min-width: 0; }
@media (max-width: 600px) { .setup { grid-template-columns: 1fr; gap: 2px; } .setup dd { margin-bottom: 10px; } }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.45; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
th { font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fg-2); border-bottom: 1px solid var(--line); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.task { font-family: var(--mono); font-size: 13.5px; white-space: nowrap; }

.cost { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 26px; margin-top: 26px; }
@media (max-width: 640px) { .cost { grid-template-columns: 1fr; } }
.cost h4 { margin: 0 0 8px; font-size: 15px; font-weight: 600; }

.prov { display: grid; grid-template-columns: minmax(0, 190px) minmax(0, 1fr) 70px; gap: 8px 12px; align-items: center; font-size: 15px; }
.prov .hb-track { height: 20px; background: var(--panel); border-radius: 2px; overflow: hidden; }
.prov .pv { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.prov-gap { grid-column: 1 / -1; height: 6px; }
@media (max-width: 520px) { .prov { grid-template-columns: minmax(0, 1fr) 64px; gap: 2px 10px; } .prov .lab { grid-column: 1 / -1; margin-top: 8px; } }

/* ---------- Failure cases ---------- */
.fails { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 720px) { .fails { grid-template-columns: 1fr; } }
.fail { min-width: 0; padding: 14px 16px 16px; border: 1px solid var(--rule); border-radius: 10px; font-size: 15.5px; line-height: 1.45; }
.fail h4 { margin: 0 0 4px; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-2); }
.fail .head { margin: 0 0 10px; font-size: 18px; font-weight: 600; line-height: 1.3; }
.fail table { font-size: 14px; margin: 4px 0 10px; }
.fail th, .fail td { padding: 5px 8px; }
.fail td.m { font-family: var(--mono); font-size: 12.5px; overflow-wrap: anywhere; }
.fail td.t { font-family: var(--mono); font-size: 12.5px; white-space: nowrap; }
.fail .bad { color: var(--bad); font-weight: 600; }
.fail p { margin: 8px 0 0; }


@media (prefers-reduced-motion: reduce) { .pipe-svg .stage rect { transition: none; } }

/* ---------- Result charts: vector figures set in Inter, like the page ---------- */
.chart-img { display: block; width: 100%; min-width: 560px; height: auto; border: 1px solid var(--rule); border-radius: 12px; background: #ffffff; }

/* ---------- Figure A3: run videos ---------- */
.vid-stat { font-size: 15px; font-variant-numeric: tabular-nums; }
.vid-wrap { overflow: hidden; border: 0; border-radius: 20px; background: var(--card); box-shadow: var(--shadow); }
.vid-wrap video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: var(--panel); }
.card .arrow { color: var(--fg); }

/* ---------- Fruit Ninja ---------- */
.tools { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 720px) { .tools { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tool { min-width: 0; padding: 14px 15px 15px; border: 1px solid transparent; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); }
.tool code { display: inline-block; padding: 2px 7px; font-size: 13.5px; font-weight: 600; background: var(--code-bg); border-radius: 4px; overflow-wrap: anywhere; }
.tool p { margin: 8px 0 0; font-size: 14px; line-height: 1.45; }
.tool:nth-child(2) { border-color: var(--accent); background: var(--accent-soft); }
.fn-table { margin-top: 22px; }
.fn-steps { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 720px) { .fn-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 400px) { .fn-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fn-step {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0;
  padding: 10px 11px 11px; font: inherit; text-align: left; color: var(--fg);
  background: var(--bg); border: 1.3px solid var(--line); border-radius: 8px; cursor: pointer;
}
.fn-step:hover { border-color: var(--accent); }
.fn-step[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.fn-step .sd-num { width: 22px; height: 22px; font-size: 12px; transform: none; }
.fn-step b { font-size: 15.5px; font-weight: 600; line-height: 1.2; }
.fn-step small { font-size: 13px; line-height: 1.3; color: var(--fg-2); }

/* Demos under the TL;DR: headline numbers above each video. */
.demo-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 12px; }
.demo-stats > div { display: flex; flex-direction: column; gap: 2px; }
.demo-big { font-size: 38px; font-weight: 800; line-height: 1.05; letter-spacing: -0.035em; color: var(--fg); font-variant-numeric: tabular-nums; }
.demo-big.gui { color: var(--gui-ink); }
.demo-big small { font-size: 0.55em; font-weight: 600; color: var(--gui-ink); letter-spacing: 0; }
.demo-note { font-size: 14px; line-height: 1.35; color: var(--fg-2); }
@media (max-width: 520px) { .demo-big { font-size: 24px; } .demo-note { font-size: 12.5px; } .demo-stats { gap: 10px; } }

/* Version switch at the bottom of the page. */

/* ---------- Figure 8: sketch of the next step ---------- */
.vision { display: block; width: 100%; height: auto; min-width: 640px; font-family: var(--sans); }
.vision text { fill: var(--fg); font-size: 11.5px; }
.vision .t-h { font-size: 13.5px; font-weight: 600; }
.vision .t-cap { fill: var(--fg-2); font-size: 12px; }
.vision .t-acc { fill: var(--accent-ink); font-size: 12px; font-weight: 600; }
.vision .t-mono { font-family: var(--mono); font-size: 11px; }
.vision .t-bin { font-family: var(--mono); font-size: 10.5px; fill: var(--fg-2); opacity: 0.75; }
.vision .bubble { fill: var(--bg); stroke: var(--line); stroke-width: 1.3; }
.vision .bot { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 2; }
.vision .bot-line { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.vision .bot-dot { fill: var(--accent); }
.vision .bot-eye { fill: var(--fg); }
.vision .bot-smile { fill: none; stroke: var(--fg); stroke-width: 2; stroke-linecap: round; }
.vision .lane { fill: none; stroke: var(--accent); stroke-width: 2.4; }
.vision .lane.new { stroke-dasharray: 7 5; }
.vision .pill rect { fill: var(--bg); stroke: var(--accent); stroke-width: 1.3; }
.vision .pill.new rect { fill: var(--accent-soft); stroke-dasharray: 4 3; }
.vision .pill.new text { fill: var(--accent-ink); font-weight: 600; }
.vision .prog { fill: var(--panel); stroke: var(--fg-2); stroke-width: 1.6; }
.vision .prog-line { stroke: var(--line); }
.vision .prog-dot { fill: var(--line); }
.vision .sock { fill: var(--bg); stroke: var(--accent); stroke-width: 2; }
.vision .sock.new { stroke-dasharray: 3 2; }
.vision .chip-step rect { fill: var(--bg); stroke: var(--line); stroke-width: 1.3; }
.vision .badge { fill: var(--accent); }
.vision .badge-t { fill: var(--on-accent); font-size: 11.5px; font-weight: 700; }
.vision .flow { stroke: var(--fg-2); stroke-width: 1.4; fill: none; }
.vision .fb { stroke: var(--accent); stroke-width: 1.5; fill: none; stroke-dasharray: 5 3; }
.vision .mk { fill: var(--fg-2); }
.vision .mk-acc { fill: var(--accent); }

/* The appendix: a label, smaller section headings, and the list of tool calls in one run. */
.appx-label { margin: 88px 0 -40px; font-size: 13px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--accent-ink); }
h2.appx { font-size: 26px; }
.appx-label + h2.appx { border-top: 0; }
#trace-lid td.task { white-space: normal; }
#trace-lid table { min-width: 600px; }

/* Leave a little room above a figure or table that a reference link jumps to. */
figure { scroll-margin-top: 20px; }

/* ---------- Section rhythm ---------- */
h2 { padding-top: 34px; border-top: 1px solid var(--rule); scroll-margin-top: 8px; }
h3, .exp-head { scroll-margin-top: 24px; }
h3 { margin-top: 44px; }
.exp-head h3 { font-size: 22px; }
article > p b, .tldr b { font-weight: 650; }

/* ---------- Contents beside the article, on wide screens ---------- */
.toc { display: none; }
@media (min-width: 1300px) {
  .toc {
    display: block;
    position: fixed;
    top: 104px;
    left: calc(50% - 396px - 236px);
    width: 196px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    font-size: 13.5px;
    line-height: 1.35;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s;
  }
  .toc.is-shown { opacity: 1; visibility: visible; }
}
.toc-title { margin: 0 0 10px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-2); }
.toc ol { margin: 0; padding: 0; list-style: none; }
.toc ol ol { margin: 2px 0 6px; }
.toc a { display: block; padding: 5px 0 5px 12px; border-left: 2px solid var(--rule); color: var(--fg-2); text-decoration: none; }
.toc ol ol a { padding: 3px 0 3px 24px; font-size: 12.5px; }
.toc a:hover { color: var(--fg); }
.toc a.is-current { color: var(--fg); font-weight: 600; border-left-color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .toc { transition: none; } }

/* Keep the comparison tables readable on phones: they scroll sideways instead of squeezing. */
#tab-tasks table, #tab-servers table { min-width: 600px; }
@media (max-width: 370px) { h1 { font-size: 28px; } }
.demo-big small { white-space: nowrap; }
@media (max-width: 520px) { .demo-big small { display: block; font-size: 13px; line-height: 1.5; } }
.byline-note { margin-top: 2px !important; font-size: 13px; color: var(--fg-2); }
.byline .nw { white-space: nowrap; }
