/* SAB results page. Type, color and spacing follow mento.vc (tokens.generated.css,
   design-system.css): DM Sans headings, Inter body, Supply Mono labels, ink #04212b
   on white, teal and mint accents, square corners. */

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url("/sab-bench/assets/fonts/dmsans-latin.woff2") format("woff2");
  unicode-range: U+0-FF, U+131, U+152-153, U+2BB-2BC, U+2C6, U+2DA, U+2DC, U+304, U+308, U+329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url("/sab-bench/assets/fonts/dmsans-latin-ext.woff2") format("woff2");
  unicode-range: U+100-2BA, U+2BD-2C5, U+2C7-2CC, U+2CE-2D7, U+2DD-2FF, U+1E00-1E9F, U+2020,
    U+20A0-20AB, U+20AD-20C4, U+2113, U+A720-A7FF;
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/sab-bench/assets/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0-FF, U+131, U+152-153, U+2BB-2BC, U+2C6, U+2DA, U+2DC, U+304, U+308, U+329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/sab-bench/assets/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+100-2BA, U+2BD-2C5, U+2C7-2CC, U+2CE-2D7, U+2DD-2FF, U+1E00-1E9F, U+2020,
    U+20A0-20AB, U+20AD-20C4, U+2113, U+A720-A7FF;
}
@font-face {
  font-family: supplyMono;
  font-weight: 400;
  font-display: swap;
  src: url("/sab-bench/assets/fonts/supplymono-regular.woff2") format("woff2");
}

:root {
  --ink: #04212b;
  --ink-80: rgba(4, 33, 43, 0.8);
  --ink-60: rgba(4, 33, 43, 0.6);
  --ink-40: rgba(4, 33, 43, 0.4);
  --ink-12: rgba(4, 33, 43, 0.12);
  --ink-06: rgba(4, 33, 43, 0.06);
  --teal: #258a86;
  --mint: #98ede0;
  --mint-50: #e7f9f2;
  --amber: #d99a2b;
  --rust: #b8573a;
  --page: #ffffff;
  --display: "DM Sans", "DM Sans Fallback", Arial, sans-serif;
  --body: Inter, "Inter Fallback", Arial, sans-serif;
  --mono: supplyMono, "SF Mono", "Courier New", monospace;
  --inset: clamp(20px, 9.7vw, 140px);
  --content: 1160px;
  --section-pad: clamp(72px, 9vw, 160px);
}

* {
  box-sizing: border-box;
  border-radius: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--ink-06);
  padding: 1px 4px;
}

.label {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.42px;
  text-transform: uppercase;
  font-weight: 400;
}

.dim {
  color: var(--ink-60);
}

/* ---------------------------------------------------------------- navbar */

.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 32px;
  height: 72px;
  padding-inline: clamp(20px, 4.4vw, 64px);
  background: rgba(255, 255, 255, 0);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.navbar.is-scrolled {
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--ink-12);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 28px;
  flex: none;
}

.logo img {
  height: 26px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  gap: 28px;
  margin-left: auto;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink-80);
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--ink);
  text-decoration: underline;
}

.nav-meta {
  text-align: right;
  line-height: 1.25;
  font-size: 12px;
}

.nav-meta span {
  display: block;
  color: var(--ink-60);
}

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative;
  min-height: 92svh;
  display: flex;
  align-items: flex-end;
  padding: 140px var(--inset) 72px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url("/sab-bench/assets/bg/hero-bg.webp") center / cover no-repeat;
  filter: saturate(0.95);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.35) 45%,
      rgba(255, 255, 255, 0.92) 78%, #fff 100%);
}

.hero-inner {
  position: relative;
  width: 100%;
  max-width: var(--content);
}

.hero .eyebrow {
  margin: 0 0 28px;
}

