/* Anthurium collector reference */

:root {
  --green-deep: #1a3d2e;
  --green-mid: #2d5a45;
  --green-light: #4a7c59;
  --green-pale: #e8f0eb;
  --coral: #c94c4c;
  --coral-bright: #e85d5d;
  --coral-soft: #f4a5a5;
  --gold: #c9a84c;
  --cream: #faf7f2;
  --cream-dark: #e4ddd3;
  --sage-tag-bg: rgba(45, 90, 69, 0.12);
  --sage-tag-text: var(--green-mid);
  --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;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text);
  background: var(--cream);
  line-height: 1.6;
  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 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--green-deep);
}

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

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

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--green-deep);
  transition: transform 0.3s, opacity 0.3s;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 75% 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;
}

.hero-eyebrow {
  font-size: 0.8rem;
  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.75rem, 5.5vw, 4.25rem);
  font-weight: 600;
  line-height: 1.08;
  color: var(--green-deep);
  margin-bottom: 1.25rem;
}

.hero-tagline {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 38ch;
  margin-bottom: 2rem;
  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);
}

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

.leaf-art {
  position: relative;
  width: 260px;
  height: 300px;
  animation: float 7s ease-in-out infinite;
}

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

.blade {
  position: absolute;
  inset: 20px 10px 30px 10px;
  background: linear-gradient(145deg, #3d5a48 0%, #2a4535 40%, #1e3328 100%);
  border-radius: 45% 45% 40% 40% / 55% 55% 45% 45%;
  box-shadow: var(--shadow-lg);
}

.vein {
  position: absolute;
  background: linear-gradient(90deg, transparent, rgba(220, 210, 195, 0.85), transparent);
  height: 3px;
  border-radius: 2px;
  z-index: 2;
}

.vein-1 { top: 38%; left: 18%; width: 64%; transform: rotate(-8deg); }
.vein-2 { top: 48%; left: 22%; width: 56%; transform: rotate(4deg); opacity: 0.9; }
.vein-3 { top: 58%; left: 26%; width: 48%; transform: rotate(-3deg); opacity: 0.8; }
.vein-4 { top: 68%; left: 30%; width: 40%; transform: rotate(6deg); opacity: 0.7; }
.vein-5 {
  top: 32%;
  left: 42%;
  width: 4px;
  height: 55%;
  background: linear-gradient(180deg, rgba(220, 210, 195, 0.9), rgba(220, 210, 195, 0.4));
  border-radius: 2px;
  transform: rotate(-4deg);
}

/* 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: 0.78rem;
  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;
}

/* 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.72rem;
  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: 0.95rem;
  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);
}

.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: 110px 1fr;
  gap: 0.75rem 1rem;
  align-items: center;
}

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

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

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

#named-hybrid-filter-summary.has-selection {
  font-weight: 400;
}

#species-filter-summary.has-selection {
  font-weight: 400;
}

#cross-direction-filter-summary.has-selection {
  font-weight: 400;
}

#breeder-filter-summary.has-selection {
  font-weight: 400;
}

.filter-dimension-toggle {
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(26, 61, 46, 0.2);
  background: white;
  color: var(--green-deep);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  flex-shrink: 0;
}

.filter-dimension-toggle:hover {
  border-color: var(--green-light);
  background: rgba(45, 90, 69, 0.06);
}

.filter-dimension-clear {
  font-family: var(--font-body);
  font-size: 0.76rem;
  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.76rem;
  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-has-controls {
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.filter-dimension-has-controls > .filter-dimension-chips {
  grid-column: 1;
}

.filter-dimension-hint {
  font-size: 0.84rem;
  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.72rem;
  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.76rem;
  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-top: 0.85rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  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;
}

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

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

.filter-result-bar {
  background: var(--cream-dark);
  color: var(--green-deep);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(26, 61, 46, 0.08);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  scroll-margin-top: 5rem;
}

.back-to-filters {
  position: fixed;
  /* Sit in the right margin beside the 1120px column, not on top of cards */
  right: max(1.25rem, calc((100vw - 1120px) / 4 - 2rem + 0.75in));
  top: 70%;
  bottom: auto;
  z-index: 120;
  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;
}

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

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

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

