/* Benchmark Almanac. The demos borrow the almanac's own look: Newsreader for titles, Geist and Geist Mono,
   zinc neutrals, and its validated lab, area and level palettes (src/styles/global.css), in light and dark. */
:root {
  --al-serif: "Newsreader", Georgia, serif;
  --al-sans: "Geist", system-ui, -apple-system, sans-serif;
  --al-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --al-bg: #ffffff; --al-ink: #0b0b0c; --al-ink-2: #45454d; --al-ink-3: #6f6f78; --al-ink-4: #a1a1aa;
  --al-line: #e7e7ea; --al-grid: #efeff1; --al-panel: #f4f4f5;
  --al-lab-openai: #2a78d6; --al-lab-anthropic: #eb6834; --al-lab-google: #1baf7a; --al-lab-moonshot: #eda100;
  --al-lab-meta: #e87ba4; --al-lab-deepseek: #008300; --al-lab-qwen: #6250d6; --al-lab-zai: #e34948;
  --al-lab-xai: #27272a; --al-lab-other: #c4c4cb;
  --al-area-knowledge: #0e94ce; --al-area-reasoning: #7f2ec7; --al-area-code: #10a99a; --al-area-agents: #518608;
  --al-area-work: #ea8a18; --al-area-multimodal: #d450b5; --al-area-safety: #a81032; --al-area-other: #a1a1aa;
  --al-lvl-1: #b0b0b9; --al-lvl-2: #8e8e96; --al-lvl-3: #6e6e76; --al-lvl-4: #4f4f56; --al-lvl-5: #303036; --al-lvl-6: #0b0a10;
  --al-good: #0ca30c;
}
:root[data-theme="dark"] {
  --al-bg: #0f0f10; --al-ink: #f4f4f5; --al-ink-2: #c4c4cb; --al-ink-3: #93939c; --al-ink-4: #62626b;
  --al-line: #2e2e33; --al-grid: #1f1f23; --al-panel: #1d1d21;
  --al-lab-openai: #3987e5; --al-lab-anthropic: #d95926; --al-lab-google: #199e70; --al-lab-moonshot: #c98500;
  --al-lab-meta: #d55181; --al-lab-deepseek: #008300; --al-lab-qwen: #9085e9; --al-lab-zai: #e66767;
  --al-lab-xai: #e4e4e7; --al-lab-other: #4a4a52;
  --al-area-knowledge: #0f8cbc; --al-area-reasoning: #8822e7; --al-area-code: #02ab97; --al-area-agents: #5e8a1c;
  --al-area-work: #c87c33; --al-area-multimodal: #bb2da8; --al-area-safety: #ee5665; --al-area-other: #62626b;
  --al-lvl-1: #47474e; --al-lvl-2: #65656d; --al-lvl-3: #85858d; --al-lvl-4: #a7a7af; --al-lvl-5: #c9c9d2; --al-lvl-6: #f4f4fd;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --al-bg: #0f0f10; --al-ink: #f4f4f5; --al-ink-2: #c4c4cb; --al-ink-3: #93939c; --al-ink-4: #62626b;
    --al-line: #2e2e33; --al-grid: #1f1f23; --al-panel: #1d1d21;
    --al-lab-openai: #3987e5; --al-lab-anthropic: #d95926; --al-lab-google: #199e70; --al-lab-moonshot: #c98500;
    --al-lab-meta: #d55181; --al-lab-deepseek: #008300; --al-lab-qwen: #9085e9; --al-lab-zai: #e66767;
    --al-lab-xai: #e4e4e7; --al-lab-other: #4a4a52;
    --al-area-knowledge: #0f8cbc; --al-area-reasoning: #8822e7; --al-area-code: #02ab97; --al-area-agents: #5e8a1c;
    --al-area-work: #c87c33; --al-area-multimodal: #bb2da8; --al-area-safety: #ee5665; --al-area-other: #62626b;
    --al-lvl-1: #47474e; --al-lvl-2: #65656d; --al-lvl-3: #85858d; --al-lvl-4: #a7a7af; --al-lvl-5: #c9c9d2; --al-lvl-6: #f4f4fd;
  }
}

