/* Pyramid sections share one coordinate system, including their connectors and portrait. */
#ecosystem .eco-diagram { --eco-tier-height: 180px; --eco-tier-gap: 18px; padding-top: 0; container: eco-pyramid / inline-size; align-self: start; }
#ecosystem .eco-levels { gap: var(--eco-tier-gap); }
#ecosystem .eco-level { align-self: stretch; width: 100%; height: var(--eco-tier-height); padding: 0; }
#ecosystem .eco-level--ai { height: 130px; }
#ecosystem .eco-level--process { height: 140px; }
#ecosystem .eco-level--data { height: 144px; }
#ecosystem .eco-level--owner .eco-slab { inset: 0; width: 100%; height: 100%; }
#ecosystem .eco-slab { stroke-linejoin: round; }
#ecosystem .eco-level:not(.eco-level--owner)::before,
#ecosystem .eco-level:not(.eco-level--owner)::after { content: none; }
#ecosystem .eco-connector { position: absolute; top: calc(-1 * var(--eco-tier-gap)); left: 50%; width: 16px; height: var(--eco-tier-gap); transform: translateX(-50%); overflow: visible; pointer-events: none; }
#ecosystem .eco-connector path { fill: none; stroke: var(--green); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
#ecosystem .eco-level-content { position: absolute; left: 50%; bottom: 50%; width: calc(100% - 44px); transform: translate(-50%, 50%); }
#ecosystem .eco-level--ai .eco-level-content { bottom: 10px; width: calc(64% - 16px); transform: translateX(-50%); }
#ecosystem .eco-level--process .eco-level-content { width: calc(84% - 24px); }
#ecosystem .eco-level h3 { font-size: 14px; }
#ecosystem .eco-level--ai .eco-level-content > p { max-width: 190px; margin-inline: auto; }
#ecosystem .eco-levels .eco-tags { display: flex; }
#ecosystem .eco-levels .eco-tags--process { display: grid; grid-template-columns: repeat(4, max-content); }
#ecosystem .eco-levels .eco-level--data .eco-tags { display: grid; grid-template-columns: repeat(4, max-content); gap: 8px; }
#ecosystem .eco-levels .eco-level--data .eco-tags li { justify-content: center; gap: 7px; min-height: 36px; padding: 7px 10px; font-size: 13px; }
#ecosystem .eco-levels .eco-level--data .eco-tags .eco-icon { width: 18px; height: 18px; }
#ecosystem .eco-sources { display: none; }
/* The portrait and its caption are clipped to the same triangle as the surface. */
#ecosystem .eco-owner-scene { position: absolute; inset: 0; overflow: hidden; }
#ecosystem .eco-person { z-index: 0; top: 36px; left: 50%; width: 150px; height: 144px; transform: translateX(-50%); -webkit-mask-image: linear-gradient(#000 60%, transparent 100%); mask-image: linear-gradient(#000 60%, transparent 100%); }
#ecosystem .eco-person img { width: 150px; height: 150px; }
#ecosystem .eco-owner-label { position: absolute; z-index: 1; left: 50%; bottom: 5px; width: calc(var(--eco-owner-base) * .84); margin: 0; transform: translateX(-50%); text-align: center; }
#ecosystem .eco-owner-label::before { position: absolute; z-index: -1; left: -60px; right: -60px; top: -24px; bottom: -8px; background: linear-gradient(180deg, transparent, rgba(4, 25, 35, .84) 38%, rgba(6, 35, 48, .98)); content: ""; }
#ecosystem .eco-owner-label h3 { display: block; margin: 0; color: var(--text); font: 500 clamp(9px, 2cqw, 13px)/1.25 var(--font-heading); white-space: nowrap; }
#ecosystem .eco-owner-label p { margin: 3px 0 0; color: var(--text-secondary); font-size: clamp(8px, 1.65cqw, 10px); line-height: 1.25; text-wrap: balance; }
#ecosystem .eco-depth { pointer-events: none; stroke: none; }
#ecosystem .eco-depth-stop { stop-color: var(--green); }
#ecosystem .eco-depth-shadow { stop-color: #000; }
#ecosystem .eco-depth-rim { fill: none; stroke: var(--green); stroke-width: 1; opacity: .34; }
@container eco-pyramid (max-width: 480px) {
  #ecosystem .eco-level h3 { gap: 6px; font-size: 13px; }
  #ecosystem .eco-level h3 .eco-icon { width: 20px; height: 20px; }
  #ecosystem .eco-level--ai h3 .eco-icon { display: none; }
  #ecosystem .eco-levels .eco-level--data .eco-tags li { padding-inline: 8px; font-size: 12px; }
  #ecosystem .eco-levels .eco-level--data .eco-tags .eco-icon { width: 17px; height: 17px; }
}
@media (max-width: 899px) {
  #ecosystem .eco-diagram { --eco-tier-gap: 18px; }
  #ecosystem .eco-level--owner { height: 210px; }
  #ecosystem .eco-level-content { width: calc(100% - 30px); }
  #ecosystem .eco-level--ai .eco-level-content { width: calc(74% - 8px); }
  #ecosystem .eco-level--process .eco-level-content { width: calc(88% - 12px); }
  #ecosystem .eco-levels .eco-tags { gap: 6px; margin-top: 12px; }
  #ecosystem .eco-levels .eco-tags li { min-height: 29px; padding: 5px 6px; font-size: 11px; }
  #ecosystem .eco-levels .eco-tags .eco-icon { width: 14px; height: 14px; }
  #ecosystem .eco-levels .eco-tags--process li { justify-content: center; }
  #ecosystem .eco-levels .eco-level--ai .eco-tags li { justify-content: center; font-size: 10px; }
  #ecosystem .eco-levels .eco-level--data .eco-tags li { min-height: 36px; gap: 5px; padding: 6px; font-size: 12px; white-space: normal; }
  #ecosystem .eco-levels .eco-level--data .eco-tags .eco-icon { width: 17px; height: 17px; }
  #ecosystem .eco-person { top: 20px; width: 180px; height: 190px; }
  #ecosystem .eco-person img { width: 180px; height: 180px; }
  #ecosystem .eco-owner-label { bottom: 10px; width: calc(var(--eco-owner-base) * .82); }
  #ecosystem .eco-owner-label h3 { font-size: 14px; }
  #ecosystem .eco-owner-label p { font-size: 10px; }
}
@container eco-pyramid (max-width: 330px) {
  #ecosystem .eco-level--owner { height: 195px; }
  #ecosystem .eco-level h3 { font-size: 12px; }
  #ecosystem .eco-level h3 .eco-icon { width: 18px; height: 18px; }
  #ecosystem .eco-level p { font-size: 10px; }
  #ecosystem .eco-levels .eco-level--data .eco-tags li { min-height: 35px; font-size: 12px; }
  #ecosystem .eco-owner-label h3 { font-size: 13px; }
  #ecosystem .eco-owner-label p { font-size: 9px; }
}

