:root {
  --bg: #0a0a0a;
  --surface: #121212;
  --surface-2: #181818;
  --border: #232323;
  --border-strong: #303030;
  --fg: #f5f1e8;
  --soft: #b9b2ae;
  --quiet: #7a7375;
  --red: #dc6652;
  --purple: #c28abb;
  --radius: 12px;
  --sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Cascadia Code', 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--fg);
}

/* A faint brand glow behind the top of every page. */
body {
  font: 15px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(900px 420px at 12% -120px, rgba(220, 102, 82, .10), transparent 70%),
    radial-gradient(800px 420px at 70% -160px, rgba(194, 138, 187, .09), transparent 70%),
    var(--bg);
  background-repeat: no-repeat;
}
body { display: flex; flex-direction: column; min-height: 100vh; }
body > main { flex: 1 0 auto; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--purple); outline-offset: 3px; border-radius: 6px; }
img { display: block; height: auto; max-width: 100%; }
code { font: .9em var(--mono); color: var(--soft); }
::selection { background: #7b3772; color: var(--fg); }

.shell { width: 100%; max-width: 1200px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }

/* Top bar. */
.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 10, 10, .72);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
}
.bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 19px; font-weight: 600; letter-spacing: -.015em; }
.brand img { width: 32px; height: 32px; border-radius: 7px; }
.top { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--soft); }
.top a { padding: 6px 12px; border-radius: 8px; transition: color .15s, background .15s; }
.top a:hover { color: var(--fg); background: var(--surface-2); }
.top .button { color: var(--fg); border: 1px solid var(--border-strong); }

/* Header search: a field with a dropdown of results, shown only with JavaScript. */
.search { position: relative; flex: 0 1 380px; min-width: 0; margin-left: auto; }
.search[hidden] { display: none; }
.search input {
  width: 100%;
  padding: 7px 34px 7px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--fg);
  font: 14px var(--sans);
}
.search input::placeholder { color: var(--quiet); }
.search input:focus { outline: none; border-color: var(--purple); }
.search input::-webkit-search-cancel-button { display: none; }
.search kbd {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  padding: 0 6px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  font: 11px/1.6 var(--mono);
  color: var(--quiet);
  pointer-events: none;
}
.search input:focus ~ kbd { display: none; }
.search ul {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: min(420px, 70vh);
  margin: 0;
  padding: 4px;
  overflow-y: auto;
  list-style: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .5);
  z-index: 5;
}
.search ul[hidden] { display: none; }
.search li a { display: grid; grid-template-columns: 76px minmax(0, 1fr); column-gap: 10px; align-items: baseline; padding: 8px 10px; border-radius: 8px; }
.search li[aria-selected="true"] a { background: var(--surface-2); }
.search-kind { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--quiet); }
.search-label { font-size: 14px; line-height: 1.5; color: var(--fg); overflow-wrap: anywhere; }
.search li[aria-selected="true"] .search-label { color: var(--purple); }
.search-none { padding: 10px; font-size: 13px; color: var(--quiet); }

.page { padding-top: 40px; padding-bottom: 80px; }

/* The breadcrumb is the page title. */
.crumbs { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.02em; line-height: 1.35; color: var(--quiet); overflow-wrap: anywhere; }
.crumbs a { color: var(--quiet); transition: color .15s; }
.crumbs a:hover { color: var(--fg); }
.crumbs .sep { margin: 0 .35em; color: var(--border-strong); font-weight: 400; }
.crumbs [aria-current] { color: var(--fg); }

.hint { margin: 14px 0 0; font-size: 13px; color: var(--quiet); }
.hint a, .lead a { color: var(--soft); border-bottom: 1px solid var(--border-strong); }
.hint a:hover, .lead a:hover { color: var(--fg); border-color: var(--purple); }

