/* ===== drill-system.css ===== */
/* 页面专属样式 - 攻防演练系统部署指南 */

/* ===== Hero ===== */
.sys-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: white;
    padding: 140px 0 80px;
    position: relative;
    overflow: hidden;
}
.sys-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(26, 110, 255, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 107, 53, 0.08) 0%, transparent 50%);
}
.sys-hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
}
.sys-hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    padding: 0 24px;
}
.sys-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(26, 110, 255, 0.15);
    border: 1px solid rgba(26, 110, 255, 0.25);
    color: #60a5fa;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 100px;
    margin-bottom: 24px;
}
.sys-hero h1 {
    font-size: clamp(28px, 5vw, 44px);
    font-weight: 900;
    margin-bottom: 20px;
    line-height: 1.2;
}
.sys-hero h1 .highlight {
    background: linear-gradient(135deg, #ff6b35 0%, #ff4757 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.sys-hero p {
    font-size: 17px;
    color: rgba(255,255,255,0.65);
    line-height: 1.8;
    max-width: 640px;
    margin: 0 auto 32px;
}
.sys-hero-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}
.sys-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: inherit;
}
.sys-hero-btn-primary {
    background: linear-gradient(135deg, #ff6b35 0%, #ff4757 100%);
    color: white;
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.3);
}
.sys-hero-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(255, 107, 53, 0.4);
}
.sys-hero-btn-secondary {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.8);
    border: 1.5px solid rgba(255,255,255,0.15);
}
.sys-hero-btn-secondary:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.25);
    color: white;
}

