/* ==========================================================================
   Статьи — /stati/
   Подключается после /weekly.css: шапка, кнопки, подвал и палитра оттуда.
   Здесь только то, что нужно длинному тексту.

   Читатель — предприниматель 35+, часто с телефона. Отсюда крупный кегль
   основного текста (19 px, на телефоне 18), строка не шире ~68 знаков и
   высокий межстрочный. Заголовки страницы встреч (до 84 px) для статьи
   слишком громкие — здесь они спокойнее.

   Статья ведёт на вечер, поэтому дата должна быть видна с первого экрана:
   на широком экране билет стоит справа от текста, на узком дату держит
   полоска внизу экрана, а сам билет стоит в конце статьи.
   ========================================================================== */

/* --- статья: текст и билет --------------------------------------------------
   Две колонки только от 1100 px: уже текст становится уже 60 знаков, а билет
   теснит его. Липким билет делаем, только если он целиком входит в окно:
   иначе кнопка уезжает за нижний край, и до неё не добраться. */
.post { padding: 56px 0 24px; }
.post__head,
.post__body,
.post .ticket { max-width: 760px; margin-inline: auto; }

@media (min-width: 1100px) {
  .post {
    display: grid; grid-template-columns: minmax(0, 720px) 300px;
    column-gap: 72px; justify-content: center; align-items: start;
  }
  .post__head, .post__body { grid-column: 1; max-width: none; margin-inline: 0; }
  .post .ticket { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
}
@media (min-width: 1100px) and (min-height: 760px) {
  .post .ticket { position: sticky; top: 92px; }
}

.crumbs {
  margin: 0 0 22px; display: flex; flex-wrap: wrap; gap: 8px 10px;
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em;
  color: var(--ink-soft);
}
.crumbs a { color: var(--flame); }
.crumbs a:hover { color: var(--flame-deep); }

.post__title {
  margin-bottom: 24px;
  font-size: clamp(36px, 5vw, 56px); line-height: 1.03;
  letter-spacing: -.035em; font-weight: 800;
}
.post__lead { margin-bottom: 22px; font-size: clamp(19px, 2vw, 23px); line-height: 1.5; font-weight: 500; }
.post__meta { margin: 0 0 28px; font-size: 13px; font-weight: 600; color: var(--ink-soft); }

/* Главное за полминуты — три вывода под заголовком. Читатель с телефона часто
   решает по ним, читать ли дальше; тот, кто дочитывать не станет, уносит хотя
   бы суть. */
.brief { margin: 0 0 44px; padding: 24px 26px 22px; background: var(--paper-2); border-radius: 16px; }
.brief__title { margin: 0 0 14px; font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.brief li { position: relative; margin-bottom: 12px; padding-left: 26px; font-size: 18px; line-height: 1.5; }
.brief li:last-child { margin-bottom: 0; }
.brief li::before { content: ""; position: absolute; left: 2px; top: .74em; width: 12px; height: 2px; background: var(--flame); }

/* Обложка стоит после первого раздела: на телефоне первый экран отдан
   заголовку и началу текста, а не картинке. */
.post__cover { margin: 2.2em 0 2.4em; }
.post__cover img { height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 18px; background: var(--paper-2); }
.post__cover figcaption { margin-top: 10px; font-size: 13px; line-height: 1.5; color: var(--ink-soft); }

/* --- текст ----------------------------------------------------------------- */
.post__body { font-size: 19px; line-height: 1.7; }
.post__body p { margin: 0 0 1.1em; }
.post__body h2 {
  margin: 1.9em 0 .6em;
  font-size: clamp(26px, 3vw, 34px); line-height: 1.12;
  letter-spacing: -.025em; font-weight: 800;
}
.post__body h2:first-child { margin-top: 0; }
.post__body h3 { margin: 1.6em 0 .45em; font-size: 22px; line-height: 1.3; letter-spacing: -.01em; font-weight: 800; }
/* Жирные начала абзацев — с маркером: по ним глаз пробегает статью, не читая
   подряд. */
.post__body strong { padding: 0 .08em; font-weight: 700; background: linear-gradient(transparent 60%, rgba(255, 90, 0, .24) 60%); }
/* Цитата — одна фраза из раздела выше, крупно: якорь для того, кто листает. */
.pull { margin: 1.7em 0 1.9em; padding: 2px 0 2px 26px; border-left: 4px solid var(--flame); }
.post__body .pull p { margin: 0; font-size: clamp(24px, 3vw, 30px); line-height: 1.25; letter-spacing: -.02em; font-weight: 800; }
/* Списки текста — только прямые потомки: у вложенных блоков свои. */
.post__body > ul { margin: 0 0 1.2em; }
.post__body > ul > li { position: relative; margin-bottom: .55em; padding-left: 28px; }
.post__body > ul > li::before {
  content: ""; position: absolute; left: 4px; top: .8em;
  width: 12px; height: 2px; background: var(--flame);
}
.post__body a:not(.button):not(.link-arrow) { color: var(--flame-deep); border-bottom: 1px solid currentColor; }
.post__body a:not(.button):not(.link-arrow):hover { color: var(--flame); }

/* --- билет ------------------------------------------------------------------
   Оранжевый, как финальный блок на страницах встреч: читатель узнаёт в нём то
   же приглашение. Корешок с датой отделён перфорацией — это и правда билет на
   вечер. Кнопка тёмная: оранжевая на оранжевом не видна. */
.ticket { margin-top: 64px; color: var(--ink); background: var(--flame); border-radius: 18px; }
.ticket__date { margin: 0; padding: 26px 28px 24px; display: flex; align-items: flex-end; gap: 16px; }
.ticket__date strong {
  font-size: 96px; line-height: .8; letter-spacing: -.06em; font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.ticket__date span { padding-bottom: 2px; font-size: 15px; line-height: 1.3; font-weight: 700; }
/* Даты нет: скрипт ещё не загрузил расписание или новой даты пока не назначили.
   Корешок с датой тогда прячется целиком — пустой или прошедший хуже, чем
   никакого. Без корешка не нужна и перфорация. */
.ticket--nodate .ticket__date { display: none; }
.ticket--nodate .ticket__body { border-top: 0; }
.ticket--nodate .ticket__body::before,
.ticket--nodate .ticket__body::after { display: none; }

.ticket__body { position: relative; padding: 24px 28px 28px; border-top: 2px dashed rgba(20, 18, 15, .35); }
.ticket__body::before,
.ticket__body::after {
  content: ""; position: absolute; top: -12px;
  width: 22px; height: 22px; background: var(--paper); border-radius: 50%;
}
.ticket__body::before { left: -11px; }
.ticket__body::after { right: -11px; }

.ticket__kind { margin: 0 0 10px; font-size: 14px; line-height: 1.4; font-weight: 700; }
.ticket__title { margin-bottom: 16px; font-size: 26px; line-height: 1.12; letter-spacing: -.025em; font-weight: 800; }
.ticket__facts li { font-size: 15px; line-height: 1.5; font-weight: 600; }
/* Пояснение «новой даты пока нет» пишет stati.js; пустое место не занимает. */
.ticket__facts li:empty { display: none; }
.ticket__facts [data-card-note] { margin-top: 10px; font-weight: 500; }
.ticket .button { width: 100%; min-height: 56px; margin-top: 22px; padding: 0 20px; gap: 16px; }

/* --- полоска внизу экрана ----------------------------------------------------
   Там, где билета справа нет. Появляется, когда заголовок статьи ушёл за верх
   экрана, и прячется, когда сам билет в конце статьи уже виден: две записи
   на одном экране выглядят как ошибка. Собирает её stati.js. */
.ticket-bar {
  position: fixed; z-index: 9; left: 12px; right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  max-width: 560px; margin-inline: auto; padding: 8px 8px 8px 4px;
  display: flex; align-items: center; gap: 4px;
  color: var(--paper); background: var(--ink); border-radius: 16px;
  box-shadow: 0 12px 32px rgba(20, 18, 15, .28);
  visibility: hidden; transform: translateY(calc(100% + 24px));
}
.ticket-bar.is-in { visibility: visible; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .ticket-bar { transition: transform .35s var(--ease), visibility 0s linear .35s; }
  .ticket-bar.is-in { transition: transform .35s var(--ease); }
}
.ticket-bar__close {
  flex: none; width: 40px; height: 44px; padding: 0;
  color: rgba(243, 239, 231, .55); background: none; border: 0; border-radius: 10px;
  font: inherit; font-size: 26px; line-height: 1; cursor: pointer;
}
.ticket-bar__close:hover { color: var(--paper); }
.ticket-bar__close:focus-visible { outline: 3px solid var(--flame); outline-offset: 2px; }
.ticket-bar__go { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ticket-bar__text { min-width: 0; font-size: 13px; line-height: 1.3; color: rgba(243, 239, 231, .72); }
.ticket-bar__text b { display: block; font-size: 16px; font-weight: 700; color: #fff; }
.ticket-bar__text span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ticket-bar__btn {
  flex: none; min-height: 44px; padding: 0 16px; display: inline-flex; align-items: center;
  color: #fff; background: var(--flame); border-radius: 11px; font-size: 14px; font-weight: 700;
}
@media (min-width: 1100px) { .ticket-bar { display: none; } }

/* --- другие статьи --------------------------------------------------------- */
.more { padding: 96px 0 24px; }
.more__title { margin-bottom: 34px; font-size: clamp(30px, 4vw, 46px); line-height: 1; letter-spacing: -.04em; font-weight: 800; }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 28px; }
.cards--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card > a { display: block; }
.card img { height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 14px; background: var(--paper-2); transition: transform .5s var(--ease); }
.card__photo { overflow: hidden; border-radius: 14px; }
.card > a:hover img { transform: scale(1.03); }
.card .label { margin: 18px 0 10px; }
.card h3 { margin-bottom: 10px; font-size: 22px; line-height: 1.2; letter-spacing: -.02em; font-weight: 800; transition: color .25s; }
.card > a:hover h3 { color: var(--flame); }
.card p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink-soft); }

/* --- список статей --------------------------------------------------------- */
.stati-head { padding: 64px 0 48px; }
.stati-head h1 { margin-bottom: 24px; }
.stati-head__lead { max-width: 640px; margin: 0; font-size: 20px; line-height: 1.5; }

@media (max-width: 1040px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .post { padding-top: 32px; }
  .post__meta { margin-bottom: 22px; }
  .brief { margin-bottom: 36px; padding: 20px 20px 18px; }
  .brief li { font-size: 17px; }
  .post__cover img { border-radius: 14px; }
  .post__body { font-size: 18px; line-height: 1.65; }
  .ticket { margin-top: 48px; }
  .ticket__date { padding: 22px 22px 20px; }
  .ticket__date strong { font-size: 80px; }
  .ticket__body { padding: 22px 22px 24px; }
  .more { padding-top: 72px; }
  .cards, .cards--two { grid-template-columns: 1fr; gap: 36px; }
  .stati-head { padding: 36px 0 32px; }
  .stati-head__lead { font-size: 18px; }
}
