/* Karpathy 精选日报 · Claude 风格主题
   浅色：暖米白底 / 炭黑正文 / 陶土橙强调
   深色：暖黑棕底（非纯黑）/ 柔和米白正文，随系统自动切换 */

:root {
  --bg: #faf9f6;
  --bg-soft: #f3f0e9;
  --card: #fffdfa;
  --ink: #211d19;
  --muted: #6f675c;
  --faint: #9a8f82;
  --accent: #c25e3c;
  --accent-soft: rgba(194, 94, 60, 0.1);
  --line: #e7dfd1;
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #221c17;
    --bg-soft: #2b241e;
    --card: #292119;
    --ink: #ede5d8;
    --muted: #b3a794;
    --faint: #7d7264;
    --accent: #d97e57;
    --accent-soft: rgba(217, 126, 87, 0.14);
    --line: #3d342a;
  }
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
}

html, body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.85;
}

.wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- 页眉 ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.site-name {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.05em;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 1.2rem;
  font-size: 0.95rem;
}

.site-nav a:hover { color: var(--accent); }

/* ---------- 通用排版 ---------- */
h1, h2, h3 { font-family: var(--serif); line-height: 1.45; }

h1.edition-title {
  font-size: 1.9rem;
  margin: 2rem 0 0.6rem;
  letter-spacing: 0.02em;
}

.edition-date {
  color: var(--faint);
  font-size: 0.95rem;
  margin: 0 0 1.2rem;
}

.deck {
  font-size: 1.05rem;
  color: var(--muted);
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  margin: 0 0 2rem;
  line-height: 1.9;
}

.section { margin: 2.6rem 0; }

.section > h2 {
  font-size: 1.35rem;
  margin: 0 0 1.1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}

.section > h2 .en {
  display: block;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: var(--faint);
  font-weight: 400;
  margin-bottom: 0.25rem;
}

p { margin: 0 0 1rem; overflow-wrap: break-word; }

a { color: var(--accent); overflow-wrap: break-word; word-break: break-word; }

/* ---------- 统计 ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  margin: 0 0 0.5rem;
}

.stat {
  background: var(--card);
  padding: 1rem 0.6rem;
  text-align: center;
}

.stat .num {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.stat .label {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

/* ---------- 主题 ---------- */
.theme {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.2rem 1.3rem;
  margin-bottom: 1rem;
}

.theme h3 { margin: 0 0 0.5rem; font-size: 1.12rem; }

.theme p { color: var(--muted); margin-bottom: 0.6rem; }

.theme .ranks { font-size: 0.88rem; color: var(--faint); }
.theme .ranks a { text-decoration: none; margin-right: 0.5rem; }

/* ---------- 文章 ---------- */
.article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.5rem 1.4rem;
  margin-bottom: 1.6rem;
}

.article-head { margin-bottom: 1rem; }

.article-kicker {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.7rem;
  flex-wrap: wrap;
}

.rank-badge {
  font-family: var(--serif);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.1rem 0.7rem;
  white-space: nowrap;
}

.topic-tag {
  font-size: 0.82rem;
  color: var(--muted);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 0.1rem 0.7rem;
  white-space: nowrap;
}

.article h3.article-title {
  font-size: 1.42rem;
  margin: 0 0 0.5rem;
}

.article-meta {
  font-size: 0.88rem;
  color: var(--faint);
  line-height: 1.7;
}

.article-meta .orig-title {
  display: block;
  font-style: italic;
}

.block { margin: 1.3rem 0; }

.block > h4 {
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 0.55rem;
  letter-spacing: 0.06em;
}

.block p, .block li { font-size: 1rem; }

.block ul { margin: 0; padding-left: 1.3rem; }
.block li { margin-bottom: 0.5rem; }

.read-note {
  font-size: 0.88rem;
  color: var(--faint);
  background: var(--bg-soft);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  margin-top: 1.2rem;
}

.shallow-note {
  font-size: 0.9rem;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  margin-top: 1rem;
}

/* ---------- 观察 / 说明 ---------- */
.note-block {
  background: var(--bg-soft);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1rem;
}

.note-block h3 {
  font-size: 1.05rem;
  margin: 0 0 0.5rem;
}

.note-block p { font-size: 0.98rem; color: var(--muted); margin-bottom: 0.6rem; }
.note-block p:last-child { margin-bottom: 0; }

/* ---------- 未入选 ---------- */
.exclusions { list-style: none; margin: 0; padding: 0; }

.exclusions li {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

.exclusions li:last-child { border-bottom: none; }

.exclusions .ex-title { font-weight: 700; }
.exclusions .ex-source { color: var(--faint); font-size: 0.85rem; margin-left: 0.5rem; }
.exclusions .ex-reason { color: var(--muted); display: block; margin-top: 0.25rem; }

/* ---------- 归档 ---------- */
.archive-list { list-style: none; margin: 0; padding: 0; }

.archive-list li {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  margin-bottom: 1rem;
  padding: 1.1rem 1.25rem;
}

.archive-list a.edition-link {
  text-decoration: none;
  color: var(--ink);
  display: block;
}

.archive-list .edition-link h3 {
  margin: 0 0 0.3rem;
  font-size: 1.2rem;
}

.archive-list .edition-link:hover h3 { color: var(--accent); }

.archive-list .arc-date { font-size: 0.88rem; color: var(--faint); }
.archive-list .arc-deck { font-size: 0.95rem; color: var(--muted); margin: 0.4rem 0 0; }
.archive-list .arc-count { font-size: 0.85rem; color: var(--faint); margin-top: 0.4rem; }

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 3rem;
  padding: 1.4rem 0 2.4rem;
}

.site-footer p {
  font-size: 0.85rem;
  color: var(--faint);
  margin: 0;
}

/* ---------- 移动端 ---------- */
@media (max-width: 600px) {
  body { font-size: 16px; }

  h1.edition-title { font-size: 1.55rem; }

  .article h3.article-title { font-size: 1.25rem; }

  .stats { grid-template-columns: repeat(2, 1fr); }

  .stat .num { font-size: 1.45rem; }

  .article { padding: 1.2rem 1.05rem; }

  .theme { padding: 1rem 1.05rem; }

  .deck { font-size: 1rem; }
}
