/* ==========================================================================
   WACI Lab -- design tokens
   A field-notebook identity for a watershed / agroecosystem science lab.
   Palette leads with water (teal) and crop (green) as the signature pair --
   sustainability and agriculture first -- with harvest gold and soil clay
   as secondary, warmer accents. Cooler, mistier surfaces than a vintage
   parchment journal: think foggy wetland morning over a growing field.
   Signature motif: topographic contour lines, echoing watershed mapping.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Public+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  /* surfaces */
  --bg: #ffffff;
  --bg-mist: #f6f5f1;
  --surface: #ffffff;
  --surface-line: #e2e2dc;

  /* ink + text */
  --ink: #143a41;
  --ink-soft: #2b4f52;
  --text: #26302a;
  --text-secondary: #56635c;
  --text-muted: #838f85;

  /* accents */
  --gold: #b98a2e;
  --gold-deep: #8f6620;
  --clay: #8c5a3c;
  --crop: #3f7a48;
  --crop-deep: #2f5c37;
  --water: #1b6472;

  /* type */
  --font-display: 'Fraunces', 'Iowan Old Style', serif;
  --font-body: 'Public Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace;

  /* layout */
  --max-width: 1120px;
  --radius: 3px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

a { color: var(--water); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--gold-deep); }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

img { max-width: 100%; display: block; }

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); font-weight: 500; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-secondary); font-weight: 600; }

p { margin: 0 0 1em; color: var(--text); }
.lede { font-size: 1.2rem; color: var(--ink-soft); font-family: var(--font-display); font-weight: 400; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--water);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.9em;
}
.eyebrow.no-rule::before { display: none; }
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--water);
}

/* ---------- header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--surface-line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}
.brand:hover { color: var(--ink); }
.brand-mark { width: 30px; height: 30px; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; white-space: nowrap; }
.brand-text strong { font-family: var(--font-display); font-size: 1.08rem; font-weight: 600; white-space: nowrap; }
.brand-text span { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0; color: var(--ink); white-space: nowrap; }

nav.primary-nav { display: flex; align-items: center; gap: 2px; }
nav.primary-nav > ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; }
nav.primary-nav li { position: relative; }
nav.primary-nav a.top-link {
  display: block;
  padding: 10px 14px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  white-space: nowrap;
  border-radius: var(--radius);
}
nav.primary-nav a.top-link:hover,
nav.primary-nav li.active > a.top-link { color: var(--ink); background: var(--bg-mist); }

nav.primary-nav .submenu {
  list-style: none;
  margin: 0;
  padding: 8px;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--surface-line);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(20, 58, 65, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}
nav.primary-nav li:hover .submenu,
nav.primary-nav li:focus-within .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
nav.primary-nav .submenu a {
  display: block;
  padding: 8px 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.88rem;
  border-radius: var(--radius);
}
nav.primary-nav .submenu a:hover { background: var(--bg-mist); color: var(--ink); }

.nav-toggle { display: none; }

@media (max-width: 1200px) {
  .nav-toggle {
    display: block;
    background: none;
    border: 1px solid var(--surface-line);
    border-radius: var(--radius);
    padding: 8px 10px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--ink);
    cursor: pointer;
  }
  nav.primary-nav { display: none; }
  nav.primary-nav.open {
    display: block;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--surface-line);
    padding: 8px 0;
  }
  nav.primary-nav.open > ul { flex-direction: column; gap: 0; }
  nav.primary-nav.open .wrap { padding: 0; }
  nav.primary-nav .submenu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; padding-left: 22px; display: none; }
  nav.primary-nav li.open .submenu { display: block; }
}

/* ---------- hero / contour motif ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0 72px;
  border-bottom: 1px solid var(--surface-line);
}
.hero-contours {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.55;
  pointer-events: none;
}
.hero-photo-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero-photo-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  opacity: 1;
}
.hero-photo-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  /* fully hides the photo behind the text column, fading out toward the right edge */
  background: linear-gradient(90deg, var(--bg) 0%, var(--bg) 44%, rgba(255, 255, 255, 0) 70%);
}
@media (max-width: 700px) {
  /* On narrow screens the hero text stack (h1 + lede + 5 stats) makes the
     section very tall relative to its width. Rather than stretch the photo
     to match that ballooned height (which crushes it into a portrait box
     and crops away most of its width), give it its own bounded aspect
     ratio instead -- close to the source photo's real ~1.75:1 -- so it
     reads as a proper banner at the top with barely any crop, and the
     text stack continues below it in normal flow instead of overlapping.
     The left-to-right desktop gradient (for revealing the photo beside the
     text column) doesn't apply here since text is full-width on mobile;
     swap it for a bottom fade so the photo blends into the page before
     the text begins. */
  .hero { padding-top: 0; }
  .hero-photo-bg {
    position: relative;
    inset: auto;
    aspect-ratio: 16 / 9;
    margin-bottom: 28px;
  }
  .hero-photo-bg img {
    position: absolute;
    inset: 0;
    object-position: center 35%;
  }
  .hero-photo-bg::after {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 55%, var(--bg) 100%);
  }
}
.hero .wrap { position: relative; z-index: 1; }
.hero-inner { max-width: 720px; }
.hero h1 { margin-bottom: 0.35em; }
.hero .lede { max-width: 600px; margin-bottom: 1.6em; }

