/* Бережный ассистент: один файл стилей. Токены, база, компоненты, страницы, адаптив. */

/* ---------- 1. Токены ---------- */
:root {
  color-scheme: light dark;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --fs-11: 11px; --fs-12: 12px; --fs-13: 13px; --fs-15: 15px; --fs-17: 17px;
  --fs-21: 21px; --fs-28: 28px; --fs-40: 40px; --fs-56: 56px;
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px;
  --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px; --s-20: 80px;

  --bg: #f5f5f7;
  --surface: #ffffff;
  --fill: #f2f2f4;
  --fill-hover: #e8e8ed;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #737378;
  --sep: rgba(0, 0, 0, .08);
  --sep-strong: rgba(0, 0, 0, .14);
  --nav-bg: rgba(251, 251, 253, .72);

  /* спокойный шалфейно-бирюзовый акцент: белый текст на нём проходит AA */
  --accent: #2e7d6f;
  --accent-hover: #286f63;
  --accent-press: #22635a;
  --accent-text: #24695d;
  --accent-soft: rgba(46, 125, 111, .09);
  --accent-ring: rgba(46, 125, 111, .24);
  --on-accent: #ffffff;

  --green: #2e9b5f;
  --green-soft: rgba(46, 155, 95, .12);
  --green-text: #1f7a48;
  --orange: #c77c12;
  --orange-soft: rgba(255, 159, 10, .14);
  --orange-text: #8a5300;
  --red: #c9463d;
  --red-text: #b3261e;
  --red-soft: rgba(201, 70, 61, .08);
  --red-ring: rgba(201, 70, 61, .2);

  --r-card: 22px;
  --r-big: 28px;
  --r-tile: 14px;
  --r-field: 12px;
  --r-pill: 999px;
  --sh-1: 0 1px 2px rgba(0, 0, 0, .04);
  --sh-2: 0 1px 2px rgba(0, 0, 0, .04), 0 10px 30px rgba(0, 0, 0, .06);

  --ease: cubic-bezier(.25, .1, .25, 1);
  --t-fast: 150ms;
  --t: 220ms;
  --container: 1080px;
  --gutter: 24px;
  --nav-h: 52px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #1c1c1e;
    --fill: #2c2c2e;
    --fill-hover: #3a3a3c;
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --text-3: #8e8e93;
    --sep: rgba(255, 255, 255, .1);
    --sep-strong: rgba(255, 255, 255, .18);
    --nav-bg: rgba(22, 22, 23, .72);

    --accent: #5ec4b0;
    --accent-hover: #74d0be;
    --accent-press: #4bb19d;
    --accent-text: #6fd2be;
    --accent-soft: rgba(94, 196, 176, .14);
    --accent-ring: rgba(94, 196, 176, .32);
    --on-accent: #062a23;

    --green: #30d158;
    --green-soft: rgba(48, 209, 88, .16);
    --green-text: #4cd877;
    --orange: #ffb340;
    --orange-soft: rgba(255, 179, 64, .14);
    --orange-text: #ffc266;
    --red: #ff6961;
    --red-text: #ff8a83;
    --red-soft: rgba(255, 105, 97, .12);
    --red-ring: rgba(255, 105, 97, .3);
    --sh-1: none;
    --sh-2: none;
  }
}

