:root{
  --bg: #f6f8f7;
  --card: #ffffff;
  --text: #0f1a14;
  --muted: #4b5b52;
  --border: rgba(15, 26, 20, 0.12);
  --shadow: 0 12px 30px rgba(15, 26, 20, 0.10);
  --brand: #0f5a3a;
  --brand-2: #0a3f2a;
  --accent: #1b7f5a;
  --ring: rgba(27, 127, 90, 0.35);
  --radius: 16px;
  --radius-sm: 12px;
  --container: 1120px;
}

*{box-sizing:border-box}
html,body{height:100%}
/* Prevent layout shift between pages with/without a vertical scrollbar */
html{
  overflow-y: scroll; /* always reserve scrollbar space */
  scrollbar-gutter: stable; /* supported in modern browsers */
}
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 600px at 20% -10%, rgba(27, 127, 90, 0.10), transparent 60%),
              radial-gradient(900px 500px at 95% 0%, rgba(15, 90, 58, 0.10), transparent 55%),
              var(--bg);
}

img{max-width:100%; height:auto}
a{color: var(--brand); text-decoration:none}
a:hover{text-decoration:underline}

.container{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.muted{color: var(--muted)}

/* Site-wide notice banner (above header) */
.site-notice{
  width: 100%;
  background: rgba(15, 90, 58, 0.06);
  border-bottom: 1px solid rgba(15, 90, 58, 0.12);
}
.site-notice .container{
  padding: 10px 20px;
}
.site-notice-text{
  display:block;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(15, 26, 20, 0.82);
}
.site-notice a{
  color: var(--brand-2);
  font-weight: 800;
  text-decoration: none;
}
.site-notice a:hover{
  text-decoration: underline;
}

/* Header / Nav */
.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 248, 247, 0.75);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding: 14px 20px;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  /* Allow header to shrink cleanly on small screens */
  min-width: 0;
  max-width: 100%;
}
.brand:hover{ text-decoration: none; }
.brand:hover .brand-wordmark{ text-decoration: none; }
.brand-text{display:flex; flex-direction:column; line-height:1.1}

/* Wordmark logo (header) */
.brand-wordmark{
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  line-height: 1;
  position: relative;
  white-space: nowrap;
}
.brand-wordmark:after{
  content:"";
  position:absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(15, 90, 58, 0.0), rgba(15, 90, 58, 0.55), rgba(27, 127, 90, 0.65), rgba(15, 90, 58, 0.0));
  opacity: 0.8;
}

/* Backwards compat (older markup) */
.brand-name{font-weight:700; letter-spacing:0.2px; color: var(--text)}
.brand-tag{font-size: 12px; color: var(--muted)}

.nav{
  display:flex;
  align-items:center;
  gap: 6px;
}
.nav-link{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
}
.nav-link:hover{
  text-decoration:none;
  background: rgba(15, 90, 58, 0.08);
}
.nav-link.is-active{
  background: rgba(15, 90, 58, 0.12);
  box-shadow: inset 0 0 0 1px rgba(15, 90, 58, 0.10);
}

.badge{
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(27, 127, 90, 0.12);
  color: var(--brand-2);
  border: 1px solid rgba(27, 127, 90, 0.18);
}

.nav-toggle{
  display:none;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.7);
}
.nav-toggle:focus{outline: none; box-shadow: 0 0 0 4px var(--ring)}
.nav-toggle span{
  display:block;
  height: 2px;
  width: 18px;
  background: var(--text);
  margin: 4px auto;
  border-radius: 999px;
}

/* Layout blocks */
.section{padding: 8px 0}
.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card.pad{padding: 22px}

.grid{
  display:grid;
  gap: 18px;
}
.grid.cols-2{grid-template-columns: 1.2fr 0.8fr}
.grid.cols-2.is-even{grid-template-columns: 1fr 1fr}
.grid.cols-3{grid-template-columns: repeat(3, minmax(0, 1fr))}

