/* =========================================================
   Trees A Crowd — 56(ish) Trees 2026
   Loaded only by trees56-2026.php, after homepage-2026.css
   (which supplies the colours, buttons, chips, mini player and base resets).
   ========================================================= */

.tac-t56 [hidden] {
  display: none !important;
}

/* ---------- Banner: title in white over the series artwork ---------- */
.tac-t56-banner {
  position: relative;
  display: flex;
  align-items: flex-end;
  height: 220px;
  background-color: var(--tac-brown);
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
}
.tac-t56-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(40, 30, 20, 0.6) 0%, rgba(40, 30, 20, 0.22) 50%, rgba(40, 30, 20, 0) 80%);
  pointer-events: none;
}
.tac-t56-banner .tac-banner-inner {
  position: relative;
  padding-bottom: 16px;
}
.tac-home .tac-t56-kicker {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--tac-peach);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
  margin-bottom: 4px;
}
.tac-home .tac-t56-title {
  font-size: clamp(40px, 10.5vw, 68px);
  line-height: 1;
  color: var(--tac-white);
  margin: 0;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35), 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ---------- Intro ---------- */
.tac-t56-intro {
  padding-top: 24px;
  padding-bottom: 32px;
}
/* "A tree at random": a compact card after the intro on phones,
   a tilted square beside the intro on wider screens. */
.tac-t56-intro {
  display: flex;
  flex-direction: column;
}
.tac-t56-intro__main {
  order: 1;
}
.tac-t56-cover {
  order: 2;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin: 24px 0 0;
  padding: 10px;
  background: var(--tac-white);
}
.tac-t56-cover__art {
  position: relative;
}
.tac-t56-cover img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--tac-cream);
}
.tac-t56-cover .tac-round-play {
  right: 4px;
  bottom: 4px;
  width: 40px;
  height: 40px;
}
.tac-t56-cover figcaption {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.tac-t56-cover__kicker {
  font-size: 14px;
  font-weight: 700;
  color: var(--tac-orange);
}
.tac-home a.tac-t56-cover__name,
.tac-home a.tac-t56-cover__name:visited {
  font-size: 19px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--tac-text);
  text-decoration: none;
}
.tac-home a.tac-t56-cover__name:hover {
  color: var(--tac-orange);
}
.tac-t56-cover__name span {
  display: block;
  font-size: 14px;
  font-weight: 400;
  color: var(--tac-brown);
}
.tac-home .tac-t56-lede {
  max-width: 30em;
  font-size: 20px;
  line-height: 1.4;
  font-weight: 700;
  color: var(--tac-text);
  margin-bottom: 14px;
}
.tac-t56-text {
  max-width: 40em;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tac-home .tac-t56-text p {
  font-size: 17px;
  line-height: 1.55;
  color: var(--tac-text);
}
.tac-home .tac-t56-text a,
.tac-home .tac-t56-thanks a {
  color: var(--tac-brown);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.tac-home .tac-t56-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.tac-t56-facts li {
  padding: 6px 12px;
  background: var(--tac-white);
  border-left: 4px solid var(--tac-orange);
  font-size: 15px;
  color: var(--tac-brown);
}
.tac-t56-facts strong {
  font-weight: 700;
}
.tac-home .tac-t56-credits {
  margin-top: 10px;
  font-size: 15px;
  font-style: italic;
  color: var(--tac-brown);
}
.tac-t56-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.tac-t56-actions .tac-btn {
  white-space: normal;
  text-align: left;
}

/* "David's introduction" and per-tree notes: native disclosure widgets */
.tac-t56 details > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--tac-brown);
}
.tac-t56 details > summary::-webkit-details-marker {
  display: none;
}
.tac-t56 details > summary::before {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid currentColor;
  font-size: 16px;
  line-height: 1;
  flex: none;
}
.tac-t56 details[open] > summary::before {
  content: "−";
}
.tac-t56 details > summary:hover {
  color: var(--tac-orange);
}
.tac-t56-more {
  margin-top: 22px;
}
.tac-t56-more > summary {
  font-size: 17px;
}
.tac-t56-more .tac-t56-text {
  margin-top: 12px;
}