.hero-stats {
  display: flex;
  gap: 36px;
  margin-top: 2.4em;
  flex-wrap: wrap;
}
.hero-stats .stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--ink);
  font-weight: 600;
}
.hero-stats .stat span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  text-transform: uppercase;
}
a.hero-stats-link, .hero-stats a.stat {
  text-decoration: none;
  display: block;
  transition: transform 0.15s ease;
}
.hero-stats a.stat:hover { transform: translateY(-2px); }
.hero-stats a.stat:hover strong { color: var(--water); }

/* ---------- section rhythm ---------- */

section.block { padding: 64px 0; }
section.block.tinted { background: var(--bg-mist); }
section.block.surface { background: var(--surface); border-top: 1px solid var(--surface-line); border-bottom: 1px solid var(--surface-line); }

.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 2em; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head .more { font-family: var(--font-mono); font-size: 0.82rem; white-space: nowrap; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--ink); color: var(--surface); }
.btn-primary:hover { background: var(--water); color: var(--surface); }
.btn-outline { border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--surface); }
.btn-gold { background: var(--gold); color: #2a1c04; }
.btn-gold:hover { background: var(--gold-deep); color: #fff; }

/* ---------- cards ---------- */

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--surface-line);
  border-radius: var(--radius);
  padding: 26px;
  position: relative;
}
.card-art {
  margin: -26px -26px 18px;
  height: 132px;
  overflow: hidden;
  border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
  border-bottom: 1px solid var(--surface-line);
}
.card-art .highlight-art,
.card-art img { width: 100%; height: 100%; display: block; object-fit: cover; }

/* wide banner variant: full-width image (e.g. a labeled infographic),
   uncropped horizontally -- height follows the image's own aspect ratio
   instead of the fixed small icon-strip height above */
.card-art-banner { height: auto; aspect-ratio: 1.83 / 1; }

/* side-by-side variant: image on the left, text box on the right */
.card-side-list { display: flex; flex-direction: column; gap: 20px; margin-top: 0; }
.card-side { display: flex; align-items: stretch; padding: 0; overflow: hidden; }
.card-side .card-art {
  margin: 0;
  width: 280px;
  height: auto;
  flex-shrink: 0;
  border-radius: calc(var(--radius) - 1px) 0 0 calc(var(--radius) - 1px);
  border-bottom: none;
  border-right: 1px solid var(--surface-line);
}
.card-side .card-body { padding: 26px; flex: 1; min-width: 0; }

