/* Why Do the Coding Agents All Look Alike? — eight harnesses, feature by feature.
 *
 * Shares the paper, type and sidebar of the API timelines. There is no
 * categorical color here: harnesses are columns named in text, and the one
 * that shipped a feature first is marked by an ink fill, not a hue, so the
 * page reads the same in grayscale and to color-blind readers.
 */
:root {
  --paper: #f5f3ec;
  --card: #fbfaf6;
  --card-strong: #fffefb;
  --ink: #1c1b18;
  --ink-2: #4f4c45;
  --ink-3: #847f74;
  --rule: #dad5c9;
  --rule-soft: #e8e4d9;
  --accent: #a64f2a;
  --wash: rgba(28, 27, 24, 0.045);

  --v-openai: #4a3aa7;
  --v-anthropic: #d65a24;
  --v-google: #2a78d6;

  --serif: "Instrument Serif", Georgia, serif;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --side-w: 316px;
  --name-w: 15.5rem;
  --verdict-w: 15rem;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-padding-top: calc(var(--appnav-h, 0px) + 24px); }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
button { font: inherit; color: inherit; }
code { font-family: var(--mono); font-size: 0.92em; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

/* ---------- layout ---------- */

.layout {
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr);
  max-width: 1720px;
  margin: 0 auto;
}

/* ---------- sidebar ---------- */

.side {
  position: sticky;
  top: var(--appnav-h, 0px);
  height: calc(100vh - var(--appnav-h, 0px));
  height: calc(100dvh - var(--appnav-h, 0px));
  border-right: 1px solid var(--rule-soft);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.side-inner { padding: 1.3rem 1.2rem 1.6rem 1.35rem; }

.kicker {
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.wordmark {
  margin-top: 0.3rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 2.5rem;
  line-height: 0.98;
  letter-spacing: -0.01em;
}
.wordmark em { font-style: italic; color: var(--accent); }
.lede { margin-top: 0.7rem; font-size: 0.86rem; line-height: 1.55; color: var(--ink-2); }
.lede strong { color: var(--ink); font-weight: 600; }

.side-h {
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.score { margin-top: 1.1rem; }
.score-table { width: 100%; border-collapse: collapse; margin-top: 0.3rem; font-size: 0.76rem; }
.score-table thead th {
  font-family: var(--mono);
  font-size: 0.56rem;
  font-weight: 500;
  color: var(--ink-3);
  text-align: right;
  padding: 0 0 0.2rem 0.3rem;
  vertical-align: bottom;
  line-height: 1.15;
}
.score-table tbody th { text-align: left; font-weight: 500; white-space: nowrap; padding: 0.22rem 0; }
.score-table tbody th i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 0.4rem; vertical-align: 0; }
.score-table td { text-align: right; font-family: var(--mono); font-size: 0.72rem; color: var(--ink-2); padding: 0.22rem 0 0.22rem 0.3rem; }
.score-table td b { color: var(--ink); font-weight: 600; font-size: 0.8rem; }
.score-table tbody tr + tr > * { border-top: 1px solid var(--rule-soft); }
.score-note { margin-top: 0.4rem; font-size: 0.7rem; line-height: 1.45; color: var(--ink-3); }

.controls { margin-top: 1.1rem; display: grid; gap: 0.6rem; }
.control-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.5rem; }
.control-label {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  width: 3rem;
}
.chips { display: flex; flex-wrap: wrap; gap: 0.3rem; flex: 1; }
.chip {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.16rem 0.55rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--card);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.chip:hover { border-color: var(--ink-3); }
.chip[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; }
.seg button { font-size: 0.72rem; font-weight: 500; padding: 0.2rem 0.55rem; border: 0; background: var(--card); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--rule); }
.seg button:hover { background: var(--wash); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.key {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem 0.6rem;
  margin-top: 1rem;
  font-size: 0.7rem;
  color: var(--ink-2);
}
.key li { display: flex; align-items: center; gap: 0.38rem; }
.k-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.k-first { background: var(--card); box-shadow: 0 0 0 1.6px var(--ink); }
.k-none { background: var(--paper); border: 1.6px dashed var(--ink-3); }
.rule { margin-top: 0.8rem; font-size: 0.7rem; line-height: 1.5; color: var(--ink-3); }
.side-foot { margin-top: 1rem; font-size: 0.78rem; color: var(--ink-3); }

/* ---------- reading ---------- */

.reading, .sources, .table-sec, .off-grid {
  max-width: 1720px;
  margin: 0 auto;
  padding: 3rem 1.6rem 1rem calc(var(--side-w) + 1.4rem);
}
.reading h2, .sources h2, .table-sec h2, .off-grid h2 { font-family: var(--serif); font-weight: 400; font-size: 2.2rem; line-height: 1; }
.reading h2 em, .sources h2 em, .table-sec h2 em, .off-grid h2 em { font-style: italic; color: var(--accent); }
.reading .reading-lede, .sources .sources-lede, .off-grid .sources-lede { margin-top: 0.6rem; max-width: 70ch; color: var(--ink-2); font-size: 0.95rem; }
.findings {
  list-style: none;
  counter-reset: f;
  margin-top: 1.4rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(21rem, 1fr));
  gap: 1rem 1.6rem;
}
.findings li { counter-increment: f; border-top: 1px solid var(--rule); padding-top: 0.75rem; }
.findings h3 { font-size: 1rem; font-weight: 600; line-height: 1.35; }
.findings h3::before {
  content: counter(f, decimal-leading-zero);
  display: block;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--ink-3);
  margin-bottom: 0.2rem;
}
.findings p { margin-top: 0.4rem; font-size: 0.875rem; line-height: 1.6; }
.findings .refs { font-size: 0.76rem; color: var(--ink-3); }
.findings .refs a { color: var(--ink-2); }

