/* Editorial typography, collage and palette adapted from the Atlas of LLM Architectures. */
:root {
  --ink: #0d0d0f;
  --ink2: #3a3a42;
  --muted: #61616e;
  --line: #e6e6ec;
  --control-line: #81838f;
  --soft: #f5f6f9;
  --accent: #2f55e4;
  --tint: #e7edff;
  --nav: 60px;
  --wide: 1180px;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav) + 1rem); }
body { margin: 0; background: #fff; color: var(--ink); font: 1rem/1.55 var(--sans); }
body:has(dialog[open]) { overflow: hidden; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
.wrap { width: min(var(--wide), calc(100% - 3.5rem)); margin-inline: auto; }
.skip { position: fixed; top: .5rem; left: .5rem; z-index: 20; padding: .6rem 1rem; background: #fff; transform: translateY(-150%); }
.skip:focus { transform: none; }

.nav {
  position: sticky; top: 0; z-index: 10;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 1rem; height: var(--nav); padding-inline: 1.75rem;
  background: rgb(255 255 255 / 90%); border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.6) blur(14px);
}
.nav a { text-decoration: none; }
.nav a:hover { text-decoration: underline; text-underline-offset: .25em; }
.brand { font-weight: 650; letter-spacing: -.025em; }
.nav nav { display: flex; gap: 1.75rem; }
.nav nav a, .home { color: var(--ink2); font-size: .875rem; }
.home { justify-self: end; }

.hero {
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 9% 105%, #fff4c4 0%, transparent 47%),
    radial-gradient(ellipse at 78% -15%, #a9b9f4, #c4cff8 36%, #dfe5fb 72%, #f3f5fe);
}
.hero-inner {
  min-height: 430px; padding-block: 2.5rem;
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(1.5rem, 5vw, 4.5rem);
}
.hero h1 { font-size: clamp(2.6rem, 5.5vw, 4.15rem); line-height: 1.02; letter-spacing: -.045em; font-weight: 500; }
.lede { max-width: 33rem; margin-block: 1.2rem 1.45rem; color: var(--ink2); font-size: 1.15rem; }
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.65rem; padding: .45rem .95rem; border: 1px solid var(--control-line);
  border-radius: 999px; background: #fff; font-size: .875rem; font-weight: 550; text-decoration: none;
}
.button:hover:not(:disabled) { border-color: var(--ink); }
.button:disabled { opacity: .44; }
.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.primary:hover { background: #30303b; }
.hero-visual { position: relative; aspect-ratio: 1.55; }
.hero-visual::before { content: ""; position: absolute; inset: 12% 25% 24% 4%; background: #7699ee; }
.schedule, .hero-matrix {
  position: absolute; display: grid; overflow: hidden;
  border: 1px solid rgb(30 45 93 / 12%); border-radius: 12px;
  background: #fff; box-shadow: 0 16px 38px rgb(22 35 87 / 17%);
}
.schedule {
  inset: 6% 6% 24% 14%; grid-template-rows: repeat(4, 1fr);
  gap: clamp(.3rem, 1.45vw, .85rem); padding: clamp(.75rem, 2.2vw, 1.8rem);
  transform: rotate(-5deg);
}
.lane {
  display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: .14rem; align-items: center;
  background: repeating-linear-gradient(90deg, transparent 0 calc(11.111% - 1px), #e2e8fa calc(11.111% - 1px) 11.111%);
}
.lane i { grid-column: var(--from) / var(--to); height: 66%; border-radius: 4px; background: #5879df; }
.lane:nth-child(2) i { background: #419a79; }
.lane:nth-child(3) i { background: #8561ce; }
.lane:nth-child(4) i { background: #ba8c4e; }
.hero-matrix {
  inset: 55% 0 3% 57%; grid-template-columns: repeat(4, 1fr);
  gap: clamp(.18rem, .45vw, .4rem); padding: clamp(.45rem, 1.1vw, 1rem);
  transform: rotate(7deg);
}
.hero-matrix i { border-radius: 3px; background: #e4e9f9; }
.hero-matrix i:nth-child(3n) { background: #abbbee; }
.hero-matrix i:nth-child(5n) { background: #7492e8; }
.hero-matrix i:nth-child(7n) { background: #536fce; }

.explorer { padding-block: clamp(2.6rem, 5vw, 4.2rem); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem 2rem; }
.section-head h2, .methodology h2 { font-size: clamp(2rem, 3.4vw, 2.65rem); line-height: 1.12; font-weight: 500; letter-spacing: -.035em; }
.section-head p { margin-top: .5rem; color: var(--ink2); }
.corpus-total { font-size: .9rem; font-variant-numeric: tabular-nums; white-space: nowrap; padding-bottom: .1rem; }
.filters { margin: 1.4rem 0 1.35rem; padding-block: .85rem; display: flex; align-items: flex-end; gap: .75rem 1.25rem; border-block: 1px solid var(--line); }
.filters label, .sort { display: grid; gap: .3rem; font-size: .875rem; font-weight: 550; }
.filters { flex-wrap: wrap; }
.search { flex: 1 1 14rem; min-width: 12rem; }
.problem, .restriction, .measure { flex: 0 1 12rem; max-width: 17rem; }
.problem select, .restriction select, .measure select, .graph-selects select { width: 100%; }
.knowledge-graph .section-head { flex-wrap: wrap; }
.graph-selects { display: flex; flex: 1 1 100%; flex-wrap: wrap; align-items: flex-end; gap: .75rem 1.25rem; min-width: 0; }
.graph-selects label { flex: 0 1 12.5rem; min-width: 0; }
@media (max-width: 940px) {
  .knowledge-graph .section-head { flex-wrap: wrap; }
  .graph-selects { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .graph-selects { flex-wrap: wrap; }
  .graph-selects label { flex-basis: 100%; max-width: 17rem; }
}
input, select { min-height: 2.65rem; background: #fff; border: 1px solid var(--control-line); border-radius: 10px; padding: .42rem .65rem; font-size: 1rem; font-weight: 400; }
input { width: 100%; }
input::placeholder { color: var(--muted); }
select { appearance: none; padding-right: 2rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%233a3a42' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-position: right .55rem center; background-repeat: no-repeat; background-size: 1rem; }
.quiet:disabled { opacity: .58; }
.quiet { min-height: 2.65rem; padding: .2rem .05rem; border: 0; background: #fff; text-decoration: underline; text-underline-offset: .2em; font-size: .875rem; white-space: nowrap; }

.charts { display: grid; grid-template-columns: minmax(0, 1.58fr) minmax(0, 1fr); gap: 1.25rem; }
.chart { container-type: inline-size; display: flex; flex-direction: column; min-width: 0; padding: 1.25rem; border: 1px solid var(--line); border-radius: 18px; }
.chart h3 { font-size: 1.2rem; letter-spacing: -.02em; font-weight: 600; margin-bottom: .75rem; }
.note { color: var(--muted); font-size: .875rem; }
.chart .note { margin-top: auto; padding-top: .85rem; overflow-wrap: anywhere; }
.chart .matrix-note { margin-top: 0; padding-top: .25rem; }
.chart .matrix-legend { display: none; }
@container (max-width: 36rem) {
  .matrix thead .axis-label { display: none; }
  .chart .matrix-legend { display: block; margin-top: 0; padding-top: .25rem; }
}
.matrix { border-spacing: 4px; table-layout: fixed; width: calc(100% + 8px); margin-inline: -4px; font-size: .875rem; font-variant-numeric: tabular-nums; }
.matrix th { font-weight: 550; }
.matrix thead > tr > :first-child { width: 22%; }
.matrix .round { background: transparent; padding: .3rem .1rem; min-width: 0; width: 100%; border: 1px solid transparent; border-radius: 7px; color: var(--ink2); font-size: .875rem; line-height: 1.2; }
.matrix .round:hover { background: var(--soft); }
.matrix .round[aria-pressed="true"] { border-color: var(--accent); background: var(--tint); color: #173593; }
.matrix .axis-label { display: block; margin-top: .2rem; font-weight: 400; color: var(--muted); overflow-wrap: anywhere; }
.matrix .cell { width: 100%; min-height: 2.75rem; padding: .25rem; border: 1px solid transparent; border-radius: 7px; background: color-mix(in srgb, #4d71eb var(--heat, 0%), #f5f7fc); font-weight: 650; }
.matrix .row-total, .matrix tfoot { text-align: center; font-weight: 600; }
.matrix tfoot td, .matrix tfoot th { padding-block: .28rem; border-top: 1px solid var(--line); }
.matrix .cell.axis-active { border-color: #3e5bba; background: #d3ddff; color: #172f82; }
.matrix .cell:hover { border-color: #7e94e9; }
.matrix .cell[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.families { display: grid; gap: .22rem; }
.family {
  display: grid; grid-template-columns: 7.4rem 1fr 3.05rem; align-items: center;
  gap: .6rem; width: 100%; min-height: 2.55rem; padding: .3rem .4rem; border: 1px solid transparent;
  border-radius: 7px; background: #fff; text-align: left; font-size: .875rem;
}
.family:hover { background: var(--soft); }
.family[aria-pressed="true"] { border-color: var(--accent); background: #f5f7ff; }
.track { height: .58rem; background: #ecedf2; border-radius: 999px; }
.fill { display: block; height: 100%; border-radius: inherit; }
.number { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.selection { overflow-wrap: anywhere; margin-top: 1rem; color: #173593; font-size: .9rem; }

.papers { margin-top: 3.25rem; }
.results { list-style: none; padding: 0; margin: 1.2rem 0 0; border-top: 1px solid var(--line); }
.study { padding: .95rem .1rem; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: .55rem 1.1rem; }
.study-title { display: inline; border: 0; padding: 0; background: transparent; text-align: left; font-size: 1.07rem; font-weight: 620; line-height: 1.4; overflow-wrap: anywhere; }
.study-title:hover { text-decoration: underline; text-underline-offset: .2em; }
.study-meta { color: var(--muted); font-size: .875rem; margin-top: .26rem; overflow-wrap: anywhere; }
.tags { display: flex; align-items: center; flex-wrap: wrap; gap: .32rem; justify-content: flex-end; margin-top: .05rem; }
.tag { display: inline-flex; align-items: center; gap: .33rem; border: 1px solid var(--line); border-radius: 999px; background: var(--soft); padding: .13rem .5rem; font-size: .8125rem; color: var(--ink2); white-space: nowrap; }
.tag i { width: .43rem; height: .43rem; border-radius: 50%; }
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1.15rem; margin-top: 1.4rem; font-size: .875rem; color: var(--ink2); }
.empty, .error { border-radius: 12px; background: var(--soft); padding: 1rem; margin-top: 1rem; color: var(--ink2); }
.empty { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem 1rem; }
.empty + .results:empty { display: none; }

.knowledge-graph { margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.graph-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; margin-block: .85rem .55rem; }
.graph-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.15rem; }
#graph-count { color: var(--ink2); font-variant-numeric: tabular-nums; }
.graph-stage {
  --graph-flow: horizontal;
  position: relative; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, .95fr) minmax(0, 1.15fr) minmax(0, 1.55fr);
  gap: clamp(1.35rem, 3.2vw, 3.4rem); padding: clamp(1rem, 2.6vw, 1.9rem);
  border: 1px solid #c6cde2; border-radius: 18px;
  background: radial-gradient(ellipse at 42% 42%, #eef2fd, #f7f8fc 75%);
}
#graph-canvas { position: absolute; z-index: -1; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.graph-column { min-width: 0; }
.graph-column h3 { margin-bottom: .65rem; color: var(--ink2); font-size: .9rem; font-weight: 650; }
#graph-environment { display: grid; align-content: center; height: calc(100% - 2.5rem); min-height: 4.25rem; }
.graph-nodes { display: grid; gap: .45rem; margin: 0; padding: 0; list-style: none; }
.graph-node {
  width: 100%; padding: .62rem .72rem;
  border: 1px solid #6c7184; border-radius: 9px;
  background: #fff; color: var(--ink); text-align: left; line-height: 1.25;
}
button.graph-node:hover { border-color: var(--accent); background: #f0f3ff; }
.graph-node[aria-pressed="true"] { border-color: #274bb0; background: #dce5ff; color: #152f76; box-shadow: inset 0 0 0 1px #274bb0; }
.graph-filter { display: flex; justify-content: space-between; align-items: baseline; gap: .25rem .45rem; font-size: .875rem; }
.graph-filter > :first-child { overflow-wrap: anywhere; }
#graph-families .graph-filter { border-left: 4px solid var(--graph-node-color, #274bb0); }
.graph-number { font-weight: 650; font-variant-numeric: tabular-nums; }
.graph-origin-node { background: #e6edff; border-color: #4661a8; color: #183474; font-weight: 650; font-size: .95rem; }
.graph-origin-code { display: block; margin-bottom: .15rem; font: .75rem/1.1 var(--mono); }
.graph-origin-count { display: block; margin-top: .3rem; font-size: .8rem; font-weight: 500; color: #183474; font-variant-numeric: tabular-nums; }
.graph-column-note { margin-top: .65rem; font-size: .8125rem; line-height: 1.4; }
.graph-study { display: grid; gap: .25rem; font-size: .875rem; }
.graph-study-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.graph-study-meta { color: var(--muted); font: .75rem/1.25 var(--mono); }
.graph-pages { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .7rem; justify-content: flex-end; margin-top: .65rem; font-size: .875rem; color: var(--ink2); }
.graph-pages .button { padding-inline: .75rem; }
.graph-page-status { font-variant-numeric: tabular-nums; }
.graph-note { margin-top: .85rem; }
@media (max-width: 940px) {
  .graph-stage {
    --graph-flow: vertical;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.85rem;
  }
  #graph-environment { height: auto; min-height: 0; }
  #graph-families, #graph-benchmarks, #graph-studies { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .graph-nodes li { display: flex; }
}
@media (max-width: 640px) {
  #graph-studies { grid-template-columns: minmax(0, 1fr); }
  .graph-pages { justify-content: space-between; }
}

.methodology { border-block: 1px solid var(--line); background: var(--soft); padding-block: 3rem; }
.methodology-inner { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(0, 1.35fr); gap: 1.25rem 3rem; }
.methodology dl { display: grid; grid-template-columns: minmax(140px, 12rem) minmax(0, 1fr); gap: .5rem 1rem; margin-block: 1.15rem; }
.methodology dt { font-weight: 600; }
.methodology dd { margin: 0; color: var(--ink2); }
.methodology .note { margin-top: .85rem; }
.footer { display: flex; justify-content: space-between; gap: 1rem; padding-block: 1.4rem 2rem; font-size: .875rem; color: var(--muted); }

.detail { position: fixed; inset: 0 0 0 auto; margin: 0; height: 100dvh; max-height: none; width: min(46rem, 100%); max-width: none; padding: 0; border: 0; color: var(--ink); background: #fff; }
.detail[open] { animation: slide-in .22s ease-out; }
.detail::backdrop { background: rgb(15 18 30 / 34%); }
@keyframes slide-in { from { transform: translateX(24px); } }
.detail-top { position: sticky; top: 0; z-index: 1; background: rgb(255 255 255 / 92%); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: .75rem clamp(1rem, 4vw, 2rem); }
.study-id { color: var(--muted); font: .875rem/1.3 var(--mono); }
.detail-content { padding: 1.5rem clamp(1rem, 4vw, 2rem) 2.5rem; overflow-wrap: anywhere; }
.detail h2 { font-size: clamp(1.75rem, 4.5vw, 2.6rem); font-weight: 500; line-height: 1.13; letter-spacing: -.035em; }
.detail .primary { margin-top: 1.05rem; }
.facts { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); padding: .8rem 0; gap: .45rem .8rem; border-block: 1px solid var(--line); }
.facts dt { font-weight: 600; }
.facts dd { margin: 0; color: var(--ink2); }
.detail section { margin-top: 1.4rem; }
.detail h3 { font-size: 1.04rem; font-weight: 650; }
.detail-list { margin: .55rem 0 0; padding-left: 1.2rem; }
.detail-list li + li { margin-top: .65rem; }
.setting-group { margin-top: .75rem; }
.setting-group h4 { margin: 0 0 .2rem; font-size: .95rem; }
.setting-group .detail-list { margin-top: .32rem; }
.detail-list .study-meta { display: block; }
.detail-list a { text-underline-offset: .2em; }

@media (max-width: 940px) {
  .charts { grid-template-columns: minmax(0, 1fr); }
  .chart { padding: 1rem; }
}
@media (max-width: 730px) {
  .wrap { width: calc(100% - 2rem); }
  .nav { padding-inline: 1rem; }
  .nav nav { gap: .8rem; }
  .hero-inner { min-height: 0; padding-block: 2.5rem 2rem; gap: 1.35rem; }
}
@media (max-width: 540px) {
  :root { --nav: 82px; }
  .nav { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; align-content: center; gap: .25rem .65rem; }
  .nav nav { grid-row: 2; grid-column: 1 / -1; }
  .home { grid-row: 1; grid-column: 2; }
  .hero-inner, .methodology-inner { grid-template-columns: minmax(0, 1fr); }
  .hero-visual { width: min(90%, 23rem); justify-self: end; }
  .section-head { flex-wrap: wrap; }
  .corpus-total { white-space: normal; }
  .filters { flex-wrap: wrap; justify-content: space-between; }
  .search { flex-basis: 100%; }
  .chart { padding: .75rem; }
  .matrix { font-size: .8125rem; border-spacing: 3px; width: calc(100% + 6px); margin-inline: -3px; }
  .matrix .round { font-size: .8125rem; padding-inline: 0; }
  .matrix thead th, .matrix thead .round { font-size: .75rem; }
  .matrix .axis-label { font-size: .7rem; overflow-wrap: normal; }
  .matrix thead > tr > :first-child { width: 26%; }
  .matrix th:last-child { width: 14%; }
  .study { grid-template-columns: minmax(0, 1fr); }
  .tags { justify-content: flex-start; }
  .methodology dl { display: block; }
  .methodology dd { margin-bottom: .6rem; }
}
@media (max-width: 400px) {
  .matrix thead th, .matrix thead .round { font-size: .64rem; }
}
@media (max-width: 350px) {
  .matrix { font-size: .72rem; }
  .matrix thead th, .matrix thead .round { font-size: .56rem; }
  .matrix .axis-label { font-size: .64rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .detail[open] { animation: none; }
}
