/**
 * Tutorial · CSS específico do CPT `tutorial`.
 *
 * Premissas:
 *   1. Container e max-width vêm de .zigg-article (definido em article.css).
 *      NÃO redefinir aqui.
 *   2. Componentes compartilhados (.zigg-breadcrumb, .dl-pre-comments-ad,
 *      .dl-editor, .dl-comments) estão em assets/css/components/singles.css.
 *   3. Foco em LEITURA: tipografia confortável, sem decorações excessivas,
 *      hierarquia clara entre H1/H2/H3, listas e imagens.
 *   4. Sidebar à direita no desktop (≥1100px), abaixo do conteúdo no mobile.
 *   5. Reutiliza tokens globais (--paper, --ink, --ember, --f-*).
 *
 * Carregado condicionalmente via inc/enqueue.php quando is_singular('tutorial').
 */

/* ============================================================
   Container — usa --maxw global (1240px) pra manter consistência total
   com os outros singulares do tema. NÃO criar largura própria.
   ============================================================ */
/* .zigg-article já tem max-width: var(--maxw) + margin auto + padding
   definido em components/singles.css. Tutorial não sobrescreve. */

/* ============================================================
   Layout 2-col (main + rail) — segue spec do design enviado.
   Desktop ≥1000px: 1fr + 320px sidebar, gap 64px.
   Mobile: stack vertical, gap 56px.
   ============================================================ */
.tut-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
  padding-bottom: 80px;
}
@media (min-width: 1000px) {
  .tut-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 64px;
    align-items: start;
  }
}
.tut-main { min-width: 0; }

/* ============================================================
   Hero — manchete editorial.
   Sem invenções: kicker + h1 + deck + meta. Sem ilustração ink/gradient
   placeholder; usa featured image quando disponível.
   ============================================================ */
.tut-hero {
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr;
  padding: 24px 0 32px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 8px;
}
@media (min-width: 980px) {
  .tut-hero {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 48px;
    align-items: end;
  }
}
.tut-hero__col-text { min-width: 0; }

.tut-hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.tut-hero__cat {
  padding: 3px 9px;
  background: var(--ember);
  color: #fff;
  border-radius: 99px;
  font-weight: 500;
  letter-spacing: .04em;
}
.tut-hero__cat-link {
  color: var(--mute);
  text-decoration: none;
}
.tut-hero__cat-link:hover { color: var(--ember); }
.tut-hero__diff { color: var(--mute); }

.tut-hero__title {
  font-family: var(--f-sans);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -.024em;
  line-height: 1.1;
  margin: 0 0 14px;
  color: var(--ink);
  text-wrap: balance;
}

.tut-hero__deck {
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink-2);
  margin: 0 0 22px;
  max-width: 60ch;
}

.tut-hero__meta {
  display: grid;
  gap: 14px 24px;
  grid-template-columns: 1fr;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
}
@media (min-width: 520px) {
  .tut-hero__meta { grid-template-columns: auto 1fr; align-items: center; }
}
.tut-hero__author {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: inherit;
}
.tut-hero__author-av {
  width: 40px; height: 40px;
  border-radius: 99px;
  flex-shrink: 0;
  object-fit: cover;
}
.tut-hero__author-av--fallback {
  background: var(--ember);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--f-sans);
  font-weight: 600;
  font-size: 16px;
}
.tut-hero__author-text { display: grid; gap: 2px; }
.tut-hero__author-name {
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -.005em;
  color: var(--ink);
}
.tut-hero__author-role {
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--mute);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.tut-hero__facts {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--mute);
  justify-self: end;
}
@media (max-width: 519px) { .tut-hero__facts { justify-self: start; gap: 16px; } }
.tut-hero__fact { display: grid; gap: 2px; }
.tut-hero__fact strong {
  display: block;
  font-family: var(--f-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -.005em;
  text-transform: none;
  color: var(--ink);
}

/* Featured image — sem decoração, só radius leve */
.tut-hero__feat {
  margin: 0;
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow: hidden;
  background: var(--paper-2);
}
.tut-hero__feat-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tut-hero__feat-cap {
  display: none; /* legenda da featured não aparece — limpo */
}
.tut-hero__feat--placeholder {
  display: grid;
  place-items: center;
  background: var(--paper-2);
  border: 1px solid var(--rule);
}
.tut-hero__feat-glyph {
  font-family: var(--f-mono);
  font-size: 18px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mute-2, var(--mute));
}
.tut-hero__feat-badge { display: none; }

