/* Owner-only plugin setup guides */

.guide-page {
  --guide-accent: var(--lime);
  --guide-accent-soft: rgba(182, 242, 74, 0.1);
}

/* Только текст гайда — не трогаем шапку / футер / кнопки / оглавление */
.guide-hero a[href],
.guide-body .guide-step-text a[href],
.guide-body .guide-callout a[href],
.guide-body .guide-faq-a a[href],
.guide-body .guide-checklist a[href],
.guide-aside a[href]:not(.btn) {
  color: var(--guide-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  font-weight: 600;
}

.guide-hero a[href]:hover,
.guide-body .guide-step-text a[href]:hover,
.guide-body .guide-callout a[href]:hover,
.guide-body .guide-faq-a a[href]:hover,
.guide-body .guide-checklist a[href]:hover,
.guide-aside a[href]:not(.btn):hover {
  color: var(--ink);
  text-decoration-thickness: 2px;
}

.guide-page a.pp-back {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.guide-page a.pp-back:hover {
  color: var(--ink);
}

.guide-hero {
  margin: 1rem 0 1.75rem;
  padding: 0 0 1.5rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: none;
}

.guide-hero-kicker {
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.guide-hero-title {
  margin-bottom: 0.6rem;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 750;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.guide-hero-lead {
  color: var(--muted);
  max-width: 38rem;
  font-size: 0.98rem;
}

.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16.5rem;
  gap: 1.75rem;
  align-items: start;
}

.guide-body {
  min-width: 0;
}

.guide-aside {
  position: sticky;
  top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
}

.guide-aside-label {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}

.guide-aside .btn {
  width: 100%;
  justify-content: center;
}

.guide-section {
  margin-bottom: 2.5rem;
  scroll-margin-top: 1rem;
}

.guide-section-title {
  margin-bottom: 0.85rem;
  font-size: 1.4rem;
  font-weight: 720;
  letter-spacing: -0.02em;
}

.guide-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.guide-step {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.85rem;
  padding: 1rem 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: none;
}

.guide-step:last-child { border-bottom: 1px solid var(--line); }

.guide-step-num {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: none;
  color: var(--guide-accent);
  font-weight: 700;
  font-size: 0.9rem;
}

.guide-step-title {
  font-weight: 650;
  margin-bottom: 0.25rem;
}

.guide-step-text {
  color: var(--muted);
  font-size: 0.94rem;
}

.guide-step-text code,
.guide-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86em;
  padding: 0.1em 0.35em;
  border-radius: 0.3rem;
  background: rgba(233, 240, 234, 0.06);
  color: var(--ink);
}

.guide-callout {
  margin: 0.85rem 0;
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--guide-accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--guide-accent-soft);
  color: var(--ink);
  font-size: 0.94rem;
}

.guide-callout--warn {
  border-left-color: var(--warning);
  background: rgba(240, 195, 90, 0.1);
}

.guide-callout--error {
  border-left-color: var(--error);
  background: rgba(255, 107, 107, 0.08);
}

.guide-figure {
  margin: 0.85rem 0 0.25rem;
}

.guide-figure img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #000;
}

.guide-figure figcaption {
  margin-top: 0.4rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.guide-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
}

.guide-checklist li {
  position: relative;
  display: block;
  padding: 0.75rem 0 0.75rem 1.9rem;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: none;
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.45;
}

.guide-checklist li:last-child { border-bottom: 1px solid var(--line); }

.guide-checklist li::before {
  content: "✓";
  position: absolute;
  left: 0.15rem;
  top: 0.8rem;
  width: 1.1rem;
  color: var(--guide-accent);
  font-weight: 700;
  line-height: 1.2;
}

.guide-checklist li strong {
  color: var(--ink);
  font-weight: 700;
}

.guide-faq {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.guide-faq-item {
  padding: 0.9rem 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
}

.guide-faq-item:last-child { border-bottom: 1px solid var(--line); }

.guide-faq-q {
  font-weight: 650;
  margin-bottom: 0.25rem;
}

.guide-faq-a {
  color: var(--muted);
  font-size: 0.94rem;
}

.guide-pre {
  margin: 0.55rem 0 0;
  padding: 0.75rem 0.9rem;
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #05080a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.guide-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1.25rem;
}

.guide-toc a {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--muted);
  background: transparent;
}

.guide-toc a:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--guide-accent-soft);
}

@media (max-width: 860px) {
  .guide-layout {
    grid-template-columns: 1fr;
  }

  .guide-aside {
    position: static;
    order: -1;
  }
}

.guide-page :focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; border-radius: 0.35rem; }

.guide-aside .btn-outline { border-color: var(--line-strong); background: transparent; color: var(--ink); }
.guide-aside .btn-outline:hover { background: rgba(233, 240, 234, 0.06); border-color: var(--line-strong); }

/* длинные пути и команды в тексте переносятся, а не расширяют страницу на телефоне */
.guide-step-text code,
.guide-code,
.guide-body li code,
.guide-callout code { overflow-wrap: anywhere; word-break: break-word; }
