:root {
  color-scheme: light;
  --bg: #f6f7f8;
  --surface: #ffffff;
  --surface-strong: #eef0f2;
  --ink: #111318;
  --muted: #666b73;
  --line: #d9dde2;
  --line-strong: #aeb4bd;
  --lime: #b8f36f;
  --coral: #ff6b57;
  --coral-text: #b72b21;
  --cyan: #53c7ed;
  --yellow: #ffd35a;
  --dark: #101216;
  --dark-muted: #a8adb7;
  --shadow: 0 18px 50px rgb(17 19 24 / 10%);
  --radius: 6px;
  --content: 1240px;
  --header-height: 68px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1115;
  --surface: #171a20;
  --surface-strong: #20242b;
  --ink: #f3f5f7;
  --muted: #9da4ae;
  --line: #30353d;
  --line-strong: #555d68;
  --coral-text: #ff8d7d;
  --shadow: 0 18px 50px rgb(0 0 0 / 32%);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Manrope", "Noto Sans SC", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
  letter-spacing: 0;
}

button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  color: inherit;
}

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

.skip-link {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 1000;
  padding: 10px 14px;
  background: var(--lime);
  color: var(--dark);
  border-radius: var(--radius);
  font-weight: 800;
}

.skip-link:focus {
  top: 12px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 0 max(24px, calc((100vw - var(--content)) / 2));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: max-content;
  font-size: 18px;
  font-weight: 800;
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 31px;
  height: 31px;
  background: var(--dark);
  border-radius: 5px;
}

.brand-mark span {
  width: 3px;
  background: var(--lime);
  border-radius: 3px;
}

.brand-mark span:nth-child(1) { height: 8px; }
.brand-mark span:nth-child(2) { height: 17px; }
.brand-mark span:nth-child(3) { height: 12px; }
.brand-mark span:nth-child(4) { height: 21px; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.main-nav a {
  position: relative;
  padding: 20px 0;
}

.main-nav a::after {
  position: absolute;
  right: 0;
  bottom: 14px;
  left: 0;
  height: 2px;
  background: var(--coral);
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.button,
.icon-button,
.text-button,
.load-more,
.repo-tab,
.paper-tab {
  border: 0;
  cursor: pointer;
}

.button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 800;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button svg,
.icon-button svg {
  width: 18px;
  height: 18px;
}

.button-ghost {
  background: var(--surface);
  border: 1px solid var(--line);
}

.button-dark {
  background: var(--dark);
  color: #fff;
}

.icon-button {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  background: transparent;
  border-radius: var(--radius);
}

.icon-button:hover {
  background: var(--surface-strong);
}

.hero {
  position: relative;
  min-height: min(670px, calc(100vh - var(--header-height)));
  overflow: hidden;
  background: var(--dark);
  color: #f8fafb;
  isolation: isolate;
}

#voice-canvas,
.hero-grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-grid {
  z-index: -1;
  opacity: 0.18;
  background-image: linear-gradient(rgb(255 255 255 / 12%) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / 12%) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to right, transparent, #000 30%, #000 90%);
}

#voice-canvas {
  z-index: -1;
  opacity: 0.88;
}

.hero-content {
  width: min(var(--content), calc(100% - 48px));
  min-height: inherit;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: auto;
  padding: 72px 0 84px;
}

.hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(62px, 10vw, 142px);
  line-height: 0.9;
  font-weight: 800;
  letter-spacing: 0;
}

.hero-lead {
  margin: 18px 0 0;
  color: var(--lime);
  font-family: "DM Mono", monospace;
  font-size: clamp(18px, 2.4vw, 30px);
  font-weight: 500;
}

.hero-copy {
  max-width: 650px;
  margin: 22px 0 0;
  color: #c7cbd2;
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.8;
}

.hero-search {
  width: min(720px, 100%);
  min-height: 58px;
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 12px;
  margin-top: 34px;
  padding: 7px 7px 7px 18px;
  background: #fff;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 7px;
  box-shadow: 0 18px 70px rgb(0 0 0 / 32%);
}

