/* 配色：暖白纸面 + 墨色正文；每个栏目有自己的强调色（body[data-sec]），侧栏圆点也用它 */
:root {
  --bg: #f7f6f2; --panel: #ffffff; --panel-2: #fbfaf7; --text: #1c1c19; --muted: #66645d; --faint: #9c9a91;
  --border: #e7e4dc; --border-strong: #d6d2c7; --code: #f2f0ea;
  --c-infra: #2f55d4; --c-daily: #0f7a68; --c-weekly: #6a4ad2; --c-kexue: #b3561b; --c-saved: #c28a06;
  --accent: var(--c-infra); --accent-soft: #edf1fc;
  --hot: #c2410c; --hot-soft: #fdeee5; --up: #15803d; --up-soft: #e6f4ea; --down: #b42318; --down-soft: #fcebea;
  --star: #d19a00; --star-soft: #fcf3d9;
  --shadow: 0 1px 1px rgba(28, 26, 20, .03), 0 2px 6px rgba(28, 26, 20, .04);
  --shadow-hover: 0 2px 4px rgba(28, 26, 20, .04), 0 10px 28px rgba(28, 26, 20, .08);
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --serif: "Iowan Old Style", "Charter", "Palatino Linotype", Palatino, "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "STSong", Georgia, serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --nav-w: 292px;
  color-scheme: light dark;
}
body[data-sec="arxiv-daily"] { --accent: var(--c-daily); --accent-soft: #e6f4f0; }
body[data-sec="arxiv-weekly"] { --accent: var(--c-weekly); --accent-soft: #f0ecfb; }
body[data-sec="kexue"] { --accent: var(--c-kexue); --accent-soft: #fbefe6; }
body[data-sec="saved"] { --accent: var(--c-saved); --accent-soft: var(--star-soft); }
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131312; --panel: #1b1b19; --panel-2: #181816; --text: #ebe9e3; --muted: #a4a198; --faint: #74726a;
    --border: #2b2a27; --border-strong: #3b3a36; --code: #232220;
    --c-infra: #8ea8f6; --c-daily: #5cc9b3; --c-weekly: #b3a0f5; --c-kexue: #efa066; --c-saved: #e8bb45;
    --accent-soft: #1e2741;
    --hot: #fb923c; --hot-soft: #3a2516; --up: #4ade80; --up-soft: #16301f; --down: #f87171; --down-soft: #3a1c1b;
    --star: #f3c343; --star-soft: #372d12;
    --shadow: none; --shadow-hover: 0 8px 24px rgba(0, 0, 0, .35);
  }
  body[data-sec="arxiv-daily"] { --accent-soft: #14302a; }
  body[data-sec="arxiv-weekly"] { --accent-soft: #2a2442; }
  body[data-sec="kexue"] { --accent-soft: #3a2616; }
}
* { box-sizing: border-box; }
html { scroll-padding-top: 24px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.8 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "palt" 0;
}
button { font: inherit; color: inherit; }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---------- 顶部进度条、手机顶栏 ---------- */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 30;
  background: var(--accent); transform-origin: 0 50%; transform: scaleX(0);
}
.topbar { display: none; }
.icon-btn {
  border: 1px solid var(--border); background: var(--panel); border-radius: 9px;
  width: 34px; height: 34px; line-height: 1; cursor: pointer; flex: none; font-size: 17px; color: var(--muted);
  transition: border-color .15s, color .15s, background .15s;
}
.icon-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.icon-btn:disabled { opacity: .35; cursor: default; }

/* ---------- 布局 ---------- */
.layout { display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr); min-height: 100vh; }
nav {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; overscroll-behavior: contain;
  padding: 26px 16px 48px; border-right: 1px solid var(--border); background: var(--panel-2);
  scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent;
}
.brand { display: flex; align-items: center; gap: 10px; margin: 0 8px 26px; }
.brand-mark {
  width: 22px; height: 22px; border-radius: 7px; flex: none;
  background: linear-gradient(135deg, var(--c-infra), var(--c-weekly) 55%, var(--c-kexue));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
}
.brand-name { font: 600 17px/1 var(--serif); letter-spacing: .04em; }
.login-link { margin-left: auto; font-size: 13px; color: var(--faint); text-decoration: none; }
.login-link:hover { color: var(--accent); }
.login-link[hidden] { display: none; }
.nav-label {
  font-size: 11px; font-weight: 600; color: var(--faint); margin: 0 10px 8px;
  letter-spacing: .14em; text-transform: uppercase;
}
/* 栏目：一行一个，左边圆点是栏目色，右边是期数 */
.sections { display: flex; flex-direction: column; gap: 2px; margin: 0 0 2px; }
.sections[hidden] { display: none; }
.sec-tab {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px;
  font-size: 14.5px; line-height: 1.4; color: var(--muted); text-decoration: none;
  transition: background .15s, color .15s;
}
.sec-tab[hidden] { display: none; }
.sec-tab:hover { background: var(--code); color: var(--text); }
.sec-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--c-infra); opacity: .85; }
.sec-tab[data-sec="arxiv-daily"] .sec-dot { background: var(--c-daily); }
.sec-tab[data-sec="arxiv-weekly"] .sec-dot { background: var(--c-weekly); }
.sec-tab[data-sec="kexue"] .sec-dot { background: var(--c-kexue); }
.saved-link .sec-dot { background: var(--c-saved); border-radius: 2px; transform: rotate(45deg) scale(.9); }
.sec-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sec-tab .count { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.sec-tab.active { background: var(--panel); color: var(--text); font-weight: 600; box-shadow: 0 0 0 1px var(--border), var(--shadow); }
.sec-tab.active .count { color: var(--accent); }
.saved-link { margin-top: 2px; }
/* 添加论文：侧栏里一行输入框 + 按钮 */
.add-paper { display: flex; gap: 6px; margin: 10px 4px 0; }
.add-paper[hidden] { display: none; }
.add-paper input {
  flex: 1; min-width: 0; height: 32px; padding: 0 10px; border-radius: 9px; font: 13px var(--sans);
  border: 1px dashed var(--border-strong); background: transparent; color: var(--text);
}
.add-paper input:focus { outline: none; border-style: solid; border-color: var(--accent); background: var(--panel); }
.add-paper button {
  flex: none; height: 32px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--panel); color: var(--text); font-size: 13px; cursor: pointer;
}
.add-paper button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.add-paper button:disabled { opacity: .5; cursor: default; }
.add-state { font-size: 13.5px; margin-top: 4px; }
.add-done { color: var(--up); }
.add-pending { color: var(--muted); }
.add-failed { color: var(--down); }
li.add-item { padding-right: 20px; }
.add-retry { margin-top: 8px; width: auto !important; padding: 0 12px !important; }
.week-switch { display: flex; gap: 6px; margin: 18px 4px 28px; }
.week-switch select {
  flex: 1; min-width: 0; height: 34px; padding: 0 10px; font: 14px var(--sans); border-radius: 9px;
  border: 1px solid var(--border); background: var(--panel); color: var(--text);
  font-variant-numeric: tabular-nums; cursor: pointer;
}
.week-switch select:disabled { opacity: .5; cursor: default; }
.toc { list-style: none; margin: 0; padding: 0; }
.toc a {
  display: block; text-decoration: none; color: var(--muted); border-radius: 7px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: background .12s, color .12s;
}
.toc a:hover { color: var(--text); background: var(--code); }
.toc-h2 { padding: 5px 10px; font-size: 13.5px; font-weight: 600; color: var(--text) !important; margin-top: 2px; }
.toc-h2.within { color: var(--accent) !important; }
.toc-group { font-size: 11px; color: var(--faint); margin: 8px 10px 2px; letter-spacing: .08em; }
.toc-repos { display: grid; grid-template-columns: 1fr 1fr; gap: 1px 4px; padding: 0 2px; }
.toc-h3 { padding: 3px 8px; font-size: 12.5px; }
.toc-list { margin: 2px 0 6px 12px; padding-left: 6px; border-left: 1px solid var(--border); }
.toc a.active { background: var(--accent-soft); color: var(--accent) !important; font-weight: 600; }

