/* Персональный сайт адвоката Нарышева А. В. — единый стиль. Без фреймворков. */

:root {
  --blue: #013793;
  --blue-dark: #02296e;
  --blue-tint: #eef2fa;
  --text: #1f2933;
  --muted: #5b6570;
  --bg: #fbfaf7;
  --surface: #ffffff;
  --line: #e3e1db;
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--sans);
}
@media (max-width: 600px) {
  body { font-size: 16px; }
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
a:hover { color: var(--blue-dark); }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: var(--text);
  text-wrap: balance;
}
h1 { font-size: clamp(1.9rem, 1.3rem + 2.2vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; text-wrap: pretty; }
ul, ol { margin: 0 0 1em; padding-left: 22px; }
li { margin-bottom: 0.35em; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

.muted { color: var(--muted); }
.small { font-size: 0.92rem; }
.lead { font-size: 1.15rem; color: var(--muted); }
.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 8px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--blue);
  color: #fff;
  padding: 8px 14px;
  z-index: 100;
}
.skip-link:focus { left: 8px; }

/* ---------- Шапка ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 76px;
  flex-wrap: wrap;
  padding-top: 10px;
  padding-bottom: 10px;
}
.brand {
  text-decoration: none;
  color: var(--text);
  line-height: 1.2;
}
.brand strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.1rem;
}
.brand-short { display: none; }
.brand-sub {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
}
.nav { flex: 1; }
.nav ul {
  list-style: none;
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  justify-content: center;
}
.nav li { margin: 0; }
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  color: var(--text);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  font-size: 0.97rem;
}
.nav a:hover { color: var(--blue); }
.nav a[aria-current="page"],
.nav a.is-active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}
.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  margin-left: auto;
}
.header-phone svg { width: 20px; height: 20px; }
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  padding: 0;
}
.nav-toggle svg { width: 24px; height: 24px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

/* Ноутбуки и планшики: меню целиком, телефон — только иконкой */
@media (max-width: 1180px) {
  .site-header .wrap { gap: 16px; }
  .nav a { padding: 0 8px; }
  .header-phone span { position: absolute; left: -999px; }
  .header-phone {
    width: 44px;
    justify-content: center;
    border: 1px solid var(--line);
  }
}

/* Планшеты и телефоны: бургер. Бренд с flex-basis 0 не провоцирует перенос строки,
   меню всегда занимает отдельную строку на всю ширину. */
@media (max-width: 900px) {
  .site-header .wrap { gap: 12px; align-items: center; }
  .brand { flex: 1 1 0; min-width: 0; }
  .brand strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .header-phone { order: 1; margin-left: auto; }
  .nav-toggle { display: inline-flex; order: 2; }
  .nav {
    flex: 0 0 100%;
    width: 100%;
    order: 10;
    display: none;
    margin-top: 2px;
    border-top: 1px solid var(--line);
    padding: 8px 0 4px;
  }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav a { width: 100%; min-height: 48px; padding: 0 8px; border-bottom: 0; }
  .nav a:hover { background: var(--blue-tint); }
  .nav a[aria-current="page"], .nav a.is-active { font-weight: 600; background: var(--blue-tint); }
}
@media (max-width: 400px) {
  .brand-full { display: none; }
  .brand-short { display: inline; }
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--blue);
  background: var(--blue);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border-radius: 3px;
}
.btn:hover { background: var(--blue-dark); color: #fff; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-outline { background: var(--surface); color: var(--blue); }
.btn-outline:hover { background: var(--blue-tint); color: var(--blue-dark); }
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}
.actions-flush { margin-top: 0; }

/* ---------- Секции ---------- */
.section { padding: 56px 0; }
.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section h2 { margin-bottom: 0.8em; }
.page-head { padding-top: 40px; padding-bottom: 8px; } /* только вертикаль: боковые отступы задаёт .wrap */
.page-head .lead { max-width: 760px; }
.prose { max-width: 760px; }

.crumbs {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line); }

/* ---------- Первый экран ---------- */
.hero { padding: 48px 0 56px; }
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 48px;
  align-items: center;
}
.hero-photo { max-width: 420px; justify-self: end; }
.hero-photo img {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
}
.hero h1 { margin-bottom: 0.4em; }
.h1-kicker {
  display: block;
  font-family: var(--sans);
  font-size: clamp(1.15rem, 0.9rem + 0.9vw, 1.5rem);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 10px;
}
.hero .lead { max-width: 600px; color: var(--text); }

