/* Woshale 博客 · 暗色编辑部风格（与首页同源） */
@font-face { font-family: "Inter"; src: url("/fonts/inter-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: #000; color: #e7eaee;
  font-family: "Inter", -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: #7fb8e8; text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: rgba(70,135,235,.45); }

.wrap { max-width: 46em; margin: 0 auto; padding: clamp(2.5rem, 6vw, 4.5rem) 1.5rem 3rem; }

.blog-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .6rem; }
.brand { color: #f2f4f7; font-weight: 600; font-size: 1.05rem; }
.brand:hover { text-decoration: none; color: #22d3ee; }
.blog-nav { display: flex; gap: 1.1rem; font-size: .88rem; }
.blog-nav a { color: #9aa2ad; }
.blog-nav a:hover { color: #fff; text-decoration: none; }

.page-title { margin: 2.6rem 0 .5rem; font-size: clamp(1.9rem, 4.5vw, 2.6rem); font-weight: 800; letter-spacing: -.03em; }
.page-sub { margin: 0 0 3rem; color: #8b93a1; line-height: 1.75; }
.page-sub a { border-bottom: 1px dotted #4a5561; }

.year-mark { margin: 2.6rem 0 1rem; color: #5f6873; font-size: .85rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .1em; }

.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li { padding: 1.1rem 0; border-top: 1px solid rgba(255,255,255,.08); }
.post-meta { display: flex; align-items: center; gap: .7rem; margin-bottom: .3rem; }
.post-meta time { color: #5f6873; font-size: .78rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.cat { font-size: .68rem; font-weight: 600; letter-spacing: .08em; padding: .12rem .6rem; border-radius: 999px; color: #a0cdff; background: rgba(70,135,235,.14); }
.cat.design { color: #f0abfc; background: rgba(217,70,239,.12); }
.cat.essay  { color: #6ee7b7; background: rgba(52,211,153,.1); }
.cat.tools  { color: #fbbf24; background: rgba(251,191,36,.1); }
.cat.life   { color: #fda4af; background: rgba(251,113,133,.1); }
.cat.reading { color: #c4b5fd; background: rgba(167,139,250,.12); }

.rt { color: #5f6873; font-size: .78rem; }

/* 搜索 */
.search-box {
  display: flex; align-items: center; gap: .6rem;
  margin: 0 0 1.6rem; padding: .55rem 1rem;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  transition: border-color .2s ease;
}
.search-box:focus-within { border-color: rgba(70,135,235,.55); }
.search-box svg { width: 16px; height: 16px; color: #6b7480; flex: none; }
.search-box input {
  flex: 1; background: none; border: 0; outline: 0;
  color: #e7eaee; font-size: .95rem;
  font-family: inherit;
}
.search-box input::placeholder { color: #5f6873; }
.search-box kbd {
  border: 1px solid rgba(255,255,255,.14); border-radius: 6px;
  padding: 0 .45rem; color: #6b7480; font-size: .75rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.search-results { display: flex; flex-direction: column; }

.share-cluster { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: 2.2rem; padding-top: 1.4rem; border-top: 1px dashed rgba(255,255,255,.12); }
.sc-label { color: #8b93a1; font-size: .82rem; }
.sc-btn, .share-cluster .sc-copy {
  display: inline-flex; padding: .35rem .95rem; border-radius: 999px;
  font-size: .78rem; font-weight: 500; cursor: pointer;
  border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05); color: #c8cfd8;
  transition: color .2s, border-color .2s;
}
.sc-btn:hover, .share-cluster .sc-copy:hover { color: #22d3ee; border-color: rgba(34,211,238,.5); text-decoration: none; }
.share-cluster .sc-copy.done { color: #6ee7b7; border-color: rgba(52,211,153,.5); }

/* 阅读进度条 */
#read-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  z-index: 999; pointer-events: none;
  background: linear-gradient(90deg, #2563eb, #22d3ee);
  transform: scaleX(0); transform-origin: 0 50%;
}
@media (prefers-reduced-motion: reduce) { #read-progress { display: none; } }

/* 标签云 */
.tag-cloud { display: flex; flex-wrap: wrap; gap: .7rem 1.4rem; align-items: baseline; }
.tag-cloud a {
  color: #a6adb8; font-weight: 600; line-height: 1.6;
  border-bottom: 1px dashed rgba(255,255,255,.2);
  transition: color .2s ease, border-color .2s ease;
}
.tag-cloud a:hover { color: #22d3ee; border-color: #22d3ee; text-decoration: none; }
.tag-cloud sup { color: #5f6873; font-size: .65em; margin-left: .15em; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.search-hit {
  display: flex; flex-direction: column; gap: .25rem;
  padding: 1rem .4rem; border-top: 1px solid rgba(255,255,255,.08);
}
.search-hit:hover { text-decoration: none; background: rgba(255,255,255,.03); }
.search-hit-title { color: #f2f4f7; font-weight: 600; font-size: 1.02rem; }
.search-hit:hover .search-hit-title { color: #22d3ee; }
.search-hit-meta { color: #5f6873; font-size: .76rem; }
.search-hit-snippet { color: #8b93a1; font-size: .86rem; line-height: 1.65; }
.search-hit mark, .search-hit-title mark { background: rgba(34,211,238,.25); color: #a5f3fc; border-radius: 3px; padding: 0 2px; }
.search-empty { color: #8b93a1; padding: 1.4rem 0; }

/* 语法高亮（暗色） */
.prose code .tok-str { color: #fbbf24; }
.prose code .tok-com { color: #6b7480; font-style: italic; }
.prose code .tok-num { color: #c4b5fd; }
.prose code .tok-kw  { color: #7dd3fc; }
.prose mark.hl { background: rgba(253, 224, 71, .3); color: #fde68a; padding: 0 2px; border-radius: 3px; }
.filter-bar { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0 0 1.6rem; }
.filter-bar button {
  border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04);
  color: #9aa2ad; border-radius: 999px; padding: .3rem 1rem;
  font-size: .8rem; cursor: pointer; transition: all .2s ease;
}
.filter-bar button:hover { color: #fff; }
.filter-bar button.on { background: rgba(70,135,235,.25); color: #fff; border-color: rgba(70,135,235,.5); }

.pn-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2.6rem; }
.pn-nav a { display: flex; flex-direction: column; gap: .25rem; padding: 1rem 1.2rem; border: 1px solid rgba(255,255,255,.09); border-radius: 12px; transition: border-color .2s ease; }
.pn-nav a:hover { border-color: rgba(70,135,235,.5); text-decoration: none; }
.pn-nav small { color: #5f6873; font-size: .75rem; }
.pn-nav b { color: #e7eaee; font-size: .92rem; }
.pn-nav .next { text-align: right; }
.pn-nav .next small { display: block; }
@media (max-width: 640px) { .pn-nav { grid-template-columns: 1fr; } }

/* 阅读完成推荐卡 */
.finish-card {
  position: fixed; right: 1.4rem; bottom: 1.4rem; z-index: 500;
  max-width: 280px; padding: .95rem 1.2rem;
  background: #17232a; border: 1px solid rgba(70,135,235,.45);
  border-radius: 14px;
  box-shadow: 0 18px 44px -18px rgba(0,0,0,.85);
  opacity: 0; transform: translateY(16px); pointer-events: none;
  transition: opacity .35s ease, transform .35s ease;
}
.finish-card.show { opacity: 1; transform: none; pointer-events: auto; }
.finish-card small { display: block; color: #6ee7b7; font-size: .72rem; letter-spacing: .1em; margin-bottom: .3rem; }
.finish-card a { display: block; color: #e7eaee; font-weight: 600; font-size: .92rem; line-height: 1.5; }
.finish-card a:hover { color: #22d3ee; text-decoration: none; }
.fc-close {
  position: absolute; top: .4rem; right: .55rem;
  border: 0; background: none; color: #5f6873;
  font-size: 1rem; cursor: pointer; line-height: 1;
}
.fc-close:hover { color: #fff; }
@media (prefers-reduced-motion: reduce) { .finish-card { transition: none; } }
.post-list h2 { margin: 0 0 .3rem; font-size: 1.15rem; letter-spacing: -.01em; }
.post-list h2 a { color: #f2f4f7; }
.post-list h2 a:hover { color: #22d3ee; text-decoration: none; }
.post-list p { margin: 0; color: #8b93a1; font-size: .9rem; line-height: 1.75; }

.rss-tip { margin-top: 3rem; padding: 1rem 1.3rem; border: 1px dashed rgba(255,255,255,.15); border-radius: 12px; color: #8b93a1; font-size: .85rem; }

/* 文章页 */
.article-head { margin: 2.8rem 0 2.2rem; }
.back { display: inline-block; margin-bottom: 1.8rem; color: #8b93a1; font-size: .88rem; }
.back:hover { color: #22d3ee; text-decoration: none; }
.article-head h1 { margin: .8rem 0 .8rem; font-size: clamp(1.7rem, 4vw, 2.3rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.3; }
.article-info { display: flex; align-items: center; gap: .7rem; }
.article-info time { color: #5f6873; font-size: .82rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.prose { color: #c3cad3; font-size: 1rem; line-height: 1.95; }
.prose p { margin: 0 0 1.15rem; }
.prose h2 { margin: 2.2rem 0 .9rem; font-size: 1.25rem; color: #f2f4f7; letter-spacing: -.01em; }
.prose h3 { margin: 1.8rem 0 .7rem; font-size: 1.05rem; color: #e7eaee; }
.prose ul, .prose ol { margin: 0 0 1.15rem; padding-left: 1.4rem; }
.prose li { margin-bottom: .45rem; }
.prose blockquote {
  margin: 1.4rem 0; padding: .9rem 1.3rem;
  border-left: 3px solid #2563eb;
  background: rgba(70,135,235,.07);
  border-radius: 0 10px 10px 0;
  color: #a6adb8;
}
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .84em; color: #a0cdff; background: rgba(70,135,235,.12); padding: .1em .45em; border-radius: 5px; }
.prose pre { position: relative; background: #0b1016; border: 1px solid rgba(255,255,255,.09); border-radius: 12px; padding: 1rem 1.2rem; overflow-x: auto; }
.copy-btn {
  position: absolute; top: .6rem; right: .6rem;
  border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06);
  color: #8b93a1; border-radius: 8px; padding: .25rem .7rem;
  font-size: .72rem; cursor: pointer;
  font-family: "Inter", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  transition: color .2s ease, border-color .2s ease, opacity .2s ease;
  opacity: 0;
}
.prose pre:hover .copy-btn, .copy-btn:focus-visible, .copy-btn.done { opacity: 1; }
.copy-btn:hover { color: #fff; border-color: rgba(70,135,235,.5); }
.copy-btn.done { color: #34d399; border-color: rgba(52,211,153,.5); }
.prose pre code { background: none; padding: 0; color: #c3cad3; }
.prose hr { border: 0; border-top: 1px solid rgba(255,255,255,.09); margin: 2.2rem 0; }
.prose strong { color: #f2f4f7; }

.article-foot { margin-top: 3rem; padding-top: 1.6rem; border-top: 1px solid rgba(255,255,255,.09); color: #8b93a1; font-size: .88rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .8rem; }

/* 目录 TOC */
details.toc {
  margin: 1.6rem 0 2.2rem; padding: 1rem 1.3rem;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 14px;
}
details.toc summary {
  cursor: pointer; color: #9aa2ad; font-size: .88rem; font-weight: 600;
  letter-spacing: .06em; list-style: none;
}
details.toc summary::before { content: "▸ "; color: #22d3ee; }
details.toc[open] summary::before { content: "▾ "; }
details.toc ol { margin: .8rem 0 0; padding-left: 1.3rem; }
details.toc li { margin: .35rem 0; font-size: .9rem; }
details.toc a { color: #a6adb8; }
details.toc a:hover { color: #22d3ee; }
details.toc a.cur { color: #22d3ee; font-weight: 600; }
details.toc a.cur::before { content: "▸ "; }

/* 相关卡分类色块 */
.cat-dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: .45rem; vertical-align: 1px; }
.prose h2 { scroll-margin-top: 96px; }

/* 相关阅读 */
.related { margin-top: 2.8rem; }
.related h2 { margin: 0 0 1rem; font-size: 1.05rem; color: #c8cfd8; letter-spacing: .04em; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .9rem; }
@media (max-width: 760px) {
  .related.collapsed .related-grid { display: none; }
  .related h2 { cursor: pointer; }
  .related.collapsed h2::after { content: " ▸"; color: #5f6873; }
}
.related-card {
  display: flex; align-items: flex-end; min-height: 5.2rem;
  padding: 1rem 1.15rem;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 12px; color: #dfe4ea; font-weight: 600; font-size: .9rem; line-height: 1.5;
  transition: border-color .25s ease, transform .25s ease;
}
.related-card:hover { text-decoration: none; transform: translateY(-3px); border-color: rgba(70,135,235,.5); color: #22d3ee; }
.related-card small { display: block; margin-top: .35rem; color: #6ee7b7; font-size: .72rem; font-weight: 500; }
.related-card small.ser { color: #a0cdff; background: rgba(70,135,235,.14); border-radius: 999px; padding: .1rem .5rem; }
@media (max-width: 640px) { .related-grid { grid-template-columns: 1fr; } }


/* 系列导航 */
.series-nav { margin-top: 2.4rem; padding: 1.1rem 1.3rem; background: rgba(70,135,235,.07); border: 1px solid rgba(70,135,235,.22); border-radius: 14px; }
.series-name { display: block; margin-bottom: .6rem; color: #a0cdff; font-size: .8rem; font-weight: 600; letter-spacing: .1em; }
.series-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.series-chips a {
  padding: .3rem .85rem; border-radius: 999px; font-size: .8rem;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); color: #a6adb8;
  transition: color .2s, border-color .2s;
}
.series-chips a:hover { color: #22d3ee; border-color: rgba(34,211,238,.5); text-decoration: none; }
.series-chips a.cur { color: #062a30; background: linear-gradient(90deg, #2563eb, #06b6d4); border-color: transparent; font-weight: 600; }

/* 编者按 */
.editor-note {
  margin: 1.4rem 0; padding: .9rem 1.3rem;
  background: rgba(251, 191, 36, .08);
  border: 1px solid rgba(251, 191, 36, .3);
  border-radius: 0 12px 12px 0;
  border-left-width: 3px;
  color: #c8cfd8; font-size: .88rem;
}
.editor-note b { color: #fbbf24; font-size: .78rem; letter-spacing: .1em; margin-right: .5rem; }


.related-cross { display: flex; align-items: center; gap: .7rem; margin-top: 1.6rem; padding: .8rem 1.2rem; background: rgba(70,135,235,.06); border: 1px solid rgba(70,135,235,.22); border-radius: 12px; font-size: .84rem; }
.related-cross span { color: #8b93a1; font-size: .78rem; }
.related-cross a { color: #a0cdff; font-weight: 600; }
.related-cross a:hover { color: #22d3ee; }

/* 本周最多人读 */
.weekly-top {
  margin: 0 0 2.4rem; padding: 1.1rem 1.4rem;
  background: rgba(70,135,235,.07);
  border: 1px solid rgba(70,135,235,.22);
  border-radius: 14px;
}
.weekly-top h2 { margin: 0 0 .5rem; font-size: .85rem; font-weight: 600; letter-spacing: .12em; color: #a0cdff; }
.weekly-top ol { margin: 0; padding-left: 1.4rem; }
.weekly-top li { margin: .3rem 0; font-size: .92rem; }
.weekly-top em { font-style: normal; color: #5f6873; font-size: .78rem; margin-left: .4rem; }
.finish-card em { display: block; margin-top: .35rem; font-style: normal; color: #6ee7b7; font-size: .74rem; }

.foot { margin-top: 4rem; padding-top: 1.4rem; border-top: 1px solid rgba(255,255,255,.08); color: #6b7480; font-size: .78rem; display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }
.foot a { color: #6b7480; }
.foot a:hover { color: #a6adb8; }
