/*
 * blog-post.css — редизайн страниц статьи (single.php) и кейса (single-case.php).
 * Источник: page mockups/blog-post-redesigns/variant-8-geist-v2.html (issue #50).
 * Скоуп .gfp (gravityfield post). Отступление от мокапа: sans = Inter (уже в теме,
 * body.font-inter), mono = Geist Mono (self-hosted ниже). Geist sans не грузим.
 * Хедер/футер темы: page-scoped светлые оверрайды в конце файла.
 */

/* ─────────────  Geist Mono (self-hosted, OFL; variable 400–600)  ───────────── */
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("public/fonts/GeistMono-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("public/fonts/GeistMono-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("public/fonts/GeistMono-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("public/fonts/GeistMono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ─────────────  Токены и база  ───────────── */
.gfp {
  --bg: #FAFAFA;
  --surface: #FFFFFF;
  --border: #EAEAEA;
  --border-2: #ECECF1;
  --ink: #15151B;
  --body: #3A3A48;
  --muted: #76768A;
  --mono: #8888A0;
  --accent: #5B57E0;
  --grad: linear-gradient(90deg, #4F4DAD 0%, #8380FF 50%, #4F4DAD 100%);
  --radius: 4px;
  --header-h: 70px;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --monof: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --maxw: 1560px;

  font-family: var(--sans);
  background: var(--bg);
  color: var(--body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-image: radial-gradient(circle, rgba(21, 21, 27, 0.025) 1px, transparent 1px);
  background-size: 28px 28px;
}
.gfp *, .gfp *::before, .gfp *::after { box-sizing: border-box; }
.gfp ::selection { background: rgba(91, 87, 224, 0.16); }
/* Тема форсит Geometria на p/li/td и *{font-size:1.6rem} — бьём скоупом */
.gfp p, .gfp li, .gfp td, .gfp th, .gfp div, .gfp figcaption { font-family: var(--sans); }
.gfp :where(span, a, strong, b, em, i, mark, small, sub, sup) {
  font-size: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  font-family: inherit;
}

/* ─────────────  Прогресс-бар чтения  ───────────── */
.gfp-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--grad);
  z-index: 1200;
  transition: width 0.08s linear;
}

/* ─────────────  Shell  ───────────── */
.gfp .shell {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 40px;
}

/* ─────────────  Header band  ───────────── */
/* Клиренс: фикс-хедер темы (70px, вне потока) + 56px воздуха из мокапа */
.gfp .header-band {
  padding-top: calc(var(--header-h) + 56px);
  padding-bottom: 48px;
}
.gfp .breadcrumbs {
  font-family: var(--monof);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mono);
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}
.gfp .breadcrumbs a { color: var(--mono); text-decoration: none; }
.gfp .breadcrumbs a:hover { color: var(--accent); }
.gfp .breadcrumbs .sep { opacity: 0.5; }

.gfp .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--monof);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 5px 11px;
  margin-bottom: 22px;
}
.gfp .eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--grad);
}

.gfp h1.post-title {
  font-size: clamp(32px, 3.4vw, 44.8px); /* мокап: clamp(2rem,3.4vw,2.8rem) при root 16px; в теме root 10px → px */
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ink);
  max-width: 22ch;
  margin: 0 0 26px;
  text-align: left;
}

/* ─────────────  Мета (article-meta.php) под мокапный .post-meta  ─────────────
   body.font-inter-префикс: перебивает центрированные правила старого дизайна
   в style.css (body.font-inter .article__meta — 0,2,1). */
.gfp .article__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px; /* мокап: .post-meta margin-bottom 22px до блока тегов */
  margin: 0;
  padding: 0;
  text-align: left;
}
.gfp .article__meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  font-family: var(--monof);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.gfp .article__meta-row > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-family: var(--monof);
}
.gfp .article__meta-author { color: var(--ink); font-weight: 500; }
.gfp .article__meta-author span:not(.article__meta-author) { color: var(--ink); font-weight: 500; }
.gfp .article__meta-avatar {
  width: 26px; height: 26px;
  border-radius: var(--radius);
  object-fit: cover;
}
.gfp .article__meta-row svg {
  width: 14px; height: 14px;
  opacity: .8;
  flex-shrink: 0;
}
.gfp .article__meta-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
}
.gfp .article__tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--monof);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 1.4;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 9px;
  background: var(--surface);
  text-decoration: none;
  transition: color .15s ease, border-color .15s ease;
}
.gfp .article__tag:hover {
  background: var(--surface);
  color: var(--accent);
  border-color: #d9d9e6;
}