/* ---------- 2. База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font-family: var(--font); font-size: var(--fs-17); line-height: 1.47; letter-spacing: -0.022em;
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
h1, h2, h3, p { margin: 0; }
h1, h2 { text-wrap: balance; }
p { text-wrap: pretty; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent-ring); }
img { max-width: 100%; }
.icon { width: 20px; height: 20px; flex: none; }
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.pre { white-space: pre-line; }
.muted { color: var(--text-2); }
.small { font-size: var(--fs-13); letter-spacing: -0.01em; }
.tiny { font-size: var(--fs-12); letter-spacing: 0; }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.mt-2 { margin-top: var(--s-2); } .mt-3 { margin-top: var(--s-3); } .mt-4 { margin-top: var(--s-4); }
.mt-6 { margin-top: var(--s-6); } .mt-8 { margin-top: var(--s-8); }
.hidden { display: none !important; }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.narrow { max-width: calc(680px + var(--gutter) * 2); }
.main { flex: 1; padding-bottom: var(--s-16); }
.skip { position: absolute; left: var(--s-4); top: -100px; z-index: 100; padding: var(--s-2) var(--s-4); border-radius: var(--r-pill); background: var(--surface); box-shadow: var(--sh-2); }
.skip:focus { top: var(--s-2); }

/* ---------- 3. Навигация ---------- */
.demo-bar { background: var(--orange-soft); color: var(--orange-text); font-size: var(--fs-13); text-align: center; padding: 6px var(--gutter); letter-spacing: -0.01em; }
.nav { position: sticky; top: 0; z-index: 50; background: var(--nav-bg); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); border-bottom: 1px solid var(--sep); }
.nav__row { height: var(--nav-h); display: flex; align-items: center; gap: var(--s-4); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); min-width: 0; }
.brand:hover { text-decoration: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand__name { font-size: var(--fs-17); font-weight: 600; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand__sub { font-size: var(--fs-11); color: var(--text-2); letter-spacing: 0; }
.logo-mark { display: block; flex: none; }
.nav__links { display: flex; gap: var(--s-1); margin-left: auto; align-items: center; }
.nav__links a { padding: 6px 12px; border-radius: var(--r-pill); font-size: var(--fs-13); color: var(--text-2); letter-spacing: -0.01em; transition: color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease); }
.nav__links a:hover { color: var(--text); text-decoration: none; }
.nav__links a[aria-current="page"] { color: var(--text); background: var(--fill); font-weight: 500; }
.nav__cta { margin-left: var(--s-2); }

/* ---------- 4. Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  height: 46px; padding: 0 var(--s-6); max-width: 100%;
  font: inherit; font-size: var(--fs-17); font-weight: 500; letter-spacing: -0.02em; text-align: center;
  border: 0; border-radius: var(--r-pill); cursor: pointer; color: var(--text); background: var(--fill);
  transition: background-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.btn:hover { text-decoration: none; background: var(--fill-hover); }
.btn:active { transform: scale(.98); }
.btn .icon { width: 18px; height: 18px; }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--primary:active { background: var(--accent-press); }
.btn--ghost { background: transparent; box-shadow: inset 0 0 0 1px var(--sep-strong); }
.btn--ghost:hover { background: var(--fill); }
.btn--danger { background: var(--red-soft); color: var(--red-text); }
.btn--danger:hover { background: var(--red-ring); }
.btn--sm { height: 34px; padding: 0 var(--s-4); font-size: var(--fs-15); }
.btn--xs { height: 30px; padding: 0 12px; font-size: var(--fs-13); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-text); cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.inline { display: inline; }

/* ---------- 5. Карточки, секции ---------- */
.card { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-1); padding: var(--s-8); min-width: 0; }
.card--tight { padding: var(--s-5) var(--s-6); }
.card + .card { margin-top: var(--s-4); }
/* в сетках расстояние задаёт gap, иначе карточки в одном ряду съезжают */
:is(.grid, .split-2, .plans) > .card + .card { margin-top: 0; }
.card__title { font-size: var(--fs-21); font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.card__lead { color: var(--text-2); margin-top: var(--s-2); font-size: var(--fs-15); }
.section { padding-top: var(--s-16); }
.section__head { margin-bottom: var(--s-6); max-width: 680px; }
.eyebrow { font-size: var(--fs-15); font-weight: 600; color: var(--accent-text); letter-spacing: -0.01em; margin-bottom: var(--s-2); }
.h1 { font-size: var(--fs-56); line-height: 1.07; font-weight: 600; letter-spacing: -0.03em; }
.h2 { font-size: var(--fs-40); line-height: 1.1; font-weight: 600; letter-spacing: -0.03em; }
.h3 { font-size: var(--fs-21); line-height: 1.25; font-weight: 600; letter-spacing: -0.02em; }
.lead { font-size: var(--fs-21); line-height: 1.38; color: var(--text-2); letter-spacing: -0.02em; margin-top: var(--s-4); max-width: 640px; }
.grid { display: grid; gap: var(--s-4); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s-6); align-items: start; }
.sticky { position: sticky; top: calc(var(--nav-h) + var(--s-6)); }