/* ============================================================
   Snapshot (Você vai aprender / Você vai precisar / callouts)
   Sem decorações pesadas — só caixas neutras pra organizar.
   ============================================================ */
.tut-snapshot {
  margin: 24px 0 32px;
  display: grid;
  gap: 16px;
}
.tut-preflight {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .tut-preflight { grid-template-columns: 1fr 1fr; }
}
.tut-preflight__block {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 18px 20px;
  display: grid;
  gap: 10px;
}
.tut-preflight__h {
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--mute);
  font-weight: 500;
  margin: 0;
}
.tut-preflight__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink-2);
}
.tut-preflight__list li {
  position: relative;
  padding-left: 16px;
}
.tut-preflight__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px; height: 5px;
  background: var(--ember);
  border-radius: 99px;
}

/* ============================================================
   Callouts — 5 estilos (tip/warn/important/info/note)
   ============================================================ */
.tut-callout {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 10px;
  margin: 1.4em 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
  border: 1px solid transparent;
  align-items: start;
}
.tut-callout::before {
  content: "";
  width: 20px; height: 20px;
  border-radius: 99px;
  background: var(--paper);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 12px;
  margin-top: 1px;
  flex-shrink: 0;
}
.tut-callout__body { display: grid; gap: 4px; min-width: 0; }
.tut-callout__h {
  font-family: var(--f-sans);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin: 0;
}
.tut-callout p { margin: 0; }
.tut-callout code {
  font-family: var(--f-mono);
  font-size: .9em;
  padding: 1px 6px;
  border-radius: 4px;
}