/* contain variant: whole image visible at a smaller size, not cropped or
   stretched to match the text column's height -- for wide labeled
   infographics where every pixel/label needs to stay visible */
.card-side.card-side-contain { align-items: flex-start; }
.card-side.card-side-contain .card-art {
  width: 320px;
  aspect-ratio: 1.83 / 1;
  height: auto;
  background: var(--bg-mist);
}
.card-side.card-side-contain .card-art img { object-fit: contain; }

@media (max-width: 700px) {
  .card-side { flex-direction: column; }
  .card-side.card-side-contain .card-art { width: 100%; }
  .card-side .card-art {
    width: 100%;
    height: 160px;
    border-right: none;
    border-bottom: 1px solid var(--surface-line);
    border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
  }
}
/* float variant: single-column card, image floated so body text wraps
   around it instead of sitting in its own side-by-side box */
.card-float::after { content: ""; display: table; clear: both; }
.card-float-img {
  float: left;
  width: 320px;
  max-width: 45%;
  margin: 0 22px 12px 0;
  padding: 0;
  border-radius: var(--radius);
  border: 1px solid var(--surface-line);
  background: var(--bg-mist);
  display: block;
  cursor: zoom-in;
  transition: border-color 0.15s ease;
}
.card-float-img:hover { border-color: var(--water); }
.card-float-img img { width: 100%; height: auto; display: block; border-radius: calc(var(--radius) - 1px); }
.card-float .chip-row { clear: both; }
@media (max-width: 560px) {
  .card-float-img { float: none; width: 100%; max-width: none; margin: 0 0 16px; }
}

.logo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: var(--bg-mist);
  padding: 12px;
  text-align: center;
}
.logo-placeholder strong { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; color: var(--ink); }
.logo-placeholder span {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-muted);
  max-width: 220px;
}
.project-pending { color: var(--text-muted); font-style: italic; margin-bottom: 0; }
.card h3 { margin-bottom: 0.4em; }
.card p:last-child { margin-bottom: 0; }
.card ul { margin: 0; padding-left: 1.1em; }
.card ul:last-child { margin-bottom: 0; }
.card ul li { margin-bottom: 0.45em; font-size: 0.96rem; color: var(--text); }
.card ul li:last-child { margin-bottom: 0; }
.card .tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--crop-deep);
  background: #dfece1;
  padding: 3px 9px;
  border-radius: 20px;
  margin-bottom: 10px;
}
.card .tag.gold { color: var(--gold-deep); background: #f3e6cc; }
.card .tag.water { color: var(--water); background: #dbe9ec; }
.card .tag.clay { color: var(--clay); background: #ecdfd4; }

/* theme cards with contour corner */
.theme-card { border-top: 3px solid var(--water); }
.theme-card.gold { border-top-color: var(--gold); }
.theme-card.crop { border-top-color: var(--crop); }
.theme-card.clay { border-top-color: var(--clay); }

/* ---------- team ---------- */

.team-feature {
  display: flex;
  gap: 32px;
  align-items: center;
  padding-bottom: 40px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--surface-line);
}
.team-feature-avatar {
  width: 160px;
  height: 160px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2.5rem;
  flex-shrink: 0;
  border-top: 4px solid var(--gold);
  overflow: hidden;
}
.team-feature-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; display: block; }
.team-feature-body h3 { font-size: 1.5rem; margin-bottom: 0.15em; }
.team-feature-body .role {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gold-deep);
  margin-bottom: 0.7em;
}
.team-feature-body p { color: var(--text-secondary); max-width: 640px; margin-bottom: 0.6em; }
.team-feature-body .links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.team-feature-body .links .link-chip { width: 36px; height: 36px; }
.team-feature-body .links .link-chip svg { width: 18px; height: 18px; }

.team-section-head { display: flex; align-items: baseline; gap: 14px; margin: 3em 0 1.4em; }
.team-section-head h3 { margin: 0; white-space: nowrap; }
.team-section-head .count { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; }
.team-section-head .rule { flex: 1; height: 1px; background: var(--surface-line); }

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 200px));
  justify-content: start;
  gap: 22px;
}

