/* Vectide Unified Site Chrome v4:
 * 0. Default Desktop Display Scale: 110% (zoom: 1.1 on desktop fine-pointer >= 761px)
 * 1. Unified Dark-Mode Canvas Sync (#0c0f15 Obsidian Dark across Homepage, CodingPlan, TokenPlan, Vectide Go, Team, Docs)
 * 2. Single-Row Flat Borderless Top Notice Strip (NO circular pill boxes, blended seamlessly with page background)
 * 3. Unified Deepened Top Navigation Header (identical centered capsule nav, original blue logo, 开发文档 & 控制台 → across all pages)
 */

@media screen and (min-width: 761px) and (hover: hover) and (pointer: fine) {
  html[data-vt-theme] {
    zoom: 1.1 !important;
  }
}

/* ===== 1. UNIFIED DARK-MODE & LIGHT-MODE PAGE BACKGROUND SYNC ===== */
html[data-vt-theme="dark"]:has(.vn-header),
html[data-vt-theme="dark"] body:has(.vn-header) {
  --vt-bg: #0c0f15 !important;
  --vt-surface: #151a23 !important;
  --vt-raised: #1c222e !important;
  --vt-hover: #232a38 !important;
  --vt-line: rgba(255, 255, 255, 0.085) !important;
  --vt-line-2: rgba(255, 255, 255, 0.16) !important;
  --vt-text: #eef1f6 !important;
  --vt-text-2: #c8cfdc !important;
  --vt-muted: #8b95a7 !important;
  --vt-faint: #6f7a8e !important;
  --vt-accent: #eef3fc !important;
  --vt-on-accent: #0c1018 !important;
  --bg: #0c0f15 !important;
  --surface: #151a23 !important;
  --surface-2: #1c222e !important;
  --raised: #1c222e !important;
  --hover: #232a38 !important;
  --border: rgba(255, 255, 255, 0.085) !important;
  --line: rgba(255, 255, 255, 0.085) !important;
  --text: #eef1f6 !important;
  --muted: #8b95a7 !important;
  --faint: #6f7a8e !important;
  --vn-nav: #151a23 !important;
  --vn-accent: #38bdf8 !important;
  --vn2-notice-bg: #0e121a;
  --vn2-header-bg: rgba(16, 21, 31, 0.72);
  --vn2-capsule-bg: rgba(24, 31, 45, 0.62);
  --vn2-capsule-hover: rgba(255, 255, 255, 0.085);
  --vn2-line: rgba(255, 255, 255, 0.075);
  --vn2-notice-line: rgba(255, 255, 255, 0.055);
  --vn2-text: #8b95a7;
  --vn2-text-2: #c8cfdc;
  --vn2-text-strong: #eef1f6;
  --vn2-accent: #38bdf8;
  --vn2-ink: #eef3fc;
  --vn2-on-ink: #0c1018;
}

html[data-vt-theme="light"]:has(.vn-header),
html[data-vt-theme="light"] body:has(.vn-header) {
  --vt-bg: #fafafa !important;
  --vt-surface: #ffffff !important;
  --vt-raised: #f4f6fa !important;
  --vt-hover: #eaeef5 !important;
  --vt-line: #e4e7ee !important;
  --vt-line-2: #cdd3df !important;
  --vt-text: #0b0e14 !important;
  --vt-text-2: #303642 !important;
  --vt-muted: #5d6676 !important;
  --vt-faint: #788294 !important;
  --vt-accent: #0b0e14 !important;
  --vt-on-accent: #ffffff !important;
  --bg: #fafafa !important;
  --surface: #ffffff !important;
  --surface-2: #f4f6fa !important;
  --raised: #f4f6fa !important;
  --hover: #eaeef5 !important;
  --border: #e4e7ee !important;
  --line: #e4e7ee !important;
  --text: #0b0e14 !important;
  --muted: #5d6676 !important;
  --faint: #788294 !important;
  --vn2-notice-bg: #f5f7fb;
  --vn2-header-bg: rgba(255, 255, 255, 0.76);
  --vn2-capsule-bg: rgba(241, 244, 249, 0.78);
  --vn2-capsule-hover: #e7ebf3;
  --vn2-line: #e4e7ee;
  --vn2-notice-line: #e8ebf2;
  --vn2-text: #566071;
  --vn2-text-2: #303642;
  --vn2-text-strong: #0b0e14;
  --vn2-accent: #1d4ed8;
  --vn2-ink: #0b0e14;
  --vn2-on-ink: #ffffff;
}

html[data-vt-theme="dark"]:has(.vn-header),
html[data-vt-theme="dark"] body:is(.vt-home, .cp-page, .tp-page, .vt-go-page, [data-vn-purchase-cards="team"]) {
  background: #0c0f15 !important;
  background-color: #0c0f15 !important;
  background-image: none !important;
}

html[data-vt-theme="dark"] body:is(.cp-page, .tp-page, .vt-go-page, [data-vn-purchase-cards="team"])::before {
  background: none !important;
  opacity: 0 !important;
}

