:root {
  color-scheme: light dark;
  --ink: #192b2b;
  --muted: #5d6d69;
  --line: #d8e1dd;
  --soft: #f3f7f4;
  --accent: #126b5a;
  --accent-dark: #0d4f45;
  --coral: #bd5a3d;
  --white: #fff;
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  background: var(--white);
  color: var(--ink);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  line-height: 1.5;
}

a { color: inherit; }

.site-header {
  height: 64px;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.wordmark-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--white);
  font-family: Georgia, serif;
  font-size: 18px;
}

.header-link {
  padding: 8px 0;
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.breadcrumb {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 18px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.breadcrumb a { color: var(--accent-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }

main, .site-footer {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.dataset-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  gap: 56px;
  align-items: center;
  padding: 44px 0 36px;
  border-bottom: 1px solid var(--line);
}

.module-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  padding: 50px 0 38px;
  border-bottom: 1px solid var(--line);
}

.module-hero > div:first-child { max-width: 720px; }
.module-hero h1 { font-size: 36px; }
.module-hero .hero-description { max-width: 680px; margin-bottom: 0; }

.module-count {
  min-width: 132px;
  padding-left: 20px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.module-count strong {
  display: block;
  color: var(--accent-dark);
  font-family: Georgia, serif;
  font-size: 34px;
  font-weight: 500;
  line-height: 1.1;
}

.module-count span { display: block; margin-top: 6px; }

.dataset-list { padding: 30px 0 54px; }

.dataset-card {
  display: grid;
  grid-template-columns: minmax(240px, 34%) minmax(0, 1fr);
  border: 1px solid var(--line);
  background: var(--white);
}

.dataset-cover {
  position: relative;
  display: block;
  min-height: 240px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--soft);
}

.dataset-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }

.cover-label {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 8px;
  background: var(--white);
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 700;
}

.dataset-card-body { min-width: 0; padding: 22px 26px 20px; }

.dataset-card-heading { display: flex; align-items: start; justify-content: space-between; gap: 18px; }

.dataset-kicker { margin: 0 0 6px; color: var(--coral); font-size: 11px; font-weight: 700; }

.dataset-card h3 { margin: 0; font-size: 21px; line-height: 1.3; overflow-wrap: anywhere; }
.dataset-card h3 a { color: var(--ink); text-decoration: none; }
.dataset-card h3 a:hover { color: var(--accent); }

.dataset-arrow {
  display: grid;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--accent-dark);
  font-size: 19px;
  line-height: 1;
  text-decoration: none;
}

.dataset-summary { max-width: 620px; margin: 13px 0 16px; color: var(--muted); font-size: 14px; }

.dataset-card-meta { display: flex; flex-wrap: wrap; gap: 7px 18px; color: var(--muted); font-size: 12px; }

.dataset-card-meta span + span::before { content: ""; display: inline-block; width: 4px; height: 4px; margin: 0 10px 2px 0; border-radius: 50%; background: var(--coral); }

.dataset-open { display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; color: var(--accent-dark); font-size: 13px; font-weight: 700; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.dataset-open span { font-size: 17px; }

.hero-copy { min-width: 0; }

.eyebrow {
  margin: 0 0 12px;
  color: var(--coral);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
}

h1 {
  margin: 0;
  color: var(--ink);
  font-size: 34px;
  line-height: 1.16;
  overflow-wrap: anywhere;
}

.hero-description {
  margin: 12px 0 20px;
  color: var(--muted);
  font-size: 17px;
}

.dataset-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  color: var(--muted);
  font-size: 13px;
}

.dataset-facts span:not(:empty)::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 7px 1px 0;
  background: var(--accent);
  vertical-align: middle;
}

.hero-image {
  position: relative;
  aspect-ratio: 16 / 10;
  margin: 0;
  overflow: hidden;
  background: var(--soft);
}

.hero-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-image figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 24px 12px 8px;
  color: var(--white);
  font-size: 11px;
  background: linear-gradient(transparent, rgba(19, 34, 31, .72));
}

.catalog-section { padding: 30px 0 52px; }

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.section-heading .eyebrow { margin-bottom: 5px; }

h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
}

.result-count {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 13px;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px;
  gap: 10px;
  margin-bottom: 12px;
}

.toolbar input, .toolbar select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #bdcbc5;
  border-radius: 3px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}

