.plant-load {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: transparent;
  color: var(--green-deep);
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.plant-load.is-done {
  opacity: 0;
}

.plant-load-card {
  display: grid;
  justify-items: center;
  gap: 0.45rem;
  padding: 1rem 1.25rem 1.05rem;
  border-radius: 1.15rem;
  background: rgba(250, 247, 242, 0.38);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 28px rgba(26, 61, 46, 0.1);
}

.plant-load-wheel {
  width: 5.5rem;
  height: 5.5rem;
  transform: rotate(-90deg);
}

.plant-load-track {
  fill: none;
  stroke: var(--cream-dark);
  stroke-width: 6;
}

.plant-load-value {
  fill: none;
  stroke: var(--green-light);
  stroke-width: 6;
  stroke-linecap: round;
}

.plant-load-pct {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 600;
}

.plant-load-label {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
}

/* Anthurium collector reference */

:root {
  --green-deep: #1a3d2e;
  --green-mid: #2d5a45;
  --green-light: #4a7c59;
  --icon-sage: #a2bfad;
  --green-pale: #e8f0eb;
  --coral: #c94c4c;
  --coral-bright: #e85d5d;
  --coral-soft: #f4a5a5;
  --gold: #c9a84c;
  --cream: #faf7f2;
  --cream-dark: #e4ddd3;
  --cream-button: #c9bdb0;
  --cream-button-hover: #bdb09f;
  --sage-tag-bg: rgba(74, 124, 89, 0.14);
  --sage-tag-text: var(--green-light);
  --morph-tag-bg: rgba(108, 112, 110, 0.16);
  --morph-tag-text: #5e6462;
  --species-tag-bg: rgba(222, 138, 116, 0.12);
  --species-tag-text: #c86a4e;
  --breeder-tag-bg: rgba(201, 168, 76, 0.2);
  --breeder-tag-text: #8a6d1a;
  --hybrid-tag-bg: rgba(107, 76, 154, 0.14);
  --hybrid-tag-text: #5a4080;
  --cross-tag-bg: rgba(90, 120, 140, 0.16);
  --cross-tag-text: #3d5566;
  --text: #1e2a24;
  --text-muted: #5a6b62;
  --shadow: 0 4px 24px rgba(26, 61, 46, 0.08);
  --shadow-lg: 0 12px 48px rgba(26, 61, 46, 0.12);
  --radius: 12px;
  --radius-lg: 20px;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Outfit', system-ui, sans-serif;
  --lede-size: 1.18rem;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1.09375rem;
  font-weight: 400;
  color: var(--text);
  background: var(--cream);
  line-height: 1.6;
  overflow-x: hidden;
}

html {
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  background: rgba(250, 247, 242, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(26, 61, 46, 0.06);
  transition: box-shadow 0.3s ease;
}

.nav.scrolled {
  box-shadow: var(--shadow);
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--green-deep);
  text-decoration: none;
  min-width: 0;
}

.nav-logo span {
  min-width: 0;
  line-height: 1.1;
}

.nav-logo-icon {
  display: block;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 1.1rem 1.5rem;
  list-style: none;
}

.nav-links a,
.nav-dropdown-label {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-dropdown-label:hover {
  color: var(--coral);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-heading {
  display: contents;
}

.nav-dropdown-toggle {
  display: none;
}

.nav-dropdown-label {
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: none;
  background: none;
  font-family: inherit;
  cursor: pointer;
  line-height: inherit;
}

.nav-dropdown-label::after {
  content: '';
  display: inline-block;
  width: 0.4rem;
  height: 0.4rem;
  margin-left: 0.35rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-0.15rem) rotate(45deg);
  vertical-align: middle;
}

.nav-dropdown-menu {
  list-style: none;
  margin: 0;
  padding: 0.65rem 0 0.5rem;
  min-width: 11.5rem;
  max-height: calc(100vh - 5.5rem);
  overflow-y: auto;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border: 1px solid rgba(26, 61, 46, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 120;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%);
}

.nav-dropdown.is-closed .nav-dropdown-menu,
.nav-dropdown.is-closed:hover .nav-dropdown-menu,
.nav-dropdown.is-closed:focus-within .nav-dropdown-menu {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.45rem 1rem;
  font-size: 0.95rem;
  white-space: nowrap;
}

.nav-dropdown-menu a:hover {
  color: var(--green-deep);
  background: var(--green-pale);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 0;
  border: 0;
  border-top: 2px solid var(--green-deep);
  background: none;
  flex-shrink: 0;
  transform-origin: center;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-close {
  display: none;
}

/* Hero */
.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  align-items: center;
  padding: 7rem 2rem 4rem;
  max-width: 1180px;
  margin: 0 auto;
  gap: 0.65rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 82% 35%, rgba(201, 76, 76, 0.07) 0%, transparent 55%),
    radial-gradient(ellipse 55% 45% at 15% 75%, rgba(45, 90, 69, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 42ch;
}

.hero-eyebrow {
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-light);
  margin-bottom: 1rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.35rem, 4.6vw, 3.75rem);
  font-weight: 600;
  line-height: 1.1;
  color: var(--green-deep);
  margin-bottom: 1.25rem;
}

.hero-tagline {
  font-size: var(--lede-size);
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 100%;
  margin-bottom: 1.15rem;
  font-weight: 300;
}

.hero-tagline a {
  color: inherit;
  transition: color 0.2s ease;
}

.hero-tagline a:hover {
  color: var(--coral);
}

.btn {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 999px;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

a.btn-primary,
.btn-primary {
  background: var(--coral);
  color: #fff;
  box-shadow: 0 4px 16px rgba(201, 76, 76, 0.3);
}

a.btn-primary:hover,
.btn-primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(201, 76, 76, 0.35);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-start;
}

.hero-last-updated {
  font-size: 0.92rem;
  color: var(--text-muted);
  opacity: 0.85;
  margin-top: 1.25rem;
  font-weight: 300;
}

.hero-last-updated time {
  font-weight: 400;
}

.btn-secondary {
  background: transparent;
  color: var(--green-deep);
  border: 2px solid rgba(26, 61, 46, 0.2);
}

.btn-secondary:hover {
  border-color: var(--coral);
  color: var(--coral);
  transform: translateY(-2px);
}

.section-jumps {
  margin-top: 0.75rem;
  font-size: 0.95rem;
}

.section-jumps a {
  font-weight: 600;
  color: var(--coral);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.section-jumps a:hover {
  color: var(--green-deep);
}

/* Hero illustration */
.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 600px;
}

.hero-illustration {
  display: block;
  width: min(552px, 100%);
  height: auto;
  animation: float 7s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-10px) rotate(1deg); }
}

/* Sections */
.section {
  padding: 5.5rem 2rem;
  scroll-margin-top: 5rem;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: 2.5rem;
  scroll-margin-top: 5rem;
}

.section-label {
  display: block;
  font-size: 1.09rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 0.65rem;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  font-weight: 600;
  color: var(--green-deep);
}

.section-desc {
  margin-top: 0.85rem;
  color: var(--text-muted);
  max-width: 58ch;
  font-weight: 300;
  font-size: var(--lede-size);
  line-height: 1.55;
}

/* Taxonomy filters */
.taxonomy-submit-cta {
  margin: 0 0 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}

.taxonomy-submit-note {
  margin: 0;
  max-width: 58ch;
  color: var(--text-muted);
  font-weight: 300;
  line-height: 1.55;
}

.taxonomy-filters {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  background: var(--cream-dark);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(26, 61, 46, 0.08);
  scroll-margin-top: 5rem;
}

.taxonomy-search {
  display: grid;
  gap: 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid rgba(26, 61, 46, 0.08);
  margin-bottom: 0.25rem;
}

.taxonomy-search-row {
  margin-bottom: 0;
}

.taxonomy-search-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-deep);
}

.taxonomy-search-input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(26, 61, 46, 0.15);
  background: white;
  color: var(--green-deep);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.taxonomy-search-input::placeholder {
  color: var(--text-muted);
  opacity: 0.75;
}

.taxonomy-search-input:hover {
  border-color: rgba(26, 61, 46, 0.25);
}

.taxonomy-search-input:focus {
  outline: none;
  border-color: var(--green-mid);
  box-shadow: 0 0 0 3px rgba(45, 90, 69, 0.12);
}

.taxonomy-photo-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-top: 0.55rem;
}

.taxonomy-photo-filter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}

.filter-see-results-button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.8rem;
  border: none;
  border-radius: 999px;
  background: #fff;
  color: var(--green-deep);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none;
  outline: none;
  transition: background 0.2s, color 0.2s;
}

.filter-see-results-button:hover {
  background: #6e8b7c;
  color: #fff;
}

.filter-see-results-arrow {
  display: inline-block;
  font-size: 1.2rem;
  line-height: 1;
  transform: rotate(90deg);
}

.taxonomy-photo-filter input {
  accent-color: var(--green-mid);
  width: 1rem;
  height: 1rem;
  margin: 0;
  cursor: pointer;
}

.filter-dimension {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 0.75rem 1rem;
  align-items: start;
}

.filter-dimension-collapsible {
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.filter-dimension-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem 1rem;
  align-items: center;
}

.filter-dimension-heading {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.filter-dimension-heading .filter-dimension-label {
  padding-top: 0;
}

.filter-dimension-controls {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.filter-dimension-summary {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.filter-dimension-summary.has-selection {
  color: var(--green-deep);
  font-weight: 700;
}

.filter-plants-toggle {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  border: none;
  background: #fff;
  color: var(--green-deep);
  cursor: pointer;
  box-shadow: none;
  outline: none;
  transition: background 0.2s, color 0.2s;
}

.filter-plants-toggle:hover {
  background: #6e8b7c;
  color: #fff;
}

.filter-plants-toggle::after {
  content: '';
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s;
}

.filter-plants-toggle.is-open::after {
  transform: rotate(-135deg) translateY(-1px);
}

.filter-dimensions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.filter-dimensions[hidden] {
  display: none;
}

.filter-dimension-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  border: 0;
  background: var(--cream-button);
  color: var(--green-deep);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
  text-align: left;
}

.filter-dimension-toggle::after {
  content: '';
  width: 0.4rem;
  height: 0.4rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.filter-dimension-toggle:hover,
.filter-dimension-toggle[aria-expanded="true"]:hover {
  background: var(--cream-button-hover);
}

.filter-dimension-toggle[aria-expanded="true"] {
  background: var(--cream-button);
  color: var(--green-deep);
}

.filter-dimension-toggle[aria-expanded="true"]::after {
  transform: rotate(-135deg);
}

.filter-dimension-clear {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  flex-shrink: 0;
  transition: color 0.2s;
}

.filter-dimension-clear:hover {
  color: var(--coral);
}

.filter-dimension-clear[hidden] {
  display: none;
}

.filter-see-results {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0;
  border: 0;
  background: none;
  color: var(--green-mid);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  flex-shrink: 0;
  transition: color 0.2s;
}

.filter-see-results:hover,
.filter-see-results:focus-visible {
  color: var(--green-deep);
}

.filter-see-results:focus-visible {
  outline: 2px solid var(--green-mid);
  outline-offset: 2px;
}

.filter-dimension-collapsible.is-collapsed > .filter-dimension-chips {
  display: none !important;
}

.filter-dimension-collapsible.is-expanded > .filter-dimension-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding-top: 0.15rem;
}

.filter-dimension-hint {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--green-deep);
  padding: 0.65rem 0.85rem;
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(26, 61, 46, 0.1);
}

.filter-dimension-hint[hidden] {
  display: none !important;
}

.filter-dimension-hint-item + .filter-dimension-hint-item {
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(26, 61, 46, 0.07);
}

.filter-dimension-hint-item strong {
  color: var(--green-deep);
  font-weight: 600;
}

#characteristics-filter-hint,
#morphology-filter-hint {
  color: var(--green-mid);
  background: var(--cream);
  border: none;
  width: fit-content;
  max-width: 100%;
  justify-self: start;
}

#characteristics-filter-hint .filter-dimension-hint-item strong,
#morphology-filter-hint .filter-dimension-hint-item strong {
  color: var(--green-mid);
  font-weight: 600;
}

#characteristics-filter-hint .filter-dimension-hint-item + .filter-dimension-hint-item,
#morphology-filter-hint .filter-dimension-hint-item + .filter-dimension-hint-item {
  border-top-color: rgba(45, 90, 69, 0.14);
}