/* ─────────────  Hero image  ───────────── */
.gfp .hero-figure {
  margin: 40px 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  background: linear-gradient(180deg, #fff 0%, #fbfbfd 100%);
  box-shadow: 0 1px 0 rgba(21, 21, 27, 0.02), 0 18px 50px -28px rgba(21, 21, 27, 0.18);
}
.gfp .img-frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-2);
  background: linear-gradient(135deg, #4F4DAD 0%, #8380FF 50%, #6e6bd6 100%);
}
/* 16:9 — только плейсхолдер (битая/скрытая картинка, класс ставит blog-post.js);
   живая картинка задаёт рамке собственную высоту — не режем object-fit'ом */
.gfp .img-frame--empty { aspect-ratio: 16 / 9; }
.gfp .img-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.18) 1px, transparent 1px);
  background-size: 22px 22px;
  z-index: 0;
}
.gfp .img-frame img {
  position: relative; /* поверх точечного ::after-паттерна */
  display: block;
  width: 100%;
  height: auto;
  z-index: 1;
}
.gfp figcaption {
  font-family: var(--monof);
  font-size: 11px;
  color: var(--mono);
  letter-spacing: 0.03em;
  margin-top: 12px;
  padding-left: 2px;
  text-align: left;
}
.gfp figcaption::before { content: "// "; }

/* ─────────────  Body grid  ───────────── */
.gfp .body-grid {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 64px;
  align-items: start;
  padding-bottom: 80px;
}
.gfp .body-grid.no-toc { grid-template-columns: minmax(0, 1fr); }

/* ─────────────  TOC  ───────────── */
.gfp .toc {
  position: sticky;
  top: calc(var(--header-h) + 28px);
  align-self: start;
}
/* Длинный TOC (34+ пунктов): список получает собственную область скролла,
   а blog-post.js подкручивает её к активному пункту при scroll-spy. Иначе
   активный раздел уходил за нижнюю границу и был не виден. На мобиле
   (≤900px) TOC статичен — там ограничение по высоте снимается ниже. */
@media (min-width: 901px) {
  .gfp .toc {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - var(--header-h) - 48px);
  }
  .gfp .toc__nav { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
  .gfp .toc__list {
    overflow-y: auto;
    min-height: 0;
    overscroll-behavior: contain;
    scrollbar-width: none;      /* Firefox — скрыть скроллбар */
    -ms-overflow-style: none;   /* старый Edge/IE */
  }
  .gfp .toc__list::-webkit-scrollbar { width: 0; height: 0; display: none; } /* WebKit */
  .gfp .toc-related { flex: 0 0 auto; }
}
.gfp .toc__label {
  font-family: var(--monof);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mono);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.gfp .toc__label::before {
  content: "";
  width: 14px; height: 1px;
  background: var(--border);
}
.gfp .toc__list { list-style: none; margin: 0; padding: 0; }
.gfp .toc__list li { margin: 0; padding: 0; }
.gfp .toc__list li::before { content: none; }
.gfp .toc__list a {
  display: block;
  position: relative;
  padding: 7px 0 7px 16px;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--muted);
  text-decoration: none;
  border-left: 1px solid var(--border);
  transition: color 0.15s, border-color 0.15s;
}
.gfp .toc__list a:hover { color: var(--ink); }
.gfp .toc__list a.active {
  color: var(--ink);
  font-weight: 500;
  border-left-color: transparent;
}
.gfp .toc__list a.active::before {
  content: "";
  position: absolute;
  left: -1px; top: 6px; bottom: 6px;
  width: 2px;
  background: var(--grad);
  border-radius: 2px;
}
.gfp .toc__list a.sub { padding-left: 28px; font-size: 12.5px; }
/* failsafe: JS не отработал → пустой список, прячем лейбл «Содержание» */
.gfp .toc__nav:has(.toc__list:empty) { display: none; }