/* Home. */
.home { padding-top: 72px; }
.hero h1 { margin: 0; max-width: 16ch; font-size: clamp(34px, 5.2vw, 56px); font-weight: 600; line-height: 1.05; letter-spacing: -.035em; }
.grad { background: linear-gradient(90deg, var(--red), var(--purple)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.label { margin: 0; font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--quiet); }

/* The big search under the headline. */
.search-large { margin: 36px 0 0; max-width: 640px; }
.search-large input { padding: 14px 44px 14px 18px; border-radius: var(--radius); font-size: 16px; }
.search-large kbd { right: 14px; }

/* News and Trending, side by side. */
.boards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 64px; }
.board { padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.board h2 { margin-bottom: 10px; }
.empty { margin: 0; font-size: 13px; color: var(--quiet); }
.board-note { margin: -4px 0 6px; font-size: 12.5px; color: var(--quiet); }
.feed { margin: 0; padding: 0; list-style: none; }
.feed li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; }
.feed li + li { border-top: 1px solid var(--border); }
.feed a { display: flex; flex-direction: column; min-width: 0; }
.feed-name { font-weight: 500; overflow-wrap: anywhere; transition: color .15s; }
.feed a:hover .feed-name { color: var(--purple); }
.feed-note { font-size: 12.5px; color: var(--quiet); overflow-wrap: anywhere; }
.feed-when { font-size: 12.5px; color: var(--quiet); white-space: nowrap; }

/* Engine tables, in a panel that scrolls sideways on its own. */
.panel { margin-top: 28px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { padding: 14px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
tbody tr:last-child td { border-bottom: 0; }
th { font-size: 12px; font-weight: 500; letter-spacing: .02em; color: var(--quiet); white-space: nowrap; background: var(--surface-2); }
thead th:first-child { border-top-left-radius: var(--radius); }
thead th:last-child { border-top-right-radius: var(--radius); }
tbody tr { transition: background .15s; }
tbody tr:hover { background: var(--surface-2); }
td { color: var(--soft); }
td a { color: var(--soft); }
td a:hover { color: var(--fg); }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--fg); }
td code { font: inherit; color: inherit; }
th.num { font: 500 12px var(--sans); color: var(--quiet); }
td.engine { white-space: nowrap; }
td.engine > a { font-weight: 500; color: var(--fg); white-space: nowrap; }
td.engine > a:hover { color: var(--purple); }
td.model a { white-space: nowrap; }
.summary { display: block; margin-top: 4px; font-size: 13px; line-height: 1.5; color: var(--quiet); }
.reported .num { color: var(--soft); }
.bench { white-space: nowrap; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--quiet);
  white-space: nowrap;
}
.pill.eval {
  color: var(--fg);
  border-color: rgba(194, 138, 187, .45);
  background: linear-gradient(90deg, rgba(220, 102, 82, .14), rgba(194, 138, 187, .14));
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: linear-gradient(135deg, var(--red), var(--purple)); }
a.pill { transition: border-color .15s, color .15s; }
a.pill:hover { color: var(--fg); border-color: var(--purple); }
/* A small Hugging Face or GitHub logo after a name, linking out. */
.logo { display: inline-block; margin-left: 6px; line-height: 1; opacity: .45; transition: opacity .15s; }
.logo:hover { opacity: 1; }
.facts dd a.logo { border: 0; }
.logo img { display: inline-block; width: .85em; height: .85em; vertical-align: -.05em; }
.tag {
  display: inline-block;
  margin-left: 8px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.7;
  color: var(--red);
  background: rgba(220, 102, 82, .12);
  vertical-align: 1px;
  white-space: nowrap;
}

/* Engine page. */
/* The five headline stats, as the engine's README opens. */
.stats-row { margin: 28px 0 0; }
.stats-caption { margin: 0 0 10px; font-size: 14px; color: var(--soft); }
.stats-caption .quiet { color: var(--quiet); }
.stats {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--border);
  overflow: hidden;
}
.stats div { padding: 16px 12px; text-align: center; background: var(--surface); }
.stats dd { margin: 0; font-size: 20px; font-weight: 600; color: var(--fg); font-variant-numeric: tabular-nums; }
.stats dt { margin: 4px 0 0; font-size: 12px; color: var(--quiet); }
@media (max-width: 640px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  margin: 28px 0 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--border);
  overflow: hidden;
}
.facts div { flex: 1 1 180px; padding: 14px 18px; background: var(--surface); }
.facts dt { font-size: 12px; color: var(--quiet); }
.facts dd { margin: 4px 0 0; font-size: 14px; color: var(--fg); overflow-wrap: anywhere; }
.facts dd a { border-bottom: 1px solid var(--border-strong); }
.facts dd a:hover { border-color: var(--purple); }
.facts .tag { margin: 0 6px 0 0; }