/* ---------- hero: the launch film's opening, on the almanac's dark theme ---------- */
#hero { background: #0e0e11; }
.ah-wall { position: absolute; inset: 0; background:
  radial-gradient(70% 80% at 100% 0%, rgba(2, 171, 151, 0.16) 0%, rgba(2, 171, 151, 0) 70%),
  radial-gradient(60% 70% at 0% 100%, rgba(136, 34, 231, 0.13) 0%, rgba(136, 34, 231, 0) 70%),
  linear-gradient(180deg, #0f0f12 0%, #121216 100%); }
#hero canvas { position: absolute; left: 0; top: 0; }
.ah-scrim { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 720px 130px at 0 0, rgba(15, 15, 18, 0.9) 40%, rgba(15, 15, 18, 0) 100%); }
.ah-phone .ah-scrim { background: linear-gradient(180deg, rgba(15, 15, 18, 0.95) 0, rgba(15, 15, 18, 0.8) 56px, rgba(15, 15, 18, 0) 96px); }
.ah-cap { position: absolute; left: 44px; top: 34px; margin: 0; max-width: 640px; font: 400 25px/32px var(--al-serif); letter-spacing: -0.2px; color: rgba(255, 255, 255, 0.72); }
.ah-cap b { font-weight: 400; color: #fff; font-variant-numeric: tabular-nums; }
.ah-phone .ah-cap { left: 14px; right: 14px; top: 14px; font-size: 17px; line-height: 22px; }

/* ---------- the launch row under the intro: views on X, stars, the repo ---------- */
.al-launch { margin: 13px 0 0 !important; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; font: 400 13px/20px var(--sans) !important; letter-spacing: 0 !important; color: var(--muted); }
.al-stat { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); text-decoration: none; white-space: nowrap; transition: color 0.14s ease; }
.al-stat svg { flex: none; width: 13px; height: 13px; color: var(--muted); transition: color 0.14s ease; }
.al-stat b { font-weight: 500; color: var(--ink); }
.al-stat:hover, .al-stat:hover svg { color: var(--ink); }
/* what the views add up, under the number on hover: the site's own type, not the almanac's */
.al-launch { position: relative; }
.al-launch .al-reach { display: grid; grid-template-columns: auto auto; gap: 3px 18px; max-width: none; padding: 9px 12px; white-space: nowrap;
  background: var(--card); color: var(--ink-2); font: 400 12.5px/18px var(--sans); box-shadow: 0 0 0 1px var(--card-edge), 0 12px 30px -14px rgba(0, 0, 0, 0.4); }
.al-launch .al-reach b { display: block; text-align: right; font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- the almanac's page, set inside each frame ---------- */
.cs-frame.auto { height: auto; }
.al { position: relative; margin: 10px; overflow: hidden; border-radius: 6px; background: var(--al-bg); color: var(--al-ink);
  font: 400 13px/19px var(--al-sans); letter-spacing: 0; -webkit-font-smoothing: antialiased; }
.al-in { position: relative; padding: 20px 22px 18px; }
.al-h { margin: 0; font: 400 27px/32px var(--al-serif); letter-spacing: -0.4px; color: var(--al-ink); text-wrap: balance; }
.al-h.sm { font-size: 21px; line-height: 26px; letter-spacing: -0.2px; }
.al-h b { font-weight: 400; font-variant-numeric: tabular-nums; }
.al-key { display: flex; flex-wrap: wrap; gap: 4px 14px; font: 400 11.5px/16px var(--al-sans); color: var(--al-ink-3); }
.al-key span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.al-key i { width: 9px; height: 9px; border-radius: 2px; background: var(--c); flex: none; }
.al-ai { flex: none; display: block; }
.al-svg { display: block; overflow: visible; }
.al-svg text { font: 400 11px var(--al-mono); fill: var(--al-ink-3); }
.al-svg .axis { stroke: var(--al-line); stroke-width: 1; }
.al-tip { position: absolute; z-index: 5; pointer-events: none; max-width: 250px; padding: 7px 10px; border-radius: 8px; background: var(--al-bg);
  box-shadow: 0 0 0 1px var(--al-line), 0 10px 28px -12px rgba(0, 0, 0, 0.35); font: 400 12px/17px var(--al-sans); color: var(--al-ink-2);
  opacity: 0; transform: translateY(2px); transition: opacity 0.12s ease, transform 0.12s ease; }
.al-tip.on { opacity: 1; transform: none; }
.al-tip b { display: block; font-weight: 500; color: var(--al-ink); }
.al-tip .v { font: 500 12px/17px var(--al-mono); color: var(--al-ink); }
.al-tip .lead { font-weight: 500; color: var(--al-ink); }
.al-mark { display: inline-block; flex: none; width: var(--s, 14px); height: var(--s, 14px); }
.al-mark.mono { background: var(--al-ink); -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.al-mark.none { border-radius: 50%; background: var(--c, var(--al-panel)); scale: 0.6; }
.al-swap { transition: opacity 0.16s ease; }
.al-swap.out { opacity: 0; }

/* ---------- 1. what labs report ---------- */
#sw-head { min-height: 52px; }
.sw-wrap { position: relative; margin-top: 8px; }
.sw-wrap canvas { position: absolute; left: 0; top: 0; }
.sw-over { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.sw-ax { stroke: var(--al-line); stroke-width: 1; }
.al-svg text.sw-tk { font: 400 10px var(--al-mono); fill: var(--al-ink-3); }
.al-svg text.sw-at { font: 400 10.5px var(--al-sans); fill: var(--al-ink-3); }
.sw-br { fill: none; stroke: var(--al-ink-3); stroke-width: 1; }
.al-svg text.sw-nb { font: 500 13px var(--al-mono); fill: var(--al-ink); }
.al-svg text.sw-ns { font: 400 11px var(--al-sans); fill: var(--al-ink-3); }
.sw-ld { stroke: var(--al-ink-4); stroke-width: 0.8; }
.al-svg text.sw-lb { font: 500 11px var(--al-sans); fill: var(--al-ink); paint-order: stroke; stroke: var(--al-bg); stroke-width: 3px; stroke-linejoin: round; }
.al-svg text.sw-lb .n { font: 400 9.5px var(--al-mono); fill: var(--al-ink-3); }
#sw-key { margin-top: 10px; }

/* ---------- 2. have evals gotten harder ---------- */
#lv-top { min-height: 52px; }
#lv-key { margin-top: 10px; min-height: 36px; align-content: flex-start; }
.lv-chart { position: relative; height: 290px; margin-top: 12px; }
.lv-chart .end { font: 400 11.5px var(--al-sans); fill: var(--al-ink-2); }
.lv-hl { stroke: var(--al-ink); opacity: 0; transition: opacity 0.12s ease; pointer-events: none; }

/* ---------- 3. except for robotics ---------- */
#ar-key { margin-top: 10px; }
.ar-head, .ar-row { display: grid; grid-template-columns: 190px minmax(0, 1fr) 62px; gap: 12px; align-items: center; }
.ar-head { margin-top: 10px; font: 400 10.5px/14px var(--al-sans); color: var(--al-ink-3); }
.ar-head span:last-child { grid-column: 2 / 4; text-align: right; }
.ar-rows { margin-top: 6px; display: grid; gap: 9px; }
.ar-name { display: flex; align-items: center; gap: 8px; min-width: 0; font: 400 12.5px/16px var(--al-sans); color: var(--al-ink); }
.ar-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-row.sub { margin-top: -3px; }
.ar-row.sub .ar-name { padding-left: 18px; color: var(--al-ink-3); }
.ar-bar { display: flex; height: 16px; border-radius: 3px; overflow: hidden; background: var(--al-panel); }
.ar-row.sub .ar-bar { height: 10px; }
.ar-bar i { display: block; flex: none; height: 100%; width: 0; background: var(--c); transition: width 0.6s cubic-bezier(0.45, 0, 0.1, 1); }
.ar-bar i + i { box-shadow: inset 1px 0 0 var(--al-bg); }
.ar-bar i.none { background: repeating-linear-gradient(135deg, var(--al-line) 0 2px, transparent 2px 5px); }
.ar-val { text-align: right; font: 500 12px/16px var(--al-mono); color: var(--al-ink); white-space: nowrap; }
.ar-val b { font-weight: 500; }
.ar-val span { font: 400 11px/16px var(--al-sans); color: var(--al-ink-4); }
.ar-row.few .ar-name { color: var(--al-ink-4); }

/* ---------- 4. which lab leads where ---------- */
#cr-top { min-height: 26px; }
#cr-key { margin-top: 10px; }
.cr-rows { margin-top: 14px; display: grid; gap: 6px; }
.cr-row { display: grid; grid-template-columns: 172px minmax(0, 1fr) 70px; gap: 12px; align-items: center; }
.cr-name { font: 400 12.5px/15px var(--al-sans); color: var(--al-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-bar { display: flex; height: 12px; border-radius: 2px; overflow: hidden; background: var(--al-panel); }
.cr-bar i { display: block; flex: none; height: 100%; width: 0; background: var(--c); transition: width 0.55s cubic-bezier(0.45, 0, 0.1, 1), filter 0.14s ease; }
.cr-bar i + i { box-shadow: inset 1px 0 0 var(--al-bg); }
@media (hover: hover) { .cr-bar i:hover, .ar-bar i:hover { filter: brightness(1.12); } }
.cr-val { display: flex; align-items: center; justify-content: flex-end; gap: 6px; font: 500 11.5px/15px var(--al-mono); color: var(--al-ink); white-space: nowrap; }
.cr-val b { font-weight: 500; }

/* ---------- 5. build your own index ---------- */
#ix-top { min-height: 66px; }
.ix-sub { margin-top: 5px; font: 400 12.5px/18px var(--al-sans); color: var(--al-ink-3); }
.ix-body { margin-top: 14px; display: grid; grid-template-columns: 208px minmax(0, 1fr); gap: 26px; align-items: start; }
.ix-w { display: grid; gap: 7px; align-content: start; min-height: 297px; }
.ix-s { display: grid; grid-template-columns: minmax(0, 1fr) 30px; gap: 1px 8px; align-items: center; }
.ix-s .nm { grid-column: 1 / 3; display: flex; align-items: center; gap: 7px; min-width: 0; font: 400 12px/16px var(--al-sans); color: var(--al-ink-2); }
.ix-s .nm span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ix-s .pc { text-align: right; font: 400 10.5px/14px var(--al-mono); color: var(--al-ink-3); }
.ix-s input { -webkit-appearance: none; appearance: none; width: 100%; height: 14px; margin: 0; background: transparent; cursor: pointer; touch-action: pan-y; }
.ix-s input::-webkit-slider-runnable-track { height: 3px; border-radius: 2px; background: linear-gradient(to right, var(--al-ink) var(--v, 50%), var(--al-line) var(--v, 50%)); }
.ix-s input::-moz-range-track { height: 3px; border-radius: 2px; background: var(--al-line); }
.ix-s input::-moz-range-progress { height: 3px; border-radius: 2px; background: var(--al-ink); }
.ix-s input::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -4.5px; border-radius: 50%; background: var(--al-ink); box-shadow: 0 0 0 2px var(--al-bg); transition: scale 0.14s ease; }
.ix-s input::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: var(--al-ink); box-shadow: 0 0 0 2px var(--al-bg); }
.ix-s input:active::-webkit-slider-thumb { scale: 1.2; }
.ix-s input:focus-visible { outline: 2px solid var(--al-area-knowledge); outline-offset: 2px; border-radius: 4px; }
.ix-r { position: relative; overflow: hidden; }
.ix-row { position: absolute; left: 0; right: 0; top: 0; height: 30px; display: grid; grid-template-columns: 14px 15px minmax(0, 1fr) 84px 34px; gap: 8px; align-items: center;
  transition: transform 0.42s cubic-bezier(0.3, 1.2, 0.5, 1), opacity 0.25s ease; will-change: transform; }
.ix-row .rk { font: 400 11px/1 var(--al-mono); color: var(--al-ink-4); text-align: right; }
.ix-row .nm { font: 400 12.5px/16px var(--al-sans); color: var(--al-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ix-row .bar { height: 6px; border-radius: 3px; background: var(--al-panel); overflow: hidden; }
.ix-row .bar i { display: block; height: 100%; border-radius: 3px; background: var(--c); transition: width 0.2s ease; }
.ix-row .val { font: 500 11.5px/1 var(--al-mono); color: var(--al-ink); text-align: right; }

/* ---------- 6. compare models ---------- */
#cm-top { min-height: 52px; }
.cm-pool { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.cm-chip { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; cursor: pointer; font: 400 12.5px/18px var(--al-sans); color: var(--al-ink-4); white-space: nowrap; transition: color 0.14s ease; }
.cm-chip .al-mark { opacity: 0.35; filter: grayscale(1); transition: opacity 0.14s ease, filter 0.14s ease; }
.cm-chip[aria-pressed="true"] { color: var(--al-ink); font-weight: 500; }
.cm-chip[aria-pressed="true"] .al-mark { opacity: 1; filter: none; }
@media (hover: hover) { .cm-chip:hover { color: var(--al-ink-2); } .cm-chip[aria-pressed="true"]:hover { color: var(--al-ink); } }
.cm-chip:focus-visible { outline: 2px solid var(--al-area-knowledge); outline-offset: 3px; border-radius: 3px; }
.cm-rows { position: relative; margin-top: 16px; }
.cm-row { position: absolute; left: 0; right: 0; height: 52px; transition: opacity 0.2s ease; }
.cm-row.off { opacity: 0; }
.cm-who { display: flex; align-items: center; gap: 7px; padding-top: 5px; font: 500 13px/17px var(--al-sans); color: var(--al-ink); white-space: nowrap; }
.cm-n { margin: 2px 0 0 22px; font: 400 11.5px/15px var(--al-sans); color: var(--al-ink-3); }
.cm-toks { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.cm-t { position: absolute; left: 0; top: 0; border-radius: 2px; background: var(--c); transform-origin: 50% 50%; pointer-events: auto;
  transition: transform 0.5s cubic-bezier(0.45, 0, 0.1, 1), background-color 0.3s ease; }
.cm-t.tie { background: transparent; box-shadow: inset 0 0 0 1.5px var(--c); }
.cm-t::after { content: ""; position: absolute; inset: -2px; }

/* ---------- 7. it stays current ---------- */
.dy-body { margin-top: 16px; }
.dy-src { display: grid; gap: 6px; }
.dy-g { display: grid; grid-template-columns: 86px minmax(0, 1fr); gap: 10px; }
.dy-g b { font: 400 10.5px/19px var(--al-sans); color: var(--al-ink-3); }
.dy-g > div { display: flex; flex-wrap: wrap; gap: 0 14px; }
.dy-s { font: 400 12.5px/19px var(--al-sans); color: var(--al-ink-4); white-space: nowrap; transition: color 0.14s ease; }
.dy-s.on { color: var(--al-ink-2); }
.dy-s.live { color: var(--al-ink); }
.dy-s i { margin-left: 4px; font: 500 10.5px/1 var(--al-mono); font-style: normal; color: var(--al-good); opacity: 0; }
.dy-s.hit i { opacity: 1; }
.dy-s.pop i { display: inline-block; animation: al-in 0.2s ease-out both; }
.dy-rail li.live span { color: transparent; background: linear-gradient(90deg, var(--al-ink-3) 0%, var(--al-ink-3) 35%, var(--al-ink) 50%, var(--al-ink-3) 65%, var(--al-ink-3) 100%) 0 0 / 200% 100%;
  -webkit-background-clip: text; background-clip: text; animation: al-shimmer 1.6s linear infinite; }
.dy-rail li.live span b { color: transparent; }
.dy-rail { position: relative; margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.dy-rail li { position: relative; display: grid; grid-template-columns: 7px minmax(0, 1fr); gap: 11px; min-height: 19px; opacity: 0; font: 400 12.5px/19px var(--al-sans); color: var(--al-ink-2); }
.dy-rail li.live, .dy-rail li.on { opacity: 1; }
.dy-rail li.in { animation: al-in 0.2s ease-out both; }
.dy-rail li > i { position: relative; z-index: 1; width: 7px; height: 7px; margin-top: 6px; border-radius: 50%; background: var(--al-ink-4); }
.dy-rail li.on > i { background: var(--al-good); }
.dy-rail li.live > i { background: var(--al-ink); }
/* a finished step draws the rail down to the next one, once that one has arrived */
.dy-rail li.on + li.on::before { content: ""; position: absolute; left: 3px; bottom: calc(100% - 4px); width: 1px; height: calc(100% - 4px); background: var(--al-line); }
.dy-rail b { font-weight: 500; color: var(--al-ink); font-variant-numeric: tabular-nums; }
@keyframes al-in { from { opacity: 0; filter: blur(6px); } to { opacity: 1; filter: blur(0); } }
@keyframes al-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ---------- 8. what people built with it ---------- */
#after .tw { margin: 13px 0 0; }
#d-after { height: auto; aspect-ratio: 16 / 9; }
.sb { position: absolute; inset: 10px; display: block; border-radius: 6px; overflow: hidden; background: #faf9f6; }
.sb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity 0.25s ease; }
.sb img.on { opacity: 1; }

/* ---------- phones ---------- */
@media (max-width: 640px) {
  .al { margin: 8px; }
  .al-in { padding: 16px 14px 14px; }
  .al-h { font-size: 23px; line-height: 28px; }
  .al-h.sm { font-size: 19px; line-height: 24px; }
  #sw-head, #lv-top, #cm-top { min-height: 72px; }
  .lv-chart { height: 250px; }
  .ar-head, .ar-row { grid-template-columns: minmax(0, 1fr) 62px; gap: 3px 10px; }
  .ar-head span:first-child { display: none; }
  .ar-head span:last-child { grid-column: 1 / 3; }
  .ar-name { grid-column: 1 / 3; }
  .ar-rows { gap: 10px; }
  .ar-row.sub { margin-top: -2px; }
  .ar-row.sub .ar-name { padding-left: 0; }
  .cr-row { grid-template-columns: 118px minmax(0, 1fr) 58px; gap: 8px; }
  .cr-name { font-size: 11.5px; line-height: 13px; white-space: normal; text-wrap: balance; }
  .cr-val { font-size: 11px; gap: 4px; }
  #ix-top { min-height: 92px; }
  .ix-body { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .ix-w { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 18px; min-height: 144px; }
  #lv-key { min-height: 56px; }
  .ix-row { grid-template-columns: 14px 15px minmax(0, 1fr) 56px 34px; }
  .cm-row { height: 62px; }
  .cm-who { display: inline-flex; padding-top: 2px; }
  .cm-n { display: inline; margin-left: 8px; }
  .dy-g { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .dy-g b { line-height: 15px; }
  .al-svg text.sw-lb { font-size: 10.5px; }
  .sb { inset: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .dy-rail li.live span { animation: none; }
}
