/* Black and white, same system as agentpaymarket.com: Plex Sans for text, Plex Mono for numbers and metadata. */
:root {
  --bg: #ffffff;
  --ink: #000000;
  --muted: #6b6b6b;
  --rule: #e4e4e4;
  --tile: #f5f5f5;
  --sans: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}
/* White only, by design: no dark theme. */
:root { color-scheme: light; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg); color: var(--ink); font: 13px/1.5 var(--sans);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 28px 40px;
}
a { color: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.wrap { max-width: 1200px; margin: 0 auto; }
.mono, .num { font-family: var(--mono); }
.num { font-variant-numeric: tabular-nums; }
h1, h2, h3 { text-wrap: balance; }

/* Banner stays on screen while scrolling. */
.banner { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--bg); padding-top: 10px; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
.topline { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 24px; margin-bottom: 8px; }
.kicker { margin: 0; color: var(--muted); }
.by { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-size: 12px; }
.by img { display: block; }
header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
h1 { font-size: 22px; font-weight: 600; margin: 0; letter-spacing: -.01em; }
.meta { font-family: var(--mono); font-size: 11px; color: var(--muted); }
nav.meta { display: flex; flex-wrap: wrap; gap: 4px 16px; }
nav.meta a { color: var(--ink); text-decoration: none; }
nav.meta a:hover { text-decoration: underline; }
section { scroll-margin-top: 80px; }

/* Intro */
.intro { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px 48px; padding: 24px 0; }
.lede { font-size: 24px; line-height: 1.25; font-weight: 500; letter-spacing: -.015em; margin: 0 0 12px; max-width: 28ch; }
.intro p { margin: 0; max-width: 68ch; color: #222; font-size: 14px; }
.facts { margin: 0; border: 1px solid var(--ink); align-self: start; }
.facts div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border-top: 1px solid var(--rule); }
.facts div:first-child { border-top: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-family: var(--mono); font-size: 12px; text-align: right; }

/* Highlight cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); border: 1px solid var(--ink); }
.card { padding: 12px 14px 14px; border-left: 1px solid var(--ink); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.card:first-child { border-left: 0; }
.chip { align-self: flex-start; font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; background: var(--tile); padding: 2px 7px; }
.card p { margin: 0; flex: 1; }
.card b { font-weight: 600; }
.icons { display: flex; gap: 4px; }
.icons img { width: 18px; height: 18px; display: block; }

/* Section heads */
.sec-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 24px; margin-top: 40px; padding-bottom: 8px; border-bottom: 1px solid var(--ink); }
.sec-head h2 { font-size: 16px; font-weight: 600; margin: 0; }
.sec-head h2 span { font-family: var(--mono); font-weight: 400; font-size: 11px; color: var(--muted); margin-left: 8px; }
.track-desc { color: #333; max-width: 90ch; margin: 10px 0 12px; }
.controls { display: flex; flex-wrap: wrap; gap: 8px; }
.seg { display: inline-flex; border: 1px solid var(--ink); }
.seg button, .ghost { font: 12px var(--sans); border: 0; background: var(--bg); color: var(--ink); padding: 5px 12px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--ink); }
.seg button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.ghost { border: 1px solid var(--ink); }
.ghost[aria-pressed="true"] { background: var(--tile); }
.ghost[hidden] { display: none; }
.swipe { display: none; }

/* Tables */
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; }
th, td { padding: 7px 10px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--rule); }
th { font-weight: 500; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.board { min-width: 860px; }
.board thead tr.grp th { font-size: 11px; color: var(--ink); font-weight: 600; border-bottom: 1px solid var(--ink); padding-bottom: 4px; }
.board thead tr.grp th[colspan] { border-left: 1px solid var(--rule); }
.board thead tr.cols th { border-bottom: 1px solid var(--ink); }
.board th.sortable { cursor: pointer; user-select: none; }
.board th.sortable:hover { color: var(--ink); }
.board th[aria-sort="ascending"]::after { content: " ▲"; color: var(--ink); font-size: 8px; vertical-align: 1px; }
.board th[aria-sort="descending"]::after { content: " ▼"; color: var(--ink); font-size: 8px; vertical-align: 1px; }
.board th.r, .board td.r { text-align: right; }
.board tbody tr:hover { background: var(--tile); }
.rank { font-family: var(--mono); color: var(--muted); width: 28px; }
.model { display: flex; align-items: center; gap: 8px; white-space: nowrap; font-weight: 500; }
.model img { width: 18px; height: 18px; flex: none; }
.creator { color: var(--muted); font-size: 12px; white-space: nowrap; }
td.num { font-size: 12.5px; white-space: nowrap; }
.muted { color: var(--muted); }
.barcell { display: flex; align-items: center; gap: 10px; min-width: 190px; }
.barcell .v { width: 44px; text-align: right; font-family: var(--mono); font-size: 12.5px; }
.bar { position: relative; flex: 1; height: 10px; background: var(--tile); min-width: 110px; }
.bar i { position: absolute; inset: 0 auto 0 0; background: var(--ink); }
.bar s { position: absolute; top: -3px; bottom: -3px; border-left: 1px solid var(--muted); border-right: 1px solid var(--muted); text-decoration: none; }
.bad { font-weight: 600; }
.foot { color: var(--muted); font-size: 12px; margin: 8px 0 0; max-width: 100ch; }

/* Chart */
.chart-box { border: 1px solid var(--ink); margin-top: 20px; padding: 12px 14px 6px; }
.chart-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; }
.chart-head h3 { font-size: 13px; font-weight: 600; margin: 0; }
#scatter { min-width: 720px; width: 100%; height: auto; display: block; margin-top: 6px; font-family: var(--mono); }
#scatter .grid { stroke: var(--rule); }
#scatter .axis { stroke: var(--ink); }
#scatter text { font-size: 11px; fill: var(--ink); }
#scatter .tick { fill: var(--muted); font-size: 10.5px; }
#scatter .lbl { font-family: var(--sans); font-size: 11.5px; paint-order: stroke; stroke: var(--bg); stroke-width: 4px; stroke-linejoin: round; }
#scatter .ci { stroke: var(--muted); }

