/* tools-brand.css：注入到工具页，覆盖旧站样式 → 新商业风格（SPEC 0002）。
   旧样式表是 token 驱动（:root 变量），此处仅覆盖品牌变量与结构装饰，不动工具功能样式。 */

:root {
  --accent: #2563eb;
  --accent-2: #1d4ed8;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --radius: 12px;
  --shadow: 0 1px 2px rgb(15 23 42 / 0.06), 0 8px 24px rgb(15 23 42 / 0.07);
}

/* 旧站渐变 logo → 新站墨色方块 */
.logo-mark {
  background: #0f172a;
  border-radius: 8px;
}

/* 头部：白底毛玻璃，隐藏指向旧站栏目的下拉导航 */
.site-header { background: rgb(255 255 255 / 0.85); }
.nav .nav-item.has-drop { display: none; }

/* 旧站光晕背景移除 */
.bg-glow { background: none; }

/* 旧页脚弱化：只留法务链接一行 */
.site-footer .footer-inner { flex-direction: column; gap: 8px; }

/* ===== v2：自建头尾（与官网 1:1）===== */
.tx-header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(255 255 255 / 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e2e8f0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.tx-header .header-inner { display: flex; align-items: center; gap: 32px; height: 64px; }
.tx-header .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: #0f172a; }
.tx-header .brand-mark {
  display: grid; place-items: center; width: 32px; height: 32px;
  background: #0f172a; color: #fff; border-radius: 8px; font-size: 13px; font-weight: 800;
}
.tx-header .nav { display: flex; gap: 28px; margin-right: auto; }
.tx-header .nav a { color: #334155; font-size: 15px; font-weight: 500; }
.tx-header .nav a:hover { color: #0f172a; }
.tx-header .header-actions { display: flex; align-items: center; }
.tx-header .lang-menu { position: relative; }
.tx-header .lang-menu summary {
  list-style: none; cursor: pointer; font-size: 14px; font-weight: 500;
  color: #64748b; padding: 6px 10px; border-radius: 8px; border: 1px solid #e2e8f0;
}
.tx-header .lang-menu summary::-webkit-details-marker { display: none; }
.tx-header .lang-menu summary:hover { color: #0f172a; border-color: #64748b; }
.tx-header .lang-list {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 60;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
  box-shadow: 0 8px 24px rgb(15 23 42 / 0.12); padding: 6px; min-width: 140px;
}
.tx-header .lang-list a { display: block; padding: 7px 12px; border-radius: 6px; font-size: 14px; color: #334155; }
.tx-header .lang-list a:hover { background: #f8fafc; color: #0f172a; }
.tx-header .lang-list a.active { color: #2563eb; font-weight: 600; }
.tx-footer { border-top: 1px solid #e2e8f0; background: #f8fafc; padding: 56px 0 32px; }
.tx-footer .footer-grid { max-width: 1120px; margin: 0 auto; padding: 0 24px 32px; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; border-bottom: 1px solid #e2e8f0; }
.tx-footer h4 { font-size: 14px; margin-bottom: 14px; color: #0f172a; }
.tx-footer .footer-grid a { display: block; color: #64748b; font-size: 14px; padding: 4px 0; }
.tx-footer .footer-grid a:hover { color: #0f172a; }
.tx-footer .tx-footer-tagline { color: #64748b; font-size: 14px; margin-top: 12px; max-width: 280px; }
.tx-footer .tx-footer-note { max-width: 1120px; margin: 0 auto; padding: 24px 24px 0; display: flex; justify-content: space-between; gap: 16px; color: #64748b; font-size: 13px; }
@media (max-width: 860px) {
  .tx-header .nav { display: none; }
  .tx-footer .footer-grid { grid-template-columns: 1fr 1fr; }
  .tx-footer .tx-footer-note { flex-direction: column; }
}
/* 旧样式表的 header-actions 定位覆盖 */
.tx-header .header-actions { position: static !important; margin-left: auto; display: flex; align-items: center; gap: 16px; }
.tx-header .lang-menu summary { display: inline-block; }
.tx-footer { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif; }

/* 修正：旧 .nav{margin-left:auto} 与新 .nav{margin-right:auto} 同时生效导致菜单居中 */
.tx-header .nav { margin-left: 0 !important; margin-right: auto !important; }
.tx-header .header-inner { max-width: 1120px !important; margin: 0 auto !important; }
.tx-header .container { max-width: 1120px !important; }

/* 页脚品牌：补 .brand-mark 定义（旧样式表无此类） */
.tx-footer .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: #0f172a; }
.tx-footer .brand-mark {
  display: grid; place-items: center; width: 32px; height: 32px;
  background: #0f172a; color: #fff; border-radius: 8px; font-size: 13px; font-weight: 800;
}
/* 旧 .lang-menu{opacity:0;visibility:hidden}（hover 下拉）会隐藏注入的菜单，强制可见 */
.tx-header .lang-menu { display: inline-block !important; opacity: 1 !important; visibility: visible !important; transform: none !important; position: relative !important; }
.tx-header .lang-menu summary { display: inline-block !important; }
.tx-header .lang-menu .lang-list { display: none !important; }
.tx-header .lang-menu[open] .lang-list { display: block !important; opacity: 1 !important; visibility: visible !important; transform: none !important; position: absolute !important; }

/* 根除旧头尾：CSS 在首帧渲染前隐藏（此前靠 JS 隐藏，首帧会闪现旧头部含旧语言按钮） */
.site-header, .site-footer { display: none !important; }
/* 工具页头部 CTA（与官网 .btn-primary 同款） */
.tx-header .tx-btn {
  display: inline-flex; align-items: center; border-radius: 8px; font-weight: 600;
  padding: 8px 16px; font-size: 14px; background: #2563eb; color: #fff; transition: background 0.15s ease;
}
.tx-header .tx-btn:hover { background: #1d4ed8; }
