/* blog.nice2mitya.com – dark charcoal + orange, typographic, mobile-first */
:root {
  --bg: #121212;
  --bg-raise: #1b1b1d;
  --text: #e8e6e3;
  --muted: #97938d;
  --accent: #ff7a1a;
  --accent-dim: #cc5f10;
  --line: #2a2a2d;
  --maxw: 720px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: #ff9750; text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* header */
.site-header { border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-top: 22px; padding-bottom: 18px; flex-wrap: wrap; }
.site-title { color: var(--text); font-weight: 800; font-size: 20px; letter-spacing: -0.01em; }
.site-title:hover { color: var(--text); text-decoration: none; }
.site-title .plus { color: var(--accent); }
.site-title .subtitle { display: block; font-weight: 400; font-size: 12.5px; color: var(--muted); margin-top: 2px; letter-spacing: 0; }
.site-nav { display: flex; gap: 18px; font-size: 14.5px; }
.site-nav a { color: var(--muted); }
.site-nav a:first-child { color: var(--accent); font-weight: 600; }
.site-nav a:hover { color: var(--accent); }

/* hero */
.hero { padding: 44px 0 10px; }
.hero h1 { font-size: 30px; line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 12px; }
.hero p { color: var(--muted); margin: 0; max-width: 56ch; }

/* index cards */
.cards { padding: 28px 0 8px; display: grid; gap: 34px; }
.card { border-bottom: 1px solid var(--line); padding-bottom: 32px; }
.card:last-child { border-bottom: none; }
.card-image img { border-radius: 10px; aspect-ratio: 16/9; object-fit: cover; }
.card-body h2 { font-size: 21px; line-height: 1.3; letter-spacing: -0.01em; margin: 6px 0 8px; }
.card-body h2 a { color: var(--text); }
.card-body h2 a:hover { color: var(--accent); text-decoration: none; }
.card-image { margin-bottom: 14px; display: block; }
.card-excerpt { color: var(--muted); margin: 0; font-size: 15.5px; }
/* Карточка без обложки НИЧЕМ не отличается от остальных: та же типографика,
   те же отступы. Разница только в наличии картинки – иначе лента распадается
   на два разных компонента вместо одного ритма. */
.post-date { color: var(--muted); font-size: 13px; text-transform: lowercase; letter-spacing: 0.02em; margin: 0 0 4px; }

/* pagination */
.pagination { display: flex; justify-content: space-between; align-items: center; padding: 10px 0 40px; font-size: 15px; }
.page-num { color: var(--muted); }

/* post */
.post { padding: 40px 0 30px; }
.post h1 { font-size: 30px; line-height: 1.22; letter-spacing: -0.02em; margin: 4px 0 18px; }
.post-cover { margin: 0 0 26px; }
.post-cover img { border-radius: 12px; }
.post-body p { margin: 0 0 1.15em; }
.about-blog { margin: 2.2em 0 0; padding: 1em 1.2em; border: 1px solid var(--border, #2a2a2a); border-radius: 10px; font-size: 0.92em; color: var(--muted, #9a9a9a); }
.about-blog a { border-bottom: 1px solid var(--accent-dim); }
.post-body a { border-bottom: 1px solid var(--accent-dim); }
.post-body a:hover { text-decoration: none; border-bottom-color: var(--accent); }
.aieo { margin: 34px 0 0; background: var(--bg-raise); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 10px; padding: 18px 22px; }
.aieo h2 { font-size: 15px; margin: 0 0 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.aieo ul { margin: 0; padding-left: 18px; }
.aieo li { margin-bottom: 6px; font-size: 15.5px; }
.post-source { color: var(--muted); font-size: 14px; margin-top: 26px; }
.back-link { margin-top: 30px; }

/* подзаголовки внутри статьи */
.post-body h2 { font-size: 23px; line-height: 1.3; letter-spacing: -0.01em; margin: 1.7em 0 0.6em; }
.post-body h3 { font-size: 19px; line-height: 1.35; margin: 1.5em 0 0.5em; }
.post-body ol, .post-body ul { padding-left: 22px; }
.post-body li { margin-bottom: 0.5em; }

/* хлебные крошки */
.breadcrumbs { font-size: 13px; color: var(--muted); margin: 0 0 14px; display: flex; gap: 7px; flex-wrap: wrap; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent); text-decoration: none; }
.breadcrumbs span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 55%; }

/* читайте также */
.related { margin: 30px 0 0; padding-top: 22px; border-top: 1px solid var(--line); }
.related h2 { font-size: 15px; margin: 0 0 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.related ul { margin: 0; padding-left: 18px; }
.related li { margin-bottom: 8px; font-size: 16px; }

/* also-ask: реальные запросы из Вордстата + короткие ответы */
.also-ask { margin: 26px 0 0; background: var(--bg-raise); border: 1px solid var(--line); border-radius: 10px; padding: 18px 22px; }
.also-ask h2 { font-size: 15px; margin: 0 0 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.qa { border-bottom: 1px solid var(--line); }
.qa:last-of-type { border-bottom: none; }
.qa summary { cursor: pointer; padding: 10px 0; font-weight: 600; font-size: 15.5px; list-style: none; position: relative; padding-right: 26px; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: '+'; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); color: var(--accent); font-weight: 700; font-size: 18px; transition: transform 0.2s; }
.qa[open] summary::after { content: '–'; }
.qa summary:hover { color: var(--accent); }
.qa p { margin: 0 0 12px; font-size: 15px; color: var(--text); }
.also-ask-note { margin: 12px 0 0; font-size: 12.5px; color: var(--muted); }

/* infographic: горизонтальные бары, CSS-анимация (конечная, детерминированная) */
.infographic { margin: 30px 0 0; background: var(--bg-raise); border: 1px solid var(--line); border-radius: 10px; padding: 20px 22px 22px; }
.ig-title { font-weight: 700; font-size: 16px; margin: 0 0 16px; letter-spacing: -0.01em; }
.ig-row { display: grid; grid-template-columns: minmax(90px, 34%) 1fr auto; gap: 10px; align-items: center; margin-bottom: 10px; }
.ig-row:last-child { margin-bottom: 0; }
.ig-label { font-size: 13.5px; color: var(--muted); line-height: 1.3; }
.ig-track { display: block; background: var(--line); border-radius: 5px; height: 10px; overflow: hidden; }
.ig-bar { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-dim), var(--accent)); border-radius: 5px; transform-origin: left center; animation: ig-grow 0.9s cubic-bezier(0.22, 1, 0.36, 1) both; }
.ig-value { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; animation: ig-fade 0.4s ease-out both; }
@keyframes ig-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes ig-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .ig-bar, .ig-value { animation: none; }
}

