/* Инструкция /kak-narisovat-komiks: только то, чего нет среди блоков посадочных страниц —
   таблицы сценария, схема страницы, раскладки кадров, список идей. Цвета — из тех же токенов,
   что у .prose-card, светлая тема переопределяет их ниже. */

@media (min-width: 761px) {
  .guide-card-wide {
    grid-column: span 2;
  }
}

.guide-toc-link {
  color: inherit;
  display: contents;
  text-decoration: none;
}

.page-comic-guide .landing-prose h3.guide-step-title {
  align-items: baseline;
  color: var(--ink);
  display: flex;
  font-size: 20px;
  gap: 12px;
  line-height: 1.3;
  margin: 32px 0 10px;
}

.guide-step-num {
  align-items: center;
  background: var(--blue);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  flex: 0 0 28px;
  font-size: 14px;
  font-weight: 700;
  height: 28px;
  justify-content: center;
  transform: translateY(-2px);
  width: 28px;
}

.guide-table-wrap {
  border: 1px solid var(--line);
  border-radius: 14px;
  margin: 16px 0 8px;
  overflow-x: auto;
}

.guide-table {
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.5;
  min-width: 480px;
  width: 100%;
}

.guide-table caption {
  color: var(--muted);
  font-size: 13px;
  padding: 12px 16px 0;
  text-align: left;
}

.guide-table th,
.guide-table td {
  border-top: 1px solid var(--line);
  padding: 10px 16px;
  text-align: left;
  vertical-align: top;
}

