/* ════════════════════════════════════════════════════
   Article page — single-post template
   ════════════════════════════════════════════════════ */

body { background: var(--bg-warm); }

/* ─── Reading progress bar (under sticky topnav) ─── */
.reading-progress {
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(245, 241, 236, 0.06);
  z-index: 99;
  pointer-events: none;
}
.reading-progress__bar {
  width: 0%;
  height: 100%;
  background: var(--accent);
  transition: width 0.08s linear;
}

/* ─── Breadcrumbs (reuse blog.css pattern) ─── */
.article-breadcrumbs {
  background: var(--bg-warm);
  padding: 88px 0 0;
}
.article-breadcrumbs__inner {
  max-width: 920px;
  margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  font: 500 11px/1.4 var(--font-body);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.article-breadcrumbs__inner a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}
.article-breadcrumbs__inner a:hover { color: var(--accent); }
.article-breadcrumbs__sep { color: rgba(60, 50, 40, 0.32); }
.article-breadcrumbs__current {
  color: var(--text-dark);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  font-size: 13px;
}

/* ─── Article header ─── */
.article-header {
  padding: clamp(40px, 5vw, 64px) 0 clamp(32px, 4vw, 48px);
}
.article-header__inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  text-align: center;
}
.article-meta {
  font: 500 12px/1.3 var(--font-body);
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 24px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.article-meta__sep {
  color: rgba(200, 121, 42, 0.45);
}

/* Видимый byline: автор + дата публикации (E-E-A-T / YMYL-сигнал) */
.article-byline {
  font: 400 15px/1.4 var(--font-body);
  color: var(--text-muted);
  margin: 0 0 24px;
}
.article-byline__author {
  color: var(--text-dark);
  font-weight: 500;
}
.article-byline__sep {
  margin: 0 8px;
  color: var(--border);
}
.article-byline time {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.article-title {
  font: 500 clamp(34px, 4.6vw, 60px)/1.1 var(--font-serif);
  letter-spacing: -0.6px;
  color: var(--text-dark);
  margin: 0 0 24px;
  text-wrap: balance;
}
.article-title em {
  font-style: italic;
  color: var(--accent);
  font-weight: 500;
}

.article-lead {
  font: italic 400 19px/1.55 var(--font-serif);
  color: var(--text-muted);
  margin: 0;
  text-wrap: pretty;
}

/* ─── Hero image ─── */
.article-hero {
  max-width: 980px;
  margin: clamp(32px, 4vw, 56px) auto;
  padding: 0 var(--gutter);
}
.article-hero__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--bg-cream);
  border: 1px solid var(--border);
}
.article-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.article-hero__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(200, 121, 42, 0.10) 0%, rgba(200, 121, 42, 0.02) 100%),
    var(--bg-cream);
  color: var(--accent);
  font: italic 500 18px/1 var(--font-serif);
  letter-spacing: 0.5px;
  padding: 0 24px;
  text-align: center;
}
.article-hero__caption {
  margin: 12px 4px 0;
  font: italic 400 13px/1.5 var(--font-body);
  color: var(--text-muted);
  text-align: center;
}

/* ─── Article body ─── */
.article-body {
  max-width: 680px;
  margin: 0 auto clamp(48px, 6vw, 80px);
  padding: 0 var(--gutter);
  font: 400 18px/1.75 var(--font-body);
  color: var(--text-dark);
}
.article-body p {
  margin: 0 0 1.5em;
  text-wrap: pretty;
}
.article-body p:last-child { margin-bottom: 0; }

.article-body h2 {
  font: 500 clamp(26px, 2.6vw, 32px)/1.25 var(--font-serif);
  letter-spacing: -0.3px;
  color: var(--text-dark);
  margin: 2em 0 0.8em;
  text-wrap: pretty;
}
.article-body h2 em {
  font-style: italic;
  color: var(--accent);
  font-weight: 500;
}
.article-body h3 {
  font: 500 22px/1.3 var(--font-serif);
  letter-spacing: -0.2px;
  color: var(--text-dark);
  margin: 1.6em 0 0.6em;
}