.tut-callout--tip { background: #E5F0E9; border-color: #1A7F4E; }
.tut-callout--tip .tut-callout__h, .tut-callout--tip strong { color: #1A7F4E; }
.tut-callout--tip::before { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231A7F4E' stroke-width='3'><path d='m5 12 5 5L20 7'/></svg>"); }
.tut-callout--tip code { background: rgba(26,127,78,.1); }

.tut-callout--warn { background: #FAE2DF; border-color: #C3261B; }
.tut-callout--warn .tut-callout__h, .tut-callout--warn strong { color: #C3261B; }
.tut-callout--warn::before { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C3261B' stroke-width='3'><path d='M12 8v5M12 16v.5'/><path d='M10.3 3.9 1.8 18.4a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z'/></svg>"); }
.tut-callout--warn code { background: rgba(195,38,27,.1); }

.tut-callout--important { background: #FFE8DF; border-color: var(--ember); }
.tut-callout--important .tut-callout__h, .tut-callout--important strong { color: var(--ember); }
.tut-callout--important::before { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FF4D1F' stroke-width='2.5'><circle cx='12' cy='12' r='9'/><path d='M12 8v5M12 16.5h.01' stroke-width='3' stroke-linecap='round'/></svg>"); }

.tut-callout--info { background: #E4ECF9; border-color: #2A6FDB; }
.tut-callout--info .tut-callout__h, .tut-callout--info strong { color: #2A6FDB; }
.tut-callout--info::before { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232A6FDB' stroke-width='2.5'><circle cx='12' cy='12' r='9'/><path d='M12 11v6M12 7.5h.01' stroke-width='3' stroke-linecap='round'/></svg>"); }

.tut-callout--note { background: var(--paper-2); border-color: var(--rule); }
.tut-callout--note .tut-callout__h, .tut-callout--note strong { color: var(--mute); }

/* ============================================================
   TOC inline (mobile)
   ============================================================ */
.tut-toc-inline {
  display: block;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 14px 18px;
  margin: 0 0 28px;
}
@media (min-width: 1100px) { .tut-toc-inline { display: none; } }
.tut-toc-inline summary {
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--mute);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tut-toc-inline summary::-webkit-details-marker { display: none; }
.tut-toc-inline summary::after { content: "+"; color: var(--ember); font-size: 16px; }
.tut-toc-inline[open] summary::after { content: "−"; }
.tut-toc-inline__ct { color: var(--ember); margin-left: auto; padding-right: 12px; }
.tut-toc__list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 2px;
  counter-reset: tuttoc;   /* numeração 01, 02, 03... */
}
.tut-toc__list li { counter-increment: tuttoc; }
.tut-toc__list a {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  padding: 6px 0;
  text-decoration: none;
  color: var(--ink-2);
  font-size: 14px;
  letter-spacing: -.005em;
  line-height: 1.4;
}
.tut-toc__list a::before {
  content: counter(tuttoc, decimal-leading-zero);
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--mute);
  letter-spacing: .04em;
  align-self: center;
}
.tut-toc__list a:hover { color: var(--ember); }
.tut-toc__list a:hover::before { color: var(--ember); }

/* ============================================================
   Prose — tipografia editorial confortável.
   Spec do user: 1.05rem / 1.75 line-height / margin 1.25rem entre paragrafos.
   Hierarquia clara, sem decorações inventadas.
   ============================================================ */
.tut-prose {
  font-size: 1.05rem;   /* 16.8px em base 16 */
  line-height: 1.75;
  color: var(--ink-2);
}

/* Parágrafos — espaçamento via margin-bottom consistente */
.tut-prose p {
  margin: 0 0 1.25rem;
}
.tut-prose p:last-child { margin-bottom: 0; }
.tut-prose strong { color: var(--ink); font-weight: 600; }
.tut-prose em { font-style: italic; }
.tut-prose a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--ember);
}
.tut-prose a:hover {
  color: var(--ember);
  text-decoration-thickness: 2px;
}

/* Headings — hierarquia limpa, sem ornamentos */
.tut-prose h2 {
  font-family: var(--f-sans);
  font-weight: 700;
  font-size: clamp(22px, 2.4vw, 28px);
  letter-spacing: -.018em;
  line-height: 1.25;
  color: var(--ink);
  margin: 2.4rem 0 1rem;
  text-wrap: balance;
  scroll-margin-top: calc(var(--header-h, 96px) + 16px);
}
.tut-prose h3 {
  font-family: var(--f-sans);
  font-weight: 600;
  font-size: clamp(18px, 1.8vw, 21px);
  letter-spacing: -.012em;
  line-height: 1.3;
  color: var(--ink);
  margin: 1.8rem 0 .8rem;
  text-wrap: balance;
  scroll-margin-top: calc(var(--header-h, 96px) + 16px);
}
.tut-prose h4 {
  font-family: var(--f-sans);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -.005em;
  line-height: 1.35;
  color: var(--ink);
  margin: 1.4rem 0 .5rem;
}
/* P imediatamente após heading: respiro menor (evita gap dobrado) */
.tut-prose h2 + p,
.tut-prose h3 + p,
.tut-prose h4 + p { margin-top: 0; }

/* Listas — padrão nativo + espaçamento confortável */
.tut-prose ul, .tut-prose ol {
  margin: 1rem 0 1.5rem;
  padding-left: 1.4rem;
}
.tut-prose ul li, .tut-prose ol li {
  margin: 6px 0;
  line-height: 1.65;
}
.tut-prose ul li::marker { color: var(--ember); }
.tut-prose ol li::marker {
  color: var(--mute);
  font-family: var(--f-mono);
  font-size: .9em;
}

/* Imagens / figures */
.tut-prose figure,
.tut-prose .wp-block-image {
  margin: 1.75rem 0;
}
.tut-prose img,
.tut-prose figure img,
.tut-prose .wp-block-image img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
}
.tut-prose figcaption,
.tut-prose .wp-element-caption {
  padding: 8px 2px 0;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--mute);
  letter-spacing: .02em;
  line-height: 1.5;
}

/* Blockquote */
.tut-prose blockquote {
  margin: 1.6em 0;
  padding: 4px 0 4px 18px;
  border-left: 3px solid var(--ember);
  font-family: var(--f-display);
  font-style: italic;
  font-size: clamp(19px, 2vw, 22px);
  line-height: 1.4;
  letter-spacing: -.01em;
  color: var(--ink);
}
.tut-prose blockquote p { margin: 0; }
.tut-prose blockquote cite {
  display: block;
  margin-top: 8px;
  font-family: var(--f-mono);
  font-style: normal;
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--mute);
}

/* Inline code + code block */
.tut-prose code {
  font-family: var(--f-mono);
  font-size: .9em;
  background: var(--paper-2);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--rule);
}
.tut-prose pre {
  margin: 1.4em 0;
  padding: 16px 20px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 10px;
  font-family: var(--f-mono);
  font-size: 13.5px;
  line-height: 1.6;
  overflow-x: auto;
}
.tut-prose pre code {
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

/* Tabelas */
.tut-prose table,
.tut-prose .wp-block-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  margin: 1.4em 0;
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
}
.tut-prose table th,
.tut-prose table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.tut-prose table th {
  background: var(--paper-2);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--mute);
  font-weight: 500;
}
.tut-prose table tr:last-child td { border-bottom: 0; }

/* HR — separador discreto */
.tut-prose hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2em 0;
}

/* ============================================================
   Tags row
   ============================================================ */
.tut-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 24px 0 0;
}
.tut-tags__chip {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 99px;
  background: var(--paper-2);
  color: var(--ink-2);
  text-decoration: none;
  border: 1px solid var(--rule);
}
.tut-tags__chip:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

