.tutorial-masthead {
  position: relative;
  overflow: hidden;
  border-bottom: var(--stroke-heavy) double var(--ink-line);
  background:
    linear-gradient(90deg, var(--transparent) 0 69%, var(--blue-wash) 69% 100%),
    radial-gradient(circle at 12% 22%, var(--red-wash) 0 2px, var(--transparent) 3px),
    var(--paper);
  background-size: auto, 19px 19px, auto;
}

.tutorial-masthead::after {
  position: absolute;
  top: 24px;
  right: -42px;
  width: 190px;
  height: 190px;
  border: var(--stroke-heavy) double var(--brand-red);
  border-radius: var(--radius-round);
  content: "";
  opacity: 0.28;
  pointer-events: none;
}

.tutorial-masthead-inner {
  min-height: 620px;
  padding-top: clamp(62px, 8vw, 108px);
  padding-bottom: clamp(62px, 8vw, 108px);
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  align-items: center;
  gap: clamp(36px, 7vw, 90px);
}

.tutorial-title-block {
  min-width: 0;
}

.tutorial-title-block h1 {
  max-width: 850px;
  color: var(--brand-red);
}

.tutorial-summary {
  max-width: 760px;
  margin-bottom: 28px;
  color: var(--text-soft);
  font-size: clamp(1.02rem, 1.7vw, 1.2rem);
}

.tutorial-facts {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tutorial-ticket {
  position: relative;
  min-width: 0;
  padding: 12px;
  border: var(--stroke-heavy) double var(--ink-line);
  background: var(--paper-bright);
  transform: rotate(1.5deg);
}

.tutorial-ticket::before,
.tutorial-ticket::after {
  position: absolute;
  top: 50%;
  width: 24px;
  height: 24px;
  border: var(--stroke-medium) solid var(--ink-line);
  border-radius: var(--radius-round);
  background: var(--paper);
  content: "";
  transform: translateY(-50%);
}

.tutorial-ticket::before {
  left: -15px;
}

.tutorial-ticket::after {
  right: -15px;
}

.tutorial-ticket-head {
  padding: 11px 14px;
  color: var(--paper-bright);
  background: var(--brand-red);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-align: center;
}

.tutorial-ticket ol {
  margin: 0;
  padding: 18px 14px;
  display: grid;
  gap: 0;
  list-style: none;
}

.tutorial-ticket li {
  min-width: 0;
  margin: 0;
  padding: 13px 4px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: var(--stroke-thin) dashed var(--ink-line);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 900;
}

.tutorial-ticket li:last-child {
  border-bottom: 0;
}

.tutorial-ticket li span {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: var(--stroke-medium) solid var(--brand-red);
  border-radius: var(--radius-round);
  color: var(--brand-red-deep);
  font-family: var(--font-mono);
  font-size: 0.74rem;
}

.tutorial-ticket p {
  margin: 0;
  padding: 14px;
  border-top: var(--stroke-medium) solid var(--ink-line);
  color: var(--text-soft);
  font-size: 0.84rem;
}

.platform-notes {
  margin-top: 28px;
}

.platform-notes .tab-panel h2 {
  font-size: clamp(1.55rem, 3vw, 2.35rem);
}

.platform-notes .tab-panel p:last-child {
  margin-bottom: 0;
}

.guide-chapter {
  scroll-margin-top: calc(var(--header-size) + 18px);
}

.guide-step-label {
  width: max-content;
  max-width: 100%;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--brand-red-deep);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.guide-step-label span {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: var(--stroke-heavy) double var(--brand-red);
  border-radius: var(--radius-round);
  color: var(--brand-red);
  background: var(--paper-bright);
  font-size: 0.9rem;
  letter-spacing: 0;
}

.guide-chapter .prose > h2 {
  margin-top: 0;
}

.guide-chapter .prose > h3 {
  position: relative;
  padding-left: 22px;
}

.guide-chapter .prose > h3::before {
  position: absolute;
  top: 0.16em;
  bottom: 0.1em;
  left: 0;
  width: 7px;
  background: var(--brand-red);
  content: "";
}

.guide-after-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.guide-after-grid .card {
  min-height: 100%;
}

.guide-after-grid .card p:last-child {
  margin-bottom: 0;
}

.guide-next-links {
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: var(--stroke-medium) solid var(--ink-line);
  background: var(--paper-bright);
}

.guide-next-links > div {
  min-width: 0;
  padding: clamp(22px, 4vw, 38px);
}

.guide-next-links > div + div {
  border-left: var(--stroke-medium) solid var(--ink-line);
  background: var(--paper-blue);
}

.guide-next-links p {
  color: var(--text-soft);
}

@media (max-width: 900px) {
  .tutorial-masthead-inner {
    min-height: auto;
    grid-template-columns: minmax(0, 1fr);
  }

  .tutorial-ticket {
    width: min(520px, 100%);
    transform: none;
  }

  .guide-after-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .tutorial-masthead {
    background:
      radial-gradient(circle at 86% 18%, var(--blue-wash), var(--transparent) 38%),
      var(--paper);
  }

  .tutorial-masthead::after {
    width: 120px;
    height: 120px;
  }

  .tutorial-masthead-inner {
    padding-top: 48px;
    padding-bottom: 54px;
    gap: 34px;
  }

  .tutorial-title-block h1 {
    font-size: clamp(3rem, 17vw, 4.5rem);
  }

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

  .guide-next-links {
    grid-template-columns: minmax(0, 1fr);
  }

  .guide-next-links > div + div {
    border-top: var(--stroke-medium) solid var(--ink-line);
    border-left: 0;
  }

  .guide-next-links .button {
    width: 100%;
  }

  .guide-step-label {
    letter-spacing: 0.06em;
  }
}