.team-card {
  background: var(--surface);
  border: 1px solid var(--surface-line);
  border-radius: var(--radius);
  text-align: center;
  padding-bottom: 18px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.team-card:hover {
  transform: translateY(-3px);
  border-color: var(--water);
  box-shadow: 0 10px 24px rgba(20, 58, 65, 0.12);
}
.team-card-avatar {
  width: 160px;
  height: 160px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-mist);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2.5rem;
  border-top: 3px solid var(--water);
  border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
  overflow: hidden;
}
.team-card-photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.team-card-avatar.gold { border-top-color: var(--gold); }
.team-card-avatar.crop { border-top-color: var(--crop); }
.team-card-avatar.clay { border-top-color: var(--clay); }
.team-card-name { text-transform: none; letter-spacing: 0; font-size: 1rem; color: var(--ink); margin: 0 14px 3px; }
.team-card-role {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
  margin: 0 14px;
}
.team-card-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 10px 14px 0; }
.link-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--text-secondary);
  border: 1px solid var(--surface-line);
  border-radius: 50%;
  text-decoration: none;
  flex-shrink: 0;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.link-chip svg { width: 15px; height: 15px; display: block; }
.link-chip:hover { color: var(--surface); background: var(--water); border-color: var(--water); }

@media (max-width: 560px) {
  .team-feature { flex-direction: column; align-items: flex-start; text-align: left; }
}

.team-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.team-photo-card {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--surface-line);
  border-radius: var(--radius);
  overflow: hidden;
  border-top: 3px solid var(--water);
}
.team-photo-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}
.team-photo-card figcaption {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.team-photo-card .caption-text { color: var(--ink); font-size: 0.94rem; }
.team-photo-card .caption-date {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---------- publications ---------- */

.pub-year { display: flex; align-items: baseline; gap: 14px; margin: 2.2em 0 0.9em; }
.pub-year h3 { font-family: var(--font-mono); font-size: 1.3rem; color: var(--water); margin: 0; }
.pub-year .rule { flex: 1; height: 1px; background: var(--surface-line); }

.pub {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--surface-line);
  font-size: 0.96rem;
}
.pub:last-child { border-bottom: none; }
.pub-media { display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }
.pub-thumb {
  display: block;
  width: 72px;
  height: 72px;
  padding: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--surface-line);
  background: var(--bg-mist);
}
button.pub-thumb {
  cursor: zoom-in;
  transition: border-color 0.15s ease;
}
button.pub-thumb:hover { border-color: var(--water); }
.pub-thumb .highlight-art,
.pub-thumb img { width: 100%; height: 100%; display: block; object-fit: cover; }
.pub-body { flex: 1; min-width: 0; display: flex; gap: 8px; align-items: flex-start; }
.pub-number { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-secondary); flex-shrink: 0; padding-top: 2px; min-width: 2.2em; text-align: right; }
.pub-content { flex: 1; min-width: 0; }
.pub .pub-title { color: var(--ink); font-weight: 600; text-decoration: none; }
.pub .pub-title:hover { color: var(--water); }
.pub .pub-meta { display: block; font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-secondary); margin-top: 4px; }
.pub .pub-journal-line { display: block; font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-secondary); margin-top: 2px; }
.pub .pub-journal { color: var(--ink); font-weight: 600; font-style: italic; }

/* click-to-enlarge lightbox (populated by the script in _includes/footer.html) */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 20, 0.85);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.lightbox-overlay.open { display: flex; }
.lightbox-img { max-width: 90vw; max-height: 90vh; object-fit: contain; border-radius: 4px; display: block; }
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: transparent;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.12); }

@media (max-width: 480px) {
  .pub-thumb { width: 56px; height: 56px; }
}