.filter-dimension-hint-dark {
  background: var(--green-mid);
  color: white;
  border: none;
  width: fit-content;
  max-width: 100%;
  justify-self: start;
}

#species-filter-hint .filter-dimension-hint-name,
#named-hybrid-filter-hint .filter-dimension-hint-name,
#cross-direction-filter-hint .filter-dimension-hint-name,
#breeder-filter-hint .filter-dimension-hint-name {
  font-weight: 400;
}

.filter-dimension-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green-deep);
  padding-top: 0.45rem;
}

.filter-dimension-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.filter-dimension-species .filter-chip,
.filter-dimension-cross-direction .filter-chip,
.filter-dimension-breeder .filter-chip,
.filter-dimension-named-hybrid .filter-chip,
.filter-dimension-morphology .filter-chip {
  font-size: 0.82rem;
  padding: 0.4rem 0.75rem;
}

.tax-badge.tax-breeder {
  font-size: 0.68rem;
}

.group-card-header h3 em {
  font-style: italic;
  font-weight: 400;
  color: var(--text-muted);
}

.filter-reset {
  display: inline-flex;
  align-items: center;
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.filter-reset:hover {
  color: var(--coral);
}

.filter-reset[hidden] {
  display: none;
}

.filter-result-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1.25rem;
  flex-wrap: wrap;
  background: var(--cream-dark);
  color: var(--green-deep);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(26, 61, 46, 0.08);
  padding: 0.75rem 1.25rem;
  margin-bottom: 1.25rem;
  scroll-margin-top: 5rem;
}

.back-to-filters {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.875rem;
  height: 3.875rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(45, 90, 69, 0.38);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  box-shadow: 0 8px 24px rgba(26, 61, 46, 0.12);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.page-float-tools {
  position: fixed;
  /* Stay clear of the right-edge menu tab on mid-width screens */
  right: max(5rem, calc((100vw - 1120px) / 4 - 2rem + 0.75in));
  top: 70%;
  z-index: 120;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  transform: translateY(-50%);
}

.page-float-tools[hidden] {
  display: none;
}

.page-float-menu {
  position: fixed;
  right: 0;
  top: 70%;
  z-index: 120;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  width: 3.5rem;
  height: 16.75rem;
  padding: 0.45rem 0.28rem 0.45rem 0.32rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-right: none;
  border-radius: 1.15rem 0 0 1.15rem;
  background: rgba(45, 90, 69, 0.38);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: -6px 8px 24px rgba(26, 61, 46, 0.12);
  transform: translateY(-50%);
}

.page-float-menu[hidden] {
  display: none;
}

.page-float-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.7rem;
  height: 2.7rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.page-float-btn svg {
  display: block;
  width: 30px;
  height: 30px;
}

.back-to-filters:hover,
.back-to-filters:focus-visible {
  background: rgba(45, 90, 69, 0.55);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(26, 61, 46, 0.28);
}

.page-float-btn:hover,
.page-float-btn:focus-visible {
  background: rgba(255, 255, 255, 0.2);
}

.page-float-btn:focus-visible,
.back-to-filters:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.page-float-btn[aria-pressed="true"],
.page-float-btn[aria-expanded="true"] {
  background: #3f6b52;
  color: #fff;
}

.page-float-btn[aria-pressed="true"]:hover,
.page-float-btn[aria-pressed="true"]:focus-visible,
.page-float-btn[aria-expanded="true"]:hover,
.page-float-btn[aria-expanded="true"]:focus-visible {
  background: #355a46;
  color: #fff;
}

.float-search-popup {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 130;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: min(17rem, calc(100vw - 1.5rem));
  padding: 0.42rem 0.5rem 0.42rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  /* Bright but muted tint of the side menu's sage (45, 90, 69) */
  background: rgba(225, 235, 228, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 22px rgba(26, 61, 46, 0.16);
  animation: filter-match-pop 0.18s ease-out;
}

.float-search-popup[hidden] {
  display: none;
}

.float-search-icon {
  flex: 0 0 auto;
  width: 1.05rem;
  height: 1.05rem;
  color: rgba(26, 61, 46, 0.74);
}

.float-search-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.1rem 0;
  border: none;
  background: transparent;
  color: var(--green-deep);
  font-family: var(--font-body);
  font-size: 0.92rem;
  line-height: 1.3;
}

.float-search-input::placeholder {
  color: rgba(26, 61, 46, 0.72);
}

.float-search-input:focus {
  outline: none;
}

.float-search-count {
  flex: 0 0 auto;
  color: rgba(26, 61, 46, 0.86);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.float-search-close {
  flex: 0 0 auto;
  display: grid;
  width: 1.5rem;
  height: 1.5rem;
  place-items: center;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(26, 61, 46, 0.14);
  color: var(--green-deep);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.float-search-close:hover,
.float-search-close:focus-visible {
  background: rgba(26, 61, 46, 0.26);
}

.page-float-btn:disabled {
  opacity: 0.38;
  cursor: default;
}

.page-float-btn:disabled:hover,
.page-float-btn:disabled:focus-visible {
  background: transparent;
  outline: none;
}

.page-float-btn#float-list-toggle {
  position: relative;
}

.float-list-badge {
  position: absolute;
  top: -0.15rem;
  right: -0.1rem;
  display: grid;
  min-width: 1.05rem;
  height: 1.05rem;
  place-items: center;
  padding: 0 0.22rem;
  border-radius: 999px;
  background: #e8d5a3;
  color: #1a3d2e;
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1;
}

.float-list-badge[hidden] {
  display: none;
}

.float-list-panel {
  position: fixed;
  z-index: 130;
  display: flex;
  flex-direction: column;
  width: min(17.5rem, calc(100vw - 4.5rem));
  max-height: min(28rem, calc(100vh - 2rem));
  padding: 0.7rem 0.7rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 1.1rem;
  background: rgba(225, 235, 228, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 22px rgba(26, 61, 46, 0.16);
  animation: filter-match-pop 0.18s ease-out;
}

.float-list-panel[hidden] {
  display: none;
}

.float-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.float-list-title {
  margin: 0;
  color: var(--green-deep);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
}

.float-list-header-actions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.float-list-bookmark {
  display: grid;
  width: 1.6rem;
  height: 1.6rem;
  place-items: center;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(26, 61, 46, 0.14);
  color: var(--green-deep);
  text-decoration: none;
  cursor: pointer;
}

.float-list-bookmark:hover,
.float-list-bookmark:focus-visible {
  background: rgba(26, 61, 46, 0.26);
}

.float-list-bookmark[aria-disabled="true"] {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}

.float-list-bookmark svg {
  display: block;
}

.float-list-close {
  display: grid;
  width: 1.6rem;
  height: 1.6rem;
  place-items: center;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(26, 61, 46, 0.14);
  color: var(--green-deep);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}

.float-list-close:hover,
.float-list-close:focus-visible {
  background: rgba(26, 61, 46, 0.26);
}

.float-list-empty {
  margin: 0.25rem 0 0.55rem;
  color: rgba(26, 61, 46, 0.72);
  font-size: 0.82rem;
  line-height: 1.35;
}

.float-list-empty[hidden] {
  display: none;
}

.float-list-items {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.4rem;
  min-height: 0;
  max-height: 16rem;
  margin: 0 0 0.65rem;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.float-list-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.28rem 0.3rem;
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.55);
}

.float-list-thumb {
  flex: 0 0 auto;
  width: 2.4rem;
  height: 2.4rem;
  object-fit: cover;
  border-radius: 0.4rem;
  background: rgba(26, 61, 46, 0.08);
}

.float-list-thumb--empty {
  display: grid;
  place-items: center;
  color: rgba(26, 61, 46, 0.4);
}

.float-list-name {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--green-deep);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.25;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.float-list-remove {
  flex: 0 0 auto;
  display: grid;
  width: 1.45rem;
  height: 1.45rem;
  place-items: center;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(26, 61, 46, 0.12);
  color: var(--green-deep);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.float-list-remove:hover,
.float-list-remove:focus-visible {
  background: rgba(26, 61, 46, 0.24);
}

.float-list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.float-list-action {
  flex: 1 1 auto;
  padding: 0.38rem 0.55rem;
  border: none;
  border-radius: 999px;
  background: #3f6b52;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.float-list-action:hover,
.float-list-action:focus-visible {
  background: #355a46;
}

.float-list-action:disabled {
  opacity: 0.4;
  cursor: default;
}

.float-list-action--quiet {
  background: rgba(26, 61, 46, 0.12);
  color: var(--green-deep);
}

.float-list-action--quiet:hover,
.float-list-action--quiet:focus-visible {
  background: rgba(26, 61, 46, 0.2);
}

.float-list-status {
  margin: 0.45rem 0 0;
  color: var(--green-deep);
  font-size: 0.78rem;
  line-height: 1.35;
}

.float-list-status[hidden] {
  display: none;
}

.icon-button-list {
  color: var(--icon-sage);
}

.icon-button-list svg {
  display: block;
  width: 100%;
  height: 100%;
}

.icon-button-list[aria-pressed="true"] {
  background: rgba(74, 124, 89, 0.28);
}

.filter-match-popup {
  position: fixed;
  z-index: 160;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  max-width: calc(100vw - 1.5rem);
  padding: 0.5rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  background: rgba(188, 214, 192, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--green-deep);
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(26, 61, 46, 0.12);
  animation: filter-match-pop 0.18s ease-out;
}

.filter-match-popup::before {
  content: '';
  position: absolute;
  top: -6px;
  left: var(--caret-x, 50%);
  width: 0;
  height: 0;
  border: 6px solid transparent;
  border-bottom-color: rgba(188, 214, 192, 0.96);
  transform: translateX(-50%);
  pointer-events: none;
}

.filter-match-popup.is-above::before {
  top: auto;
  bottom: -6px;
  border-bottom-color: transparent;
  border-top-color: rgba(188, 214, 192, 0.96);
}

.filter-match-popup.is-empty {
  background: rgba(240, 176, 176, 0.92);
  color: #7a3030;
}

.filter-match-popup.is-empty::before {
  border-bottom-color: rgba(240, 176, 176, 0.96);
}

.filter-match-popup.is-empty.is-above::before {
  border-bottom-color: transparent;
  border-top-color: rgba(240, 176, 176, 0.96);
}

.filter-match-popup:hover {
  background: rgb(176, 208, 182);
}

.filter-match-popup.is-empty:hover {
  background: rgb(236, 164, 164);
}

.filter-match-popup:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.filter-match-popup[hidden] {
  display: none;
}

@keyframes filter-match-pop {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.back-to-filters[hidden] {
  display: none;
}

.back-to-filters-icon {
  display: block;
  filter: drop-shadow(0 1px 1px rgba(26, 61, 46, 0.35));
}

.filter-result-count {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--green-deep);
  margin: 0;
  min-height: 1.45em;
}

.filter-result-status {
  display: flex;
  align-items: baseline;
  gap: 0.75rem 1rem;
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: wrap;
}

.filter-chip {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: none;
  background: white;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.filter-chip:hover {
  background: rgba(45, 90, 69, 0.08);
  color: var(--green-deep);
}

.filter-chip.active,
.filter-chip.active:hover {
  background: var(--green-mid);
  color: #fff;
}

/* Group cards */
.groups {
  background: white;
}

.group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  scroll-margin-top: 5rem;
}

.group-card {
  background: var(--cream);
  border: 1px solid rgba(26, 61, 46, 0.08);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: opacity 0.35s, transform 0.35s, box-shadow 0.25s;
}

.group-card.has-photo {
  padding-top: 0;
}

.card-photo {
  margin: 0 -1.75rem 1rem;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
}

.card-photo-viewport {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  width: 100%;
  min-width: 0;
  background: rgba(26, 61, 46, 0.06);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.card-photo-viewport::-webkit-scrollbar {
  display: none;
}

.card-photo-track {
  display: flex;
  height: 100%;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  transition: transform 0.35s ease;
}

.card-photo-track img {
  flex: 0 0 100%;
  min-width: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.card-photo-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 999px;
  background: rgba(253, 249, 246, 0.68);
  color: var(--green-deep);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(26, 61, 46, 0.15);
  transition: background 0.2s, opacity 0.2s;
}

.card-photo-nav:hover:not(:disabled) {
  background: white;
}

.card-photo-nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.card-photo-prev {
  left: 0.65rem;
}

.card-photo-next {
  right: 0.65rem;
}

.card-photo-footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.4rem 0.85rem 0;
}

.card-photo-caption {
  margin: 0;
  min-width: 0;
  font-size: 0.72rem;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.card-photo-caption a {
  color: var(--green-deep);
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.card-photo-caption a:hover {
  color: var(--coral);
}

.card-photo-counter {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.card-photo.is-single-photo .card-photo-nav,
.card-photo.is-single-photo .card-photo-counter {
  display: none;
}

.group-card:hover {
  box-shadow: var(--shadow);
}

.group-card.hidden {
  display: none;
}

.group-card.featured {
  border-color: rgba(201, 76, 76, 0.25);
  background: linear-gradient(135deg, #fdf9f6 0%, var(--cream) 100%);
}

.card-taxonomy {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.tax-badge {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  cursor: pointer;
  transition: filter 0.15s ease, box-shadow 0.15s ease;
}

.tax-badge:hover {
  filter: brightness(0.92);
}

.tax-badge:focus-visible {
  outline: 2px solid var(--green-mid);
  outline-offset: 2px;
}

.tax-char { background: var(--sage-tag-bg); color: var(--sage-tag-text); }

.tax-species { background: var(--species-tag-bg); color: var(--species-tag-text); }
.tax-breeder { background: var(--breeder-tag-bg); color: var(--breeder-tag-text); }
.tax-morph { background: var(--morph-tag-bg); color: var(--morph-tag-text); }
.tax-hybrid { background: var(--hybrid-tag-bg); color: var(--hybrid-tag-text); }
.tax-cross { background: var(--cross-tag-bg); color: var(--cross-tag-text); }
.tax-photo { background: rgba(74, 124, 89, 0.14); color: var(--green-mid); }

#common-unnamed-crosses {
  scroll-margin-top: 5rem;
}

.group-section-divider {
  grid-column: 1 / -1;
  border: 2px solid rgba(90, 120, 140, 0.28);
  background: linear-gradient(135deg, #eef4f8 0%, #f8fafb 50%, var(--cream) 100%);
  padding: 2rem 2.25rem;
}

.group-section-divider h3 {
  font-size: 1.85rem;
}

.group-section-divider .group-lead {
  max-width: 72ch;
}

.group-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
}

.group-card-header {
  margin-bottom: 0.85rem;
}

.group-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--coral);
  background: rgba(201, 76, 76, 0.1);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.group-card h3 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: var(--green-deep);
}

.group-lead {
  font-size: 1.02rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  font-weight: 300;
}

.group-lead strong {
  color: var(--green-deep);
  font-weight: 500;
}

.group-lead a {
  color: var(--green-light);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.group-lead a:hover {
  color: var(--green-deep);
}

.group-known-for {
  font-size: 0.88rem;
  color: var(--text);
  margin: -0.65rem 0 1.25rem;
  padding: 0.6rem 0.85rem;
  background: rgba(45, 90, 69, 0.06);
  border-left: 3px solid var(--green-light);
  border-radius: 0 6px 6px 0;
  line-height: 1.5;
}

.group-known-for strong {
  font-weight: 600;
  color: var(--green-mid);
}

.group-card.taxonomy-reference .group-known-for {
  font-size: 0.82rem;
  margin: -0.5rem 0 1rem;
  padding: 0.45rem 0.75rem;
  background: rgba(90, 107, 98, 0.08);
  border-left-color: var(--text-muted);
}

.group-details {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.group-details dt {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-light);
  margin-bottom: 0.2rem;
}

.group-details dd {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 300;
  margin: 0;
}

.group-details em {
  font-style: italic;
  color: var(--green-deep);
}

.group-examples {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.group-examples li {
  font-size: 0.78rem;
  background: white;
  border: 1px solid rgba(26, 61, 46, 0.1);
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  color: var(--text-muted);
}

/* Nomenclature */
.nomenclature {
  background: var(--green-deep);
  color: white;
}

.nomenclature .section-label {
  color: var(--coral-soft);
}

.nomenclature .section-header h2 {
  color: white;
}

.nomenclature .section-desc {
  color: rgba(255, 255, 255, 0.75);
}

.nom-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.nom-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  scroll-margin-top: 5rem;
}

.nom-card h3 {
  font-family: var(--font-display);
  font-size: 1.48rem;
  margin: 0 0 0.35rem;
}

.nom-card p {
  font-size: 1.02rem;
  opacity: 0.85;
  font-weight: 300;
  margin: 0;
  line-height: 1.55;
}

.nom-card strong {
  color: var(--coral-soft);
  font-weight: 500;
}

.nom-example {
  display: block;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.8rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  color: var(--gold);
  word-break: break-word;
}

.nom-grid + .nom-grid {
  margin-top: 1.5rem;
}

.nom-card a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.nom-card a:hover {
  color: var(--coral-soft);
}

/* Care */
.care {
  background: var(--cream-dark);
}

.care-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.care-card {
  background: white;
  padding: 1.75rem 1.85rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: transform 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.care-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.care-type {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--coral);
  margin: 0 0 0.35rem;
}

.care-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--green-deep);
  margin: 0 0 0.5rem;
}

.care-card p {
  font-size: 1.05rem;
  color: var(--text-muted);
  font-weight: 300;
  margin: 0;
  line-height: 1.55;
}

.care-subsection {
  margin-top: 2.75rem;
  padding-top: 2.25rem;
  border-top: 1px solid rgba(26, 61, 46, 0.1);
  scroll-margin-top: 5rem;
}

.care-subsection .section-header .care-type {
  font-size: 1.09rem;
  margin-bottom: 0.65rem;
}

.care-subsection .section-header h2 {
  font-size: 1.65rem;
}

.care-subsection-lead {
  margin-top: 0.85rem;
  color: var(--text-muted);
  max-width: 58ch;
  font-weight: 300;
  font-size: var(--lede-size);
  line-height: 1.55;
  margin-bottom: 0;
}

.care-subsection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.care-note-block {
  background: white;
  padding: 1.5rem 1.65rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.care-note-block h4 {
  font-family: var(--font-display);
  font-size: 1.725rem;
  color: var(--green-deep);
  margin: 0 0 0.75rem;
}

.care-note-block p {
  font-size: 1.05rem;
  color: var(--text-muted);
  font-weight: 300;
  line-height: 1.58;
  margin: 0 0 0.85rem;
}

.care-note-block p:last-child {
  margin-bottom: 0;
}

.care-note-block a {
  color: var(--green-mid);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.care-note-block a:hover {
  color: var(--green-deep);
}

.care-note-block--compare {
  grid-column: 1 / -1;
}

.care-compare-list {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 1.05rem;
  color: var(--text-muted);
  font-weight: 300;
  line-height: 1.58;
}

.care-compare-list li + li {
  margin-top: 0.75rem;
}

.care-compare-list strong {
  color: var(--green-deep);
  font-weight: 600;
}

/* Glossary */
.glossary {
  background: white;
}

.glossary-search {
  margin-top: 1.15rem;
  max-width: 28rem;
}

.glossary-search-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-deep);
}

.glossary-search-input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(26, 61, 46, 0.15);
  background: white;
  color: var(--green-deep);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.glossary-search-input::placeholder {
  color: var(--text-muted);
  opacity: 0.75;
}

.glossary-search-input:hover {
  border-color: rgba(26, 61, 46, 0.25);
}

.glossary-search-input:focus {
  outline: none;
  border-color: var(--green-mid);
  box-shadow: 0 0 0 3px rgba(45, 90, 69, 0.12);
}

.glossary-empty {
  margin: 0 0 0.75rem;
  color: var(--text-muted);
  font-weight: 300;
}

.glossary-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(26, 61, 46, 0.1);
  margin-top: 0.5rem;
}

.glossary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.02rem;
}

.glossary-table th,
.glossary-table td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--cream-dark);
}

.glossary-table th {
  background: var(--green-pale);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-deep);
}

