/* v71 — safe internal header layout. Keeps the four approved menu items centered
   and prevents the account button from colliding with navigation. */
body.site-page .topbar.internal-topbar-v71{
  box-sizing:border-box !important;
  width:100% !important;
  max-width:none !important;
  margin:0 !important;
  min-height:72px !important;
  height:72px !important;
  padding:0 clamp(22px,3.4vw,56px) !important;
  display:grid !important;
  grid-template-columns:minmax(150px,210px) minmax(440px,1fr) minmax(190px,250px) !important;
  align-items:center !important;
  column-gap:clamp(18px,2vw,34px) !important;
  background:rgba(4,6,15,.96) !important;
  border-bottom:1px solid rgba(146,82,255,.22) !important;
  overflow:visible !important;
}
body.site-page .topbar.internal-topbar-v71 .brand{
  justify-self:start !important;
  min-width:0 !important;
  font-size:34px !important;
  line-height:1 !important;
  white-space:nowrap !important;
}
body.site-page .topbar.internal-topbar-v71 .topnav{
  min-width:0 !important;
  width:100% !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  flex-wrap:nowrap !important;
  gap:clamp(22px,3vw,48px) !important;
  padding:0 !important;
  margin:0 !important;
  background:transparent !important;
  border:0 !important;
}
body.site-page .topbar.internal-topbar-v71 .topnav a{
  flex:0 0 auto !important;
  display:inline-flex !important;
  align-items:center !important;
  gap:7px !important;
  padding:0 !important;
  margin:0 !important;
  white-space:nowrap !important;
  font-size:15px !important;
  font-weight:850 !important;
  line-height:1 !important;
  color:#f0f2fb !important;
  background:transparent !important;
}
body.site-page .topbar.internal-topbar-v71 .topnav a:after{
  display:none !important;
}
body.site-page .topbar.internal-topbar-v71 .topnav a i{
  flex:0 0 auto !important;
  width:9px !important;
  height:9px !important;
  margin:0 !important;
  border:0 !important;
  border-radius:50% !important;
  background:#7953ff !important;
  box-shadow:0 0 12px rgba(121,83,255,.82) !important;
}
body.site-page .topbar.internal-topbar-v71 .top-actions{
  min-width:0 !important;
  justify-self:end !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  flex-wrap:nowrap !important;
  gap:10px !important;
}
body.site-page .topbar.internal-topbar-v71 .top-actions .btn,
body.site-page .topbar.internal-topbar-v71 .top-actions .btn-primary,
body.site-page .topbar.internal-topbar-v71 .top-actions .btn-ghost{
  box-sizing:border-box !important;
  min-width:0 !important;
  width:auto !important;
  max-width:100% !important;
  height:44px !important;
  min-height:44px !important;
  padding:0 20px !important;
  border-radius:10px !important;
  white-space:nowrap !important;
  font-size:14px !important;
}
body.site-page .topbar.internal-topbar-v71 .notification-pill{
  flex:0 0 44px !important;
  width:44px !important;
  height:44px !important;
}

@media (max-width:1180px){
  body.site-page .topbar.internal-topbar-v71{
    padding:0 22px !important;
    grid-template-columns:150px minmax(410px,1fr) minmax(170px,205px) !important;
    column-gap:16px !important;
  }
  body.site-page .topbar.internal-topbar-v71 .brand{font-size:31px !important;}
  body.site-page .topbar.internal-topbar-v71 .topnav{gap:22px !important;}
  body.site-page .topbar.internal-topbar-v71 .topnav a{font-size:14px !important;}
  body.site-page .topbar.internal-topbar-v71 .top-actions .btn,
  body.site-page .topbar.internal-topbar-v71 .top-actions .btn-primary,
  body.site-page .topbar.internal-topbar-v71 .top-actions .btn-ghost{padding:0 15px !important;font-size:13px !important;}
}

