.automation-viewport {
  --automation-ink: #101f42;
  --automation-copy: #405373;
  --automation-blue: #1264ea;
  --automation-gap: clamp(14px, 1.75vw, 34px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(20px, 2.2vw, 44px);
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(54px, 7vh, 112px) 0;
  background: var(--corporate-section-background);
  color: var(--automation-ink);
  overflow: clip;
}

.automation-story.is-pinned .automation-viewport {
  min-height: 0;
  height: 100vh;
  height: 100dvh;
  padding-block: clamp(25px, 4vh, 49px);
}

.automation-icon-library {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.automation-icon {
  display: block;
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.automation-heading {
  width: min(90%, 970px);
  margin-inline: auto;
  text-align: center;
}

.automation-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 100px;
  background: #e2ebfc;
  color: #17356e;
  font-size: clamp(10px, .83vw, 15px);
  font-weight: 760;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.automation-eyebrow .automation-icon {
  font-size: 16px;
  color: #1264ea;
}

.automation-viewport h2 {
  max-width: none;
  margin: 12px 0 19px;
  font-size: clamp(44px, 4vw, 85px);
  line-height: .98;
  letter-spacing: -.059em;
  color: #0e1f47;
}

.automation-viewport h2 em {
  color: #0960e7;
  font-weight: 720;
}

.automation-heading p {
  max-width: 72ch;
  margin-inline: auto;
  color: var(--automation-copy);
  font-size: clamp(15px, 1.24vw, 23px);
  line-height: 1.36;
}

.automation-layout {
  width: min(89%, 2020px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3.75fr) minmax(0, 1fr);
  grid-template-areas: "left scenario right";
  align-items: center;
  gap: var(--automation-gap);
}

.automation-side {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-self: stretch;
  gap: 12px;
  min-width: 0;
}

.automation-side--left { grid-area: left; }
.automation-side--right { grid-area: right; }

.automation-step {
  position: relative;
}

.automation-step h3 {
  display: flex;
  gap: clamp(5px, .7vw, 14px);
  align-items: center;
  font-size: clamp(15px, 1.3vw, 25px);
  line-height: 1.1;
  letter-spacing: -.038em;
}

.automation-step h3 span {
  display: grid;
  place-items: center;
  min-width: clamp(30px, 3.1vw, 61px);
  min-height: clamp(28px, 2.5vw, 48px);
  border-radius: clamp(9px, .94vw, 17px);
  background: #dce9fd;
  color: #155cd8;
  font-variant-numeric: tabular-nums;
  font-size: clamp(13px, 1.26vw, 24px);
  font-weight: 750;
  letter-spacing: -.03em;
}

.automation-step p {
  margin: 6px 0 0;
  color: var(--automation-copy);
  font-size: clamp(12px, 1.02vw, 19px);
  line-height: 1.34;
}

.automation-step::after {
  position: absolute;
  top: clamp(15px, 1.64vw, 28px);
  content: "";
  width: max(5px, calc(var(--automation-gap) - 4px));
  height: 16px;
  border-top: 1px solid #78a8ee;
  pointer-events: none;
}

.automation-side--left .automation-step::after {
  left: calc(100% + 2px);
  border-right: 1px solid #78a8ee;
  border-radius: 0 18px 0 0;
}

.automation-side--right .automation-step::after {
  right: calc(100% + 2px);
  border-left: 1px solid #78a8ee;
  border-radius: 18px 0 0 0;
}

.automation-scenario {
  grid-area: scenario;
  position: relative;
  isolation: isolate;
  min-width: 0;
  padding: 0 clamp(10px, 1.4vw, 27px) clamp(12px, 1.34vw, 25px);
  border: 1px solid #d8e5f7;
  border-radius: clamp(20px, 2.3vw, 42px);
  background: linear-gradient(145deg, #f9fbff, #e8effc);
  box-shadow: 0 24px 48px #214c852b, inset 0 1px 1px #fff;
}

.automation-scenario::before {
  position: absolute;
  z-index: -1;
  inset: 8px -9px -9px 9px;
  content: "";
  border: 1px solid #c2d6f4;
  border-radius: inherit;
  pointer-events: none;
}

.automation-toolbar {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.12vw, 23px);
  min-height: clamp(55px, 4.7vw, 93px);
  padding-inline: clamp(2px, .7vw, 18px);
  border-bottom: 1px solid #dbe6f6;
}

.automation-make {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding-right: clamp(7px, 1.05vw, 22px);
  border-right: 1px solid #c8d7ee;
  font-size: clamp(16px, 1.55vw, 31px);
  font-weight: 780;
  letter-spacing: -.05em;
}

.automation-make svg {
  width: clamp(19px, 2.05vw, 40px);
  height: auto;
}

.automation-toolbar > strong {
  font-size: clamp(11px, 1.02vw, 19px);
  letter-spacing: -.025em;
}

.automation-demo {
  margin-left: auto;
  padding: 6px 9px;
  border-radius: 9px;
  background: #fff;
  color: #3a5278;
  font-size: clamp(10px, .72vw, 14px);
  font-weight: 690;
  white-space: nowrap;
}

.automation-track-viewport {
  min-width: 0;
  padding: clamp(15px, 1.55vw, 31px) 2px clamp(8px, 1.02vw, 19px);
}

.automation-track {
  --module-size: clamp(45px, 4.75vw, 96px);
  position: relative;
}

.automation-modules {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(5px, .9vw, 20px);
}

.automation-connection {
  position: absolute;
  top: calc(var(--module-size) / 2 - 5px);
  left: 0;
  width: 100%;
  height: 10px;
  overflow: visible;
}

.automation-connection path {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.automation-dotted {
  stroke: #98a9c3;
  stroke-dasharray: 1 8;
}

.automation-segment {
  stroke: #226ff0;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
}

.automation-pulse {
  position: absolute;
  inset: calc(var(--module-size) / 2) 0 auto;
  pointer-events: none;
  opacity: 0;
}

.automation-pulse::before {
  position: absolute;
  top: -4px;
  left: -4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid #fff;
  background: #2273f2;
  content: "";
}

.automation-module {
  --module-ink: #6234e4;
  --module-tint: #ece7ff;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 9px;
  justify-items: center;
  align-content: start;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--automation-ink);
  text-align: center;
  cursor: pointer;
}

.automation-module:disabled {
  cursor: default;
}

.automation-module[data-module="1"] { --module-ink: #07845e; --module-tint: #dff7ec; }
.automation-module[data-module="2"] { --module-ink: #c24c12; --module-tint: #ffede4; }
.automation-module[data-module="3"] { --module-ink: #135bdd; --module-tint: #e3eeff; }
.automation-module[data-module="4"] { --module-ink: #076d99; --module-tint: #ddf4fb; }

.automation-module-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--module-size);
  height: var(--module-size);
  border: 1px solid #fff;
  border-radius: 50%;
  background: radial-gradient(ellipse at 31% 24%, #fff 0%, var(--module-tint) 67%);
  color: var(--module-ink);
  box-shadow: 0 5px 12px #4b679d25;
  font-size: clamp(21px, 2.28vw, 45px);
}

.automation-module[data-current] .automation-module-icon,
.automation-module[aria-pressed="true"] .automation-module-icon {
  outline: 2px solid #6aa7ff;
  outline-offset: 2px;
}

.automation-module:not(:disabled):hover .automation-module-label {
  background: #fff;
}

.automation-module:focus-visible {
  outline: 2px solid #175bd3;
  outline-offset: 4px;
  border-radius: 10px;
}

.automation-module-check {
  position: absolute;
  right: -1px;
  bottom: -1px;
  display: grid;
  place-items: center;
  width: clamp(14px, 1.22vw, 22px);
  height: clamp(14px, 1.22vw, 22px);
  border: 1px solid #fff;
  border-radius: 50%;
  background: #d8f4e8;
  color: #116849;
  font-size: clamp(10px, .83vw, 15px);
  opacity: 0;
}

.automation-module[data-done] .automation-module-check {
  opacity: 1;
}

.automation-module-label {
  align-self: stretch;
  display: grid;
  width: 100%;
  align-content: start;
  gap: 4px;
  border: 1px solid #ffffffbf;
  border-radius: clamp(10px, 1.02vw, 20px);
  padding: clamp(7px, .72vw, 13px) 3px;
  background: #f5f8ff;
}

.automation-module-label strong {
  font-size: clamp(11px, .94vw, 18px);
  line-height: 1.13;
  letter-spacing: -.024em;
}

.automation-module-label small {
  color: #405574;
  font-size: clamp(9px, .76vw, 14px);
  line-height: 1.2;
}

.automation-status {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: min(80%, 640px);
  min-height: 65px;
  margin-inline: auto;
  padding: 8px 12px;
  border: 1px solid #fff;
  border-radius: clamp(12px, 1.37vw, 26px);
  background: #f8faff;
  box-shadow: 0 9px 24px #3264a41a;
}

.automation-status-icon,
.automation-outcomes li > span {
  display: grid;
  place-items: center;
  width: clamp(31px, 3.05vw, 60px);
  height: clamp(31px, 3.05vw, 60px);
  border-radius: 50%;
  background: #e3edff;
  color: #115ce2;
  font-size: clamp(16px, 1.52vw, 28px);
}

.automation-status strong {
  display: block;
  font-size: clamp(12px, 1vw, 19px);
  line-height: 1.16;
}

.automation-status p {
  margin-top: 3px;
  font-size: clamp(10px, .77vw, 14px);
  color: var(--automation-copy);
  line-height: 1.26;
}

.automation-status-label {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: clamp(62px, 4.8vw, 94px);
  gap: 4px;
  padding: 5px 7px;
  border-radius: 100px;
  background: #e8effb;
  color: #344e79;
  font-size: clamp(9px, .73vw, 14px);
  font-weight: 700;
}

.automation-status-label::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.automation-status[data-execution="processing"] .automation-status-label {
  color: #1157c9;
}

.automation-status[data-execution="complete"] .automation-status-icon,
.automation-status[data-execution="complete"] .automation-status-label {
  color: #0a6d4a;
  background: #dbf4e9;
}

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

.automation-outcomes {
  width: min(63%, 1320px);
  margin: 0 auto;
  padding: clamp(13px, 1.38vw, 27px) 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid #fff;
  border-radius: clamp(17px, 2vw, 36px);
  background: #f9fbff;
  box-shadow: 0 12px 33px #254c8516;
}

.automation-outcomes li {
  display: flex;
  align-items: center;
  gap: clamp(7px, 1vw, 22px);
  padding-inline: clamp(8px, 1.55vw, 33px);
  min-width: 0;
}

.automation-outcomes li + li {
  border-left: 1px solid #dce7f5;
}

.automation-outcomes li > span {
  flex: 0 0 auto;
}

.automation-outcomes strong {
  display: block;
  color: #135bd5;
  font-size: clamp(13px, 1.24vw, 23px);
  letter-spacing: -.04em;
  line-height: 1.15;
}

.automation-outcomes p {
  margin-top: 3px;
  color: var(--automation-copy);
  font-size: clamp(10px, .84vw, 16px);
  line-height: 1.28;
}

@media (max-width: 1100px) {
  .automation-layout {
    width: min(91%, 850px);
    grid-template: "scenario scenario" auto "left right" auto / minmax(0, 1fr) minmax(0, 1fr);
    row-gap: 26px;
  }

  .automation-side {
    justify-content: start;
    gap: 15px;
  }

  .automation-step::after {
    display: none;
  }

  .automation-outcomes {
    width: min(91%, 850px);
  }
}

@media (max-width: 680px) {
  .automation-viewport {
    gap: 21px;
    padding-block: 51px;
  }

  .automation-viewport h2 {
    font-size: clamp(36px, 8.7vw, 54px);
  }

  .automation-layout {
    grid-template: none / minmax(0, 1fr);
    gap: 18px;
  }

  .automation-scenario {
    grid-area: 1 / 1;
  }

  .automation-side {
    display: contents;
  }

  .automation-track-viewport {
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #789bd6 transparent;
  }

  .automation-track {
    min-width: 480px;
    padding-inline: 4px;
  }

  .automation-status {
    width: 100%;
    margin-top: 8px;
    min-height: 64px;
  }

  .automation-status-label {
    padding-inline: 5px;
  }

  .automation-story.is-interactive:not(.is-reduced) .automation-step:not([data-selected]) {
    display: none;
  }

  .automation-step {
    min-height: 66px;
  }

  .automation-outcomes {
    grid-template-columns: minmax(0, 1fr);
    padding: 2px 13px;
  }

  .automation-outcomes li {
    padding: 10px 0;
    gap: 11px;
  }

  .automation-outcomes li + li {
    border-left: 0;
    border-top: 1px solid #dce7f5;
  }

  .automation-outcomes p {
    font-size: 12px;
  }
}
