/* Шрифты и токены взяты с главной majento.ai (assets/home.css): Russo One, Exo 2.0, CMYK */
@font-face { font-family: "Russo One"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/RussoOne-400-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Russo One"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/RussoOne-400-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Exo 2.0"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/Exo2-400-cyrillic.woff2?v=2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Exo 2.0"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/Exo2-400-latin.woff2?v=2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Exo 2.0"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/Exo2-600-cyrillic.woff2?v=2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Exo 2.0"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/Exo2-600-latin.woff2?v=2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --m: #e5007d;
  --c: #00ccea;
  --y: #ffeb29;
  --k: #111115;
  --paper: #fafafa;
  --paper-2: #f1f1f4;
  --muted: #55555e;
  --line: rgb(17 17 21 / 0.12);
  --line-2: rgb(17 17 21 / 0.24);
  --link: #a60059;
  --on-night: #f6f6f8;
  --display: "Russo One", sans-serif;
  --body: "Exo 2.0", sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-sweep: cubic-bezier(0.7, 0, 0.25, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-icon: cubic-bezier(0.2, 0, 0, 1);
  --r: 0.6rem;
  --r-sm: 0.35rem;
  --float: 0 8px 24px rgb(17 17 21 / 0.15);
  --panel-w: clamp(400px, 33vw, 540px);
  --index-w: clamp(300px, 23vw, 360px);
  --gutter: clamp(16px, 1.7vw, 26px);
  --pad-x: clamp(26px, 2.6vw, 40px);
  color-scheme: light;
}

* { box-sizing: border-box; }
/* тот же переход, что на всём сайте: CMY-полоса пролетает между страницами.
   Согласие на переход объявлено встроенным стилем в начале index.html: Chrome проверяет его раньше, чем загрузит этот файл. */
.vt-band { position: fixed; top: 100%; left: -25vw; width: 150vw; height: 30vh; pointer-events: none; background: linear-gradient(#00ccea 0 33.4%, #e5007d 33.4% 66.7%, #ffeb29 66.7%); view-transition-name: vt-band; contain: strict; }
::view-transition-group(vt-band) { animation: vt-band-sweep 700ms cubic-bezier(.7,0,.25,1) both; transform-origin: 50% 50%; }
::view-transition-old(vt-band) { display: none; }
::view-transition-new(vt-band) { animation: none; }
::view-transition-old(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { animation: vt-page-reveal 700ms cubic-bezier(.7,0,.25,1) both; mix-blend-mode: normal; }
@keyframes vt-band-sweep { from { transform: translate(-25vw, calc(100vh + 13vw)) rotate(-10deg); } to { transform: translate(-25vw, calc(-30vh - 13vw)) rotate(-10deg); } }
@keyframes vt-page-reveal { from { clip-path: polygon(0 calc(115vh + 21.8vw), 100% calc(115vh + 4.2vw), 100% 100%, 0 100%); } to { clip-path: polygon(0 calc(-15vh - 4.2vw), 100% calc(-15vh - 21.8vw), 100% 100%, 0 100%); } }

html, body { height: 100%; margin: 0; }
body {
  background: var(--paper);
  color: var(--k);
  font: 400 1rem/1.6 var(--body);
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, p, ul { margin: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.02; letter-spacing: -0.02em; text-wrap: balance; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
::selection { background: rgb(229 0 125 / 0.18); }
:focus-visible { outline: 3px solid var(--m); outline-offset: 3px; }
input { caret-color: var(--m); }
.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; contain: strict; }


/* ---------- заставка ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  overflow: hidden;
  background: var(--paper);
}
/* уход: CMY-лента пролетает вверх и стирает заставку, как фирменный переход между страницами */
.loader.out { pointer-events: none; animation: loaderWipe 0.95s var(--ease-sweep) forwards; }
@keyframes loaderWipe {
  from { clip-path: polygon(0 0, 100% 0, 100% calc(72vh - 8.8vw), 0 calc(72vh + 8.8vw)); }
  to { clip-path: polygon(0 0, 100% 0, 100% calc(-30vh - 8.8vw), 0 calc(-30vh + 8.8vw)); visibility: hidden; }
}
.lockup { position: relative; z-index: 1; display: grid; justify-items: center; margin-top: -8vh; }
.lk-logo { width: clamp(108px, 10vw, 150px); height: auto; animation: logoIn 0.8s var(--ease-out) both; }
@keyframes logoIn { from { transform: translateY(8px); } to { transform: none; } }
.lk-title { margin-top: clamp(18px, 2.4vw, 30px); font-family: var(--display); font-weight: 400; line-height: 1.02; letter-spacing: -0.02em; text-wrap: balance; font-size: clamp(40px, 6.6vw, 92px); text-align: center; }
.ln { display: block; overflow: hidden; padding: 0.02em 0.04em 0.08em; }
/* строки видны уже в первом кадре (частично), поднимаются из-под маски - заголовок сразу считается отрисованным */
.ln > span { display: block; transform: translateY(22%); animation: lineUp 0.9s var(--ease-out) both; }
.ln > span { animation-delay: 0.04s; }
@keyframes lineUp { to { transform: translateY(0); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
/* прогресс: три полосы CMY под углом -10°, как лента на главной; каждая прорисовывается слева с небольшим отставанием */
.lk-band {
  position: absolute; z-index: 2; left: -25vw; top: 72vh;
  width: 150vw; height: clamp(54px, 10vh, 108px);
  display: grid; grid-template-rows: repeat(3, 1fr);
  transform: translateY(-50%) rotate(-10deg);
  pointer-events: none;
}
.lk-band i {
  display: block;
  transform-origin: 0 50%;
  transform: scaleX(clamp(0, calc(var(--p, 0) * 1.3 - 0.12 - var(--n) * 0.09), 1));
  transition: transform 0.7s var(--ease-out);
}
.lk-band i:nth-child(1) { background: var(--c); }
.lk-band i:nth-child(2) { background: var(--m); }
.lk-band i:nth-child(3) { background: var(--y); }
.loader.out .lk-band { animation: bandSweep 0.95s var(--ease-sweep) forwards; }
@keyframes bandSweep { to { transform: translateY(calc(-50% - 102vh)) rotate(-10deg); } }

/* ---------- облако ---------- */
.stage {
  position: fixed; inset: 0; z-index: 1;
  touch-action: none;
  transition: transform 0.62s var(--ease-out);
}
body.panel-open .stage { transform: translateX(calc(var(--panel-w) / -2)); }
body.index-open .stage { transform: translateX(calc(var(--index-w) / 2)); }
body.panel-open.index-open .stage { transform: translateX(calc((var(--index-w) - var(--panel-w)) / 2)); }
.atlas-canvas { display: block; position: absolute; inset: 0; cursor: grab; }
.atlas-canvas:active { cursor: grabbing; }
.atlas-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.lbl {
  position: absolute; left: 0; top: 0;
  padding: 1px 6px 2px;
  border-radius: var(--r-sm);
  font-family: var(--body);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--k);
  text-align: center;
  visibility: hidden;
  opacity: 0;
  pointer-events: auto;
  transform-origin: 50% 100%;
  text-shadow: 0 0 2px var(--paper), 0 0 5px var(--paper), 0 0 9px var(--paper);
  transition: background-color 0.2s ease, color 0.2s ease;
  will-change: transform;
}
.lbl-en { display: block; height: 0; overflow: hidden; font-size: 0.8em; font-weight: 400; opacity: 0; }
/* выбранный или наведённый термин: только подпись, без плашки, чтобы соседние точки оставались видны */
.lbl.is-active { z-index: 2; color: var(--k); text-shadow: 0 0 2px var(--paper), 0 0 4px var(--paper), 0 0 8px var(--paper), 0 0 14px var(--paper); }


/* ---------- элементы поверх облака ---------- */
.chrome {
  position: fixed; z-index: 30;
  display: flex; align-items: center; gap: 8px;
  opacity: 0;
  transform: translateY(10px);
  filter: blur(4px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out), filter 0.8s var(--ease-out), translate 0.62s var(--ease-out);
  transition-delay: var(--d, 0s), var(--d, 0s), var(--d, 0s), 0s;
}
body.ready .chrome { opacity: 1; transform: none; filter: blur(0); }
.tl { top: max(var(--gutter), env(safe-area-inset-top)); left: var(--gutter); align-items: flex-start; --d: 0.1s; }
.tr { top: max(var(--gutter), env(safe-area-inset-top)); right: var(--gutter); --d: 0.16s; }
.bl { bottom: max(var(--gutter), env(safe-area-inset-bottom)); left: var(--gutter); --d: 0.22s; }
.br { bottom: max(var(--gutter), env(safe-area-inset-bottom)); right: var(--gutter); --d: 0.28s; }
.bc { bottom: max(var(--gutter), env(safe-area-inset-bottom)); left: 0; right: 0; margin: 0 auto; width: max-content; --d: 0.5s; }
body.index-open .tl, body.index-open .bl { translate: var(--index-w) 0; }
body.panel-open .tr, body.panel-open .br { translate: calc(-1 * var(--panel-w)) 0; }
body.panel-open .bc { translate: calc(var(--panel-w) / -2) 0; }
body.index-open .bc { translate: calc(var(--index-w) / 2) 0; }
body.panel-open.index-open .bc { translate: calc((var(--index-w) - var(--panel-w)) / 2) 0; }

.brandmark { display: inline-flex; align-items: flex-start; gap: 0.25rem; height: 44px; padding-top: 9px; margin-right: 10px; text-decoration: none; }
.brandmark img { width: clamp(6.6rem, 8.4vw, 8.4rem); height: auto; }
.brandmark b { font: 400 0.62rem/1 var(--display); margin-top: 0.1rem; }

.icon-btn, .field {
  height: 44px;
  border-radius: var(--r);
  border: 1px solid var(--line-2);
  background: rgb(250 250 250 / 0.9);
  transition: border-color 0.24s var(--ease-out), background-color 0.24s var(--ease-out), transform 0.16s var(--ease-out), width 0.46s var(--ease-out), box-shadow 0.3s ease;
}
.icon-btn { width: 44px; display: grid; place-items: center; position: relative; }
.icon-btn svg, .field svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .icon-btn:hover { border-color: var(--k); background: var(--paper); }
}
.icon-btn[aria-expanded="true"] { background: var(--k); color: var(--on-night); border-color: var(--k); }
.pill-btn { width: auto; display: inline-flex; gap: 8px; padding: 0 16px 0 13px; font-size: 15px; font-weight: 600; }

/* кнопка связи как в шапке главной */
.head-cta {
  display: inline-flex; align-items: center; gap: 0.6rem;
  min-height: 44px; padding: 0.6rem 1.1rem;
  border-radius: var(--r);
  background: var(--k); color: #fff;
  font-size: 0.875rem; font-weight: 600; text-decoration: none;
  transition: background 180ms var(--ease-out), transform 0.16s var(--ease-out);
}
.head-cta svg { width: 1.1rem; height: 1.1rem; }
.head-cta:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .head-cta:hover { background: var(--m); } }

[data-tip]::after {
  content: attr(data-tip);
  position: absolute; left: 50%; top: calc(100% + 8px);
  padding: 6px 9px;
  border-radius: var(--r-sm);
  background: var(--k); color: var(--on-night);
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -3px) scale(0.98);
  transition: opacity 0.12s ease-out, transform 0.12s ease-out;
}
.br [data-tip]::after { top: auto; bottom: calc(100% + 8px); left: auto; right: 0; transform: translate(0, 3px) scale(0.98); }
.tr [data-tip]::after { left: auto; right: 0; transform: translate(0, -3px) scale(0.98); }
@media (hover: hover) and (pointer: fine) {
  [data-tip]:hover::after { opacity: 1; transform: translate(-50%, 0) scale(1); transition: opacity 0.18s var(--ease-icon) 0.45s, transform 0.18s var(--ease-icon) 0.45s; }
  .br [data-tip]:hover::after, .tr [data-tip]:hover::after { transform: none; }
}
.search.open [data-tip]::after, body.touch [data-tip]::after { display: none; }

/* поиск: кнопка раскрывается в поле */
.search { position: relative; }
.field { width: 44px; display: flex; align-items: center; overflow: hidden; }
.field-btn { flex: none; width: 42px; height: 42px; display: grid; place-items: center; color: inherit; }
.field input {
  flex: 1; min-width: 0; height: 100%;
  border: 0; outline: none; background: none;
  font: 400 16px/1 var(--body); color: var(--k);
  opacity: 0;
  transition: opacity 0.28s ease 0.06s;
}
.field input::placeholder { color: var(--muted); }
.field input::-webkit-search-cancel-button { appearance: none; }
.field-kbd { flex: none; margin-right: 12px; padding: 1px 7px; border: 1px solid var(--line-2); border-radius: var(--r-sm); font: 600 12px/1.4 var(--body); color: var(--muted); opacity: 0; transition: opacity 0.2s ease; }
.field-clear { flex: none; width: 36px; height: 36px; margin-right: 4px; display: none; place-items: center; border-radius: var(--r-sm); color: var(--muted); }
.field-clear svg { width: 16px; height: 16px; }
.search.open .field { width: min(380px, calc(100vw - 2 * var(--gutter) - 210px)); background: var(--paper); border-color: var(--k); box-shadow: var(--float); }
.search.open .field input { opacity: 1; }
.search.open:not(.has-query) .field-kbd { opacity: 1; }
.search.has-query .field-kbd { display: none; }
.search.has-query .field-clear { display: grid; }
@media (hover: hover) and (pointer: fine) { .field:hover { border-color: var(--k); } }

.results {
  position: absolute; left: 0; top: calc(100% + 8px);
  width: min(380px, calc(100vw - 2 * var(--gutter) - 210px));
  padding: 6px;
  border: 1px solid var(--k);
  border-radius: calc(var(--r) + 6px);
  background: var(--paper);
  box-shadow: var(--float);
  opacity: 0; visibility: hidden;
  transform: translateY(-6px) scale(0.98);
  transform-origin: 22px 0;
  transition: opacity 0.15s ease-out, transform 0.15s ease-out, visibility 0s 0.15s;
}
.search.has-query .results { opacity: 1; visibility: visible; transform: none; transition: opacity 0.2s var(--ease-icon), transform 0.25s var(--ease-out), visibility 0s; }
.results ul { list-style: none; margin: 0; padding: 0; position: relative; z-index: 1; }
.results-pill { position: absolute; left: 6px; right: 6px; top: 0; height: 44px; border-radius: var(--r); background: var(--paper-2); transform: translateY(var(--y, 6px)); transition: transform 0.22s var(--ease-out), height 0.22s var(--ease-out), opacity 0.15s ease; opacity: 0; }
.results.has-sel .results-pill { opacity: 1; }
.res { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 44px; padding: 9px 12px; border-radius: var(--r); text-align: left; }
.res i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--dot); box-shadow: inset 0 0 0 1px rgb(17 17 21 / 0.25); }
.res .ru { font-weight: 600; font-size: 15px; }
.res .ru mark { background: var(--y); color: var(--k); border-radius: 2px; }
.res .en { margin-left: auto; padding-left: 12px; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.results-empty { display: none; padding: 12px 12px 13px; font-size: 14px; color: var(--muted); }
.results.empty .results-empty { display: block; }
.results.fresh li { animation: rowIn 0.42s var(--ease-out) both; animation-delay: calc(var(--k) * 28ms); }

/* подсказка */
.hint {
  gap: 10px; padding: 8px 14px;
  border-radius: var(--r);
  background: rgb(250 250 250 / 0.9);
  border: 1px solid var(--line);
  font-size: 13px; color: var(--muted); white-space: nowrap;
}
.hint i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.6; }
.hint-touch { display: none; }
body.touch .hint-desk { display: none; }
body.touch .hint-touch { display: inline-block; }
body.ready .hint.gone { opacity: 0; transform: translateY(6px); transition: opacity 0.4s ease, transform 0.4s ease, translate 0.62s var(--ease-out); transition-delay: 0s; }

/* смена иконки звука */
.swap { position: relative; display: grid; width: 20px; height: 20px; }
.swap svg { grid-area: 1 / 1; transition: opacity 0.3s var(--ease-icon), scale 0.3s var(--ease-icon), filter 0.3s var(--ease-icon); }
.swap[data-state="on"] [data-icon="off"], .swap[data-state="off"] [data-icon="on"] { opacity: 0; scale: 0.25; filter: blur(4px); }

/* ---------- закрыть ---------- */
.close-btn { width: 44px; height: 44px; border-radius: var(--r); border: 1px solid var(--line-2); display: grid; place-items: center; background: var(--paper); transition: border-color 0.24s var(--ease-out), transform 0.16s var(--ease-out); }
.close-btn i { position: relative; width: 14px; height: 14px; }
.close-btn i::before, .close-btn i::after { content: ""; position: absolute; left: 0; top: 50%; width: 100%; height: 1.7px; margin-top: -0.85px; border-radius: 1px; background: var(--k); transition: rotate 0.35s var(--ease-out); }
.close-btn i::before { rotate: 45deg; }
.close-btn i::after { rotate: -45deg; }
.close-btn:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .close-btn:hover { border-color: var(--k); }
  .close-btn:hover i::before { rotate: 135deg; }
  .close-btn:hover i::after { rotate: 45deg; }
}

