:root {
      --lilac: #b6a8be;
      --apricot: #d7bfae;
      --chiffon: #d9d5cc;
      --sage: #b2beab;
      --evergreen: #5f6d5a;
      --bg: #f3f0eb;
      --surface: #fcfbf8;
      --surface-muted: #f0ece5;
      --surface-line: #e7e1d8;
      --soft-warm: #E1D3C2;
      --text: #27302b;
      --text-soft: #4d5751;
      --border: rgba(95, 109, 90, 0.20);
      --border-strong: rgba(95, 109, 90, 0.34);
      --shadow: 0 14px 34px rgba(61, 71, 58, 0.08);
      --radius-xl: 26px;
      --radius-lg: 18px;
      --radius-md: 14px;
      --container: 1120px;
    }

    * { box-sizing: border-box; }
    html {
      scroll-behavior: smooth;
      overflow-x: hidden;
    }
    body {
      margin: 0;
      overflow-x: hidden;
      max-width: 100%;
      font-family: Inter, "Segoe UI", sans-serif;
      color: var(--text);
      line-height: 1.68;
      background: var(--bg);
      -webkit-font-smoothing: antialiased;
      text-rendering: optimizeLegibility;
    }

    a { color: inherit; text-decoration: none; }
    p, li, h1, h2, h3, td { overflow-wrap: break-word; }
    img { display: block; max-width: 100%; border-radius: 18px; }

    .container {
      width: min(calc(100% - 32px), var(--container));
      margin: 0 auto;
    }

    .page { padding: 20px 0 48px; }

    .topbar {
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 16px;
      padding: 12px 0 20px;
      max-width: 100%;
    }

    .brand {
      display: inline-flex;
      align-items: center;
      gap: 12px;
      font-weight: 600;
      letter-spacing: 0.01em;
    }

    .brand__mark {
      width: 38px;
      height: 38px;
      border-radius: 12px;
      display: grid;
      place-items: center;
      background: var(--surface);
      border: 1px solid var(--border);
      color: var(--evergreen);
      font-family: Georgia, serif;
      font-size: 15px;
    }

    .nav {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 10px 18px;
      align-items: center;
      font-size: 14px;
      width: 100%;
    }

    .nav a { opacity: 0.9; }
    .nav a:hover { opacity: 1; }

    .nav__cta {
      font-weight: 600;
      opacity: 0.9;
    }

    .nav__cta:hover {
      opacity: 1;
    }

    .hero {
      display: block;
      margin-bottom: 32px;
    }

    .hero-main {
      background: var(--surface);
      border-radius: var(--radius-xl);
      border: 1px solid var(--surface-line);
      padding: 32px;
      box-shadow: var(--shadow);
    }

    .hero-tag {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 7px 12px;
      border-radius: 999px;
      background: rgba(178, 190, 171, 0.18);
      border: 1px solid rgba(95,109,90,0.16);
      font-size: 13px;
      color: #4a584f;
      margin-bottom: 16px;
    }

    h1,h2,h3 { margin: 0 0 14px; line-height: 1.08; }

    h1 {
      font-family: Georgia, "Times New Roman", serif;
      font-size: clamp(2.1rem, 4.4vw, 3.8rem);
      letter-spacing: -0.045em;
      max-width: 26ch;
      color: #24302a;
    }

    .hero--single h1 {
      max-width: none;
    }

    .hero-main h1 {
      max-width: 40ch;
    }

    .hero--single {
      grid-template-columns: 1fr;
    }

    .hero--single .hero-main {
      width: 100%;
    }

    @media (max-width: 620px) {
      .hero--single h1 {
        font-size: clamp(1.8rem, 7vw, 2.6rem);
      }
    }

    h2 {
      font-family: Georgia, "Times New Roman", serif;
      font-size: clamp(1.6rem, 2vw, 2.1rem);
      letter-spacing: -0.03em;
      color: #26312c;
    }

    h3 { font-size: 1rem; color: #314039; margin-top: 18px; }

    p { margin: 0 0 14px; max-width: 70ch; }

    .hero-lead { color: var(--text-soft); font-size: 1.03rem; }

    .hero-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 12px;
      margin-top: 22px;
    }

    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 46px;
      padding: 0 20px;
      border-radius: 999px;
      border: 1px solid transparent;
      font-weight: 600;
      font-size: 14px;
      transition: 0.2s ease;
    }

    .btn-primary { background: var(--evergreen); color: #fff; }
    .btn-primary:hover { background: #53624f; }

    .btn-secondary {
      background: transparent;
      border-color: var(--border);
      color: var(--text);
    }

    .btn-secondary:hover { border-color: var(--border-strong); background: var(--surface-muted); }

    .hero-aside {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 14px;
      margin-top: 18px;
    }

    @media (max-width: 820px) {
      .hero-aside {
        grid-template-columns: 1fr;
      }
    }

    .hero-box {
      background: var(--soft-warm);
      border-radius: var(--radius-lg);
      border: 1px solid var(--surface-line);
      padding: 18px;
    }

    .hero-box__title {
      font-size: 13px;
      text-transform: uppercase;
      letter-spacing: 0.11em;
      margin-bottom: 8px;
      color: #4e5b52;
    }

    .section { padding-top: 20px; }

    .section-head {
      display: flex;
      justify-content: space-between;
      align-items: flex-end;
      gap: 18px;
      margin-bottom: 16px;
    }

    .section-text { color: var(--text-soft); max-width: 70ch; }

    .columns-2 {
      display: grid;
      grid-template-columns: 1.1fr 0.9fr;
      gap: 18px;
    }

    .card {
      background: var(--surface);
      border-radius: var(--radius-xl);
      border: 1px solid var(--surface-line);
      padding: 20px;
      box-shadow: var(--shadow);
    }

    .card--soft { background: var(--soft-warm); }

    ul { margin: 0; padding-left: 18px; }
    li { margin-bottom: 10px; }

    .services-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0,1fr));
      gap: 16px;
    }

    .service-card {
      background: var(--surface);
      border-radius: var(--radius-lg);
      border: 1px solid var(--surface-line);
      padding: 18px;
    }

    .pill {
      display: inline-flex;
      padding: 5px 10px;
      border-radius: 999px;
      font-size: 12px;
      border: 1px solid rgba(95,109,90,0.18);
      background: rgba(178, 190, 171, 0.16);
      margin-bottom: 10px;
    }

    .steps {
      display: grid;
      grid-template-columns: repeat(3, minmax(0,1fr));
      gap: 14px;
    }

    .step {
      background: var(--surface);
      border-radius: var(--radius-lg);
      border: 1px solid var(--surface-line);
      padding: 16px;
    }

    .step-num {
      font-size: 12px;
      text-transform: uppercase;
      letter-spacing: 0.13em;
      color: #4d5751;
      margin-bottom: 6px;
    }

    .faq-grid {
      display: grid;
      grid-template-columns: 1.1fr 0.9fr;
      gap: 18px;
    }

    .faq-item + .faq-item { border-top: 1px solid var(--surface-line); margin-top: 12px; padding-top: 12px; }

    .contact {
      margin-top: 24px;
      background: var(--surface);
      border-radius: var(--radius-xl);
      border: 1px solid var(--surface-line);
      padding: 22px;
      box-shadow: var(--shadow);
    }

    .form {
      display: grid;
      gap: 14px;
      margin-top: 12px;
    }

    .form-row {
      display: grid;
      gap: 6px;
    }

    label {
      font-size: 14px;
      color: var(--text-soft);
    }

    input, textarea {
      font-family: inherit;
      font-size: 14px;
      padding: 10px 12px;
      border-radius: 10px;
      border: 1px solid var(--surface-line);
      background: #fff;
      color: var(--text);
    }

    input:focus, textarea:focus {
      outline: none;
      border-color: var(--border-strong);
    }

    .form-note {
      font-size: 12px;
      color: var(--text-soft);
      margin: 0;
    }

    .contact-inner {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 18px;
      align-items: center;
    }

    .footer {
      padding-top: 22px;
      color: var(--text-soft);
      font-size: 14px;
    }

    @media (max-width: 980px) {
      .hero,
      .columns-2,
      .services-grid,
      .steps,
      .faq-grid,
      .contact-inner {
        grid-template-columns: 1fr;
      }
    }

    @media (max-width: 620px) {
      .page { padding-top: 12px; }
      .topbar { padding: 8px 0 16px; }
      .nav { gap: 8px 14px; font-size: 13.5px; }
      .hero-main,
      .card,
      .contact { padding: 18px; }
      .hero-actions { flex-direction: column; }
      .btn { width: 100%; }
    }