.hero { padding-top: var(--s-16); padding-bottom: var(--s-8); }
.hero .btn-row { margin-top: var(--s-8); }
.feature { display: flex; flex-direction: column; gap: var(--s-2); }
.feature__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; color: var(--accent-text); background: var(--accent-soft); margin-bottom: var(--s-2); }
.feature__icon .icon { width: 22px; height: 22px; }
.feature__title { font-size: var(--fs-17); font-weight: 600; }
.feature__text { font-size: var(--fs-15); color: var(--text-2); line-height: 1.5; }
.not-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-3); }
.not-list li { display: flex; gap: var(--s-3); align-items: flex-start; font-size: var(--fs-17); }
.not-list .icon { color: var(--red-text); margin-top: 3px; }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-3); }
.check-list li { display: flex; gap: var(--s-3); align-items: flex-start; }
.check-list .icon { color: var(--accent-text); margin-top: 3px; }

/* пример расчёта */
.calc-example { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-3); margin-top: var(--s-6); }
.stat { background: var(--fill); border-radius: var(--r-tile); padding: var(--s-4) var(--s-5); min-width: 0; }
.stat__value { font-size: var(--fs-28); font-weight: 600; letter-spacing: -0.025em; line-height: 1.15; }
.stat__label { font-size: var(--fs-13); color: var(--text-2); margin-top: 2px; }
.stat--accent { background: var(--accent-soft); }
.stat--accent .stat__value { color: var(--accent-text); }
.footnote { font-size: var(--fs-13); color: var(--text-2); margin-top: var(--s-4); }

/* тарифы */
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-4); }
.plans--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.plan { display: flex; flex-direction: column; gap: var(--s-3); }
.plan--featured { box-shadow: inset 0 0 0 2px var(--accent), var(--sh-2); }
.plan__name { font-size: var(--fs-17); font-weight: 600; }
.plan__price { font-size: var(--fs-28); font-weight: 600; letter-spacing: -0.025em; }
.plan__price small { font-size: var(--fs-15); color: var(--text-2); font-weight: 400; }
.plan__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: var(--fs-15); color: var(--text-2); }
.plan__note { font-size: var(--fs-13); color: var(--text-2); }
.plan .btn { margin-top: auto; height: auto; min-height: 34px; padding-block: 6px; line-height: 1.25; }
.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 10px; border-radius: var(--r-pill); font-size: var(--fs-12); font-weight: 500; letter-spacing: 0; background: var(--fill); color: var(--text-2); white-space: nowrap; }
.badge--accent { background: var(--accent-soft); color: var(--accent-text); }
.badge--green { background: var(--green-soft); color: var(--green-text); }
.badge--orange { background: var(--orange-soft); color: var(--orange-text); }
.badge--red { background: var(--red-soft); color: var(--red-text); }

/* частые вопросы */
.faq { display: grid; gap: var(--s-2); }
.faq details { background: var(--surface); border-radius: var(--r-tile); box-shadow: var(--sh-1); padding: 0 var(--s-5); }
.faq summary { cursor: pointer; list-style: none; padding: var(--s-4) 0; font-weight: 500; display: flex; justify-content: space-between; gap: var(--s-3); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--text-2); font-size: var(--fs-21); line-height: 1; transition: transform var(--t) var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding-bottom: var(--s-4); color: var(--text-2); font-size: var(--fs-15); white-space: pre-line; }

/* ---------- 6. Плашки ---------- */
.notice { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-4) var(--s-5); border-radius: var(--r-tile); background: var(--fill); font-size: var(--fs-15); line-height: 1.45; }
.notice .icon { margin-top: 1px; }
.notice--safety { background: var(--red-soft); }
.notice--safety .icon { color: var(--red-text); }
.notice--warn { background: var(--orange-soft); }
.notice--warn .icon { color: var(--orange-text); }
.notice--ok { background: var(--green-soft); }
.notice--ok .icon { color: var(--green-text); }
.notice--accent { background: var(--accent-soft); }
.notice--accent .icon { color: var(--accent-text); }
.notice + .notice { margin-top: var(--s-2); }
.notice__title { font-weight: 600; }
.stack > * + * { margin-top: var(--s-3); }

/* ---------- 7. Формы ---------- */
.field { margin-top: var(--s-5); min-width: 0; }
.field:first-child { margin-top: 0; }
.label { display: block; margin-bottom: var(--s-2); font-size: var(--fs-15); font-weight: 600; letter-spacing: -0.01em; }
.label__opt { font-weight: 400; color: var(--text-3); margin-left: var(--s-1); }
.input, .select, .textarea {
  display: block; width: 100%; height: 46px; padding: 0 var(--s-4);
  font: inherit; font-size: var(--fs-17); letter-spacing: -0.02em; color: var(--text);
  background: var(--fill); border: 1px solid transparent; border-radius: var(--r-field); outline: none;
  -webkit-appearance: none; appearance: none;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.select { background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--sep-strong); }
