/* Node 77: match the responsive card layout used by Lepidoptera. */
article[data-history-node-id="77"] .odonata-species-table {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  width: 100% !important;
  max-width: 100%;
  margin: 24px 0;
  border: 0;
  direction: rtl;
}
article[data-history-node-id="77"] .odonata-species-table > tbody,
article[data-history-node-id="77"] .odonata-species-table > tbody > tr,
article[data-history-node-id="77"] .odonata-species-table > tr {
  display: contents;
}
article[data-history-node-id="77"] .odonata-species-table .odonata-empty-cell {
  display: none;
}
article[data-history-node-id="77"] .odonata-species-table .odonata-family-heading,
article[data-history-node-id="77"] .odonata-species-table .odonata-table-note {
  grid-column: 1 / -1;
  min-width: 0;
  padding: 10px !important;
  border: 1px solid #d9dfe5;
  text-align: center !important;
  overflow-wrap: anywhere;
}
article[data-history-node-id="77"] .odonata-species-table .odonata-family-heading {
  background: #f4f6f3;
}
article[data-history-node-id="77"] .odonata-species-table .odonata-species-card {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 12px;
  min-width: 0;
  padding: 12px !important;
  border: 1px solid #d9dfe5;
  font-size: 14px;
  line-height: 1.5;
  text-align: center !important;
  overflow-wrap: anywhere;
}
/* Shared name/image/credit tracks align thumbnails even when names wrap. */
@supports (grid-template-rows: subgrid) {
  article[data-history-node-id="77"] .odonata-species-table .odonata-species-card {
    grid-row: span 3;
    grid-template-rows: subgrid;
  }
}
article[data-history-node-id="77"] .odonata-species-table :is(h4, h5, p) {
  margin: 0 !important;
  padding: 0;
}
article[data-history-node-id="77"] .odonata-species-table :is(h4, h5, p, span, strong, em, i, a) {
  font-size: inherit !important;
  line-height: inherit !important;
}
article[data-history-node-id="77"] .odonata-species-name,
article[data-history-node-id="77"] .odonata-species-credit {
  min-width: 0;
  padding-inline: 4px;
}
article[data-history-node-id="77"] .odonata-species-name {
  align-self: center;
}
article[data-history-node-id="77"] .odonata-species-credit {
  font-size: 14px;
}
article[data-history-node-id="77"] .odonata-species-name :is(em, i, [dir="ltr" i]) {
  display: inline-block;
  max-width: 100%;
  direction: ltr;
  unicode-bidi: isolate;
}
article[data-history-node-id="77"] .odonata-species-thumbnail {
  width: 100%;
  aspect-ratio: 3 / 2;
  margin-inline: auto;
  align-self: start;
  background: #f5f5f5;
}
article[data-history-node-id="77"] .odonata-species-thumbnail > a {
  display: block;
  width: 100%;
  height: 100%;
}
article[data-history-node-id="77"] .odonata-species-thumbnail img {
  display: block;
  float: none !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  margin: 0 !important;
  object-fit: contain;
}
@media (min-width: 600px) {
  article[data-history-node-id="77"] .odonata-species-table {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

article[data-history-node-id="77"] .odonata-species-name {
  font-size: clamp(20px, 2.5vw, 24px);
  font-weight: 600;
  line-height: 1.4;
}
article[data-history-node-id="77"] .odonata-species-credit :is(em, i) {
  display: inline-block;
  direction: ltr;
  unicode-bidi: isolate;
}
