@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --ink: #183b3f;
  --muted: #557174;
  --paper: #fffaf0;
  --mint: #d8ebe0;
  --coral: #e8765f;
  --line: #c8d9d0;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 0 rgba(232, 118, 95, 0.22);
  }
  50% {
    box-shadow: 0 0 16px rgba(232, 118, 95, 0.3);
  }
}

@keyframes floatIn {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
}

h1, h2, h3 {
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0;
}

h1 {
  color: var(--ink);
  font-size: clamp(2.7rem, 7vw, 5.8rem);
  line-height: 0.98;
  max-width: 9ch;
}

.subtitle {
  color: var(--coral);
  font-size: 1.15rem;
  font-weight: 700;
}

.hero {
  display: flex;
  flex-direction: column;
  margin: 2rem auto 3rem;
  max-width: 1150px;
}

.site-intro { order: 1; }
.galaxy-section { order: 2; }
.story-section { order: 3; }

.hero img {
  display: block;
  height: min(48vw, 520px);
  margin: 2rem 0;
  object-fit: cover;
  width: 100%;
}

.hero h2 {
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  max-width: 17ch;
}

.hero p {
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.7;
  max-width: 60ch;
}

.site-intro {
  font-size: 1.25rem;
  margin: 0 auto 1.5rem;
  text-align: center;
}

.quick-facts, .about-note {
  background: var(--mint);
  border-left: 6px solid var(--coral);
  margin: 2rem auto;
  max-width: 780px;
  padding: 1.5rem 2rem;
}

.continent-page {
  margin: 2rem auto 3rem;
  max-width: 1100px;
  padding: 0 1rem;
}

.continent-chart-card {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(24, 59, 63, 0.08);
  border-radius: 24px;
  box-shadow: 0 16px 40px rgba(24, 59, 63, 0.08);
  padding: 1rem;
}

.continent-species-panel {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(24, 59, 63, 0.08);
  border-radius: 8px;
  margin-top: 1rem;
  padding: 1.25rem;
}

.continent-species-panel h2 {
  font-size: 1.35rem;
  margin: 0 0 0.5rem;
}

.continent-species-panel > p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
  max-width: 76ch;
}

.continent-species-list {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  list-style: decimal;
  margin: 1rem 0 0;
  padding-left: 1.6rem;
}

.continent-species-list li {
  background: rgba(216, 235, 224, 0.55);
  border-top: 3px solid var(--coral);
  min-width: 0;
  padding: 0.75rem;
}

.continent-species-list strong,
.continent-species-list em {
  display: block;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.continent-species-list em {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 0.25rem;
}

.continent-map {
  min-height: 560px;
  width: 100%;
}

.continent-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.1rem;
  padding: 0.4rem 0.75rem 0.8rem;
}

.continent-legend span {
  align-items: center;
  display: inline-flex;
  font-size: 0.9rem;
  font-weight: 600;
  gap: 0.4rem;
}

.continent-legend i {
  background: var(--swatch);
  border-radius: 2px;
  display: inline-block;
  height: 0.8rem;
  width: 0.8rem;
}

.continent-callout,
.continent-source {
  background: var(--mint);
  border-left: 6px solid var(--coral);
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
}

.continent-callout p,
.continent-source p {
  margin: 0;
  line-height: 1.7;
}

.continent-source {
  background: rgba(216, 235, 224, 0.6);
}

.map-error {
  color: var(--ink);
  font-weight: 600;
  padding: 2rem 1rem;
  text-align: center;
}

.venom-page {
  margin: 2rem auto 3rem;
  max-width: 960px;
  padding: 0 1rem;
}

.venom-intro {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.65;
  max-width: 68ch;
}