html[data-vt-theme="light"]:has(.vn-header),
html[data-vt-theme="light"] body:is(.vt-home, .cp-page, .tp-page, .vt-go-page, [data-vn-purchase-cards="team"]) {
  background: #fafafa !important;
  background-color: #fafafa !important;
  background-image: none !important;
}

/* Keep Team & Go cards clean over unified Obsidian Dark canvas */
html[data-vt-theme="dark"] body[data-vn-purchase-cards="team"] :is(.team-card, .summary-card, .tier-card, .calc-box, .pricing-card, .vn-card),
html[data-vt-theme="dark"] body:is(.cp-page, .tp-page, .vt-go-page) :is(.vn-card, .tp-plan, .cp-model-card, .go-card, .go-tier-card) {
  background-color: #151a23;
}

/* ===== 2. UNIFIED SINGLE-ROW FLAT BORDERLESS TOP NOTICE STRIP (ZERO PILL BOXES) ===== */
html[data-vt-theme] body .vn-shell.vn-notice,
html[data-vt-theme] body .vn-shell.vn-notice.vn-top-updates,
html[data-vt-theme] body.vt-home .vn-shell.vn-notice.vn-top-updates {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: safe center !important;
  gap: 22px !important;
  width: 100% !important;
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
  padding: 0 24px !important;
  margin: 0 !important;
  background: var(--vn2-notice-bg) !important;
  border: 0 !important;
  border-bottom: 1px solid var(--vn2-notice-line) !important;
  color: var(--vn2-text) !important;
  font-family: "Geist", Inter, "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif !important;
  letter-spacing: 0 !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-width: none !important;
  white-space: nowrap !important;
}

html[data-vt-theme] body .vn-shell.vn-notice::-webkit-scrollbar {
  display: none !important;
}

/* Flatten inner promo container so ALL links (including HY4 announcement) live on ONE single row */
html[data-vt-theme] body .vn-shell.vn-notice.vn-top-updates .vn-promo-links {
  display: contents !important;
}

/* Remove decorative dots & pipe separators */
html[data-vt-theme] body .vn-shell.vn-notice i,
html[data-vt-theme] body .vn-shell.vn-notice > span {
  display: none !important;
}

/* ALL notice links: flat, clean, borderless, ZERO rounded capsule boxes */
html[data-vt-theme] body .vn-shell.vn-notice a,
html[data-vt-theme] body .vn-shell.vn-notice.vn-top-updates .vn-promo-links a,
html[data-vt-theme] body .vn-shell.vn-notice.vn-top-updates .vn-hy4-announcement {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  flex: 0 0 auto !important;
  height: 26px !important;
  padding: 0 2px !important;
  margin: 0 !important;
  border: 0 !important;
  border-left: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 12px !important;
  line-height: 1.4 !important;
  font-weight: 480 !important;
  color: var(--vn2-text) !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  transition: color 0.16s ease !important;
}

html[data-vt-theme] body .vn-shell.vn-notice a:hover,
html[data-vt-theme] body .vn-shell.vn-notice.vn-top-updates .vn-promo-links a:hover,
html[data-vt-theme] body .vn-shell.vn-notice.vn-top-updates .vn-hy4-announcement:hover {
  background: transparent !important;
  border: 0 !important;
  color: var(--vn2-text-strong) !important;
}

html[data-vt-theme] body .vn-shell.vn-notice a b,
html[data-vt-theme] body .vn-shell.vn-notice a strong,
html[data-vt-theme] body .vn-shell.vn-notice.vn-top-updates .vn-hy4-announcement strong {
  font-weight: 640 !important;
  color: var(--vn2-accent) !important;
}

html[data-vt-theme] body .vn-shell.vn-notice.vn-top-updates .vn-hy4-announcement::after {
  content: none !important;
  display: none !important;
}

/* ===== 3. UNIFIED DEEPENED TOP HEADER MENU (IDENTICAL ON HOMEPAGE, CODINGPLAN, TOKENPLAN, GO, TEAM) ===== */
html[data-vt-theme] body .vn-shell.vn-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 60 !important;
  width: 100% !important;
  background: var(--vn2-header-bg) !important;
  backdrop-filter: saturate(160%) blur(18px) !important;
  -webkit-backdrop-filter: saturate(160%) blur(18px) !important;
  border-bottom: 1px solid var(--vn2-line) !important;
  box-shadow: none !important;
  font-family: "Geist", Inter, "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif !important;
}

html[data-vt-theme] body .vn-shell.vn-header :is(.vn-brand img, .vt-site-brand img) {
  filter: none !important;
  opacity: 1 !important;
}

html[data-vt-theme] body .vn-shell.vn-header .vn-nav {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  height: 68px !important;
  min-height: 68px !important;
  padding: 0 28px !important;
  display: grid !important;
  grid-template-columns: 1fr auto 1fr !important;
  align-items: center !important;
  gap: 16px !important;
}