.cu-fig { margin-top: 2.2rem; max-width: 64rem; }
.cu-fig h3 { font-size: 1rem; font-weight: 600; }
.cu-lede { margin-top: 0.3rem; font-size: 0.85rem; color: var(--ink-2); max-width: 70ch; }
.cu-key { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; margin-top: 0.6rem; font-size: 0.74rem; color: var(--ink-2); list-style: none; }
.cu-key li { display: inline-flex; align-items: center; gap: 0.35rem; }
.cu-key i { width: 9px; height: 9px; border-radius: 50%; }
.cu-key i.cu-k-med { width: 16px; height: 0; border-radius: 0; border-top: 2px solid var(--ink); }
.cu-svg { display: block; width: 100%; height: auto; margin-top: 0.5rem; overflow: visible; }
.cu-band { fill: var(--wash); }
.cu-grid { stroke: var(--rule-soft); stroke-width: 1; }
.cu-tick { font-family: var(--mono); font-size: 10px; fill: var(--ink-3); }
.cu-axis { font-family: var(--mono); font-size: 10px; fill: var(--ink-2); }
.cu-med { stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.cu-medl { font-family: var(--mono); font-size: 10px; fill: var(--ink-2); }
.cu-dot { stroke: var(--paper); stroke-width: 2; cursor: pointer; }
.cu-open { margin-top: 0.5rem; font-size: 0.8rem; color: var(--ink-2); max-width: 80ch; }

/* ---------- table ---------- */

.tbl-scroll { overflow-x: auto; margin-top: 1rem; }
.ftable { border-collapse: collapse; font-size: 0.8rem; min-width: 42rem; width: 100%; max-width: 72rem; }
.ftable th, .ftable td { text-align: left; padding: 0.3rem 0.8rem 0.3rem 0; border-bottom: 1px solid var(--rule-soft); vertical-align: baseline; }
.ftable thead th { font-weight: 600; font-size: 0.78rem; white-space: nowrap; border-bottom-color: var(--rule); }
.ftable thead th i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 0.35rem; }
.ftable tbody th { font-weight: 500; }
.ftable tbody th a { color: var(--ink); text-decoration-color: var(--rule); }
.ftable td { font-family: var(--mono); font-size: 0.74rem; white-space: nowrap; }
.ftable td a { color: var(--ink-2); text-decoration-color: var(--rule); }
.ftable td.t-first a { color: var(--ink); font-weight: 600; }
.t-tag, .t-lag { font-size: 0.64rem; color: var(--ink-3); }
.t-tag { text-transform: uppercase; letter-spacing: 0.06em; }
.ftable td.t-none { color: var(--ink-3); }
.ftable tr.tg th { padding-top: 0.9rem; font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }

