/* personika.ai — публичный сайт Personika LTD: технологическая платформа для ИИ-персонажей.
   Идея страницы — разрез. Аудитория видит персонажа, команда — систему, поэтому герой поделён осью пополам:
   слева персонаж снаружи (стеклянная сфера бренда, посты, переписка), справа он же изнутри (сетка, узлы, подписи).
   Ось и сфера — единственное смелое место; остальные полосы спокойные: схемы кабинета в его же токенах.
   Оранжевый — только «на связи»: точка знака, присутствие, живые события. Стилей в атрибутах нет — их запрещает CSP. */
:root {
  --bg: #ECEEF2;
  --surface: #FFFFFF;
  --ink: #0E0F12;
  --ink-2: #3E424B;
  --muted: #5F6470;
  --line: #D9DCE3;
  --tint: #E2E6EF;
  --link: #2A5EF0;
  --dot: #FF5A1F;
  --btn: #0E0F12;
  --btn-ink: #FFFFFF;
  --bar: rgba(236, 238, 242, 0.84);
  --axis: rgba(14, 15, 18, 0.24);
  --grid: rgba(42, 94, 240, 0.09);
  --ok-bg: #E6F6F0; --ok: #1F6B52;
  --wait-bg: #FFF1E6; --wait: #A6430F;
  --ai-bg: #EDE6FF; --ai: #5B3CC4;
  --font: 'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --r-card: 28px;
  --r-pill: 999px;
  --header-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A0C11; --surface: #13161E; --ink: #EEF0F3; --ink-2: #C9CDD6; --muted: #9097A6; --line: #262B36; --tint: #181C26;
    --link: #8EAAFF; --btn: #EEF0F3; --btn-ink: #0A0C11; --bar: rgba(10, 12, 17, 0.8);
    --axis: rgba(238, 240, 243, 0.22); --grid: rgba(142, 170, 255, 0.08);
    --ok-bg: #12302A; --ok: #7FE0B0; --wait-bg: #33200F; --wait: #FFB397; --ai-bg: #241D3D; --ai: #C9B8FF;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0A0C11; --surface: #13161E; --ink: #EEF0F3; --ink-2: #C9CDD6; --muted: #9097A6; --line: #262B36; --tint: #181C26;
  --link: #8EAAFF; --btn: #EEF0F3; --btn-ink: #0A0C11; --bar: rgba(10, 12, 17, 0.8);
  --axis: rgba(238, 240, 243, 0.22); --grid: rgba(142, 170, 255, 0.08);
  --ok-bg: #12302A; --ok: #7FE0B0; --wait-bg: #33200F; --wait: #FFB397; --ai-bg: #241D3D; --ai: #C9B8FF;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 20px); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16.5px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3 { margin: 0; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(36px, 5.4vw, 64px); line-height: 1.04; font-weight: 300; letter-spacing: -0.045em; }
h2 { font-size: clamp(28px, 3.4vw, 42px); line-height: 1.1; font-weight: 300; letter-spacing: -0.04em; }
h3 { font-size: 18px; line-height: 1.35; font-weight: 600; letter-spacing: -0.015em; }
p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; }
.wrap { max-width: 1160px; margin-inline: auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 40; padding: 10px 16px; border-radius: var(--r-pill); background: var(--btn); color: var(--btn-ink); font-weight: 600; text-decoration: none; }
.skip:focus { top: calc(env(safe-area-inset-top, 0px) + 10px); }