/* Endmark removido — separador visual discreto */
.tut-endmark { display: none; }

/* ============================================================
   Author panel
   ============================================================ */
.tut-author-pan {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  margin: 36px 0 24px;
  padding: 20px 22px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 10px;
}
@media (min-width: 600px) {
  .tut-author-pan { grid-template-columns: 56px 1fr auto; align-items: center; }
}
.tut-author-pan__av {
  width: 56px; height: 56px;
  border-radius: 99px;
  flex-shrink: 0;
  object-fit: cover;
}
.tut-author-pan__av--fallback {
  background: var(--ember);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--f-sans);
  font-weight: 600;
  font-size: 22px;
}
.tut-author-pan__l {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--mute);
}
.tut-author-pan__h {
  font-family: var(--f-sans);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.012em;
  margin: 4px 0 4px;
}
.tut-author-pan__bio {
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.5;
  margin: 0;
  max-width: 56ch;
}
.tut-author-pan__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tut-author-pan__btn {
  padding: 7px 13px;
  border-radius: 99px;
  border: 1px solid var(--rule-2, var(--rule));
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  background: var(--paper);
}
.tut-author-pan__btn:hover {
  border-color: var(--ember);
  color: var(--ember);
}

/* ============================================================
   Wrap-up final — discreto, sem bloco dark agressivo.
   Resumo do que aprendeu + 2 próximos passos.
   ============================================================ */
.tut-wrapup {
  margin: 32px 0 0;
  padding: 24px 26px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--ember);
  border-radius: 10px;
  display: grid;
  gap: 14px;
}
.tut-wrapup__l {
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ember);
  font-weight: 500;
}
.tut-wrapup__h {
  font-family: var(--f-sans);
  font-weight: 700;
  font-size: clamp(20px, 2.2vw, 24px);
  letter-spacing: -.018em;
  line-height: 1.2;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}
.tut-wrapup__h em { font-style: normal; color: var(--ember); }
.tut-wrapup__what {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-2);
}
.tut-wrapup__what li {
  position: relative;
  padding-left: 18px;
}
.tut-wrapup__what li::before {
  content: "✓";
  position: absolute;
  left: 0; top: 0;
  color: var(--ember);
  font-weight: 700;
}
.tut-wrapup__next-wrap { display: grid; gap: 10px; }
.tut-wrapup__next {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .tut-wrapup__next { grid-template-columns: 1fr 1fr; }
}
.tut-wrapup__next-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color .15s ease;
}
.tut-wrapup__next-card:hover { border-color: var(--ember); }
.tut-wrapup__next-ic {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: var(--ember);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--f-sans);
  font-size: 14px;
  font-weight: 600;
}
.tut-wrapup__next-ic--signal { background: var(--ink); }
.tut-wrapup__next-l {
  display: block;
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--mute);
}
.tut-wrapup__next-nm {
  display: block;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -.005em;
  margin-top: 2px;
}
.tut-wrapup__next-ts {
  font-family: var(--f-mono);
  font-size: 10.5px;
  color: var(--mute);
  letter-spacing: .04em;
}

