/* Публичный слой: общая разметка и три темы (A/B/C). Токены переключаются атрибутом data-theme. */
:root {
  --bg: #F4F6F4; --card: #FFFFFF; --text: #2C3530; --muted: #6B756F;
  --line: #DDE3DD; --accent: #5C8674; --accent-text: #FFFFFF; --soft: #E8F0EC;
  --warn: #B07924; --radius: 16px; --radius-btn: 100px; --serif: Lora, Georgia, serif;
  --sans: Inter, -apple-system, "Segoe UI", Roboto, sans-serif; --editor-bg: #F0EDE6;
  --internal-bg: #2C3F36; --internal-text: #E8F0EC; --editor-title: var(--text);
  --shadow: 0 1px 2px rgba(44, 53, 48, .04);
}
:root[data-theme="b"] {
  --bg: #F0EDE6; --card: #FBF9F5; --text: #2C3F36; --muted: #6B756F;
  --line: #D8D2C6; --accent: #5C8674; --soft: #F4F0E8; --radius: 2px; --radius-btn: 6px;
  --shadow: none; --editor-bg: #F8F6F1; --internal-bg: #2C3F36;
}
:root[data-theme="c"] {
  --bg: #F4F6F4; --card: #FFFFFF; --text: #2C3530; --muted: #6B756F;
  --line: #DDE3DD; --accent: #5C8674; --soft: #E8F0EC; --radius: 14px; --radius-btn: 100px;
  --editor-bg: #F0EDE6; --editor-title: #A45F72; --internal-bg: #2C3F36;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.2; }
h1 { font-size: clamp(34px, 5vw, 48px); margin: 0 0 18px; }
h2 { font-size: 28px; margin: 0 0 20px; }
h3 { font-size: 20px; margin: 0 0 10px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.lead { font-family: var(--serif); font-style: italic; font-size: 20px; line-height: 1.55; color: var(--muted); }
.lead--short { max-width: 640px; font-size: 18px; margin-bottom: 24px; }
.price { font-weight: 500; margin-top: 8px; }

/* Верхняя полоса внутреннего слоя — включается только в теме C (гибрид по слоям). */
.layer-banner { display: none; background: var(--internal-bg); color: var(--internal-text); font-size: 12px; }
.layer-banner .wrap { display: flex; justify-content: space-between; gap: 16px; padding-top: 8px; padding-bottom: 8px; }
.layer-banner b { color: #A8DCC4; font-weight: 500; }
.layer-banner a { color: #A8DCC4; text-decoration: none; }
html[data-theme="c"] .layer-banner { display: block; }
html[data-theme="c"] { --editor-bg: #F7EFE8; --editor-title: #A45F72; }
html[data-theme="c"] .mother { background: #F9EDF0; }

.top { background: var(--card); border-bottom: 1px solid var(--line); }
.top__inner { display: flex; align-items: center; gap: 24px; padding-top: 16px; padding-bottom: 16px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 9px; font: 500 25px var(--serif); text-decoration: none; white-space: nowrap; }
.brand__cap { width: 18px; height: 11px; border: 2px solid currentColor; border-bottom: 0; border-radius: 2px 2px 0 0; transform: rotate(-8deg); position: relative; }
.brand__cap:after { content: ""; position: absolute; right: -5px; top: -5px; width: 4px; height: 4px; background: var(--accent); border-radius: 50%; }
.nav { display: flex; gap: 20px; flex: 1; flex-wrap: wrap; }
.nav a { color: var(--muted); text-decoration: none; font-size: 14px; padding-bottom: 2px; border-bottom: 1px solid transparent; }
.nav a:hover, .nav a.active { color: var(--text); border-color: var(--accent); }
.top__actions { display: flex; gap: 8px; }

.btn { display: inline-block; font: 500 14px var(--sans); padding: 12px 22px; border-radius: var(--radius-btn); border: 1px solid transparent; cursor: pointer; text-decoration: none; text-align: center; }
.btn--primary { background: var(--accent); color: var(--accent-text); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn--lg { padding: 14px 28px; font-size: 15px; }
.link { color: var(--accent); text-decoration: none; border-bottom: 1px solid currentColor; font-size: 14px; }

.hero { padding: 64px 0 56px; }
.hero__inner { display: grid; grid-template-columns: 1.4fr .6fr; gap: 48px; align-items: start; }
.hero__text { max-width: 720px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 34px; }
.metrics { display: flex; gap: 32px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.metrics b { display: block; color: var(--text); font: 500 22px var(--serif); }
.hero__note h2 { font-size: 20px; }
.hero__note p { font-size: 14px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.section { padding: 24px 0 56px; }
.section__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 20px; }
.topics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.topic { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-decoration: none; min-height: 130px; }
.topic h3 { margin: 16px 0 4px; font-size: 18px; }
.topic__mark { display: block; width: 30px; height: 30px; border-radius: 50%; background: #E8D2D0; }
.topic-anxiety .topic__mark { background: #D2DCE5; }
.topic-self .topic__mark { background: #E8DDC2; }
.topic-mother .topic__mark { background: #D48498; box-shadow: 0 0 0 4px #F6E7EB; }
.topic-trauma .topic__mark { background: #D8D0DC; }
.topic-identity .topic__mark { background: #D2DDD0; }

.people { display: grid; gap: 12px; }
.people--grid { grid-template-columns: repeat(2, 1fr); }
.person-card { display: flex; align-items: center; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; text-decoration: none; box-shadow: var(--shadow); }
.avatar { width: 52px; height: 52px; flex: none; border-radius: 50%; background: linear-gradient(135deg, #DCE8E2, #B9D3C6); display: grid; place-items: center; font: 500 17px var(--serif); color: #3C5A4C; }
.avatar--lg { width: 96px; height: 96px; font-size: 28px; }
.person-card__body { display: grid; gap: 3px; min-width: 0; flex: 1; }
.person-card__price { font-size: 13px; color: var(--muted); white-space: nowrap; }
.status { font-size: 12px; }
.status.accent { color: var(--accent); }
.status.warn { color: var(--warn); }
.status.muted { color: var(--muted); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { font-size: 12px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }
.editor { background: var(--editor-bg); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 48px 0; }
.editor h2 { color: var(--editor-title); }
.articles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.articles--wide { grid-template-columns: repeat(2, 1fr); }
.article { min-height: 190px; }
.article h3 { font-size: 19px; line-height: 1.4; }
.kicker { display: inline-block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #A45F72; margin-bottom: 24px; }
.internal { background: var(--internal-bg); color: var(--internal-text); padding: 44px 0; }
.internal h2 { color: inherit; }
.internal p { color: #A8DCC4; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.chips span { border: 1px solid #4D6356; border-radius: 999px; padding: 8px 16px; font-size: 12px; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.pill { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 9px 16px; font-size: 13px; }
.pill--on { background: var(--soft); border-color: var(--accent); color: var(--accent); }
.profile__head { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.profile__head > div { flex: 1; min-width: 220px; }
.profile__cols { display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; margin: 16px 0; }
.edu { display: grid; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.prose { max-width: 760px; }
.prose h2 { margin-top: 28px; }
.mother { background: #FCF4F6; }
.mother h1 { color: #A45F72; }
.editor__card { margin: 24px 0; }

.footer { border-top: 1px solid var(--line); background: var(--card); }
.footer__inner { display: flex; justify-content: space-between; gap: 16px; padding-top: 24px; padding-bottom: 24px; color: var(--muted); font-size: 13px; }
.theme-switch { position: fixed; right: 16px; bottom: 16px; display: flex; align-items: center; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 5px 7px; box-shadow: 0 4px 16px rgba(0,0,0,.12); z-index: 10; }
.theme-switch__label { font-size: 11px; color: var(--muted); padding: 0 6px; }
.theme-switch button { border: 0; border-radius: 999px; background: none; font: 600 12px var(--sans); color: var(--muted); width: 28px; height: 28px; cursor: pointer; }
.theme-switch button[data-active="true"] { background: var(--accent); color: var(--accent-text); }

:root[data-theme="b"] .hero, :root[data-theme="b"] .section { padding-top: 56px; }
:root[data-theme="b"] .topics, :root[data-theme="b"] .articles { gap: 24px; }
:root[data-theme="b"] .topic { min-height: 160px; }
:root[data-theme="b"] .brand { font-size: 28px; }

@media (max-width: 860px) {
  .hero__inner, .profile__cols { grid-template-columns: 1fr; }
  .topics, .articles, .articles--wide, .people--grid { grid-template-columns: 1fr; }
  .nav { display: none; }
  .top__actions { margin-left: auto; }
}
