/* ==========================================================================
   МГКА «Стратегический партнёр»
   Сайт устроен как дело: графитовое поле, поверх него белые листы.
   Слева — опись дела (навигация), справа — контакты, между ними линейки.
   Контент каждого листа лежит в центрированном блоке шириной --measure.
   ========================================================================== */

/* --- 1. Токены ---------------------------------------------------------- */
:root {
  --ground: #17181a;          /* поле, на котором лежат листы */
  --ground-2: #1f2124;        /* тёмные врезки внутри поля */
  --ground-line: rgba(255, 255, 255, 0.13);
  --ground-text: rgba(255, 255, 255, 0.62);
  --ground-text-2: rgba(255, 255, 255, 0.38);

  --sheet: #ffffff;           /* лист */
  --sheet-2: #f5f6f7;         /* подложка внутри листа */
  --ink: #16181b;
  --ink-2: #52565b;
  --muted: #8d9298;
  --line: #e4e6e8;
  --line-strong: #c6cacd;

  --tile: #949494;            /* серый модуль знака */
  --red: #d32f2f;             /* акцент из логотипа */
  --red-deep: #ab2020;

  --font: "Golos Text", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --rail-l: 248px;
  --rail-r: 248px;
  --measure: 1140px;   /* центральный блок, равноудалённый от краёв */
  --pad: clamp(24px, 4vw, 88px);   /* минимальные поля листа */
  --gap: 10px;                     /* зазор между листами */

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* --- 2. База ------------------------------------------------------------ */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.62;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
figure { margin: 0; }
picture { display: contents; }
a { color: inherit; }

h1, h2, h3, h4 {
  font-weight: 500;
  letter-spacing: -0.022em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }

::selection { background: var(--red); color: #fff; }

:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.skip-link {
  position: fixed; left: 16px; top: -80px; z-index: 300;
  background: var(--red); color: #fff; padding: 12px 18px;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --- 3. Каркас: две колонки на поле и лента листов ----------------------- */
.layout {
  min-height: 100vh;
  padding-left: var(--rail-l);
  padding-right: var(--rail-r);
}

.rail {
  position: fixed;
  top: 0; bottom: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 26px 22px 24px;
  color: var(--ground-text);
  font-size: 13px;
  line-height: 1.42;
}
.rail--left { left: 0; width: var(--rail-l); border-right: 1px solid var(--ground-line); }
.rail--right { right: 0; width: var(--rail-r); border-left: 1px solid var(--ground-line); text-align: right; }

.rail__logo { display: block; margin-bottom: 34px; }
.rail__logo img { width: 122px; height: auto; }

/* Опись дела — она же навигация */
.index-nav { list-style: none; margin: 0; padding: 0; }
.index-nav li + li { margin-top: 2px; }
.index-nav a {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  align-items: baseline;
  padding: 7px 8px 7px 0;
  text-decoration: none;
  color: var(--ground-text);
  transition: color 0.2s var(--ease);
}
.index-nav a:hover { color: #fff; }
.index-nav__n {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--ground-text-2);
  transition: color 0.2s var(--ease);
}
.index-nav a:hover .index-nav__n { color: var(--red); }
.index-nav a[aria-current="page"] { color: #fff; }
.index-nav a[aria-current="page"] .index-nav__n { color: var(--red); }
.index-nav a[aria-current="page"] .index-nav__t { box-shadow: inset 0 -1px 0 var(--red); }

.rail__foot { font-size: 11.5px; color: var(--ground-text-2); line-height: 1.5; }
.rail__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ground-text-2);
  display: block;
  margin-bottom: 8px;
}
.rail--right a { text-decoration: none; transition: color 0.2s var(--ease); }
.rail--right a:hover { color: #fff; }
.rail__contact + .rail__contact { margin-top: 20px; }
.rail__write {
  display: inline-block;
  margin-top: 22px;
  padding: 10px 16px;
  background: var(--red);
  color: #fff;
  font-size: 13px;
  text-decoration: none;
  transition: background 0.22s var(--ease);
}
.rail__write:hover { background: var(--red-deep); color: #fff; }

/* Лист. Поля симметричны: не меньше --pad, а на широком экране столько,
   чтобы контент остался блоком в --measure по центру колонки. */
.sheet {
  background: var(--sheet);
  padding-block: clamp(32px, 4.2vw, 78px) clamp(40px, 5vw, 86px);
  padding-inline: max(var(--pad), (100% - var(--measure)) / 2);
  margin-bottom: var(--gap);
}
.sheet:last-child { margin-bottom: 0; }
.sheet--dark {
  background: var(--ground);
  color: #fff;
  padding-inline: 0;
}
.sheet--flush { padding: 0; }
.sheet__eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 clamp(36px, 5vw, 72px);
}
.sheet__eyebrow a { text-decoration: none; }
.sheet__eyebrow a:hover { color: var(--red); }
.sheet__title {
  font-size: clamp(2rem, 4.2vw, 3.9rem);
  max-width: 20ch;
  margin-bottom: clamp(28px, 3.6vw, 52px);
}
.sheet__lead {
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  line-height: 1.48;
  max-width: 54ch;
  color: var(--ink);
  margin-bottom: clamp(32px, 4vw, 56px);
}
.prose { max-width: 72ch; color: var(--ink-2); }
.prose--justify { text-align: justify; text-justify: inter-word; hyphens: auto; }
.prose p + p { margin-top: 0; }

/* Подпись раздела внутри листа: короткая метка + текст под ней */
.block { margin-top: clamp(34px, 3.6vw, 52px); max-width: 72ch; }
.block:first-child { margin-top: 0; }
.block__label {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 8px;
}
.block__body { color: var(--ink-2); }

/* Список с плюсами — как пункты в документе */
.plus-list { list-style: none; margin: 0; padding: 0; }
.plus-list li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 4px;
  color: var(--ink-2);
  padding: 3px 0;
}
.plus-list li::before {
  content: "+";
  color: var(--red);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.62;
}

/* --- 4. Содержание с отточиями ------------------------------------------ */
.toc { border-top: 1px solid var(--line); }
.toc__row {
  display: grid;
  grid-template-columns: auto minmax(24px, 1fr) auto;
  align-items: baseline;
  gap: 12px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.toc__title {
  font-size: clamp(1.02rem, 1.5vw, 1.28rem);
  letter-spacing: -0.015em;
  transition: transform 0.28s var(--ease);
}
.toc__dots {
  border-bottom: 1.5px dotted var(--line-strong);
  transform: translateY(-5px);
  transition: border-color 0.25s var(--ease);
}
.toc__n {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  transition: color 0.25s var(--ease);
}
.toc__row:hover { color: var(--red); }
.toc__row:hover .toc__title { transform: translateX(6px); }
.toc__row:hover .toc__dots { border-bottom-color: var(--red); }
.toc__row:hover .toc__n { color: var(--red); }
.toc__note {
  grid-column: 1 / -1;
  font-size: 13.5px;
  color: var(--muted);
  margin-top: -4px;
}

/* --- 5. Обложка (главная) ----------------------------------------------- */
.cover {
  min-height: calc(100vh - 2px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-block: clamp(48px, 8vh, 104px) clamp(28px, 4vh, 52px);
  padding-inline: max(var(--pad), (100% - var(--measure)) / 2);
  color: #fff;
}
.cover__mark { display: flex; align-items: center; gap: 14px; margin-bottom: auto; }
.cover__mark span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ground-text-2);
}
.cover h1 {
  font-size: clamp(1.9rem, 4.3vw, 3.9rem);
  font-weight: 500;
  line-height: 1.04;
  overflow-wrap: break-word;
  letter-spacing: -0.032em;
  max-width: 20ch;
  margin: clamp(40px, 8vh, 90px) 0 clamp(24px, 3vh, 36px);
}
.cover h1 em { font-style: normal; color: var(--red); }
.cover__lead {
  color: var(--ground-text);
  max-width: 54ch;
  font-size: clamp(1rem, 1.35vw, 1.18rem);
  margin-bottom: clamp(32px, 5vh, 56px);
}
.cover__facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--ground-line);
}
.cover__fact { padding: 22px 20px 0 0; border-right: 1px solid var(--ground-line); }
.cover__fact:last-child { border-right: 0; }
.cover__fact:not(:first-child) { padding-left: 20px; }
.cover__num {
  display: block;
  font-size: clamp(1.9rem, 3.2vw, 2.9rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1;
  color: #fff;
}
.cover__cap { display: block; margin-top: 9px; font-size: 13px; color: var(--ground-text-2); }

/* --- 6. Кнопки и ссылки-действия ---------------------------------------- */
.btn {
  --bg: var(--ink);
  --fg: #fff;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 15px 24px;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--bg);
  font: inherit;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.22s var(--ease), border-color 0.22s var(--ease), color 0.22s var(--ease);
}
.btn:hover { --bg: var(--red); --fg: #fff; }
.btn--red { --bg: var(--red); }
.btn--red:hover { --bg: var(--red-deep); }
.btn--ghost { --bg: transparent; --fg: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { --bg: var(--ink); --fg: #fff; border-color: var(--ink); }
.btn--onDark { --bg: transparent; --fg: #fff; border-color: var(--ground-line); }
.btn--onDark:hover { --bg: var(--red); border-color: var(--red); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 15px;
  color: var(--ink);
  padding-bottom: 4px;
  box-shadow: inset 0 -1px 0 var(--red);
  transition: gap 0.25s var(--ease), color 0.22s var(--ease);
}
.link-arrow:hover { gap: 16px; color: var(--red); }
.sheet--dark .link-arrow,
.cover .link-arrow { color: #fff; }

.sheet__more { margin-top: clamp(32px, 4vw, 52px); }

/* --- 7. Адвокаты --------------------------------------------------------- */
.filters { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: clamp(26px, 3vw, 40px); }
.filter {
  font: inherit;
  font-size: 14px;
  color: var(--ink-2);
  background: transparent;
  border: 1px solid var(--line);
  padding: 8px 15px;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}
.filter:hover { border-color: var(--ink); color: var(--ink); }
.filter[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.filter__c { font-family: var(--font-mono); font-size: 10.5px; opacity: 0.55; margin-left: 7px; }

.people {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.2vw, 32px);
}
.people--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.person {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.person.is-hidden { display: none; }

.person__media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--sheet-2);
  margin-bottom: 18px;
}
.person__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.03);
  transition: filter 0.45s var(--ease), transform 0.6s var(--ease);
}
.person:hover .person__media img { filter: grayscale(0); transform: scale(1.03); }
.person__blank {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: var(--sheet-2);
  color: var(--tile);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 500;
  letter-spacing: -0.03em;
}

.person__body { display: flex; flex-direction: column; flex: 1; }
.person__name {
  font-size: clamp(1.05rem, 1.4vw, 1.22rem);
  font-weight: 500;
  letter-spacing: -0.018em;
  line-height: 1.24;
  margin-bottom: 5px;
  transition: color 0.22s var(--ease);
}
.person:hover .person__name { color: var(--red); }
.person__role { font-size: 14px; color: var(--muted); margin: 0 0 3px; }
.person__stage { font-size: 14px; color: var(--muted); margin: 0 0 14px; }
.person__go {
  margin-top: auto;
  padding-top: 16px;
  font-size: 14px;
  color: var(--ink);
  display: inline-flex; align-items: center; gap: 8px;
  transition: color 0.22s var(--ease), gap 0.22s var(--ease);
}
.person:hover .person__go { color: var(--red); gap: 13px; }
.people-empty { padding: 40px 0; color: var(--muted); }

/* Теги направлений */
.tags { list-style: none; margin: 0 0 4px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li {
  font-size: 13px;
  line-height: 1.3;
  color: var(--ink-2);
  background: var(--sheet-2);
  padding: 6px 11px;
}
.tags--links li { background: transparent; border: 1px solid var(--line); padding: 0; }
.tags--links a {
  display: block;
  padding: 8px 14px;
  text-decoration: none;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.tags--links li:hover { border-color: var(--ink); }
.tags--links a:hover { color: var(--red); }

/* --- 8. Профиль адвоката ------------------------------------------------- */
.profile {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 60px);
  align-items: start;
}
.profile__photo { aspect-ratio: 4 / 5; overflow: hidden; background: var(--sheet-2); }
.profile__photo img { width: 100%; height: 100%; object-fit: cover; }
.profile__blank {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  color: var(--tile);
  font-size: clamp(3rem, 6vw, 4.4rem);
  font-weight: 500;
}
.profile__info { min-width: 0; }
.profile__name {
  font-size: clamp(1.8rem, 3.4vw, 3rem);
  margin-bottom: 10px;
  max-width: 18ch;
}
.profile__role { font-size: 17px; color: var(--muted); margin: 0 0 4px; }
.profile__stage { font-size: 15px; color: var(--muted); margin: 0 0 24px; }
.profile__lead {
  font-size: clamp(1.02rem, 1.35vw, 1.2rem);
  line-height: 1.5;
  color: var(--ink);
  max-width: 46ch;
  margin: 0 0 28px;
  padding-left: 18px;
  border-left: 2px solid var(--red);
}

/* Кнопки быстрой связи */
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  border: 1px solid var(--line-strong);
  font-size: 14px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}
.action:hover { border-color: var(--ink); background: var(--ink); color: #fff; }
.action--red { border-color: var(--red); background: var(--red); color: #fff; }
.action--red:hover { border-color: var(--red-deep); background: var(--red-deep); }
.ico { width: 16px; height: 16px; flex: none; }

/* Кнопка «Написать» — только на узких экранах: на компьютере ссылка mailto:
   часто ни к чему не приводит, а адрес почты остаётся в блоке «Как связаться». */
.action--mail { display: none; }

/* Контакты строками с иконками — вместо таблицы */
.contacts-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.contact {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.contact:first-child { border-top: 1px solid var(--line); }
.contact .ico { width: 18px; height: 18px; margin-top: 3px; color: var(--red); }
.contact__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.contact__label { font-size: 12.5px; color: var(--muted); }
.contact__value { font-size: 16px; overflow-wrap: anywhere; }
.contact__value a { text-decoration: none; box-shadow: inset 0 -1px 0 var(--line-strong); }
.contact__value a:hover { color: var(--red); box-shadow: inset 0 -1px 0 var(--red); }

/* Цифры в ряд — вместо таблицы «ключ / значение» */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.stats__item { background: var(--sheet); padding: 20px 22px; }
.stats__num {
  display: block;
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1;
}
.stats__cap { display: block; margin-top: 9px; font-size: 13.5px; color: var(--muted); }

/* --- 9. Публикации ------------------------------------------------------- */
.pubs { border-top: 1px solid var(--line); }
.pub {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr) auto;
  gap: 18px 28px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  align-items: baseline;
}
.pub__meta { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); letter-spacing: 0.04em; }
.pub__title {
  font-size: clamp(1.05rem, 1.7vw, 1.45rem);
  letter-spacing: -0.018em;
  line-height: 1.22;
  transition: transform 0.28s var(--ease), color 0.22s var(--ease);
}
.pub__lead { grid-column: 2; font-size: 14.5px; color: var(--muted); margin-top: 8px; }
.pub:hover .pub__title { color: var(--red); transform: translateX(6px); }
.pub__go { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.pub:hover .pub__go { color: var(--red); }

/* --- 10. Бланк обращения ------------------------------------------------- */
.blank {
  font-size: clamp(1.15rem, 2.1vw, 1.75rem);
  line-height: 1.85;
  letter-spacing: -0.018em;
  max-width: 34ch;
}
.blank__field { display: inline-block; position: relative; min-width: 8ch; }
.blank__field input {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  padding: 0 6px 3px;
  width: 100%;
  min-width: 8ch;
  transition: border-color 0.2s var(--ease);
}
.blank__field input::placeholder { color: var(--muted); opacity: 1; }
.blank__field input:focus { outline: none; border-bottom-color: var(--red); }
.blank__field.has-error input { border-bottom-color: var(--red); }
.blank__field--name { width: 15ch; }
.blank__field--phone { width: 15ch; }
.blank__field--wide { display: block; width: 100%; margin-top: 10px; }
.blank__field--wide textarea {
  font: inherit;
  font-size: 17px;
  line-height: 1.55;
  color: inherit;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  padding: 8px 6px;
  width: 100%;
  min-height: 84px;
  resize: vertical;
}
.blank__field--wide textarea:focus { outline: none; border-bottom-color: var(--red); }

.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: clamp(28px, 3.4vw, 44px);
  max-width: 64ch;
}
.consent {
  display: flex; gap: 11px; align-items: flex-start;
  font-size: 12.5px; color: var(--muted); line-height: 1.45;
  max-width: 42ch;
}
.consent input { margin-top: 2px; width: 16px; height: 16px; flex: none; accent-color: var(--red); }
.form-status {
  display: none;
  margin-top: 20px;
  padding: 13px 16px;
  background: var(--sheet-2);
  border-left: 3px solid var(--red);
  font-size: 15px;
  max-width: 60ch;
}
.form-status.is-visible { display: block; }
.form-status.is-ok { border-left-color: #1e7d3c; }
.hp { position: absolute; left: -9999px; opacity: 0; border: 0; }

/* --- 11. Подвал листа --------------------------------------------------- */
.sheet__foot {
  margin-top: clamp(44px, 5vw, 76px);
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 13px;
  color: var(--muted);
}
.sheet__foot button,
.sheet__foot a {
  font: inherit; font-size: 13px;
  background: none; border: 0; padding: 0;
  color: var(--muted); cursor: pointer; text-decoration: none;
  box-shadow: inset 0 -1px 0 var(--line-strong);
}
.sheet__foot button:hover,
.sheet__foot a:hover { color: var(--red); box-shadow: inset 0 -1px 0 var(--red); }

/* Нижний колонтитул поля */
.ground-foot {
  padding-block: 34px 40px;
  padding-inline: max(var(--pad), (100% - var(--measure)) / 2);
  color: var(--ground-text-2);
  font-size: 12.5px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
}
.ground-foot a { color: var(--ground-text); text-decoration: none; }
.ground-foot a:hover { color: #fff; }

/* Уведомление о cookie */
.cookie {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  z-index: 90;
  max-width: 560px;
  margin-inline: auto;
  display: none;
  gap: 16px 22px;
  align-items: center;
  flex-wrap: wrap;
  padding: 18px 20px;
  background: var(--sheet);
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.45;
  box-shadow: 0 26px 60px -28px rgba(0, 0, 0, 0.75);
}
.cookie.is-visible { display: flex; }
.cookie p { margin: 0; flex: 1 1 260px; }
.cookie a { color: var(--ink); }
.cookie button {
  font: inherit; font-size: 14px;
  padding: 10px 20px;
  background: var(--red); color: #fff;
  border: 0; cursor: pointer;
  transition: background 0.22s var(--ease);
}
.cookie button:hover { background: var(--red-deep); }

/* Следующий лист — переход между страницами */
.next {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding-block: clamp(28px, 3.4vw, 44px);
  padding-inline: max(var(--pad), (100% - var(--measure)) / 2);
  background: var(--ground-2);
  color: #fff;
  text-decoration: none;
  margin-bottom: var(--gap);
  transition: background 0.25s var(--ease);
}
.next:hover { background: #26292d; }
.next__label {
  font-family: var(--font-mono);
  font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ground-text-2);
  display: block; margin-bottom: 10px;
}
.next__title { font-size: clamp(1.3rem, 2.4vw, 2rem); font-weight: 500; letter-spacing: -0.02em; }
.next__arrow { font-size: 22px; color: var(--red); transition: transform 0.25s var(--ease); }
.next:hover .next__arrow { transform: translateX(8px); }

/* --- 12. Мобильная шапка ------------------------------------------------- */
.topbar {
  display: none;
  position: sticky; top: 0; z-index: 60;
  background: var(--ground);
  border-bottom: 1px solid var(--ground-line);
  padding: 12px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.topbar img { width: 104px; height: auto; }
.burger {
  width: 42px; height: 42px;
  border: 1px solid var(--ground-line);
  background: transparent;
  position: relative;
  cursor: pointer;
  padding: 0;
}
.burger span {
  position: absolute; left: 11px; right: 11px; height: 1.5px;
  background: #fff;
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}
.burger span:nth-child(1) { top: 15px; }
.burger span:nth-child(2) { top: 20px; }
.burger span:nth-child(3) { top: 25px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.drawer {
  position: fixed; inset: 0; z-index: 80;
  background: var(--ground);
  padding: 22px 20px 40px;
  overflow-y: auto;
  opacity: 0; visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.26s var(--ease), transform 0.26s var(--ease), visibility 0.26s;
}
.drawer.is-open { opacity: 1; visibility: visible; transform: none; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; }
.drawer__head img { width: 104px; }
.drawer .index-nav a { font-size: 20px; padding: 13px 0; border-bottom: 1px solid var(--ground-line); }
.drawer .index-nav__n { font-size: 11px; }
.drawer__contacts { margin-top: 32px; color: var(--ground-text); font-size: 15px; display: grid; gap: 12px; }
.drawer__contacts a { text-decoration: none; }
body.is-locked { overflow: hidden; }

/* Подсказка, если почтовый клиент не открылся по ссылке mailto: */
.mail-sheet {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  z-index: 120;
  max-width: 480px;
  margin-inline: auto;
  padding: 20px 22px 18px;
  background: var(--sheet);
  color: var(--ink-2);
  box-shadow: 0 26px 60px -24px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.mail-sheet.is-in { opacity: 1; transform: none; }
.mail-sheet__title { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.mail-sheet__addr {
  margin: 0 0 16px;
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.mail-sheet__row { display: flex; flex-wrap: wrap; gap: 8px; }
.mail-sheet__row button,
.mail-sheet__row a {
  font: inherit;
  font-size: 13.5px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}
.mail-sheet__row button:hover,
.mail-sheet__row a:hover { border-color: var(--ink); background: var(--ink); color: #fff; }
.mail-sheet__row button[data-copy] { border-color: var(--red); color: var(--red); }
.mail-sheet__row button[data-copy]:hover { background: var(--red); border-color: var(--red); color: #fff; }
.mail-sheet__close {
  position: absolute; top: 10px; right: 12px;
  background: none; border: 0; padding: 4px 8px;
  font-size: 20px; line-height: 1; color: var(--muted); cursor: pointer;
}
.mail-sheet__close:hover { color: var(--red); }
@media print { .mail-sheet { display: none; } }

/* --- 13. Появление при прокрутке ---------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  transition-delay: var(--delay, 0ms);
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* --- 14. Адаптив --------------------------------------------------------- */
@media (max-width: 1380px) {
  :root { --rail-l: 210px; --rail-r: 210px; }
}

@media (max-width: 1100px) {
  :root { --rail-l: 0px; --rail-r: 0px; --gap: 8px; }
  .rail { display: none; }
  .topbar { display: flex; }
  .action--mail { display: inline-flex; }
  .layout { padding: 0; }
  .people--4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .profile { grid-template-columns: minmax(0, 1fr); }
  .profile__photo { max-width: 340px; }
}

@media (max-width: 820px) {
  body { font-size: 16px; }
  .people, .people--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cover__facts { grid-template-columns: minmax(0, 1fr); }
  .cover__fact { border-right: 0; border-bottom: 1px solid var(--ground-line); padding: 16px 0; }
  .cover__fact:last-child { border-bottom: 0; }
  .cover__fact:not(:first-child) { padding-left: 0; }
  .pub { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .pub__lead { grid-column: 1; }
  .pub__go { display: none; }
}

@media (max-width: 560px) {
  .people, .people--4 { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: minmax(0, 1fr); }
  .actions .action { flex: 1 1 auto; justify-content: center; }
  .prose--justify { text-align: left; }
  .toc__row { grid-template-columns: auto minmax(12px, 1fr) auto; gap: 8px; }
  .blank { font-size: 1.1rem; line-height: 1.9; }
  .blank__field--name, .blank__field--phone { width: 11ch; }
  .form-foot { flex-direction: column; align-items: flex-start; }
  .form-foot .btn { width: 100%; justify-content: center; }
}

/* --- 15. Печать: остаётся только лист ----------------------------------- */
@media print {
  body { background: #fff; }
  .rail, .topbar, .drawer, .next, .ground-foot, .sheet__foot, .filters, .actions, form { display: none !important; }
  .layout { padding: 0; }
  .sheet { margin: 0; padding: 0; }
  .reveal { opacity: 1; transform: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
}
