/* ─── Breeding genealogy (portrait, right column) ────────────────────── */

.gen-wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* viewport / track */
.gen-viewport {
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--paper);
  cursor: grab;
  flex: 1;
}
.gen-viewport:active { cursor: grabbing; }
.gen-track {
  display: flex;
  height: 100%;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.gen-cell {
  flex: 0 0 100%;
  min-width: 100%;
}

/* slide */
.gen-slide {
  padding: 28px 26px 30px;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.gen-head {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 22px;
}
.gen-title {
  font-family: var(--display);
  font-size: clamp(22px, 3cqw, 28px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
  margin: 0;
}
.gen-eyebrow {
  font-family: var(--body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1.3;
}
.gen-eyebrow-date { color: var(--accent); font-weight: 700; }

.gen-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.gen-role-label {
  font-family: var(--body);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 7px;
}

/* pollinator (top tier) */
.gen-pollinator {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.gen-pollinator-pill {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.3;
  padding: 10px 18px;
  border-radius: 8px;
  max-width: 100%;
  word-break: break-word;
}

/* stem connector */
.gen-stem {
  width: 1.5px;
  height: 22px;
  background: var(--rule-strong);
  align-self: center;
  margin: 4px 0;
}

/* rows */
.gen-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.gen-vrow {
  border: 1px solid var(--rule-strong);
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.gen-vrow.is-selected {
  border-color: var(--accent);
  border-width: 2px;
  padding: 11px 13px;
}
.gen-vrow-mother {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-2);
  line-height: 1.3;
  word-break: break-word;
}
.gen-vrow-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.gen-vrow-label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.35;
  word-break: break-word;
}
.gen-vrow-tag {
  font-family: var(--body);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  padding: 4px 7px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* current slide */
.gen-inner-current { align-items: center; justify-content: center; }
.gen-current-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--body);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  padding: 13px 20px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
}
.gen-current-pulse {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--accent);
  animation: genPulse 2s infinite;
}
@keyframes genPulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 77, 31, 0.45); }
  70% { box-shadow: 0 0 0 11px rgba(255, 77, 31, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 77, 31, 0); }
}

/* staged entrance animation */
.gen-anim {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.gen-cell.is-active .gen-anim { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .gen-anim { opacity: 1; transform: none; transition: none; }
}

/* controls */
.gen-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}
.gen-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--body);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  padding: 10px 15px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.gen-btn:hover:not(:disabled) { border-color: var(--ink); }
.gen-btn:disabled { opacity: 0.35; cursor: default; }
.gen-chev {
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  display: inline-block;
}
.gen-chev-left { transform: rotate(135deg); }
.gen-chev-right { transform: rotate(-45deg); }
.gen-dots { display: flex; align-items: center; gap: 7px; }
.gen-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  border: 0;
  background: var(--rule-strong);
  padding: 0;
  cursor: pointer;
  transition: all 0.18s ease;
}
.gen-dot.is-active { background: var(--accent); transform: scale(1.3); }
.gen-count {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  margin-left: 8px;
}

/* standalone page fallback */
.gen-section {
  padding: 56px var(--gutter-mobile);
  background: var(--paper);
}
.gen-section .gen-wrap { max-width: 460px; margin: 0 auto; height: auto; }
.gen-section .gen-viewport { min-height: 520px; }
@container (min-width: 720px) {
  .gen-section { padding: 80px var(--gutter-tablet); }
}




.gen-rows-label { margin-top: 2px; }

.gen-footnote {
  margin: 14px 0 0;
  font-family: var(--body);
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-3);
  max-width: 62ch;
}