/* ── знак и словесный знак: точка над i — та же точка «на связи» (замер Manrope 600, доска «Знак personika») ── */
.pk-wm { font-weight: 600; letter-spacing: -0.025em; line-height: 1; white-space: nowrap; }
.pk-wm__i { position: relative; }
.pk-wm__i::after { content: ""; position: absolute; left: 0.0675em; top: 0.31em; width: 0.13em; height: 0.13em; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #FFC9B3, #FF5A1F 72%); }

/* ── шапка ── */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--bar); -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--line); }
.top__inner { display: flex; align-items: center; gap: 20px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; font-size: 27px; padding-block: 4px; }  /* логотип — словесный знак */
.nav { display: flex; gap: 2px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { padding: 8px 12px; border-radius: var(--r-pill); color: var(--ink-2); text-decoration: none; font-size: 14.5px; font-weight: 500; white-space: nowrap; }
.nav a:hover { background: var(--tint); color: var(--ink); }
.lang { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 40px; padding: 0 12px; border-radius: var(--r-pill); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); text-decoration: none; font-size: 13.5px; font-weight: 600; }
.lang:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: var(--r-pill); background: var(--btn); color: var(--btn-ink); text-decoration: none; font-size: 15.5px; font-weight: 600; white-space: nowrap; }
.btn:hover { text-decoration: none; opacity: .9; }
.btn--sm { height: 40px; padding: 0 16px; font-size: 14px; }
@media (max-width: 960px) { .nav { display: none; } .lang { margin-left: auto; } }

/* ── герой: разрез ── */
.hero { position: relative; overflow: hidden; padding-block: clamp(40px, 6vw, 72px) clamp(56px, 7vw, 96px); }
.hero__grid { position: absolute; inset: 0 0 0 50%; background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px; background-position: -1px -1px; pointer-events: none;
  -webkit-mask-image: radial-gradient(130% 95% at 0% 45%, #000 35%, transparent 80%); mask-image: radial-gradient(130% 95% at 0% 45%, #000 35%, transparent 80%); }
/* ось видна там, где разрез: между половинами заголовка и в рисунке (там она нарисована в SVG); абзац и кнопку не перечёркивает */
.hero h1 { position: relative; }
.hero h1::before { content: ""; position: absolute; left: 50%; top: -28px; bottom: -6px; border-left: 1px dashed var(--axis); }
.hero__inner { position: relative; display: flex; flex-direction: column; align-items: center; gap: clamp(22px, 3vw, 34px); }
.hero h1 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: clamp(32px, 5vw, 72px); width: 100%; }
.hero h1 > span { text-wrap: balance; }
.hero__out { text-align: right; }
.hero__in { text-align: left; }
.hero__lead { max-width: 60ch; text-align: center; font-size: clamp(16.5px, 1.5vw, 18.5px); color: var(--ink-2); }
.hero__cta { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.hero__hint { font-size: 14px; color: var(--muted); text-align: center; }

.cut { position: relative; width: 100%; margin: 0; }
.cut__art { display: block; width: 100%; height: auto; }
.cut .edge { stroke: var(--axis); }
.cut .lead-line { stroke: var(--ink); stroke-opacity: .32; }
.cut .lead-dot { fill: var(--ink); fill-opacity: .55; }
.cut__layer { position: absolute; top: 0; left: 0; right: 0; aspect-ratio: 1160 / 620; pointer-events: none; }  /* ровно поверх рисунка, без подписи под ним */
.cut__label { position: absolute; left: 77.4%; transform: translateY(-50%); display: flex; align-items: baseline; gap: 10px; font-size: clamp(12.5px, 1.25vw, 15px); font-weight: 500; color: var(--ink); white-space: nowrap; }
.cut__label small { font-size: 0.86em; font-weight: 400; color: var(--muted); }
/* top = y узла / 620 (NODES в build.py): выноски горизонтальны, подпись встаёт ровно на свою линию */
.cut__label--1 { top: 14.52%; } .cut__label--2 { top: 21.45%; } .cut__label--3 { top: 28.39%; } .cut__label--4 { top: 35.32%; }
 .cut__label--5 { top: 42.26%; } .cut__label--6 { top: 49.19%; } .cut__label--7 { top: 56.13%; }
.cut__post, .cut__msg, .cut__live { position: absolute; background: var(--surface); color: var(--ink); box-shadow: 0 1px 0 rgba(14, 15, 18, .04), 0 18px 40px -18px rgba(30, 40, 90, .35); }
.cut__post { left: 3%; top: 11%; width: 20%; padding: 10px; border-radius: 22px; display: flex; flex-direction: column; gap: 9px; font-size: clamp(12px, 1.15vw, 14px); line-height: 1.4; }
.cut__img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; background: var(--tint); }
.cut__meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.9em; }
.cut__msg { left: 9%; top: 63%; width: 25%; padding: 12px 14px; border-radius: 20px 20px 20px 6px; font-size: clamp(12.5px, 1.2vw, 14.5px); line-height: 1.45; }
.cut__who { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; font-weight: 600; font-size: 0.92em; }
.cut__live { left: 25%; top: 3%; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; border-radius: var(--r-pill); font-size: clamp(12px, 1.1vw, 13.5px); font-weight: 500; white-space: nowrap; }
.ava { flex: none; width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #E4EAFF, #8FA4FF 45%, #4F5FE6); }
.live { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--dot); box-shadow: 0 0 0 3px rgba(255, 90, 31, .18); }
.tag-ai { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: var(--r-pill); background: var(--ai-bg); color: var(--ai); font-size: 11.5px; font-weight: 600; }
.cut__sides { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: clamp(32px, 5vw, 72px); margin-top: 18px; font-size: 14.5px; color: var(--muted); }
.cut__sides > div:first-child { text-align: right; }
.cut__sides b { color: var(--ink); font-weight: 600; }
.cut__list { display: none; }
@media (max-width: 1100px) { .cut__label small { display: none; } }  /* на узком экране подписи короче, иначе упираются в край */