/* ⚠️ ЛОКАЛЬНЫЙ OVERRIDE: 500, НЕ 600 (регламент §5.2). Александр: 600 «грязновато» — смягчили
   до medium. При ре-синке article.css из пакета Claude Design НЕ возвращать 600; Design закрепляет
   500 в источнике + §5.2 отдельно. */
.article-body strong { font-weight: 500; }
.article-body em     { font-style: italic; color: inherit; font-weight: inherit; }
.article-body .accent { color: var(--accent); font-weight: 600; }

.article-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--accent-line);
  text-decoration-thickness: 1px;
  transition: color var(--dur) var(--ease), text-decoration-color var(--dur) var(--ease);
}
.article-body a:hover {
  color: var(--accent-dark);
  text-decoration-color: transparent;
}

/* ⚠️ Компактная цитата (Александр: стандартная слишком высокая + крупные кавычки «»).
   Убраны декоративные кавычки дизайн-системы (blockquote::before/::after), уменьшены
   вертикальные отступы и кегль. Оставлены линия слева + курсив — цитата узнаётся, но
   компактна. Локальный override; Claude Design закрепит в источнике (не возвращать кавычки/2.4em).
   🔴 КЭШ: при ЛЮБОЙ правке article.css ОБЯЗАТЕЛЬНО бампать ?v в 18 HTML (grep -l 'article.css?v'),
   иначе прод отдаёт cache-control max-age=30д и браузеры держат СТАРЫЙ CSS под тем же ?v.
   Именно так «откатились» цитаты 2026-07: compaction не бампнул ?v=3 → кэш старых кавычек. */
.article-body blockquote {
  margin: 1.6em 0;
  padding: 3px 0 3px 22px;
  border-left: 3px solid var(--accent);
  font: italic 500 20px/1.45 var(--font-serif);
  color: var(--text-dark);
}
.article-body blockquote::before,
.article-body blockquote::after { content: none; }
.article-body blockquote p { margin: 0; }
.article-body blockquote cite {
  display: block;
  margin-top: 14px;
  font: 500 11px/1.3 var(--font-body);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-style: normal;
}

.article-body ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5em;
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}
.article-body ul li {
  position: relative;
  padding-left: 24px;
}
.article-body ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-weight: 600;
}

/* Inline figure — breaks out of the text column up to 980px */
.article-figure {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: min(980px, calc(100vw - 2 * var(--gutter)));
  margin: 2.4em 0;
}
.article-figure__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--bg-cream);
  border: 1px solid var(--border);
}
.article-figure__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(200, 121, 42, 0.08) 0%, rgba(200, 121, 42, 0.02) 100%),
    var(--bg-cream);
  color: var(--accent);
  font: italic 500 15px/1 var(--font-serif);
  text-align: center;
  padding: 0 24px;
}
.article-figure figcaption {
  margin: 12px 4px 0;
  font: italic 400 13px/1.5 var(--font-body);
  color: var(--text-muted);
  text-align: center;
}

/* ─── Inline CTA banner inside the article ─── */
.article-inline-cta {
  background: var(--bg-cream);
  border-left: 3px solid var(--accent);
  padding: 18px 22px;
  margin: 2.4em 0;
  font: italic 500 16px/1.5 var(--font-serif);
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.article-inline-cta__text { flex: 1; min-width: 240px; }
.article-inline-cta__link {
  color: var(--accent);
  font: 500 14px/1 var(--font-body);
  letter-spacing: 0.3px;
  text-decoration: none;
  font-style: normal;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.article-inline-cta__link::after {
  content: '→';
  transition: transform var(--dur) var(--ease-out);
}
.article-inline-cta__link:hover { color: var(--accent-dark); }
.article-inline-cta__link:hover::after { transform: translateX(4px); }

/* ─── Author signature ─── */
.article-author {
  max-width: 680px;
  margin: 0 auto;
  padding: 32px var(--gutter) clamp(32px, 4vw, 44px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 18px;
}
.article-author__avatar {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-cream);
  border: 1px solid var(--border);
}
.article-author__avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.article-author__body { min-width: 0; }
.article-author__name {
  font: 500 20px/1.2 var(--font-serif);
  color: var(--text-dark);
  margin: 0 0 4px;
}
.article-author__role {
  font: 500 11px/1.3 var(--font-body);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}
.article-author__role a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}
.article-author__role a:hover { color: var(--accent-dark); }

/* Add wrapper spacing under article body before author */
.article-body + .article-author {
  margin-top: -16px;
}

/* ─── Related articles ─── */
.related-articles {
  background: var(--bg-warm);
  padding: clamp(56px, 6vw, 88px) 0 clamp(64px, 7vw, 96px);
  border-top: 1px solid var(--border);
}
.related-articles__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.related-articles__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font: 500 12px/1 var(--font-body);
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
}
.related-articles__eyebrow::before {
  content: '';
  width: 24px; height: 1px;
  background: var(--accent);
}
.related-articles__title {
  font: 500 clamp(28px, 3vw, 36px)/1.2 var(--font-serif);
  letter-spacing: -0.3px;
  color: var(--text-dark);
  margin: 0 0 36px;
}