main { padding: 56px 64px 140px; max-width: 920px; width: 100%; margin: 0 auto; }

/* ---------- 正文 ---------- */
main h1 { margin: 0 0 22px; line-height: 1.25; font-weight: 700; }
.h1-kicker {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
  font: 600 12.5px/1.4 var(--sans); color: var(--accent); letter-spacing: .1em;
}
.h1-kicker::before { content: ""; width: 18px; height: 2px; border-radius: 1px; background: var(--accent); }
.h1-title {
  display: block; font-family: var(--serif); font-size: 34px; font-weight: 700; letter-spacing: -.005em;
  line-height: 1.28; font-variant-numeric: tabular-nums; text-wrap: balance;
}
.lede {
  font-size: 16.5px; color: var(--muted); margin: 0 0 36px !important; padding: 0 !important;
  border: none !important; line-height: 1.8;
}
blockquote.lede > p { margin: 0; }
.source-link { margin: -12px 0 20px !important; font-size: 14px; }
.source-link a {
  display: inline-block; padding: 3px 12px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--panel); font-weight: 600;
}
.source-link a:hover { border-color: var(--accent); background: var(--accent-soft); text-decoration: none; }
main h2 {
  font-family: var(--serif); font-size: 24px; font-weight: 700; margin: 0 0 18px; line-height: 1.35;
  padding-bottom: 10px; border-bottom: 1px solid var(--border);
  display: flex; align-items: baseline; gap: 10px;
}
main h2::before {
  content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); flex: none;
  transform: translateY(-3px) rotate(45deg);
}
main h3 { font-family: var(--serif); font-size: 19px; font-weight: 700; margin: 0 0 8px; line-height: 1.4; }
main h4 { font-size: 16px; margin: 1.2em 0 .4em; }
main p { margin: .6em 0; }
main a { color: var(--accent); text-decoration: none; overflow-wrap: anywhere; }
main a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
main strong { font-weight: 650; }
main ul, main ol { padding-left: 1.3em; margin: .5em 0; }
main li { margin: .35em 0; }
main li::marker { color: var(--faint); }
main code {
  font-family: var(--mono); font-size: .85em; background: var(--code);
  padding: .12em .4em; border-radius: 5px; overflow-wrap: anywhere;
}
main pre {
  position: relative; background: var(--code); padding: 14px 16px; border-radius: 10px;
  overflow-x: auto; font-size: 13.5px; line-height: 1.6; margin: .8em 0;
  border: 1px solid var(--border);
}
main pre[data-lang]::after {
  content: attr(data-lang); position: absolute; top: 6px; right: 10px;
  font: 11px var(--mono); color: var(--faint);
}
main pre code { padding: 0; background: none; font-size: inherit; overflow-wrap: normal; }
.table-wrap { overflow-x: auto; margin: 1em 0; border: 1px solid var(--border); border-radius: 10px; }
main table { border-collapse: collapse; font-size: 14.5px; width: 100%; }
main th, main td { border-bottom: 1px solid var(--border); padding: 8px 12px; text-align: left; vertical-align: top; }
main tr:last-child td { border-bottom: none; }
main th { background: var(--code); font-weight: 600; }
main blockquote { margin: .8em 0; padding: 4px 16px; border-left: 3px solid var(--border-strong); color: var(--muted); }
main hr { border: none; border-top: 1px solid var(--border); margin: 2.4em 0; }
.note { font-size: 13.5px; color: var(--muted); }
.empty { color: var(--muted); }

