/* 文章详情页。视觉令牌与首页 home.css 对齐；--blue-500/--gray-* 由全局 nav.css 提供。 */
:root{--nh-color-surface:#fff;--nh-color-surface-muted:#f8f8f8;--nh-color-text:#1a1a1a;--nh-color-text-muted:#666;--nh-color-border:#e0e0e0;--nh-color-brand:#2b6cb0;--nh-color-brand-strong:#1a4971;--nh-content-inline-padding:clamp(1.25rem,8.6vw,10.3125rem)}

.nh-post{padding-top:var(--navbar-height,64px);background:var(--nh-color-surface-muted);color:var(--nh-color-text)}
.nh-post-container{width:100%;padding-inline:var(--nh-content-inline-padding)}

/* 阅读进度条 */
.nh-post__progress{position:fixed;top:var(--navbar-height,64px);left:0;right:0;height:3px;z-index:40;pointer-events:none}
.nh-post__progress i{display:block;width:0;height:100%;background:linear-gradient(90deg,var(--nh-color-brand),#5aa2e0);transition:width .12s linear}

/* 面包屑 */
.nh-post-breadcrumb{padding:20px 0 0;font-size:13px;color:var(--nh-color-text-muted)}
.nh-post-breadcrumb a{color:var(--nh-color-text-muted);text-decoration:none;transition:color .25s ease}
.nh-post-breadcrumb a:hover{color:var(--nh-color-brand)}
.nh-post-breadcrumb__sep{margin:0 8px;color:var(--nh-color-border)}
.nh-post-breadcrumb__current{color:var(--nh-color-text)}

/* 主布局 */
.nh-post__layout{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:48px;align-items:start;padding-top:32px;padding-bottom:80px}
.nh-post__main{min-width:0}
.nh-post__article{padding:48px 56px 40px;background:var(--nh-color-surface);border-radius:12px;box-shadow:0 2px 16px rgba(0,0,0,.06)}

/* 标题区 */
.nh-post__header{text-align:center;padding-bottom:28px;border-bottom:1px solid var(--nh-color-border)}
.nh-post__category{display:inline-block;padding:5px 14px;background:rgba(43,108,176,.08);border-radius:999px;color:var(--nh-color-brand);font-size:12px;letter-spacing:1px;text-decoration:none;transition:background .25s ease}
.nh-post__category:hover{background:rgba(43,108,176,.16)}
.nh-post__title{margin:18px 0 0;font-size:clamp(1.5rem,2.4vw,2.125rem);font-weight:700;line-height:1.45;letter-spacing:1px;color:var(--nh-color-text)}
.nh-post__meta{display:flex;flex-wrap:wrap;justify-content:center;gap:10px 26px;margin:20px 0 0;padding:0;list-style:none;color:var(--nh-color-text-muted);font-size:13px}
.nh-post__meta li{display:inline-flex;align-items:center;gap:6px}
.nh-post__meta svg{width:15px;height:15px;flex:none;opacity:.75}

/* 特色图 */
.nh-post__featured{margin:32px 0 0;overflow:hidden;border-radius:8px;background:var(--nh-color-border)}
.nh-post__featured img{display:block;width:100%;height:auto;transition:transform .5s cubic-bezier(.25,.46,.45,.94)}
.nh-post__featured:hover img{transform:scale(1.04)}

/* 正文 */
.nh-post__content{margin-top:32px;color:#444;font-size:15px;line-height:2;letter-spacing:.3px}
.nh-post__content>*:first-child{margin-top:0}
.nh-post__content p{margin:0 0 1.4em}
.nh-post__content img{max-width:100%;height:auto;border-radius:6px}
.nh-post__content h2,.nh-post__content h3{margin:1.9em 0 .7em;color:var(--nh-color-text);font-weight:700;line-height:1.5;scroll-margin-top:calc(var(--navbar-height,64px) + 24px)}
.nh-post__content h2{position:relative;padding-left:14px;font-size:22px}
.nh-post__content h2::before{content:"";position:absolute;left:0;top:.28em;width:4px;height:1em;background:var(--nh-color-brand);border-radius:2px}
.nh-post__content h3{font-size:18px}
.nh-post__content a{color:var(--nh-color-brand);text-decoration:underline;text-underline-offset:3px}
.nh-post__content ul,.nh-post__content ol{margin:0 0 1.4em;padding-left:1.4em}
.nh-post__content li{margin-bottom:.4em}
.nh-post__content blockquote{margin:1.6em 0;padding:14px 20px;background:var(--nh-color-surface-muted);border-left:3px solid var(--nh-color-brand);color:var(--nh-color-text-muted)}
.nh-post__content table{width:100%;border-collapse:collapse;margin:1.6em 0;font-size:14px}
.nh-post__content th,.nh-post__content td{padding:10px 12px;border:1px solid var(--nh-color-border);text-align:left}
.nh-post__content th{background:var(--nh-color-surface-muted);font-weight:600}
.nh-post__pagelinks{margin-top:1.6em;font-size:14px}
.nh-post__pagelinks a{margin-right:8px}

/* 标签 */
.nh-post__tags{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:36px;padding-top:24px;border-top:1px solid var(--nh-color-border)}
.nh-post__tags-label{color:var(--nh-color-text-muted);font-size:13px}
.nh-post__tags a{padding:5px 12px;background:var(--nh-color-surface-muted);border:1px solid var(--nh-color-border);border-radius:999px;color:var(--nh-color-text-muted);font-size:12px;text-decoration:none;transition:color .25s ease,border-color .25s ease,background .25s ease}
.nh-post__tags a:hover{background:rgba(43,108,176,.08);border-color:var(--nh-color-brand);color:var(--nh-color-brand)}

/* 分享 */
.nh-post__share{display:flex;flex-wrap:wrap;align-items:center;gap:12px 18px;margin-top:24px;padding-top:24px;border-top:1px solid var(--nh-color-border)}
.nh-post__share-label{color:var(--nh-color-text-muted);font-size:13px}
.nh-post__share-actions{display:flex;flex-wrap:wrap;gap:10px}
.nh-post__share-btn{display:inline-flex;align-items:center;gap:6px;padding:8px 16px;background:var(--nh-color-surface);border:1px solid var(--nh-color-border);border-radius:999px;color:var(--nh-color-text-muted);font:inherit;font-size:13px;line-height:1;text-decoration:none;cursor:pointer;transition:color .25s ease,border-color .25s ease,transform .25s ease}
.nh-post__share-btn svg{width:15px;height:15px}
.nh-post__share-btn:hover{color:var(--nh-color-brand);border-color:var(--nh-color-brand);transform:translateY(-2px)}
.nh-post__share-btn.is-copied{color:var(--nh-color-brand);border-color:var(--nh-color-brand)}

/* 上一篇 / 下一篇 */
.nh-post__adjacent{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-top:24px}
.nh-post__adjacent-item{display:flex;flex-direction:column;gap:10px;padding:20px 24px;background:var(--nh-color-surface);border-radius:12px;box-shadow:0 2px 12px rgba(0,0,0,.05);text-decoration:none;transition:transform .3s cubic-bezier(.25,.46,.45,.94),box-shadow .3s ease}
a.nh-post__adjacent-item:hover{transform:translateY(-3px);box-shadow:0 8px 22px rgba(0,0,0,.09)}
.nh-post__adjacent-item--empty{color:var(--nh-color-text-muted);font-size:13px;justify-content:center}
.nh-post__adjacent-item--next{text-align:right}
.nh-post__adjacent-label{display:inline-flex;align-items:center;gap:6px;color:var(--nh-color-brand);font-size:12px;letter-spacing:1px}
.nh-post__adjacent-item--next .nh-post__adjacent-label{justify-content:flex-end}
.nh-post__adjacent-label svg{width:14px;height:14px}
.nh-post__adjacent-title{color:var(--nh-color-text);font-size:15px;line-height:1.6;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}

/* 相关阅读 */
.nh-post-related{margin-top:56px}
.nh-post-section-heading{text-align:center;margin-bottom:28px}
.nh-post-section-heading h2{margin:0;font-size:24px;font-weight:700;letter-spacing:2px;color:var(--nh-color-text)}
.nh-post-section-heading i{display:block;width:40px;height:3px;margin:14px auto 0;background:var(--nh-color-brand);border-radius:2px}
.nh-post-related__grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}
.nh-post-related__card{background:var(--nh-color-surface);border-radius:12px;overflow:hidden;box-shadow:0 2px 12px rgba(0,0,0,.05);transition:transform .3s cubic-bezier(.25,.46,.45,.94),box-shadow .3s ease}
.nh-post-related__card:hover{transform:translateY(-4px);box-shadow:0 10px 26px rgba(0,0,0,.1)}
.nh-post-related__card a{display:block;text-decoration:none;color:inherit}
.nh-post-related__media{position:relative;aspect-ratio:16/10;overflow:hidden;background:var(--nh-color-border)}
.nh-post-related__media img{width:100%;height:100%;object-fit:cover;transition:transform .5s cubic-bezier(.25,.46,.45,.94)}
.nh-post-related__card:hover .nh-post-related__media img{transform:scale(1.06)}
.nh-post-related__tag{position:absolute;left:12px;top:12px;padding:4px 10px;background:rgba(0,0,0,.55);border-radius:999px;color:#fff;font-size:11px}
.nh-post-related__body{padding:18px 20px 22px}
.nh-post-related__date{margin:0;color:var(--nh-color-text-muted);font-size:12px}
.nh-post-related__body h3{margin:8px 0 0;font-size:16px;font-weight:600;line-height:1.6;color:var(--nh-color-text);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.nh-post-related__excerpt{margin:10px 0 0;color:var(--nh-color-text-muted);font-size:13px;line-height:1.8;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.nh-post-related__more{display:inline-flex;align-items:center;gap:6px;margin-top:14px;color:var(--nh-color-brand);font-size:13px}
.nh-post-related__more svg{width:14px;height:14px;transition:transform .3s ease}
.nh-post-related__card:hover .nh-post-related__more svg{transform:translateX(4px)}

/* 侧边栏 */
.nh-post__sidebar{display:flex;flex-direction:column;gap:24px;min-width:0;position:sticky;top:calc(var(--navbar-height,64px) + 20px);align-self:start}
.nh-post-widget{padding:24px 22px;background:var(--nh-color-surface);border-radius:12px;box-shadow:0 2px 12px rgba(0,0,0,.05)}
.nh-post-widget__title{margin:0;font-size:17px;font-weight:700;letter-spacing:1px;color:var(--nh-color-text)}
.nh-post-widget__rule{display:block;width:28px;height:3px;margin:10px 0 16px;background:var(--nh-color-brand);border-radius:2px}
.nh-post-widget__list{margin:0;padding:0;list-style:none}
.nh-post-widget__list li{border-bottom:1px solid var(--nh-color-border)}
.nh-post-widget__list li:last-child{border-bottom:0}
.nh-post-widget__list a{display:flex;gap:12px;padding:14px 0;text-decoration:none;color:inherit}
.nh-post-widget__list img{width:76px;height:56px;flex:none;object-fit:cover;border-radius:6px;background:var(--nh-color-border)}
.nh-post-widget__list--products img{height:64px}
.nh-post-widget__text{display:flex;flex-direction:column;justify-content:center;gap:6px;min-width:0}
.nh-post-widget__item-title{font-size:14px;line-height:1.6;color:#444;transition:color .25s ease;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.nh-post-widget__list a:hover .nh-post-widget__item-title{color:var(--nh-color-brand)}
.nh-post-widget__text time{color:var(--gray-400,#9ca3af);font-size:12px}
.nh-post-widget__price{color:#c0392b;font-size:14px;font-weight:600}
.nh-post-widget__price del{color:var(--gray-400,#9ca3af);font-weight:400;margin-right:4px}
.nh-post-widget__more{display:inline-flex;align-items:center;gap:6px;margin-top:16px;color:var(--nh-color-brand);font-size:13px;text-decoration:none}
.nh-post-widget__more svg{width:14px;height:14px;transition:transform .3s ease}
.nh-post-widget__more:hover svg{transform:translateX(4px)}

/* 目录 */
.nh-post-toc{display:flex;flex-direction:column;max-height:min(60vh,520px);overflow-y:auto}
.nh-post-toc__link{padding:8px 12px;border-left:2px solid transparent;color:var(--nh-color-text-muted);font-size:13px;line-height:1.6;text-decoration:none;transition:color .25s ease,border-color .25s ease,background .25s ease}
.nh-post-toc__link--h3{padding-left:26px;font-size:12.5px}
.nh-post-toc__link:hover{color:var(--nh-color-brand)}
.nh-post-toc__link.is-active{background:rgba(43,108,176,.06);border-left-color:var(--nh-color-brand);color:var(--nh-color-brand)}

/* 询价 CTA */
.nh-post-cta{padding:26px 24px;border-radius:12px;background:linear-gradient(140deg,var(--nh-color-brand),var(--nh-color-brand-strong));color:#fff;box-shadow:0 6px 20px rgba(43,108,176,.24)}
.nh-post-cta__title{margin:0;font-size:18px;font-weight:700;letter-spacing:1px}
.nh-post-cta__desc{margin:12px 0 0;font-size:13px;line-height:1.8;color:rgba(255,255,255,.85)}
.nh-post-cta__contacts{margin:18px 0 0;padding:0;list-style:none;display:flex;flex-direction:column;gap:10px}
.nh-post-cta__contacts li{display:flex;align-items:center;gap:8px;font-size:14px}
.nh-post-cta__contacts svg{width:16px;height:16px;flex:none;opacity:.85}
.nh-post-cta__contacts a{color:#fff;text-decoration:none;transition:opacity .25s ease}
.nh-post-cta__contacts a:hover{opacity:.75}
.nh-post-cta__button{display:block;margin-top:20px;padding:11px 0;background:#fff;border-radius:999px;color:var(--nh-color-brand);font-size:14px;font-weight:600;text-align:center;text-decoration:none;transition:transform .25s ease,box-shadow .25s ease}
.nh-post-cta__button:hover{transform:translateY(-2px);box-shadow:0 8px 18px rgba(0,0,0,.18)}

/* 响应式 */
@media(max-width:1200px){.nh-post__layout{grid-template-columns:minmax(0,1fr) 300px;gap:32px}.nh-post__article{padding:40px 36px 36px}}
@media(max-width:960px){.nh-post__layout{grid-template-columns:1fr;gap:28px;padding-bottom:56px}.nh-post__sidebar{position:static}.nh-post-toc{max-height:none}.nh-post-related__grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.nh-post__article{padding:30px 20px 28px}.nh-post__meta{gap:8px 16px;font-size:12px}.nh-post__content{font-size:14px}.nh-post__adjacent{grid-template-columns:1fr}.nh-post__adjacent-item--next{text-align:left}.nh-post__adjacent-item--next .nh-post__adjacent-label{justify-content:flex-start}.nh-post-related__grid{grid-template-columns:1fr}.nh-post-related{margin-top:40px}}