/* ─── Responsive ─── */
@media (max-width: 1100px) {
  .reading-progress { top: 64px; }
}
@media (max-width: 720px) {
  .reading-progress { top: 64px; }
  .article-breadcrumbs { padding-top: 80px; }
  .article-breadcrumbs__inner { padding: 14px var(--gutter-mobile); font-size: 13px; gap: 8px; }
  .article-header { padding-top: 32px; }
  .article-hero, .article-body, .article-author { padding-left: var(--gutter-mobile); padding-right: var(--gutter-mobile); }
  .article-figure { width: calc(100vw - 2 * var(--gutter-mobile)); }
  .article-body { font-size: 17px; line-height: 1.7; }
  .article-body blockquote { font-size: 19px; padding-left: 20px; }
  .article-inline-cta { flex-direction: column; align-items: flex-start; gap: 10px; }
  .article-author { gap: 14px; }
  .article-author__avatar { width: 60px; height: 60px; }
}

/* Right-aligned category + reading time on the breadcrumbs row (stih + статьи) */
.article-breadcrumbs__meta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 500 11px/1.4 var(--font-body);
  letter-spacing: 2px;
  text-transform: uppercase;
  white-space: nowrap;
}
.article-breadcrumbs__meta-cat { color: var(--accent); }
.article-breadcrumbs__meta-sep { color: rgba(200, 121, 42, 0.45); }
.article-breadcrumbs__meta-time { color: var(--text-muted); }

/* ─── Verse layout (компактный стих / басня — формат Claude Design .article-verse) ─── */
.article-verse {
  max-width: 540px;
  margin: 0 auto clamp(40px, 5vw, 60px);
  padding: 0 var(--gutter);
  text-align: left;
  color: var(--text-dark);
}
.article-verse__stanza {
  font: 400 20px/1.5 var(--font-serif);
  letter-spacing: 0.1px;
  margin: 0 0 1.15em;
  text-wrap: pretty;
}
.article-verse__stanza:last-child { margin-bottom: 0; }
.article-verse__stanza em {
  font-style: italic;
  color: var(--accent);
  font-weight: 500;
}
/* Мораль — обычная строфа: без рамки/фона/курсива/центрирования, только чуть больший отступ сверху. */
.article-verse__stanza--moral { margin-top: 1.6em; }
/* hr между строфами НЕ используются. Крупный смысловой раздел — редкий .article-verse__break: */
.article-verse__break {
  width: 40px; height: 1px;
  background: var(--accent);
  border: 0;
  margin: 1.9em 0;
  opacity: 0.5;
}
/* Author's note / разбор after the poem */
.article-poem-note {
  max-width: 620px;
  margin: 0 auto clamp(48px, 6vw, 80px);
  padding: 28px var(--gutter) 0;
}
.article-poem-note__inner {
  border-top: 1px solid var(--border);
  padding-top: 28px;
}
.article-poem-note__label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font: 500 12px/1 var(--font-body);
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
}
.article-poem-note__label::before {
  content: '';
  width: 24px; height: 1px;
  background: var(--accent);
}
.article-poem-note p {
  font: 400 17px/1.7 var(--font-body);
  color: var(--text-muted);
  margin: 0 0 1.2em;
  text-wrap: pretty;
}
.article-poem-note p:last-child { margin-bottom: 0; }
.article-poem-note em {
  font-style: italic;
  color: var(--accent);
  font-weight: 500;
}
@media (max-width: 720px) {
  .article-verse,
  .article-poem-note { padding-left: var(--gutter-mobile); padding-right: var(--gutter-mobile); }
  .article-verse__stanza { font-size: 19px; line-height: 1.5; }
}