.toolbar input:focus, .toolbar select:focus {
  outline: 2px solid #8bc5b6;
  outline-offset: 1px;
  border-color: var(--accent);
}

.table-wrap { overflow-x: auto; border-top: 1px solid var(--line); }

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

thead { background: var(--soft); }

th, td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

td:first-child { min-width: 260px; font-weight: 600; overflow-wrap: anywhere; }
td:nth-child(2) { min-width: 190px; color: var(--muted); overflow-wrap: anywhere; }
td:nth-child(3) { color: var(--accent-dark); }
.size-column, td:nth-child(4) { text-align: right; white-space: nowrap; }
td:last-child { width: 80px; text-align: right; }

.download-link {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.download-link:hover { color: var(--coral); }

.empty-state, .load-error {
  margin: 16px 0;
  padding: 16px;
  background: var(--soft);
  color: var(--muted);
  font-size: 14px;
}

.load-error { color: #933c2c; background: #fff2ed; }

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.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;
}

@media (max-width: 760px) {
  main, .site-footer { width: calc(100% - 36px); }
  .dataset-hero { grid-template-columns: 1fr; gap: 20px; padding: 32px 0 26px; }
  .module-hero { align-items: start; padding: 34px 0 26px; }
  .module-hero h1 { font-size: 30px; }
  .module-count { min-width: 92px; padding-left: 12px; }
  .module-count strong { font-size: 28px; }
  .dataset-card { grid-template-columns: 1fr; }
  .dataset-cover { min-height: 0; max-height: 260px; }
  .dataset-card-body { padding: 18px; }
  .dataset-card h3 { font-size: 18px; }
  h1 { font-size: 28px; }
  .hero-description { font-size: 15px; }
  .hero-image { max-height: 240px; }
  .catalog-section { padding-top: 24px; }
  .site-footer { flex-direction: column; gap: 4px; }
}

:root.dark {
  color-scheme: dark;
  --ink: #f0edf3;
  --muted: #b9b2c3;
  --line: #46404e;
  --soft: #24212a;
  --accent: #d1a8e9;
  --accent-dark: #e1c7f1;
  --coral: #f2ab72;
  --white: #17151c;
}

:root.dark body { background: var(--white); color: var(--ink); }
:root.dark .folder-card { background: #201d25; }
:root.dark .folder-facts { border-color: var(--line); }

.dataset-hero { grid-template-columns: minmax(0, 1fr); }
.dataset-hero .hero-copy { max-width: 760px; }
.catalog-section { padding-bottom: 64px; }
.folder-intro { margin: -4px 0 20px; color: var(--muted); font-size: 14px; }
.folder-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.folder-card { min-width: 0; padding: 20px; border: 1px solid var(--line); background: var(--white); }
.folder-card-heading { display: flex; align-items: flex-start; gap: 14px; }
.folder-icon { position: relative; flex: 0 0 35px; width: 35px; height: 26px; margin-top: 3px; border: 2px solid var(--accent); border-radius: 3px; }
.folder-icon::before { position: absolute; top: -8px; left: -2px; width: 14px; height: 6px; border: 2px solid var(--accent); border-bottom: 0; border-radius: 3px 3px 0 0; content: ""; }
.folder-card-title { min-width: 0; }
.folder-label { margin: 0 0 5px; color: var(--accent-dark); font-family: Consolas, monospace; font-size: 12px; font-weight: 700; }
.folder-card h3 { overflow-wrap: anywhere; font-size: 17px; line-height: 1.4; }
.folder-description { min-height: 44px; margin: 14px 0 17px; color: var(--muted); font-size: 13px; }
.folder-facts { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 11px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.folder-download { display: flex; min-height: 44px; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; padding: 9px 12px; border: 1px solid var(--accent); color: var(--accent-dark); font-size: 12px; font-weight: 700; text-decoration: none; }
.folder-download:hover { background: var(--soft); }
.folder-download:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }
.folder-download-arrow { flex: 0 0 auto; font-size: 18px; }

@media (max-width: 760px) {
  .dataset-hero { padding-top: 32px; }
  .folder-grid { grid-template-columns: 1fr; gap: 11px; }
  .folder-card { padding: 17px; }
  .folder-description { min-height: 0; }
  .folder-intro { font-size: 13px; }
}
