/* Article-local explainer for the Puerta de Oro decision sequence. */
.blog-article .gate-finding {
  border-left-color: #5e646e;
}

.gate-explainer {
  margin: 34px 0 38px;
  border-block: 1px solid #e2e5ea;
  padding: 24px 0 8px;
}

.gate-explainer-head {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, .65fr);
  gap: 28px;
  align-items: end;
  margin-bottom: 26px;
}

.gate-eyebrow {
  display: block;
  color: #5e646e;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .11em;
  margin-bottom: 9px;
}

.blog-article .gate-explainer h3 {
  font-size: clamp(23px, 4vw, 34px);
  line-height: 1.18;
  letter-spacing: -.025em;
  margin: 0;
}

.blog-article .gate-explainer-head p {
  color: #5e646e;
  font-size: 13px;
  line-height: 1.65;
  margin: 0;
}

.gate-figure {
  margin: 0;
}

.gate-track {
  --gate-step: 0;
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  padding: 30px 0 22px;
}

.gate-route {
  position: absolute;
  top: 18px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: #e2e5ea;
}

.gate-route span {
  display: block;
  width: calc(var(--gate-step) * 25%);
  height: 100%;
  background: #5e646e;
  transition: width 650ms cubic-bezier(.22, .78, .25, 1);
}

.gate-route i {
  position: absolute;
  top: -6px;
  left: calc(var(--gate-step) * 25%);
  width: 14px;
  height: 14px;
  box-sizing: border-box;
  border: 3px solid #5e646e;
  border-radius: 50%;
  background: #f7f8fa;
  transform: translateX(-50%);
  transition: left 650ms cubic-bezier(.22, .78, .25, 1);
}

.gate-node {
  position: relative;
  min-height: 128px;
  padding: 16px 12px 12px;
  border-top: 2px solid #e2e5ea;
  background: #f7f8fa;
  color: #0d0f12;
  transition: border-color 260ms ease, background-color 260ms ease, transform 260ms ease;
}

.gate-node::before {
  content: '';
  position: absolute;
  top: -21px;
  left: 50%;
  width: 8px;
  height: 8px;
  border: 2px solid #6e747e;
  border-radius: 50%;
  background: #f7f8fa;
  transform: translateX(-50%);
}

.gate-node.is-past {
  border-color: #6e747e;
}

.gate-node.is-current {
  border-color: #5e646e;
  background: #e2e5ea;
  transform: translateY(-4px);
}

.gate-node.is-current::before {
  border-color: #5e646e;
  background: #5e646e;
}

.gate-number,
.gate-node strong,
.gate-node small,
.gate-node em {
  display: block;
}

.gate-number {
  color: #5e646e;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .1em;
  margin-bottom: 13px;
}

.gate-node strong {
  font-size: 14px;
  line-height: 1.35;
}

.gate-node small {
  color: #5e646e;
  font-size: 11px;
  line-height: 1.45;
  margin-top: 9px;
}

.gate-node em {
  position: absolute;
  right: 8px;
  bottom: 8px;
  color: #16191d;
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: .08em;
  opacity: 0;
}

.gate-node.is-current em {
  opacity: 1;
}

.gate-branch {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr 1.25fr;
  gap: 10px;
  margin: 0 0 18px;
}

.gate-branch span {
  min-height: 42px;
  border-left: 2px solid #9ea4b0;
  padding: 8px 8px 8px 10px;
  color: #5e646e;
  font-size: 10px;
  line-height: 1.4;
}

.gate-branch span:first-child {
  border-left-style: dashed;
}

.gate-live {
  display: grid;
  grid-template-columns: minmax(180px, .75fr) minmax(0, 1.25fr);
  gap: 18px;
  align-items: baseline;
  padding: 15px 0;
  border-block: 1px solid #e2e5ea;
}

.gate-live strong {
  font-size: 14px;
  line-height: 1.45;
}

.gate-live span {
  color: #16191d;
  font-size: 13px;
  line-height: 1.55;
}

.gate-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 14px 0 10px;
}

.gate-controls button {
  min-height: 40px;
  border: 1px solid #9ea4b0;
  border-radius: 5px;
  background: transparent;
  color: #16191d;
  font: inherit;
  font-size: 12px;
  padding: 8px 11px;
  cursor: pointer;
}

.gate-controls button:hover {
  background: #eaecef;
}

.gate-controls button:focus-visible {
  outline: 3px solid #5e646e;
  outline-offset: 3px;
}

.gate-counter {
  color: #5e646e;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  margin-left: auto;
}

.gate-figure figcaption {
  color: #5e646e;
  font-size: 13px;
  line-height: 1.65;
  padding: 2px 0 18px;
}

.gate-state-copy {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0 0 22px;
}

.gate-state-copy li {
  border-top: 1px solid #9ea4b0;
  padding-top: 12px;
}

.gate-state-copy li.is-current {
  border-top: 3px solid #5e646e;
  padding-top: 10px;
}

.gate-state-copy strong,
.gate-state-copy span {
  display: block;
}

.gate-state-copy strong {
  font-size: 12px;
  line-height: 1.45;
}

.gate-state-copy span {
  color: #5e646e;
  font-size: 11px;
  line-height: 1.55;
  margin-top: 7px;
}

#source-1,
#source-2,
#source-3,
#source-4,
#source-5,
#source-6,
#source-7,
#source-8 {
  scroll-margin-top: 100px;
}

@media (max-width: 760px) {
  .gate-explainer-head,
  .gate-live {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .gate-track {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 8px 0;
  }

  .gate-route {
    top: 28px;
    bottom: 28px;
    left: 11px;
    right: auto;
    width: 2px;
    height: auto;
  }

  .gate-route span {
    width: 100%;
    height: calc(var(--gate-step) * 25%);
    transition: height 650ms cubic-bezier(.22, .78, .25, 1);
  }

  .gate-route i {
    top: calc(var(--gate-step) * 25%);
    left: -6px;
    transform: translateY(-50%);
    transition: top 650ms cubic-bezier(.22, .78, .25, 1);
  }

  .gate-node {
    min-height: 0;
    margin-left: 28px;
    padding: 13px 44px 13px 14px;
  }

  .gate-node::before {
    top: 18px;
    left: -18px;
  }

  .gate-number {
    margin-bottom: 6px;
  }

  .gate-node small {
    margin-top: 5px;
  }

  .gate-branch,
  .gate-state-copy {
    grid-template-columns: 1fr;
  }

  .gate-branch {
    margin-top: 14px;
  }

  .gate-branch span {
    min-height: 0;
  }

  .gate-state-copy {
    gap: 14px;
  }

  .gate-counter {
    width: 100%;
    margin: 2px 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gate-route span,
  .gate-route i,
  .gate-node {
    transition: none;
  }
}

@media print {
  .gate-controls,
  .gate-live,
  .gate-route i {
    display: none;
  }

  .gate-node {
    transform: none;
  }
}
