:root {
  --ink: #3b146b;
  --yellow: #e4cfff;
  --paper: #fbf8ff;
  --line: #70429a;
  --sans: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--paper); font-family: var(--sans); }
button { font: inherit; }

.orc-page { min-height: 100vh; padding: clamp(2.25rem, 4vw, 4.8rem) 0 4rem; }
.orc-heading { width: min(100% - 2rem, 2360px); margin: 0 auto 1.7rem; text-align: center; }
.orc-heading h1 { margin: 0; font-size: clamp(2rem, 3.25vw, 4.3rem); font-weight: 800; letter-spacing: -.055em; line-height: .95; }
.orc-heading h1 strong { margin-right: .27em; }

.chart-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: min(100% - 2rem, 1320px); margin: 0 auto 1.1rem; color: var(--ink); }
.chart-toolbar p { margin: 0; font-size: .76rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.zoom-controls { display: inline-flex; align-items: center; gap: .38rem; }
.zoom-controls button, .zoom-controls output { display: grid; min-width: 34px; height: 32px; place-items: center; border: 1px solid rgba(59,20,107,.28); border-radius: 7px; color: var(--ink); background: var(--paper); font-size: .9rem; font-weight: 800; }
.zoom-controls button { cursor: pointer; transition: color .16s ease, background .16s ease, transform .16s ease; }
.zoom-controls button:hover, .zoom-controls button:focus-visible { color: var(--paper); background: var(--ink); outline: none; transform: translateY(-1px); }
.zoom-controls output { min-width: 48px; color: var(--ink); }
.zoom-controls .zoom-fit { width: auto; padding: 0 .7rem; font-size: .72rem; }

.chart-scroll { width: 100%; overflow: auto; padding: 0 1rem 3rem; scrollbar-color: var(--line) transparent; }
.chart-stage { position: relative; min-height: 1px; margin: 0 auto; }
.org-chart { --chart-zoom: 1; position: absolute; top: 0; left: 50%; width: 2360px; transform: translateX(-50%) scale(var(--chart-zoom)); transform-origin: top center; }
.org-tree { position: relative; width: 2360px; margin: 0 auto; padding: 0 20px 48px; }
.connector-layer { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.connector-layer path { fill: none; stroke: var(--line); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }

.org-card { position: relative; z-index: 2; width: 280px; height: 280px; overflow: hidden; padding: .88rem .92rem; border-radius: 13px; color: var(--paper); background: var(--ink); box-shadow: 0 7px 16px rgba(59,20,107,.16); text-align: center; }
.org-card.is-values { color: var(--paper); background: var(--ink); }
.card-heading { display: flex; align-items: center; justify-content: center; gap: .42rem; min-height: 29px; }
.card-icon { display: grid; flex: 0 0 auto; width: 19px; height: 19px; place-items: center; color: var(--yellow); }
.card-icon svg { display: block; width: 100%; height: 100%; stroke: currentColor; stroke-width: 1.8; }
.card-title { margin: 0 0 .12rem; color: var(--yellow); font-size: .86rem; font-weight: 800; letter-spacing: -.035em; line-height: 1.03; }
.card-person { margin: 0; color: var(--paper); font-size: .73rem; font-weight: 800; line-height: 1.07; }
.card-divider { height: 1px; margin: .62rem 0 .58rem; background: rgba(255,255,255,.38); }
.card-responsibilities { display: grid; gap: .27rem; margin: 0; padding: 0 0 0 .76rem; color: rgba(255,255,255,.97); font-size: .56rem; font-weight: 500; line-height: 1.2; text-align: left; }
.card-responsibilities li { padding-left: .02rem; }
.card-team { margin: .57rem 0 0; padding-top: .48rem; border-top: 1px solid rgba(255,255,255,.38); color: rgba(255,255,255,.9); font-size: .53rem; font-weight: 650; line-height: 1.18; text-align: left; }

.executive-row { position: relative; display: flex; justify-content: center; width: 100%; min-height: 340px; }
.executive-primary { width: 280px; }
.executive-support { position: absolute; top: 160px; left: calc(50% + 230px); width: 280px; }
.executive-row--direction { min-height: 540px; }

.department-row { position: relative; display: grid; grid-template-columns: repeat(5, 280px); justify-content: center; align-items: start; gap: 160px; padding-top: 84px; }
.department { position: relative; width: 280px; padding-top: 30px; }
.branch { position: relative; margin-top: 32px; padding-top: 30px; }
.branch--pair { display: grid; grid-template-columns: repeat(2, 280px); width: 576px; gap: 16px; margin-left: -148px; }
.branch--yolidero { width: 280px; margin-right: auto; margin-left: auto; }
.spiritual-reports { position: relative; display: grid; grid-template-columns: repeat(4, 280px); width: 1168px; gap: 16px; margin-top: 32px; margin-left: -296px; padding-top: 30px; }

@media (max-width: 760px) {
  .orc-page { padding-top: 1.8rem; }
  .orc-heading { width: calc(100% - 1.75rem); margin-bottom: 1.3rem; }
  .orc-heading h1 { font-size: clamp(1.9rem, 10vw, 2.7rem); }
  .chart-toolbar { width: calc(100% - 1.75rem); }
  .chart-toolbar p { display: none; }
  .zoom-controls { margin-left: auto; }
  .chart-scroll { padding-right: .55rem; padding-left: .55rem; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto; transition-duration: .01ms !important; } }