/* Hero */
.hero{
  padding: 36px 0 22px;
}
.hero.hero-slim{
  padding: 22px 0 14px;
}
.hero-shell{
  background:
    linear-gradient(135deg, rgba(15, 90, 58, 0.88), rgba(10, 63, 42, 0.86)),
    url("../../img/topbanner.jpg");
  background-size: cover;
  background-position: center;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 30px 80px rgba(10, 63, 42, 0.35);
  overflow:hidden;
}
.hero-inner{
  padding: 16px 28px;
  color: #f4fff9;
  display:grid;
  gap: 18px;
  grid-template-columns: 1.35fr 0.65fr;
  align-items: center;
}
.hero-inner.hero-inner-half{
  grid-template-columns: 0.5fr 0.5fr;
}
.hero-inner.hero-inner-slim{
  padding: 26px 24px;
}
.hero h1{
  margin: 0;
  font-size: clamp(26px, 3.2vw, 42px);
  letter-spacing: -0.02em;
}
.hero p{
  margin: 10px 0 0;
  color: rgba(244,255,249,0.85);
  font-size: 13px;
  line-height: 1.6;
  max-width: 70ch;
  text-align: justify;
}
.cta-row{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.18);
  font-weight: 700;
  color: #f4fff9;
  background: rgba(255,255,255,0.10);
  text-decoration:none;
}
.btn:hover{background: rgba(255,255,255,0.16); text-decoration:none}
.btn.primary{
  border-color: rgba(255,255,255,0.22);
  background: rgba(244,255,249,0.18);
}

/* Light-surface button variant (shared across pages) */
.btn-soft{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(15, 90, 58, 0.12);
  background: rgba(15, 90, 58, 0.06);
  color: var(--text);
  /* Ensure <button class="btn-soft"> matches <a class="btn-soft"> typography exactly */
  font-family: inherit;
  font-size: inherit;
  font-weight: 800;
  text-decoration:none;
  cursor: pointer;
}
.btn-soft:hover{
  text-decoration:none;
  background: rgba(15, 90, 58, 0.10);
}
/* Compact button (used where many actions appear) */
.btn-soft.is-compact{
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(255,255,255,0.85);
  border-color: rgba(15, 90, 58, 0.14);
}
.btn-soft.is-compact:hover{
  background: rgba(15, 90, 58, 0.08);
}

.hero-aside{
  border-radius: 18px;
  padding: 14px;
}

.hero-aside .stat-row{
  grid-template-columns: 1fr;
}
.hero-aside .stat{
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.16);
}
.hero-aside .stat .num{color: rgba(244,255,249,0.95)}
.hero-aside .stat .label{color: rgba(244,255,249,0.78)}

.hero-aside .kicker{
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 11px;
  color: rgba(244,255,249,0.78);
}
.hero-aside ul{
  margin: 10px 0 0;
  padding-left: 18px;
  color: rgba(244,255,249,0.85);
  line-height: 1.6;
  font-size: 14px;
}

/* Content typography */
.h2{
  margin: 0 0 10px;
  font-size: 20px;
  letter-spacing: -0.01em;
}
.lede{line-height: 1.7; font-size: 13px; text-align: justify;}
.serif{font-family: "Source Serif 4", Georgia, serif}

/* Small utilities (used on roadmap-style pages) */
.pill-row{
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 10px;
}
.pill.is-dark{
  border-color: rgba(255,255,255,0.20);
  background: rgba(255,255,255,0.12);
  color: rgba(244,255,249,0.95);
}
.pill.is-muted{
  border-color: rgba(15, 90, 58, 0.12);
  background: rgba(15, 90, 58, 0.06);
  color: var(--brand-2);
}

.mt-14{margin-top: 14px}
.mb-0{margin-bottom: 0}
.mb-10{margin-bottom: 10px}
.my-14-10{margin: 14px 0 10px}
.my-0-10{margin: 0 0 10px}
.w-170{width: 170px}

