:root {
  --bg: #fbfaf8; --fg: #1a1a18; --muted: #6b6b63; --line: #e4e1da;
  --accent: #b4462f; --soft: #f3f0ea;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #14140f; --fg: #edeae2; --muted: #9a978c; --line: #2c2b26;
          --accent: #e2826a; --soft: #1c1c17; }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.65 -apple-system, "PingFang SC", "Segoe UI", "Noto Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }

.top {
  display: flex; align-items: baseline; justify-content: space-between;
  max-width: 980px; margin: 0 auto; padding: 28px 24px 0;
}
.brand { font-weight: 700; font-size: 17px; text-decoration: none; letter-spacing: .02em; }
.top nav a {
  margin-left: 18px; color: var(--muted); text-decoration: none; font-size: 14px;
}
.top nav a:hover { color: var(--accent); }

main { max-width: 980px; margin: 0 auto; padding: 24px 24px 64px; }

.hero { padding: 32px 0 8px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.hero h1 { font-size: 26px; margin: 0 0 6px; letter-spacing: -.01em; }
.hero h1 .dot { color: var(--muted); margin: 0 9px; font-weight: 400; font-size: 15px; vertical-align: 3px; }
.hero h1 .wd { font-size: 15px; color: var(--muted); font-weight: 400; letter-spacing: 0; }
.lede { color: var(--muted); margin: 0 0 10px; }
.meta, .muted { color: var(--muted); font-size: 13px; margin: 0; }

.columns { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
@media (max-width: 760px) { .columns { grid-template-columns: 1fr; gap: 32px; } }

.col-title {
  font-size: 13px; text-transform: uppercase; letter-spacing: .12em;
  color: var(--muted); font-weight: 600; margin: 28px 0 4px;
}

.rank-list { list-style: none; margin: 0; padding: 0; counter-reset: r; }
.rank-list > li {
  counter-increment: r; position: relative;
  padding: 16px 0 16px 34px; border-bottom: 1px solid var(--line);
}
.rank-list > li::before {
  content: counter(r); position: absolute; left: 0; top: 17px;
  font-size: 15px; font-weight: 700; color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.item-title { font-weight: 600; text-decoration: none; line-height: 1.45; }
.item-title:hover { color: var(--accent); }
.item-summary { margin: 6px 0 0; color: var(--fg); opacity: .82; font-size: 14.5px; }
.item-why { margin: 4px 0 0; color: var(--accent); font-size: 13px; }
.item-meta { margin: 8px 0 0; display: flex; gap: 10px; align-items: center; }
.src { color: var(--muted); font-size: 12.5px; }
.dup {
  font-size: 11.5px; color: var(--accent); background: var(--soft);
  padding: 1px 7px; border-radius: 100px;
}
.empty { color: var(--muted); }

.archive-list { list-style: none; padding: 0; margin: 20px 0; }
.archive-list li {
  display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.archive-list a { font-weight: 600; text-decoration: none; font-variant-numeric: tabular-nums; }
.archive-list a:hover { color: var(--accent); }
.archive-top { color: var(--muted); font-size: 13px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }

.draft-banner {
  background: #fff3cd; color: #6b4b00; padding: 10px 24px;
  font-size: 13px; text-align: center; border-bottom: 1px solid #f0d98a;
}
.draft-banner code { background: rgba(0,0,0,.06); padding: 1px 5px; border-radius: 3px; }
.notice {
  margin-top: 32px; padding: 12px 14px; background: var(--soft);
  border-left: 3px solid var(--accent); font-size: 13px; color: var(--muted);
}

footer {
  max-width: 980px; margin: 0 auto; padding: 24px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--muted);
}
footer p { margin: 4px 0; }

/* ── 日期导航 ─────────────────────────────── */
.daynav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-top: 40px; padding-top: 20px;
  border-top: 1px solid var(--line); font-size: 14px;
}
.daynav a { text-decoration: none; color: var(--muted); }
.daynav a:hover { color: var(--accent); }
.daynav-all { font-weight: 600; color: var(--fg) !important; }
.daynav-side { flex: 1; min-width: 0; }
.daynav-right { text-align: right; }

.month-title {
  font-size: 15px; margin: 34px 0 2px; letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
}
.month-title .muted { font-weight: 400; font-size: 12.5px; letter-spacing: 0; }

.recent { margin-top: 44px; }
.recent .col-title { margin-top: 0; }
.recent-list { list-style: none; padding: 0; margin: 8px 0 0; }
.recent-list li {
  display: flex; gap: 14px; align-items: baseline;
  padding: 9px 0; border-bottom: 1px solid var(--line);
}
.recent-list a {
  text-decoration: none; font-variant-numeric: tabular-nums;
  font-size: 14px; font-weight: 600; flex: none;
}
.recent-list a:hover { color: var(--accent); }
.recent-top {
  color: var(--muted); font-size: 13.5px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}

/* ── 头条（两级排版的上层）───────────────────── */
.lead { padding: 26px 0 30px; border-bottom: 1px solid var(--line); }
.lead-label {
  font-size: 11.5px; font-weight: 700; letter-spacing: .16em;
  color: var(--accent); margin: 0 0 10px; text-transform: uppercase;
}
.lead-title { font-size: 33px; line-height: 1.28; margin: 0 0 12px; letter-spacing: -.015em; }
.lead-title a { text-decoration: none; }
.lead-title a:hover { color: var(--accent); }
.lead-summary { font-size: 17px; line-height: 1.7; color: var(--fg); opacity: .8; margin: 0 0 10px; }
.lead-why {
  font-size: 14px; color: var(--accent); margin: 0 0 12px;
  padding-left: 11px; border-left: 2px solid var(--accent);
}
@media (max-width: 760px) { .lead-title { font-size: 25px; } .lead-summary { font-size: 16px; } }

/* ── 紧凑列表（两级排版的下层）───────────────── */
.rank-list.compact > li { padding: 13px 0 13px 26px; }
.rank-list.compact > li::before { top: 14px; font-size: 13px; }
.rank-list.compact .item-title { font-size: 15px; font-weight: 500; line-height: 1.5; }
.rank-list.compact .item-summary {
  font-size: 13.5px; line-height: 1.6; margin-top: 4px; opacity: .7;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rank-list.compact .item-meta { margin-top: 6px; }
.rank-list.compact .warning { display: none; }

.columns.single { grid-template-columns: 1fr; }
body.single main, body.single .top, body.single footer { max-width: 720px; }

/* ── 首页：选题入口卡片 ─────────────────────── */
.entry-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin: 30px 0 8px; }
@media (max-width: 760px) { .entry-cards { grid-template-columns: 1fr; } }
.entry {
  display: flex; flex-direction: column; gap: 10px;
  padding: 20px 20px 18px; border: 1px solid var(--line); border-radius: 10px;
  text-decoration: none; background: var(--surface, #fff);
  transition: border-color .15s, transform .15s;
}
@media (prefers-color-scheme: dark) { .entry, .card { background: #191915; } }
.entry:hover { border-color: var(--line-strong, #cfc8b8); transform: translateY(-1px); }
.entry-top { display: flex; align-items: center; justify-content: space-between; }
.entry-count { font-size: 12.5px; color: var(--muted); }
.entry-title { font-size: 19px; font-weight: 650; line-height: 1.45; letter-spacing: -.005em; }
.entry-lead {
  font-size: 13.5px; color: var(--muted); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.entry-foot { font-size: 13px; color: var(--accent); margin-top: 2px; }

.badge {
  display: inline-block; font-size: 11.5px; font-weight: 600;
  padding: 2px 8px; border-radius: 4px; letter-spacing: .02em;
}
.badge-zh { background: #f3e7e2; color: #96601b; }
.badge-en { background: #e6f0ee; color: #1c6a5f; }
@media (prefers-color-scheme: dark) {
  .badge-zh { background: #2b2119; color: #d9a463; }
  .badge-en { background: #172825; color: #6fc3b0; }
}

/* ── 首页：最近几期卡片 ─────────────────────── */
.latest { margin-top: 44px; }
.latest .col-title { margin-top: 0; }
.day-group { margin-top: 26px; }
.day-label {
  font-size: 14px; font-weight: 650; margin: 0 0 12px;
  font-variant-numeric: tabular-nums; display: flex; gap: 8px; align-items: baseline;
}
.day-label .wd { font-size: 12.5px; font-weight: 400; color: var(--muted); }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 760px) { .cards { grid-template-columns: 1fr; } }
.card {
  display: flex; flex-direction: column; gap: 8px; align-items: flex-start;
  padding: 16px 18px; border: 1px solid var(--line); border-radius: 10px;
  text-decoration: none; background: var(--surface, #fff);
  transition: border-color .15s;
}
.card:hover { border-color: var(--line-strong, #cfc8b8); }
.card-title {
  font-size: 16px; font-weight: 600; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-lead {
  font-size: 13px; color: var(--muted); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-foot {
  display: flex; justify-content: space-between; width: 100%;
  font-size: 12.5px; color: var(--muted); margin-top: 4px;
}
.more { margin-top: 26px; font-size: 13.5px; }
.more a { color: var(--accent); text-decoration: none; }

/* ── 论文精选 ───────────────────────────────── */
.paper-list { list-style: none; counter-reset: p; margin: 8px 0 0; padding: 0; }
.paper-list > li {
  counter-increment: p; position: relative;
  padding: 22px 0 20px 36px; border-bottom: 1px solid var(--line);
}
.paper-list > li::before {
  content: counter(p); position: absolute; left: 0; top: 24px;
  font-size: 15px; font-weight: 700; color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.paper-summary { font-size: 17px; font-weight: 600; line-height: 1.55; margin: 0 0 6px; }
.paper-title { margin: 0 0 8px; }
.paper-title a {
  font-size: 13px; color: var(--muted); text-decoration: none; line-height: 1.5;
}
.paper-title a:hover { color: var(--accent); }
.paper-list .lead-why { margin: 0 0 10px; }
.paper-link {
  font-size: 12.5px; color: var(--accent); text-decoration: none;
  border-bottom: 1px solid currentColor;
}
.paper-list .item-meta { gap: 12px; flex-wrap: wrap; }

/* 首页三卡片 */
.entry-cards.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .entry-cards.three { grid-template-columns: 1fr; } }
.paper-teaser {
  font-size: 13.5px; color: var(--muted); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.badge-paper { background: #eae7f5; color: #4a3f8f; }
@media (prefers-color-scheme: dark) { .badge-paper { background: #201d2e; color: #a99ce6; } }
