/* ../../cogine/web/style.css */
.ranking-page {
  --ranking-ink: #666966;
  --ranking-grid: color-mix(in srgb, var(--color-text) 8%, transparent);
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 36px 36px 24px;
}

.ranking-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 26px;
}

.ranking-heading h2 {
  letter-spacing: -.8px;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.2;
}

.ranking-download {
  font-family: var(--font-mono);
  color: var(--color-text-secondary);
  font-size: 12px;
}

.ranking-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
}

.ranking-segment {
  display: flex;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  align-items:  center;
  gap: 3px;
  padding: 3px;
}

.ranking-segment button {
  color: var(--color-text-secondary);
  cursor: pointer;
  background: none;
  border: 0;
  border-radius: 3px;
  padding: 7px 14px;
  font-size: 13px;
}

.ranking-segment button[aria-pressed="true"] {
  background: var(--color-text);
  color: var(--color-background);
}

.ranking-segment button:hover {
  background: var(--color-surface);
  color: var(--color-text);
}

.ranking-segment button[aria-pressed="true"]:hover {
  background: var(--color-text);
  color: var(--color-background);
}

.ranking-filters {
  display: flex;
  border-bottom: 1px solid var(--color-border);
  flex-wrap: wrap;
  align-items:  center;
  gap: 10px;
  padding-bottom: 25px;
}

.ranking-filters input, .ranking-filters select {
  color: var(--color-text);
  background: var(--color-background);
  border: 1px solid var(--color-border);
  font: inherit;
  border-radius: 4px;
  min-width: 0;
  height: 35px;
  padding: 8px 10px;
  font-size: 12px;
}

.ranking-filters input {
  width: 240px;
}

.ranking-filters select {
  width: 150px;
}

#ranking-count {
  color: var(--color-text-secondary);
  font-size: 11px;
  font-family: var(--font-mono);
  margin-left: auto;
}

.ranking-chart-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 20px;
  padding: 25px 0;
}

.ranking-chart-heading h3 {
  font-size: 16px;
  font-weight: 500;
}

#ranking-context {
  color: var(--color-text-secondary);
  font-family: var(--font-mono);
  font-size: 10px;
}

.ranking-model-link {
  display: flex;
  text-decoration: none;
  align-items:  center;
  gap: 10px;
  min-width: 0;
  font-size: 12px;
  font-weight: 450;
  line-height: 1.4;
}

.ranking-model-link img {
  filter: var(--logo-image-filter);
  object-fit: contain;
  flex-shrink: 0;
}

.ranking-model-link span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-model-link:hover span {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ranking-axis {
  display: grid;
  grid-template-columns: 270px 1fr;
  color: var(--color-text-secondary);
  font-family: var(--font-mono);
  height: 28px;
  padding-right: 60px;
  font-size: 10px;
}

.ranking-axis > div {
  position: relative;
}

.ranking-axis > div span {
  position: absolute;
  transform: translateX(-50%);
}

.ranking-bar-row {
  display: grid;
  grid-template-columns: 270px 1fr;
  border-bottom: 1px solid var(--ranking-grid);
  align-items:  center;
  min-height: 48px;
}

.ranking-bar-row > a {
  padding-right: 22px;
}

.ranking-bar-track {
  display: flex;
  position: relative;
  background: repeating-linear-gradient(to right, var(--ranking-grid) 0, var(--ranking-grid) 1px, transparent 1px, transparent 25%);
  color: var(--color-text);
  text-align: left;
  cursor: pointer;
  border: 0;
  border-radius: 0;
  align-items:  center;
  width: calc(100% - 60px);
  height: 48px;
}

.ranking-bar {
  display: block;
  background: var(--ranking-ink);
  border-radius: 0 3px 3px 0;
  flex-shrink: 0;
  height: 20px;
}

.ranking-bar-value {
  position: absolute;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  padding-left: 10px;
  font-size: 11px;
}

.ranking-bar-track:hover .ranking-bar {
  background: var(--color-brand);
}

.ranking-bar-track:focus-visible .ranking-bar {
  background: var(--color-brand);
}

.ranking-no-data {
  font-family: var(--font-mono);
  color: var(--color-text-tertiary);
  padding-left: 10px;
}

.ranking-empty {
  text-align: center;
  color: var(--color-text-secondary);
  padding: 60px 0;
  font-size: 13px;
}

#ranking-more {
  display: block;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  cursor: pointer;
  background: none;
  border-radius: 4px;
  margin: 24px auto;
  padding: 8px 20px;
  font-size: 12px;
}