html[data-vt-theme] body .vn-shell.vn-header .vn-nav .vn-brand {
  display: inline-flex !important;
  align-items: center !important;
  width: 156px !important;
  height: 40px !important;
  flex: none !important;
  justify-self: start !important;
  margin: 0 !important;
}

html[data-vt-theme] body .vn-shell.vn-header .vn-nav .vn-brand img {
  width: 156px !important;
  height: 40px !important;
  object-fit: contain !important;
  object-position: left center !important;
  filter: none !important;
}

/* Deepened Centered Pill Capsule Nav */
html[data-vt-theme] body .vn-shell.vn-header .vn-links {
  justify-self: center !important;
  flex: none !important;
  height: auto !important;
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 4px !important;
  margin: 0 !important;
  border-radius: 999px !important;
  background: var(--vn2-capsule-bg) !important;
  border: 1px solid var(--vn2-line) !important;
}

html[data-vt-theme] body .vn-shell.vn-header .vn-links a {
  display: inline-flex !important;
  align-items: center !important;
  height: auto !important;
  padding: 7px 16px !important;
  border-radius: 999px !important;
  border: 0 !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  line-height: 1.3 !important;
  color: var(--vn2-text-2) !important;
  background: transparent !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  transition: background-color 0.18s ease, color 0.18s ease !important;
}

html[data-vt-theme] body .vn-shell.vn-header .vn-links a:hover,
html[data-vt-theme] body .vn-shell.vn-header .vn-links a[aria-current="page"],
html[data-vt-theme] body.cp-page .vn-shell.vn-header .vn-links a[href="/purchase.html"],
html[data-vt-theme] body.tp-page .vn-shell.vn-header .vn-links a[href="/tokenplan.html"],
html[data-vt-theme] body.vt-go-page .vn-shell.vn-header .vn-links a[href="/go/"],
html[data-vt-theme] body[data-vn-purchase-cards="team"] .vn-shell.vn-header .vn-links a[href="/team.html"] {
  background: var(--vn2-capsule-hover) !important;
  color: var(--vn2-text-strong) !important;
}

html[data-vt-theme] body .vn-shell.vn-header .vn-actions {
  justify-self: end !important;
  margin-left: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

html[data-vt-theme] body .vn-shell.vn-header .vn-actions .vn-doc-link {
  display: inline-flex !important;
  align-items: center !important;
  height: 34px !important;
  padding: 0 12px !important;
  border-radius: 999px !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  color: var(--vn2-text-2) !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  transition: background-color 0.16s ease, color 0.16s ease !important;
}

html[data-vt-theme] body .vn-shell.vn-header .vn-actions .vn-doc-link:hover {
  background: var(--vn2-capsule-hover) !important;
  color: var(--vn2-text-strong) !important;
}

html[data-vt-theme] body .vn-shell.vn-header .vn-actions > .vn-button.primary {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: safe center !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 18px !important;
  border-radius: 999px !important;
  border: 0 !important;
  background: var(--vn2-ink) !important;
  color: var(--vn2-on-ink) !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  box-shadow: none !important;
}

html[data-vt-theme] body .vn-shell.vn-header .vn-actions > .vn-button.primary:hover {
  opacity: 0.9 !important;
}

html[data-vt-theme] body .vn-shell.vn-header .vn-actions > .vn-icon {
  width: 34px !important;
  height: 34px !important;
  border-radius: 999px !important;
  color: var(--vn2-text-2) !important;
  background: transparent !important;
  border: 0 !important;
}

html[data-vt-theme] body .vn-shell.vn-header .vn-actions > .vn-icon:hover {
  background: var(--vn2-capsule-hover) !important;
  color: var(--vn2-text-strong) !important;
}

@media (max-width: 1120px) {
  html[data-vt-theme] body .vn-shell.vn-notice,
  html[data-vt-theme] body .vn-shell.vn-notice.vn-top-updates {
    justify-content: flex-start !important;
    gap: 18px !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 900px) {
  html[data-vt-theme] body .vn-shell.vn-header .vn-nav {
    grid-template-columns: auto 1fr auto !important;
    padding: 0 18px !important;
    height: 60px !important;
    min-height: 60px !important;
  }
  html[data-vt-theme] body .vn-shell.vn-header .vn-links,
  html[data-vt-theme] body .vn-shell.vn-header .vn-actions .vn-doc-link {
    display: none !important;
  }
  html[data-vt-theme] body .vn-shell.vn-header .vn-menu {
    display: inline-flex !important;
  }
}

@media (max-width: 640px) {
  html[data-vt-theme] body .vn-shell.vn-notice,
  html[data-vt-theme] body .vn-shell.vn-notice.vn-top-updates {
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    gap: 16px !important;
    padding: 0 14px !important;
  }
  html[data-vt-theme] body .vn-shell.vn-notice a,
  html[data-vt-theme] body .vn-shell.vn-notice.vn-top-updates .vn-promo-links a,
  html[data-vt-theme] body .vn-shell.vn-notice.vn-top-updates .vn-hy4-announcement {
    font-size: 11.5px !important;
  }
}
