/* mission-tree-1 — flat CSS (stable; nesting reverted after layout break) */

.mission-tree-1 {
  background: var(--color-bg);
  padding: 2.5rem var(--page-gutter) 3rem;
  color: #111;
}

.mission-tree-1__inner {
  max-width: var(--page-max);
  margin: 0 auto;
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  align-items: center;
  justify-items: center;
}

.mission-tree-1__copy {
  width: min(100%, 36rem);
  aspect-ratio: 2 / 1;
  order: 1;
}

.mission-tree-1__copy > .flow-shape__bg {
  background: var(--color-bg-soft, #e8e8ee);
}

.mission-tree-1__copy > .flow-shape__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.85rem;
  height: 100%;
  box-sizing: border-box;
  padding: clamp(1.25rem, 4cqi, 2.25rem) clamp(1.25rem, 5cqi, 2.75rem);
  text-align: center;
}

.mission-tree-1__title {
  margin: 0;
  font-size: calc(var(--text-heading) * 0.7);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: var(--text-heading-line);
  text-wrap: balance;
  color: #1e2a5a;
}

.mission-tree-1__text {
  margin: 0;
  max-width: 28rem;
  color: #3a3a48;
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  line-height: 1.45;
  text-wrap: balance;
}

.mission-tree-1__tree {
  display: block;
  width: 100%;
  order: 2;
}

.mission-tree-1__tree img,
.flow-tree img,
.flow-tree__blocks {
  display: none !important;
}

.flow-tree {
  position: relative;
  width: min(540px, 100%);
  aspect-ratio: 500 / 530;
  margin-inline: auto;
  container-type: inline-size;
  container-name: tree;
}