.readme { margin-top: 28px; max-width: 780px; color: var(--soft); }
.readme .stats dd { font-size: 17px; white-space: nowrap; }
.readme .card-title { margin: 0; padding-bottom: 12px; border-bottom: 1px solid var(--border); font-size: 26px; font-weight: 600; letter-spacing: -.02em; line-height: 1.3; color: var(--fg); }
.readme > :first-child { margin-top: 0; }
.readme h2 { margin: 48px 0 0; padding-bottom: 10px; border-bottom: 1px solid var(--border); font-size: 20px; font-weight: 600; letter-spacing: -.015em; color: var(--fg); }
.readme h3 { margin: 28px 0 0; font-size: 16px; font-weight: 600; color: var(--fg); }
.readme p, .readme ul, .readme ol { margin: 14px 0 0; }
.readme ul, .readme ol { padding-left: 22px; }
.readme li + li { margin-top: 6px; }
.readme strong { color: var(--fg); font-weight: 600; }
.readme a { color: var(--fg); border-bottom: 1px solid var(--border-strong); }
.readme a:hover { border-color: var(--purple); }
.readme p code, .readme li code { padding: 1px 5px; border-radius: 5px; background: var(--surface-2); overflow-wrap: anywhere; }
.readme table { display: block; overflow-x: auto; margin-top: 16px; font-size: 13.5px; border: 1px solid var(--border); border-radius: var(--radius); }
.readme th, .readme td { padding: 10px 14px; }
.readme td { min-width: 9ch; }
.readme pre { margin: 16px 0 0; padding: 16px 18px; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.readme pre code { color: var(--fg); font-size: 13px; line-height: 1.6; }
.readme blockquote { margin: 16px 0 0; padding-left: 16px; border-left: 2px solid var(--border-strong); }
.alert { margin: 16px 0 0; padding: 14px 18px; border: 1px solid rgba(194, 138, 187, .35); border-radius: var(--radius); background: rgba(194, 138, 187, .06); }
.alert.warning, .alert.caution { border-color: rgba(220, 102, 82, .4); background: rgba(220, 102, 82, .06); }
.alert p:first-of-type { margin-top: 0; }
.alert .alert-title { margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--purple); }
.alert.warning .alert-title, .alert.caution .alert-title { color: var(--red); }
/* The facts, below the card as a footnote. */
.facts.footnote { margin-top: 56px; max-width: 780px; border-color: var(--border); }
.footnote div { padding: 10px 14px; }
.footnote dt { font-size: 11px; }
.footnote dd { font-size: 12.5px; color: var(--soft); }
.footnote + .hint { margin-top: 16px; }


@media (max-width: 600px) {
  .shell { padding-left: 16px; padding-right: 16px; }
  .home { padding-top: 48px; }
  .crumbs { font-size: 18px; }
  .boards { grid-template-columns: minmax(0, 1fr); margin-top: 40px; }
  .search-large { margin-top: 28px; }
  .feed li { flex-direction: column; gap: 2px; }

  .top a { padding: 6px 8px; }
  .bar-inner { flex-wrap: wrap; row-gap: 0; }
  .bar .search { order: 3; flex: 1 0 100%; margin: 0 0 12px; }
  .bar .search input { font-size: 16px; }
  .search kbd { display: none; }
}

/* The footer: three items each side of the D20, which sits exactly in the middle; on phones the D20
   goes on top and the six items wrap, centred. Then the legal pages' text. */
.site-footer { border-top: 1px solid var(--border); font-size: 12px; color: var(--quiet); }
.foot-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 28px; padding-top: 24px; padding-bottom: 32px; }
.foot-left, .foot-right { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot-left { justify-content: flex-end; }
.foot-right { justify-content: flex-start; }
.site-footer a { color: var(--quiet); transition: color .15s, opacity .15s; }
.site-footer a:hover { color: var(--soft); }
.foot-logo { display: block; line-height: 0; opacity: .6; }
.foot-logo:hover { opacity: 1; }
.foot-logo img { width: 22px; height: 22px; }
@media (max-width: 640px) {
  .foot-inner { grid-template-columns: 1fr; gap: 14px; justify-items: center; }
  .foot-logo { order: -1; }
  .foot-left, .foot-right { justify-content: center; }
}
.legal-text h2 { margin-top: 36px; font-size: 16px; }