/* 公式：KaTeX 输出 MathML，浏览器自己排版 */
.math-display { display: block; overflow-x: auto; overflow-y: hidden; margin: .9em 0; padding: 4px 0; }
.math-display .katex { display: block; text-align: center; }
.math-display math { font-size: 1.12em; }
.math-inline math { font-size: 1.05em; }
.katex-error { color: var(--hot); }

/* 一级分节 */
section.block { margin: 0 0 56px; }
main > :not(section) + section.block { margin-top: 40px; }
section.fineprint { font-size: 14px; color: var(--muted); }
section.fineprint h2 { font-size: 19px; color: var(--text); }
section.fineprint h3 { font-size: 16px; }

/* 本周最值得看：带大序号的卡片 */
section.top > ol { list-style: none; padding: 0; counter-reset: top; }
section.top > ol > li {
  counter-increment: top; position: relative; margin: 0 0 12px;
  padding: 18px 20px 18px 62px; background: var(--panel); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow);
}
section.top > ol > li::before {
  content: counter(top, decimal-leading-zero); position: absolute; left: 20px; top: 17px;
  font: 700 20px/1.3 var(--serif); color: var(--accent); font-variant-numeric: tabular-nums;
}
section.top > ol > li > strong:first-child,
section.top > ol > li > p:first-child > strong:first-child { display: block; font-size: 16.5px; margin-bottom: 4px; }

