/* Доводка шапки и подвала.
   Перенесено как есть из shadow-корня текущего сайта
   (снято cms-inventory/tools/dump_shell.py). Правила не меняются:
   любая правка здесь ломает совпадение с эталоном. */

html{scroll-behavior:auto}
      .nav-link::after{bottom:-4px}
      .nav-link.is-current::after{transform:scaleX(1)}
      .nav-services-button{appearance:none!important;border:0!important;background:transparent!important;color:inherit!important;font:inherit!important;box-shadow:none!important;cursor:pointer!important}
      .nav-services-button:focus{outline:none!important}.nav-services-button:focus-visible{outline:2px solid rgba(240,115,63,.45)!important;outline-offset:-4px!important;border-radius:8px!important}
      .nav-link-dropdown .atri-nav-chevron{display:none!important}
      .site-header .nav-list>li:nth-child(n){display:list-item!important}
      .mobile-menu-panel [aria-current="page"],.atri-mobile-dock-panel [aria-current="page"]{color:#f0733f}
      .footer-legal small{display:none!important}.footer-messengers a[aria-disabled="true"]{cursor:default}.atri-meta-note{max-width:560px;margin:14px 0 0;color:rgba(255,255,255,.52);font-size:10px;line-height:1.45}
      .atri-route-services{position:absolute;z-index:75;top:72px;right:0;left:0;padding:0 32px 24px;background:rgba(255,255,255,.98);border-top:1px solid #ece8e2;box-shadow:0 26px 46px rgba(36,31,49,.16)}
      .atri-route-services[hidden]{display:none}.atri-route-services__shell{display:grid;grid-template-columns:260px minmax(0,1fr);width:min(100%,1240px);max-height:min(590px,calc(100vh - 112px));margin:0 auto;overflow:hidden;border:1px solid #e7e1d9;border-top:0;border-radius:0 0 18px 18px;background:#fff}
      .atri-route-services__tabs{overflow:auto;padding:24px 0;background:#f5f2ed}.atri-route-services__tab{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:52px;padding:12px 22px;border:0;background:transparent;color:#302b34;text-align:left;font:600 15px/1.35 Manrope,"Segoe UI",Arial,sans-serif;cursor:pointer}.atri-route-services__tab:hover,.atri-route-services__tab.is-active{background:#fff;color:#201d24}
      .atri-route-services__content{position:relative;overflow:auto;padding:28px 30px 34px}.atri-route-services__content h2{margin:0 0 20px;font-size:30px;line-height:1.15}.atri-route-services__items{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 28px}.atri-route-services__item{display:block;padding:8px 0;color:#7b757b;font-size:15px}a.atri-route-services__item{color:#2f2b31;text-decoration:none}a.atri-route-services__item:hover{color:#f0733f}
      .atri-route-services__close{position:absolute;top:20px;right:24px;display:grid;place-items:center;width:40px;height:40px;border:1px solid #ded8d1;border-radius:50%;background:#fff;color:#3d3840;font-size:24px;cursor:pointer}
      @media(max-width:1320px) and (min-width:901px){.nav-list{gap:9px!important}.nav-link{font-size:12px!important}.nav-list li{display:list-item!important}.header-availability{display:none!important}}
      @media(max-width:900px){.atri-route-services{display:none!important}.site-footer{padding-bottom:max(86px,calc(78px + env(safe-area-inset-bottom)))}}
      @media(max-width:700px){.footer-legal{display:grid!important;grid-template-columns:1fr!important;gap:10px!important}.footer-legal>*{grid-column:1!important;display:block!important;width:100%!important;margin:0!important}.footer-bottom{gap:10px!important}}

/* Подпись агентства в подвале.

   На старом сайте это веб-компонент <atri-dent-agency-credit> со стилями
   внутри shadow-корня. При переносе в обычный DOM изоляция пропадает,
   поэтому те же правила переписаны на класс. Значения не меняются —
   иначе строка в подвале переносится и уезжает на 21 px. */
.site-footer .footer-agency-slot {
  /* Тот же слот, что занимал веб-компонент: блок во всю ширину,
     прижатый вправо на десктопе. */
  display: block;
  flex: 0 1 390px;
  min-width: 0;
  margin-left: auto;
}
.site-footer a.footer-agency {
  box-sizing: border-box;
  display: flex;
  flex: 0 1 390px;
  min-width: 0;
  /* Именно margin целиком, а не только margin-left: правило подвала
     .site-footer a:not(.logo){margin:9px 0} иначе добавит отступ сверху,
     и подпись агентства уедет на 9 px вниз. */
  margin: 0 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 13px;
  min-height: 60px;
  /* !important — чтобы перебить .footer-legal a{font-size:12px!important;
     color:...!important}. В исходнике подпись жила в shadow-корне своего
     веб-компонента, и те правила до неё не доставали. */
  color: rgba(255, 255, 255, .62) !important;
  font: 500 11.5px/1.4 Manrope, "Segoe UI", Arial, sans-serif !important;
  text-align: left;
  text-decoration: none;
  transition: color .18s ease;
}
.site-footer a.footer-agency:hover { color: #fff }
.site-footer a.footer-agency:focus-visible {
  border-radius: 6px;
  outline: 2px solid rgba(255, 255, 255, .78);
  outline-offset: 4px;
}
.site-footer .footer-agency .agency-mark {
  box-sizing: border-box;
  display: grid;
  flex: 0 0 64px;
  place-items: center;
  width: 64px;
  height: 60px;
  padding: 6px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(10, 7, 16, .18);
}
.site-footer .footer-agency .agency-mark img {
  display: block;
  width: 48px;
  height: 46px;
  object-fit: contain;
}
.site-footer .footer-agency .agency-copy { display: block; max-width: 290px }

/* Юридические документы в подвале.

   В исходной вёрстке это были span-заглушки «обновляется» — строчные,
   поэтому три пункта помещались в одну строку. Теперь документы написаны
   и стали ссылками, а подвал делает все ссылки блочными
   (.site-footer a:not(.logo){display:block}) — три документа заняли бы
   три строки и подвал вырос бы на 61 px. Возвращаем строчное поведение:
   геометрия строки остаётся ровно такой, какой была. */
.site-footer .footer-legal__doc > a {
  /* Селектор с .site-footer намеренно: правило подвала
     .site-footer a:not(.logo){display:block} по весу сильнее короткого. */
  display: inline;
  margin: 0;
  /* Кегль и цвет наследуем: правило подвала задаёт ссылкам 13px и серый
     #d0ccd0, а у заглушек в исходнике были размер и цвет строки правовой
     информации. Иначе текст выглядит тусклее эталона. */
  font-size: inherit;
  color: inherit;
}

/* Подпись агентства на узких экранах.

   Те же правила, что были в медиазапросе веб-компонента: подпись занимает
   всю ширину и прижимается влево, ширина текста считается от вьюпорта.
   Отступ сверху в исходнике висел на самом компоненте — значит на слоте,
   а не на ссылке: иначе подвал вырастает на 6 px. */
@media (max-width: 900px) {
  .site-footer .footer-agency-slot {
    width: 100%;
    max-width: 100%;
    /* Ниже 700 px это правило перебивается .footer-legal>*{margin:0!important} —
       ровно так же, как в исходнике, где отступ висел на веб-компоненте. */
    margin: 6px 0 0;
  }
  .site-footer a.footer-agency {
    width: 100%;
    max-width: 100%;
    margin: 0;
    justify-content: flex-start;
    min-height: 60px;
  }
  .site-footer .footer-agency .agency-copy {
    max-width: min(290px, calc(100vw - 116px));
  }
}

/* Согласие на обработку персональных данных в форме «О клинике».
   Этого поля в исходной вёрстке не было — см. DIVERGENCES.md. Пропорции
   взяты у такого же согласия на странице контактов (contacts-page.css),
   чтобы блок читался как родной: 12px, чекбокс 17px, отступ 10px.
   Селекторы с .about-final__form — иначе поле-чекбокс подхватывает правило
   .about-final__form input (высота 54px), которое идёт в файле ниже.
   line-height в пикселях, а не в долях: 12px*1.45 даёт 17,39 px на строку,
   и весь подвал уезжал на дробную величину — субпиксельная сетка смещалась,
   и текст ниже перерисовывался иначе. Целая высота сдвигает подвал ровно
   на 48 px и оставляет его пиксельно тем же. */
.about-final__form .about-final__consent{display:grid;grid-template-columns:auto 1fr;align-items:start;gap:10px}
.about-final__form .about-final__consent>input{width:17px;height:17px;min-height:0;padding:0;border:0;border-radius:0;background:none;accent-color:#f0733f;margin:2px 0 0}
.about-final__form .about-final__consent>span{color:rgba(255,255,255,.7);font-size:12px;font-weight:500;line-height:18px}
.about-final__form .about-final__consent a{color:#fff;text-decoration:underline;text-underline-offset:3px}
@media(max-width:900px){.about-final__form .about-final__consent{grid-column:1/3}}
@media(max-width:640px){.about-final__form .about-final__consent{grid-column:auto}}
