.how-page {
  --factory-green: #168a58;
  --factory-green-dark: #0b5b3a;
  --factory-green-soft: #e7f6ee;
  background: white;
}

.how-page .site-header {
  justify-content: flex-start;
  gap: 48px;
}

.how-page .site-navigation {
  flex: 1;
}

.how-shell {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.architecture-section {
  padding: clamp(72px, 8vw, 112px) 0 clamp(88px, 10vw, 140px);
  background: var(--bg-page);
}

.how-title {
  margin-bottom: clamp(40px, 5vw, 64px);
}

.how-title h1 {
  max-width: 1000px;
  margin: 0;
  color: var(--text-heading);
  font-size: clamp(46px, 6.8vw, 88px);
  font-weight: var(--fw-medium);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.capability-map {
  position: relative;
  padding: clamp(24px, 4vw, 52px);
  overflow: hidden;
  border: 1px solid rgba(20, 71, 220, 0.14);
  border-radius: 32px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.92) 66%, rgba(237, 249, 242, 0.9)),
    white;
  box-shadow: 0 34px 100px rgba(38, 30, 61, 0.12);
}

.capability-map::before {
  position: absolute;
  top: -180px;
  right: -130px;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(18, 200, 255, 0.17), transparent 68%);
  content: "";
  pointer-events: none;
}

.capability-map__caption {
  position: relative;
  z-index: 1;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(38, 30, 61, 0.13);
}

.capability-map__caption strong {
  color: var(--text-heading);
  font-size: clamp(20px, 2.1vw, 29px);
  font-weight: var(--fw-medium);
  letter-spacing: -0.025em;
}

.service-flow {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1.18fr) 40px minmax(0, 1.18fr);
  gap: 10px;
  align-items: stretch;
  padding: 38px 0 30px;
}

.service-node {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 14px;
  align-items: center;
  min-height: 112px;
  padding: 20px;
  border: 1px solid rgba(38, 30, 61, 0.13);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 30px rgba(38, 30, 61, 0.06);
}

.service-node__index {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: var(--brand-blue);
  background: var(--bg-soft-blue);
  font-size: 11px;
  font-weight: var(--fw-bold);
}

.service-node h3 {
  margin: 0 0 5px;
  color: var(--text-heading);
  font-size: 16px;
  font-weight: var(--fw-medium);
  line-height: 1.25;
}

.service-node p {
  margin: 0;
  color: var(--text-body);
  font-size: 12px;
  line-height: 1.45;
}

.flow-arrow {
  display: grid;
  place-items: center;
  color: var(--brand-blue);
  font-size: 27px;
}

.branch-connector {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 54px;
  margin: 0;
}

.branch-connector::before,
.branch-connector span::before,
.branch-connector span::after {
  position: absolute;
  width: 1px;
  background: rgba(20, 71, 220, 0.32);
  content: "";
}

.branch-connector::before {
  top: -31px;
  left: 84%;
  height: 31px;
}

.branch-connector::after {
  position: absolute;
  top: 0;
  left: 13%;
  width: 71%;
  height: 1px;
  background: rgba(20, 71, 220, 0.32);
  content: "";
}

.branch-connector span::before {
  top: 0;
  left: 13%;
  height: 54px;
}

.branch-connector span::after {
  top: 0;
  left: 64%;
  height: 54px;
}

.plane-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(230px, 0.64fr) minmax(0, 1.7fr);
  gap: 22px;
}

.domain-plane,
.ai-plane {
  border-radius: 24px;
}

.domain-plane {
  align-self: start;
  padding: 26px;
  border: 1px solid rgba(38, 30, 61, 0.13);
  background: rgba(255, 255, 255, 0.7);
}

.domain-plane h3 {
  margin: 0 0 6px;
  color: var(--text-heading);
  font-size: 24px;
  font-weight: var(--fw-medium);
  letter-spacing: -0.025em;
}

.domain-plane p {
  margin: 0;
  color: var(--text-body);
  font-size: 13px;
}

.ai-plane {
  padding: 26px;
  border: 1px solid rgba(20, 71, 220, 0.2);
  background: rgba(255, 255, 255, 0.86);
}

.plane-heading {
  display: flex;
  gap: 13px;
  align-items: center;
  padding-bottom: 21px;
  border-bottom: 1px solid rgba(38, 30, 61, 0.1);
}

.plane-heading__marker {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: var(--text-heading);
  background: rgba(38, 30, 61, 0.08);
  font-size: 11px;
  font-weight: var(--fw-bold);
}

.plane-heading--ai .plane-heading__marker {
  color: var(--brand-blue);
  background: var(--bg-soft-blue);
}

.plane-heading p {
  margin: 0 0 2px;
  color: var(--text-body);
  font-size: 10px;
  font-weight: var(--fw-medium);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.plane-heading h3 {
  margin: 0;
  color: var(--text-heading);
  font-size: 18px;
  font-weight: var(--fw-medium);
}

.tensic-scope {
  margin-top: 22px;
  padding: 20px;
  border: 2px solid var(--brand-blue);
  border-radius: 19px;
  background: linear-gradient(145deg, rgba(239, 246, 255, 0.98), rgba(225, 239, 255, 0.78));
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.58);
}

.scope-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 17px;
}

.scope-heading__brand {
  display: block;
  margin-bottom: 3px;
  color: var(--brand-blue);
  font-size: 25px;
  font-weight: var(--fw-bold);
  letter-spacing: -0.035em;
}

.scope-heading strong {
  color: var(--text-heading);
  font-size: 12px;
  font-weight: var(--fw-medium);
}

