.tut-hero {
  background: var(--ink);
  color: #fff;
  padding: 28px 0 22px;
}
.tut-hero h1 {
  font-size: 26px;
  letter-spacing: -0.03em;
}
.tut-hero p {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
  max-width: 46em;
}

.tut-page {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 20px;
  padding: 24px 0 48px;
}
.tut-page > main { min-width: 0; }

.tut-nav {
  position: sticky;
  top: 64px;
  align-self: start;
  font-size: 13px;
}
.tut-nav p {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px;
}
.tut-nav a {
  display: block;
  text-decoration: none;
  color: var(--muted);
  padding: 5px 0 5px 10px;
  border-left: 1px solid var(--line);
}
.tut-nav a.on,
.tut-nav a:hover {
  color: var(--fg);
  border-left-color: var(--accent);
}

.chapter {
  scroll-margin-top: 64px;
  padding: 4px 0 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.chapter:last-of-type { border-bottom: 0; margin-bottom: 0; }
.chapter h2 {
  font-size: 20px;
  margin-bottom: 8px;
}
.chapter h2 em {
  font-style: normal;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  color: var(--muted);
  margin-right: 8px;
}
.chapter > .lead {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 16px;
}

.step {
  display: grid;
  grid-template-columns: minmax(0, 34rem) 220px;
  justify-content: start;
  align-items: start;
  gap: 16px;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 14px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line);
}
.step.reverse { grid-template-columns: 220px minmax(0, 34rem); }
.step-text { min-width: 0; }
.step h3 { font-size: 15px; margin-bottom: 8px; }
.step p, .step li { color: var(--muted); font-size: 13px; }
.step p + p { margin-top: 8px; }
.step ol, .step ul { margin: 8px 0 0 18px; }
.step li + li { margin-top: 5px; }
.step .note {
  margin-top: 10px;
  padding: 8px 10px;
  background: #eef2f6;
  font-size: 12px;
  color: var(--muted);
}

figure.shot { margin: 0; width: 220px; }
figure.shot img {
  display: block;
  width: 220px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  background: #eee;
}
figure.shot.icon img {
  width: 96px;
  border-radius: 22px;
  margin: 0 auto;
}
figure.shot.icon { width: 96px; }
figure.shot figcaption {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.tut-foot {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 900px) {
  .tut-page { grid-template-columns: minmax(0, 1fr); }
  .tut-nav {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-bottom: 8px;
  }
  .tut-nav p { width: 100%; }
  .tut-nav a { border: 0; padding: 0; }
  .step, .step.reverse {
    grid-template-columns: 1fr;
    width: 100%;
  }
  .step.reverse .shot { order: 2; }
  figure.shot { width: min(220px, 100%); }
  figure.shot img { width: 100%; }
}

@media (max-width: 720px) {
  .tut-hero { padding: 22px 0 16px; }
  .tut-hero h1 { font-size: 24px; }
  .tut-page { width: min(1160px, calc(100% - 24px)); padding: 16px 0 40px; }
  .tut-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -12px 12px;
    padding: 0 12px 8px;
    gap: 8px;
  }
  .tut-nav p { display: none; }
  .tut-nav a {
    flex: 0 0 auto;
    padding: 7px 10px;
    border: 1px solid var(--line);
    background: #fff;
  }
  .tut-nav a.on,
  .tut-nav a:hover {
    border-color: var(--accent);
    color: var(--accent);
  }
  .step { padding: 12px; }
  figure.shot { margin-inline: auto; }
  figure.shot.icon { width: 96px; }
  figure.shot.icon img { width: 96px; }
}