.official {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 12px 16px;
  margin: 28px 0 0;
  font-size: 0.92rem;
  line-height: 1.5;
  max-width: 600px;
  color: var(--muted);
}
.official svg { flex: none; width: 24px; height: 24px; color: var(--blue); margin-top: 2px; }
.official strong { display: block; margin-bottom: 2px; color: var(--text); }

@media (max-width: 900px) {
  .hero { padding-top: 32px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 32px; }
  .hero-photo { justify-self: start; max-width: 360px; }
}

/* ---------- Вопрос–ответ ---------- */
.faq {
  border-top: 1px solid var(--line);
  padding: 4px 0;
}
.faq:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.35;
  padding: 14px 32px 14px 0;
  position: relative;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 12px;
  font-family: var(--sans);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--blue);
}
.faq[open] summary::after { content: "−"; }
.faq p { margin: 0 0 16px; }

/* ---------- Липкая панель на телефоне ---------- */
.mobile-bar { display: none; }
@media (max-width: 760px) {
  body { padding-bottom: 60px; }
  .mobile-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: flex;
    background: var(--surface);
    border-top: 1px solid var(--line);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
  }
  .mobile-bar a {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 56px;
    padding: 0 6px;
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
    color: var(--blue);
    white-space: nowrap;
  }
  .mobile-bar a:first-child { flex-grow: 1.15; }
  .mobile-bar a + a { border-left: 1px solid var(--line); }
  .mobile-bar .l-short { display: none; }
  .mobile-bar-ask { flex-grow: 1.25; background: var(--blue-tint); }
  .mobile-bar a:first-child {
    background: var(--blue);
    color: #fff;
  }
  .mobile-bar svg { width: 20px; height: 20px; flex: none; }
}

/* ---------- Факты ---------- */
.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.facts li {
  margin: 0;
  border-top: 2px solid var(--blue);
  padding-top: 14px;
}
.facts strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.55rem;
  line-height: 1.2;
  margin-bottom: 6px;
}