.scope-heading__tag {
  padding: 7px 10px;
  border-radius: var(--radius-pill);
  color: white;
  background: var(--brand-blue);
  font-size: 9px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.11em;
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.capability-card {
  min-height: 112px;
  padding: 15px;
  border: 1px solid rgba(20, 71, 220, 0.16);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.88);
}

.capability-card--wide {
  grid-column: 1 / -1;
  min-height: 98px;
}

.capability-card > span {
  display: block;
  margin-bottom: 14px;
  color: var(--brand-blue);
  font-size: 9px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.1em;
}

.capability-card h4,
.model-service h4 {
  margin: 0 0 5px;
  color: var(--text-heading);
  font-size: 15px;
  font-weight: var(--fw-medium);
}

.capability-card p,
.model-service p {
  margin: 0;
  color: var(--text-body);
  font-size: 11px;
  line-height: 1.45;
}

.model-connection {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  min-height: 34px;
  padding-right: 24px;
  color: var(--factory-green-dark);
  font-size: 9px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.model-connection::before {
  width: 48px;
  height: 1px;
  background: var(--factory-green);
  content: "";
}

.model-connection::after {
  width: 7px;
  height: 7px;
  margin-left: -13px;
  border-right: 1px solid var(--factory-green);
  border-bottom: 1px solid var(--factory-green);
  content: "";
  transform: rotate(45deg) translateY(-4px);
}

.model-service {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 20px;
  border: 1px solid rgba(22, 138, 88, 0.45);
  border-radius: 16px;
  background: var(--factory-green-soft);
  box-shadow: inset 5px 0 0 var(--factory-green);
}

.model-service__tag {
  display: block;
  margin-bottom: 5px;
  color: var(--factory-green-dark);
  font-size: 9px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.model-service p {
  max-width: 245px;
  color: var(--factory-green-dark);
  text-align: right;
}

.map-legend {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding-top: 27px;
  color: var(--text-body);
  font-size: 11px;
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-key {
  width: 12px;
  height: 12px;
  border-radius: 4px;
}

.legend-key--tensic {
  background: var(--brand-blue);
}

.legend-key--factory {
  background: var(--factory-green);
}

.legend-key--service {
  border: 1px solid rgba(38, 30, 61, 0.25);
  background: white;
}

.how-page .site-footer__meta {
  display: flex;
  align-items: center;
  gap: 18px;
}

.how-page .site-footer__meta p {
  margin: 0;
}

.how-page .site-footer__meta a {
  color: var(--text-body);
  font-size: 13px;
}

@media (max-width: 1040px) {
  .how-page .site-navigation {
    gap: 18px;
  }

  .how-page .site-navigation a {
    font-size: 13px;
  }

  .service-flow {
    grid-template-columns: 1fr 26px 1.12fr 26px 1.12fr;
    gap: 6px;
  }

  .service-node {
    grid-template-columns: 1fr;
    align-content: start;
  }
}

@media (max-width: 840px) {
  .how-page .site-header {
    height: 68px;
  }

  .how-page .site-brand {
    width: 132px;
    height: 52px;
  }

  .how-page .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .how-page .site-navigation {
    position: absolute;
    top: 68px;
    right: 0;
    left: 0;
    display: none;
    align-items: stretch;
    gap: 0;
    padding: 18px 24px 26px;
    border-bottom: 1px solid var(--border-base);
    background: white;
    box-shadow: var(--shadow-md);
  }

  .how-page .site-navigation[data-open="true"] {
    display: grid;
  }

  .how-page .site-navigation a {
    display: flex;
    align-items: center;
    min-height: 48px;
    border-bottom: 1px solid var(--border-base);
  }

  .how-page .site-navigation .nav-action {
    justify-content: center;
    margin-top: 16px;
    border-bottom: 0;
  }

  .service-flow {
    grid-template-columns: 1fr;
    padding-bottom: 16px;
  }

  .service-node {
    grid-template-columns: 38px 1fr;
    min-height: auto;
  }

  .flow-arrow {
    height: 28px;
    transform: rotate(90deg);
  }

  .branch-connector {
    width: 1px;
    height: 44px;
    margin: 0 auto;
    background: rgba(20, 71, 220, 0.32);
  }

  .branch-connector::before,
  .branch-connector::after,
  .branch-connector span::before,
  .branch-connector span::after {
    display: none;
  }

  .plane-grid {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 600px) {
  .how-shell {
    width: min(100% - 32px, 1180px);
  }

  .how-title h1 {
    font-size: clamp(42px, 12vw, 58px);
  }

  .capability-map {
    padding: 18px;
    border-radius: 22px;
  }

  .capability-map__caption {
    padding-bottom: 22px;
  }

  .service-flow {
    padding-top: 24px;
  }

  .service-node {
    grid-template-columns: 34px 1fr;
    padding: 16px;
  }

  .service-node__index {
    width: 34px;
    height: 34px;
  }

  .branch-connector {
    display: none;
  }

  .plane-grid {
    gap: 14px;
  }

  .domain-plane,
  .ai-plane {
    padding: 18px;
    border-radius: 18px;
  }

  .tensic-scope {
    padding: 14px;
  }

  .scope-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .capability-grid {
    grid-template-columns: 1fr;
  }

  .capability-card--wide {
    grid-column: auto;
  }

  .model-service {
    align-items: flex-start;
    flex-direction: column;
  }

  .model-service p {
    max-width: none;
    text-align: left;
  }

  .map-legend {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }

  .how-page .site-footer__meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .how-page *,
  .how-page *::before,
  .how-page *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
