/* Общие стили сайта Фонда: база, шапка, подвал, окно «Обсудить внедрение», точка-меню #fb, плашка cookie.
   Подключаются на всех страницах (и на страницах раздела «Публикации») до стилей страницы — страница может их уточнить.
   Правится здесь, а не в страницах. Выкладка 65. */

/* obshchee:baza */
:root {
  --bg: #FFFFFF; --surface: #FAF9F6; --hover: #F5F2EE; --text: #282725; --text-2: #4A4744; --muted: #706C68;
  --line: #ECE8E4; --accent: #BD4F34; --accent-dark: #9C3E27; --accent-tint: #F4E3DD;
  --shadow: 0 18px 48px rgba(40, 39, 37, .08), 0 2px 6px rgba(40, 39, 37, .04);
  --shadow-pop: 0 24px 60px rgba(40, 39, 37, .14), 0 2px 8px rgba(40, 39, 37, .06);
  --head: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --wrap: 1240px; --gutter: 40px; --header: 88px;
}
html { -webkit-text-size-adjust: 100%; }
@font-face { font-family: "Manrope"; src: url("/fonts/manrope.woff") format("woff"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter.woff") format("woff"); font-weight: 100 900; font-display: swap; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 16px; line-height: 1.5; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.header { position: relative; z-index: 20; background: var(--bg); }
.header .wrap { display: flex; align-items: center; gap: 40px; height: var(--header); }
.logo { display: block; flex: none; }
.logo img { display: block; height: 54px; width: auto; }
.nav { display: flex; gap: 36px; margin: 0 auto; }
.nav a { text-decoration: none; font-size: 15px; color: var(--text); padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; border: 0; cursor: pointer; background: var(--accent); color: #fff; font: 500 16px/1 var(--body); text-decoration: none; border-radius: 14px; padding: 0 26px; height: 52px; transition: background .15s; white-space: nowrap; }
.btn:hover { background: var(--accent-dark); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-line { background: #fff; color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); transition: background .25s ease, color .25s ease; }
.btn-line:hover { background: var(--accent); color: #fff; }
.js-max[hidden] { display: none !important; }
@media (max-width: 1080px) {
  .nav { gap: 22px; }
}
@media (max-width: 860px) {
  :root { --gutter: 16px; --header: 68px; }
  .header .wrap { gap: 12px; }
  .logo img { height: 44px; }
  .nav, .header .btn { display: none; }
}
.site-foot { background: #262422; color: #E9E4DF; padding: 64px 0 28px; }
.site-foot .nw { white-space: nowrap; }
.sf-word { font: 700 clamp(36px, 4.6vw, 64px)/.95 var(--head); letter-spacing: -.035em; color: #fff; margin: 0; }
.sf-word i { font-style: normal; color: var(--accent); }
.sf-tag { font: 400 clamp(17px, 1.5vw, 21px)/1.4 var(--head); color: #BDB5AE; margin: 16px 0 0; }
.sf-tag b { color: #D9765B; font-weight: 600; }
.sf-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; margin-top: 56px; padding-top: 36px; border-top: 1px solid #3B3835; }
.sf-grid h4 { font: 600 12.5px/1 var(--head); letter-spacing: .08em; text-transform: uppercase; color: #8F8780; margin: 0 0 16px; }
.sf-cta { font: 600 17px/1.4 var(--head); color: #fff; margin: 0 0 16px; max-width: 470px; }
.sf-grid p { margin: 0 0 8px; font-size: 15px; line-height: 1.55; }
.site-foot a { color: #E9E4DF; text-decoration: none; border-bottom: 1px solid #5A5550; transition: border-color .25s ease; }
.site-foot a:hover { border-color: var(--accent); }
.sf-tel a { font: 600 20px/1.3 var(--head); border: 0; }
.sf-grid ul { list-style: none; margin: 0; padding: 0; }
.sf-grid li { margin: 0 0 10px; font-size: 15px; }
.site-foot .sf-max { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; padding: 10px 15px; border-radius: 10px; border: 0; background: var(--accent); color: #fff; font: 500 14.5px/1 var(--body); transition: background .25s ease; }
.site-foot .sf-max:hover { background: var(--accent-dark); }
.sf-bot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 30px; margin-top: 44px; padding-top: 20px; border-top: 1px solid #3B3835; font-size: 12.5px; line-height: 1.6; color: #8F8780; }
.sf-bot img { display: block; height: 34px; width: auto; margin-bottom: 10px; }
.sf-bot .sf-c { align-self: flex-end; }
@media (max-width: 359px) {
  .sf-bot .nw { white-space: normal; }
}
@media (max-width: 860px) {
  .site-foot { padding-top: 44px; }
  .sf-grid { grid-template-columns: 1fr; gap: 30px; margin-top: 40px; }
}
@media print {
  .site-foot { display: none !important; }
}
.ck { position: fixed; z-index: 70; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); width: calc(100% - 64px); max-width: 980px; display: flex; align-items: center; gap: 24px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-pop); padding: 14px 16px 14px 24px; font: 400 14.5px/1.5 var(--body); color: var(--text-2); }
.ck[hidden] { display: none; }
.ck p { margin: 0; flex: 1; }
.ck a { color: #A8604C; text-decoration: none; }
.ck a:hover { text-decoration: underline; text-underline-offset: 2px; }
.ck button { flex: none; border: 0; border-radius: 10px; padding: 10px 22px; font: 600 14px/1.2 var(--head); cursor: pointer; background: var(--accent); color: #fff; transition: background .2s ease; }
.ck button:hover { background: var(--accent-dark); }
body.ck-on .fb { opacity: 0 !important; pointer-events: none !important; }
@media (max-width: 860px) {
  .ck { left: 12px; right: 12px; width: auto; transform: none; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); display: block; padding: 16px 16px 14px; font-size: 14px; }
  .ck p { margin-bottom: 12px; }
  .ck button { width: 100%; padding: 12px; }
}
@media print {
  .ck { display: none !important; }
}
.talk { width: min(460px, calc(100% - 32px)); max-height: calc(100% - 32px); border: 0; border-radius: 22px; padding: 0; background: #fff; color: var(--text); box-shadow: 0 24px 60px rgba(40, 39, 37, .25); }
.talk::backdrop { background: rgba(40, 39, 37, .45); }
html:has(.talk[open]) { overflow: hidden; }
.talk-in { position: relative; padding: 30px 30px 26px; }
.talk h2 { font: 600 24px/1.2 var(--head); letter-spacing: -.02em; margin: 0 40px 10px 0; }
.talk-t { font-size: 15px; line-height: 1.55; color: var(--text-2, #4A4744); margin: 0 0 20px; }
.talk .btn { display: flex; width: 100%; }
.talk .btn + .btn { margin-top: 10px; }
.talk .btn[hidden] { display: none; }
.talk-h { font-size: 13px; line-height: 1.45; color: var(--muted); margin: 8px 0 0; }
.talk-c { border-top: 1px solid var(--line, #E6E0DA); margin-top: 20px; padding-top: 16px; font-size: 14px; line-height: 1.5; color: var(--text-2, #4A4744); }
.talk-c a { display: inline-block; margin-top: 4px; font: 600 18px/1.3 var(--head); color: var(--text); text-decoration: none; }
.talk-x { position: absolute; top: 18px; right: 18px; width: 38px; height: 38px; border: 0; border-radius: 10px; background: #F3F0EC; color: var(--text); font: 400 24px/1 var(--body); cursor: pointer; }
.talk-x:hover { background: #E9E4DF; }
.talk .nw { white-space: nowrap; }
.talk-x:focus-visible, .talk .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 520px) {
  .talk-in { padding: 24px 20px 20px; }
  .talk h2 { font-size: 21px; }
}
@media print {
  .talk { display: none; }
}
.fb { --fb-size: 60px; position: fixed; right: 32px; bottom: calc(48px + env(safe-area-inset-bottom, 0px)); z-index: 60; font-family: var(--body); }
.fb-btn { position: relative; z-index: 3; width: var(--fb-size); height: var(--fb-size); padding: 0; cursor: pointer; border-radius: 50%; border: 4px solid #fff; background: radial-gradient(circle at 34% 28%, #D96A4E 0%, var(--accent) 52%, #A3432B 100%); box-shadow: 0 12px 28px rgba(40, 39, 37, .26), 0 2px 5px rgba(40, 39, 37, .16), inset 0 -3px 6px rgba(0, 0, 0, .12); transform: translateX(calc(100% + 48px)); opacity: 0; transition: transform .6s cubic-bezier(.25, .8, .3, 1), opacity .4s ease; }
.fb[data-show="true"] .fb-btn { transform: none; opacity: 1; }
.fb-btn:focus-visible { outline: 3px solid var(--accent-tint); outline-offset: 3px; }
.fb-core { position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: #fff; transform: scale(0); transition: transform .35s ease-out; }
.fb[data-open="true"] .fb-core { transform: scale(1); }
.fb-ring { position: absolute; z-index: 2; left: 0; top: 0; width: var(--fb-size); height: var(--fb-size); border-radius: 50%; border: 2px solid var(--accent); opacity: 0; pointer-events: none; }
.fb.beat .fb-btn { animation: beat 1.3s ease-in-out; }
.fb.beat .fb-ring { animation: ring 1.6s ease-out .15s; }
@keyframes beat { 0%, 100% { transform: none; } 15% { transform: scale(1.08); } 30% { transform: scale(1); } 45% { transform: scale(1.05); } 65% { transform: scale(1); } }
@keyframes ring { 0% { opacity: .55; transform: scale(1); } 100% { opacity: 0; transform: scale(1.9); } }
.fb-tag { position: absolute; z-index: 2; top: 50%; right: calc(var(--fb-size) + 14px); white-space: nowrap; padding: 8px 16px; border-radius: 999px; background: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(40, 39, 37, .2); pointer-events: none; font: 600 15px/1.2 var(--head); opacity: 0; transform: translate(16px, -50%) scale(.85); transform-origin: right center; transition: opacity .45s ease, transform .5s cubic-bezier(.25, .8, .3, 1); }
.fb-tag::after { content: ""; position: absolute; top: 50%; right: -14px; width: 12px; height: 2px; margin-top: -1px; background: var(--accent); }
.fb[data-tag="true"] .fb-tag { opacity: 1; transform: translate(0, -50%); }
.fb-card { position: absolute; right: 0; bottom: calc(var(--fb-size) + 18px); z-index: 2; width: 340px; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-pop); padding: 10px 10px 16px; opacity: 0; visibility: hidden; transform: translateY(10px); transform-origin: bottom right; transition: opacity .25s ease, transform .3s ease, visibility 0s linear .3s; }
.fb-card::after { content: ""; position: absolute; right: calc(var(--fb-size) / 2 - 1px); bottom: -19px; width: 2px; height: 18px; background: var(--accent); transform: scaleY(0); transform-origin: bottom; transition: transform .2s ease; }
.fb[data-open="true"] .fb-card { opacity: 1; visibility: visible; transform: none; transition: opacity .25s ease .12s, transform .3s ease .12s, visibility 0s; }
.fb[data-open="true"] .fb-card::after { transform: none; }
.fb-list { list-style: none; margin: 0; padding: 0; }
.fb-list a { display: flex; align-items: flex-start; gap: 14px; padding: 12px 12px; border-radius: 12px; text-decoration: none; color: var(--text); }
.fb-list a:hover { background: var(--hover); }
.fb-list i { flex: none; width: 12px; height: 12px; margin-top: 5px; border-radius: 50%; background: #fff; border: 2px solid #A8A29D; }
.fb-list a.cur i { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.fb-list b { display: block; font: 600 16px/1.3 var(--head); }
.fb-list small { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.fb-list li { opacity: 0; transform: translateY(6px); transition: opacity .25s ease, transform .25s ease; }
.fb-list li i { transform: scale(.3); transition: transform .35s ease-out; }
.fb[data-open="true"] .fb-list li { opacity: 1; transform: none; transition-delay: calc(.18s + var(--i) * .07s); }
.fb[data-open="true"] .fb-list li i { transform: none; transition-delay: calc(.26s + var(--i) * .07s); }
.fb-cta { width: calc(100% - 4px); margin: 12px 2px 0; }
.fb-contacts { margin: 14px 12px 0; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: 15px; }
.fb-contacts a { color: var(--text); text-decoration: none; }
.fb-contacts a:hover { color: var(--accent); }
.fb-contacts .tel { font: 600 18px/1.3 var(--head); }
.fb-max { display: inline-flex; align-items: center; justify-content: center; height: 44px; border-radius: 12px; border: 1px solid var(--line); font-weight: 500; }
.fb-max:hover { border-color: var(--accent); }
.fb-shade { display: none; }
@media (prefers-reduced-motion: reduce) {
  .fb *, .fb *::after { transition: none !important; animation: none !important; }
}
@media (max-width: 860px) {
  .fb { --fb-size: 56px; right: 16px; bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
  .fb-card { position: fixed; left: 0; right: 0; bottom: 0; width: auto; max-height: 88vh; overflow-y: auto; overscroll-behavior: contain; border-radius: 18px 18px 0 0; border-bottom: 0; padding: 12px 8px calc(16px + env(safe-area-inset-bottom, 0px)); opacity: 1; transform: translateY(105%); transition: transform .35s cubic-bezier(.25, .8, .3, 1), visibility 0s linear .35s; }
  .fb-card::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 8px; }
  .fb[data-open="true"] .fb-card { transform: none; transition: transform .35s cubic-bezier(.25, .8, .3, 1), visibility 0s; }
  .fb-card::after { display: none; }
  .fb-list a { padding: 9px 12px; }
  .fb-contacts { margin-top: 10px; padding-top: 10px; }
  .fb[data-open="true"] .fb-btn { opacity: 0; transform: scale(.7); pointer-events: none; }
  .fb-shade { display: block; position: fixed; inset: 0; z-index: 1; background: rgba(40, 39, 37, .35); opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility 0s linear .3s; }
  .fb[data-open="true"] .fb-shade { opacity: 1; visibility: visible; transition: opacity .3s ease, visibility 0s; }
}
@media print {
  .fb { display: none !important; }
}
/* obshchee:tocbar — строка оглавления на телефоне: текущий раздел, полоска прочитанного, список разделов по нажатию.
   Страница включает её своим медиа-запросом (.tocbar { display: block; }), там же, где прячет оглавление сбоку.
   Список собирается из оглавления страницы: <div class="tocbar" data-src="#toc">. Пример — «Технология», «О фонде»; у «Теории» свой скрипт. */
.tocbar { display: none; position: sticky; top: 0; z-index: 25; background: rgba(255,255,255,.96); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.tocbar button { display: flex; align-items: center; gap: 10px; width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 12px var(--gutter); background: none; border: 0; text-align: left; font: 500 15px/1.3 var(--head); color: var(--text); cursor: pointer; }
.tocbar button span { color: var(--accent); font-weight: 600; flex: none; }
.tocbar button span:empty { display: none; }
.tocbar button em { font-style: normal; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tocbar button svg { width: 18px; height: 18px; flex: none; color: var(--muted); transition: transform .25s; }
.tocbar.open button svg { transform: rotate(180deg); }
.tocbar .bar { height: 2px; background: var(--accent); width: 0; transition: width .2s linear; }
.tocbar ol { display: none; list-style: none; margin: 0 auto; padding: 4px var(--gutter) 14px; max-width: var(--wrap); max-height: 60vh; overflow: auto; }
.tocbar.open ol { display: block; }
.tocbar ol a { display: flex; gap: 12px; padding: 9px 0; text-decoration: none; font-size: 15px; color: var(--text-2); border-top: 1px solid var(--line); }
.tocbar ol a.on { color: var(--text); font-weight: 600; }
.tocbar ol a i { font: 600 13px/1.5 var(--head); color: var(--accent); font-style: normal; width: 22px; flex: none; }
.tocbar ol a i:empty { display: none; }
@media print { .tocbar { display: none !important; } }
/* /obshchee:tocbar */
