/* Публичный сайт платформы (bclub.kz). Палитра — из бренд-пакета (tokens.css), общая с кабинетом:
   блок токенов :root ниже совпадает с internal/app/webtpl/kabinet.css один в один
   (проверяет тест TestWebCSSTokensMatchSite). Без JS: меню — обычный перенос ссылок.
   Шрифт: Onest с нашего сервера (site/fonts, /fonts/onest.css в <head> каждой страницы; лицензия OFL).
   Знак в шапке — инлайн-SVG: места красятся --accent, горячее место — --warm (только в знаке).
   Сайт всегда светлый (раздел в конце файла).
   Классы с префиксом .g- — широкая раскладка: главная, страницы форматов встреч, цели, о платформе. */

/* --- Токены (общие с кабинетом) ---------------------------------------------- */
:root {
  --bg: #faf8f4;
  --fg: #1f1d1a;
  --muted: #6b665e;
  --accent: #2f6f5e;
  --card: #ffffff;
  --line: #e4dfd6;
  --ok: #2f6f5e;
  --warn: #946010;
  --danger: #b3442f;
  --warm: #cf6f38;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161513;
    --fg: #ece8e1;
    --muted: #a39d93;
    --accent: #7cc4ad;
    --card: #1f1e1b;
    --line: #34322e;
    --ok: #7cc4ad;
    --warn: #e0b05c;
    --danger: #e0725c;
    --warm: #cf6f38;
  }
}
/* --- Конец токенов --------------------------------------------------------- */

/* --- Основа ----------------------------------------------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.55 "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
h1, h2, .brand { font-family: "PT Serif", Georgia, "Times New Roman", serif; }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
h1 { margin: 0 0 16px; font-size: 2.2rem; line-height: 1.15; letter-spacing: -0.01em; }
h2 { margin: 36px 0 12px; font-size: 1.5rem; line-height: 1.25; }
h3 { margin: 24px 0 8px; font-size: 1.1rem; line-height: 1.3; }
/* Слово длиннее строки переносится, а не раздвигает страницу: в казахской версии (site/kk) такие слова есть
   в заголовках — на телефоне 320 px «ұйымдастырушыларға» давало полосу прокрутки вбок. */
h1, h2, h3 { overflow-wrap: break-word; }
h2:first-child, h3:first-child { margin-top: 0; }
p, ul, ol, dl { margin: 0 0 14px; }
ul, ol { padding-left: 1.3em; }
li { margin: 0 0 6px; }
dt { font-weight: 600; margin-top: 14px; }
dd { margin: 4px 0 0; }
blockquote {
  margin: 0 0 14px;
  padding: 12px 16px;
  border-left: 4px solid var(--accent);
  background: var(--card);
  border-radius: 0 8px 8px 0;
}
blockquote p:last-child { margin-bottom: 0; }
code {
  font-family: ui-monospace, Consolas, "Courier New", monospace;
  font-size: 0.95em;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 4px;
}
img { max-width: 100%; height: auto; }
hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.lead { font-size: 1.15rem; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

/* --- Ссылка «К содержанию»: видна только при фокусе с клавиатуры --------------- */
.skip { position: absolute; left: 16px; top: -100px; z-index: 1; padding: 8px 12px; background: var(--card); color: var(--accent); border: 1px solid var(--line); border-radius: 8px; }
.skip:focus { top: 8px; }

/* --- Пиксель Яндекс Метрики в <noscript>: за краем экрана классом, а не style= (CSP, internal/app/pub_ym.go) --- */
.ym-px { position: absolute; left: -9999px; }

/* --- Шапка и меню: бренд, разделы, «Бот», «Кабинет», кнопка «Афиша встреч» -------- */
.wrap {
  width: 100%;
  max-width: 1232px;
  margin: 0 auto;
  padding: 0 16px;
}
.top {
  border-bottom: 1px solid var(--line);
  background: var(--card);
}
.top-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 20px;
  min-height: 64px;
  padding-top: 6px;
  padding-bottom: 6px;
}
.brand {
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--fg);
  text-decoration: none;
  padding: 8px 0;
  margin-right: 8px;
}
.kabinet {
  margin-left: auto;
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
  padding: 10px 4px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.kabinet:hover { color: var(--accent); text-decoration: underline; }
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 2px;
  order: 0;
}
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 7px;
  color: var(--fg);
  font-size: 0.95rem;
  text-decoration: none;
  border-bottom: 3px solid transparent;
}
.nav a:hover { color: var(--accent); }
.nav a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
/* Уже ~1240 px меню из девяти пунктов не помещается в строку с брендом и кнопкой — уходит отдельной строкой ниже
   (от 641 px пункты плотнее, поля 6 px — раздел «Шапка: «Клубы», «Бот», «Кабинет» и «Афиша встреч»» ниже;
   отрицательный отступ ставит текст первого пункта вровень со знаком бренда). */
@media (max-width: 1239px) {
  .nav { order: 3; flex-basis: 100%; margin: 0 -6px; padding-bottom: 4px; }
}

/* --- Страница --------------------------------------------------------------- */
.page {
  flex: 1;
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding: 28px 16px 40px;
}
.hero { padding: 8px 0 12px; }
.hero h1 { font-size: 2.3rem; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  margin: 0 0 16px;
}
.card h2, .card h3 { margin-top: 0; }
.card p:last-child, .card ul:last-child, .card ol:last-child { margin-bottom: 0; }
.cards { display: grid; gap: 14px; margin: 0 0 20px; }
.cards .card { margin: 0; }
.step {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.note {
  border-left: 4px solid var(--warn);
  background: var(--card);
  border-radius: 0 8px 8px 0;
  padding: 10px 14px;
  margin: 0 0 14px;
}
.note p:last-child { margin-bottom: 0; }
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 14px 44px;
  margin: 0;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.figure { margin: 0 0 20px; text-align: center; }
.figure img {
  display: block;
  margin: 0 auto;
  width: 100%;
  max-width: 30rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.figure figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 8px; }

/* --- Кнопка-призыв ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: 44px;
  padding: 12px 22px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--fg);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
}
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.cta { margin: 20px 0 8px; }
.cta .btn { margin-right: 8px; margin-bottom: 8px; }
.cta-hint { color: var(--muted); font-size: 0.9rem; }

/* --- Таблицы (сферы, календарь) -------------------------------------------- */
table { width: 100%; border-collapse: collapse; margin: 0 0 20px; }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 0.9rem; }
td:first-child, th:first-child { padding-left: 0; }
td:last-child, th:last-child { padding-right: 0; }
.dot {
  display: inline-block;
  width: 0.85em;
  height: 0.85em;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: -0.05em;
  background: var(--sphere, var(--muted));
}
.sphere-name { font-weight: 600; }
/* Цвета сфер — как в internal/wheel/spheres.go (там же названия и описания). */
.s-health  { --sphere: #d06359; }
.s-career  { --sphere: #dca744; }
.s-finance { --sphere: #48823b; }
.s-family  { --sphere: #e281ad; }
.s-friends { --sphere: #1775ae; }
.s-growth  { --sphere: #683b92; }
.s-rest    { --sphere: #42b2ae; }
.s-meaning { --sphere: #844b07; }

/* --- Подвал ----------------------------------------------------------------- */
.foot {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 28px 0 32px;
  border-top: 1px solid var(--line);
}
.foot-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr); gap: 16px 48px; }
.foot p { margin: 0 0 6px; }
.foot a { color: var(--muted); }
.foot-name { color: var(--fg); font-weight: 700; }
/* Переключатель языка в подвале: «Қазақша» на русских страницах, «Русский» на казахских (site/kk, i18n/make_kk.py) */
.foot .foot-lang a { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); font-weight: 600; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0 20px; padding: 0; margin: 0; list-style: none; }
.foot-links li { margin: 0; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0; }
@media (max-width: 900px) {
  .foot-row { grid-template-columns: minmax(0, 1fr); }
}

/* --- Телефон ---------------------------------------------------------------- */
@media (max-width: 640px) {
  h1 { font-size: 1.8rem; }
  .hero h1 { font-size: 1.85rem; }
  .btn { width: 100%; }
  .cta .btn { margin-right: 0; }
  /* Шапка на телефоне: бренд, «Кабинет» и кнопка «Афиша встреч» помещаются в строку */
  .top-row { gap: 0 12px; }
  .brand { font-size: 1.15rem; margin-right: 0; }
  .btn.top-afisha { width: auto; padding: 8px 12px; font-size: 0.85rem; }
  /* Таблицы сфер и календаря на телефоне — карточками, подписи из data-label */
  table.cards, table.cards tbody, table.cards tr, table.cards td { display: block; }
  table.cards thead { display: none; }
  table.cards tr {
    border: 1px solid var(--line);
    border-radius: 10px;
    margin: 0 0 10px;
    padding: 8px 12px;
    background: var(--card);
  }
  table.cards td { border: 0; padding: 4px 0; }
  table.cards td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); }
}
@media (min-width: 641px) {
  .cards.two { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 760px) {
  .cards.three { grid-template-columns: repeat(3, 1fr); }
}

/* --- Широкая раскладка (.g-): главная, форматы встреч, цели, о платформе -------------- */
.g-page {
  flex: 1;
  width: 100%;
  max-width: 1232px;
  margin: 0 auto;
  padding: 0 16px 40px;
}
.g-page h1 { margin: 0; font-size: 3.2rem; line-height: 1.1; }
.g-page h2 { margin: 0; font-size: 1.9rem; line-height: 1.2; }
.g-page h3 { margin: 0; font-size: 1.15rem; line-height: 1.3; }
.g-page p { margin: 0; }
.g-sec { display: flex; flex-direction: column; gap: 20px; padding: 32px 0; }
.g-sec-top { padding-top: 56px; }
.g-sec-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; }
.g-lead { font-size: 1.2rem; line-height: 1.5; max-width: 52rem; }
.g-note { color: var(--muted); font-size: 0.9rem; }
.g-crumbs { color: var(--muted); font-size: 0.9rem; }
.g-crumbs a { display: inline-block; padding: 10px 0; }
.g-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Первый экран: текст и картинка колеса; .g-split — основной текст и боковая карточка */
.g-hero { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 56px; align-items: center; padding: 64px 0 40px; }
.g-hero-text { display: flex; flex-direction: column; gap: 20px; }
.g-hero-img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.g-split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; align-items: start; }
.g-split-main { display: flex; flex-direction: column; gap: 16px; }
.g-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }

/* Сетки карточек: на iPad и телефоне — одна колонка */
.g-grid { display: grid; gap: 20px; }
.g-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }

/* Карточки */
.g-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--fg);
  text-decoration: none;
}
a.g-card:hover, a.g-tile:hover { border-color: var(--accent); }
.g-card-title { font-size: 1.2rem; font-weight: 600; }
.g-page .g-card-title { font-family: "Golos Text", system-ui, sans-serif; font-size: 1.2rem; line-height: 1.3; }
.g-card-big { font-family: "PT Serif", Georgia, serif; font-size: 1.6rem; font-weight: 700; line-height: 1.2; }
.g-meta { color: var(--muted); font-size: 0.9rem; }
.g-more { font-weight: 600; color: var(--accent); }
.g-sphere-card { border-color: var(--sphere); }
.g-card-flat { padding: 0; gap: 0; }

/* Метки и цвет сферы (цвет — из класса .s-<ключ>, переменная --sphere) */
.g-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--fg);
  font-size: 0.8rem;
  line-height: 1.4;
}
.g-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.g-dot { display: inline-block; flex-shrink: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--sphere, var(--muted)); }
.g-tile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 120px;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--fg);
  text-decoration: none;
}
.g-tile-bar { height: 6px; border-radius: 3px; background: var(--sphere, var(--muted)); margin-bottom: 4px; }
.g-tile-name { font-weight: 600; }
.g-tile-skill { color: var(--muted); font-size: 0.9rem; }
.g-sphere-top { border-top: 8px solid var(--sphere, var(--accent)); }

/* Шаги (путь на платформе, запись на встречу) и номера в карточках */
.g-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 0; margin: 0; list-style: none; }
.g-steps li { margin: 0; padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.g-step-num { display: block; color: var(--muted); font-size: 0.9rem; font-weight: 500; margin-bottom: 6px; }
.g-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}
.g-list { margin: 0; padding-left: 1.2em; }
.g-list li { margin: 0 0 6px; }

