/* HG Edu v17.4.5 - Back navigation and per-function new-tab controls. */
#hgRouteActions{
  display:flex;
  align-items:center;
  gap:7px;
  margin-left:4px;
  flex:0 0 auto;
  position:relative;
  z-index:35;
}
.hgRouteBtn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-height:34px;
  padding:7px 10px;
  border:1px solid var(--line,#334155);
  border-radius:9px;
  background:#152238;
  color:#e5e7eb;
  font:inherit;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
  white-space:nowrap;
}
.hgRouteBtn:hover{background:#1e304b;color:#fff}
.hgRouteBtn:focus-visible{outline:2px solid #facc15;outline-offset:2px}
.hgRouteBtn[disabled]{opacity:.4;cursor:not-allowed}
.hgRouteBtnIcon{font-size:16px;line-height:1}
body.hgRouteNavigating main{pointer-events:none}

/* Small ↗ control inside every sidebar function button. */
.wrap>nav button[data-page]{position:relative;padding-right:42px!important}
.wrap>nav button[data-page]>.hgNavNewTab{
  position:absolute;
  right:7px;
  top:50%;
  transform:translateY(-50%);
  width:27px;
  height:27px;
  display:grid;
  place-items:center;
  border:1px solid rgba(148,163,184,.24);
  border-radius:7px;
  background:rgba(8,17,31,.52);
  color:#94a3b8;
  font-size:16px;
  line-height:1;
  cursor:pointer;
  touch-action:manipulation;
  user-select:none;
  -webkit-user-select:none;
}
.wrap>nav button[data-page]>.hgNavNewTab:hover,
.wrap>nav button[data-page]>.hgNavNewTab:focus-visible{
  color:#fff;
  background:#263854;
  border-color:#64748b;
  outline:none;
}
.wrap>nav button[data-page].active>.hgNavNewTab{
  color:#facc15;
  border-color:rgba(250,204,21,.34);
}

#hgRoutePath{
  position:fixed;
  right:12px;
  bottom:12px;
  z-index:2;
  max-width:min(420px,calc(100vw - 24px));
  padding:5px 8px;
  border:1px solid rgba(148,163,184,.25);
  border-radius:7px;
  background:rgba(8,17,31,.84);
  color:#94a3b8;
  font-size:10px;
  line-height:1.2;
  opacity:0;
  pointer-events:none;
  transform:translateY(5px);
  transition:opacity .15s ease,transform .15s ease;
}
#hgRoutePath.show{opacity:1;transform:none}

@media(max-width:900px){
  header{gap:7px!important}
  #hgRouteActions{gap:5px;margin-left:0}
  .hgRouteBtn{
    width:33px;
    min-width:33px;
    height:33px;
    min-height:33px;
    padding:0;
    border-radius:8px;
  }
  .hgRouteBtnText{display:none}
  .headTitle{min-width:0;flex:1}
  .headTitle h1{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .headActions{margin-left:0!important;gap:5px!important}
  .headActions #topStatus{display:none}
  #hgRoutePath{bottom:54px}
  .wrap>nav button[data-page]{padding-right:45px!important}
  .wrap>nav button[data-page]>.hgNavNewTab{right:7px;width:30px;height:30px;font-size:17px}
}

@media(max-width:420px){
  .mobileLogo{display:none!important}
  .menuToggle{padding:6px 8px!important}
  #hgRouteActions{gap:4px}
  .hgRouteBtn{width:31px;min-width:31px;height:31px;min-height:31px}
}