/* ===== Дополнительные стили для страницы "Программы и цены" ===== */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  font-size: 14px;
  color: var(--text-soft);
}

.back-link:hover {
  color: var(--text);
}

.card-note {
  color: var(--text-soft);
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.program-list {
  display: grid;
  gap: 18px;
}

.program-card {
  display: grid;
  grid-template-columns: 1fr 270px;
  gap: 18px;
  background: var(--surface);
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-xl);
  padding: 22px;
  box-shadow: var(--shadow);
}

.program-content {
  min-width: 0;
}

.program-badge {
  display: inline-flex;
  width: fit-content;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(95,109,90,0.14);
  background: rgba(182, 168, 190, 0.16);
  color: #435047;
  font-size: 14px;
  margin-bottom: 14px;
}

.program-badge--teen {
  background: rgba(178, 190, 171, 0.22);
}

.program-side {
  border-radius: var(--radius-lg);
  padding: 16px;
  border: 1px solid rgba(95,109,90,0.12);
  background: var(--surface-muted);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.program-side--lilac { background: rgba(182, 168, 190, 0.15); }
.program-side--apricot { background: rgba(215, 191, 174, 0.18); }
.program-side--sage { background: rgba(178, 190, 171, 0.22); }

.price {
  font-family: Georgia, serif;
  font-size: 2.2rem;
  line-height: 1;
  letter-spacing: -0.045em;
  color: #26312c;
  margin-bottom: 10px;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.soft-box {
  background: var(--surface-muted);
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-md);
  padding: 16px;
}

.contact-box {
  margin-top: 20px;
  background: var(--surface);
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
}

@media (max-width: 980px) {
  .program-card,
  .split,
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .program-card,
  .contact-box {
    padding: 18px;
  }
  .card-actions {
    flex-direction: column;
  }
}

/* ===== Подвал сайта ===== */

.footer__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px 20px;
}