.hero-search svg {
  width: 20px;
  color: #6f747c;
}

.hero-search input {
  min-width: 0;
  height: 42px;
  color: #111318;
  background: transparent;
  border: 0;
  outline: 0;
}

.hero-search input::placeholder {
  color: #8b9199;
}

.hero-search button {
  height: 44px;
  padding: 0 20px;
  color: var(--dark);
  background: var(--lime);
  border: 0;
  border-radius: 5px;
  font-weight: 800;
  cursor: pointer;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 30px;
}

.hero-stat {
  display: flex;
  align-items: baseline;
  gap: 7px;
  color: #959ba5;
  font-size: 13px;
}

.hero-stat strong {
  color: #fff;
  font-family: "DM Mono", monospace;
  font-size: 20px;
  font-weight: 500;
}

.hero-orbit {
  position: absolute;
  top: 50%;
  right: max(24px, calc((100vw - var(--content)) / 2));
  width: min(32vw, 430px);
  aspect-ratio: 1;
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 50%;
  transform: translateY(-50%);
  animation: orbit-breathe 8s ease-in-out infinite;
}

.hero-orbit::before,
.hero-orbit::after {
  position: absolute;
  inset: 14%;
  border: 1px solid rgb(184 243 111 / 24%);
  border-radius: 50%;
  content: "";
}

.hero-orbit::after {
  inset: 34%;
  border-color: rgb(83 199 237 / 32%);
}

.orbit-label {
  position: absolute;
  padding: 6px 9px;
  color: #d9dde3;
  background: #171a20;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 4px;
  font-family: "DM Mono", monospace;
  font-size: 11px;
}

.orbit-label::before {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  background: var(--lime);
  border-radius: 50%;
  content: "";
}

.orbit-label-one { top: 9%; left: 17%; }
.orbit-label-two { top: 46%; right: -9%; }
.orbit-label-three { bottom: 8%; left: 16%; }
.orbit-label-four { top: 55%; left: -13%; }

@keyframes orbit-breathe {
  0%, 100% { transform: translateY(-50%) scale(1); }
  50% { transform: translateY(-50%) scale(1.025); }
}

.ticker {
  overflow: hidden;
  color: var(--dark);
  background: var(--lime);
  border-top: 1px solid #9bd452;
  border-bottom: 1px solid #9bd452;
}

.ticker-track {
  min-width: max-content;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 11px 24px;
  font-family: "DM Mono", monospace;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
}

.ticker-track i {
  width: 4px;
  height: 4px;
  background: var(--dark);
  border-radius: 50%;
}

.section {
  width: min(var(--content), calc(100% - 48px));
  margin: 0 auto;
  padding: 108px 0;
}

.section-heading {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 460px);
  align-items: end;
  gap: 48px;
  margin-bottom: 46px;
}

.section-heading h2,
.coverage-band h2,
.research-heading h2 {
  max-width: 800px;
  margin: 5px 0 0;
  font-size: clamp(38px, 5vw, 68px);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: 0;
}

.section-heading > p,
.research-heading > p,
.coverage-copy > p:not(.section-index) {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.section-index {
  margin: 0;
  color: var(--coral);
  font-family: "DM Mono", monospace;
  font-size: 12px;
  font-weight: 500;
}

.explorer-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.filters {
  position: sticky;
  top: calc(var(--header-height) + 20px);
  padding-right: 24px;
  border-right: 1px solid var(--line);
}

.filter-heading,
.dataset-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.filter-heading-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.filter-toggle {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.filter-toggle svg {
  width: 15px;
  height: 15px;
}

.filter-heading {
  margin-bottom: 24px;
  font-weight: 800;
}

.text-button {
  padding: 0;
  color: var(--coral);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.filters fieldset {
  margin: 0 0 28px;
  padding: 0;
  border: 0;
}

.filters legend {
  margin-bottom: 10px;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
}

.check-list {
  display: grid;
  gap: 8px;
}

.check-row {
  min-height: 30px;
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  font-size: 13px;
}

.check-row input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--coral);
}

.check-row small {
  margin-left: auto;
  color: var(--muted);
  font-family: "DM Mono", monospace;
}

.switch-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.switch-row input {
  position: absolute;
  opacity: 0;
}

.switch {
  position: relative;
  width: 38px;
  height: 22px;
  background: var(--line-strong);
  border-radius: 22px;
  transition: background 160ms ease;
}

.switch::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  content: "";
  transition: transform 160ms ease;
}