/* A single-line process heading leaves room for larger, readable function tags. */
#ecosystem .eco-level--process h3 { white-space: nowrap; }
#ecosystem .eco-levels .eco-tags--process { gap: 8px; }
#ecosystem .eco-levels .eco-tags--process li { justify-content: center; gap: 6px; min-height: 33px; padding: 6px 8px; font-size: 12px; }
#ecosystem .eco-levels .eco-tags--process .eco-icon { width: 16px; height: 16px; }

@media (max-width: 899px) {
  #ecosystem .eco-levels .eco-tags--process { width: max-content; max-width: 100%; margin-inline: auto; }
}
@container eco-pyramid (max-width: 480px) {
  #ecosystem .eco-levels .eco-tags--process li { padding-inline: 6px; }
}

/* Four functions and four sources stay on a single row inside their shorter tiers. */
#ecosystem .eco-levels .eco-tags--process,
#ecosystem .eco-levels .eco-level--data .eco-tags { align-items: stretch; width: max-content; max-width: 100%; margin-inline: auto; }
#ecosystem .eco-levels .eco-level--data .eco-tags li { white-space: nowrap; }
@container eco-pyramid (max-width: 536px) {
  #ecosystem .eco-level--process,
  #ecosystem .eco-level--data { height: 164px; }
  #ecosystem .eco-levels .eco-tags--process,
  #ecosystem .eco-levels .eco-level--data .eco-tags { gap: 6px; }
  #ecosystem .eco-levels .eco-tags--process li,
  #ecosystem .eco-levels .eco-level--data .eco-tags li { flex-direction: column; justify-content: center; gap: 5px; padding: 7px 6px; }
  #ecosystem .eco-levels .eco-level--data .eco-tags li { justify-content: flex-start; }
  #ecosystem .eco-levels .eco-level--data .eco-tags li:last-child { max-width: 84px; white-space: normal; text-wrap: balance; }
}
@container eco-pyramid (max-width: 330px) {
  #ecosystem .eco-levels .eco-tags--process,
  #ecosystem .eco-levels .eco-level--data .eco-tags { gap: 5px; }
  #ecosystem .eco-levels .eco-tags--process li,
  #ecosystem .eco-levels .eco-level--data .eco-tags li { padding-inline: 4px; font-size: 11px; }
  #ecosystem .eco-levels .eco-tags--process .eco-icon { width: 14px; height: 14px; }
}

/* Three AI functions in one row; narrower diagrams use the same stacked-icon pattern as the other tiers. */
#ecosystem .eco-levels .eco-level--ai .eco-tags { display: grid; grid-template-columns: repeat(3, max-content); align-items: stretch; width: max-content; max-width: 100%; gap: 4px; margin-inline: auto; }
#ecosystem .eco-levels .eco-level--ai .eco-tags li { justify-content: center; gap: 4px; min-height: 27px; padding: 5px 4px; font-size: 10px; }
@container eco-pyramid (max-width: 536px) {
  #ecosystem .eco-level--ai h3 .eco-icon { display: none; }
  #ecosystem .eco-levels .eco-level--ai .eco-tags li { flex-direction: column; }
}
