:root {
  --site-chrome-navy: #0b2236;
  --site-chrome-blue: #1768f2;
  --site-chrome-muted: #60788e;
  --site-chrome-line: #e2e9f0;
  --site-chrome-orange: #e78535;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto minmax(420px, 1fr) auto;
  align-items: center;
  min-height: 64px;
  padding: 0 max(24px, calc((100% - 1440px) / 2));
  color: var(--site-chrome-navy);
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--site-chrome-line);
  box-sizing: border-box;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  backdrop-filter: blur(16px);
}

.site-header .brand {
  display: inline-flex;
  gap: 11px;
  align-items: center;
  color: var(--site-chrome-navy);
  text-decoration: none;
}

.site-header .brand-mark {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 9px 8px;
  background: linear-gradient(145deg, var(--site-chrome-navy), #1a4a6e);
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(11, 25, 41, .22);
  box-sizing: border-box;
}

.site-header .brand-mark i {
  display: block;
  width: 5px;
  background: #fff;
  border-radius: 1px;
  transform: skew(-14deg);
}

.site-header .brand-mark i:nth-child(1) { height: 10px; }
.site-header .brand-mark i:nth-child(2) { height: 18px; }
.site-header .brand-mark i:nth-child(3) { height: 13px; background: #5fcce8; }
.site-header .brand strong,
.site-header .brand small { display: block; }
.site-header .brand strong { font-size: 15px; font-weight: 750; letter-spacing: .01em; }
.site-header .brand small { margin-top: 1px; color: var(--site-chrome-muted); font-size: 9px; font-weight: 750; letter-spacing: .14em; }

.site-header .main-nav {
  display: flex;
  gap: 28px;
  align-self: stretch;
  justify-content: center;
  min-width: 0;
}

.site-header .main-nav a {
  position: relative;
  display: grid;
  min-height: 100%;
  place-items: center;
  padding: 0 2px;
  color: var(--site-chrome-muted);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  letter-spacing: .01em;
  white-space: nowrap;
}

.site-header .main-nav a:hover,
.site-header .main-nav a.active,
.site-header .main-nav a.is-active { color: var(--site-chrome-navy); }

.site-header .main-nav a.active::after,
.site-header .main-nav a.is-active::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  content: "";
  background: var(--site-chrome-orange);
}

.site-header .header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.site-header .access-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid;
  border-radius: 999px;
  box-sizing: border-box;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .03em;
  white-space: nowrap;
}

.site-header .access-guest { color: #7a4d0d; background: #fff8ed; border-color: #f0d499; }
.site-header .access-member { color: #174f8c; background: #edf5ff; border-color: #a8c9ee; }
.site-header .access-licensed { color: #076048; background: #edfaf5; border-color: #9fe0c8; }

.site-header .header-cta,
.site-header .dev-button {
  display: inline-flex;
  min-height: 34px;
  padding: 0 14px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  box-sizing: border-box;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.site-header .header-cta { color: #fff; background: var(--site-chrome-navy); border: 1px solid var(--site-chrome-navy); }
.site-header .header-cta:hover { color: #fff; background: var(--site-chrome-blue); border-color: var(--site-chrome-blue); }
.site-header .dev-button { color: #124f9d; background: #edf3ff; border: 1px dashed #a8c4f0; }
.site-header .language-picker select { min-height: 34px; border-radius: 6px; }

.site-footer {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 28px;
  align-items: center;
  min-height: 76px;
  padding: 18px max(24px, calc((100% - 1440px) / 2));
  color: #6f879b;
  background: #fff;
  border-top: 1px solid var(--site-chrome-line);
  box-sizing: border-box;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: 11px;
}

.site-footer .site-footer-brand {
  display: flex;
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.site-footer .site-footer-brand strong { flex: none; color: #38526a; font-size: 12px; font-weight: 750; }
.site-footer .site-footer-brand span { line-height: 1.55; }
.site-footer .footer-legal { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.site-footer .footer-legal a { color: #617a91; font-size: 10px; text-decoration: none; white-space: nowrap; }
.site-footer .footer-legal a:hover { color: #124f9d; }
.site-footer > small { color: #8497a8; font-size: 10px; letter-spacing: .06em; white-space: nowrap; }

@media (max-width: 1120px) {
  .site-header { grid-template-columns: auto auto; min-height: 62px; padding-top: 10px; }
  .site-header .main-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    min-height: 44px;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .site-header .main-nav::-webkit-scrollbar { display: none; }
  .site-header .header-actions { justify-self: end; }
  .site-footer { grid-template-columns: 1fr auto; }
  .site-footer .footer-legal { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; }
}

@media (max-width: 660px) {
  .site-header { padding: 8px 12px 0; }
  .site-header .brand small,
  .site-header .access-badge,
  .site-header .dev-button { display: none; }
  .site-header .brand strong { font-size: 13px; }
  .site-header .brand-mark { width: 34px; height: 34px; padding: 8px 7px; }
  .site-header .header-cta { min-height: 32px; padding: 0 10px; }
  .site-header .language-picker { display: none; }
  .site-header .main-nav { gap: 22px; }
  .site-header .main-nav a { font-size: 12px; }
  .site-footer { grid-template-columns: 1fr; gap: 14px; padding: 22px 16px; }
  .site-footer .site-footer-brand { display: grid; gap: 5px; }
  .site-footer .footer-legal { grid-column: auto; grid-row: auto; gap: 10px 14px; }
  .site-footer > small { justify-self: start; }
}