.venom-selector {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.venom-selector label {
  font-weight: 700;
}

.venom-selector select {
  background: #fffaf0;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  font: inherit;
  max-width: 100%;
  min-height: 2.75rem;
  padding: 0.55rem 2.5rem 0.55rem 0.75rem;
}

.venom-details {
  border-top: 4px solid var(--coral);
  padding: 1.25rem 0 0;
}

.venom-region {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  text-transform: uppercase;
}

.venom-details h2 {
  font-size: 2rem;
  margin: 0 0 1.25rem;
}

.venom-facts {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

.venom-facts h3,
.venom-product h3 {
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
}

.venom-facts p,
.venom-product p,
.venom-sources p {
  line-height: 1.7;
  margin: 0;
}

.venom-product {
  background: rgba(216, 235, 224, 0.6);
  border-left: 5px solid #62a98b;
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
}

.venom-product-scope {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 0.35rem !important;
}

.venom-caution {
  background: #fff0e8;
  border-left: 5px solid var(--coral);
  line-height: 1.65;
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
}

.venom-sources {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 1.5rem;
}

.venom-sources p + p {
  margin-top: 0.5rem;
}

.first-aid-page {
  margin: 2rem auto 3rem;
  max-width: 1120px;
  padding: 0 1rem;
}

.first-aid-intro {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  max-width: 72ch;
}

.first-aid-steps {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.first-aid-step {
  align-items: start;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(24, 59, 63, 0.12);
  border-top: 4px solid var(--coral);
  border-radius: 8px;
  display: grid;
  gap: 1rem;
  grid-template-columns: 96px minmax(0, 1fr);
  padding: 1rem;
}

.first-aid-illustration {
  display: block;
  height: auto;
  width: 96px;
}

.first-aid-step h2 {
  font-size: 1.15rem;
  line-height: 1.25;
  margin: 0 0 0.45rem;
}

.first-aid-step p {
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

.first-aid-step .first-aid-count {
  color: var(--coral);
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

@media (max-width: 760px) {
  .first-aid-steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .first-aid-step {
    gap: 0.75rem;
    grid-template-columns: 72px minmax(0, 1fr);
    padding: 0.85rem;
  }

  .first-aid-illustration {
    width: 72px;
  }
}

.snakebite-page {
  margin: 2rem auto 3rem;
  max-width: 1100px;
  padding: 0 1rem;
}

.snakebite-intro {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.65;
  max-width: 68ch;
}

.snakebite-chart-card {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(24, 59, 63, 0.08);
  border-radius: 24px;
  box-shadow: 0 16px 40px rgba(24, 59, 63, 0.08);
  margin-top: 1.5rem;
  padding: 1rem;
}

.snakebite-chart {
  height: 480px;
  max-width: 100%;
  width: 100%;
}

.snakebite-note,
.snakebite-source {
  background: var(--mint);
  border-left: 6px solid var(--coral);
  line-height: 1.7;
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
}

.snakebite-source {
  background: rgba(216, 235, 224, 0.6);
  font-size: 0.95rem;
}

.snakebite-source p {
  margin: 0;
}

.myths-page {
  margin: 2rem auto 3rem;
  max-width: 820px;
  padding: 0 1rem;
}

.myths-intro {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.7;
  max-width: 68ch;
}

.myth-quiz {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(24, 59, 63, 0.12);
  border-top: 5px solid var(--coral);
  border-radius: 8px;
  margin-top: 1.5rem;
  padding: clamp(1.1rem, 4vw, 2rem);
}

.myth-quiz-topline {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: space-between;
}

.myth-quiz-topline p {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0;
}

.myth-quiz-topline #myth-score {
  color: var(--ink);
}

.myth-progress {
  appearance: none;
  background: var(--mint);
  border: 0;
  border-radius: 99px;
  display: block;
  height: 0.55rem;
  margin: 0.75rem 0 2rem;
  overflow: hidden;
  width: 100%;
}

.myth-progress::-webkit-progress-bar {
  background: var(--mint);
}

.myth-progress::-webkit-progress-value {
  background: #62a98b;
  border-radius: 99px;
}

.myth-progress::-moz-progress-bar {
  background: #62a98b;
  border-radius: 99px;
}

.myth-question-label {
  color: var(--coral);
  font-size: 0.8rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  text-transform: uppercase;
}

.myth-question h2,
.myth-result h2 {
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  line-height: 1.3;
  margin: 0;
  max-width: 34ch;
}

.myth-answer-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.myth-answer-controls button,
.myth-next,
.myth-restart {
  background: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 4px;
  color: var(--paper);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  min-height: 2.8rem;
  padding: 0.65rem 1.2rem;
}

.myth-answer-controls button:hover,
.myth-next:hover,
.myth-restart:hover {
  background: #285a5d;
  border-color: #285a5d;
}

.myth-answer-controls button:focus-visible,
.myth-next:focus-visible,
.myth-restart:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
}

.myth-answer-controls button:disabled {
  cursor: default;
  opacity: 0.68;
}

.myth-feedback {
  border-left: 5px solid #62a98b;
  line-height: 1.65;
  margin: 1.25rem 0 0;
  padding: 0.75rem 1rem;
}

.myth-feedback.is-incorrect {
  border-left-color: var(--coral);
}

.myth-next {
  margin-top: 1rem;
}

.myth-result p {
  color: var(--muted);
  line-height: 1.65;
}

.myth-restart {
  background: transparent;
  color: var(--ink);
}

.myth-restart:hover {
  color: var(--paper);
}

[hidden] {
  display: none !important;
}

@media (max-width: 720px) {
  .snakebite-chart-card {
    padding: 0.5rem;
  }

  .snakebite-chart {
    height: 380px;
  }
}

.snake-explorer {
  background: #f1e7d4;
  margin: 2rem auto;
  max-width: 780px;
  padding: 1.75rem 2rem 2rem;
}

.taxonomy-explorer {
  background:
    radial-gradient(circle at top left, rgba(232, 118, 95, 0.2), transparent 28%),
    linear-gradient(135deg, rgba(17, 52, 55, 0.97), rgba(31, 79, 80, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-left: 8px solid var(--coral);
  border-radius: 24px;
  box-shadow: 0 18px 50px rgba(16, 42, 44, 0.14);
  margin: 2rem auto 3rem;
  max-width: 1050px;
  padding: 1.5rem 2rem 2rem;
  animation: fadeUp 0.7s ease-out;
}

.taxonomy-explorer .explorer-status {
  color: rgba(234, 244, 239, 0.82);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.taxonomy-toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  margin-top: 1rem;
}

.search-controls,
.taxonomy-actions,
.zoom-controls {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.taxonomy-actions button,
.zoom-controls button,
.search-controls button {
  appearance: none;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #edf6f2;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 0.58rem 0.9rem;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.taxonomy-actions button:hover,
.zoom-controls button:hover,
.search-controls button:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.search-controls {
  flex: 1 1 340px;
}

.search-controls input {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(17, 52, 55, 0.12);
  border-radius: 999px;
  box-sizing: border-box;
  color: var(--ink);
  font: inherit;
  min-width: 0;
  padding: 0.8rem 1rem;
  width: min(100%, 420px);
}

.taxonomy-layout {
  align-items: start;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
  margin-top: 1rem;
}

@media (min-width: 820px) {
  .taxonomy-layout {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

@media (max-width: 720px) {
  .continent-species-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .continent-map {
    min-height: 420px;
  }

  .continent-chart-card {
    padding: 0.5rem;
  }
}

.galaxy-section {
  background: linear-gradient(180deg, rgba(15, 41, 44, 0.98), rgba(23, 55, 57, 0.96));
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 28px;
  box-shadow: 0 24px 55px rgba(11, 28, 31, 0.22);
  margin: 2.5rem auto 3rem;
  max-width: 1200px;
  padding: 1.6rem 1.4rem 1.8rem;
}

.galaxy-section h2 {
  color: #edf8f1;
  font-size: clamp(2.1rem, 3vw, 3rem);
  margin: 0 0 0.35rem;
}

.galaxy-intro {
  color: rgba(237, 248, 241, 0.78);
  margin: 0 0 1.25rem;
}

.galaxy-toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.galaxy-search-wrap,
.galaxy-actions,
.galaxy-zoom-controls {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.galaxy-search-wrap {
  flex: 1 1 320px;
}

.galaxy-search-wrap input {
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(15, 41, 44, 0.12);
  border-radius: 999px;
  box-sizing: border-box;
  color: var(--ink);
  font: inherit;
  min-width: 0;
  padding: 0.8rem 1rem;
  width: min(100%, 420px);
}

.galaxy-toolbar button {
  appearance: none;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  color: #edf8f1;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 0.62rem 0.9rem;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.galaxy-toolbar button:hover {
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.28);
  transform: translateY(-1px);
}

.galaxy-legend {
  align-items: center;
  color: rgba(237, 248, 241, 0.72);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.78rem;
  gap: 0.9rem 1.2rem;
  margin: -0.25rem 0 1rem;
}

.galaxy-legend span {
  align-items: center;
  display: inline-flex;
  gap: 0.38rem;
}

.legend-dot {
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 50%;
  display: inline-block;
  height: 0.62rem;
  width: 0.62rem;
}

.legend-root { background: #f0b46e; }
.legend-family { background: #7db599; }
.legend-genus { background: #c1dccb; }
.legend-species { background: #e8f2e9; }

.galaxy-layout {
  align-items: stretch;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 980px) {
  .galaxy-layout {
    grid-template-columns: 2.1fr 0.9fr;
  }
}

.galaxy-viewport {
  background:
    radial-gradient(circle at center, rgba(154, 217, 191, 0.16), rgba(11, 28, 31, 0.88) 35%, rgba(8, 19, 21, 0.98) 100%);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 22px;
  cursor: grab;
  min-height: 620px;
  overflow: hidden;
  position: relative;
}

.galaxy-viewport:active {
  cursor: grabbing;
}

#galaxy-svg {
  display: block;
  height: 100%;
  width: 100%;
}

.galaxy-link {
  stroke: rgba(150, 203, 173, 0.68);
  stroke-width: 1.35;
  transition: opacity 0.22s ease, stroke 0.22s ease;
}

.galaxy-link.is-muted {
  opacity: 0.12;
}

.galaxy-link.is-emphasized {
  stroke: rgba(255, 196, 122, 0.9);
  stroke-width: 2.2;
}

.galaxy-node-group {
  cursor: pointer;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.galaxy-node-group.is-muted {
  opacity: 0.18;
}

.galaxy-node-group.is-emphasized {
  filter: drop-shadow(0 0 10px rgba(255, 201, 133, 0.3));
}

.galaxy-node-core {
  stroke: rgba(255,255,255,0.65);
  stroke-width: 1.5;
  transition: all 0.2s ease;
}

.galaxy-node-group:hover .galaxy-node-core {
  stroke-width: 2;
  transform: scale(1.04);
}

.galaxy-node-label {
  fill: #153b3b;
  font-family: "Space Grotesk", sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  paint-order: stroke fill;
  stroke: rgba(247, 250, 239, 0.92);
  stroke-linejoin: round;
  stroke-width: 3px;
  text-anchor: middle;
}

.galaxy-node-group[data-type="root"] .galaxy-node-label {
  fill: #fffaf0;
  stroke: rgba(99, 57, 38, 0.95);
}

.galaxy-node-group[data-type="family"] .galaxy-node-label {
  fill: #102f2e;
}

.galaxy-node-group[data-type="genus"] .galaxy-node-label,
.galaxy-node-group[data-type="species"] .galaxy-node-label {
  fill: #123837;
}

.galaxy-node-group[data-type="species"] .galaxy-node-label {
  font-size: 8px;
}

.galaxy-node-group[data-type="species"] .galaxy-node-label {
  opacity: 1;
  transition: opacity 0.2s ease;
}

.galaxy-viewport.has-selection .galaxy-node-group[data-type="species"]:not(.is-current) .galaxy-node-label {
  opacity: 0;
}

.galaxy-node-group[data-type="species"].is-current .galaxy-node-label {
  opacity: 1;
}

.galaxy-node-group[data-type="root"] .galaxy-node-core {
  fill: rgba(240, 180, 110, 0.96);
  stroke: rgba(255,255,255,0.8);
}

.galaxy-node-group[data-type="family"] .galaxy-node-core {
  fill: rgba(125, 181, 153, 0.92);
}

.galaxy-node-group[data-type="genus"] .galaxy-node-core {
  fill: rgba(193, 220, 203, 0.94);
}

.galaxy-node-group[data-type="species"] .galaxy-node-core {
  fill: rgba(232, 242, 233, 0.98);
}

.galaxy-node-group[data-selected="true"] .galaxy-node-core {
  stroke: rgba(255, 207, 123, 0.95);
  stroke-width: 2.5;
}

.galaxy-panel {
  background: linear-gradient(180deg, rgba(255, 248, 238, 0.98), rgba(239, 221, 195, 0.9));
  border: 1px solid rgba(17, 52, 55, 0.12);
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 620px;
  padding: 1.2rem;
}

.galaxy-empty {
  color: var(--muted);
  font-style: italic;
  margin: auto 0;
  text-align: center;
}

.galaxy-card {
  display: grid;
  gap: 0.9rem;
}

.galaxy-card h3 {
  font-size: clamp(1.7rem, 2vw, 2.3rem);
  margin: 0;
}

.galaxy-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.galaxy-pill {
  background: linear-gradient(135deg, rgba(24, 59, 63, 1), rgba(35, 97, 99, 1));
  border-radius: 999px;
  color: #f8f5f0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.7rem;
  text-transform: uppercase;
}

.galaxy-common-name {
  color: #32696f;
  font-weight: 700;
  margin: 0;
}

.galaxy-image-wrap {
  background: rgba(17, 52, 55, 0.05);
  border-radius: 16px;
  overflow: hidden;
  padding: 0.45rem;
}

.galaxy-image-wrap img {
  border-radius: 12px;
  display: block;
  height: 220px;
  object-fit: cover;
  width: 100%;
}

.galaxy-image-credit {
  color: rgba(17, 52, 55, 0.7);
  font-size: 0.8rem;
  margin: 0.5rem 0 0;
}

.galaxy-meta {
  display: grid;
  gap: 0.5rem;
  margin: 0;
}

.galaxy-meta div {
  border-top: 1px solid rgba(17, 52, 55, 0.1);
  display: grid;
  gap: 0.2rem;
  padding-top: 0.5rem;
}

.galaxy-meta dt {
  color: rgba(17, 52, 55, 0.65);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.galaxy-meta dd {
  margin: 0;
  font-weight: 700;
}

.story-section {
  background: #f4ead9;
  border-top: 1px solid rgba(24, 59, 63, 0.12);
  margin: 4rem auto 3rem;
  max-width: 1200px;
  padding: 3.5rem clamp(1.2rem, 4vw, 4rem) 4rem;
}

.story-kicker,
.story-label {
  color: var(--coral);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin: 0 0 0.65rem;
  text-transform: uppercase;
}

.story-section h2 {
  color: var(--ink);
  font-size: clamp(2.3rem, 5vw, 5rem);
  line-height: 0.98;
  margin: 0;
  max-width: 12ch;
}

.story-deck {
  color: var(--muted);
  font-size: 1.2rem;
  margin: 1rem 0 2.2rem;
  max-width: 42rem;
}

.story-opening {
  background: #183b3f;
  color: #fffaf0;
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  min-height: 520px;
}

.story-opening-image-wrap {
  min-height: 520px;
  overflow: hidden;
}

.story-opening-copy {
  align-self: end;
  padding: clamp(1.5rem, 4vw, 3.5rem);
}

.story-opening-copy h2 {
  color: #fffaf0;
  font-size: clamp(2.5rem, 5vw, 5rem);
  max-width: 8ch;
}

.story-opening-copy h3 {
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1;
  margin: 1.5rem 0 0.65rem;
}

.story-opening-image-wrap,
.story-opening-copy {
  animation: storyReveal 1s ease-out both;
}

@keyframes storyReveal {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.story-opening-copy .story-label { color: #f0b46e; margin-bottom: 0; }

.story-journey-heading {
  color: var(--muted);
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
  margin: 3.5rem 0 1rem;
}

.story-journey-heading p:last-child { margin: 0; max-width: 26rem; text-align: right; }

.story-journey {
  border-top: 1px solid rgba(24, 59, 63, 0.18);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.story-step {
  border-right: 1px solid rgba(24, 59, 63, 0.18);
  min-height: 165px;
  opacity: 0;
  padding: 1.2rem 1rem 1.2rem 0;
  transform: translateY(18px);
}

.story-step:last-child { border-right: 0; padding-left: 1rem; }
.story-step:not(:first-child) { padding-left: 1rem; }
.story-step.is-visible { animation: fadeUp 0.7s ease-out forwards; }
.story-step-number { color: var(--coral); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; }
.story-step h3 { font-size: 1.55rem; margin: 1rem 0 0.45rem; }
.story-step p { color: var(--muted); font-size: 0.92rem; line-height: 1.5; margin: 0; max-width: 15rem; }

.story-scene:not(.story-scene-opening) {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.story-scene:not(.story-scene-opening).is-active {
  opacity: 1;
  transform: translateY(0);
}

.story-hero {
  align-items: stretch;
  background: #183b3f;
  color: #fffaf0;
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  min-height: 420px;
}

.story-hero-image-wrap {
  min-height: 420px;
  overflow: hidden;
}

.story-hero-image {
  display: block;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  width: 100%;
}

.story-hero-copy {
  align-self: end;
  padding: clamp(1.5rem, 4vw, 3.5rem);
}

.story-hero-copy .story-label {
  color: #f0b46e;
}

.story-hero-copy h3 {
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1;
  margin: 0 0 0.65rem;
}

.story-scientific-name {
  color: #c7dfcf;
  font-family: Georgia, serif;
  font-size: 1.25rem;
  font-style: italic;
  margin: 0;
}

.story-subtitle {
  border-left: 2px solid #f0b46e;
  color: rgba(255, 250, 240, 0.86);
  font-size: 1.1rem;
  margin: 1.5rem 0 0;
  padding-left: 0.85rem;
}

.story-credit {
  color: rgba(255, 250, 240, 0.58);
  font-size: 0.75rem;
  margin: 1.5rem 0 0;
}

.story-path {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin: 2rem 0 3rem;
}

.story-path-node {
  border: 1px solid rgba(24, 59, 63, 0.18);
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.65rem 0.9rem;
}

.story-path-root { background: #f0b46e; }
.story-path-family { background: #9ac9af; }
.story-path-genus { background: #c9dfd0; }
.story-path-species { background: #fffaf0; font-style: italic; }

.story-path-line {
  background: var(--coral);
  height: 1px;
  width: 2rem;
}

.story-layout {
  align-items: start;
  display: grid;
  gap: 3rem;
  grid-template-columns: minmax(0, 1.2fr) minmax(230px, 0.8fr);
  margin-bottom: 3rem;
}

.story-copy {
  color: #35575a;
  font-family: Georgia, serif;
  font-size: 1.08rem;
  line-height: 1.7;
}

.story-copy p { margin: 0 0 1rem; }

.story-facts {
  border-top: 2px solid var(--ink);
  display: grid;
  gap: 0;
}

.story-facts div {
  border-bottom: 1px solid rgba(24, 59, 63, 0.18);
  display: flex;
  justify-content: space-between;
  padding: 0.85rem 0;
}

.story-facts span {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.story-facts strong { color: var(--ink); max-width: 12rem; text-align: right; }

.story-count-visual {
  border-top: 1px solid rgba(24, 59, 63, 0.18);
  margin: 0 0 3rem;
  padding-top: 1rem;
}

.story-count-heading {
  align-items: baseline;
  display: flex;
  justify-content: space-between;
}

.story-count-heading p:last-child { color: var(--muted); font-size: 0.82rem; margin: 0; }

.story-count-row {
  align-items: center;
  display: grid;
  gap: 0.7rem;
  grid-template-columns: minmax(6rem, 0.35fr) 1fr auto;
  margin: 0.75rem 0;
}

.story-count-row > span { color: var(--ink); font-size: 0.85rem; font-weight: 700; }
.story-count-row > strong { color: var(--ink); font-size: 0.85rem; min-width: 3rem; text-align: right; }
.story-count-track { background: rgba(24, 59, 63, 0.1); height: 0.65rem; overflow: hidden; }
.story-count-bar { height: 100%; transition: width 0.9s ease-out; }
.story-family-bar { background: #9ac9af; }
.story-genus-bar { background: var(--coral); }
.story-scene-pattern .story-count-bar { transform: scaleX(0); transform-origin: left; }
.story-scene-pattern.is-active .story-count-bar { transform: scaleX(1); }
.story-pattern-copy { color: var(--ink); font-family: Georgia, serif; font-size: 1.15rem; line-height: 1.5; margin: 1.2rem 0 0; max-width: 48rem; }

.relatives-heading { margin-bottom: 1rem; }
.relatives-heading h3 { font-size: clamp(1.6rem, 3vw, 2.5rem); margin: 0; }

.story-relatives {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
}

.story-relatives-stage {
  background: rgba(255, 250, 240, 0.34);
  border: 1px solid rgba(24, 59, 63, 0.12);
  padding: 1.5rem;
  position: relative;
}

.story-relatives-stage::before {
  border: 1px solid rgba(232, 118, 95, 0.45);
  border-radius: 50%;
  content: "";
  inset: 12% 8%;
  pointer-events: none;
  position: absolute;
}

.story-featured-anchor {
  align-items: center;
  background: #183b3f;
  border: 5px solid #f0b46e;
  border-radius: 50%;
  color: #fffaf0;
  display: flex;
  flex-direction: column;
  height: 148px;
  justify-content: center;
  margin: 0 auto 1.5rem;
  position: relative;
  text-align: center;
  width: 148px;
  z-index: 1;
}

.story-featured-anchor strong { font-family: Georgia, serif; font-size: 0.85rem; padding: 0 1rem; }
.story-featured-dot { color: #f0b46e; font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; }
.story-relatives { position: relative; z-index: 1; }

.story-insight,
.story-ending {
  border-left: 3px solid var(--coral);
  margin: 3rem auto 0;
  max-width: 48rem;
  padding-left: 1.2rem;
}

.story-insight p:last-child,
.story-ending p:last-child { color: var(--ink); font-family: Georgia, serif; font-size: 1.35rem; line-height: 1.45; margin: 0; }
.story-ending { border-left-color: #9ac9af; margin-top: 3.5rem; }

.story-wide-branch {
  align-items: center;
  color: var(--ink);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.88rem;
  font-weight: 700;
  gap: 0.55rem;
  margin: 0 0 1.1rem;
}

.story-wide-branch span,
.story-wide-branch strong {
  background: rgba(216, 235, 224, 0.8);
  border: 1px solid rgba(24, 59, 63, 0.15);
  border-radius: 999px;
  padding: 0.5rem 0.75rem;
}

.story-wide-branch span:first-child { background: #f0b46e; }
.story-wide-branch strong { background: #183b3f; color: #fffaf0; font-style: italic; }
.story-wide-branch i { background: var(--coral); height: 1px; width: 1.5rem; }

.relative-card {
  background: rgba(255, 250, 240, 0.7);
  border: 1px solid rgba(24, 59, 63, 0.12);
  min-width: 0;
  opacity: 0;
  transform: translateY(22px);
}

.story-scene-relatives.is-active .relative-card { animation: fadeUp 0.65s ease-out var(--relative-delay) forwards; }
.story-relatives.is-loaded .relative-card { animation: fadeUp 0.65s ease-out var(--relative-delay) forwards; }

.relative-image-wrap { aspect-ratio: 4 / 3; background: #d8e6da; overflow: hidden; }
.relative-image-wrap img { display: block; height: 100%; object-fit: cover; width: 100%; }
.relative-image-missing { align-items: center; color: var(--muted); display: flex; height: 100%; justify-content: center; }
.relative-copy { padding: 0.9rem 1rem 1.1rem; }
.relative-common { color: var(--coral); font-size: 0.8rem; font-weight: 700; margin: 0 0 0.35rem; }
.relative-copy h4 { font-family: Georgia, serif; font-size: 1.05rem; font-style: italic; margin: 0; overflow-wrap: anywhere; }
.relative-authority { color: var(--muted); font-size: 0.75rem; margin: 0.5rem 0 0; }

@media (max-width: 760px) {
  .story-opening,
  .story-hero,
  .story-layout { grid-template-columns: 1fr; }
  .story-opening-image-wrap { min-height: 360px; }
  .story-journey { grid-template-columns: repeat(2, 1fr); }
  .story-step:nth-child(2) { border-right: 0; }
  .story-step:nth-child(n + 3) { border-top: 1px solid rgba(24, 59, 63, 0.18); }
  .story-journey-heading { display: block; }
  .story-journey-heading p:last-child { margin-top: 0.5rem; text-align: left; }
  .story-hero-copy { align-self: auto; }
  .story-relatives { grid-template-columns: repeat(2, 1fr); }
  .story-path-line { width: 1rem; }
}

@media (max-width: 480px) {
  .story-relatives { grid-template-columns: 1fr; }
}

.taxonomy-viewport {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  cursor: grab;
  min-height: 540px;
  overflow: hidden;
  position: relative;
}

.taxonomy-viewport:active {
  cursor: grabbing;
}

.taxonomy-tree {
  background:
    linear-gradient(180deg, rgba(250, 248, 243, 0.98), rgba(236, 245, 240, 0.96)),
    radial-gradient(circle at top left, rgba(122, 162, 144, 0.12), transparent 42%);
  border: 1px solid rgba(17, 52, 55, 0.12);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 12px 24px rgba(19, 44, 48, 0.08);
  max-height: 540px;
  min-height: 540px;
  overflow-y: auto;
  padding: 1.1rem 1.2rem 1rem;
  position: relative;
  transform-origin: top left;
  transition: transform 0.25s ease;
  animation: floatIn 0.6s ease-out both;
}

.taxonomy-tree::before {
  background: linear-gradient(90deg, rgba(110, 146, 130, 0.2), transparent 40%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.taxonomy-tree details {
  background: rgba(255, 255, 255, 0.2);
  border-left: 2px solid rgba(98, 126, 118, 0.3);
  border-radius: 0 12px 12px 0;
  margin: 0 0 0.7rem 0.2rem;
  padding: 0 0 0 0.8rem;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.taxonomy-tree details::before {
  background: linear-gradient(180deg, rgba(110, 146, 130, 0.5), rgba(110, 146, 130, 0.2));
  border-radius: 999px;
  content: "";
  height: calc(100% - 12px);
  left: -0.12rem;
  position: absolute;
  top: 10px;
  width: 2px;
}

.taxonomy-tree details:hover {
  box-shadow: 0 8px 18px rgba(24, 59, 63, 0.08);
  transform: translateY(-1px);
}

.taxonomy-tree details details {
  margin-left: 0.95rem;
  margin-top: 0.55rem;
}

.taxonomy-tree summary {
  cursor: pointer;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  list-style: none;
  position: relative;
}

.taxonomy-tree summary::-webkit-details-marker {
  display: none;
}

.taxonomy-tree summary::after {
  border-right: 2px solid rgba(17, 52, 55, 0.7);
  border-bottom: 2px solid rgba(17, 52, 55, 0.7);
  content: "";
  height: 8px;
  position: absolute;
  right: 0.35rem;
  top: 0.8rem;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  width: 8px;
}

.taxonomy-tree details[open] > summary::after {
  transform: rotate(225deg);
  top: 0.95rem;
}

.taxonomy-tree ul {
  list-style: none;
  margin: 0.55rem 0 0.1rem 0.2rem;
  padding-left: 0.5rem;
  position: relative;
}

.taxonomy-tree ul::before {
  background: linear-gradient(180deg, rgba(110, 146, 130, 0.38), rgba(110, 146, 130, 0.18));
  content: "";
  left: -0.25rem;
  position: absolute;
  top: 0;
  width: 2px;
  height: 100%;
}

.taxonomy-tree li {
  margin: 0.22rem 0;
  position: relative;
}

.taxonomy-node {
  align-items: center;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(17, 52, 55, 0.08);
  border-radius: 999px;
  box-shadow: 0 10px 20px rgba(17, 52, 55, 0.06);
  color: var(--ink);
  display: inline-flex;
  gap: 0.6rem;
  justify-content: space-between;
  line-height: 1.2;
  padding: 0.5rem 0.8rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.taxonomy-family {
  background: linear-gradient(135deg, rgba(27, 79, 82, 0.96), rgba(48, 107, 101, 0.95));
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 24px rgba(24, 59, 63, 0.14);
  color: #eef8f3;
  font-size: 1rem;
  padding: 0.7rem 1rem;
}

.taxonomy-genus {
  background: linear-gradient(135deg, rgba(222, 237, 226, 0.96), rgba(193, 220, 203, 0.92));
  border-color: rgba(24, 59, 63, 0.1);
  font-size: 0.95rem;
  padding: 0.6rem 0.8rem;
}

.taxonomy-species {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(232, 242, 233, 0.95));
  border-color: rgba(24, 59, 63, 0.08);
  font-size: 0.82rem;
  padding: 0.38rem 0.75rem;
}

.node-label {
  display: inline-block;
  font-weight: 700;
}

.node-meta {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  opacity: 0.8;
  text-transform: uppercase;
}

.taxonomy-species-btn {
  align-items: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(232, 242, 233, 0.95));
  border: 1px solid rgba(17, 52, 55, 0.1);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  justify-content: space-between;
  padding: 0.38rem 0.75rem;
  text-align: left;
  transition: all 0.18s ease-in-out;
}

.taxonomy-species-btn:hover {
  background: linear-gradient(135deg, rgba(232, 118, 95, 0.12), rgba(216, 235, 224, 0.9));
  border-color: rgba(232, 118, 95, 0.5);
  box-shadow: 0 8px 16px rgba(232, 118, 95, 0.14);
  transform: translateX(2px);
}

.taxonomy-species-btn.active {
  background: linear-gradient(135deg, #1b4f52, #183b3f);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 12px 20px rgba(24, 59, 63, 0.28);
  color: #f7f2ea;
  font-weight: 700;
}

.taxonomy-preview {
  background: linear-gradient(180deg, rgba(255, 248, 238, 0.98), rgba(239, 221, 195, 0.9));
  border: 1px solid rgba(17, 52, 55, 0.12);
  border-radius: 22px;
  box-shadow: 0 18px 30px rgba(19, 44, 48, 0.12);
  padding: 1.35rem;
  position: sticky;
  top: 1.5rem;
  animation: floatIn 0.8s ease-out 0.1s both;
}

.taxonomy-placeholder {
  align-items: center;
  background: rgba(17, 52, 55, 0.04);
  border: 1px dashed rgba(17, 52, 55, 0.18);
  border-radius: 16px;
  color: var(--muted);
  display: flex;
  font-style: italic;
  justify-content: center;
  min-height: 245px;
  padding: 1rem;
  text-align: center;
}

.taxonomy-card {
  display: grid;
  gap: 0.8rem;
}

.taxonomy-card h3 {
  font-size: clamp(1.6rem, 2vw, 2rem);
  margin: 0;
}

.tax-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tax-badge {
  background: linear-gradient(135deg, rgba(24, 59, 63, 1), rgba(35, 97, 99, 1));
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  color: #f8f5f0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.7rem;
  text-transform: uppercase;
}

.snake-common-name {
  color: #32696f;
  font-weight: 700;
  margin: 0;
}

.snake-image-panel {
  background: rgba(17, 52, 55, 0.05);
  border-radius: 16px;
  overflow: hidden;
  padding: 0.45rem;
}

.snake-image-panel img {
  border-radius: 12px;
  display: block;
  height: 210px;
  object-fit: cover;
  width: 100%;
}

.image-credit {
  color: rgba(17, 52, 55, 0.72);
  font-size: 0.8rem;
  margin: 0.5rem 0 0;
}

.image-status {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

.tax-link {
  background: linear-gradient(135deg, var(--coral), #f39a6f);
  border-radius: 999px;
  box-shadow: 0 10px 18px rgba(232, 118, 95, 0.22);
  color: #fffdf9;
  display: inline-block;
  font-weight: 700;
  margin-top: 0.4rem;
  padding: 0.7rem 1rem;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
}

.tax-link:hover {
  box-shadow: 0 14px 22px rgba(232, 118, 95, 0.28);
  transform: translateY(-1px);
}

.snake-explorer label {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.snake-explorer input {
  border: 2px solid var(--ink);
  border-radius: 0;
  box-sizing: border-box;
  font: inherit;
  padding: 0.8rem 1rem;
  width: 100%;
}

.search-controls {
  align-items: stretch;
  display: flex;
  gap: 0.6rem;
}

.search-controls input {
  min-width: 0;
}

.search-controls button {
  background: var(--ink);
  border: 2px solid var(--ink);
  color: var(--paper);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 0.8rem 1rem;
  white-space: nowrap;
}

.search-controls button[aria-pressed="true"] {
  background: var(--coral);
  border-color: var(--coral);
}

.explorer-status {
  color: var(--muted);
  font-size: 0.9rem;
}

.snake-result {
  border-top: 1px solid var(--line);
  margin-top: 1.5rem;
  padding-top: 1.25rem;
}

.result-label {
  color: var(--coral);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.snake-result h3 {
  font-size: 1.7rem;
  margin-bottom: 0.25rem;
}

.snake-common-name {
  color: var(--coral);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0.25rem 0;
}

.snake-result a, .bite-estimate a {
  color: var(--ink);
  font-weight: 700;
}

.snake-image-panel {
  margin: 1.25rem 0;
}

.snake-image-panel img {
  display: block;
  max-height: 360px;
  object-fit: cover;
  width: min(100%, 520px);
}

.image-credit, .image-status {
  color: var(--muted);
  font-size: 0.82rem;
}

.bite-estimate {
  border: 2px solid var(--ink);
  margin: 2rem auto 3rem;
  max-width: 780px;
  padding: 1.5rem 2rem;
}

.bite-estimate h3 {
  margin-top: 0;
}

.quick-facts h3, .about-note h3 {
  margin-top: 0;
}

.quick-facts li {
  margin: 0.8rem 0;
}

.callout-warning {
  border-color: var(--coral) !important;
  margin: 3rem auto;
  max-width: 780px;
}

main.content {
  padding-bottom: 4rem;
}

@media (max-width: 600px) {
  .search-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .hero img {
    height: 58vw;
  }

  .quick-facts, .about-note {
    padding: 1.25rem;
  }

  .snake-explorer, .bite-estimate {
    padding: 1.25rem;
  }

  .taxonomy-explorer {
    padding: 1.25rem;
  }
}