/* ==========================================================================
   AG Millanvois — The Hetero-SFx Laboratory
   Design system: tokens, base, and shared components
   ========================================================================== */

:root {
  /* Palette */
  --purple-deep: #3D2E4A;
  --purple-shade-dark: #322642;
  --purple-shade-light: #46355A;
  --purple-mid: #5A4570;
  --purple-light-muted: #C9BCD5;
  --gold: #E8B547;
  --gold-dark: #B8892A;
  --honor-blue: #CFE7F3;
  --honor-blue-text: #1E5F7A;
  --honor-blue-dark: #A9D4E8;
  --state-gas-bg: #DCEFEA;
  --state-gas-text: #2A7A63;
  --state-liquid-bg: #E4DFF3;
  --state-liquid-text: #5B4695;
  --state-solid-bg: #F0E4D8;
  --state-solid-text: #8A5A2B;
  --off-white: #F4F1EC;
  --warm-white: #FAFAF7;
  --text-dark: #1F1A26;
  --text-muted: #6B6274;
  --border: #E5E0EA;
  --border-on-dark: rgba(244, 241, 236, 0.16);

  /* Type */
  --font-display: 'EB Garamond', 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;

  /* Scale */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;
  --space-7: 9rem;

  --radius-s: 3px;
  --radius-m: 6px;

  --max-width: 1180px;
  --content-width: 760px;

  --shadow-card: 0 1px 2px rgba(31, 26, 38, 0.04), 0 4px 16px rgba(31, 26, 38, 0.06);
  --shadow-card-hover: 0 2px 4px rgba(31, 26, 38, 0.06), 0 12px 28px rgba(61, 46, 74, 0.12);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--warm-white);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; margin: 0; line-height: 1.15; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; font-size: 1rem; }

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

/* Visible keyboard focus everywhere */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: var(--radius-s);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: var(--purple-deep);
  padding: var(--space-1) var(--space-2);
  z-index: 200;
  font-weight: 600;
}
.skip-link:focus { left: var(--space-2); top: var(--space-2); }

/* ---------- Layout helpers ---------- */
.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-3);
}
.prose { max-width: var(--content-width); }
section { position: relative; }
.section-pad { padding: var(--space-6) 0; }
.section-pad-s { padding: var(--space-5) 0; }

@media (max-width: 640px) {
  .section-pad { padding: var(--space-5) 0; }
  .section-pad-s { padding: var(--space-4) 0; }
}

/* ---------- Eyebrow / section labels ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-dark);
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  margin-bottom: var(--space-2);
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  display: inline-block;
}
.eyebrow.on-dark { color: var(--gold); }

.section-head { margin-bottom: var(--space-4); }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); color: var(--purple-deep); }
.section-head .lede { color: var(--text-muted); margin-top: var(--space-2); max-width: 620px; font-size: 1.05rem; }

/* ---------- Atom motif (structural signature) ---------- */
/* Used throughout as bullets, dividers, and markers — echoes the lab mark's
   six-coordinate S(VI) center with one heteroatom (gold) emphasized. */
.atom-rule {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin: var(--space-2) 0;
}
.atom-rule .line { height: 1px; background: var(--border); flex: 1; }
.atom-rule .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); flex-shrink: 0; }
.atom-rule.on-dark .line { background: var(--border-on-dark); }

.atom-bullet-list li {
  position: relative;
  padding-left: 1.4em;
  margin-bottom: 0.65em;
}
.atom-bullet-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.85em 1.7em;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--radius-s);
  border: 1px solid transparent;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.btn-gold-outline {
  border-color: var(--gold);
  color: var(--gold);
  background: transparent;
}
.btn-gold-outline:hover { background: var(--gold); color: var(--purple-deep); }
.btn-solid {
  background: var(--gold);
  color: var(--purple-deep);
}
.btn-solid:hover { background: var(--gold-dark); }
.btn-purple-outline {
  border-color: var(--purple-mid);
  color: var(--purple-deep);
  background: transparent;
}
.btn-purple-outline:hover { background: var(--purple-deep); color: var(--off-white); border-color: var(--purple-deep); }
.btn-text {
  padding: 0;
  color: var(--purple-deep);
  font-weight: 600;
  border-bottom: 1px solid var(--gold);
  border-radius: 0;
}
.btn-text:hover { color: var(--gold-dark); }