.media{
  display:grid;
  gap: 16px;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: start;
}
.figure{
  border-radius: 18px;
  overflow:hidden;
  border: 1px solid var(--border);
  background: #eef3ef;
}
.figure img{display:block}

/* Long-form prose */
.prose{
  /* Don’t hard-constrain width; align with the site container like other pages. */
  max-width: none;
  margin: 0;
}
.prose-layout{
  display:grid;
  /* NOTE: the TOC <aside> is the first child in the DOM, so it must be the first (narrow) column */
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 12px;
  align-items:start;
}
.prose-main{min-width: 0}
.prose-aside{
  position: relative;
  /* Allow sticky to work for the full scroll range by stretching to the row height */
  align-self: stretch;
}
.prose-aside-inner{
  position: sticky;
  top: 86px;
  max-height: calc(100vh - 110px);
  overflow: auto;
}
.toc-card{
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.7);
  padding: 10px;
}
.toc-title{
  font-weight: 900;
  margin-bottom: 8px;
  font-size: 13px;
}
.prose h2{
  scroll-margin-top: 90px;
  margin-top: 18px;
  margin-bottom: 10px;
}
.prose h3{
  scroll-margin-top: 90px;
  margin-top: 14px;
  margin-bottom: 8px;
  font-size: 16px;
}
.prose p, .prose li{
  font-size: 13px;
  line-height: 1.75;
}
.prose ul{padding-left: 18px}

.toc{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  margin: 10px 0 14px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.7);
}
.toc.is-compact{
  grid-template-columns: 1fr;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.toc.is-compact a{
  padding: 7px 9px;
  border-radius: 12px;
  border: 1px solid rgba(15, 90, 58, 0.10);
  background: rgba(15, 90, 58, 0.04);
  font-size: 12px;
}
.toc.is-compact a:hover{
  background: rgba(15, 90, 58, 0.08);
}
.toc a{
  color: var(--text);
  font-weight: 700;
  text-decoration:none;
}
.toc a:hover{color: var(--brand); text-decoration:none}

.callout{
  border-radius: 16px;
  border: 1px solid rgba(15, 90, 58, 0.16);
  background: linear-gradient(180deg, rgba(15, 90, 58, 0.06), rgba(255,255,255,0.8));
  padding: 12px 14px;
  margin-bottom: 14px;
}
.callout-title{
  font-weight: 900;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}
.callout-body{color: var(--text)}

details{
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 10px 12px;
  background: rgba(255,255,255,0.65);
  margin-top: 10px;
}
details summary{
  cursor: pointer;
  font-weight: 900;
  color: var(--brand-2);
}
.details-body{margin-top: 10px}

.equation{
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(15, 90, 58, 0.12);
  background: rgba(15, 90, 58, 0.04);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  overflow:auto;
}

.glossary{
  display:grid;
  gap: 8px;
}
.glossary > div{
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.7);
  border-radius: 14px;
  padding: 10px 12px;
}

/* Stats */
.stat{
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(15,90,58,0.06), transparent 60%);
}
.stat .num{font-weight: 800; font-size: 22px}
.stat .label{color: var(--muted); font-size: 13px; margin-top: 4px}
.stat-row{display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px}

/* Hero (dark) stats override */
.hero-aside .stat{
  padding: 12px 12px;
  text-align: center;
}
.hero-aside .stat .num{
  color: rgba(244,255,249,0.98);
  font-size: 16px;
  letter-spacing: 0.1em;
}
.hero-aside .stat .label{
  color: rgba(244,255,249,0.78);
  font-size: 12px;
  margin-top: 2px;
}