.flow-tree__frames {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.flow-tree__frame {
  position: absolute;
  inset: 0;
  display: block;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  pointer-events: none;
}

.flow-tree__frame[data-tree-frame="1"] { background-image: url("/images/elements/tree/1.svg"); }
.flow-tree__frame[data-tree-frame="2"] { background-image: url("/images/elements/tree/2.svg"); }
.flow-tree__frame[data-tree-frame="3"] { background-image: url("/images/elements/tree/3.svg"); }
.flow-tree__frame[data-tree-frame="4"] { background-image: url("/images/elements/tree/4.svg"); }
.flow-tree__frame[data-tree-frame="5"] { background-image: url("/images/elements/tree/5.svg"); }
.flow-tree__frame[data-tree-frame="6"] { background-image: url("/images/elements/tree/6.svg"); }
.flow-tree__frame[data-tree-frame="7"] { background-image: url("/images/elements/tree/7.svg"); }
.flow-tree__frame[data-tree-frame="8"] { background-image: url("/images/elements/tree/8.svg"); }
.flow-tree__frame[data-tree-frame="9"] { background-image: url("/images/elements/tree/9.svg"); }
.flow-tree__frame[data-tree-frame="10"] { background-image: url("/images/elements/tree/10.svg"); }
.flow-tree__frame[data-tree-frame="11"] { background-image: url("/images/elements/tree/11.svg"); }
.flow-tree__frame[data-tree-frame="12"] { background-image: url("/images/elements/tree/12.svg"); }
.flow-tree__frame[data-tree-frame="13"] { background-image: url("/images/elements/tree/13.svg"); }

.mission-tree-1__pills {
  list-style: none;
  margin: 0;
  padding: 0;
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.mission-tree-1__pill {
  position: absolute;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  margin: 0;
  padding: 0.35em 1.05em;
  border: 5px solid #fff;
  border-radius: 999px;
  font-size: clamp(0.7rem, 1.55cqi, 0.95rem);
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  text-wrap: balance;
  overflow: hidden;
  pointer-events: auto;
  color: #111;
  --pill-d5: 4;
  --pill-d10: 2;
  width: calc(var(--pill-d5) * 2.35cqi + var(--pill-d10) * 0.55cqi + 4.5rem);
  min-width: 210px;
  max-width: 50%;
  height: 80px;
  --anim-ox: -50%;
  --anim-oy: -50%;
  transform: translate(-50%, -50%);
  transform-origin: center center;
  --anim-end-opacity: 0.9;
  opacity: 0.9;
  will-change: transform, opacity;
  text-wrap: balance;
  font-size: 1rem;
}

.mission-tree-1__pill[data-d5="1"] { --pill-d5: 1; }
.mission-tree-1__pill[data-d5="2"] { --pill-d5: 2; }
.mission-tree-1__pill[data-d5="3"] { --pill-d5: 3; }
.mission-tree-1__pill[data-d5="4"] { --pill-d5: 4; }
.mission-tree-1__pill[data-d5="5"] { --pill-d5: 5; }
.mission-tree-1__pill[data-d5="6"] { --pill-d5: 6; }
.mission-tree-1__pill[data-d5="7"] { --pill-d5: 7; }
.mission-tree-1__pill[data-d5="8"] { --pill-d5: 8; }
.mission-tree-1__pill[data-d5="9"] { --pill-d5: 9; }
.mission-tree-1__pill[data-d5="10"] { --pill-d5: 10; }
.mission-tree-1__pill[data-d5="11"] { --pill-d5: 11; }
.mission-tree-1__pill[data-d5="12"] { --pill-d5: 12; }
.mission-tree-1__pill[data-d5="13"] { --pill-d5: 13; }
.mission-tree-1__pill[data-d5="14"] { --pill-d5: 14; }
.mission-tree-1__pill[data-d5="15"] { --pill-d5: 15; }
.mission-tree-1__pill[data-d5="16"] { --pill-d5: 16; }
.mission-tree-1__pill[data-d5="17"] { --pill-d5: 17; }
.mission-tree-1__pill[data-d5="18"] { --pill-d5: 18; }
.mission-tree-1__pill[data-d5="19"] { --pill-d5: 19; }
.mission-tree-1__pill[data-d5="20"] { --pill-d5: 20; }

.mission-tree-1__pill[data-d10="1"] { --pill-d10: 1; }
.mission-tree-1__pill[data-d10="2"] { --pill-d10: 2; }
.mission-tree-1__pill[data-d10="3"] { --pill-d10: 3; }
.mission-tree-1__pill[data-d10="4"] { --pill-d10: 4; }
.mission-tree-1__pill[data-d10="5"] { --pill-d10: 5; }
.mission-tree-1__pill[data-d10="6"] { --pill-d10: 6; }
.mission-tree-1__pill[data-d10="7"] { --pill-d10: 7; }
.mission-tree-1__pill[data-d10="8"] { --pill-d10: 8; }
.mission-tree-1__pill[data-d10="9"] { --pill-d10: 9; }
.mission-tree-1__pill[data-d10="10"] { --pill-d10: 10; }

.mission-tree-1__pill[data-pill-kind="title-text"] > span,
.mission-tree-1__pill > strong + span {
  display: block;
  font-weight: 400;
  font-size: 0.85em;
  font-size: 0.85rem;
  margin: 0;
  opacity: 0.9;
  line-height: 1.15;
}

.mission-tree-1__pill[data-pill-kind="title-text"] > strong,
.mission-tree-1__pill > strong {
  display: block;
  font-weight: 800;
  font-size: 1rem;
}

.mission-tree-1__pill[data-pill-kind="text"] > .flow-t {
  display: inline;
  font-size: inherit;
  font-weight: inherit;
  opacity: inherit;
  line-height: inherit;
}

.mission-tree-1__pill[data-c="pink"] { background: #d8107e; color: #fff; }
.mission-tree-1__pill[data-c="blue"] { background: #0498d1; color: #fff; }
.mission-tree-1__pill[data-c="orange"] { background: #ec672f; color: #fff; }
.mission-tree-1__pill[data-c="yellow"] { background: #fcd900; color: #111; }
.mission-tree-1__pill[data-c="purple"] { background: #713985; color: #fff; }

.mission-tree-1__pill:nth-child(1) { left: 48%; top: 11%; }
.mission-tree-1__pill:nth-child(2) { left: 18%; top: 35%; }
.mission-tree-1__pill:nth-child(3) { left: 82%; top: 33%; }
.mission-tree-1__pill:nth-child(4) { left: 64%; top: 55%; }
.mission-tree-1__pill:nth-child(5) { left: 10%; top: calc(84% - 15px); }
.mission-tree-1__pill:nth-child(6) { left: 55%; top: 96%; }
.mission-tree-1__pill:nth-child(7) { left: 93%; top: calc(84% - 15px); }

.mission-tree-1__pill:nth-child(5) { --anim-show: 4; }
.mission-tree-1__pill:nth-child(6) { --anim-show: 5; }
.mission-tree-1__pill:nth-child(7) { --anim-show: 6; }
.mission-tree-1__pill:nth-child(4) { --anim-show: 7; }
.mission-tree-1__pill:nth-child(2) { --anim-show: 9; }
.mission-tree-1__pill:nth-child(3) { --anim-show: 10; }
.mission-tree-1__pill:nth-child(1) { --anim-show: 12; }

@container tree (min-width: 420px) {
  .mission-tree-1__pill {
    padding: 0.35em 1.15em;
  }
}

@container page (max-width: 767px) {
  .mission-tree-1 {
    padding: 1.5rem var(--page-gutter) 2rem;
  }

  .mission-tree-1__copy {
    aspect-ratio: auto;
    width: 100%;
  }

  .mission-tree-1__copy > .flow-shape__content {
    padding: 1.1rem 1rem 1.2rem;
    gap: 0.55rem;
  }

  .mission-tree-1__title {
    font-size: clamp(0.92rem, 4.8cqi, 1.2rem);
  }

  .mission-tree-1__text {
    font-size: clamp(0.8rem, 3.6cqi, 0.96rem);
  }

  .flow-tree {
    width: min(100%, 22.5rem);
  }

  .mission-tree-1__pill {
    min-width: 0;
    max-width: 44%;
    width: max-content;
    height: auto;
    min-height: 2.1rem;
    padding: 0.2em 0.5em;
    border-width: 3px;
    font-size: clamp(0.6875rem, 2.8cqi, 0.78rem);
  }
}

@container page (min-width: 768px) and (max-width: 1099px) {
  .flow-tree {
    width: min(100%, 28rem);
  }

  .mission-tree-1__pill {
    min-width: 0;
    max-width: 46%;
    height: auto;
    min-height: 2.35rem;
    font-size: clamp(0.6875rem, 1.8cqi, 0.82rem);
  }
}

@container page (min-width: 1100px) {
  .mission-tree-1__inner {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 2rem;
    align-items: center;
    justify-items: stretch;
  }
  .mission-tree-1__copy { width: 100%; justify-self: stretch; }
  .mission-tree-1__tree { justify-self: end; }
  .flow-tree {
    width: min(560px, 100%);
    margin-inline: 0 0 auto;
  }
}

@container page (min-width: 1200px) {
  .mission-tree-1__inner { gap: 2.5rem; }
  .flow-tree { width: min(600px, 100%); }
}