/* 跨仓库趋势 */
section.trends > ul { list-style: none; padding: 0; }
section.trends > ul > li {
  position: relative; margin: 0 0 12px; padding: 18px 20px 18px 62px; background: var(--panel);
  border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow);
}
section.trends > ul > li::before {
  content: "↗"; position: absolute; left: 22px; top: 17px;
  font: 700 20px/1.3 var(--serif); color: var(--accent);
}
section.top > ol > li > p:first-child,
section.trends > ul > li > p:first-child { margin-top: 0; }
section.trends > ul > li > strong:first-child,
section.trends > ul > li > p:first-child > strong:first-child { display: block; font-size: 16.5px; margin-bottom: 4px; }

/* 讨论最热 */
section.hot > ul { list-style: none; padding: 0; counter-reset: hot; }
section.hot > ul > li {
  margin: 0 0 10px; padding: 14px 18px; background: var(--panel);
  border: 1px solid var(--border); border-left: 3px solid var(--hot); border-radius: 12px;
}
section.hot > ul > li.dc {
  counter-increment: hot; position: relative; padding: 16px 20px 16px 58px;
  border-left: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow);
}
section.hot > ul > li.dc::before {
  content: counter(hot); position: absolute; left: 20px; top: 15px;
  font: 700 20px/1.3 var(--serif); color: var(--hot); font-variant-numeric: tabular-nums;
}
/* 讨论条目：标签行（仓库、类型、状态、评论数）+ 标题 + 一句话 */
.dc-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; }
.dc-meta > span {
  font-size: 12px; line-height: 22px; padding: 0 9px; border-radius: 999px;
  background: var(--code); color: var(--muted); white-space: nowrap;
}
.dc-meta > .dc-repo { font-family: var(--mono); font-size: 11.5px; color: var(--text); }
.dc-meta > .dc-count { color: var(--hot); background: var(--hot-soft); font-weight: 600; font-variant-numeric: tabular-nums; }
.dc-meta > .dc-merged { color: var(--c-weekly); background: color-mix(in srgb, var(--c-weekly) 14%, transparent); }
.dc-meta > .dc-open { color: var(--up); background: var(--up-soft); }
.dc-meta > .dc-closed { color: var(--down); background: var(--down-soft); }
.dc-meta > .dc-draft { color: var(--faint); }
li.discuss-item .dc-meta > span:not(.dc-count):not(.dc-open):not(.dc-closed):not(.dc-merged) { background: var(--panel); }
li.dc > p { margin: 0; }
.dc-title a { font-weight: 650; }
section.hot .dc-title a { font-size: 16px; color: var(--text); }
section.hot .dc-title a:hover { color: var(--accent); }
.dc-desc { margin-top: 4px; }
section.hot .dc-desc { font-size: 15px; color: var(--muted); }
section.hot > ul > li > strong:first-child {
  display: inline-block; font-size: 12.5px; font-weight: 600; color: var(--hot);
  background: var(--hot-soft); padding: 0 8px; border-radius: 999px; margin-right: 4px;
}

/* 卡片：infra 每个仓库、日报每篇论文 */
article.repo {
  background: var(--panel); border: 1px solid var(--border); border-radius: 16px;
  padding: 22px 26px 18px; margin: 0 0 18px; box-shadow: var(--shadow);
  transition: box-shadow .2s, border-color .2s;
}
article.repo:hover { box-shadow: var(--shadow-hover); border-color: var(--border-strong); }
article.repo > ul { list-style: none; padding: 0; margin: 0; }
article.repo > ul > li { margin: 0 0 10px; }
article.repo > ul > li.row-key > ul { padding-left: 0; list-style: none; }
article.repo > ul > li.row-key > ul > li {
  position: relative; margin: 10px 0; padding: 2px 0 2px 16px; border-left: 2px solid var(--border);
  transition: border-color .15s;
}
article.repo > ul > li.row-key > ul > li:hover { border-left-color: var(--accent); }
li.row-other { color: var(--muted); font-size: 14.5px; }
li.row-discuss > ul { list-style: none; padding: 0; }
li.discuss-item {
  font-size: 14.5px; padding: 8px 12px; margin: 6px 0; border-radius: 9px; background: var(--code);
}
/* 周报里没有 h3 小标题的卡片（例如"分类框架"下的每一类）不加阴影 */
section.block:not(.repos) > article.repo:not(.paper) { box-shadow: none; }
section.block:not(.repos) > article.repo:not(.paper):hover { box-shadow: none; border-color: var(--border); }