/* ============================================================
   Right rail (sidebar)
   Sem sticky agressivo — apenas position: sticky discreto no desktop.
   ============================================================ */
.tut-rail {
  display: grid;
  gap: 16px;
  align-content: start;
}
@media (min-width: 1100px) {
  .tut-rail {
    position: sticky;
    top: calc(var(--header-h, 96px) + 16px);
    max-height: calc(100vh - var(--header-h, 96px) - 32px);
    overflow-y: auto;
    overscroll-behavior: contain;
    z-index: var(--z-base, 0);
    scrollbar-width: thin;
    scrollbar-color: var(--rule) transparent;
    padding-right: 2px;
  }
}
.tut-rail::-webkit-scrollbar { width: 6px; }
.tut-rail::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 99px; }

.tut-rail__card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 16px 18px;
}
.tut-rail__card--alt { background: var(--paper-2); }
.tut-rail__h {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--mute);
  font-weight: 500;
  margin: 0 0 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tut-rail__ct { color: var(--ember); }

/* TOC (rail desktop) — herda grid 28px+1fr da regra base + ajusta padding/active */
.tut-rail__card--toc .tut-toc__list a {
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 13.5px;
  line-height: 1.35;
  border-left: 2px solid transparent;
  margin-left: -10px;
  grid-template-columns: 24px 1fr;
  gap: 8px;
}
.tut-rail__card--toc .tut-toc__list a::before {
  font-size: 10px;
}
.tut-rail__card--toc .tut-toc__list a:hover {
  background: var(--paper-2);
  color: var(--ink);
}
.tut-rail__card--toc .tut-toc__list a.is-active {
  background: var(--paper-2);
  color: var(--ember);
  border-left-color: var(--ember);
}
.tut-rail__card--toc .tut-toc__list a.is-active::before { color: var(--ember); }

/* Mobile: o TOC inline (.tut-toc-inline) já aparece no topo do main.
   Esconde a versão rail pra não duplicar. */
@media (max-width: 999px) {
  .tut-rail__card--toc { display: none; }
}

/* ============================================================
   Bloco "Veja também" inline — versão MINIMALISTA.
   Só border-top/bottom discretas, sem caixa nem cards aninhados.
   Cada item é uma linha enxuta com seta + título + meta opcional.
   Ocupa pouca altura (~100-130px pra 3 itens vs ~450px antes).
   ============================================================ */
.tut-see-also {
  margin: 1.75rem 0;
  padding: 14px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  display: grid;
  gap: 8px;
}
.tut-see-also__h {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--mute);
  font-weight: 500;
  margin: 0;
}
.tut-see-also__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 2px;
}
.tut-see-also__list li { margin: 0; padding: 0; }
.tut-see-also__list li::marker { content: none; }

.tut-see-also__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: baseline;
  padding: 4px 0;
  font-family: var(--f-sans);
  font-size: 14.5px;
  line-height: 1.4;
  color: var(--ink-2);
}
/* Override do .tut-prose a (underline) — aqui é "veja também", não link de conteúdo */
.tut-prose .tut-see-also__item,
.tut-see-also__item {
  text-decoration: none;
}
.tut-see-also__item:hover { color: var(--ember); }
.tut-see-also__item:hover .tut-see-also__title { color: var(--ember); }

.tut-see-also__item::before {
  content: "→";
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--ember);
  align-self: baseline;
}
.tut-see-also__title {
  font-weight: 500;
  letter-spacing: -.005em;
  color: var(--ink);
  text-decoration: none;
  /* Trunca em 1 linha pra manter altura previsivel; desktop = 1 linha */
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tut-see-also__meta {
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--mute);
  letter-spacing: .04em;
  text-transform: uppercase;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .tut-see-also { margin: 1.5rem 0; }
  .tut-see-also__item { grid-template-columns: auto 1fr; gap: 8px; font-size: 14px; }
  .tut-see-also__meta { display: none; }
  .tut-see-also__title { white-space: normal; }
}