/* Table */
.table{
  width: 100%;
  border-collapse: collapse;
  overflow:hidden;
  border-radius: 14px;
  border: 1px solid var(--border);
}
.table th, .table td{
  text-align:left;
  padding: 12px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.table th{
  background: rgba(15, 90, 58, 0.06);
  font-weight: 800;
}
.table tr:last-child td{border-bottom:none}

/* Home page papers table tweaks */
.table td.paper-authors{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Papers page */
.papers-hero{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 16px;
}
.papers-count{
  padding-top: 10px;
  /* Allow wrapping to prevent overflow on narrower screens */
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: right;
  font-size: 12px;
}
.papers-toolbar{
  display:grid;
  grid-template-columns: 1.4fr 0.6fr auto;
  gap: 12px;
  margin-top: 0;
}
.papers-toolbar-card{
  background: linear-gradient(180deg, rgba(15, 90, 58, 0.06), rgba(255,255,255,0.75));
  border-color: rgba(15, 90, 58, 0.14);
  margin-bottom: 14px;
}
.field{display:flex; flex-direction:column; gap: 6px}
.field-label{font-size: 12px; font-weight: 800; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase}
.input{
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 0 12px;
  background: rgba(255,255,255,0.9);
  color: var(--text);
}
.input:focus{outline:none; box-shadow: 0 0 0 4px var(--ring)}
.toolbar-actions{display:flex; gap: 10px; align-items:flex-end; padding-bottom: 1px}

.papers-list{display:grid; gap: 14px}
.paper-card{
  box-shadow: var(--shadow);
  /* Prevent any child from forcing horizontal page scroll */
  max-width: 100%;
  overflow: hidden;
}
.paper-top{display:flex; gap: 14px; align-items:flex-start}
.paper-year{
  min-width: 64px;
  height: 36px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius: 999px;
  border: 1px solid rgba(15, 90, 58, 0.16);
  background: rgba(15, 90, 58, 0.06);
  font-weight: 900;
}
.paper-main{min-width: 0}
.paper-title{margin: 0; font-size: 18px; letter-spacing: -0.01em; overflow-wrap: anywhere}
.paper-authors{margin-top: 6px; font-size: 13px}
.paper-meta{display:flex; flex-wrap:wrap; gap: 8px; margin-top: 12px; min-width: 0}
.chip{
  display:flex;
  gap: 8px;
  align-items: baseline;
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 6px 10px;
  background: rgba(255,255,255,0.7);
  max-width: 100%;
  min-width: 0;
}
.chip-k{
  font-size: 11px;
  font-weight: 900;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex: 0 0 auto;
}
.chip-v{
  font-size: 13px;
  overflow:hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: min(62ch, 100%);
  min-width: 0;
  flex: 1 1 auto;
}

.paper-abstract{
  margin-top: 12px;
  border-top: 1px dashed rgba(15, 26, 20, 0.18);
  padding-top: 10px;
}
.paper-abstract-label{
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--brand-2);
  margin-bottom: 8px;
}
.paper-abstract-body{
  margin-top: 0;
  line-height: 1.65;
  color: rgba(15, 26, 20, 0.78);
  font-size: 13px;
  font-style: italic;
  text-align: justify;
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
}

.papers-pagination{
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}
.papers-pagination.is-top{
  margin-top: 10px;
  margin-bottom: 14px;
}

/* Datasets page */
.datasets-toolbar{
  grid-template-columns: 1.2fr 0.7fr 0.7fr 0.55fr auto;
}
.datasets-actions{align-items:flex-end}
.datasets-toolbar-card{margin-top: 14px}
.datasets-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.dataset-card{
  overflow: hidden;
  padding: 0;
  transition: box-shadow 0.15s ease;
}
.dataset-card:hover{
  box-shadow: 0 22px 55px rgba(15, 26, 20, 0.14);
}
.dataset-cover{
  position: relative;
  height: 185px;
  background: #eef3ef;
}
.dataset-cover img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display:block;
}
.dataset-placeholder{padding: 16px}
.dataset-cover-overlay{
  position:absolute;
  inset:0;
  background: linear-gradient(180deg, rgba(15, 26, 20, 0.05) 0%, rgba(15, 26, 20, 0.40) 100%);
  pointer-events: none;
}
.dataset-cover-btn{
  display:block;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.dataset-cover-btn:focus{outline:none}
.dataset-cover-btn:focus-visible{box-shadow: 0 0 0 4px var(--ring)}
.dataset-cover-btn img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display:block;
}
.dataset-badges{
  position:absolute;
  left: 14px;
  top: 14px;
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
  max-width: calc(100% - 28px);
}
.pill{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.75);
  color: var(--brand-2);
  font-weight: 800;
  font-size: 12px;
  backdrop-filter: blur(6px);
  overflow:hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dataset-metrics{
  position:absolute;
  right: 14px;
  bottom: 12px;
  display:flex;
  gap: 10px;
  align-items:center;
}
.metric{
  font-size: 12px;
  font-weight: 900;
  color: var(--brand-2);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(6px);
}
.dataset-content{
  padding: 16px 16px 14px;
  position: relative;
}
.dataset-title{
  margin: 0;
  font-size: 18px;
  letter-spacing:-0.01em;
  line-height: 1.2;
}
.dataset-stats{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 0;
}
.ds-row{
  border: 1px solid rgba(15, 90, 58, 0.10);
  background: rgba(15, 90, 58, 0.04);
  border-radius: 14px;
  padding: 10px 10px;
  min-height: 54px;
}
.ds-row dt{
  font-size: 11px;
  font-weight: 900;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ds-row dd{
  margin: 6px 0 0;
  font-weight: 900;
  font-size: 12px;
  color: var(--text);
}
.dataset-actions{
  display:flex;
  align-items:center;
  gap: 8px;
  margin-top: 10px;
}
.dataset-actions .btn-soft{font-size: 12px}
.dataset-btn-primary{
  background: rgba(15, 90, 58, 0.08);
  border-color: rgba(15, 90, 58, 0.16);
}
.btn-soft.dataset-btn-download,
.btn-soft.is-compact.dataset-btn-download{
  background: linear-gradient(135deg, rgba(15, 90, 58, 0.92), rgba(27, 127, 90, 0.92));
  border-color: rgba(15, 90, 58, 0.18);
  color: #f4fff9;
}
.btn-soft.dataset-btn-download:hover,
.btn-soft.is-compact.dataset-btn-download:hover{
  background: linear-gradient(135deg, rgba(15, 90, 58, 0.98), rgba(27, 127, 90, 0.98));
}

/* Image modal (dataset previews) */
.img-modal{
  position: fixed;
  inset: 0;
  z-index: 200;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 22px;
  background: rgba(15, 26, 20, 0.82);
  backdrop-filter: blur(6px);
}
.img-modal[hidden]{display:none}
.img-modal__inner{
  position: relative;
  max-width: min(1100px, 96vw);
  max-height: 86vh;
}
.img-modal__img{
  max-width: 100%;
  max-height: 86vh;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: 0 30px 80px rgba(0,0,0,0.35);
  display:block;
  background: rgba(255,255,255,0.05);
}
.img-modal__close{
  position: absolute;
  top: -14px;
  right: -14px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.10);
  color: rgba(244,255,249,0.95);
  font-weight: 900;
  cursor: pointer;
}
.img-modal__close:hover{background: rgba(255,255,255,0.16)}
.img-modal__close:focus{outline:none; box-shadow: 0 0 0 4px rgba(255,255,255,0.18)}
.dataset-actions-left{
  display:flex;
  align-items:center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}