/* ---------- фирменная кнопка ---------- */
.btn {
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.7rem;
  min-height: 3.25rem; padding: 0.8rem 1.35rem;
  border-radius: var(--r);
  overflow: hidden;
  font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none;
  user-select: none;
  transition: transform 160ms var(--ease-out);
}
.btn svg { width: 1.25rem; height: 1.25rem; flex: none; }
.btn--primary { background: var(--m); color: #fff; }
.btn--outline { background: var(--paper); color: var(--k); box-shadow: inset 0 0 0 1px var(--k); }
.btn::before {
  content: ""; position: absolute; inset: -40% -30%; z-index: -1;
  background: linear-gradient(100deg, transparent 0 30%, var(--y) 30% 50%, var(--c) 50% 70%, transparent 70%);
  transform: translateX(-110%);
  transition: transform 520ms var(--ease-sweep);
}
.btn--outline::before { background: linear-gradient(100deg, transparent 0 30%, var(--y) 30% 70%, transparent 70%); }
.btn:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover::before, .btn--outline:hover::before { transform: translateX(110%); }
}

/* ---------- карточка термина ---------- */
.panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 40;
  width: var(--panel-w);
  display: flex; flex-direction: column;
  background: var(--paper);
  border-left: 1px solid var(--line);
  transform: translateX(100%);
  visibility: hidden;
  will-change: transform;
  transition: transform 0.5s var(--ease-out), visibility 0s 0.5s;
}
body.panel-open .panel { transform: none; visibility: visible; transition: transform 0.62s var(--ease-out), visibility 0s; }
.panel-close { position: absolute; top: clamp(16px, 2.6vh, 24px); right: clamp(16px, 1.8vw, 24px); z-index: 3; }
.panel-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.slide {
  position: absolute; inset: 0;
  overflow-y: auto; overscroll-behavior: contain;
  padding: clamp(28px, 6.5vh, 64px) var(--pad-x) 44px;
  scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
}
.slide[data-phase="enter"] { z-index: 1; animation: slideEnter 0.56s var(--ease-out) both; }
.slide[data-phase="exit"] { z-index: 0; pointer-events: none; animation: slideExit 0.56s var(--ease-out) both; }
.slide[data-phase="exit"][data-dir="0"] { animation: slideFade 0.22s ease-out both; }
@keyframes slideEnter { from { transform: translateX(calc(var(--dir, 0) * (100% + 24px))); } to { transform: none; } }
@keyframes slideExit { from { transform: none; } to { transform: translateX(calc(var(--dir, 0) * (-100% - 24px))); } }
@keyframes slideFade { to { opacity: 0; transform: translateY(-8px); } }

