/* ==========================================================================
   myproje · открытая часть — общие детали
   Полоса над шапкой, шапка, мобильное меню, подвал, плавающая кнопка
   подбора, заголовок блока, карточки проекта и специалиста.

   Всё по дизайн-системе (docs/design_system.md) и прототипу главной v17
   (docs/home_prototype_v17). В прототипе стили наслоены версиями v8…v17;
   здесь — итог для каждого класса, литералы заменены токенами.
   Классы — как в прототипе. Точки перелома: 720 · 1023 · 1100 · 1279.
   ========================================================================== */

/* Переход по якорю не прячет начало блока под липкой шапкой */
html { scroll-padding-top: calc(var(--header-h) + 20px); }

/* -------------------------------- сетка ---------------------------------- */
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }
.sec  { padding-top: var(--sec); }
/* Страницы открытой части стоят в той же колонке, что шапка и подвал
   (у экранов специалиста .page своя, уже — site.css там не подключён) */
.page { max-width: var(--wrap); padding-inline: var(--gut); }

/* --------------------------- заголовок блока -----------------------------
   SectionHeader: крупный заголовок слева, справа «Все …» и, если нужно,
   текстовая ссылка; под ними одна строка описания. */
.sh {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-bottom: clamp(22px, 2.8vw, 36px);
}
.h2 {
  max-width: 15em;
  font-size: var(--t-section);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -.038em;
  text-wrap: balance;
}
.h3 {
  font-size: var(--t-subsection);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -.03em;
}
.sh-sub { flex: 0 0 100%; color: var(--muted); font-size: 16.5px; }
.sh-sub span { display: block; max-width: 44em; }
.sh-act { display: flex; flex-wrap: wrap; gap: 8px; }

/* Рубрика над заголовком: терракотовый текст, без капса */
.rub { display: block; font-size: var(--t-label); font-weight: 500; color: var(--accent-text); }

