/* CrossDriver 站群共用的页头页脚：四个网站用同一份（主站 /assets/family/cdg.css，子站 --update-family 取副本）。
   L1 品牌栏、“产品”菜单、手机上的收起形态、子站滚动规则、统一页脚。
   不用外部字体，不引入其他样式表，不依赖脚本（菜单、语言列表都是 <details>，点击展开）。class 一律 cdg- 前缀。
   同目录的 cdg.js 是可选的增强：鼠标移到“产品”上就展开菜单；不加载它，菜单照旧点击展开。
   子站：本文件要在本站样式之后加载，或者把本站 .site-header 的 top 删掉（见设计文档 4.3 的“滚动”）。 */
:root { --cdg-bar: #0b1020; --cdg-bar-h: 60px; --cdg-foot: #141518; --cdg-blue: #3567ff; --cdg-max: 1200px; }
.cdg-wrap { width: 100%; max-width: var(--cdg-max); margin: 0 auto; padding: 0 24px; box-sizing: border-box; }

/* ------------------------------------------------ L1 品牌栏（高度固定，必须等于 --cdg-bar-h，滚动规则靠它） */
.cdg-bar { position: relative; height: var(--cdg-bar-h); background: var(--cdg-bar); color: #dbe3f5; font-size: 16px; font-weight: 600; line-height: 1.4; box-sizing: border-box; }
.cdg-bar .cdg-wrap { display: flex; align-items: center; gap: 6px; height: 100%; }
.cdg-bar a { color: inherit; text-decoration: none; }
.cdg-logo { display: flex; flex: none; align-items: center; margin-right: 26px; }
.cdg-logo img { display: block; width: auto; height: 30px; }
.cdg-nav { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; }
.cdg-nav > a, .cdg-nav summary { padding: 8px 14px; border-radius: 10px; white-space: nowrap; cursor: pointer; list-style: none; }
.cdg-nav summary::-webkit-details-marker { display: none; }
.cdg-nav summary::after { content: "▾"; margin-left: 5px; font-size: 12px; opacity: .6; }
.cdg-nav > a:hover, .cdg-nav summary:hover, .cdg-nav details[open] > summary { background: rgba(255, 255, 255, .1); color: #fff; }
.cdg-lang { padding: 6px 12px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; font-size: 14.5px; white-space: nowrap; }
.cdg-account { margin-left: 8px; padding: 8px 14px; border-radius: 10px; white-space: nowrap; }
.cdg-account:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.cdg-bar a:focus-visible, .cdg-bar summary:focus-visible, .cdg-foot a:focus-visible, .cdg-foot summary:focus-visible { outline: 2px solid #8fb0ff; outline-offset: 2px; }

/* 子站：两层都在 <header class="site-header cdg-2bars"> 里。页面往下滚动时 L1 品牌栏滚出窗口，只留本站的产品栏（L2）吸顶；
   回到页面顶部 L1 才出现。只靠 sticky 的负 top 实现，不用脚本。主站只有 L1，照常吸顶，不加 cdg-2bars。 */
.site-header.cdg-2bars { position: sticky; top: calc(-1 * var(--cdg-bar-h)); z-index: 50; }

/* ------------------------------------------------ “产品”菜单：五列，底部一行 */
/* 展开时把“产品”按钮的感应区向下接到面板（按钮与栏的下沿之间有十来像素），鼠标滑向面板的路上不离开菜单（cdg.js 的悬停展开靠它） */
.cdg-products > summary { position: relative; }
.cdg-products[open] > summary::before { content: ""; position: absolute; top: 100%; left: -16px; right: -16px; height: 14px; }
.cdg-mega {
  position: absolute; top: 100%; left: 50%; z-index: 60; transform: translateX(-50%); display: grid; grid-template-columns: 1.05fr 1.25fr 1.1fr 1.1fr 1fr;
  width: min(1240px, calc(100vw - 24px)); box-sizing: border-box; overflow: hidden; border-radius: 0 0 20px 20px; background: #fff; color: #0f172a; font-weight: 400;
  box-shadow: 0 30px 70px rgba(8, 15, 45, .35); cursor: default;
}
.cdg-col { padding: 24px 22px 20px; border-right: 1px solid #eef1f6; min-width: 0; }
.cdg-col:nth-child(5) { border-right: 0; }
.cdg-mega__h { margin: 0 0 12px; padding: 0; font-size: 13px; font-weight: 700; line-height: 1.4; letter-spacing: .06em; color: #2450d8; }
.cdg-col a ~ .cdg-mega__h { margin-top: 24px; }
.cdg-mega__h small { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: #eef3ff; font-size: 11.5px; font-weight: 600; letter-spacing: 0; line-height: 1.4; }
.cdg-mega a { display: flex; align-items: center; gap: 10px; margin: 0 -8px; padding: 7px 8px; border-radius: 10px; color: #0f172a; font-size: 15.5px; font-weight: 700; line-height: 1.3; }
.cdg-mega a:hover, .cdg-mega a.cdg-on { background: #f3f6fd; color: #0f172a; }
.cdg-mega a img { display: block; flex: none; width: 30px; height: 30px; }
.cdg-mega a span { display: block; min-width: 0; }
.cdg-mega a b { display: block; font-weight: 700; }
.cdg-mega a i { display: block; margin-top: 2px; font-style: normal; font-size: 13px; font-weight: 500; line-height: 1.3; color: #64748b; }
.cdg-soon { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: #fff3d6; color: #8a5a00; font-size: 11.5px; font-style: normal; font-weight: 700; line-height: 1.5; vertical-align: 1px; }
.cdg-mega .cdg-mega-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 26px; align-items: center; margin: 0; padding: 14px 22px; border-top: 1px solid #e8edf7; background: #f6f8fd; font-size: 14.5px; font-weight: 700; }
.cdg-mega .cdg-mega-foot a { display: inline; margin: 0; padding: 0; border-radius: 0; background: none; color: #2450d8; font-size: inherit; }
.cdg-mega .cdg-mega-foot a:hover { background: none; text-decoration: underline; }

/* 手机上的菜单：≤ 900px 时只剩 Logo ｜ 产品 ｜ 菜单；首页、购买、下载、支持、我的授权收进“菜单”。桌面上这个菜单不显示。 */
.cdg-menu { display: none; }
.cdg-menu__panel { position: absolute; top: 100%; right: 16px; z-index: 60; display: flex; flex-direction: column; min-width: 220px; padding: 8px; border-radius: 0 0 16px 16px; background: #fff; box-shadow: 0 30px 70px rgba(8, 15, 45, .35); }
.cdg-menu__panel a { padding: 11px 14px; border-radius: 10px; color: #0f172a; font-size: 16px; font-weight: 600; }
.cdg-menu__panel a:hover { background: #f3f6fd; }

/* ------------------------------------------------ 统一页脚 */
.cdg-foot { padding: 68px 0 30px; background: var(--cdg-foot); color: #aab3c5; font-size: 16.5px; line-height: 1.5; clear: both; }
.cdg-foot a { color: inherit; text-decoration: none; transition: color .15s; }
.cdg-foot a:hover { color: #fff; }
/* 五个链接栏按内容定宽：单词不拆开（德语、荷兰语、俄语的长词），放不下的条目在空格处换行。
   中日韩文字短，品牌在左、五栏在右排成一行；其他语言品牌单独一行在上，五栏在下（见下面的 min-width: 1201px）。 */
.cdg-foot__cols { display: grid; grid-template-columns: minmax(230px, 1.3fr) repeat(5, auto); gap: 40px 28px; }
.cdg-foot__brand img { display: block; width: auto; height: 36px; margin-bottom: 20px; }
.cdg-foot__brand p { max-width: 330px; margin: 0 0 8px; }
.cdg-foot__brand .cdg-foot__since { color: #7f8aa0; }
.cdg-foot__h { margin: 0 0 16px; font-size: 16px; font-weight: 700; letter-spacing: .04em; color: #fff; }
.cdg-foot ul + .cdg-foot__h { margin-top: 30px; }
.cdg-foot ul { margin: 0; padding: 0; list-style: none; }
.cdg-foot li { max-width: 15em; margin: 0 0 11px; overflow-wrap: break-word; }
.cdg-foot__row { display: flex; flex-wrap: wrap; gap: 4px 13px; }
.cdg-foot__row span { color: #7f8aa0; }
.cdg-foot a[href^="mailto:"] { font-size: 15.5px; hyphens: none; }      /* 地址里 @ 后面有 <wbr>，窄栏在那里换行 */
.cdg-foot__sub { position: relative; max-width: 330px; margin-top: 24px; }
.cdg-foot__sub label { display: block; margin-bottom: 10px; font-size: 15px; color: #7f8aa0; }
.cdg-foot__sub input {
  width: 100%; height: 48px; padding: 0 54px 0 16px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 12px; background: rgba(255, 255, 255, .05);
  color: #fff; font-size: 16px; outline: 0; box-sizing: border-box;
}
.cdg-foot__sub input::placeholder { color: #6c7790; }
.cdg-foot__sub input:focus { border-color: var(--cdg-blue); }
.cdg-foot__sub button { position: absolute; right: 5px; bottom: 5px; width: 38px; height: 38px; border: 0; border-radius: 9px; background: var(--cdg-blue); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.cdg-foot__legal {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 30px; margin-top: 52px; padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .1); font-size: 15px; color: #7f8aa0;
}
.cdg-foot__legal p { margin: 0; }
.cdg-foot__tm { margin: 16px 0 0; font-size: 13px; line-height: 1.6; color: #6c7790; }
.cdg-foot__lang { position: relative; }
.cdg-foot__lang summary { padding: 8px 16px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px; color: #dbe3f5; cursor: pointer; list-style: none; white-space: nowrap; }
.cdg-foot__lang summary::-webkit-details-marker { display: none; }
.cdg-foot__lang summary::after { content: "▾"; margin-left: 8px; opacity: .7; }
.cdg-foot__lang[open] summary { border-color: rgba(255, 255, 255, .5); }
.cdg-foot__lang div {
  position: absolute; right: 0; bottom: calc(100% + 10px); z-index: 5; display: grid; grid-template-columns: repeat(4, max-content); gap: 4px 6px; padding: 14px;
  border: 1px solid rgba(255, 255, 255, .12); border-radius: 16px; background: #1d2026; box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
}
.cdg-foot__lang div a { padding: 7px 12px; border-radius: 8px; color: #c8d0e0; white-space: nowrap; }
.cdg-foot__lang div a:hover, .cdg-foot__lang div a.is-on { background: rgba(255, 255, 255, .1); color: #fff; }

@media (min-width: 1201px) {
  .cdg-foot__cols nav:nth-of-type(-n+2) { white-space: nowrap; }      /* 两栏产品名不折行 */
  .cdg-foot__cols nav:nth-of-type(-n+2) .cdg-foot__row { flex-wrap: nowrap; }
  .cdg-foot a[href^="mailto:"] { white-space: nowrap; }
  .cdg-foot:not(:lang(zh), :lang(ja), :lang(ko)) .cdg-foot__cols { grid-template-columns: repeat(5, auto); justify-content: space-between; }
  .cdg-foot:not(:lang(zh), :lang(ja), :lang(ko)) .cdg-foot__brand {
    grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 36px; padding-bottom: 6px;
  }
  .cdg-foot:not(:lang(zh), :lang(ja), :lang(ko)) .cdg-foot__brand > a { grid-row: 1 / span 2; }
  .cdg-foot:not(:lang(zh), :lang(ja), :lang(ko)) .cdg-foot__brand img { margin-bottom: 0; }
  .cdg-foot:not(:lang(zh), :lang(ja), :lang(ko)) .cdg-foot__brand p { grid-column: 2; max-width: none; margin: 0; align-self: end; }
  .cdg-foot:not(:lang(zh), :lang(ja), :lang(ko)) .cdg-foot__brand .cdg-foot__since { align-self: start; }
  .cdg-foot:not(:lang(zh), :lang(ja), :lang(ko)) .cdg-foot__sub { grid-column: 3; grid-row: 1 / span 2; width: 330px; margin-top: 0; }
}
@media (max-width: 1200px) {
  .cdg-foot__cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cdg-foot__brand { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  :root { --cdg-bar-h: 54px; }
  .cdg-nav > a, .cdg-account, .cdg-lang { display: none; }
  .cdg-menu { display: block; margin-left: auto; }
  .cdg-logo { margin-right: 8px; }
  .cdg-mega {
    left: 0; right: 0; transform: none; grid-template-columns: repeat(2, minmax(0, 1fr)); width: auto; max-height: calc(100vh - var(--cdg-bar-h)); overflow-y: auto;
    border-radius: 0 0 16px 16px;
  }
  .cdg-col, .cdg-col:nth-child(5) { border-right: 0; border-bottom: 1px solid #eef1f6; padding: 18px 18px 14px; }
}
@media (max-width: 700px) {
  .cdg-wrap { padding: 0 16px; }
  .cdg-foot { padding: 48px 0 26px; font-size: 16px; }
  .cdg-foot__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px 22px; }
  .cdg-foot li { hyphens: auto; hyphenate-limit-chars: 14 5 5; }      /* 两栏时一栏只有 150 多像素，比它还长的词按词典加连字符断开 */
  .cdg-foot__legal { flex-direction: column; align-items: flex-start; margin-top: 38px; }      /* 语言按钮固定在左下，面板向右展开，不会伸出屏幕 */
  .cdg-foot__lang div { right: auto; left: 0; grid-template-columns: repeat(2, max-content); }
}
@media (max-width: 560px) {
  .cdg-mega { grid-template-columns: minmax(0, 1fr); }
  .cdg-menu__panel { right: 12px; }
}
@media (max-width: 420px) {      /* 360 px 的手机：Logo 与两个按钮（产品、菜单）要排得下 */
  .cdg-logo { margin-right: 0; }
  .cdg-logo img { height: 24px; }
  .cdg-nav summary { padding: 8px 7px; }
  .cdg-nav summary::after { margin-left: 3px; }
  .cdg-menu__panel { max-width: calc(100vw - 24px); box-sizing: border-box; }
  .cdg-menu__panel a { white-space: normal; }
}
@media (max-width: 340px) {
  .cdg-wrap { padding: 0 12px; }
  .cdg-logo img { height: 20px; }
  .cdg-nav summary::after { content: none; }
}
