/* 搜索与算法效率专题：topic-bfs-exploring-layer-by-layer */
.topic-bfs-exploring-layer-by-layer-story{color:var(--article-text-color);font-size:14px;line-height:1.65}
.topic-bfs-exploring-layer-by-layer-story *{box-sizing:border-box} .topic-bfs-exploring-layer-by-layer-story p{margin:0 0 12px} .topic-bfs-exploring-layer-by-layer-story strong{color:var(--article-heading-color)}
.topic-bfs-exploring-layer-by-layer-story code,.topic-bfs-exploring-layer-by-layer-story pre{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
.topic-bfs-exploring-layer-by-layer-section{margin-top:22px;scroll-margin-top:110px}
.topic-bfs-exploring-layer-by-layer-section>h2{display:flex;align-items:center;gap:14px;margin:0 0 8px;color:var(--article-heading-color);font-size:20px;line-height:1.35;font-weight:900}
.topic-bfs-exploring-layer-by-layer-number{display:inline-flex;flex:0 0 38px;height:38px;align-items:center;justify-content:center;border-radius:50%;background:#0752ff;color:#fff;font-size:16px;font-weight:700}
.topic-bfs-exploring-layer-by-layer-story pre{margin:14px 0;padding:16px;border-radius:14px;overflow:auto;background:#152033;color:#f4f7ff;line-height:1.6;font-size:12px}
.topic-bfs-exploring-layer-by-layer-story pre code{color:inherit;white-space:pre}
.topic-bfs-exploring-layer-by-layer-story .cards{display:grid;gap:10px;margin-top:14px}
.topic-bfs-exploring-layer-by-layer-story .cards.two{grid-template-columns:repeat(2,minmax(0,1fr))}
.topic-bfs-exploring-layer-by-layer-story .cards.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.topic-bfs-exploring-layer-by-layer-story .cards.four{grid-template-columns:repeat(4,minmax(0,1fr))}
.topic-bfs-exploring-layer-by-layer-story .cards.five{grid-template-columns:repeat(5,minmax(0,1fr))}
.topic-bfs-exploring-layer-by-layer-story .cards article{padding:14px 10px;border:1px solid #e1ebff;border-radius:14px;background:#f9fbff;text-align:center}
.topic-bfs-exploring-layer-by-layer-story .cards h3{margin:0 0 4px;color:var(--article-heading-color);font-size:13px}
.topic-bfs-exploring-layer-by-layer-story .cards p{margin:0;color:#617296;font-size:10px}
.topic-bfs-exploring-layer-by-layer-story .compare{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:14px}
.topic-bfs-exploring-layer-by-layer-story .compare>div{padding:15px;border-radius:15px;background:#eef5ff;text-align:center}
.topic-bfs-exploring-layer-by-layer-story .compare>div:nth-child(2){background:#eef9f0}
.topic-bfs-exploring-layer-by-layer-story .compare h3{margin:0 0 5px;color:var(--article-heading-color);font-size:14px}
.topic-bfs-exploring-layer-by-layer-story .compare p{margin:0;color:#617296;font-size:10px}
.topic-bfs-exploring-layer-by-layer-story .flow{display:grid;grid-template-columns:1fr 34px 1fr 34px 1fr;gap:7px;align-items:center;margin-top:14px}
.topic-bfs-exploring-layer-by-layer-story .flow span{display:flex;min-height:116px;align-items:center;justify-content:center;padding:12px;border-radius:14px;background:#eef5ff;color:#1d3d75;font-weight:800;text-align:center}
.topic-bfs-exploring-layer-by-layer-story .flow span:nth-of-type(2){background:#fff6df} .topic-bfs-exploring-layer-by-layer-story .flow span:nth-of-type(3){background:#eef9f0}
.topic-bfs-exploring-layer-by-layer-story .flow b{color:#4f82ff;font-size:22px;text-align:center}
.topic-bfs-exploring-layer-by-layer-story .tip,.topic-bfs-exploring-layer-by-layer-story .warn{margin-top:14px;padding:14px 16px;border-radius:14px}
.topic-bfs-exploring-layer-by-layer-story .tip{background:#eaf5ff} .topic-bfs-exploring-layer-by-layer-story .warn{border:1px solid #ffd0dc;background:#fff2f6}
.topic-bfs-exploring-layer-by-layer-story .tip h3,.topic-bfs-exploring-layer-by-layer-story .warn h3{margin:0 0 4px;font-size:15px} .topic-bfs-exploring-layer-by-layer-story .tip h3{color:#0752ff} .topic-bfs-exploring-layer-by-layer-story .warn h3{color:#d83265}
.topic-bfs-exploring-layer-by-layer-story .trace{display:flex;flex-wrap:wrap;gap:7px;align-items:center;margin-top:14px;padding:14px;border-radius:14px;background:#f7f8fc}
.topic-bfs-exploring-layer-by-layer-story .trace span{padding:9px 11px;border-radius:9px;background:#fff;color:#1d3d75;font-size:10px;font-weight:800}
.topic-bfs-exploring-layer-by-layer-story .trace b{color:#4f82ff}
.topic-bfs-exploring-layer-by-layer-story .formula{margin-top:14px;padding:16px;border-radius:14px;background:#eef5ff;color:#0752ff;font-size:16px;font-weight:900;text-align:center}
.topic-bfs-exploring-layer-by-layer-story .stack-visual{display:flex;width:min(320px,100%);flex-direction:column;gap:5px;margin:16px auto 0;padding:14px;border-radius:14px;background:#f7f8fc}
.topic-bfs-exploring-layer-by-layer-story .stack-visual span{padding:11px;border-radius:9px;border:1px solid #dce8ff;background:#fff;color:#0752ff;font-weight:900;text-align:center}
.topic-bfs-exploring-layer-by-layer-story .wave{display:flex;gap:10px;align-items:center;justify-content:center;flex-wrap:wrap;margin-top:14px;padding:18px;border-radius:14px;background:#f7f8fc}
.topic-bfs-exploring-layer-by-layer-story .wave span{display:flex;align-items:center;justify-content:center;border-radius:50%;background:#eef5ff;color:#0752ff;font-weight:900}
.topic-bfs-exploring-layer-by-layer-story .wave span:nth-child(1){width:62px;height:62px}
.topic-bfs-exploring-layer-by-layer-story .wave span:nth-child(2){width:82px;height:82px}
.topic-bfs-exploring-layer-by-layer-story .wave span:nth-child(3){width:102px;height:102px}
.topic-bfs-exploring-layer-by-layer-story .wave span:nth-child(4){width:122px;height:122px}
.topic-bfs-exploring-layer-by-layer-story .tree-flow{margin-top:14px;padding:16px;border-radius:14px;background:#f7f8fc;text-align:center}
.topic-bfs-exploring-layer-by-layer-story .tree-flow>span{display:inline-flex;padding:10px 16px;border-radius:999px;background:#0752ff;color:#fff;font-weight:900}
.topic-bfs-exploring-layer-by-layer-story .tree-flow>div{display:flex;justify-content:center;gap:18px;margin-top:18px}
.topic-bfs-exploring-layer-by-layer-story .tree-flow>div span{display:inline-flex;min-width:52px;justify-content:center;padding:10px;border-radius:999px;background:#fff;border:1px solid #dce8ff;color:#1d3d75;font-weight:800}
.topic-bfs-exploring-layer-by-layer-story table{width:100%;margin-top:14px;border-collapse:collapse;background:#fff}
.topic-bfs-exploring-layer-by-layer-story th,.topic-bfs-exploring-layer-by-layer-story td{border:1px solid #e1ebff;padding:8px;text-align:center} .topic-bfs-exploring-layer-by-layer-story th{background:#eef5ff;color:#1d3d75}
.topic-bfs-exploring-layer-by-layer-story .table-wrap{overflow-x:auto}
.topic-bfs-exploring-layer-by-layer-summary{margin-top:22px;padding:18px;border-radius:16px;background:#e9f3ff;scroll-margin-top:110px}
.topic-bfs-exploring-layer-by-layer-summary h2{margin:0 0 7px;color:#0752ff;font-size:19px} .topic-bfs-exploring-layer-by-layer-summary ul{margin:0;padding-left:20px;line-height:1.75}
.topic-bfs-exploring-layer-by-layer-summary .next{margin:10px 0 0;padding-top:10px;border-top:1px dashed #b8d3f6}
.topic-bfs-exploring-layer-by-layer-pagination{display:flex;justify-content:space-between;gap:18px;margin-top:14px}
.topic-bfs-exploring-layer-by-layer-pagination a{display:flex;align-items:center;gap:10px;max-width:49%;padding:10px 13px;border:1px solid #d9e7ff;border-radius:12px;background:#ffffffb3;text-decoration:none}
.topic-bfs-exploring-layer-by-layer-pagination a:last-child{text-align:right} .topic-bfs-exploring-layer-by-layer-pagination strong{display:block;color:#0752ff;font-size:16px} .topic-bfs-exploring-layer-by-layer-pagination small{display:block;color:#576b9f;font-size:12px}
@media(max-width:900px){.topic-bfs-exploring-layer-by-layer-story .cards.four,.topic-bfs-exploring-layer-by-layer-story .cards.five{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){
.topic-bfs-exploring-layer-by-layer-story{font-size:12px} .topic-bfs-exploring-layer-by-layer-section>h2{gap:9px;font-size:16px} .topic-bfs-exploring-layer-by-layer-number{flex-basis:31px;height:31px;font-size:14px}
.topic-bfs-exploring-layer-by-layer-story .cards.two,.topic-bfs-exploring-layer-by-layer-story .cards.three,.topic-bfs-exploring-layer-by-layer-story .cards.four,.topic-bfs-exploring-layer-by-layer-story .cards.five,.topic-bfs-exploring-layer-by-layer-story .compare,.topic-bfs-exploring-layer-by-layer-story .flow{grid-template-columns:minmax(0,1fr)}
.topic-bfs-exploring-layer-by-layer-story .flow b{transform:rotate(90deg)} .topic-bfs-exploring-layer-by-layer-story .wave span:nth-child(n){width:78px;height:78px}
.topic-bfs-exploring-layer-by-layer-pagination{gap:9px} .topic-bfs-exploring-layer-by-layer-pagination a{flex:1;min-width:0;padding:8px 6px}
.topic-bfs-exploring-layer-by-layer-pagination strong{font-size:13px} .topic-bfs-exploring-layer-by-layer-pagination small{font-size:10px;line-height:1.35}
}
