/* ============================================================
   Primechanger — обучающая страница для Telegram Mini App.
   Использует токены и шрифты из styles.css, добавляет только
   мобильный вертикальный layout под окно Telegram.
   ============================================================ */

/* Telegram открывает Mini App во весь экран — учитываем safe-area
   и убираем горизонтальные отступы «десктопной» сетки. */
body.miniapp {
  background: var(--bg);
  padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
}
body.miniapp .g-wrap {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 18px 0;
}

/* ---------- Шапка ---------- */
.g-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 18px;
}
.g-top img { width: 32px; height: 32px; border-radius: 9px; }
.g-top-name {
  font-family: 'Geist', 'Inter', sans-serif;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.02em;
}
.g-top-tag {
  margin-left: auto;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(16, 185, 129, 0.10);
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  padding: 5px 11px;
}

/* ---------- Заголовок ---------- */
.g-hero { padding: 6px 0 22px; }
.g-kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.g-hero h1 {
  font-size: clamp(26px, 7vw, 34px);
  margin-bottom: 10px;
}
.g-hero p {
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.62;
}
.g-hello {
  margin-top: 14px;
  font-size: 14.5px;
  color: var(--text);
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
}
.g-hello b { color: var(--accent); }

/* ---------- Секции ---------- */
.g-section { margin-bottom: 26px; }
.g-section-title {
  font-family: 'Geist', 'Inter', sans-serif;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

/* ---------- Вертикальная лента шагов ---------- */
.g-steps { display: flex; flex-direction: column; gap: 12px; }
.g-step {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 18px 18px 58px;
  box-shadow: var(--shadow-sm);
}
.g-step-num {
  position: absolute;
  left: 18px;
  top: 18px;
  width: 26px;
  height: 26px;
  border-radius: 9px;
  background: var(--gold-grad);
  color: #fff;
  font-family: 'Geist', 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-gold);
}
.g-step h3 {
  font-size: 16px;
  margin-bottom: 7px;
}
.g-step p {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
}
.g-step ul {
  margin: 9px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.62;
}
.g-step li { margin-bottom: 5px; }
.g-step li::marker { color: var(--accent); }
.g-step-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--accent);
  background: rgba(16, 185, 129, 0.08);
  border-radius: 999px;
  padding: 5px 11px;
}

/* ---------- Информационные карточки ---------- */
.g-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.g-rows { display: flex; flex-direction: column; gap: 2px; }
.g-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14.5px;
}
.g-row:last-child { border-bottom: none; }
.g-row span { color: var(--muted); }
.g-row b { font-weight: 600; text-align: right; }

/* ---------- Предупреждение ---------- */
.g-note {
  border-radius: var(--r-lg);
  padding: 16px 18px;
  font-size: 14.5px;
  line-height: 1.6;
}
.g-note--warn {
  background: rgba(196, 125, 26, 0.07);
  border: 1px solid rgba(196, 125, 26, 0.24);
  color: var(--text);
}
.g-note--warn b { color: var(--warn); }
.g-note ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); }
.g-note li { margin-bottom: 6px; }
.g-note li::marker { color: var(--warn); }

/* ---------- FAQ ---------- */
.g-faq {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.g-faq details { border-bottom: 1px solid var(--border); }
.g-faq details:last-child { border-bottom: none; }
.g-faq summary {
  padding: 15px 18px;
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.g-faq summary::-webkit-details-marker { display: none; }
.g-faq summary::after {
  content: '+';
  color: var(--accent);
  font-size: 19px;
  font-weight: 400;
  line-height: 1;
  flex-shrink: 0;
}
.g-faq details[open] summary::after { content: '−'; }
.g-faq details p {
  padding: 0 18px 15px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.62;
}

/* ---------- Кнопки внизу ---------- */
.g-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 30px 0 8px;
}
.g-actions .btn { width: 100%; justify-content: center; }

.g-foot {
  text-align: center;
  color: var(--faint);
  font-size: 12.5px;
  line-height: 1.6;
  padding: 18px 0 6px;
}

/* На широком экране (открыто как обычная веб-страница) — чуть просторнее */
@media (min-width: 720px) {
  body.miniapp .g-wrap { padding-top: 34px; }
  .g-step { padding: 22px 22px 22px 62px; }
}