.hero h1 {
  margin: 0;
  max-width: 980px;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(40px, 5.6vw, 84px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.hero-lede {
  max-width: 760px;
  margin: 32px 0 0;
  font-size: clamp(18px, 1.5vw, 21px);
  font-weight: 300;
  line-height: 1.5;
  color: var(--ink-80);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.42px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.button--solid,
.button:hover {
  background: var(--ink);
  color: #fff;
}

.button--solid:hover {
  background: var(--teal);
  border-color: var(--teal);
}

/* -------------------------------------------------------------- sections */

.section {
  position: relative;
  padding: var(--section-pad) var(--inset);
}

.section--soft::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, #fff 0%, rgba(255, 255, 255, 0) 14%, rgba(255, 255, 255, 0) 86%, #fff 100%),
    url("/sab-bench/assets/bg/focus-bg-soft.webp") center / cover no-repeat;
  opacity: 0.85;
}

.section--tight {
  padding-top: clamp(24px, 3vw, 48px);
}

.section-inner {
  max-width: var(--content);
}

.section-head {
  display: grid;
  gap: 18px;
  margin-bottom: clamp(40px, 5vw, 72px);
}

.display {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(56px, 9.4vw, 150px);
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.subhead {
  margin: 0;
  max-width: 760px;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(21px, 1.9vw, 28px);
  line-height: 1.3;
}

.prose {
  max-width: 760px;
}

.prose p,
.prose li {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--ink-80);
}

.prose strong {
  font-weight: 500;
  color: var(--ink);
}

.prose ul {
  margin: 0 0 16px;
  padding-left: 20px;
}

/* --------------------------------------------------------- summary stats */

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--ink-12);
  border-bottom: 1px solid var(--ink-12);
  margin-top: clamp(40px, 5vw, 64px);
}

.stat {
  padding: 28px 24px 28px 0;
}

.stat + .stat {
  padding-left: 24px;
  border-left: 1px solid var(--ink-12);
}

.stat-value {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(34px, 3.4vw, 52px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  margin-top: 12px;
  font-size: 15px;
  font-weight: 300;
  color: var(--ink-80);
  line-height: 1.4;
}

/* --------------------------------------------------------------- blocks */

.block {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px 48px;
  padding-block: 48px;
  border-top: 1px solid var(--ink-12);
}

.block:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.block-head {
  display: grid;
  align-content: start;
  gap: 6px;
}

.block-num {
  font-family: var(--display);
  font-weight: 600;
  font-size: 20px;
}

.block-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: 20px;
  line-height: 1.25;
  text-transform: uppercase;
}

.block-body {
  min-width: 0;
}

.block-body > .prose {
  margin-bottom: 24px;
}

.block-body > .prose:last-child {
  margin-bottom: 0;
}

.block-figure {
  grid-column: 1 / -1;
  min-width: 0;
}

.caption {
  margin: 14px 0 0;
  max-width: 820px;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--ink-60);
}

/* --------------------------------------------------------------- toggles */

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
  margin-bottom: 18px;
}

.toggle {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 4px;
  background: rgba(0, 0, 0, 0.07);
}

.toggle-label {
  padding: 0 8px 0 6px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--ink-80);
}

.toggle button {
  white-space: nowrap;
  height: 28px;
  padding: 0 9px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  cursor: pointer;
}

.toggle button:hover {
  background: rgba(255, 255, 255, 0.7);
}

.toggle button.is-active {
  background: var(--ink);
  color: #fff;
}

/* ---------------------------------------------------------------- tables */

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-top: 1px solid var(--ink);
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

table.data th {
  position: relative;
  padding: 12px 10px 10px;
  text-align: right;
  vertical-align: bottom;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0.35px;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--ink-80);
  border-bottom: 1px solid var(--ink-12);
  white-space: nowrap;
}

table.data th.is-sortable {
  cursor: pointer;
  user-select: none;
}

table.data th.is-sortable:hover {
  color: var(--ink);
}

table.data th .arrow {
  display: inline-block;
  width: 10px;
  margin-left: 2px;
  color: var(--teal);
}

table.data td {
  padding: 11px 10px;
  text-align: right;
  border-bottom: 1px solid var(--ink-06);
  white-space: nowrap;
}

table.data th:first-child,
table.data td:first-child {
  padding-left: 0;
}

table.data .left {
  text-align: left;
}

table.data .wrap {
  white-space: normal;
  min-width: 260px;
}

table.data tbody tr {
  transition: background 0.15s ease, opacity 0.15s ease;
}

table.data tbody tr[data-model]:hover,
table.data tbody tr.is-hl {
  background: var(--mint-50);
}

table.data tbody tr.is-pinned {
  background: var(--mint-50);
  box-shadow: inset 3px 0 0 var(--teal);
}

table.data tr.ref td {
  color: var(--ink-60);
  font-style: normal;
  background: rgba(4, 33, 43, 0.025);
}

table.data tr.ref:first-of-type td {
  border-top: 1px solid var(--ink-12);
}

.model-cell {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}

.vendor-dot {
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 50% !important;
}

.ci {
  color: var(--ink-60);
  font-size: 13px;
}

.muted {
  color: var(--ink-40);
}

.bar-cell {
  display: inline-grid;
  grid-template-columns: 54px 38px;
  align-items: center;
  gap: 8px;
}