/* ---------- Site header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--purple-deep);
  border-bottom: 1px solid var(--border-on-dark);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--off-white);
  flex-shrink: 0;
}
.brand img { width: 40px; height: 40px; }
.brand .lab-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--purple-light-muted);
  display: block;
  margin-top: 2px;
}
.brand-text { line-height: 1.2; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--off-white);
  padding: 0.5em;
}
.nav-toggle svg { width: 22px; height: 22px; }

.main-nav ul { display: flex; gap: var(--space-3); }
.main-nav ul li:not(:last-child) { margin-right: var(--space-3); }
.main-nav a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--purple-light-muted);
  padding: 0.4em 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.main-nav a:hover { color: var(--off-white); }
.main-nav a[aria-current="page"] { color: var(--gold); border-color: var(--gold); }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed;
    inset: 68px 0 0 0;
    background: var(--purple-deep);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    overflow-y: auto;
  }
  .main-nav.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .main-nav ul { flex-direction: column; gap: 0; padding: var(--space-2) var(--space-3); }
  .main-nav a { display: block; padding: 0.9em 0; border-bottom: 1px solid var(--border-on-dark); font-size: 1rem; }
  .main-nav a[aria-current="page"] { border-bottom-color: var(--border-on-dark); }
}

/* ---------- Hero (banded triangle background, SVG, scales to any box) ---------- */
.hero {
  position: relative;
  background: var(--purple-deep);
  overflow: hidden;
  color: var(--off-white);
  padding: var(--space-7) 0 var(--space-6);
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-content { position: relative; z-index: 2; }
.hero-mark {
  width: clamp(72px, 9vw, 118px);
  height: clamp(72px, 9vw, 118px);
  margin-bottom: var(--space-3);
  opacity: 0.95;
}
.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  max-width: 16em;
}
.hero .sub-x { font-size: 0.62em; vertical-align: sub; }
.hero-rule { width: 90px; height: 1px; background: var(--gold); margin: var(--space-3) 0; }
.hero-tagline {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  color: var(--gold);
  margin-bottom: var(--space-3);
}
.hero-mission { max-width: 540px; color: var(--purple-light-muted); font-size: 1.08rem; }
.hero-ctas { display: flex; gap: var(--space-2); margin-top: var(--space-4); flex-wrap: wrap; }

/* Smaller page-header variant (non-home pages) */
.page-header {
  position: relative;
  background: var(--purple-deep);
  overflow: hidden;
  color: var(--off-white);
  padding: var(--space-5) 0 var(--space-5);
}
.page-header .eyebrow.on-dark { margin-bottom: var(--space-1); }
.page-header h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); position: relative; z-index: 2; }
.page-header .lede { color: var(--purple-light-muted); max-width: 560px; margin-top: var(--space-2); position: relative; z-index: 2; font-size: 1.05rem; }

/* ---------- Cards ---------- */
.card {
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.card:hover { box-shadow: var(--shadow-card-hover); border-color: var(--purple-light-muted); }

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

/* Research tile */
.research-tile { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); }
.research-tile .tile-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-dark);
}
.research-tile h3 { color: var(--purple-deep); font-size: 1.5rem; }
.research-tile p { color: var(--text-muted); }
.research-tile .tile-foot { margin-top: auto; padding-top: var(--space-1); }

/* Chips / tags */
.chip-row { display: flex; flex-wrap: wrap; gap: 0.5em; }
.research-tile .chip-row { margin-top: auto; padding-top: var(--space-1); }
.chip {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.35em 0.8em;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--purple-mid);
  background: var(--off-white);
}

/* ---------- News cards ---------- */
.news-card { padding: var(--space-3); display: flex; flex-direction: column; gap: 0.5em; }
.news-card .news-date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--gold-dark);
  text-transform: uppercase;
}
.news-card h3 { font-size: 1.15rem; color: var(--purple-deep); }
.news-card p { color: var(--text-muted); font-size: 0.95rem; }
.news-card .news-cat {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--purple-mid);
}