.tag {
  display: inline-block; font-size: 12px; font-weight: 600; line-height: 20px; padding: 0 8px;
  margin-right: 8px; border-radius: 999px; background: var(--code); color: var(--muted);
  vertical-align: 1px; cursor: default;
}
li.row-key > .tag { background: var(--accent-soft); color: var(--accent); }
li.row-discuss > .tag { background: var(--hot-soft); color: var(--hot); }
li.row-key > .tag, li.row-discuss > .tag { margin-bottom: 2px; }
li.row-stats { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 6px 0; }
li.row-stats > .tag { margin-top: 3px; }
.stats { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; min-width: 0; }
.chip {
  font-size: 13.5px; line-height: 1.5; padding: 2px 10px; border: 1px solid var(--border);
  border-radius: 8px; font-variant-numeric: tabular-nums; background: var(--panel-2);
}

/* 链接：PR 和源码文件做成一排小按钮 */
.links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.links a, a.pill {
  display: inline-block; font-size: 12.5px; line-height: 1.5;
  padding: 1px 10px; border-radius: 7px; border: 1px solid var(--border); background: var(--panel);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: 1px;
}
.links a:hover, a.pill:hover { border-color: var(--accent); text-decoration: none; background: var(--accent-soft); }
.links a.pill { font-weight: 600; }
.links a.pill-code { font-family: var(--mono); font-size: 12px; }
.links a.pill-code::before { content: "‹›"; margin-right: 5px; color: var(--faint); font-family: var(--mono); }

/* ---------- 日报：论文卡片 ---------- */
.paper-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; }
.badge-star {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; line-height: 22px;
  padding: 0 9px; border-radius: 999px; color: var(--star); background: var(--star-soft);
}
.badge-star::before { content: "★"; font-size: 11px; }
.badge-mine {
  font-size: 12px; font-weight: 700; line-height: 22px; padding: 0 9px; border-radius: 999px;
  color: var(--c-saved); background: var(--star-soft);
}
.chip-tag {
  font-size: 12px; line-height: 22px; padding: 0 9px; border-radius: 999px;
  color: var(--accent); background: var(--accent-soft); font-weight: 600;
}
article.paper.starred { border-top: 3px solid var(--star); }
article.paper h3 { font-size: 20px; }
ul.paper-meta { font-size: 14px; color: var(--muted); line-height: 1.7; margin: 10px 0 14px !important; }
ul.paper-meta > li { margin: 0 0 5px !important; }
.meta-label {
  display: inline-block; min-width: 3em; margin-right: 8px; font-size: 12px; font-weight: 600; color: var(--faint);
  letter-spacing: .06em;
}
li.meta-tags { display: none; }
li.meta-affil { color: var(--text); }
li.meta-rec { color: var(--text); }
li.meta-rec strong { color: var(--accent); }

