/* ══════════════════════════════════════════════════════════
   高湾AI学习宝典 · 专属页样式（/handbook）
   复用 theme.css 变量；组件命名统一 hb- 前缀
   ══════════════════════════════════════════════════════════ */

/* ── 封面 ─────────────────────────────────────────────── */
.hb-hero { padding: calc(var(--nav-height) + 56px) 0 40px; }
.hb-hero-card {
    background: linear-gradient(160deg, #2C2118 0%, #4A3728 62%, #5C4433 100%);
    color: #FBF6EC;
    border-radius: var(--radius-lg);
    padding: 52px 56px 40px;
    box-shadow: 0 10px 40px rgba(51, 38, 28, .28);
    position: relative; overflow: hidden;
}
.hb-hero-card::after {  /* 右侧淡金装饰环 */
    content: ""; position: absolute; right: -90px; top: -90px;
    width: 300px; height: 300px; border-radius: 50%;
    border: 44px solid rgba(232, 96, 12, .16);
}
.hb-hero-kicker {
    display: inline-block; font-size: .8rem; letter-spacing: .3em;
    color: #F2C08C; border: 1px solid rgba(242, 192, 140, .5);
    padding: 6px 14px 6px 17px; border-radius: 2px; margin-bottom: 22px;
}
.hb-hero-card h1 {
    font-family: var(--font-serif); font-size: 2.5rem; line-height: 1.3;
    letter-spacing: .06em; margin-bottom: 10px; color: #FFF8EE;
}
.hb-hero-sub { font-size: 1.06rem; letter-spacing: .18em; color: #E8D5BC; margin-bottom: 24px; }
.hb-hero-meta {
    display: flex; flex-wrap: wrap; gap: 8px 26px;
    font-size: .84rem; color: #CDB79B; letter-spacing: .06em;
    padding-top: 18px; border-top: 1px dashed rgba(251, 246, 236, .25);
}
.hb-hero-card .ai-note { color: #B7A289; margin-top: 14px; font-size: .78rem; }

/* 主讲人简介 */
.hb-host { margin-top: 26px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.hb-host-item {
    background: var(--paper); border: 1px solid var(--hairline);
    border-radius: var(--radius-lg); padding: 22px 24px;
    box-shadow: var(--shadow-card);
}
.hb-host-item h4 {
    font-size: .92rem; letter-spacing: .12em; color: var(--orange-deep);
    margin-bottom: 10px; font-weight: 700;
}
.hb-host-item p { font-size: .88rem; line-height: 1.85; color: #3D3128; }
.hb-host-quote {
    grid-column: 1 / -1; text-align: center;
    font-family: var(--font-serif); font-size: 1.06rem; letter-spacing: .1em;
    color: var(--brown); padding: 4px 0 2px;
}
.hb-host-quote em { display: block; font-size: .78rem; color: var(--muted); margin-top: 6px; letter-spacing: .14em; }

/* ── 吸顶章节导航 ─────────────────────────────────────── */
.hb-toc {
    position: sticky; top: var(--nav-height); z-index: 60;
    background: rgba(253, 249, 242, .95);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
    margin: 34px 0 8px;
}
.hb-toc-inner {
    max-width: var(--container); margin: 0 auto; padding: 0 24px;
    display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
}
.hb-toc-inner::-webkit-scrollbar { display: none; }
.hb-toc a {
    flex: none; padding: 12px 15px; font-size: .88rem; letter-spacing: .05em;
    color: var(--muted); text-decoration: none; white-space: nowrap;
    border-bottom: 2px solid transparent; transition: color .2s, border-color .2s;
}
.hb-toc a:hover { color: var(--orange-deep); }
.hb-toc a.active { color: var(--orange-deep); font-weight: 700; border-bottom-color: var(--orange); }

/* ── 章节骨架 ─────────────────────────────────────────── */
.hb-chapter { padding: 58px 0 10px; }
.hb-chapter + .hb-chapter { border-top: 1px solid var(--hairline); }
.hb-ch-head { margin-bottom: 30px; }
.hb-ch-no {
    display: inline-block; font-family: var(--font-serif); font-size: .82rem;
    letter-spacing: .34em; color: var(--orange-deep); font-weight: 700;
    border-left: 3px solid var(--orange); padding-left: 12px; margin-bottom: 12px;
}
.hb-ch-head h2 {
    font-family: var(--font-serif); font-size: 1.72rem; line-height: 1.45;
    color: var(--brown); letter-spacing: .04em; margin-bottom: 12px;
}
.hb-ch-lead {
    font-size: .95rem; line-height: 1.95; color: var(--muted);
    background: var(--paper-warm); border-radius: var(--radius);
    padding: 12px 18px; display: inline-block;
}
.hb-body { font-size: 1rem; line-height: 2; color: #3D3128; }
.hb-body > p { margin-bottom: 1.2em; }
.hb-body strong { color: var(--orange-deep); font-weight: 700; }
.hb-h3 {
    font-size: 1.14rem; font-weight: 700; color: var(--brown);
    letter-spacing: .04em; margin: 2.2em 0 .8em;
    display: flex; align-items: center; gap: 10px;
}
.hb-h3::before { content: ""; width: 8px; height: 8px; background: var(--orange); border-radius: 2px; flex: none; }

/* ── 组件：焦虑/要点多卡网格 ──────────────────────────── */
.hb-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 26px 0; }
.hb-cards.col2 { grid-template-columns: repeat(2, 1fr); }
.hb-cards.col4 { grid-template-columns: repeat(4, 1fr); }
.hb-card {
    background: var(--paper); border: 1px solid var(--hairline);
    border-top: 3px solid var(--orange);
    border-radius: var(--radius-lg); padding: 24px 22px;
    box-shadow: var(--shadow-card);
}
.hb-card .hb-card-ico { font-size: 1.5rem; margin-bottom: 10px; display: block; }
.hb-card h4 { font-size: 1.02rem; color: var(--brown); margin-bottom: 8px; letter-spacing: .04em; }
.hb-card h4 em { font-style: normal; color: var(--orange-deep); font-size: .84rem; margin-left: 6px; }
.hb-card p { font-size: .9rem; line-height: 1.85; color: #3D3128; }
.hb-card p + p { margin-top: .6em; }

/* 序章六章地图：3×2 编号网格 */
.hb-map { grid-template-columns: repeat(3, 1fr); }
.hb-map .hb-card { padding: 16px 18px; border-top-width: 2px; }
.hb-map .hb-card h4 { margin-bottom: 2px; }
.hb-map .hb-card h4 em { display: block; margin: 0 0 2px; font-size: .74rem; letter-spacing: .18em; }
.hb-map .hb-card p { font-size: .84rem; color: var(--muted); }
@media (max-width: 860px) { .hb-map { grid-template-columns: repeat(2, 1fr); } }

/* ── 组件：结论卡 ─────────────────────────────────────── */
.hb-conclusion {
    display: flex; gap: 16px; align-items: flex-start;
    background: var(--paper-warm); border: 1px solid var(--hairline-strong);
    border-radius: var(--radius-lg); padding: 18px 22px; margin: 16px 0;
}
.hb-conclusion .no {
    flex: none; width: 34px; height: 34px; border-radius: 50%;
    background: var(--brown); color: #FBF6EC;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-serif); font-weight: 700; font-size: .95rem;
}
.hb-conclusion p { font-size: .96rem; line-height: 1.9; }
.hb-conclusion p b { color: var(--orange-deep); }

/* ── 组件：插图 ───────────────────────────────────────── */
.hb-figure { margin: 26px 0; text-align: center; }
.hb-figure svg { max-width: 100%; height: auto; }
.hb-figure img {
    max-width: 100%; border-radius: var(--radius);
    border: 1px solid var(--hairline); background: #fff;
}
.hb-figure figcaption {
    font-size: .82rem; color: var(--muted); margin-top: 10px; letter-spacing: .04em;
}
.hb-figure figcaption b { color: var(--brown); }

/* ── 组件：时间线 ─────────────────────────────────────── */
.hb-timeline { display: flex; gap: 0; margin: 26px 0; position: relative; }
.hb-timeline::before {
    content: ""; position: absolute; left: 8%; right: 8%; top: 21px;
    border-top: 2px dashed var(--hairline-strong);
}
.hb-tl-item { flex: 1; text-align: center; position: relative; padding: 0 12px; }
.hb-tl-item .yr {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--orange); color: #FFF8EE; font-weight: 700; font-size: .82rem;
    position: relative; z-index: 1; margin-bottom: 10px;
}
.hb-tl-item h5 { font-size: .98rem; color: var(--brown); margin-bottom: 6px; }
.hb-tl-item p { font-size: .85rem; line-height: 1.8; color: var(--muted); }

/* ── 组件：流程箭头 ───────────────────────────────────── */
.hb-flow { display: flex; align-items: stretch; gap: 0; margin: 26px 0; flex-wrap: wrap; }
.hb-flow-node {
    flex: 1; min-width: 150px; text-align: center;
    background: var(--paper); border: 1px solid var(--hairline-strong);
    border-radius: var(--radius-lg); padding: 16px 14px;
    font-size: .94rem; font-weight: 700; color: var(--brown); letter-spacing: .06em;
}
.hb-flow-node small { display: block; font-weight: 400; font-size: .8rem; color: var(--muted); margin-top: 6px; letter-spacing: 0; }
.hb-flow-arrow {
    flex: none; align-self: center; padding: 0 10px;
    color: var(--orange); font-size: 1.2rem; font-weight: 700;
}

/* ── 组件：案例框 ─────────────────────────────────────── */
.hb-case {
    border: 1px solid var(--hairline-strong); border-radius: var(--radius-lg);
    background: var(--paper); margin: 26px 0; overflow: hidden;
    box-shadow: var(--shadow-card);
}
.hb-case-head {
    background: var(--brown); color: #FBF6EC;
    padding: 13px 22px; font-size: .96rem; font-weight: 700; letter-spacing: .08em;
}
.hb-case-head em { font-style: normal; font-size: .78rem; color: #E8D5BC; margin-left: 10px; letter-spacing: .1em; }
.hb-case-body { padding: 22px 24px; font-size: .93rem; line-height: 1.95; }
.hb-case-body h5 { font-size: .94rem; color: var(--orange-deep); margin: 1.3em 0 .5em; letter-spacing: .06em; }
.hb-case-body h5:first-child { margin-top: 0; }
.hb-case-body ul { margin: 0 0 1em 1.3em; }
.hb-case-body li { margin-bottom: .4em; }

/* ── 组件：能做/不能做双栏 ────────────────────────────── */
.hb-vs { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 26px 0; }
.hb-vs-col { border-radius: var(--radius-lg); padding: 22px 24px; border: 1px solid; }
.hb-vs-col.can { background: #F4F8F1; border-color: #CBDCC2; }
.hb-vs-col.cant { background: #FBF1EC; border-color: #E8C9B8; }
.hb-vs-col h4 { font-size: 1rem; margin-bottom: 12px; letter-spacing: .08em; }
.hb-vs-col.can h4 { color: #4A7A3D; }
.hb-vs-col.cant h4 { color: #B4552D; }
.hb-vs-col ul { margin: 0 0 0 1.2em; font-size: .92rem; line-height: 1.9; }
.hb-vs-col li { margin-bottom: .5em; }
.hb-vs-col li::marker { color: inherit; }

/* ── 组件：阶梯步骤 ───────────────────────────────────── */
.hb-steps { margin: 26px 0; display: flex; flex-direction: column; gap: 0; }
.hb-step {
    display: flex; gap: 18px; align-items: flex-start;
    padding: 16px 20px 16px 0; border-left: 2px solid var(--hairline-strong);
    margin-left: 21px; position: relative;
}
.hb-step::before {
    content: attr(data-no); position: absolute; left: -22px; top: 14px;
    width: 42px; height: 42px; border-radius: 50%;
    background: var(--paper); border: 2px solid var(--orange); color: var(--orange-deep);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-serif); font-weight: 700;
}
.hb-step:last-child { border-left-color: transparent; }
.hb-step-body { padding-left: 34px; }
.hb-step-body h4 { font-size: 1.02rem; color: var(--brown); margin-bottom: 6px; letter-spacing: .04em; }
.hb-step-body p { font-size: .92rem; line-height: 1.9; }
.hb-tools { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.hb-tools span {
    font-size: .78rem; padding: 4px 12px; border-radius: 999px;
    background: var(--paper-warm); border: 1px solid var(--hairline-strong);
    color: var(--brown); letter-spacing: .04em;
}
.hb-tools span i { font-style: normal; color: var(--muted); margin-right: 4px; }

/* ── 组件：金句 ───────────────────────────────────────── */
.hb-quote {
    margin: 26px 0; padding: 20px 28px;
    border-left: 4px solid var(--orange); background: var(--paper-warm);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    font-family: var(--font-serif); font-size: 1.05rem; line-height: 1.95;
    color: var(--brown); letter-spacing: .03em;
}
.hb-quote em { display: block; text-align: right; font-size: .82rem; color: var(--muted); margin-top: 8px; letter-spacing: .1em; }

/* ── 组件：表格 ───────────────────────────────────────── */
.hb-table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: .9rem; }
.hb-table th {
    background: var(--brown); color: #FBF6EC; font-weight: 600;
    padding: 10px 14px; text-align: left; letter-spacing: .06em;
}
.hb-table td { padding: 10px 14px; border: 1px solid var(--hairline); vertical-align: top; line-height: 1.8; }
.hb-table tr:nth-child(even) td { background: rgba(250, 244, 232, .5); }
.hb-table-wrap { overflow-x: auto; }

/* ── 组件：本章小结 ───────────────────────────────────── */
.hb-recap {
    margin: 34px 0 0; padding: 20px 26px;
    background: var(--paper); border: 1px dashed var(--hairline-strong);
    border-radius: var(--radius-lg);
}
.hb-recap strong {
    display: block; font-size: .88rem; letter-spacing: .22em;
    color: var(--orange-deep); margin-bottom: 10px;
}
.hb-recap ul { margin: 0 0 0 1.3em; font-size: .92rem; line-height: 2; color: #3D3128; }

/* ── 章间导航 + 文末 CTA ──────────────────────────────── */
.hb-ch-nav { display: flex; justify-content: space-between; gap: 14px; margin: 40px 0 0; }
.hb-ch-nav a {
    flex: 1; text-align: center; padding: 12px 18px;
    border: 1px solid var(--hairline-strong); border-radius: var(--radius);
    color: var(--brown); text-decoration: none; font-size: .9rem; letter-spacing: .06em;
    transition: border-color .2s, color .2s;
}
.hb-ch-nav a:hover { border-color: var(--orange); color: var(--orange-deep); }
.hb-end {
    margin: 64px 0 0; padding: 46px 40px; text-align: center;
    background: linear-gradient(160deg, #2C2118, #4A3728);
    border-radius: var(--radius-lg); color: #FBF6EC;
}
.hb-end h3 { font-family: var(--font-serif); font-size: 1.5rem; letter-spacing: .1em; margin-bottom: 12px; color: #FFF8EE; }
.hb-end p { font-size: .94rem; color: #E8D5BC; line-height: 1.95; max-width: 560px; margin: 0 auto 24px; }
.hb-end .btn-gold { background: var(--orange); color: #fff; }
.hb-end .btn-gold:hover { background: #F2762B; }
.hb-end-note { font-size: .78rem; color: #B7A289; margin-top: 16px !important; }

/* ── 移动端 ───────────────────────────────────────────── */
@media (max-width: 860px) {
    .hb-hero { padding-top: calc(var(--nav-height) + 30px); }
    .hb-hero-card { padding: 34px 26px 28px; }
    .hb-hero-card h1 { font-size: 1.7rem; }
    .hb-host { grid-template-columns: 1fr; }
    .hb-cards, .hb-cards.col2, .hb-cards.col4 { grid-template-columns: 1fr; }
    .hb-vs { grid-template-columns: 1fr; }
    .hb-timeline { flex-direction: column; gap: 22px; }
    .hb-timeline::before { left: 21px; right: auto; top: 0; bottom: 0; border-top: none; border-left: 2px dashed var(--hairline-strong); }
    .hb-tl-item { text-align: left; padding: 0 0 0 62px; }
    .hb-tl-item .yr { position: absolute; left: 0; top: 0; margin: 0; }
    .hb-flow { flex-direction: column; }
    .hb-flow-arrow { transform: rotate(90deg); padding: 6px 0; align-self: center; }
    .hb-ch-head h2 { font-size: 1.36rem; }
    .hb-step { margin-left: 14px; }
    .hb-step-body { padding-left: 26px; }
    .hb-ch-nav { flex-direction: column; }
}