.guide-table thead th {
  border-top: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.guide-table td {
  color: var(--ink);
}

.guide-table td:first-child {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  width: 1%;
}

.guide-anatomy {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  margin: 28px 0 8px;
  padding: 24px;
}

.guide-anatomy img {
  border-radius: 8px;
  display: block;
  height: auto;
  width: 100%;
}

.guide-meta {
  color: var(--muted);
  font-size: 13px;
  margin: 8px 0 0;
}

.guide-more {
  margin: 12px 0 0;
}

.guide-table--tools td:first-child {
  color: var(--ink);
  font-weight: 600;
  width: auto;
}

.guide-anatomy figcaption {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.guide-anatomy figcaption strong {
  color: var(--ink);
  display: block;
  font-size: 17px;
  margin-bottom: 8px;
}

.guide-anatomy dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.guide-anatomy dt {
  color: var(--ink);
  display: inline;
  font-weight: 700;
}

.guide-anatomy dd {
  display: inline;
  margin: 0;
}

.guide-templates {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 20px 0 8px;
}

.guide-template {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  display: grid;
  gap: 14px;
  grid-template-rows: auto 1fr auto;
  padding: 20px;
}

.guide-template svg {
  color: var(--ink);
  display: block;
  height: auto;
  margin: 0 auto;
  max-width: 150px;
  width: 100%;
}

.guide-template h3 {
  color: var(--ink);
  font-size: 17px;
  margin: 0 0 6px;
}

.guide-template p {
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

.landing-prose a.guide-download {
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--ink);
  display: flex;
  font-size: 14px;
  font-weight: 700;
  gap: 8px;
  justify-content: center;
  min-height: 44px;
  padding: 8px 12px;
  text-decoration: none;
}

.landing-prose a.guide-download:hover {
  border-color: var(--blue);
  color: var(--ink);
}

.guide-download svg {
  flex: 0 0 18px;
  height: 18px;
  margin: 0;
  width: 18px;
}

.guide-ideas {
  columns: 2;
  column-gap: 32px;
  counter-reset: idea;
  list-style: none;
  margin: 16px 0 8px;
  padding: 0;
}

.guide-ideas li {
  break-inside: avoid;
  color: var(--muted);
  counter-increment: idea;
  font-size: 15px;
  line-height: 1.55;
  padding: 0 0 12px 34px;
  position: relative;
}

.guide-ideas li::before {
  color: var(--blue);
  content: counter(idea);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  left: 0;
  position: absolute;
  text-align: right;
  top: 1px;
  width: 22px;
}

.guide-result {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 20px 0 8px;
}

.guide-result img {
  border: 1px solid var(--line);
  border-radius: 12px;
  display: block;
  height: auto;
  width: 100%;
}

.guide-inline-cta {
  display: flex;
  justify-content: flex-start;
  margin: 20px 0 8px;
}

@media (max-width: 780px) {
  .page-comic-guide .landing-prose h3.guide-step-title {
    font-size: 17px;
    gap: 10px;
    margin: 24px 0 8px;
  }

  .guide-step-num {
    flex-basis: 26px;
    font-size: 13px;
    height: 26px;
    width: 26px;
  }

  .guide-table {
    font-size: 13px;
    min-width: 440px;
  }

  .guide-table th,
  .guide-table td {
    padding: 9px 12px;
  }

  .guide-table--tools {
    min-width: 0;
  }

  .guide-table--tools td:first-child {
    white-space: normal;
  }

  .guide-anatomy {
    border-radius: 12px;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr);
    padding: 16px;
  }

  .guide-anatomy img {
    margin: 0 auto;
    max-width: 360px;
  }

  .guide-anatomy figcaption,
  .guide-anatomy figcaption strong {
    font-size: 14px;
  }

  .guide-templates {
    gap: 8px;
    grid-template-columns: minmax(0, 1fr);
  }

  .guide-template {
    border-radius: 12px;
    gap: 12px 14px;
    grid-template-columns: 72px minmax(0, 1fr);
    grid-template-rows: auto auto;
    padding: 14px;
  }

  .guide-template svg {
    grid-row: 1 / span 2;
    max-width: 72px;
  }

  .guide-template h3 {
    font-size: 15px;
  }

  .page-landing .landing-prose .guide-template p {
    font-size: 13px;
  }

  .guide-ideas {
    columns: 1;
  }

  .page-landing .landing-prose .guide-ideas li {
    font-size: 14px;
    padding-bottom: 10px;
  }

  .guide-inline-cta {
    justify-content: center;
  }
}

/* Светлая тема посадочных: те же решения, что у карточек в theme.css */
html[data-theme="light"] body.page-landing :is(.guide-anatomy, .guide-template) {
  background: var(--sheet);
  border-color: var(--line);
  box-shadow: 0 1px 2px rgba(48, 38, 28, 0.06);
}

html[data-theme="light"] body.page-landing .guide-table-wrap {
  background: var(--sheet);
  border-color: var(--line);
}

html[data-theme="light"] body.page-landing :is(.guide-table td, .guide-anatomy dt, .guide-anatomy figcaption strong, .guide-template h3, .landing-prose h3.guide-step-title) {
  color: var(--ink);
}

html[data-theme="light"] body.page-landing :is(.guide-table caption, .guide-table thead th, .guide-table td:first-child, .guide-anatomy figcaption, .guide-ideas li) {
  color: var(--pencil);
}

html[data-theme="light"] body.page-landing :is(.guide-table th, .guide-table td) {
  border-top-color: var(--line);
}

html[data-theme="light"] body.page-landing .guide-step-num {
  background: var(--brand-blue);
}

html[data-theme="light"] body.page-landing .guide-ideas li::before {
  color: var(--brand-blue-strong);
}

html[data-theme="light"] body.page-landing .landing-prose a.guide-download {
  border-color: rgba(13, 95, 199, 0.35);
  color: var(--brand-blue-strong);
}

.guide-table-wrap + .prose-cards .guide-card-wide {
  grid-column: 1 / -1;
}

html[data-theme="light"] body.page-landing .guide-table--tools td:first-child {
  color: var(--ink);
}

.guide-zoom {
  cursor: zoom-in;
}

.guide-zoom img {
  border: 1px solid var(--line);
  border-radius: 12px;
  display: block;
  height: auto;
  width: 100%;
}

.guide-zoom:focus-visible {
  border-radius: 12px;
  outline: 2px solid var(--brand-blue);
  outline-offset: 2px;
}

.guide-figure {
  margin: 20px 0;
  max-width: 760px;
}

.guide-figure--narrow {
  max-width: 480px;
}

.guide-figure figcaption,
.guide-series figcaption {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin-top: 8px;
}

.guide-series {
  margin: 24px 0 8px;
}

.guide-series ol {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.guide-series li > a {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-top: 8px;
}

@media (max-width: 780px) {
  .guide-series ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .guide-figure,
  .guide-figure--narrow {
    max-width: none;
  }
}

html[data-theme="light"] body.page-landing :is(.guide-meta, .guide-figure figcaption, .guide-series figcaption) {
  color: var(--pencil);
}

@media (min-width: 781px) {
  .guide-figure {
    margin-inline: auto;
  }
}