.title { margin-right: 56px; font-family: var(--body); font-weight: 600; font-size: clamp(30px, 2.4vw, 40px); line-height: 1.1; letter-spacing: -0.015em; }
.mask { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.title-inner { display: block; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 14px; font-size: 15px; color: var(--muted); }
.chip-sec { display: inline-flex; align-items: center; min-height: 26px; padding: 2px 9px 3px; border-radius: var(--r-sm); background: var(--plane); color: var(--on-plane); font-size: 13px; font-weight: 600; }
.aka { width: 100%; font-size: 14.5px; }
.def { margin-top: 22px; font-size: clamp(18px, 1.3vw, 20px); line-height: 1.55; text-wrap: pretty; }
.rule { display: block; height: 1px; margin-top: 28px; background: var(--line); transform-origin: 0 50%; }
.h3 { margin-top: 26px; font-size: 17px; letter-spacing: -0.01em; }
.txt { margin-top: 10px; font-size: 16px; line-height: 1.65; color: rgb(17 17 21 / 0.88); text-wrap: pretty; }
.txt + .txt { margin-top: 12px; }
.confuse { list-style: none; padding: 0; margin-top: 10px; display: grid; gap: 10px; }
.confuse li { font-size: 16px; line-height: 1.6; color: rgb(17 17 21 / 0.88); }
.confuse b { font-weight: 600; color: var(--k); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding: 0; list-style: none; }
.tag {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 38px; padding: 0 14px 0 11px;
  border-radius: var(--r);
  border: 1px solid var(--line-2);
  background: var(--paper);
  font-size: 15px; font-weight: 600;
  transition: border-color 0.24s var(--ease-out), background-color 0.24s var(--ease-out), transform 0.16s var(--ease-out);
}
.tag::before { content: ""; position: absolute; inset: -3px; }
.tag i { width: 9px; height: 9px; border-radius: 50%; background: var(--dot); box-shadow: inset 0 0 0 1px rgb(17 17 21 / 0.25); flex: none; }
.tag:active { transform: scale(0.97); }
.roll { display: inline-flex; flex-direction: column; height: 1.3em; line-height: 1.3; overflow: hidden; }
.roll > span { display: block; flex: none; height: 1.3em; transition: transform 0.42s var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .tag:hover { border-color: var(--k); }
  .tag:hover .roll > span, .pager-btn:hover .roll > span { transform: translateY(-100%); }
}
/* вики-ссылка: подчёркивание как у ссылок главной */
.ilink {
  display: inline; font: inherit; color: inherit; padding: 0;
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.26em;
  text-decoration-color: rgb(229 0 125 / 0.55);
  transition: text-decoration-color 0.2s ease, color 0.2s ease;
}
@media (hover: hover) and (pointer: fine) { .ilink:hover { color: var(--link); text-decoration-color: var(--m); } }

/* поэтапное появление содержимого */
.slide.stagger .r { animation: revealFade 0.66s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 52ms + var(--base, 0.26s)); }
.slide.stagger .rule { animation: ruleGrow 0.7s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 52ms + var(--base, 0.26s) + 40ms); }
.slide.stagger .title-inner { animation: titleReveal 0.78s var(--ease-out) both; animation-delay: calc(var(--base, 0.26s) + 20ms); }
.slide.stagger .tag { animation: tagIn 0.5s var(--ease-out) both; animation-delay: calc(var(--base, 0.26s) + 420ms + var(--k, 0) * 34ms); }
@keyframes revealFade { from { opacity: 0; transform: translateY(11px); } to { opacity: 1; transform: none; } }
@keyframes ruleGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes titleReveal { from { transform: translateY(105%); } to { transform: none; } }
@keyframes tagIn { from { opacity: 0; transform: translateY(6px) scale(0.96); } to { opacity: 1; transform: none; } }

