/* ========================================
   CAD 算量工具箱 - 营销页组件（2026-11 改版新增）
   只放首页/功能页/下载页的新块，通用部分仍在 style.css
   颜色一律走变量，日夜两套主题都成立
   ======================================== */

/* --- Hero 标题：修正日间模式下开头几字看不见 ---
   style.css 里的渐变从 #f0f0ff（接近白）起头，浅色主题下白底白字，
   标题第一行几乎不可读。这里按主题分开：
     日间：从主色起头，保证对比度；
     夜间：保留原样的亮起头（深底上正合适）。 */
.hero h1 {
    background: linear-gradient(135deg, var(--accent-from) 0%, var(--accent-mid) 48%, var(--accent-to) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

:root[data-theme="dark"] .hero h1 {
    background: linear-gradient(135deg, #f0f0ff 12%, var(--accent-from) 52%, var(--accent-to) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- Hero 信任条 --- */
.trust-bar {    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    justify-content: center;
    margin-top: 26px;
    font-size: 13px;
    color: var(--text-secondary);
}

.trust-item b {
    color: var(--text-primary);
    font-weight: 600;
}

/* --- 模块矩阵 --- */
.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 18px;
}

.module-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px 22px 18px;
    display: flex;
    flex-direction: column;
    transition: border-color .2s, transform .2s;
}

.module-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.module-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.module-icon {
    font-size: 22px;
    line-height: 1.2;
}

.module-head h3 {
    font-size: 16px;
    margin-bottom: 2px;
}

.module-tag {
    font-size: 12.5px;
    color: var(--text-muted);
}

.module-count {
    display: inline-block;
    align-self: flex-start;
    margin: 12px 0 10px;
    padding: 2px 9px;
    font-size: 12px;
    border-radius: 999px;
    color: var(--accent-from);
    background: var(--accent-glow);
    border: 1px solid var(--accent-glow-strong);
}

.module-list {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
    font-size: 13px;
    color: var(--text-secondary);
    flex: 1;
}

.module-list li {
    position: relative;
    padding-left: 14px;
    margin-bottom: 7px;
    line-height: 1.55;
}

.module-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent-from);
    opacity: .7;
}

.module-more {
    font-size: 13px;
    color: var(--accent-from);
    text-decoration: none;
}

.module-more:hover {
    text-decoration: underline;
}

/* --- 三步 --- */
.step-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.step-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px;
}

.step-num {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--accent-from), var(--accent-to));
    margin-bottom: 14px;
}

.step-item h3 {
    font-size: 15px;
    margin-bottom: 6px;
}

.step-item p {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* --- 兼容性横条 --- */
.compat-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1px;
    background: var(--border-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.compat-item {
    background: var(--bg-secondary);
    padding: 18px 20px;
}

.compat-item b {
    display: block;
    font-size: 14px;
    margin-bottom: 3px;
}

.compat-item span {
    font-size: 12.5px;
    color: var(--text-muted);
}

/* --- 功能页 --- */
.anchor-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.anchor-nav a {
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 13px;
    text-decoration: none;
    transition: border-color .2s, color .2s;
}

.anchor-nav a:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.module-section {
    padding: 34px 0;
    border-top: 1px solid var(--border-color);
    scroll-margin-top: calc(var(--nav-height) + 16px);
}

.module-section-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 16px;
}

.module-icon-lg {
    font-size: 26px;
    line-height: 1.3;
}

.module-section-head h2 {
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.module-section-head p {
    color: var(--text-muted);
    font-size: 13.5px;
    margin-top: 3px;
}

.module-count-inline {
    font-size: 12px;
    font-weight: 400;
    padding: 2px 9px;
    border-radius: 999px;
    color: var(--accent-from);
    background: var(--accent-glow);
    border: 1px solid var(--accent-glow-strong);
}

.detail-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 8px 26px;
}

.detail-list li {
    position: relative;
    padding-left: 16px;
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.detail-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-from);
    font-size: 12px;
}

/* --- 两种算量方式 --- */
.compare-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px;
}

.compare-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px;
}