.input:focus, .select:focus, .textarea:focus { background-color: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.textarea { height: auto; min-height: 110px; padding: var(--s-3) var(--s-4); line-height: 1.47; resize: vertical; }
.input--sm { height: 38px; font-size: var(--fs-15); }
[aria-invalid="true"] { border-color: var(--red) !important; }
.help { margin-top: 6px; font-size: var(--fs-13); color: var(--text-2); letter-spacing: -0.01em; }
.field-error { margin-top: 6px; font-size: var(--fs-13); color: var(--red-text); }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
.form-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-row .field { margin-top: var(--s-5); }
.check { display: flex; gap: var(--s-3); align-items: flex-start; cursor: pointer; font-size: var(--fs-15); }
.check input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); }
.radio-tiles { display: grid; gap: var(--s-2); }
.tile { position: relative; display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); min-height: 60px; border-radius: var(--r-tile); box-shadow: inset 0 0 0 1px var(--sep-strong); cursor: pointer; transition: box-shadow var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease); }
.tile:hover { background: var(--fill); }
.tile input { position: absolute; opacity: 0; pointer-events: none; }
.tile__body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.tile__title { font-size: var(--fs-15); font-weight: 500; }
.tile__meta { font-size: var(--fs-13); color: var(--text-2); }
.tile__dot { flex: none; width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--sep-strong); }
.tile:has(input:checked) { box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-soft); }
.tile:has(input:checked) .tile__dot { box-shadow: inset 0 0 0 6px var(--accent); }
.tile:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- 8. Запись: дни и время ---------- */
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--s-2); }
.day { position: relative; cursor: pointer; }
.day input { position: absolute; opacity: 0; pointer-events: none; }
.day__body { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 72px; border-radius: var(--r-tile); background: var(--fill); transition: background-color var(--t-fast) var(--ease); }
.day:hover .day__body { background: var(--fill-hover); }
.day__wd { font-size: var(--fs-12); color: var(--text-2); }
.day__num { font-size: var(--fs-21); font-weight: 600; line-height: 1.15; }
.day__mon { font-size: var(--fs-11); color: var(--text-3); }
.day input:checked + .day__body { background: var(--accent); color: var(--on-accent); }
.day input:checked + .day__body :is(.day__wd, .day__mon) { color: inherit; opacity: .85; }
.day input:focus-visible + .day__body { outline: 2px solid var(--accent); outline-offset: 2px; }
.day--off { cursor: not-allowed; }
.day--off .day__body, .day--off:hover .day__body { background: transparent; box-shadow: inset 0 0 0 1px var(--sep); }
.day--off .day__num { color: var(--text-3); font-weight: 400; }
.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: var(--s-2); min-height: 48px; }
.time { position: relative; cursor: pointer; }
.time input { position: absolute; opacity: 0; pointer-events: none; }
.time span { display: grid; place-items: center; height: 44px; border-radius: var(--r-field); background: var(--fill); font-size: var(--fs-15); font-weight: 500; transition: background-color var(--t-fast) var(--ease); }
.time:hover span { background: var(--fill-hover); }
.time input:checked + span { background: var(--accent); color: var(--on-accent); }
.time input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.tz-note { font-size: var(--fs-13); color: var(--text-2); margin-top: var(--s-3); }
.tz-hint { margin-top: var(--s-2); }
.slots-empty { padding: var(--s-5); border-radius: var(--r-tile); border: 1px dashed var(--sep-strong); color: var(--text-2); font-size: var(--fs-15); text-align: center; }
.step-title { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-4); }
.step-num { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--fill); font-size: var(--fs-13); font-weight: 600; color: var(--text-2); flex: none; }

/* итог / список */
.dl { margin: 0; }
.dl__row { display: flex; justify-content: space-between; gap: var(--s-4); padding: var(--s-3) 0; border-top: 1px solid var(--sep); }
.dl__row:last-child { border-bottom: 1px solid var(--sep); }
.dl__row dt { color: var(--text-2); font-size: var(--fs-13); flex: none; }
.dl__row dd { margin: 0; font-size: var(--fs-15); font-weight: 500; text-align: right; min-width: 0; overflow-wrap: anywhere; }

