/* ===========================================================
   РЯДОМ — стили статейных страниц (SEO-шаблоны)
   Подключается ПОСЛЕ styles.css
   =========================================================== */

/* ---- Article shell ---- */
.article-wrap { max-width: 1080px; margin-inline: auto; padding-inline: var(--gutter); position: relative; z-index: 1; }
.article-head { padding-block: clamp(28px, 4vw, 52px) clamp(20px, 3vw, 32px); }

/* breadcrumbs */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: .85rem; color: var(--ink-3); }
.crumbs a { color: var(--ink-3); transition: color .2s; }
.crumbs a:hover { color: var(--accent-deep); }
.crumbs .sep { opacity: .5; }

.article-cat { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--honey-deep); font-weight: 700; }
.article-title { font-size: clamp(1.9rem, 4.2vw, 3.2rem); line-height: 1.12; margin-top: 14px; max-width: none; }
.article-lead { font-size: clamp(1.1rem, 1.7vw, 1.3rem); color: var(--ink-2); line-height: 1.55; margin-top: 18px; max-width: none; }

/* meta row: author + date + reading time */
.article-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.author-chip { display: flex; align-items: center; gap: 12px; }
.author-chip .ava { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); background: var(--surface-2); flex: 0 0 auto; }
.author-chip .who { font-family: var(--font-display); font-size: 1.05rem; color: var(--ink); line-height: 1.1; }
.author-chip .role { font-size: .82rem; color: var(--ink-3); }
.meta-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--line-2); }
.meta-item { font-size: .9rem; color: var(--ink-3); }

/* hero cover */
.article-cover { margin-top: clamp(24px, 3vw, 36px); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.article-cover img, .article-cover .ph { width: 100%; display: block; }
.article-cover .ph { aspect-ratio: 16/8; border-radius: 0; border: 0; }

/* ---- Body layout: content + sticky TOC ---- */
.article-body { display: grid; grid-template-columns: minmax(0,1fr) 260px; gap: clamp(32px, 5vw, 64px); align-items: start; padding-block: clamp(32px, 5vw, 56px); }
.article-body.no-toc { grid-template-columns: minmax(0, 760px); justify-content: center; }

.prose { max-width: 72ch; font-size: 1.12rem; line-height: 1.75; color: var(--ink); }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-top: 1.8em; line-height: 1.15; scroll-margin-top: 90px; }
.prose h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); margin-top: 1.5em; scroll-margin-top: 90px; }
.prose p { color: var(--ink); }
.prose a { color: var(--accent-deep); border-bottom: 1px solid var(--accent-soft); }
.prose a:hover { color: var(--ink); border-color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-top: .5em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 24px; border-left: 3px solid var(--accent); font-family: var(--font-display); font-style: italic; font-size: 1.3rem; line-height: 1.4; color: var(--ink-2); }
.prose strong { font-weight: 600; }
.prose figure { margin: 1.8em 0; }
.prose figure img, .prose figure .ph { width: 100%; border-radius: var(--radius); display: block; box-shadow: var(--shadow); }
.prose figcaption { font-size: .95rem; color: var(--ink-3); margin-top: 10px; text-align: center; }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 2.4em 0; }

/* lead-in first paragraph */
.prose .dropcap::first-letter { font-family: var(--font-display); font-size: 3.4em; float: left; line-height: .8; padding: 6px 10px 0 0; color: var(--accent-deep); }

/* callout / note box */
.callout { background: var(--accent-tint); border-radius: var(--radius); padding: 20px 24px; font-size: 1rem; line-height: 1.6; color: var(--ink); margin: 1.8em 0; }
.callout.honey { background: var(--honey-tint); }
.callout .callout-label { display: block; font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--accent-deep); margin-bottom: 6px; }
.callout.honey .callout-label { color: var(--honey-deep); }

/* key takeaways box */
.takeaways { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(22px,3vw,30px); margin: 1.8em 0; }
.takeaways h2 { margin-top: 0 !important; font-size: 1.3rem !important; }
.takeaways ul { list-style: none; padding-left: 0; margin-top: 14px; }
.takeaways li { position: relative; padding-left: 30px; margin-top: 12px; }
.takeaways li::before { content: ""; position: absolute; left: 0; top: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent-tint); }
.takeaways li::after { content: ""; position: absolute; left: 5px; top: 10px; width: 8px; height: 5px; border-left: 2px solid var(--accent-deep); border-bottom: 2px solid var(--accent-deep); transform: rotate(-45deg); }