.compare-card h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.compare-sub {
    font-size: 12.5px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.compare-card ul {
    margin: 0;
    padding-left: 18px;
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.75;
}

/* --- 下载页 --- */
.dl-hero {
    /* 导航是 fixed，首屏必须让开 64px，否则版本徽标被压住 */
    padding: calc(var(--nav-height) + 36px) 0 8px;
}

/* 下载页首屏下面紧跟的 .page-section 已经含一次 nav 让位，这里只留常规间距 */
.dl-hero + .page-section {
    padding-top: 44px;
}

.dl-hero-inner {
    text-align: center;
}

.dl-badge {
    display: inline-block;
    font-size: 12.5px;
    color: var(--accent-from);
    background: var(--accent-glow);
    border: 1px solid var(--accent-glow-strong);
    border-radius: 999px;
    padding: 4px 12px;
    margin-bottom: 16px;
}

.dl-hero h1 {
    font-size: 32px;
    margin-bottom: 12px;
}

.dl-sub {
    max-width: 640px;
    margin: 0 auto;
    color: var(--text-secondary);
    font-size: 14.5px;
    line-height: 1.75;
}

.dl-actions {
    margin: 26px 0 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.dl-btn {
    min-width: 260px;
}

.dl-hint {
    font-size: 12.5px;
    color: var(--text-muted);
}

.dl-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 20px;
    font-size: 12.5px;
    color: var(--text-muted);
    padding-bottom: 26px;
    border-bottom: 1px solid var(--border-color);
}

.dl-meta b {
    color: var(--text-secondary);
    font-weight: 600;
}

.block-title {
    font-size: 19px;
    margin-bottom: 18px;
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.spec-table th,
.spec-table td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
}

.spec-table th {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 12.5px;
}

.spec-table td {
    color: var(--text-secondary);
}

.table-note {
    margin-top: 10px;
    font-size: 12.5px;
    color: var(--text-muted);
}

.faq-list {
    display: grid;
    gap: 10px;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 18px;
}

.faq-item summary {
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
}

.faq-item p {
    margin-top: 10px;
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.75;
}

.faq-item code {
    font-family: var(--font-mono);
    font-size: 12.5px;
    background: var(--bg-tertiary);
    padding: 1px 5px;
    border-radius: 4px;
}

.dl-footer-note {
    margin-top: 34px;
    font-size: 13px;
    color: var(--text-muted);
}

.dl-footer-note a {
    color: var(--accent-from);
    text-decoration: none;
}

@media (max-width: 720px) {
    .dl-hero h1 { font-size: 26px; }
    .detail-list { grid-template-columns: 1fr; }
}

/* --- 人群 --- */
.persona-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.persona-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px 20px;
}

.persona-card h3 {
    font-size: 14.5px;
    margin-bottom: 6px;
}

.persona-card p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* --- 谁做的 --- */
.about-section {
    border-top: 1px solid var(--border-color);
}

.about-inner {
    max-width: 680px;
}

.about-inner h2 {
    font-size: 22px;
    margin-bottom: 14px;
}

.about-inner p {
    font-size: 14.5px;
    color: var(--text-secondary);
    line-height: 1.85;
    margin-bottom: 12px;
}

/* --- 路线图 --- */
.roadmap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.roadmap-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
}

.roadmap-card h3 {
    font-size: 15px;
    margin-bottom: 4px;
}

.roadmap-sub {
    font-size: 12.5px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    font-size: 12.5px;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

/* 计划中的：虚线边，不跟已发布的功能抢注意力 */
.tag-soon {
    border-style: dashed;
    color: var(--text-muted);
}

/* --- 社区 --- */
.community-card {
    background: linear-gradient(135deg, var(--accent-glow), transparent 70%);
    border: 1px solid var(--accent-glow-strong);
    border-radius: var(--radius-xl);
    padding: 32px;
    text-align: center;
}

.community-card h2 {
    font-size: 21px;
    margin-bottom: 10px;
}

.community-card p {
    max-width: 560px;
    margin: 0 auto 20px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.75;
}

.community-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    justify-content: center;
}

.community-note {
    font-size: 13px;
    color: var(--text-muted);
}

.community-note b {
    color: var(--text-secondary);
}

/* --- 图纸即数据库 --- */
.db-section {
    border-top: 1px solid var(--border-color);
    /* 带锚点跳转时给固定导航让位 */
    scroll-margin-top: calc(var(--nav-height) + 16px);
}

.db-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, 1fr);
    gap: 36px;
    align-items: center;
}

.db-text h2 {
    font-size: 24px;
    margin-bottom: 12px;
}

.db-lead {
    font-size: 14.5px;
    line-height: 1.85;
    color: var(--text-secondary);
    margin-bottom: 18px;
}

.db-lead b {
    color: var(--text-primary);
}

.db-points {
    list-style: none;
    margin: 0;
    padding: 0;
}

.db-points li {
    position: relative;
    padding-left: 18px;
    margin-bottom: 12px;
    font-size: 13.5px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.db-points li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 6px;
    height: 6px;
    border-radius: 2px;
    background: linear-gradient(135deg, var(--accent-from), var(--accent-to));
}

.db-points b {
    display: block;
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 2px;
}

.db-visual {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px;
    background: var(--bg-secondary);
}

