.tutorial-hero {
  position: relative;
  padding-top: clamp(62px, 9vw, 108px);
  padding-bottom: clamp(54px, 8vw, 94px);
  overflow-x: clip;
  background:
    linear-gradient(var(--color-rule) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-rule) 1px, transparent 1px),
    radial-gradient(ellipse at center bottom, var(--color-accent-haze), transparent 66%);
  background-size: 54px 54px, 54px 54px, auto;
}

.tutorial-hero::before,
.tutorial-hero::after {
  position: absolute;
  bottom: 0;
  width: min(28vw, 340px);
  height: 62%;
  background: linear-gradient(to bottom, transparent, var(--color-panel-wash));
  content: "";
  pointer-events: none;
}

.tutorial-hero::before {
  left: 0;
  clip-path: polygon(0 0, 100% 28%, 72% 100%, 0 100%);
}

.tutorial-hero::after {
  right: 0;
  clip-path: polygon(0 28%, 100% 0, 100% 100%, 28% 100%);
}

.tutorial-hero-copy {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin-inline: auto;
  text-align: center;
}

.tutorial-hero-copy .eyebrow {
  margin-top: 18px;
}

.tutorial-hero-copy .lead {
  margin-inline: auto;
}

.tutorial-hero-copy .button-row {
  justify-content: center;
  margin-top: 30px;
}

.tutorial-facts {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin: 26px 0 0;
  padding: 0;
  color: var(--color-muted);
  list-style: none;
  font-size: 13px;
}

.tutorial-facts li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tutorial-document {
  position: relative;
}

.tutorial-document a:not(.btn-primary):not(.btn-secondary):not(.toc-tabs a) {
  color: var(--color-accent-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tutorial-intro {
  padding-top: 16px;
}

.tutorial-intro > p,
.tutorial-step > p,
.platform-instruction p,
.tutorial-next > p {
  color: var(--color-muted);
}

.tutorial-flow {
  counter-reset: tutorial-step;
}

.tutorial-step {
  position: relative;
  padding-top: 72px;
  counter-increment: tutorial-step;
}

.tutorial-step::before {
  position: absolute;
  top: 82px;
  left: -58px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: var(--radius-xs);
  background: var(--color-accent);
  color: var(--color-text);
  box-shadow: var(--shadow-low);
  content: counter(tutorial-step);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 750;
}

.tutorial-step::after {
  position: absolute;
  top: 120px;
  bottom: -62px;
  left: -40px;
  width: 1px;
  background: var(--color-rule);
  content: "";
}

.tutorial-step:last-child::after {
  display: none;
}

.step-heading {
  margin-bottom: 24px;
}

.step-code,
.platform-os {
  display: inline-flex;
  margin-bottom: 9px;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  background: var(--color-panel-raised);
  color: var(--color-accent-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.12em;
}

.step-heading h2 {
  margin-bottom: 0;
}

.step-action {
  display: flex;
  margin-top: 28px;
}

.platform-instructions {
  display: grid;
  gap: 18px;
  margin-top: 30px;
}

.platform-instruction {
  padding: clamp(22px, 4vw, 34px);
  border-radius: var(--radius-md);
  background: var(--color-panel);
  box-shadow: var(--shadow-low);
}

.platform-heading {
  margin-bottom: 18px;
}

.platform-heading h3 {
  margin-bottom: 0;
}

.platform-instruction p:last-child {
  margin-bottom: 0;
}

.tutorial-next {
  margin-top: 84px;
}

.next-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

@media (max-width: 940px) {
  .tutorial-step::before {
    left: -46px;
  }

  .tutorial-step::after {
    left: -28px;
  }
}

@media (max-width: 860px) {
  .tutorial-hero::before,
  .tutorial-hero::after {
    height: 38%;
    opacity: 0.55;
  }

  .tutorial-step {
    padding-top: 62px;
  }

  .tutorial-step::before {
    position: static;
    width: 34px;
    height: 34px;
    margin-bottom: 14px;
  }

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

@media (max-width: 640px) {
  .tutorial-hero {
    padding-top: 46px;
    background-size: 38px 38px, 38px 38px, auto;
  }

  .tutorial-hero::before,
  .tutorial-hero::after {
    display: none;
  }

  .tutorial-facts {
    align-items: flex-start;
    flex-direction: column;
    margin-inline: auto;
    width: fit-content;
    text-align: left;
  }

  .tutorial-step {
    padding-top: 52px;
  }

  .step-action .btn-secondary,
  .next-links .btn-secondary {
    width: 100%;
  }

  .next-links {
    align-items: stretch;
    flex-direction: column;
  }

  .platform-instruction {
    padding: 20px;
  }

  .tutorial-next {
    margin-top: 62px;
  }
}