/* video embed (YouTube) */
.video-embed { position: relative; width: 100%; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin: 1.8em 0; background: var(--ink); }
.video-embed iframe, .video-embed video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; background: var(--ink); }
.video-embed .video-ph { position: absolute; inset: 0; display: grid; place-items: center; cursor: pointer; background: linear-gradient(160deg, var(--accent-deep), var(--ink)); background-size: cover; background-position: center; }
.video-embed .video-ph[style*="url"]::after { content:""; position:absolute; inset:0; background: rgba(20,20,20,.28); }
.video-embed .video-ph .play, .video-embed .video-ph .vlabel { position: relative; z-index: 1; }
.video-embed .video-ph .play { width: 76px; height: 76px; border-radius: 50%; background: rgba(255,255,255,.92); display: grid; place-items: center; transition: transform .3s var(--ease); }
.video-embed .video-ph:hover .play { transform: scale(1.08); }
.video-embed .video-ph .play::before { content: ""; border-left: 22px solid var(--accent-deep); border-top: 13px solid transparent; border-bottom: 13px solid transparent; margin-left: 6px; }
.video-embed .video-ph .vlabel { position: absolute; bottom: 18px; left: 20px; right: 20px; color: #fff; font-size: .95rem; opacity: .9; }

/* data / stat strip */
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; margin: 1.8em 0; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-align: center; }
.stat .num { font-family: var(--font-display); font-size: 2rem; color: var(--accent-deep); line-height: 1; }
.stat .cap { font-size: .85rem; color: var(--ink-3); margin-top: 8px; }

/* sources / references */
.sources { font-size: .92rem; color: var(--ink-2); }
.sources ol { padding-left: 1.4em; }
.sources li { margin-top: 8px; }

/* ---- TOC sidebar ---- */
.toc { position: sticky; top: 88px; }
.toc-inner { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.toc h4 { font-family: var(--font-body); font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; margin-bottom: 12px; }
.toc ul { display: flex; flex-direction: column; gap: 9px; }
.toc a { font-size: .92rem; color: var(--ink-2); line-height: 1.35; transition: color .2s; display: block; border-left: 2px solid transparent; padding-left: 12px; margin-left: -14px; }
.toc a:hover { color: var(--ink); }
.toc a.active { color: var(--accent-deep); border-color: var(--accent); font-weight: 600; }
.toc .progress { height: 3px; background: var(--line); border-radius: 999px; margin-bottom: 16px; overflow: hidden; }
.toc .progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }

/* ---- Author bio box ---- */
.author-box { display: flex; gap: 22px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(22px,3vw,30px); margin-top: 36px; }
.author-box > div { min-width: 0; }
.author-box .ava-lg { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); background: var(--surface-2); flex: 0 0 auto; }
.author-box h3 { font-size: 1.3rem; margin-top: 0 !important; }
.author-box .role + p, .author-box p:first-of-type { margin-top: 12px; }
.author-box .role { font-size: .9rem; color: var(--ink-3); margin-top: 2px; }
.author-box p { color: var(--ink-2); margin-top: 12px; font-size: .98rem; line-height: 1.6; }

