/* Versioned research release page. */

.research-page {
  max-width: 64rem;
  margin: 0 auto;
  padding: var(--space-7) var(--space-4) var(--space-9);
}

.research-hero {
  max-width: 48rem;
  padding-bottom: var(--space-7);
  border-bottom: 1px solid var(--border);
}

.research-hero h1,
.research-section h2,
.research-dataset h3 {
  font-family: var(--font-display);
  color: var(--fg);
}

.research-hero h1 {
  margin: 0 0 var(--space-3);
  font-size: var(--text-3xl);
  line-height: 1.1;
}

.research-hero__summary {
  max-width: 45rem;
  margin: 0;
  color: var(--muted);
  font-size: var(--text-lg);
  line-height: 1.6;
}

.research-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
  margin: var(--space-6) 0 0;
}

.research-facts div {
  min-width: 0;
}

.research-facts dt,
.section-kicker {
  margin: 0 0 var(--space-1);
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.research-facts dd {
  margin: 0;
  color: var(--fg);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.research-hero__actions,
.research-dataset__downloads {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.research-hero__actions {
  margin-top: var(--space-5);
}

.research-section {
  padding: var(--space-8) 0;
  border-bottom: 1px solid var(--border);
}

.research-section__heading {
  max-width: 43rem;
}

.research-section h2 {
  margin: 0 0 var(--space-2);
  font-size: var(--text-2xl);
  line-height: 1.2;
}

.research-section p {
  max-width: 47rem;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.research-section p + p {
  margin-top: var(--space-3);
}

.research-section a:not(.btn) {
  color: var(--accent);
  text-decoration: underline;
}

.research-dataset-list {
  display: grid;
  gap: var(--space-3);
  margin: var(--space-5) 0 0;
  padding: 0;
  list-style: none;
}

.research-dataset {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  padding: var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
  background: var(--surface);
}

.research-dataset h3 {
  margin: 0 0 var(--space-1);
  font-size: var(--text-lg);
}

.research-dataset p {
  font-size: var(--text-sm);
}

.research-dataset__count {
  display: inline-block;
  margin-top: var(--space-3);
  color: var(--muted);
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
}

.research-dataset__downloads a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.5rem;
  min-height: 2.5rem;
  padding: 0 var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 4px);
  color: var(--fg);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.research-dataset__downloads a:hover,
.research-dataset__downloads a:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--fg);
}

.research-dataset__checksums {
  grid-column: 1 / -1;
  display: grid;
  gap: var(--space-1);
  width: 100%;
  margin: 0;
  padding: var(--space-3) 0 0;
  border-top: 1px solid var(--border);
  list-style: none;
}

.research-dataset__checksums li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(13rem, 1.25fr);
  gap: var(--space-3);
  color: var(--muted);
  font-size: var(--text-xs);
}

.research-dataset__checksums code {
  color: var(--fg);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow-wrap: anywhere;
}

.research-section--split {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(18rem, 0.8fr);
  gap: var(--space-7);
}

.research-method-list {
  display: grid;
  gap: var(--space-3);
}

.research-method-list div {
  padding: var(--space-4);
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
}

.research-method-list strong,
.research-method-list span {
  display: block;
}

.research-method-list code {
  color: var(--fg);
  overflow-wrap: anywhere;
  white-space: normal;
}

.research-method-list strong {
  margin-bottom: var(--space-1);
  color: var(--fg);
  font-size: var(--text-sm);
}

.research-method-list span {
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.research-changelog {
  max-width: 47rem;
  margin: var(--space-5) 0 0;
  padding-left: var(--space-5);
}

.research-changelog li {
  margin-bottom: var(--space-3);
  color: var(--muted);
  line-height: 1.6;
}

.research-changelog strong {
  color: var(--fg);
}

.research-citation {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(18rem, 1.1fr);
  gap: var(--space-6);
  align-items: start;
}

.research-citation__box {
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
  background: var(--surface);
}

.research-citation__box code {
  display: block;
  color: var(--fg);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: var(--text-xs);
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.research-citation__box .btn {
  margin-top: var(--space-4);
}

.research-citation__box p {
  min-height: 1.25rem;
  margin-top: var(--space-2);
  color: var(--success, var(--accent));
  font-size: var(--text-sm);
}

.research-section--compact {
  border-bottom: 0;
}

@media (max-width: 720px) {
  .research-page {
    padding: var(--space-5) var(--space-3) var(--space-8);
  }

  .research-hero h1 {
    font-size: var(--text-2xl);
  }

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

  .research-dataset,
  .research-section--split,
  .research-citation {
    display: block;
  }

  .research-dataset__downloads,
  .research-method-list,
  .research-citation__box {
    margin-top: var(--space-4);
  }

  .research-dataset__checksums li {
    grid-template-columns: 1fr;
    gap: var(--space-1);
  }
}