.news-filters { display: flex; flex-wrap: wrap; gap: 0.5em; margin-bottom: var(--space-4); }
.news-filters button {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  padding: 0.5em 1em;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--warm-white);
  color: var(--text-muted);
  transition: all 0.15s ease;
}
.news-filters button:hover { border-color: var(--purple-mid); color: var(--purple-deep); }
.news-filters button[aria-pressed="true"] {
  background: var(--purple-deep);
  border-color: var(--purple-deep);
  color: var(--off-white);
}

/* ---------- Team cards ---------- */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
@media (max-width: 900px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .team-grid { grid-template-columns: 1fr; } }

.team-card { overflow: hidden; display: flex; flex-direction: column; }
.team-photo {
  aspect-ratio: 1 / 1;
  background: var(--purple-shade-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.team-photo img { width: 100%; height: 100%; object-fit: cover; }
.team-photo .placeholder-mark { width: 34%; opacity: 0.5; }
.team-body { padding: var(--space-3); display: flex; flex-direction: column; gap: 0.4em; flex: 1; }
.team-body h3 { font-size: 1.15rem; color: var(--purple-deep); }
.team-role {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--gold-dark);
  text-transform: uppercase;
}
.team-bio { font-size: 0.92rem; color: var(--text-muted); flex: 1; }
.team-links { display: flex; gap: 0.6em; margin-top: 0.5em; flex-wrap: wrap; }
.team-links .link-chip:not(:last-child) { margin-right: 0.5em; }

/* Consistent icon+label chip, used for team links, footer connect, and
   contact "elsewhere" — same size/weight everywhere so nothing looks
   mismatched next to plain text like an email address. */
.link-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--purple-mid);
  line-height: 1;
}
.link-chip .link-icon { display: inline-flex; width: 14px; height: 14px; flex-shrink: 0; margin-right: 0.4em; }
.link-chip .link-icon svg { width: 100%; height: 100%; display: block; }
.link-chip:hover { color: var(--gold-dark); }
.on-dark .link-chip, .footer-social .link-chip { color: var(--purple-light-muted); }
.on-dark .link-chip:hover, .footer-social .link-chip:hover { color: var(--gold); }
.team-paper {
  margin-top: 0.6em;
  padding-top: 0.6em;
  border-top: 1px dashed var(--border);
  font-size: 0.82rem;
}
.team-paper .label { font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--purple-light-muted); display: block; margin-bottom: 0.25em; }

/* PI feature card */
.pi-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--space-4);
  padding: var(--space-4);
  align-items: start;
}
@media (max-width: 700px) { .pi-card { grid-template-columns: 1fr; } }
.pi-photo {
  aspect-ratio: 1/1;
  background: var(--purple-shade-light);
  border-radius: var(--radius-m);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.pi-photo img { width: 100%; height: 100%; object-fit: cover; }
.pi-photo .placeholder-mark { width: 34%; opacity: 0.5; }
.pi-info h3 { font-size: 1.6rem; color: var(--purple-deep); }
.pi-role { font-family: var(--font-mono); font-size: 0.78rem; color: var(--gold-dark); text-transform: uppercase; letter-spacing: 0.06em; margin: 0.3em 0 1em; }
.pi-bio { color: var(--text-muted); }

/* Alumni list */
.alumni-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6em 2em; }
@media (max-width: 620px) { .alumni-list { grid-template-columns: 1fr; } }
.alumni-list li {
  display: flex; justify-content: space-between; gap: 1em;
  padding: 0.7em 0; border-bottom: 1px solid var(--border);
  font-size: 0.94rem;
}
.alumni-list .alum-now { color: var(--text-muted); font-size: 0.85rem; text-align: right; }

