/* 明暗主题：保留品牌图片原色，使用独立背景与文字色阶。 */
html { color-scheme: light; }
.theme-toggle {
  display: grid; place-items: center; flex: 0 0 44px;
  width: 44px; height: 44px; padding: 10px;
  border: 1px solid var(--line); border-radius: 7px;
  background: #fff; color: #49556b;
  transition: background .18s, border-color .18s, color .18s;
}
.theme-toggle:hover { background: #edf3ff; border-color: #a9bff0; color: var(--blue); }
.theme-toggle svg { width: 21px; height: 21px; grid-area: 1 / 1; }
.theme-toggle .theme-icon-sun { display: none; }
.header-inner { gap: 20px; }
.header-contact { margin-left: 0; }

html[data-theme="dark"] {
  color-scheme: dark;
  --blue: #7ca7ff;
  --blue-dark: #a2bfff;
  --ink: #edf3fc;
  --muted: #a7b4ca;
  --line: #2b3b54;
  --pale: #101b2d;
  --white: #0b1220;
  --theme-surface: #142238;
  --theme-surface-raised: #1a2b45;
  --theme-soft: #192e4e;
  --theme-brand: #245cf4;
}
html[data-theme="dark"] ::selection { background: #345890; color: #fff; }
html[data-theme="dark"] .site-header { background: #0b1220ed; }
html[data-theme="dark"] .nav a { color: #bbc8dd; }
html[data-theme="dark"] .nav a:hover,
html[data-theme="dark"] .nav a[aria-current="location"] { color: var(--blue); }
html[data-theme="dark"] .theme-toggle,
html[data-theme="dark"] .menu-toggle { background: var(--theme-surface); color: var(--ink); }
html[data-theme="dark"] .theme-toggle:hover,
html[data-theme="dark"] .menu-toggle:hover { background: var(--theme-soft); border-color: #5777a8; }
html[data-theme="dark"] .theme-toggle .theme-icon-moon { display: none; }
html[data-theme="dark"] .theme-toggle .theme-icon-sun { display: block; }
/* 深色背景使用透明底品牌字标，左侧蜜蜂保留原版蓝黄色。 */
.brand-wordmark-dark { display: none; overflow: hidden; pointer-events: none; }
html[data-theme="dark"] .brand-wordmark-dark { display: block; filter: brightness(0) invert(1); opacity: .94; }
html[data-theme="dark"] .btn,
html[data-theme="dark"] .recommend,
html[data-theme="dark"] .skip-link { background: var(--theme-brand); border-color: var(--theme-brand); color: #fff; }
html[data-theme="dark"] .btn:hover { background: #356bff; border-color: #356bff; }
html[data-theme="dark"] .btn-outline { background: var(--theme-surface); color: #a8c5ff; border-color: #536e99; }
html[data-theme="dark"] .btn-outline:hover { background: var(--theme-soft); color: #d6e4ff; border-color: var(--blue); }
html[data-theme="dark"] .hero { background: linear-gradient(130deg, #0b1220 30%, #132846 100%); }
html[data-theme="dark"] :is(.hero-desc, .hero-services, .platforms, .platforms .icon, .version-features li, .stat span, .cta-box p, .product-stage-label) { color: var(--muted); }
html[data-theme="dark"] .hero-mascot-caption { color: #c3d7ff; }
html[data-theme="dark"] .hero-mascot-caption > span { color: #a9bfdf; }
html[data-theme="dark"] :is(.industry-card, .strength-card, .version-card, .arch-row, .client-card, .about-visual, .comparison-table-wrap) {
  background: var(--theme-surface); border-color: var(--line);
}
html[data-theme="dark"] .version-card.featured { border-color: #4c6797; }
html[data-theme="dark"] :is(.strength-heading .index-label, .tech-tag) { background: var(--theme-soft); color: #a8c5ff; }
html[data-theme="dark"] .cta-box { background: var(--theme-soft); border-color: #304d77; }
html[data-theme="dark"] .site-footer { background: var(--white); color: var(--muted); }
html[data-theme="dark"] .contact-dialog { background: var(--theme-surface); box-shadow: 0 25px 90px #0008; }
html[data-theme="dark"] .contact-dialog::backdrop { background: #020713b3; }
html[data-theme="dark"] .contact-row { background: var(--pale); }
html[data-theme="dark"] .dialog-close { background: var(--theme-surface-raised); color: var(--ink); }
html[data-theme="dark"] .copy-btn { background: var(--theme-soft); border-color: #405c88; color: #b2ccff; }
html[data-theme="dark"] .copy-btn:hover { background: #25416a; }

/* 费用卡片与对比表：保持两档报价的层级和蓝色重点。 */
html[data-theme="dark"] #compare :is(.comparison-count, .comparison-cost-index) { background: var(--theme-soft); border-color: var(--line); }
html[data-theme="dark"] #compare :is(.comparison-cost-focus, .comparison-cost-layout) { background: var(--pale); border-color: var(--line); }
html[data-theme="dark"] #compare .comparison-cost-focus { border-top-color: var(--blue); }
html[data-theme="dark"] #compare :is(.cloud-billing-dimensions dl > div, .push-cost-highlight) { border-color: var(--line); }
html[data-theme="dark"] #compare .cloud-billing-dimensions dt { color: #d2dff2; }
html[data-theme="dark"] #compare .cloud-cost-example { background: var(--theme-surface); border-color: var(--line); }
html[data-theme="dark"] #compare .cost-example-high { background: var(--theme-soft); border-color: #47699d; }
html[data-theme="dark"] #compare .cloud-cost-example h4 strong { color: #a8c5ff; }
html[data-theme="dark"] #compare :is(.cost-example-equation, .cost-example-scope, .cost-example-note, .private-cost-advantage p) { color: var(--muted); }
html[data-theme="dark"] #compare .cost-example-periods strong,
html[data-theme="dark"] #compare .push-cost-amount strong { color: #efb185; }
html[data-theme="dark"] #compare .push-cost-copy > span { color: #e5b68c; }
html[data-theme="dark"] #compare .push-cost-amount { background: #2a2422; border-color: #5b4639; }
html[data-theme="dark"] #compare .push-cost-amount > span { color: #d1b298; }
html[data-theme="dark"] #compare :is(.private-cost-advantage, .push-cost-free) { background: var(--theme-soft); border-color: #35547e; }
html[data-theme="dark"] #compare .push-cost-free strong { color: #a8c5ff; }
html[data-theme="dark"] #compare .push-cost-free > span { color: #b2c6e5; }
html[data-theme="dark"] #compare .comparison-detailed-table thead th { background: var(--theme-surface); }
html[data-theme="dark"] #compare .comparison-detailed-table thead th:nth-child(2) { background: var(--theme-soft); color: #a8c5ff; }
html[data-theme="dark"] #compare .comparison-detailed-table .comparison-group th { background: #1c2b41; color: #d4e0f2; }
html[data-theme="dark"] #compare .comparison-detail-row th { background: var(--theme-surface); color: #c8d5e8; }
html[data-theme="dark"] #compare .comparison-detail-row td:nth-child(2) { background: #142a48; }
html[data-theme="dark"] #compare .comparison-detail-row strong { color: #d4e0f2; }
html[data-theme="dark"] #compare .comparison-detail-row td:nth-child(2) strong { color: #a8c5ff; }

/* 原生绘制的产品示意界面同步主题，图片素材不作反色处理。 */
html[data-theme="dark"] :is(.ui-desktop, .ui-phone, .native-preview) { background: #18263c; color: #dbe6f7; border-color: #425879; box-shadow: 0 16px 40px #0003; }
html[data-theme="dark"] .ui-window-bar { background: #23334c; color: #afbed5; border-color: #34445e; }
html[data-theme="dark"] .ui-rail { background: #0e1829; }
html[data-theme="dark"] .ui-conversations { background: #142137; border-color: #30415b; }
html[data-theme="dark"] .ui-chat { background: #19283f; }
html[data-theme="dark"] :is(.ui-search, .ui-phone-search, .mini-search) { background: #243550; color: #a8b9d3; }
html[data-theme="dark"] .ui-conversation.is-selected { background: #284266; }
html[data-theme="dark"] :is(.ui-chat-title, .ui-compose, .ui-tabbar, .mini-bottom-icons, .mini-composer, .feature-demo-tabs, .flagship-feed-row, .feature-demo-assurance) { border-color: #30415b; }
html[data-theme="dark"] :is(.ui-file-message, .ui-compose) { background: #17243a; border-color: #30415b; }
html[data-theme="dark"] .ui-message p,
html[data-theme="dark"] .mini-message > span { background: #2a3a53; color: #d6e1f2; }
html[data-theme="dark"] .outgoing p,
html[data-theme="dark"] .mini-message.mine > span { background: #274776; color: #d9e7ff; }
html[data-theme="dark"] :is(.ui-compose .ui-send-label, .circle-demo-publish, .matching-demo-actions > .primary, .flagship-chat-row > i) { background: var(--theme-brand); color: #fff; }
html[data-theme="dark"] :is(.ui-conversation div > span, .ui-conversation time, .ui-chat-title div > span, .ui-sender, .ui-time, .ui-file-message span, .ui-compose > span, .ui-phone-status > span, .mini-subtitle, .mini-profile div > span, .mini-post, .mini-order div > span, .voice-person small, .flagship-chat-row div > span, .flagship-feed-row div > span, .circle-demo-row div > span, .matching-demo-safety) { color: #a4b3ca; }
html[data-theme="dark"] :is(.mini-attachment, .mini-order, .matching-demo-profile) { border-color: #344862; }
html[data-theme="dark"] :is(.mini-ticket, .flagship-membership, .circle-demo-topic, .matching-demo-profile) { background: #213553; border-color: #354f75; }
html[data-theme="dark"] :is(.flagship-membership > div, .circle-demo-topic > strong) { color: #b1cbf8; }
html[data-theme="dark"] :is(.flagship-membership > span, .circle-demo-mark, .circle-demo-mark.second, .circle-demo-row > i, .matching-demo-profile p > span, .matching-demo-privacy > span, .matching-demo-actions > span) { background: #294369; border-color: #405d86; color: #b9cff3; }
html[data-theme="dark"] :is(.flagship-membership small, .circle-demo-topic > span, .circle-demo-topic small, .mini-bottom-icons > span, .feature-demo-assurance) { color: #a7b9d5; }
html[data-theme="dark"] .matching-demo-actions > .primary { background: var(--theme-brand); color: #fff; }
html[data-theme="dark"] .ui-compose .ui-send-label { color: #fff; }
html[data-theme="dark"] .dating-photo > div { background: #15243de8; }
html[data-theme="dark"] .dating-actions > span { background: var(--theme-soft); color: #a8c5ff; }

@media (max-width: 960px) {
  .header-inner { gap: 12px; }
  .theme-toggle { margin-left: auto; }
  .menu-toggle { margin-left: 0; }
  html[data-theme="dark"] .nav { background: #101b2df5; box-shadow: 0 15px 25px #0003; }
}
@media (prefers-reduced-motion: reduce) {
  .theme-toggle { transition: none; }
}
@media print { .theme-toggle { display: none; } }

/* 官网演示产品入口：桌面下拉、手机展开，沿用当前明暗主题。 */
.demo-products { position: relative; flex-shrink: 0; color: #49556b; }
.demo-products > summary {
  display: flex; align-items: center; gap: 6px; padding-block: 28px;
  list-style: none; cursor: pointer; white-space: nowrap; font-size: .875rem;
}
.demo-products > summary::-webkit-details-marker { display: none; }
.demo-products > summary::after {
  content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg);
}
.demo-products[open] > summary,
.demo-products > summary:hover { color: var(--blue); }
.demo-products[open] > summary::after { transform: translateY(2px) rotate(225deg); }
.demo-products-list {
  position: absolute; right: -14px; top: calc(100% - 8px); z-index: 2;
  width: 208px; padding: 8px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--white); box-shadow: 0 12px 32px #152a501f;
}
.demo-products:not([open]) > .demo-products-list { display: none; }
.nav .demo-products-list a {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  min-height: 46px; padding: 10px 14px; border-radius: 7px; font-weight: 500;
}
.demo-products-list a::after { content: "→"; color: var(--blue); }
.nav .demo-products-list a:hover,
.nav .demo-products-list a:focus-visible { background: var(--pale); color: var(--blue); }
html[data-theme="dark"] .demo-products { color: #bbc8dd; }
html[data-theme="dark"] .demo-products-list { background: var(--theme-surface); box-shadow: 0 12px 32px #0005; }
@media (min-width: 961px) and (max-width: 1200px) {
  .header-inner:has(.demo-products) { gap: 16px; }
  .nav:has(.demo-products) { gap: 12px; }
}
@media (max-width: 960px) {
  .nav:has(.demo-products) { max-height: calc(100vh - 72px); max-height: calc(100dvh - 72px); overflow-y: auto; overscroll-behavior: contain; }
  .demo-products { grid-column: 1 / -1; border-top: 1px solid var(--line); margin-top: 7px; }
  .demo-products > summary { justify-content: space-between; min-height: 48px; padding-block: 13px; }
  .demo-products-list { position: static; width: 100%; background: var(--pale); box-shadow: none; border: 0; border-radius: 8px; }
  html[data-theme="dark"] .demo-products-list { box-shadow: none; }
}
