/* =============================================================================
   族 read —— 阅读型
   骨架：左侧 220 常驻栏（导航在这里，不是顶栏）+ 右侧 680 正文列
   文章页带阅读进度条与客户端生成的目录（本族是唯一带 JS 的族）
   ========================================================================== */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.read-page {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Songti SC", "STSong", "SimSun", Georgia, serif;
  font-size: 16.5px; line-height: 1.95;
  min-height: 100vh;
}
body.read-page a { color: var(--accent-deep); text-decoration: none; }
body.read-page a:hover { text-decoration: underline; text-underline-offset: 3px; }
body.read-page img { max-width: 100%; height: auto; }

/* 阅读进度条：fixed 在视口顶部，JS 写 transform: scaleX() */
.read-bar {
  position: fixed; inset: 0 auto auto 0; z-index: 20;
  width: 100%; height: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: 0 50%;
}

/* ------------------------------------------------------------------- shell */
.read-shell {
  display: grid; grid-template-columns: 232px minmax(0, 1fr);
  max-width: 1080px; margin: 0 auto; min-height: 100vh;
}

/* 左栏 = 导航位（nav 开关作用在这里） */
.read-rail {
  position: sticky; top: 0; align-self: start;
  display: flex; flex-direction: column; gap: 18px;
  max-height: 100vh; overflow: auto;
  padding: 46px 26px 30px 20px;
  border-right: 1px solid var(--border-soft);
}
.read-rail.is-center { text-align: center; align-items: center; }
.read-rail.is-left { text-align: left; }
.read-rail.is-stack { padding-top: 34px; }
.read-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text); white-space: nowrap; }
.read-mark { border-radius: 50%; flex: 0 0 auto; }
.read-brand-t { font-size: 17px; letter-spacing: .06em; }
.read-rail-tag {
  margin: 0; font-size: 12.5px; line-height: 1.7; color: var(--text-4);
  font-family: system-ui, -apple-system, "PingFang SC", sans-serif;
}
.read-rail-about { border-top: 1px solid var(--border-soft); padding-top: 12px; }
.read-rail-h {
  margin: 0 0 4px; font-size: 10.5px; letter-spacing: .18em; color: var(--muted);
  font-family: system-ui, -apple-system, "PingFang SC", sans-serif;
}
.read-links { display: flex; flex-direction: column; gap: 2px; }
.read-link {
  display: flex; align-items: center; gap: 8px; padding: 5px 0;
  font-size: 14px; color: var(--text-2);
  font-family: system-ui, -apple-system, "PingFang SC", sans-serif;
}
.read-rail.is-center .read-link { justify-content: center; }
.read-dash { width: 12px; height: 1px; background: var(--border); flex: 0 0 auto; }
.read-link:hover .read-dash { background: var(--accent); }
.read-fold { width: 100%; }
.read-fold-btn {
  cursor: pointer; list-style: none; padding: 4px 0;
  font-family: system-ui, -apple-system, "PingFang SC", sans-serif;
  font-size: 10.5px; letter-spacing: .18em; color: var(--muted);
}
.read-fold-btn::-webkit-details-marker { display: none; }
.read-rail-foot {
  margin: auto 0 0; font-size: 10.5px; color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* -------------------------------------------------------------------- main */
.read-main { padding: 46px 40px 64px; min-width: 0; }
.read-hero { margin: 0 0 30px; }
.read-hero.is-title { padding-bottom: 20px; border-bottom: 3px double var(--border); }
.read-kicker {
  margin: 0 0 6px; font-size: 11px; letter-spacing: .22em; color: var(--muted);
  font-family: system-ui, -apple-system, "PingFang SC", sans-serif;
}
.read-hero-n {
  display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0;
  font-family: system-ui, -apple-system, "PingFang SC", sans-serif;
}
.read-chip {
  padding: 2px 9px; border: 1px solid var(--border); border-radius: 999px;
  font-size: 11.5px; color: var(--text-3);
}
/* hero：首屏图已停用——本族左栏「关于这个站」本来就写着同一句描述，
   图与重复的站名只是装饰。 */

.read-crumb {
  margin: 0 0 20px; font-size: 12px; color: var(--muted);
  font-family: system-ui, -apple-system, "PingFang SC", sans-serif;
}
.read-sep { margin: 0 7px; color: var(--border); }
.read-cat-head { margin-bottom: 8px; }
.read-cat-h { margin: 0; font-size: 27px; font-weight: 500; }
.read-cat-n {
  margin: 4px 0 0; font-size: 12px; color: var(--muted);
  font-family: system-ui, -apple-system, "PingFang SC", sans-serif;
}

/* -------------------------------------------------------------------- list */
.read-sec { margin: 0 0 26px; }
.read-sec-h {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin: 0 0 2px; padding-bottom: 8px; border-bottom: 1px solid var(--border);
  font-size: 13px; font-weight: 400; letter-spacing: .12em; color: var(--text-2);
  font-family: system-ui, -apple-system, "PingFang SC", sans-serif;
}
.read-sec-n {
  font-size: 10.5px; color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.read-feed { display: flex; flex-direction: column; }
.read-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 24px;
  padding: 13px 0; border-bottom: 1px solid var(--border-soft);
}
.read-row:last-child { border-bottom: 0; }
.read-row-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.read-row-t { font-size: 17px; color: var(--text); line-height: 1.6; }
.read-row:hover .read-row-t { color: var(--accent-deep); }
.read-row-s {
  font-size: 13px; line-height: 1.75; color: var(--text-4);
  font-family: system-ui, -apple-system, "PingFang SC", sans-serif;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.read-row-d {
  flex: 0 0 auto; padding-top: 4px; font-size: 11px; color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ----------------------------------------------------------------- article */
.read-article { max-width: 680px; }
.read-h1 { margin: 0 0 14px; font-size: 30px; font-weight: 500; line-height: 1.3; letter-spacing: .01em; }
.read-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 0 0 26px; padding-bottom: 14px; border-bottom: 1px solid var(--border-soft);
  font-size: 12px; color: var(--muted);
  font-family: system-ui, -apple-system, "PingFang SC", sans-serif;
}
.read-meta-sep { color: var(--border); }
.read-meta-c { color: var(--accent-deep); }
.read-toc {
  display: flex; flex-direction: column; gap: 2px;
  margin: 0 0 26px; padding: 12px 16px;
  border-left: 2px solid var(--accent-soft); background: var(--surface-soft);
}
.read-toc a { font-size: 13px; color: var(--text-3); }
.read-lede { margin: 0 0 22px; font-size: 17px; color: var(--text-2); }

.read-body { font-size: 16.5px; line-height: 1.95; }
.read-body p { margin: 0 0 1.15em; }
.read-body h2 {
  margin: 2em 0 .7em; font-size: 21px; font-weight: 600; line-height: 1.45;
  padding-left: 12px; border-left: 3px solid var(--accent);
}
.read-body h3 { margin: 1.6em 0 .5em; font-size: 18px; font-weight: 600; }
.read-body ul, .read-body ol { margin: 0 0 1.15em; padding-left: 1.4em; }
.read-body li { margin: .3em 0; }
.read-body blockquote {
  margin: 1.4em 0; padding: 2px 0 2px 18px;
  border-left: 2px solid var(--border); color: var(--text-3); font-style: italic;
}
.read-body figure { margin: 1.6em 0; }
.read-body figcaption {
  margin-top: 6px; font-size: 12px; color: var(--muted);
  font-family: system-ui, -apple-system, "PingFang SC", sans-serif;
}
.read-body table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 14px; }
.read-body th, .read-body td { padding: 7px 10px; border-bottom: 1px solid var(--border-soft); text-align: left; }
.read-body code {
  padding: 1px 5px; background: var(--surface-soft); border-radius: 2px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em;
}

/* ----------------------------------------------------------------- related */
.read-related { max-width: 680px; margin: 40px 0 0; padding-top: 22px; border-top: 1px solid var(--border); }
.read-related-h {
  margin: 0 0 10px; font-size: 11px; letter-spacing: .2em; color: var(--muted);
  font-family: system-ui, -apple-system, "PingFang SC", sans-serif;
}
.read-related-list { margin: 0; padding: 0; list-style: none; }
.read-related-li { border-bottom: 1px dotted var(--border-soft); }
.read-related-li a {
  display: flex; align-items: baseline; justify-content: space-between; gap: 18px;
  padding: 8px 0; color: var(--text-2); font-size: 14.5px;
  font-family: system-ui, -apple-system, "PingFang SC", sans-serif;
}
.read-related-d {
  font-size: 10.5px; color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* -------------------------------------------------------------------- foot */
.read-foot { border-top: 1px solid var(--border); background: var(--surface); }
.read-foot.is-min, .read-foot.is-row { padding: 22px 20px; text-align: center; }
.read-copy { margin: 0; font-size: 11.5px; color: var(--muted); font-family: system-ui, sans-serif; }
.read-friends, .read-foot-nav {
  display: flex; flex-wrap: wrap; gap: 4px 14px; justify-content: center;
  margin-top: 6px; font-size: 11.5px;
  font-family: system-ui, -apple-system, "PingFang SC", sans-serif;
}
.read-friends a, .read-foot-nav a { color: var(--text-4); }
.read-foot-in {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 8px 22px; padding: 22px 20px 0;
}
.read-foot.is-row .read-foot-in { padding: 0; }
.read-foot.is-cols { padding: 30px 20px 20px; }
.read-foot-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1.4fr; gap: 26px;
  max-width: 940px; margin: 0 auto 18px;
}
.read-foot-col { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-family: system-ui, sans-serif; }
.read-foot-col a { color: var(--text-4); }
.read-foot-name { margin: 0; font-size: 15px; color: var(--text); font-family: "Songti SC", Georgia, serif; }
.read-foot-tag { margin: 0; font-size: 11.5px; line-height: 1.7; color: var(--text-4); }
.read-foot-h {
  margin: 0 0 2px; font-size: 10px; letter-spacing: .18em; color: var(--muted);
}

/* --------------------------------------------------------------- 响应式 */
@media (max-width: 860px) {
  .read-shell { grid-template-columns: 1fr; }
  .read-rail {
    position: static; max-height: none; padding: 18px 20px;
    border-right: 0; border-bottom: 1px solid var(--border-soft);
    flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px;
  }
  .read-rail-tag, .read-rail-about, .read-rail-foot { display: none; }
  .read-links { flex-direction: row; flex-wrap: wrap; gap: 4px 14px; }
  .read-fold { width: auto; }
  .read-main { padding: 26px 20px 46px; }
  .read-foot-grid { grid-template-columns: 1fr; gap: 16px; }
}

/* 窄屏一行放不下「标题 + 摘要」与日期并排，标题折行后日期会吊在右上角：日期落到下方 */
@media (max-width: 640px) {
  .read-row { flex-direction: column; gap: 4px; }
  .read-row-d { padding-top: 0; }
}

/* 选中态必须压过 `.read-page a` 的全链接强调色（特异性 0,1,2）：光变色
   等于没变，所有导航项本来就都是强调色。字重 + 下划线给出可见差异。 */
.read-link[aria-current="page"] {
  color: var(--accent-deep);
  font-weight: 600;
  text-decoration: underline; text-decoration-thickness: 1.5px;
  text-underline-offset: 5px; text-decoration-color: var(--accent);
}
.read-link[aria-current="page"] .read-dash { background: var(--accent); width: 22px; }
