.official-header {
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  background: #fff;
  border-bottom: 1px solid #e5eaf1;
  color: #64748b;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  letter-spacing: 0;
}

.official-header *, .official-menu-layer * { box-sizing: border-box; letter-spacing: 0; }
.official-header-inner {
  width: min(1200px, calc(100% - 48px));
  min-height: 71px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(200px, 1fr) auto minmax(200px, 1fr);
  align-items: center;
  gap: 32px;
}
.official-brand {
  display: inline-flex;
  justify-self: start;
  align-items: center;
  gap: 9px;
  color: #17315c;
  text-decoration: none;
  white-space: nowrap;
}
.official-brand img { width: 34px; height: 34px; border-radius: 6px; flex-shrink: 0; }
.official-brand-text { display: grid; line-height: 1.35; font-size: 14px; }
.official-brand-text strong { font-weight: 700; }
.official-brand-text small { font-size: 12px; }
.official-primary-nav { display: flex; align-items: center; gap: 4px; }
.official-nav-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease;
}
.official-nav-item:hover { color: #2563eb; background: #f4f8ff; border-color: #dbeafe; }
.official-nav-item.active { color: #1d4ed8; background: #eff6ff; border-color: #93b4f4; font-weight: 600; }
.official-header-actions { display: flex; align-items: center; justify-self: end; gap: 10px; }
.official-submit-resume {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid #ef9a57;
  border-radius: 8px;
  color: #b84d17;
  background: #fff5eb;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
  white-space: nowrap;
  cursor: pointer;
}
.official-submit-resume:hover { color: #933711; background: #ffead8; border-color: #dc7b34; }
.official-menu-trigger { display: none; }
.official-header a:focus-visible, .official-header button:focus-visible,
.official-menu-layer a:focus-visible, .official-menu-layer button:focus-visible,
.official-board-cities a:focus-visible { outline: 3px solid #93b4f4; outline-offset: 3px; }
.official-menu-layer[hidden] { display: none; }
.official-menu-layer { position: fixed; inset: 0; z-index: 90; font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; }
.official-menu-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #0f172a66; cursor: pointer; }
.official-menu-drawer {
  position: absolute;
  inset: 0 0 0 auto;
  width: min(360px, calc(100% - 32px));
  height: 100%;
  padding: max(20px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fff;
  box-shadow: -12px 0 40px #0f172a1f;
}
.official-menu-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 20px; border-bottom: 1px solid #e5eaf1; }
.official-menu-title { color: #17315c; font-size: 18px; font-weight: 700; }
.official-menu-close { width: 40px; height: 40px; flex-shrink: 0; border: 0; border-radius: 6px; color: #64748b; background: #f1f5f9; font: inherit; font-size: 28px; line-height: 1; cursor: pointer; }
.official-menu-links { display: grid; gap: 8px; padding-top: 20px; }
.official-menu-links .official-nav-item { justify-content: flex-start; min-height: 46px; padding: 10px 14px; font-size: 15px; }
body.official-menu-open { overflow: hidden; }
.official-board-cities { display: flex; gap: 8px; width: min(1280px, 100%); padding: 18px 20px 4px; margin: 0 auto; }
.official-board-cities a { padding: 7px 16px; border: 1px solid #dbe3ef; border-radius: 6px; color: #64748b; background: #fff; font-size: 14px; text-decoration: none; }
.official-board-cities a.active { color: #1d4ed8; border-color: #93b4f4; background: #eff6ff; }
.official-board-app .demand-board-page { --board-sticky-top: 72px; }
.official-header ~ .cs-shell > .cs-header { display: none; }
.official-header ~ .app .resume-topbar .resume-brand { display: none; }
.official-header ~ .app .resume-topbar { justify-content: flex-end; }
.official-header ~ .app .resume-result-card { top: 90px; }

@media (max-width: 1279px) {
  .official-header-inner { min-height: 63px; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
  .official-primary-nav { display: none; }
  .official-menu-trigger { display: inline-flex; align-items: center; justify-content: center; flex-direction: column; gap: 4px; width: 36px; height: 36px; padding: 8px; flex-shrink: 0; border: 1px solid #dbe3ef; border-radius: 6px; background: #fff; cursor: pointer; }
  .official-menu-trigger span { display: block; width: 18px; height: 2px; background: #64748b; }
  .official-board-app .demand-board-page { --board-sticky-top: 64px; }
}
@media (max-width: 768px) {
  .official-header-inner { width: min(calc(100% - 32px), 620px); }
}
@media (max-width: 600px) {
  .official-header-inner { gap: 6px; }
  .official-brand { gap: 6px; }
  .official-brand img { width: 28px; height: 28px; }
  .official-brand-text { font-size: 12px; }
  .official-brand-text small { display: none; }
  .official-header-actions { gap: 6px; }
  .official-submit-resume { min-height: 36px; padding: 0 10px; font-size: 13px; }
  .official-header-actions .subscription-trigger { padding-inline: 10px; }
  .official-board-cities { padding: 12px 12px 4px; }
}
@media (max-width: 360px) {
  .official-header-inner { width: calc(100% - 24px); }
}
@media (max-width: 640px) {
  body:has(.official-home-header) { min-width: 0; }
  .official-home-header .subscription-trigger {
    width: 64px;
    min-width: 64px;
    height: 36px;
    min-height: 36px;
    padding: 0;
    border: 1px solid #9bb9e5;
    border-radius: 8px;
    color: #1f52a0;
    background: #f3f7ff;
    font-size: 12px;
    font-weight: 750;
    line-height: 1;
    box-shadow: none;
  }
  .official-home-header .subscription-trigger:hover { color: #1f52a0; background: #f3f7ff; box-shadow: none; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .official-nav-item { transition: none; } }

@media (max-width: 640px) {
  .official-menu-drawer {
    width: min(70vw, 260px);
    padding-left: 16px;
    padding-right: 16px;
  }
  .official-menu-links { gap: 4px; }
  .official-menu-links .official-nav-item {
    min-height: 42px;
    padding: 8px 12px;
    line-height: 24px;
  }
}
