/* The dataset pages: a catalogue of datasets as cards, and one page per dataset with the same
   sections (types of data, a sample record, what it covers, how a record is made, privacy).
   A new dataset is one more card and one more page of the same shape. */

.page {
  max-width: 880px;
  padding-block: 40px 96px;
}
.page.wide {
  max-width: none;
}
.eyebrow {
  margin: 0 0 14px;
  font: 12px var(--mono);
  font-stretch: 87.5%;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow a {
  color: inherit;
  text-decoration: none;
}
.eyebrow a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
h1 {
  margin: 0;
  font-size: clamp(38px, 5.6vw, 60px);
  line-height: 1.04;
  letter-spacing: -0.055em;
}
h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.045em;
}
h3 {
  margin: 0;
  font: 600 17px/1.35 var(--sans);
}
.lead {
  margin: 18px 0 0;
  max-width: 60ch;
  font-size: 18px;
  color: var(--muted);
}
.intro {
  margin: 14px 0 0;
  max-width: 64ch;
  color: var(--muted);
}
.intro a,
.rules a {
  color: var(--accent);
  text-underline-offset: 3px;
}
.block {
  margin-top: 80px;
}
.title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}
.pill {
  font: 11px var(--mono);
  font-stretch: 87.5%;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ok);
  border: 1px solid var(--ok);
  border-radius: 999px;
  padding: 2px 9px;
  white-space: nowrap;
}
[id] {
  scroll-margin-top: 24px;
}

/* Buttons */
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  margin-top: 28px;
}
.button {
  font: 500 14px var(--sans);
  color: var(--on-accent);
  background: var(--accent);
  border-radius: 8px;
  padding: 9px 16px;
  text-decoration: none;
}
.link {
  font-size: 15px;
  color: var(--accent);
  text-decoration: none;
}
.link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* The catalogue */
.catalogue {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin: 44px 0 0;
  padding: 0;
  list-style: none;
}
.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  padding: 22px 22px 20px;
}
.card h2 {
  font-size: 24px;
}
.card h2 a {
  text-decoration: none;
}
.card h2 a:hover {
  color: var(--accent);
}
.card .title-row {
  flex-direction: column-reverse;
  align-items: flex-start;
  gap: 10px;
}
.card > p:not(.label) {
  margin: 10px 0 0;
  font-size: 16px;
  color: var(--muted);
}
.card > p.covers {
  font-size: 14px;
  color: var(--faint);
}
.card .actions {
  margin-top: auto;
  padding-top: 22px;
}

/* The types of data, as chips on a card and as definitions */
.label {
  margin: 20px 0 0;
  font: 11px var(--mono);
  font-stretch: 87.5%;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}
.chips li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 13px;
  font-size: 14px;
  color: var(--muted);
}
.legend {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 24px;
  margin: 24px 0 0;
}
.legend div {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.legend dd {
  margin: 6px 0 0;
  font-size: 15px;
  color: var(--muted);
}
.legend dt {
  font-weight: 600;
}

/* One dataset's page */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 24px;
  margin: 36px 0 0;
}
.stats div {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.stats dt {
  font: 11px var(--mono);
  font-stretch: 87.5%;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}
.stats dd {
  margin: 4px 0 0;
  font-size: 18px;
  color: var(--text);
}
.type {
  padding-top: 28px;
  margin-top: 28px;
  border-top: 1px solid var(--line);
}
.type:first-of-type {
  margin-top: 20px;
}
.type h3 {
  font-size: 19px;
}
.type > p {
  margin: 8px 0 0;
  max-width: 64ch;
  color: var(--muted);
}
.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
  margin: 16px 0 0;
}
.facts div {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.facts dt {
  font: 11px var(--mono);
  font-stretch: 87.5%;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}
.facts dd {
  margin: 4px 0 0;
  font-size: 15px;
  color: var(--text);
}

/* How a record is made, on the site's dashed graph edge */
.path {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
}
.path li {
  position: relative;
  padding: 0 0 26px 30px;
}
.path li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1.5px solid var(--edge);
  background: var(--bg);
  box-sizing: border-box;
}
.path li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 17px;
  bottom: 0;
  border-left: 1px dashed var(--edge);
}
.path li:last-child {
  padding-bottom: 0;
}
.path li:last-child::before {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.path p {
  margin: 4px 0 0;
  color: var(--muted);
}

/* A sample record: a terminal block, dark in both themes */
pre {
  margin: 20px 0 0;
  padding: 18px 20px;
  overflow-x: auto;
  background: var(--term-bg);
  color: var(--term-text);
  border: 1px solid var(--term-line);
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.7;
}
.k {
  color: var(--term-link);
}
.s {
  color: var(--term-ok);
}
.n {
  color: var(--term-accent);
}

.rules {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}
.rules li {
  padding: 14px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.rules li:last-child {
  border-bottom: 1px solid var(--line);
}
.rules strong {
  color: var(--text);
  font-weight: 600;
}

/* Contact */
.contact {
  margin-top: 80px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  padding: 26px 28px;
}
.contact h2 {
  font-size: 24px;
}
.contact p {
  margin: 8px 0 0;
  max-width: 60ch;
  color: var(--muted);
}
.contact .actions {
  margin-top: 20px;
}
.marks {
  margin: 28px 0 0;
  font-size: 13px;
  color: var(--faint);
}

@media (max-width: 760px) {
  .legend,
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
  }
}
@media (max-width: 640px) {
  h2 {
    font-size: 24px;
  }
  .block,
  .contact {
    margin-top: 64px;
  }
  .catalogue {
    grid-template-columns: minmax(0, 1fr);
  }
  .facts {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  .contact {
    padding: 20px 18px;
  }
}