.glossary-table tbody tr:last-child td {
  border-bottom: none;
}

.glossary-table tbody tr:hover {
  background: var(--cream);
}

.glossary-table td:first-child {
  white-space: nowrap;
  color: var(--green-deep);
}

.glossary-table em {
  font-style: italic;
}

@media (max-width: 560px) {
  .section-label,
  .care-subsection .section-header .care-type {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
  }

  .section-header h2 {
    font-size: 1.8rem;
  }

  .section-desc,
  .care-subsection-lead,
  .hero-tagline {
    font-size: var(--lede-size);
  }

  .care-subsection .section-header h2 {
    font-size: 1.45rem;
  }

  .glossary.section {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .glossary-table-wrap {
    max-width: 100%;
    overflow-x: hidden;
  }

  .glossary-table {
    width: 100%;
    max-width: 100%;
    font-size: 0.86rem;
    table-layout: fixed;
  }

  .glossary-table th,
  .glossary-table td {
    padding: 0.5rem 0.3rem;
    vertical-align: top;
    min-width: 0;
    max-width: 0;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
  }

  .glossary-table th {
    font-size: 0.64rem;
    letter-spacing: 0.05em;
  }

  .glossary-table td:first-child {
    white-space: normal;
  }

  .glossary-table th:nth-child(1),
  .glossary-table td:nth-child(1) {
    width: 16%;
  }

  .glossary-table th:nth-child(2),
  .glossary-table td:nth-child(2) {
    width: 26%;
  }

  .glossary-table th:nth-child(3),
  .glossary-table td:nth-child(3) {
    width: 58%;
  }
}

/* Footer */
.footer {
  background: var(--green-deep);
  color: rgba(255, 255, 255, 0.8);
  padding: 2.75rem 2rem;
  text-align: center;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: white;
  margin-bottom: 0.4rem;
}

.footer-copy {
  font-size: 0.92rem;
  margin-bottom: 0.75rem;
}

.footer-note {
  font-size: 0.78rem;
  opacity: 0.6;
  max-width: 50ch;
  margin: 0 auto;
}

.footer-links {
  margin: 0 0 0.9rem;
  font-size: 0.92rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: #fff;
}

/* Nav collapses before links wrap */
@media (max-width: 960px) {
  .nav-toggle {
    display: flex;
  }

  .nav-toggle span {
    width: 28px;
  }

  .nav-toggle[aria-expanded="false"] span {
    opacity: 1;
    transform: none;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 260px;
    height: 100vh;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: stretch;
    background: var(--green-deep);
    padding: 5rem 2rem 2rem;
    gap: 1.25rem;
    box-shadow: -4px 0 32px rgba(0, 0, 0, 0.22);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    z-index: 110;
  }

  .nav-links a,
  .nav-dropdown-label {
    color: rgba(250, 247, 242, 0.92);
  }

  .nav-links a:hover,
  .nav-dropdown-label:hover {
    color: var(--coral-soft);
  }

  .nav-links > li {
    width: 100%;
  }

  .nav-links > li.nav-drawer-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: auto;
    margin: 0;
    padding: 0;
    z-index: 1;
  }

  .nav-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    padding: 0;
    border: 1px solid rgba(250, 247, 242, 0.35);
    border-radius: 50%;
    background: transparent;
    color: rgba(250, 247, 242, 0.92);
    font-size: 1.45rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  }

  .nav-close:hover {
    color: var(--coral-soft);
    border-color: rgba(244, 165, 165, 0.55);
    background: rgba(250, 247, 242, 0.08);
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-dropdown {
    width: 100%;
  }

  .nav-dropdown-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
  }

  .nav-dropdown-label::after {
    display: none;
  }

  .nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 2rem;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid rgba(250, 247, 242, 0.32);
    border-radius: 0.35rem;
    background: transparent;
    color: rgba(250, 247, 242, 0.92);
    cursor: pointer;
  }

  .nav-dropdown-toggle::before {
    content: '';
    width: 0.42rem;
    height: 0.42rem;
    margin-top: -0.15rem;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
  }

  .nav-dropdown.is-open .nav-dropdown-toggle::before {
    margin-top: 0.12rem;
    transform: rotate(225deg);
  }

  .nav-dropdown-menu {
    display: none;
    position: static;
    top: auto;
    left: auto;
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    min-width: 0;
    width: 100%;
    max-height: none;
    overflow: visible;
    margin-top: 0.35rem;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }

  .nav-dropdown.is-open .nav-dropdown-menu {
    display: block;
  }

  .nav-dropdown:hover .nav-dropdown-menu,
  .nav-dropdown:focus-within .nav-dropdown-menu,
  .nav-dropdown.is-closed .nav-dropdown-menu,
  .nav-dropdown.is-closed:hover .nav-dropdown-menu,
  .nav-dropdown.is-closed:focus-within .nav-dropdown-menu {
    display: none;
    position: static;
    top: auto;
    left: auto;
    transform: none;
  }

  .nav-dropdown.is-open .nav-dropdown-menu,
  .nav-dropdown.is-open:hover .nav-dropdown-menu,
  .nav-dropdown.is-open:focus-within .nav-dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav-dropdown-menu li + li {
    margin-top: 0.15rem;
  }

  .nav-dropdown-menu a {
    padding: 0.35rem 0 0.35rem 0.85rem;
    font-size: 0.95rem;
    color: rgba(250, 247, 242, 0.72);
  }

  .nav-dropdown-menu a:hover {
    background: transparent;
    color: var(--coral-soft);
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}