/* ---------- 9. Страница психолога ---------- */
.profile { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: var(--s-8); align-items: center; padding-top: var(--s-12); }
.avatar { width: 132px; height: 132px; border-radius: 50%; object-fit: cover; background: var(--accent-soft); display: block; }
.avatar--sm { width: 56px; height: 56px; }
.profile__name { font-size: var(--fs-40); line-height: 1.1; font-weight: 600; letter-spacing: -0.03em; }
.profile__title { color: var(--text-2); font-size: var(--fs-21); margin-top: var(--s-1); }
.service { display: flex; justify-content: space-between; gap: var(--s-4); padding: var(--s-4) 0; border-top: 1px solid var(--sep); }
.service:first-of-type { border-top: 0; }
.service__title { font-weight: 600; }
.service__meta { font-size: var(--fs-13); color: var(--text-2); margin-top: 2px; }
.service__desc { font-size: var(--fs-15); color: var(--text-2); margin-top: var(--s-1); }
.service__price { font-weight: 600; white-space: nowrap; }
.calc-result { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); margin-top: var(--s-5); }

/* ---------- 10. Чат ---------- */
.chat { display: flex; flex-direction: column; height: calc(100vh - var(--nav-h) - 160px); min-height: 460px; padding: 0; overflow: hidden; }
.chat__log { flex: 1; overflow-y: auto; padding: var(--s-6); display: flex; flex-direction: column; gap: var(--s-3); scroll-behavior: smooth; }
.bubble { max-width: 82%; padding: 10px 14px; border-radius: 20px; font-size: var(--fs-15); line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; animation: pop var(--t) var(--ease); }
.bubble--bot { align-self: flex-start; background: var(--fill); border-bottom-left-radius: 6px; }
.bubble--me { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 6px; }
.bubble--crisis { align-self: stretch; max-width: none; background: var(--red-soft); border-radius: var(--r-tile); box-shadow: inset 0 0 0 1px var(--red-ring); }
.bubble--concern { align-self: stretch; max-width: none; background: var(--orange-soft); border-radius: var(--r-tile); }
.bubble--system { align-self: stretch; max-width: none; background: var(--accent-soft); border-radius: var(--r-tile); }
.bubble--limit { align-self: stretch; max-width: none; background: var(--orange-soft); border-radius: var(--r-tile); }
.typing { align-self: flex-start; color: var(--text-2); font-size: var(--fs-13); }
.chat__buttons { display: flex; flex-wrap: wrap; gap: var(--s-2); padding: 0 var(--s-6) var(--s-3); }
.chip-btn { height: 36px; padding: 0 var(--s-4); border-radius: var(--r-pill); border: 0; background: var(--accent-soft); color: var(--accent-text); font: inherit; font-size: var(--fs-15); font-weight: 500; cursor: pointer; transition: background-color var(--t-fast) var(--ease); max-width: 100%; }
.chip-btn:hover { background: var(--accent-ring); }
.chip-btn--help { background: var(--red-soft); color: var(--red-text); }
.chat__form { display: flex; gap: var(--s-2); padding: var(--s-3) var(--s-4); border-top: 1px solid var(--sep); background: var(--surface); }
.chat__form .textarea { min-height: 46px; height: 46px; resize: none; border-radius: 23px; padding: 11px var(--s-4); }
.chat__send { flex: none; width: 46px; height: 46px; padding: 0; }
.chat__meta { display: flex; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; margin-top: var(--s-3); font-size: var(--fs-13); color: var(--text-2); }
@keyframes pop { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- 11. Тест ---------- */
.question { padding: var(--s-5) 0; border-top: 1px solid var(--sep); }
.question:first-of-type { border-top: 0; padding-top: 0; }
.question__text { font-weight: 600; margin-bottom: var(--s-3); }
.options { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.opt { position: relative; cursor: pointer; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt span { display: inline-flex; align-items: center; height: 38px; padding: 0 var(--s-4); border-radius: var(--r-pill); background: var(--fill); font-size: var(--fs-15); transition: background-color var(--t-fast) var(--ease); }
.opt:hover span { background: var(--fill-hover); }
.opt input:checked + span { background: var(--accent); color: var(--on-accent); }
.opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.score { font-size: var(--fs-56); font-weight: 600; letter-spacing: -0.03em; color: var(--accent-text); line-height: 1; }

/* ---------- 12. Результат, документ ---------- */
.result { text-align: center; padding: var(--s-10) var(--s-8); }
.result__icon { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--green); color: #fff; }
.result__icon .icon { width: 32px; height: 32px; stroke-width: 2.2; }
.result__icon--warn { background: var(--orange); }
.result__icon--muted { background: var(--fill); color: var(--text-2); }
.result__title { margin-top: var(--s-5); font-size: var(--fs-40); line-height: 1.1; font-weight: 600; letter-spacing: -0.03em; }
.result__lead { margin: var(--s-3) auto 0; max-width: 460px; color: var(--text-2); }
.result .btn-row { justify-content: center; margin-top: var(--s-8); }
.prose h2 { font-size: var(--fs-21); font-weight: 600; letter-spacing: -0.02em; margin: var(--s-8) 0 var(--s-2); }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--text); line-height: 1.6; }
.prose p + p { margin-top: var(--s-3); }
.page-head { padding-top: var(--s-10); padding-bottom: var(--s-6); }
.back { display: inline-flex; align-items: center; gap: 2px; font-size: var(--fs-15); margin-bottom: var(--s-3); }
.back .icon { width: 18px; height: 18px; }

/* ---------- 13. Кабинет ---------- */
.cab { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--s-8); padding-top: var(--s-8); align-items: start; }
.tabs { display: flex; flex-direction: column; gap: 2px; position: sticky; top: calc(var(--nav-h) + var(--s-6)); }
.tabs a { display: flex; align-items: center; gap: var(--s-3); padding: 9px 12px; border-radius: var(--r-field); color: var(--text-2); font-size: var(--fs-15); font-weight: 500; }
.tabs a:hover { background: var(--fill); color: var(--text); text-decoration: none; }
.tabs a[aria-current="page"] { background: var(--surface); color: var(--text); box-shadow: var(--sh-1); }
.tabs .icon { width: 18px; height: 18px; }
.tabs__count { margin-left: auto; }
.cab__head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s-4); flex-wrap: wrap; margin-bottom: var(--s-6); }
.cab__title { font-size: var(--fs-28); font-weight: 600; letter-spacing: -0.025em; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-3); }
.meter { display: grid; gap: 6px; }
.meter__row { display: flex; justify-content: space-between; font-size: var(--fs-13); color: var(--text-2); gap: var(--s-2); }
progress.bar { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border: 0; border-radius: 4px; background: var(--fill); overflow: hidden; }
progress.bar::-webkit-progress-bar { background: var(--fill); border-radius: 4px; }
progress.bar::-webkit-progress-value { background: var(--accent); border-radius: 4px; }
progress.bar::-moz-progress-bar { background: var(--accent); border-radius: 4px; }
progress.bar--hot::-webkit-progress-value { background: var(--orange); }
progress.bar--hot::-moz-progress-bar { background: var(--orange); }
.todo { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.todo a { display: flex; gap: var(--s-3); align-items: center; padding: 8px 10px; border-radius: var(--r-field); color: var(--text); font-size: var(--fs-15); }
.todo a:hover { background: var(--fill); text-decoration: none; }
.todo__mark { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--sep-strong); flex: none; }
.todo__mark .icon { width: 14px; height: 14px; stroke-width: 2.4; opacity: 0; }
.todo .is-done .todo__mark { background: var(--accent); box-shadow: none; color: var(--on-accent); }
.todo .is-done .todo__mark .icon { opacity: 1; }
.todo .is-done span:last-child { color: var(--text-2); text-decoration: line-through; }