/* ---------- Find a tree ---------- */
.tac-t56-find {
  background: var(--tac-white);
  padding: 20px 0 18px;
  border-top: 1px solid rgba(93, 74, 54, 0.15);
  border-bottom: 1px solid rgba(93, 74, 54, 0.15);
}
.tac-t56-search {
  max-width: 560px;
}
.tac-t56-label,
.tac-home .tac-t56-jump__label {
  display: block;
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--tac-text);
}
.tac-home .tac-t56-search input {
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 48px;
  margin: 0;
  padding: 0 18px;
  border: 2px solid var(--tac-brown);
  border-radius: 999px;
  background: var(--tac-white);
  box-shadow: none;
  font-family: inherit;
  font-size: 17px;
  color: var(--tac-text);
}
.tac-home .tac-t56-search input:focus {
  outline: 3px solid var(--tac-peach);
  outline-offset: 0;
  border-color: var(--tac-orange);
}
.tac-home .tac-t56-count {
  margin-top: 8px;
  font-size: 15px;
  min-height: 1.5em;
}
.tac-t56-jump {
  margin-top: 8px;
}
/* One swipeable row of family chips on phones; wraps on wider screens */
.tac-home .tac-t56-jump ul {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  margin: 0 -16px;
  padding: 2px 16px 10px;
}
.tac-t56-jump li {
  flex: none;
}

/* ---------- The trees ---------- */
.tac-t56-trees {
  padding-top: 36px;
  padding-bottom: 24px;
}
.tac-t56-group + .tac-t56-group {
  margin-top: 48px;
}
.tac-t56-group .tac-heading {
  margin-bottom: 6px;
}
.tac-home .tac-t56-group__intro {
  max-width: 40em;
  font-size: 16px;
  line-height: 1.5;
  color: var(--tac-text);
  margin-bottom: 8px;
}
.tac-t56-family {
  padding-top: 20px;
  scroll-margin-top: 16px;
}
.tac-home .tac-t56-family__name {
  font-size: 20px;
  line-height: 1.2;
  color: var(--tac-brown);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--tac-peach);
}
.tac-t56-family__name span {
  font-weight: 400;
  font-size: 16px;
  color: var(--tac-text);
  margin-left: 6px;
}
.tac-home .tac-t56-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: start;
}

/* Phone: art on the left, text on the right, notes underneath */
.tac-tree {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px 14px;
  padding: 10px;
  background: var(--tac-white);
  scroll-margin-top: 16px;
}
.tac-tree:target {
  outline: 3px solid var(--tac-orange);
  outline-offset: 0;
}
.tac-tree__art {
  position: relative;
  grid-column: 1;
  grid-row: 1;
  align-self: start;
}
.tac-tree__art img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--tac-cream);
}
.tac-tree__art .tac-round-play {
  right: 4px;
  bottom: 4px;
  width: 40px;
  height: 40px;
}
.tac-tree__body {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  align-self: center;
}
.tac-home .tac-tree__num {
  font-size: 14px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--tac-orange);
}
.tac-home .tac-tree__name {
  font-family: inherit;
  font-size: 19px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--tac-text);
  margin: 0;
}
.tac-home .tac-tree__latin {
  font-size: 15px;
  line-height: 1.35;
  font-style: italic;
  color: var(--tac-brown);
}
.tac-home abbr.tac-ish {
  font-size: 0.72em;
  font-weight: 700;
  color: var(--tac-orange);
  text-decoration: none;
  border: 0;
  cursor: help;
  white-space: nowrap;
}
.tac-tree__notes {
  grid-column: 1 / -1;
  grid-row: 2;
  border-top: 1px solid rgba(93, 74, 54, 0.15);
  padding-top: 8px;
}
.tac-tree__notes > summary {
  font-size: 15px;
}
.tac-tree__notes-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 2px 4px;
}
.tac-home .tac-tree__notes-body p,
.tac-home .tac-tree__links li {
  font-size: 15px;
  line-height: 1.45;
  color: var(--tac-text);
}
.tac-home .tac-tree__thanks {
  font-style: italic;
}
.tac-home .tac-tree__links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tac-tree__links li {
  position: relative;
  padding-left: 16px;
}
.tac-tree__links li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tac-orange);
}
.tac-home .tac-tree__notes-body a,
.tac-home .tac-tree__notes-body a:visited {
  color: var(--tac-brown);
  text-decoration: underline;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}
