body {
  font-family: Arial, sans-serif;

}

.page-title {
  text-align: center;
  font-size: 2.5em;
  color: #2e6c80;
  margin-bottom: 10px;
}

h2 {
  text-align: center;
  font-size: 1.8em;
  color: #4a7c59;
  margin-top: 10px;
  margin-bottom: 30px;
  font-weight: 400;
  font-style: italic;
}

.source-reference {
  text-align: center;
  font-size: 1em;
  color: #555;
  font-style: italic;
  margin-bottom: 30px;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th, td {
  border: 1px solid #ddd;
  padding: 8px;
}

th {
  background-color: #2e6c80;
  color: white;
  text-align: left;
}

tr:nth-child(even) {
  background-color: #f9f9f9;
}

tr:hover {
  background-color: #f1f1f1;
}

/* Left-side block styles */
.order-cell {
  background-color: #dcecf2;
  color: #2e6c80;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-right: 2px solid #2e6c80;
  min-width: 140px;
}

.family-cell {
  background-color: #eaf5ee;
  color: #4a7c59;
  font-weight: 700;
  border-right: 1px solid #4a7c59;
  min-width: 160px;
}

tbody tr:hover .order-cell {
  background-color: #dcecf2;
}

tbody tr:hover .family-cell {
  background-color: #eaf5ee;
}

/* Text color styles */
td:first-child {
  font-weight: bold;
  color: #2e6c80;
  border-top: none;
  border-bottom: none;
}

td:nth-child(2) {
  font-style: italic;
  color: #4a7c59;
  border-top: none;
  border-bottom: none;
}

/* ✅ Only apply blue border to the Order cell */
tr.order-start td:first-child {
  border-top: 3px solid #2e6c80;
}

/* ✅ Only apply green border to the Family cell */
tr.family-start td:nth-child(2) {
  border-top: 2px solid #4a7c59;
}

/* Apply blue top border to the Order column only */
tr.order-start td:first-child {
  border-top: 2px solid #2e6c80;
}

/* Apply green top border to the Family + species columns (not Order) */
tr.family-start td:not(:first-child) {
  border-top: 2px solid #4a7c59;
}

/* Remove all top borders from the first row of the table */
.species-table tbody tr:first-of-type td {
  border-top: none !important;
}

.species-table {
  border: 4px solid #2e6c80; /* deep blue-green or any color you prefer */
  border-radius: 6px;         /* optional: rounded corners */
  overflow: hidden;           /* keeps child borders from spilling out */
}


/* ===== Theme ===== */
  .orders-infographic {
    --bg1: #0f2b22; --bg2: #163a2e;
    --panel: #1c3f33; --ink: #f3f2e7; --muted: #c9c5b6;
    --divider: #2a4a3f; --bar1: #4ec6a2; --bar2: #7dd3b0;
    background: linear-gradient(180deg, var(--bg1), var(--bg2));
    color: var(--ink);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    max-width: 1200px; margin: 0 auto;
    display: grid; gap: 12px;
    width: 70%;
  }

  .oi-header {
    display: flex; align-items: baseline; justify-content: space-between;
    border-bottom: 1px solid var(--divider); padding-bottom: 10px;
  }
  .oi-title { font-size: 1rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
  .oi-total { display: inline-flex; gap: 10px; align-items: baseline;
    background: var(--panel); border: 1px solid var(--divider);
    padding: 6px 10px; border-radius: 12px; }
  .oi-total .num { font-size: 1.6rem; font-weight: 700; line-height: 1; }
  .oi-total .label { font-size: .85rem; color: var(--muted); }

  /* ===== Grid that auto-fits cards, prevents overflow ===== */
  .oi-bars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); /* key change */
    gap: 10px 16px;
  }
  /* Smaller cards in the "rest" area to fit more comfortably */
  .oi-bars-rest { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

  .oi-row {
    background: var(--panel); border: 1px solid var(--divider);
    border-radius: 14px; padding: 10px 12px; display: grid; gap: 8px; min-width: 0; /* allow text ellipsis */
  }

  .oi-row-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
  .oi-order { font-weight: 600; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .oi-count { font-variant-numeric: tabular-nums; opacity: .9; }

  .oi-bar-wrap { background: #102720; border-radius: 10px; overflow: hidden; height: 12px; }
  .oi-bar { height: 100%; background: linear-gradient(90deg, var(--bar1), var(--bar2)); }

  .oi-empty {
    grid-column: 1 / -1; background: var(--panel); border: 1px dashed var(--divider);
    color: var(--muted); border-radius: 12px; padding: 12px; text-align: center;
  }
  /* ===== Details (Show more) ===== */
  .oi-more summary {
    cursor: pointer; list-style: none; user-select: none;
    font-size: .95rem; color: var(--muted);
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 10px; border-radius: 10px; border: 1px solid var(--divider);
    background: #15362b;
  }
  .oi-more summary::-webkit-details-marker { display: none; }
  .oi-more[open] summary { color: var(--ink); background: #194235; }

  /* ===== Compact mode for very large order lists ===== */
  .orders-infographic.compact .oi-title { font-size: .95rem; }
  .orders-infographic.compact .oi-total .num { font-size: 1.4rem; }
  .orders-infographic.compact .oi-row { padding: 8px 10px; }
  .orders-infographic.compact .oi-bar-wrap { height: 10px; }

@media (max-width: 465px){
  #orders-infographic{
    width: 80%;
  }
  body{
    margin: 0;
  }
}