/* Trap heatmap */
.heat { min-width: 900px; }
.heat th { white-space: normal; vertical-align: bottom; font-size: 11px; line-height: 1.3; border-bottom: 1px solid var(--ink); }
.heat td.c { font-family: var(--mono); font-size: 12px; text-align: center; border-left: 1px solid var(--bg); }
.heat td.c.hit { font-weight: 500; }
.heat td.c.hi { color: var(--bg); }
.heat tbody tr:hover td:first-child { background: var(--tile); }

/* Examples */
.examples { display: grid; gap: 0; border: 1px solid var(--ink); }
.ex { border-top: 1px solid var(--ink); }
.ex:first-child { border-top: 0; }
.ex summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 28px 210px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 10px 12px; }
.ex summary::-webkit-details-marker { display: none; }
.ex summary:hover { background: var(--tile); }
.ex .n { font-family: var(--mono); color: var(--muted); }
.ex .cat { font-size: 11px; color: var(--muted); }
.ex .cat b { display: block; color: var(--ink); font-weight: 500; font-size: 12px; }
.ex .t { font-weight: 500; }
.ex .tog { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.ex[open] .tog::before { content: "− "; }
.ex:not([open]) .tog::before { content: "+ "; }
.ex-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 32px; padding: 4px 12px 16px 52px; }
.query { font-size: 13px; max-width: 72ch; }
.query p { margin: 0 0 8px; }
.trace h4 { font-size: 11px; font-family: var(--mono); font-weight: 400; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 0 0 6px; }
.trace table td, .trace table th { padding: 6px 8px; font-size: 12px; vertical-align: top; }
.trace .pass { font-weight: 600; }
.tx a { font-family: var(--mono); font-size: 11px; margin-right: 6px; }
.note { margin: 10px 0 0; color: #333; }

/* Method */
.defs { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px 40px; margin: 16px 0; }
.def h3 { font-size: 13px; font-weight: 600; margin: 0 0 4px; }
.def p { margin: 0 0 8px; max-width: 72ch; color: #222; }
.ids { font-family: var(--mono); font-size: 11.5px; color: var(--muted); line-height: 1.8; }
table.plain td:first-child { white-space: nowrap; font-weight: 500; }
table.plain td:last-child { color: var(--muted); white-space: nowrap; }
table.plain td { vertical-align: top; }

/* FAQ */
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; font-weight: 600; font-size: 14px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); font-weight: 400; color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq p { margin: 0 0 14px; max-width: 72ch; color: #222; }

/* Footer */
footer { margin-top: 56px; border-top: 2px solid var(--ink); padding-top: 16px; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 16px 48px; align-items: start; }
.foot-grid p { margin: 6px 0 0; color: var(--muted); max-width: 72ch; }
.foot-links { display: flex; flex-direction: column; gap: 4px; font-family: var(--mono); font-size: 12px; }
.foot-links a { text-decoration: none; }
.foot-links a:hover { text-decoration: underline; }
.foot-logo { align-self: end; }
.foot-logo img { display: block; }

@media (max-width: 760px) {
  body { padding-block: 16px 32px; }
  section { scroll-margin-top: 100px; }
  .topline { margin-bottom: 0; }
  .kicker { font-size: 12px; }
  h1 { font-size: 19px; }
  header { padding-bottom: 6px; }
  /* Section nav scrolls sideways in one row; links get finger-sized targets. */
  nav.meta { flex-wrap: nowrap; overflow-x: auto; gap: 0; margin: 0 -8px; scrollbar-width: none; font-size: 12px; }
  nav.meta::-webkit-scrollbar { display: none; }
  nav.meta a { padding: 10px 8px; white-space: nowrap; }
  .seg { display: flex; width: 100%; }
  .seg button { flex: 1; }
  .seg button, .ghost { min-height: 40px; font-size: 13px; }
  /* Tables keep the model name in view while the numbers scroll. */
  .board .rank, .board .creator { display: none; }
  .board .mcol, .heat td:first-child, .heat th:first-child { position: sticky; left: 0; background: var(--bg); z-index: 1; box-shadow: 1px 0 0 var(--rule); }
  .board { min-width: 640px; }
  .heat { min-width: 760px; }
  .faq summary { font-size: 15px; padding: 14px 0; }
  .swipe { display: inline; }
  p.swipe { display: block; margin: 0 0 6px; }
  .tx a { display: inline-block; padding: 8px 6px; margin: -6px 0; }
  .ex summary { padding: 12px; }
  .intro { grid-template-columns: minmax(0, 1fr); }
  .lede { font-size: 20px; }
  .card { border-left: 0; border-top: 1px solid var(--ink); }
  .card:first-child { border-top: 0; }
  .ex summary { grid-template-columns: 24px minmax(0, 1fr) auto; }
  .ex summary .cat { display: none; }
  .ex-body { grid-template-columns: minmax(0, 1fr); padding-left: 12px; }
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .foot-logo { align-self: start; }
}

.ids span { white-space: nowrap; margin-right: 10px; }
.trace td.mname { white-space: nowrap; }
.ex .tog { white-space: nowrap; }