/* ---------- Карточки ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
}
.card h3 { margin-top: 0; }
.card p:last-of-type { margin-bottom: 0; }
.card ul { margin: 0 0 12px; padding-left: 20px; }
.card .more { margin-top: auto; padding-top: 12px; }

/* ---------- Шаги ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
}
.steps li {
  counter-increment: step;
  margin: 0;
  border-top: 2px solid var(--blue);
  padding-top: 14px;
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--blue);
  margin-bottom: 6px;
}
.steps h3 { margin-bottom: 0.4em; }
.steps p { margin: 0; }

/* ---------- Две колонки ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 48px;
  align-items: center;
}
.split img {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
}
.split-photo { max-width: 420px; }
.split.reverse { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.split.reverse .split-photo { order: 2; justify-self: end; }

.cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Планшеты: три колонки уже не помещаются — карточки в две, факты и шаги в строку */
@media (max-width: 1000px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts { grid-template-columns: 1fr; gap: 0; }
  .facts li {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 4px 20px;
    align-items: baseline;
    padding: 14px 0;
    border-top: 1px solid var(--line);
  }
  .facts li:first-child { border-top: 2px solid var(--blue); }
  .facts strong { margin: 0; }
  .steps { grid-template-columns: 1fr; gap: 0; }
  .steps li {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 0 12px;
    padding: 16px 0;
    border-top: 1px solid var(--line);
  }
  .steps li:first-child { border-top: 2px solid var(--blue); }
  .steps li::before { grid-row: 1 / span 2; margin: 0; }
  .steps h3, .steps p { grid-column: 2; }
}
@media (max-width: 760px) {
  .split, .split.reverse { grid-template-columns: 1fr; }
  .split.reverse .split-photo { order: 0; justify-self: start; }
  .split-photo { max-width: 360px; }
}
@media (max-width: 640px) {
  .cards { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .facts li { grid-template-columns: 1fr; gap: 4px; }
}

/* ---------- Список контактов ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
.contact-list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
}
.contact-list li {
  display: flex;
  gap: 14px;
  margin: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.contact-list li:first-child { border-top: 1px solid var(--line); }
.contact-list svg {
  flex: none;
  width: 22px;
  height: 22px;
  color: var(--blue);
  margin-top: 4px;
}
.contact-list small {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
}
address { font-style: normal; }
.photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.photos img { border: 1px solid var(--line); background: var(--surface); width: 100%; }
figure { margin: 0; }
figcaption { font-size: 0.88rem; color: var(--muted); margin-top: 8px; }

@media (max-width: 760px) {
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 480px) {
  .photos { grid-template-columns: 1fr; }
}

/* ---------- Логотип бюро ---------- */
.logo-magistr,
.split .logo-magistr {
  width: 160px;
  height: auto;
  margin-bottom: 20px;
  border: 0;
  background: transparent;
}
.page-head .logo-magistr-head { margin: 4px 0 20px; }

/* ---------- Таблица гонораров ---------- */
.fees {
  width: 100%;
  max-width: 920px;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  margin: 0 0 24px;
  font-variant-numeric: tabular-nums;
}
.fees caption { position: absolute; left: -999px; }
.fees th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--blue-tint);
  text-align: left;
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.fees td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.fees tr:last-child td { border-bottom: 0; }
.fees .num { width: 52px; color: var(--muted); font-size: 0.9rem; }
.fees th.price, .fees td.price {
  text-align: right;
  white-space: nowrap;
  width: 190px;
  font-weight: 600;
}
.fees td.price .neg { font-weight: 400; font-style: italic; color: var(--muted); }
.fees td.price small { display: block; font-weight: 400; font-size: 0.84rem; color: var(--muted); margin-top: 2px; }
.fees td.desc small { display: block; font-size: 0.86rem; color: var(--muted); margin-top: 3px; }
.fees tr.group td { background: var(--bg); font-weight: 600; }
.fees tr.sub td { border-bottom-style: dashed; }
.fees tr.sub td.desc { padding-left: 36px; position: relative; }
.fees tr.sub td.desc::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 0;
  bottom: -1px;
  border-left: 2px solid var(--line);
}
.fees tbody tr:not(.group):hover td { background: #f7f9fd; }
.fees tr { scroll-margin-top: 60px; }
.fees tr:target td { background: var(--blue-tint); }
.fees tr:target td:first-child { box-shadow: inset 3px 0 0 var(--blue); }

@media (max-width: 640px) {
  .fees, .fees tbody { display: block; }
  .fees thead { position: absolute; left: -999px; }
  .fees tr {
    display: block;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
  }
  .fees tr.group { background: var(--bg); }
  .fees tr.sub { padding-left: 28px; border-bottom-style: dashed; position: relative; }
  .fees tr.sub::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 0;
    bottom: -1px;
    border-left: 2px solid var(--line);
  }
  .fees td {
    display: block;
    padding: 0;
    border: 0;
    width: auto;
    text-align: left;
  }
  .fees tr.group td { background: transparent; }
  .fees td.num { display: none; }
  .fees tr.sub td.desc { padding-left: 0; }
  .fees tr.sub td.desc::before { display: none; }
  .fees td.price { margin-top: 4px; white-space: normal; text-align: left; width: auto; }
  .fees td.price:not(:empty)::before {
    content: "Гонорар: ";
    font-weight: 400;
    color: var(--muted);
  }
  .fees td.price small { display: inline; margin-left: 6px; }
  .fees tr:target { background: var(--blue-tint); box-shadow: inset 3px 0 0 var(--blue); }
  .fees tr:target td:first-child { box-shadow: none; }
}

.note {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 16px 20px;
  font-size: 0.95rem;
  max-width: 760px;
}

/* ---------- Причины / принципы ---------- */
.reasons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 40px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.reasons li {
  margin: 0;
  border-top: 2px solid var(--blue);
  padding-top: 14px;
}
.reasons strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.25;
  margin-bottom: 6px;
}
.h2-spaced { margin-top: 48px; }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { margin-bottom: 12px; }
ul.plain li:last-child { margin-bottom: 0; }
@media (max-width: 760px) {
  .reasons { grid-template-columns: 1fr; }
}