.bar-cell .bar {
  height: 6px;
  background: var(--ink-06);
  position: relative;
}

.bar-cell .bar i {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--teal);
}

.sig {
  display: inline-block;
  padding: 1px 6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  background: var(--mint);
}

/* ---------------------------------------------------------------- charts */

.chart {
  position: relative;
  width: 100%;
}

.chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  font-family: var(--body);
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 40px;
}

.chart-title {
  margin: 0 0 8px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--ink-80);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--ink-80);
}

.legend li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend .swatch {
  width: 12px;
  height: 12px;
  flex: none;
}

.legend .swatch--dot {
  width: 9px;
  height: 9px;
  border-radius: 50% !important;
}

.legend .swatch--line {
  height: 2px;
  width: 16px;
}

.legend .swatch--band {
  height: 10px;
  width: 16px;
}

svg .tick text,
svg .axis-label {
  font-size: 12px;
  fill: var(--ink-60);
}

svg .row-label {
  font-size: 13px;
  fill: var(--ink);
}

svg .axis-title {
  font-size: 12px;
  fill: var(--ink-80);
}

svg .grid line {
  stroke: var(--ink-06);
}

svg .zero {
  stroke: var(--ink-40);
}

svg .point-label {
  font-size: 12px;
  fill: var(--ink-80);
  pointer-events: none;
}

svg [data-model] {
  transition: opacity 0.15s ease;
  cursor: pointer;
}

svg .heat-cell text {
  font-size: 12px;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}

.has-hl [data-model]:not(.is-hl) {
  opacity: 0.22;
}

.has-hl table.data tbody tr[data-model]:not(.is-hl) {
  opacity: 0.45;
}

.tooltip {
  position: fixed;
  z-index: 50;
  max-width: 300px;
  padding: 10px 12px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  line-height: 1.45;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, calc(-100% - 14px));
  transition: opacity 0.12s ease;
}

.tooltip.is-visible {
  opacity: 1;
}

.tooltip b {
  font-weight: 600;
}

.tooltip .t-sub {
  color: rgba(255, 255, 255, 0.7);
}

/* --------------------------------------------------------------- formula */

.formula {
  margin: 0 0 20px;
  padding: 18px 22px;
  max-width: 760px;
  border-left: 2px solid var(--teal);
  background: var(--mint-50);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.6;
}

.formula sub,
.prose sub {
  font-size: 0.7em;
}

/* ------------------------------------------------------------------ cite */

.authors {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px 24px;
  margin: 0 0 32px;
  padding: 0;
  list-style: none;
}

.authors li {
  display: grid;
  gap: 2px;
}

.authors b {
  font-family: var(--display);
  font-weight: 500;
  font-size: 18px;
}

.authors a {
  color: var(--ink-60);
  text-decoration: none;
  font-size: 14px;
}

.bibtex {
  position: relative;
  margin: 0;
  padding: 20px 22px;
  background: var(--ink);
  color: #e8f3f1;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  overflow-x: auto;
}

.bibtex button {
  position: absolute;
  top: 12px;
  right: 12px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: transparent;
  color: #fff;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  cursor: pointer;
}

.bibtex button:hover {
  background: #fff;
  color: var(--ink);
}

/* ---------------------------------------------------------------- footer */

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 40px;
  padding: 40px clamp(20px, 4.4vw, 64px) 32px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink-60);
}

.footer p {
  margin: 0;
  max-width: 460px;
}

.footer-right {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 36px;
  align-items: flex-start;
}

.footer a {
  text-decoration: none;
}

.footer a:hover {
  color: var(--ink);
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 1024px) {
  .nav-links {
    display: none;
  }

  .nav-meta {
    margin-left: auto;
  }

  .block {
    grid-template-columns: minmax(0, 1fr);
  }

  .block-head {
    grid-auto-flow: column;
    justify-content: start;
    align-items: baseline;
    gap: 14px;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat:nth-child(3) {
    border-left: 0;
    padding-left: 0;
  }

  .stat:nth-child(n + 3) {
    border-top: 1px solid var(--ink-12);
  }

  .chart-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: 88svh;
    padding-bottom: 48px;
  }

  .prose p,
  .prose li {
    font-size: 16.5px;
  }

  .stat {
    padding: 20px 14px 20px 0;
  }

  .stat + .stat {
    padding-left: 14px;
  }

  .stat:nth-child(3) {
    padding-left: 0;
  }

  .stat-label {
    font-size: 13.5px;
  }

  .nav-meta {
    display: none;
  }

  .footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