.dataset-actions-right{
  margin-left: auto;
  display:flex;
  align-items:center;
  gap: 10px;
  flex-wrap: wrap;
}
.dataset-download-fallback{
  font-size: 13px;
  font-weight: 800;
}

.dataset-citation-panel{
  margin-top: 10px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(15, 90, 58, 0.12);
  background: rgba(255,255,255,0.75);
  box-shadow: 0 8px 20px rgba(15, 26, 20, 0.10);
  line-height: 1.6;
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: 12px;
  text-align: justify;
}
.datasets-format summary{
  cursor: pointer;
  font-weight: 900;
  color: var(--brand-2);
}
.dataset-xml pre{
  margin: 12px 0 0;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.75);
  overflow:auto;
  font-size: 12px;
  line-height: 1.45;
}
.page-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(15, 90, 58, 0.12);
  background: rgba(15, 90, 58, 0.06);
  color: var(--text);
  font-weight: 800;
}
.page-link:hover{text-decoration:none; background: rgba(15, 90, 58, 0.10)}
.page-link.is-disabled{opacity: 0.5; pointer-events:none}

.page-numbers{
  display:flex;
  align-items:center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.page-num{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.8);
  color: var(--text);
  font-weight: 900;
}
.page-num:hover{text-decoration:none; background: rgba(15, 90, 58, 0.08)}
.page-num.is-active{
  background: rgba(15, 90, 58, 0.14);
  border-color: rgba(15, 90, 58, 0.18);
}
.page-ellipsis{padding: 0 4px}