#ranking-more[hidden] {
  display: none;
}

.ranking-footer {
  display: flex;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  justify-content: space-between;
  gap: 20px;
  margin-top: 32px;
  padding-top: 18px;
  font-size: 11px;
}

.ranking-footer > a {
  margin-left: auto;
}

.data-license {
  color: var(--color-text-secondary);
  margin-top: 24px;
  font-size: 11px;
}

#modal .footer, #modal .footer a {
  color: var(--color-text-secondary);
  font-size: 11px;
}

.aa-credit {
  display: inline-flex;
  text-decoration: none;
  align-items:  center;
  gap: 6px;
}

.aa-credit img {
  flex: none;
}

.data-attribution {
  color: var(--color-text-secondary);
  margin-top: 22px;
  font-size: 11px;
}

.data-attribution summary {
  cursor: pointer;
}

.data-attribution p {
  overflow-wrap: anywhere;
  padding: 7px 0;
}

.ranking-timeline-row {
  display: grid;
  grid-template-columns: 110px 26px 1fr 100px;
  align-items:  center;
  min-height: 54px;
}

.ranking-date {
  text-align: left;
  color: var(--color-text-secondary);
  font: 11px var(--font-mono);
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

.ranking-timeline-dot {
  background: var(--ranking-ink);
  position: relative;
  border-radius: 50%;
  width: 7px;
  height: 7px;
}

.ranking-timeline-dot:after {
  content: "";
  position: absolute;
  background: var(--color-border);
  width: 1px;
  height: 47px;
  top: 7px;
  left: 3px;
}

.ranking-timeline-row:last-child .ranking-timeline-dot:after {
  display: none;
}

.ranking-lab-label {
  color: var(--color-text-secondary);
  text-align: right;
  font-size: 11px;
}

.ranking-table-wrap {
  overflow: auto;
}

table.ranking-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 740px;
  font-size: 12px;
}

table.ranking-table th {
  position: static;
  background: var(--color-background);
  text-align: right;
  color: var(--color-text-secondary);
  padding: 0 12px 14px;
  font-weight: 450;
}

table.ranking-table th:first-child, table.ranking-table td:first-child {
  text-align: left;
  padding-left: 0;
}

table.ranking-table td {
  border-top: 1px solid var(--color-border);
  text-align: right;
  font: 11px var(--font-mono);
  padding: 15px 12px;
}

.ranking-table th small {
  display: block;
  color: var(--color-text-secondary);
  font-size: 9px;
  font-weight: 400;
}

.ranking-table th a {
  font-size: 9px;
}

.ranking-table td button {
  border: 0;
  border-bottom: 1px dotted var(--color-border);
  color: var(--color-text);
  font: inherit;
  cursor: pointer;
  background: none;
  padding: 0;
}

.ranking-price {
  white-space: nowrap;
}

.ranking-scatter svg {
  display: block;
  overflow: visible;
  width: 100%;
}

.ranking-scatter-grid line {
  stroke: var(--ranking-grid);
  stroke-width: 1;
}

.ranking-scatter-grid text, .ranking-axis-label {
  fill: var(--color-text-secondary);
  font: 11px var(--font-mono);
}

.ranking-point {
  cursor: pointer;
}

.ranking-point circle {
  fill: var(--ranking-ink);
  stroke: var(--color-background);
  stroke-width: 1;
}

.ranking-point text {
  fill: var(--color-text);
  font-size: 11px;
}

.ranking-point:hover circle, .ranking-point:focus circle {
  fill: var(--color-brand);
  r: 7;
}

.ranking-scatter-count {
  display: block;
  text-align: right;
  color: var(--color-text-secondary);
  font: 10px var(--font-mono);
}

dialog.ranking-detail {
  position: fixed;
  overflow: auto;
  background: var(--color-background);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  width: min(620px, 100% - 24px);
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: 28px;
  inset: 0;
}

.ranking-detail::backdrop {
  backdrop-filter: blur(2px);
  background: #0006;
}

.ranking-detail h2 {
  margin-bottom: 8px;
  padding-right: 25px;
  font-size: 22px;
  font-weight: 500;
}

