/* ast-stage3.css — стили этапа 3 (SEO и аналитика): FAQ главной, /calendar, /404.
   Подключается на /, /calendar, /404 (см. tools/apply_stage3.py).
   html.ast-js выставляется инлайн-скриптом в <head>: режим «JS жив» —
   робот-зоны (SSR-дубли для curl/no-JS) скрываются, видимое даёт живой слой. */

/* ---------- робот-зоны (только curl/no-JS; при JS скрываются) ---------- */
html.ast-js [data-ast-robots] { display: none !important; }

[data-ast-robots] {
  max-width: 800px;
  margin: 0 auto;
  padding: 16px 20px;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #1f1338;
}
[data-ast-robots] h2 {
  font-size: 24px;
  margin: 8px 0 12px;
}
[data-ast-robots] details {
  border-top: 1px solid #e5e0f2;
  padding: 10px 0;
}
[data-ast-robots] summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 17px;
}
[data-ast-robots] ul { padding-left: 22px; }

/* ---------- FAQ: SSR-ответы внутри штатных вопросов ---------- */
/* Без JS: ответ виден под вопросом (аккордеон без JS не раскрывается). */
.ast-faq-answer {
  padding: 10px 4px 4px;
  font-size: 16px;
  line-height: 1.6;
  color: #3c3652;
}
.ast-faq-answer a { color: #7c3aed; text-decoration: underline; }
.ast-faq-answer p { margin: 0 0 8px; }
/* С JS: штатный аккордеон Framer рендерит свой ответ; SSR-копию скрываем. */
html.ast-js .ast-faq-answer { display: none; }

/* ---------- FAQ: клоны новых вопросов (живой слой) ---------- */
[data-ast-faq-clone] { width: 100%; }
[data-ast-faq-clone] .ast-faq-clone-answer {
  display: none;
  padding: 12px 4px 6px;
  font-size: 16px;
  line-height: 1.6;
  color: #3c3652;
}
[data-ast-faq-clone] .ast-faq-clone-answer a { color: #7c3aed; text-decoration: underline; }
[data-ast-faq-clone] .ast-faq-clone-answer p { margin: 0 0 8px; }
[data-ast-faq-clone] .ast-faq-clone-answer ul { margin: 8px 0; padding-left: 22px; }
[data-ast-faq-clone][data-ast-open="1"] .ast-faq-clone-answer { display: block; }
[data-ast-faq-clone] [data-ast-clone-header] { cursor: pointer; }

/* ---------- /calendar ---------- */
.ast-cal-h1 {
  margin: 0 0 6px;
  font-size: 32px;
  font-weight: 600;
  color: #1f1338;
}
.ast-cal-sub {
  margin: 0 0 18px;
  font-size: 16px;
  color: #5a5472;
}
.ast-cal-list {
  margin: 20px 0 0;
  padding: 16px 20px;
  background: #f5f2fc;
  border-radius: 12px;
}
.ast-cal-list-items { margin: 0; padding-left: 22px; }
.ast-cal-list-items li { margin: 6px 0; font-size: 16px; color: #1f1338; }
.ast-cal-list-items li { margin: 6px 0; font-size: 16px; color: #1f1338; }
/* название курса в списке — фирменный цвет и ссылка на страницу курса (владелец, 01.12) */
.ast-cal-course { color: #7c3aed; text-decoration: none; }
.ast-cal-course:hover { text-decoration: underline; }
/* легенда актуальных курсов месяца (вместо списка встреч) */
.ast-cal-legend { list-style: none; margin: 0; padding: 0; }
.ast-cal-legend-item { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 10px; font-size: 16px; }
.ast-cal-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; margin-top: 5px; }
/* нативная легенда Framer скрыта — её заменяет легенда месяца с датами 2027 */
ul:has(a.calendar-legend-link) { display: none !important; }
.ast-cal-empty { margin: 0; font-size: 16px; color: #1f1338; }
.ast-cal-empty a { color: #7c3aed; }
.ast-cal-cta {
  display: inline-block;
  margin: 14px 0 0;
  padding: 12px 22px;
  background: #7c3aed;
  color: #ffffff !important;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}
.ast-cal-cta:hover { background: #6d28d9; }

/* До 600 px: список вместо сетки 7 колонок (P2-08).
   Сетка календаря Framer рендерится инлайн-стилями без классов —
   режим переключается атрибутом на <html> (ast-calendar.js). */
html[data-ast-cal-view="list"] .ast-cal-h1 { font-size: 24px; }

/* ---------- /404: кнопка диагностики ---------- */
.ast-404-cta {
  display: inline-block;
  margin: 6px 12px 6px 0;
  padding: 12px 22px;
  background: #7c3aed;
  color: #ffffff !important;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}
.ast-404-cta:hover { background: #6d28d9; }


/* ---------- FAQ: блок новых вопросов (нативные details, живой слой) ---------- */
.ast-faq-extra {
  width: 100%;
  max-width: 900px;
  margin: 4px auto 24px;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
}
.ast-faq-extra-item {
  border-top: 1px solid #e5e0f2;
  padding: 14px 4px;
}
.ast-faq-extra-item summary {
  cursor: pointer;
  font-size: 18px;
  font-weight: 500;
  color: #1f1338;
  list-style: none;
  position: relative;
  padding-right: 36px;
}
.ast-faq-extra-item summary::-webkit-details-marker { display: none; }
.ast-faq-extra-item summary::after {
  content: "+";
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  color: #7c3aed;
  font-size: 22px;
  font-weight: 400;
}
.ast-faq-extra-item[open] summary::after { content: "–"; }
.ast-faq-extra-answer {
  padding: 10px 36px 4px 0;
  font-size: 16px;
  line-height: 1.6;
  color: #3c3652;
}
.ast-faq-extra-answer p { margin: 0 0 8px; }
.ast-faq-extra-answer a { color: #7c3aed; text-decoration: underline; }
.ast-faq-extra-answer ul { margin: 8px 0; padding-left: 22px; }
@media (max-width: 600px) {
  .ast-faq-extra-item summary { font-size: 16px; }
  .ast-faq-extra-answer { padding-right: 8px; }
}

/* Мобильный календарь: сетка дат должна быть видна и на телефоне */
@media (max-width: 600px) {
  time[datetime] { font-size: 14px !important; }
}