/* 资源条：arXiv、PDF、代码仓库、数据集 + 开源状态，全是图标按钮 */
.paper-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 6px; }
a.res {
  display: inline-flex; align-items: center; gap: 5px; max-width: 100%; height: 26px; padding: 0 10px;
  border-radius: 7px; border: 1px solid var(--border); background: var(--panel); color: var(--text);
  font-size: 12.5px; white-space: nowrap; overflow: hidden;
}
a.res:hover { text-decoration: none; border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
a.res .ico { width: 14px; height: 14px; color: var(--muted); }
a.res:hover .ico { color: inherit; }
.res-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
a.res-arxiv .res-text, a.res-github .res-text, a.res-hf .res-text { font-family: var(--mono); font-size: 12px; }
a.res-arxiv .ico { color: #b31b1b; }
.open-badges { display: inline-flex; gap: 4px; }
.open-badge {
  display: inline-flex; align-items: center; gap: 3px; height: 26px; padding: 0 8px; border-radius: 7px;
  font-size: 12px; cursor: default;
}
.open-badge .ico { width: 13px; height: 13px; }
.open-yes { color: var(--up); background: var(--up-soft); }
.open-no { color: var(--faint); background: var(--code); }
.open-unknown { color: var(--muted); background: var(--code); }
.open-mark { font-weight: 700; }
.res-cats { font: 11.5px var(--mono); color: var(--faint); }
details.audit { font-size: 13px; color: var(--muted); margin: 0 0 4px; }
details.audit > summary { cursor: pointer; color: var(--faint); font-size: 12px; width: max-content; list-style-position: inside; }
details.audit > summary:hover { color: var(--accent); }
.audit-body { margin: 4px 0 0; padding: 8px 12px; border-radius: 8px; background: var(--code); }

/* 中文总结、质量评价、局限：各一块，块里按"问题/方法/证据…"一行一项 */
.para-block { margin: 16px 0 0; }
.para-label {
  font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: .1em; margin-bottom: 6px;
}
.para-block > p { margin: 0; }
.para-lead { margin: 0 0 6px !important; }
.kv { display: grid; grid-template-columns: 5.5em minmax(0, 1fr); gap: 12px; padding: 6px 0; border-top: 1px dashed var(--border); }
.para-label + .kv, .para-lead + .kv { border-top: none; }
.kv-k { font-size: 13px; font-weight: 600; color: var(--muted); padding-top: 2px; }
.para-quality, .para-infra { padding: 10px 14px 8px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--border); }
.para-limits { padding: 10px 14px 8px; border-radius: 10px; background: var(--hot-soft); }
.para-limits .para-label { color: var(--hot); }
.para-list { margin: 0; padding-left: 1.2em; }
.para-list > li { margin: 2px 0; }

/* 周报里的论文条目 */
li.paper-li { position: relative; padding-right: 140px; }
li.paper-li > .fb-mini { position: absolute; right: 0; top: 2px; }

/* ---------- 反馈按钮 ---------- */
.ico { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.fb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 14px; }
.fb-btn {
  display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--panel); color: var(--muted); cursor: pointer;
  font-size: 12.5px; line-height: 1; transition: border-color .15s, color .15s, background .15s, transform .1s;
}
.fb-btn:hover { border-color: var(--border-strong); color: var(--text); }
.fb-btn:active { transform: scale(.94); }
.fb-fav.on { color: var(--star); border-color: var(--star); background: var(--star-soft); }
.fb-fav.on .ico { fill: currentColor; }
.fb-up.on { color: var(--up); border-color: var(--up); background: var(--up-soft); }
.fb-mid.on { color: var(--text); border-color: var(--border-strong); background: var(--code); }
.fb-down.on { color: var(--down); border-color: var(--down); background: var(--down-soft); }
.fb-note {
  flex: 1 1 220px; min-width: 0; height: 28px; padding: 0 12px; border-radius: 999px;
  border: 1px dashed var(--border-strong); background: transparent; color: var(--text); font: 13px var(--sans);
}
.fb-note:focus { outline: none; border-style: solid; border-color: var(--accent); background: var(--panel); }
.fb-note[hidden] { display: none; }
.fb-mini { gap: 3px; margin: 0; flex-wrap: nowrap; }
.fb-mini .fb-btn { height: 26px; width: 30px; padding: 0; justify-content: center; border-color: transparent; background: transparent; }
.fb-mini .fb-btn:hover { background: var(--code); }
.fb-mini .fb-btn.on { border-color: transparent; }
.fb-mini .ico { width: 14px; height: 14px; }
article.repo > .fb { margin-top: 2px; }
h1 + .fb, .source-link + .fb { margin: -4px 0 28px; }