.db-layer {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    padding: 12px 14px;
    margin-bottom: 8px;
}

.db-layer-top {
    border-color: var(--accent-glow-strong);
    background: linear-gradient(135deg, var(--accent-glow), transparent);
}

.db-layer-title {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.db-layer-note {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.db-arrow {
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    margin: 2px 0 8px;
}

@media (max-width: 860px) {
    .db-inner { grid-template-columns: 1fr; gap: 22px; }
}

/* --- 首页四卡（2×2） --- */
.features-grid.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
}

/* --- AI / MCP --- */
.ai-section {
    border-top: 1px solid var(--border-color);
    scroll-margin-top: calc(var(--nav-height) + 16px);
}

.ai-terminal {
    margin: 4px auto 26px;
    max-width: 720px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-tertiary);
}

.ai-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.ai-bar span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--border-hover);
}

.ai-bar em {
    margin-left: auto;
    font-style: normal;
    font-size: 11.5px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.ai-body {
    padding: 16px 18px;
    font-family: var(--font-mono);
    font-size: 12.5px;
    line-height: 1.9;
}

.ai-say {
    color: var(--text-primary);
    margin-bottom: 2px;
}

.ai-say::before {
    content: '› ';
    color: var(--accent-from);
}

.ai-run {
    color: var(--text-muted);
    margin-bottom: 12px;
    padding-left: 14px;
}

.ai-run:last-child {
    margin-bottom: 0;
}

.ai-api {
    color: var(--accent-from);
}

.ai-points {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin-bottom: 16px;
}

.ai-points > div {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.ai-points b {
    display: block;
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 4px;
}

.ai-note {
    font-size: 12.5px;
    color: var(--text-muted);
    text-align: center;
}

/* --- 首页主标语（含 AI 的长标题）与 MCP 小字 --- */
.hero h1 {
    /* 标题从 10 字变成 18 字：原来的 clamp(38px,6.5vw,68px) 会撑成三行。
       上限取 44px —— 18 个汉字 × 44 再减字距刚好塞进 820px 的内容宽度，
       桌面上能保持一行；再大就会在 "CAD" 中间断行。 */
    font-size: clamp(30px, 3.9vw, 44px);
    line-height: 1.18;
    letter-spacing: -1px;
    margin-bottom: 14px;
}

.hero-mcp {
    font-size: 13px;
    line-height: 1.4;
    letter-spacing: 0.4px;
    margin: 0 auto 22px;
}

.hero-mcp a {
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 1px dashed var(--border-hover);
    padding-bottom: 1px;
}

.hero-mcp a:hover {
    color: var(--accent-from);
    border-bottom-color: var(--accent-glow-strong);
}

/* --- 「为什么只支持 2025+」小字说明 --- */
.why-note {
    margin-top: 18px;
    max-width: 720px;
    padding: 16px 18px;
    border: 1px dashed var(--border-hover);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    scroll-margin-top: calc(var(--nav-height) + 16px);
}

.why-note h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.why-note p,
.why-note li {
    font-size: 12.5px;
    line-height: 1.8;
    color: var(--text-muted);
}

.why-note ul {
    list-style: none;
    margin: 8px 0;
    padding: 0;
}

.why-note li {
    position: relative;
    padding-left: 14px;
    margin-bottom: 6px;
}

.why-note li::before {
    content: '·';
    position: absolute;
    left: 4px;
    color: var(--accent-from);
}

.why-note b {
    color: var(--text-secondary);
    font-weight: 600;
}

.why-note-tail {
    margin-top: 6px;
}

/* --- 路线图卡里的补充说明 --- */
.roadmap-note {
    margin-top: 12px;
    font-size: 12px;
    line-height: 1.7;
    color: var(--text-muted);
}

.roadmap-note a {
    color: var(--accent-from);
    text-decoration: none;
}

.roadmap-note a:hover {
    text-decoration: underline;
}

/* --- 界面截图 --- */
.shots-section {
    border-top: 1px solid var(--border-color);
    scroll-margin-top: calc(var(--nav-height) + 16px);
}

.shot-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.shot-tab {
    font: inherit;
    font-size: 13px;
    padding: 6px 16px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    transition: border-color .2s, color .2s;
}

.shot-tab:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.shot-tab.active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--accent-from), var(--accent-to));
}

.shot-stage {
    margin: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #1e1e28;
}

.shot-stage a {
    display: block;
    line-height: 0;
}

.shot-stage img {
    width: 100%;
    height: auto;
    display: block;
}

.shot-cap {
    font-size: 12.5px;
    color: var(--text-secondary);
    padding: 10px 14px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    line-height: 1.6;
}