/* Mobile */
@media (max-width: 768px) {
  .nav {
    padding: 0.85rem 0.75rem;
  }

  .nav-logo {
    flex: 1 1 auto;
    max-width: calc(100% - 2.75rem);
    font-size: 1.4rem;
    line-height: 1.08;
  }

  .hero,
  .section,
  .footer {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .taxonomy-filters {
    padding: 0.85rem 0.75rem;
  }

  .filter-result-bar {
    padding: 0.65rem 0.75rem;
  }

  .preview-card-content {
    padding: 0.85rem;
  }

  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 5.05rem;
    padding-bottom: 2.35rem;
    min-height: auto;
  }

  .hero-tagline {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-content {
    max-width: none;
    padding-left: 1.1rem;
    padding-right: 1.1rem;
  }

  .hero-eyebrow {
    font-size: 0.74rem;
    margin-bottom: 0.8rem;
  }

  .hero h1 {
    font-size: clamp(2.22rem, 7.8vw, 3.1rem);
    padding-top: 0.2rem;
    margin-bottom: 1.28rem;
  }

  .hero-tagline {
    font-size: 1.16rem;
    margin-bottom: 0.92rem;
  }

  .hero-last-updated {
    font-size: 0.74rem;
  }

  .hero-visual {
    min-height: 0;
  }

  .hero-illustration {
    width: min(414px, 100%);
  }

  .group-grid,
  .nom-grid,
  .care-cards,
  .care-subsection-grid {
    grid-template-columns: 1fr;
  }

  .taxonomy-search,
  .filter-dimension {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .filter-dimension-label,
  .taxonomy-search-label {
    padding-top: 0;
  }

  .filter-dimension-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .filter-dimension-controls {
    justify-content: flex-start;
  }

  .filter-dimension-collapsible.is-expanded > .filter-dimension-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
  }

  .filter-chip {
    flex-shrink: 0;
  }

  .back-to-filters {
    width: 3.375rem;
    height: 3.375rem;
  }

  .page-float-tools {
    right: calc(3.25rem + 8px);
    top: calc(70% + 4.15rem - 8px);
    bottom: auto;
    transform: none;
  }

  .page-float-menu {
    width: 3.05rem;
    height: 15rem;
  }

  .page-float-btn {
    width: 2.35rem;
    height: 2.35rem;
  }
}

/* Submit form */
.submit-page {
  padding-top: 5.5rem;
}

.submit-container {
  max-width: 720px;
}

.submit-section .section-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 600;
  color: var(--green-deep);
  margin-bottom: 0.75rem;
}

.submit-form {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.submit-fieldset {
  border: 1px solid rgba(26, 61, 46, 0.12);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.65rem;
  background: white;
  box-shadow: var(--shadow);
}

.submit-fieldset legend {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--green-deep);
  padding: 0 0.35rem;
}

.submit-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--green-deep);
  margin: 1rem 0 0.4rem;
}

.submit-label:first-of-type {
  margin-top: 0.35rem;
}

.submit-required {
  color: var(--coral);
}

.submit-input,
.submit-textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(26, 61, 46, 0.18);
  border-radius: var(--radius);
  background: var(--cream);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.submit-input:focus,
.submit-textarea:focus {
  outline: none;
  border-color: var(--green-light);
  box-shadow: 0 0 0 3px rgba(45, 90, 69, 0.12);
}

.submit-textarea {
  resize: vertical;
  min-height: 6rem;
  line-height: 1.55;
}

.submit-hint {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin: 0.5rem 0 0.75rem;
}

.submit-checkgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.5rem 0.75rem;
}

.submit-check {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  color: var(--text);
  cursor: pointer;
}

.submit-check input {
  accent-color: var(--green-mid);
}

.submit-conditional[hidden] {
  display: none !important;
}