.footer__row p {
  margin: 0;
}

.footer__link {
  color: var(--text-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 14px;
}

.footer__link:hover {
  color: var(--text);
}

@media (max-width: 620px) {
  .footer__row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ===== Соцсети как крупные цветные иконки (в блоке "Записаться") ===== */

.social-links {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: clamp(8px, 2.5vw, 16px);
  margin-top: 18px;
  max-width: 100%;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 1 auto;
  width: clamp(48px, 14vw, 64px);
  height: clamp(48px, 14vw, 64px);
  border-radius: clamp(14px, 4vw, 18px);
  background: var(--surface);
  border: 1px solid var(--surface-line);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.social-links a:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 30px rgba(61, 71, 58, 0.14);
}

.social-links img {
  width: 62%;
  height: 62%;
  border-radius: 10px;
  object-fit: contain;
  display: block;
}

/* ===== Стили страницы "Обо мне" (about.html) ===== */

.about-block {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 26px;
  align-items: start;
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--surface-line);
  padding: 26px;
  box-shadow: var(--shadow);
  margin-top: 4px;
}

.about-photo {
  border-radius: 18px;
  overflow: hidden;
  background: #d5c7ba;
  width: 100%;
  aspect-ratio: 3 / 4;
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-content {
  max-width: 100%;
}

.about-tag {
  display: inline-flex;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(95,109,90,0.18);
  background: rgba(178, 190, 171, 0.16);
  font-size: 13px;
  color: #4a584f;
  margin-bottom: 12px;
}

.about-meta {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--soft-warm, #e1d3c2);
  border: 1px solid var(--surface-line);
  font-size: 14px;
  color: var(--text-soft);
}

.about-meta strong {
  color: var(--text);
}

.about-lists {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 14px;
}

@media (max-width: 820px) {
  .about-block {
    grid-template-columns: 1fr;
  }

  .about-photo {
    max-width: 220px;
    aspect-ratio: 3 / 4;
    margin: 0 auto;
  }
}

@media (max-width: 620px) {
  .about-block {
    padding: 18px;
  }
  .about-lists {
    grid-template-columns: 1fr;
  }
}


/* ===== Раздел «Полезные материалы» ===== */

.topics-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.topic-chip {
  display: inline-flex;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 14px;
  color: var(--text-soft);
  transition: 0.15s ease;
  max-width: 100%;
}

.topic-chip:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface-muted);
}

.topic {
  background: var(--surface);
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
  scroll-margin-top: 20px;
}

.topic-title {
  margin: 0 0 14px;
}

