/* open weights leaderboard — a price board: cool paper, ink, blue provider dots, green for the cheapest */
:root {
  --paper: #eef1f4;
  --panel: #ffffff;
  --ink: #13202b;
  --ink-dim: #5a6b7a;
  --rule: #d3dae1;
  --blue: #2446e0;
  --green: #0b8457;
  --amber: #a85f00;
  --font: 'Instrument Sans', system-ui, sans-serif;
  --wrap: 78rem;
  --measure: 68ch;
  font-size: 106.25%;
}
* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); }
body { margin: 0; font-family: var(--font); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-underline-offset: 0.16em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.5rem; }

.site-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; padding: 1.4rem 0; border-bottom: 2px solid var(--ink); }
.brand { color: var(--ink); text-decoration: none; font-size: 1.05rem; font-variation-settings: 'wdth' 80; font-weight: 500; letter-spacing: 0.01em; }
.brand b { font-weight: 700; }
.site-head nav { display: flex; gap: 1.4rem; font-size: 0.95rem; }
.site-head nav a { color: var(--ink); text-decoration: none; }
.site-head nav a:hover { text-decoration: underline; }

h1, h2 { font-variation-settings: 'wdth' 82; letter-spacing: -0.01em; }
.intro { padding: 2.75rem 0 1.5rem; }
.intro h1, .title {
  margin: 0 0 0.75rem;
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  line-height: 1.02;
  font-weight: 700;
  max-width: 20ch;
}
.lede { font-size: 1.2rem; max-width: 58ch; margin: 0 0 0.5rem; }
.stamp, .note, .sub { color: var(--ink-dim); }
.stamp { font-size: 0.9rem; margin: 0; }
.note { font-size: 0.92rem; max-width: var(--measure); }
.sub { display: block; font-size: 0.8rem; font-weight: 400; }

/* Board */
.board { background: var(--panel); border: 1px solid var(--rule); border-radius: 6px; padding: 1rem 1.25rem 1.25rem; margin-bottom: 3rem; }
.controls { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.5rem; }
.search input { font: inherit; padding: 0.55rem 0.8rem; width: min(22rem, 60vw); border: 1px solid var(--rule); border-radius: 4px; background: var(--paper); color: var(--ink); }
.count { color: var(--ink-dim); font-size: 0.9rem; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 0.65rem 0.9rem 0.65rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
thead th { font-size: 0.85rem; font-weight: 600; color: var(--ink-dim); vertical-align: bottom; border-bottom: 1px solid var(--ink); }
th.num, td.num { text-align: right; }
tbody tr:hover td { background: #f6f8fa; }
th button { all: unset; cursor: pointer; display: inline-block; }
th button:focus-visible { outline: 3px solid var(--blue); }
th button[aria-sort]::after { content: ' ▾'; color: var(--ink); }
th button[aria-sort='ascending']::after { content: ' ▴'; }
td.model a { font-weight: 600; color: var(--ink); text-decoration: none; }
td.model a:hover { color: var(--blue); text-decoration: underline; }
td.price { font-weight: 600; }

/* Price strip: one dot per provider on a shared log axis */
.strip-cell { width: 196px; min-width: 196px; }
.strip { display: block; margin-top: 0.2rem; overflow: visible; }
.strip .range { stroke: var(--rule); stroke-width: 2; }
.strip .dot { fill: var(--blue); fill-opacity: 0.55; }
.strip .dot-low { fill: var(--green); }
.axis { position: relative; display: block; height: 1rem; margin-top: 0.3rem; width: 180px; font-size: 0.72rem; font-weight: 400; }
.axis span { position: absolute; transform: translateX(-50%); }

/* Model page */
.crumbs { font-size: 0.9rem; color: var(--ink-dim); margin: 1.5rem 0 0; }
.crumbs a { color: var(--ink-dim); }
.title { margin-top: 0.75rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0; margin: 2rem 0 0; background: var(--panel); border: 1px solid var(--rule); border-radius: 6px; }
.facts div { padding: 1rem 1.2rem; border-right: 1px solid var(--rule); }
.facts div:last-child { border-right: 0; }
.facts dt { font-size: 0.82rem; color: var(--ink-dim); }
.facts dd { margin: 0.25rem 0 0; font-size: 1.15rem; font-weight: 600; font-variation-settings: 'wdth' 88; }
.section { padding: 2.5rem 0; border-bottom: 1px solid var(--rule); }
.section h2 { font-size: 1.5rem; margin: 0 0 0.75rem; }
.section.two { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
tr.best td { background: #e9f6f0; }
tr.best td.price { color: var(--green); }
.warn { color: var(--amber); font-weight: 600; }
.specs { display: grid; grid-template-columns: max-content 1fr; gap: 0.45rem 1.5rem; margin: 0 0 1rem; }
.specs dt { color: var(--ink-dim); }
.specs dd { margin: 0; }
.links { list-style: none; padding: 0; margin: 0; }
.links li { padding: 0.45rem 0; border-bottom: 1px solid var(--rule); }
.links .sub { display: inline; margin-left: 0.4rem; }
.spark { margin: 1.5rem 0 0; }
.spark polyline { fill: none; stroke: var(--blue); stroke-width: 2; }
.spark figcaption { font-size: 0.85rem; color: var(--ink-dim); }

/* Compare */
.versus { background: var(--panel); border: 1px solid var(--rule); margin-top: 1.5rem; }
.versus th, .versus td { padding: 0.8rem 1rem; }
.versus th[scope='row'] { font-weight: 500; color: var(--ink-dim); }
.versus td.win { color: var(--green); font-weight: 700; }
.versus thead a { font-size: 1.05rem; }

.prose { max-width: var(--measure); padding-bottom: 3rem; }
.prose h2 { font-size: 1.35rem; margin: 2rem 0 0.4rem; }

.site-foot { padding: 2rem 0 3rem; color: var(--ink-dim); font-size: 0.9rem; border-top: 2px solid var(--ink); margin-top: 2rem; }
.site-foot p { max-width: var(--measure); margin: 0.4rem 0; }

@media (max-width: 720px) {
  .wrap { padding: 0 1rem; }
  .section.two { grid-template-columns: 1fr; gap: 1.5rem; }
  .facts div { border-right: 0; border-bottom: 1px solid var(--rule); }
  .board { padding: 0.75rem; }
  .controls { flex-wrap: wrap; }
  th, td { padding-right: 0.6rem; font-size: 0.92rem; }
}