.submit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.submit-disclaimer {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.submit-steps {
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.submit-steps li + li {
  margin-top: 0.35rem;
}

.submit-photo-check {
  margin-top: 1rem;
}

.submit-disclaimer code {
  font-size: 0.82rem;
  background: rgba(26, 61, 46, 0.08);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.submit-success {
  background: white;
  border: 1px solid rgba(26, 61, 46, 0.12);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.submit-success h2 {
  font-family: var(--font-display);
  color: var(--green-deep);
  margin-bottom: 0.5rem;
}

.submit-success-lead {
  margin-bottom: 0.75rem;
  color: var(--text);
}

.submit-error {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius);
  background: rgba(201, 76, 76, 0.1);
  border: 1px solid rgba(201, 76, 76, 0.25);
  color: #8b2e2e;
  font-size: 0.92rem;
  line-height: 1.45;
}

.submit-bundle-input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

.submit-honey {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.submit-iframe {
  position: absolute;
  width: 0;
  height: 0;
  border: 0;
  visibility: hidden;
}

.submit-preview {
  margin: 1.25rem 0;
  padding: 1rem 1.1rem;
  background: var(--cream);
  border-radius: var(--radius);
  font-size: 0.84rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-x: auto;
}

.submit-file {
  padding: 0.65rem 0.75rem;
  background: white;
  cursor: pointer;
}

.submit-photo-uploads {
  display: grid;
  gap: 1rem;
}

.submit-photo-slot + .submit-photo-slot {
  padding-top: 0.15rem;
  border-top: 1px solid rgba(26, 61, 46, 0.08);
}

.submit-photo-rights {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  background: rgba(45, 90, 69, 0.05);
  border: 1px solid rgba(26, 61, 46, 0.1);
}

.submit-photo-rights.is-required {
  background: rgba(201, 168, 76, 0.1);
  border-color: rgba(201, 168, 76, 0.35);
}

.submit-photo-rights.has-error {
  background: rgba(201, 76, 76, 0.08);
  border-color: rgba(201, 76, 76, 0.45);
}

.submit-rights-error {
  margin: 0.75rem 0 0;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius);
  background: rgba(201, 76, 76, 0.1);
  border: 1px solid rgba(201, 76, 76, 0.25);
  color: #8b2e2e;
  font-size: 0.88rem;
  line-height: 1.5;
}

.submit-rights-notice {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text);
}

.submit-rights-check {
  align-items: flex-start;
  line-height: 1.45;
}

.submit-rights-check input {
  margin-top: 0.2rem;
}

.submit-photo-actions {
  margin-top: 0.75rem;
}

.btn-small {
  padding: 0.45rem 0.85rem;
  font-size: 0.88rem;
}

.submit-photo-preview,
.submit-photo-success {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.submit-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.65rem;
}

.submit-photo-success {
  margin: 1rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(26, 61, 46, 0.1);
}

.submit-photo-image {
  display: block;
  width: min(100%, 220px);
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius);
  border: 1px solid rgba(26, 61, 46, 0.12);
  background: var(--cream);
}

.submit-photo-status {
  margin: 0.5rem 0 0;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.submit-photo-path {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.submit-photo-path code {
  font-size: 0.82rem;
  background: rgba(26, 61, 46, 0.08);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.submit-card-draft-wrap {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(26, 61, 46, 0.1);
}

.submit-draft-heading {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--green-deep);
  margin-bottom: 0.35rem;
}

.submit-photo-remove {
  justify-self: start;
}

.group-card.submission-draft {
  outline: 2px dashed rgba(201, 76, 76, 0.35);
}

/* Family tree link + modal */
.family-tree-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.65rem 0 1.25rem;
  padding: 0.55rem 1rem;
  border: 1px solid rgba(45, 90, 69, 0.3);
  border-radius: 999px;
  background: rgba(45, 90, 69, 0.1);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--green-deep);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.family-tree-link:hover,
.family-tree-link:focus-visible {
  background: rgba(45, 90, 69, 0.16);
  border-color: rgba(45, 90, 69, 0.45);
  box-shadow: 0 2px 8px rgba(26, 61, 46, 0.1);
}

.family-tree-link:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.family-tree-link-icon {
  flex-shrink: 0;
  width: 1.15rem;
  height: auto;
  opacity: 1;
}

body.family-tree-open {
  overflow: hidden;
}

.family-tree-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(26, 39, 32, 0.55);
  backdrop-filter: blur(4px);
}

.family-tree-modal[hidden] {
  display: none;
}

.family-tree-dialog {
  position: relative;
  width: min(1220px, 100%);
  height: min(85vh, 900px);
  max-height: min(85vh, 900px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.35rem 25px;
  background: var(--cream);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.family-tree-close {
  position: absolute;
  z-index: 40;
  top: 0.75rem;
  right: 0.85rem;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: rgba(45, 90, 69, 0.08);
  color: var(--green-deep);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.family-tree-close:hover,
.family-tree-close:focus-visible {
  background: rgba(45, 90, 69, 0.16);
}

.plant-info-dialog > .family-tree-close {
  background: rgba(255, 255, 255, 0.38);
  box-shadow: 0 1px 6px rgba(26, 39, 32, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.plant-info-dialog > .family-tree-close:hover,
.plant-info-dialog > .family-tree-close:focus-visible {
  background: rgba(255, 255, 255, 0.62);
}

body.plant-info-open {
  overflow: hidden;
}

.plant-info-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(26, 39, 32, 0.55);
  backdrop-filter: blur(4px);
}

.plant-info-modal[hidden] {
  display: none;
}

.plant-info-dialog {
  position: relative;
  width: min(1220px, 100%);
  height: min(85vh, 900px);
  max-height: min(85vh, 900px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 2.75rem 1.35rem 25px;
  background: var(--cream);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.lightbox-scroller {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.plant-info-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  gap: 1rem;
}

.plant-info-gallery {
  --pi-gap-x: 0.2rem;
  --pi-gap-y: 0.35rem;
  flex: 1 1 0;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: calc((100% - var(--pi-gap-y)) / 2);
  align-content: start;
  column-gap: var(--pi-gap-x);
  row-gap: var(--pi-gap-y);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
  container-type: inline-size;
  -webkit-overflow-scrolling: touch;
}

.plant-info-dialog--single-row {
  height: auto;
}

.plant-info-dialog--single-row .plant-info-body {
  flex: 0 1 auto;
}

.plant-info-dialog--single-row .plant-info-gallery {
  flex: 0 0 auto;
  height: 19.5rem;
  grid-auto-rows: 100%;
  overflow: visible;
}

.plant-info-photo {
  position: relative;
  margin: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: rgba(45, 90, 69, 0.1);
}

.plant-info-photo img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.plant-info-photo--empty {
  height: 100%;
  width: 100%;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.72), transparent 38%),
    rgba(45, 90, 69, 0.1);
}

.plant-info-photo--empty .ft-photo-placeholder {
  width: 100%;
  height: 100%;
}

.plant-info-photo--empty .ft-photo-placeholder svg {
  width: 7.5rem;
  height: 7.5rem;
  max-width: 28%;
}

.plant-info-lower {
  display: flex;
  flex: 0 1 auto;
  height: auto;
  max-height: min(40%, 280px);
  align-items: stretch;
  gap: 1.5rem;
  min-height: 0;
}

.plant-info-copy {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow: visible;
  padding: 6px 4px 0 2px;
}

.plant-info-heading {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.5rem;
  overflow: visible;
}

.plant-info-heading-actions .icon-button {
  overflow: visible;
}

.plant-info-title {
  font-family: var(--font-display);
  font-size: 1.55rem;
  color: var(--green-deep);
  margin: 0;
  line-height: 1.2;
}

.plant-info-heading-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.55rem;
}

.plant-info-dialog--map #plant-info-origin-map-btn {
  display: none;
}

.plant-info-title em {
  font-style: italic;
}

.plant-info-description {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.plant-info-description p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.plant-info-description .known-for {
  margin-top: 0.75rem;
}

.plant-info-description h3 {
  margin: 0.85rem 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--green-deep);
}

.plant-info-description h3 + p {
  margin: 0;
}

.plant-info-description h3 + p + p {
  margin-top: 0.45rem;
}

.plant-info-sidebar {
  flex: 0 0 min(17.5rem, 38%);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 0.85rem 0.9rem 1rem;
  background: rgba(45, 90, 69, 0.06);
  border: 1px solid rgba(45, 90, 69, 0.12);
  border-radius: var(--radius);
}

.plant-info-chips {
  min-height: 0;
  overflow-y: auto;
}

.plant-info-sidebar .filter-chips {
  margin: 0;
  padding: 0;
  border-top: 0;
}

.plant-info-sidebar .tax-badge {
  font-size: 0.72rem;
  padding: 0.28rem 0.6rem;
}

@media (max-width: 900px) {
  .plant-info-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: auto;
  }

  .plant-info-photo,
  .plant-info-photo--empty {
    height: auto;
    min-height: 19.5rem;
    aspect-ratio: 288 / 312;
  }

  .plant-info-dialog--single-row .plant-info-gallery {
    height: auto;
    grid-auto-rows: auto;
    overflow: visible;
  }
}

@media (max-width: 760px) {
  .plant-info-dialog {
    overflow: hidden;
  }

  .lightbox-scroller {
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .plant-info-body {
    flex: 0 0 auto;
    min-height: auto;
    overflow: visible;
  }

  .plant-info-gallery,
  .plant-info-dialog--single-row .plant-info-gallery {
    flex: 0 0 auto;
    height: auto;
    max-height: none;
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    overflow: visible;
  }

  .plant-info-lower {
    flex: 0 0 auto;
    height: auto;
    max-height: none;
    flex-direction: column;
  }

  .plant-info-copy,
  .plant-info-sidebar {
    flex: 0 0 auto;
    max-height: none;
    overflow: visible;
  }

  .plant-info-description {
    overflow: visible;
  }

  .plant-info-sidebar {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .plant-info-gallery {
    grid-template-columns: 1fr;
  }
}

.family-tree-sidebar-header {
  position: relative;
  z-index: 19;
}

.family-tree-heading {
  font-family: var(--font-display);
  font-size: 1.55rem;
  color: var(--green-deep);
  padding-right: 2rem;
  margin-bottom: 0.85rem;
}

.family-tree-body {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  align-items: stretch;
  gap: 1.5rem;
}

.family-tree-root {
  flex: 1 1 58%;
  min-width: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  container-type: inline-size;
  padding: 0.5rem 0.25rem 0;
  --ft-line: rgba(45, 90, 69, 0.45);
  --ft-line-w: 2px;
  --ft-stem: 1.25rem;
  --ft-grandparent-card: clamp(7rem, 17cqi, 9rem);
  --ft-great-grandparent-card: clamp(5rem, 14cqi, 7.5rem);
}

.family-tree-root[hidden] {
  display: none !important;
}

.family-tree-root.ft-scroll-x {
  overflow-x: auto;
}

.family-tree-root.ft-scroll-y {
  overflow-y: auto;
}

.family-tree-root.ft-scroll-x.ft-scroll-y {
  overflow: auto;
}

.family-tree-related {
  position: sticky;
  top: 0;
  flex: 0 0 min(17.5rem, 38%);
  display: flex;
  overflow: hidden;
  flex-direction: column;
  padding: 0.85rem 0.9rem 1rem;
  background: rgba(45, 90, 69, 0.06);
  border: 1px solid rgba(45, 90, 69, 0.12);
  border-radius: var(--radius);
}

.family-tree-related-content {
  min-height: 0;
  overflow-y: auto;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(45, 90, 69, 0.12);
}

.family-tree-related-content[hidden] {
  display: none;
}

.family-tree-related-heading {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--green-deep);
  margin-bottom: 0.35rem;
}

.family-tree-related-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 0.85rem;
}

.ft-related-group + .ft-related-group {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(45, 90, 69, 0.1);
}

.ft-related-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

.ft-related-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.35rem 0.3rem;
}

.ft-related-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.ft-related-list-btn {
  flex: 0 0 auto;
  color: var(--green-deep);
}

.icon-button.ft-related-list-btn:hover,
.icon-button.ft-related-list-btn:focus-visible {
  transform: none;
  box-shadow: none;
  border: 2px solid var(--green-light);
}

.ft-related-list-btn svg {
  width: 100%;
  height: 100%;
}

.ft-related-chip {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  text-align: left;
  padding: 0.5rem 0.65rem;
  border: 1px solid rgba(45, 90, 69, 0.16);
  border-radius: var(--radius-sm);
  background: var(--cream);
  color: var(--green-deep);
  font-size: 0.84rem;
  line-height: 1.35;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.ft-related-chip:hover,
.ft-related-chip:focus-visible {
  background: rgba(45, 90, 69, 0.08);
  border-color: rgba(45, 90, 69, 0.28);
}

.ft-related-chip small {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 400;
}

.ft-related-entry {
  display: block;
  padding: 0.5rem 0.65rem;
  border: 1px dashed rgba(45, 90, 69, 0.18);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.45);
  color: var(--green-deep);
  font-size: 0.84rem;
  line-height: 1.35;
}

.ft-related-entry small {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.group-card.ft-scroll-highlight {
  outline: 2pt solid rgba(74, 124, 89, 0.72);
  outline-offset: 3px;
  animation: ft-scroll-fade 8.1s ease-out forwards;
}

@keyframes ft-scroll-fade {
  0%,
  98.77% {
    outline-color: rgba(74, 124, 89, 0.72);
  }

  100% {
    outline-color: transparent;
  }
}

@media (max-width: 760px) {
  .family-tree-modal,
  .plant-info-modal {
    align-items: flex-start;
    /* Keep the dialog (and close ×) below iOS Safari’s collapsing chrome. */
    padding: calc(env(safe-area-inset-top, 0px) + 3.15rem - 20px) 0.4rem max(0.4rem, env(safe-area-inset-bottom, 0px));
  }

  .family-tree-body {
    flex: 0 0 auto;
    min-height: auto;
    flex-direction: column;
  }

  .family-tree-body::after {
    content: '';
    order: 3;
    flex: 0 0 10px;
    width: 100%;
  }

  .family-tree-dialog {
    overflow: hidden;
    padding: 0.85rem 0.55rem 0.85rem;
    height: min(calc(100vh - 4.6rem + 20px), 900px);
    max-height: min(calc(100vh - 4.6rem + 20px), 900px);
    height: min(calc(100svh - env(safe-area-inset-top, 0px) - 3.55rem + 20px), 900px);
    max-height: min(calc(100dvh - env(safe-area-inset-top, 0px) - 3.55rem + 20px), 900px);
  }

  .plant-info-dialog {
    padding: 0.85rem 0.55rem 1.35rem;
    height: min(calc(100vh - 4.6rem + 20px), 900px);
    max-height: min(calc(100vh - 4.6rem + 20px), 900px);
    height: min(calc(100svh - env(safe-area-inset-top, 0px) - 3.55rem + 20px), 900px);
    max-height: min(calc(100dvh - env(safe-area-inset-top, 0px) - 3.55rem + 20px), 900px);
  }

  .family-tree-related {
    display: contents;
  }

  .family-tree-sidebar-header {
    order: 0;
    z-index: 1;
    width: 100%;
    padding: 0.65rem 2.75rem 0.65rem 0.7rem;
    border: 1px solid rgba(45, 90, 69, 0.12);
    border-radius: var(--radius);
    background: rgba(45, 90, 69, 0.06);
  }

  .family-tree-heading {
    margin-bottom: 0.45rem;
    padding-right: 0;
  }

  .family-tree-close {
    z-index: 50;
  }

  .family-tree-root {
    order: 1;
    flex: 0 0 auto;
    width: 100%;
    min-height: 0;
    padding-top: 10px;
    padding-bottom: 10px;
    --ft-grandparent-card: clamp(6.5rem, 28cqi, 9rem);
    --ft-great-grandparent-card: clamp(6.5rem, 28cqi, 9rem);
  }

  .ft-descendant-node--generation-2,
  .ft-descendant-node--generation-3,
  .ft-descendant-node--generation-4,
  .ft-descendant-node--generation-5,
  .ft-descendant-node--generation-6,
  .ft-descendant-node--generation-7,
  .ft-descendant-node--generation-8 {
    --ft-card-size: var(--ft-grandparent-card);
  }

  .ft-offspring-list {
    gap: 0.65rem;
  }

  .ft-grandchildren {
    gap: 6px;
  }

  .ft-branch--generation-1 > .ft-children--count-2,
  .family-tree-root > .ft-branch > .ft-children--count-2 {
    --ft-gap: 6px;
  }

  .ft-node-stack {
    gap: 0.2rem;
  }

  .ft-node-copy {
    min-height: 2.55rem;
    padding: 0.32rem 0.38rem 0.36rem;
    gap: 0.08rem;
  }

  .ft-branch--generation-0 .ft-node-copy {
    min-height: 2.75rem;
  }

  .ft-branch--generation-2 .ft-node-copy,
  .ft-branch--generation-3 .ft-node-copy {
    min-height: 2.25rem;
    padding: 0.26rem 0.28rem 0.3rem;
  }

  .ft-photo-credit {
    padding: 0.18rem 0.32rem;
    font-size: 0.58rem;
  }

  .ft-card-actions {
    top: 0.22rem;
    right: 0.22rem;
  }

  .ft-branch--generation-0 {
    --ft-card-size: min(calc(100cqi - 8px), 24.3rem);
  }

  .ft-branch--generation-1 {
    --ft-card-size: 14rem;
  }

  .ft-children--count-1 > .ft-child-branch > .ft-branch--generation-1 {
    --ft-card-size: 14rem;
  }

  .family-tree-root > .ft-branch > .ft-children--count-2 {
    width: max-content;
    min-width: 0;
    grid-template-columns: repeat(2, max-content);
  }

  .family-tree-root.ft-more-than-three-rows {
    padding-bottom: calc(15px + 5rem);
  }

  .family-tree-body > .family-tree-root > .ft-branch {
    min-height: 0;
  }

  .family-tree-related-content {
    order: 2;
    flex: 0 0 auto;
    width: 100%;
    max-height: none;
    overflow-y: visible;
    padding: 0.7rem 0.7rem;
    border: 1px solid rgba(45, 90, 69, 0.12);
    border-radius: var(--radius);
    background: rgba(45, 90, 69, 0.06);
  }
}

.ft-branch {
  --ft-card-size: 6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.family-tree-root > .ft-branch {
  width: max-content;
  min-width: 100%;
  min-height: 100%;
}

.family-tree-root.ft-vertical-center-tree {
  display: flex;
  flex-direction: column;
  justify-content: safe center;
}

.family-tree-root.ft-vertical-center-tree > .ft-branch,
.family-tree-root.ft-anchor-main-top > .ft-branch,
.family-tree-root.ft-offspring-only > .ft-branch,
.family-tree-root.ft-center-main > .ft-branch,
.family-tree-root.ft-has-descendants > .ft-branch {
  min-height: 0;
}

.family-tree-root.ft-vertical-center-tree > .ft-branch,
.family-tree-root.ft-vertical-center-tree > .ft-descendants {
  flex: 0 0 auto;
}

.family-tree-root.ft-anchor-main-top {
  padding-top: 25px;
}

.ft-branch--generation-0 {
  --ft-card-size: min(55cqi, 28.6rem);
  --ft-photo-size: 45.45%;
}

.ft-branch--generation-1 {
  --ft-card-size: calc(50cqi - 35px);
  --ft-photo-size: 45.45%;
}

.ft-branch--generation-2 {
  --ft-card-size: var(--ft-grandparent-card);
}

.ft-branch--generation-3 {
  --ft-card-size: var(--ft-great-grandparent-card);
}

.ft-branch--has-children > .ft-node-stack {
  position: relative;
  z-index: 1;
}

.ft-stem-down,
.ft-stem-up {
  flex: 0 0 auto;
  width: var(--ft-line-w);
  height: var(--ft-stem);
  background: var(--ft-line);
}

.ft-node-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.ft-branch--root > .ft-node-stack > .ft-node--root {
  border-width: 2px;
  background: rgba(225, 177, 62, 0.28);
  border-color: #c8982f;
}

.ft-branch--root {
  --ft-line: rgba(151, 96, 52, 0.42);
}

.ft-branch--root > .ft-node-stack > .ft-node--root .ft-node-copy {
  background: rgba(255, 253, 242, 0.9);
}

.ft-role {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1.2;
  text-align: center;
}

.ft-node {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: var(--ft-card-size);
  max-width: 100%;
  overflow: visible;
  border: 1px solid rgba(45, 90, 69, 0.22);
  border-radius: 10px;
  background: #fff;
  text-align: center;
  box-shadow: 0 3px 12px rgba(30, 54, 41, 0.08);
}

.ft-node:hover,
.ft-node:focus-within {
  z-index: 6;
}

.ft-node--leaf {
  background: rgba(232, 240, 235, 0.65);
}

.ft-branch--generation-3 .ft-node {
  width: var(--ft-card-size);
  max-width: none;
}

.ft-branch--generation-0 > .ft-node-stack > .ft-node,
.ft-branch--generation-1 > .ft-node-stack > .ft-node {
  flex-direction: row;
  align-items: stretch;
}

.ft-branch--generation-0 > .ft-node-stack > .ft-node .ft-photo,
.ft-branch--generation-1 > .ft-node-stack > .ft-node .ft-photo {
  flex: 0 0 var(--ft-photo-size);
  width: var(--ft-photo-size);
  border-radius: 9px 0 0 9px;
}

.ft-branch--generation-0 > .ft-node-stack > .ft-node .ft-node-copy,
.ft-branch--generation-1 > .ft-node-stack > .ft-node .ft-node-copy {
  border-radius: 0 9px 9px 0;
}

.ft-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 9px 9px 0 0;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.72), transparent 38%),
    rgba(45, 90, 69, 0.1);
}