/* компактные похожие под TOC */
.gfp .toc-related {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px dashed var(--border);
}
.gfp .toc__nav:has(.toc__list:empty) + .toc-related { margin-top: 0; padding-top: 0; border-top: 0; }
.gfp .toc-related .toc__label { margin-bottom: 14px; }
.gfp .toc-related a {
  display: block;
  text-decoration: none;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}
.gfp .toc-related a:last-child { border-bottom: 0; }
.gfp .toc-related .r-cat {
  font-family: var(--monof);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 3px;
}
.gfp .toc-related .r-title {
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--ink);
  font-weight: 500;
  display: block;
}
.gfp .toc-related a:hover .r-title { color: var(--accent); }

/* ─────────────  Content (стандартные блоки редактора)  ───────────── */
.gfp .content {
  max-width: 820px;
  counter-reset: gfph2;
}
.gfp .content h2 {
  font-size: 25.6px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 56px 0 18px;
  scroll-margin-top: calc(var(--header-h) + 24px);
  position: relative;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  text-align: left;
  counter-increment: gfph2;
  counter-reset: gfph3;
}
/* авто-нумерация секций: «01», «02»… (в мокапе .idx вписан руками) */
.gfp .content h2::before {
  content: counter(gfph2, decimal-leading-zero);
  font-family: var(--monof);
  font-size: 12px;
  color: var(--mono);
  letter-spacing: 0.04em;
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}
.gfp .content h3 {
  font-size: 18.9px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.65; /* мокап наследует body 1.65; тема форсит h3{line-height:1.2} */
  margin: 36px 0 14px;
  scroll-margin-top: calc(var(--header-h) + 24px);
  display: flex;
  gap: 10px;
  align-items: baseline;
  text-align: left;
  counter-increment: gfph3;
}
/* вложенный индекс «2.1» */
.gfp .content h3::before {
  content: counter(gfph2) "." counter(gfph3);
  font-family: var(--monof);
  font-size: 12px;
  color: var(--accent);
  flex: none;
  font-weight: 400;
}
.gfp .content p {
  margin: 0 0 18px;
  color: var(--body);
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: normal;
}
.gfp .content .lead {
  font-size: 18.5px;
  line-height: 1.55;
  color: var(--ink);
  font-weight: 400;
}
.gfp .content .lead.first { margin-top: 8px; }

.gfp .content a { color: var(--accent); text-decoration: none; }
.gfp .content a:hover { text-decoration: underline; }

/* Глобальный резет темы гасит b/strong до 400 (болд был только у легаси
   .article__content) → жирные акценты и лейблы-абзацы не жирные. Как в мокапе:
   браузерный дефолт bold. */
.gfp .content strong, .gfp .content b { font-weight: 700; }

.gfp .content ul {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}
.gfp .content ul li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 11px;
  color: var(--body);
  font-size: 16px;
  line-height: 1.65;
}
.gfp .content ul li::before {
  content: "";
  position: absolute;
  left: 2px; top: 11px;
  width: 6px; height: 6px;
  border-radius: var(--radius);
  background: var(--grad);
}
.gfp .content ol {
  margin: 0 0 20px;
  padding-left: 22px;
}
.gfp .content ol li {
  margin-bottom: 11px;
  color: var(--body);
  font-size: 16px;
  line-height: 1.65;
}
.gfp .content ol li::marker {
  font-family: var(--monof);
  font-size: 13px;
  color: var(--accent);
}

.gfp .content figure { margin: 30px 0; }
/* Картинки в теле — плоский стиль мокапа (.img-frame): тонкий бордер и
   скругление на самой картинке, БЕЗ белой карточки/паддинга/тени — карточка
   (.hero-figure) только у hero. Ловим Gutenberg (.wp-block-image) и
   легаси-фигуры старых постов (aligncenter без wp-block-image), кроме таблиц. */
.gfp .content .wp-block-image img,
.gfp .content figure:not(.wp-block-table) img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border-2);
  margin: 0 auto;
}

