/* ============ 法智引擎 自定义样式 ============ */

/* 容器 */
.container {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

/* 导航高亮 */
nav a.active {
    color: #1e3a5f;
    font-weight: 600;
}

/* 次级导航下拉 */
.sub-nav {
    display: none;
    position: absolute;
    background: white;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 8px 0;
    min-width: 160px;
}
nav li:hover .sub-nav {
    display: block;
}

/* 工具卡片悬停 */
.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -8px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

/* FAQ手风琴：默认全部展开，点击收起 */
.faq-answer {
    max-height: 600px;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding-bottom: 16px !important;
}
.faq-item.collapsed .faq-answer {
    max-height: 0;
    padding-bottom: 0 !important;
}
.faq-item.collapsed .faq-icon {
    transform: rotate(0deg);
}
.faq-item .faq-icon {
    transform: rotate(180deg);
}

/* 付费内容模糊遮罩 */
.paywall-overlay {
    position: relative;
}
.paywall-overlay::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(transparent, white);
    pointer-events: none;
}

/* 标签切换按钮 */
.tab-btn.active {
    background-color: #1e3a5f;
    color: #ffffff;
}
.filter-btn.active {
    background-color: #1e3a5f;
    color: #ffffff;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* ============================================================
   文章正文排版系统（替代失效的 Tailwind prose 插件）
   目标：极致中文阅读体验 —— 舒适行距、清晰段距、专业层次
   ============================================================ */
.article-content {
    --ac-text: #374151;          /* 正文主色，柔黑不刺眼 */
    --ac-heading: #1e3a5f;       /* 品牌主色，用于标题 */
    --ac-sub: #2c5282;           /* 次级标题 */
    --ac-accent: #f59e0b;        /* 品牌辅色，用于强调点 */
    --ac-link: #1e3a5f;
    --ac-border: #e5e7eb;
    --ac-soft: #f8fafc;

    max-width: 46rem;            /* 约束阅读行宽，约 38 中文字/行 */
    margin: 0 auto;              /* 居中阅读列 */
    color: var(--ac-text);
    font-size: 17px;
    line-height: 1.95;           /* 中文舒适行距 */
    font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Noto Sans SC", "Source Han Sans SC", sans-serif;
    word-break: break-word;
    letter-spacing: .01em;
}

/* 段落：用段距分隔，不用首行缩进（更现代、更清晰） */
.article-content p {
    margin: 0 0 1.45em;
    line-height: 1.95;
}
/* 首段作导语：略大略深，建立阅读节奏 */
.article-content > p:first-of-type {
    font-size: 1.06em;
    color: #1f2937;
    line-height: 1.9;
}

/* 标题层次 */
.article-content h2 {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--ac-heading);
    line-height: 1.4;
    margin: 2em 0 .85em;
    padding-bottom: .4em;
    border-bottom: 1px solid var(--ac-border);
    letter-spacing: .01em;
}
.article-content h3 {
    font-size: 1.22em;
    font-weight: 700;
    color: var(--ac-sub);
    line-height: 1.45;
    margin: 1.7em 0 .7em;
    padding-left: .75em;
    border-left: 4px solid var(--ac-accent);
}
.article-content h4 {
    font-size: 1.08em;
    font-weight: 700;
    color: var(--ac-sub);
    margin: 1.4em 0 .6em;
}

/* 重要内容强调：加粗 + 主色，让关键词自然跳出来 */
.article-content strong,
.article-content b {
    color: var(--ac-heading);
    font-weight: 700;
}

/* 链接 */
.article-content a {
    color: var(--ac-link);
    text-decoration: underline;
    text-decoration-color: rgba(30, 58, 95, .35);
    text-underline-offset: 3px;
    font-weight: 600;
    transition: color .2s ease;
}
.article-content a:hover {
    color: var(--ac-accent);
    text-decoration-color: var(--ac-accent);
}

/* 列表：自定义标记，层次分明 */
.article-content ul {
    list-style: none;
    padding-left: 0;
    margin: 0 0 1.5em;
}
.article-content ul > li {
    position: relative;
    padding-left: 1.6em;
    margin-bottom: .75em;
    line-height: 1.85;
}
.article-content ul > li::before {
    content: "";
    position: absolute;
    left: .25em;
    top: .72em;
    width: .42em;
    height: .42em;
    background: var(--ac-accent);
    border-radius: 2px;
    transform: rotate(0deg);
}
.article-content ol {
    padding-left: 1.6em;
    margin: 0 0 1.5em;
}
.article-content ol > li {
    margin-bottom: .75em;
    line-height: 1.85;
    padding-left: .2em;
}
.article-content li > ul,
.article-content li > ol {
    margin-top: .6em;
    margin-bottom: 0;
}

/* 引用 / blockquote */
.article-content blockquote {
    margin: 1.7em 0;
    padding: 1em 1.3em;
    background: var(--ac-soft);
    border-left: 4px solid var(--ac-heading);
    border-radius: 0 8px 8px 0;
    color: #475569;
    line-height: 1.9;
}
.article-content blockquote p {
    margin: 0;
}

/* 提示框（由「法智引擎提示」段落升级而来） */
.article-content .article-tip {
    margin: 1.9em 0;
    padding: 1.1em 1.3em;
    background: linear-gradient(180deg, #f0f6fc 0%, #eef4fb 100%);
    border: 1px solid #d6e4f0;
    border-left: 4px solid var(--ac-heading);
    border-radius: 10px;
    box-shadow: 0 2px 10px -6px rgba(30, 58, 95, .25);
}
.article-content .article-tip__label {
    display: block;
    font-weight: 700;
    color: var(--ac-heading);
    font-size: .95em;
    letter-spacing: .04em;
    margin-bottom: .5em;
}
.article-content .article-tip__label::before {
    content: "◆";
    color: var(--ac-accent);
    margin-right: .45em;
    font-size: .85em;
}
.article-content .article-tip__body {
    line-height: 1.9;
    color: #334155;
}
.article-content .article-tip__body a {
    color: var(--ac-heading);
}

/* 图片 */
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1.8em auto;
    display: block;
    box-shadow: 0 6px 20px -12px rgba(0, 0, 0, .35);
}

/* 分隔线 */
.article-content hr {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, #d1d5db, transparent);
    margin: 2.4em 0;
}

/* 表格 */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.7em 0;
    font-size: .95em;
    overflow: hidden;
    border-radius: 8px;
}
.article-content th,
.article-content td {
    border: 1px solid var(--ac-border);
    padding: .7em .9em;
    text-align: left;
    line-height: 1.6;
}
.article-content th {
    background: var(--ac-soft);
    color: var(--ac-heading);
    font-weight: 700;
}
.article-content tbody tr:nth-child(even) {
    background: #fcfdff;
}

/* 行内代码 */
.article-content code {
    background: #eef2f7;
    color: var(--ac-heading);
    padding: .12em .4em;
    border-radius: 4px;
    font-size: .9em;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

/* 移动端微调 */
@media (max-width: 768px) {
    .article-content {
        font-size: 16px;
        line-height: 1.85;
    }
    .article-content h2 { font-size: 1.35em; }
    .article-content h3 { font-size: 1.15em; }
    .article-content ul > li { padding-left: 1.4em; }
}
