html{scrollbar-gutter:stable}
.top .wrap{width:100%;min-height:72px}
.top .btn,.top .btn:hover{transform:none}
.top .btn{min-width:160px;min-height:44px;padding:12px 14px;white-space:nowrap;transition:background .15s,box-shadow .15s}
footer,.foot,.foot>div{min-width:0}
.foot a:not(.brand){overflow-wrap:anywhere}

@media (min-width:1241px){
  .top .wrap{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;column-gap:clamp(8px,1vw,18px);max-width:1540px;padding-inline:clamp(24px,3vw,48px)}
  .nav{min-width:0;justify-content:flex-end;gap:0;margin:0}
  [dir="rtl"] .nav{justify-content:flex-start}
  .nav .nb{padding-inline:clamp(4px,.5vw,8px);font-size:clamp(.9rem,.9vw,1rem)}
  .lang,.top .btn{margin:0;flex:none}
}

@media (max-width:1240px){
  .top .wrap{display:grid;grid-template-columns:minmax(0,1fr) auto auto 44px;column-gap:clamp(6px,1.5vw,12px)}
  .top .brand{justify-self:start;min-width:0}
  .lang{justify-self:end;margin:0}
  .top .btn{justify-self:end;margin:0}
  .mb{display:inline-flex;justify-self:end;margin:0}
  #nav{display:none}
  #nav.open{display:flex;flex-direction:column;align-items:stretch;gap:0;position:absolute;top:100%;left:0;right:0;height:calc(100vh - var(--hh,72px));height:calc(100dvh - var(--hh,72px));background:var(--bg);overflow-y:auto;overscroll-behavior:contain;padding:8px 20px 40px;margin:0;z-index:35;border-top:1px solid var(--line)}
  #nav .ni{border-bottom:1px solid var(--line)}
  #nav .nb{width:100%;justify-content:space-between;padding:18px 4px;font-size:1.05rem;border-radius:0;background:none!important}
  .ni.cur>.nb::after{display:none}
  #nav .np,#nav .np.wide{position:static;width:auto;min-width:0;box-shadow:none;border:0;border-radius:0;background:none;padding:0 0 12px 8px}
  #nav .np.wide .nl{grid-template-columns:1fr}
}

@media (max-width:560px){
  .top .wrap{grid-template-columns:minmax(0,1fr) auto 44px;grid-template-rows:auto auto;row-gap:8px;padding-block:8px}
  .top .btn{display:inline-flex;grid-column:1 / -1;grid-row:2;justify-self:stretch;width:100%;min-width:0;min-height:40px;padding:10px 12px;font-size:.9rem}
  .foot{grid-template-columns:minmax(0,1fr);gap:24px}
  .foot>div:first-child{grid-column:auto}
}

@media (max-width:400px){
  .top .wrap{column-gap:6px}
  .top .brand img{width:24px}
  .top .brand .mark{font-size:.64rem;letter-spacing:.02em}
  .lang{gap:0;padding:2px}
  .lang button{min-width:28px;padding:6px 5px;font-size:.7rem}
}
