:root {
  --ink: #18201f;
  --muted: #5d6865;
  --paper: #fbfaf6;
  --panel: #ffffff;
  --line: #d9ddd6;
  --teal: #0e766e;
  --teal-dark: #07534d;
  --coral: #c6533f;
  --gold: #b98217;
  --lilac: #7d6aa8;
  --shadow: 0 22px 60px rgba(24, 32, 31, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
  padding: 12px clamp(18px, 4vw, 56px);
  background: rgba(251, 250, 246, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.wordmark {
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0;
}

nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

nav a {
  text-decoration: none;
}

nav a:hover {
  color: var(--teal-dark);
}

.hero {
  position: relative;
  min-height: 88vh;
  display: grid;
  align-items: end;
  padding: 96px clamp(20px, 6vw, 88px) 72px;
  overflow: hidden;
  background-image: url("assets/figures/taxonomy.png");
  background-size: cover;
  background-position: center top;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: rgba(251, 250, 246, 0.84);
}

.hero-content {
  position: relative;
  max-width: 940px;
}

.venue,
.eyebrow {
  margin: 0 0 12px;
  color: var(--coral);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 980px;
  font-size: clamp(2.6rem, 4.7rem, 4.7rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.12;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  line-height: 1.2;
}

.authors {
  margin: 22px 0 0;
  color: var(--teal-dark);
  font-size: 1.1rem;
  font-weight: 700;
}

.hero-copy {
  max-width: 760px;
  margin: 20px 0 0;
  color: #34413d;
  font-size: 1.1rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid var(--ink);
  text-decoration: none;
  font-weight: 800;
}

.button.primary {
  color: white;
  background: var(--ink);
}

.button.primary:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
}

.band {
  padding: 72px clamp(20px, 6vw, 88px);
}

.abstract-band {
  background: var(--ink);
  color: white;
}

.abstract-band .eyebrow {
  color: #f0b45f;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
}

.lead {
  margin: 0;
  color: #ecf3ef;
  font-size: 1.15rem;
}

.section-heading {
  max-width: 1180px;
  margin: 0 auto 28px;
}

.topic-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.topic-card {
  min-height: 220px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 30px rgba(24, 32, 31, 0.06);
}

.topic-card p,
.takeaway-list p,
figcaption,
.site-footer p {
  color: var(--muted);
}

.topic-index {
  display: block;
  margin-bottom: 36px;
  color: var(--gold);
  font-weight: 900;
}

.figure-band {
  background: #eef4ef;
}

.paper-figure {
  max-width: 1180px;
  margin: 0 auto;
}

.paper-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

figcaption {
  margin-top: 12px;
  font-size: 0.92rem;
}

.challenge-band {
  background: #fff7ec;
}

.takeaway-list {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.takeaway-list article {
  padding-left: 18px;
  border-left: 4px solid var(--coral);
}

.references-band {
  background: var(--panel);
}

.references-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
}

.reference-tools {
  width: min(100%, 360px);
}

.reference-tools label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.reference-tools input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.validation,
.reference-layout {
  max-width: 1180px;
  margin: 0 auto;
}

.validation {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eff7f5;
  color: var(--teal-dark);
  font-size: 0.86rem;
  font-weight: 800;
}

.reference-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.section-list {
  position: sticky;
  top: 84px;
}

.section-tab {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.section-tab[aria-selected="true"] {
  border-color: var(--teal);
  color: var(--teal-dark);
  background: #f0faf8;
}

.section-count {
  color: var(--coral);
}

.reference-section,
.full-index {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 12px 28px rgba(24, 32, 31, 0.05);
}

.reference-section {
  padding: 22px;
}

.reference-section header {
  margin-bottom: 18px;
}

.reference-section header p {
  margin: 8px 0 0;
  color: var(--muted);
}

.ref-list {
  display: grid;
  gap: 12px;
}

.ref-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fdfcf8;
}

.ref-key {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--teal-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88rem;
  font-weight: 800;
}

.ref-title {
  margin: 0 0 4px;
  font-weight: 800;
}

.ref-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.full-index {
  margin-top: 18px;
  padding: 0;
}

.full-index summary {
  padding: 16px 18px;
  cursor: pointer;
  font-weight: 900;
}

#full-bibliography {
  max-height: 640px;
  overflow: auto;
  padding: 0 18px 18px;
}

.uncited {
  border-color: #e7c99a;
  background: #fffaf0;
}

.uncited-note {
  color: var(--gold);
  font-weight: 800;
}

.site-footer {
  padding: 30px clamp(20px, 6vw, 88px);
  border-top: 1px solid var(--line);
  background: #f4f1ea;
}

.site-footer p {
  max-width: 1180px;
  margin: 0 auto;
  font-size: 0.92rem;
}

@media (max-width: 980px) {
  .content-grid,
  .reference-layout {
    grid-template-columns: 1fr;
  }

  .topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .takeaway-list {
    grid-template-columns: 1fr;
  }

  .section-list {
    position: static;
  }
}

@media (max-width: 680px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.88rem;
  }

  .hero {
    min-height: 82vh;
    padding-top: 78px;
  }

  h1 {
    font-size: 2.5rem;
  }

  .band {
    padding-top: 54px;
    padding-bottom: 54px;
  }

  .topic-grid {
    grid-template-columns: 1fr;
  }

  .topic-card {
    min-height: 0;
  }

  .references-heading {
    align-items: stretch;
    flex-direction: column;
  }
}