/* Переход к полному списку — серая плашка, при наведении чёрная */
.more {
  display: inline-flex;
  align-items: center;
  min-height: var(--btn-h-more);
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  background: var(--chip);
  color: var(--ink);
  font-size: var(--t-small);
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color var(--dur-color), color var(--dur-color), border-color var(--dur-color);
}
.more:hover { background: var(--ink); color: #fff; text-decoration: none; }
.tone .more { background: var(--chip-tone); }
.tone .more:hover { background: var(--ink); }
/* Рядом с ней — текстовая ссылка: только цвет при наведении */
.more.alt, .tone .more.alt {
  padding: 0 6px;
  background: none;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}
.more.alt:hover, .tone .more.alt:hover {
  background: none;
  color: var(--accent-text);
  text-decoration-color: var(--accent);
}

@media (max-width: 720px) {
  .sh-act { width: 100%; }
  .sh > .more, .sh > .sh-act { order: 5; }
}

/* ======================== полоса над шапкой (TopBar) ===================== */
.bar {
  position: relative;
  z-index: 70;
  background: var(--ink);
  color: var(--on-dark);
  font-size: 13.5px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
/* :where — без веса: кнопки (.btn-accent, .btn-ink…) внутри полосы, шапки, меню
   и подвала сохраняют свой цвет текста */
:where(.bar) a { color: inherit; text-decoration: none; }
.bar-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 40px; }
/* Событие (054) приходит из базы после отрисовки: место под него — слот */
.bar-ev-slot { flex: 1 1 auto; min-width: 0; }
.bar--noev .bar-ev-slot { display: none; }
.bar-ev { display: block; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.bar-ev:hover .bar-ev-t { text-decoration: underline; text-underline-offset: 4px; }
.bar-dot {
  display: inline-block;
  position: relative;
  top: -1px;
  width: 7px;
  height: 7px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
}
.bar-r { display: flex; align-items: center; gap: 22px; flex: none; margin-left: auto; color: var(--on-dark-muted); }
.bar-r a:hover { color: #fff; }
.bar-r .bl { display: inline-flex; align-items: center; gap: 6px; color: var(--on-dark); font-weight: 500; }
.bar-r .bl svg { opacity: .7; transition: transform var(--dur-color), opacity var(--dur-color); }
.bar-r .bl:hover { color: #fff; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.bar-r .bl:hover svg { opacity: 1; transform: translate(2px, -2px); }
.bar-sep { width: 1px; height: 16px; background: rgba(255, 255, 255, .2); }
.bar-ph { color: var(--on-dark); white-space: nowrap; }

.soc { display: flex; align-items: center; gap: 4px; }
.soc a {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--on-dark-muted);
  transition: color var(--dur-color), background-color var(--dur-color);
}
.soc a:hover { color: #fff; background: rgba(255, 255, 255, .1); }

@media (max-width: 1023px) { .bar-ph, .bar-sep { display: none; } }
/* Телефон (просьба владельца 26.11: «красиво, а не в две полосы»).
   Есть событие — две колонки одной высоты: слева событие до двух строк,
   строки выровнены по длине (text-wrap: balance), справа «Профессионалам»
   и «Брендам» столбиком со стрелками, прижаты вправо и по центру полосы.
   Так событию достаётся вдвое больше места, чем рядом с ссылками в строку
   (202 px против 115 на 375), и оно видно целиком. Нет события — ссылки
   справа одной строкой, полоса в одну строку. */
@media (max-width: 720px) {
  .bar { font-size: 12.5px; }
  .bar-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 14px; min-height: 36px; padding-block: 7px; }
  .bar--noev .bar-in { grid-template-columns: auto; justify-content: end; padding-block: 6px; }
  .bar-ev { display: -webkit-box; white-space: normal; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.35; text-wrap: balance; }
  .bar-dot { width: 6px; height: 6px; margin-right: 7px; }
  .bar-r { gap: 14px; margin-left: 0; }
  .bar:not(.bar--noev) .bar-r { flex-direction: column; align-items: flex-end; gap: 3px; }
  .bar:not(.bar--noev) .bar-r .bl { line-height: 1.3; }
  .bar-r .soc { display: none; }
}

/* ============================== шапка (Header) =========================== */
.top {
  position: sticky;
  top: 0;
  z-index: 40;
  color: var(--ink);
  background: rgba(255, 255, 255, .95);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background-color .3s, color .3s, border-color .3s;
}
/* Над первым экраном главной — прозрачная, текст белый */
.top.over {
  background: transparent;
  color: #fff;
  border-color: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
:where(.top) a { color: inherit; text-decoration: none; }
.top-in { display: flex; align-items: center; gap: clamp(24px, 3vw, 48px); height: var(--header-h); }

.logo { display: block; flex: none; }
.logo .logo-svg { display: block; width: auto; height: 32px; }

.nav { display: flex; flex: 1; gap: clamp(18px, 2.2vw, 32px); font-size: 15px; }
.nav a { padding: 10px 0; white-space: nowrap; }
.nav a:hover,
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }

.top-act { display: flex; align-items: center; gap: 20px; font-size: 15px; }
.top-acc { display: flex; align-items: center; gap: 20px; }
.login { white-space: nowrap; transition: color var(--dur-color); }
.top .login:hover { color: var(--accent-text); }
.top.over .login:hover { color: var(--accent-on-dark); }

/* «Подобрать специалиста» в шапке — исключение из иерархии: белая над
   первым экраном, чёрная после прокрутки, при наведении всегда терракота
   (на первом экране уже есть терракотовая «Смотреть проекты») */
.top .cta {
  min-height: var(--btn-h-header);
  padding: 0 18px;
  font-size: 15px;
  background: var(--ink);
  color: #fff;
  transition: background-color .25s, color .25s;
}
.top.over .cta { background: #fff; color: var(--ink); }
.top .cta:hover, .top.over .cta:hover { background: var(--accent-btn); color: #fff; }

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--r);
  background: none;
  color: inherit;
  cursor: pointer;
}
.burger { display: none; }

/* Мобильное меню: разделы, участникам, кнопки, контакты */
.mnav {
  max-height: calc(100svh - var(--header-h));
  overflow-y: auto;
  padding: 6px var(--gut) 22px;
  background: var(--paper);
  color: var(--ink);
  border-top: 1px solid var(--line);
}
.mnav > a,
.mnav > span > a {
  display: block;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 19px;
  letter-spacing: -.015em;
}
.mnav .m2 { font-size: 16px; color: var(--soft); }
/* «Профессионалам» и «Брендам» — отдельной группой (итоги прохода 26.11):
   подпись и две плитки со стрелкой, не в общем списке разделов */
.mgroup { margin-top: 20px; }
.mgroup-t { color: var(--muted); font-size: 13px; font-weight: 500; }
.mgroup-l { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-top: 8px; }
.mgroup-l a { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; min-height: 48px; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: var(--r); font-size: 14.5px; font-weight: 500; line-height: 1.2; }
.mgroup-l a svg { flex: none; color: var(--muted); }
/* Значок меню: три полоски ↔ крестик */
.burger .burger-close, .burger[aria-expanded="true"] .burger-open { display: none; }
.burger[aria-expanded="true"] .burger-close { display: block; }
/* За открытым меню — затемнение: нажатие по нему закрывает меню, страница
   под ним не прокручивается */
.mnav-scrim { position: fixed; inset: 0; z-index: 39; background: rgba(14, 14, 14, .42); touch-action: none; }
.mnav-scrim[hidden] { display: none; }
body.is-menu-open { overflow: hidden; }
/* Полоса над шапкой — под затемнением, как остальная страница */
body.is-menu-open .bar { z-index: 38; }
.is-menu-open .top { background: var(--paper); -webkit-backdrop-filter: none; backdrop-filter: none; }
.mnav { overscroll-behavior: contain; }
.mrow { display: grid; gap: 10px; margin-top: 20px; }
.mrow .btn { padding: 0 16px; }
.mcon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.mcon .soc a { color: var(--ink); }
.mcon .soc a:hover { background: var(--tone); color: var(--ink); }

.login--acc { display: inline-flex; align-items: center; }
.login--acc svg { display: none; width: 24px; height: 24px; }
@media (min-width: 1024px) and (max-width: 1279px) {
  .login--acc svg { display: block; }
  .login--acc span { display: none; }
  .top-in { gap: 20px; }
  .nav { gap: 16px; font-size: 14px; }
  .top-act, .top-acc { gap: 14px; font-size: 14px; }
  .top .cta { padding: 0 14px; font-size: 14px; }
}
@media (max-width: 1023px) {
  .nav, .top-acc { display: none; }
  .burger { display: flex; }
  .top-in { justify-content: space-between; }
}
@media (min-width: 1024px) { .mnav { display: none; } }
@media (max-width: 720px) {
  .top-in { height: var(--header-h-mobile); }
  .top-act { gap: 2px; }
  .top .cta { display: none; }
  .logo .logo-svg { height: 26px; }
  .mnav { max-height: calc(100svh - var(--header-h-mobile)); }
}

/* ============================== подвал (Footer) ========================== */
.foot {
  margin-top: var(--sec);
  padding: clamp(52px, 6vw, 84px) 0 calc(32px + var(--safe-bottom));
  background: var(--ink);
  color: var(--on-dark);
}
:where(.foot) a { color: inherit; text-decoration: none; }
.foot-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px 40px;
  padding-bottom: clamp(32px, 4vw, 52px);
  border-bottom: 1px solid rgba(255, 255, 255, .14);
}
.foot .logo { color: #fff; }
.foot .logo .logo-svg { height: 28px; }
.fs {
  margin-top: 18px;
  font-size: clamp(1.6rem, 2.6vw, 2.4rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -.035em;
}
.fd { max-width: 26em; margin-top: 16px; color: var(--on-dark-muted); }

.foot-g {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.3fr);
  gap: 36px 32px;
  margin-top: clamp(28px, 3.4vw, 44px);
}
.fc summary {
  margin-bottom: 10px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  list-style: none;
  cursor: default;
}
.fc summary::-webkit-details-marker { display: none; }
.fc-l a, .fc-l > span { display: block; padding: 5px 0; color: var(--on-dark-muted); font-size: 15px; }
.fc-l a:hover { color: #fff; }
.fc-l .fc-ph { padding: 2px 0 4px; color: #fff; font-size: clamp(1.15rem, 1.5vw, 1.35rem); font-weight: 500; }
.fc-l .fsoc { display: flex; gap: 10px; margin-top: 16px; padding: 0; }
.fsoc a {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 50%;
  color: #fff;
  transition: background-color var(--dur-color), border-color var(--dur-color), color var(--dur-color);
}
.fsoc a:hover { background: #fff; border-color: #fff; color: var(--ink); }

.fnote {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  color: var(--on-dark-muted);
  font-size: 13.5px;
}
.fnote a:hover { color: #fff; }

@media (max-width: 1100px) {
  .foot-g { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .foot-top { align-items: flex-start; }
  .foot-cta { width: 100%; }
  .fs { font-size: 1.6rem; }
  .foot-g { grid-template-columns: 1fr; gap: 0; }
  .fc { border-bottom: 1px solid rgba(255, 255, 255, .14); }
  .fc summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
    margin: 0;
    cursor: pointer;
  }
  .fc summary::after {
    content: "";
    width: 8px;
    height: 8px;
    margin-top: -4px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    transition: transform var(--dur-color);
  }
  .fc[open] summary::after { transform: rotate(225deg); margin-top: 4px; }
  .fc-l { padding-bottom: 12px; }
  /* Запас под плавающую кнопку, чтобы она не закрывала нижнюю строку */
  .has-fab .foot { padding-bottom: calc(108px + var(--safe-bottom)); }
}

/* ===================== плавающая «Подобрать специалиста» ================= */
.fab { display: none; }
@media (max-width: 720px) {
  .fab {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: calc(16px + var(--safe-bottom));
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    border-radius: var(--r);
    background: var(--ink);
    color: var(--paper);
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    box-shadow: 0 12px 34px rgba(14, 14, 14, .32);
    transition: opacity .25s, transform .25s;
  }
  .fab.hide,
  .is-menu-open .fab,
  .is-sheet-open .fab { opacity: 0; transform: translateY(12px); pointer-events: none; }
}

/* ===================== карточки: подъём при наведении ====================
   Карточки с рамкой (специалист, товар, «С чего начнём?», категория)
   поднимаются, рамка становится терракотовой. Только там, где есть мышь. */
.lift { transition: transform var(--dur-lift) var(--ease), box-shadow var(--dur-lift), border-color .25s; }
@media (hover: hover) {
  .lift:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); border-color: var(--accent); }
}

/* Фото внутри карточки: скругление r, фон tone, пока грузится */
.ph { display: block; position: relative; overflow: hidden; border-radius: var(--r); background: var(--tone); }
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-zoom) var(--ease); }

/* Сетки карточек в списках (лента, каталог) */
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cards > li { min-width: 0; }
@media (min-width: 1101px) { .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap-grid); } }
/* Специалисты — карточка шире: на телефоне по одной */
@media (max-width: 720px) { .cards--pros { grid-template-columns: 1fr; gap: 12px; } }

/* ======================= карточка проекта (ProjectCard) ==================
   Без рамки; обложка, строка «тип объекта, город, площадь», название, автор.
   При наведении увеличивается фото и подчёркивается название. */
.pc { display: block; min-width: 0; color: inherit; text-decoration: none; }
.pc:hover { text-decoration: none; }
.pc .ph { aspect-ratio: 4 / 5; }
.pc:hover .ph img { transform: scale(1.04); }
.pk { display: block; margin-top: 12px; color: var(--muted); font-size: 13.5px; }
.ct { display: block; margin-top: 2px; font-size: var(--t-card); font-weight: 500; line-height: 1.22; letter-spacing: -.02em; }
.cm { display: block; margin-top: 2px; color: var(--soft); font-size: 14px; }
/* чем проект подходит задаче — на странице подбора («Неоклассика · квартира 95 м²») */
.cr { display: block; margin-top: 4px; color: var(--accent-text); font-size: 13.5px; }
.pc:hover .ct { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.ph-empty { position: absolute; inset: 0; background: var(--tone); }
/* «В работе», «Визуализация» — на фото, если объект не построен */
.pc-st { position: absolute; left: 10px; top: 10px; z-index: 2; display: inline-flex; align-items: center; min-height: 28px; padding: 0 11px; border-radius: var(--r-pill); background: var(--paper); color: var(--ink); font-size: 12.5px; font-weight: 500; pointer-events: none; }
@media (max-width: 720px) {
  .pk { margin-top: 10px; font-size: 13px; }
  .ct { font-size: 15.5px; }
}

/* ===================== карточка специалиста (SpecialistCard) =============
   Профиль, а не ещё один проект: три миниатюры работ, кружок с фото или
   инициалами (у студий — квадрат), имя, профессия и город, число работ. */
.spc {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: var(--paper);
  color: inherit;
  text-decoration: none;
}
.spc:hover { text-decoration: none; }
.spc-g {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 4px;
  height: clamp(130px, 11.5vw, 166px);
  overflow: hidden;
  border-radius: 4px;
  background: var(--tone);
}
.spc-g img { display: block; width: 100%; height: 100%; object-fit: cover; background: var(--tone); }
.spc-g img:first-child { grid-row: span 2; }
.spc-g--1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.spc-g--2 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
.spc-g--2 img:first-child { grid-row: auto; }
.spc-b { display: flex; align-items: center; gap: 12px; padding: 14px 8px 0; }
.av {
  display: grid;
  flex: none;
  place-items: center;
  width: 46px;
  height: 46px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--tone);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .02em;
}
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.co { border-radius: var(--r); background: var(--ink); color: #fff; }
.spc-t { min-width: 0; }
.spc-n { display: block; font-size: 16.5px; font-weight: 500; line-height: 1.2; letter-spacing: -.02em; }
.spc-r { display: block; margin-top: 2px; color: var(--muted); font-size: 13.5px; }
.spc-f {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding: 14px 8px 6px;
  color: var(--muted);
  font-size: 13.5px;
}
.spc-go { color: var(--ink); font-weight: 500; white-space: nowrap; }
/* 059: «работает по всему Узбекистану» в каталоге и проекты в нескольких странах */
.spc-note { display: block; margin-top: 2px; color: var(--soft); font-size: 13px; }
.spc-geo { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; color: var(--soft); white-space: nowrap; }
.spc-geo .ico { width: 14px; height: 14px; }
.spc:hover .spc-go { text-decoration: underline; text-underline-offset: 4px; }

/* ===================== окно заявки «Товаров и брендов» ====================
   components/rqdialog.js. Открывается с любой страницы открытой части:
   «Подобрать вместе с myproje» есть в меню шапки. */
.x-dlg {
  width: min(480px, calc(100vw - 24px));
  max-height: calc(100svh - 24px);
  padding: clamp(20px, 3vw, 28px);
  border: 0;
  border-radius: var(--r);
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-menu);
}
.x-dlg::backdrop { background: rgba(14, 14, 14, .56); }
.x-dlg-x {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--soft);
  cursor: pointer;
}
.x-dlg-x:hover { background: var(--chip); color: var(--ink); }
.x-dlg-h { padding-right: 40px; font-size: clamp(1.3rem, 2vw, 1.55rem); font-weight: 500; line-height: 1.15; letter-spacing: -.03em; }
.x-dlg-sum { margin: 16px 0 0; padding: 4px 14px; border-radius: var(--r); background: var(--tone); }
.x-dlg-sum > div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; font-size: 14.5px; }
.x-dlg-sum > div + div { border-top: 1px solid var(--line); }
.x-dlg-sum dt { color: var(--muted); }
.x-dlg-sum dd { margin: 0; font-weight: 500; text-align: right; }
.x-dlg-sum .ac dd { color: var(--accent-text); }
.x-dlg-f { display: grid; gap: 12px; margin-top: 18px; }
.x-dlg-l { display: grid; gap: 6px; color: var(--muted); font-size: 14px; }
.x-dlg .q-in {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: #fff;
  color: var(--ink);
  font-size: 16px;
}
.x-dlg .q-ta { height: auto; min-height: 84px; padding: 10px 14px; line-height: 1.45; resize: vertical; }
.x-dlg .q-in:focus { outline: 0; border-color: var(--ink); }
.x-dlg .q-ok { display: flex; align-items: flex-start; gap: 10px; color: var(--soft); font-size: 13.5px; cursor: pointer; }
.x-dlg .q-ok input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ink); }
.x-dlg .q-err { color: var(--accent-text); font-size: 14.5px; }
.x-num { margin-top: 16px; font-size: clamp(2.6rem, 9vw, 3.6rem); font-weight: 400; line-height: 1; letter-spacing: -.04em; }
.x-dlg-t { margin: 14px 0 20px; color: var(--soft); font-size: 15.5px; line-height: 1.5; }