.ft-photo img,
.ft-photo-placeholder {
  display: block;
  width: 100%;
  height: 100%;
}

.ft-photo img {
  object-fit: cover;
  object-position: center;
}

.ft-photo-credit {
  position: absolute;
  right: auto;
  bottom: 0;
  left: 0;
  z-index: 2;
  overflow: hidden;
  width: max-content;
  max-width: 100%;
  padding: 0.32rem 0.5rem;
  border-radius: 0;
  background: rgba(20, 34, 27, 0.4);
  color: #fff;
  font-size: 0.64rem;
  line-height: 1.25;
  text-align: left;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

a.ft-photo-credit:hover,
a.ft-photo-credit:focus-visible {
  color: #fff;
  text-decoration: underline;
}

.ft-photo-placeholder {
  display: grid;
  place-items: center;
  color: rgba(45, 90, 69, 0.42);
  pointer-events: none;
}

.ft-photo-placeholder svg {
  width: 43%;
  height: 43%;
  fill: currentColor;
}

.ft-photo-placeholder path + path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.78);
  stroke-linecap: round;
  stroke-width: 2.4;
}

.ft-photo-upload {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  z-index: 2;
  display: grid;
  width: 1.55rem;
  height: 1.55rem;
  place-items: center;
  border: 1px solid rgba(45, 90, 69, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  color: rgba(45, 90, 69, 0.48);
  box-shadow: 0 1px 3px rgba(30, 54, 41, 0.05);
  pointer-events: auto;
}

.ft-photo-upload:hover,
.ft-photo-upload:focus-visible {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(45, 90, 69, 0.42);
  color: rgba(45, 90, 69, 0.7);
}

.ft-photo-upload svg {
  width: 0.95rem;
  height: 0.95rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.ft-photo-upload::after {
  content: 'Upload a Photo';
  position: absolute;
  top: calc(100% + 0.3rem);
  right: 0;
  width: 4.75rem;
  padding: 0.28rem 0.42rem;
  border-radius: 5px;
  background: rgba(20, 34, 27, 0.84);
  color: #fff;
  font-size: 0.64rem;
  line-height: 1.2;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-0.2rem);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.ft-photo-upload:hover::after,
.ft-photo-upload:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.ft-node-copy {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 3.3rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.55rem 0.6rem 0.65rem;
}

.ft-label {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--green-deep);
  line-height: 1.35;
}

.ft-card-actions {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.22rem;
}

.ft-list-wrap {
  position: relative;
  width: 1.55rem;
  height: 1.55rem;
}

.ft-list-button {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--icon-sage);
  box-shadow: 0 1px 3px rgba(30, 54, 41, 0.05);
  cursor: pointer;
}

.icon-button-list.ft-list-button svg {
  display: block;
  width: 100%;
  height: 100%;
}

.ft-list-button:hover,
.ft-list-button:focus-visible {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(45, 90, 69, 0.42);
  color: rgba(45, 90, 69, 0.7);
}

.ft-list-button[aria-pressed="true"] {
  background: rgba(74, 124, 89, 0.28);
  color: rgba(45, 90, 69, 0.78);
}

.ft-info-wrap {
  position: relative;
  width: 1.55rem;
  height: 1.55rem;
}

.ft-info-button {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(45, 90, 69, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  color: rgba(45, 90, 69, 0.48);
  box-shadow: 0 1px 3px rgba(30, 54, 41, 0.05);
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  font-style: italic;
  line-height: 1;
  cursor: pointer;
}

.ft-info-button span {
  display: block;
  transform: translateY(-0.04em);
}

.ft-info-button:hover,
.ft-info-button:focus-visible {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(45, 90, 69, 0.42);
  color: rgba(45, 90, 69, 0.7);
}

.ft-branch--generation-2 .ft-card-actions,
.ft-branch--generation-3 .ft-card-actions,
.ft-descendant-node .ft-card-actions {
  top: 0.28rem;
  right: 0.28rem;
  gap: 0.16rem;
}

.ft-branch--generation-2 .ft-info-wrap,
.ft-branch--generation-3 .ft-info-wrap,
.ft-descendant-node .ft-info-wrap,
.ft-branch--generation-2 .ft-list-wrap,
.ft-branch--generation-3 .ft-list-wrap,
.ft-descendant-node .ft-list-wrap {
  width: 1.17rem;
  height: 1.17rem;
}

.ft-branch--generation-2 .icon-button-list.ft-list-button svg,
.ft-branch--generation-3 .icon-button-list.ft-list-button svg,
.ft-descendant-node .icon-button-list.ft-list-button svg {
  width: 100%;
  height: 100%;
}

.ft-branch--generation-2 .ft-info-button,
.ft-branch--generation-3 .ft-info-button,
.ft-descendant-node .ft-info-button {
  font-size: 0.69rem;
  box-shadow: 0 1px 3px rgba(30, 54, 41, 0.08);
}

.ft-node--linkable {
  border-color: rgba(45, 90, 69, 0.34);
  background: rgba(255, 255, 255, 0.92);
}

.ft-node-link {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(45, 90, 69, 0.35);
  text-underline-offset: 0.12em;
}

.ft-node-link:hover,
.ft-node-link:focus-visible {
  color: var(--green-deep);
  text-decoration-color: rgba(45, 90, 69, 0.7);
}

.ft-note {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.ft-branch--generation-0 .ft-node-copy {
  min-height: 3.75rem;
}

.ft-branch--generation-2 .ft-node-copy,
.ft-branch--generation-3 .ft-node-copy {
  min-height: 3rem;
  padding: 0.42rem 0.38rem 0.5rem;
}

.ft-branch--generation-3 .ft-label {
  font-size: 0.735rem;
}

.ft-branch--generation-2 .ft-note,
.ft-branch--generation-3 .ft-note {
  display: none;
}

.ft-branch--generation-1 .ft-node,
.ft-branch--generation-2 .ft-node,
.ft-branch--generation-3 .ft-node {
  border-color: rgba(121, 76, 42, 0.48);
  background: rgba(151, 96, 52, 0.2);
}

.ft-children {
  display: grid;
  width: 100%;
  position: relative;
  gap: 1.5rem var(--ft-gap, 1rem);
}

.ft-children--count-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  --ft-gap: 1rem;
}

/* Keep seed and pollen lines side-by-side; the tree scrolls when it outgrows the modal. */
.family-tree-root > .ft-branch > .ft-children--count-2 {
  width: max-content;
  min-width: calc(100% - 60px);
  grid-template-columns: repeat(2, max-content);
  --ft-gap: 10px;
}

.family-tree-root.ft-scroll-y > .ft-branch > .ft-children--count-2 {
  min-width: calc(100% - 50px);
  --ft-gap: 20px;
}

.ft-branch--generation-1 > .ft-children--count-2 {
  width: max-content;
  grid-template-columns: repeat(2, max-content);
  --ft-gap: 10px;
  transform: translateX(var(--ft-ancestor-shift, 0));
}

.ft-branch--generation-1 > .ft-children--count-2:has(.ft-branch--has-children) {
  --ft-gap: 28px;
}

.ft-branch--generation-2 > .ft-children--count-2 {
  width: max-content;
  grid-template-columns: repeat(2, max-content);
  --ft-gap: 12px;
  transform: translateX(var(--ft-ancestor-shift, 0));
}

.ft-branch--generation-1 > .ft-children--count-2 > .ft-child-branch,
.ft-branch--generation-2 > .ft-children--count-2 > .ft-child-branch {
  max-width: none;
  width: max-content;
}

.ft-branch--generation-1 > .ft-children--count-2 > .ft-child-branch > .ft-branch,
.ft-branch--generation-2 > .ft-children--count-2 > .ft-child-branch > .ft-branch {
  width: max-content;
  max-width: none;
  min-width: 100%;
}

.ft-children--count-2 > .ft-child-branch {
  min-width: 0;
  max-width: 100%;
}

.ft-children--count-1 {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
}

/* Junction bar between sibling column centers (accounts for grid gap) */
.ft-children--count-2::before {
  content: '';
  position: absolute;
  top: 0;
  left: var(--ft-bar-left, calc((100% - var(--ft-gap)) / 4));
  right: var(--ft-bar-right, calc((100% - var(--ft-gap)) / 4));
  height: var(--ft-line-w);
  background: var(--ft-line);
}

/* Single-child: trunk continues straight down */
/* Single-child: stem-down + stem-up form one continuous trunk */
.ft-children--count-1::before {
  display: none;
}

.ft-child-branch {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  width: 100%;
}

.ft-child-branch > .ft-branch {
  width: 100%;
  max-width: 100%;
}

.ft-children--count-1 .ft-child-branch::before {
  display: none;
}

.ft-descendants {
  --ft-line: rgba(45, 90, 69, 0.45);
  position: relative;
  width: 100%;
  min-width: 100%;
  padding-bottom: 2rem;
  text-align: center;
}

.ft-descendants::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: var(--ft-line-w);
  height: 2rem;
  background: var(--ft-line);
  transform: translateX(-50%);
}

.ft-offspring-list {
  position: relative;
  display: flex;
  width: max-content;
  min-width: 100%;
  flex-wrap: nowrap;
  align-items: flex-end;
  justify-content: center;
  gap: 2rem;
}

.ft-offspring-list::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: var(--ft-descendant-line-left, 50%);
  right: var(--ft-descendant-line-right, 50%);
  height: var(--ft-line-w);
  background: var(--ft-line);
}

.ft-descendant-family,
.ft-grandchild-branch {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
}

.ft-grandchild-branch {
  justify-content: flex-end;
}

.ft-descendant-family > .ft-grandchildren {
  order: 1;
}

.ft-descendant-family > .ft-descendant-node {
  order: 2;
}

.ft-descendant-family > .ft-role {
  order: 3;
}

.ft-descendant-family > .ft-descendant-stem {
  order: 4;
}

.ft-descendant-stem {
  width: var(--ft-line-w);
  height: 2rem;
  flex: 0 0 2rem;
  background: var(--ft-line);
}

.ft-descendant-node {
  --ft-card-size: var(--ft-grandparent-card);
  width: var(--ft-card-size);
  max-width: none;
  border-color: #4db765;
  background: #f0f8f1;
}

