/* Benchmarks: the scatter, the radar and the ranking. */

.bench { background: radial-gradient(70% 45% at 15% 0%, rgba(78, 142, 184, 0.09), transparent 70%); }
.bench-scatter, .bench-radar, .bench-board {
  position: relative; border: 1px solid var(--line); border-radius: var(--r-l);
  background: linear-gradient(180deg, rgba(14, 23, 41, 0.75), rgba(8, 13, 24, 0.7));
  padding: clamp(16px, 2.6vw, 30px);
}
.bench-date { margin-top: 12px; font-size: 0.875rem; color: var(--fog); }
/* Drawn at its real size (bench-scatter.js), so the type below is the size you see. */
.scatter { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--font); }
.sc-grid line { stroke: rgba(172, 198, 226, 0.09); }
.sc-grid line.v { stroke-dasharray: 2 7; }
.sc-tick { font-size: 13px; fill: var(--fog); font-variant-numeric: tabular-nums; }
.sc-axis { font-size: 13px; font-weight: 600; fill: var(--mist); }
.sc-zone { opacity: 0; transition: opacity 1.2s 1.6s; }
.sc-zone-label { font-size: 13px; font-weight: 600; fill: rgba(240, 196, 143, 0.75); opacity: 0; transition: opacity 0.8s 2.2s; }
.go .sc-zone, .go .sc-zone-label { opacity: 1; }
.sc-tensor-line { fill: none; stroke: var(--copper-lite); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.sc-tensor-glow { fill: none; stroke: var(--copper); stroke-width: 10; stroke-linecap: round; opacity: 0; }
.go .sc-tensor-line { stroke-dashoffset: 0; transition: stroke-dashoffset 1.3s var(--ease) 1.1s; }
.go .sc-tensor-glow { opacity: 0.45; transition: opacity 1s 1.9s; }
.sc-pt { opacity: 0; transform: translateY(10px); transition: opacity 0.5s var(--d), transform 0.7s var(--ease) var(--d); cursor: default; }
.go .sc-pt { opacity: 1; transform: none; }
.sc-pt .dot { fill: var(--c); stroke: #060a12; stroke-width: 2; transform-box: fill-box; transform-origin: center; transition: transform 0.3s var(--ease); }
.sc-pt .hit { fill: transparent; }
.sc-pt .halo { fill: var(--copper); opacity: 0.22; transform-box: fill-box; transform-origin: center; animation: halo 2.8s ease-in-out infinite; }
@keyframes halo { 50% { transform: scale(1.45); opacity: 0.06; } }
.sc-pt.tensor .dot { fill: var(--copper-lite); stroke: rgba(255, 244, 230, 0.5); }
.sc-label { font-size: 13px; font-weight: 500; fill: var(--mist); }
.sc-lead { stroke: var(--line-2); stroke-width: 1; }
.sc-pt.tensor .sc-lead { stroke: rgba(240, 196, 143, 0.55); }
.sc-pt.tensor .sc-label { font-size: 14.5px; font-weight: 700; fill: var(--frost); }
.scatter.tall .sc-pt.tensor .sc-label { font-size: 13.5px; }
.sc-caption {
  display: flex; gap: 10px; align-items: baseline; margin: 6px 0 4px; font-size: 0.9rem; font-weight: 600; line-height: 1.45; color: var(--copper-lite);
}
.sc-caption::before { content: ""; flex: none; width: 14px; height: 7px; border: 1.5px solid currentColor; border-bottom: 0; border-radius: 2px 2px 0 0; }
.go.focus .sc-pt:not(.hot) { opacity: 0.3; transition-delay: 0s; }
.sc-pt.hot .dot { transform: scale(1.45); }
.sc-pt.hot .sc-label { fill: var(--frost); }
.sc-note path { fill: none; stroke: var(--copper-lite); stroke-width: 1.5; stroke-dasharray: 1; stroke-dashoffset: 1; }
.sc-note text { font-size: 14px; font-weight: 650; fill: var(--copper-lite); opacity: 0; }
.go .sc-note path { stroke-dashoffset: 0; transition: stroke-dashoffset 1s var(--ease) 2.3s; }
.go .sc-note text { opacity: 1; transition: opacity 0.8s 2.9s; }
.sc-tip {
  position: absolute; left: 0; top: 0; z-index: 2; min-width: 170px; padding: 11px 13px; border-radius: 12px; pointer-events: none;
  background: rgba(10, 17, 31, 0.95); border: 1px solid var(--line-2); box-shadow: 0 18px 44px -14px rgba(0, 0, 0, 0.8);
  opacity: 0; transition: opacity 0.15s; margin: -12px 0 0 18px; translate: 0 -100%;
}
.sc-tip.flip { margin-left: -18px; translate: -100% -100%; }
.sc-tip.on { opacity: 1; }
.sc-tip strong { display: block; font-size: 0.95rem; }
.sc-tip > span { display: block; font-size: 0.78rem; color: var(--fog); margin-bottom: 8px; }
.sc-tip dl { display: grid; grid-template-columns: auto auto; gap: 2px 14px; font-size: 0.82rem; }
.sc-tip dt { color: var(--mist); }
.sc-tip dd { margin: 0; text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }
.sc-legend { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 10px; font-size: 0.85rem; color: var(--mist); }
.sc-legend i { display: inline-block; width: 9px; height: 9px; margin-right: 8px; border-radius: 50%; background: var(--fog); }
.sc-legend .t i { background: var(--copper-lite); box-shadow: 0 0 10px var(--copper); }
.sc-legend .z i { width: 14px; border-radius: 3px; background: linear-gradient(135deg, rgba(240, 196, 143, 0.5), rgba(240, 196, 143, 0.06)); }
.sc-hint { width: 100%; color: var(--fog); }

.bench-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 16px; margin-top: 16px; }
/* Why a tier can beat one model: the claim of the chart above, in words. */
.bench-why { display: grid; grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr); gap: 12px 48px; align-items: baseline; margin: 30px 0 14px; padding: 26px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.bench-why h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); letter-spacing: -0.02em; }
.bench-why p { max-width: 62ch; font-size: 1rem; line-height: 1.6; color: var(--mist); }
@media (max-width: 759px) { .bench-why { grid-template-columns: minmax(0, 1fr); } }
.bench-card-head h3 { font-size: 1.125rem; }
.bench-card-head p { margin-top: 4px; font-size: 0.875rem; color: var(--fog); }
.radar-tabs { margin: 18px 0 6px; }
.radar-tabs button { padding: 7px 13px; font-size: 0.875rem; }
.radar-tabs button span { font-size: 0.7rem; }
.radar { display: block; width: 100%; max-width: 520px; height: auto; margin: 0 auto; overflow: visible; font-family: var(--font); }
.radar .ring { fill: none; stroke: rgba(172, 198, 226, 0.1); }
.radar .ring.outer { stroke: rgba(172, 198, 226, 0.22); }
.radar .spoke { stroke: rgba(172, 198, 226, 0.1); }
.radar .ring-label { font-size: 10px; fill: var(--fog); }
.radar .axis-label { font-size: 12.5px; font-weight: 550; fill: var(--mist); }
.radar .shape { fill: none; stroke: var(--c); stroke-width: 1.8; stroke-linejoin: round; }
.radar .shape.s0 { fill: rgba(240, 196, 143, 0.15); stroke: var(--copper-lite); stroke-width: 2.4; filter: drop-shadow(0 0 10px rgba(200, 144, 96, 0.45)); }
.radar .shape.s2 { stroke-dasharray: 5 5; }
.radar-key { list-style: none; padding: 0; display: grid; gap: 8px; margin-top: 10px; }
.radar-key li { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 0.9rem; color: var(--mist); }
.radar-key i { width: 16px; height: 3px; border-radius: 2px; background: var(--c); }
.radar-key li:nth-child(3) i { background: repeating-linear-gradient(90deg, var(--c) 0 5px, transparent 5px 8px); }
.radar-key li.t { font-weight: 650; color: var(--frost); }
.radar-key li.t i { background: var(--copper-lite); box-shadow: 0 0 8px var(--copper); }
.radar-key b { font-weight: 650; color: var(--frost); }
/* Narrow cards: three bars per category instead of the radar. */
.radar-panel.is-bars .radar-key { margin: 4px 0 18px; }
.cat-bars { display: grid; gap: 14px; }
.cat-name { margin-bottom: 6px; font-size: 0.875rem; font-weight: 600; color: var(--mist); }
.cat-row { display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: center; gap: 10px; height: 15px; }
.cat-row i { position: relative; height: 6px; border-radius: 3px; background: rgba(232, 238, 246, 0.06); }
.cat-row i::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--c); opacity: 0.9;
  transform: scaleX(var(--v, 0)); transform-origin: left; transition: transform 0.8s var(--ease);
}
.cat-row.s0 i::after { opacity: 1; background: linear-gradient(90deg, var(--copper), var(--copper-lite)); box-shadow: 0 0 10px rgba(200, 144, 96, 0.55); }
.cat-row.s2 i::after { background: repeating-linear-gradient(90deg, var(--c) 0 6px, transparent 6px 9px); }
.cat-row b { font-size: 0.8rem; font-weight: 600; text-align: right; color: var(--mist); }
.cat-row.s0 b { color: var(--copper-lite); }