.pager { flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; border-top: 1px solid var(--line); min-height: 68px; }
.pager-btn { display: flex; flex-direction: column; justify-content: center; gap: 1px; padding: 8px var(--pad-x); min-width: 0; text-align: left; transition: background-color 0.24s var(--ease-out); }
#pager-next { align-items: flex-end; text-align: right; }
.pager-dir { font-size: 12.5px; color: var(--muted); }
.pager-text { max-width: 100%; overflow: hidden; font-size: 15px; line-height: 1.3; }
.pager-text .roll { display: flex; height: 1.3em; }
.pager-name { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pager-index { align-self: center; font: 400 14px/1 var(--body); color: var(--muted); font-variant-numeric: tabular-nums; }
.pager-index b { color: var(--k); font-weight: 600; }
@media (hover: hover) and (pointer: fine) { .pager-btn:hover { background: var(--paper-2); } }

/* ---------- все термины ---------- */
.index {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 40;
  width: var(--index-w);
  display: flex; flex-direction: column;
  background: var(--paper);
  border-right: 1px solid var(--line);
  transform: translateX(-100%);
  visibility: hidden;
  transition: transform 0.5s var(--ease-out), visibility 0s 0.5s;
}
body.index-open .index { transform: none; visibility: visible; transition: transform 0.62s var(--ease-out), visibility 0s; }
.index-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: clamp(16px, 2.6vh, 24px) 16px 12px 24px; }
.index-head h2 { font-size: 21px; }
.index-count { margin-left: 4px; color: var(--muted); }
.index-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 12px 28px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.idx-sec { margin-top: 14px; }
.sec-head { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 12px; border-radius: var(--r); text-align: left; transition: background-color 0.2s ease; }
.sec-head .chip-sec { font-size: 13.5px; }
.sec-head small { margin-left: auto; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sec-head[aria-pressed="true"] { background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--k); }
.idx-list { list-style: none; margin: 0; padding: 0; }
.row { position: relative; display: flex; align-items: baseline; gap: 10px; width: 100%; min-height: 44px; padding: 11px 12px 11px 32px; border-radius: var(--r); text-align: left; font-size: 15px; line-height: 1.3; transition: background-color 0.15s ease; }
.row::before { content: ""; position: absolute; left: 14px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--dot); box-shadow: inset 0 0 0 1px rgb(17 17 21 / 0.25); opacity: 0.5; transition: opacity 0.2s ease, scale 0.3s var(--ease-out); }
.row .ru { min-width: 0; }
.row .en { margin-left: auto; max-width: 42%; flex: none; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row[aria-current="true"] { background: var(--paper-2); font-weight: 600; }
.row[aria-current="true"]::before { opacity: 1; scale: 1.3; }
@media (hover: hover) and (pointer: fine) {
  .row:hover { background: var(--paper-2); }
  .row:hover::before { opacity: 1; }
  .sec-head:hover { background: var(--paper-2); }
}
body.index-open.fresh-index .idx-anim { animation: rowIn 0.5s var(--ease-out) both; animation-delay: calc(min(var(--k) * 12ms, 420ms) + 0.14s); }
@keyframes rowIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- о проекте ---------- */
.modal { position: fixed; inset: 0; z-index: 70; visibility: hidden; transition: visibility 0s 0.46s; }
.modal.open { visibility: visible; transition: visibility 0s; }
.modal-backdrop { position: absolute; inset: 0; background: rgb(17 17 21 / 0.28); opacity: 0; transition: opacity 0.4s ease; }
.modal.open .modal-backdrop { opacity: 1; }
.modal-box {
  position: absolute; left: 50%; top: 50%;
  width: min(92vw, 500px); max-height: 90dvh; overflow-y: auto;
  padding: 30px 30px 24px;
  border: 1px solid var(--k);
  border-radius: calc(var(--r) * 2);
  background: var(--paper);
  box-shadow: 0 30px 80px -30px rgb(17 17 21 / 0.45);
  opacity: 0;
  transform: translate(-50%, -44%) scale(0.96);
  transition: opacity 0.3s ease, transform 0.36s var(--ease-out);
}
.modal.open .modal-box { opacity: 1; transform: translate(-50%, -50%); transition: opacity 0.42s ease, transform 0.46s var(--ease-out); }
.modal-box > .close-btn { position: absolute; top: 16px; right: 16px; }
.modal-box h2 { margin: 4px 56px 14px 0; font-size: clamp(26px, 3vw, 32px); }
.modal-box p { margin-bottom: 10px; font-size: 16px; line-height: 1.6; color: rgb(17 17 21 / 0.88); }
.modal.open .modal-box > * { animation: revealFade 0.6s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 45ms + 0.12s); }
.about-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 4px; }
.about-rule { display: block; height: 1px; margin: 20px 0 16px; background: var(--line); }
.about-author { display: flex; align-items: center; gap: 12px; }
.about-author img { width: 52px; height: 52px; flex-shrink: 0; aspect-ratio: 1; border-radius: 50%; object-fit: cover; outline: 1px solid oklch(0 0 0 / 0.1); outline-offset: -1px; }
.about-author b { display: block; font-weight: 600; font-size: 16px; }
.about-author span { font-size: 14px; color: var(--muted); }
.about-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 18px; }
.about-cta .cta-note { font-size: 13.5px; color: var(--muted); }
.text-link { font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.3em; text-decoration-color: var(--m); }
.modal-box .about-credit { margin-top: 16px; font-size: 13.5px; color: var(--muted); }
.about-credit a { text-underline-offset: 0.18em; }
.legal-links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.legal-links a, .legal-links button { min-height: 32px; display: inline-flex; align-items: center; color: inherit; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .legal-links a:hover, .legal-links button:hover { color: var(--k); text-decoration: underline; } }