/* Footer */
.site-footer{
  margin-top: 22px;
  padding: 34px 0 22px;
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,0.55);
  font-size: 12px;
}
.footer-grid{
  display:grid;
  gap: 18px;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  align-items:start;
}
.footer-brand{font-weight: 800}
.footer-heading{font-weight: 800; margin-bottom: 8px}
.footer-links{display:flex; flex-direction:column; gap: 6px}
.footer-links a{color: var(--muted)}
.footer-links a:hover{color: var(--text)}
.footer-links.footer-links-columns{
  /* Multi-column layout doesn't work on flex containers */
  display: block;
  columns: 3;
  column-gap: 18px;
}
.footer-links.footer-links-columns a{
  display:block;
  break-inside: avoid;
  padding: 2px 0;
}
.footer-bottom{
  display:flex;
  justify-content:space-between;
  gap: 12px;
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 13px;
}

/* Responsive */
@media (max-width: 980px){
  .grid.cols-2{grid-template-columns: 1fr}
  .grid.cols-3{grid-template-columns: 1fr}
  .hero-inner{grid-template-columns: 1fr}
  .media{grid-template-columns: 1fr}
  .footer-grid{grid-template-columns: 1fr}
  .footer-links.footer-links-columns{columns: 2}
  .stat-row{grid-template-columns: 1fr}
  .nav-toggle{display:inline-block}
  .nav{
    position: absolute;
    left: 0;
    right: 0;
    top: 64px;
    margin: 0 16px;
    padding: 10px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.92);
    box-shadow: var(--shadow);
    display:none;
    flex-direction: column;
    align-items: stretch;
  }
  .site-header[data-nav-open="true"] .nav{display:flex}
  .site-header[data-nav-open="true"] .nav-link{justify-content:space-between}

  .papers-toolbar{
    grid-template-columns: 1fr;
  }
  .toolbar-actions{align-items: stretch}
  .papers-hero{flex-direction: column}
  .papers-pagination{
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  .papers-pagination .page-numbers{
    width: 100%;
    justify-content: flex-start;
  }
  .paper-top{flex-direction: column}
  .paper-year{align-self: flex-start}
  /* On smaller widths, wrap chip values to avoid any overflow */
  .chip-v{
    max-width: 100%;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .datasets-toolbar{
    grid-template-columns: 1fr;
  }

  .toc{
    grid-template-columns: 1fr;
  }
  .prose-layout{
    grid-template-columns: 1fr;
  }
  .prose-aside-inner{
    position: static;
  }
}

@media (max-width: 720px){
  .papers-pagination{
    flex-direction: column;
    align-items: stretch;
  }
  .page-numbers{
    justify-content: flex-start;
  }
  .paper-top{
    flex-direction: column;
  }
  .papers-count{
    padding-top: 0;
    text-align: left;
    white-space: normal;
  }
  .footer-links.footer-links-columns{columns: 1}
  .datasets-grid{
    grid-template-columns: 1fr;
  }
  .dataset-stats{
    grid-template-columns: 1fr;
  }
  .dataset-cover{
    height: 170px;
  }
}