.table-wrap { overflow-x: auto; margin: 0 calc(var(--s-8) * -1); padding: 0 var(--s-8); }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-15); }
.table th { text-align: left; font-size: var(--fs-12); font-weight: 500; color: var(--text-2); padding: 8px 10px; border-bottom: 1px solid var(--sep); letter-spacing: 0; white-space: nowrap; }
.table td { padding: 12px 10px; border-bottom: 1px solid var(--sep); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table td.r, .table th.r { text-align: right; }
.table a.rowlink { color: var(--text); font-weight: 500; }
.day-head { font-size: var(--fs-15); font-weight: 600; margin: var(--s-6) 0 var(--s-2); }
.day-head:first-child { margin-top: 0; }
.bk { display: flex; gap: var(--s-4); align-items: center; padding: var(--s-3) 0; border-top: 1px solid var(--sep); flex-wrap: wrap; }
.bk__time { font-weight: 600; width: 56px; flex: none; }
.bk__main { flex: 1; min-width: 180px; }
.bk__actions { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: var(--fs-21); letter-spacing: .12em; background: var(--fill); padding: 6px 12px; border-radius: var(--r-field); display: inline-block; }
.copy { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: var(--fs-13); background: var(--fill); padding: 8px 12px; border-radius: var(--r-field); overflow-wrap: anywhere; display: block; }
.hours { display: grid; gap: var(--s-2); }
.hours__row { display: grid; grid-template-columns: 150px 1fr 1fr; gap: var(--s-3); align-items: center; }
.toolbar { display: flex; gap: var(--s-2); flex-wrap: wrap; align-items: center; }
.seg { display: inline-flex; background: var(--fill); padding: 3px; border-radius: var(--r-pill); gap: 2px; }
.seg a { padding: 6px 14px; border-radius: var(--r-pill); font-size: var(--fs-13); color: var(--text-2); font-weight: 500; }
.seg a:hover { text-decoration: none; color: var(--text); }
.seg a[aria-current="page"] { background: var(--surface); color: var(--text); box-shadow: var(--sh-1); }
.split-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-4); }