/* ---------- sources ---------- */

.apps-list { list-style: none; margin-top: 1rem; font-size: 0.86rem; line-height: 1.5; }
.apps-list li { margin-bottom: 0.4rem; }
.apps-list a { color: var(--ink); font-weight: 600; text-decoration-color: var(--rule); }
.apps-list .pub, .source-list .pub { color: var(--ink-3); font-size: 0.8rem; }
.sources-sub { margin-top: 1rem; font-size: 0.8rem; color: var(--ink-2); }
.source-list { margin-top: 0.5rem; columns: 2 26rem; column-gap: 2rem; font-size: 0.78rem; line-height: 1.45; color: var(--ink-2); padding-left: 1.4rem; }
.source-list li { break-inside: avoid; margin-bottom: 0.4rem; }
.source-list a { color: var(--ink); text-decoration-color: var(--rule); }

.colophon {
  max-width: 1720px;
  margin: 0 auto;
  padding: 1.6rem 1.6rem 3rem calc(var(--side-w) + 1.4rem);
  font-size: 0.76rem;
  color: var(--ink-3);
  line-height: 1.6;
}

/* ---------- tooltip ---------- */

.tip {
  position: fixed;
  z-index: 4000;
  max-width: 19rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 7px;
  padding: 0.55rem 0.7rem 0.6rem;
  font-size: 0.78rem;
  line-height: 1.45;
  box-shadow: 0 12px 28px -12px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}