.topic-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.topic-list li {
  padding-left: 18px;
  position: relative;
}

.topic-list li::before {
  content: "\2192";
  position: absolute;
  left: 0;
  color: var(--evergreen);
  opacity: 0.6;
}

.topic-list a {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(95, 109, 90, 0.3);
  transition: 0.15s ease;
}

.topic-list a:hover {
  text-decoration-color: var(--evergreen);
}

.topic-more {
  margin-top: 14px;
  border-top: 1px solid var(--surface-line);
  padding-top: 14px;
}

.topic-more summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-soft);
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}

.topic-more summary::-webkit-details-marker { display: none; }

.topic-more summary::before {
  content: "\25B8";
  transition: transform 0.15s ease;
  display: inline-block;
}

.topic-more[open] summary::before {
  transform: rotate(90deg);
}

.topic-more summary:hover { color: var(--text); }

.topic-more[open] summary {
  margin-bottom: 12px;
}

.topic-more .topic-list:empty::after {
  content: "Скоро здесь появятся новые статьи.";
  color: var(--text-soft);
  font-size: 14px;
}

.topic-soon {
  color: var(--text-soft);
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.topic-soon em {
  font-style: normal;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-muted);
  border: 1px solid var(--surface-line);
}

/* ===== Страница статьи ===== */

.article {
  background: var(--surface);
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-xl);
  padding: 34px;
  box-shadow: var(--shadow);
  max-width: 760px;
}

.article-head {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--surface-line);
}

.article-head h1 {
  margin: 10px 0 6px;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  max-width: none;
}

.article-meta {
  margin: 0;
  font-size: 14px;
  color: var(--text-soft);
}

.article h2 {
  margin-top: 28px;
  font-size: 1.4rem;
}

.article h3 {
  margin-top: 20px;
}

.article p {
  margin: 0 0 16px;
}

.article ul {
  margin: 0 0 16px;
  padding-left: 22px;
}

.article li {
  margin-bottom: 8px;
}

.article img {
  margin: 18px 0;
  border-radius: var(--radius-lg);
}

.article-callout {
  margin: 22px 0;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: var(--soft-warm, #e1d3c2);
  border: 1px solid var(--surface-line);
  border-left: 3px solid var(--evergreen);
}

.article--legal {
  max-width: 900px;
  font-size: 15px;
}

.article--legal h2 {
  font-size: 1.2rem;
  margin-top: 30px;
}

.article--legal h3 {
  font-size: 1.02rem;
}

.article--legal p,
.article--legal li {
  color: var(--text-soft);
}

@media (max-width: 620px) {
  .article,
  .topic {
    padding: 18px;
  }
  .topic-chip {
    font-size: 13px;
    padding: 8px 12px;
  }
}

/* ===== Защита от горизонтальной прокрутки ===== */

.page,
.container,
main,
section {
  max-width: 100%;
}

.hero,
.hero-main,
.hero-aside,
.columns-2,
.services-grid,
.faq-grid,
.contact-grid,
.contact-inner,
.program-card,
.split,
.about-block,
.about-lists {
  min-width: 0;
}

.hero > *,
.columns-2 > *,
.services-grid > *,
.faq-grid > *,
.contact-grid > *,
.contact-inner > *,
.program-card > *,
.split > *,
.about-block > *,
.about-lists > * {
  min-width: 0;
}

.card,
.service-card,
.soft-box,
.program-side,
.contact-box,
.hero-box {
  max-width: 100%;
}

/* ============================================================
   НОВОЕ: картинка в начале статьи и картинки внутри текста
   ============================================================ */

.article-hero {
  margin: 0 0 26px;
}

.article-hero img {
  width: 100%;
  height: auto;
  aspect-ratio: 40 / 21;
  object-fit: cover;
  border-radius: var(--radius-lg);
  display: block;
}

.article-hero figcaption,
.article-figure figcaption {
  margin-top: 8px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-soft);
  text-align: center;
}

/* Выключатель картинки: класс is-off убирает её,
   не удаляя разметку из статьи. */
.article-hero.is-off,
.article-figure.is-off {
  display: none;
}

.article-figure {
  margin: 24px 0;
}

.article-figure img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  display: block;
  margin: 0;
}

@media (max-width: 620px) {
  .article-hero {
    margin-bottom: 20px;
  }
  .article-hero img {
    aspect-ratio: 3 / 2;
    border-radius: var(--radius-md);
  }
}
