/* ==========================================================================
   Institutional Stack — Webflow Component
   Self-contained: does not need base.css. Tokens are used with fallbacks.
   Three use-case tabs (Customer Network bar). One schematic at a time,
   square tiles, no drop shadow. Overflow is clipped so a Webflow Embed
   cannot create horizontal scroll on the page.
   ========================================================================== */

.bd-stack,
.bd-stack *,
.bd-stack *::before,
.bd-stack *::after {
  box-sizing: border-box;
}

.bd-stack {
  --bd-stack-tx: #6434d8;
  --bd-stack-data: var(--bd-success, #079455);
  --bd-stack-cyan: #00bfee;
  --bd-stack-dot: 6px;
  --bd-stack-tile: 168px;
  --bd-stack-gap-y: var(--bd-space-6, 24px);
  --bd-stack-gap-x: var(--bd-space-5, 20px);
  --bd-stack-rule: #d5d7da;
  --bd-stack-bar-h: var(--bd-space-2, 8px);
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  contain: paint;
  padding: var(--bd-space-8, 32px) 0;
  scroll-margin-top: 104px;
  font-family: var(--bd-font, InterVariable, sans-serif);
  font-feature-settings: "liga" 1, "calt" 1, "cv02", "cv03", "cv04", "cv11";
  font-optical-sizing: auto;
}

.bd-stack .bd-wrap {
  width: 100%;
  max-width: var(--bd-content, 1440px);
  margin-inline: auto;
}

.bd-stack__head {
  max-width: 40rem;
  margin: 0 0 var(--bd-space-8, 32px);
}

.bd-stack__kicker {
  margin: 0 0 var(--bd-space-2, 8px);
  font-size: var(--bd-text-sm, 14px);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--bd-accent, #6434d8);
}

.bd-stack__title {
  margin: 0 0 var(--bd-space-3, 12px);
  font-size: 32px;
  font-weight: var(--bd-weight-heading, 500);
  font-variation-settings: "wght" var(--bd-weight-heading, 500);
  line-height: 1.2;
  color: var(--bd-text, #000);
}

.bd-stack__lead {
  margin: 0;
  font-size: var(--bd-text-base, 16px);
  font-weight: 400;
  line-height: 1.5;
  color: var(--bd-text, #000);
}

.bd-stack__tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--bd-space-5, 20px);
  margin: 0 0 var(--bd-space-8, 32px);
}

.bd-stack__tab {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 56px;
  margin: 0;
  padding: 0 0 var(--bd-space-3, 12px);
  border: 0;
  background: transparent;
  font: inherit;
  font-optical-sizing: auto;
  font-size: var(--bd-text-base, 16px);
  font-weight: 400;
  line-height: 1.3;
  color: var(--bd-text, #000);
  text-align: center;
  cursor: pointer;
}

.bd-stack__tab::after {
  content: "";
  display: block;
  flex: 0 0 var(--bd-stack-bar-h);
  width: 100%;
  margin-top: var(--bd-space-3, 12px);
  background: var(--bd-stack-rule);
}

.bd-stack__tab:hover {
  opacity: 0.6;
}

.bd-stack__tab.is-active {
  font-weight: 500;
  opacity: 1;
}

.bd-stack__tab.is-active::after {
  background: var(--bd-accent, #6434d8);
}

.bd-stack__tab:focus {
  outline: none;
}

.bd-stack__tab:focus-visible {
  outline: 2px solid var(--bd-text, #000);
  outline-offset: 2px;
}

.bd-stack__panels {
  display: block;
  min-width: 0;
}

.bd-stack__panel {
  min-width: 0;
}

.bd-stack__panel[hidden] {
  display: none;
}

.bd-stack__intro {
  max-width: 40rem;
  margin: 0 0 var(--bd-space-6, 24px);
}

.bd-stack__copy {
  margin: 0;
  font-size: var(--bd-text-base, 16px);
  font-weight: 400;
  line-height: 1.5;
  color: var(--bd-text, #000);
}

.bd-stack__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: var(--bd-space-4, 16px);
  font-size: var(--bd-text-base, 16px);
  font-weight: 500;
  line-height: 1;
  color: var(--bd-link, #2563EB);
  text-decoration: none;
}

.bd-stack__cta:focus-visible {
  outline: 2px solid var(--bd-text, #000);
  outline-offset: 2px;
}

.bd-stack__cta svg {
  width: 8px;
  height: 8px;
  fill: currentColor;
}

.bd-stack__scroller {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px;
  -webkit-overflow-scrolling: touch;
}

.bd-stack__map {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: var(--bd-space-6, 24px);
  width: max-content;
  margin-inline: auto;
}

.bd-stack__wires {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}

.bd-stack__wire {
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 3 7;
}

.bd-stack__wire--tx { stroke: var(--bd-stack-tx); }
.bd-stack__wire--data { stroke: var(--bd-stack-data); }
.bd-stack__wire--feat { stroke: var(--bd-stack-cyan); }

.bd-stack__pulse {
  pointer-events: none;
}

.bd-stack__map.is-ready:not(.is-paused) .bd-stack__wire--tx,
.bd-stack__map.is-ready:not(.is-paused) .bd-stack__wire--data,
.bd-stack__map.is-ready:not(.is-paused) .bd-stack__wire--feat {
  animation: bd-stack-dash 1.4s linear infinite;
}

@keyframes bd-stack-dash {
  to { stroke-dashoffset: -20; }
}

.bd-stack__split {
  position: relative;
  z-index: 1;
  flex: 0 0 1px;
  width: 1px;
  align-self: stretch;
  background-image: repeating-linear-gradient(
    to bottom,
    var(--bd-stack-rule) 0 4px,
    transparent 4px 10px
  );
  pointer-events: none;
}

.bd-stack__lane--tx,
.bd-stack__lane--right,
.bd-stack__lane--stable,
.bd-stack__lane--stable-feat {
  position: relative;
  z-index: 1;
  display: grid;
  align-items: stretch;
  gap: var(--bd-stack-gap-y) var(--bd-stack-gap-x);
}

.bd-stack__lane--tx,
.bd-stack__lane--right,
.bd-stack__lane--stable {
  grid-template-columns: repeat(3, var(--bd-stack-tile));
  grid-template-rows: repeat(3, var(--bd-stack-tile));
}

.bd-stack__lane--tx [data-id="craft"] { grid-area: 1 / 1; }
.bd-stack__lane--tx [data-id="valid"] { grid-area: 1 / 2; }
.bd-stack__lane--tx [data-id="gas"]   { grid-area: 2 / 1; }
.bd-stack__lane--tx [data-id="bcast"] { grid-area: 2 / 2; }
.bd-stack__lane--tx [data-id="thrs"]  { grid-area: 3 / 1; }
.bd-stack__lane--tx [data-id="sign"]  { grid-area: 3 / 2; }
.bd-stack__lane--tx [data-id="mpc"]   { grid-area: 3 / 3; }

.bd-stack__lane--right [data-id="tok"],
.bd-stack__lane--right [data-id="net"],
.bd-stack__lane--right [data-id="nodes"] {
  justify-self: start;
  width: fit-content;
  max-width: 100%;
  height: 100%;
}

.bd-stack__lane--right [data-id="tok"]   { grid-area: 1 / 1 / 2 / 4; }
.bd-stack__lane--right [data-id="net"],
.bd-stack__lane--right [data-id="nodes"] { grid-area: 2 / 1 / 3 / 4; }
.bd-stack__lane--right [data-id="event"] { grid-area: 3 / 1; }
.bd-stack__lane--right [data-id="clus"]  { grid-area: 3 / 2; }
.bd-stack__lane--right [data-id="idx"]   { grid-area: 3 / 3; }

.bd-stack__lane--stable [data-id="craft"] { grid-area: 1 / 1; }
.bd-stack__lane--stable [data-id="valid"] { grid-area: 1 / 2; }
.bd-stack__lane--stable [data-id="gas"]   { grid-area: 2 / 1; }
.bd-stack__lane--stable [data-id="bcast"] { grid-area: 2 / 2; }
.bd-stack__lane--stable [data-id="thrs"]  { grid-area: 2 / 3; }
.bd-stack__lane--stable [data-id="event"] { grid-area: 3 / 1; }
.bd-stack__lane--stable [data-id="clus"]  { grid-area: 3 / 2; }

.bd-stack__lane--stable-feat {
  grid-template-columns: max-content;
  grid-template-rows: repeat(3, var(--bd-stack-tile));
}

.bd-stack__lane--stable-feat .bd-stack__feat {
  width: 100%;
  height: 100%;
}

.bd-stack__node,
.bd-stack__feat {
  position: relative;
  z-index: 1;
  background: var(--bd-surface, #fff);
  border: 1px solid var(--bd-stack-line);
  border-radius: var(--bd-radius, 8px);
}

.bd-stack__node::before,
.bd-stack__feat::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 8px;
  width: var(--bd-stack-dot);
  height: var(--bd-stack-dot);
  border-radius: 50%;
  background: var(--bd-stack-line);
  pointer-events: none;
}

.bd-stack__node--tx { --bd-stack-line: var(--bd-stack-tx); }
.bd-stack__node--data { --bd-stack-line: var(--bd-stack-data); }
.bd-stack__feat--cyan { --bd-stack-line: var(--bd-stack-cyan); }

.bd-stack__node {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--bd-space-2, 8px);
  width: var(--bd-stack-tile);
  height: var(--bd-stack-tile);
  padding: var(--bd-space-3, 12px);
  text-align: center;
}

.bd-stack__feat {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--bd-space-4, 16px);
  width: max-content;
  max-width: 100%;
  padding: var(--bd-space-3, 12px) var(--bd-space-5, 20px);
  justify-self: start;
}

.bd-stack__map--stake .bd-stack__feat[data-id="tok"],
.bd-stack__map--stake .bd-stack__feat[data-id="nodes"] {
  justify-self: stretch;
  width: 100%;
}

.bd-stack__icon {
  display: block;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  overflow: visible;
  color: var(--bd-text, #000);
}

/* Lucide viewBox is 24. A 48px box would scale stroke-width="1" to 2px.
   Keep the drawing 1 CSS pixel on every tab. */
.bd-stack__icon path,
.bd-stack__icon circle,
.bd-stack__icon line,
.bd-stack__icon rect,
.bd-stack__icon ellipse,
.bd-stack__icon polyline,
.bd-stack__icon polygon {
  vector-effect: non-scaling-stroke;
}

.bd-stack__label {
  margin: 0;
  font-size: var(--bd-text-base, 16px);
  font-weight: 400;
  line-height: 1.3;
  color: var(--bd-text, #000);
}

.bd-stack__feat-copy {
  display: flex;
  flex-direction: column;
  gap: var(--bd-space-2, 8px);
  min-width: 0;
}

.bd-stack__feat .bd-stack__label {
  font-weight: 500;
}

.bd-stack__meta {
  margin: 0;
  font-size: var(--bd-text-sm, 14px);
  font-weight: 400;
  line-height: 1.3;
  color: var(--bd-text-2, #252B37);
}

.bd-stack__chains {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--bd-space-3, 12px) var(--bd-space-4, 16px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.bd-stack__chains li {
  display: inline-flex;
  align-items: center;
  gap: var(--bd-space-2, 8px);
  font-size: var(--bd-text-base, 16px);
  font-weight: 400;
  line-height: 1;
  color: var(--bd-text, #000);
}

.bd-stack__chains img {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.bd-stack__pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--bd-space-2, 8px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.bd-stack__pills li {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid var(--bd-stack-rule);
  border-radius: var(--bd-radius-badge, 3px);
  font-size: var(--bd-text-sm, 14px);
  font-weight: 400;
  line-height: 1;
  color: var(--bd-text, #000);
  pointer-events: none;
}

.bd-stack__pills li.is-tagged::before {
  content: "";
  width: var(--bd-stack-dot);
  height: var(--bd-stack-dot);
  margin-right: 6px;
  border-radius: 50%;
  background: var(--bd-stack-cyan);
}

.bd-stack__feat-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--bd-space-3, 12px);
}

.bd-stack__chain-mark {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

@media (max-width: 1023px) {
  .bd-stack__title {
    font-size: 28px;
  }
}

@media (max-width: 767px) {
  .bd-stack {
    padding: var(--bd-space-6, 24px) 0;
    scroll-margin-top: 80px;
  }

  .bd-stack__title {
    font-size: 24px;
    font-weight: var(--bd-weight-display, 300);
    font-variation-settings: "wght" var(--bd-weight-display, 300);
  }

  .bd-stack__tabs {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bd-stack__map.is-ready .bd-stack__wire--tx,
  .bd-stack__map.is-ready .bd-stack__wire--data,
  .bd-stack__map.is-ready .bd-stack__wire--feat {
    animation: none;
  }
}
