/* ============================================================
   Наш слой поверх стилей статей от продюсера (mp-site.css и
   mp-article.css). Те файлы перезаписывает tools/import_articles.py,
   этот — нет, поэтому правки дизайна статей живут здесь.
   ============================================================ */

/* ---------- РИТМ ТЕКСТА ----------
   В причинах, блоке «кто проводит разбор» и финальном оффере абзацы шли
   вплотную: сброс отступов у продюсера, а правило ритма только для
   прямых потомков текста. На телефоне это читалось сплошной стеной. */
.art-reason p + p,
.art-author p + p,
.art-offer p + p,
.art-promise p + p { margin-top: 18px; }

/* Строка «автор · формат · время» на телефоне: точки-разделители
   переносились в начало и конец строк. */
@media (max-width: 620px) {
  .art-meta { gap: 6px 18px; }
  .art-meta .dot { display: none; }
}

/* ---------- ПЕРВЫЙ ЭКРАН ----------
   Справа на широком экране было пусто. Тонкие золотые круги — «волна
   перемен» — дают глубину, не отвлекая от заголовка. */
.art-hero-in { position: relative; z-index: 1; }
@media (min-width: 1080px) {
  .art-hero::after {
    content: ''; position: absolute; top: 50%; right: -180px;
    width: 720px; height: 720px; transform: translateY(-50%);
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 720 720' fill='none' stroke='%23D4AF37'%3E%3Ccircle cx='360' cy='360' r='70' stroke-opacity='.34'/%3E%3Ccircle cx='360' cy='360' r='130' stroke-opacity='.26'/%3E%3Ccircle cx='360' cy='360' r='195' stroke-opacity='.19'/%3E%3Ccircle cx='360' cy='360' r='262' stroke-opacity='.13'/%3E%3Ccircle cx='360' cy='360' r='330' stroke-opacity='.08'/%3E%3C/svg%3E") center / contain no-repeat;
    -webkit-mask-image: radial-gradient(circle at center, #000 30%, transparent 72%);
    mask-image: radial-gradient(circle at center, #000 30%, transparent 72%);
    pointer-events: none;
  }
}

/* ---------- ИСТОРИЯ КЛИЕНТА ---------- */
.art-case .art-case-note { margin-top: 18px; font-size: 14px; line-height: 1.5; color: var(--mute); }

/* ---------- КТО ПРОВОДИТ РАЗБОР ---------- */
.mp-school .art-author-top { align-items: center; gap: 22px; }
.mp-faces { display: flex; flex-shrink: 0; padding-left: 14px; }
.mp-faces:empty { display: none; }
.mp-face {
  width: 64px; height: 64px; margin-left: -14px; border-radius: 50%;
  object-fit: cover; background: var(--card);
  border: 2px solid var(--bg); box-shadow: 0 0 0 1px rgba(212,175,55,.4);
}
.mp-face-initials {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 24px; color: var(--gold);
}
.mp-school .art-author-name { font-size: 26px; }
.mp-school-names { margin-top: 6px; font-size: 15px; line-height: 1.5; color: rgba(232,230,225,.72); }
.mp-school-names:empty { display: none; }
.mp-school .art-author-top + p { margin-top: 26px; }
@media (max-width: 620px) {
  .mp-school .art-author-top { flex-direction: column; align-items: flex-start; gap: 14px; }
  .mp-face { width: 56px; height: 56px; }
  .mp-school .art-author-name { font-size: 24px; }
}

/* ---------- ФИНАЛЬНЫЙ ПРИЗЫВ ----------
   Раньше кнопка терялась между длинным текстом и сноской того же цвета.
   Теперь это отдельная панель: условия разбора, крупная кнопка и честная
   строка про цену — её требует модерация объявлений и оферта. */
.art-offer .mp-final {
  position: relative; overflow: hidden;
  margin-top: 36px; padding: 30px 30px 26px; border-radius: 16px;
  background:
    radial-gradient(ellipse 80% 90% at 100% 0%, rgba(212,175,55,.20), transparent 60%),
    linear-gradient(160deg, #1A2330 0%, #11161E 100%);
  border: 1px solid rgba(212,175,55,.5);
  box-shadow: 0 30px 60px -32px rgba(0,0,0,.85), inset 0 1px 0 rgba(255,255,255,.05);
}
.mp-final-title {
  font-family: var(--serif); font-size: clamp(24px, 2.8vw, 30px); line-height: 1.2; color: #F7F4ED;
}
.mp-final-facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.mp-final-facts span {
  padding: 6px 13px; border-radius: 999px;
  border: 1px solid rgba(212,175,55,.32); background: rgba(11,15,20,.55);
  font-size: 14px; line-height: 1.35; color: rgba(232,230,225,.9);
}
.art-offer .mp-final .mp-final-btn {
  margin-top: 22px; width: 100%;
  padding: 21px 28px; border-radius: 10px; font-size: 18px;
  box-shadow: 0 18px 40px -14px rgba(212,175,55,.5);
}
.art-offer .mp-final .mp-final-btn span { transition: transform .25s ease; }
.art-offer .mp-final .mp-final-btn:hover span { transform: translateX(4px); }
.art-body .mp-final .mp-final-note { margin-top: 14px; font-size: 15px; line-height: 1.65; color: var(--mute); }
.art-body .mp-final .mp-final-note b { font-weight: 500; color: rgba(232,230,225,.9); }
.art-offer .art-offer-note { font-size: 16px; }
@media (max-width: 620px) {
  .art-offer .mp-final { margin-top: 28px; padding: 24px 18px 20px; }
  .art-offer .mp-final .mp-final-btn { padding: 19px 18px; font-size: 17px; }
}
/* Узкие телефоны (360 px): у оффера продюсера широкие поля, и кнопка
   ломалась на две строки, а подписи условий — внутри «таблеток». */
@media (max-width: 400px) {
  .art-offer { padding-left: 16px; padding-right: 16px; }
  .art-offer .mp-final { padding: 22px 14px 18px; }
  .mp-final-facts span { font-size: 13px; padding: 5px 10px; }
  .art-offer .mp-final .mp-final-btn { padding: 18px 12px; font-size: 16px; letter-spacing: .02em; }
}

/* ---------- ПРЕДЛОЖЕНИЕ ЧЕРЕЗ МИНУТУ ----------
   Не модальное окно: страница не блокируется и фокус не перехватывается.
   На телефоне — карточка у нижнего края вместо плавающей кнопки. */
.mp-nudge {
  position: fixed; right: 24px; bottom: 24px; z-index: 80;
  width: min(400px, calc(100vw - 48px));
  padding: 24px 24px 16px; border-radius: 18px;
  background:
    radial-gradient(ellipse 90% 70% at 100% 0%, rgba(212,175,55,.16), transparent 60%),
    linear-gradient(160deg, #1A2330 0%, #11161E 100%);
  border: 1px solid rgba(212,175,55,.42);
  box-shadow: 0 40px 80px -24px rgba(0,0,0,.85), 0 0 0 1px rgba(0,0,0,.35);
  color: var(--ink);
  opacity: 0; transform: translateY(24px) scale(.98);
  transition: opacity .45s cubic-bezier(.16,1,.3,1), transform .45s cubic-bezier(.16,1,.3,1);
}
.mp-nudge.is-open { opacity: 1; transform: none; }
.mp-nudge-x {
  position: absolute; top: 10px; right: 10px;
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; line-height: 1; color: var(--mute);
  transition: color .2s ease, background .2s ease;
}
.mp-nudge-x:hover { color: var(--ink); background: rgba(255,255,255,.07); }
.mp-nudge-eyebrow {
  display: flex; align-items: center; gap: 10px; padding-right: 40px;
  font-size: 12px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--gold);
}
.mp-nudge-pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex-shrink: 0;
  animation: mpPulse 2.2s ease-out infinite;
}
@keyframes mpPulse {
  0%   { box-shadow: 0 0 0 0 rgba(212,175,55,.55); }
  70%  { box-shadow: 0 0 0 10px rgba(212,175,55,0); }
  100% { box-shadow: 0 0 0 0 rgba(212,175,55,0); }
}
.mp-nudge-title { margin-top: 14px; font-family: var(--serif); font-size: 27px; line-height: 1.18; color: #F7F4ED; }
.mp-nudge-text { margin-top: 10px; font-size: 16px; line-height: 1.6; color: rgba(232,230,225,.84); }
.mp-nudge .mp-nudge-go { margin-top: 18px; width: 100%; padding: 17px 20px; border-radius: 10px; font-size: 16px; }
.mp-nudge-sub { margin-top: 10px; text-align: center; font-size: 13px; line-height: 1.4; color: var(--mute); }
.mp-nudge-later {
  display: block; margin: 4px auto 0; padding: 8px 12px;
  font-size: 14px; color: var(--mute); text-decoration: underline; text-underline-offset: 3px;
}
.mp-nudge-later:hover { color: var(--ink); }
/* Пока открыто предложение, плавающая кнопка не нужна: на телефоне
   они легли бы друг на друга. */
body.mp-nudge-open .art-dock { opacity: 0; visibility: hidden; pointer-events: none; }
@media (max-width: 640px) {
  .mp-nudge {
    left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
    width: auto; padding: 20px 18px 12px; border-radius: 16px;
  }
  .mp-nudge-title { font-size: 23px; }
  .mp-nudge-text { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .mp-nudge { transition: none; }
  .mp-nudge-pulse { animation: none; }
}
@media print { .mp-nudge, .art-dock { display: none !important; } }

/* Текст только для скринридера (объявление о карточке предложения) */
.mp-sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