/* ---------- Publications ---------- */
.pub-year-head {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--gold-dark);
  letter-spacing: 0.05em;
  margin: var(--space-4) 0 var(--space-2);
  display: flex; align-items: center; gap: var(--space-1);
}
.pub-year-head:first-child { margin-top: 0; }
.pub-entry {
  display: grid;
  grid-template-columns: 176px 1fr;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border);
}
.pub-entry:last-child { border-bottom: none; }
@media (max-width: 560px) { .pub-entry { grid-template-columns: 1fr; } }

/* Matted-frame thumbnail: works for any image shape (square TOC graphics,
   wide illustrative graphics, tall ones) without ever cropping content —
   object-fit: contain shows the whole image, letterboxed if needed, and
   the padding + border makes that look like an intentional frame rather
   than an accident. */
.pub-thumb {
  width: 176px;
  height: 124px;
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  padding: 8px;
  box-sizing: border-box;
}
@media (max-width: 560px) { .pub-thumb { width: 100%; height: 140px; } }
.pub-thumb img { width: 100%; height: 100%; object-fit: contain; }
.pub-thumb .placeholder-mark { width: 38%; opacity: 0.4; }

.pub-title { font-size: 1.02rem; font-weight: 600; color: var(--purple-deep); margin-bottom: 0.4em; }
.pub-authors { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0.4em; }
.pub-authors strong { color: var(--text-dark); font-weight: 600; }
.pub-meta { display: flex; gap: 1em; flex-wrap: wrap; align-items: center; }
.pub-meta a:not(:last-child) { margin-right: 0.6em; }
.pub-meta a { font-family: var(--font-mono); font-size: 0.78rem; color: var(--purple-mid); border-bottom: 1px solid var(--border); }
.pub-meta a:hover { color: var(--gold-dark); border-color: var(--gold-dark); }

/* Badges live on their own row between title and authors, so a long
   wrapping title never collides with them. */
.pub-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em;
  margin-bottom: 0.5em;
}
.pub-highlight {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25em 0.6em;
  border-radius: 999px;
  line-height: 1.4;
  transition: filter 0.15s ease;
}
.pub-highlight--gold { background: var(--gold); color: var(--purple-deep); }
.pub-highlight--blue { background: var(--honor-blue); color: var(--honor-blue-text); }
/* Only real links (clickable badges) get the hover + arrow — plain
   badges stay static so it's visually obvious which ones do something. */
a.pub-highlight:hover { filter: brightness(0.94); }
a.pub-highlight::after { content: " ↗"; opacity: 0.65; font-size: 0.9em; }

/* ---------- Join / positions ---------- */
.position-item {
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  margin-bottom: var(--space-2);
}
.position-item h3 { color: var(--purple-deep); font-size: 1.15rem; margin-bottom: 0.3em; }
.position-item .pos-meta { font-family: var(--font-mono); font-size: 0.72rem; color: var(--gold-dark); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.6em; }
.empty-state {
  padding: var(--space-4);
  border: 1px dashed var(--border);
  border-radius: var(--radius-m);
  color: var(--text-muted);
  text-align: center;
}

.steps-list { counter-reset: step; }
.steps-list li {
  counter-increment: step;
  position: relative;
  padding-left: 2.6em;
  margin-bottom: var(--space-2);
}
.steps-list li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: -0.1em;
  width: 1.8em; height: 1.8em;
  border-radius: 50%;
  border: 1px solid var(--gold);
  color: var(--gold-dark);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); }
@media (max-width: 780px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-block + .contact-block { margin-top: var(--space-4); }
.contact-block .label { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold-dark); margin-bottom: 0.4em; display: block; }
.contact-block address { font-style: normal; color: var(--text-muted); line-height: 1.7; }

.form-field { margin-bottom: var(--space-2); }
.form-field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.4em; color: var(--purple-deep); }
.form-field input, .form-field textarea {
  width: 100%;
  padding: 0.75em 0.9em;
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  background: var(--warm-white);
  color: var(--text-dark);
  transition: border-color 0.15s ease;
}
.form-field input:focus, .form-field textarea:focus { border-color: var(--gold); outline: none; }
.form-note { font-size: 0.8rem; color: var(--text-muted); margin-top: var(--space-2); }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--purple-deep);
  color: var(--off-white);
  padding: var(--space-5) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band h2 { font-size: clamp(1.5rem, 3vw, 2rem); position: relative; z-index: 2; }