/* ======================= меню разделов по нажатию ========================
   components/megamenu.js, состав и вид — прототип v7. Панель во всю
   ширину под шапкой; только с 1024px, уже — бургер. */
.nb {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 10px 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  white-space: nowrap;
  cursor: pointer;
}
.nb svg { color: var(--muted); transition: transform var(--dur-color); }
.top.over .nb svg { color: currentColor; opacity: .7; }
.nb:hover > span, .nb[aria-expanded="true"] > span, .nb.is-active > span {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}
.nb[aria-expanded="true"] svg { transform: rotate(180deg); }

.dd {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 45;
  background: #fff;
  color: var(--ink);
  border-bottom: 1px solid var(--line-2);
  box-shadow: 0 24px 40px rgba(14, 14, 14, .08);
}
.dd-in { display: grid; gap: 32px; padding-top: 22px; padding-bottom: 28px; }
.dd h3 { margin: 6px 0 10px; color: var(--muted); font-size: 13.5px; font-weight: 500; }
.dd ul { margin: 0; padding: 0; list-style: none; }
.dd li a, .dd .lk { display: block; padding: 6px 0; color: var(--ink); font-size: 15px; text-decoration: none; }
.dd li a:hover, .dd .lk:hover, .dd .all:hover { color: var(--accent-text); }
.dd .all { display: inline-block; margin-top: 12px; color: var(--ink); font-size: 15px; font-weight: 500; text-decoration: underline; text-underline-offset: 5px; }
.dd-2 { columns: 2; column-gap: 28px; }
.dd-empty { color: var(--muted); font-size: 14.5px; }
.dd-pj { grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(0, 1.3fr); }
.dd-sp { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.dd-cta { padding: 18px; border-radius: var(--r); background: var(--tone); }
.dd-cta p { font-size: 15px; line-height: 1.45; }
.dd-cta b { font-weight: 500; }
.dd-cta .btn { min-height: 44px; margin-top: 14px; padding: 0 18px; font-size: 14.5px; }
.dd-card { display: block; color: var(--ink); text-decoration: none; }
.dd-card .ph { aspect-ratio: 4 / 3; }
.dd-card b { display: block; margin-top: 10px; font-size: 15.5px; font-weight: 500; }
.dd-card span:not(.ph) { display: block; color: var(--muted); font-size: 13.5px; }
.dd-card:hover b { text-decoration: underline; text-underline-offset: 4px; }

/* «Товары и бренды»: разделы со значками слева, бренды и компании справа */
.mg { grid-template-columns: minmax(0, 1fr) 260px; }
.mg-s { columns: 2; column-gap: 28px; }
.mg-s li { break-inside: avoid; }
.dd .mg-s a { display: flex; align-items: center; gap: 12px; padding: 3px 10px 3px 4px; border-radius: var(--r); }
.dd .mg-s a:hover { background: var(--tone); color: var(--ink); }
.mg-ic {
  display: grid;
  flex: none;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: #fff;
  color: var(--soft);
  transition: color var(--dur-color), border-color var(--dur-color);
}
.mg-ic .ico { width: 18px; height: 18px; }
.mg-s a:hover .mg-ic { border-color: var(--accent); color: var(--accent); }
.mg-b .dd-cta { margin-top: 18px; }

@media (max-width: 1023px) { .dd { display: none !important; } }