/* цитата → .note */
.gfp .content blockquote {
  font-size: 14px;
  color: var(--body);
  border-left: 2px solid var(--accent);
  padding: 4px 0 4px 16px;
  margin: 22px 0;
  background: linear-gradient(90deg, rgba(91, 87, 224, 0.04), transparent);
}
.gfp .content blockquote p { margin: 0 0 8px; font-size: 14px; }
.gfp .content blockquote p:last-child { margin-bottom: 0; }
.gfp .content blockquote cite {
  font-family: var(--monof);
  font-size: 11px;
  color: var(--mono);
  font-style: normal;
}

/* Отзыв/цитата спикера — Block Designer block bd/block-93 (.article__quote).
   Глобальный styles.min.css рисует его как «плашку» #8380FF (radius 4rem) со
   светлым текстом 2.4rem; в .gfp-макете (пост/кейс) эти правила не перекрыты, и
   блок выпадает из дизайна. Приводим к языку .gfp: карточка на surface с акцентной
   левой границей, читаемый тёмный текст, автор — моно-лейбл (как cite/таблицы). */
.gfp .content .article__quote {
  position: relative;
  margin: 26px 0;
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius);
  color: var(--body);
  box-shadow: none;
}
.gfp .content .article__quote > p {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  font-style: italic;
}
/* текст цитаты обёрнут в <i>/<em>/<strong>: гасим старые размеры/цвет и
   глобальный *{font-size:1.6rem}, чтобы всё унаследовало настройки абзаца. */
.gfp .content .article__quote :where(i, em, b, strong, a, span, mark) {
  font-size: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  color: inherit;
}
.gfp .content .article__quote strong,
.gfp .content .article__quote b { font-weight: 700; }
/* автор */
.gfp .content .article__quote-author { display: block; margin-top: 16px; }
.gfp .content .article__quote-author-name {
  margin: 0;
  font-family: var(--monof);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.4;
  font-style: normal;
}
.gfp .content .article__quote-author-position {
  margin: 2px 0 0;
  font-family: var(--monof);
  font-size: 11px;
  color: var(--mono);
  line-height: 1.4;
  font-style: normal;
}
/* декоративная «кавычка» была светлой на фиолетовом — на светлой карточке не нужна */
.gfp .content .article__quote .icon-quotes { display: none; }

/* Выноска/определение — Block Designer block bd/block-94 (.article__text-with-bg).
   Тот же старый фиолетовый бокс; в .gfp делаем спокойную инфо-карточку с акцентной
   левой границей и лёгкой заливкой (как встроенный blockquote). */
.gfp .content .article__text-with-bg {
  margin: 24px 0;
  padding: 18px 22px;
  background: rgba(91, 87, 224, 0.05);
  border: 1px solid var(--border-2);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius);
  color: var(--body);
  font-size: 15px;
  line-height: 1.65;
}
.gfp .content .article__text-with-bg .wp-block-group,
.gfp .content .article__text-with-bg .wp-block-group__inner-container { margin: 0; }
.gfp .content .article__text-with-bg p {
  margin: 0 0 10px;
  color: var(--body);
  font-size: 15px;
  line-height: 1.65;
}
.gfp .content .article__text-with-bg p:last-child { margin-bottom: 0; }
.gfp .content .article__text-with-bg :where(i, em, b, strong, a, span, mark) {
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}
.gfp .content .article__text-with-bg strong,
.gfp .content .article__text-with-bg b { color: var(--ink); font-weight: 700; }

/* таблица → стиль .formats (2 колонки: название/описание) */
.gfp .content .wp-block-table,
.gfp .content figure.wp-block-table {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 24px 0;
  background: var(--surface);
  padding: 0;
  box-shadow: none;
}
.gfp .content .wp-block-table table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}
.gfp .content .wp-block-table tr { border-bottom: 1px solid var(--border); }
.gfp .content .wp-block-table tr:last-child { border-bottom: 0; }
.gfp .content .wp-block-table td,
.gfp .content .wp-block-table th {
  padding: 15px 18px;
  border: 0;
  font-size: 14px;
  color: var(--body);
  line-height: 1.5;
  vertical-align: top;
  text-align: left;
}
.gfp .content .wp-block-table td:first-child,
.gfp .content .wp-block-table th {
  font-family: var(--monof);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  width: 168px;
}
.gfp .content .wp-block-table thead th {
  font-family: var(--monof);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--mono);
  width: auto;
}

