/* One public masthead, matching the homepage. No cabinet or content selectors.
   Specificity intentionally wins over historical homepage-only header rules. */
html:root body .site-topline,
html:root body header.site-header.site-header--search{
  box-sizing:border-box;width:min(1480px,calc(100% - 48px));border-radius:8px;
}
html:root body .site-topline{
  min-height:36px;margin:8px auto 6px;padding:3px 16px;font-size:10px;
  box-shadow:0 10px 32px rgba(30,63,79,.07);
}
html:root body .site-trust-item{gap:7px;padding:0 16px}
html:root body .site-topline>div:first-child::after{
  display:inline-flex;align-items:center;min-height:19px;padding:0 16px;
  border-left:1px solid #dce7eb;color:#64778d;content:"ϟ  Быстрый ответ";
  font-size:10px;white-space:nowrap;
}
html:root body .site-phone{
  margin:3px 12px 3px 0;padding:6px 17px 6px 9px;border-color:transparent;
  background:linear-gradient(135deg,#effaf8,#fff);box-shadow:0 5px 17px rgba(10,126,119,.09);
}
html:root body .site-phone:hover{border-color:rgba(7,151,140,.15);box-shadow:0 9px 22px rgba(10,126,119,.14)}
html:root body .site-phone>b{width:29px;height:29px;border-radius:9px}
html:root body .site-phone strong{font-size:15px}
html:root body .site-phone small{font-size:9px}
html:root body header.site-header.site-header--search{
  position:sticky!important;top:6px!important;display:flex!important;flex-direction:row;
  grid-template-columns:none!important;align-items:center;justify-content:space-between;
  gap:16px;min-height:76px;margin:0 auto 10px;padding:10px 18px;
  box-shadow:0 12px 34px rgba(30,63,79,.13);
}
html:root body header.site-header.site-header--search .site-brand{
  display:flex;align-items:center;flex:0 1 auto;gap:10px;min-width:230px;
}
html:root body header.site-header.site-header--search .site-brand img{width:39px;height:39px}
html:root body header.site-header.site-header--search .site-brand strong{font-size:18px}
html:root body header.site-header.site-header--search .site-brand small{
  margin-top:4px;color:#617486;font-size:12px;font-weight:600;line-height:1.25;
}
html:root body header.site-header.site-header--search>nav{
  display:flex;flex:0 0 auto;grid-column:auto!important;grid-row:auto!important;
  justify-content:flex-end;gap:16px;margin-left:0;padding:0;border:0;font-size:12px;
}
html:root body header.site-header.site-header--search>nav a{padding:20px 0}
html:root body header.site-header.site-header--search .site-header-actions{
  display:flex;position:static;flex:0 0 auto;align-items:center;gap:8px;padding-left:14px;
}
html:root body header.site-header.site-header--search .site-question-button,
html:root body header.site-header.site-header--search .site-partner-button{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  box-sizing:border-box;min-height:44px;height:44px;padding:0 18px;border:0;
  border-radius:10px;font-size:12px!important;font-weight:750;line-height:18px;
  white-space:nowrap;box-shadow:none;
}
html:root body header.site-header.site-header--search .site-question-button{
  width:154px;gap:9px;background:linear-gradient(135deg,#0aa39a,#07877f);color:#fff;
}
html:root body header.site-header.site-header--search .site-question-button>span{display:inline-flex}
html:root body header.site-header.site-header--search .site-question-button::after{content:none}
html:root body header.site-header.site-header--search .site-partner-menu{
  position:relative;flex:0 0 auto;margin:0;padding:0;border:0;background:transparent;box-shadow:none;
}
html:root body header.site-header.site-header--search .site-partner-button{
  width:154px;background:#fff;color:#087f76;cursor:pointer;
}
html:root body header.site-header.site-header--search .site-partner-button:hover{background:#edf8f6}
html:root body header.site-header.site-header--search .site-account-button{
  display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;
  width:48px;min-height:40px;height:40px;padding:0;border-radius:6px;font-size:10px;line-height:15px;
}
html:root body header.site-header.site-header--search .site-partner-options{
  box-sizing:border-box;width:min(310px,calc(100vw - 24px));max-width:calc(100vw - 24px);
}
html:root body header.site-header.site-header--search .site-question-button:focus-visible,
html:root body header.site-header.site-header--search .site-partner-button:focus-visible,
html:root body header.site-header.site-header--search .site-account-button:focus-visible{
  outline:3px solid rgba(7,156,148,.35);outline-offset:3px;
}
@media(max-width:1350px){
  html:root body header.site-header.site-header--search{flex-wrap:wrap;gap:12px}
  html:root body header.site-header.site-header--search>nav{
    order:4;flex:1 0 100%;justify-content:center;gap:12px;
  }
  html:root body header.site-header.site-header--search>nav a{padding:6px 0}
  html:root body header.site-header.site-header--search .site-brand small{max-width:220px;white-space:normal}
}
@media(max-width:980px){
  html:root body .site-topline{display:none}
  html:root body header.site-header.site-header--search{width:calc(100% - 24px)}
  html:root body header.site-header.site-header--search>nav{display:none!important}
}
@media(max-width:760px){
  html:root body header.site-header.site-header--search{gap:10px}
  html:root body header.site-header.site-header--search .site-brand{flex:1;min-width:0}
  html:root body header.site-header.site-header--search .site-brand small{display:none}
  html:root body header.site-header.site-header--search .site-brand strong{font-size:17px}
  html:root body header.site-header.site-header--search .site-brand img{width:32px;height:32px}
  html:root body header.site-header.site-header--search .site-header-actions{padding:0;border:0}
  html:root body header.site-header.site-header--search .site-partner-menu,
  html:root body header.site-header.site-header--search .site-partner-button,
  html:root body header.site-header.site-header--search .site-question-button{display:none!important}
}

/* Мобильное меню: до 980 px основное меню скрыто, поэтому показываем кнопку с выпадающим списком (details, без JavaScript). */
html:root body header.site-header.site-header--search .site-mobile-menu{display:none}
@media(max-width:980px){
  html:root body header.site-header.site-header--search .site-mobile-menu{display:block;position:static;flex:0 0 auto;width:44px;margin:0;padding:0;border:0;border-radius:0;background:none;box-shadow:none}
  html:root body header.site-header.site-header--search .site-mobile-menu>summary{
    display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:44px;height:44px;
    border:1px solid #dce7eb;border-radius:8px;background:#fff;cursor:pointer;list-style:none;
  }
  html:root body header.site-header.site-header--search .site-mobile-menu>summary::-webkit-details-marker{display:none}
  html:root body header.site-header.site-header--search .site-mobile-menu>summary:focus-visible{outline:3px solid rgba(7,156,148,.35);outline-offset:3px}
  html:root body header.site-header.site-header--search .site-menu-bars,
  html:root body header.site-header.site-header--search .site-menu-bars::before,
  html:root body header.site-header.site-header--search .site-menu-bars::after{
    display:block;width:18px;height:2px;border-radius:2px;background:#0b6f69;content:"";
  }
  html:root body header.site-header.site-header--search .site-menu-bars{position:relative}
  html:root body header.site-header.site-header--search .site-menu-bars::before{position:absolute;top:-6px;left:0}
  html:root body header.site-header.site-header--search .site-menu-bars::after{position:absolute;top:6px;left:0}
  html:root body header.site-header.site-header--search .site-mobile-menu[open]>summary{background:#edf8f6;border-color:#bfe3df}
  html:root body header.site-header.site-header--search .site-mobile-menu-panel{
    position:absolute;z-index:60;top:calc(100% + 8px);left:0;right:0;display:flex;flex-direction:column;gap:2px;
    box-sizing:border-box;max-height:calc(100vh - 110px);overflow-y:auto;padding:8px;border:1px solid #dce7eb;border-radius:8px;
    background:#fff;box-shadow:0 18px 40px rgba(30,63,79,.18);
  }
  html:root body header.site-header.site-header--search .site-mobile-menu-panel a{
    display:flex;align-items:center;min-height:48px;padding:0 14px;border-radius:6px;color:#10253a;
    font-size:16px;font-weight:650;text-decoration:none;
  }
  html:root body header.site-header.site-header--search .site-mobile-menu-panel a.is-active{background:#edf8f6;color:#087f76}
  html:root body header.site-header.site-header--search .site-mobile-menu-panel a:active{background:#edf8f6}
  html:root body header.site-header.site-header--search .site-mobile-menu-panel .site-mobile-menu-cta{
    margin-top:6px;justify-content:center;background:linear-gradient(135deg,#0aa39a,#07877f);color:#fff;
  }
  html:root body header.site-header.site-header--search .site-mobile-menu-panel .site-mobile-menu-partner{color:#087f76}
}
@media(max-width:760px){
  html:root body header.site-header.site-header--search{gap:8px;padding:10px 12px}
  html:root body header.site-header.site-header--search .site-brand{gap:8px}
  html:root body header.site-header.site-header--search .site-brand strong{font-size:16px;white-space:nowrap}
}

/* Поля форм на телефоне: размер меньше 16 px заставляет iPhone приближать страницу при нажатии на поле. */
@media(max-width:760px){
  html:root body input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]):not([type=range]):not([type=file]),
  html:root body textarea,
  html:root body select{font-size:16px!important}
}

/* Мобильная главная: текст мельче 12 px (6-11 px) поднят до 12 px. Только главная и только до 760 px; правила собраны по реально найденным элементам. Чат, бегущую строку и плашку «Полезно» не трогаем. */
@media(max-width:760px){
  html:root body:has(.portal-home-v3) .ph-hero-trust-v5 b,
  html:root body:has(.portal-home-v3) .ph-hero-trust-v5 small,
  html:root body:has(.portal-home-v3) .ph-lawyer-card-v5 small,
  html:root body:has(.portal-home-v3) .ph-lawyer-card-v5 p,
  html:root body:has(.portal-home-v3) .ph-lawyer-card-v5 li,
  html:root body:has(.portal-home-v3) section:nth-of-type(1) > div:nth-of-type(3) > aside > ul > li:nth-of-type(1) > b,
  html:root body:has(.portal-home-v3) section:nth-of-type(1) > div:nth-of-type(3) > aside > ul > li:nth-of-type(3) > b,
  html:root body:has(.portal-home-v3) .ph-lawyer-card-v5 a,
  html:root body:has(.portal-home-v3) .ph-online-count i,
  html:root body:has(.portal-home-v3) .ph-online-count small,
  html:root body:has(.portal-home-v3) main > section:nth-of-type(1) > div:nth-of-type(3) > a > div > b,
  html:root body:has(.portal-home-v3) .ph-lawyers-online-v5 small,
  html:root body:has(.portal-home-v3) .ph-proof span,
  html:root body:has(.portal-home-v3) main > section:nth-of-type(3) > div:nth-of-type(2) > header > div > span,
  html:root body:has(.portal-home-v3) main > section:nth-of-type(3) > div:nth-of-type(2) > header > a,
  html:root body:has(.portal-home-v3) .ph-chat-cta small,
  html:root body:has(.portal-home-v3) .client-reviews span,
  html:root body:has(.portal-home-v3) .cr-card span,
  html:root body:has(.portal-home-v3) .cr-card small,
  html:root body:has(.portal-home-v3) .cr-card footer,
  html:root body:has(.portal-home-v3) .ph-rank-region-menu small,
  html:root body:has(.portal-home-v3) .ph-radar-feature__image span,
  html:root body:has(.portal-home-v3) .ph-radar-feature__copy dt,
  html:root body:has(.portal-home-v3) section:nth-of-type(7) > div:nth-of-type(1) > article > div:nth-of-type(2) > footer > a:nth-of-type(2),
  html:root body:has(.portal-home-v3) .ph-radar-priority span,
  html:root body:has(.portal-home-v3) .ph-radar-priority time,
  html:root body:has(.portal-home-v3) .ph-radar-priority a,
  html:root body:has(.portal-home-v3) .ph-radar-brief span,
  html:root body:has(.portal-home-v3) .ph-scale-kpis span,
  html:root body:has(.portal-home-v3) main > div > section:nth-of-type(1) > div:nth-of-type(1) > article:nth-of-type(1) > small,
  html:root body:has(.portal-home-v3) main > div > section:nth-of-type(1) > div:nth-of-type(1) > article:nth-of-type(2) > small,
  html:root body:has(.portal-home-v3) main > div > section:nth-of-type(1) > div:nth-of-type(1) > article:nth-of-type(3) > small,
  html:root body:has(.portal-home-v3) section:nth-of-type(1) > div:nth-of-type(2) > article > header > div > span,
  html:root body:has(.portal-home-v3) div > section:nth-of-type(1) > div:nth-of-type(2) > article > header > b,
  html:root body:has(.portal-home-v3) .ph-chart-label-v3 span,
  html:root body:has(.portal-home-v3) .ph-chart-axis-v3 span,
  html:root body:has(.portal-home-v3) .ph-process-card span,
  html:root body:has(.portal-home-v3) .ph-process-card small,
  html:root body:has(.portal-home-v3) .ph-process-card p,
  html:root body:has(.portal-home-v3) .ph-geo-stats small,
  html:root body:has(.portal-home-v3) .ph-city-links a,
  html:root body:has(.portal-home-v3) .ph-all-regions,
  html:root body:has(.portal-home-v3) .ph-russia-map span,
  html:root body:has(.portal-home-v3) .ph-russia-map small,
  html:root body:has(.portal-home-v3) main > div > section:nth-of-type(2) > div:nth-of-type(2) > footer > a,
  html:root body:has(.portal-home-v3) #ph-journey-tab-0 > button:nth-of-type(1) > span:nth-of-type(2),
  html:root body:has(.portal-home-v3) #ph-journey-tab-1 > button:nth-of-type(2) > span:nth-of-type(2),
  html:root body:has(.portal-home-v3) #ph-journey-tab-2 > button:nth-of-type(3) > span:nth-of-type(2),
  html:root body:has(.portal-home-v3) .ph-faq-intro span,
  html:root body:has(.portal-home-v3) .ph-faq-promises strong,
  html:root body:has(.portal-home-v3) .ph-faq-promises small,
  html:root body:has(.portal-home-v3) .ph-faq-intro small,
  html:root body:has(.portal-home-v3) main > div > section:nth-of-type(5) > div:nth-of-type(1) > aside > p,
  html:root body:has(.portal-home-v3) .ph-faq-content span,
  html:root body:has(.portal-home-v3) .ph-team-editorial-eyebrow{font-size:12px!important}
}
