/* One reading-led scroll story. The original text stays in document order. */
#anfm-process .method-scroll-story { display: block; }
#anfm-process .method-story-panel { display: none; }
#anfm-process .method-scroll-story.story-is-running {
  display: grid;
  grid-template-columns: minmax(0, .37fr) minmax(0, .63fr);
  align-items: start;
  gap: 28px;
}
#anfm-process .story-is-running .method-story-panel {
  display: block;
  position: sticky;
  top: 28px;
  align-self: start;
  padding: 28px;
  overflow: hidden;
  border: 1px solid #386366;
  border-radius: 24px;
  background: radial-gradient(ellipse at 100% 15%, #25595e 0%, transparent 65%), #102736;
  box-shadow: 0 22px 48px #173c4b1a;
  color: #fff;
  text-align: left;
  z-index: 2;
}
#anfm-process .method-story-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .2;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 650' fill='none' stroke='%2378ddd5'%3E%3Cpath d='M-80 300C50 410 220 70 460 200M-80 500C50 450 210 690 470 400'/%3E%3C/svg%3E") center / cover;
}
#anfm-process .method-story-intro,
#anfm-process .method-story-diagram,
#anfm-process .method-story-readout { position: relative; }
#anfm-process .method-story-eyebrow {
  margin: 0 0 10px;
  color: #8ad9d2;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 11px;
  font-weight: 700;
}
#anfm-process .method-story-title {
  margin: 0;
  color: #fff;
  font-size: clamp(26px, 2.5vw, 34px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.025em;
}
#anfm-process .method-story-diagram {
  display: block;
  width: min(100%, 300px);
  height: auto;
  margin: 22px auto 18px;
  overflow: visible;
  transform: scale(var(--story-scale, 1));
  transform-origin: center;
}
.method-story-orbit { fill: none; stroke: #4c777e; stroke-width: 1; }
.method-story-trace {
  fill: none;
  stroke: #87e0d5;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: var(--story-trace, 100);
  transform: rotate(-90deg);
  transform-origin: 160px 160px;
}
.method-story-link { fill: none; stroke: #51878d; stroke-width: 1; opacity: .5; }
.method-story-node .method-story-dot { fill: #24454e; stroke: #87a4a8; stroke-width: 1.5; }
.method-story-node text { fill: #bfd8d9; font-size: 10px; font-family: Lato, sans-serif; text-anchor: middle; }
.method-story-halo { fill: none; stroke: #8de3d6; stroke-width: 1; opacity: 0; }
.method-story-node.story-node-done .method-story-dot,
.method-story-node.story-node-current .method-story-dot { fill: #87e0d5; stroke: #87e0d5; }
.method-story-node.story-node-current .method-story-halo { opacity: .8; }
.method-story-node.story-node-current text { fill: #fff; font-weight: 700; }
#anfm-process .method-story-readout { min-height: 78px; }
#anfm-process .method-story-number { color: #8ad9d2; font-size: 12px; letter-spacing: .08em; }
#anfm-process .method-story-label { margin: 6px 0 0; color: #fff; font-size: 16px; line-height: 1.4; }
#anfm-process .method-story-progress { position: relative; height: 2px; margin-top: 22px; background: #4b767b; }
.method-story-progress > span {
  display: block;
  height: 100%;
  background: #8de3d6;
  transform: scaleX(var(--story-progress, 0));
  transform-origin: left;
}
#anfm-process .story-is-running .anfm-step { transition: border-color .22s, box-shadow .22s; }
#anfm-process .story-is-running .anfm-step.story-step-current {
  border-color: #72bfb8;
  box-shadow: 0 12px 30px #1d6e6810;
}
@media (max-width: 900px) {
  #anfm-process .method-scroll-story.story-is-running { display: block; }
  #anfm-process .story-is-running .method-story-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 114px;
    grid-template-rows: auto 1fr;
    column-gap: 14px;
    top: 10px;
    margin: 0 0 22px;
    padding: 14px 18px 18px;
    border-radius: 18px;
    box-shadow: 0 8px 28px #0b303526;
    min-height: 150px;
  }
  #anfm-process .method-story-eyebrow { font-size: 9px; margin-bottom: 5px; }
  #anfm-process .method-story-title { font-size: 16px; line-height: 1.24; }
  #anfm-process .method-story-title br { display: none; }
  #anfm-process .method-story-diagram { grid-column: 2; grid-row: 1 / 3; width: 114px; margin: 0; align-self: center; }
  #anfm-process .method-story-readout { min-height: 0; align-self: end; padding-top: 12px; }
  #anfm-process .method-story-number { font-size: 10px; }
  #anfm-process .method-story-label { font-size: 12px; margin-top: 2px; }
  #anfm-process .method-story-progress { position: absolute; left: 18px; right: 18px; bottom: 10px; margin: 0; }
}
@media (max-width: 380px) {
  #anfm-process .story-is-running .method-story-panel { grid-template-columns: minmax(0, 1fr) 86px; gap: 8px; padding: 12px 14px 18px; }
  #anfm-process .method-story-diagram { width: 86px; }
  #anfm-process .method-story-title { font-size: 14px; }
}
@media (max-height: 620px) {
  #anfm-process .story-is-running .method-story-panel { position: relative; top: 0; }
}
@media (min-width: 901px) and (max-height: 700px) {
  #anfm-process .story-is-running .method-story-panel { padding: 22px; }
  #anfm-process .method-story-title { font-size: 26px; }
  #anfm-process .method-story-diagram { width: 220px; margin-top: 16px; margin-bottom: 12px; }
}
@media (prefers-reduced-motion: reduce), print {
  #anfm-process .method-scroll-story.story-is-running { display: block; }
  #anfm-process .story-is-running .method-story-panel { display: none; }
  #anfm-process .story-is-running .anfm-step { transition: none; }
}