/* карточки-определения (block pattern «GF: Карточки-определения») */
.gfp .content .defs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px !important;
  margin: 26px 0 24px;
}
.gfp .content .defs .wp-block-column,
.gfp .content .defs .def-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 18px 20px;
  margin: 0;
  flex-basis: auto !important;
}
.gfp .content .defs .def-k {
  font-family: var(--monof);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.gfp .content .defs .def-k::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--grad);
  flex: none;
}
.gfp .content .defs .def-v {
  font-size: 14px;
  line-height: 1.5;
  color: var(--body);
  margin: 0;
}

/* Media & Text: сайт не грузит wp-block-library → у блока нет родной
   grid-раскладки, и картинка разваливается на всю ширину колонки.
   Минимальная раскладка ядра; авторский inline grid-template-columns
   (напр. 25% auto) перекрывает нашу базу. */
.gfp .content .wp-block-media-text {
  display: grid;
  grid-template-columns: 50% 1fr;
  align-items: center;
  gap: 0 24px;
  margin: 30px 0;
}
.gfp .content .wp-block-media-text .wp-block-media-text__media {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
}
.gfp .content .wp-block-media-text .wp-block-media-text__content {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}
.gfp .content .wp-block-media-text.has-media-on-the-right .wp-block-media-text__media { grid-column: 2; }
.gfp .content .wp-block-media-text.has-media-on-the-right .wp-block-media-text__content { grid-column: 1; }
.gfp .content .wp-block-media-text__content p:last-child { margin-bottom: 0; }
@media (max-width: 600px) {
  .gfp .content .wp-block-media-text.is-stacked-on-mobile { grid-template-columns: 100% !important; }
  .gfp .content .wp-block-media-text.is-stacked-on-mobile .wp-block-media-text__media { grid-column: 1; grid-row: 1; }
  .gfp .content .wp-block-media-text.is-stacked-on-mobile .wp-block-media-text__content { grid-column: 1; grid-row: 2; margin-top: 16px; }
}

.gfp .content hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}
.gfp .content code {
  font-family: var(--monof);
  font-size: 0.88em;
  background: rgba(91, 87, 224, 0.06);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
}

/* ─────────────  «Термины из статьи» — мини-словарь (issue #79, вариант B2)  ───────────── */
.gfp .mini-gloss {
  margin-top: 48px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px 26px;
}
.gfp .mini-gloss__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--monof);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.gfp .mini-gloss__label::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--accent);
}
.gfp .mini-gloss__rows { display: flex; flex-direction: column; }
.gfp .mg-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 18px;
  padding: 12px 0;
  border-top: 1px solid var(--border-2);
  text-decoration: none;
  align-items: baseline;
}
.gfp .mg-row:first-child { border-top: 0; }
.gfp .mg-term {
  font-family: var(--monof);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  transition: color 0.15s;
}
.gfp .mg-term::after { content: " ↗"; font-size: 11px; color: #c9c9d4; }
.gfp .mg-row:hover .mg-term,
.gfp .mg-row:hover .mg-term::after { color: var(--accent); }
.gfp .mg-def { font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.gfp .mini-gloss__all {
  display: inline-block;
  margin-top: 14px;
  font-family: var(--monof);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
}
.gfp .mini-gloss__all:hover { text-decoration: underline; }
@media (max-width: 700px) {
  .gfp .mg-row { grid-template-columns: 1fr; gap: 4px; }
}

/* ─────────────  Related  ───────────── */
.gfp .related {
  border-top: 1px solid var(--border);
  padding: 64px 0 24px;
}
.gfp .related__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}
.gfp .related__head h2 {
  font-size: 28.8px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0;
}
.gfp .related__head a {
  font-family: var(--monof);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-decoration: none;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.gfp .related__head a:hover { color: #4a47c9; }

.gfp .related__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.gfp .rcard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.gfp .rcard:hover {
  transform: translateY(-3px);
  border-color: #d9d9e6;
  box-shadow: 0 18px 40px -24px rgba(21, 21, 27, 0.25);
}
.gfp .rcard__thumb {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #6e6bd6, #8380FF);
  position: relative;
  overflow: hidden;
}
.gfp .rcard__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.2) 1px, transparent 1px);
  background-size: 18px 18px;
}
.gfp .rcard__thumb img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
}
.gfp .rcard__body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.gfp .rcard__cat {
  font-family: var(--monof);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
}
.gfp .rcard__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.gfp .rcard__meta {
  margin-top: auto;
  font-family: var(--monof);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.03em;
}