.ranking-detail h3 {
  padding: 22px 0 12px;
  font-size: 13px;
  font-weight: 500;
}

.ranking-detail h3 a, #ranking-detail-body > a {
  font-size: 11px;
}

.ranking-facts {
  display: flex;
  border-bottom: 1px solid var(--color-border);
  justify-content: space-between;
  gap: 12px;
  padding: 26px 0;
}

.ranking-facts dt {
  color: var(--color-text-secondary);
  font-size: 11px;
}

.ranking-facts dd {
  font: 19px var(--font-mono);
  margin-top: 6px;
}

.ranking-source-facts {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 8px 12px;
  font-size: 11px;
}

.ranking-source-facts dt {
  color: var(--color-text-secondary);
}

.ranking-source-facts dd {
  overflow-wrap: anywhere;
}

.ranking-detail .ranking-source-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 0;
  font-size: 11px;
}

.ranking-source-table th, .ranking-source-table td {
  text-align: right;
  border-bottom: 1px solid var(--color-border);
  padding: 9px 5px;
}

.ranking-source-table th:first-child, .ranking-source-table td:first-child {
  text-align: left;
}

.ranking-status {
  color: var(--color-text-secondary);
  font: 10px var(--font-mono);
  margin-top: 12px;
}

.ranking-detail-price {
  font: 14px var(--font-mono);
}

.ranking-detail-price small {
  display: block;
  color: var(--color-text-secondary);
  margin-top: 5px;
  font-size: 10px;
}

#ranking-detail-close {
  position: absolute;
  color: var(--color-text-secondary);
  cursor: pointer;
  background: none;
  border: 0;
  border-radius: 4px;
  width: 28px;
  height: 28px;
  padding: 0;
  font-size: 24px;
  line-height: 1;
  top: 15px;
  right: 15px;
}

.dataset-list article {
  display: flex;
  border-top: 1px solid var(--color-border);
  flex-wrap: wrap;
  align-items:  center;
  gap: 24px;
  padding: 28px 0;
}

.dataset-list article > div {
  flex: 200px;
}

.dataset-list h3 {
  margin-bottom: 5px;
  font-size: 17px;
  font-weight: 500;
}

.dataset-list article span {
  color: var(--color-text-secondary);
  font-size: 11px;
}

.dataset-list dl {
  display: flex;
  gap: 28px;
  padding-right: 25px;
}

.dataset-list dt {
  color: var(--color-text-secondary);
  font-size: 10px;
}

.dataset-list dd {
  font: 21px var(--font-mono);
}

.dataset-list article > a {
  font-size: 12px;
}

.data-section-heading {
  margin: 32px 0 12px;
  font-size: 14px;
  font-weight: 500;
}

.data-endpoints > a, .data-sources > a {
  display: flex;
  border-bottom: 1px solid var(--color-border);
  text-decoration: none;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  font-size: 12px;
}

.data-endpoints > a:hover, .data-sources > a:hover {
  color: var(--color-brand);
}

.data-endpoints span, .data-sources span {
  color: var(--color-text-secondary);
  font-size: 11px;
}

.data-revisions {
  color: var(--color-text-secondary);
  margin-top: 36px;
  font-size: 11px;
}

.data-revisions summary {
  cursor: pointer;
}

.data-revisions dl {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 8px;
  margin-top: 12px;
}

.data-revisions dd {
  overflow-wrap: anywhere;
}

.ranking-page :focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 3px;
}

@media (prefers-color-scheme: dark) {
  .ranking-page {
    --ranking-ink: #a3aaa5;
  }
}

@media (width <= 1200px) {
  header .left p, header .left .slash {
    display: none;
  }
}