/* ---------- Список определений ---------- */
.defs {
  display: grid;
  grid-template-columns: minmax(180px, 38%) minmax(0, 1fr);
  gap: 10px 24px;
  margin: 0 0 24px;
}
.defs dt { color: var(--muted); }
.defs dd { margin: 0; }
@media (max-width: 600px) {
  .defs { grid-template-columns: 1fr; gap: 2px; }
  .defs dd { margin-bottom: 10px; }
}

/* ---------- Подвал ---------- */
.site-footer {
  background: var(--blue-dark);
  color: #d6deef;
  padding: 48px 0 28px;
  margin-top: 64px;
  font-size: 0.95rem;
}
.site-footer a { color: #fff; }
.site-footer a:hover { color: #d6deef; }
.site-footer h2 {
  color: #fff;
  font-size: 1.05rem;
  font-family: var(--sans);
  font-weight: 600;
  margin-bottom: 12px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  margin-top: 32px;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.88rem;
}
@media (max-width: 1000px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid > div:first-child { grid-column: 1 / -1; max-width: 640px; }
}
@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Кнопка «Наверх» ---------- */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 50;
}
.to-top.is-visible { opacity: 1; visibility: visible; }
.to-top:hover { background: var(--blue-dark); color: #fff; }
.to-top svg { width: 22px; height: 22px; }

/* ---------- Форма «Задать вопрос адвокату» ---------- */
.form-intro { max-width: 720px; margin: 0 0 24px; }
.form { max-width: 720px; }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
}
.form label { display: block; font-weight: 600; font-size: 0.95rem; }
.form label span { display: block; margin-bottom: 6px; }
.form-full { margin-top: 16px; }
.form input[type="text"],
.form input[type="email"],
.form textarea {
  display: block;
  width: 100%;
  font: inherit;
  line-height: 1.4;
  padding: 11px 12px;
  border: 1px solid #8d95a3; /* контраст границы с фоном ≥ 3:1 */
  border-radius: 3px;
  background: var(--surface);
  color: var(--text);
}
.form textarea { min-height: 150px; resize: vertical; }
.form input:focus,
.form textarea:focus {
  outline: 2px solid var(--blue);
  outline-offset: 0;
  border-color: var(--blue);
}
.form .check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 18px;
  font-weight: 400;
  font-size: 0.93rem;
}
.form .check input {
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  flex: none;
  accent-color: var(--blue);
}
.form .check span { margin: 0; }
.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 22px;
}
button.btn { cursor: pointer; font: inherit; font-weight: 600; }
button.btn:disabled { opacity: 0.6; cursor: default; }
.form-status { font-weight: 600; }
.form-status.is-ok { color: var(--blue); }
.form-status.is-err { color: #9b2c2c; }
.form-note { margin: 18px 0 0; font-size: 0.88rem; color: var(--muted); }
.form-done {
  max-width: 720px;
  border: 1px solid var(--blue);
  border-left-width: 4px;
  background: var(--surface);
  padding: 22px 24px;
}
.form-done h3 { margin-top: 0; }
.form-done p:last-of-type { margin-bottom: 0; }
.form-done .actions { margin-top: 18px; }

/* ---------- Шаги для доверителей из других регионов ---------- */
.remote-steps {
  list-style: none;
  counter-reset: rstep;
  margin: 0 0 8px;
  padding: 0;
  max-width: 760px;
}
.remote-steps li {
  counter-increment: rstep;
  position: relative;
  margin: 0;
  padding: 12px 0 12px 48px;
  border-top: 1px solid var(--line);
}
.remote-steps li:last-child { border-bottom: 1px solid var(--line); }
.remote-steps li::before {
  content: counter(rstep);
  position: absolute;
  left: 0;
  top: 13px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font: 600 0.9rem/30px var(--sans);
  text-align: center;
}
.remote-steps strong { display: block; font-family: var(--serif); font-size: 1.1rem; margin-bottom: 2px; }
.regions-note { color: var(--muted); }
.h3-spaced { margin-top: 32px; }
.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
@media (max-width: 600px) {
  .form-grid { grid-template-columns: 1fr; }
}

@media print {
  .site-header, .site-footer, .to-top, .actions, #vopros { display: none; }
  body { background: #fff; }
}

/* ---------- Контактная строка над шапкой (только десктоп) ---------- */
.topbar {
  background: var(--blue-tint);
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
  color: var(--muted);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  gap: 4px 22px;
  min-height: 36px;
  flex-wrap: wrap;
}
.topbar-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  text-decoration: none;
  color: inherit;
}
.topbar-item svg { width: 16px; height: 16px; color: var(--blue); flex: none; }
a.topbar-item { color: var(--blue); }
a.topbar-item:hover { text-decoration: underline; }
.topbar-phone { margin-left: auto; font-weight: 600; }
@media (max-width: 1180px) {
  .topbar .wrap > .topbar-item:first-child { display: none; }
}
@media (max-width: 900px) {
  .topbar { display: none; }
}

/* ---------- Шапка: липкая на десктопе, кнопка «Задать вопрос» ---------- */
@media (min-width: 901px) {
  .site-header { position: sticky; top: 0; z-index: 70; }
  .header-phone { display: none; } /* телефон — в контактной строке */
  main [id] { scroll-margin-top: 92px; } /* якоря не прячутся под липкой шапкой */
  .fees th { top: 76px; } /* липкая шапка таблицы гонораров — под шапкой сайта */
}
.header-cta {
  min-height: 40px;
  padding: 0 16px;
  font-size: 0.95rem;
  margin-left: auto;
  white-space: nowrap;
}
.header-cta svg { width: 18px; height: 18px; }
/* Узкие ноутбуки и планшеты: «Главная» — по имени в шапке, кнопка — только иконкой */
@media (max-width: 1180px) and (min-width: 901px) {
  .nav-home { display: none; }
}
@media (max-width: 1000px) and (min-width: 901px) {
  .header-cta { width: 44px; height: 44px; padding: 0; justify-content: center; }
  .header-cta span { position: absolute; left: -999px; }
  .header-cta svg { width: 22px; height: 22px; }
}
@media (max-width: 900px) {
  .header-cta { display: none; }
}

/* Контакты в мобильном меню */
.nav-contacts { display: none; }
@media (max-width: 900px) {
  .nav-contacts {
    display: grid;
    gap: 2px;
    margin-top: 8px;
    padding: 12px 8px 8px;
    border-top: 1px solid var(--line);
    font-size: 0.95rem;
  }
  .nav-contacts a, .nav-contacts span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    text-decoration: none;
    color: var(--blue);
  }
  .nav-contacts span { color: var(--muted); }
  .nav-contacts svg { width: 18px; height: 18px; flex: none; }
}

