/* Keep the viewport edge blue if the browser retains native elastic scrolling. */
html { overscroll-behavior-y: none; background: #0088cc; }
body { overscroll-behavior-y: none; }

/* Matches articles_site/style.css header; keep article content styles separate. */
.site-header {
  --brand:#0088cc; --accent:#00afd7; --link:#007fae; --heading:#163e52;
  --line:#e2edf1; --wash:#f3f9fb; --width:1200px;
  font:17px/1.85 -apple-system,BlinkMacSystemFont,"PingFang TC","Microsoft JhengHei",sans-serif;
  -webkit-font-smoothing:antialiased;
}
.site-header a:hover { text-decoration:none; }
.site-header a:focus-visible,.site-header summary:focus-visible { outline:3px solid var(--accent); outline-offset:5px; }
.site-header { background: var(--brand); border-bottom: 4px solid #00a6d5; }
.header-inner {
  max-width: var(--width); margin: auto; padding: 22px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 32px; min-height: 108px;
}
.brand { display: block; flex: 0 1 380px; line-height: 0; }
.brand img { width: 100%; height: auto; max-width: 380px; }
.main-nav { display: flex; gap: 34px; align-items: center; flex-shrink: 0; }
.main-nav a {
  position: relative; padding: 11px 0; color: white; font-size: 17px;
  font-weight: 600; letter-spacing: .04em; white-space: nowrap;
}
.main-nav a::after {
  content: ''; position: absolute; bottom: 1px; left: 0; width: 100%; height: 2px;
  background: #fff; transform: scaleX(0); transition: transform .18s ease;
}
.main-nav .nav-current::after, .main-nav a:hover::after { transform: scaleX(1); }
.main-nav a:hover { color: #e2f9ff; }
.mobile-menu { display: none; }

@media (max-width: 1050px) {
  .main-nav { gap: 24px; } .main-nav a { font-size: 16px; } .brand { flex-basis: 330px; }
}
@media (max-width: 800px) {
  .header-inner { gap: 16px; padding: 16px 24px; min-height: 80px; }
  .brand { flex: 1 1 auto; width: auto; min-width: 0; max-width: 300px; }
  .main-nav { display: none; }
  .mobile-menu { display: block; position: relative; flex: 0 0 44px; }
  .mobile-menu summary {
    width: 44px; height: 44px; display: flex; align-items: center;
    justify-content: center; color: #fff; cursor: pointer; list-style: none;
    border: 1px solid #ffffff50; border-radius: 8px; background: #ffffff0d;
  }
  .mobile-menu summary::-webkit-details-marker { display: none; }
  .menu-icon, .menu-icon::before, .menu-icon::after {
    display: block; width: 18px; height: 2px; border-radius: 1px; background: currentColor;
  }
  .menu-icon { position: relative; }
  .menu-icon::before, .menu-icon::after { content: ''; position: absolute; left: 0; }
  .menu-icon::before { top: -5px; } .menu-icon::after { top: 5px; }
  .mobile-menu[open] .menu-icon { background: transparent; }
  .mobile-menu[open] .menu-icon::before { top: 0; transform: rotate(45deg); }
  .mobile-menu[open] .menu-icon::after { top: 0; transform: rotate(-45deg); }
  .mobile-menu nav {
    position: absolute; right: 0; top: calc(100% + 12px); z-index: 20;
    width: min(260px, calc(100vw - 48px)); padding: 8px; background: #fff;
    border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 28px #163e5229;
  }
  .mobile-menu nav a { display: block; padding: 12px 14px; border-radius: 6px; color: var(--heading); font-size: 16px; font-weight: 500; }
  .mobile-menu nav a:hover, .mobile-menu nav .nav-current { background: var(--wash); color: var(--link); }
}
@media (max-width: 520px) {
  .header-inner { padding-left: 22px; padding-right: 22px; }
}