@media (width <= 720px) {
  .ranking-page {
    padding: 25px 18px;
  }

  .ranking-heading {
    margin-bottom: 22px;
  }

  .ranking-heading h2 {
    font-size: 25px;
  }

  .ranking-toolbar {
    gap: 12px;
  }

  .ranking-segment button {
    padding: 7px 12px;
    font-size: 12px;
  }

  .ranking-filters {
    gap: 8px;
    padding-bottom: 18px;
  }

  .ranking-filters input {
    width: 100%;
  }

  .ranking-filters select {
    flex: 120px;
    width: 40%;
  }

  #ranking-count {
    width: 100%;
    margin: 4px 0 0;
  }

  .ranking-chart-heading {
    padding: 20px 0;
  }

  #ranking-context {
    font-size: 9px;
  }

  .ranking-axis {
    grid-template-columns: 1fr;
    height: 35px;
    padding-left: 0;
  }

  .ranking-axis > span {
    display: none;
  }

  .ranking-axis > div {
    margin-top: 4px;
  }

  .ranking-bar-row {
    display: block;
    padding-top: 12px;
  }

  .ranking-bar-row > a {
    font-size: 12px;
  }

  .ranking-bar-track {
    height: 35px;
  }

  .ranking-bar {
    height: 17px;
  }

  .ranking-bar-value {
    font-size: 10px;
  }

  .ranking-model-link img {
    width: 16px;
    height: 16px;
  }

  .ranking-timeline-row {
    grid-template-columns: 86px 18px 1fr;
    min-height: 64px;
  }

  .ranking-timeline-dot:after {
    height: 57px;
  }

  .ranking-date {
    font-size: 9px;
  }

  .ranking-lab-label {
    display: none;
  }

  .ranking-scatter {
    overflow-x: auto;
    padding-top: 8px;
  }

  .ranking-point text {
    font-size: 9px;
  }

  .ranking-footer {
    gap: 8px;
    font-size: 9px;
  }

  .dataset-list article {
    gap: 20px;
  }

  .dataset-list article > div {
    flex-basis: 100%;
  }

  .dataset-list dl {
    margin-right: auto;
    padding-right: 0;
  }

  .data-endpoints > a, .data-sources > a {
    flex-wrap: wrap;
  }

  .ranking-detail {
    padding: 22px;
  }

  .ranking-facts dd {
    font-size: 15px;
  }
}

