/* Key insights: cross-benchmark findings shown above the boards, one at a time.
   Each card has two parts. The finding, on the left, reads top to bottom: the claim,
   the one number behind it, an example, and the board to open. The evidence, on the
   right, is a titled figure with its key beside the title and its method note in a
   tooltip. Figures and copy come from KEY_INSIGHTS in index.html, never from this file. */
.ki-section { --ki-card:var(--fw-surface,#FFFFFF);max-width:var(--content-width,1120px);margin:0 auto;padding:48px 48px 0; }
/* A hairline at the boards' width closes the strip off from the boards below. */
.ki-section + .boards-section { padding-top:64px; }
.ki-section + .boards-section::before { content:"";display:block;margin:-32px 0 31px;border-top:1px solid var(--fw-border,#E6EAF4); }
.ki-head { display:flex;align-items:flex-end;justify-content:space-between;gap:24px; }
.ki-section .ki-title { margin:0;font-size:24px;line-height:28px; }
.ki-nav { display:flex;align-items:center;gap:8px;flex:none; }
/* The tabs show the position; this only announces a change to screen readers. */
.ki-status { position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap; }
.ki-arrow { display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border:1px solid var(--fw-border,#E6EAF4);background:var(--fw-surface,#FFFFFF);cursor:pointer;transition:background-color 200ms,border-color 200ms; }
.ki-arrow:hover { border-color:var(--fw-brand,#6726FE);background:var(--fw-brand-light,#FAF7FF); }
.ki-arrow img { display:block; }
.ki-arrow-back { transform:scaleX(-1); }
/* Most of the card's rows are buttons, which otherwise fall back to the browser's font. */
:where(.ki-section) button { font-family:inherit;color:inherit; }

/* The tabs and the slides read as one card: the tabs are its header, the active one
   underlined. */
.ki-tabs { display:flex;gap:28px;margin-top:16px;padding:0 32px;border:1px solid var(--fw-border,#E6EAF4);border-radius:12px 12px 0 0;background:var(--ki-card);overflow-x:auto;scrollbar-width:none; }
.ki-tabs::-webkit-scrollbar { display:none; }
.ki-tab { flex:none;margin:0;padding:16px 0 14px;border:0;background:none;cursor:pointer;font-family:inherit;font-size:14px;line-height:18px;font-weight:500;letter-spacing:0;text-transform:none;color:var(--fw-ink-muted,#696969);white-space:nowrap;box-shadow:inset 0 -2px 0 transparent;transition:color 200ms,box-shadow 200ms; }
.ki-tab:hover { color:var(--fw-ink,#16181D); }
.ki-tab[aria-pressed="true"] { color:var(--fw-ink,#16181D);box-shadow:inset 0 -2px 0 var(--fw-accent,var(--fw-brand,#6726FE)); }

.ki-viewport { overflow:hidden;border:1px solid var(--fw-border,#E6EAF4);border-top:0;border-radius:0 0 12px 12px;background:var(--ki-card); }
.ki-track { display:flex;transition:transform 500ms cubic-bezier(.33,1,.68,1); }
/* Slides share the tallest slide's height, so everything aligns to the top and the rule
   between the finding and the evidence runs the full height of every slide. */
.ki-card { flex:0 0 100%;min-width:0;display:grid;grid-template-columns:minmax(0,5fr) minmax(0,6fr);grid-template-rows:auto 1fr;align-items:start;padding:32px;visibility:visible; }
/* Hidden slides leave the tab order once they have slid out of view. */
.ki-card[aria-hidden="true"] { visibility:hidden;transition:visibility 0s 500ms; }

/* The finding. */
.ki-copy { grid-column:1;grid-row:1 / span 2;align-self:stretch;display:flex;flex-direction:column;align-items:flex-start;min-width:0;padding-right:40px;border-right:1px solid var(--fw-border,#E6EAF4); }
.ki-section .ki-claim { margin:0;font-size:24px;line-height:1.25;text-wrap:balance; }
.ki-stat { align-self:stretch;display:flex;flex-wrap:wrap;align-items:center;gap:6px 16px;margin:20px 0 0; }
.ki-stat-value { font-family:var(--fw-font-display,'Inter',sans-serif);font-size:44px;line-height:1;font-weight:var(--fw-weight-heading,550);letter-spacing:var(--fw-heading-tracking,-.04em);color:var(--fw-ink,#16181D);font-variant-numeric:tabular-nums;white-space:nowrap; }
.ki-stat-note { flex:1 1 160px;max-width:240px;font-size:13px;line-height:18px;color:var(--fw-ink-muted,#696969); }
.ki-body { margin:20px 0 0;font-size:15px;line-height:1.5;font-weight:var(--fw-weight-body,400);color:var(--fw-ink-secondary,#5A5E63); }
.ki-footnote { margin:8px 0 0;font-size:12px;line-height:16px;color:var(--fw-ink-muted,#696969); }
.ki-link { display:inline-flex;align-items:center;gap:6px;margin-top:20px;padding:0;border:0;background:none;cursor:pointer;font-family:inherit;font-size:14px;line-height:20px;font-weight:500;letter-spacing:0;text-transform:none;color:var(--fw-ink,#16181D);text-align:left; }
.ki-link img { flex:none;transition:transform 200ms; }
.ki-link:hover { color:var(--fw-accent,var(--fw-brand-hover,#501BC4)); }
.ki-link:hover img { transform:translateX(2px); }

/* The evidence. The "+ N more" list of the open-models card opens in a row of its own
   under the figure. */
.ki-figure { grid-column:2;grid-row:1;min-width:0;padding-left:40px; }
.ki-figure-tail { grid-column:2;grid-row:2;min-width:0;padding-left:40px; }
.ki-more-panel > .ki-rows { margin-top:12px; }
.ki-figure-head { position:relative;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px 16px;margin-bottom:14px; }
.ki-figure-title { display:inline-flex;align-items:center;gap:6px;margin:0;font-family:var(--fw-font-label,'JetBrains Mono',ui-monospace,monospace);font-size:11px;line-height:16px;font-weight:500;letter-spacing:var(--fw-label-tracking,.04em);text-transform:uppercase;color:var(--fw-ink-muted,#696969); }
/* The method note opens under the title, across the figure. */
.ki-figure-head .ki-info { position:static;width:14px;height:14px; }
.ki-figure-head .ki-info img { display:block;width:14px;height:14px; }
.ki-figure-head .leaderboard-info-tooltip { top:calc(100% + 4px);left:0;width:320px;max-width:100%;font-family:var(--fw-font-text,'Inter',sans-serif);font-weight:400;letter-spacing:0;text-transform:none; }
.ki-legend { display:flex;flex-wrap:wrap;gap:4px 14px; }
.ki-legend-item { display:inline-flex;align-items:center;gap:6px;font-size:12px;line-height:16px;color:var(--fw-ink-muted,#696969); }
.ki-legend-swatch { flex:none;width:9px;height:9px;border:1px solid var(--fw-border,#E6EAF4);background:var(--fw-surface-muted,#F5F5F5); }
.ki-legend-swatch.is-on { border-color:var(--fw-brand,#6726FE);background:var(--fw-brand,#6726FE); }
.ki-legend-headroom { border:0;background:var(--fw-color-neutrals-200,#BABABA); }
.ki-legend-headroom.is-open { background:var(--fw-brand,#6726FE); }
.ki-more { margin:12px 0 0;font-size:13px;line-height:18px;color:var(--fw-ink-muted,#696969); }
.ki-more-toggle { display:block;padding:0;border:0;background:none;cursor:pointer;font-family:inherit;text-align:left;text-decoration:underline;text-decoration-color:transparent;text-underline-offset:3px;transition:color 200ms,text-decoration-color 200ms; }
.ki-more-toggle:hover, .ki-more-toggle[aria-expanded="true"] { color:var(--fw-ink,#16181D);text-decoration-color:currentColor; }
.ki-figure-note { margin:8px 0 0;font-size:12px;line-height:16px;color:var(--fw-ink-muted,#696969); }

/* Leadership: one cell per benchmark, marked with the leading model's provider. */
.ki-cells { display:grid;grid-template-columns:repeat(var(--ki-cell-cols,17),minmax(0,1fr));gap:3px; }
.ki-cell { display:inline-flex;align-items:center;justify-content:center;aspect-ratio:1;padding:0;border:1px solid var(--fw-border,#E6EAF4);background:var(--fw-surface,#FFFFFF);cursor:pointer;transition:border-color 200ms,background-color 200ms; }
.ki-cell:hover { border-color:var(--fw-brand,#6726FE);background:var(--fw-brand-light,#FAF7FF); }
.ki-cell img { display:block;width:14px;height:14px;object-fit:contain; }
.ki-providers { display:flex;flex-wrap:wrap;gap:6px 14px;margin-top:14px; }
.ki-provider { display:inline-flex;align-items:center;gap:5px;font-size:12px;line-height:16px;color:var(--fw-ink-secondary,#5A5E63); }
.ki-provider img { display:block;width:12px;height:12px;object-fit:contain; }
.ki-provider-count { font-family:var(--fw-font-label,'JetBrains Mono',ui-monospace,monospace);font-weight:500;color:var(--fw-ink,#16181D);font-variant-numeric:tabular-nums; }

/* Strengths: one row per editorial grouping, one cell per board in it. A filled cell is
   a board the named family leads; an unfilled one carries whoever leads it instead. */
.ki-strengths { display:flex;flex-direction:column; }
.ki-strength { display:grid;grid-template-columns:minmax(0,1fr) auto 32px;align-items:center;gap:12px;padding:10px 0;border-top:1px solid var(--fw-border,#E6EAF4); }
.ki-strength:last-child { border-bottom:1px solid var(--fw-border,#E6EAF4); }
.ki-strength-label { display:flex;flex-direction:column;gap:2px;min-width:0;font-size:12px;line-height:16px;color:var(--fw-ink-muted,#696969); }
.ki-strength-family { font-size:14px;line-height:18px;font-weight:500;color:var(--fw-ink,#16181D); }
.ki-strength-work { font-weight:var(--fw-weight-body,400);color:var(--fw-ink-secondary,#5A5E63); }
.ki-strength-cells { display:grid;grid-template-columns:repeat(4,24px);gap:3px; }
.ki-strength-cell { display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:1px solid var(--fw-border,#E6EAF4);background:var(--fw-surface-muted,#F5F5F5);cursor:pointer;transition:border-color 200ms,background-color 200ms; }
.ki-strength-cell.is-on { border-color:var(--fw-brand,#6726FE);background:var(--fw-brand-light,#FAF7FF); }
.ki-strength-cell:hover { border-color:var(--fw-ink,#16181D); }
.ki-strength-cell img { display:block;width:12px;height:12px;object-fit:contain; }
.ki-strength-count { font-family:var(--fw-font-label,'JetBrains Mono',ui-monospace,monospace);font-size:13px;line-height:18px;font-weight:500;color:var(--fw-ink,#16181D);font-variant-numeric:tabular-nums;text-align:right; }

/* Headroom: one labelled row per unsolved benchmark. The grey bar is the best score, the
   dark bar over it the best open model's, and the rest of the track up to 100% is the
   headroom. */
.ki-bars { display:flex;flex-direction:column;gap:8px; }
.ki-bar-row { display:grid;grid-template-columns:132px minmax(0,1fr) 48px;align-items:center;gap:12px;width:100%;padding:0;border:0;background:none;cursor:pointer;text-align:left; }
.ki-bar-name { min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;line-height:18px;color:var(--fw-ink-secondary,#5A5E63);transition:color 200ms; }
.ki-bar-row:hover .ki-bar-name { color:var(--fw-ink,#16181D); }
.ki-bar-track { position:relative;height:10px;background:var(--fw-surface-muted,#F5F5F5); }
.ki-bar-best, .ki-bar-open { position:absolute;left:0;top:0;bottom:0; }
.ki-bar-best { background:var(--fw-color-neutrals-200,#BABABA); }
.ki-bar-open { background:var(--fw-brand,#6726FE); }
.ki-bar-value { font-family:var(--fw-font-label,'JetBrains Mono',ui-monospace,monospace);font-size:13px;line-height:18px;font-weight:500;color:var(--fw-ink,#16181D);font-variant-numeric:tabular-nums;text-align:right; }

/* Rank variance: two of the model's leaderboards, one square per model from first on the
   left to last on the right, with the model's own square filled. */
.ki-lineups { display:flex;flex-direction:column;gap:16px; }
.ki-lineup { display:flex;flex-direction:column;gap:6px;width:100%;padding:0;border:0;background:none;cursor:pointer;text-align:left; }
.ki-lineup-head { display:flex;align-items:baseline;justify-content:space-between;gap:12px; }
.ki-lineup-name { min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;line-height:18px;font-weight:500;color:var(--fw-ink,#16181D);transition:color 200ms; }
.ki-lineup:hover .ki-lineup-name { color:var(--fw-accent,var(--fw-brand-hover,#501BC4)); }
.ki-lineup-rank { flex:none;font-family:var(--fw-font-label,'JetBrains Mono',ui-monospace,monospace);font-size:13px;line-height:18px;font-weight:500;color:var(--fw-ink,#16181D);font-variant-numeric:tabular-nums; }
.ki-lineup-cells { display:flex;gap:3px; }
.ki-lineup-cell { flex:1 1 0;min-width:0;height:22px;border:1px solid var(--fw-border,#E6EAF4);background:var(--fw-surface-muted,#F5F5F5); }
.ki-lineup-cell.is-on { border-color:var(--fw-brand,#6726FE);background:var(--fw-brand,#6726FE); }
.ki-range { display:flex;justify-content:space-between;gap:12px;margin-top:6px;font-size:12px;line-height:16px;color:var(--fw-ink-muted,#696969); }
.ki-range span { min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }

/* Open models: their closest results to first place. Each row names the model and the
   board, then how far it is from first and what it saves. */
.ki-rows { display:flex;flex-direction:column; }
.ki-row { display:grid;grid-template-columns:16px minmax(0,1fr) auto;align-items:center;gap:12px;width:100%;padding:10px 4px;border:0;border-top:1px solid var(--fw-border,#E6EAF4);background:none;cursor:pointer;text-align:left;transition:background-color 200ms; }
.ki-row:last-child { border-bottom:1px solid var(--fw-border,#E6EAF4); }
.ki-row:hover { background:var(--fw-surface-muted,#F5F5F5); }
.ki-row-mark img { display:block;width:16px;height:16px;object-fit:contain; }
.ki-row-label { display:flex;flex-direction:column;gap:1px;min-width:0; }
.ki-row-model, .ki-row-bench { overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.ki-row-model { font-size:14px;line-height:18px;font-weight:500;color:var(--fw-ink,#16181D); }
.ki-row-bench { font-size:12px;line-height:16px;color:var(--fw-ink-muted,#696969); }
/* Fixed columns, so a row with no saving keeps its gap under the others. */
.ki-row-side { display:grid;grid-template-columns:64px 92px;align-items:center;justify-items:end;column-gap:16px; }
.ki-row-value { grid-column:1;font-family:var(--fw-font-label,'JetBrains Mono',ui-monospace,monospace);font-size:13px;line-height:18px;font-weight:500;color:var(--fw-ink,#16181D);font-variant-numeric:tabular-nums;text-align:right;white-space:nowrap; }
.ki-row-value.is-first { padding:1px 8px;border-radius:96px;background:var(--fw-brand-light,#FAF7FF);font-family:inherit;font-size:12px; }
.ki-row-edge { grid-column:2;font-size:13px;line-height:18px;color:var(--fw-ink-secondary,#5A5E63);font-variant-numeric:tabular-nums;text-align:right;white-space:nowrap; }

/* Cost vs. quality: the leader and a cheaper model near it, on score and then on cost,
   each bar labelled with its model. */
.ki-compare { display:flex;flex-direction:column;gap:16px; }
.ki-compare-group { display:flex;flex-direction:column;gap:6px; }
.ki-compare-heading { font-size:12px;line-height:16px;color:var(--fw-ink-muted,#696969); }
.ki-compare-row { display:grid;grid-template-columns:120px minmax(0,1fr) 64px;align-items:center;gap:12px; }
.ki-compare-name { min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;line-height:18px;color:var(--fw-ink-secondary,#5A5E63); }
.ki-compare-name.is-on { color:var(--fw-ink,#16181D);font-weight:500; }
.ki-compare-track { position:relative;height:12px;background:var(--fw-surface-muted,#F5F5F5); }
.ki-compare-bar { position:absolute;left:0;top:0;bottom:0;min-width:2px;background:var(--fw-color-neutrals-200,#BABABA); }
.ki-compare-bar.is-on { background:var(--fw-brand,#6726FE); }
.ki-compare-value { font-family:var(--fw-font-label,'JetBrains Mono',ui-monospace,monospace);font-size:13px;line-height:18px;font-weight:500;color:var(--fw-ink,#16181D);font-variant-numeric:tabular-nums;text-align:right; }

/* Narrower screens stack the evidence under the finding. */
@media (max-width:960px) {
  .ki-section { padding:40px 24px 0; }
  .ki-section + .boards-section { padding-top:48px; }
  .ki-section + .boards-section::before { margin:-24px 0 23px; }
  .ki-card { grid-template-columns:minmax(0,1fr);grid-template-rows:none; }
  .ki-copy { grid-column:1;grid-row:auto;align-self:start;padding:0 0 24px;border-right:0;border-bottom:1px solid var(--fw-border,#E6EAF4); }
  .ki-figure, .ki-figure-tail { grid-column:1;grid-row:auto;padding-left:0; }
  .ki-figure { padding-top:24px; }
}
@media (max-width:640px) {
  .ki-head { align-items:center; }
  .ki-tabs { gap:22px;padding:0 20px; }
  .ki-card { padding:20px; }
  .ki-copy { padding-bottom:20px; }
  .ki-figure { padding-top:20px; }
  .ki-stat-value { font-size:36px; }
  .ki-bar-row { grid-template-columns:104px minmax(0,1fr) 44px; }
  .ki-compare-row { grid-template-columns:96px minmax(0,1fr) 56px; }
  .ki-cells { grid-template-columns:repeat(11,minmax(0,1fr)); }
  /* Phones stack the saving under the gap. */
  .ki-row-side { grid-template-columns:auto;row-gap:2px; }
  .ki-row-edge { grid-column:1;font-size:12px;line-height:16px; }
}
@media (prefers-reduced-motion:reduce) {
  .ki-track, .ki-cell, .ki-strength-cell, .ki-bar-name, .ki-lineup-name, .ki-row, .ki-link img, .ki-tab, .ki-arrow, .ki-more-toggle { transition:none; }
}
