/* Tutorials (index + detail). Mobile first, built on .page-layout (style.css). */

.tuto-lead {
  font-size: 1.2rem !important;
  color: #444 !important;
}

.tuto-meta {
  font-size: 1rem !important;
  color: #888 !important;
  margin: -0.75rem 0 1rem;
}

/* Index: cards */
.tuto-grid {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.tuto-card a {
  display: block;
  height: 100%;
  padding: 1.25rem 1.5rem;
  background: #fff;
  border: 1px solid #e6e9ef;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  color: inherit;
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.tuto-card a:hover,
.tuto-card a:focus-visible {
  transform: translateY(-2px);
  border-color: var(--blue);
}

.tuto-card h2 {
  font-size: 1.3rem;
  line-height: 1.35;
  margin: 0.25rem 0 0.5rem;
}

.tuto-card p {
  margin: 0 0 0.75rem;
  font-size: 1rem !important;
}

.tuto-time {
  font-size: 0.9rem;
  color: #888;
}

.tuto-more {
  font-weight: 700;
  color: var(--blue);
}

/* Detail */
.tuto-breadcrumb {
  font-size: 0.95rem;
  color: #888;
  margin-bottom: 1rem;
}

.tuto-breadcrumb a {
  color: var(--blue);
  text-decoration: none;
}

.tuto-steps {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
}

.tuto-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem 0;
  border-top: 1px solid #eee;
  scroll-margin-top: 90px; /* sticky header */
}

.tuto-step-text { width: 100%; }

.tuto-step-number {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  background: var(--blue);
  border-radius: 999px;
  padding: 0.1rem 0.75rem;
}

.page-layout .tuto-step h2 {
  font-size: 1.4rem;
  margin: 0.5rem 0;
}

.tuto-shot {
  margin: 0;
  width: 100%;
  max-width: 260px;
}

.tuto-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
}

/* Only rendered in debug, while the screenshot does not exist yet */
.tuto-shot-missing {
  aspect-ratio: 540 / 1110;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.85rem;
  color: #888;
  border: 2px dashed #ccc;
  border-radius: 16px;
  padding: 1rem;
  word-break: break-all;
}

.tuto-note {
  background: #f8f9fa;
  border-left: 4px solid var(--light-blue);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  font-size: 1.05rem !important;
}

.tuto-soon { border-left-color: #f0ad4e; }

.tuto-others ul {
  padding-left: 1.2rem;
}

.tuto-others a {
  color: var(--blue);
}

@media (min-width: 640px) {
  .tuto-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .tuto-step {
    flex-direction: row;
    align-items: flex-start;
    gap: 2.5rem;
  }
  .tuto-step-text { flex: 1; }
  .tuto-shot { flex: 0 0 220px; }
}
