:root {
    --bg: #0b0f14; --bg2: #11161d; --panel: #161c25; --panel2: #1c2430;
    --border: #263140; --text: #d7e0ea; --muted: #8b98a8;
    --accent: #2fd4a5; --accent2: #4da3ff;
    --mandatory: #ff6b6b; --technical: #4da3ff; --cert: #ffb84d; --guidance: #8b98a8;
    --ok: #2fd4a5;
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  body { background: var(--bg); color: var(--text); font-family: -apple-system,"PingFang SC","Microsoft YaHei","Segoe UI",sans-serif; line-height: 1.5; min-height: 100vh; padding: 14px 16px 40px; }
  .wrap { max-width: 1100px; margin: 0 auto; }

  header { margin-bottom: 12px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
  header .head-main { flex: 1; min-width: 0; }
  header h1 { font-size: 19px; font-weight: 700; }
  header h1 span { color: var(--accent); }
  header .sub { color: var(--muted); font-size: 12px; margin-top: 2px; }

  /* 语言切换按钮（右上角） */
  .lang-switch { flex-shrink: 0; background: var(--panel2); border: 1px solid var(--border); color: var(--text); border-radius: 18px; padding: 6px 14px; cursor: pointer; font-size: 12.5px; font-weight: 600; transition: all .15s; white-space: nowrap; }
  .lang-switch:hover { border-color: var(--accent); color: var(--accent); }

  /* 单一紧凑面板 */
  .panel { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; }
  .field { margin-bottom: 10px; }
  .field:last-child { margin-bottom: 0; }
  .field label { display: inline-block; font-size: 12px; color: var(--muted); margin-bottom: 5px; font-weight: 600; }
  .field label b { color: var(--accent); }

  .chips { display: flex; flex-wrap: wrap; gap: 6px; }
  .chip { border: 1px solid var(--border); border-radius: 16px; padding: 5px 12px; cursor: pointer; font-size: 13px; background: var(--panel2); transition: all .12s; user-select: none; white-space: nowrap; }
  .chip:hover { border-color: var(--accent2); }
  .chip.active { border-color: var(--accent); background: rgba(47,212,165,.12); color: var(--accent); }
  .chip .flag { margin-right: 3px; }
  .chip .ck { color: var(--accent); font-weight: 700; margin-left: 4px; }

  .btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
  button { border: none; border-radius: 8px; padding: 9px 20px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all .15s; }
  .btn-primary { background: var(--accent); color: #06281f; }
  .btn-primary:hover { filter: brightness(1.1); }
  .btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
  .btn-ghost:hover { border-color: var(--accent2); }

  /* 结果区 */
  #result { display: none; }
  .summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin-bottom: 12px; }
  .sum-item { background: var(--panel2); border: 1px solid var(--border); border-radius: 8px; padding: 10px; text-align: center; }
  .sum-item .n { font-size: 22px; font-weight: 700; }
  .sum-item .l { font-size: 11px; color: var(--muted); margin-top: 1px; }

  .group { margin-bottom: 16px; }
  .group-title { font-size: 13px; font-weight: 700; padding: 6px 10px; border-radius: 7px; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
  .group-title .cnt { font-weight: 400; opacity: .8; font-size: 12px; }
  .g-mandatory .group-title { background: rgba(255,107,107,.12); color: var(--mandatory); }
  .g-technical .group-title { background: rgba(77,163,255,.12); color: var(--technical); }
  .g-certification .group-title { background: rgba(255,184,77,.12); color: var(--cert); }
  .g-guidance .group-title { background: rgba(139,152,168,.12); color: var(--guidance); }

  .std { background: var(--panel2); border: 1px solid var(--border); border-radius: 9px; margin-bottom: 8px; overflow: hidden; }
  .std.na { opacity: .5; }
  .std-head { padding: 10px 14px; cursor: pointer; transition: background .12s; }
  .std-head:hover { background: rgba(255,255,255,.02); }
  .std-head .row1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .std-head .name { font-weight: 600; font-size: 13.5px; flex: 1; min-width: 200px; }

  .badge { font-size: 11px; padding: 1px 8px; border-radius: 20px; white-space: nowrap; font-weight: 600; }
  .badge-eff { background: rgba(255,184,77,.15); color: var(--cert); }
  .badge-region { background: rgba(77,163,255,.15); color: var(--accent2); }
  .badge-clauses { background: rgba(139,152,168,.15); color: var(--muted); }
  .badge-expand { margin-left: auto; color: var(--muted); font-size: 16px; line-height: 1; transition: transform .12s; }
  .std.open .badge-expand { transform: rotate(90deg); }

  .ob { font-size: 10.5px; padding: 1px 8px; border-radius: 4px; font-weight: 700; letter-spacing: .3px; }
  .ob-mandatory { background: var(--mandatory); color: #2a0808; }
  .ob-technical { background: rgba(77,163,255,.2); color: var(--technical); }
  .ob-voluntary { background: rgba(255,184,77,.2); color: var(--cert); }
  .ob-guidance { background: rgba(139,152,168,.2); color: var(--guidance); }

  .std-body { display: none; border-top: 1px solid var(--border); padding: 12px 14px; background: rgba(0,0,0,.15); }
  .std.open .std-body { display: block; }
  .std-body .scope { font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
  .std-body .note { font-size: 12.5px; color: #b7c3d1; margin-bottom: 10px; }
  .std-body .meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; align-items: center; }
  .std-body .src { font-size: 12px; }
  .std-body .src a { color: var(--accent2); text-decoration: none; word-break: break-all; }
  .std-body .src a:hover { text-decoration: underline; }

  .test-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
  .test-table th { text-align: left; color: var(--muted); font-weight: 600; padding: 5px 8px; border-bottom: 1px solid var(--border); }
  .test-table td { padding: 7px 8px; border-bottom: 1px solid rgba(38,49,64,.5); vertical-align: top; }
  .test-table tr:last-child td { border-bottom: none; }
  .test-table .tname { font-weight: 600; color: var(--text); }
  .test-table .tmeth { white-space: nowrap; color: var(--accent2); }
  .test-table .pass { color: var(--ok); }
  .no-tests { color: var(--muted); font-size: 12.5px; font-style: italic; }

  .toggle-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; margin-top: 6px; }
  #naList { margin-top: 6px; }

  .result-card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; }
  .result-card h2 { font-size: 14px; font-weight: 600; margin-bottom: 12px; }

  .disclaimer { font-size: 11.5px; color: var(--muted); margin-top: 16px; border-top: 1px solid var(--border); padding-top: 10px; }
  .disclaimer a { color: var(--accent2); }

  @media (max-width: 600px) { body { padding: 10px 10px 30px; } header h1 { font-size: 17px; } .chip { padding: 5px 10px; font-size: 12.5px; } .lang-switch { padding: 5px 10px; font-size: 12px; } }

/* CSP 适配：替代内联 style 的 class */
.btn-row-sm { margin: 10px 0 4px; }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.hidden { display: none; }
.sum-item .n.c-accent { color: var(--accent); }
.sum-item .n.c-mandatory { color: var(--mandatory); }
.sum-item .n.c-cert { color: var(--cert); }
.sum-item .n.c-technical { color: var(--technical); }
.sum-item .n.c-accent2 { color: var(--accent2); }
.test-table th.w-test { width: 20%; }
.test-table th.w-pass { width: 26%; }
.test-table th.w-method { width: 13%; }

/* 数据时效性提示 */
.data-meta { font-size: 11.5px; color: var(--muted); margin-top: 14px; }


/* ============ 打印样式（导出 PDF）============ */
@media print {
  header, .panel, .btn-row, .lang-switch, .data-meta, .disclaimer,
  .badge-expand, .toggle-row, .no-tests, .tabs, .hero, .services, .contact { display: none !important; }

  body { background: #fff !important; color: #000 !important; padding: 0 !important; }
  .wrap { max-width: none !important; }

  .result-card { background: #fff !important; border: none !important; padding: 0 !important; margin: 0 !important; }
  .result-card h2 { color: #000 !important; font-size: 16px !important; }

  .sum-item { background: #f7f7f7 !important; border: 1px solid #ccc !important; }
  .sum-item .n { color: #000 !important; }
  .sum-item .l { color: #555 !important; }

  .group-title { background: #f0f0f0 !important; color: #000 !important; }
  .std { background: #fff !important; border: 1px solid #ccc !important; page-break-inside: avoid !important; }
  .std.na { opacity: 1 !important; }
  .std-body { display: block !important; background: #fff !important; }
  #naList { display: block !important; }
  .tab-panel { display: none !important; }
  #tab-result { display: block !important; }

  .std-head .name, .scope, .note { color: #000 !important; }
  .ob, .badge { background: #f0f0f0 !important; color: #000 !important; }
  .ob-mandatory, .ob-technical, .ob-voluntary, .ob-guidance { background: #f0f0f0 !important; color: #000 !important; }

  .test-table th { background: #f0f0f0 !important; color: #000 !important; border-color: #ccc !important; }
  .test-table td { color: #000 !important; border-color: #ccc !important; }
  .test-table .pass, .test-table .tmeth, .test-table .tname { color: #000 !important; }
  .src a { color: #000 !important; }
}

/* ============ 下载页 ============ */
.head-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.head-actions .lang-switch { text-decoration: none; }
.dl-section { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 14px; }
.dl-section h2 { font-size: 14px; margin-bottom: 4px; }
.dl-section-desc { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.dl-region { font-size: 13px; color: var(--accent2); margin: 14px 0 8px; font-weight: 600; }
.dl-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--panel2); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.dl-main { flex: 1; min-width: 200px; }
.dl-name { font-weight: 600; font-size: 13px; word-break: break-all; }
.dl-item-desc { font-size: 11px; color: var(--muted); margin-top: 2px; }
.dl-btn { background: var(--accent); color: #06281f; padding: 5px 14px; border-radius: 6px; font-size: 12px; font-weight: 600; text-decoration: none; white-space: nowrap; display: inline-block; }
.dl-btn:hover { filter: brightness(1.1); }
.dl-none { font-size: 12px; color: var(--muted); }
@media print { .head-actions, .dl-btn { display: none !important; } }




/* ============ 标签页 ============ */
.tabs { display: flex; gap: 4px; margin-bottom: 14px; border-bottom: 1px solid var(--border); }
.tab { background: transparent; border: none; border-bottom: 2px solid transparent; color: var(--muted); padding: 10px 18px; font-size: 14px; font-weight: 600; cursor: pointer; border-radius: 0; }
.tab .tab-no { margin-right: 4px; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }


/* ============ 服务案例（产品标签墙） ============ */
.cases { margin-top: 14px; }
.cases h2 { font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.case-marquee { overflow: hidden; padding: 4px 0; }
.case-track { display: flex; gap: 10px; width: max-content; animation: case-scroll 30s linear infinite; }
.case-marquee:hover .case-track { animation-play-state: paused; }
.case-chip { background: var(--panel2); border: 1px solid var(--border); border-radius: 20px; padding: 8px 18px; font-size: 13px; font-weight: 600; white-space: nowrap; transition: all .2s; }
.case-chip:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
@keyframes case-scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ============ 联系我们 ============ */
.contact { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-top: 14px; }
.contact h2 { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.contact p { font-size: 12.5px; color: var(--muted); margin-bottom: 12px; }
.contact-btn { display: inline-block; background: var(--accent); color: #06281f; padding: 8px 18px; border-radius: 8px; font-size: 13px; font-weight: 600; text-decoration: none; }
.contact-btn:hover { filter: brightness(1.1); }

/* ============ 服务区块 ============ */
.services { margin: 22px 0 6px; }
.services h2 { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.services .svc-lead { font-size: 12.5px; color: var(--muted); margin-bottom: 12px; }
.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.service-card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.service-card .svc-icon { font-size: 22px; margin-bottom: 8px; }
.service-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.service-card .svc-desc { font-size: 12.5px; color: var(--muted); margin-bottom: 12px; }
.service-card .svc-list { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.service-card .svc-list li { background: var(--panel2); border: 1px solid var(--border); border-radius: 6px; padding: 4px 10px; font-size: 12px; }
.svc-pentest { border-top: 2px solid var(--mandatory); }
.svc-compliance { border-top: 2px solid var(--accent); }
@media print { .services { display: none !important; } }