/* src/index.css */
/*!
MIT License

Copyright (c) 2025 models.dev

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --icon-opacity: .85;
  --header-height: 56px;
  --font-mono: "IBM Plex Mono", monospace;
  --color-brand: #fd9527;
  --color-background: #fff;
  --color-border: #ddd;
  --color-surface: #f5f5f5;
  --color-alpha-background: #ffffffd6;
  --color-text: #333;
  --color-text-invert: #fff;
  --color-text-secondary: #666;
  --color-text-tertiary: #999;
  --logo-image-filter: none;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-brand: #fd9527;
    --color-background: #1e1e1e;
    --color-border: #333;
    --color-surface: #111;
    --color-alpha-background: #1e1e1ed6;
    --color-text: #fff;
    --color-text-invert: #333;
    --color-text-secondary: #aaa;
    --color-text-tertiary: #666;
    --logo-image-filter: invert(1);
  }
}

html, body {
  overflow: hidden;
  color: var(--color-text);
  background-color: var(--color-background);
  height: 100%;
  font-family: Rubik, sans-serif;
  line-height: 1.6;
}

body:has(dialog[open]) {
  overscroll-behavior: none;
}

input, button {
  font-family: inherit;
}

.sr-only {
  position: absolute;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
}

a {
  color: var(--color-text);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: var(--color-text-tertiary);
  text-underline-offset: .1875rem;
}

a:hover {
  color: var(--color-text);
}

header {
  display: flex;
  height: var(--header-height);
  background-color: var(--color-background);
  position: fixed;
  z-index: 20;
  border-bottom: 1px solid #0000;
  justify-content: space-between;
  align-items:  center;
  gap: .5rem;
  width: 100%;
  padding: 0 .75rem;
  top: 0;
}

header > div {
  display: flex;
  align-items:  center;
}

header > div.left {
  position: relative;
  flex: auto;
  align-items: baseline;
  min-width: 0;
}

header > div.right {
  flex: none;
  gap: .75rem;
}

header .brand {
  text-decoration: none;
  flex: none;
}

header h1 {
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 1rem;
  font-weight: 600;
}

header p {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--color-text-tertiary);
  font-size: .875rem;
}

header .slash {
  display: block;
  position: relative;
  border-right: 2px solid var(--color-border);
  transform-origin: top center;
  width: 0;
  height: .75rem;
  margin-left: .625rem;
  margin-right: .25rem;
  line-height: 1;
  top: 1px;
  transform: translateX(-50%)rotate(20deg);
}

.top-nav {
  display: flex;
  align-items:  center;
  gap: .125rem;
  font-size: .8125rem;
}

.top-nav a {
  text-decoration: none;
  color: var(--color-text-secondary);
  border-radius: .25rem;
  padding: .375rem .5rem;
}

.top-nav a:hover, .top-nav a.active {
  color: var(--color-text);
  background-color: var(--color-surface);
}

header a.github {
  color: var(--color-text-secondary);
  flex: none;
  height: 24px;
}

header a.github svg {
  opacity: var(--icon-opacity);
}

header .search-container {
  position: relative;
  flex: none;
  min-width: 0;
}

header .search-trigger {
  display: inline-flex;
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  background-color: #0000;
  border-radius: .25rem;
  justify-content: space-between;
  align-items:  center;
  gap: 1.5rem;
  width: 10.5rem;
  height: 2rem;
  padding: .5rem .5rem .5rem .625rem;
  font-size: .8125rem;
  line-height: 1.1;
}

header .search-trigger:hover, header .search-trigger:focus {
  border-color: var(--color-brand);
  color: var(--color-text);
  background-color: var(--color-surface);
  outline: none;
}

header .search-trigger-label {
  display: inline-flex;
  align-items:  center;
  gap: .375rem;
  min-width: 0;
}

header .search-trigger-label svg {
  flex: none;
}

header .search-shortcut {
  display: inline-flex;
  color: var(--color-text-tertiary);
  pointer-events: none;
  align-items:  center;
  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, system-ui, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif;
  font-size: .75rem;
}

header button {
  cursor: pointer;
  background-color: var(--color-brand);
  color: var(--color-text-invert);
  border: none;
  border-radius: .25rem;
  flex: none;
  height: 2rem;
  padding: .5rem .75rem;
  font-size: .8125rem;
  line-height: 1.1;
}

header .mobile-menu-trigger {
  display: none;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  background-color: #0000;
  justify-content: center;
  align-items:  center;
  width: 2rem;
  padding: 0;
}

header .mobile-menu-trigger:hover, header .mobile-menu-trigger:focus {
  border-color: var(--color-brand);
  background-color: var(--color-surface);
  outline: none;
}

header .mobile-menu-trigger svg {
  display: block;
}

.page-scroll {
  height: calc(100svh - var(--header-height));
  margin-top: var(--header-height);
  overflow: auto;
  scroll-padding-top: 3rem;
  padding-bottom: 4rem;
}

.overview, .detail-header, .fact-grid, .table-section, .json-section {
  width: 100%;
}

.overview {
  display: grid;
  grid-template-columns: minmax(16rem, 1fr) minmax(18rem, 48rem);
  border-bottom: 1px solid var(--color-border);
  align-items:  end;
  gap: 2rem;
  padding: 2rem .75rem 1.5rem;
}

.overview h2, .detail-header h2 {
  letter-spacing: 0;
  font-size: clamp(1.75rem, 3vw, 3rem);
  font-weight: 600;
  line-height: 1.05;
}

.overview p {
  color: var(--color-text-secondary);
  max-width: 42rem;
  margin-top: .5rem;
  font-size: .9375rem;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--color-border);
  border-left: 1px solid var(--color-border);
}

.stats-strip div {
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  min-width: 0;
  padding: .75rem;
}

.stats-strip dt, .fact-grid dt {
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--color-text-tertiary);
  margin-bottom: .5rem;
  font-size: .6875rem;
  line-height: 1;
}

.stats-strip dd, .fact-grid dd {
  font-size: .9375rem;
  line-height: 1.25;
}

.detail-header {
  border-bottom: 1px solid var(--color-border);
  padding: 2rem .75rem 1.25rem;
}

.detail-header p {
  color: var(--color-text-secondary);
  max-width: 52rem;
  margin-top: .625rem;
  font-size: 1rem;
  line-height: 1.45;
}

.breadcrumbs {
  display: flex;
  color: var(--color-text-tertiary);
  flex-wrap: wrap;
  align-items:  center;
  gap: .375rem;
  margin-bottom: .75rem;
  font-size: .8125rem;
}

.code-line {
  display: flex;
  align-items:  center;
  gap: .375rem;
  margin-top: .75rem;
}

.code-line code, .mono {
  font-family: var(--font-mono);
  font-size: .8125rem;
}

.code-line code {
  color: var(--color-text-secondary);
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-bottom: 1px solid var(--color-border);
}

.fact-grid > div {
  border-right: 1px solid var(--color-border);
  min-width: 0;
  padding: .875rem .75rem;
}

.fact-grid dd {
  overflow-wrap: anywhere;
}

.fact-modalities {
  display: flex;
  align-items:  flex-start;
  min-height: 1rem;
}

.fact-modalities .modality-icon {
  background-color: #0000;
  border: 0;
  width: 1rem;
  height: 1rem;
}

.fact-modalities .modality-icon svg {
  width: 1rem;
  height: 1rem;
}

.fact-logo {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
}

.table-section {
  position: relative;
  border-bottom: 1px solid var(--color-border);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 1.25rem .75rem .75rem;
}

.section-heading h3 {
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: .875rem;
  font-weight: 600;
  line-height: 1;
}

.section-heading span {
  color: var(--color-text-tertiary);
  font-size: .8125rem;
  font-family: var(--font-mono);
}

.table-wrap {
  overflow: visible;
}

table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  min-width: 76rem;
  font-size: .875rem;
}

table thead th {
  position: sticky;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--color-text-secondary);
  backdrop-filter: blur(6px);
  background-color: var(--color-alpha-background);
  z-index: 10;
  padding: .75rem .75rem calc(.75rem - 2px);
  font-size: .75rem;
  font-weight: 400;
  line-height: 1;
  top: 0;
}

th.sortable {
  user-select: none;
  padding: 0;
}

.sort-button {
  display: flex;
  color: inherit;
  font: inherit;
  text-transform: inherit;
  cursor: pointer;
  background: none;
  border: 0;
  align-items:  center;
  gap: .375rem;
  width: 100%;
  min-height: 46px;
  padding: .75rem;
}

.sort-button:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: -2px;
}

.sort-indicator:empty {
  display: none;
}

th[data-type="number"] .sort-button {
  justify-content: flex-end;
}

td.numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

th, td {
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
  vertical-align: middle;
  height: 48px;
  padding: .75rem;
}

tbody td {
  color: var(--color-text-secondary);
}

tbody th {
  font-weight: 400;
}

table .subtle {
  color: var(--color-text-secondary);
}

tbody th:first-child, tbody td:first-child, tbody td:nth-child(2), tbody td:nth-child(3) {
  color: var(--color-text);
}

tbody tr:last-child > * {
  border-bottom: 0;
}

.primary-link {
  font-weight: 500;
}

.subtle {
  display: block;
  color: var(--color-text-tertiary);
  margin-top: .125rem;
}

.provider-link, .lab-link {
  display: inline-flex;
  align-items:  center;
  gap: .375rem;
}

.provider-logo, .lab-logo {
  display: block;
  color: currentColor;
  flex: none;
  width: 1rem;
  height: 1rem;
}

.provider-logo svg, .lab-logo svg {
  display: block;
  width: 100%;
  height: 100%;
}

.copy-cell {
  display: inline-flex;
  vertical-align: middle;
  align-items:  center;
  gap: .25rem;
}

.copy-button {
  display: inline-flex;
  vertical-align: middle;
  cursor: pointer;
  color: var(--color-text-tertiary);
  opacity: 0;
  background: none;
  border: none;
  border-radius: .25rem;
  justify-content: center;
  align-items:  center;
  margin-left: .25rem;
  padding: .25rem;
  transition: opacity .2s, color .2s;
}

.copy-cell .copy-button {
  position: relative;
  opacity: .65;
  margin-left: 0;
  top: -1px;
}

td:hover .copy-button, .code-line .copy-button {
  opacity: 1;
}

.copy-button svg {
  display: block;
}

.copy-button:hover {
  color: var(--color-text);
  background-color: var(--color-surface);
}

.copy-button.copied {
  color: var(--color-brand);
  opacity: 1;
}

.copy-button.selected, .copy-button.copy-failed {
  color: var(--color-text);
  opacity: 1;
}

.copy-button:active {
  transform: scale(.95);
}

.modalities {
  display: flex;
  align-items:  center;
  gap: .25rem;
}

.modality-icon {
  display: inline-flex;
  border: 1px solid var(--color-border);
  background-color: var(--color-background);
  color: var(--color-text-secondary);
  position: relative;
  border-radius: 2px;
  justify-content: center;
  align-items:  center;
  width: 20px;
  height: 20px;
}

.modality-icon:after {
  content: attr(data-tooltip);
  position: absolute;
  text-transform: uppercase;
  letter-spacing: 0;
  background-color: var(--color-text);
  color: var(--color-background);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  z-index: 100;
  border-radius: 3px;
  margin-bottom: 4px;
  padding: .375rem;
  transition: opacity .15s;
  font-size: .625rem;
  line-height: 1;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
}

.modality-icon:hover:after {
  opacity: 1;
}

.empty-row {
  display: none;
}

.empty-message {
  display: none;
  color: var(--color-text-tertiary);
  padding: 0 .75rem 1rem;
  font-size: .875rem;
}

.table-section[data-empty] .empty-message {
  display: block;
}

.json-section {
  border-bottom: 1px solid var(--color-border);
  padding: 1rem .75rem;
}

.json-section summary {
  cursor: pointer;
  text-transform: uppercase;
  font-size: .875rem;
  font-weight: 500;
}

.json-section pre {
  overflow: auto;
  background-color: var(--color-surface);
  font-size: .8125rem;
  font-family: var(--font-mono);
  border-radius: .25rem;
  margin-top: .875rem;
  padding: 1rem;
  line-height: 1.5;
}

dialog::backdrop {
  backdrop-filter: blur(8px);
  background-color: #00000008;
}

dialog {
  background-color: var(--color-background);
  color: var(--color-text);
  overflow: hidden;
  border: none;
  border-radius: .5rem;
  flex-direction: column;
  width: calc(100vw - 2rem);
  max-width: 40rem;
  max-height: calc(100svh - 2rem);
  margin: auto;
  box-shadow: 0 2px 4px #0000000d, 0 4px 8px #0000000d, 0 8px 16px #00000012, 0 16px 32px #00000012, 0 32px 64px #00000012, 0 48px 96px #00000012;
}

dialog[open] {
  display: flex;
}

dialog .header {
  display: flex;
  border-bottom: 1px solid var(--color-border);
  flex: none;
  justify-content: space-between;
  align-items:  center;
  padding: .875rem .5rem calc(.875rem - 4px) 1rem;
}

dialog .header h2 {
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1;
}

dialog .header button {
  color: var(--color-text);
  opacity: var(--icon-opacity);
  cursor: pointer;
  outline: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
}

dialog .header button svg {
  display: block;
  width: 1.5rem;
  height: 1.5rem;
}

dialog .body {
  overflow-y: auto;
  overscroll-behavior: contain;
  flex: auto;
  padding: 1rem;
  font-size: .875rem;
}

dialog .body h2, dialog .body p, dialog .body .code-block {
  margin-bottom: .625rem;
}

dialog .body p:has( + h2) {
  margin-bottom: 1.5rem;
}

dialog .body .code-block:has( + h2) {
  margin-bottom: 1.5rem;
}

dialog .body h2 {
  font-size: 1rem;
  font-weight: 500;
}

dialog .body .code-block {
  background-color: var(--color-surface);
  border-radius: .25rem;
  padding: .875rem 1rem;
}

dialog .body code {
  font-size: .8125rem;
  font-family: var(--font-mono);
}

dialog .footer {
  text-align: center;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex: none;
  justify-content: space-between;
  align-items:  center;
  padding: .875rem 1rem;
}

dialog .footer a {
  color: var(--color-text-tertiary);
  text-decoration: none;
  font-size: .75rem;
}

.mobile-menu {
  max-height: calc(100svh - var(--header-height)  - 1rem);
  margin: calc(var(--header-height)  + .5rem) .75rem auto auto;
  width: min(18rem, 100vw - 1.5rem);
  max-width: calc(100vw - 1.5rem);
}

.mobile-menu .header {
  padding: .875rem .625rem calc(.875rem - 4px) .875rem;
}

.mobile-menu-list {
  display: flex;
  overflow-y: auto;
  flex-direction: column;
  gap: .25rem;
  padding: .5rem;
}

.mobile-menu-list a, .mobile-menu-list button {
  display: flex;
  color: var(--color-text);
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  background-color: #0000;
  border: 0;
  border-radius: .375rem;
  align-items:  center;
  width: 100%;
  min-height: 2.5rem;
  padding: .625rem .75rem;
  font-size: .875rem;
  line-height: 1.2;
}

.mobile-menu-list a:hover, .mobile-menu-list a:focus, .mobile-menu-list button:hover, .mobile-menu-list button:focus, .mobile-menu-list a.active {
  background-color: var(--color-surface);
  outline: none;
}

.mobile-menu-list a.active {
  color: var(--color-brand);
}

.search-modal {
  border-radius: .5rem;
  width: calc(100vw - 1.5rem);
  max-width: 48rem;
  max-height: min(44rem, 100svh - 1.5rem);
  margin-top: 10svh;
}

.search-field {
  display: flex;
  border-bottom: 1px solid var(--color-border);
  flex: none;
  align-items:  center;
  gap: .625rem;
  padding: .875rem 1rem;
}

.search-field-icon {
  color: var(--color-text-tertiary);
  flex: none;
}

.search-field input {
  outline: none;
  color: var(--color-text);
  background: none;
  border: 0;
  flex: auto;
  min-width: 0;
  font-size: 1rem;
  line-height: 1.25;
}

.search-field input::placeholder {
  color: var(--color-text-tertiary);
}

.search-escape {
  color: var(--color-text-tertiary);
  border: 1px solid var(--color-border);
  border-radius: .25rem;
  flex: none;
  padding: .1875rem .375rem;
  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, system-ui, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif;
  font-size: .6875rem;
  line-height: 1;
}

.search-count {
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0;
  flex: none;
  padding: .625rem 1rem .375rem;
  font-size: .75rem;
  line-height: 1;
}

.search-results {
  overflow-y: auto;
  overscroll-behavior: contain;
  flex: auto;
  padding: .25rem .5rem .5rem;
}

.search-result {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  text-decoration: none;
  color: var(--color-text);
  outline: none;
  border-radius: .375rem;
  align-items:  start;
  gap: .75rem;
  padding: .625rem;
}

.search-result:hover, .search-result.is-active {
  background-color: var(--color-surface);
}

.search-result-icon {
  display: inline-flex;
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  background-color: var(--color-background);
  border-radius: .375rem;
  justify-content: center;
  align-items:  center;
  width: 2rem;
  height: 2rem;
}

.search-result-icon img {
  display: block;
  object-fit: contain;
  filter: var(--logo-image-filter);
  width: 1.125rem;
  height: 1.125rem;
}

.search-result-body {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  min-width: 0;
}

.search-result-top {
  display: flex;
  align-items:  center;
  gap: .5rem;
  min-width: 0;
}

.search-result-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  font-size: .9375rem;
  font-weight: 500;
  line-height: 1.25;
}

.search-result-title mark, .search-result-subtitle mark {
  color: inherit;
  background-color: color-mix(in srgb, var(--color-brand) 24%, transparent);
  border-radius: .125rem;
}

.search-result-kind {
  border: 1px solid var(--color-border);
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0;
  border-radius: .25rem;
  flex: none;
  padding: .1875rem .3125rem;
  font-size: .625rem;
  line-height: 1;
}

.search-result-subtitle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--color-text-tertiary);
}

.search-result-meta {
  display: flex;
  color: var(--color-text-secondary);
  flex-wrap: wrap;
  gap: .25rem;
  font-size: .75rem;
  line-height: 1.25;
}

.search-result-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background-color: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: .25rem;
  min-width: 0;
  max-width: 100%;
  padding: .1875rem .375rem;
}

.search-empty {
  color: var(--color-text-tertiary);
  flex: none;
  padding: .75rem 1rem 1rem;
  font-size: .875rem;
}

.search-empty[hidden] {
  display: none;
}

@media (width <= 68rem) {
  .overview {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

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

@media (width <= 52rem) {
  header > div.right {
    gap: .375rem;
  }

  .top-nav, header .github, header .search-container, header > div.right > #help {
    display: none;
  }

  header .mobile-menu-trigger {
    display: inline-flex;
  }

  .overview h2, .detail-header h2 {
    font-size: 2rem;
  }

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

  table {
    min-width: 62rem;
  }
}

@media (width <= 32rem) {
  header div.left p, header span.slash {
    display: none;
  }

  header button {
    padding-left: .625rem;
    padding-right: .625rem;
  }

  header .mobile-menu-trigger {
    padding: 0;
  }

  .overview, .detail-header {
    padding-top: 1.5rem;
  }

  .stats-strip, .fact-grid {
    grid-template-columns: 1fr;
  }

  .stats-strip div, .fact-grid div {
    padding: .75rem;
  }
}
