/* SEO programmatic pages — базовый стиль (Markin v179-v192).
   Используется всеми 4 кластерами через base.html.j2.

   Дизайн-токены те же что в /cabinet/ и / (helmet=C2410C, ink=0E1A2B, paper=F5F1E8).
   Семантический HTML: header → main → aside.related → footer.footer-bar.
   Mobile-first (≤767px) → tablet → desktop.
*/

:root {
  --ink: #0E1A2B;
  --paper: #F5F1E8;
  --paper-deep: #ECE5D3;
  --blueprint: #1E3A5F;
  --helmet: #C2410C;
  --helmet-soft: #FFB26B;
  --line-soft: rgba(14, 26, 43, 0.10);
  --line: rgba(14, 26, 43, 0.16);
  --muted: #52617B;
  --green: #1F7A4C;
  --red: #C83E3E;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Manrope', system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blueprint); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--helmet); }
button, .cta { font-family: inherit; cursor: pointer; }

/* ===== topbar ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 241, 232, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-soft);
}
.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.logo {
  display: flex; align-items: center; gap: 8px;
  font-family: 'Unbounded', sans-serif;
  font-weight: 800;
  font-size: 18px;
  color: var(--ink);
  text-decoration: none;
}
.logo .ai {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  color: var(--helmet-soft);
  background: var(--ink);
  padding: 2px 5px;
  border-radius: 4px;
  transform: translateY(-1px);
}
.nav-links {
  display: flex; gap: 18px;
  list-style: none;
  font-size: 14px;
  font-weight: 500;
  flex: 1;
  flex-wrap: wrap;
}
.nav-links a { color: var(--ink); text-decoration: none; }
.nav-links a:hover { color: var(--helmet); }
.nav-cta {
  display: inline-flex; align-items: center;
  background: var(--ink); color: var(--paper);
  font: 700 13px/1 'Manrope', sans-serif;
  padding: 9px 16px;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid var(--ink);
}
.nav-cta:hover { background: var(--helmet); border-color: var(--helmet); color: #fff; }

/* ===== main ===== */
.seo-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 20px 40px;
}
.seo-page h1 {
  font-family: 'Unbounded', sans-serif;
  font-weight: 800;
  font-size: clamp(28px, 4.4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
  color: var(--ink);
}
.seo-page h2 {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: clamp(22px, 3.4vw, 28px);
  line-height: 1.25;
  margin: 36px 0 14px;
  color: var(--ink);
}
.seo-page h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 18px 0 8px;
  color: var(--ink);
}
.seo-page p { margin-bottom: 12px; font-size: 16px; color: var(--ink); }
.seo-page ul, .seo-page ol { margin: 8px 0 16px 24px; }
.seo-page li { margin-bottom: 6px; font-size: 16px; }
.seo-page table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 18px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
}
.seo-page th, .seo-page td {
  padding: 10px 14px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid var(--line-soft);
}
.seo-page th { background: var(--paper-deep); font-weight: 600; }
.seo-page tr:last-child td { border-bottom: 0; }

/* intro section */
.intro {
  padding: 18px 20px;
  background: #fff;
  border-left: 4px solid var(--helmet);
  border-radius: 6px;
  margin-bottom: 20px;
}
.intro p { margin-bottom: 14px; }

/* 3 слона */
.slon {
  padding: 18px 0;
  border-top: 1px solid var(--line-soft);
}
.slon:first-of-type { border-top: 0; }

/* FAQ */
.faq { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.faq-list { list-style: none; margin: 0; padding: 0; counter-reset: faq; }
.faq-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}
.faq-item:last-child { border-bottom: 0; }
.faq-q {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--ink);
}
.faq-q::before {
  counter-increment: faq;
  content: counter(faq) ". ";
  color: var(--helmet);
}
.faq-a p { margin-bottom: 6px; color: var(--muted); }

/* CTA buttons */
.cta {
  display: inline-flex;
  align-items: center;
  font: 700 15px/1 'Manrope', sans-serif;
  padding: 12px 22px;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.15s, background 0.2s;
}
.cta-primary {
  background: var(--helmet);
  color: #fff;
  border: 1px solid var(--helmet);
}
.cta-primary:hover { background: #a73508; transform: translateY(-1px); }

.final-cta {
  margin-top: 36px;
  padding: 28px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 12px;
  text-align: center;
}
.final-cta h2 { color: var(--paper); margin-bottom: 8px; font-size: 24px; }
.final-cta p { color: rgba(245,241,232,0.86); margin-bottom: 16px; font-size: 15px; }
.final-cta .cta-primary { background: var(--helmet); border-color: var(--helmet); }

/* ===== cocoon — related (Markin v189-v190) ===== */
.related {
  max-width: 760px;
  margin: 32px auto 0;
  padding: 20px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
}
.related-title {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
  margin-bottom: 12px;
}
.related-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
@media (min-width: 600px) {
  .related-list { grid-template-columns: 1fr 1fr; }
}
.related-list a {
  display: block;
  padding: 10px 14px;
  background: var(--paper-deep);
  border-radius: 6px;
  color: var(--ink);
  font-size: 14px;
  text-decoration: none;
  transition: background 0.2s;
}
.related-list a:hover { background: var(--helmet-soft); color: var(--ink); }

/* ===== footer-bar (cocoon sticky hubs) ===== */
.footer-bar {
  margin-top: 40px;
  background: var(--ink);
  color: var(--paper);
  padding: 20px;
}
.footer-bar-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
}
.hub-link {
  color: var(--helmet-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,178,107,0.3);
}
.hub-link:hover { background: var(--helmet); color: #fff; border-color: var(--helmet); }
.footer-meta {
  max-width: 1100px;
  margin: 16px auto 0;
  text-align: center;
  color: rgba(245,241,232,0.6);
  font-size: 13px;
}
.footer-meta a { color: rgba(245,241,232,0.86); }

/* ===== mobile ===== */
@media (max-width: 600px) {
  .topbar-inner { padding: 10px 14px; gap: 12px; }
  .nav-links { display: none; }   /* на мобиле прячем nav, оставляем logo+CTA */
  .seo-page { padding: 22px 16px 30px; }
  .seo-page h1 { font-size: 26px; }
  .seo-page h2 { font-size: 22px; }
  .related-list { grid-template-columns: 1fr; }
}
