/* Неоценка — публичные страницы (блог, category, tag).
   Вынесен из inline-CSS лендинга: блог = много страниц, один CSS = кэш. */

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{font-family:system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;color:#1e293b;line-height:1.6;background:#fff;-webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration:none}
img{max-width:100%;height:auto;display:block}
.container{max-width:1120px;margin:0 auto;padding:0 24px}
.container-narrow{max-width:760px;margin:0 auto;padding:0 24px}

/* ─── Header ─── */
.header{position:sticky;top:0;z-index:100;background:rgba(15,23,42,.94);backdrop-filter:blur(12px);border-bottom:1px solid rgba(255,255,255,.08)}
.header .container{display:flex;align-items:center;justify-content:space-between;height:60px;gap:24px}
.logo{display:flex;align-items:center;gap:10px;color:#fff;font-weight:700;font-size:18px;flex-shrink:0}
.logo svg{width:32px;height:32px}
.nav{display:flex;align-items:center;gap:24px}
.nav a{color:rgba(255,255,255,.72);font-size:14px;font-weight:500;transition:color .2s;white-space:nowrap}
.nav a:hover,.nav a.active{color:#fff}
.btn-header{background:#2563eb;color:#fff !important;border:none;padding:8px 20px;border-radius:8px;font-size:14px;font-weight:600;cursor:pointer;transition:background .2s;display:inline-block}
.btn-header:hover{background:#1d4ed8 !important}
.burger{display:none;background:none;border:none;color:#fff;cursor:pointer;padding:4px}

/* ─── Хлебные крошки ─── */
.breadcrumbs{padding:20px 0 0;font-size:13px;color:#64748b}
.breadcrumbs ol{list-style:none;display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.breadcrumbs li{display:flex;align-items:center;gap:6px}
.breadcrumbs li+li::before{content:'/';color:#cbd5e1}
.breadcrumbs a{color:#64748b;transition:color .15s}
.breadcrumbs a:hover{color:#2563eb}
.breadcrumbs .current{color:#1e293b;font-weight:500}

/* ─── Заголовки страниц ─── */
.page-head{padding:28px 0 8px}
.page-head h1{font-size:clamp(28px,4vw,40px);font-weight:800;line-height:1.2;color:#0f172a;letter-spacing:-.02em}
.page-head .lead{margin-top:12px;font-size:17px;color:#475569;max-width:720px;line-height:1.7}
.page-meta{margin-top:12px;font-size:14px;color:#64748b;display:flex;flex-wrap:wrap;gap:8px 16px;align-items:center}
.page-meta .dot{width:3px;height:3px;border-radius:50%;background:#cbd5e1}
.page-meta .updated{color:#b45309;font-weight:500}

/* ─── Категории (chips) ─── */
.chips{display:flex;flex-wrap:wrap;gap:8px;padding:16px 0 8px}
.chip{display:inline-flex;align-items:center;padding:6px 14px;border-radius:999px;border:1px solid #e2e8f0;background:#f8fafc;color:#475569;font-size:13px;font-weight:500;transition:all .15s}
.chip:hover{border-color:#2563eb;color:#2563eb;background:#eff6ff}
.chip.active{background:#2563eb;border-color:#2563eb;color:#fff}

/* ─── Поиск ─── */
.search-form{display:flex;gap:8px;margin:8px 0 20px;max-width:520px}
.search-form input{flex:1;padding:10px 14px;border:1px solid #e2e8f0;border-radius:10px;font-size:15px;outline:none;transition:border-color .15s}
.search-form input:focus{border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.12)}
.search-form button{padding:10px 18px;background:#2563eb;color:#fff;border:none;border-radius:10px;font-size:14px;font-weight:600;cursor:pointer}
.search-form button:hover{background:#1d4ed8}

/* ─── Карточки статей ─── */
.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:24px;padding:12px 0 32px}
.card{background:#fff;border:1px solid #e2e8f0;border-radius:16px;overflow:hidden;display:flex;flex-direction:column;transition:transform .18s,box-shadow .18s,border-color .18s}
.card:hover{transform:translateY(-3px);box-shadow:0 12px 28px rgba(15,23,42,.10);border-color:#cbd5e1}
.card-thumb{aspect-ratio:1200/630;background:linear-gradient(135deg,#0f172a 0%,#1e3a8a 100%);position:relative;overflow:hidden}
.card-thumb img{width:100%;height:100%;object-fit:cover}
.card-body{padding:18px 20px 20px;display:flex;flex-direction:column;flex:1;gap:10px}
.card-cat{font-size:12px;font-weight:600;color:#2563eb;text-transform:uppercase;letter-spacing:.04em}
.card h2{font-size:18px;font-weight:700;line-height:1.35;color:#0f172a}
.card h2 a:hover{color:#2563eb}
.card .excerpt{font-size:14px;color:#64748b;line-height:1.65;flex:1}
.card-foot{display:flex;align-items:center;gap:8px;font-size:12px;color:#94a3b8;padding-top:4px;border-top:1px solid #f1f5f9;margin-top:auto}
.card-foot .dot{width:3px;height:3px;border-radius:50%;background:#cbd5e1}

/* ─── SEO-облако ключей (как у re-fresh) ─── */
.keyword-cloud{background:#f8fafc;border:1px solid #e2e8f0;border-radius:16px;padding:20px 24px;margin:8px 0 32px}
.keyword-cloud h2{font-size:15px;font-weight:700;color:#0f172a;margin-bottom:12px}
.keyword-cloud .tags{display:flex;flex-wrap:wrap;gap:8px}
.keyword-cloud a{display:inline-flex;align-items:center;gap:6px;padding:5px 12px;background:#fff;border:1px solid #e2e8f0;border-radius:999px;font-size:13px;color:#475569;transition:all .15s}
.keyword-cloud a:hover{border-color:#2563eb;color:#2563eb}
.keyword-cloud a .freq{font-size:11px;color:#94a3b8;font-variant-numeric:tabular-nums}

/* ─── Пагинация ─── */
.pagination{display:flex;justify-content:center;gap:6px;padding:8px 0 48px;flex-wrap:wrap}
.pagination a,.pagination span{display:inline-flex;align-items:center;justify-content:center;min-width:38px;height:38px;padding:0 12px;border-radius:10px;border:1px solid #e2e8f0;font-size:14px;font-weight:500;color:#475569;background:#fff;transition:all .15s}
.pagination a:hover{border-color:#2563eb;color:#2563eb}
.pagination .active{background:#2563eb;border-color:#2563eb;color:#fff}
.pagination .disabled{opacity:.45;pointer-events:none}

/* ─── Статья ─── */
.article{padding:8px 0 48px}
.article-header{margin-bottom:24px}
.article-hero{margin:20px 0 28px;border-radius:16px;overflow:hidden;background:linear-gradient(135deg,#0f172a 0%,#1e3a8a 100%)}
.article-hero img{width:100%;height:auto}

/* TOC */
.toc{background:#f8fafc;border:1px solid #e2e8f0;border-radius:14px;padding:18px 22px;margin:24px 0 32px}
.toc-title{font-size:13px;font-weight:700;color:#0f172a;text-transform:uppercase;letter-spacing:.05em;margin-bottom:10px}
.toc ol{list-style:none;counter-reset:toc}
.toc li{counter-increment:toc}
.toc a{display:block;padding:5px 0 5px 28px;position:relative;font-size:14px;color:#475569;line-height:1.5;border-left:2px solid #e2e8f0;transition:all .15s}
.toc a:hover{color:#2563eb;border-left-color:#2563eb}
.toc a::before{content:counter(toc) '.';position:absolute;left:0;color:#94a3b8;font-size:12px;font-variant-numeric:tabular-nums}
.toc .level-3 a{padding-left:44px;font-size:13px}
.toc .level-3 a::before{left:16px}

/* Типографика статьи */
.prose{font-size:17px;line-height:1.8;color:#334155}
.prose > *+*{margin-top:1.15em}
.prose h2{font-size:clamp(22px,3vw,28px);font-weight:700;color:#0f172a;margin-top:2em;margin-bottom:.5em;line-height:1.3;scroll-margin-top:80px}
.prose h3{font-size:clamp(18px,2.4vw,21px);font-weight:700;color:#1e293b;margin-top:1.6em;margin-bottom:.4em;line-height:1.35;scroll-margin-top:80px}
.prose p{margin:0}
.prose ul,.prose ol{padding-left:1.5em}
.prose li+li{margin-top:.45em}
.prose strong{color:#0f172a;font-weight:650}
.prose a{color:#2563eb;text-decoration:underline;text-underline-offset:2px;text-decoration-thickness:1px}
.prose a:hover{text-decoration-thickness:2px}
.prose blockquote{border-left:3px solid #2563eb;background:#eff6ff;padding:14px 20px;border-radius:0 10px 10px 0;color:#1e40af;font-style:italic}
.prose blockquote p{margin:0}
.prose table{width:100%;border-collapse:collapse;font-size:14.5px;margin:1.5em 0}
.prose table th{background:#0f172a;color:#fff;padding:11px 14px;text-align:left;font-weight:600}
.prose table td{padding:10px 14px;border:1px solid #e2e8f0;vertical-align:top}
.prose table tr:nth-child(even) td{background:#f8fafc}
.prose table tr:hover td{background:#eff6ff}
.prose img{border-radius:12px;margin:1.5em 0}
.prose code{background:#f1f5f9;padding:2px 6px;border-radius:5px;font-size:.9em;color:#0f172a}
.prose pre{background:#0f172a;color:#e2e8f0;padding:16px 20px;border-radius:12px;overflow-x:auto;font-size:14px;line-height:1.6}
.prose pre code{background:none;color:inherit;padding:0}
.prose hr{border:none;border-top:1px solid #e2e8f0;margin:2em 0}

/* FAQ */
.faq-block{margin:36px 0;padding:28px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:16px}
.faq-block > h2{font-size:22px;font-weight:700;color:#0f172a;margin-bottom:18px}
.faq-item{background:#fff;border:1px solid #e2e8f0;border-radius:12px;overflow:hidden}
.faq-item+.faq-item{margin-top:10px}
.faq-item summary{padding:15px 18px;font-size:16px;font-weight:600;color:#0f172a;cursor:pointer;list-style:none;display:flex;align-items:center;justify-content:space-between;gap:12px;transition:background .15s}
.faq-item summary:hover{background:#f8fafc}
.faq-item summary::-webkit-details-marker{display:none}
.faq-item summary::after{content:'+';font-size:22px;font-weight:400;color:#2563eb;flex-shrink:0;line-height:1;transition:transform .2s}
.faq-item[open] summary::after{transform:rotate(45deg)}
.faq-item .faq-answer{padding:0 18px 16px;font-size:15px;color:#475569;line-height:1.7}

/* CTA */
.cta-block{margin:36px 0;padding:28px 32px;background:linear-gradient(135deg,#0f172a 0%,#1e3a8a 100%);border-radius:16px;color:#fff;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:20px}
.cta-block h2{font-size:20px;font-weight:700;margin-bottom:6px}
.cta-block p{color:#94a3b8;font-size:15px;max-width:520px;line-height:1.6}
.cta-btn{background:#fff;color:#0f172a;padding:12px 24px;border-radius:10px;font-size:15px;font-weight:700;white-space:nowrap;transition:transform .15s,box-shadow .15s;display:inline-block}
.cta-btn:hover{transform:translateY(-2px);box-shadow:0 8px 20px rgba(0,0,0,.2)}

/* Related */
.related{margin:40px 0 0;padding-top:32px;border-top:1px solid #e2e8f0}
.related h2{font-size:22px;font-weight:700;color:#0f172a;margin-bottom:18px}
.related-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:16px}
.related-card{border:1px solid #e2e8f0;border-radius:12px;padding:16px 18px;transition:all .15s;display:flex;flex-direction:column;gap:8px}
.related-card:hover{border-color:#2563eb;box-shadow:0 8px 20px rgba(37,99,235,.08);transform:translateY(-2px)}
.related-card .cat{font-size:11px;font-weight:600;color:#2563eb;text-transform:uppercase;letter-spacing:.04em}
.related-card h3{font-size:15px;font-weight:650;color:#0f172a;line-height:1.4}
.related-card .date{font-size:12px;color:#94a3b8;margin-top:auto}

/* Share */
.share{display:flex;align-items:center;gap:10px;margin:28px 0;flex-wrap:wrap}
.share-label{font-size:13px;font-weight:600;color:#64748b}
.share a,.share button{display:inline-flex;align-items:center;gap:6px;padding:8px 14px;border:1px solid #e2e8f0;border-radius:10px;font-size:13px;font-weight:500;color:#475569;background:#fff;cursor:pointer;transition:all .15s}
.share a:hover,.share button:hover{border-color:#2563eb;color:#2563eb;background:#eff6ff}

/* ─── Пустое состояние ─── */
.empty{padding:64px 0;text-align:center;color:#64748b}
.empty h2{font-size:22px;color:#0f172a;margin-bottom:8px}
.empty p{font-size:15px}

/* ─── Footer ─── */
.footer{background:#0f172a;border-top:1px solid rgba(255,255,255,.06);padding:32px 0;color:#64748b;font-size:13px}
.footer .container{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px}
.footer-logo{display:flex;align-items:center;gap:8px;color:#fff;font-weight:600;font-size:15px}
.footer-logo svg{width:24px;height:24px}
.footer a{color:#94a3b8;transition:color .2s}
.footer a:hover{color:#fff}
.footer-links{display:flex;align-items:center;gap:16px;flex-wrap:wrap}

/* Cookie banner */
.cookie-banner{position:fixed;bottom:0;left:0;right:0;background:#1e293b;color:#e2e8f0;padding:14px 24px;z-index:200;display:flex;align-items:center;justify-content:center;gap:16px;font-size:14px;flex-wrap:wrap;border-top:1px solid rgba(255,255,255,.08)}
.cookie-banner.hidden{display:none}
.cookie-banner a{color:#60a5fa;text-decoration:underline}
.cookie-btn{background:#2563eb;color:#fff;border:none;padding:8px 20px;border-radius:8px;font-size:13px;font-weight:600;cursor:pointer;transition:background .2s;white-space:nowrap}
.cookie-btn:hover{background:#1d4ed8}

/* ─── Responsive ─── */
@media(max-width:768px){
  .nav a:not(.btn-header){display:none}
  .burger{display:block}
  .nav.open{position:absolute;top:60px;left:0;right:0;background:rgba(15,23,42,.98);flex-direction:column;padding:20px 24px;gap:16px;border-bottom:1px solid rgba(255,255,255,.08)}
  .nav.open a:not(.btn-header){display:block;color:rgba(255,255,255,.8);font-size:16px;padding:4px 0}
  .nav.open a.btn-header{display:inline-block}
  .cookie-banner{flex-direction:column;text-align:center;gap:10px}
  .cards{grid-template-columns:1fr}
  .cta-block{flex-direction:column;align-items:flex-start}
  .prose{font-size:16px}
  .prose table{font-size:13px;display:block;overflow-x:auto}
  .footer .container{flex-direction:column;text-align:center}
  .page-head h1{font-size:26px}
}