/* ---------- 14. Подвал ---------- */
.foot { border-top: 1px solid var(--sep); }
.foot__row { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); flex-wrap: wrap; padding-top: var(--s-5); padding-bottom: var(--s-5); font-size: var(--fs-12); color: var(--text-2); letter-spacing: 0; }
.foot a { color: var(--text-2); }
.foot a:hover { color: var(--text); }
.foot__safety { color: var(--text); font-weight: 500; }

/* ---------- 15. Адаптив ---------- */
@media (max-width: 960px) {
  .split, .cab { grid-template-columns: minmax(0, 1fr); }
  .sticky, .tabs { position: static; }
  .tabs { flex-direction: row; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 4px; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a { white-space: nowrap; }
  .plans, .grid--4, .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calc-example { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .h1 { font-size: var(--fs-40); }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .nav__links a:not(.nav__cta) { display: none; }
  .hero { padding-top: var(--s-10); }
  .h1 { font-size: var(--fs-28); line-height: 1.14; letter-spacing: -0.025em; }
  .h2 { font-size: var(--fs-28); }
  .lead { font-size: var(--fs-17); }
  .section { padding-top: var(--s-12); }
  .card { padding: var(--s-5) var(--s-4); border-radius: var(--r-card); }
  .table-wrap { margin: 0 calc(var(--s-4) * -1); padding: 0 var(--s-4); }
  .grid--2, .grid--3, .split-2, .form-row, .form-row--3, .calc-result { grid-template-columns: minmax(0, 1fr); }
  .plans, .kpis { grid-template-columns: minmax(0, 1fr); }
  .profile { grid-template-columns: minmax(0, 1fr); gap: var(--s-4); padding-top: var(--s-8); text-align: center; justify-items: center; }
  .profile .btn-row { justify-content: center; }
  .profile__name { font-size: var(--fs-28); }
  .days { display: flex; overflow-x: auto; margin: 0 calc(var(--s-4) * -1); padding: 0 var(--s-4) 4px; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .days::-webkit-scrollbar { display: none; }
  .day { flex: 0 0 56px; scroll-snap-align: start; }
  .times { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hours__row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hours__row .check { grid-column: 1 / -1; }
  .result { padding: var(--s-8) var(--s-4); }
  .result__title { font-size: var(--fs-28); }
  .result .btn-row { flex-direction: column; }
  .result .btn-row .btn, .result .btn-row form { width: 100%; }
  .chat { height: calc(100svh - var(--nav-h) - 210px); min-height: 380px; border-radius: var(--r-tile); }
  .chat__log { padding: var(--s-4); }
  .chat__buttons { padding: 0 var(--s-4) var(--s-3); }
  .bubble { max-width: 92%; }
  .foot__row { flex-direction: column; align-items: flex-start; gap: var(--s-2); }
  .cab__title { font-size: var(--fs-21); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; scroll-behavior: auto !important; }
}
@media print {
  .nav, .foot, .demo-bar, .no-print { display: none !important; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; padding: 0; }
}
svg.avatar { color: var(--accent-text); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; }
.nav__links a.btn--primary, .nav__links a.btn--primary:hover { color: var(--on-accent); background: var(--accent); padding: 0 12px; }
.nav__links a.btn--primary:hover { background: var(--accent-hover); }