@media (max-width:980px){
  body.site-page .topbar.internal-topbar-v71{
    min-height:66px !important;
    height:auto !important;
    padding:11px 16px !important;
    display:flex !important;
    justify-content:space-between !important;
    gap:14px !important;
  }
  body.site-page .topbar.internal-topbar-v71 .topnav{display:none !important;}
  body.site-page .topbar.internal-topbar-v71 .brand{font-size:29px !important;}
  body.site-page .topbar.internal-topbar-v71 .top-actions{margin-left:auto !important;}
}

@media (max-width:560px){
  body.site-page .topbar.internal-topbar-v71 .top-actions .btn-ghost{display:none !important;}
  body.site-page .topbar.internal-topbar-v71 .top-actions .btn,
  body.site-page .topbar.internal-topbar-v71 .top-actions .btn-primary{padding:0 12px !important;font-size:12px !important;height:40px !important;min-height:40px !important;}
  body.site-page .topbar.internal-topbar-v71 .notification-pill{width:40px !important;height:40px !important;flex-basis:40px !important;}
}


/* v78 — stabilize shared internal header after the live-home rollout.
   Fixes authenticated action width and centers notification badges. */
body.site-page .topbar.internal-topbar-v71.is-authenticated{
  grid-template-columns:minmax(150px,210px) minmax(360px,1fr) minmax(300px,360px) !important;
}
body.site-page .topbar.internal-topbar-v71.is-guest{
  grid-template-columns:minmax(150px,210px) minmax(420px,1fr) minmax(190px,250px) !important;
}
body.site-page .topbar.internal-topbar-v71 .notification-pill{
  position:relative !important;
  display:grid !important;
  place-items:center !important;
  box-sizing:border-box !important;
  line-height:1 !important;
}
body.site-page .topbar.internal-topbar-v71 .notification-pill>span{
  display:grid !important;
  place-items:center !important;
  width:100% !important;
  height:100% !important;
  line-height:1 !important;
}
body.site-page .topbar.internal-topbar-v71 .notification-pill>b{
  position:absolute !important;
  right:-5px !important;
  top:-6px !important;
  width:20px !important;
  min-width:20px !important;
  height:20px !important;
  padding:0 !important;
  margin:0 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  box-sizing:border-box !important;
  line-height:1 !important;
  text-align:center !important;
  font-size:10px !important;
}
body.site-page .topbar.internal-topbar-v71 .top-actions{
  position:relative !important;
  z-index:2 !important;
  min-width:max-content !important;
}
body.site-page .topbar.internal-topbar-v71 .top-actions>.btn{
  position:relative !important;
  inset:auto !important;
  transform:none !important;
  flex:0 0 auto !important;
}
@media (max-width:1180px) and (min-width:981px){
  body.site-page .topbar.internal-topbar-v71.is-authenticated{
    grid-template-columns:145px minmax(300px,1fr) minmax(285px,320px) !important;
  }
  body.site-page .topbar.internal-topbar-v71.is-guest{
    grid-template-columns:145px minmax(360px,1fr) minmax(170px,205px) !important;
  }
  body.site-page .topbar.internal-topbar-v71 .topnav{gap:18px !important;}
  body.site-page .topbar.internal-topbar-v71 .top-actions{gap:8px !important;}
}
@media (max-width:980px){
  body.site-page .topbar.internal-topbar-v71.is-authenticated,
  body.site-page .topbar.internal-topbar-v71.is-guest{
    display:flex !important;
  }
  body.site-page .topbar.internal-topbar-v71 .top-actions{min-width:0 !important;}
}

/* v87 — deterministic vector notification icon + larger invisible navigation targets. */
body.site-page .topbar.internal-topbar-v71 .notification-pill svg{
  width:20px!important;
  height:20px!important;
  fill:none!important;
  stroke:#eef2ff!important;
  stroke-width:1.9!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
  filter:drop-shadow(0 0 5px rgba(164,104,255,.34))!important;
}
body.site-page .topbar.internal-topbar-v71 .topnav a{
  min-height:42px!important;
  padding:0 5px!important;
  box-sizing:border-box!important;
}
@media(max-width:980px){
  body.site-page .topbar.internal-topbar-v71 .notification-pill svg{width:18px!important;height:18px!important;}
}