.switch-row input:checked + .switch {
  background: var(--coral);
}

.switch-row input:checked + .switch::after {
  transform: translateX(16px);
}

.dataset-toolbar {
  min-height: 44px;
  margin-bottom: 10px;
}

.result-count {
  font-size: 14px;
  font-weight: 800;
}

.result-count span {
  color: var(--coral);
  font-family: "DM Mono", monospace;
}

.sort-control {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.sort-control select {
  height: 34px;
  padding: 0 30px 0 10px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.dataset-head,
.dataset-row {
  display: grid;
  grid-template-columns: minmax(230px, 2fr) minmax(140px, 1fr) 120px 128px 38px;
  align-items: center;
  gap: 18px;
}

.dataset-head {
  min-height: 38px;
  padding: 0 14px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-family: "DM Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
}

.dataset-row {
  position: relative;
  width: 100%;
  min-height: 102px;
  padding: 14px;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 150ms ease, transform 150ms ease;
}

.dataset-row:hover,
.dataset-row:focus-visible {
  z-index: 1;
  background: var(--surface);
  box-shadow: var(--shadow);
  outline: none;
  transform: translateX(3px);
}

.dataset-name {
  min-width: 0;
}

.dataset-name-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.dataset-name strong {
  overflow: hidden;
  font-size: 16px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dataset-name p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.quality {
  flex: 0 0 auto;
  min-width: 27px;
  padding: 2px 5px;
  color: var(--dark);
  background: var(--lime);
  border-radius: 3px;
  font-family: "DM Mono", monospace;
  font-size: 10px;
  text-align: center;
}

.dataset-coverage strong,
.dataset-size strong,
.dataset-access strong {
  display: block;
  font-size: 13px;
  line-height: 1.4;
}

.dataset-coverage small,
.dataset-size small,
.dataset-access small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.access-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  background: var(--line-strong);
  border-radius: 50%;
}

.access-open { background: #44bf74; }
.access-register { background: var(--yellow); }
.access-apply { background: var(--coral); }
.access-check { background: var(--cyan); }

.row-arrow {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.row-arrow svg {
  width: 15px;
  height: 15px;
}

.load-more {
  width: 100%;
  min-height: 46px;
  margin-top: 18px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-weight: 800;
}

.load-more:hover {
  background: var(--surface);
}

.coverage-band {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 72px;
  align-items: center;
  padding: 94px max(24px, calc((100vw - var(--content)) / 2));
  background: var(--surface-strong);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.coverage-copy h2 {
  margin-bottom: 24px;
  font-size: clamp(36px, 4.4vw, 60px);
}

.coverage-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 12px;
}

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

.coverage-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.legend-high { background: var(--cyan); }
.legend-mid { background: var(--yellow); }
.legend-low { background: var(--coral); }

.language-field {
  min-height: 420px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(8, 1fr);
  gap: 8px;
}

.language-node {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 8px;
  color: var(--dark);
  border: 1px solid rgb(17 19 24 / 13%);
  border-radius: 4px;
  font-family: "DM Mono", monospace;
  font-size: 10px;
  text-align: center;
  overflow-wrap: anywhere;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.language-node:hover {
  z-index: 2;
  box-shadow: 0 10px 28px rgb(17 19 24 / 15%);
  transform: translateY(-3px);
}

.language-node.high { background: var(--cyan); }
.language-node.mid { background: var(--yellow); }
.language-node.low { background: var(--coral); }
.language-node.growth { background: var(--lime); }

.repo-tabs,
.paper-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.repo-tabs {
  margin-bottom: 28px;
}

.repo-tab,
.paper-tab {
  min-height: 38px;
  padding: 0 13px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 800;
}

.repo-tab[aria-selected="true"],
.paper-tab[aria-selected="true"] {
  color: var(--dark);
  background: var(--lime);
  border-color: var(--lime);
}

.repo-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.repo-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 24px 20px;
  border-bottom: 1px solid var(--line);
  transition: background 160ms ease;
}

.repo-item:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.repo-item:hover {
  background: var(--surface);
}

.repo-rank {
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 20px;
}

.repo-main {
  min-width: 0;
}

.repo-name-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.repo-name-line h3 {
  overflow: hidden;
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.repo-main p {
  display: -webkit-box;
  overflow: hidden;
  min-height: 43px;
  margin: 8px 0 13px;
  color: var(--muted);
  font-size: 12px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.repo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 10px;
}

.repo-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.repo-meta svg {
  width: 12px;
  height: 12px;
}

.repo-link {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.repo-link:hover {
  color: var(--dark);
  background: var(--lime);
  border-color: var(--lime);
}

.repo-link svg {
  width: 15px;
}

.research-band {
  padding: 108px max(24px, calc((100vw - var(--content)) / 2));
  color: #f5f7f8;
  background: var(--dark);
}

.research-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 60px;
  align-items: end;
  margin-bottom: 48px;
}

.research-heading .section-index {
  grid-column: 1 / -1;
  margin-bottom: -48px;
  color: var(--lime);
}

.research-heading > p {
  color: var(--dark-muted);
}

.paper-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.paper-tab {
  color: #aeb3bc;
  border-color: #373c45;
}

.paper-search {
  width: min(280px, 100%);
  height: 40px;
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  color: #9da4ae;
  border: 1px solid #373c45;
  border-radius: 4px;
}

.paper-search svg {
  width: 16px;
}

.paper-search input {
  min-width: 0;
  color: #fff;
  background: transparent;
  border: 0;
  outline: 0;
}

.paper-list {
  border-top: 1px solid #353a43;
}

.paper-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1.2fr) minmax(240px, 0.8fr) 38px;
  gap: 24px;
  align-items: center;
  min-height: 122px;
  padding: 20px 0;
  border-bottom: 1px solid #353a43;
}

.paper-date {
  color: var(--lime);
  font-family: "DM Mono", monospace;
  font-size: 11px;
}

.paper-title h3 {
  margin: 0 0 6px;
  font-size: 17px;
  line-height: 1.4;
}

.paper-title span {
  color: #949aa5;
  font-size: 11px;
}

.paper-summary {
  margin: 0;
  color: #adb3bd;
  font-size: 12px;
}

.paper-link {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #424852;
  border-radius: 50%;
}

.paper-link:hover {
  color: var(--dark);
  background: var(--lime);
  border-color: var(--lime);
}

.paper-link svg {
  width: 15px;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.method-grid article {
  min-width: 0;
  padding: 26px 24px 30px;
  border-right: 1px solid var(--line);
}

.method-grid article:last-child {
  border-right: 0;
}

.method-grid article > span {
  color: var(--coral);
  font-family: "DM Mono", monospace;
  font-size: 12px;
}

.method-grid h3 {
  margin: 34px 0 10px;
  font-size: 18px;
}

.method-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.contribute-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-top: 54px;
  padding: 34px;
  color: var(--dark);
  background: var(--lime);
  border-radius: var(--radius);
}

.contribute-strip h3 {
  margin: 0 0 4px;
  font-size: 24px;
}

.contribute-strip p {
  margin: 0;
  font-size: 14px;
}

.site-footer {
  min-height: 160px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 32px;
  padding: 38px max(24px, calc((100vw - var(--content)) / 2));
  color: #a7adb7;
  background: #08090c;
  font-size: 12px;
}

.footer-brand {
  color: #fff;
}

.detail-dialog {
  width: min(720px, calc(100% - 32px));
  max-height: min(82vh, 760px);
  padding: 0;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 30px 90px rgb(0 0 0 / 36%);
}

.detail-dialog::backdrop {
  background: rgb(8 9 12 / 72%);
  backdrop-filter: blur(5px);
}

.dialog-close {
  position: sticky;
  z-index: 2;
  top: 16px;
  float: right;
  margin: 16px 16px 0 0;
  background: var(--surface-strong);
}

.dialog-body {
  padding: 46px 46px 42px;
}

.dialog-kicker {
  margin: 0 0 10px;
  color: var(--coral);
  font-family: "DM Mono", monospace;
  font-size: 11px;
}

.section-index,
.text-button,
.result-count span,
.method-grid article > span,
.dialog-kicker {
  color: var(--coral-text);
}

.dialog-body h2 {
  max-width: 590px;
  margin: 0;
  font-size: clamp(32px, 6vw, 52px);
  line-height: 1.08;
}

.dialog-summary {
  margin: 20px 0 28px;
  color: var(--muted);
  font-size: 15px;
}

.dialog-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.dialog-facts div {
  min-width: 0;
  padding: 14px 12px;
  border-right: 1px solid var(--line);
}

.dialog-facts div:last-child { border-right: 0; }
.dialog-facts span { display: block; color: var(--muted); font-size: 10px; }
.dialog-facts strong { display: block; margin-top: 4px; font-size: 12px; overflow-wrap: anywhere; }

.dialog-section {
  margin-top: 24px;
}

.dialog-section h3 {
  margin: 0 0 10px;
  font-size: 14px;
}

.tag-list,
.source-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 5px 8px;
  color: var(--muted);
  background: var(--surface-strong);
  border-radius: 3px;
  font-size: 11px;
}

.source-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 800;
}

.source-link:hover {
  color: var(--dark);
  background: var(--lime);
  border-color: var(--lime);
}

.source-link svg { width: 14px; }

.license-note {
  margin: 10px 0 0;
  padding: 11px 13px;
  color: var(--muted);
  background: color-mix(in srgb, var(--yellow) 25%, var(--surface));
  border-left: 3px solid var(--yellow);
  font-size: 11px;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 220px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  text-align: center;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .main-nav {
    display: none;
  }

  .hero-orbit {
    right: -130px;
    width: 430px;
    opacity: 0.55;
  }

  .hero-content {
    position: relative;
    z-index: 2;
  }

  .explorer-shell {
    grid-template-columns: 1fr;
  }

  .filters {
    position: static;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
  }

  .filter-heading {
    grid-column: 1 / -1;
    margin: 0;
  }

  .switch-row {
    align-self: start;
  }

  .coverage-band {
    grid-template-columns: 1fr;
  }

  .research-heading {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .research-heading .section-index {
    margin-bottom: -12px;
  }

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

  .method-grid article:nth-child(2) { border-right: 0; }
  .method-grid article:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }

  .site-footer {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer > p:first-of-type {
    text-align: right;
  }

  .site-footer > p:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  :root { --header-height: 62px; }

  .site-header {
    padding: 0 16px;
  }

  .button-ghost span,
  #theme-toggle {
    display: none;
  }

  .button-ghost {
    width: 40px;
    padding: 0;
  }

  .button-ghost::after {
    content: "GH";
    font-family: "DM Mono", monospace;
    font-size: 11px;
    font-weight: 500;
  }

  .button-ghost:has(svg)::after {
    display: none;
  }

  .hero {
    min-height: 690px;
  }

  .hero-content {
    width: calc(100% - 32px);
    justify-content: flex-end;
    padding: 110px 0 56px;
  }

  .hero h1 {
    max-width: 100%;
    font-size: clamp(52px, 16vw, 64px);
  }

  .hero-copy {
    font-size: 15px;
  }

  .hero-search {
    min-height: 54px;
    grid-template-columns: 20px minmax(0, 1fr) 44px;
    padding-left: 14px;
  }

  .hero-search button {
    width: 44px;
    display: grid;
    place-items: center;
    padding: 0;
    overflow: hidden;
    color: transparent;
    font-size: 0;
  }

  .hero-search button::after {
    color: var(--dark);
    content: "→";
    font-size: 20px;
    line-height: 1;
  }

  .hero-meta {
    gap: 12px 20px;
  }

  .hero-stat strong { font-size: 17px; }
  .hero-orbit { top: 32%; right: -150px; width: 360px; }

  .ticker-track {
    justify-content: flex-start;
    animation: ticker 24s linear infinite;
  }

  @keyframes ticker {
    to { transform: translateX(-46%); }
  }

  .section {
    width: calc(100% - 32px);
    padding: 76px 0;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-bottom: 34px;
  }

  .section-heading h2,
  .coverage-band h2,
  .research-heading h2 {
    font-size: 39px;
  }

  .filters {
    display: block;
    padding: 18px;
  }

  .filters fieldset {
    margin-bottom: 4px;
  }

  .filter-toggle {
    display: inline-flex;
  }

  .filters:not(.is-open) fieldset,
  .filters:not(.is-open) .switch-row {
    display: none;
  }

  .filters.is-open fieldset:first-of-type {
    margin-top: 24px;
  }

  .dataset-head {
    display: none;
  }

  .dataset-row {
    grid-template-columns: 1fr 36px;
    min-height: 134px;
    gap: 8px 16px;
    padding: 17px 4px;
  }

  .dataset-name {
    grid-column: 1;
  }

  .dataset-coverage,
  .dataset-size,
  .dataset-access {
    grid-row: 2;
  }

  .dataset-coverage {
    grid-column: 1;
    display: flex;
    gap: 10px;
  }

  .dataset-size {
    display: none;
  }

  .dataset-access {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
  }

  .dataset-access strong,
  .dataset-access small {
    display: none;
  }

  .row-arrow {
    grid-column: 2;
    grid-row: 2;
  }

  .coverage-band,
  .research-band {
    padding: 76px 16px;
  }

  .coverage-band {
    gap: 44px;
  }

  .language-field {
    min-height: 360px;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(12, 1fr);
    gap: 5px;
  }

  .repo-list {
    grid-template-columns: 1fr;
  }

  .repo-item:nth-child(odd) {
    border-right: 0;
  }

  .repo-item {
    grid-template-columns: 36px minmax(0, 1fr) 34px;
    padding: 20px 4px;
  }

  .paper-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .paper-search { width: 100%; }

  .paper-item {
    grid-template-columns: 74px minmax(0, 1fr) 34px;
    gap: 14px;
  }

  .paper-summary {
    grid-column: 2 / -1;
  }

  .paper-link {
    grid-column: 3;
    grid-row: 1;
  }

  .method-grid {
    grid-template-columns: 1fr;
  }

  .method-grid article,
  .method-grid article:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .method-grid article:last-child { border-bottom: 0; }

  .contribute-strip {
    align-items: stretch;
    flex-direction: column;
    padding: 24px;
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 40px 16px;
  }

  .site-footer > p:first-of-type { text-align: left; }
  .site-footer > p:last-child { grid-column: auto; }

  .dialog-body {
    padding: 48px 22px 28px;
  }

  .dialog-facts {
    grid-template-columns: repeat(2, 1fr);
  }

  .dialog-facts div:nth-child(2) { border-right: 0; }
  .dialog-facts div:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.hero-lead,
.hero-stat strong,
.orbit-label,
.ticker-track,
.section-index,
.filters legend,
.check-row small,
.result-count span,
.quality,
.repo-rank,
.repo-meta,
.paper-date,
.method-grid article > span,
.dialog-kicker {
  font-family: "DM Mono", "Noto Sans SC", monospace;
}
