:root {
  font-family: "Inter", "Segoe UI", sans-serif;
  background: #f7f9ff;
  color: #1a1a1a;
  --node-width: 220px;
  --branch-gap: 36px;
  --embed-padding-top: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: transparent;
}

.embed-wrapper {
  padding: 3px;
  width: 100%;
}

.embed-chart {
  position: relative;
  background: #ffffff;
  border-radius: 24px;
  padding: var(--embed-padding-top) 24px 24px;
  box-shadow: rgba(14, 30, 37, 0.12) 0px 2px 4px 0px, rgba(14, 30, 37, 0.32) 0px 2px 16px 0px;
  overflow: auto;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.embed-chart::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/img/logo.png") no-repeat;
  background-position: 5% 5%;
  background-size: 300px auto;
  opacity: 0.2;
  pointer-events: none;
  z-index: 0;
}

.embed-chart > * {
  position: relative;
  z-index: 1;
}

.org-chart {
  display: flex;
  justify-content: center;
  width: 100%;
}

.org-chart ul {
  position: relative;
  padding-top: 16px;
  padding-left: 0;
  margin: 0;
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: var(--branch-gap);
}

.org-chart li {
  position: relative;
  text-align: center;
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: var(--subtree-width, var(--node-width));
  min-width: var(--subtree-width, var(--node-width));
  max-width: var(--subtree-width, var(--node-width));
  flex: 0 0 var(--subtree-width, var(--node-width));
}

.embed-slogan {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.embed-slogan img {
  max-width: 320px;
  width: 100%;
  height: auto;
}


.org-chart li::before,
.org-chart li::after {
  content: "";
  position: absolute;
  top: 0;
  width: calc(50% + var(--branch-gap, 36px) / 2);
  height: 20px;
  border-top: 2px dashed rgba(33, 56, 109, 0.3);
}

.org-chart li::before {
  right: 50%;
  border-right: 2px dashed rgba(33, 56, 109, 0.3);
}

.org-chart li::after {
  left: 50%;
}

.org-chart li:only-child {
  padding-top: 0;
}

.org-chart li:only-child::before,
.org-chart li:only-child::after {
  display: none;
}

.org-chart li:first-child:not(:only-child)::before {
  border-top: none;
}

.org-chart li:last-child:not(:only-child)::after {
  border-top: none;
}

.org-chart ul ul::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 20px;
  border-left: 2px dashed rgba(33, 56, 109, 0.3);
}

.node-card {
  position: relative;
  background: #ffffff;
  border-radius: 12px;
  width: var(--node-width);
  box-shadow: 0 18px 36px rgba(33, 56, 109, 0.18);
  overflow: hidden;
}

.node-info {
  display: flex;
  flex-direction: column;
}

.node-role {
  display: block;
  padding: 10px;
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #ffffff;
  background: linear-gradient(135deg, #7f1d1d, #dc2626);
}

.node-name {
  font-weight: 700;
  font-size: 13px;
  color: #21376f;
  padding: 10px;
  border-bottom: 1px solid rgba(208, 216, 241, 0.6);
}

.node-description {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.node-description__item {
  text-align: left;
  border-bottom: 1px dashed rgba(210, 218, 239, 0.8);
  padding-bottom: 6px;
}

.node-description__item:last-child {
  border-bottom: none;
}

.node-description__title {
  font-size: 12px;
  font-weight: 600;
  color: #1f2a44;
}

.node-description__detail {
  font-size: 12px;
  color: #4a5979;
}

@media (max-width: 768px) {
  .embed-wrapper {
    padding: 3px;
  }

  .embed-chart {
    padding: max(var(--embed-padding-top), 6px) 12px 12px;
  }

  .embed-wrapper {
    --node-width: 180px;
  }
}