.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-chip {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(26, 61, 46, 0.15);
  background: white;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.filter-chip:hover {
  border-color: var(--green-light);
  color: var(--green-deep);
}

.filter-chip.active {
  background: var(--green-mid);
  border-color: var(--green-mid);
  color: white;
}

/* 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;
  background: rgba(26, 61, 46, 0.06);
}

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

.card-photo-track img {
  flex: 0 0 100%;
  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.92);
  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;
  padding: 0.4rem 0.85rem 0;
}

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

.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); }

.filter-dimension-multi .filter-chip.active:not(.filter-chip-all) {
  background: var(--green-mid);
  border-color: var(--green-mid);
  color: white;
}
.tax-species { background: rgba(201, 76, 76, 0.12); color: var(--coral); }
.tax-breeder { background: rgba(201, 168, 76, 0.2); color: #8a6d1a; }
.tax-morph { background: rgba(90, 107, 98, 0.15); color: var(--text-muted); }
.tax-hybrid { background: rgba(107, 76, 154, 0.14); color: #5a4080; }
.tax-cross { background: rgba(90, 120, 140, 0.16); color: #3d5566; }

#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: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  font-weight: 300;
}

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

.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;
}

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

.nom-card p {
  font-size: 0.92rem;
  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;
}

/* 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.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  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: 0.92rem;
  color: var(--text-muted);
  font-weight: 300;
  margin: 0;
  line-height: 1.55;
}

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

.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: 0.92rem;
}

.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;
}

/* 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;
}

/* Mobile */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 260px;
    height: 100vh;
    flex-direction: column;
    background: var(--cream);
    padding: 5rem 2rem 2rem;
    gap: 1.25rem;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }

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

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

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

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

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

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

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

  .hero-visual {
    min-height: 240px;
  }

  .leaf-art {
    width: 200px;
    height: 240px;
  }

  .group-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 {
    right: calc(1rem + 0.75in);
    top: 70%;
    bottom: auto;
    width: 3.375rem;
    height: 3.375rem;
  }
}

/* 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(960px, 100%);
  max-height: min(85vh, 900px);
  overflow: auto;
  padding: 1.5rem 1.35rem 1.75rem;
  background: var(--cream);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.family-tree-close {
  position: absolute;
  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);
}

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

.family-tree-note {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.family-tree-body {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}

.family-tree-root {
  flex: 1 1 58%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.5rem 0.25rem 0.75rem;
  --ft-line: rgba(45, 90, 69, 0.45);
  --ft-line-w: 2px;
  --ft-stem: 1.25rem;
}

.family-tree-related {
  flex: 0 0 min(17.5rem, 38%);
  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-md);
}

.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;
}

.ft-related-chip {
  display: block;
  width: 100%;
  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-body {
    flex-direction: column;
  }

  .family-tree-related {
    flex: 1 1 auto;
    width: 100%;
  }
}

.ft-branch {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 7.5rem;
}

.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 {
  background: rgba(201, 168, 76, 0.18);
  border-color: var(--gold);
}

.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;
  gap: 0.25rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(45, 90, 69, 0.22);
  border-radius: 8px;
  background: #fff;
  text-align: center;
  max-width: 14rem;
}

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

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

.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: 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-children {
  display: grid;
  width: 100%;
  max-width: 34rem;
  position: relative;
  gap: 1.75rem var(--ft-gap, 2rem);
}

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

/* Root row only: keep seed | pollen side-by-side; scroll instead of stacking */
.family-tree-root > .ft-branch > .ft-children--count-2 {
  grid-template-columns: repeat(2, minmax(9rem, 1fr));
  min-width: calc(9rem * 2 + var(--ft-gap));
}

.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;
  max-width: 14rem;
}

/* Junction bar between sibling column centers (accounts for grid gap) */
.ft-children--count-2::before {
  content: '';
  position: absolute;
  top: 0;
  left: calc((100% - var(--ft-gap)) / 4);
  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;
  position: relative;
  width: 100%;
}

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

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