/* единственное движение страницы: разрез открывается при загрузке, точка «на связи» дышит */
.cut .sys { animation: cut-open 1.1s cubic-bezier(.2, .7, .2, 1) .25s both; }
.cut .net, .cut .leads { animation: cut-fade .8s ease-out 1.05s both; }
.cut .pulse { transform-box: fill-box; transform-origin: center; animation: pulse 2.6s ease-out 1.6s infinite; }
@keyframes cut-open { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes cut-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 0% { transform: scale(1); opacity: .5; } 70%, 100% { transform: scale(1.5); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cut .sys, .cut .net, .cut .leads, .cut .pulse { animation: none; } .cut .pulse { opacity: 0; } }

@media (max-width: 960px) {
  .hero__grid { inset: 0; -webkit-mask-image: linear-gradient(#000 30%, transparent 75%); mask-image: linear-gradient(#000 30%, transparent 75%); }
  .hero h1::before { display: none; }
  .hero h1 { grid-template-columns: minmax(0, 1fr); row-gap: 4px; text-align: center; }
  .hero__out, .hero__in { text-align: center; }
  .cut { overflow: hidden; }
  .cut__art { width: 172%; margin-left: -36%; }
  .cut .leads, .cut__layer, .cut__sides { display: none; }
  .cut__list { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin-top: 8px; font-size: 14.5px; }
  .cut__list b { display: block; margin-bottom: 6px; font-weight: 600; }
  .cut__list ul { list-style: none; display: flex; flex-direction: column; gap: 5px; color: var(--ink-2); }
}
@media (max-width: 520px) { .cut__list { grid-template-columns: minmax(0, 1fr); } }

/* ── полосы ── */
.band { padding-block: clamp(64px, 9vw, 120px); }
.band--surface { background: var(--surface); }
.band__head { display: flex; flex-direction: column; gap: 14px; max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }
.band__head p { font-size: clamp(16.5px, 1.4vw, 18px); color: var(--ink-2); max-width: 62ch; }

/* жизненный цикл: шесть станций, номера — потому что это и есть последовательность */
.flow { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; counter-reset: st; }
.st { display: flex; flex-direction: column; gap: 14px; padding: 22px; border-radius: var(--r-card); background: var(--bg); counter-increment: st; min-width: 0; }
.st__n { display: flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 600; color: var(--ink); }
.st__n::before { content: counter(st); flex: none; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--surface); color: var(--ink); font-size: 14px; font-variant-numeric: tabular-nums; box-shadow: inset 0 0 0 1px var(--line); }
.st p { color: var(--ink-2); font-size: 15.5px; }
.st .ui { margin-top: auto; }
@media (max-width: 1000px) { .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .flow { grid-template-columns: minmax(0, 1fr); } }

/* мини-экраны кабинета */
.ui { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 20px; background: var(--surface); font-size: 13.5px; line-height: 1.4; box-shadow: inset 0 0 0 1px var(--line); }
.ui__who { display: flex; align-items: center; gap: 10px; }
.ui__who .ava { width: 36px; height: 36px; }
.ui__who b { display: block; font-size: 14.5px; }
.ui__who span { color: var(--muted); font-size: 12.5px; }
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 12px; }
.kv dt { color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.tiles img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 12px; background: var(--tint); }
.wave { display: flex; align-items: center; justify-content: space-between; height: 28px; padding-inline: 2px; }
.wave i { flex: none; width: 4px; border-radius: 2px; background: var(--ink); opacity: .5; }
.w1 { height: 30%; } .w2 { height: 70%; } .w3 { height: 45%; } .w4 { height: 95%; } .w5 { height: 60%; } .w6 { height: 35%; } .w7 { height: 80%; } .w8 { height: 50%; }
.rows { list-style: none; display: flex; flex-direction: column; }
.rows li { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-top: 1px solid var(--line); }
.rows li:first-child { border-top: 0; padding-top: 2px; }
.rows li > span:first-of-type { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rows time + span { white-space: nowrap; }
.rows time { flex: none; width: 66px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: var(--r-pill); background: var(--tint); color: var(--ink-2); font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip--ok { background: var(--ok-bg); color: var(--ok); }
.chip--wait { background: var(--wait-bg); color: var(--wait); }
.chip--ai { background: var(--ai-bg); color: var(--ai); }
.msg { max-width: 88%; padding: 9px 12px; border-radius: 16px; }
.msg--in { align-self: flex-start; background: var(--tint); border-bottom-left-radius: 6px; }
.msg--draft { align-self: flex-end; display: flex; flex-direction: column; gap: 6px; background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--ai); border-bottom-right-radius: 6px; }
.msg--draft .chip { align-self: flex-start; }
.acts { display: flex; justify-content: flex-end; gap: 6px; }
.act { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: var(--r-pill); box-shadow: inset 0 0 0 1px var(--line); font-weight: 600; font-size: 12.5px; }
.act--main { background: var(--btn); color: var(--btn-ink); box-shadow: none; }
.funnel { display: flex; flex-direction: column; gap: 6px; }
.fb { position: relative; display: flex; justify-content: space-between; align-items: center; height: 30px; padding: 0 10px; border-radius: 10px; background: var(--tint); overflow: hidden; }
.fb::before { content: ""; position: absolute; inset: 0 auto 0 0; border-radius: 10px; background: #9DB0FF; opacity: .55; }
.fb span, .fb b { position: relative; }
.fb b { font-variant-numeric: tabular-nums; }
.fb--1::before { width: 100%; } .fb--2::before { width: 53%; } .fb--3::before { width: 15%; }
.spark { display: block; width: 100%; height: 36px; }
.spark path { fill: none; stroke: var(--link); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* «изнанка»: полосы о том, как устроена система, — в цвете внутренности сферы из героя (сетка точек, тёмно-синий).
   Снаружи светло, внутри тёмно: страница чередует обе стороны разреза. Свои токены, тема на них не влияет. */
.band--inside { position: relative; overflow: hidden; color: #E8ECFF;
  --in-ink: #F3F5FF; --in-2: #C3CAEA; --in-muted: #8E98C4; --in-line: rgba(143, 164, 255, 0.4); --in-card: rgba(255, 255, 255, 0.06); --in-edge: rgba(255, 255, 255, 0.13);
  background: radial-gradient(110% 80% at 78% 0%, #24307A 0%, #141A44 42%, #0A0D24 100%); }
.band--inside::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(rgba(143, 164, 255, 0.3) 1px, transparent 1.3px); background-size: 18px 18px;
  -webkit-mask-image: radial-gradient(90% 70% at 70% 10%, #000 30%, transparent 85%); mask-image: radial-gradient(90% 70% at 70% 10%, #000 30%, transparent 85%); }
.band--inside .wrap { position: relative; }
.band--inside h2, .band--inside h3 { color: var(--in-ink); }
.band--inside .band__head p { color: var(--in-2); }
.band--inside a { color: #A9C1FF; }
.band--inside :focus-visible { outline-color: #A9C1FF; }

/* принципы: путь черновика — пишет ИИ, проверяет человек, уходит от лица персонажа с пометкой ИИ */
.gate { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px); counter-reset: gate; }
.gate__step { position: relative; display: flex; flex-direction: column; gap: 12px; counter-increment: gate; min-width: 0; }
.gate__step::before { content: counter(gate); display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--in-ink); color: #0A0D24; font-size: 14px; font-weight: 700; }
.gate__step:not(:last-child)::after { content: ""; position: absolute; top: 16px; left: 44px; right: calc(-1 * clamp(20px, 3vw, 36px) + 10px); border-top: 1.5px dashed var(--in-line); }
.gate__step h3 { margin-top: 6px; }
.gate__step > p { color: var(--in-2); font-size: 15.5px; }
.gate__ui { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-height: 172px; padding: 16px; border-radius: 22px; background: var(--in-card); box-shadow: inset 0 0 0 1px var(--in-edge); font-size: 13.5px; line-height: 1.45; color: #E8ECFF; }
.gate__msg { padding: 10px 12px; border-radius: 16px 16px 16px 6px; background: rgba(255, 255, 255, 0.1); }
.gate__msg--draft { background: transparent; border: 1.5px dashed rgba(201, 184, 255, 0.75); }
.gate__meta { margin-top: auto; font-size: 12.5px; color: var(--in-muted); }
.gate__who { display: flex; align-items: center; gap: 9px; }
.gate__who .live { margin-left: 2px; }
.gate__checks { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.gate__checks li { position: relative; padding-left: 28px; }
.gate__checks li::before { content: ""; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; background: rgba(127, 224, 176, 0.18); }
.gate__checks li::after { content: ""; position: absolute; left: 6px; top: 5px; width: 8px; height: 5px; border-left: 2px solid #7FE0B0; border-bottom: 2px solid #7FE0B0; transform: rotate(-45deg); }
.ava--letter { display: inline-flex; align-items: center; justify-content: center; background: #FFE6DC; color: #B23A0C; font-size: 12px; font-weight: 700; }
.vault { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 340px); gap: 18px 26px; align-items: center; margin-top: clamp(36px, 5vw, 56px); padding: 22px 26px; border-radius: 28px; background: var(--in-card); box-shadow: inset 0 0 0 1px var(--in-edge); }
.vault__icon { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 18px; background: radial-gradient(circle at 35% 30%, #E4EAFF, #8FA4FF 45%, #4F5FE6); color: #0A0D24; }
.vault__icon .ico { width: 24px; height: 24px; }
.vault__text { display: flex; flex-direction: column; gap: 6px; }
.vault__text p { color: var(--in-2); font-size: 15px; }
.vault__tags { list-style: none; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.vault__tags li { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: var(--r-pill); background: rgba(143, 164, 255, 0.16); color: #DCE4FF; font-size: 13px; font-weight: 500; white-space: nowrap; }
@media (max-width: 960px) {
  .gate { grid-template-columns: minmax(0, 1fr); }
  .gate__step:not(:last-child)::after { display: none; }
  .gate__ui { min-height: 0; }
  .vault { grid-template-columns: auto minmax(0, 1fr); }
  .vault__tags { grid-column: 1 / -1; justify-content: flex-start; }
}

/* команда: права как в кабинете — роли с аватарами, разделы с иконками, вход по ключу */
.team { display: grid; grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.team__text { display: flex; flex-direction: column; gap: 18px; color: var(--ink-2); }
.team__note { font-size: 15px; color: var(--muted); }
.passkey { display: flex; align-items: center; gap: 14px; max-width: 420px; padding: 14px 16px; border-radius: 22px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); }
.passkey__face { flex: none; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 15px; background: var(--btn); color: var(--btn-ink); }
.passkey__face .ico { width: 26px; height: 26px; }
.passkey__text { display: flex; flex-direction: column; font-size: 13.5px; color: var(--muted); }
.passkey__text b { font-size: 15px; color: var(--ink); }
.passkey__ok { flex: none; display: flex; align-items: center; justify-content: center; margin-left: auto; width: 30px; height: 30px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); }
.passkey__ok .ico { width: 16px; height: 16px; }
.access { display: flex; flex-direction: column; gap: 14px; }
.matrix-wrap { position: relative; overflow-x: auto; border-radius: var(--r-card); background: var(--bg); padding: 6px 10px; }
.matrix { width: 100%; border-collapse: collapse; font-size: 14px; }
.matrix th, .matrix td { padding: 10px 6px; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
.matrix thead th { vertical-align: bottom; font-weight: 500; color: var(--muted); font-size: 12px; }
.matrix thead th .ico { display: block; margin: 0 auto 6px; width: 18px; height: 18px; color: var(--ink-2); }
.matrix tbody th { text-align: left; font-weight: 600; padding-left: 8px; }
.matrix tbody tr:last-child th, .matrix tbody tr:last-child td { border-bottom: 0; }
.role { display: inline-flex; align-items: center; gap: 10px; }
.role__ava { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; font-size: 13px; font-weight: 700; }
.role__ava--1 { background: #DDE5FF; color: #1C46C9; } .role__ava--2 { background: #EDE6FF; color: #5B3CC4; } .role__ava--3 { background: #FFE6DC; color: #B23A0C; }
.role__ava--4 { background: #E6F6F0; color: #1F6B52; } .role__ava--5 { background: #E2E6EF; color: #3E424B; }
.cell { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; vertical-align: middle; }
.cell .ico { width: 16px; height: 16px; }
.cell--work { background: var(--link); color: #FFFFFF; }
.cell--view { box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink-2); }
.cell--none { width: 10px; height: 2px; border-radius: 1px; background: var(--line); }
.cell--sm { width: 22px; height: 22px; }
.cell--sm .ico { width: 12px; height: 12px; }
.team__key { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13.5px; color: var(--muted); }
.team__key > span { display: inline-flex; align-items: center; gap: 8px; }
@media (max-width: 960px) { .team { grid-template-columns: minmax(0, 1fr); } }

/* под капотом: схема в «изнанке» — граница системы пунктиром, внутри кабинет, шлюз, сервисы, хранилища */
.arch { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
.arch__left { display: flex; flex-direction: column; align-items: stretch; }
.arch__map { position: relative; display: flex; flex-direction: column; gap: 26px; padding: 34px 24px 26px; border-radius: 32px; border: 1.5px dashed var(--in-line); }
.arch__tag { position: absolute; top: -13px; left: 24px; padding: 2px 10px; border-radius: var(--r-pill); background: #141A44; color: var(--in-muted); font-size: 12.5px; font-weight: 600; box-shadow: inset 0 0 0 1px var(--in-edge); }
.arch__row { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.arch__row + .arch__row::before { content: ""; position: absolute; left: 50%; top: -26px; height: 26px; border-left: 1.5px solid var(--in-line); }
.arch__row--svc { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.arch__node { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 8px 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1px var(--in-edge); color: var(--in-ink); font-size: 14px; font-weight: 500; line-height: 1.3; text-align: left; }
.arch__node .ico { flex: none; width: 18px; height: 18px; color: #A9B8FF; }
.arch__node small { display: block; color: var(--in-muted); font-size: 12.5px; font-weight: 400; }
.arch__node .live { flex: none; width: 8px; height: 8px; box-shadow: 0 0 0 3px rgba(255, 90, 31, 0.22); }
.arch__node--app { padding: 10px 16px; background: var(--in-ink); color: #0A0D24; box-shadow: none; }
.arch__node--app small { color: #4A5280; }
.arch__node--gate { padding: 10px 16px; }
.arch__node--db { background: rgba(143, 164, 255, 0.12); }
.arch__out { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 30px; }
.arch__out::before { content: ""; position: absolute; left: 50%; top: -32px; height: 30px; border-left: 1.5px dashed var(--in-line); }
.arch__node--ext { background: transparent; box-shadow: none; border: 1.5px dashed var(--in-line); }
.arch__facts { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.arch__facts li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; padding: 14px 16px; border-radius: 20px; background: var(--in-card); box-shadow: inset 0 0 0 1px var(--in-edge); }
.arch__facts b { display: block; color: var(--in-ink); font-weight: 600; }
.arch__facts li > span:last-child > span { color: var(--in-2); font-size: 14px; line-height: 1.5; }
.arch__ico { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(143, 164, 255, 0.16); color: #C9D3FF; }
@media (max-width: 960px) {
  .arch { grid-template-columns: minmax(0, 1fr); }
  .arch__row--svc { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* документы и компания */
.docs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.doclink { display: flex; flex-direction: column; gap: 10px; padding: 26px; border-radius: var(--r-card); background: var(--surface); color: var(--ink); text-decoration: none; box-shadow: inset 0 0 0 1px var(--line); }
.doclink:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.doclink__title { font-size: 22px; font-weight: 500; letter-spacing: -0.02em; }
.doclink__text { color: var(--muted); }
.company { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 24px; margin-top: 28px; padding: 24px 26px; border-radius: var(--r-card); box-shadow: inset 0 0 0 1px var(--line); }
.company dt { font-size: 13.5px; color: var(--muted); }
.company dd { color: var(--ink); font-weight: 500; }
@media (max-width: 860px) { .docs { grid-template-columns: minmax(0, 1fr); } .company { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .company { grid-template-columns: minmax(0, 1fr); } }

/* подвал */
.foot { border-top: 1px solid var(--line); padding-block: 32px 44px; font-size: 14px; color: var(--muted); }
.foot__inner { display: flex; flex-wrap: wrap; gap: 16px 40px; justify-content: space-between; align-items: center; }
.foot__brand { display: inline-flex; align-items: center; gap: 16px; }
.foot__logo { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); }  /* в подвале — полный логотип: знак и словесный знак */
.foot__logo .pk-wm { font-size: 22px; }
.foot__links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot__links a { color: var(--ink-2); text-decoration: none; }
.foot__links a:hover { color: var(--ink); text-decoration: underline; }

/* ── документы: чтение в две колонки, номера пунктов на полях ── */
.doc { padding-block: clamp(36px, 6vw, 72px) clamp(48px, 7vw, 96px); }
.doc__head { display: flex; flex-direction: column; gap: 14px; max-width: 840px; margin-bottom: clamp(28px, 4vw, 48px); }
.doc__kind { font-size: 14px; font-weight: 600; color: var(--muted); }
.doc__head h1 { font-size: clamp(32px, 4.6vw, 52px); }
.doc__meta { color: var(--muted); font-size: 14.5px; }
.doc__grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.toc { font-size: 14px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.toc a { display: block; padding: 6px 10px; border-radius: 10px; color: var(--ink-2); text-decoration: none; }
.toc a:hover { background: var(--tint); color: var(--ink); }
.toc--side { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--header-h) + 20px); max-height: calc(100vh - var(--header-h) - 48px); overflow: auto; }
.toc--mobile { display: none; margin-bottom: 24px; padding: 6px 14px; border-radius: 18px; background: var(--surface); }
.toc--mobile summary { cursor: pointer; padding: 8px 0; font-weight: 600; color: var(--ink); }
.toc--mobile ol { padding-bottom: 8px; }
.doc__body { max-width: 72ch; min-width: 0; display: flex; flex-direction: column; gap: 36px; }
.doc__body section { display: flex; flex-direction: column; gap: 12px; }
.doc__body h2 { display: grid; grid-template-columns: 3.4em minmax(0, 1fr); font-size: 21px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; }
.doc__body .n { color: var(--muted); font-variant-numeric: tabular-nums; }
.doc__body h2 .n { font-weight: 500; }
.cl { display: grid; grid-template-columns: 3.4em minmax(0, 1fr); color: var(--ink-2); line-height: 1.65; }
.cl .n { font-size: 14.5px; padding-top: 2px; }
.doc__body ul { margin: 0 0 0 3.4em; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; color: var(--ink-2); }
.doc__body ul li { position: relative; padding-left: 18px; }
.doc__body ul li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.doc__body strong { color: var(--ink); font-weight: 600; }
@media (max-width: 920px) {
  .doc__grid { grid-template-columns: minmax(0, 1fr); }
  .toc--side { display: none; }
  .toc--mobile { display: block; }
}
@media (max-width: 520px) {
  .doc__body h2, .cl { grid-template-columns: 2.9em minmax(0, 1fr); }
  .doc__body ul { margin-left: 2.9em; }
}

.nf { padding-block: clamp(64px, 12vw, 140px); display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.nf p { color: var(--ink-2); max-width: 52ch; }
