/* Психея — стили сайта. Токены перенесены из дизайн-макета Claude Design. */

:root {
  --ink: #10151b;
  --text: #1b2430;
  --muted-1: #3f4d5c;
  --muted-2: #5c6b7a;
  --muted-3: #8695a6;
  --line: #e3e8ee;
  --line-soft: #eef2f7;
  --line-strong: #cfd8e3;
  --blue: #6b2cff;
  --blue-dark: #3b0ea6;
  --blue-soft: #c58cff;
  --blue-line: #ead6ff;
  --blue-bg: #f3eaff;
  --blue-tint: #faf7ff;
  --grey-bg: #f6f8fa;
  --grey-2: #f1f4f8;
  --serif: 'Source Serif 4', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --sans: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --wrap: 1240px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); text-decoration: underline; }
::selection { background: var(--blue-line); }
input, button, textarea, select { font: inherit; color: inherit; }
img, svg { max-width: 100%; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.serif { font-family: var(--serif); }
.mono { font-family: var(--mono); }
.muted-2 { color: var(--muted-2); }
.muted-3 { color: var(--muted-3); }
.accent { color: var(--blue); }
.sep { color: #b9c6d6; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@keyframes psFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes psRise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes psPulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.6); opacity: .3; } }
@keyframes psBreath { 0%, 100% { transform: scale(.86); } 45% { transform: scale(1.14); } }

/* --- Кнопки, чипы, служебные элементы --- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; padding: 9px 15px; border-radius: 7px; border: 0;
  cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.btn:hover { text-decoration: none; }
.btn-sm { font-size: 13px; padding: 7px 12px; }
.btn-wide { width: 100%; padding: 12px; font-size: 15px; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-dark); color: #fff; }
.btn-dark { background: var(--ink); color: #fff; font-size: 13px; padding: 8px 14px; border-radius: 6px; }
.btn-dark:hover { background: var(--blue); color: #fff; }
.btn-soft { background: var(--blue-bg); color: var(--blue-dark); border: 1px solid var(--blue-line); font-size: 13px; padding: 8px 12px; border-radius: 6px; }
.btn-soft:hover { background: #e2edff; }
.btn-ghost { background: #fff; border: 1px solid var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.icon-button { width: 36px; padding-left: 0; padding-right: 0; }
.icon-button .ui-icon { width: 18px; height: 18px; }

.ui-icon { width: 1em; height: 1em; display: inline-block; flex: none; overflow: visible; color: currentColor; }
.search-icon { width: 18px; height: 18px; color: var(--muted-2); }
.search-icon-blue { color: #6b2cff; }

.chip {
  font-size: 13px; padding: 6px 11px; border-radius: 16px; background: #fff;
  border: 1px solid var(--line); color: var(--muted-1); cursor: pointer;
  white-space: nowrap; text-decoration: none;
  display: inline-flex; align-items: center; gap: 5px;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.chip:hover { border-color: var(--blue); color: var(--blue); text-decoration: none; }
.chip.is-on { background: var(--blue-bg); border-color: var(--blue); color: var(--blue-dark); }
.chip-sm { font-size: 12px; padding: 5px 10px; border-radius: 14px; }
.chip-icon { width: 15px; height: 15px; color: #6b2cff; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }

.eyebrow {
  font-family: var(--mono); font-size: 11px; text-transform: uppercase;
  letter-spacing: .12em; color: var(--muted-2); font-weight: 500; margin: 0 0 12px;
}
.eyebrow-xs { font-size: 10px; }
.eyebrow-blue { color: var(--blue-dark); }
.eyebrow-lg { font-size: 13px; letter-spacing: .1em; }

.badge {
  font-size: 10px; background: var(--blue-bg); color: var(--blue-dark);
  border: 1px solid var(--blue-line); border-radius: 4px; padding: 1px 5px;
  text-transform: uppercase; letter-spacing: .06em; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 3px;
}
.badge .ui-icon { width: 11px; height: 11px; }
.badge-soft { background: var(--grey-2); color: var(--muted-1); border-color: var(--line); }

.card { border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.card-pad { padding: 16px; }
.link-sm { font-size: 13px; color: var(--blue); background: none; border: 0; padding: 0; cursor: pointer; }
.ring { width: 13px; height: 13px; border: 1.5px solid var(--muted-2); border-radius: 50%; display: block; flex: none; }
.ring-blue { border-color: var(--blue); width: 15px; height: 15px; }
.kbd { font-size: 11px; border: 1px solid #dde3ea; border-radius: 4px; padding: 1px 5px; background: #fff; color: var(--muted-2); cursor: pointer; }

.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--hue, #dfe7f1); color: #fff; font-size: 12px; font-weight: 600;
}
.avatar-sm { width: 34px; height: 34px; background: #dfe7f1; color: var(--muted-1); }
.avatar-accent { background: var(--blue-bg); color: var(--blue-dark); }
.avatar-empty { background: #dfe7f1; }
.avatar-lg { width: 52px; height: 52px; border-radius: 10px; font-size: 16px; }
.avatar-xl { width: 84px; height: 84px; border-radius: 12px; font-size: 24px; }

.tag-row { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { font-size: 12px; padding: 3px 9px; border-radius: 14px; background: var(--grey-2); color: var(--muted-1); white-space: nowrap; }
.tag-blue { background: #fff; border: 1px solid var(--blue-line); color: var(--blue-dark); padding: 4px 10px; }

.bar { display: block; height: 3px; border-radius: 2px; background: var(--line-soft); overflow: hidden; }
.bar-lg { height: 7px; border-radius: 4px; background: #e6edf6; }
.bar-xl { height: 9px; border-radius: 5px; }
.bar-fill {
  display: block; height: 100%; width: var(--w, 0); border-radius: inherit; background: var(--blue-soft);
}
@keyframes psGrow { from { width: 0; } }
@media (prefers-reduced-motion: no-preference) {
  .bar-fill { animation: psGrow .9s cubic-bezier(.2,.8,.2,1) var(--delay, 0ms) backwards; }
}
.bar-lg .bar-fill, .bar-xl .bar-fill { background: var(--blue); }
.bar-fill-soft { background: var(--blue-soft); }

.metric-head { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted-1); margin-bottom: 4px; }

/* --- Шапка --- */

.site-head {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.head-inner { padding: 10px 24px; min-height: 64px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.brand { display: flex; align-items: center; color: var(--ink); flex: 0 0 auto; }
.brand:hover { text-decoration: none; }
.brand-logo { display: block; width: 172px; height: auto; }
.head-nav { display: flex; gap: 4px; margin-left: 8px; white-space: nowrap; }
.head-nav a { padding: 7px 12px; border-radius: 6px; font-size: 14px; color: var(--ink); }
.head-nav a:hover { background: var(--grey-2); text-decoration: none; }
.head-nav a.is-active { background: var(--grey-2); }
.head-search {
  margin-left: auto; flex: 1 1 200px; min-width: 180px; max-width: 340px;
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  background: var(--grey-bg); border: 1px solid var(--line); border-radius: 8px;
  cursor: text; color: var(--muted-2); font-size: 14px;
}
.head-search:hover { border-color: #b9c6d6; background: #fff; }
.head-search-ph { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.head-actions { display: flex; align-items: center; gap: 8px; }

/* --- Подвал --- */

.site-foot { border-top: 1px solid var(--line); background: #f8fafc; margin-top: auto; }
.foot-inner { padding: 32px 24px; display: flex; gap: 24px; flex-wrap: wrap; align-items: center; }
.foot-note { font-size: 13px; color: var(--muted-2); max-width: 70ch; text-wrap: pretty; }
.foot-links { margin-left: auto; display: flex; gap: 16px; font-size: 13px; }

/* --- Главная --- */

.home { padding: 40px 24px 72px; display: grid; grid-template-columns: minmax(200px, 250px) minmax(320px, 1fr); gap: 40px; align-items: start; }
.home-side { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 28px; }
.topic-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.topic-row {
  display: grid; grid-template-columns: 28px minmax(0,1fr) auto; align-items: center; gap: 9px;
  padding: 10px 2px; border-bottom: 1px solid var(--line-soft); font-size: 14px; color: var(--ink);
}
.topic-row:hover { color: var(--blue); text-decoration: none; }
.topic-icon { width: 25px; height: 25px; color: #6b2cff; }
.topic-row-main { min-width: 0; }
.topic-name { display: block; }
.topic-row .bar { margin-top: 6px; }

.hero-title { font-size: 42px; line-height: 1.1; letter-spacing: -.025em; margin: 0 0 12px; max-width: 30ch; text-wrap: pretty; }
.hero-sub { font-size: 17px; line-height: 1.55; color: var(--muted-1); margin: 0 0 24px; max-width: 62ch; text-wrap: pretty; }
.hero-search {
  display: flex; align-items: center; gap: 10px; width: 100%; max-width: 620px;
  padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 10px;
  background: #fff; margin-bottom: 14px; cursor: text;
}
.hero-search:hover { border-color: var(--blue); }
.hero-search-ph { font-size: 15px; color: var(--muted-2); flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-main > .chip-row { margin-bottom: 40px; }

.week {
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 44px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.week-text { padding: 24px; border-right: 1px solid var(--line-soft); }
.week-title { font-size: 24px; line-height: 1.25; margin: 0 0 10px; letter-spacing: -.02em; text-wrap: pretty; }
.week-sub { font-size: 14px; line-height: 1.55; color: var(--muted-2); margin: 0 0 16px; text-wrap: pretty; }
.week-figure { padding: 24px; background: var(--blue-tint); display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.ring-chart { position: relative; width: 116px; height: 116px; flex: none; display: flex; align-items: center; justify-content: center; }
.ring-chart svg { width: 116px; height: 116px; transform: rotate(-90deg); }
.ring-progress { stroke-dashoffset: var(--offset); }
@keyframes psRing { from { stroke-dashoffset: 326.7; } }
@media (prefers-reduced-motion: no-preference) {
  .ring-progress { animation: psRing 1.2s cubic-bezier(.2,.8,.2,1) backwards; }
}
.ring-value { position: absolute; font-size: 26px; font-weight: 600; }
.week-bars { flex: 1; min-width: 170px; display: flex; flex-direction: column; gap: 10px; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--ink); padding-bottom: 8px; margin-bottom: 4px; }
.section-head .eyebrow { margin: 0; }
.latest { display: flex; flex-direction: column; }
.latest-row {
  display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 16px; align-items: baseline;
  padding: 16px 8px; border-bottom: 1px solid var(--line-soft); color: var(--ink);
}
.latest-row:hover { background: var(--blue-tint); text-decoration: none; }
.latest-title { display: block; font-size: 19px; font-weight: 600; line-height: 1.3; margin-bottom: 4px; text-wrap: pretty; }
.latest-meta { display: block; font-size: 13px; color: var(--muted-2); }
.format-tag { font-size: 11px; color: var(--blue); text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.format-tag .ui-icon { width: 18px; height: 18px; }

/* --- Каталог --- */

.page-title { font-size: 34px; margin: 32px 0 6px; letter-spacing: -.02em; }
.page-sub { font-size: 15px; color: var(--muted-2); margin: 0 0 28px; }
.page-sub-wide { max-width: 66ch; text-wrap: pretty; }
.catalog { padding-bottom: 72px; }
.catalog-grid { display: grid; grid-template-columns: minmax(200px, 250px) minmax(320px, 1fr); gap: 36px; align-items: start; }
.catalog-side { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 22px; }
.filters-head { display: flex; align-items: center; justify-content: space-between; }
.filters-head .eyebrow { margin: 0; }
.filter-title { font-size: 13px; font-weight: 600; margin-bottom: 8px; }

.results-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.inline-filter { flex: 1; min-width: 200px; display: flex; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--grey-bg); }
.inline-filter:focus-within { border-color: var(--blue); background: #fff; }
.inline-filter input { width: 100%; padding: 9px 0; border: 0; background: transparent; font-size: 14px; outline: none; }
.result-count { font-size: 12px; white-space: nowrap; }
.segmented { display: flex; gap: 2px; background: var(--grey-2); border-radius: 8px; padding: 2px; }
.segmented a { font-size: 13px; padding: 6px 11px; border-radius: 6px; color: var(--muted-2); white-space: nowrap; }
.segmented a:hover { text-decoration: none; }
.segmented a.is-on { background: #fff; color: var(--ink); }

.result-row { display: grid; grid-template-columns: 82px minmax(0,1fr); gap: 18px; padding: 18px 8px; border-bottom: 1px solid var(--line-soft); color: var(--ink); }
.result-row:hover { background: var(--blue-tint); text-decoration: none; }
.result-thumb {
  position: relative; align-self: stretch; min-height: 96px; color: var(--blue);
}
.result-format-icon { position: absolute; inset: 0; width: 100%; height: 100%; color: #6b2cff; }
.result-kicker { display: flex; gap: 8px; flex-wrap: wrap; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--blue); margin-bottom: 6px; }
.result-kicker > span:not(.sep) { display: inline-flex; align-items: center; gap: 4px; }
.result-kicker .ui-icon { width: 14px; height: 14px; }
.result-title { display: block; font-size: 20px; font-weight: 600; line-height: 1.3; margin-bottom: 5px; text-wrap: pretty; }
.result-excerpt { display: block; font-size: 14px; color: var(--muted-2); line-height: 1.5; margin-bottom: 8px; text-wrap: pretty; }
.result-meta { display: block; font-size: 12px; color: var(--muted-3); }
.empty { padding: 48px 12px; text-align: center; color: var(--muted-2); }
.empty-title { font-size: 16px; margin-bottom: 12px; }
.empty-page { padding-bottom: 96px; }

/* --- Инфографика --- */

.viz-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; padding-bottom: 80px; }
.viz-card { border: 1px solid var(--line); border-radius: 14px; padding: 20px; background: #fff; display: flex; flex-direction: column; gap: 14px; color: var(--ink); }
.viz-card:hover { border-color: var(--blue); box-shadow: 0 6px 18px rgba(16,21,27,.07); text-decoration: none; }
.viz-title { display: block; font-size: 17px; font-weight: 600; margin-bottom: 4px; line-height: 1.3; }
.viz-sub { display: block; font-size: 13px; color: var(--muted-2); line-height: 1.5; }
.viz-rows { display: flex; flex-direction: column; gap: 9px; }
.viz-rows .metric { display: block; }
.viz-rows .metric-head { display: flex; }
.viz-cta { font-size: 13px; color: var(--blue); }

/* --- Специалисты --- */

.experts-filters { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.experts-filters .eyebrow { margin-bottom: 7px; }
.experts-filters-meta { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.expert-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-top: 20px; padding-bottom: 80px; }
.expert-card { border: 1px solid var(--line); border-radius: 14px; padding: 18px; background: #fff; display: flex; flex-direction: column; gap: 12px; color: var(--ink); }
.expert-card:hover { border-color: var(--blue); box-shadow: 0 6px 18px rgba(16,21,27,.07); text-decoration: none; }
.expert-top { display: flex; gap: 13px; align-items: flex-start; }
.expert-name-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 3px; }
.expert-name { font-size: 19px; font-weight: 600; }
.expert-role { display: block; font-size: 13px; color: var(--muted-2); line-height: 1.4; }
.expert-short { font-size: 14px; line-height: 1.55; color: var(--muted-1); text-wrap: pretty; }
.expert-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 11px; border-top: 1px solid var(--line-soft); font-size: 12px; color: var(--muted-3); }
.slot-open { color: var(--blue-dark); }
.slot-closed { color: var(--muted-3); }

/* --- Профиль --- */

.back-link { display: inline-block; font-size: 13px; margin: 28px 0 22px; }
.profile { padding-bottom: 80px; }
.profile-grid { display: grid; grid-template-columns: minmax(300px, 1.5fr) minmax(240px, 1fr); gap: 36px; align-items: start; }
.profile-head { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 22px; flex-wrap: wrap; }
.profile-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 5px; }
.profile-name { font-size: 30px; margin: 0; letter-spacing: -.02em; }
.profile-role { font-size: 15px; color: var(--muted-2); margin: 0 0 12px; }
.profile-bio { font-size: 16px; line-height: 1.65; color: var(--text); margin: 0 0 22px; text-wrap: pretty; }
.panel { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-bottom: 26px; }
.panel-blue { border-color: var(--blue-line); background: var(--blue-tint); }
.panel .eyebrow { margin-bottom: 9px; }
.no-articles { font-size: 14px; border-top: 1px solid var(--line-soft); padding-top: 14px; margin: 8px 0 0; }
.author-row { display: block; padding: 14px 6px; border-top: 1px solid var(--line-soft); color: var(--ink); }
.author-row:hover { background: var(--blue-tint); text-decoration: none; }
.author-row-title { display: block; font-size: 18px; font-weight: 600; line-height: 1.3; }
.author-row-meta { display: block; font-size: 12px; color: var(--muted-3); margin-top: 4px; }
.spec-comments { display: flex; flex-direction: column; gap: 12px; }
.spec-comment { border: 1px solid var(--line); border-radius: 11px; padding: 14px 16px; background: #fff; color: var(--ink); }
.spec-comment:hover { border-color: var(--blue); background: var(--blue-tint); text-decoration: none; }
.spec-comment-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; font-size: 10px; }
.spec-comment-likes { font-size: 11px; color: var(--blue-dark); }
.spec-comment-text { display: block; font-size: 14px; line-height: 1.55; color: var(--text); text-wrap: pretty; }
.profile-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 96px; }
.cred-list { display: flex; flex-direction: column; gap: 12px; font-size: 14px; line-height: 1.5; }
.cred-what { font-weight: 600; }
.kv-list { display: flex; flex-direction: column; gap: 11px; }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.kv-v { text-align: right; font-weight: 600; }
.stat-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stat-num { font-size: 24px; font-weight: 600; }
.stat-label { font-size: 12px; }

/* --- Статья --- */

.article { padding-bottom: 80px; }
.article-grid { display: grid; grid-template-columns: minmax(320px, 730px) minmax(220px, 1fr); gap: 52px; align-items: start; }
.article-kicker { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.article-kicker > span:not(.sep) { display: inline-flex; align-items: center; gap: 4px; }
.article-kicker .ui-icon { width: 14px; height: 14px; }
.article-title { font-size: 40px; line-height: 1.14; letter-spacing: -.025em; margin: 0 0 16px; text-wrap: pretty; }
.article-about { font-size: 19px; line-height: 1.5; color: var(--muted-1); margin: 0 0 24px; text-wrap: pretty; }
.byline { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 30px; }
.byline-name { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; }
.byline-meta { display: block; font-size: 13px; color: var(--muted-2); }
.byline-btn { margin-left: auto; font-size: 13px; padding: 8px 12px; border-radius: 6px; }

.block { margin-bottom: 26px; }
.body-p { font-size: 18px; line-height: 1.7; color: var(--text); margin: 0; text-wrap: pretty; }
.body-h { font-size: 26px; line-height: 1.25; letter-spacing: -.02em; margin: 10px 0 0; text-wrap: pretty; scroll-margin-top: 96px; }
.numbered { display: flex; flex-direction: column; gap: 14px; }
.numbered-item { display: grid; grid-template-columns: 26px minmax(0,1fr); gap: 12px; align-items: start; }
.numbered-num { width: 26px; height: 26px; border-radius: 7px; background: var(--blue-bg); color: var(--blue-dark); font-size: 12px; display: flex; align-items: center; justify-content: center; }
.numbered-text { font-size: 17px; line-height: 1.6; color: var(--text); text-wrap: pretty; }
.numbered-text strong { font-weight: 600; }

.note { border-left: 3px solid var(--blue); background: var(--blue-tint); border-radius: 0 10px 10px 0; padding: 16px 18px; }
.note .eyebrow { margin-bottom: 7px; }
.note-text { font-size: 16px; line-height: 1.6; color: var(--text); text-wrap: pretty; }

.gloss { display: flex; flex-direction: column; gap: 8px; }
.gloss-item { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; transition: border-color .2s ease; }
.gloss-item[open] { border-color: var(--blue-line); }
.gloss-item summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 13px; cursor: pointer; font-size: 15px; font-weight: 600; list-style: none; }
.gloss-item summary::-webkit-details-marker { display: none; }
.gloss-item[open] summary { background: var(--blue-tint); }
.gloss-sign::after { content: '+'; color: var(--blue); font-size: 14px; }
.gloss-item[open] .gloss-sign::after { content: '−'; }
.gloss-def { padding: 0 13px 12px; font-size: 15px; line-height: 1.55; color: var(--muted-1); animation: psFade .2s ease; text-wrap: pretty; }

.figure { margin: 0; border: 1px solid var(--line); border-radius: 12px; padding: 20px; background: #fff; }
.figure-flush { padding: 0; overflow: hidden; }
.figure-blue { border-color: var(--blue-line); background: var(--blue-tint); }
.figure-cap { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.figure-flush .figure-cap { padding: 15px 18px; border-bottom: 1px solid var(--line-soft); margin: 0; }
.figure-note { font-size: 13px; color: var(--muted-2); margin: 0 0 18px; text-wrap: pretty; }
.figure-hint { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--muted-1); min-height: 20px; text-wrap: pretty; }

.table-scroll { overflow-x: auto; }
.data-table { border-collapse: collapse; width: 100%; min-width: 520px; }
.data-table th { text-align: left; padding: 11px 14px; font-family: var(--mono); font-size: 10px; font-weight: 400; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); background: #f8fafc; border-bottom: 1px solid var(--line); }
.data-table td { padding: 12px 14px; font-size: 14px; line-height: 1.5; color: var(--muted-1); border-bottom: 1px solid var(--line-soft); text-wrap: pretty; }
.data-table .td-lead { color: var(--ink); font-weight: 600; }
.data-table tr:hover td { background: var(--blue-tint); }

.bars { display: flex; flex-direction: column; gap: 12px; }
.metric-hover { cursor: default; }
.metric-hover:hover .metric-head { color: var(--blue-dark); }

.levels-bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; gap: 3px; margin-bottom: 16px; }
.levels-seg { background: var(--blue-soft); transition: background .25s ease; cursor: pointer; }
.levels-seg.is-active, .levels-seg:hover { background: var(--blue); }
.levels-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.levels-card { padding: 13px; border-radius: 10px; border: 1px solid var(--line); background: #fff; transition: border-color .25s ease, background .25s ease, transform .25s ease; }
.levels-card.is-active, .levels-card:hover { border-color: var(--blue); background: var(--blue-tint); transform: translateY(-2px); }
.levels-kicker { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 6px; }
.levels-name { font-size: 15px; font-weight: 600; margin-bottom: 5px; }
.levels-desc { font-size: 13px; line-height: 1.5; color: var(--muted-2); text-wrap: pretty; }

.steps { display: flex; flex-direction: column; gap: 9px; }
.step { display: grid; grid-template-columns: 30px minmax(0,1fr); gap: 12px; align-items: start; padding: 12px 14px; border: 1px solid var(--blue-line); border-radius: 10px; background: #fff; transition: background .25s ease, border-color .25s ease, transform .25s ease; }
.step:hover { border-color: var(--blue); transform: translateX(3px); }
.step-num { width: 30px; height: 30px; border-radius: 50%; background: var(--blue-bg); color: var(--blue-dark); font-size: 12px; display: flex; align-items: center; justify-content: center; }
.step-title { display: block; font-size: 15px; font-weight: 600; margin-bottom: 3px; }
.step-text { display: block; font-size: 14px; color: var(--muted-1); line-height: 1.5; }

.swaps { display: flex; flex-direction: column; gap: 10px; }
.swap { display: block; width: 100%; text-align: left; border: 1px solid var(--line); border-radius: 10px; padding: 13px 15px; background: #fff; cursor: pointer; transition: border-color .25s ease, background .25s ease; }
.swap:hover { border-color: var(--blue); }
.swap.is-good { border-color: var(--blue); background: var(--blue-tint); }
.swap-head { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; flex-wrap: wrap; }
.swap-tag { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: #a2452f; border: 1px solid #f0d7cf; border-radius: 4px; padding: 1px 6px; white-space: nowrap; }
.swap.is-good .swap-tag { color: var(--blue-dark); border-color: var(--blue-line); }
.swap-hint { font-size: 12px; color: var(--muted-3); }
.swap-phrase { display: block; font-size: 18px; line-height: 1.4; margin-bottom: 6px; color: var(--text); }
.swap-why { display: block; font-size: 13px; line-height: 1.5; color: var(--muted-2); text-wrap: pretty; }

.curve-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.curve-controls { display: flex; align-items: center; gap: 8px; }
.curve-clock { font-size: 12px; color: var(--blue-dark); }
.curve-svg { width: 100%; height: 150px; }
.curve-path { transition: stroke-dashoffset .15s linear; }
.curve-dot { transition: cx .15s linear, cy .15s linear; }
.curve-phases { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-top: 12px; }
.curve-phase { padding: 11px 12px; border-radius: 9px; border: 1px solid #e2ebf7; background: #fff; transition: background .3s ease, border-color .3s ease; }
.curve-phase.is-on { background: var(--blue-bg); border-color: var(--blue); }
.curve-range { font-size: 10px; letter-spacing: .07em; color: var(--muted-3); margin-bottom: 5px; }
.curve-phase.is-on .curve-range { color: var(--blue-dark); }
.curve-text { font-size: 13px; line-height: 1.45; color: var(--text); text-wrap: pretty; }

.breath { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; padding: 22px; }
.breath-circle {
  width: 104px; height: 104px; border-radius: 50%; flex: none;
  background: radial-gradient(circle, var(--blue-line) 0%, var(--blue-bg) 70%);
  border: 1.5px solid var(--blue-soft); animation: psBreath 10s ease-in-out infinite;
  display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--blue-dark);
}
.breath-title { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.breath-note { font-size: 14px; line-height: 1.6; color: var(--muted-1); text-wrap: pretty; }

.xref { border-top: 1px solid var(--line); padding-top: 18px; }
.xref-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.xref-card { border: 1px solid var(--line); border-radius: 10px; padding: 13px 15px; background: #fff; color: var(--ink); display: block; }
.xref-card:hover { border-color: var(--blue); background: var(--blue-tint); text-decoration: none; }
.xref-title { display: block; font-size: 16px; font-weight: 600; line-height: 1.3; margin: 5px 0 4px; }
.xref-why { display: block; font-size: 12px; color: var(--blue); }

/* --- Книги по теме --- */

.books { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 12px; }
.books-item { border-left: 2px solid var(--blue-line); padding-left: 11px; }
.books-title { display: block; font-size: 15px; font-weight: 600; line-height: 1.3; text-wrap: pretty; }
.books-author { display: block; font-size: 12px; color: var(--muted-3); margin-top: 2px; }
.books-why { display: block; font-size: 12px; color: var(--muted-2); margin-top: 5px; line-height: 1.45; text-wrap: pretty; }
.books-note { font-size: 11px; color: var(--muted-3); margin: 13px 0 0; }

/* --- Обсуждение --- */

.discussion { border-top: 1px solid var(--ink); padding-top: 24px; margin-top: 12px; scroll-margin-top: 96px; }
.discussion-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.discussion-title { font-size: 20px; margin: 0; }
.discussion-rules { font-size: 13px; color: var(--muted-3); margin: 0 0 20px; text-wrap: pretty; }
.flash { padding: 11px 14px; border-radius: 9px; font-size: 14px; margin-bottom: 16px; }
.flash-ok { background: var(--blue-bg); color: var(--blue-dark); border: 1px solid var(--blue-line); }
.flash-err { background: #fdf2ef; color: #a2452f; border: 1px solid #f0d7cf; }
.comment-form { display: flex; gap: 12px; margin-bottom: 28px; }
.comment-form-body { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.comment-form input[type=text], .comment-form textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--grey-bg); font-size: 14px; line-height: 1.5; resize: vertical;
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--blue); background: #fff; outline: none; }
.comment-form-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.comment-hint { font-size: 12px; color: var(--muted-3); }
.comments { display: flex; flex-direction: column; gap: 4px; }
.comment { display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 12px; padding: 14px 0; border-top: 1px solid var(--line-soft); border-radius: 10px; }
.comment.is-reply { padding-left: 28px; background: #fbfcfe; }
.comment-head { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; flex-wrap: wrap; }
.comment-name { font-size: 14px; font-weight: 600; }
.comment-time { font-size: 12px; color: var(--muted-3); }
.comment-text { font-size: 15px; line-height: 1.6; margin: 0 0 8px; color: var(--text); text-wrap: pretty; }
.comment-link { display: block; border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; background: #fff; max-width: 420px; margin-bottom: 10px; color: var(--ink); }
.comment-link:hover { border-color: var(--blue); background: var(--blue-tint); text-decoration: none; }
.comment-link-title { display: block; font-size: 13px; font-weight: 600; line-height: 1.35; margin-top: 3px; }
.comment-actions { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; }
.comment-likes { color: var(--muted-2); }

/* --- Боковая колонка статьи --- */

.article-side { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 18px; }
.toc { display: flex; flex-direction: column; gap: 9px; font-size: 14px; line-height: 1.35; }
.toc a { color: var(--muted-1); }
.related { display: flex; flex-direction: column; gap: 13px; }
.related a { color: var(--ink); }
.related a:hover { color: var(--blue); text-decoration: none; }
.related-title { display: block; font-size: 15px; font-weight: 600; line-height: 1.35; }
.related-meta { display: block; font-size: 12px; color: var(--muted-3); margin-top: 3px; }
.card-cta { border-color: var(--blue-line); background: var(--blue-tint); display: block; color: var(--ink); }
.card-cta:hover { border-color: var(--blue); text-decoration: none; }
.cta-title { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.cta-sub { display: block; font-size: 13px; color: var(--muted-2); line-height: 1.45; }

/* --- Программа раздела «Личность» --- */

.program-page { padding-bottom: 96px; }
.program-hero { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(300px,.7fr); gap: 44px; align-items: center; padding: 54px 0 46px; border-bottom: 1px solid var(--line); }
.program-hero .page-title { max-width: 760px; margin: 12px 0 16px; font-size: 48px; line-height: 1.03; }
.program-sub { max-width: 730px; margin: 0; color: var(--muted-1); font-size: 18px; line-height: 1.65; text-wrap: pretty; }
.program-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.program-summary { padding: 22px; background: linear-gradient(145deg, #fff 0%, var(--blue-tint) 100%); }
.program-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--blue-line); }
.program-stats span { display: flex; flex-direction: column; gap: 2px; }
.program-stats strong { font-size: 30px; line-height: 1; }
.program-stats small { color: var(--muted-2); font-size: 11px; }
.program-progress-head { display: flex; justify-content: space-between; gap: 12px; margin: 17px 0 7px; color: var(--muted-2); font-size: 12px; }
.program-progress { height: 5px; border-radius: 99px; background: var(--blue-line); overflow: hidden; }
.program-progress span { display: block; width: var(--w); height: 100%; border-radius: inherit; background: var(--blue); }
.program-summary p { margin: 14px 0 0; color: var(--muted-2); font-size: 13px; line-height: 1.5; }
.program-nav { position: sticky; top: 72px; z-index: 12; display: flex; justify-content: center; gap: 7px; padding: 14px 0; margin-bottom: 28px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line-soft); }
.program-nav a { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; color: var(--muted-1); font-family: var(--mono); font-size: 11px; }
.program-nav a:hover { border-color: var(--blue); background: var(--blue-tint); color: var(--blue-dark); text-decoration: none; }
.program-modules { display: flex; flex-direction: column; gap: 34px; }
.program-module { scroll-margin-top: 140px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #fff; }
.program-module-head { position: relative; display: grid; grid-template-columns: 54px minmax(0,1fr) auto; gap: 16px; align-items: center; padding: 22px 24px 20px; background: var(--grey-bg); border-bottom: 1px solid var(--line); }
.program-module-num { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--blue-line); border-radius: 50%; background: #fff; color: var(--blue); }
.program-module-head h2 { margin: 4px 0 0; font-size: 25px; line-height: 1.15; text-wrap: balance; }
.program-module-count { color: var(--muted-3); font-size: 11px; }
.program-module-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--line-soft); }
.program-module-progress i { display: block; width: var(--w); height: 100%; background: var(--blue); }
.program-items { display: flex; flex-direction: column; }
.program-item { display: grid; grid-template-columns: 54px minmax(0,1fr) auto; gap: 16px; align-items: start; padding: 18px 24px; border-top: 1px solid var(--line-soft); color: var(--ink); }
.program-item:first-child { border-top: 0; }
.program-item.is-ready:hover { background: var(--blue-tint); text-decoration: none; }
.program-item.is-planned { background: #fff; }
.program-item-num { color: var(--blue); font-size: 11px; padding-top: 4px; }
.program-item-title { display: block; font-size: 18px; font-weight: 600; line-height: 1.3; }
.program-item-desc { display: block; max-width: 850px; margin-top: 5px; color: var(--muted-2); font-size: 14px; line-height: 1.55; text-wrap: pretty; }
.program-item-status { align-self: center; color: var(--muted-3); font-size: 10px; white-space: nowrap; }
.program-item.is-ready .program-item-status { color: var(--blue); }
.catalog-program-link { display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin-bottom: 16px; border: 1px solid var(--blue-line); border-radius: 12px; background: var(--blue-tint); color: var(--ink); }
.catalog-program-link:hover { border-color: var(--blue); text-decoration: none; }
.catalog-program-link > span:first-child { width: 34px; height: 34px; border-radius: 50%; background: #fff; display: grid; place-items: center; color: var(--blue); }
.catalog-program-link .ui-icon { width: 20px; height: 20px; }
.catalog-program-link strong, .catalog-program-link small { display: block; }
.catalog-program-link strong { font-size: 14px; }
.catalog-program-link small { margin-top: 2px; color: var(--muted-2); font-size: 12px; }

/* --- Регистрация --- */

.register { max-width: 980px; padding-bottom: 80px; }
.role-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-bottom: 32px; }
.role-card { display: block; padding: 20px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); }
.role-card:hover { border-color: var(--blue); text-decoration: none; }
.role-card.is-on { border-color: var(--blue); background: var(--blue-tint); }
.role-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.role-dot { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #b9c6d6; background: #fff; flex: none; }
.role-card.is-on .role-dot { border-color: var(--blue); background: var(--blue); }
.role-title { font-size: 17px; font-weight: 600; }
.role-sub { display: block; font-size: 14px; line-height: 1.5; color: var(--muted-2); margin-bottom: 12px; }
.role-perks { display: flex; flex-direction: column; gap: 5px; }
.role-perk { font-size: 13px; color: var(--muted-1); display: flex; gap: 7px; }
.dash { color: var(--blue); }
.reg-form { padding: 24px; max-width: 520px; display: flex; flex-direction: column; gap: 14px; }
.field { display: block; }
.field-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.field input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--grey-bg); font-size: 14px; }
.field-hint { display: block; font-size: 12px; color: var(--muted-3); margin-top: 4px; line-height: 1.45; }

.prose-page { max-width: 800px; padding-bottom: 80px; }
.prose-page .numbered, .prose-page .note { margin-bottom: 26px; }

/* --- Поиск --- */

.modal { position: fixed; inset: 0; z-index: 60; background: rgba(16,21,27,.4); backdrop-filter: blur(3px); display: flex; justify-content: center; padding: 12vh 20px 20px; animation: psFade .15s ease; }
.modal[hidden] { display: none; }
.modal-card { width: 100%; max-width: 680px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 24px 60px rgba(16,21,27,.25); overflow: hidden; max-height: 70vh; display: flex; flex-direction: column; animation: psRise .18s ease; }
.search-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line-soft); }
.search-head input { flex: 1; border: 0; outline: none; font-size: 17px; background: none; min-width: 0; }
.search-chips { display: flex; gap: 6px; padding: 12px 18px; border-bottom: 1px solid var(--line-soft); overflow-x: auto; }
.search-results { overflow-y: auto; padding: 8px 0 12px; }
.search-hit { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 14px; align-items: center; padding: 12px 18px; color: var(--ink); }
.search-hit:hover { background: var(--blue-tint); text-decoration: none; }
.search-hit-title { display: block; font-size: 15px; font-weight: 600; line-height: 1.35; margin-bottom: 3px; }
.search-hit-meta { display: block; font-size: 13px; color: var(--muted-2); }
.search-hit-tag { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--blue); border: 1px solid var(--blue-line); background: var(--blue-tint); border-radius: 4px; padding: 2px 6px; white-space: nowrap; }
.search-empty { padding: 28px 18px; text-align: center; color: var(--muted-2); font-size: 15px; }

/* --- Помощник --- */

.assistant {
  position: fixed; right: 24px; bottom: 116px; z-index: 70; width: 380px;
  max-width: calc(100vw - 40px); max-height: 74vh; background: #fff;
  border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 50px rgba(16,21,27,.22);
  display: flex; flex-direction: column; overflow: hidden; animation: psRise .18s ease;
}
.assistant[hidden] { display: none; }
.assistant-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); background: var(--blue-tint); }
.dot-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); animation: psPulse 2s ease-in-out infinite; }
.assistant-title { font-size: 14px; font-weight: 600; flex: 1; }
.assistant-close { background: none; border: 0; font-size: 18px; color: var(--muted-2); cursor: pointer; line-height: 1; }
.assistant-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 88%; font-size: 14px; line-height: 1.5; padding: 10px 13px; border-radius: 12px; animation: psRise .25s ease; text-wrap: pretty; }
.msg-bot { align-self: flex-start; background: var(--grey-bg); color: var(--text); border: 1px solid var(--line); }
.msg-me { align-self: flex-end; background: var(--blue); color: #fff; border: 1px solid var(--blue); }
.msg-picks { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; align-self: flex-start; max-width: 88%; }
.msg-pick { border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; background: #fff; color: var(--ink); display: block; }
.msg-pick:hover { border-color: var(--blue); background: var(--blue-tint); text-decoration: none; }
.msg-pick-title { display: block; font-size: 13px; font-weight: 600; line-height: 1.35; }
.msg-pick-meta { display: block; font-size: 11px; color: var(--muted-3); margin-top: 2px; }
.assistant-chips { padding: 10px 12px; border-top: 1px solid var(--line-soft); display: flex; flex-wrap: wrap; gap: 6px; }
.assistant-form { padding: 12px; border-top: 1px solid var(--line-soft); display: flex; gap: 8px; }
.assistant-form input { flex: 1; min-width: 0; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--grey-bg); font-size: 14px; }
.assistant-form input:focus { border-color: var(--blue); background: #fff; outline: none; }

.assistant-launcher {
  position: fixed; right: 24px; bottom: 24px; z-index: 72;
  width: 78px; height: 78px; padding: 0; border-radius: 50%;
  border: 1px solid rgba(107,44,255,.24); background: rgba(255,255,255,.94);
  box-shadow: 0 12px 34px rgba(59,14,166,.2), 0 0 0 6px rgba(107,44,255,.05);
  display: grid; place-items: center; cursor: pointer; isolation: isolate;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.assistant-launcher:hover { transform: translateY(-2px) scale(1.03); border-color: rgba(107,44,255,.5); box-shadow: 0 16px 38px rgba(59,14,166,.26), 0 0 0 8px rgba(107,44,255,.07); }
.assistant-launcher:focus-visible { outline: 3px solid var(--blue-line); outline-offset: 4px; }
.assistant-launcher img { position: relative; z-index: 3; width: 54px; height: 54px; object-fit: contain; filter: drop-shadow(0 3px 8px rgba(107,44,255,.32)); animation: assistantLotusPulse 3.2s ease-in-out infinite; }
.assistant-launcher-aura { position: absolute; inset: 10px; z-index: 0; border-radius: 50%; background: radial-gradient(circle, rgba(197,140,255,.34) 0, rgba(107,44,255,.12) 48%, transparent 72%); animation: assistantAura 2.6s ease-in-out infinite; }
.assistant-orbit { position: absolute; z-index: 2; border: 1px solid rgba(107,44,255,.46); border-radius: 50%; pointer-events: none; }
.assistant-orbit::before, .assistant-orbit::after { content: ''; position: absolute; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 7px rgba(107,44,255,.55); }
.assistant-orbit::before { top: -3px; }
.assistant-orbit::after { bottom: -3px; }
.assistant-orbit-one { inset: 7px; animation: assistantOrbit 9s linear infinite; }
.assistant-orbit-two { inset: 14px; border-color: rgba(197,140,255,.58); transform: rotate(58deg); animation: assistantOrbitReverse 6.5s linear infinite; }
.assistant-launcher.is-open { border-color: var(--blue); box-shadow: 0 12px 34px rgba(59,14,166,.28), 0 0 0 8px rgba(107,44,255,.1); }
@keyframes assistantLotusPulse { 0%, 100% { transform: scale(.94) rotate(-1deg); } 50% { transform: scale(1.08) rotate(1deg); } }
@keyframes assistantAura { 0%, 100% { transform: scale(.84); opacity: .5; } 50% { transform: scale(1.18); opacity: 1; } }
@keyframes assistantOrbit { to { transform: rotate(360deg); } }
@keyframes assistantOrbitReverse { from { transform: rotate(58deg); } to { transform: rotate(-302deg); } }

/* --- Окно «прежде чем читать» --- */

.is-gated { overflow: hidden; }
.gate-stub { padding: 48px 24px 96px; max-width: 730px; margin: 0 auto; filter: blur(2px); opacity: .5; user-select: none; }
.gate-stub-title { font-size: 34px; line-height: 1.15; letter-spacing: -.025em; margin: 10px 0 14px; }
.gate-stub-sub { font-size: 17px; line-height: 1.5; color: var(--muted-1); margin: 0; }

.gate {
  position: fixed; inset: 0; z-index: 90; background: rgba(16,21,27,.55); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  animation: psFade .18s ease; overflow-y: auto;
}
.gate-card {
  width: 100%; max-width: 560px; background: #fff; border: 1px solid #d7e0ea; border-radius: 14px;
  box-shadow: 0 28px 70px rgba(16,21,27,.3); overflow: hidden;
  animation: psRise .22s ease; display: flex; flex-direction: column; margin: auto;
}
.gate-head { padding: 20px 26px 16px; border-bottom: 1px solid var(--line-soft); }
.gate-kicker { font-size: 10px; text-transform: uppercase; letter-spacing: .14em; color: var(--blue-dark); margin-bottom: 10px; }
.gate-title { font-size: 24px; line-height: 1.2; letter-spacing: -.02em; margin: 0; text-wrap: pretty; }
.gate-body { padding: 18px 26px; display: flex; flex-direction: column; gap: 12px; }
.gate-point { display: grid; grid-template-columns: 22px minmax(0,1fr); gap: 12px; align-items: start; }
.gate-num { width: 22px; height: 22px; border-radius: 6px; background: var(--blue-bg); color: var(--blue-dark); font-size: 11px; display: flex; align-items: center; justify-content: center; margin-top: 2px; }
.gate-point-text { font-size: 15px; line-height: 1.6; color: var(--text); text-wrap: pretty; }
.gate-point-text strong { font-weight: 600; }
.gate-urgent { border-left: 3px solid var(--blue); background: var(--blue-tint); border-radius: 0 10px 10px 0; padding: 14px 16px; font-size: 14px; line-height: 1.6; color: var(--blue-dark); text-wrap: pretty; }
.gate-foot { padding: 16px 26px 20px; border-top: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 12px; }
.gate-ack { display: flex; align-items: flex-start; gap: 11px; cursor: pointer; }
.gate-ack input { position: absolute; opacity: 0; width: 0; height: 0; }
.gate-box {
  flex: none; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid #b9c6d6; background: #fff;
  display: flex; align-items: center; justify-content: center; margin-top: 1px;
  transition: background .2s ease, border-color .2s ease;
}
.gate-box::after { content: '✓'; color: #fff; font-size: 12px; line-height: 1; opacity: 0; }
.gate-ack input:checked + .gate-box { background: var(--blue); border-color: var(--blue); }
.gate-ack input:checked + .gate-box::after { opacity: 1; }
.gate-ack input:focus-visible + .gate-box { outline: 2px solid var(--blue); outline-offset: 2px; }
.gate-ack-text { font-size: 14px; line-height: 1.5; color: var(--muted-1); text-wrap: pretty; }
.gate-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.gate-accept { flex: 1; min-width: 180px; padding: 12px 18px; font-size: 15px; border-radius: 8px; }
.gate-accept[disabled] { background: var(--line); color: var(--muted-3); opacity: 1; cursor: not-allowed; }
.gate-accept[disabled]:hover { background: var(--line); color: var(--muted-3); }
.gate-actions .btn-ghost { padding: 12px 18px; font-size: 15px; border-radius: 8px; }
.gate-legal { font-size: 12px; line-height: 1.5; color: var(--muted-3); margin: 0; text-wrap: pretty; }

/* --- Правовая страница --- */

.legal { max-width: 800px; padding-bottom: 80px; }
.legal-meta { font-size: 11px; color: var(--muted-3); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 28px; }
.legal .note, .legal .numbered { margin-bottom: 26px; }
.legal .body-h { margin-top: 34px; }
.legal .body-p { margin-bottom: 16px; }

/* --- Адаптив --- */

/* Колонки гридов не должны раздуваться под min-content содержимого:
   без этого широкая таблица растягивает всю страницу вместо своей прокрутки. */
.home > *, .catalog-grid > *, .article-grid > *, .profile-grid > * { min-width: 0; }
.table-scroll { max-width: 100%; -webkit-overflow-scrolling: touch; }

@media (max-width: 1000px) {
  .home, .catalog-grid, .article-grid, .profile-grid { grid-template-columns: 1fr; gap: 28px; }
  .program-hero { grid-template-columns: 1fr; gap: 24px; }
  .home-side, .catalog-side, .article-side, .profile-side { position: static; }
  .article-side { order: 2; }
  .hero-title { font-size: 34px; }
  .article-title { font-size: 32px; }
}

@media (max-width: 720px) {
  .head-inner { gap: 10px 12px; }
  .head-nav { order: 3; width: 100%; margin-left: 0; overflow-x: auto; }
  .head-search { order: 2; margin-left: auto; max-width: none; }
  .head-actions { order: 1; }
  .brand-logo { width: 150px; }
  .result-row { grid-template-columns: 56px minmax(0,1fr); gap: 12px; }
  .result-thumb { align-self: start; width: 56px; height: 72px; min-height: 72px; }
  .latest-row { grid-template-columns: minmax(0,1fr); }
  .latest-row .format-tag { display: none; }
  .week-text { border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .foot-links { margin-left: 0; }
  .hero-title { font-size: 29px; }
  .article-title { font-size: 27px; }
  .page-title { font-size: 27px; }
  .assistant { right: 12px; left: 12px; bottom: 94px; width: auto; max-height: calc(100vh - 118px); }
  .assistant-launcher { right: 14px; bottom: 14px; width: 68px; height: 68px; }
  .assistant-launcher img { width: 48px; height: 48px; }
  .program-hero { padding: 36px 0 30px; }
  .program-hero .page-title { font-size: 34px; }
  .program-sub { font-size: 16px; }
  .program-nav { top: 124px; justify-content: flex-start; overflow-x: auto; }
  .program-module-head { grid-template-columns: 44px minmax(0,1fr); padding: 18px 16px; gap: 12px; }
  .program-module-num { width: 38px; height: 38px; }
  .program-module-head h2 { font-size: 21px; }
  .program-module-count { grid-column: 2; }
  .program-item { grid-template-columns: 42px minmax(0,1fr); padding: 16px; gap: 10px; }
  .program-item-status { grid-column: 2; justify-self: start; }
  .program-item-title { font-size: 17px; }
}

/* Телефоны: попадаемость пальцем, читаемость, отсутствие зума при фокусе */
@media (max-width: 720px) {
  /* iOS Safari зумит страницу, если шрифт поля меньше 16px */
  input, textarea, select, .head-search,
  .comment-form input[type=text], .comment-form textarea,
  .search-head input, .field input, .field textarea, .field select { font-size: 16px; }

  /* Минимальная площадь нажатия */
  .head-nav a { min-height: 44px; padding: 0 11px; display: inline-flex; align-items: center; }
  .head-search { min-height: 44px; }
  .btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .segmented a { min-height: 40px; padding: 0 14px; display: inline-flex; align-items: center; }
  .assistant-form input { font-size: 16px; }
  .toc { gap: 0; }
  .toc a { min-height: 40px; display: flex; align-items: center; padding: 4px 0; }
  .back-link, .article-kicker a, .link-sm,
  .foot-links a, .program-nav a { display: inline-flex; align-items: center; min-height: 40px; }

  /* Длинные термины и адреса не должны рвать разметку */
  .body-p, .numbered-text, .note-text, .step-text, .data-table td,
  .comment-text, .books-title { overflow-wrap: anywhere; }

  /* Плавающий помощник не перекрывает конец страницы */
  .article, .home, .catalog-grid, .legal, .program-page { padding-bottom: 104px; }

  /* Таблицы прокручиваются по горизонтали — показываем это тенями у краёв */
  .table-scroll {
    background:
      linear-gradient(to right, #fff 30%, rgba(255, 255, 255, 0)) 0 0,
      linear-gradient(to left, #fff 30%, rgba(255, 255, 255, 0)) 100% 0,
      radial-gradient(farthest-side at 0 50%, rgba(15, 23, 42, .11), transparent) 0 0,
      radial-gradient(farthest-side at 100% 50%, rgba(15, 23, 42, .11), transparent) 100% 0;
    background-repeat: no-repeat;
    background-size: 34px 100%, 34px 100%, 13px 100%, 13px 100%;
    background-attachment: local, local, scroll, scroll;
  }
  .data-table th, .data-table td { padding: 10px 12px; }

  /* Книги в боковой карточке: на телефоне колонка идёт под текстом */
  .books { gap: 14px; }
  .books-title { font-size: 16px; }
  .books-author, .books-why { font-size: 13px; }
}

@media (max-width: 400px) {
  .article-title { font-size: 24px; }
  .hero-title, .page-title { font-size: 25px; }
  .body-p { font-size: 17px; }
  .brand-logo { width: 132px; }
  .head-nav a { padding: 10px 8px; font-size: 14px; }
  .assistant-launcher { width: 58px; height: 58px; }
  .assistant-launcher img { width: 40px; height: 40px; }
  .numbered-item, .step { gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* REG cloud hosting origin. */
.site-foot .hosting-origin{padding-bottom:24px;font-size:14px;line-height:1.5;font-weight:600;color:var(--blue-dark)}
