.fde-section {
  --fde-rule: #dce1e0;
  --fde-muted: #505b5f;
  --fde-inset: clamp(18px, 3.4vw, 52px);
  padding-block: clamp(64px, 7vw, 110px);
  scroll-margin-block-start: var(--header);
}

.fde-intro {
  margin-block-end: clamp(32px, 4vw, 52px);
}

.fde-process {
  border: 1px solid var(--fde-rule);
  border-radius: var(--image-radius);
}

.fde-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--fde-rule);
}

.fde-steps button {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: clamp(14px, 2vw, 20px) 4px;
  border: 0;
  background: transparent;
  color: var(--fde-muted);
  font-size: clamp(13px, 1.4vw, 19px);
  line-height: 1.25;
  cursor: pointer;
}

.fde-steps button:not(:last-child)::after {
  content: "";
  position: absolute;
  inset-inline-end: -3px;
  bottom: 32%;
  width: 7px;
  height: 7px;
  border-top: 1px solid #9ca6a6;
  border-right: 1px solid #9ca6a6;
  transform: rotate(45deg);
  pointer-events: none;
}

.fde-steps button span {
  display: grid;
  place-items: center;
  width: clamp(28px, 3vw, 42px);
  aspect-ratio: 1;
  border-radius: 50%;
  color: var(--action-red);
  font-variant-numeric: tabular-nums;
}

.fde-steps button:is(:hover, [aria-selected="true"]) {
  color: var(--ink);
}

.fde-steps button[aria-selected="true"] span {
  background: var(--action-red);
  color: white;
}

.fde-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: var(--fde-inset);
  padding: var(--fde-inset) var(--fde-inset) 0;
}

.fde-panels:has([role="tabpanel"]) {
  display: grid;
}

.fde-stage[role="tabpanel"] {
  grid-area: 1 / 1;
}

/* Reserve the tallest stage without showing inactive content. */
.fde-stage[role="tabpanel"][hidden] {
  display: grid !important;
  visibility: hidden;
}

.fde-stage + .fde-stage:not([role="tabpanel"]) {
  margin-top: var(--fde-inset);
  border-top: 1px solid var(--fde-rule);
}

.fde-stage:last-child:not([role="tabpanel"]) {
  padding-bottom: var(--fde-inset);
}

.fde-stage h3,
.fde-stage h4 {
  margin: 0 0 0.75em;
  color: var(--ink);
  font-size: clamp(22px, 2.1vw, 34px);
  font-weight: 500;
  line-height: 1.25;
}

.fde-stage p {
  color: var(--fde-muted);
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.7;
}

.fde-stage-meta {
  padding-inline-start: var(--fde-inset);
  border-inline-start: 1px solid var(--fde-rule);
}

.fde-stage-meta ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 1em;
  padding: 0;
  list-style: none;
}

.fde-stage-meta li {
  padding: 0.32em 0.7em;
  border: 1px solid var(--fde-rule);
  border-radius: 999px;
  color: var(--fde-muted);
  font-size: clamp(13px, 1.05vw, 16px);
}

.fde-stage-meta strong {
  color: var(--ink);
  font-weight: 600;
}

.fde-stage-controls {
  display: flex;
  gap: 10px;
  padding: 20px var(--fde-inset) var(--fde-inset);
}

.fde-stage-controls button {
  width: clamp(44px, 4vw, 56px);
  aspect-ratio: 1;
  border: 0;
  border-radius: 50%;
  background: #edf0ef;
  color: var(--ink);
  font-size: 22px;
  cursor: pointer;
}

.fde-stage-controls button:hover:not([aria-disabled="true"]) {
  background: var(--action-red);
  color: white;
}

.fde-stage-controls button[aria-disabled="true"] {
  color: #7d8789;
  cursor: default;
}

.fde-process :is(button, [role="tabpanel"]):focus-visible {
  outline: 2px solid var(--action-red);
  outline-offset: -3px;
}

.fde-stage-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.fde-section .fde-details {
  --finance-scale: 1;
  margin-top: 24px;
}

.fde-nodes {
  margin-top: clamp(24px, 3vw, 40px);
  border: 1px solid var(--fde-rule);
  border-radius: var(--image-radius);
  overflow: hidden;
}

.fde-nodes-head {
  padding: clamp(18px, 2vw, 28px) var(--fde-inset);
  border-bottom: 1px solid var(--fde-rule);
}

.fde-nodes-head h3 {
  margin: 0 0 0.35em;
  color: var(--ink);
  font-size: clamp(20px, 1.9vw, 30px);
  font-weight: 500;
  line-height: 1.25;
}

.fde-nodes-head p {
  margin: 0;
  color: var(--fde-muted);
  font-size: clamp(14px, 1.05vw, 16px);
  line-height: 1.6;
}

.fde-nodes ol {
  display: grid;
  grid-template-columns: 1fr;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: fde-node;
}

.fde-nodes li {
  display: flex;
  flex-direction: column;
  gap: 0.4em;
  padding: clamp(18px, 2vw, 26px) clamp(18px, 2.4vw, 34px);
  counter-increment: fde-node;
}

.fde-nodes li + li {
  border-top: 1px solid var(--fde-rule);
}

@media (min-width: 721px) {
  .fde-nodes ol {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .fde-nodes li {
    border-top: 1px solid var(--fde-rule);
    border-left: 1px solid var(--fde-rule);
  }

  .fde-nodes li:nth-child(-n + 3) {
    border-top: 0;
  }

  .fde-nodes li:nth-child(3n + 1) {
    border-left: 0;
  }
}

.fde-nodes li::before {
  content: counter(fde-node, decimal-leading-zero);
  color: var(--action-red);
  font-size: clamp(13px, 1.05vw, 15px);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

.fde-nodes li b {
  color: var(--ink);
  font-size: clamp(16px, 1.3vw, 20px);
  font-weight: 600;
}

.fde-nodes li span {
  color: var(--fde-muted);
  font-size: clamp(13px, 1.05vw, 16px);
  line-height: 1.6;
}

@media (min-width: 1000px) and (max-height: 740px) {
  .fde-section {
    --fde-inset: 32px;
    padding-block: 64px;
  }

  .fde-intro {
    margin-block-end: 32px;
  }

  .fde-intro .fde-label {
    margin-block-end: 10px;
  }

  .fde-steps button {
    padding-block: 12px;
  }

  .fde-stage-controls {
    padding-block: 14px 20px;
  }
}

@media (max-width: 720px) {
  .fde-stage {
    grid-template-columns: minmax(0, 1fr);
  }

  .fde-stage-meta {
    padding: var(--fde-inset) 0 0;
    border: 0;
    border-top: 1px solid var(--fde-rule);
  }
}
