/* ═══════════════════════════════════════════════════════════════════════
   TUTORIAL — shared layout for /tutorials/*. Long-form guide template.
   Single column, masthead like /legal.html, inline TOC, brick accents.
   ═══════════════════════════════════════════════════════════════════════ */
.tut { max-width: 760px; margin: 0 auto; padding: 8px 24px 80px; }

.tut-mast {
  background: var(--cream);
  border: 1.5px solid var(--ink);
  padding: 26px 32px 30px;
  position: relative;
  margin: 4px 0 30px;
  box-shadow: 5px 5px 0 0 var(--ink);
}
.tut-mast::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px dashed var(--ink-mute);
  pointer-events: none;
  opacity: 0.4;
}
.tut-mast-row {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--rule);
  flex-wrap: wrap;
  gap: 8px;
}
.tut-mast-tag { color: var(--ink); font-weight: 600; }
.tut-mast-tag::before { content: "$ "; color: var(--brick); font-weight: 700; }
.tut-mast-h1 {
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  font-variation-settings: "opsz" 96, "wdth" 92, "wght" 800;
  font-size: clamp(30px, 4.5vw, 44px);
  letter-spacing: -0.02em;
  line-height: 1.07;
  color: var(--ink);
  margin: 0 0 12px;
  position: relative;
}
.tut-mast-sub {
  font-size: 16px;
  color: var(--ink-soft);
  max-width: 60ch;
  line-height: 1.55;
  margin: 0;
  position: relative;
}

/* TOC card — mono, dense */
.tut-toc {
  background: var(--paper-pure);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 14px 18px 14px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.65;
  margin: 0 0 30px;
}
.tut-toc-tag {
  display: block;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--rule);
}
.tut-toc-tag::before { content: "$ "; color: var(--brick); font-weight: 700; }
.tut-toc ol { list-style: none; counter-reset: tutsec; padding: 0; margin: 0; }
.tut-toc li {
  counter-increment: tutsec;
  padding-left: 32px;
  position: relative;
  margin-bottom: 4px;
}
.tut-toc li::before {
  content: counter(tutsec, decimal-leading-zero);
  position: absolute;
  left: 0;
  color: var(--brick);
  font-weight: 700;
}
.tut-toc a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px dotted transparent;
}
.tut-toc a:hover { color: var(--brick); border-bottom-color: var(--brick); }

/* Body typography */
.tut-body { color: var(--ink); }
.tut-body .lead {
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 0 0 30px;
  max-width: 65ch;
}
.tut-body h2 {
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  font-variation-settings: "opsz" 96, "wdth" 92, "wght" 800;
  font-size: clamp(22px, 3vw, 28px);
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--brick);
  margin: 50px 0 6px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ink);
  scroll-margin-top: 24px;
}
.tut-body h2 .tut-h2-num {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-mute);
  letter-spacing: 0.1em;
  vertical-align: middle;
  margin-right: 10px;
  padding: 2px 8px;
  border: 1px solid var(--ink-mute);
  border-radius: 2px;
}
.tut-body h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin: 26px 0 8px;
  letter-spacing: -0.01em;
}
.tut-body p {
  font-size: 15.5px;
  line-height: 1.7;
  margin: 0 0 16px;
  max-width: 70ch;
}
.tut-body ul, .tut-body ol {
  margin: 0 0 18px 0;
  padding-left: 22px;
}
.tut-body li {
  font-size: 15.5px;
  line-height: 1.65;
  margin-bottom: 6px;
}
.tut-body li strong { color: var(--ink); }
.tut-body strong { font-weight: 700; color: var(--ink); }
.tut-body em { font-style: italic; color: var(--ink-soft); }
.tut-body a {
  color: var(--brick);
  text-decoration: underline;
  text-decoration-color: rgba(176, 80, 50, 0.4);
  text-underline-offset: 2px;
}
.tut-body a:hover { text-decoration-color: var(--brick); }
.tut-body code {
  font-family: var(--font-mono);
  font-size: 13.5px;
  background: rgba(176, 80, 50, 0.08);
  color: var(--brick);
  padding: 1px 6px;
  border-radius: 3px;
}
.tut-body blockquote {
  margin: 22px 0;
  padding: 14px 22px;
  border-left: 3px solid var(--brick);
  background: rgba(0, 0, 0, 0.025);
  font-style: italic;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  max-width: 65ch;
}
.tut-body blockquote em { color: var(--ink-soft); font-style: normal; }
.tut-callout {
  background: var(--cream);
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  padding: 16px 22px;
  margin: 22px 0;
  box-shadow: 3px 3px 0 0 var(--ink);
  max-width: 70ch;
}
.tut-callout-tag {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brick);
  margin-bottom: 8px;
}
.tut-callout p:last-child { margin-bottom: 0; }

/* Niche/list cards (used in best-niches tutorial) */
.tut-niche {
  border: 1px solid var(--rule);
  border-left: 4px solid var(--brick);
  border-radius: 4px;
  padding: 18px 22px;
  margin: 18px 0;
  background: var(--paper-pure);
}
.tut-niche h3 {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0 0 8px;
  font-size: 18px;
}
.tut-niche-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--brick);
  letter-spacing: 0.06em;
  font-weight: 700;
  min-width: 32px;
}
.tut-niche-meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  margin: 0 0 10px;
  padding-left: 46px;
}
.tut-niche-meta strong { color: var(--brick); font-weight: 700; }
.tut-niche-body { padding-left: 46px; }
.tut-niche-body p { font-size: 14.5px; line-height: 1.6; margin: 0 0 10px; }
.tut-niche-body p:last-child { margin-bottom: 0; }
.tut-niche-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 2px;
  margin-right: 6px;
}
.tut-niche-tag.like { background: rgba(0, 110, 80, 0.10); color: var(--signal, #006e50); }
.tut-niche-tag.risk { background: rgba(161, 44, 44, 0.08); color: var(--brick); }

/* End-CTA */
.tut-cta {
  margin: 64px 0 0;
  padding: 26px 28px;
  background: var(--cream);
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  box-shadow: 5px 5px 0 0 var(--ink);
  text-align: center;
}
.tut-cta h3 {
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--ink);
}
.tut-cta p {
  margin: 0 0 16px;
  font-size: 14.5px;
  color: var(--ink-soft);
  max-width: 50ch;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.55;
}
.tut-cta-btn {
  display: inline-block;
  padding: 12px 22px;
  background: var(--brick);
  color: var(--paper);
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  box-shadow: 3px 3px 0 0 var(--ink);
  text-decoration: none !important;
  transition: transform 0.12s, box-shadow 0.12s;
}
.tut-cta-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 0 var(--ink);
}

/* Related tutorials strip */
.tut-related {
  margin: 48px 0 0;
  padding: 24px 0 0;
  border-top: 1.5px dashed var(--ink);
}
.tut-related-tag {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 14px;
}
.tut-related-tag::before { content: "$ "; color: var(--brick); font-weight: 700; }
.tut-related-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.tut-related-item {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--paper-pure);
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.12s, box-shadow 0.12s;
}
.tut-related-item:hover {
  border-color: var(--ink);
  box-shadow: 2px 2px 0 0 var(--ink);
}
.tut-related-h {
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 4px;
  color: var(--ink);
}
.tut-related-d {
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.45;
  margin: 0;
}

@media (max-width: 600px) {
  .tut-mast { padding: 22px 22px 22px; }
  .tut-toc ol { padding-left: 0; }
  .tut-niche-meta, .tut-niche-body { padding-left: 0; }
  .tut-niche h3 { flex-wrap: wrap; }
}