/* ---------- Первый экран: МАКС, почта и режим работы под кнопками ---------- */
.hero-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin: 18px 0 0;
  font-size: 0.95rem;
  max-width: 600px;
}
.hero-contacts a, .hero-contacts span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  color: var(--blue);
  text-decoration: none;
  min-height: 32px;
}
.hero-contacts a:hover { text-decoration: underline; }
.hero-contacts span { color: var(--muted); }
.hero-contacts svg { width: 18px; height: 18px; flex: none; }
.hero-note { margin: 6px 0 0; font-size: 0.9rem; color: var(--muted); max-width: 600px; }
@media (max-width: 600px) {
  .hero .actions .btn { width: 100%; justify-content: center; }
  .hero-contacts { gap: 2px 18px; }
}

/* ---------- Секция «Задать вопрос» на главной ---------- */
.ask-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 48px;
  align-items: start;
}
.ask-aside {
  border: 1px solid var(--line);
  border-top: 3px solid var(--blue);
  background: var(--surface);
  padding: 22px 24px;
  font-size: 0.95rem;
}
.ask-aside h3 { margin-top: 0; }
.ask-aside ol { padding-left: 20px; margin-bottom: 0; }
.ask-aside li { margin-bottom: 0.6em; }
.ask-alt { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); }
@media (max-width: 900px) {
  .ask-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* Липкая панель на телефоне: короткие подписи на узких экранах */
@media (max-width: 400px) {
  .mobile-bar a { font-size: 0.86rem; gap: 5px; padding: 0 4px; }
  .mobile-bar .l-long { display: none; }
  .mobile-bar .l-short { display: inline; }
}

/* Кнопка «Наверх» над липкой панелью (правило после базового .to-top, иначе проигрывает каскаду) */
@media (max-width: 760px) {
  .to-top { bottom: 72px; }
}