/* промо автоблога – стоит на каждой странице */
.autoblog-promo { margin: 34px 0 0; padding: 22px 24px; background: var(--bg-raise); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 12px; transition: border-color 0.25s ease, box-shadow 0.25s ease; }
.autoblog-promo:hover { border-color: var(--accent-dim); border-left-color: var(--accent); box-shadow: 0 0 26px -6px rgba(255,122,26,0.35); }
.autoblog-promo p { margin: 0 0 12px; font-size: 15.5px; color: var(--muted); }
.autoblog-promo p:last-child { margin-bottom: 0; }
.autoblog-promo-kicker { text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px; font-weight: 700; color: var(--accent); }
.autoblog-promo-link { font-weight: 700; color: var(--accent); }
.page-index .autoblog-promo { margin: 40px 0 8px; }

/* 404 */
.not-found { padding: 56px 0 80px; text-align: center; max-width: 560px; margin: 0 auto; }
.err-code { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 96px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; color: var(--text); }
.err-play { width: 84px; height: 84px; flex: 0 0 auto; filter: drop-shadow(0 6px 24px rgba(255,122,26,0.35)); animation: err-pop 0.5s cubic-bezier(0.22,1,0.36,1) both; }
@keyframes err-pop { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.not-found h1 { font-size: 27px; margin: 26px 0 12px; letter-spacing: -0.01em; }
.err-lead { color: var(--muted); margin: 0 auto; max-width: 44ch; }
.err-offer { margin-top: 40px; padding: 24px 26px; background: var(--bg-raise); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 12px; text-align: left; }
.err-offer p { margin: 0 0 18px; font-size: 16px; }
.err-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-block; background: var(--accent); color: #121212; font-weight: 700; padding: 11px 22px; border-radius: 8px; }
.btn:hover { background: #ff9750; color: #121212; text-decoration: none; }
.btn-ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent-dim); }
.btn-ghost:hover { background: rgba(255,122,26,0.08); color: var(--accent); }
@media (min-width: 700px) { .err-code { font-size: 128px; } .err-play { width: 112px; height: 112px; } .not-found h1 { font-size: 32px; } }
@media (prefers-reduced-motion: reduce) { .err-play { animation: none; } }

/* footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 40px; }
.footer-inner { padding: 22px 20px 34px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.footer-inner p { margin: 0; }
.footer-inner a { color: var(--muted); margin-right: 16px; }
.footer-inner a:last-child { margin-right: 0; }
.footer-inner a:hover { color: var(--accent); }

@media (min-width: 700px) {
  body { font-size: 17.5px; }
  .hero h1 { font-size: 38px; }
  .post h1 { font-size: 36px; }
}