/* ---------- chips (topic tags, reused for publications, themes, news) ---------- */

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  background: var(--bg-mist);
  border: 1px solid var(--surface-line);
  padding: 3px 9px;
  border-radius: 20px;
}
.pub-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--gold-deep);
  background: #f3e6cc;
  padding: 2px 8px;
  border-radius: 20px;
}
.pub-badge::before { content: "\2605"; font-size: 0.7em; }

.chip.water { color: var(--water); background: #dbe9ec; border-color: transparent; }
.chip.gold { color: var(--gold-deep); background: #f3e6cc; border-color: transparent; }
.chip.crop { color: var(--crop-deep); background: #dfece1; border-color: transparent; }
.chip.clay { color: var(--clay); background: #ecdfd4; border-color: transparent; }

/* ---------- publication filter ---------- */

.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 2em; }
.filter-chip {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  background: var(--bg-mist);
  border: 1px solid var(--surface-line);
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.filter-chip:hover { border-color: var(--water); color: var(--ink); }
.filter-chip.active { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.pub[hidden], .pub-year[hidden] { display: none; }

/* ---------- footer ---------- */

.site-footer { background: var(--ink); color: #d6dcd7; padding: 56px 0 28px; margin-top: 40px; }
.site-footer a { color: #ffffff; }
.site-footer .grid { grid-template-columns: 2fr 1fr 1fr; margin-bottom: 40px; }
@media (max-width: 600px) { .site-footer .grid { grid-template-columns: 1fr; gap: 28px; } }
.site-footer h4 { color: #a2bcb2; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; font-size: 0.92rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: #8ba59a;
}

/* ---------- misc page bits ---------- */

.page-hero { position: relative; overflow: hidden; padding: 56px 0 40px; border-bottom: 1px solid var(--surface-line); }
.page-hero .wrap { position: relative; z-index: 1; }
.page-hero .eyebrow { margin-bottom: 0.6em; }
.prose { max-width: 760px; }
.prose-wide { max-width: 100%; }
.prose h2 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin-bottom: 0.4em; }

.subnav {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--surface-line);
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.subnav a {
  padding: 10px 4px;
  margin-right: 22px;
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.94rem;
  border-bottom: 2px solid transparent;
}
.subnav a:hover { color: var(--ink); }
.subnav a.active { color: var(--ink); border-bottom-color: var(--gold); }

.callout {
  background: var(--surface);
  border: 1px solid var(--surface-line);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin: 2em 0;
}
.callout h3 { margin-top: 0; }

table.data-table { display: block; overflow-x: auto; width: 100%; border-collapse: collapse; font-size: 0.92rem; -webkit-overflow-scrolling: touch; }
table.data-table th, table.data-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--surface-line); }
table.data-table th { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-secondary); }

.news-item { padding: 20px 0; border-bottom: 1px solid var(--surface-line); }
.news-item-inner { display: flex; gap: 20px; align-items: flex-start; }
.news-item-thumb {
  width: 150px;
  height: 106px;
  flex-shrink: 0;
  padding: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--surface-line);
  background: var(--bg-mist);
  cursor: zoom-in;
  transition: border-color 0.15s ease;
}
.news-item-thumb:hover { border-color: var(--water); }
.news-item-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-item-body { flex: 1; min-width: 0; }
.news-item .date { font-family: var(--font-mono); font-size: 0.76rem; color: var(--water); text-transform: uppercase; letter-spacing: 0.03em; }
.news-item h3 { margin: 4px 0 6px; }
@media (max-width: 560px) {
  .news-item-inner { flex-direction: column; }
  .news-item-thumb { width: 100%; height: 180px; }
}

.news-post-banner {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--surface-line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-mist);
  margin: 1.2em 0;
  cursor: zoom-in;
}
.news-post-banner img { width: 100%; height: auto; display: block; }

.badge-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 1.4em 0; }
.badge-list span {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  padding: 5px 11px;
  border: 1px solid var(--surface-line);
  border-radius: 20px;
  color: var(--text-secondary);
}
