/* 全主题页头：语言选择合并到导航内，弹层遵循文字方向，不以国旗代表语言。 */
.site-header { position: relative; gap: 24px; }
.site-header .site-brand { min-width: 0; max-width: 300px; overflow-wrap: anywhere; }
.brand-dot { flex: 0 0 8px; }
.site-header .desktop-navigation { margin-inline-start: auto; gap: 20px; }
.site-header .desktop-navigation { position: relative; }
.header-tools { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.language-picker { position: relative; --language-accent: var(--accent, #244d42); }
.theme-consulting .language-picker { --language-accent: var(--mt-oxblood); }
.theme-polaris .language-picker { --language-accent: var(--pol-blue); }
.theme-ecopack .language-picker { --language-accent: var(--eco-green); }

/* 语言触发器：圆形图标、完整语言名和箭头组合成轻量胶囊，不展示技术语言代码。 */
.language-picker > summary { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 5px 11px 5px 5px; border: 1px solid color-mix(in srgb, currentColor 20%, transparent); border-radius: 999px; background: color-mix(in srgb, currentColor 5%, transparent); box-shadow: 0 1px 0 rgba(16, 35, 26, .04); font-size: 13px; line-height: 1; cursor: pointer; list-style: none; user-select: none; transition: transform .2s, background .2s, border-color .2s, box-shadow .2s; }
.mobile-navigation > summary { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 9px 12px; border: 1px solid var(--rule); border-radius: 24px; font-size: 13px; cursor: pointer; list-style: none; background: transparent; transition: background .18s, border-color .18s; }
.language-picker summary::-webkit-details-marker, .mobile-navigation summary::-webkit-details-marker { display: none; }
.language-picker > summary:hover, .language-picker[open] > summary { transform: translateY(-1px); background: color-mix(in srgb, currentColor 10%, transparent); border-color: color-mix(in srgb, currentColor 42%, transparent); box-shadow: 0 8px 24px rgba(16, 35, 26, .1); }
.language-trigger-icon { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border: 1px solid color-mix(in srgb, currentColor 16%, transparent); border-radius: 50%; background: color-mix(in srgb, currentColor 9%, transparent); }
.language-trigger-icon svg, .mobile-navigation svg { width: 18px; height: 18px; flex-shrink: 0; }
.language-current { max-width: 130px; overflow: hidden; color: inherit; font-weight: 650; letter-spacing: .01em; text-overflow: ellipsis; white-space: nowrap; }
.language-picker .disclosure-chevron { width: 14px; height: 14px; flex: 0 0 14px; opacity: .58; transition: transform .2s; }
.language-picker[open] .disclosure-chevron { transform: rotate(180deg); }

/* 语言面板：标题与选项分层，当前项用主题强调色和圆形勾选标识。 */
.site-header .language-options { position: absolute; z-index: 50; inset-inline-end: 0; top: calc(100% + 12px); width: max-content; min-width: 184px; max-width: min(236px, calc(100vw - 28px)); max-height: min(420px, 65dvh); overflow-y: auto; display: flex; flex-direction: column; align-items: stretch; gap: 3px; padding: 8px; border: 1px solid rgba(25, 43, 35, .1); border-radius: 18px; background: rgba(255, 255, 255, .98); color: #192b23; box-shadow: 0 24px 70px rgba(18, 38, 29, .18), 0 4px 16px rgba(18, 38, 29, .06); transform-origin: top right; animation: language-panel-in .2s ease both; backdrop-filter: blur(18px); }
.language-options-heading { display: flex; align-items: center; gap: 8px; margin: 0 4px 5px; padding: 9px 7px 12px; border-bottom: 1px solid #e9eeeb; color: #738078; font-size: 11px; font-weight: 650; letter-spacing: .06em; }
.language-options-heading svg { width: 17px; height: 17px; flex: 0 0 17px; color: var(--language-accent); }
.site-header .language-options a { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 10px 11px 10px 13px; border-radius: 11px; color: #26372f; font-size: 14px; font-weight: 550; overflow-wrap: anywhere; transition: color .18s, background .18s, transform .18s; }
.site-header .language-options a:hover { background: #f3f6f4; color: var(--language-accent); text-decoration: none; transform: translateX(2px); }
.site-header .language-options a[aria-current] { background: color-mix(in srgb, var(--language-accent) 10%, #fff); color: var(--language-accent); font-weight: 700; text-decoration: none; }
.language-option-name { min-width: 0; overflow-wrap: anywhere; }
.language-option-check { display: grid; width: 23px; height: 23px; margin-inline-start: auto; flex: 0 0 23px; place-items: center; border-radius: 50%; background: var(--language-accent); color: #fff; box-shadow: 0 5px 13px color-mix(in srgb, var(--language-accent) 25%, transparent); }
.language-option-check svg { width: 13px; height: 13px; }
@keyframes language-panel-in { from { opacity: 0; transform: translateY(-7px) scale(.97); } to { opacity: 1; transform: none; } }
[dir="rtl"] .site-header .language-options { transform-origin: top left; }
[dir="rtl"] .site-header .language-options a:hover { transform: translateX(-2px); }
.mobile-navigation { display: none; }
summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }

/* 产品导航：桌面悬停或键盘聚焦展开二、三级栏目，面板与触发项无空隙。 */
.product-nav-chevron { display: inline-flex; align-items: center; justify-content: center; width: 13px; height: 13px; margin-inline-start: 6px; opacity: .58; vertical-align: middle; transition: color .2s, opacity .2s; }
.product-nav-chevron svg { display: block; width: 13px; height: 13px; }
.desktop-navigation > [data-product-menu-trigger][aria-expanded="true"] .product-nav-chevron,
.desktop-navigation > [data-product-menu-trigger]:hover .product-nav-chevron { color: var(--product-nav-accent, currentColor); opacity: 1; }
.desktop-navigation > .product-nav-flyout { --product-nav-accent: var(--accent, #244d42); position: absolute; z-index: 70; inset-inline-end: 0; top: 100%; width: min(780px, calc(100vw - 40px)); padding: 0 26px 25px; border: 1px solid rgba(25, 43, 35, .11); border-top: 3px solid var(--product-nav-accent); border-radius: 0 0 14px 14px; background: rgba(255, 255, 255, .99); color: #26372f; box-shadow: 0 24px 60px rgba(16, 39, 29, .18); opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(9px); transition: opacity .18s, visibility .18s, transform .18s; }
.desktop-navigation > [data-product-menu-trigger]:hover + .product-nav-flyout,
.desktop-navigation > [data-product-menu-trigger]:focus-visible + .product-nav-flyout,
.desktop-navigation > .product-nav-flyout:hover,
.desktop-navigation > .product-nav-flyout:focus-within,
.desktop-navigation > .product-nav-flyout[data-open] { opacity: 1; visibility: visible; pointer-events: auto; transform: none; }
.product-nav-flyout__top { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 60px; border-bottom: 1px solid #e7ece9; }
.product-nav-flyout__top > span { color: #7a8881; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.product-nav-flyout__top > a { color: var(--product-nav-accent); font-size: 12px; font-weight: 700; }
.product-nav-flyout__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 24px; padding-top: 22px; }
.product-nav-flyout section { min-width: 0; }
.product-nav-flyout__heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 9px; border-bottom: 1px solid #edf1ef; color: #172e26; font-size: 14px; font-weight: 700; }
.product-nav-flyout ul { display: grid; gap: 3px; margin: 9px 0 0; padding: 0; list-style: none; }
.product-nav-flyout li a { display: block; padding: 6px 0; color: #687970; font-size: 12px; line-height: 1.45; }
.product-nav-flyout a:hover,
.product-nav-flyout a[aria-current] { color: var(--product-nav-accent); text-decoration: none; }

/* 平板及手机：菜单改为折叠面板；44px 点击目标，无横向溢出，无脚本也能展开。 */
@media (max-width: 1100px) {
    .site-header { min-height: 80px; flex-wrap: nowrap; gap: 14px; padding-block: 16px; }
    .site-header .desktop-navigation { display: none; }
    .header-tools { margin-inline-start: auto; }
    .mobile-navigation { display: block; }
    .mobile-navigation summary { border-radius: 50%; width: 44px; height: 44px; padding: 10px; }
    .site-header .mobile-navigation-links { position: absolute; z-index: 40; top: calc(100% - 3px); inset-inline: 0; display: flex; flex-direction: column; align-items: stretch; gap: 0; max-height: 65dvh; overflow-y: auto; padding: 12px; background: var(--paper); border: 1px solid var(--rule); border-radius: 12px; box-shadow: 0 15px 25px #192b3012; }
    .mobile-navigation-links a { min-height: 48px; padding: 12px; border-radius: 6px; overflow-wrap: anywhere; }
    .mobile-navigation-links a:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
    /* 触控菜单直接列出产品二、三级，避免依赖设备不存在的悬停状态。 */
    .mobile-navigation-links > .product-nav-flyout { --product-nav-accent: var(--accent, #244d42); display: block; margin: -5px 8px 9px; padding: 4px 12px 13px; border-inline-start: 2px solid color-mix(in srgb, var(--product-nav-accent) 35%, transparent); }
    .mobile-navigation-links .product-nav-flyout__top { min-height: 38px; }
    .mobile-navigation-links .product-nav-flyout__top > span { display: none; }
    .mobile-navigation-links .product-nav-flyout__top > a { min-height: 38px; margin-inline-start: auto; padding: 8px 0; }
    .mobile-navigation-links .product-nav-flyout__grid { grid-template-columns: 1fr; gap: 11px; padding-top: 10px; }
    .mobile-navigation-links .product-nav-flyout__heading { min-height: 38px; padding: 7px 0; }
    .mobile-navigation-links .product-nav-flyout li a { min-height: 36px; padding: 7px 10px; font-size: 12px; }
}
@media (max-width: 480px) {
    .site-header .site-brand { max-width: min(190px, 42vw); font-size: 17px; line-height: 1.35; gap: 7px; }
    .language-picker > summary { width: 44px; height: 44px; min-height: 44px; padding: 4px; }
    .language-trigger-icon { width: 34px; height: 34px; flex-basis: 34px; }
    .language-current, .language-picker .disclosure-chevron { display: none; }
    .site-header .language-options { top: calc(100% + 9px); }
    .header-tools { gap: 6px; }
    .site-header { gap: 8px; }
}

/* 正文和表单的共同响应式约束，避免上传媒体、长链接或表格撑开页面。 */
main, .hero-grid > *, .contact-grid > *, .footer-grid > * { min-width: 0; }
img, video { max-width: 100%; }
.article-body table { display: block; max-width: 100%; overflow-x: auto; }
.article-body pre { max-width: 100%; overflow-x: auto; }
.site-brand, .front-cta, .hero-bottom, .footer-bottom { overflow-wrap: anywhere; }
@media (max-width: 720px) { .contact-form input, .contact-form textarea { font-size: 16px; } .hero-bottom { gap: 20px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
/* 内置 Logo 带旧字标而站名已自定义时，以真实站名替代图片，避免前台继续显示发行包品牌。 */
.site-brand.site-brand--text-only .site-logo { display: none !important; }
.site-brand.site-brand--text-only .site-brand__name { display: inline !important; }
