.global-header{
  position:sticky;
  top:0;
  z-index:60;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  width:min(1760px,calc(100% - 48px));
  margin:14px auto 24px;
  padding:14px 18px;
  background:rgba(255,255,255,.88);
  border:1px solid #e3e7e3;
  border-radius:8px;
  box-shadow:0 18px 50px rgba(20,40,28,.06);
  backdrop-filter:blur(14px);
}

.global-brand{
  display:inline-flex;
  align-items:center;
  gap:10px;
  flex:0 0 auto;
  min-width:176px;
  color:#16a34a;
  text-decoration:none;
}
.global-brand:hover{text-decoration:none}
.global-logo-icon{
  width:44px;
  height:28px;
  display:block;
  flex:0 0 auto;
}
.global-wordmark{
  color:#16a34a;
  font-size:16px;
  font-weight:760;
  line-height:1;
  letter-spacing:.15em;
}

.global-header-actions{
  display:flex;
  flex-wrap:nowrap;
  align-items:center;
  justify-content:flex-end;
  gap:8px 12px;
  min-width:0;
}
.global-nav{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:nowrap;
  gap:4px;
}
.global-nav a{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:7px 6px;
  color:#5d6661;
  font-size:12.5px;
  font-weight:760;
  line-height:1;
  text-decoration:none;
  white-space:nowrap;
}
.global-nav a:hover{
  color:#16201a;
  text-decoration:none;
}

.global-langbar{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:nowrap;
  gap:4px;
  padding-left:10px;
  border-left:1px solid #d9ded9;
}
.global-langbar a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:3px;
  min-height:30px;
  border:1px solid transparent;
  border-radius:6px;
  color:#1f2a24;
  font-size:11px;
  font-weight:850;
  line-height:1;
  padding:4px 6px;
  text-decoration:none;
  white-space:nowrap;
}
.global-langbar a:hover,
.global-langbar a[aria-current="true"]{
  border-color:#dfe5df;
  background:#f3f5f2;
  box-shadow:0 2px 6px rgba(20,40,28,.04);
  text-decoration:none;
}
.global-flag{font-size:15px;line-height:1}

@supports ((mask:url("")) or (-webkit-mask:url(""))){
  .global-brand{
    gap:0;
    min-width:148px;
    width:148px;
    height:28px;
  }
  .global-logo-icon{
    width:148px;
    height:28px;
    background:#16a34a;
    -webkit-mask:url("/img/factlogo_w.png?v=20260524-evidence1") center / contain no-repeat;
    mask:url("/img/factlogo_w.png?v=20260524-evidence1") center / contain no-repeat;
  }
  .global-logo-icon > *{display:none}
  .global-wordmark{
    position:absolute;
    width:1px;
    height:1px;
    overflow:hidden;
    clip:rect(0 0 0 0);
    white-space:nowrap;
  }
}

@media (max-width:1100px){
  .global-header{
    align-items:flex-start;
    flex-direction:column;
    width:min(100% - 28px,1760px);
    margin-bottom:22px;
    padding:16px;
  }
  .global-header-actions{
    width:100%;
    align-items:flex-start;
    flex-direction:column;
    flex-wrap:wrap;
    gap:10px;
  }
  .global-nav{justify-content:flex-start;flex-wrap:wrap;gap:6px 14px}
  .global-langbar{
    justify-content:flex-start;
    flex-wrap:wrap;
    padding-left:0;
    border-left:0;
  }
}

@media (max-width:560px){
  .global-header{width:calc(100% - 16px);margin-top:8px;margin-bottom:16px;padding:12px}
  .global-brand{min-width:0}
  .global-logo-icon{width:46px;height:28px}
  .global-wordmark{font-size:17px;letter-spacing:.13em}
  .global-nav{width:100%;gap:8px 22px;line-height:1.25}
  .global-nav a{font-size:13px;min-height:0;padding:2px 0}
  .global-langbar{width:100%;gap:6px}
  .global-langbar a{min-height:28px;padding:4px 6px;font-size:11px}
  @supports ((mask:url("")) or (-webkit-mask:url(""))){
    .global-brand{min-width:min(196px,68vw);width:min(196px,68vw);height:34px}
    .global-logo-icon{width:min(196px,68vw);height:34px;-webkit-mask-position:left center;mask-position:left center}
  }
}

/* Mobile global header: real mobile controls, not shrunken desktop */
@media (max-width: 760px) {
  .global-header {
    position: sticky;
    top: 8px;
    width: calc(100% - 16px);
    margin: 8px auto 16px;
    padding: 14px;
    gap: 12px;
  }

  .global-header-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    gap: 12px;
  }

  .global-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
  }

  .global-nav a {
    justify-content: center;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid #e3e7e3;
    border-radius: 7px;
    background: rgba(255, 255, 255, .72);
    font-size: 13px;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
  }

  .global-langbar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
    padding-left: 0;
    border-left: 0;
  }

  .global-langbar a {
    min-height: 36px;
    padding: 6px 8px;
    background: #fff;
    font-size: 12px;
  }

  @supports ((mask:url("")) or (-webkit-mask:url(""))) {
    .global-brand {
      min-width: min(210px, 70vw);
      width: min(210px, 70vw);
      height: 36px;
    }

    .global-logo-icon {
      width: min(210px, 70vw);
      height: 36px;
      -webkit-mask-position: left center;
      mask-position: left center;
    }
  }
}

@media (max-width: 380px) {
  .global-nav a {
    min-height: 36px;
    padding: 8px 6px;
    font-size: 12.5px;
  }

  .global-langbar {
    gap: 6px;
  }

  .global-langbar a {
    min-height: 34px;
    padding: 5px 6px;
    font-size: 11px;
  }
}

/* Mobile global header refinement: compact horizontal rails */
@media (max-width: 760px) {
  .global-header {
    padding: 12px;
    gap: 9px;
  }

  .global-header-actions {
    display: grid;
    gap: 8px;
  }

  .global-nav,
  .global-langbar {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .global-nav::-webkit-scrollbar,
  .global-langbar::-webkit-scrollbar {
    display: none;
  }

  .global-nav a {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 7px 10px;
    font-size: 13px;
    white-space: nowrap;
  }

  .global-langbar a {
    flex: 0 0 auto;
    min-height: 32px;
    padding: 5px 8px;
    font-size: 11.5px;
    white-space: nowrap;
  }

  @supports ((mask:url("")) or (-webkit-mask:url(""))) {
    .global-brand {
      min-width: min(190px, 66vw);
      width: min(190px, 66vw);
      height: 32px;
    }

    .global-logo-icon {
      width: min(190px, 66vw);
      height: 32px;
    }
  }
}

@media (max-width: 380px) {
  .global-header {
    padding: 11px;
  }

  .global-nav a {
    min-height: 32px;
    padding: 6px 9px;
    font-size: 12.5px;
  }

  .global-langbar a {
    min-height: 30px;
    padding: 5px 7px;
    font-size: 11px;
  }

  @supports ((mask:url("")) or (-webkit-mask:url(""))) {
    .global-brand {
      min-width: min(178px, 64vw);
      width: min(178px, 64vw);
      height: 30px;
    }

    .global-logo-icon {
      width: min(178px, 64vw);
      height: 30px;
    }
  }
}