.tac-home .tac-tree__notes-body a:hover {
  color: var(--tac-orange);
}
.tac-home .tac-tree__extra {
  padding-left: 12px;
  border-left: 3px solid var(--tac-peach);
  font-size: 14px;
}
.tac-home .tac-tree__acast {
  font-size: 14px;
}

.tac-home .tac-t56-empty {
  margin-top: 24px;
  font-size: 17px;
  color: var(--tac-text);
}
.tac-home .tac-t56-legend {
  margin-top: 28px;
  font-size: 15px;
  color: var(--tac-text);
}

/* ---------- Thanks ---------- */
.tac-t56-thanks {
  background: var(--tac-peach);
  padding: 44px 0;
}
.tac-t56-thanks__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.tac-t56-thanks__item {
  padding: 18px 20px;
  background: var(--tac-cream);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tac-home .tac-t56-sub {
  font-size: 19px;
  line-height: 1.2;
  color: var(--tac-brown);
}
.tac-home .tac-t56-thanks__item p {
  font-size: 16px;
  line-height: 1.55;
  color: var(--tac-text);
}

/* ---------- More ---------- */
.tac-t56-more-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 32px;
  padding-bottom: 48px;
}

/* ---------- Larger screens ---------- */
@media (min-width: 40em) {
  .tac-t56-banner {
    height: 300px;
  }
  .tac-t56-banner .tac-banner-inner {
    padding-bottom: 24px;
  }
  .tac-t56-intro {
    padding-top: 32px;
  }
  .tac-home .tac-t56-jump ul {
    flex-wrap: wrap;
    overflow: visible;
    margin: 0;
    padding: 2px 0 0;
  }
  /* Cards: big artwork on top */
  .tac-home .tac-t56-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
  }
  .tac-tree {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 0 0 12px;
  }
  .tac-tree__art {
    grid-column: 1;
    grid-row: 1;
  }
  .tac-tree__art .tac-round-play {
    right: 8px;
    bottom: 8px;
    width: 48px;
    height: 48px;
  }
  .tac-tree__body {
    grid-column: 1;
    grid-row: 2;
    padding: 0 14px;
    align-self: start;
  }
  .tac-tree__notes {
    grid-row: 3;
    margin: 0 14px;
  }
  .tac-t56-thanks__grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}
/* Wider screens: small families sit side by side (in order) instead of
   each taking a whole row. Each family spans as many columns as it has
   episodes, up to the row width (--n3 / --n4 are set in the template). */
@media (min-width: 40em) {
  .tac-t56-group {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 16px;
  }
  .tac-t56-group > .tac-heading,
  .tac-t56-group > .tac-t56-group__intro {
    grid-column: 1 / -1;
  }
  .tac-t56-family {
    grid-column: span var(--n3, 1);
    display: flex;
    flex-direction: column;
  }
  .tac-home .tac-t56-family .tac-t56-grid {
    grid-template-columns: repeat(var(--n3, 1), minmax(0, 1fr));
  }
  .tac-t56-family__name span {
    display: block;
    margin: 2px 0 0;
  }
  .tac-t56-intro.has-cover {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 32px;
    align-items: start;
  }
  .tac-t56-cover {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 12px 12px 16px;
    grid-column: 2;
    grid-row: 1;
    transform: rotate(2deg);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  }
  .tac-t56-cover .tac-round-play {
    right: 8px;
    bottom: 8px;
    width: 48px;
    height: 48px;
  }
  .tac-t56-intro__main {
    grid-column: 1;
    grid-row: 1;
  }
}
@media (min-width: 64em) {
  .tac-t56-banner {
    height: 400px;
  }
  .tac-t56-group {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .tac-t56-family {
    grid-column: span var(--n4, 1);
  }
  .tac-home .tac-t56-family .tac-t56-grid {
    grid-template-columns: repeat(var(--n4, 1), minmax(0, 1fr));
  }
  .tac-t56-intro.has-cover {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 48px;
  }
}
