.api-bridge {
  max-width: 1060px;
  margin: 0 auto;
  padding: 106px 40px 116px;
  border-bottom: 1px solid var(--line, #ddd3c4);
}

.api-bridge-head {
  max-width: 820px;
  margin: 0 auto 48px;
  text-align: center;
}

.api-bridge-head .tag {
  display: inline-block;
  margin-bottom: 24px;
}

.api-bridge-head h2 {
  margin: 0;
  color: var(--ink, #28241f);
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(3.2rem, 6vw, 5.4rem);
  font-weight: 500;
  letter-spacing: -.05em;
  line-height: .94;
}

.api-bridge-head p {
  max-width: 720px;
  margin: 25px auto 0;
  color: var(--muted, #686158);
  font-size: 1rem;
  line-height: 1.72;
}

.api-map {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1.16fr) 64px minmax(0, 1fr);
  align-items: stretch;
}

.api-node,
.api-core {
  min-height: 250px;
  padding: 27px;
  box-sizing: border-box;
  border: 1px solid var(--line, #d9d0c3);
  border-radius: 20px;
}

.api-node {
  background: rgba(255, 252, 247, .75);
}

.api-node-legacy {
  box-shadow: inset 0 3px 0 #c77c4e;
}

.api-node-modern {
  box-shadow: inset 0 3px 0 #769b83;
}

.api-node-label {
  display: block;
  color: #877f75;
  font-size: .64rem;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.api-node h3,
.api-core h3 {
  margin: 38px 0 24px;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(1.55rem, 2.4vw, 2.05rem);
  font-weight: 500;
  letter-spacing: -.025em;
  line-height: 1.03;
}

.api-node h3 {
  color: var(--ink, #28241f);
}

.api-chip-row,
.api-core-steps {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.api-chip-row span,
.api-core-steps span {
  padding: 6px 8px;
  border-radius: 99px;
  font-size: .61rem;
  font-weight: 600;
  letter-spacing: .035em;
}

.api-chip-row span {
  color: #645e56;
  border: 1px solid #ded5c9;
  background: #f3eee6;
}

.api-core {
  color: #fffaf1;
  border-color: #365749;
  background:
    radial-gradient(circle at 100% 0, rgba(211, 125, 70, .25), transparent 12rem),
    #345446;
  box-shadow: 0 18px 48px rgba(44, 75, 61, .17);
}

.api-core .api-node-label {
  color: rgba(255, 250, 241, .55);
}

.api-core h3 {
  color: #fffaf1;
}

.api-core-steps span {
  color: rgba(255, 250, 241, .82);
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .07);
}

.api-flow {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.api-flow-line {
  position: relative;
  width: 100%;
  height: 1px;
  background: #b9b0a4;
}

.api-flow-line::after {
  position: absolute;
  top: -4px;
  right: 0;
  width: 8px;
  height: 8px;
  content: "";
  border-top: 1px solid #8f877d;
  border-right: 1px solid #8f877d;
  transform: rotate(45deg);
}

.api-flow-copy {
  position: absolute;
  top: calc(50% + 14px);
  color: #a0988d;
  font-size: .56rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.api-protocol-band {
  overflow: hidden;
  margin-top: 25px;
  border: 1px solid var(--line, #d9d0c3);
  border-radius: 18px;
  background: rgba(250, 247, 241, .72);
}

.api-protocol-copy {
  display: grid;
  grid-template-columns: .75fr 1.25fr;
  gap: 26px;
  padding: 22px 26px;
  align-items: center;
  border-bottom: 1px solid var(--line, #d9d0c3);
}

.api-protocol-copy strong {
  color: var(--ink, #28241f);
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 500;
}

.api-protocol-copy span {
  color: var(--muted, #6b645c);
  font-size: .78rem;
  line-height: 1.55;
}

.api-protocols {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
}

.api-protocols span {
  position: relative;
  min-width: 0;
  padding: 20px 10px 20px 24px;
  color: #53685c;
  border-right: 1px solid var(--line, #d9d0c3);
  border-bottom: 1px solid var(--line, #d9d0c3);
  font-size: .67rem;
  font-weight: 600;
  letter-spacing: .025em;
  text-align: left;
}

.api-protocols span::before {
  position: absolute;
  top: 50%;
  left: 10px;
  width: 7px;
  height: 7px;
  content: "";
  border-radius: 2px;
  background: #6f957e;
  box-shadow: 0 0 0 3px rgba(111, 149, 126, .1);
  transform: translateY(-50%);
}

.api-protocols span:nth-child(4n + 2)::before {
  background: #c77949;
  box-shadow: 0 0 0 3px rgba(199, 121, 73, .1);
}

.api-protocols span:nth-child(4n + 3)::before {
  background: #6483a0;
  box-shadow: 0 0 0 3px rgba(100, 131, 160, .1);
}

.api-protocols span:nth-child(4n + 4)::before {
  background: #9b805c;
  box-shadow: 0 0 0 3px rgba(155, 128, 92, .1);
}

.api-protocols span:nth-child(8n) {
  border-right: 0;
}

.api-protocols span:nth-last-child(-n + 8) {
  border-bottom: 0;
}

.api-bridge-actions {
  display: flex;
  gap: 28px;
  justify-content: center;
  margin-top: 31px;
}

@media (max-width: 880px) {
  .api-map {
    grid-template-columns: 1fr;
  }

  .api-flow {
    min-height: 64px;
  }

  .api-flow-line {
    width: 1px;
    height: 100%;
  }

  .api-flow-line::after {
    top: auto;
    right: -4px;
    bottom: 0;
    transform: rotate(135deg);
  }

  .api-flow-copy {
    top: 50%;
    left: calc(50% + 15px);
    transform: translateY(-50%);
  }

  .api-protocol-copy {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .api-protocols {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .api-protocols span:nth-child(8n) {
    border-right: 1px solid var(--line, #d9d0c3);
  }

  .api-protocols span:nth-child(4n) {
    border-right: 0;
  }

  .api-protocols span:nth-last-child(-n + 8) {
    border-bottom: 1px solid var(--line, #d9d0c3);
  }

  .api-protocols span:nth-last-child(-n + 4) {
    border-bottom: 0;
  }
}

@media (max-width: 620px) {
  .api-bridge {
    padding: 80px 16px 88px;
  }

  .api-bridge-head {
    margin-bottom: 38px;
  }

  .api-bridge-head h2 {
    font-size: clamp(3rem, 14vw, 4.3rem);
  }

  .api-node,
  .api-core {
    min-height: 220px;
    padding: 24px;
  }

  .api-protocol-copy {
    padding: 20px;
  }

  .api-protocols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .api-protocols span:nth-child(4n) {
    border-right: 1px solid var(--line, #d9d0c3);
  }

  .api-protocols span:nth-child(2n) {
    border-right: 0;
  }

  .api-protocols span:nth-last-child(-n + 4) {
    border-bottom: 1px solid var(--line, #d9d0c3);
  }

  .api-protocols span:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .api-bridge-actions {
    align-items: center;
    flex-direction: column;
    gap: 13px;
  }
}
