/* ============================================================
   小窝博客 · 设计原型
   设计语言:MobileDaze approved neutral material palette
   原则:大体极简,细节见功夫
   ============================================================ */
:root {
  /* —— 色板(沿用 MobileDaze,浅色)—— */
  --canvas: #ffffff;
  --well: #f0f0f0;
  --top: #ffffff; --mid: #fcfcfc; --bottom: #f5f5f5;
  --text: #202020; --secondary: #595959; --muted: #737373;
  --hover: #ebebeb; --pressed: #e2e2e2;
  --line: #dedede;
  --edge: #0000001a; --edge-strong: #00000038;
  --highlight: #ffffffef;
  --contact: #00000012; --ambient: #00000024;
  --brand: #058abc; --brand-hover: #0376a3; --brand-soft: #058abc14;
  --surface: #fcfcfc; /* 平面化:纯色表面,无渐变 */
  --shadow-raised: none;
  --shadow-float: none;
  /* —— 博客专用 —— */
  --radius-card: 12px; --radius-ctrl: 9px;
  --content: 860px; --wide: 1080px;
  --font-body: Georgia, "Times New Roman", "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STZhongsong", SimSun, serif;
  --font-mono: ui-monospace, "Cascadia Code", "JetBrains Mono", Consolas, "Courier New", monospace;
}
[data-theme="dark"] {
  --canvas: #171717; --well: #181818;
  --top: #303030; --mid: #292929; --bottom: #232323;
  --text: #f2f2f2; --secondary: #b8b8b8; --muted: #a0a0a0;
  --hover: #303030; --pressed: #383838;
  --line: #3a3a3a;
  --edge: #ffffff16; --edge-strong: #ffffff38;
  --highlight: #ffffff24;
  --contact: #00000055; --ambient: #00000070;
  --brand: #0fa8d4; --brand-hover: #38bdf8; --brand-soft: #0fa8d41f;
  --surface: #1f1f1f;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--canvas); color: var(--text);
  font-size: 16px; line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  transition: background .25s ease, color .25s ease;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; width: 100%; }
::selection { background: var(--brand-soft); }
a { color: var(--brand); text-decoration: none; }
img { max-width: 100%; height: auto; }

/* —— 顶栏:玻璃拟态细边 —— */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--canvas);
  border-bottom: 1px solid var(--edge);
}
.nav-inner {
  max-width: var(--wide); margin: 0 auto; padding: 0 24px;
  height: 56px; display: flex; align-items: center; gap: 28px;
}
.wordmark { font-weight: 700; font-size: 17px; letter-spacing: .02em; color: var(--text); }
.wordmark .colon { color: var(--brand); font-weight: 800; }
.nav-links { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav-links a {
  position: relative; color: var(--secondary); font-size: 14.5px;
  padding: 6px 12px; border-radius: var(--radius-ctrl);
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--text); background: var(--hover); }
.nav-links a.active { color: var(--text); font-weight: 600; }
.nav-links a.active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px;
  height: 2px; border-radius: 2px; background: var(--brand);
}
.icon-btn {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: none;
  color: var(--secondary); cursor: pointer;
  transition: color .15s;
}
.icon-btn:hover { color: var(--text); }
.icon-btn svg { width: 17px; height: 17px; }

/* —— 阅读进度条 —— */
.progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0;
  background: var(--brand);
  z-index: 60; border-radius: 0 2px 2px 0;
}

/* —— 布局 —— */
.wrap { max-width: var(--wide); margin: 0 auto; padding: 40px 24px 64px; }
.narrow { max-width: var(--content); }

/* —— 首页欢迎区 —— */
.hero { padding: 28px 0 34px; }
.hero h1 { font-size: 26px; font-weight: 700; letter-spacing: .01em; }
.hero h1 .dot { color: var(--brand); }
.hero p { color: var(--muted); font-size: 15px; margin-top: 6px; }
.hero-desc { min-height: 1.9em; }
.hero-desc::after { content: "▍"; margin-left: 2px; color: var(--brand); animation: cursor-blink 1.1s steps(1) infinite; }
@keyframes cursor-blink { 50% { opacity: 0; } }
.hero .crumbs { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }

/* —— 文章列表:无容器化,细分隔线 + 留白 —— */
.post-list { display: flex; flex-direction: column; }
.card {
  display: flex; gap: 22px; align-items: stretch;
  padding: 24px 0;
  border-bottom: 1px solid var(--edge);
  color: inherit;
}
.card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; }
.card h2 { font-size: 18.5px; font-weight: 650; line-height: 1.5; }
.card h2 a { color: var(--text); background: linear-gradient(var(--brand), var(--brand)) no-repeat 0 100%/0 2px; transition: background-size .25s ease; padding-bottom: 2px; }
.card h2 a::after { content: ""; position: absolute; inset: 0; }
.card:hover h2 a { background-size: 100% 2px; }
.card .excerpt {
  color: var(--secondary); font-size: 14.5px; margin-top: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card .meta {
  margin-top: auto; padding-top: 14px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  color: var(--muted); font-size: 13px;
}
.card .meta span { white-space: nowrap; }
.card .meta a { color: inherit; position: relative; z-index: 1; }
.card .meta a:hover { color: var(--brand); }
.card .meta svg { width: 13px; height: 13px; vertical-align: -2px; margin-right: 4px; opacity: .8; }
.card .cover {
  width: min(380px, 33%); flex: none; border-radius: 6px; overflow: hidden;
  align-self: center; aspect-ratio: 16/9;
  background: var(--well);
}
.pill.pin { color: var(--brand); font-weight: 600; }
.card .pin-row { margin-bottom: 8px; }
.card .cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.card:hover .cover img { transform: scale(1.03); }
.card-imgs { display: none; }

/* —— 标签 pill:纯文字 —— */
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12.5px; line-height: 1; padding: 5px 2px;
  color: var(--muted);
  transition: color .15s;
}
.pill:hover { color: var(--brand); }

/* —— 标签页:按拼音首字母分区 + 右侧字母导航(自适应布局,滚动高亮) —— */
.tag-dir { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: start; }
.tag-group { padding: 14px 0 8px; scroll-margin-top: 80px; }
.tag-group h2 { font-size: 15px; color: var(--brand); font-weight: 700; letter-spacing: .08em; padding-bottom: 8px; border-bottom: 1px solid var(--edge); margin-bottom: 14px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 12px 24px; padding: 0; }
.tag-item { color: var(--secondary); font-size: 15.5px; }
.tag-item .count { color: var(--muted); font-size: 13px; margin-left: 3px; }
.tag-item:hover { color: var(--brand); }
.letter-nav {
  position: sticky; top: 80px;
  display: flex; flex-direction: column; gap: 2px;
  font-size: 12.5px; line-height: 1; text-align: center;
}
.letter-nav a { color: var(--muted); padding: 3px 6px; border-radius: 6px; transition: color .15s, background .15s; }
.letter-nav a:hover { color: var(--brand); background: var(--brand-soft); }
.letter-nav a.on { color: var(--brand); font-weight: 700; background: var(--brand-soft); }

/* —— 分页:纯文字 —— */
.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 10px; margin-top: 40px; }
.pager a, .pager span {
  min-width: 34px; height: 34px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--secondary); font-size: 14px;
}
.pager a:hover { color: var(--brand); }
.pager .cur { color: var(--brand); font-weight: 700; }
.pager-jump { display: inline-flex; align-items: center; gap: 6px; margin-left: 12px; color: var(--muted); font-size: 13.5px; }
.pager-jump input {
  width: 52px; height: 34px; padding: 0 2px; text-align: center;
  color: var(--text); background: transparent; font-size: 14px; font-family: inherit;
  border: 0; border-bottom: 1px solid var(--edge); border-radius: 0;
  outline: none; transition: border-color .15s;
  appearance: textfield; -moz-appearance: textfield;
}
.pager-jump input::-webkit-outer-spin-button, .pager-jump input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pager-jump input:focus { border-bottom-color: var(--brand); }
.pager-jump button {
  height: 34px; padding: 0 4px; background: none; border: 0; cursor: pointer;
  color: var(--secondary); font-size: 13.5px; font-family: inherit;
}
.pager-jump button:hover { color: var(--brand); }