/* ---------- согласие на статистику, как на сайте ---------- */
.consent-banner { position: fixed; z-index: 1000; inset: auto 1rem 1rem auto; width: min(23rem, calc(100vw - 2rem)); padding: 0.8rem 0.9rem 0.85rem; background: var(--paper); color: var(--k); border: 1px solid var(--k); border-radius: var(--r); box-shadow: 0 8px 24px #11111526; font: 400 0.8125rem/1.4 var(--body); animation: consent-in 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) 0.6s both; }
.consent-banner[hidden] { display: none; }
.consent-banner h2 { font: 400 0.875rem/1.3 var(--display); margin: 0 0 0.25rem; }
.consent-banner p { margin: 0; }
.consent-banner a { color: var(--link); }
.consent-actions { display: flex; gap: 0.5rem; margin-top: 0.65rem; }
.consent-actions button { flex: 1; min-height: 36px; padding: 0.4rem 0.5rem; border: 1px solid var(--k); border-radius: var(--r-sm); background: var(--paper); font: 600 0.8125rem/1.3 var(--body); cursor: pointer; }
@keyframes consent-in { from { opacity: 0; transform: translateY(12px); } }

/* ---------- ручка шторки ---------- */
.sheet-grip { display: none; }

/* ---------- телефон ---------- */
@media (max-width: 760px) {
  :root { --gutter: 12px; --pad-x: 22px; --panel-w: 0px; --index-w: 0px; }
  .stage, body.index-open .stage { transform: none; transition: transform 0.5s var(--ease-drawer); }
  body.panel-open .stage, body.panel-open.index-open .stage { transform: translateY(-19dvh); }
  body.index-open .tl, body.index-open .bl, body.panel-open .tr, body.panel-open .br, body.panel-open .bc, body.index-open .bc { translate: none; }
  .tl { right: calc(var(--gutter) + 52px); }
  .brandmark { margin-right: auto; }
  .brandmark img { width: 6.4rem; }
  .search { position: static; }
  .search.open { position: absolute; left: 0; right: 52px; top: 0; z-index: 2; }
  .search.open .field, .results { width: 100%; }
  .results { top: calc(44px + 8px); }
  .field-kbd { display: none; }
  #list-btn, .head-cta { display: none; }
  .tr { top: max(var(--gutter), env(safe-area-inset-top)); }
  .bl-m { display: flex; }
  .hint { bottom: calc(max(var(--gutter), env(safe-area-inset-bottom)) + 56px); }
  body.panel-open .br, body.panel-open .bl, body.panel-open .bc, body.index-open .bc { opacity: 0; pointer-events: none; }
  .panel, .index {
    top: auto; left: 0; right: 0; bottom: 0;
    width: 100%;
    border: 0; border-top: 1px solid var(--k);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -20px 44px -30px rgb(17 17 21 / 0.55);
    transform: translateY(100%);
    transition: transform 0.5s var(--ease-drawer), visibility 0s 0.5s;
  }
  .panel { height: min(66dvh, 640px); }
  .index { height: 86dvh; }
  body.panel-open .panel, body.index-open .index { transform: translateY(var(--drag, 0px)); transition: transform 0.5s var(--ease-drawer), visibility 0s; }
  .panel.dragging, .index.dragging { transition: none !important; }
  .sheet-grip { display: flex; justify-content: center; flex: none; padding: 10px 0 6px; cursor: grab; touch-action: none; }
  .sheet-grip span { width: 40px; height: 4px; border-radius: 4px; background: var(--line-2); }
  .panel-close { top: 14px; right: 12px; }
  .slide { padding: 8px var(--pad-x) 32px; }
  .title { font-size: 30px; }
  .def { font-size: 17.5px; margin-top: 16px; }
  .pager { min-height: 62px; padding-bottom: env(safe-area-inset-bottom); }
  .pager-btn { padding: 8px 16px; }
  .index-head { padding: 2px 12px 10px 20px; }
  .consent-banner { inset: auto 0.75rem 0.75rem 0.75rem; width: auto; }
}
@media (min-width: 761px) { .bl-m { display: none !important; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; transition-duration: 0.12s !important; transition-delay: 0s !important; }
}