.ft-descendant-node--generation-2,
.ft-descendant-node--generation-3,
.ft-descendant-node--generation-4,
.ft-descendant-node--generation-5,
.ft-descendant-node--generation-6,
.ft-descendant-node--generation-7,
.ft-descendant-node--generation-8 {
  --ft-card-size: var(--ft-great-grandparent-card);
}

.ft-descendant-node--generation-2 .ft-label,
.ft-descendant-node--generation-3 .ft-label,
.ft-descendant-node--generation-4 .ft-label {
  font-size: 0.85rem;
}

.ft-grandchild-branch > .ft-descendant-family {
  width: 100%;
}

.ft-grandchildren {
  position: relative;
  display: flex;
  width: max-content;
  min-width: 100%;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 1.25rem;
  padding-top: 0;
}

.ft-grandchildren::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: var(--ft-descendant-line-left, 50%);
  right: var(--ft-descendant-line-right, 50%);
  height: var(--ft-line-w);
  background: var(--ft-line);
}

.ft-grandchildren::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  width: var(--ft-line-w);
  height: 1.25rem;
  background: var(--ft-line);
  transform: translateX(-50%);
}

.ft-grandchild-branch > .ft-descendant-node {
  order: 1;
}

.ft-grandchild-branch > .ft-role {
  order: 2;
}

.ft-grandchild-branch > .ft-descendant-stem {
  order: 3;
}

@media (max-width: 900px) {
  .family-tree-heading {
    font-size: 1.3rem;
  }

  .ft-label {
    font-size: 0.9rem;
  }

  .ft-branch--generation-3 .ft-label,
  .ft-descendant-node--generation-2 .ft-label,
  .ft-descendant-node--generation-3 .ft-label,
  .ft-descendant-node--generation-4 .ft-label {
    font-size: 0.7rem;
  }
}

@media (max-width: 1100px) {
  .ft-branch--generation-0 {
    --ft-card-size: min(calc(100cqi - 30px), 24.3rem);
  }

  .ft-branch--generation-1 {
    --ft-card-size: calc(50cqi - 20px);
  }

  .family-tree-root > .ft-branch > .ft-children--count-2 {
    width: calc(100% - 30px);
  }
}

@media (max-width: 760px) {
  .ft-branch--generation-0 {
    --ft-card-size: min(calc(100cqi - 8px), 24.3rem);
  }

  .ft-branch--generation-1 {
    --ft-card-size: 14rem;
  }

  .ft-children--count-1 > .ft-child-branch > .ft-branch--generation-1 {
    --ft-card-size: 14rem;
  }

  .family-tree-root > .ft-branch > .ft-children--count-2,
  .family-tree-root.ft-scroll-y > .ft-branch > .ft-children--count-2 {
    width: max-content;
    min-width: 0;
    grid-template-columns: repeat(2, max-content);
    --ft-gap: 0.75rem;
  }

  .ft-branch--generation-1 > .ft-children--count-2,
  .ft-branch--generation-2 > .ft-children--count-2 {
    grid-template-columns: repeat(2, max-content);
    --ft-gap: 0.75rem;
  }

  .family-tree-root > .ft-branch {
    width: max-content;
    min-width: 100%;
  }

  .family-tree-root .ft-children--count-2 > .ft-child-branch {
    max-width: none;
    width: max-content;
  }

  .family-tree-root .ft-child-branch > .ft-branch {
    width: max-content;
    max-width: none;
    min-width: 100%;
  }

  .ft-descendant-node--generation-2,
  .ft-descendant-node--generation-3,
  .ft-descendant-node--generation-4,
  .ft-descendant-node--generation-5,
  .ft-descendant-node--generation-6,
  .ft-descendant-node--generation-7,
  .ft-descendant-node--generation-8 {
    --ft-card-size: var(--ft-grandparent-card);
  }

  .ft-offspring-list {
    gap: 0.65rem;
  }

  .ft-grandchildren {
    gap: 6px;
  }

  .ft-node-stack {
    gap: 0.2rem;
  }

  .ft-node-copy {
    min-height: 2.55rem;
    padding: 0.32rem 0.38rem 0.36rem;
    gap: 0.08rem;
  }

  .ft-branch--generation-0 .ft-node-copy {
    min-height: 2.75rem;
  }

  .ft-branch--generation-2 .ft-node-copy,
  .ft-branch--generation-3 .ft-node-copy {
    min-height: 2.25rem;
    padding: 0.26rem 0.28rem 0.3rem;
  }

  .ft-photo-credit {
    padding: 0.18rem 0.32rem;
    font-size: 0.58rem;
  }

  .ft-card-actions {
    top: 0.22rem;
    right: 0.22rem;
  }

  .family-tree-root {
    max-height: calc(96vh - 7.75rem);
    overflow: auto;
  }

  .family-tree-root.ft-scroll-x,
  .family-tree-root.ft-scroll-y,
  .family-tree-root.ft-scroll-x.ft-scroll-y {
    overflow: auto;
  }

  .family-tree-root.ft-more-than-three-rows {
    padding-bottom: 12px;
  }

  .ft-branch--generation-1 .ft-label,
  .ft-branch--generation-1 .ft-node-link {
    font-size: 0.88rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .ft-branch--generation-1 .ft-note {
    font-size: 0.68rem;
    line-height: 1.3;
  }

  .ft-branch--generation-1 .ft-node-copy {
    min-height: 0;
    padding: 0.4rem 1.2rem 0.4rem 0.45rem;
  }

  .ft-branch--generation-2 .ft-label,
  .ft-branch--generation-3 .ft-label,
  .ft-branch--generation-2 .ft-node-link,
  .ft-branch--generation-3 .ft-node-link {
    font-size: clamp(0.55rem, 2.8cqi, 0.7rem);
    line-height: 1.2;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

/* ========================================
   PROTOTYPE OVERRIDES - Plant Card Redesign
   ======================================== */

/* Hide old group-grid if it exists, use new preview-grid */
#group-grid {
  display: none;
}

/* New preview grid layout */
.plant-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
  gap: 1.5rem;
  align-items: stretch;
  margin: 2rem 0;
}

.plant-preview-grid .preview-card {
  height: 100%;
  min-width: 0;
  max-width: 100%;
}

.plant-preview-grid .descriptor-card {
  grid-column: 1 / -1;
}

/* Category descriptor card — shown above matching plants */
.descriptor-card {
  display: flex;
  flex-direction: column;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.descriptor-card-content {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1.15rem 1.3rem 1.35rem;
}

.descriptor-card-heading {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.descriptor-card-main {
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
}

.descriptor-card-copy {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.7rem;
  min-width: 0;
}

.descriptor-origin-map {
  position: relative;
  z-index: 2;
  flex: 0 0 min(24rem, 44%);
  width: min(24rem, 44%);
  height: 16.75rem;
  display: flex;
  flex-direction: column;
  isolation: isolate;
  overflow: hidden;
  padding: 7px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(26, 61, 46, 0.2);
}

.descriptor-origin-map[hidden] {
  display: none;
}

.descriptor-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.descriptor-card-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.descriptor-card-clear {
  padding: 0.32rem 0.8rem;
  text-decoration: none;
  border: 1px solid rgba(26, 61, 46, 0.16);
  background: #fff;
  color: var(--green-deep);
  font-weight: 600;
}

.descriptor-card-clear:hover {
  background: var(--cream-button);
  color: var(--green-deep);
}

.descriptor-kicker {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.descriptor-card h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.3;
}

.descriptor-card h2 em {
  font-style: italic;
}

.descriptor-blurb,
.descriptor-note {
  margin: 0;
  line-height: 1.6;
}

.descriptor-blurb {
  font-size: 1.05rem;
  max-width: 72ch;
}

.descriptor-note {
  font-size: 0.98rem;
  opacity: 0.92;
}

.descriptor-blurb a,
.descriptor-note a {
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.descriptor-examples {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.98rem;
  line-height: 1.55;
}

.descriptor-card .tax-badge {
  pointer-events: none;
  cursor: default;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 0 0 1px rgba(26, 61, 46, 0.08);
}

.descriptor-card .known-for {
  margin: 0.15rem 0 0;
  background: rgba(255, 255, 255, 0.42);
  max-width: 72ch;
  font-size: 0.98rem;
}

.descriptor-card--tax-char {
  background: var(--sage-tag-bg);
  border-color: rgba(74, 124, 89, 0.28);
  box-shadow: inset 6px 0 0 var(--sage-tag-text);
  color: var(--text);
}

.descriptor-card--tax-char .descriptor-kicker,
.descriptor-card--tax-char h2 {
  color: var(--sage-tag-text);
}

.descriptor-card--tax-char .known-for {
  border-left-color: var(--sage-tag-text);
}

.descriptor-card--tax-char .known-for strong {
  color: var(--sage-tag-text);
}

.descriptor-card--tax-species {
  background: var(--species-tag-bg);
  border-color: rgba(200, 106, 78, 0.34);
  box-shadow: inset 6px 0 0 var(--species-tag-text);
  color: #5c3d2e;
}

.descriptor-card--tax-species .descriptor-kicker,
.descriptor-card--tax-species h2 {
  color: var(--species-tag-text);
}

.descriptor-card--tax-species .known-for {
  border-left-color: var(--species-tag-text);
}

.descriptor-card--tax-species .known-for strong {
  color: var(--species-tag-text);
}

.descriptor-card--tax-breeder {
  background: rgba(201, 168, 76, 0.2);
  border-color: rgba(201, 168, 76, 0.42);
  box-shadow: inset 6px 0 0 #8a6d1a;
  color: #5c4a14;
}

.descriptor-card--tax-breeder .descriptor-kicker,
.descriptor-card--tax-breeder h2 {
  color: #8a6d1a;
}

.descriptor-card--tax-breeder h2 a {
  color: inherit;
  text-decoration: none;
}

.descriptor-card--tax-breeder h2 a:hover,
.descriptor-card--tax-breeder h2 a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.descriptor-card--tax-breeder .known-for {
  border-left-color: #8a6d1a;
}

.descriptor-card--tax-breeder .known-for strong {
  color: #8a6d1a;
}

.descriptor-card--tax-morph {
  background: var(--morph-tag-bg);
  border-color: rgba(108, 112, 110, 0.3);
  box-shadow: inset 6px 0 0 var(--morph-tag-text);
  color: var(--text);
}

.descriptor-card--tax-morph .descriptor-kicker,
.descriptor-card--tax-morph h2 {
  color: #4d5250;
}

.descriptor-card--tax-morph .known-for {
  border-left-color: var(--morph-tag-text);
}

.descriptor-card--tax-morph .known-for strong {
  color: var(--morph-tag-text);
}

/* Preview card - replaces group-card layout */
.preview-card {
  display: flex;
  flex-direction: column;
  background: var(--cream);
  border: 1px solid rgba(26, 61, 46, 0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: opacity 0.35s, transform 0.35s, box-shadow 0.25s;
}

.preview-card:hover {
  box-shadow: var(--shadow);
  border-color: rgba(26, 61, 46, 0.15);
}

/* Card photo - square viewport with original slideshow controls */
.preview-photo:not(.card-photo) {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  margin: 0;
  background: rgba(26, 61, 46, 0.06);
}

.preview-photo--empty {
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.72), transparent 38%),
    rgba(45, 90, 69, 0.1);
}

.preview-photo--empty .ft-photo-placeholder {
  width: 100%;
  height: 100%;
}

.preview-photo--empty .ft-photo-placeholder svg {
  width: 7.5rem;
  height: 7.5rem;
  max-width: 43%;
}

.preview-card .card-photo {
  margin: 0;
  border-radius: 0;
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
}

.preview-card .card-photo-viewport {
  aspect-ratio: 3 / 4;
}

.preview-photo-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: rgba(26, 61, 46, 0.45);
  font-family: var(--font-display);
  font-size: 1rem;
}

.photo-count {
  position: absolute;
  right: 0.65rem;
  bottom: 0.65rem;
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
  background: rgba(26, 61, 46, 0.85);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
}

/* Photo credit line */
.photo-credit {
  padding: 0.6rem 1rem;
  background: rgba(26, 61, 46, 0.04);
  border-bottom: 1px solid rgba(26, 61, 46, 0.08);
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 400;
}

.photo-credit a {
  color: var(--green-mid);
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.photo-credit a:hover {
  color: var(--green-deep);
}

/* Card content - main text area */
.preview-card-content {
  padding: 1.25rem;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Card heading row with name + icons */
.preview-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.9rem;
}

.preview-card h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: var(--green-deep);
  line-height: 1.3;
  flex: 1;
}

.preview-card h2 em {
  font-style: italic;
}

.preview-card-name {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.preview-card-name:hover,
.preview-card-name:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

.preview-card-name:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.family-tree-card-catalog {
  display: none;
}

/* Action buttons (icons) */
.card-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.6rem;
}

.icon-button {
  display: inline-grid;
  width: 1.5rem;
  height: 1.5rem;
  place-items: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
}

.icon-button.icon-button-list {
  overflow: visible;
}

.icon-button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.icon-button:hover,
.icon-button:focus-visible {
  background: rgba(74, 124, 89, 0.32);
  box-shadow: 0 0 0 2px var(--green-light);
  transform: scale(1.1);
}

/* Description text */
.preview-card-copy {
  flex: 1;
}

.preview-description {
  margin: 0.75rem 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.preview-card-copy .preview-description:first-child {
  margin-top: 0;
}

.preview-description a,
.plant-info-description a {
  color: var(--green-light);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

.preview-description a:hover,
.preview-description a:focus-visible,
.plant-info-description a:hover,
.plant-info-description a:focus-visible {
  color: var(--green-deep);
}

.preview-card-section-heading {
  margin: 0.85rem 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--green-deep);
}

/* Known for section */
.known-for {
  margin: 0.9rem 0 0;
  padding: 0.6rem 0.85rem;
  background: rgba(45, 90, 69, 0.06);
  border-left: 3px solid var(--green-light);
  border-radius: 0 6px 6px 0;
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.5;
}

.known-for strong {
  font-weight: 600;
  color: var(--green-mid);
}

/* Card taxonomy chips — same colors as the original tax badges */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.9rem 0 0;
  padding: 0.9rem 0 0;
  border-top: 1px solid rgba(26, 61, 46, 0.08);
  list-style: none;
}

.filter-chips .tax-badge {
  border: 0;
  font-family: inherit;
}

/* Gallery mode: same photos as info mode, name + icons only */
.gallery-card .preview-description,
.gallery-card .preview-card-copy,
.gallery-card .preview-card-section-heading,
.gallery-card .known-for,
.gallery-card .filter-chips {
  display: none;
}

.gallery-card .preview-card-content {
  padding: 0.25rem 0.7rem 0.4rem;
}

.gallery-card .preview-card-heading {
  margin: 0;
  align-items: center;
  gap: 0.4rem;
}

.gallery-card h2 {
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.25;
}

/* View mode selector */
.view-mode-selector {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  margin: 0;
  flex: 0 0 auto;
  margin-left: auto;
}

.view-mode-label {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: normal;
  color: var(--green-deep);
  white-space: nowrap;
}

.view-toggle {
  display: inline-flex;
  gap: 0.2rem;
  padding: 0.2rem;
  border: 1px solid rgba(26, 61, 46, 0.12);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.72);
}

.view-toggle button {
  padding: 0.4rem 0.9rem;
  border: 0;
  border-radius: calc(var(--radius-lg) - 4px);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.2s;
}

.view-toggle button[aria-pressed="true"] {
  background: var(--green-mid);
  color: white;
}

.view-toggle button:hover:not([aria-pressed="true"]) {
  background: rgba(26, 61, 46, 0.08);
}

/* Dialog modal */
.preview-dialog {
  width: min(36rem, calc(100% - 2rem));
  border: 1px solid rgba(26, 61, 46, 0.08);
  border-radius: var(--radius-lg);
  padding: 2rem;
  color: var(--text);
  background: var(--cream);
  box-shadow: var(--shadow-lg);
}

.preview-dialog::backdrop {
  background: rgba(26, 61, 46, 0.4);
}

.dialog-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 6px;
  background: rgba(26, 61, 46, 0.06);
  color: var(--green-mid);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s;
}