/* —— 分类目录 —— */
.class-dir { margin-top: 8px; }
.class-dir .dir-group { padding: 18px 4px; border-bottom: 1px solid var(--edge); }
.class-dir .dir-group:first-child { padding-top: 8px; }
.class-dir .dir-group h2 { font-size: 19px; font-weight: 650; }
.class-dir .dir-group h2 a { color: var(--text); transition: color .15s; }
.class-dir .dir-group h2 a:hover { color: var(--brand); }
.class-dir .dir-group .dir-sub { color: var(--muted); font-size: 13px; font-weight: 400; margin-left: 4px; }
.class-dir .dir-subs { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.class-dir .dir-subs a { color: var(--secondary); font-size: 14.5px; transition: color .15s; }
.class-dir .dir-subs a:hover { color: var(--brand); }

/* —— 专栏列表 —— */
.column-list { margin-top: 8px; }
.column-card { display: block; padding: 22px 4px; border-bottom: 1px solid var(--edge); }
.column-card:first-child { padding-top: 12px; }
.column-card .row1 { display: flex; align-items: baseline; gap: 12px; }
.column-card .name { font-size: 19px; font-weight: 650; color: var(--text); transition: color .15s; }
.column-card .count { color: var(--muted); font-size: 13px; }
.column-card .desc { color: var(--secondary); font-size: 14.5px; margin-top: 6px; }
.column-card:hover .name { color: var(--brand); }

/* —— 文章页 —— */
.post-head { padding: 12px 0 26px; border-bottom: 1px solid var(--edge); margin-bottom: 34px; }
.prose a.glightbox { border-bottom: 0; }
.prose a.glightbox:hover { background: none; }
.prose a.glightbox img { cursor: zoom-in; }
.prose p:has(> a.glightbox) { text-align: center; }
.gslide-image { overflow: hidden; }
.prose .img-cap { display: block; text-align: center; color: var(--muted); font-size: 13.5px; margin-top: 6px; }
.post-head h1 { font-size: 27px; font-weight: 700; line-height: 1.5; }
.post-head .meta { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px; color: var(--muted); font-size: 13.5px; }
.post-head .meta a { color: inherit; }
.post-head .meta a:hover { color: var(--brand); }
.post-head .meta svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 5px; opacity: .8; }
.post-head .tags { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.post-grid { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 48px; align-items: start; }
.post-grid:not(:has(.toc)) { grid-template-columns: minmax(0, 1fr); }

.prose { font-size: 17px; }
.prose p { margin: 1em 0; color: var(--text); text-align: justify; }
.prose h2 { font-size: 21px; font-weight: 650; margin: 2em 0 .8em; padding-left: 12px; border-left: 3px solid var(--brand); line-height: 1.4; }
.prose h3 { font-size: 17.5px; font-weight: 650; margin: 1.8em 0 .7em; }
.prose h3::before { content: "# "; color: var(--brand); font-weight: 500; }
.prose a { border-bottom: 1px solid var(--brand-soft); transition: border-color .15s, background .15s; }
.prose a:hover { border-bottom-color: var(--brand); background: var(--brand-soft); }
.prose ul, .prose ol { margin: 1em 0 1em 1.6em; color: var(--text); }
.prose li { margin: .35em 0; }
.prose li::marker { color: var(--brand); }
.prose blockquote {
  margin: 1.4em 0; padding: 4px 18px;
  border-left: 3px solid var(--brand);
  color: var(--secondary); font-size: 15px;
}
.prose code { font-family: var(--font-mono); font-size: .88em; background: var(--brand-soft); color: var(--brand); padding: .15em .45em; border-radius: 6px; }
.prose figure { margin: 1.6em 0; }
.prose figure img { border-radius: 6px; }
.prose figcaption { text-align: center; color: var(--muted); font-size: 13px; margin-top: 10px; }
.prose hr { border: 0; height: 1px; background: var(--edge); margin: 2.4em auto; width: 60%; }

/* —— 代码块:well 底色 + 线性分隔 —— */
.codeblock { margin: 1.5em 0; border-radius: 6px; overflow: hidden; background: var(--well); }
[data-theme="dark"] .codeblock { background: var(--surface); border: 1px solid var(--edge); }
.codeblock .bar {
  display: flex; align-items: center;
  padding: 7px 14px; border-bottom: 1px solid var(--edge);
}
.codeblock .bar .lang { color: var(--muted); font-size: 12px; font-family: var(--font-mono); }
.codeblock .copy {
  margin-left: auto; background: none; border: 0; color: var(--muted); cursor: pointer;
  font-size: 12px; font-family: var(--font-mono); padding: 2px 4px;
  transition: color .15s;
}
.codeblock .copy:hover { color: var(--brand); }
.codeblock pre { background: none; color: var(--text); padding: 14px 18px; overflow-x: auto; font-family: var(--font-mono); font-size: 13.5px; line-height: 1.7; }
.codeblock pre code { background: none; color: inherit; padding: 0; }
.codeblock pre.chroma { background: none; }

/* —— 语法高亮(Chroma noClasses=false):亮 github / 暗 onedark —— */
.chroma .err { color: #f6f8fa; background-color: #82071e; }
.chroma .lnlinks { outline: none; text-decoration: none; color: inherit; }
.chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
.chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; }
.chroma .hl { background-color: #e5e5e5; }
.chroma .lnt, .chroma .ln { white-space: pre; -webkit-user-select: none; user-select: none; margin-right: .4em; padding: 0 .4em; color: #7f7f7f; }
.chroma .line { display: flex; }
.chroma .k, .chroma .kc, .chroma .kd, .chroma .kn, .chroma .kp, .chroma .kr, .chroma .kt { color: #cf222e; }
.chroma .na, .chroma .nc, .chroma .nx, .chroma .p, .chroma .nn, .chroma .ge, .chroma .go { color: #1f2328; }
.chroma .nb, .chroma .ni, .chroma .nf { color: #6639ba; }
.chroma .no, .chroma .nd, .chroma .nt, .chroma .o, .chroma .ow, .chroma .m, .chroma .mb, .chroma .mf, .chroma .mh, .chroma .mi, .chroma .il, .chroma .mo { color: #0550ae; }
.chroma .bp { color: #6a737d; }
.chroma .nl { color: #900; font-weight: bold; }
.chroma .nv, .chroma .vc, .chroma .vg, .chroma .vi { color: #953800; }
.chroma .s, .chroma .sa, .chroma .sb, .chroma .sc, .chroma .dl, .chroma .sd, .chroma .s2, .chroma .se, .chroma .sh, .chroma .si, .chroma .sx, .chroma .sr, .chroma .s1 { color: #0a3069; }
.chroma .ss { color: #032f62; }
.chroma .c, .chroma .ch, .chroma .cm, .chroma .c1, .chroma .cs, .chroma .cp, .chroma .cpf { color: #57606a; }
.chroma .gd { color: #82071e; background-color: #ffebe9; }
.chroma .gi { color: #116329; background-color: #dafbe1; }
.chroma .gl { text-decoration: underline; }
[data-theme="dark"] .chroma .err { color: #abb2bf; }
[data-theme="dark"] .chroma .hl { background-color: #3d4148; }
[data-theme="dark"] .chroma .lnt, [data-theme="dark"] .chroma .ln { color: #55595f; }
[data-theme="dark"] .chroma .k, [data-theme="dark"] .chroma .kd, [data-theme="dark"] .chroma .kn, [data-theme="dark"] .chroma .kp, [data-theme="dark"] .chroma .kr { color: #c678dd; }
[data-theme="dark"] .chroma .kc, [data-theme="dark"] .chroma .kt, [data-theme="dark"] .chroma .nc, [data-theme="dark"] .chroma .nb { color: #e5c07b; }
[data-theme="dark"] .chroma .n, [data-theme="dark"] .chroma .na, [data-theme="dark"] .chroma .no, [data-theme="dark"] .chroma .ne, [data-theme="dark"] .chroma .nl, [data-theme="dark"] .chroma .nn, [data-theme="dark"] .chroma .nx, [data-theme="dark"] .chroma .py, [data-theme="dark"] .chroma .nt, [data-theme="dark"] .chroma .nv, [data-theme="dark"] .chroma .vc, [data-theme="dark"] .chroma .vg, [data-theme="dark"] .chroma .vi, [data-theme="dark"] .chroma .vm, [data-theme="dark"] .chroma .bp, [data-theme="dark"] .chroma .gd { color: #e06c75; }
[data-theme="dark"] .chroma .nf { color: #61afef; font-weight: bold; }
[data-theme="dark"] .chroma .fm { color: #56b6c2; font-weight: bold; }
[data-theme="dark"] .chroma .nd { color: #61afef; }
[data-theme="dark"] .chroma .s, [data-theme="dark"] .chroma .sa, [data-theme="dark"] .chroma .sb, [data-theme="dark"] .chroma .sc, [data-theme="dark"] .chroma .dl, [data-theme="dark"] .chroma .sd, [data-theme="dark"] .chroma .s2, [data-theme="dark"] .chroma .se, [data-theme="dark"] .chroma .sh, [data-theme="dark"] .chroma .si, [data-theme="dark"] .chroma .sx, [data-theme="dark"] .chroma .sr, [data-theme="dark"] .chroma .s1, [data-theme="dark"] .chroma .ss { color: #98c379; }
[data-theme="dark"] .chroma .m, [data-theme="dark"] .chroma .mb, [data-theme="dark"] .chroma .mf, [data-theme="dark"] .chroma .mh, [data-theme="dark"] .chroma .mi, [data-theme="dark"] .chroma .il, [data-theme="dark"] .chroma .mo { color: #d19a66; }
[data-theme="dark"] .chroma .o, [data-theme="dark"] .chroma .ow { color: #56b6c2; }
[data-theme="dark"] .chroma .c, [data-theme="dark"] .chroma .ch, [data-theme="dark"] .chroma .cm, [data-theme="dark"] .chroma .c1, [data-theme="dark"] .chroma .cs, [data-theme="dark"] .chroma .cp, [data-theme="dark"] .chroma .cpf { color: #7f848e; }
[data-theme="dark"] .chroma .gi { color: #98c379; font-weight: bold; }

/* —— 目录 TOC —— */
.toc { position: sticky; top: 80px; font-size: 13.5px; border-left: 1px solid var(--edge); padding-left: 0; }
.toc .toc-title { color: var(--muted); font-size: 12px; letter-spacing: .12em; padding: 0 0 10px 16px; }
.toc a { display: block; color: var(--secondary); padding: 5px 0 5px 16px; border-left: 2px solid transparent; margin-left: -1px; transition: color .15s, border-color .15s; line-height: 1.5; }
.toc a:hover { color: var(--text); }
.toc a.on { color: var(--brand); border-left-color: var(--brand); font-weight: 600; }
.toc .l3 { padding-left: 32px; font-size: 12.5px; color: var(--muted); }

/* —— 上一篇/下一篇 —— */
.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 56px; }
.prevnext a {
  padding: 16px 0;
  border-top: 1px solid var(--edge);
}
.prevnext a:hover .t { color: var(--brand); }
/* —— 评论区(Artalk):极简融入 —— */
.comments { margin-top: 40px; border-top: 1px solid var(--edge); padding-top: 28px; }
.comments-title { font-size: 17px; font-weight: 650; margin-bottom: 18px; }
/* Artalk 变量映射到主题(明暗两态同名覆盖,随 --text/--canvas 自动切换;提权压过 Artalk.css 默认值) */
.comments .artalk, body .atk-layer-wrap,
.comments .artalk.atk-dark-mode, body .atk-layer-wrap.atk-dark-mode {
  --at-color-font: var(--text);
  --at-color-deep: var(--text);
  --at-color-sub: var(--secondary);
  --at-color-grey: var(--muted);
  --at-color-meta: var(--muted);
  --at-color-border: var(--edge);
  --at-color-light: var(--muted);
  --at-color-bg: var(--canvas);
  --at-color-bg-transl: var(--canvas);
  --at-color-bg-grey: var(--well);
  --at-color-bg-grey-transl: var(--well);
  --at-color-bg-light: var(--brand-soft);
  --at-color-main: var(--brand);
  --at-color-gradient: linear-gradient(180deg, transparent, var(--canvas));
}
/* 评论条目细分隔线,贴合列表排版 */
.artalk > .atk-list > .atk-list-body > .atk-comment-wrap { border-bottom: 1px solid var(--edge); }
.prevnext .dir { font-size: 12px; color: var(--muted); letter-spacing: .08em; }
.prevnext .t { color: var(--text); font-weight: 600; font-size: 15px; margin-top: 4px; }
.prevnext .next { text-align: right; }

/* —— 归档页 —— */
.arch-year { font-size: 19px; font-weight: 700; margin: 34px 0 6px; display: flex; align-items: baseline; gap: 10px; }
.arch-year .count { font-size: 13px; color: var(--muted); font-weight: 400; }
.arch-item { display: flex; align-items: baseline; gap: 16px; padding: 9px 4px; border-radius: var(--radius-ctrl); transition: background .15s; }
.arch-item:hover { background: var(--hover); }
.arch-item time { color: var(--muted); font-size: 13px; font-family: var(--font-mono); flex: none; width: 84px; }
.arch-item a { color: var(--text); }
.arch-item a:hover { color: var(--brand); }

/* —— 页脚 —— */
.footer { border-top: 1px solid var(--edge); margin-top: 64px; }
.footer-inner {
  max-width: var(--wide); margin: 0 auto; padding: 0 24px;
  min-height: 56px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between;
  color: var(--muted); font-size: 13px;
}
.footer a { color: var(--secondary); } .footer a:hover { color: var(--brand); }
.footer .sep { opacity: .4; }

/* —— 回到顶部 —— */
.to-top {
  position: fixed; right: 26px; bottom: 96px; z-index: 40;
  padding: 6px 4px;
  border: 0; background: none;
  color: var(--muted); cursor: pointer; font-family: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity .2s, transform .2s, color .15s;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { color: var(--brand); }
.to-top svg { width: 22px; height: 22px; }
.to-top span { font-size: 12px; white-space: nowrap; }

/* —— 响应式 —— */
@media (max-width: 960px) {
  .post-grid { grid-template-columns: 1fr; }
  .toc { display: none; }
}
/* 移动端:知乎式卡片 —— 文字在上,图片行(头图+正文图,固定高横排)在下 */
@media (max-width: 640px) {
  .card { flex-direction: column; }
  .card .cover { display: none; }
  .card-imgs {
    display: flex; gap: 2px; width: 100%;
    margin-top: 12px; height: 96px;
  }
  .card-imgs.single { height: auto; aspect-ratio: 16/9; }
  .card-imgs a { flex: 1; min-width: 0; display: block; }
  .card-imgs img { width: 100%; height: 100%; object-fit: cover; display: block; }
}
@media (max-width: 640px) {
  .wrap { padding: 28px 16px 48px; }
  .nav-inner { padding: 0 16px; gap: 16px; }
  .nav-links a { padding: 6px 8px; font-size: 14px; }
  .prevnext { grid-template-columns: 1fr; }
  .card { padding: 20px 0; }
}


/* —— 正文增强元素 —— */
.prose h4 { font-size: 16px; font-weight: 650; margin: 1.6em 0 .6em; color: var(--text); }
.prose h4::before { content: "## "; color: var(--muted); font-weight: 400; }
.prose ul ul, .prose ol ol, .prose ul ol, .prose ol ul { margin: .3em 0 .3em 1.2em; }
.prose del { color: var(--muted); }
.prose mark { background: var(--brand-soft); color: var(--brand); padding: .1em .3em; border-radius: 4px; }
.prose kbd {
  font-family: var(--font-mono); font-size: .82em;
  background: var(--well);
  border-radius: 6px; padding: .15em .5em; color: var(--text);
}
.prose sup a { padding: 0 .15em; }
.prose abbr { text-decoration: underline dotted var(--muted); text-underline-offset: 3px; cursor: help; }

/* 任务列表 */
.prose .task-list-item { list-style: none; margin-left: -1.4em; }
.prose .task-list-item input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 15px; height: 15px; margin: 0 8px 0 0; vertical-align: -2px;
  border: 1.5px solid var(--edge-strong); border-radius: 5px;
  background: var(--surface); cursor: default; position: relative;
  transition: background .15s, border-color .15s;
}
.prose .task-list-item input[type="checkbox"]:checked { background: var(--brand); border-color: var(--brand); }
.prose .task-list-item input[type="checkbox"]:checked::after {
  content: ""; position: absolute; left: 4px; top: 1px;
  width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(42deg);
}
.prose .task-list-item:has(input:checked) { color: var(--muted); }

/* 表格:底线式 */
.prose .table-wrap { margin: 1.5em 0; overflow-x: auto; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.7; }
.prose thead th {
  text-align: left; font-weight: 650; color: var(--text);
  padding: 12px 16px; border-bottom: 2px solid var(--line);
  white-space: nowrap;
}
.prose tbody td { padding: 10px 16px; border-bottom: 1px solid var(--edge); color: var(--secondary); }
.prose tbody tr:last-child td { border-bottom: 0; }
.prose tbody tr { transition: background .12s; }
.prose tbody tr:hover { background: var(--hover); }
.prose table code { font-size: .85em; }

/* callout 提示块 */
.prose .callout {
  margin: 1.5em 0; padding: 6px 0 6px 16px;
  border-left: 3px solid var(--brand);
  font-size: 15px;
}
.prose .callout .callout-title { display: flex; align-items: center; gap: 7px; font-weight: 650; font-size: 14px; margin-bottom: 4px; }
.prose .callout .callout-title svg { width: 15px; height: 15px; }
.prose .callout p { margin: .4em 0; }
.prose .callout.note { border-left-color: var(--brand); } .prose .callout.note .callout-title { color: var(--brand); }
.prose .callout.warn { border-left-color: #d97706; } .prose .callout.warn .callout-title { color: #d97706; }
.prose .callout.danger { border-left-color: #dc2626; } .prose .callout.danger .callout-title { color: #dc2626; }
[data-theme="dark"] .prose .callout.warn .callout-title { color: #fbbf24; }
[data-theme="dark"] .prose .callout.danger .callout-title { color: #f87171; }

/* 折叠块 */
.prose details {
  margin: 1.5em 0; border-top: 1px solid var(--edge); border-bottom: 1px solid var(--edge);
}
.prose details summary {
  cursor: pointer; padding: 12px 0; font-weight: 600; font-size: 15px;
  list-style: none; display: flex; align-items: center; gap: 8px; color: var(--text);
  transition: color .15s;
}
.prose details summary:hover { color: var(--brand); }
.prose details summary::before {
  content: ""; width: 7px; height: 7px; flex: none;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg); transition: transform .18s;
}
.prose details[open] summary::before { transform: rotate(45deg); }
.prose details summary::-webkit-details-marker { display: none; }
.prose details .details-body { padding: 0 0 14px; color: var(--secondary); font-size: 15px; border-top: 1px dashed var(--edge); }

/* 双图并列 */
.prose .img-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 1.6em 0; }
.prose .img-grid img { border-radius: 6px; width: 100%; aspect-ratio: 4/3; object-fit: cover; }

/* 脚注区 */
.prose .footnotes { margin-top: 2.6em; padding-top: 1.2em; border-top: 1px solid var(--edge); font-size: 13.5px; color: var(--muted); }
.prose .footnotes ol { margin: .6em 0 0 1.4em; }
.prose .footnotes li { margin: .3em 0; }
.prose .footnotes a { color: var(--brand); }

/* 定义列表 */
.prose dl { margin: 1.2em 0; }
.prose dt { font-weight: 650; color: var(--text); margin-top: .8em; }
.prose dd { margin: .2em 0 0 1.4em; color: var(--secondary); }

@media (max-width: 640px) {
  .prose .img-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .prose table { font-size: 13.5px; }
  .prose thead th, .prose tbody td { padding: 8px 12px; }
}

/* —— Hugo 模板适配:嵌套 TOC、搜索页 —— */
.toc nav ul, .toc nav ol { list-style: none; margin: 0; padding: 0; }
.toc nav > ul > li > ul a, .toc nav > ul > li > ul > li > a { padding-left: 32px; font-size: 12.5px; color: var(--muted); }
.toc nav > ul > li > ul > li > ul { display: none; }
.nav-links a.icon-link { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; }
.nav-links a.icon-link svg { width: 17px; height: 17px; }
.search-box input {
  width: 100%; height: 46px; padding: 0 2px; font-size: 15.5px;
  color: var(--text); background: transparent;
  border: 0; border-bottom: 1px solid var(--edge);
  outline: none; transition: border-color .15s;
}
.search-box input:focus { border-bottom-color: var(--brand); }
.search-status { margin-top: 12px; color: var(--muted); font-size: 13.5px; }
.prose .callout.ok { border-left-color: #16a34a; } .prose .callout.ok .callout-title { color: #16a34a; }

/* —— 友链/入口卡片:无容器,底线分隔 —— */
.prose .flinks { display: grid; margin: 1.2em 0; }
.flink-card {
  display: flex; align-items: center; gap: 14px; padding: 14px 0;
  border-bottom: 1px solid var(--edge);
  color: inherit;
}
.prose a.flink-card { border-bottom: 1px solid var(--edge); color: inherit; }
.prose a.flink-card:hover { background: none; border-bottom-color: var(--edge); }
.prose a.flink-card:hover .flink-name { color: var(--brand); }
.flink-card img { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; flex: none; }
.flink-body { display: flex; flex-direction: column; min-width: 0; }
.flink-name { font-weight: 650; color: var(--text); font-size: 15.5px; }
.flink-desc { color: var(--secondary); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flink-meta { color: var(--muted); font-size: 12px; margin-top: 2px; }
.flink-card .flink-ico { width: 52px; height: 52px; border-radius: 12px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--brand-soft); color: var(--brand); font-size: 22px; }