/* Related items list (tutorial, veja também) */
.tut-rail__list { display: grid; gap: 10px; }
.tut-rail__item {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px dotted var(--rule);
  text-decoration: none;
  color: inherit;
}
.tut-rail__item:last-child { border-bottom: 0; padding-bottom: 0; }
.tut-rail__item-img {
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  background: var(--paper-2);
  overflow: hidden;
}
.tut-rail__item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tut-rail__item-cat {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ember);
  display: block;
  margin-bottom: 2px;
}
.tut-rail__item-h {
  font-family: var(--f-sans);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: -.005em;
  line-height: 1.3;
  margin: 0;
  color: var(--ink);
}
.tut-rail__item-ts {
  font-family: var(--f-mono);
  font-size: 9.5px;
  color: var(--mute);
  letter-spacing: .04em;
  text-transform: uppercase;
  display: block;
  margin-top: 2px;
}

/* Download mini-card */
.tut-rail__dl-row {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  margin-bottom: 10px;
}
.tut-rail__dl-ic {
  width: 38px; height: 38px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--paper-2);
  display: grid;
  place-items: center;
}
.tut-rail__dl-ic img, .tut-rail__dl-ic svg {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
}
.tut-rail__dl-nm {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -.005em;
  line-height: 1.2;
  color: var(--ink);
}
.tut-rail__dl-mt {
  display: block;
  font-family: var(--f-mono);
  font-size: 9.5px;
  color: var(--mute);
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-top: 2px;
}
.tut-rail__dl-cta {
  display: block;
  text-align: center;
  padding: 9px;
  background: var(--ember);
  color: #fff;
  border-radius: 6px;
  font-family: var(--f-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -.005em;
  text-decoration: none;
}
.tut-rail__dl-cta:hover { background: var(--ember-2, var(--ember)); }

/* Newsletter */
.tut-rail__news {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.tut-rail__news .tut-rail__h { color: var(--paper); }
.tut-rail__news-h {
  font-family: var(--f-sans);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -.012em;
  line-height: 1.2;
  margin: 0 0 6px;
  color: var(--paper);
}
.tut-rail__news-p {
  font-size: 12.5px;
  color: var(--mute-2, var(--mute));
  line-height: 1.5;
  margin: 0 0 12px;
}
.tut-rail__news-form {
  display: flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid #2c2c34;
  border-radius: 99px;
}
.tut-rail__news-form input {
  flex: 1;
  background: transparent;
  border: 0;
  color: inherit;
  padding: 7px 9px;
  font-family: var(--f-mono);
  font-size: 11px;
  outline: 0;
  min-width: 0;
}
.tut-rail__news-form input::placeholder { color: var(--mute-2, var(--mute)); }
.tut-rail__news-form button {
  background: var(--ember);
  border: 0;
  color: #fff;
  padding: 7px 12px;
  border-radius: 99px;
  font-family: var(--f-sans);
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
}

/* Ad slot */
.tut-rail__ad {
  border: 1px dashed var(--rule);
  border-radius: 10px;
  padding: 6px;
  background: var(--paper-2);
}
.tut-rail__ad-b {
  aspect-ratio: 300 / 250;
  background: var(--paper);
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--mute);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.tut-rail__ad-l {
  font-family: var(--f-mono);
  font-size: 9px;
  color: var(--mute);
  letter-spacing: .06em;
  text-transform: uppercase;
  text-align: center;
  padding: 3px 0 2px;
  display: block;
}

/* Categorias chips */
.tut-rail__cats {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.tut-rail__cats a {
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 99px;
  border: 1px solid var(--rule);
  color: var(--ink-2);
  text-decoration: none;
  background: var(--paper);
}
.tut-rail__cats a:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

/* ============================================================
   Reading progress bar — discreta no topo do viewport
   ============================================================ */
.tut-read-prog {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: calc(var(--z-header, 150) + 1);
  pointer-events: none;
  background: transparent;
}
.tut-read-prog__bar {
  height: 100%;
  width: 0%;
  background: var(--ember);
  transition: width .1s linear;
}

/* Screen-reader-only utility */
.tut-main .screen-reader-text,
.tut-snapshot .screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
}