.dialog-close:hover {
  background: rgba(26, 61, 46, 0.12);
  color: var(--green-deep);
}

.preview-dialog h2 {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--green-deep);
}

.preview-dialog h3 {
  margin: 1.5rem 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--green-mid);
}

.preview-dialog p {
  margin: 0.75rem 0;
  line-height: 1.6;
  color: var(--text-muted);
}

.preview-dialog strong {
  color: var(--green-mid);
  font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .plant-preview-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 100%), 1fr));
    gap: 1rem;
  }

  .view-mode-selector {
    justify-content: flex-end;
    margin: 0;
    width: 100%;
  }

  .view-toggle {
    flex: 1;
    width: auto;
  }

  .view-toggle button {
    flex: 1;
  }

  .preview-card-heading {
    flex-direction: column;
  }

  .card-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .preview-dialog {
    width: calc(100% - 0.75rem);
    padding: 1rem;
  }
}

.ft-origin-map-btn {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 1.55rem;
  height: 1.55rem;
  margin-top: 0.45rem;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(45, 90, 69, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  cursor: pointer;
  opacity: 0.9;
  box-shadow: 0 2px 6px rgba(26, 61, 46, 0.22);
  filter: none;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, border-color 0.2s ease;
}

.ft-origin-map-btn img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: none;
  filter: none;
}

.ft-origin-map-btn[hidden],
.family-tree-dialog--map .ft-origin-map-btn {
  display: none;
}

.ft-origin-map-btn:hover,
.ft-origin-map-btn:focus-visible {
  opacity: 1;
  background: rgba(74, 124, 89, 0.32);
  border-color: transparent;
  box-shadow: 0 0 0 2px var(--green-light), 0 2px 6px rgba(26, 61, 46, 0.22);
  transform: scale(1.1);
}

.ft-origin-map-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.family-tree-origin-map {
  position: absolute;
  z-index: 18;
  top: 7.15rem;
  right: 1.15rem;
  width: min(27.5rem, 48%);
  height: min(20.5rem, 50%);
  display: flex;
  flex-direction: column;
  isolation: isolate;
  overflow: hidden;
  padding: 7px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(26, 61, 46, 0.2);
}

.plant-info-origin-map {
  position: absolute;
  top: auto;
  right: calc(1.35rem + 26px);
  bottom: 0.85rem;
  left: auto;
  z-index: 30;
  width: min(27.5rem, 46%);
  height: min(18.5rem, 44%);
  pointer-events: auto;
}

.family-tree-origin-map[hidden] {
  display: none;
}

.ft-origin-map-close {
  position: absolute;
  z-index: 1000;
  top: 0.85rem;
  right: 0.85rem;
  width: 1.85rem;
  height: 1.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(26, 61, 46, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--green-deep);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(26, 61, 46, 0.16);
}

.ft-origin-map-close:hover,
.ft-origin-map-close:focus-visible {
  background: rgba(255, 255, 255, 0.95);
}

.ft-origin-map-canvas {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow: hidden;
  border-radius: 10px;
}

.ft-origin-map-canvas .leaflet-container {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  background: #d8e0dc;
  font-family: var(--font-body);
}

.ft-origin-map-canvas .leaflet-bottom.leaflet-left {
  margin: 0 0 0.4rem 0.4rem;
}

.ft-origin-map-canvas .leaflet-control-zoom {
  border: 0;
  margin: 0;
  box-shadow: none;
}

.ft-origin-map-canvas .leaflet-bar {
  border: 0;
  box-shadow: none;
}

.ft-origin-map-canvas .leaflet-control-zoom a {
  width: 1.85rem;
  height: 1.85rem;
  line-height: 1.85rem;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: var(--green-deep);
  font-size: 1.05rem;
}

.ft-origin-map-canvas .leaflet-control-zoom a:first-child {
  border-radius: 8px 8px 0 0;
}

.ft-origin-map-canvas .leaflet-control-zoom a:last-child {
  border-radius: 0 0 8px 8px;
}

.ft-origin-map-canvas .leaflet-control-zoom a:hover,
.ft-origin-map-canvas .leaflet-control-zoom a:focus {
  background: rgba(255, 255, 255, 0.92);
  color: var(--green-deep);
}

.ft-origin-map-note {
  margin: 0.35rem 0.15rem 0;
  padding: 0;
  font-size: 0.68rem;
  line-height: 1.3;
  color: var(--text-muted);
}

.family-tree-origin-map .ft-origin-map-note {
  position: absolute;
  left: 7px;
  right: 7px;
  bottom: 7px;
  z-index: 500;
  margin: 0;
  padding: 0.28rem 0.45rem 0.32rem;
  border-radius: 0 0 10px 10px;
  background: rgba(255, 255, 255, 0.82);
}

.family-tree-origin-map .leaflet-bottom {
  bottom: 1.85rem;
}

.ft-map-pin {
  position: relative;
  pointer-events: none;
}

.ft-map-pin-dot {
  position: absolute;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--green-deep);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(26, 61, 46, 0.28);
}

.ft-map-pin-label {
  position: absolute;
  left: 6px;
  top: -55px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.05rem;
  white-space: nowrap;
  padding: 0.44rem 0.76rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: var(--green-deep);
  font-family: var(--font-body);
  line-height: 1.2;
  box-shadow: 0 2px 8px rgba(26, 61, 46, 0.1);
}

.ft-map-pin-label b,
.ft-map-pin-plant {
  font-size: 0.97rem;
  font-weight: 600;
}

.ft-map-pin-plant {
  appearance: none;
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-family: inherit;
  line-height: inherit;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 0.14em;
  cursor: pointer;
  pointer-events: auto;
}

.ft-map-pin-plant:hover,
.ft-map-pin-plant:focus-visible {
  color: var(--green);
}

.ft-map-pin-label small {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-muted);
}

@media (max-width: 760px) {
  .family-tree-origin-map {
    top: 7rem;
    right: 0.45rem;
    left: 0.45rem;
    width: auto;
    height: min(16.5rem, 38vh);
    z-index: 20;
  }

  .plant-info-dialog .plant-info-origin-map {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    bottom: auto;
    z-index: 5;
    flex: 0 0 auto;
    align-self: stretch;
    width: 100%;
    height: min(16.5rem, 36vh);
    margin: 0 0 0.75rem;
  }
}

@media (max-width: 480px) {
  .nav,
  .hero,
  .section,
  .footer {
    padding-left: 0.6rem;
    padding-right: 0.6rem;
  }

  .nav {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .nav-logo {
    font-size: 1.28rem;
    line-height: 1.06;
  }

  .hero {
    padding-top: 4.95rem;
  }

  .taxonomy-filters,
  .filter-result-bar {
    padding-left: 0.6rem;
    padding-right: 0.6rem;
  }

  .plant-preview-grid {
    grid-template-columns: 1fr;
  }

  .view-toggle button {
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
  }

  .preview-card-content {
    padding: 0.75rem;
  }

  .filter-chips {
    gap: 0.25rem;
  }

  .known-for {
    font-size: 0.8rem;
    padding: 0.5rem 0.7rem;
  }

  .descriptor-card-main {
    flex-direction: column;
  }

  .descriptor-origin-map {
    flex: none;
    width: 100%;
    height: 16rem;
  }

  .descriptor-card .known-for {
    font-size: 0.98rem;
  }
}

.article-page {
  padding: 6.5rem 1.25rem 4rem;
}

body.page-about {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.page-about .article-page {
  flex: 1 0 auto;
}

.article {
  max-width: 42rem;
  margin: 0 auto;
}

.article-header {
  margin-bottom: 2rem;
}

.article-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.85rem);
  font-weight: 600;
  color: var(--green-deep);
  margin: 0.35rem 0 0.5rem;
  line-height: 1.15;
}

.article-meta {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted, #5c6b63);
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--green-deep);
  margin: 2.15rem 0 0.7rem;
}

.article-body h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--green-deep);
  margin: 1.5rem 0 0.5rem;
}

.article-body p,
.article-body li {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text, #24352c);
}

.article-body p {
  margin: 0 0 1rem;
}

.article-body ul {
  margin: 0 0 1.15rem;
  padding-left: 1.2rem;
}

.article-body li {
  margin-bottom: 0.55rem;
}

.photo-contributors {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 0.2rem 1.5rem;
  list-style: none;
  padding-left: 0;
}

.photo-contributors a {
  color: var(--green-mid);
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

.photo-contributors a:hover,
.photo-contributors a:focus-visible {
  color: var(--green-deep);
}

.article-note {
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  background: rgba(26, 61, 46, 0.05);
}
