<!-- 피라미드 계층: 위에서 아래로 넓어지는 계층 구조 (SVG) -->
<!--
  📋 pyramid-hierarchy
  ─────────────────
  용도: 위계, 우선순위, 상위→하위 개념 (좁은→넓은)
  슬롯: levels[] (상단부터, 각 레벨에 label, color)
-->
<div class="block-pyramid">
  <svg viewBox="0 0 500 {{ levels|length * 70 + 20 }}" width="100%" xmlns="http://www.w3.org/2000/svg" font-family="Pretendard Variable, sans-serif">
    <defs>
      {% for level in levels %}
      <linearGradient id="pyrGrad{{ loop.index }}" x1="0" y1="0" x2="1" y2="0">
        <stop offset="0%" stop-color="{{ level.color | default('#2563eb') }}" />
        <stop offset="100%" stop-color="{{ level.color | default('#2563eb') }}" stop-opacity="0.7" />
      </linearGradient>
      {% endfor %}
      <filter id="pyrShadow">
        <feDropShadow dx="0" dy="2" stdDeviation="3" flood-opacity="0.12" />
      </filter>
    </defs>
    {% for level in levels %}
    {% set i = loop.index0 %}
    {% set y = i * 65 + 10 %}
    {% set w_half = 60 + i * 55 %}
    <rect x="{{ 250 - w_half }}" y="{{ y }}" width="{{ w_half * 2 }}" height="50" rx="6" fill="url(#pyrGrad{{ loop.index }})" filter="url(#pyrShadow)" />
    <text x="250" y="{{ y + 30 }}" text-anchor="middle" fill="white" font-size="14" font-weight="700">{{ level.label }}</text>
    {% endfor %}
  </svg>
</div>

<style>
.block-pyramid {
  display: flex;
  justify-content: center;
  padding: 10px 0;
}
.block-pyramid svg {
  max-width: 450px;
}
</style>