/* ---- Inline CTA ---- */
.article-cta { background: var(--accent); color: #FBF6EE; border-radius: var(--radius-lg); padding: clamp(28px,4vw,44px); margin-top: 40px; text-align: center; }
.article-cta h3 { color: #fff; font-size: clamp(1.5rem,3vw,2rem); }
.article-cta p { color: #EAF3F1; margin-top: 10px; max-width: 48ch; margin-inline: auto; }
.article-cta .btn { margin-top: 22px; background: #FBF6EE; color: var(--accent-deep); }
.article-cta .btn:hover { background: #fff; }

/* ---- Share ---- */
.share { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.share .share-label { font-size: .85rem; color: var(--ink-3); }
.share a { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--ink-2); transition: all .3s var(--ease); font-size: .9rem; font-weight: 600; }
.share a:hover { border-color: var(--accent); color: var(--accent-deep); box-shadow: var(--shadow); }

/* ---- Related articles ---- */
.related { padding-block: clamp(40px,6vw,72px); }
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: clamp(20px,2.6vw,28px); margin-top: 30px; }
.rel-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.rel-card .ph { border-radius: 0; border: 0; border-bottom: 1px solid var(--line); aspect-ratio: 16/10; }
.rel-card .rel-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.rel-card .cat { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--honey-deep); font-weight: 700; }
.rel-card h3 { font-size: 1.18rem; line-height: 1.2; }

/* ---- FAQ accordion in articles (styles shared here so faq.html works) ---- */
.article-faq { margin-top: 2em; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q { width: 100%; text-align: left; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 0; font-family: var(--font-display); font-size: clamp(1.15rem,2vw,1.32rem); color: var(--ink); background: none; border: 0; cursor: pointer; }
.faq-q .ico { flex: 0 0 auto; width: 26px; height: 26px; position: relative; }
.faq-q .ico::before, .faq-q .ico::after { content:""; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); background: var(--accent); transition: transform .3s var(--ease), opacity .3s; }
.faq-q .ico::before { width: 14px; height: 1.6px; }
.faq-q .ico::after { width: 1.6px; height: 14px; }
.faq-item.open .faq-q .ico::after { transform: translate(-50%,-50%) rotate(90deg); opacity: 0; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .4s var(--ease); }
.faq-a .faq-a-inner { padding-bottom: 22px; color: var(--ink-2); max-width: 66ch; line-height: 1.6; }
.faq-item.open .faq-a { max-height: 420px; }

/* ---- Listicle items ---- */
.list-item { display: grid; grid-template-columns: auto 1fr; gap: 22px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.list-item .list-num { font-family: var(--font-display); font-size: 2.6rem; line-height: 1; color: var(--accent-soft); }
.list-item h3 { font-size: 1.4rem; margin-bottom: 8px; }
.list-item p { color: var(--ink-2); }

/* ---- Comparison table ---- */
.cmp { width: 100%; border-collapse: collapse; margin: 1.8em 0; font-size: 1rem; }
.cmp th, .cmp td { text-align: left; padding: 16px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.cmp thead th { font-family: var(--font-display); font-size: 1.1rem; color: var(--ink); border-bottom: 2px solid var(--line-2); }
.cmp tbody th { font-weight: 600; color: var(--ink-2); width: 30%; }
.cmp td { color: var(--ink-2); }

/* ---- Checklist (interactive) ---- */
.checklist { list-style: none; padding-left: 0; margin: 1.5em 0; }
.checklist li { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-top: 12px; cursor: pointer; transition: border-color .2s, background .2s; }
.checklist li:hover { border-color: var(--accent-soft); }
.checklist li.checked { background: var(--accent-tint); border-color: var(--accent-soft); }
.checklist .box { width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--line-2); flex: 0 0 auto; margin-top: 1px; display: grid; place-items: center; transition: all .2s; }
.checklist li.checked .box { background: var(--accent); border-color: var(--accent); }
.checklist li.checked .box::after { content: ""; width: 10px; height: 6px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translateY(-1px); }
.checklist .ctext { color: var(--ink); }
.checklist li.checked .ctext { color: var(--ink-2); }

/* ---- Responsive ---- */
@media (max-width: 920px) {
  .article-body { grid-template-columns: minmax(0,1fr); }
  .toc { display: none; }
  .related-grid { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .stat-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .related-grid { grid-template-columns: 1fr; }
  .prose { font-size: 1.05rem; }
  .prose blockquote { font-size: 1.15rem; padding-left: 16px; }
  .author-box { flex-direction: column; gap: 16px; text-align: center; align-items: center; }
  .article-meta { gap: 10px; }
  .list-item { grid-template-columns: 1fr; gap: 6px; }
  .list-item .list-num { font-size: 2rem; }
  .cmp thead { display: none; }
  .cmp tbody th, .cmp td { display: block; width: auto; padding: 8px 0; border: 0; }
  .cmp tbody tr { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .cmp tbody th { color: var(--ink); }
}

.rel-card img.ph { width:100%; height:auto; object-fit:cover; display:block; aspect-ratio:16/10; border-bottom:1px solid var(--line); }