.cta-band p { color: var(--purple-light-muted); max-width: 520px; margin: var(--space-2) auto var(--space-3); position: relative; z-index: 2; }
.cta-band .btn { position: relative; z-index: 2; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--purple-shade-dark);
  color: var(--purple-light-muted);
  padding: var(--space-5) 0 var(--space-3);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-on-dark);
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; gap: var(--space-3); } }
.footer-brand { display: flex; align-items: center; gap: 0.6em; color: var(--off-white); font-family: var(--font-display); font-size: 1.1rem; margin-bottom: var(--space-2); }
.footer-brand img { width: 32px; height: 32px; }
.footer-col h4 { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); margin-bottom: var(--space-2); }
.footer-col address { font-style: normal; font-size: 0.9rem; line-height: 1.8; }
.footer-col ul li { margin-bottom: 0.6em; font-size: 0.9rem; }
.footer-col ul a:hover { color: var(--off-white); }
.footer-social { display: flex; gap: 1em; flex-wrap: wrap; row-gap: 0.5em; }
.footer-social .link-chip:not(:last-child) { margin-right: 0.7em; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: var(--space-3); font-size: 0.8rem; flex-wrap: wrap; gap: 0.5em;
}
.footer-bottom a:hover { color: var(--off-white); }

/* ---------- Species (Lab page) ---------- */
.species-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
@media (max-width: 900px) { .species-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .species-grid { grid-template-columns: 1fr; } }

.species-card { padding: var(--space-3); display: flex; flex-direction: column; gap: 0.6em; }

.state-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3em 0.7em;
  border-radius: 999px;
  align-self: flex-start;
}
.state-badge--gas { background: var(--state-gas-bg); color: var(--state-gas-text); }
.state-badge--liquid { background: var(--state-liquid-bg); color: var(--state-liquid-text); }
.state-badge--solid { background: var(--state-solid-bg); color: var(--state-solid-text); }

/* The "drop your own ChemDraw image here" slot. Dashed border + hint
   text when empty makes it obviously a deliberate placeholder rather
   than a broken image; switches to the same matted-frame look as
   publication thumbnails once a real image is added. */
.species-structure {
  width: 100%;
  height: 130px;
  border-radius: var(--radius-s);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.species-structure.is-empty {
  border: 1.5px dashed var(--border);
  background: var(--off-white);
}
.species-structure:not(.is-empty) {
  border: 1px solid var(--border);
  background: var(--warm-white);
  padding: 8px;
  box-sizing: border-box;
}
.species-structure img { width: 100%; height: 100%; object-fit: contain; }
.species-structure-hint {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  text-align: center;
  padding: 0 1em;
  line-height: 1.5;
}

.species-formula { font-size: 1.35rem; color: var(--purple-deep); font-family: var(--font-display); font-weight: 600; }
.species-name { font-size: 0.92rem; color: var(--text-dark); }
.species-acronym { color: var(--text-muted); }
.species-bp { font-size: 0.85rem; font-style: italic; color: var(--text-muted); margin-top: auto; padding-top: 0.2em; }

/* ---------- Equipment (Lab page) ---------- */
.equipment-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
@media (max-width: 620px) { .equipment-grid { grid-template-columns: 1fr; } }
.equipment-card { overflow: hidden; display: flex; flex-direction: column; }
.equipment-photo {
  height: 220px;
  background: var(--purple-shade-light);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  padding: 10px;
  box-sizing: border-box;
}
.equipment-photo img { width: 100%; height: 100%; object-fit: contain; }
.equipment-photo .placeholder-mark { width: 30%; opacity: 0.5; }
.equipment-body { padding: var(--space-3); }
.equipment-body h3 { font-size: 1.05rem; color: var(--purple-deep); margin-bottom: 0.3em; }
.equipment-body p { font-size: 0.9rem; color: var(--text-muted); }

/* Utility */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
