/* Hero-only changes from the refreshed architecture reference. */
.hero-architecture .v-architecture-solutions,
.hero-architecture .v-architecture-office,
.hero-architecture .v-architecture-workplace {
  background: rgba(218, 236, 249, .78);
}

.hero-architecture .v-architecture-people > span,
.hero-architecture .v-domain-tags > span,
.hero-architecture .v-document-tags > span {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: auto;
  min-width: 50px;
  height: 64px;
  padding: 9px 10px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.hero-architecture .v-system-tag svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: .8;
}

.hero-architecture .v-document-tags {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  min-width: 0;
  margin: 0;
}

.hero-architecture .v-architecture-office {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

/* All nine tools share the same icon, tile and label sizes. These rules also
   apply during legacy measurement, so the slot gains the real Office height
   instead of fitting the extra tools into the former four-tool space. */
.hero-architecture .v-document-tags > .v-system-tag {
  width: 100%;
  min-width: 0;
  min-height: 64px;
  height: auto;
  padding: 10px 4px;
  gap: 7px;
  font-size: 11px;
  letter-spacing: .01em;
  line-height: 1.3;
  white-space: normal;
  text-align: center;
}

.hero-architecture .v-document-tags > .v-system-tag > span {
  max-width: 100%;
  overflow-wrap: anywhere;
}

@container (max-width: 340px) {
  .hero-architecture .v-document-tags {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-architecture .v-document-tags > .v-system-tag:last-child {
    grid-column: 1 / -1;
    width: calc((100% - 8px) / 2);
    justify-self: center;
  }
}

.hero-architecture .v-architecture-middle {
  padding-block: 64px;
}

.hero-architecture .v-architecture-middle::before,
.hero-architecture .v-architecture-middle::after {
  display: none;
}

.hero-architecture .v-system-branch {
  display: block;
  position: absolute;
  left: calc(25% - 3px);
  width: calc(50% + 6px);
  height: 64px;
  overflow: visible;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  pointer-events: none;
}

.hero-architecture .v-system-branch path {
  vector-effect: non-scaling-stroke;
}

.hero-architecture .v-system-branch > path {
  stroke-opacity: .85;
}

.hero-architecture .v-system-branch .v-flow-route {
  stroke: none;
  fill: none;
}

.hero-architecture .v-system-branch .v-flow-dot {
  fill: #fff;
  stroke: none;
  filter: drop-shadow(0 0 2px #fff);
  opacity: 0;
}

.hero-architecture .is-flowing .v-architecture-top > .v-pill > i {
  animation: hero-governed-pulse 2.6s ease-in-out infinite;
}

@keyframes hero-governed-pulse {
  0%, 100% {
    box-shadow: 0 0 0 2px #178b9b30, 0 0 3px #178b9b35;
    transform: scale(1);
    opacity: .8;
  }
  50% {
    box-shadow: 0 0 0 6px #178b9b38, 0 0 10px #178b9b66;
    transform: scale(1.3);
    opacity: 1;
  }
}

.hero-architecture .v-system-branch-top {
  top: 0;
}

.hero-architecture .v-system-branch-bottom {
  bottom: 0;
  transform: rotate(180deg);
}

@media (prefers-reduced-motion: reduce) {
  .hero-architecture .is-flowing .v-architecture-top > .v-pill > i {
    animation: none;
  }
  .hero-architecture .v-system-branch .v-flow-dot {
    display: none;
  }
}

@media (max-width: 600px) {
  .hero-architecture .v-system-branch .v-flow-dot {
    display: none;
  }
  .hero-architecture .v-architecture-middle {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .hero-architecture .v-system-branch {
    left: calc(50% - 1px);
    width: 2px;
    background: #fff;
  }
  .hero-architecture .v-system-branch path {
    display: none;
  }
  .hero-architecture .v-architecture-solutions {
    position: relative;
  }
  .hero-architecture .v-architecture-solutions::before {
    content: "";
    position: absolute;
    left: calc(50% - 1px);
    top: -33px;
    width: 2px;
    height: 32px;
    background: #fff;
  }
}

/* Retain the existing diagram's forced-colors fallback after the color update. */
@media (forced-colors: active) {
  .hero-architecture .v-architecture-solutions,
  .hero-architecture .v-architecture-office,
  .hero-architecture .v-architecture-workplace {
    background: Canvas;
    color: CanvasText;
  }
}

/* Current reference: typography, prompt, uniform role tags and luminous runtime. */
.hero-architecture:not(.is-measuring-legacy) .v-architecture-top {
  flex-wrap: wrap;
  gap: 12px;
}

.hero-architecture:not(.is-measuring-legacy) .v-architecture-top > .v-kicker {
  font-size: 14.5px;
}

.hero-architecture:not(.is-measuring-legacy) .v-architecture-workplace-title strong {
  font-size: 29px;
}

.hero-architecture:not(.is-measuring-legacy) .v-architecture-unit > strong,
.hero-architecture:not(.is-measuring-legacy) .v-architecture-office strong {
  font-size: 23px;
}

.hero-architecture:not(.is-measuring-legacy) .v-architecture-prompt {
  grid-template-columns: minmax(0, 1fr) 16px;
  text-align: left;
  font-weight: 600;
  background: rgba(255, 255, 255, .65);
  border-color: transparent;
}

.hero-architecture:not(.is-measuring-legacy) .v-architecture-prompt::before {
  content: none;
}

.hero-architecture:not(.is-measuring-legacy) .v-architecture-people > span:first-child {
  background: rgba(255, 255, 255, .65);
  color: #344e67;
}

.hero-architecture:not(.is-measuring-legacy) .v-architecture-runtime {
  min-height: 68px;
  padding: 20px;
  gap: 18px;
  flex-wrap: wrap;
}

.hero-architecture:not(.is-measuring-legacy) .v-architecture-runtime > .v-kicker {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: .09em;
  color: #c0eaff;
}

.hero-architecture:not(.is-measuring-legacy) .v-architecture-runtime > div {
  font-size: 13px;
}

@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .hero-architecture:not(.is-measuring-legacy) .v-architecture-runtime > .v-kicker {
    background: linear-gradient(105deg, #7ecfff 0%, #bdeaff 24%, #fff 42%, #fff 50%, #83d3ff 68%, #bdeaff 85%, #7ecfff 100%);
    background-size: 250% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: hero-runtime-light 3.2s linear infinite;
    animation-play-state: paused;
  }

  .hero-architecture:not(.is-measuring-legacy) .is-flowing .v-architecture-runtime > .v-kicker {
    animation-play-state: running;
  }
}

@keyframes hero-runtime-light {
  from { background-position: 200% 50%; }
  to { background-position: 0% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-architecture:not(.is-measuring-legacy) .v-architecture-runtime > .v-kicker {
    animation: none;
    background: none;
    color: #d7f2ff;
    -webkit-text-fill-color: currentColor;
  }
}

@media (forced-colors: active) {
  .hero-architecture:not(.is-measuring-legacy) .v-architecture-people > span:first-child {
    background: Canvas;
    color: CanvasText;
  }

  .hero-architecture:not(.is-measuring-legacy) .v-architecture-runtime > .v-kicker {
    animation: none;
    background: none;
    color: CanvasText;
    -webkit-text-fill-color: currentColor;
  }
}

/* Fit the reference proportionally into the previous diagram's layout slot.
   All surrounding hero geometry remains governed by the existing styles. */
.hero-architecture.is-layout-preserved:not(.is-measuring-legacy) {
  position: relative;
  height: var(--hero-slot-height);
}

.hero-architecture.is-layout-preserved:not(.is-measuring-legacy) > .v-architecture {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  transform: translate(-50%, -50%) scale(var(--hero-fit-scale, 1));
  transform-origin: center;
}