.board-cols, .board li { display: grid; grid-template-columns: 24px minmax(0, 1.25fr) minmax(0, 1fr) 54px 38px; gap: 10px; align-items: center; }
.board-cols { margin: 18px 0 6px; padding: 0 8px; font-size: 0.75rem; font-weight: 600; color: var(--fog); }
.board-cols span:first-child { grid-column: 2; }
.board-cols span:last-child { grid-column: 4 / span 2; text-align: right; }
.board { list-style: none; padding: 0; margin: 0; display: grid; gap: 1px; }
.board li { padding: 7px 8px; border-radius: 9px; font-size: 0.875rem; transition: background-color 0.2s; }
.board li.tensor { background: rgba(200, 144, 96, 0.09); }
.board li.hot { background: rgba(232, 238, 246, 0.08); }
.b-rank { font-size: 0.78rem; color: var(--fog); text-align: right; }
.b-name { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--mist); }
.b-name span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.b-name i { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--c); }
.board li.tensor .b-name { font-weight: 680; color: var(--frost); }
.b-bar { height: 6px; overflow: hidden; border-radius: 3px; background: rgba(232, 238, 246, 0.06); }
.b-bar i { display: block; width: calc(var(--w) * 100%); height: 100%; border-radius: 3px; background: var(--c); opacity: 0.85; transform: scaleX(0); transform-origin: left; transition: transform 1.1s var(--ease) var(--d); }
.go .b-bar i { transform: none; }
.board li.tensor .b-bar i { opacity: 1; background: linear-gradient(90deg, var(--copper), var(--copper-lite)); box-shadow: 0 0 12px rgba(200, 144, 96, 0.6); }
.b-score { font-weight: 650; text-align: right; }
.b-cost { color: var(--fog); text-align: right; }
.b-cost small { display: none; }
.board li.tensor .b-cost { color: var(--copper-lite); font-weight: 650; }
.bench-note { max-width: 62em; margin-top: 22px; font-size: 0.875rem; color: var(--fog); }

@media (max-width: 1023px) {
  .bench-grid { grid-template-columns: minmax(0, 1fr); }
}
/* Phones: every row gets two lines, so no name is cut short. */
@media (max-width: 599px) {
  .bench-scatter, .bench-radar, .bench-board { padding: 16px 14px; }
  .board-cols { display: none; }
  .board li {
    grid-template-columns: 22px minmax(0, 1fr) auto; grid-template-areas: "rank name score" "rank bar cost";
    gap: 6px 10px; padding: 9px 10px;
  }
  .b-rank { grid-area: rank; align-self: start; padding-top: 1px; }
  .b-name { grid-area: name; }
  .b-name span { white-space: normal; }
  .b-bar { grid-area: bar; }
  .b-score { grid-area: score; }
  .b-cost { grid-area: cost; font-size: 0.78rem; }
  .b-cost small { display: inline; margin-right: 5px; font-size: 0.72rem; color: var(--fog); }
}