/* ─────────────  CTA  ───────────── */
.gfp .cta {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    radial-gradient(circle, rgba(91, 87, 224, 0.045) 1px, transparent 1px),
    var(--surface);
  background-size: 22px 22px, auto;
  padding: 56px 48px;
  text-align: center;
  margin: 40px 0 90px;
  position: relative;
  overflow: hidden;
}
.gfp .cta::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--grad);
}
.gfp .cta h2 {
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ink);
  max-width: 18ch;
  margin: 0 auto 26px;
  line-height: 1.2;
}
.gfp .cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--grad);
  background-size: 200% 100%;
  border: 0;
  border-radius: var(--radius);
  padding: 14px 28px;
  text-decoration: none;
  cursor: pointer;
  transition: background-position 0.4s ease, box-shadow 0.2s ease, transform 0.15s;
  box-shadow: 0 10px 30px -12px rgba(91, 87, 224, 0.6);
}
.gfp .cta-btn:hover { background-position: 100% 0; transform: translateY(-1px); color: #fff; }
.gfp .cta-btn .arrow { transition: transform 0.18s; }
.gfp .cta-btn:hover .arrow { transform: translateX(3px); }

/* ─────────────  Reveal  ───────────── */
.gfp .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  /* failsafe: если JS не выполнился, контент всё равно проявится */
  animation: gfp-reveal-failsafe 0s 2.2s forwards;
}
.gfp .reveal.in { opacity: 1; transform: none; animation: none; }
@keyframes gfp-reveal-failsafe { to { opacity: 1; transform: none; } }
@media (scripting: none) {
  .gfp .reveal { opacity: 1; transform: none; animation: none; }
}
@media (prefers-reduced-motion: reduce) {
  .gfp .reveal { opacity: 1; transform: none; transition: none; animation: none; }
}

/* ─────────────  Responsive  ───────────── */
@media (max-width: 1180px) {
  .gfp .body-grid { grid-template-columns: 210px minmax(0, 1fr); gap: 44px; }
  .gfp .body-grid.no-toc { grid-template-columns: minmax(0, 1fr); }
  .gfp .related__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .gfp .shell { padding: 0 24px; }
  .gfp .body-grid { grid-template-columns: 1fr; gap: 0; }
  .gfp .toc {
    position: static;
    margin-bottom: 36px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
  }
  .gfp .toc-related { display: none; }
  .gfp .related__grid { grid-template-columns: repeat(2, 1fr); }
  .gfp .content .defs { grid-template-columns: 1fr; }
  .gfp .content .defs .wp-block-column { margin-bottom: 0; }
}
@media (max-width: 560px) {
  .gfp .shell { padding: 0 16px; }
  .gfp .header-band { padding-top: calc(var(--header-h) + 36px); }
  .gfp h1.post-title { font-size: clamp(27px, 7vw, 32px); }
  .gfp .related__grid { grid-template-columns: 1fr; }
  .gfp .content .wp-block-table td:first-child { width: auto; display: block; padding-bottom: 0; }
  .gfp .content .wp-block-table td { display: block; }
  .gfp .cta { padding: 40px 22px; }
  .gfp .hero-figure { padding: 6px; }
}

/* Gutenberg columns (defs) — мобайл-стек без внешних отступов */
@media (max-width: 781px) {
  .gfp .content .defs.wp-block-columns { gap: 14px !important; }
}


/* header/footer canon block omitted for gravityads (blog uses its own header) */
