/* ===== AI 产品经理知识库（ai-pm-wiki） =====
   基于 pm-library.css 的通用结构，补充路线卡、目录分组与长文排版。 */

/* 来源卡：去掉左侧竖线，四角圆角 */
.bt-source-box.ap-source-box {
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md);
}

/* ===== 7 周路线 ===== */
.ap-route-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}

.ap-route {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.ap-route:hover {
    border-color: #000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.ap-route-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ap-route-week {
    font-family: var(--font-num);
    font-size: 12px;
    letter-spacing: 0.12em;
    color: #9a9a9a;
}

.ap-route-no {
    font-family: var(--font-num);
    font-size: 12px;
    color: #c8c8c8;
}

.ap-route-title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
    line-height: 1.4;
    color: #000;
    margin: 0;
    overflow-wrap: anywhere;
}

.ap-route-goal {
    font-size: 13.5px;
    line-height: 1.8;
    color: #5f5f5f;
    margin: 0;
}

.ap-route-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ap-route-links a {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 6px 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 999px;
    font-size: 12.5px;
    line-height: 1.5;
    color: #333;
    text-decoration: none;
    overflow-wrap: anywhere;
    transition: border-color 0.18s ease, color 0.18s ease;
}

.ap-route-links a:hover {
    border-color: #000;
    color: #000;
}

.ap-route-foot {
    display: grid;
    gap: 8px;
    margin: auto 0 0;
    padding-top: 12px;
    border-top: 1px dashed rgba(0, 0, 0, 0.12);
}

.ap-route-foot div {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 8px;
}

.ap-route-foot dt {
    font-family: var(--font-num);
    font-size: 11px;
    letter-spacing: 0.08em;
    color: #9a9a9a;
}

.ap-route-foot dd {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.7;
    color: #6b6b6b;
}

/* ===== 精读 / 全量目录分组 ===== */
.ap-cat-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 0 4px;
    margin: 32px 0 12px;
}

.ap-cat-head h3 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
    color: #000;
    margin: 0;
}

.ap-cat-head span {
    font-family: var(--font-num);
    font-size: 11.5px;
    letter-spacing: 0.08em;
    color: #9a9a9a;
    white-space: nowrap;
}

.ap-picks-group:first-of-type .ap-cat-head {
    margin-top: 0;
}

.ap-catalog-group {
    scroll-margin-top: 96px;
}

.ap-catalog-group[hidden] {
    display: none;
}

.ap-catalog-group + .ap-catalog-group {
    margin-top: 28px;
}

.ap-catalog-row .bt-book-title {
    font-size: 16px;
    font-weight: 500;
}

.ap-catalog-row .bt-book-no {
    color: #c8c8c8;
}

/* ===== 文章正文 ===== */
.ap-article {
    max-width: 780px;
}

.ap-article h2 {
    font-family: var(--font-display);
    font-size: 23px;
    font-weight: 600;
    line-height: 1.5;
    color: #000;
    margin: 40px 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    scroll-margin-top: 96px;
}

.ap-article h3 {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 600;
    line-height: 1.5;
    color: #000;
    margin: 28px 0 12px;
    scroll-margin-top: 96px;
}

.ap-article h4 {
    font-size: 15.5px;
    font-weight: 600;
    line-height: 1.6;
    color: #000;
    margin: 22px 0 10px;
}

.ap-article ul,
.ap-article ol {
    margin: 0 0 18px;
    padding-left: 1.35em;
}

.ap-article li {
    margin: 0 0 8px;
}

.ap-article blockquote {
    margin: 0 0 20px;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.03);
    border-left: 2px solid #000;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: #555;
    font-size: 15px;
}

.ap-article blockquote p {
    margin: 0 0 8px;
}

.ap-article blockquote p:last-child {
    margin-bottom: 0;
}

.ap-article code {
    font-family: var(--font-en-01), monospace;
    font-size: 0.88em;
    background: rgba(0, 0, 0, 0.06);
    padding: 2px 6px;
    border-radius: 4px;
}

.ap-article pre {
    margin: 0 0 22px;
    padding: 16px 18px;
    background: #111;
    color: #f2f2f2;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.75;
}

.ap-article pre code {
    background: none;
    color: inherit;
    padding: 0;
    font-size: inherit;
}

.ap-article img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 20px 0;
    border-radius: var(--radius-sm);
}

.ap-article hr {
    border: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin: 32px 0;
}

/* 未收录的面经链接：保留文字，不再跳 GitHub */
.ap-link-off {
    color: #8a8a8a;
    cursor: help;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.2);
}

.ap-link-off-mark {
    display: inline-block;
    margin-left: 4px;
    padding: 0 4px;
    font-size: 10px;
    line-height: 1.5;
    color: #9a9a9a;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
    vertical-align: 1px;
    white-space: nowrap;
}

.ap-article .bt-table-wrap {
    margin: 0 0 22px;
}

.ap-article .bt-table-wrap table {
    font-size: 13.5px;
}

/* ===== 响应式 ===== */
@media (max-width: 968px) {
    .ap-route-grid {
        grid-template-columns: 1fr;
    }

    .ap-route {
        padding: 18px;
    }

    .ap-route-title {
        font-size: 20px;
    }

    .ap-article {
        font-size: 16px;
    }
}

@media (max-width: 600px) {
    .bt-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .bt-nav-link {
        min-width: 0;
    }

    .bt-source-box.ap-source-box {
        padding: 18px 20px;
    }

    .ap-route-links a {
        font-size: 12px;
    }

    .ap-cat-head h3 {
        font-size: 18px;
    }
}
