/* ── Reset & base ───────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #1a1a1a;
  background: #fff;
}

a {
  color: #1a56a0;
  text-decoration: underline;
}
a:hover { color: #0d3d7a; }

h1, h2, h3 {
  line-height: 1.25;
  margin: 0 0 0.5rem;
  font-weight: 600;
}
h1 { font-size: 2rem; }
h2 { font-size: 1.35rem; margin-top: 2rem; }
h3 { font-size: 1.1rem; }

p { margin: 0 0 1rem; }

/* ── Layout ─────────────────────────────────────────────────────────────────── */

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ── Header ─────────────────────────────────────────────────────────────────── */

.site-header {
  border-bottom: 1px solid #dde3ec;
  padding: 0.75rem 0;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-name {
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  color: #1a1a1a;
  letter-spacing: -0.01em;
}
.site-name:hover { color: #1a56a0; }

.site-nav {
  display: flex;
  gap: 1.25rem;
}
.site-nav a {
  text-decoration: none;
  color: #444;
  font-size: 0.9rem;
  font-weight: 500;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: #1a56a0;
}

/* ── Main ───────────────────────────────────────────────────────────────────── */

main.container {
  padding-top: 2.5rem;
  padding-bottom: 3rem;
}

/* ── Hero ───────────────────────────────────────────────────────────────────── */

.hero {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #eef0f4;
}
.hero h1 { font-size: 2.25rem; }
.lead {
  font-size: 1.15rem;
  color: #444;
  margin-bottom: 0.75rem;
}

/* ── Page header ────────────────────────────────────────────────────────────── */

.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #eef0f4;
}

/* ── Project list (home) ────────────────────────────────────────────────────── */

.project-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.project-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid #dde3ec;
  border-radius: 6px;
}
.project-card h3 { margin: 0 0 0.25rem; }
.project-card p  { margin: 0; color: #555; font-size: 0.9rem; }
.project-card__body { flex: 1; }

.btn {
  display: inline-block;
  padding: 0.45rem 1rem;
  background: #1a56a0;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn:hover { background: #0d3d7a; color: #fff; }

/* ── TAC table ──────────────────────────────────────────────────────────────── */

.tac-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.tac-table th,
.tac-table td {
  padding: 0.55rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid #eef0f4;
}

.tac-table thead th {
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #666;
  background: #f8f9fb;
  border-bottom: 2px solid #dde3ec;
}

.tac-table tbody tr:hover td { background: #f8f9fb; }

.col-num      { width: 4rem; }
.col-count    { width: 5.5rem; text-align: right; }
.col-updated  { width: 7rem; color: #666; font-size: 0.82rem; white-space: nowrap; }
.col-downloads { width: 9rem; }

/* ── Download badges ────────────────────────────────────────────────────────── */

.badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  margin-right: 0.2rem;
}
.badge--json { background: #e8f0fe; color: #1a56a0; }
.badge--json:hover { background: #1a56a0; color: #fff; }
.badge--xml  { background: #e6f4ea; color: #1e6b35; }
.badge--xml:hover  { background: #1e6b35; color: #fff; }
.badge--uslm { background: #fef3e2; color: #8a4b00; }
.badge--uslm:hover { background: #8a4b00; color: #fff; }

/* ── Prose (privacy policy etc.) ────────────────────────────────────────────── */

.prose h2 { margin-top: 2rem; font-size: 1.1rem; }
.prose p  { color: #333; max-width: 70ch; }
.prose code { font-size: 0.875em; background: #f3f4f6; padding: 0.1em 0.35em; border-radius: 3px; }

/* ── Source note (per-dataset attribution) ──────────────────────────────────── */

.source-note {
  margin: 0.75rem 0 0;
  font-size: 0.82rem;
  color: #666;
}
.source-note a { color: #555; }
.source-note a:hover { color: #1a56a0; }

/* ── Footer ─────────────────────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid #dde3ec;
  padding: 1.5rem 0;
  font-size: 0.85rem;
  color: #444;
}
.site-footer p { margin: 0; }
.site-footer a { color: #444; }
.site-footer a:hover { color: #1a56a0; }

.disclaimer {
  font-weight: 600;
  color: #444;
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
  h1 { font-size: 1.6rem; }
  .hero h1 { font-size: 1.75rem; }

  .project-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .col-downloads { width: auto; }
  .tac-table { font-size: 0.82rem; }
  .tac-table th, .tac-table td { padding: 0.45rem 0.5rem; }
}
