:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --border: #e5e7eb;
  --soft: #eff6ff;
  --shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  --teal: #14b8a6;
  --teal-dark: #0d9488;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: Arial, Helvetica, sans-serif; }

body { background: var(--bg); color: var(--text); line-height: 1.5; }

/* ---------- Navbar ---------- */
.site-nav {
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
  padding: 14px 7%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}

.site-nav .brand {
  color: white;
  font-weight: 800;
  font-size: 18px;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav .nav-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.site-nav .nav-links a {
  color: #dbeafe;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.site-nav .nav-links a:hover,
.site-nav .nav-links a.active {
  background: rgba(255,255,255,0.12);
  color: white;
}

.site-nav .nav-search {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav .nav-search input {
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  font-size: 13px;
  width: 180px;
}

.site-nav .nav-search button {
  background: var(--teal);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.site-nav .nav-search button:hover { background: var(--teal-dark); }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 60px;
  padding: 25px;
  text-align: center;
  background: #0f172a;
  color: #cbd5e1;
  font-size: 14px;
}

/* ---------- Common buttons / links ---------- */
.back-link {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.back-link:hover { background: var(--primary-dark); }

@media (max-width: 700px) {
  .site-nav { flex-direction: column; align-items: stretch; }
  .site-nav .nav-search input { width: 100%; }
}

/* ================================================================
   Restructure additions. Same tokens, same look — the page-local
   <style> blocks from the old pages moved here so every view shares
   one stylesheet. No new colours introduced.
   ================================================================ */

#app { display: block; }
main { padding: 36px 7%; }
.section-title { font-size: 24px; margin: 34px 0 6px; }
.section-note { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.linkish { background: none; border: none; color: var(--primary); cursor: pointer; font-weight: 700; font-size: 13px; padding: 0; }

/* ---------- hero / page heads ---------- */
.hero {
  background: linear-gradient(135deg, #0f766e, #0f172a);
  color: white; padding: 56px 8%; text-align: center;
}
.hero h1 { font-size: 40px; margin-bottom: 12px; }
.hero p { font-size: 17px; color: #d1fae5; margin-bottom: 28px; }

.page-head { background: linear-gradient(135deg, #111827, #1e3a8a); color: white; padding: 34px 7%; }
.page-head.slim { padding: 24px 7%; }
.page-head h1 { font-size: 34px; margin-bottom: 8px; }
.page-head p { color: #dbeafe; max-width: 880px; font-size: 16px; }
.stage-line { color: #93c5fd !important; font-size: 14px !important; margin-top: 10px; }
.banner.warn { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412 !important; padding: 10px 14px; border-radius: 10px; margin-top: 14px; display: inline-block; font-size: 14px; }

.crumbs { font-size: 13px; margin-bottom: 12px; color: #cbd5e1; }
.crumbs a { color: #dbeafe; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs .sep { margin: 0 7px; opacity: .6; }

/* ---------- search ---------- */
.search-box { max-width: 760px; margin: 0 auto; display: flex; background: white; border-radius: 14px; overflow: hidden; box-shadow: 0 12px 30px rgba(0,0,0,.2); }
.search-box input { flex: 1; padding: 18px 22px; border: none; font-size: 16px; outline: none; }
.search-box button { padding: 0 30px; border: none; background: var(--teal); color: white; font-size: 16px; font-weight: 700; cursor: pointer; }
.search-box button:hover { background: var(--teal-dark); }
.hero-hint { margin-top: 16px; font-size: 13px; color: #a7f3d0; }
.chip { background: rgba(255,255,255,.14); color: white; border: none; border-radius: 999px; padding: 5px 12px; margin: 3px; font-size: 13px; cursor: pointer; }
.chip:hover { background: rgba(255,255,255,.26); }
.chip.active { background: var(--soft); color: var(--primary-dark); border: 1px solid #bfdbfe; font-weight: 700; }

/* ---------- category cards ---------- */
/* Five stages, five columns — the lifecycle reads left to right in one line. */
.cat-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.cat-card { position: relative; background: var(--card); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); padding: 18px 16px; display: flex; flex-direction: column; }
.cat-card.is-empty { background: #fafafa; }
.cat-card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.cat-num { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, #0f766e, #14b8a6); color: white; font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.cat-card.is-empty .cat-num { background: #d1d5db; }
.cat-card-title { text-decoration: none; }
.cat-card-title h3 { color: #0f766e; font-size: 17px; line-height: 1.25; }
.cat-card-title:hover h3 { color: var(--teal-dark); }
.count { background: var(--soft); color: var(--primary-dark); border: 1px solid #bfdbfe; border-radius: 999px; padding: 2px 11px; font-size: 13px; font-weight: 800; }
.count.zero { background: #f3f4f6; color: var(--muted); border-color: var(--border); }
.stage { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; margin: 6px 0; }
.blurb { color: #4b5563; font-size: 13px; margin: 6px 0 12px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sub-list { list-style: none; margin: 0 0 12px; padding: 0; border-top: 1px solid var(--border); }
.sub-list li { border-bottom: 1px solid var(--border); }
.sub-list li.muted { padding: 9px 2px; font-size: 13px; color: var(--muted); }
.sub-list a { display: flex; justify-content: space-between; gap: 8px; padding: 8px 2px; text-decoration: none; color: var(--text); font-size: 13px; }
.sub-list a:hover { color: var(--primary); }
.sub-list em { font-style: normal; color: var(--muted); font-size: 13px; }
.cat-card-cta { margin-top: auto; color: var(--primary); text-decoration: none; font-weight: 700; font-size: 14px; }

.sub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-bottom: 10px; }
.sub-card { position: relative; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 18px; text-decoration: none; color: var(--text); box-shadow: var(--shadow); }
.sub-card.is-empty { background: #fafafa; }
.sub-card h3 { font-size: 16px; color: #0f766e; margin-bottom: 6px; padding-right: 40px; }
.sub-card p { font-size: 13px; color: var(--muted); }
.sub-card .count { position: absolute; top: 16px; right: 16px; }

/* ---------- dataset cards ---------- */
.ds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.ds-card { background: var(--card); border: 1px solid var(--border); border-left: 5px solid var(--teal); border-radius: 14px; padding: 18px; text-decoration: none; color: var(--text); box-shadow: var(--shadow); display: block; }
.ds-card:hover { transform: translateY(-3px); transition: .2s; }
.ds-card-path { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.ds-card h3 { color: #0f766e; font-size: 17px; margin-bottom: 6px; }
.ds-card p { color: #4b5563; font-size: 13.5px; }
.ds-card-meta { margin-top: 10px; font-size: 12px; color: var(--muted); }
.tags { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag { background: var(--soft); color: var(--primary-dark); border: 1px solid #bfdbfe; border-radius: 6px; padding: 2px 8px; font-size: 12px; }
.tag.warn { background: #fff7ed; border-color: #fed7aa; color: #9a3412; }

/* ---------- filter row (home) ---------- */

/* ---------- filter panel (home, category, subcategory, datasets) ---------- */

/* Two columns: a fixed 280px rail on the left, results on the right. The rail
   is its own card and the two column tops line up, so the panel never reads as
   a continuation of whatever sits above it. */
.with-sidebar {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 30px;
  align-items: start;
}
.results { min-width: 0; }
.section-title.flush { margin-top: 0; }

/* On the homepage the browse zone follows the lifecycle cards, so it needs a
   clear break — otherwise the filter card butts straight into a category card
   and the two look like one column. */
.browse-zone {
  margin-top: 60px;
  padding-top: 44px;
  border-top: 1px solid var(--border);
}

.filters {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;                 /* clips the header's rounded corners */
  position: sticky;
  top: 84px;
  max-height: calc(100vh - 108px);
  display: flex;
  flex-direction: column;
}

/* Header reads as a card header: its own surface, its own rule underneath. */
.filters-head {
  flex: none;
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #ffffff, var(--soft));
  border-bottom: 1px solid var(--border);
}
.filters-head h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.filters-head .linkish { margin-left: auto; }

.filters-body { overflow-y: auto; padding: 0 16px 14px; }

.fbadge {
  background: var(--primary); color: #fff; border-radius: 999px;
  min-width: 19px; height: 19px; padding: 0 6px;
  font-size: 11.5px; font-weight: 800; line-height: 19px; text-align: center;
  display: inline-block;
}
.fbadge.hidden { display: none; }

.filters-close {
  display: none;
  background: none; border: none; cursor: pointer;
  font-size: 22px; line-height: 1; color: var(--muted); padding: 0 2px;
}
.filters-close:hover { color: var(--text); }

.fsearch-wrap { padding: 14px 0 12px; border-bottom: 1px solid var(--border); }
.fsearch {
  width: 100%; padding: 10px 12px; font-size: 13.5px;
  border: 1px solid var(--border); border-radius: 10px; background: #fff;
}
.fsearch:focus { outline: 2px solid var(--soft); border-color: var(--primary); }

/* ---- accordion groups ---- */
.fgroup { border-bottom: 1px solid var(--border); }
.fgroup:last-of-type { border-bottom: none; }
.fgroup-head {
  width: 100%; background: none; border: none; cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  padding: 12px 2px; font: inherit; text-align: left;
}
.fgroup-label {
  font-size: 12px; font-weight: 800; color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em;
}
.fgroup-head:hover .fgroup-label { color: var(--text); }
.fchev {
  margin-left: auto; width: 8px; height: 8px; flex: none;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translate(-2px, -2px); transition: transform .18s;
}
.fgroup.open .fchev { transform: rotate(-135deg) translate(-2px, -2px); }
.fgroup-body { padding: 0 2px 14px; }
.fgroup:not(.open) .fgroup-body { display: none; }
.fgroup.is-muted .fgroup-label { color: #b6bcc6; }

.fgroup-body select {
  width: 100%; padding: 9px 10px; font-size: 13.5px;
  border: 1px solid var(--border); border-radius: 9px; background: #fff;
}
.fnote { font-size: 12px; color: var(--muted); margin-top: 8px; line-height: 1.45; }
.fnote.edge { padding: 12px 2px 4px; border-top: 1px solid var(--border); margin-top: 0; }

.chk {
  display: flex; align-items: center; gap: 8px;
  font-size: 13.5px; padding: 5px 0; cursor: pointer;
}
.chk input { flex: none; cursor: pointer; }
.chk span { min-width: 0; overflow-wrap: anywhere; }
.chk em {
  font-style: normal; margin-left: auto; color: var(--muted);
  font-size: 12px; font-variant-numeric: tabular-nums;
}
.chk:hover { color: var(--primary-dark); }

.range { display: flex; align-items: center; gap: 6px; }
.range input {
  width: 100%; padding: 8px; font-size: 13px;
  border: 1px solid var(--border); border-radius: 8px;
}

.active-filters { margin-bottom: 14px; }

/* ---- narrow screens: the rail becomes an off-canvas drawer ---- */
.filters-toggle { display: none; }
.filters-scrim { display: none; }

@media (max-width: 950px) {
  .with-sidebar { grid-template-columns: 1fr; gap: 0; }
  .browse-zone { margin-top: 44px; padding-top: 32px; }

  .filters-toggle {
    display: inline-flex; align-items: center; gap: 9px;
    margin-bottom: 18px;
    background: var(--card); color: var(--text);
    border: 1px solid var(--border); border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 11px 16px; font-size: 14px; font-weight: 700; cursor: pointer;
  }
  .ft-icon {
    width: 14px; height: 10px; flex: none;
    border-top: 2px solid currentColor; border-bottom: 2px solid currentColor;
    position: relative;
  }
  .ft-icon::after {
    content: ""; position: absolute; left: 0; right: 4px; top: 3px;
    border-top: 2px solid currentColor;
  }

  .filters {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 120;
    width: min(340px, 88vw); max-height: none;
    border-radius: 0; border-left: none; border-top: none; border-bottom: none;
    transform: translateX(-101%);
    transition: transform .22s ease;
    box-shadow: 0 0 44px rgba(15, 23, 42, .3);
  }
  .filters.is-open { transform: none; }
  .filters-close { display: inline-flex; }

  .filters-scrim {
    display: block; position: fixed; inset: 0; z-index: 119;
    background: rgba(15, 23, 42, .45);
    opacity: 0; pointer-events: none; transition: opacity .22s;
  }
  .filters-scrim.is-open { opacity: 1; pointer-events: auto; }
  body.drawer-open { overflow: hidden; }
}

@media (max-width: 1180px) and (min-width: 951px) {
  .with-sidebar { grid-template-columns: 250px minmax(0, 1fr); gap: 22px; }
}

/* ---------- dataset detail ---------- */
.panel { background: var(--card); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); padding: 24px; margin-bottom: 22px; }
.panel h2 { font-size: 21px; margin-bottom: 14px; }
.meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.meta-grid dt { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 3px; }
.meta-grid dd { font-size: 15px; font-weight: 600; }
.meta-grid dd.unset { font-weight: 400; color: #9ca3af; font-style: italic; }
.dl { color: var(--primary); font-weight: 700; text-decoration: none; }
.dl:hover { text-decoration: underline; }

/* ---------- shared preview chrome (carried over) ---------- */
.table-header { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.table-header h2 { font-size: 22px; }
.status { color: var(--muted); font-size: 14px; font-weight: 400; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; background: white; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 13px; border-bottom: 1px solid var(--border); text-align: left; font-size: 13px; white-space: nowrap; }
th { background: #f9fafb; color: #374151; font-weight: 800; }
tr:hover td { background: #f8fbff; }

.panel button { background: var(--primary); color: white; border: none; border-radius: 10px; padding: 13px 18px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.panel button:hover { background: var(--primary-dark); }

.summary-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: 18px; }
.summary-card { background: var(--soft); border: 1px solid #bfdbfe; border-radius: 14px; padding: 14px; }
.summary-card strong { display: block; color: var(--primary-dark); font-size: 20px; margin-bottom: 3px; }
.summary-card span { color: var(--muted); font-size: 13px; }

.modal { display: none; position: fixed; inset: 0; z-index: 99; background: rgba(0,0,0,.78); align-items: center; justify-content: center; padding: 30px; }
.modal.show { display: flex; }
.modal img { max-width: 95%; max-height: 90%; background: white; border-radius: 12px; padding: 10px; }

/* ---------- empty / error ---------- */
.empty-state { grid-column: 1 / -1; text-align: center; padding: 44px 22px; color: var(--muted); background: var(--card); border: 1px dashed var(--border); border-radius: 16px; }
.empty-state h3 { color: var(--text); margin-bottom: 8px; font-size: 19px; }
.fatal { padding: 60px 8%; }
.fatal pre { background: #f3f4f6; padding: 12px; border-radius: 8px; overflow-x: auto; margin-top: 12px; }
code { background: #f3f4f6; padding: 2px 5px; border-radius: 5px; }

@media (max-width: 950px) {
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .summary-grid { grid-template-columns: 1fr; }
  .hero h1, .page-head h1 { font-size: 28px; }
}

/* ---------- partner logo lock-up (homepage hero) ---------- */
.logo-bar {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 26px; flex-wrap: wrap;
  background: #ffffff; border-radius: 16px;
  padding: 16px 28px; margin-bottom: 26px;
  box-shadow: 0 10px 26px rgba(0,0,0,.18);
}
.logo-bar .logo { display: inline-flex; align-items: center; }
.logo-bar .logo + .logo { border-left: 1px solid var(--border); padding-left: 26px; }
.logo-bar img { height: 52px; width: auto; max-width: 260px; object-fit: contain; display: block; }

/* ---------- brand mark in the navbar ---------- */
.site-nav .brand { display: inline-flex; align-items: center; gap: 9px; }
.brand-mark {
  height: 30px; width: 30px; display: block;
  object-fit: contain; background: #fff;
  border-radius: 50%; padding: 2px;
}

/* ---------- ownership strip above the footer (every page) ---------- */
.partner-strip {
  background: #ffffff;
  border-top: 1px solid var(--border);
  padding: 26px 7%;
  display: flex; align-items: center; justify-content: center;
  gap: 30px; flex-wrap: wrap;
  margin-top: 60px;
}
.partner-strip p { color: var(--muted); font-size: 14px; max-width: 460px; }
.partner-logos { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.partner-logos img { height: 42px; width: auto; max-width: 210px; object-fit: contain; display: block; }
.partner-logos .logo { opacity: .85; transition: opacity .2s; }
.partner-logos .logo:hover { opacity: 1; }
.partner-strip + .site-footer { margin-top: 0; }

@media (max-width: 1280px) { .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px)  { .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px)  {
  .cat-grid { grid-template-columns: 1fr; }
  .logo-bar { gap: 16px; padding: 14px 18px; }
  .logo-bar img, .partner-logos img { height: 34px; }
  .logo-bar .logo + .logo { padding-left: 16px; }
  .partner-strip { flex-direction: column; text-align: center; gap: 18px; }
}

/* ================================================================
   About page. Reuses the existing tokens, hero gradient, card
   border/shadow and chip styling — no new colours.
   ================================================================ */

.about-hero { padding: 64px 8% 58px; }
.about-hero h1 { font-size: 38px; margin-bottom: 14px; }
.about-hero p { font-size: 17px; max-width: 640px; margin: 0 auto; }

.about { max-width: 1040px; margin: 0 auto; padding: 8px 7% 20px; }
.about-section { margin-top: 52px; }
.about-section:first-child { margin-top: 40px; }
.about-h {
  font-size: 13px; font-weight: 800; color: var(--muted);
  text-transform: uppercase; letter-spacing: .07em;
  padding-bottom: 12px; margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.about .section-note { margin: -10px 0 20px; }

.prose { line-height: 1.75; }
.prose p { color: #374151; font-size: 15.5px; }
.prose p + p { margin-top: 14px; }
.prose-cta { margin-top: 22px; }

.out-link {
  display: inline-block; margin-top: 14px;
  color: var(--primary); font-weight: 700; font-size: 14px; text-decoration: none;
}
.out-link:hover { color: var(--primary-dark); text-decoration: underline; }

/* ---- team: same surface as a dataset card, same left accent ---- */
.team-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px;
}
.team-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 5px solid var(--teal);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 22px 24px;
}
.team-card h3 { color: #0f766e; font-size: 18px; }
.team-role {
  color: var(--muted); font-size: 12.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; margin: 5px 0 12px;
}
.team-contrib { color: #4b5563; font-size: 14.5px; line-height: 1.6; }

/* ---- research areas: dataset-tag styling, scaled up to a card ---- */
.area-grid {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 12px;
}
.area-card {
  background: var(--soft);
  color: var(--primary-dark);
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 11px 20px;
  font-size: 14.5px; font-weight: 600;
}

/* ---- footer gains the institution line ---- */
.site-footer .footer-org { margin-bottom: 7px; font-size: 14px; }
.site-footer .footer-org a { color: #e2e8f0; text-decoration: none; font-weight: 700; }
.site-footer .footer-org a:hover { text-decoration: underline; }
.site-footer .footer-org .sep { margin: 0 9px; color: #64748b; }
.site-footer .footer-copy { font-size: 13px; color: #94a3b8; }

@media (max-width: 620px) {
  .about-hero h1 { font-size: 28px; }
  .about-section { margin-top: 40px; }
}

/* Nine nav items plus a search box is tight on a laptop. Tighten the rail and
   shed the optional parts progressively, rather than letting it wrap into a
   three-row block. The navbar search is the first thing to go: since the filter
   panel landed, every page already carries a search field of its own. */
@media (min-width: 951px) {
  .site-nav { padding-left: 3.5%; padding-right: 3.5%; gap: 10px; }
  .site-nav .brand { font-size: 16px; }
  .site-nav .nav-links { gap: 2px; flex-wrap: nowrap; }
  .site-nav .nav-links a { padding: 8px 9px; font-size: 13px; white-space: nowrap; }
  .site-nav .nav-search input { width: 132px; font-size: 12.5px; padding: 7px 10px; }
  .site-nav .nav-search button { padding: 7px 10px; font-size: 12.5px; }
}
@media (min-width: 951px) and (max-width: 1460px) {
  .site-nav .nav-search { display: none; }
}
@media (min-width: 951px) and (max-width: 1150px) {
  .site-nav .brand-text { display: none; }
  .site-nav .nav-links a { padding: 8px 7px; font-size: 12.5px; }
}

/* ---------- dataset page (paper-backed records) ---------- */
.page-head .stage-line a { color: #bfdbfe; }
.ds-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.btn { display: inline-flex; flex-direction: column; text-decoration: none; color: white; border: 1px solid rgba(255,255,255,.35); border-radius: 12px; padding: 10px 16px; font-weight: 700; font-size: 14px; background: rgba(255,255,255,.06); }
.btn span { font-weight: 400; font-size: 12px; color: #cbd5e1; margin-top: 2px; }
.btn:hover { background: rgba(255,255,255,.14); }
.btn.primary { background: var(--teal); border-color: var(--teal); }
.btn.primary span { color: #ecfeff; }
.btn.primary:hover { background: var(--teal-dark); }

.abstract { font-size: 16px; line-height: 1.65; max-width: 980px; }
.ds-two { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.ds-two > .panel { margin-bottom: 22px; }
table.kv th, table.kv td { white-space: normal; }
table.kv th { width: 34%; background: transparent; color: var(--muted); font-weight: 600; font-size: 13px; vertical-align: top; }
table.kv td { font-size: 14px; }
table.kv tr:hover td { background: transparent; }
.contents { padding-left: 20px; margin-bottom: 6px; }
.contents li { margin: 6px 0; overflow-wrap: anywhere; }
.panel h2.sub-h { font-size: 17px; margin: 18px 0 8px; }

.meta-grid a, table.kv a { color: var(--primary); }

.sample-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 4px; }
.panel .sample-tabs button { background: white; color: var(--text); border: 1px solid var(--border); padding: 8px 12px; font-weight: 600; font-size: 13px; white-space: normal; text-align: left; }
.panel .sample-tabs button.on { background: var(--soft); border-color: var(--primary); color: var(--primary-dark); }
.chart-wrap { margin-top: 16px; border: 1px solid var(--border); border-radius: 14px; padding: 12px 16px; background: white; }
.chart-wrap canvas { display: block; width: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 12px; color: #374151; }
.legend i { display: inline-block; width: 12px; height: 3px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.summary-card .dl { display: block; padding-top: 6px; font-size: 14px; }

.figure-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.ds-figure { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: white; }
.ds-figure img { display: block; width: 100%; height: 230px; object-fit: contain; background: #fafafa; cursor: zoom-in; border-bottom: 1px solid var(--border); }
.ds-figure figcaption { padding: 10px 12px; font-size: 13px; }
.ds-figure figcaption em { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }

@media (max-width: 950px) {
  .ds-two { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .figure-grid { grid-template-columns: 1fr; }
}

/* ---------- models page (assets/models.json) ---------- */
.model-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.model-card {
  background: var(--card); border: 1px solid var(--border); border-left: 5px solid var(--teal);
  border-radius: 14px; box-shadow: var(--shadow); padding: 22px 24px;
  display: flex; flex-direction: column; gap: 8px;
}
.model-card h3 { color: #0f766e; font-size: 19px; }
.model-card p { color: #4b5563; font-size: 14.5px; line-height: 1.6; }
.model-card .tags { margin-top: 2px; }
.model-ds a { color: var(--primary); }
.model-open { align-self: flex-start; margin-top: 8px; }
