:root {
  --bg: #f6f8f7; --surface: #ffffff; --ink: #14201c; --muted: #5b6b65; --line: #dfe6e3;
  --brand: #0b7a5b; --brand-ink: #ffffff; --brand-soft: #e3f3ed; --accent: #c2410c; --code: #eef2f0;
  --radius: 12px; --shadow: 0 1px 2px rgba(20, 32, 28, .06), 0 6px 20px rgba(20, 32, 28, .05);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1513; --surface: #161f1c; --ink: #e6efeb; --muted: #97a8a1; --line: #26332e;
    --brand: #34c796; --brand-ink: #06231a; --brand-soft: #14312a; --accent: #fb923c; --code: #1c2824;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.75 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", sans-serif;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 99; }

/* 页头：深色品牌条 + 导航条。桌面一行铺满并分三组，窄屏收进「栏目」面板 */
.site-header { position: sticky; top: 0; z-index: 20; box-shadow: 0 1px 0 var(--line); }
.brandbar { background: #0c1f19; color: #e8f4ef; }
.brandbar .wrap { display: flex; align-items: center; gap: 14px; min-height: 52px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 19px; color: #fff; white-space: nowrap; letter-spacing: .02em; }
.logo svg { color: #3ddc9f; }
.logo:hover { text-decoration: none; }
.tagline { font-size: 13px; color: #9fb8ae; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill { margin-left: auto; padding: 5px 12px; border-radius: 999px; background: #3ddc9f; color: #06231a; font-size: 13px; font-weight: 700; white-space: nowrap; }
.pill:hover { text-decoration: none; filter: brightness(1.08); }
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-btn { display: none; }
.main-nav { background: var(--surface); }
.main-nav ul { display: flex; justify-content: space-between; align-items: center; list-style: none; margin: 0 -8px; padding: 0; }
.main-nav li { display: flex; align-items: center; }
.main-nav li.sep::before { content: ""; width: 1px; height: 16px; background: var(--line); margin: 0 clamp(2px, 1vw, 12px); }
.main-nav a { display: block; padding: 11px 8px 8px; color: var(--ink); font-size: 14.5px; white-space: nowrap; border-bottom: 3px solid transparent; }
.main-nav a:hover { color: var(--brand); text-decoration: none; }
.main-nav a[aria-current] { color: var(--brand); font-weight: 700; border-bottom-color: var(--brand); }
@media (max-width: 899px) {
  .nav-btn { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border: 1px solid #2f4a40; border-radius: 999px; font-size: 13px; color: #e8f4ef; cursor: pointer; white-space: nowrap; user-select: none; }
  .nav-btn i { width: 12px; height: 8px; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; }
  .nav-toggle:focus-visible ~ .brandbar .nav-btn { outline: 2px solid #3ddc9f; outline-offset: 2px; }
  .nav-toggle:checked ~ .brandbar .nav-btn { background: #e8f4ef; color: #0c1f19; border-color: #e8f4ef; }
  .main-nav { display: none; border-bottom: 1px solid var(--line); }
  .nav-toggle:checked ~ .main-nav { display: block; }
  .main-nav ul { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 0; padding: 12px 0; }
  .main-nav li.sep::before { display: none; }
  .main-nav a { flex: 1; text-align: center; padding: 9px 4px; border: 0; border-radius: 8px; background: var(--bg); font-size: 14px; }
  .main-nav a[aria-current] { background: var(--brand-soft); }
}
@media (max-width: 640px) {
  .tagline { display: none; }
  .brandbar .wrap { gap: 8px; }
  .main-nav ul { grid-template-columns: repeat(3, 1fr); }
}

/* 正文 */
main { padding-top: 20px; padding-bottom: 48px; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.crumbs i { margin: 0 6px; font-style: normal; opacity: .6; }
.post { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px clamp(16px, 4vw, 40px) 36px; box-shadow: var(--shadow); }
.post-head h1 { font-size: clamp(24px, 4.2vw, 34px); line-height: 1.3; margin: 0 0 10px; letter-spacing: -.01em; }
.lead { font-size: 17px; color: var(--muted); margin: 0 0 8px; }
.meta { font-size: 13px; color: var(--muted); margin: 0; }
.home .post-head { padding: 12px 0 4px; }
.home .post-head h1 { font-size: clamp(26px, 5vw, 40px); }
h2 { font-size: 22px; line-height: 1.35; margin: 40px 0 12px; padding-top: 4px; scroll-margin-top: 112px; }
h2::before { content: ""; display: inline-block; width: 4px; height: 18px; margin-right: 10px; border-radius: 2px; background: var(--brand); vertical-align: -2px; }
h3 { font-size: 17px; margin: 24px 0 8px; }
p { margin: 12px 0; }
ul, ol { padding-left: 22px; margin: 12px 0; }
li { margin: 4px 0; }
code { background: var(--code); padding: 2px 6px; border-radius: 6px; font-size: 14px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.note { background: var(--brand-soft); border-radius: 10px; padding: 12px 16px; margin: 16px 0; }
.toc { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; margin: 20px 0 8px; font-size: 14.5px; }
.toc ol { margin: 6px 0 0; columns: 2; column-gap: 32px; }
@media (max-width: 640px) { .toc ol { columns: 1; } }

/* 表格 */
.table-wrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 520px; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--bg); font-weight: 600; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
.rank-table td:first-child { font-weight: 700; color: var(--brand); width: 56px; }

/* 卡片 */
.grid { display: grid; gap: 14px; margin: 16px 0; }
.grid.three { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid.four { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }
.grid.four .spec { grid-template-columns: 1fr 1fr; }
.grid.four .spec div:first-child { grid-column: 1 / -1; }
.grid.two { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.card h3 { margin: 0 0 6px; font-size: 16.5px; }
.card p { margin: 6px 0; font-size: 14.5px; }
a.card.link { color: var(--ink); display: block; transition: border-color .15s, transform .15s; }
a.card.link:hover { border-color: var(--brand); text-decoration: none; transform: translateY(-1px); }
a.card.link h3 { color: var(--brand); }
.brand-head { display: flex; align-items: center; gap: 10px; }
.brand-head h3 { margin: 0; flex: 1; }
.rank { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--brand); color: var(--brand-ink); font-weight: 700; font-size: 14px; }
.score { font-weight: 700; font-size: 18px; color: var(--accent); }
.spec { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.spec div { background: var(--bg); border-radius: 8px; padding: 6px 8px; }
.spec dt { font-size: 12px; color: var(--muted); }
.spec dd { margin: 0; font-size: 13.5px; font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.actions.center { justify-content: center; margin: 28px 0 8px; }
.btn { display: inline-block; padding: 7px 14px; border-radius: 8px; background: var(--brand); color: var(--brand-ink); font-size: 14px; font-weight: 600; white-space: nowrap; }
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--brand); border: 1px solid var(--brand); }
td .btn { padding: 4px 10px; font-size: 13px; }

.src { font-size: 12px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line, #d8dee6); color: var(--muted, #667); white-space: nowrap; margin-left: auto; }
.feat { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: #fff; white-space: nowrap; }
td .feat { margin-left: 4px; }

/* 测速截图 */
.speedfig { margin: 16px 0; }
.speedfig img { display: block; width: 100%; max-width: 720px; height: auto; border: 1px solid var(--line); border-radius: 10px; }
.speedfig figcaption { max-width: 720px; margin-top: 8px; font-size: 13.5px; color: var(--muted); }
.grid.gallery { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.shot { padding: 10px; }
.shot img { display: block; width: 100%; height: 150px; object-fit: cover; object-position: top; border-radius: 8px; border: 1px solid var(--line); margin-bottom: 8px; }
.shot h3 { font-size: 15px; margin: 0; }
.shot p { font-size: 12.5px; margin: 2px 0 0; }

/* 推荐页逐家点评 */
.brand-sec { border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: var(--radius); padding: 16px 18px; margin: 14px 0; }
.brand-sec h3 { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0 0 10px; font-size: 18px; scroll-margin-top: 112px; }
.brand-sec h3 small { font-size: 13.5px; font-weight: 400; color: var(--muted); }
.spec.wide { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.proscons { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 10px 0; font-size: 14.5px; }
.proscons ul { margin: 4px 0; }

/* 首页问题索引 */
.qlist { list-style: none; counter-reset: q; margin: 16px 0; padding: 0; border-top: 1px solid var(--line); }
.qlist li { counter-increment: q; margin: 0; border-bottom: 1px solid var(--line); }
.qlist a { display: grid; grid-template-columns: 34px 1fr auto; gap: 2px 10px; align-items: baseline; padding: 14px 4px; color: var(--ink); }
.qlist a::before { content: counter(q, decimal-leading-zero); grid-row: span 2; font: 700 13px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--brand); padding-top: 3px; }
.qlist a:hover { background: var(--brand-soft); text-decoration: none; }
.qlist .q { font-size: 17px; font-weight: 700; }
.qlist .a { font-size: 13.5px; font-weight: 600; color: var(--brand); white-space: nowrap; }
.qlist .d { grid-column: 2 / -1; font-size: 14px; color: var(--muted); }

/* FAQ / 延伸阅读 */
.faq details { border: 1px solid var(--line); border-radius: 10px; padding: 0 16px; margin: 8px 0; background: var(--surface); }
.faq summary { cursor: pointer; padding: 12px 0; font-weight: 600; }
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.related { columns: 2; column-gap: 32px; }
@media (max-width: 640px) { .related { columns: 1; } }

/* 页脚 */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 28px 0 36px; font-size: 14px; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; margin: 0 0 12px; padding: 0; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--brand); }

/* 窄屏页头只有一行，锚点偏移相应减小 */
@media (max-width: 899px) { h2, .brand-sec h3 { scroll-margin-top: 68px; } }

.disclosure { margin: 32px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }

/* ===== 图表组件（Dark Network Observatory）：深海军蓝面板，浅色/深色主题下都一样 ===== */
.ob { --ac: #38bdf8; margin: 18px 0; padding: 0; background: #0b1220; color: #cbd5e1; border: 1px solid #1e2a44; border-radius: 12px; overflow: hidden;
  background-image: linear-gradient(#111a2e 1px, transparent 1px), linear-gradient(90deg, #111a2e 1px, transparent 1px); background-size: 28px 28px; font-size: 14px; }
.ob-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 12px 16px; background: #0d1628; border-bottom: 1px solid #1e2a44; border-top: 3px solid var(--ac); }
.ob-kicker { font: 600 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--ac); }
.ob-head strong { color: #f1f5f9; font-size: 15.5px; }
.ob-badge, .ob-st { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; border: 1px solid #2a3a5c; font: 600 11px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; color: #cbd5e1; }
.ob-badge { margin-left: auto; }
.ob-badge::before, .ob-st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #64748b; }
.ob-badge.v::before, .ob-st.v::before { background: #fbbf24; }
.ob-badge.m::before { background: #34d399; }
.ob-badge.p::before { background: #a78bfa; }
.ob-metrics.three { grid-template-columns: repeat(3, 1fr); }
.ob-speed { padding: 10px 14px 4px; border-bottom: 1px solid #1e2a44; }
.ob-speed .sl { display: flex; gap: 16px; font-size: 12px; color: #94a3b8; margin-bottom: 6px; }
.ob-speed .sl span:first-child { width: 92px; flex: none; }
.ob-speed .dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; vertical-align: 0; }
.ob-speed .dot.d, .ob-speed .sb.d { background: color-mix(in srgb, var(--ac) 55%, #334155); }
.ob-speed .dot.p, .ob-speed .sb.p { background: var(--ac); }
.ob-speed .sr { display: flex; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px dashed #1e2a44; }
.ob-speed .sr > b { width: 92px; flex: none; color: #e2e8f0; font-size: 13px; font-weight: 600; }
.ob-speed .sr > b small { display: block; font-weight: 400; font-size: 11px; color: #94a3b8; }
.ob-speed .sv { flex: 1; min-width: 0; display: grid; gap: 4px; }
.ob-speed .sv > div { display: flex; align-items: center; gap: 8px; }
.ob-speed .sb { height: 8px; border-radius: 4px; flex: none; }
@media (max-width: 520px) { .ob-speed .sr > b, .ob-speed .sl span:first-child { width: 56px; } .ob-speed .sv em { font-size: 11px; } }
.ob-speed .sv em { font: 12px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; font-style: normal; color: #cbd5e1; white-space: nowrap; }
.ob-st.x::before { background: #475569; }
.ob-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: #1e2a44; border-bottom: 1px solid #1e2a44; }
.ob-metrics div { background: #0b1220; padding: 14px 12px; }
.ob-metrics b { font: 700 26px/1.1 ui-monospace, SFMono-Regular, Menlo, monospace; color: #f8fafc; text-shadow: 0 0 14px color-mix(in srgb, var(--ac) 45%, transparent); }
.ob-metrics i { font-style: normal; font-size: 12px; color: #94a3b8; margin-left: 4px; }
.ob-metrics span { display: block; margin-top: 4px; font-size: 12px; color: #94a3b8; }
.ob-rows { list-style: none; margin: 0; padding: 4px 16px; }
.ob-rows li { display: flex; gap: 12px; margin: 0; padding: 8px 0; border-bottom: 1px dashed #1e2a44; }
.ob-rows li:last-child { border-bottom: 0; }
.ob-rows span { flex: 0 0 68px; color: #94a3b8; font-size: 12.5px; }
.ob-rows em { font-style: normal; color: #e2e8f0; min-width: 0; overflow-wrap: anywhere; }
.ob-rows code, .ob code { background: #17223b; color: #e2e8f0; }
.ob-shot { display: block; padding: 12px; background: #0b1220; }
.ob-shot img { display: block; width: 100%; max-width: 760px; height: auto; margin: 0 auto; border-radius: 6px; border: 1px solid #1e2a44; }
.ob figcaption { padding: 10px 16px; border-top: 1px solid #1e2a44; background: #0d1628; font-size: 12.5px; color: #94a3b8; }
.ob-mark { float: right; margin-left: 12px; font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; color: #e2e8f0; opacity: .3; }
.ob-group { margin: 12px 16px 6px; font-size: 12.5px; color: #cbd5e1; }
.ob figcaption a { color: #cbd5e1; text-decoration: underline; }
.ob-tiles { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; padding: 0 16px 12px; }
.ob-tiles li { margin: 0; padding: 10px; background: #0d1628; border: 1px solid #1e2a44; border-radius: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ob-tiles strong { flex: 1 0 100%; color: #f1f5f9; font-size: 14px; }
.ob-tiles small { flex: 1 0 100%; color: #94a3b8; font-size: 12px; }
.ob-path { display: flex; align-items: stretch; gap: 0; padding: 18px 16px 8px; }
.ob-node { flex: 1 1 0; min-width: 0; padding: 10px; background: #0d1628; border: 1px solid #2a3a5c; border-radius: 10px; text-align: center; }
.ob-node b { display: block; color: #f1f5f9; font-size: 13.5px; }
.ob-node small { display: block; margin-top: 2px; color: #94a3b8; font-size: 11.5px; }
.ob-link { flex: 0 0 88px; position: relative; display: grid; place-items: center; }
.ob-link::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px dashed #475569; }
.ob-link.thick::before { border-top: 3px solid var(--ac); box-shadow: 0 0 10px color-mix(in srgb, var(--ac) 50%, transparent); }
.ob-link span { position: relative; padding: 1px 6px; background: #0b1220; border: 1px solid #2a3a5c; border-radius: 6px; font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; color: #cbd5e1; white-space: nowrap; }
.ob-link.thick span { border-color: var(--ac); color: #f8fafc; }
.ob-regions { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 16px 14px; }
.ob-regions span { padding: 1px 8px; border-radius: 999px; border: 1px solid #2a3a5c; font-size: 12px; color: #cbd5e1; }
@media (max-width: 720px) {
  .ob-metrics { grid-template-columns: repeat(2, 1fr); }
  .ob-tiles { grid-template-columns: 1fr; }
  .ob-rows.three li, .ob-rows li { flex-wrap: wrap; gap: 2px 12px; }
  .ob-path { flex-direction: column; }
  .ob-link { flex-basis: 34px; }
  .ob-link::before { left: 50%; right: auto; top: 0; bottom: 0; border-top: 0; border-left: 1px dashed #475569; }
  .ob-link.thick::before { border-top: 0; border-left: 3px solid var(--ac); }
  .ob-badge { margin-left: 0; }
}

/* ===== 品牌库：搜索 / 筛选 / 排序 ===== */
.lib-bar { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 10px; }
.lib-bar input, .lib-bar select { font: inherit; font-size: 15px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); }
.lib-bar input { flex: 1 1 240px; min-width: 0; }
.lib-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chip { font: inherit; font-size: 13.5px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); cursor: pointer; }
.chip:hover { border-color: var(--brand); }
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-weight: 600; }
.lib-item { display: flex; }
.lib-item[hidden] { display: none; }
.lib-item > .card { flex: 1; }

/* 分部分的长页（/recommend/）：部分之间加分隔线，小节标题加色块，层级更好分 */
.post.parts h2 { border-top: 1px solid var(--line); padding-top: 28px; margin-top: 52px; }
.post.parts h2:first-of-type { border-top: 0; padding-top: 4px; margin-top: 32px; }
.post.parts h3 { font-size: 18px; padding-left: 10px; border-left: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); margin-top: 28px; }
.post.parts .brand-head h3, .post.parts .card h3 { padding-left: 0; border-left: 0; font-size: inherit; margin-top: 0; }

/* 文章里的数据图 */
.chart { margin: 18px 0; } .chart img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 12px; display: block; } .chart figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; }