/* ═══ Share — нативный шеринг в конце статьи (JS: /share.js инжектит панель) ═══
   Адаптация механики МТБ на токены проекта. Ноль сторонних скриптов/трекеров. */
.article-share {
  position: relative;
  max-width: 680px;
  margin: clamp(28px, 3.5vw, 40px) auto clamp(36px, 4.5vw, 48px);
  padding: 0 var(--gutter);
}
.article-share__btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 20px;
  background: var(--accent); color: #fff;
  border: 1px solid var(--accent); border-radius: var(--radius-sm);
  font: 500 14.5px/1 var(--font-body); cursor: pointer;
  box-shadow: 0 3px 14px rgba(200, 121, 42, 0.28);
  transition: background 0.2s var(--ease-out, ease), border-color 0.2s var(--ease-out, ease), transform 0.2s var(--ease-out, ease);
}
.article-share__btn svg { width: 17px; height: 17px; }
.article-share__btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); transform: translateY(-1px); }
.article-share.is-open .article-share__btn { background: var(--accent-dark); border-color: var(--accent-dark); }
.article-share__panel {
  display: none;
  position: absolute; top: calc(100% + 10px); left: var(--gutter); z-index: 50;
  width: 300px; max-width: calc(100vw - 40px);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: 0 20px 56px rgba(42, 37, 32, 0.18);
  padding: 18px 18px 16px;
}
.article-share.is-open .article-share__panel { display: block; }
@media (prefers-reduced-motion: no-preference) {
  .article-share.is-open .article-share__panel { animation: article-share-in 0.16s var(--ease-out, ease); }
}
@keyframes article-share-in { from { transform: translateY(-6px); } to { transform: none; } }
.article-share__head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 9px; }
.article-share__eyebrow { font: 600 11px/1 var(--font-body); letter-spacing: 1.4px; text-transform: uppercase; color: var(--accent-dark); }
.article-share__title { font-family: var(--font-serif); font-style: italic; font-size: 19px; line-height: 1.2; color: var(--text-dark); }
.article-share__note { font: 400 13px/1.5 var(--font-body); color: var(--text-muted); margin: 0 0 14px; }
.article-share__channels { display: flex; flex-direction: column; gap: 7px; }
.article-share__ch {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 11px 13px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); cursor: pointer; color: var(--text-dark);
  font: 500 14.5px/1 var(--font-body);
  transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.15s;
}
.article-share__ch svg { width: 19px; height: 19px; flex: none; color: var(--accent); }
.article-share__ch:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }
.article-share__ch-arr { margin-left: auto; color: var(--text-muted); transition: transform 0.15s, color 0.15s; }
.article-share__ch:hover .article-share__ch-arr { color: var(--accent); transform: translateX(3px); }
.article-share__copy {
  display: flex; align-items: center; gap: 9px; width: 100%;
  margin-top: 13px; padding-top: 13px; border: 0; border-top: 1px solid var(--border);
  background: none; cursor: pointer; font: 500 13.5px/1 var(--font-body); color: var(--accent-dark);
  transition: color 0.15s;
}
.article-share__copy svg { width: 16px; height: 16px; flex: none; }
.article-share__copy:hover { color: var(--accent); }
.article-share__copy.is-copied { color: var(--success, #5A9A6E); }
@media (max-width: 700px) {
  .article-share { padding-left: var(--gutter-mobile); padding-right: var(--gutter-mobile); }
  .article-share__panel { left: var(--gutter-mobile); }
}