/* ---------- 收藏与反馈页 ---------- */
.saved-tabs { display: flex; gap: 6px; margin: 0 0 22px; flex-wrap: wrap; }
.saved-tab {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--panel); color: var(--muted); font-size: 14px;
}
.saved-tab:hover { text-decoration: none; border-color: var(--border-strong); color: var(--text); }
.saved-tab.active { color: var(--text); border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.saved-tab .count { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
ul.saved-list { list-style: none; padding: 0; margin: 0; }
li.saved-item {
  position: relative; margin: 0 0 12px; padding: 16px 150px 16px 20px; border-radius: 14px;
  background: var(--panel); border: 1px solid var(--border); box-shadow: var(--shadow);
}
li.saved-item > .fb-mini { position: absolute; right: 12px; top: 14px; }
.saved-meta { font-size: 12px; color: var(--faint); letter-spacing: .02em; }
a.saved-title { display: block; font: 700 17px/1.45 var(--serif); color: var(--text); margin-top: 2px; }
a.saved-title:hover { color: var(--accent); }
.saved-note { font-size: 14px; color: var(--muted); margin-top: 6px; padding-left: 10px; border-left: 2px solid var(--border-strong); }

/* ---------- 浮动按钮、提示 ---------- */
.to-top {
  position: fixed; right: 24px; bottom: 24px; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--panel); box-shadow: var(--shadow-hover); color: var(--muted);
  cursor: pointer; font-size: 17px; opacity: 0; pointer-events: none; transform: translateY(6px);
  transition: opacity .2s, transform .2s, color .15s, border-color .15s;
}
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { color: var(--accent); border-color: var(--accent); }
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 50; max-width: calc(100vw - 32px);
  padding: 10px 18px; border-radius: 12px; background: var(--text); color: var(--bg); font-size: 14px;
  box-shadow: var(--shadow-hover); opacity: 0; pointer-events: none;
  transform: translate(-50%, 8px); transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.scrim { display: none; }

/* ---------- 窄屏：侧栏变成抽屉 ---------- */
@media (max-width: 1100px) { main { padding: 44px 40px 120px; } }
@media (max-width: 900px) {
  html { scroll-padding-top: 66px; }
  .topbar {
    display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 20;
    height: 54px; padding: 0 14px; border-bottom: 1px solid var(--border);
    background: var(--bg);   /* 不认识 color-mix 的旧浏览器用不透明底色 */
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px);
  }
  .topbar-title { font: 600 16px/1 var(--serif); letter-spacing: .03em; }
  .layout { display: block; }
  nav {
    position: fixed; z-index: 40; top: 0; left: 0; bottom: 0; width: min(86vw, 320px); height: auto;
    transform: translateX(-100%); transition: transform .24s cubic-bezier(.2, .8, .2, 1), visibility .24s; box-shadow: none;
    visibility: hidden; background: var(--bg);
    padding-top: max(26px, env(safe-area-inset-top));
  }
  body.drawer-open nav { transform: none; visibility: visible; box-shadow: 0 0 48px rgba(0, 0, 0, .22); }
  body.drawer-open .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(0, 0, 0, .32); }
  body.drawer-open { overflow: hidden; }
  main { padding: 26px 16px 96px; }
  .h1-title { font-size: 26px; }
  .lede { font-size: 15.5px; margin-bottom: 28px !important; }
  main h2 { font-size: 21px; }
  main h3, article.paper h3 { font-size: 18px; }
  section.block { margin-bottom: 44px; }
  section.top > ol > li { padding: 14px 14px 14px 50px; }
  section.top > ol > li::before { left: 14px; font-size: 17px; }
  section.trends > ul > li { padding: 14px 14px 14px 50px; }
  section.trends > ul > li::before { left: 16px; font-size: 17px; }
  section.hot > ul > li.dc { padding: 14px 14px 14px 44px; }
  section.hot > ul > li.dc::before { left: 14px; font-size: 17px; }
  article.repo { padding: 16px 16px 12px; border-radius: 14px; }
  article.repo:hover { box-shadow: var(--shadow); }
  li.paper-li { padding-right: 0; }
  .kv { grid-template-columns: 1fr; gap: 0; }
  li.paper-li > .fb-mini { position: static; margin-top: 4px; }
  li.saved-item { padding: 14px 16px; }
  li.saved-item > .fb-mini { position: static; margin-top: 8px; }
  .fb-text { display: none; }
  .fb-btn { width: 36px; justify-content: center; padding: 0; height: 32px; }
  .fb-mini .fb-btn { width: 36px; height: 32px; }
  .fb-note { height: 32px; flex-basis: 100%; }
  .to-top { right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  nav, .to-top, .toast, article.repo, .fb-btn { transition: none; }
}