/* LowHP v88 — internal pages final responsive pass.
   Loaded LAST on shared-site pages to make mobile behavior deterministic. */

html,body{max-width:100%;overflow-x:hidden}
body{font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Arial,sans-serif}

/* Shared content pages: Privacy / Terms / FAQ / Contacts */
.page-hero.content-hero,
.content-section,
.site-kabinet{
  box-sizing:border-box;
  min-width:0;
}
.page-hero.content-hero{
  border-color:rgba(144,103,255,.18);
  box-shadow:0 22px 64px rgba(0,0,0,.28),inset 0 1px 0 rgba(255,255,255,.025);
}
.content-hero h1{
  max-width:100%;
  overflow-wrap:anywhere;
  text-wrap:balance;
  letter-spacing:-.045em;
}
.content-hero p,
.doc-body,
.faq-item-v1 p,
.contact-card-v1 p{
  overflow-wrap:anywhere;
}
.content-doc,
.contact-card-v1,
.faq-item-v1,
.content-cta{
  min-width:0;
  border-color:rgba(126,102,205,.17);
  background:linear-gradient(180deg,rgba(17,24,45,.88),rgba(8,13,27,.94));
}
.doc-body{color:#cbd5e8}
.contact-email-v1{overflow-wrap:anywhere;word-break:break-word}
.faq-item-v1 h2{line-height:1.25}

/* Profile: prevent long Google IDs/emails and activity text from widening the page. */
.profile-page,
.profile-layout,
.profile-main-card,
.profile-stats-card,
.profile-head-card,
.profile-head-card>div,
.profile-fields,
.profile-fields>div,
.activity-panel,
.account-activity-list,
.account-activity-list a,
.account-activity-list div{
  min-width:0;
}
.profile-head-card h2,
.profile-head-card p,
.profile-fields b,
.account-activity-list span{
  overflow-wrap:anywhere;
  word-break:break-word;
}
.profile-links-row{flex-wrap:wrap}

/* Dashboard mobile: show every filter instead of hiding the last item off-screen. */
@media(max-width:560px){
  body.dashboard-v72-page .dashboard-filters{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
    width:100%!important;
    max-width:100%!important;
    overflow:visible!important;
    padding:0!important;
  }
  body.dashboard-v72-page .dashboard-filters a{
    min-width:0!important;
    width:100%!important;
    min-height:40px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    text-align:center!important;
    white-space:normal!important;
    line-height:1.25!important;
    padding:8px 9px!important;
  }
  body.dashboard-v72-page .dashboard-toolbar{gap:14px!important}
}

/* Notifications: eliminate the 390px horizontal overflow and keep actions readable. */
.notifications-page-v75,
.notifications-page-v75 *{box-sizing:border-box}
.notifications-page-v75 .notification-content,
.notifications-page-v75 .notification-title-row,
.notifications-page-v75 .notification-actions{min-width:0}
.notifications-page-v75 .notification-title-row h3,
.notifications-page-v75 .notification-content p{
  overflow-wrap:anywhere;
  word-break:break-word;
}
@media(max-width:560px){
  .notifications-page-v75{
    width:auto!important;
    max-width:none!important;
    margin-left:10px!important;
    margin-right:10px!important;
    padding:18px 0 42px!important;
  }
  .notifications-page-v75 .notifications-hero{
    padding:18px 16px!important;
  }
  .notifications-page-v75 .notification-toolbar{gap:12px!important}
  .notifications-page-v75 .notification-filters{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:7px!important;
    width:100%!important;
  }
  .notifications-page-v75 .notification-filters a{
    min-width:0!important;
    width:100%!important;
    padding:9px 6px!important;
    text-align:center!important;
  }
  .notifications-page-v75 .notification-item{
    grid-template-columns:40px minmax(0,1fr)!important;
    gap:10px!important;
    padding:14px 12px!important;
    border-radius:16px!important;
  }
  .notifications-page-v75 .notification-icon{
    width:40px!important;
    height:40px!important;
  }
  .notifications-page-v75 .notification-actions{gap:10px!important}
}

/* Internal header: compact, deterministic phone layout. */
@media(max-width:560px){
  .topbar.internal-topbar-v71{
    width:100%!important;
    padding:10px 12px!important;
    gap:8px!important;
  }
  .topbar.internal-topbar-v71 .brand{font-size:27px!important}
  .topbar.internal-topbar-v71 .top-actions{gap:7px!important;min-width:0!important}
  .topbar.internal-topbar-v71 .top-actions>.btn-primary{
    max-width:150px!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
}

/* Shared legacy-content pages on narrow phones. */
@media(max-width:620px){
  .page-hero.content-hero{
    width:calc(100% - 20px)!important;
    margin:18px 10px 8px!important;
    padding:22px 16px!important;
    border-radius:20px!important;
  }
  .content-hero h1{
    margin:14px 0 9px!important;
    font-size:clamp(29px,9vw,36px)!important;
    line-height:1.02!important;
    letter-spacing:-.04em!important;
  }
  .content-hero p{font-size:14px!important;line-height:1.55!important}
  .content-section{
    width:calc(100% - 20px)!important;
    margin:0 10px!important;
  }
  .content-doc{padding:18px!important;border-radius:18px!important}
  .doc-body{font-size:14px!important;line-height:1.68!important}
  .faq-item-v1{padding:18px!important;border-radius:18px!important;gap:13px!important}
  .faq-num-v1{width:44px!important;height:44px!important;border-radius:14px!important}
  .faq-item-v1 h2{font-size:18px!important}
  .faq-item-v1 p{font-size:14px!important}
  .content-cta{padding:18px!important;border-radius:18px!important}
  .contact-card-v1{padding:20px!important;border-radius:18px!important}

  .site-kabinet.profile-page{
    width:calc(100% - 20px)!important;
    margin:18px 10px 0!important;
    padding:0!important;
  }
  .profile-layout{grid-template-columns:minmax(0,1fr)!important;gap:12px!important}
  .profile-main-card,.profile-stats-card,.activity-panel{padding:18px!important;border-radius:18px!important}
  .profile-head-card{align-items:flex-start!important;gap:12px!important}
  .profile-head-card h2{font-size:20px!important}
  .profile-head-card p{font-size:12px!important}
  .profile-fields{grid-template-columns:minmax(0,1fr)!important;gap:8px!important}
  .profile-links-row{display:grid!important;grid-template-columns:1fr!important}
  .profile-links-row .btn{width:100%!important}
  .profile-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .account-activity-list a{grid-template-columns:minmax(0,1fr) 16px!important;gap:8px!important}
  .account-activity-list time{grid-column:1/-1!important}
}

/* Footer should never create phantom width or an excessive blank end section. */
.footer{box-sizing:border-box;max-width:100%}
@media(max-width:620px){
  .footer{
    width:100%!important;
    margin-top:30px!important;
    padding:26px 16px 34px!important;
    gap:18px!important;
  }
  .footer>div:last-child{gap:12px 16px!important;font-size:12px!important}
}

/* v88 final mobile refinements from browser regression test. */
@media(max-width:560px){
  .content-hero h1{
    font-size:29px!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
    hyphens:none!important;
  }
  body.dashboard-v72-page .dashboard-stats{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
  }
  body.dashboard-v72-page .mini-stat{
    min-height:100px!important;
  }
}

/* v92 RU/EN switcher */
.lang-switch{display:flex;align-items:center;gap:6px;margin-left:auto;margin-right:2px;padding:5px 8px;border:1px solid rgba(255,255,255,.10);border-radius:999px;background:rgba(8,12,25,.48);font-size:11px;font-weight:800;letter-spacing:.08em;line-height:1}.lang-switch a{color:rgba(255,255,255,.48);text-decoration:none;transition:.18s ease}.lang-switch a:hover,.lang-switch a.active{color:#fff;text-shadow:0 0 12px rgba(88,218,255,.55)}.lang-switch span{color:rgba(255,255,255,.18)}
@media(max-width:760px){.lang-switch{order:2;margin-left:0;margin-right:0;padding:5px 7px}.internal-topbar-v71 .top-actions{order:3}.internal-topbar-v71{gap:8px}}