.tip b { font-weight: 600; }
.tip code { font-size: 0.9em; }
.tip .tip-k { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase; color: #bdb8ac; margin-bottom: 0.15rem; }
.tip .tip-why { margin-top: 0.25rem; color: #dcd8cd; font-size: 0.74rem; }
.tip .tip-since { margin-top: 0.3rem; font-family: var(--mono); font-size: 0.64rem; color: #bdb8ac; }

/* ---------- medium screens: the sidebar moves above ---------- */

@media (max-width: 1299px) {
  :root { --side-w: 0px; }
  .layout { display: block; }
  .side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--rule-soft); overflow: visible; }
  .side-inner {
    max-width: 66rem;
    padding: 1.4rem 1.2rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 2.2rem;
    align-items: start;
  }
  .side-inner > .kicker, .side-inner > .wordmark, .side-inner > .lede { grid-column: 1; }
  .side-inner > .score { grid-column: 2; grid-row: 1 / span 3; margin-top: 0; }
  .side-inner > .controls, .side-inner > .key, .side-inner > .rule, .side-inner > .side-foot { grid-column: 1 / -1; }
  .reading, .sources, .table-sec, .colophon { padding-left: 1.6rem; }
}

/* ---------- narrow screens: the name and verdict wrap around the track ---------- */

@media (max-width: 860px) {
  .side-inner { display: block; }
  .side-inner > .score { margin-top: 1.1rem; }
  .race { padding: 0 1rem 2.4rem; }
  .race-head, .frow { grid-template-columns: minmax(0, 1fr); }
  .race-head .rh-name, .race-head .rh-verdict { display: none; }
  .race-head { padding-top: 0.8rem; }
  .frow { row-gap: 0.15rem; }
  .f-verdict { padding-left: 0; }
  .f-detail li { grid-template-columns: minmax(0, 1fr); row-gap: 0.1rem; }
}

@media (max-width: 560px) {
  body { font-size: 14.5px; }
  .reading, .sources, .table-sec, .colophon { padding-left: 1rem; padding-right: 1rem; }
  .key { grid-template-columns: 1fr; }
  .ax-yr { font-size: 0.56rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- the matrix ---------- */

.grid-main { padding: 1rem 1.2rem 3rem; min-width: 0; }
.mx-scroll { overflow-x: auto; }
@media (min-width: 1500px) { .mx-scroll { overflow: visible; } }
.mx { border-collapse: collapse; width: 100%; min-width: 64rem; font-size: 0.78rem; }
.mx thead th {
  position: sticky; top: var(--appnav-h, 0px); z-index: 3; background: var(--paper);
  font-weight: 600; text-align: left; vertical-align: bottom; padding: 0.5rem 0.35rem 0.4rem;
  border-bottom: 1px solid var(--rule);
}
.mx .h-feat { width: 15rem; font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
.mx .h-name { display: block; font-size: 0.78rem; line-height: 1.2; }
.mx .h-kind { display: block; font-family: var(--mono); font-size: 0.56rem; font-weight: 400; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 0.15rem; }
.mx .h-strip { width: 11.5rem; font-family: var(--mono); font-size: 0.58rem; font-weight: 400; color: var(--ink-3); }
.mx .h-strip span { display: inline-block; width: 25%; text-align: center; }
.mx .g-row th {
  padding: 1.1rem 0.35rem 0.3rem; font-family: var(--serif); font-weight: 400; font-size: 1.3rem; text-align: left;
  border-bottom: 1px solid var(--rule);
}
.mx .g-row th span { font-family: var(--sans); font-size: 0.74rem; color: var(--ink-3); margin-left: 0.4rem; }
.mx tbody th[scope="row"] { text-align: left; font-weight: 400; padding: 0.4rem 0.6rem 0.4rem 0.35rem; vertical-align: top; }
.f-name { display: block; font-weight: 600; font-size: 0.82rem; line-height: 1.3; }
.f-def { display: block; font-size: 0.7rem; line-height: 1.4; color: var(--ink-2); margin-top: 0.1rem; }
.mx tbody tr + tr > *, .mx tbody tr:first-child:not(.g-row) > * { border-top: 1px solid var(--rule-soft); }
.mx td.c { font-family: var(--mono); font-size: 0.7rem; white-space: nowrap; padding: 0.35rem; vertical-align: middle; color: var(--ink-2); }
.mx td.c a { color: inherit; text-decoration: none; display: inline-block; padding: 0.12rem 0.3rem; border-radius: 4px; }
.mx td.c a:hover { text-decoration: underline; text-decoration-color: var(--rule); }
.mx td.c small { font-size: 0.6rem; color: var(--ink-3); }
.mx td.c.first a { background: var(--ink); color: var(--paper); font-weight: 600; }
.mx td.c.none, .mx td.c.unk { color: var(--rule); text-align: left; padding-left: 0.65rem; }
.mx td.c.unk { color: var(--ink-3); }
.mx td.c-strip { padding: 0.3rem 0.35rem; white-space: nowrap; }
.strip { width: 150px; height: 22px; vertical-align: middle; }
.c-count { font-family: var(--mono); font-size: 0.6rem; color: var(--ink-3); margin-left: 0.3rem; vertical-align: middle; }
.st-axis { stroke: var(--rule); stroke-width: 1; }
.st-year { stroke: var(--rule-soft); stroke-width: 1; }
.st-span { stroke: var(--ink-3); stroke-width: 2; }
.st-tick { stroke: var(--ink-2); stroke-width: 2; stroke-linecap: round; }
.st-first { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.mx tr:target > * { background: var(--wash); }

.h-table .oss { font-family: var(--mono); font-size: 0.56rem; color: var(--ink-3); border: 1px solid var(--rule); border-radius: 3px; padding: 0 0.2rem; margin-left: 0.15rem; }
.key .k-cell { font-family: var(--mono); font-size: 0.64rem; padding: 0.05rem 0.3rem; border-radius: 4px; color: var(--ink-2); white-space: nowrap; }
.key .k-cell.first { background: var(--ink); color: var(--paper); font-weight: 600; }
.key .k-cell small { font-size: 0.56rem; color: var(--ink-3); }
.key .k-cell.none { color: var(--ink-3); }
.key .k-strip { width: 40px; height: 14px; flex: none; }
.key { grid-template-columns: 1fr; }

/* who started what */
.bars-fig { margin-top: 2.2rem; max-width: 52rem; }
.bars-fig h3, .fill-fig h3 { font-size: 1rem; font-weight: 600; }
.bars { list-style: none; margin-top: 0.7rem; display: grid; gap: 0.35rem; }
.bars li { display: grid; grid-template-columns: 8rem minmax(0, 1fr) 9rem; align-items: center; gap: 0.6rem; font-size: 0.8rem; }
.b-track { position: relative; height: 12px; }
.b-has { position: absolute; left: 0; top: 0; bottom: 0; background: var(--rule); border-radius: 2px; }
.b-first { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink); border-radius: 2px; }
.b-num { font-family: var(--mono); font-size: 0.68rem; color: var(--ink-2); }
.kb-first, .kb-has { display: inline-block; width: 12px; height: 9px; border-radius: 2px; }
.kb-first { background: var(--ink); }
.kb-has { background: var(--rule); }

/* how each harness filled in */
.fill-fig { margin-top: 2.2rem; max-width: 64rem; }
.fill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); gap: 0.6rem 1rem; margin-top: 0.7rem; }
.fill-cell svg { width: 100%; height: auto; display: block; }
.fl-name { font-size: 0.8rem; font-weight: 600; }
.fl-name span { font-family: var(--mono); font-weight: 400; font-size: 0.7rem; color: var(--ink-3); }
.fl-line { fill: none; stroke: var(--ink); stroke-width: 2; }
.fl-other { fill: none; stroke: var(--rule); stroke-width: 1; }
.fl-tick { font-family: var(--mono); font-size: 8px; fill: var(--ink-3); }
.h-table td { white-space: nowrap; }

/* phones: the feature names stay put while the dates scroll */
@media (max-width: 860px) {
  .grid-main { padding: 0.6rem 0 2.4rem 1rem; }
  .mx .f-def { display: none; }
  .mx tbody th[scope="row"], .mx thead .h-feat { position: sticky; left: 0; z-index: 2; background: var(--paper); min-width: 8.5rem; width: 8.5rem; }
  .mx thead .h-feat { z-index: 4; }
  .mx .g-row th { text-align: left; }
  .mx .g-row th span { display: none; }
  .mx { min-width: 58rem; }
}
@media (max-width: 1499px) { .mx thead th { position: static; } .mx thead .h-feat { position: sticky; top: auto; } }

/* thirteen columns: the lag sits under the date */
.mx td.c { text-align: center; padding: 0.3rem 0.15rem; }
.mx td.c a { padding: 0.12rem 0.25rem; line-height: 1.25; }
.mx td.c small { display: block; }
.mx .h-h { text-align: center; padding-left: 0.15rem; padding-right: 0.15rem; }
.mx .h-name { font-size: 0.72rem; }
.mx .h-kind { font-size: 0.5rem; }
.mx .h-feat { width: 13rem; }
.mx { min-width: 76rem; }
.mx td.c.none, .mx td.c.unk { text-align: center; padding-left: 0.15rem; }

.h-stars { display: block; margin-top: 0.25rem; font-family: var(--mono); font-size: 0.6rem; font-weight: 500; color: var(--ink-2); text-decoration: none; }
a.h-stars:hover { text-decoration: underline; text-decoration-color: var(--rule); }
.h-stars.nosrc { color: var(--ink-3); }
.h-stars.none { color: var(--rule); font-weight: 400; }

.h-table { font-size: 0.7rem; }
.h-table thead th { font-size: 0.52rem; padding-left: 0.2rem; }
.h-table td { padding-left: 0.2rem; font-size: 0.66rem; }
.h-table tbody th { font-size: 0.72rem; }
.h-table .oss { display: none; }

/* ---------- also researched ---------- */
.off-table { margin-top: 1rem; border-collapse: collapse; width: 100%; max-width: 64rem; font-size: 0.85rem; }
.off-table th, .off-table td { text-align: left; vertical-align: top; padding: 0.5rem 0.9rem 0.5rem 0; border-top: 1px solid var(--rule); }
.off-table thead th { font-family: var(--mono); font-size: 0.68rem; font-weight: 500; color: var(--ink-3); border-top: 0; }
.off-table .h-name { display: block; font-weight: 600; }
.off-table .h-maker { display: block; color: var(--ink-3); font-size: 0.75rem; }
.off-table .num { font-family: var(--mono); white-space: nowrap; }
.off-table .of { color: var(--ink-3); }
.off-table .why { color: var(--ink-2); min-width: 16rem; }
@media (max-width: 640px) {
  .off-table thead { display: none; }
  .off-table tr { display: grid; grid-template-columns: repeat(3, auto) 1fr; gap: 0.2rem 0.9rem; border-top: 1px solid var(--rule); padding: 0.5rem 0; }
  .off-table th, .off-table td { border: 0; padding: 0; }
  .off-table th[scope=row], .off-table .why { grid-column: 1 / -1; min-width: 0; }
}