/* ===== 双视角标签 ===== */
.team-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.team-red {
    background: linear-gradient(135deg, #fef2f2 0%, #fff1f2 100%);
    color: #dc2626;
    border: 1px solid rgba(220, 38, 38, 0.15);
}
.team-blue {
    background: linear-gradient(135deg, #e8f1ff 0%, #eff6ff 100%);
    color: #1a6eff;
    border: 1px solid rgba(26, 110, 255, 0.15);
}
.team-purple {
    background: linear-gradient(135deg, #f5f3ff 0%, #faf5ff 100%);
    color: #7c3aed;
    border: 1px solid rgba(124, 58, 237, 0.15);
}

/* ===== 法律横幅 ===== */
.legal-banner {
    background: linear-gradient(135deg, #fef2f2 0%, #fff7ed 100%);
    border: 1.5px solid rgba(220, 38, 38, 0.15);
    border-radius: var(--radius);
    padding: 24px 28px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 48px;
}
.legal-banner .legal-icon {
    width: 44px; height: 44px;
    background: var(--danger);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.legal-banner .legal-icon svg { width: 24px; height: 24px; color: white; }
.legal-banner h4 { font-size: 16px; font-weight: 700; color: var(--danger); margin-bottom: 8px; }
.legal-banner p { font-size: 13px; color: var(--text-secondary); line-height: 1.8; }
.legal-banner .legal-list { margin-top: 8px; padding-left: 0; list-style: none; }
.legal-banner .legal-list li {
    font-size: 13px; color: var(--text-secondary); padding: 3px 0; padding-left: 18px; position: relative;
}
.legal-banner .legal-list li::before {
    content: ''; position: absolute; left: 0; top: 10px;
    width: 6px; height: 6px; background: var(--danger); border-radius: 50%;
}

/* ===== 布局 ===== */
.sys-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 48px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== 目录 ===== */
.sys-toc {
    position: sticky;
    top: 96px;
    height: calc(100vh - 120px);
    overflow-y: auto;
    padding-right: 8px;
}
.sys-toc::-webkit-scrollbar { width: 4px; }
.sys-toc::-webkit-scrollbar-track { background: transparent; }
.sys-toc::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.sys-toc-title {
    font-size: 13px; font-weight: 700; color: var(--text-light);
    text-transform: uppercase; letter-spacing: 1.5px;
    margin-bottom: 16px; padding-left: 12px;
}
.sys-toc ul { list-style: none; }
.sys-toc li { margin-bottom: 2px; }
.sys-toc a {
    display: block; padding: 8px 12px; border-radius: 8px;
    font-size: 13px; font-weight: 500; color: var(--text-secondary);
    text-decoration: none; transition: var(--transition);
    border-left: 3px solid transparent;
}
.sys-toc a:hover { background: var(--primary-light); color: var(--primary); }
.sys-toc a.active {
    background: var(--primary-light); color: var(--primary);
    border-left-color: var(--primary); font-weight: 600;
}
.sys-toc .toc-sub { padding-left: 16px; }
.sys-toc .toc-sub a { font-size: 12px; padding: 6px 12px; }

/* ===== 内容区 ===== */
.sys-content { min-width: 0; }
.sys-section { margin-bottom: 64px; scroll-margin-top: 96px; }
.sys-section:last-child { margin-bottom: 0; }
.sys-section h2 {
    font-size: 28px; font-weight: 800; color: var(--text);
    margin-bottom: 20px; padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
    display: flex; align-items: center; gap: 12px;
}
.sys-section h2 .section-num {
    width: 36px; height: 36px; background: var(--primary-gradient);
    color: white; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; font-weight: 900; flex-shrink: 0;
}
.sys-section h3 {
    font-size: 20px; font-weight: 700; color: var(--text);
    margin: 32px 0 16px; display: flex; align-items: center; gap: 10px;
}
.sys-section h3 .dot { width: 8px; height: 8px; background: var(--primary); border-radius: 50%; }
.sys-section p { font-size: 15px; color: var(--text-secondary); line-height: 1.9; margin-bottom: 16px; }
.sys-section ul, .sys-section ol { margin-bottom: 16px; padding-left: 20px; }
.sys-section li { font-size: 14px; color: var(--text-secondary); line-height: 1.9; margin-bottom: 6px; }

/* ===== 选型矩阵表格 ===== */
.tool-matrix {
    width: 100%; border-collapse: collapse; margin: 24px 0;
    border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border);
}
.table-scroll-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 24px 0;
    border-radius: var(--radius-sm);
}
.table-scroll-wrapper .tool-matrix {
    margin: 0;
    min-width: 720px;
}
.tool-matrix th {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
    color: white; font-size: 13px; font-weight: 600; padding: 14px 16px; text-align: left;
}
.tool-matrix td {
    padding: 14px 16px; font-size: 14px; color: var(--text-secondary);
    border-bottom: 1px solid var(--border); background: white;
}
.tool-matrix tr:last-child td { border-bottom: none; }
.tool-matrix tr:hover td { background: var(--bg-warm); }
.tool-matrix .tool-name {
    font-weight: 700; color: var(--text);
    display: flex; align-items: center; gap: 8px;
}
.tool-matrix .tool-name .tool-icon {
    width: 28px; height: 28px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center; font-size: 13px;
}
.diff-stars { color: #f59e0b; font-size: 14px; letter-spacing: 2px; }
.tag-recommend { display: inline-block; background: var(--success-light); color: var(--success); font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 100px; }
.tag-optional { display: inline-block; background: var(--primary-light); color: var(--primary); font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 100px; }
.tag-caution { display: inline-block; background: var(--warning-light); color: var(--warning); font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 100px; }
.tag-advanced { display: inline-block; background: linear-gradient(135deg, #fef2f2 0%, #fff1f2 100%); color: #dc2626; font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 100px; }

/* ===== 工具Tab切换 ===== */
.tool-tabs {
    display: flex; gap: 4px; margin-bottom: 24px;
    border-bottom: 2px solid var(--border); padding-bottom: 0;
    flex-wrap: wrap;
}
.tool-tab {
    padding: 10px 20px; border: none; background: transparent;
    font-family: inherit; font-size: 14px; font-weight: 600;
    color: var(--text-secondary); cursor: pointer; transition: var(--transition);
    border-bottom: 2px solid transparent; margin-bottom: -2px;
    display: flex; align-items: center; gap: 8px;
}
.tool-tab:hover { color: var(--primary); }
.tool-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tool-tab .tab-icon { width: 20px; height: 20px; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 10px; }
.tool-panel { display: none; }
.tool-panel.active { display: block; }

/* ===== 代码块 ===== */
.code-block {
    background: #1e1e2e; border-radius: 12px; overflow: hidden;
    margin: 20px 0; position: relative;
}
.code-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 16px; background: #252538; border-bottom: 1px solid #33334d;
}
.code-header .code-lang {
    font-size: 12px; font-weight: 600; color: #8a8aa0;
    display: flex; align-items: center; gap: 6px;
}
.code-header .code-lang::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #ff6b35; }
.code-header .copy-btn {
    padding: 4px 12px; border: 1px solid #33334d; background: transparent;
    color: #8a8aa0; font-size: 12px; font-weight: 500; border-radius: 6px;
    cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.code-header .copy-btn:hover { border-color: var(--primary); color: var(--primary); }
.code-header .copy-btn.copied { border-color: var(--success); color: var(--success); }
.code-block pre {
    padding: 16px 20px; overflow-x: auto;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 13px; line-height: 1.7; color: #e8e8f0; margin: 0;
}
.code-block pre code { font-family: inherit; color: inherit; }
.code-block .comment { color: #6a6a8a; }
.code-block .keyword { color: #c792ea; }
.code-block .string { color: #c3e88d; }
.code-block .number { color: #f78c6c; }

/* ===== 步骤卡片 ===== */
.step-card {
    background: white; border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 24px; margin-bottom: 16px;
    transition: var(--transition);
}
.step-card:hover { box-shadow: var(--shadow); border-color: rgba(26, 110, 255, 0.15); }
.step-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.step-card-num {
    width: 32px; height: 32px; background: var(--primary-gradient);
    color: white; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 900; flex-shrink: 0;
}
.step-card-title { font-size: 15px; font-weight: 700; color: var(--text); }
.step-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.8; margin: 0; }

/* ===== 配置项 ===== */
.config-item {
    background: var(--bg-warm); border-radius: 10px;
    padding: 16px 20px; margin-bottom: 12px; border-left: 3px solid var(--primary);
}
.config-item .config-key {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 13px; font-weight: 600; color: var(--primary); margin-bottom: 4px;
}
.config-item .config-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.7; }

/* ===== 流程图 ===== */
.flow-diagram {
    display: flex; align-items: center; justify-content: center;
    gap: 8px; flex-wrap: wrap; padding: 24px;
    background: var(--bg-warm); border-radius: var(--radius); margin: 24px 0;
}
.flow-node {
    background: white; border: 1.5px solid var(--border); border-radius: 10px;
    padding: 14px 20px; font-size: 13px; font-weight: 600;
    color: var(--text); text-align: center; min-width: 120px; transition: var(--transition);
}
.flow-node:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.flow-node.primary { background: var(--primary-gradient); color: white; border-color: transparent; }
.flow-arrow { color: var(--primary); font-size: 20px; font-weight: 700; }

/* ===== 提示框 ===== */
.tip-box {
    background: var(--primary-light); border: 1.5px solid rgba(26, 110, 255, 0.15);
    border-radius: 10px; padding: 16px 20px; margin: 20px 0;
    display: flex; align-items: flex-start; gap: 12px;
}
.tip-box .tip-icon { width: 24px; height: 24px; color: var(--primary); flex-shrink: 0; margin-top: 2px; }
.tip-box p { font-size: 14px; color: var(--text-secondary); line-height: 1.8; margin: 0; }
.tip-box strong { color: var(--primary); }

.warn-box {
    background: var(--warning-light); border: 1.5px solid rgba(255, 107, 53, 0.15);
    border-radius: 10px; padding: 16px 20px; margin: 20px 0;
    display: flex; align-items: flex-start; gap: 12px;
}
.warn-box .warn-icon { width: 24px; height: 24px; color: var(--warning); flex-shrink: 0; margin-top: 2px; }
.warn-box p { font-size: 14px; color: var(--text-secondary); line-height: 1.8; margin: 0; }
.warn-box strong { color: var(--warning); }

/* ===== 资源网格 ===== */
.resource-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 24px; }
.resource-card {
    background: white; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    padding: 24px; transition: var(--transition);
    display: flex; align-items: flex-start; gap: 14px;
}
.resource-card:hover { border-color: rgba(26, 110, 255, 0.2); box-shadow: var(--shadow); transform: translateY(-2px); }
.resource-card .res-icon {
    width: 44px; height: 44px; background: var(--primary-light);
    border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.resource-card .res-icon svg { width: 22px; height: 22px; color: var(--primary); }
.resource-card .res-info h4 { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.resource-card .res-info p { font-size: 13px; color: var(--text-light); line-height: 1.6; margin: 0; }
.resource-card .res-info .res-meta { font-size: 12px; color: var(--text-light); margin-top: 8px; }
.resource-card .res-download {
    margin-left: auto; padding: 8px 16px; border-radius: 8px;
    background: var(--primary-light); color: var(--primary);
    font-size: 13px; font-weight: 600; text-decoration: none;
    transition: var(--transition); white-space: nowrap;
    border: none;
    cursor: pointer;
}
.resource-card .res-download:hover { background: var(--primary); color: white; border: none; }

/* ===== FAQ ===== */
.faq-item {
    border: 1.5px solid var(--border); border-radius: 10px;
    margin-bottom: 12px; overflow: hidden; transition: var(--transition);
}
.faq-item:hover { border-color: rgba(26, 110, 255, 0.15); }
.faq-question {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; cursor: pointer; background: white; border: none;
    width: 100%; text-align: left; font-family: inherit;
    font-size: 14px; font-weight: 600; color: var(--text); transition: var(--transition);
}
.faq-question:hover { background: var(--bg-warm); }
.faq-question .faq-icon { width: 20px; height: 20px; color: var(--primary); transition: transform 0.3s ease; flex-shrink: 0; }
.faq-item.open .faq-icon { transform: rotate(180deg); }
.faq-answer {
    max-height: 0; overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease; padding: 0 20px;
}
.faq-item.open .faq-answer { max-height: 500px; padding: 0 20px 16px; }
.faq-answer p { font-size: 14px; color: var(--text-secondary); line-height: 1.8; margin: 0; }

/* ===== 需求网格 ===== */
.req-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 24px 0; }
.req-card {
    background: white; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    padding: 24px; text-align: center; transition: var(--transition);
}
.req-card:hover { box-shadow: var(--shadow); border-color: rgba(26, 110, 255, 0.15); }
.req-card .req-icon {
    width: 48px; height: 48px; background: var(--primary-light);
    border-radius: 12px; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px;
}
.req-card .req-icon svg { width: 24px; height: 24px; color: var(--primary); }
.req-card h4 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.req-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; margin: 0; }

/* ===== 场景流程卡片 ===== */
.scenario-flow-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 24px 0; }
.scenario-flow-card {
    background: white; border: 1.5px solid var(--border); border-radius: var(--radius);
    padding: 28px; transition: var(--transition); position: relative; overflow: hidden;
}
.scenario-flow-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--primary-gradient); transform: scaleX(0); transform-origin: left; transition: var(--transition);
}
.scenario-flow-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); border-color: rgba(26, 110, 255, 0.2); }
.scenario-flow-card:hover::before { transform: scaleX(1); }
.scenario-flow-card .sf-badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 100px; margin-bottom: 12px; }
.sf-badge-a { background: var(--success-light); color: var(--success); }
.sf-badge-b { background: var(--primary-light); color: var(--primary); }
.sf-badge-c { background: var(--warning-light); color: var(--warning); }
.sf-badge-red { background: linear-gradient(135deg, #fef2f2 0%, #fff1f2 100%); color: #dc2626; }
.sf-badge-blue { background: linear-gradient(135deg, #e8f1ff 0%, #eff6ff 100%); color: #1a6eff; }
.scenario-flow-card h4 { font-size: 16px; font-weight: 700; margin-bottom: 10px; }
.scenario-flow-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.7; margin: 0; }
.scenario-flow-card .sf-tools { display: flex; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.scenario-flow-card .sf-tools span { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 100px; background: var(--bg-warm); color: var(--text-light); }

/* ===== 双视角对比区 ===== */
.dual-perspective {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 24px 0;
}
.perspective-card {
    border-radius: var(--radius);
    padding: 28px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}
.perspective-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.perspective-card.red {
    background: linear-gradient(135deg, #fef2f2 0%, #fff7ed 100%);
    border: 1.5px solid rgba(220, 38, 38, 0.12);
}
.perspective-card.blue {
    background: linear-gradient(135deg, #e8f1ff 0%, #f0f7ff 100%);
    border: 1.5px solid rgba(26, 110, 255, 0.12);
}
.perspective-card .perspective-header {
    display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
}
.perspective-card .perspective-icon {
    width: 40px; height: 40px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
}
.perspective-card.red .perspective-icon { background: rgba(220, 38, 38, 0.1); color: #dc2626; }
.perspective-card.blue .perspective-icon { background: rgba(26, 110, 255, 0.1); color: #1a6eff; }
.perspective-card h4 { font-size: 18px; font-weight: 800; }
.perspective-card.red h4 { color: #991b1b; }
.perspective-card.blue h4 { color: #1e40af; }
.perspective-card ul { list-style: none; padding: 0; margin: 0; }
.perspective-card li {
    font-size: 13px; color: var(--text-secondary); line-height: 1.8;
    padding: 6px 0; padding-left: 20px; position: relative;
}
.perspective-card li::before {
    content: ''; position: absolute; left: 0; top: 12px;
    width: 6px; height: 6px; border-radius: 50%;
}
.perspective-card.red li::before { background: #dc2626; }
.perspective-card.blue li::before { background: #1a6eff; }

/* ===== 扩展工具库折叠 ===== */
.expand-tools {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin: 24px 0;
}
.expand-tools-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px;
    background: var(--bg-warm);
    cursor: pointer;
    border: none;
    width: 100%;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    transition: var(--transition);
}
.expand-tools-header:hover { background: #f0f4f8; }
.expand-tools-header .expand-icon {
    width: 20px; height: 20px; color: var(--text-light);
    transition: transform 0.3s ease;
}
.expand-tools.open .expand-icon { transform: rotate(180deg); }
.expand-tools-body {
    max-height: 0; overflow: hidden;
    transition: max-height 0.5s ease, padding 0.5s ease;
    padding: 0 20px;
}
.expand-tools.open .expand-tools-body {
    max-height: 2000px;
    padding: 20px;
}
.expand-category {
    margin-bottom: 20px;
}
.expand-category:last-child { margin-bottom: 0; }
.expand-category h5 {
    font-size: 13px; font-weight: 700; color: var(--text);
    margin-bottom: 10px; display: flex; align-items: center; gap: 6px;
}
.expand-category .tool-chip {
    display: inline-flex; align-items: center; gap: 6px;
    background: white; border: 1px solid var(--border);
    border-radius: 8px; padding: 8px 14px;
    font-size: 12px; color: var(--text-secondary);
    margin: 4px; transition: var(--transition);
}
.expand-category .tool-chip:hover {
    border-color: var(--primary); color: var(--primary);
    box-shadow: var(--shadow);
}
.expand-category .tool-chip .chip-icon {
    width: 20px; height: 20px; border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 700;
}

/* ===== 演练场景时间线 ===== */
.scenario-timeline {
    position: relative;
    padding-left: 32px;
    margin: 24px 0;
}
.scenario-timeline::before {
    content: '';
    position: absolute;
    left: 8px; top: 0; bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--border) 100%);
}
.timeline-item {
    position: relative;
    margin-bottom: 24px;
}
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot {
    position: absolute;
    left: -28px; top: 4px;
    width: 16px; height: 16px;
    background: white;
    border: 3px solid var(--primary);
    border-radius: 50%;
}
.timeline-item.red .timeline-dot { border-color: #dc2626; }
.timeline-item.blue .timeline-dot { border-color: #1a6eff; }
.timeline-item.purple .timeline-dot { border-color: #7c3aed; }
.timeline-content {
    background: white;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px;
}
.timeline-content h5 {
    font-size: 15px; font-weight: 700; color: var(--text);
    margin-bottom: 8px;
    display: flex; align-items: center; gap: 8px;
}
.timeline-content p {
    font-size: 13px; color: var(--text-secondary);
    line-height: 1.8; margin: 0;
}
.timeline-content .timeline-tools {
    display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap;
}
.timeline-content .timeline-tools span {
    font-size: 11px; font-weight: 600;
    padding: 3px 10px; border-radius: 100px;
    background: var(--bg-warm); color: var(--text-light);
}

/* ===== 下载浮窗 ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 24px;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.modal-overlay.show {
    display: flex;
    opacity: 1;
}
.modal-box {
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 480px;
    width: 100%;
    position: relative;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s ease;
}
.modal-overlay.show .modal-box {
    transform: translateY(0) scale(1);
}
.modal-close {
    position: absolute;
    top: 16px; right: 16px;
    width: 36px; height: 36px;
    border: none;
    background: var(--bg-warm);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
}
.modal-close:hover { background: var(--border); color: var(--text); }
.modal-icon {
    width: 64px; height: 64px;
    background: var(--primary-light);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--primary);
}
.modal-title {
    font-size: 20px; font-weight: 800; color: var(--text);
    text-align: center; margin-bottom: 6px;
}
.modal-desc {
    font-size: 13px; color: var(--text-light);
    text-align: center; margin-bottom: 24px;
}
.modal-info {
    background: var(--bg-warm);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.modal-row {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.modal-label {
    font-size: 12px; font-weight: 700; color: var(--text-light);
    text-transform: uppercase; letter-spacing: 1px;
    min-width: 60px;
}
.modal-link {
    font-size: 13px; color: var(--primary); font-weight: 600;
    text-decoration: none; word-break: break-all;
}
.modal-link:hover { text-decoration: underline; }
.modal-code {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 18px; font-weight: 700; color: var(--text);
    letter-spacing: 2px; background: white;
    padding: 6px 14px; border-radius: 8px;
    border: 1.5px solid var(--border);
}
.modal-copy {
    margin-left: auto;
    padding: 6px 14px;
    border: 1.5px solid var(--primary);
    background: transparent;
    color: var(--primary);
    font-size: 12px; font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}
.modal-copy:hover { background: var(--primary); color: white; }
.modal-copy.copied { background: var(--success); border-color: var(--success); color: white; }

/* ===== 移动端目录切换 ===== */
.mobile-toc-toggle {
    display: none;
    width: 100%;
    padding: 12px 16px;
    background: white;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    transition: var(--transition);
}
.mobile-toc-toggle:hover { border-color: var(--primary); color: var(--primary); }
.mobile-toc-toggle svg { color: var(--text-light); transition: transform 0.3s ease; }
.mobile-toc-toggle.active svg:last-child { transform: rotate(180deg); }

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .sys-layout { grid-template-columns: 1fr; gap: 32px; }
    .mobile-toc-toggle { display: flex; }
    .sys-toc {
        position: relative; top: 0; height: auto;
        max-height: 0; overflow: hidden;
        border: 1.5px solid var(--border);
        border-radius: var(--radius-sm);
        padding: 0; background: white;
        transition: max-height 0.4s ease, padding 0.4s ease;
        margin-bottom: 16px;
    }
    .sys-toc.open { max-height: 70vh; padding: 16px; overflow-y: auto; }
    .sys-toc-title { display: block; }
    .req-grid { grid-template-columns: repeat(2, 1fr); }
    .resource-grid { grid-template-columns: 1fr; }
    .scenario-flow-grid { grid-template-columns: repeat(2, 1fr); }
    .dual-perspective { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 768px) {
    .sys-hero { padding: 120px 0 60px; }
    .sys-hero h1 { font-size: clamp(22px, 6vw, 32px); }
    .sys-hero p { font-size: 15px; }
    .sys-section h2 { font-size: 22px; }
    .sys-section h3 { font-size: 17px; }
    .sys-hero-actions { flex-direction: column; align-items: center; }
    .sys-hero-btn { width: 100%; max-width: 280px; justify-content: center; }
    .mobile-toc-toggle { padding: 10px 14px; font-size: 13px; }
    .tool-tabs { flex-wrap: wrap; }
    .tool-tab { padding: 8px 14px; font-size: 13px; }
    .tool-matrix { font-size: 12px; }
    .tool-matrix th, .tool-matrix td { padding: 10px 12px; }
    .req-grid { grid-template-columns: 1fr; }
    .scenario-flow-grid { grid-template-columns: 1fr; }
    .flow-diagram { flex-direction: column; }
    .flow-arrow { transform: rotate(90deg); }
    .legal-banner { flex-direction: column; gap: 12px; padding: 20px; }
    .code-block pre { font-size: 12px; padding: 12px 16px; }
    .resource-card { flex-direction: column; gap: 12px; }
    .resource-card .res-download { margin-left: 0; width: 100%; text-align: center; }
    .modal-box { padding: 24px; }
    .modal-title { font-size: 18px; }
    .modal-code { font-size: 16px; }
    .modal-row { flex-direction: column; align-items: flex-start; gap: 8px; }
    .modal-copy { margin-left: 0; width: 100%; }
    .table-scroll-wrapper { margin: 16px 0; }
    .table-scroll-wrapper .tool-matrix { min-width: 600px; }
    .dual-perspective { grid-template-columns: 1fr; }
    .scenario-timeline { padding-left: 24px; }
    .timeline-dot { left: -22px; }
    .nav-links {
        display: none !important;
        position: absolute;
        top: 72px;
        left: 0; right: 0;
        background: white;
        flex-direction: column;
        padding: 16px 24px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.08);
        gap: 4px;
        border-bottom: 1px solid var(--border);
        z-index: 999;
    }
    .nav-links.active { display: flex !important; }
    .mobile-toggle { display: flex !important; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .footer-col img { max-width: 100%; height: auto; display: block; }
}