/* Акцентная плашка с призывом и светлая панель */
.g-band {
  display: flex;
  align-items: center;
  gap: 32px;
  margin: 32px 0;
  padding: 36px 40px;
  border-radius: 16px;
  background: var(--accent);
  color: #fff;
}
.g-band-text { flex: 1; display: flex; flex-direction: column; gap: 8px; font-size: 1.1rem; line-height: 1.5; }
.g-page .g-band h2 { color: inherit; }
.g-band .btn { background: var(--card); border-color: var(--card); color: var(--fg); flex-shrink: 0; }
.g-panel { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin: 32px 0; padding: 28px 32px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.g-panel-text { flex: 1 1 20rem; display: flex; flex-direction: column; gap: 6px; }

/* Программа по неделям — сейчас на страницах нет, пригодится шаблонам цели (они в планах) */
.g-wk { display: grid; grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1.3fr); gap: 24px; align-items: start; padding: 20px 24px; border-top: 1px solid var(--line); }
.g-wk:first-child { border-top: 0; }
.g-ph { color: var(--muted); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.g-test { display: inline-block; margin-top: 8px; padding: 2px 8px; border: 1px solid var(--danger); border-radius: 6px; color: var(--danger); font-size: 0.8rem; font-weight: 600; }
.g-wk-name { display: block; font-weight: 600; margin-bottom: 4px; }
.g-tip { font-size: 0.95rem; font-style: italic; }
.g-list-plain { margin: 0; padding: 0; list-style: none; }
.g-ex { display: flex; justify-content: space-between; gap: 12px; margin: 0; padding: 6px 0; font-size: 0.95rem; }
.g-ex-dose { color: var(--muted); white-space: nowrap; }

/* Афиша и событие — сейчас на страницах нет, пригодится афише на сайте */
.g-page h2.g-day { font-size: 1.5rem; }
.g-ev {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) 200px;
  gap: 24px;
  align-items: center;
  padding: 20px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--fg);
  text-decoration: none;
}
a.g-ev:hover { border-color: var(--accent); }
.g-ev-main, .g-ev-side { display: flex; flex-direction: column; gap: 6px; }
.g-ev-side { align-items: flex-end; }
.g-ev-title { font-size: 1.25rem; font-weight: 600; }
.g-facts { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 24px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.g-facts div { display: flex; gap: 12px; }
.g-facts dt { width: 140px; flex-shrink: 0; margin: 0; color: var(--muted); font-weight: 500; }
.g-facts dd { margin: 0; }
.g-text { display: flex; flex-direction: column; gap: 12px; font-size: 1.1rem; line-height: 1.55; }

/* Ссылки на внешние источники (кнопки в ряд) — сейчас на страницах нет */
.g-sources { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.g-sources .btn { min-height: 44px; padding: 8px 14px; font-size: 0.9rem; font-weight: 500; }

/* iPad в альбомной ориентации: четыре колонки — в две */
@media (max-width: 1100px) {
  .g-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* iPad и телефон: всё в одну колонку */
@media (max-width: 900px) {
  .g-page h1 { font-size: 2.3rem; }
  .g-page h2 { font-size: 1.6rem; }
  .g-sec-top { padding-top: 32px; }
  .g-hero { grid-template-columns: minmax(0, 1fr); gap: 32px; padding: 32px 0 24px; }
  .g-hero-img { max-width: 440px; }
  .g-split, .g-pair, .g-cols-2, .g-cols-3, .g-cols-4, .g-steps, .g-wk, .g-ev { grid-template-columns: minmax(0, 1fr); }
  .g-split, .g-wk { gap: 12px; }
  .g-ev { gap: 10px; }
  .g-ev-side { align-items: flex-start; }
  .g-band { flex-direction: column; align-items: flex-start; padding: 28px 20px; }
}
@media (max-width: 640px) {
  .g-page h1 { font-size: 2rem; }
  .g-actions .btn, .g-band .btn, .g-panel .btn { width: 100%; }
  .g-ex { flex-direction: column; gap: 0; }
  .g-ex-dose { white-space: normal; }
  .g-facts div { flex-direction: column; gap: 2px; }
  .g-facts dt { width: auto; }
  .g-panel { padding: 20px; }
}

/* --- Печать ----------------------------------------------------------------- */
@media print {
  .nav, .kabinet, .btn, .foot-links, .g-actions, .g-sources { display: none; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .top { border: 0; background: none; }
  .card, blockquote, .note, .g-card, .g-tile, .g-ev, .g-panel { border-color: #999; background: none; color: #000; }
  .g-band { background: none; color: #000; border: 1px solid #999; }
  a { color: #000; text-decoration: underline; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; color: #555; }
}

/* --- Современный светлый вид (30.09.2026) ------------------------------------
   Сайт всегда светлый: светлая палитра задана на body и перекрывает тёмные токены :root
   (кабинет по-прежнему следует теме устройства). Один шрифт Onest, карточки с мягкой тенью
   вместо рамок, кнопки-капсулы, мятная подложка первого экрана. */
body {
  --bg: #faf8f4; --fg: #1f1d1a; --muted: #6b665e; --accent: #2f6f5e; --card: #ffffff;
  --line: #e4dfd6; --ok: #2f6f5e; --warn: #946010; --danger: #b3442f; --warm: #cf6f38;
  --mint: #e5efea; --chip: #f3f0e9;
  --shadow: 0 1px 2px rgba(31, 29, 26, 0.04), 0 8px 24px rgba(31, 29, 26, 0.06);
  --shadow-hover: 0 2px 4px rgba(31, 29, 26, 0.06), 0 14px 32px rgba(31, 29, 26, 0.10);
  color-scheme: light;
  font-family: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--fg);
}
h1, h2, h3, .brand, .g-card-big, .g-page .g-card-title {
  font-family: "Onest", system-ui, sans-serif;
  letter-spacing: -0.02em;
}
h1, .g-page h1 { font-weight: 800; }
h2, .g-page h2 { font-weight: 700; }
.brand { font-weight: 700; color: var(--fg); display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 30px; height: 30px; flex: none; color: var(--accent); }
.brand-hot { fill: var(--warm); }

/* Шапка: белая, без рамки, тонкая тень; текущий раздел — мятная капсула */
.top { background: rgba(255, 255, 255, 0.92); border-bottom: 0; box-shadow: 0 1px 0 var(--line); }
.nav { gap: 2px 4px; }
.nav a { border-bottom: 0; border-radius: 999px; padding: 8px 12px; }
.nav a:hover { background: var(--chip); color: var(--fg); }
.nav a[aria-current="page"] { background: var(--mint); color: var(--accent); }

/* Кнопки-капсулы */
.btn { border-radius: 999px; border-color: transparent; background: var(--chip); color: var(--fg); transition: background .15s, transform .15s; }
.btn:hover { background: #ebe6dc; }
.btn-primary, .btn.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #255a4c; filter: none; }

/* Карточки: белые, скругление 20 px, мягкая тень, без рамки */
.card, .g-card, .g-tile, .g-steps li, .g-ev, .g-facts, .g-panel, .figure img, table.cards tr {
  border-color: transparent;
  border-radius: 20px;
  box-shadow: var(--shadow);
}
a.g-card, a.g-tile, a.g-ev { transition: box-shadow .15s, transform .15s; }
a.g-card:hover, a.g-tile:hover, a.g-ev:hover { border-color: transparent; box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.g-sphere-card { border: 2px solid var(--sphere); }
.g-tile { min-height: 132px; padding: 20px; }
.g-tile-bar { height: 8px; border-radius: 999px; width: 48px; }
.g-chip { background: var(--chip); border-color: transparent; }
.g-card-flat { overflow: hidden; }

/* Первый экран — на мятной подложке */
.g-hero {
  margin-top: 24px;
  padding: 56px;
  border-radius: 32px;
  background: var(--mint);
}
.g-hero-img { border: 0; border-radius: 24px; box-shadow: var(--shadow); }
.g-page h1 { font-size: 3.4rem; line-height: 1.05; }

/* Плашка-призыв и номера шагов */
.g-band { border-radius: 28px; }
.g-band .btn { background: #fff; color: var(--accent); }
.g-num { border-radius: 14px; }
.g-sphere-top { border-top: 0; box-shadow: inset 0 8px 0 var(--sphere, var(--accent)); border-radius: 0 0 24px 24px; }
.note, blockquote { border-radius: 0 16px 16px 0; }
.foot { border-top: 0; background: #fff; box-shadow: 0 -1px 0 var(--line); }

@media (max-width: 900px) {
  .g-hero { padding: 28px 20px; border-radius: 24px; }
  .g-page h1 { font-size: 2.4rem; }
}
@media (max-width: 640px) {
  .g-page h1 { font-size: 2rem; }
}

/* Разделы главной просторнее: после первого экрана на весь экран плотный шаг 32 px выглядел бы тесно */
@media (min-width: 901px) {
  .g-page:has(.g-hero-home) > .g-sec { padding: 44px 0; }
  .g-page:has(.g-hero-home) > .g-band { margin: 44px 0; }
}

/* --- Концепция (01.10.2026): форматы встреч, цели, тест ------------------
   .g-chip-later — метка «в планах» у того, чего ещё нет (выезды, часть инструментов для целей);
   «Подробнее →» прижат к низу карточки, чтобы в ряду карточек разной высоты ссылки стояли на одной линии. */
.g-chip-later { background: #fdf0d9; color: #7a4a05; } /* на мятном фоне акцентный цвет даёт контраст ниже 4,5:1 */
.g-card > .g-more { margin-top: auto; }
/* Сводка фактов в узкой колонке сбоку от текста (.g-split на страницах форматов): подпись над значением. */
.g-split > .g-facts { gap: 14px; }
.g-split > .g-facts div { flex-direction: column; gap: 2px; }
.g-split > .g-facts dt { width: auto; font-size: 0.9rem; }

/* Шапка на телефоне: пункты меню плотнее (меню — строка с прокруткой вбок, раздел «Телефон: календарь первым»
   в конце файла). Бренд, «Кабинет» и кнопка «Афиша встреч» в одной строке на узком телефоне — раздел «Шапка
   на узком телефоне» в самом конце файла. */
@media (max-width: 640px) {
  .nav { gap: 2px; }
  .nav a { padding: 8px 7px; font-size: 0.9rem; }
}

/* --- Главная плитками (02.10.2026) ----------------------------------------------
   Первый экран со знаком, календарь встреч (раздел «Календарь встреч на главной» в конце файла). Форматы встреч,
   «Между встречами» и путь на платформе с 08.10.2026 — в блоке «Пиктограммы и блоки главной по макету» ниже. Календарь
   между <!-- afisha:start --> и <!-- afisha:end --> подставляет бот (internal/app/pub_home.go,
   sitetpl/home_afisha.html); в статике там панель .g-cal-none со ссылкой на афишу.
   Плитки в ряду — одной высоты (сетка тянет их по самой высокой), подписи и кнопки прижаты к низу; на телефоне —
   один столбец. */
/* --- Первый экран — история на весь экран (решение владельца 12.10.2026) -------------------------
   Секция .g-hero-home.g-story: внутри сцена .g-story-stage с настоящим текстом первого экрана (.g-hero-text: h1,
   подзаголовок, кнопки) и сценами истории; и блок, и /story.css собирает brand/tools/make_story.py.
   Здесь — вид без истории (нет story.css, просьба уменьшить движение, окно ниже 540 px, старый браузер): сцены
   и якоря глав скрыты, сцена — мятная карточка с текстом, как прежний первый экран. С историей story.css делает
   секцию высокой, а сцену — закреплённой под шапкой во весь экран. Шапка на главной закреплена (от 641 px):
   --gs-head — её высота по ширинам (замер Chrome со шрифтом Onest 12.10.2026: 64,9 px от 1240; 112,9 на 768–1239;
   160,9 на 641–767 — меню там в две строки), на 2 px меньше, чтобы сцена подходила под шапку без щели; на телефоне
   шапка не закреплена (две её строки съели бы шестую часть экрана), --gs-head: 0. Разделы под закреплённой шапкой
   получают отступ прокрутки, чтобы якоря (#kalendar, #posle-istorii, панели дня) не прятались под ней. */
.g-story-scenes, .gs-a { display: none; }
.g-hero-home { margin-top: 24px; }
.g-hero-home .g-story-stage { padding: 56px; border-radius: 32px; background: var(--mint); }
.g-hero-home .g-hero-text { display: flex; flex-direction: column; gap: 20px; max-width: 52rem; }
body:has(.g-hero-home) { --gs-head: 63px; }
@media (max-width: 1239px) { body:has(.g-hero-home) { --gs-head: 111px; } }
@media (max-width: 767px) { body:has(.g-hero-home) { --gs-head: 159px; } }
@media (max-width: 640px) { body:has(.g-hero-home) { --gs-head: 0px; } }
@media (min-width: 641px) {
  body:has(.g-hero-home) .top { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, 0.86); -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px); }
}
body:has(.g-hero-home) .g-sec { scroll-margin-top: calc(var(--gs-head, 0px) + 12px); }

/* «Ближайшие встречи» — блок сразу после первого экрана (его ставит бот, sitetpl/home_next.html): до трёх встреч
   плитками в ряд, каждая — ссылка целиком: пиктограмма 20 px по виду встречи, название, «день · время · место или
   Онлайн»; справа в заголовке — «Вся афиша». Строки «Ближайшие встречи» под календарём при этом скрыты — это те
   же встречи. На телефоне плитки одна под другой. */
.g-next .g-sec-head { justify-content: space-between; }
.g-next-all { margin: 0; font-size: 1rem; font-weight: 600; }
.g-next-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.g-next-row { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 14px; align-items: start; height: 100%; padding: 20px 22px; background: var(--card); border-radius: 20px; box-shadow: var(--shadow); color: var(--fg); text-decoration: none; transition: box-shadow .15s, transform .15s; }
.g-next-row:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.g-next-row .g-pic { margin-top: 3px; }
.g-next-t b { display: block; font-size: 1.1rem; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; }
.g-next-t span { display: block; margin-top: 6px; font-size: 0.9rem; line-height: 1.4; color: var(--muted); }
.g-page:has(.g-next) .g-cal-soon { display: none; }
@media (max-width: 720px) {
  .g-next-list { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}

/* Поля широкого экрана: страница лежит внутри круга знака — по краям окна видны две его дуги, одна ближе,
   другая дальше. Ни заливок, ни фигур: радиусы подобраны так, чтобы дуги шли между колонкой (1200 px) и краем
   окна на всех ширинах от 1600 до 3440. Слой лежит под содержимым (z-index: -1 поверх фона страницы), нажатия
   сквозь него. (До 09.10.2026 здесь были два мятных круга 806 px — владелец: «шары выглядят странно».) */
.g-field { display: none; }
@media (min-width: 1600px) {
  .g-field { display: block; position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
  .g-field i { position: absolute; left: 50%; top: 50%; border: 1.5px solid var(--line); border-radius: 50%; }
  .g-field-near { width: 1520px; height: 1520px; margin: -760px 0 0 -760px; }
  .g-field-far { width: 1760px; height: 1760px; margin: -880px 0 0 -880px; }
  .g-field .g-field-far { border-color: color-mix(in srgb, var(--line) 55%, transparent); } /* весомее сокращённого border у .g-field i */
}

/* Запасная панель на месте календаря в статической главной (бот недоступен): текст и кнопка «Открыть афишу» */
.g-cal-none { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; padding: 24px 28px; background: var(--card); border-radius: 20px; box-shadow: var(--shadow); }
.g-cal-none > p:first-child { flex: 1 1 18rem; font-size: 1.1rem; }

/* Форматы: 3 плитки в первом ряду и 2 во втором; ритм — мятная метка внизу плитки */

/* Между встречами: цели и вступление слева, тест с примером колеса — плитка на два ряда справа */

/* Путь на платформе: шесть маленьких плиток с номером шага */
@media (max-width: 900px) {
  .g-hero-home .g-story-stage { padding: 28px 20px; border-radius: 24px; }
}
@media (max-width: 640px) {
  .g-cal-none { padding: 20px; }
}

/* --- Шапка: «Клубы» в меню, «Бот», «Кабинет» и кнопка «Афиша встреч» (02.10–03.10.2026) ------------
   Главная кнопка шапки — «Афиша встреч» (.btn-primary.top-afisha), бот — текстовой ссылкой «Бот» (.kabinet.top-bot,
   t.me/bclubkz_bot?start=pilot): решение основателя 03.10.2026. «Бот» и «Кабинет» стоят рядом справа перед кнопкой
   (авто-отступ только у первой ссылки; на телефоне «Бота» в шапке нет — раздел «Телефон: календарь первым»).
   Подпись «Telegram-бот» шире «Бота» на 66 px и от 1240 px не помещается: кнопка уходит во вторую строку даже на
   1300 px. «Клубы» (каталог /kluby/) — первый пункт меню: на телефоне меню — строка с прокруткой вбок, и первый
   пункт виден сразу, а справа в строке с брендом места нет. От 641 px пункты и промежутки меню плотнее (поля 6 px
   вместо 12). От 1240 px меню из девяти пунктов стоит в одной строке с брендом, и кнопка «Афиша встреч» остаётся
   в той же строке: при 1240 px с полосой прокрутки запас 30–33 px (30 — на странице с выделенными «Мастермайндами»;
   с «Афишей», «Кабинетом» и кнопкой «Открыть бота» было 13–16), со шрифтом системы вместо Onest — 66 px
   (это без переключателя языка; с ним и с плотной правой частью — ниже).
   На 641–1239 px меню — своей строкой под брендом: с прежними полями на 730–899 px «О платформе» один уходил во
   вторую строку меню, плотное меню помещается в одну строку от 768 px (запас на «Мастермайндах» — 36 px, с полосой
   прокрутки — 21), а уже — снова «8 + 1», поэтому на 641–767 px меню стоит двумя ровными строками, 5 + 4: невидимый
   ::before во всю ширину встаёт после пятого пункта (order). Снимки headless Chrome 03.10.2026: 641, 768, 900, 1024,
   1239, 1240 и 1280 px. */
.top-bot + .kabinet { margin-left: 0; }
/* Переключатель языка (09.10.2026, просьба владельца: в шапке, аккуратно и почти незаметно, и на телефоне тоже).
   Ссылка .kabinet.top-lang между «Кабинетом» и кнопкой: на русской странице «ҚАЗ» ведёт на казахского двойника
   этой же страницы (/kk/…), на двойнике «РУС» — обратно; у страниц бота двойников пока нет, «ҚАЗ» ведёт на /kk/.
   Мелкий приглушённый текст (0,75rem, цвет как у «Бота» и «Кабинета»); полное название языка — в aria-label
   («Қазақша», «Русский») и в подвале (.foot-lang). От 641 px стоит в строке бренда. В одной строке с меню (от
   1240 px) колонка шапки не шире 1200 px, и прежнего запаса 28–31 px переключателю (26 px и промежуток) не хватало
   при любой ширине окна — сдвиг порога 1240 px места не даёт. Место нашлось справа: промежутки строки 10 px вместо
   12, поля «Бота» и «Кабинета» 2 px вместо 4 (правило от 1240 px ниже). Запас в строке со шрифтом Onest (Chromium,
   Safari и Firefox сходятся до 0,1 px): окно 1240 px с полосой прокрутки — 8–11 px, от 1249 px — 17–20; в казахской
   шапке — 73 и 82. На телефоне (до 640 px) в строке бренда места нет (запас 6–48 px): переключатель стоит справа
   в строке меню — раздел «Телефон: календарь первым, компактная шапка». */
.kabinet.top-lang { margin-left: 0; padding-right: 0; padding-left: 0; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; }
@media (min-width: 641px) {
  .nav { gap: 2px; }
  .nav a { padding: 8px 6px; }
}
@media (min-width: 641px) and (max-width: 767px) {
  .nav::before { content: ""; order: 1; flex-basis: 100%; }
  .nav a:nth-child(n+6) { order: 2; }
}
@media (min-width: 1240px) {
  .top-row { gap: 0 10px; }
  .brand { margin-right: 0; }
  .kabinet { padding-right: 2px; padding-left: 2px; }
}

/* --- Имя «Платформа для развития» в шапке (02.10.2026) ------------------------
   В две строки, как основной локап бренд-пакета: в одну строку от 1240 px шапка не помещается вместе с меню,
   «Ботом», «Кабинетом» и кнопкой «Афиша встреч», а на телефоне кнопка уезжала бы во вторую строку (узкий
   телефон — раздел «Шапка на узком телефоне» в конце файла). */
.brand-name { font-size: 1.1rem; line-height: 1.05; }
.brand-name span { display: block; }

/* --- Календарь встреч на главной (02.10.2026) -------------------------------------
   Просьба основателя: «видеть сначала календарь, чтобы при наведении были события». Бот подставляет его между
   <!-- afisha:start --> и <!-- afisha:end --> (internal/app/pub_home.go, sitetpl/home_afisha.html): месяц таблицей
   с понедельника (.g-cal-grid), у дня со встречами (.g-cal-has) — точки по числу встреч, под сеткой — панели дней
   (.g-cal-panel) и ближайшие встречи строками (.g-cal-rows). Всё без JS. День со встречами — ссылка .g-cal-a на
   якорь своей панели: касание, клик и Enter открывают панель (:target) в потоке страницы — она раздвигает
   содержимое и ничего не перекрывает; «Свернуть» ведёт к #kalendar, и панель снова скрыта. Всплывающая карточка
   дня (.g-cal-card) — только с мышью и от 641 px, (hover: hover) and (pointer: fine): на телефоне и iPad её нет
   совсем, и «залипший» после касания :hover ничего не открывает и не накладывается. Карточка — под своей клеткой,
   в двух последних колонках (до 900 px — в трёх) прижата вправо, чтобы не выйти за экран; зазор между клеткой
   и карточкой перекрыт невидимым «мостиком» ::before — по дороге к карточке мышь не теряет наведение. Шапка сайта
   не липкая. */
.g-cal {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 24px;
  background: var(--card);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.g-cal-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.g-page .g-cal-month { font-size: 1.35rem; font-weight: 700; }
.g-cal-navs { display: flex; flex-wrap: wrap; gap: 8px; }
.g-cal-nav, .g-cal-close {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--fg);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}
.g-cal-nav:hover, .g-cal-close:hover { background: var(--mint); color: var(--accent); }

/* Направление над календарём (?sfera=, как в афише): «Все» и восемь капсул с цветной точкой сферы (.g-dot .s-<ключ>),
   выбранная — мятная; под рядом — строка про общие встречи. На телефоне капсулы — одной строкой с прокруткой вбок,
   как меню шапки: ряд выходит к краям экрана, а сама страница вбок не прокручивается. */
.g-cal-filter { display: flex; align-items: flex-start; gap: 6px 16px; }
.g-cal-filter-name { flex: none; padding-top: 9px; color: var(--muted); font-size: 0.9rem; font-weight: 500; }
.g-cal-spheres { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; margin: 0; padding: 0; list-style: none; }
.g-cal-spheres li { flex: none; margin: 0; }
.g-cal-sph {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--fg);
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
}
.g-cal-sph:hover { background: #e3ebe8; }
.g-cal-sph[aria-current="page"] { background: var(--mint); color: var(--accent); font-weight: 600; }
.g-cal-note { color: var(--muted); font-size: 0.9rem; }
.g-cal-nosph { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }

/* Сетка: равные колонки, клетки — скруглённые плитки через 6 px (border-spacing, поля таблицы съедает
   отрицательный отступ). Дни соседних месяцев — пустые клетки без плитки; прошедшие дни — без плитки, число
   серым; сегодня — акцентная рамка. */
.g-cal-grid { width: calc(100% + 12px); margin: -6px -6px 0; table-layout: fixed; border-collapse: separate; border-spacing: 6px; }
.g-cal-grid th { padding: 4px 10px 0; border: 0; color: var(--muted); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em; text-align: left; text-transform: uppercase; }
.g-cal-grid abbr { text-decoration: none; }
.g-cal-grid td { position: relative; height: 76px; padding: 8px 10px; border: 0; border-radius: 12px; vertical-align: top; }
.g-cal-out { background: none; }
.g-cal-d { background: var(--bg); }
.g-cal-n { display: block; font-weight: 600; line-height: 1.3; }
.g-cal-past { background: transparent; color: var(--muted); }
.g-cal-today { box-shadow: inset 0 0 0 2px var(--accent); }
.g-cal-today .g-cal-n { color: var(--accent); font-weight: 800; }

/* День со встречами: мятная плитка, число, точки и «2 встречи» — акцентом; прошедший — бежевая плитка и серые
   точки. Вся плитка — ссылка на панель дня (.g-cal-a поверх клетки): под палец, с клавиатуры — Tab и Enter,
   фокус — общей рамкой ссылок сайта. */
.g-cal-grid td.g-cal-has { padding: 0; background: var(--mint); }
.g-cal-a {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: block;
  padding: 8px 10px;
  border-radius: inherit;
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.g-cal-a:active { background: rgba(47, 111, 94, 0.14); }
.g-cal-has .g-cal-n { color: var(--accent); font-weight: 800; }
.g-cal-mark { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 8px; color: var(--accent); font-size: 0.8rem; font-weight: 600; line-height: 1.2; }
/* Точка встречи в клетке дня: с направлением — заливка цветом сферы (.s-<ключ> задаёт --sphere), общая встреча
   (без направления) — кольцо цвета акцента. */
.g-cal-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--sphere, transparent);
  box-shadow: inset 0 0 0 2px var(--sphere, var(--accent)); }
.g-cal-cnt { margin-left: 4px; }
.g-cal-grid td.g-cal-has.g-cal-past { background: var(--chip); }
.g-cal-has.g-cal-past .g-cal-n, .g-cal-past .g-cal-mark { color: var(--muted); }
.g-cal-dot-past { opacity: 0.45; }

/* Карточка дня при наведении — только с мышью и от 641 px; без мыши (касание) и уже — её нет совсем. Наведённый
   день — акцентная плитка с белым числом; карточка появляется за 0,15 с (без анимации, если в системе уменьшено
   движение). */
.g-cal-card { display: none; }
@media (hover: hover) and (pointer: fine) and (min-width: 641px) {
  .g-cal-grid td.g-cal-has:hover { background: var(--accent); }
  .g-cal-has:hover .g-cal-n, .g-cal-has:hover .g-cal-mark { color: #fff; }
  .g-cal-has:hover .g-cal-dot { outline: 2px solid #fff; }
  .g-cal-card {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 5;
    display: block;
    width: 320px;
    margin-top: 8px;
    padding: 14px 18px 16px;
    background: var(--card);
    color: var(--fg);
    border-radius: 16px;
    box-shadow: 0 2px 6px rgba(31, 29, 26, 0.08), 0 18px 44px rgba(31, 29, 26, 0.18);
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.45;
    text-align: left;
    overflow-wrap: anywhere;
    cursor: auto;
    visibility: hidden;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0.15s;
  }
  .g-cal-card::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 9px; }
  .g-cal-has:hover .g-cal-card { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .g-cal-grid td:nth-child(n+6) .g-cal-card { left: auto; right: 0; }
}
@media (hover: hover) and (pointer: fine) and (min-width: 641px) and (max-width: 900px) {
  .g-cal-grid td:nth-child(5) .g-cal-card { left: auto; right: 0; }
}
.g-cal-card-day { padding-bottom: 10px; font-weight: 700; }

/* Встречи дня — в карточке и в панели */
.g-cal-evs { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.g-cal-ev { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin: 0; padding: 12px 0; border-top: 1px solid var(--line); }
.g-cal-ev:last-child { padding-bottom: 0; }
.g-cal-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.g-cal-top .g-chip, .g-cal-meta .g-chip { align-self: center; }
.g-cal-time { font-weight: 700; }
.g-cal-title { font-weight: 600; line-height: 1.3; }
.g-cal-title a { color: var(--fg); text-decoration: none; }
.g-cal-title a:hover { color: var(--accent); text-decoration: underline; }
.g-cal-where { color: var(--muted); font-size: 0.9rem; }
.g-cal-seats { font-size: 0.9rem; font-weight: 600; }
.g-seat-open { color: var(--accent); }
.g-seat-full { color: #7a4a05; }
.g-seat-closed, .g-seat-soon, .g-seat-past { color: var(--muted); }
.g-cal-live { background: var(--mint); color: #0f6e5b; }
.g-cal-ev-past .g-cal-time, .g-cal-ev-past .g-cal-title a { color: var(--muted); }
.g-cal-join { min-height: 40px; margin-top: 6px; padding: 8px 16px; font-size: 0.9rem; }
/* Запись сайт первым (pubItem.Site): «Записаться на сайте» (главная кнопка) и «Записаться в Telegram» рядом, не
   помещаются — одна под другой; в строке «Ближайшие встречи» от 901 px — столбиком одной ширины в правой колонке,
   уже — в ряд под текстом; на телефоне обе во всю ширину (.btn в разделе «Телефон»). */
.g-cal-acts { display: flex; flex-wrap: wrap; align-self: stretch; gap: 8px; padding-top: 6px; }
.g-cal-acts .g-cal-join { margin-top: 0; }
.g-cal-foot { color: var(--muted); font-size: 0.9rem; }
.g-cal-empty { color: var(--fg); font-size: 1rem; font-weight: 600; }

/* Панель дня: скрыта, пока её не открыли переходом по якорю дня (:target); стоит под сеткой в потоке страницы —
   раздвигает содержимое ниже и ничего не перекрывает. scroll-margin-top — отступ над панелью, когда браузер
   прокручивает к ней. Встречи — белыми плитками: на широком экране в ряд, на телефоне столбиком. */
.g-cal-panel { display: none; scroll-margin-top: 16px; padding: 16px 18px 18px; border-radius: 16px; background: var(--bg); }
.g-cal-panel:target { display: block; }
.g-cal-panel:focus { outline: none; }
.g-cal-panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; }
.g-page .g-cal-panel-day { font-size: 1.15rem; font-weight: 700; }
.g-cal-panel .g-cal-evs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.g-cal-panel .g-cal-ev, .g-cal-panel .g-cal-ev:last-child { padding: 14px 16px 16px; border-top: 0; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); }

/* Ближайшие встречи строками: когда — что (название, вид, место, места) — кнопка записи */
.g-cal-soon { display: flex; flex-direction: column; gap: 6px; padding: 20px 24px 8px; background: var(--card); border-radius: 20px; box-shadow: var(--shadow); }
.g-cal-rows { margin: 0; padding: 0; list-style: none; }
.g-cal-row { display: grid; grid-template-columns: 220px minmax(0, 1fr) auto; align-items: center; gap: 6px 24px; margin: 0; padding: 14px 0; border-top: 1px solid var(--line); }
.g-cal-when { display: flex; flex-direction: column; }
.g-cal-rday { font-weight: 700; }
.g-cal-what { display: flex; flex-direction: column; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.g-cal-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.g-cal-row .g-cal-join { margin: 0; }
.g-cal-row .g-cal-acts { flex-direction: column; padding-top: 0; }
.g-cal-all { font-weight: 600; }
.g-cal-all a { display: inline-block; padding: 10px 0; }

@media (max-width: 900px) {
  .g-cal-grid th { padding: 4px 8px 0; }
  .g-cal-grid td { height: 64px; padding: 6px 8px; }
  .g-cal-a { padding: 6px 8px; }
  .g-cal-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .g-cal-when { flex-direction: row; flex-wrap: wrap; gap: 0 10px; }
  .g-cal-row .g-cal-join { justify-self: start; margin-top: 4px; }
  .g-cal-row .g-cal-acts { flex-direction: row; justify-self: start; padding-top: 4px; }
  .g-cal-row .g-cal-acts .g-cal-join { margin-top: 0; }
}
@media (max-width: 640px) {
  .g-cal { gap: 10px; padding: 16px 12px; }
  .g-cal-grid { width: calc(100% + 8px); margin: -4px -4px 0; border-spacing: 4px; }
  .g-cal-grid th { padding: 2px 0 0; font-size: 0.75rem; text-align: center; }
  .g-cal-grid td { height: 48px; padding: 6px 0 0; border-radius: 10px; text-align: center; }
  .g-cal-a { padding: 6px 0 0; }
  .g-cal-mark { justify-content: center; gap: 3px; margin-top: 4px; }
  .g-cal-dot { width: 6px; height: 6px; }
  .g-cal-cnt { display: none; }
  .g-cal-panel { padding: 14px 12px 16px; }
  .g-cal-panel .g-cal-evs { grid-template-columns: minmax(0, 1fr); }
  .g-cal-row .g-cal-acts { justify-self: stretch; }
  .g-cal-soon { padding: 16px 16px 4px; }
  .g-cal-filter { flex-direction: column; gap: 6px; }
  .g-cal-filter-name { padding-top: 0; }
  .g-cal-spheres {
    flex-wrap: nowrap;
    align-self: stretch;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    margin: 0 -16px;
    padding: 0 16px 4px;
  }
  .g-cal-spheres::-webkit-scrollbar { display: none; }
  /* Выбранная капсула — первой в ряду: без JS ряд не прокрутить к ней, а за краем экрана её не видно */
  .g-cal-spheres li:has(> [aria-current="page"]) { order: -1; }
}
@media (prefers-reduced-motion: reduce) {
  .g-cal-card { transform: none; transition: none; }
}
@media print {
  .g-cal-card, .g-cal-foot { display: none; }
}

/* --- Разделы для партнёров (02.10.2026) ----------------------------------------
   «Клубам и сообществам» (site/klubam/) и «Спикерам и организаторам» (site/spikeram/), блок «Проводите встречи
   на платформе» на главной: плитки, шаги и плашки — общие классы .g-; здесь только модификатор .g-steps-4 —
   четыре шага подключения клуба в один ряд (на iPad — по два, уже — столбиком, как .g-cols-4). Формы заявок
   /zayavka/… отдаёт бот со своими стилями (internal/app/sitetpl/zayavka.css). */
.g-steps-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) {
  .g-steps-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .g-steps-4 { grid-template-columns: minmax(0, 1fr); }
}

/* --- Телефон: компактная шапка (02.10.2026) -------------------------
   (До 12.10.2026 здесь же календарь ставился первым — просьба основателя 02.10; с историей на весь экран первым
   стоит первый экран, календарь — за «Ближайшими встречами»; «Пропустить историю» ведёт к ним.)
   Шапка — в две строки: бренд, «Кабинет» и кнопка «Афиша встреч»,
   ниже меню одной строкой с прокруткой вбок (страница при этом вбок не прокручивается). Ссылки «Бот» на телефоне
   в шапке нет — бот в подвале каждой страницы («бот @bclubkz_bot»), авто-отступ переходит к «Кабинету».
   Справа в строке меню — переключатель языка (.top-lang, order: 4): меню занимает строку без его 44 px и промежутка
   (такой flex-basis не пускает меню в строку бренда, flex-grow добирает остаток), у правого края пункты уходят
   в прозрачность (маска 20 px; такое же поле справа — последний пункт в конце прокрутки виден целиком). Область
   нажатия переключателя 44 × 44 px, подпись прижата вправо — вровень с краем кнопки «Афиша встреч».
   Дни календаря крупнее — под палец. */
@media (max-width: 640px) {
  .top-row { flex-wrap: wrap; }
  .top-bot { display: none; }
  .top-bot + .kabinet { margin-left: auto; }
  .nav {
    flex: 1 1 calc(100% - 60px);
    flex-wrap: nowrap;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    margin: 0 0 0 -16px;
    padding: 0 20px 6px 12px;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 20px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 20px), transparent);
  }
  .kabinet.top-lang { order: 4; align-self: flex-start; justify-content: flex-end; min-width: 44px; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex: none; }
  .g-cal-grid td { height: 52px; }
}

/* --- Шапка на узком телефоне (03.10.2026) ----------------------------------------------
   В строке бренда на телефоне — бренд, «Кабинет» и кнопка «Афиша встреч». До 400 px знак и имя чуть меньше,
   промежутки и поля кнопки уже; до 374 px имя меньше ещё на ступень, а на кнопке — «Афиша»: хвост «&nbsp;встреч» —
   <span> в кнопке (неразрывный пробел: обычный в начале флекс-элемента пропал бы), с ним на 360 px кнопка уходит
   второй строкой (полная подпись помещается от ~362 px). Правило стоит в конце файла, после .brand-name: размер
   имени задаёт он, а не .brand. Запас в строке по снимкам Chrome со шрифтом Onest: «Афиша» — 320 px — 8 px,
   360 — 48, 374 — 62; «Афиша встреч» — 375 — 8, 390 — 23, 400 — 33, 401 (уже без этого правила) — 6, 414 — 19;
   со шрифтом системы — на 5–8 px больше. Раньше (бренд, «Афиша» и кнопка «Открыть бота») было 360 — 12, 375 — 22,
   390 — 37, 414 — 32, а на 320–349 px кнопка уходила второй строкой. Прокрутки вбок нет. */
@media (max-width: 400px) {
  .top-row { gap: 0 8px; }
  .brand { gap: 8px; }
  .brand-mark { width: 26px; height: 26px; }
  .brand-name { font-size: 1rem; }
  .btn.top-afisha { padding: 8px 10px; }
}
@media (max-width: 374px) {
  .brand-name { font-size: 0.95rem; }
  .top-afisha span { display: none; }
}

/* --- История по прокрутке (06.10.2026, с 12.10.2026 — первый экран) ---------------------------------
   Сцены истории и всё их оформление — в /story.css (собирает brand/tools/make_story.py). Запасное правило
   на случай, когда story.css не загрузился, — в разделе «Первый экран — история на весь экран» выше. */

/* --- Движение (06.10.2026) ----------------------------------------------------------------
   Разметку менять не нужно: всё держится на классах, которые уже есть.
   Только CSS, без JS: политика CSP сайта (style-src 'self') это разрешает, проверено с тем же заголовком.
   Правило одно: движение показывает смысл и никого не заставляет ждать. Текст и кнопки первого экрана
   не анимируются — они видны сразу.

   1. Кнопки первого экрана поднимаются с загрузки (0,6 с). Заголовок и подзаголовок видны сразу: их появление
      откладывало главный элемент первого экрана (LCP) — на телефоне с медленным 4G до 5 с (аудит 19.10.2026).
      Точки знака в истории появляются по времени там же — правило gs-in в story.css.
   2. Точки встреч в календаре появляются на полсекунды позже сетки — взгляд сразу находит дни, на которые
      можно нажать.
   3. Панель дня и её карточки открываются мягко, а не скачком.
   4. «Путь на платформе» прочерчивается по мере прокрутки — правила в блоке «Блоки главной» ниже.

   5. Разделы главной ниже афиши проявляются при прокрутке: заголовок и плитки мягко поднимаются на своё место.
      Тоже только там, где есть animation-timeline; в остальных браузерах всё видно сразу, как сейчас.
   6. Дуги в полях широкого экрана медленно расходятся по вертикали за прокруткой (±70 px каждая).
   7. Ход прокрутки: тонкая линия у верхнего края окна растёт слева направо вместе со страницей — на всех
      открытых страницах. На главной без неё не видно, что страница прокручивается: пока идёт история, первый
      экран и календарь стоят на месте. Где нет animation-timeline, долю пути ведёт /smooth.js.

   Кто попросил систему уменьшить движение (prefers-reduced-motion), не увидит ничего из этого:
   все правила лежат внутри условия no-preference. На печати их тоже нет. */
@media screen and (prefers-reduced-motion: no-preference) {

  /* 1. Кнопки первого экрана; заголовок и подзаголовок — без появления */
  .g-hero-text > .g-actions { animation: g-hero-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both; }
  @keyframes g-hero-in {
    from { opacity: 0; translate: 0 14px; }
  }

  /* 2. Точки встреч в календаре (только будущие дни) */
  .g-cal-dot:not(.g-cal-dot-past) { animation: g-dot-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both; }
  .g-cal-dot:not(.g-cal-dot-past):nth-child(2) { animation-delay: 0.58s; }
  .g-cal-dot:not(.g-cal-dot-past):nth-child(3) { animation-delay: 0.66s; }
  .g-cal-dot:not(.g-cal-dot-past):nth-child(n+4) { animation-delay: 0.74s; }
  @keyframes g-dot-in {
    from { transform: scale(0); }
    to   { transform: none; }
  }

  /* 3. Панель дня (:target) и карточки встреч в ней */
  .g-cal-panel:target { animation: g-panel-in 0.3s cubic-bezier(0.22, 1, 0.36, 1) both; }
  .g-cal-panel:target .g-cal-ev { animation: g-rise 0.42s cubic-bezier(0.22, 1, 0.36, 1) 0.06s both; }
  .g-cal-panel:target .g-cal-ev:nth-child(2) { animation-delay: 0.12s; }
  .g-cal-panel:target .g-cal-ev:nth-child(3) { animation-delay: 0.18s; }
  .g-cal-panel:target .g-cal-ev:nth-child(n+4) { animation-delay: 0.24s; }
  @keyframes g-panel-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: none; }
  }
  @keyframes g-rise {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
  }

  /* 5. Разделы главной ниже афиши проявляются при прокрутке. Правило ограничено главной (у неё первый экран
        .g-hero-home). Сдвиг задан свойством translate, а не transform, поэтому подъём плитки при наведении
        (transform в site.css) продолжает работать. */
  @supports (animation-timeline: view()) {
    .g-page:has(.g-hero-home) > .g-sec:not(#kalendar) > .g-sec-head,
    .g-page:has(.g-hero-home) > .g-sec > h2,
    .g-page:has(.g-hero-home) .g-next-list > *,
    .g-page:has(.g-hero-home) .g-formats > *,
    .g-page:has(.g-hero-home) .g-between,
    .g-page:has(.g-hero-home) .g-grid > *,
    .g-page:has(.g-hero-home) > .g-band {
      animation: g-reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }
    /* соседи в ряду поднимаются с небольшим отставанием друг от друга */
    .g-page:has(.g-hero-home) .g-next-list > :nth-child(2),
    .g-page:has(.g-hero-home) .g-formats > :nth-child(2),
    .g-page:has(.g-hero-home) .g-formats > :nth-child(4),
    .g-page:has(.g-hero-home) .g-grid > :nth-child(2) { animation-range: entry 10% entry 65%; }
    .g-page:has(.g-hero-home) .g-next-list > :nth-child(3),
    .g-page:has(.g-hero-home) .g-formats > :nth-child(3),
    .g-page:has(.g-hero-home) .g-formats > :nth-child(5),
    .g-page:has(.g-hero-home) .g-grid > :nth-child(3) { animation-range: entry 20% entry 75%; }
    @keyframes g-reveal {
      from { opacity: 0; translate: 0 24px; }
      to   { opacity: 1; translate: 0 0; }
    }
  }

  /* 6. Поля широкого экрана: дуги медленно идут за прокруткой страницы */
  @supports (animation-timeline: scroll()) {
    .g-field i { animation: g-field-down linear both; animation-timeline: scroll(root block); }
    .g-field .g-field-far { animation-name: g-field-up; } /* весомее сокращённого animation у .g-field i */
    @keyframes g-field-down {
      from { translate: 0 -70px; }
      to { translate: 0 70px; }
    }
    @keyframes g-field-up {
      from { translate: 0 70px; }
      to { translate: 0 -70px; }
    }
  }

  /* 7. Ход прокрутки. Линия — псевдоэлемент страницы: разметку не трогаем, нажатия проходят сквозь неё. */
  body::before { content: ""; position: fixed; left: 0; top: 0; z-index: 100; width: 100%; height: 3px; background: var(--accent); pointer-events: none; transform: scaleX(0); transform-origin: 0 50%; }
  @supports (animation-timeline: scroll()) {
    body::before { animation: g-scroll linear both; animation-timeline: scroll(root block); }
  }
  @keyframes g-scroll {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
  }
}

/* --- Заглушка «Передача места» под картинку, которая ещё грузится (06.10.2026) -------------------
   Лоадер из бренд-пакета: горячее место обходит круг в порядке недель, 2,1 с на круг. Здесь — только фон
   под картинкой, сам знак с движением — файл /img/kr-loader-light.svg (стили внутри файла, светлая палитра).
   В кабинете тот же лоадер стоит в кнопках форм: internal/app/webtpl/kabinet.css и k.js. */
/* Класс kr-ph ставится на любой <img>; img.t-wheel — колесо в результате теста (его рисует сервер).
   Знак появляется через 300 мс и через 30 с убирается. */
.kr-ph, img.t-wheel {
  background-image: url("/img/kr-loader-light.svg"); background-position: center; background-repeat: no-repeat; background-size: 0 0;
  animation: kr-ph 30s linear 0.3s forwards;
}
@keyframes kr-ph { 0.01%, 99.99% { background-size: 64px 64px; } 100% { background-size: 0 0; } }

/* --- Плавная прокрутка (06.10.2026) ----------------------------------------------------------------
   Переходы по ссылкам внутри страницы идут плавно, а не прыжком: видно, куда страница переместилась. Это оглавление
   и полоса глав истории на главной, «Пропустить историю», дни календаря (панель дня открывается по якорю) и ссылки
   на разделы. Кто попросил систему уменьшить движение, перемещается как раньше, сразу. Колесо мыши сглаживает
   скрипт /smooth.js — CSS этого не умеет. */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* --- Пиктограммы и блоки главной по макету (08.10.2026) -------------------------------------------
   Пиктограммы — линия 3 на сетке 48, скруглённые концы; в каждой один элемент знака — место-точка, и только
   у мастермайнда и разборов это горячее кресло (тёплый цвет). Инлайн-SVG в разметке, цвет — currentColor.
   .g-pic — 40 px в карточке, .g-pic-56 — первый экран раздела, .g-pic-96 — главная карточка форматов (128 px).
   Исходные файлы набора (48 и 20 px) — brand/pictograms. */
.g-pic { display: block; width: 40px; height: 40px; flex: none; color: var(--accent); }
.g-pic-20 { width: 20px; height: 20px; } /* метка встречи в карточке «Ближайшие встречи»: свой рисунок из brand/pictograms/20 */
.g-pic-56 { width: 56px; height: 56px; }
.g-pic-96 { width: 128px; height: 128px; }
.g-pic-hero { margin-bottom: 14px; }
.g-pic-hot { fill: var(--warm); }
.g-pic-b, .g-pic-hot { transform-box: fill-box; transform-origin: center; }
.g-pic-steam { opacity: 0; }

/* Форматы встреч: мастермайнд — главная карточка в две строки, три обычные и «в планах» пунктиром без подложки.
   Ритм встреч — в верхней строке карточки, напротив пиктограммы. */
.g-formats { display: grid; grid-template-columns: 5fr 3.5fr 3.5fr; grid-auto-rows: minmax(0, 1fr); gap: 16px; }
.g-format { gap: 20px; }
.g-format-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.g-format-rhythm { margin-top: 2px; max-width: 60%; color: var(--muted); font-size: 14px; line-height: 20px; text-align: right; text-wrap: balance; }
.g-format-body { display: flex; flex-direction: column; gap: 6px; margin-top: auto; }
.g-format .g-card-title { font-size: 20px; line-height: 26px; }
.g-format .muted { font-size: 15px; line-height: 22px; text-wrap: pretty; }
.g-format-main { position: relative; grid-row: 1 / 3; padding: 32px; overflow: hidden; }
.g-format-main .g-format-head, .g-format-main .g-format-body { position: relative; }
.g-format-mark { position: absolute; right: -84px; bottom: -104px; width: 320px; height: 320px; color: var(--mint); pointer-events: none; }
.g-format-main .g-format-rhythm { max-width: 56%; font-size: 16px; line-height: 22px; }
.g-format-main .g-format-body { gap: 10px; }
.g-format-main .g-card-title { font-size: 32px; line-height: 38px; }
.g-format-main .muted { color: var(--fg); font-size: 18px; line-height: 27px; }
.g-format-plan { border: 1.5px dashed var(--line); background: transparent; box-shadow: none; }
a.g-format-plan:hover { border-color: var(--muted); box-shadow: none; }
.g-format-plan .g-pic, .g-format-plan .g-card-title { color: var(--muted); }
.g-format-status { color: var(--warn); font-weight: 600; }

/* Между встречами: одна карточка из трёх ссылок — тест с колесом и восемью сферами вокруг него, цели, присоединиться.
   Цвета сфер — только на дольках колеса и точках у подписей. Большая сетка за колесом видна только в его полосе:
   заголовок и ссылку она не пересекает. */
.g-between { display: grid; grid-template-columns: 7fr 5fr; overflow: hidden; border-radius: 20px; background: var(--card); box-shadow: var(--shadow); }
.g-btw { position: relative; display: flex; flex-direction: column; overflow: hidden; color: var(--fg); text-decoration: none; }
.g-btw:hover .g-more { text-decoration: underline; }
.g-btw .g-card-title { font-size: 20px; line-height: 26px; }
.g-btw .muted { font-size: 15px; line-height: 22px; text-wrap: pretty; }
.g-btw .g-more { margin-top: auto; }
.g-btw-test { gap: 20px; padding: 32px; border-right: 1px solid var(--line); }
.g-btw-head { display: flex; align-items: flex-start; gap: 16px; }
.g-btw-head-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.g-wheel-wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) min(300px, 44%) minmax(0, 1fr); align-items: center; gap: 20px; margin: 0 -32px; padding: 8px 32px; overflow: hidden; }
.g-wheel-bg { position: absolute; left: calc(50% - 330px); top: calc(50% - 330px); width: 660px; height: 660px; fill: none; stroke: var(--line); stroke-width: 0.6; pointer-events: none; }
.g-wheel { position: relative; display: block; width: 100%; height: auto; }
.g-wheel-grid { fill: none; stroke: var(--line); stroke-width: 1; }
.g-wheel-w path { fill: var(--sphere); stroke: var(--card); stroke-width: 2; }
.g-wheel-col { position: relative; display: flex; flex-direction: column; justify-content: space-between; height: 300px; padding: 22px 0; }
.g-wheel-col .g-chip { align-self: flex-start; gap: 8px; padding: 0; border: 0; border-radius: 0; background: none; font-size: 14px; line-height: 18px; text-wrap: balance; }
.g-wheel-col-l .g-chip { flex-direction: row-reverse; align-self: flex-end; text-align: right; }
.g-btw-side { display: grid; grid-template-rows: 1fr 1fr; }
.g-btw-goals, .g-btw-join { gap: 10px; padding: 28px 32px; }
.g-btw-goals > *, .g-btw-join > * { position: relative; }
.g-btw-goals .g-pic, .g-btw-join .g-pic { margin-bottom: 6px; }
.g-btw-goals { border-bottom: 1px solid var(--line); }
.g-btw-goals .muted { max-width: 68%; }
.g-btw-join { background: var(--mint); }
.g-week-bars { position: absolute; right: 24px; bottom: -10px; width: 170px; height: 120px; fill: var(--chip); pointer-events: none; }
.g-week-on { fill: var(--mint); }

/* Путь на платформе: шесть узлов на одной линии. Шаги 1–4 — залитые узлы и сплошная линия, 5 — «в планах»
   (пунктир), 6 — рост (кольцо на мяте). На телефоне линия вертикальная, тексты справа. */
.g-way { display: grid; grid-template-columns: repeat(6, 1fr); margin: 0; padding: 0; list-style: none; }
.g-way-step { position: relative; margin: 0; padding: 0 12px; }
.g-way-step::before, .g-way-step::after { content: ""; position: absolute; top: 17px; border-top: 3px solid var(--accent); }
.g-way-step::before { left: 0; right: 50%; }
.g-way-step::after { left: 50%; right: 0; }
.g-way-step:first-child::before, .g-way-step:last-child::after { display: none; }
.g-way-edge::after, .g-way-plan::before, .g-way-plan::after, .g-way-grow::before { border-top-style: dashed; border-top-color: var(--line); }
.g-way-node { position: relative; z-index: 1; display: grid; place-items: center; width: 36px; height: 36px; margin: 0 auto 16px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 15px; font-weight: 600; }
.g-way-plan .g-way-node { border: 2px dashed var(--muted); background: var(--bg); color: var(--muted); }
.g-way-grow .g-way-node { border: 3px solid var(--accent); background: var(--mint); color: var(--accent); }
.g-way-text { display: block; text-align: center; }
.g-way-text strong { display: block; font-size: 17px; font-weight: 600; line-height: 22px; }
.g-way-text .muted { display: block; margin-top: 4px; font-size: 14px; line-height: 20px; text-wrap: balance; }
.g-way-plan .g-way-text strong { color: var(--muted); }

/* Движение блоков: отклик пиктограммы на наведение и рисование по прокрутке. Только CSS; без animation-timeline
   и при «уменьшить движение» — статика. */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .g-format:hover .g-pic-b { animation: g-dot-nudge 0.6s ease-out 1; }
  .g-format:hover .g-pic-hot { animation: g-hot-beat 0.9s cubic-bezier(0.3, 0.7, 0.3, 1) 1; }
  .g-format:hover .g-pic-steam { animation: g-steam 1s ease-out 1; }
}
@supports (animation-timeline: view()) {
  @media screen and (prefers-reduced-motion: no-preference) {
    .g-way-step::before, .g-way-step::after { transform-origin: left center; animation: g-draw-x linear both; animation-timeline: view(); }
    .g-way-node { animation: g-node-in linear both; animation-timeline: view(); }
    .g-way-step:nth-child(1) .g-way-node { animation-range: cover 5% cover 7.5%; }
    .g-way-step:nth-child(1)::after { animation-range: cover 7.5% cover 9.5%; }
    .g-way-step:nth-child(2)::before { animation-range: cover 9.5% cover 11.5%; }
    .g-way-step:nth-child(2) .g-way-node { animation-range: cover 11.5% cover 14%; }
    .g-way-step:nth-child(2)::after { animation-range: cover 14% cover 16%; }
    .g-way-step:nth-child(3)::before { animation-range: cover 16% cover 18%; }
    .g-way-step:nth-child(3) .g-way-node { animation-range: cover 18% cover 20.5%; }
    .g-way-step:nth-child(3)::after { animation-range: cover 20.5% cover 22.5%; }
    .g-way-step:nth-child(4)::before { animation-range: cover 22.5% cover 24.5%; }
    .g-way-step:nth-child(4) .g-way-node { animation-range: cover 24.5% cover 27%; }
    .g-way-step:nth-child(4)::after { animation-range: cover 27% cover 29%; }
    .g-way-step:nth-child(5)::before { animation-range: cover 29% cover 31%; }
    .g-way-step:nth-child(5) .g-way-node { animation-range: cover 31% cover 33.5%; }
    .g-way-step:nth-child(5)::after { animation-range: cover 33.5% cover 35.5%; }
    .g-way-step:nth-child(6)::before { animation-range: cover 35.5% cover 37.5%; }
    .g-way-step:nth-child(6) .g-way-node { animation-range: cover 37.5% cover 40%; }
    .g-format-main .g-pic-hot { animation: g-hot-sit linear both; animation-timeline: view(); animation-range: entry 40% cover 35%; }
    .g-format-mark, .g-wheel-bg { animation: g-fade-up linear both; animation-timeline: view(); animation-range: entry 0% cover 30%; }
    .g-week-bars rect { transform-box: fill-box; transform-origin: bottom center; animation: g-bar-up linear both; animation-timeline: view(); }
    .g-week-bars rect:nth-child(1) { animation-range: cover 8% cover 16%; }
    .g-week-bars rect:nth-child(2) { animation-range: cover 11% cover 19%; }
    .g-week-bars rect:nth-child(3) { animation-range: cover 14% cover 22%; }
    .g-week-bars rect:nth-child(4) { animation-range: cover 17% cover 25%; }
    .g-week-bars rect:nth-child(5) { animation-range: cover 20% cover 28%; }
    .g-week-bars rect:nth-child(6) { animation-range: cover 23% cover 31%; }
    .g-week-bars rect:nth-child(7) { animation-range: cover 26% cover 34%; }
  }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  /* наведение сильнее появления: такт лоадера «передача места» у горячего кресла */
  .g-format-main:hover .g-pic-hot { animation: g-hot-beat 0.9s cubic-bezier(0.3, 0.7, 0.3, 1) 1; animation-timeline: auto; animation-range: normal; }
}
@keyframes g-draw-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes g-draw-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes g-node-in { from { opacity: 0; transform: scale(0.5); } to { opacity: 1; transform: scale(1); } }
@keyframes g-fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes g-bar-up { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes g-hot-sit { 0% { opacity: 0; transform: translate(-2px, 1.2px) scale(0.5); } 70% { opacity: 1; transform: translate(0.6px, -0.35px) scale(1.08); } 100% { opacity: 1; transform: none; } }
@keyframes g-hot-beat { 0% { transform: none; } 30% { transform: translate(-1.2px, 0.7px); } 62% { transform: translate(1.5px, -0.9px); } 82% { transform: translate(-0.3px, 0.2px); } 100% { transform: none; } }
@keyframes g-dot-nudge { 50% { transform: scale(1.25); } }
@keyframes g-steam { 0% { opacity: 0; transform: translateY(2px); } 35% { opacity: 1; } 100% { opacity: 0; transform: translateY(-3px); } }

/* планшет: трём колонкам тесно — главная карточка во всю ширину, остальные 2 × 2; тест над целями и входом */
@media (min-width: 721px) and (max-width: 1023px) {
  .g-formats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-auto-rows: auto; }
  .g-format-main { grid-row: auto; grid-column: 1 / -1; min-height: 260px; }
  .g-between { grid-template-columns: minmax(0, 1fr); }
  .g-btw-test { border-right: 0; border-bottom: 1px solid var(--line); }
  .g-btw-side { grid-template-rows: none; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .g-btw-goals { border-right: 1px solid var(--line); border-bottom: 0; }
}
@media (max-width: 720px) {
  .g-formats { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; gap: 12px; }
  .g-format { gap: 16px; padding: 20px; }
  .g-format-rhythm { max-width: 62%; }
  .g-format-main { grid-row: auto; padding: 24px 20px; }
  .g-format-main .g-pic-96 { width: 56px; height: 56px; }
  .g-format-main .g-format-rhythm { max-width: 62%; font-size: 14px; line-height: 20px; }
  .g-format-main .g-card-title { font-size: 24px; line-height: 30px; }
  .g-format-main .muted { font-size: 16px; line-height: 24px; }
  .g-format-mark { right: -60px; bottom: -70px; width: 240px; height: 240px; }
  .g-between { grid-template-columns: minmax(0, 1fr); }
  .g-btw-test { padding: 24px 20px; border-right: 0; border-bottom: 1px solid var(--line); }
  /* телефон: колесо сверху по центру, подписи сфер — двумя столбцами под ним (вокруг колеса им тесно) */
  .g-wheel-wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 12px; margin: 0; padding: 4px 0; overflow: visible; }
  .g-wheel-bg { display: none; }
  .g-wheel { grid-row: 1; grid-column: 1 / -1; width: min(230px, 72%); margin: 0 auto; }
  .g-wheel-col { grid-row: 2; gap: 12px; height: auto; padding: 0; justify-content: flex-start; }
  .g-wheel-col-r { grid-column: 1; }
  .g-wheel-col-l { grid-column: 2; }
  .g-wheel-col-l .g-chip { flex-direction: row; align-self: flex-start; text-align: left; }
  .g-btw-side { grid-template-rows: auto auto; }
  .g-btw-goals, .g-btw-join { padding: 24px 20px; }
  .g-btw-goals .muted { max-width: 100%; }
  .g-week-bars { right: 16px; width: 130px; height: 92px; }
  .g-way { grid-template-columns: minmax(0, 1fr); }
  .g-way-step { display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 16px; padding: 0 0 28px; }
  .g-way-step:last-child { padding-bottom: 0; }
  .g-way-node { margin: 0; }
  .g-way-step::before, .g-way-step::after { top: auto; right: auto; left: 16.5px; width: 0; border-top: 0; border-left: 3px solid var(--accent); }
  .g-way-step::before { top: -28px; height: 28px; }
  .g-way-step::after { top: 36px; bottom: 0; }
  .g-way-edge::after, .g-way-plan::before, .g-way-plan::after, .g-way-grow::before { border-left-style: dashed; border-left-color: var(--line); }
  .g-way-text { padding-top: 6px; text-align: left; }
  .g-way-text .muted { text-wrap: pretty; }
  .g-way .g-way-step::before, .g-way .g-way-step::after { transform-origin: center top; animation-name: g-draw-y; animation-range: cover 0% cover 22%; }
  .g-way .g-way-step:nth-child(n) .g-way-node { animation-range: cover 0% cover 22%; }
}

/* --- Схемы на страницах разделов и оглавления (08.10.2026) ----------------------------------------
   Схемы — на языке знака и стикеров бота: место, полоска-шаг, тёплое только у горячего кресла. Инлайн-SVG, цвета —
   классами .g-dg-*. На телефоне (до 700 px) схемы скрыты: подписи в них стали бы мельче 9 px, а то же содержание
   есть в плитках под ними. */
.g-dg { display: none; margin: 0 0 20px; color: var(--accent); }
.g-dg svg { display: block; width: 100%; height: auto; border-radius: 16px; font-family: inherit; }
@media (min-width: 700px) { .g-dg { display: block; } }
.g-split-main .g-dg { margin: 24px 0 0; }
.g-dg-hot { fill: var(--warm); }
.g-dg-dim { fill: var(--line); }
.g-dg-bg { fill: var(--bg); }
.g-dg-ink { fill: var(--fg); }
.g-dg-mu { fill: var(--muted); }
.g-dg-sline { stroke: var(--line); }
.g-dg-sink { stroke: var(--fg); }
/* Оглавление длинной страницы: ссылки на разделы, капсулами */
.g-toc { margin: 0 0 28px; }
.g-toc ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.g-toc a { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 14px; border-radius: 999px; background: var(--card); color: var(--fg); font-size: 0.95rem; text-decoration: none; box-shadow: var(--shadow); }
.g-toc a:hover { color: var(--accent); }
