/* ============================================================
   style-core.css — classical-reading-site design system (faithful base)
   Copy into assets/style.css. This is the reusable CORE: tokens, layout,
   3-column reading grid, character-bio cards + impact-tier markers, the
   供參考 callout, and the mobile fixes from the design-review pass.
   Text-specific sections (guang / jingjian / themes / timeline) are omitted
   on purpose — add them per classic.
   ============================================================ */

:root {
  /* ---- 色 ---- */
  --paper:        oklch(0.952 0.018 85);
  --paper-raised: oklch(0.975 0.014 85);
  --paper-sunk:   oklch(0.918 0.020 82);
  --slip:         oklch(0.940 0.034 78);   /* manuscript face — commentary panel */

  --ink:          oklch(0.272 0.020 50);    /* warm lacquer ink */
  --ink-soft:     oklch(0.430 0.022 50);
  --ink-faint:    oklch(0.520 0.020 50);   /* AA-cleared on all paper tones */

  --rule:         oklch(0.272 0.020 50 / 0.16);
  --rule-strong:  oklch(0.272 0.020 50 / 0.38);

  --vermilion:    oklch(0.548 0.185 28);    /* 朱砂 — signature commentary + active */
  --vermilion-lo: oklch(0.548 0.185 28 / 0.10);
  --gold:         oklch(0.720 0.095 80);    /* 赭金 — rules, chrome */
  --gold-lo:      oklch(0.720 0.095 80 / 0.30);
  --gold-text:    oklch(0.640 0.095 80);    /* gold lifted for small text on ink */
  --gold-deep:    oklch(0.610 0.105 78);    /* 赭金深 — 字詞註、小標籤、worldlist */

  /* ---- per-紀色相（各頁覆寫 --hue，卡片覆寫 --card-hue）---- */
  --hue: 30;
  --card-hue: 30;
  --accent:      oklch(0.485 0.115 var(--hue));
  --accent-deep: oklch(0.385 0.095 var(--hue));
  --accent-wash: oklch(0.485 0.115 var(--hue) / 0.08);
  --accent-line: oklch(0.485 0.115 var(--hue) / 0.32);

  /* ---- 間距（base 4px）---- */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
  --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;

  /* ---- 字 ---- */
  --song: "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --kai:  "KaiTi", "STKaiti", "楷体", "Noto Serif SC", serif;
  --hei:  "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif;

  /* 別名：供人物卡片等次級中繼資料使用（與全站 --ink-soft/--ink-faint/--song 對齊）。
     DEFINING these is P0 — an undefined var silently inherits --ink and flattens hierarchy. */
  --serif: var(--song);
  --ink-1: var(--ink-soft);
  --ink-2: var(--ink-faint);
  --ink-3: var(--ink-faint);

  --t-xs:   0.75rem;
  --t-sm:   0.875rem;
  --t-base: 1.0625rem;
  --t-md:   1.25rem;
  --t-lg:   1.5rem;
  --t-xl:   1.9rem;
  --t-2xl:  2.4rem;
  --t-3xl:  3rem;
  --t-4xl:  4rem;

  --radius: 2px;
  --measure: 35em;     /* ~50 字/行 cap for long-form prose */
  --slip-w: 58px;      /* manuscript column pitch */
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

/* descendants that override --hue must re-declare the accents */
.jcard, .vrow, .gcase {
  --hue: var(--card-hue);
  --accent:      oklch(0.485 0.115 var(--hue));
  --accent-deep: oklch(0.385 0.095 var(--hue));
  --accent-wash: oklch(0.485 0.115 var(--hue) / 0.08);
  --accent-line: oklch(0.485 0.115 var(--hue) / 0.32);
}

html { scroll-behavior: smooth; scroll-padding-top: 92px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---- 3-column reading layout ---- */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr) minmax(0, 320px);
  gap: var(--s7);
  align-items: start;
  padding: var(--s8) 0 var(--s9);
  max-width: 1480px; margin: 0 auto;
}
.lhs { position: sticky; top: 100px; max-height: calc(100vh - 128px); overflow-y: auto;
       font-family: var(--hei); }
.rhs { position: sticky; top: 100px; max-height: calc(100vh - 128px); overflow-y: auto;
       display: grid; gap: var(--s5); align-content: start; }
.layout > .main { min-width: 0; max-width: 880px; margin: 0 auto; width: 100%; }

/* RHS collapsible (JS sets body[data-rhs="collapsed"]) */
body[data-rhs="collapsed"] .layout { grid-template-columns: minmax(0,220px) minmax(0,1fr) 48px; }
body[data-rhs="collapsed"] .rhs { width:48px; min-width:48px; padding:0; overflow:visible;
       background:transparent; border:0; box-shadow:none; gap:0; }
body[data-rhs="collapsed"] .rhs > *:not(.rhs__toggle) { display:none; }
.rhs__toggle {
  position: sticky; top:100px; z-index:5; align-self:start; justify-self:end;
  width:32px; height:32px; display:inline-flex; align-items:center; justify-content:center;
  font-family:var(--hei); font-size:14px; line-height:1; color:var(--vermilion);
  background:var(--paper-raised); border:1px solid var(--rule); border-radius:16px;
  cursor:pointer; margin-bottom:calc(-1 * var(--s5)); box-shadow:0 1px 2px rgba(0,0,0,.04);
  transition:background .15s,color .15s,border-color .15s;
}
.rhs__toggle:hover { background:var(--vermilion); color:var(--paper); border-color:var(--vermilion); }
body[data-rhs="collapsed"] .rhs__toggle { position:static; margin:var(--s5) auto 0; justify-self:center;
  width:44px; min-width:0; padding:6px 2px; white-space:normal; text-align:center; line-height:1.5; font-size:13px; }
body[data-rhs="collapsed"] .rhs__toggle::before { content:""; margin:0; }
body[data-rhs="collapsed"] .rhs__toggle::after { content:"顯示背景"; }
body:not([data-rhs="collapsed"]) .rhs__toggle::before { content:"›"; margin-right:4px; }
body:not([data-rhs="collapsed"]) .rhs__toggle::after { content:"隱藏背景"; }

@media (max-width:1180px){
  .layout{grid-template-columns:minmax(0,200px) minmax(0,1fr);}
  .rhs{grid-column:1/-1;position:static;max-height:none;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));}
  .layout>.main{max-width:none;}
}
@media (max-width:920px){
  .layout{grid-template-columns:1fr;gap:var(--s6);}
  .lhs{position:static;max-height:none;border:1px solid var(--rule);border-radius:var(--radius);
       padding:var(--s4) var(--s5);background:var(--paper-raised);}
  .rhs{grid-template-columns:1fr;}
  .rhs__toggle{display:none;}
  /* 人物頁：行動版隱藏卷次清單，讓人物導覽置頂，避免首篇傳記被埋 */
  .lhs.nav-vols .nav-lhs__title,
  .lhs.nav-vols .nav-vols__list{display:none;}
  .lhs.nav-vols .band-head{margin-top:var(--s4)!important;}
}

/* ---- left nav list ---- */
.nav-lhs__title { font-size:var(--t-xs); font-weight:700; letter-spacing:.3em;
  color:var(--ink-faint); margin:0 0 var(--s3); padding-bottom:var(--s2); border-bottom:1px solid var(--rule); }
.nav-lhs ol { list-style:none; margin:0; padding:0; }
.nav-lhs li { margin-bottom:1px; }
.nav-lhs a { display:flex; align-items:baseline; gap:var(--s3); padding:var(--s2) var(--s3);
  text-decoration:none; font-size:var(--t-sm); color:var(--ink-soft);
  border-left:2px solid transparent; transition:all .2s; border-radius:0 var(--radius) var(--radius) 0; }
.nav-lhs a:hover { background:var(--accent-wash); color:var(--ink); border-left-color:var(--accent); }

/* ---- preview cards (紀 landing) ---- */
.plgrid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:var(--s4); margin-top:var(--s5); }
.plcard { display:block; background:var(--paper-raised); border:1px solid var(--rule);
  border-top:3px solid oklch(0.55 0.12 var(--card-hue)); border-radius:var(--radius);
  padding:var(--s4) var(--s5); text-decoration:none!important; color:inherit;
  transition:transform .15s,box-shadow .15s,border-color .15s; }
.plcard:hover { transform:translateY(-2px); box-shadow:0 6px 18px rgba(0,0,0,.06); border-top-color:var(--vermilion); }
.plcard__name { font-family:var(--serif); font-size:var(--t-lg); font-weight:700; color:var(--ink); }
.plcard__title { font-family:var(--hei); font-size:var(--t-xs); color:var(--ink-2); margin-top:4px; }
.plcard__facts { list-style:none; padding:0; margin:var(--s3) 0 0; font-family:var(--hei); font-size:var(--t-sm); color:var(--ink-2); }
.plcard__facts li { padding:3px 0; border-top:1px dotted var(--rule); }
.plcard__facts li::before { content:"·"; margin-right:6px; color:var(--ink-3); }
.plcard__goto { display:inline-block; margin-top:var(--s3); font-family:var(--hei); font-size:var(--t-xs); color:var(--vermilion); opacity:.6; }
.plcard:hover .plcard__goto { opacity:1; }

/* ---- people grid + full bio cards ---- */
.people-grid { display:grid; gap:var(--s6); }
.pcard { background:var(--paper-raised); border:1px solid var(--rule);
  border-left:4px solid oklch(0.55 0.12 var(--card-hue)); border-radius:var(--radius);
  padding:var(--s5) var(--s6); scroll-margin-top:110px; }
.pcard__head { display:flex; flex-direction:column; align-items:flex-start; gap:var(--s2); }
.pcard__name { font-family:var(--serif); font-size:var(--t-xl); font-weight:700; color:var(--ink); }
.pcard__role { font-family:var(--hei); font-size:var(--t-sm); color:var(--ink-2); }
.pcard__summary { font-family:var(--hei); font-size:var(--t-md); line-height:1.8; color:var(--ink-1); margin:var(--s3) 0; }
.pcard__facts { list-style:none; padding:0; margin:var(--s3) 0 0; font-family:var(--hei); font-size:var(--t-sm); line-height:1.7; color:var(--ink-2); }
.pcard__facts li { padding:4px 0 4px 18px; position:relative; border-top:1px dotted var(--rule); }
.pcard__facts li:first-child { border-top:0; }
.pcard__facts li::before { content:"※"; position:absolute; left:0; top:4px; color:oklch(0.55 0.12 var(--card-hue)); font-weight:700; }
.band-head__sub { font-family:var(--hei); font-size:var(--t-sm); color:var(--ink-2); margin:var(--s2) 0 0; max-width:60ch; line-height:1.6; }
@media (max-width:720px){ .plcard{padding:var(--s3) var(--s4);} .pcard{padding:var(--s4) var(--s5);} .pcard__name{font-size:var(--t-lg);} }

/* ---- biography sections ---- */
.pbio { display:grid; gap:var(--s6); margin-top:var(--s6); padding-top:var(--s6); border-top:1px solid var(--rule); }
.pbio__sec { }
.pbio__h { font-family:var(--hei); font-size:14px; font-weight:600; letter-spacing:.12em;
  color:var(--vermilion); margin:0 0 6px; padding-left:11px; border-left:3px solid var(--vermilion); }
.pbio__sec p { margin:0 0 12px; font-size:15px; line-height:1.9; color:var(--ink);
  max-width:var(--measure); text-align:justify; }     /* P1#5: cap line width */
.pbio__sec p:last-child { margin-bottom:0; }
@media (max-width:920px){ .pbio{gap:var(--s5);} }

/* ---- impact tier markers (S=典範/A=重要/B=知名/C=一般) ---- */
.pcard--tier-S { border-left-width:6px; box-shadow:0 2px 22px oklch(0.55 0.12 var(--card-hue) / 0.10); }
.pcard__badge { font-family:var(--hei); font-size:12px; font-weight:700; letter-spacing:.08em;
  color:oklch(0.42 0.11 var(--card-hue)); background:oklch(0.96 0.03 var(--card-hue));
  border:1px solid oklch(0.86 0.05 var(--card-hue)); padding:2px 10px; border-radius:999px; white-space:nowrap; }
.pcard__meta { display:flex; flex-wrap:wrap; align-items:center; gap:var(--s3); margin-top:4px; }
.pcard__tier { font-family:var(--hei); font-size:12px; font-weight:600; color:var(--ink-2); letter-spacing:.03em; white-space:nowrap; }
.pcard__tier--minor { color:#9a9488; font-weight:500; }
.pcard__stars { color:#8a6500; font-size:13px; letter-spacing:1px; }   /* P0#2: was #c8a13a (~2.3:1) */
.star-empty { color:#d6c9a8; }                                        /* P2#9: faint unused stars */
.pcard--tier-A { border-left-width:4px; }
.pcard--tier-B { border-left-width:3px; }
.plcard__meta { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin:2px 0; }
.plcard__tier { font-family:var(--hei); font-size:11px; color:var(--ink-2); white-space:nowrap; }
.plcard__tier--minor { color:#9a9488; }
.plcard__stars { color:#8a6500; font-size:12px; letter-spacing:1px; }

/* ---- 供參考：考古 / 正史新證 callout ---- */
.pbio__ref { margin-top:var(--s6); padding:var(--s4) var(--s5) var(--s5);
  background:oklch(0.97 0.02 var(--card-hue)); border:1px solid oklch(0.90 0.03 var(--card-hue));
  border-left:4px solid oklch(0.62 0.11 var(--card-hue)); border-radius:var(--radius); }
.pbio__ref-tag { display:inline-block; font-family:var(--hei); font-size:12px; font-weight:700;
  letter-spacing:.12em; color:#fff; background:oklch(0.55 0.11 var(--card-hue));
  padding:2px 11px; border-radius:999px; margin-bottom:10px; }
.pbio__ref p { margin:0 0 10px; font-size:14px; line-height:1.85; color:var(--ink-1); text-align:justify; }
.pbio__ref p:last-child { margin-bottom:0; }

/* ============================================================
   Reading-enrichment modules (hover tags · quotes · highlights)
   Self-contained: defines the gold helper vars + tooltip it needs.
   ============================================================ */
:root {
  --gold-deep: #8a5e12;     /* darker gold for fine text/borders */
  --gold-soft: #f6e8c6;     /* hover wash */
  --gold-line: rgba(192,138,30,.45);
}

/* ---- hover glossary term / famous-quote 'tags' (Module A) ---- */
.term {
  border-bottom: 1px dotted var(--gold-deep);
  cursor: help; color: inherit; transition: background .15s;
}
.term:hover, .term:focus { background: var(--gold-soft); outline: none; }
.q-famous {
  background: linear-gradient(180deg,#fbeec4,#f3dd9c); color: #5a3d00;
  border-radius: 3px; padding: 0 3px; cursor: help;
  box-shadow: inset 0 -1px 0 var(--gold-line); transition: background .15s;
}
.q-famous:hover, .q-famous:focus { background: linear-gradient(180deg,#fff0c2,#eccf7a); outline: none; }

/* tooltip (positioned by site.js) */
#anno-tip {
  position: fixed; z-index: 9999; max-width: 320px;
  background: #241405; color: #f6ecd8;
  border: 1px solid var(--gold); border-radius: 9px;
  padding: 10px 13px;
  font-family: var(--hei); font-size: 13px; line-height: 1.75;
  box-shadow: 0 10px 34px rgba(0,0,0,.42);
  pointer-events: none; opacity: 0; transition: opacity .14s;
}
#anno-tip.show { opacity: 1; }
#anno-tip::after {
  content: ""; position: absolute; left: var(--arrow-x,50%); transform: translateX(-50%);
  border-left: 7px solid transparent; border-right: 7px solid transparent;
  bottom: var(--arrow-bottom,-7px); top: var(--arrow-top,auto);
  border-top: 7px solid var(--gold);
}
#anno-tip.below::after { border-top: 0; border-bottom: 7px solid var(--gold); }

/* control bar: hosts the 字詞註 toggle (Module A) AND the 繁/簡 toggle
   (Module F, button id="han-toggle"). Both buttons inherit these styles. */
#anno-ctrl { position: fixed; right: 14px; bottom: 14px; z-index: 9998;
  display: flex; gap: 6px; background: var(--paper-raised);
  border: 1px solid var(--rule); border-radius: 999px; padding: 5px 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.10); font-family: var(--hei); }
#anno-ctrl button { font: inherit; font-size: 12px; cursor: pointer;
  border: 1px solid var(--rule); background: var(--paper); color: var(--ink-soft);
  border-radius: 999px; padding: 3px 10px; }
#anno-ctrl button.is-off { opacity: .5; text-decoration: line-through; }
body.no-anno .term { border-bottom: none; cursor: auto; background: none; }
body.no-anno .q-famous { background: none; box-shadow: none; cursor: auto; color: inherit; }
body.no-anno #anno-tip { display: none; }

/* ---- 人物亮點 callout (Module C) ---- */
.pcard__highlight { display:flex; gap:10px; align-items:flex-start;
  margin: var(--s4) 0 var(--s2); padding: 10px 14px;
  background: oklch(0.97 0.02 var(--card-hue));
  border: 1px solid oklch(0.90 0.03 var(--card-hue));
  border-left: 3px solid oklch(0.55 0.11 var(--card-hue)); border-radius: var(--radius); }
.pcard__highlight-tag { font-family: var(--hei); font-size: 11px; font-weight: 700;
  letter-spacing: .1em; color: oklch(0.45 0.11 var(--card-hue)); white-space: nowrap; margin-top: 3px; }
.pcard__highlight-txt { font-family: var(--song); font-size: 14px; line-height: 1.7; color: var(--ink-1); }

/* ---- 名句 / 名言 (Module B) ---- */
.pbio__quotes { margin: var(--s5) 0 var(--s3); }
.pbio__quotes-h { font-family: var(--hei); font-size: 13px; font-weight: 600; letter-spacing: .12em;
  color: var(--gold-text); margin: 0 0 10px; padding-left: 11px; border-left: 3px solid var(--gold); }
.pbio__quote { margin: 0 0 var(--s4); padding: var(--s4) var(--s5);
  background: linear-gradient(180deg,#fbf3da,#f6e7bd);
  border: 1px solid var(--gold-line); border-left: 4px solid var(--gold); border-radius: var(--radius); }
.pbio__quote-text { font-family: var(--kai); font-size: 1.05rem; line-height: 1.95; color: #5a3d00; margin: 0; text-align: justify; }
.pbio__quote-anno { font-family: var(--hei); font-size: 12px; color: var(--ink-soft); margin: 8px 0 0; line-height: 1.7; }
.pbio__quote-src { display: block; font-family: var(--hei); font-style: normal; font-size: 12px; color: var(--ink-faint); margin-top: 6px; }

/* ---- RHS 人物亮點 aggregate (Module D) ---- */
.panel--gold { border-top-color: var(--gold); }
.hl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.hl-list li a { display: block; text-decoration: none; color: var(--ink-soft); font-size: var(--t-sm); line-height: 1.6; }
.hl-list li b { font-family: var(--song); color: var(--ink); font-weight: 700; }
.hl-list li a:hover { color: var(--vermilion); }

/* ---- per-paragraph modern-Chinese translation (Module E: 白話 + 解讀) ---- */
.zhang__baihua{margin:var(--s4) 0 0;max-width:var(--measure);
  padding:var(--s3) var(--s4);
  background:color-mix(in oklch, var(--gold-soft) 28%, var(--paper));
  border-left:3px solid var(--gold-lo);border-radius:var(--radius);
  font-family:var(--hei);line-height:1.95;text-align:justify;}
.zhang__line{margin:0;}
.zhang__line+.zhang__line{margin-top:var(--s2);}
.zhang__baihua-label,.zhang__interp-label{display:inline-block;font-size:11px;
  font-weight:700;letter-spacing:.14em;color:var(--gold-deep);
  margin-right:var(--s2);vertical-align:middle;}
.zhang__baihua-text{font-size:.98rem;color:var(--ink);}
.zhang__interp-text{display:inline;font-size:.9rem;color:var(--ink-soft);}

/* =========================================================
   style-shu.css — 尚書 edition text layer.
   Appended AFTER style-core.css. OKLCH only (no hsl()).
   Covers: chrome (topbar/foot), hero, slip-head, band-head,
   summary, panels, prose + 段 rendering, 書序, 校記, pager.
   ========================================================= */

html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--song);
  font-size: var(--t-base);
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--accent-deep); }

.wrap { max-width: 1480px; margin: 0 auto; padding: 0 var(--s5); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--s4); top: var(--s4); z-index: 10000; background: var(--paper);
  padding: var(--s2) var(--s4); border: 2px solid var(--vermilion); border-radius: var(--radius); }

/* ---------------- topbar ---------------- */
.topbar { position: sticky; top: 0; z-index: 90;
  background: oklch(0.215 0.018 50); border-bottom: 2px solid var(--gold); }
.topbar__inner { max-width: 1480px; margin: 0 auto; padding: var(--s3) var(--s5);
  display: flex; align-items: center; gap: var(--s6); flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: var(--s3); text-decoration: none; }
.brand__mark { width: 34px; height: 34px; display: grid; place-items: center;
  font-family: var(--song); font-weight: 900; font-size: 19px;
  color: oklch(0.215 0.018 50); background: var(--gold);
  border-radius: var(--radius); }
.brand__txt { display: flex; flex-direction: column; line-height: 1.15; }
.brand__txt b { font-family: var(--song); font-size: 17px; letter-spacing: .18em;
  color: var(--paper); font-weight: 700; }              /* P2#10: bright on black */
.brand__txt i { font-family: var(--hei); font-style: normal; font-size: 10px;
  letter-spacing: .28em; color: var(--gold); }
.topnav { display: flex; gap: var(--s2); flex-wrap: wrap; margin-left: auto; }
.topnav a { font-family: var(--hei); font-size: var(--t-sm); text-decoration: none;
  color: oklch(0.86 0.012 85); padding: var(--s2) var(--s3); border-radius: var(--radius);
  transition: background .15s, color .15s; }
.topnav a:hover { background: oklch(1 0 0 / .10); color: var(--paper); }

/* ---------------- hero (index) ---------------- */
.hero { background:
    radial-gradient(120% 150% at 12% 0%, oklch(0.965 0.026 78), var(--paper) 62%);
  border-bottom: 1px solid var(--rule); }
.hero__inner { max-width: 1180px; margin: 0 auto; padding: var(--s9) var(--s5) var(--s8); }
.hero__kicker { font-family: var(--hei); font-size: var(--t-xs); letter-spacing: .34em;
  color: var(--ink-faint); margin: 0 0 var(--s4); }
.hero__title { font-family: var(--song); font-weight: 900; font-size: var(--t-4xl);
  letter-spacing: .16em; margin: 0; color: var(--ink); line-height: 1.1; }
.hero__title span { color: var(--vermilion); }
.hero__sub { font-family: var(--hei); font-size: var(--t-md); color: var(--ink-soft);
  margin: var(--s4) 0 0; max-width: 46em; line-height: 1.85; }
.hero__quote { margin: var(--s7) 0 0; padding: var(--s4) 0 var(--s4) var(--s5);
  border-left: 3px solid var(--vermilion); max-width: 44em; }
.hero__quote p { font-family: var(--kai); font-size: var(--t-lg); line-height: 1.95;
  color: var(--ink); margin: 0; }
.hero__quote cite { display: block; font-family: var(--hei); font-style: normal;
  font-size: var(--t-xs); letter-spacing: .1em; color: var(--ink-faint); margin-top: var(--s3); }
.hero__stats { display: flex; flex-wrap: wrap; gap: var(--s7); margin-top: var(--s7);
  padding-top: var(--s5); border-top: 1px solid var(--rule); }
.stat__n { font-family: var(--song); font-weight: 900; font-size: var(--t-2xl);
  color: var(--accent-deep); line-height: 1; }
.stat__l { font-family: var(--hei); font-size: var(--t-xs); letter-spacing: .2em;
  color: var(--ink-faint); margin-top: 6px; }
@media (max-width: 720px) { .hero__title { font-size: var(--t-3xl); } }

/* ---------------- slip-head (inner pages) ---------------- */
.slip-head { background:
    radial-gradient(110% 140% at 0% 0%, oklch(0.958 0.024 var(--hue)), var(--paper) 65%);
  border-bottom: 1px solid var(--rule); }
.slip-head__inner { display: flex; align-items: center; gap: var(--s6);
  max-width: 1180px; margin: 0 auto; padding: var(--s8) var(--s5); }
.slip-head--site .slip-head__inner { display: block; }
.slip-head__kicker { font-family: var(--hei); font-size: var(--t-xs); letter-spacing: .3em;
  color: var(--ink-faint); margin: 0 0 var(--s3); }
.slip-head__title { font-family: var(--song); font-weight: 900; font-size: var(--t-2xl);
  margin: 0; color: var(--ink); letter-spacing: .06em; }
.juan-plate { width: 92px; height: 116px; flex: 0 0 auto; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: var(--s2);
  background: linear-gradient(160deg, oklch(0.94 0.03 var(--hue)), var(--paper-raised));
  border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: 0 2px 0 var(--gold-lo); }
.juan-plate__zi { font-family: var(--song); font-weight: 900; font-size: 30px;
  color: oklch(0.40 0.11 var(--hue)); letter-spacing: .04em; }
.juan-plate__no { font-family: var(--hei); font-size: 10.5px; letter-spacing: .18em;
  color: var(--ink-faint); }
.juan-lead__kicker { font-family: var(--hei); font-size: var(--t-xs); letter-spacing: .26em;
  color: oklch(0.42 0.10 var(--hue)); margin: 0 0 var(--s2); }
.juan-lead h1 { font-family: var(--song); font-weight: 900; font-size: var(--t-2xl);
  margin: 0; color: var(--ink); letter-spacing: .08em; }
.juan-lead__span { font-family: var(--hei); font-size: var(--t-sm); line-height: 1.85;
  color: var(--ink-soft); margin: var(--s3) 0 0; max-width: 56em; }
@media (max-width: 720px) {
  .slip-head__inner { flex-direction: column; align-items: flex-start; gap: var(--s4);
    padding: var(--s7) var(--s5); }
  .juan-lead h1 { font-size: var(--t-xl); }
}

/* ---------------- band-head ---------------- */
.band-head { text-align: center; display: flex; flex-direction: column; align-items: center;
  margin-bottom: var(--s5); }
.band-head[style*="left"] { align-items: flex-start; }
.band-head__eyebrow { font-family: var(--hei); font-size: 10.5px; font-weight: 700;
  letter-spacing: .26em; color: var(--ink-faint); margin: 0 0 var(--s2); }
.band-head h2 { font-family: var(--song); font-weight: 900; font-size: var(--t-xl);
  margin: 0; color: var(--ink); letter-spacing: .1em; }
.band-head__rule { width: 120px; height: 3px; margin: var(--s4) auto 0; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), transparent); }

/* ---------------- summary box ---------------- */
.summary { background: var(--slip); border: 1px solid var(--gold-lo);
  border-left: 4px solid var(--gold); border-radius: var(--radius);
  padding: var(--s5) var(--s6); margin-bottom: var(--s7); }
.summary__tag { display: inline-block; font-family: var(--hei); font-size: 11px;
  font-weight: 700; letter-spacing: .16em; color: #fff; background: var(--gold-deep);
  padding: 2px 12px; border-radius: 999px; margin-bottom: var(--s3); }
.summary p { margin: 0; font-size: var(--t-base); line-height: 1.95; color: var(--ink);
  font-family: var(--hei); }

/* ---------------- guide band ---------------- */
.guide-band { display: grid; gap: var(--s5); }
.guide-block { background: var(--paper-raised); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: var(--s5) var(--s6); }
.guide-block__head { font-family: var(--hei); font-size: 12px; font-weight: 700;
  letter-spacing: .16em; color: var(--vermilion); margin: 0 0 var(--s3);
  padding-left: 11px; border-left: 3px solid var(--vermilion); }
.guide-intro { font-family: var(--hei); font-size: var(--t-base); line-height: 2;
  color: var(--ink); margin: 0; }
.guide-list { margin: 0; padding-left: 1.4em; font-family: var(--hei);
  font-size: var(--t-sm); line-height: 1.95; color: var(--ink-soft); }
.guide-list li { margin-bottom: var(--s3); }
.guide-list li b { color: var(--ink); }

/* ---------------- 部 cards (index) ---------------- */
.jgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: var(--s5); }
.jcard { display: block; background: var(--paper-raised); border: 1px solid var(--rule);
  border-top: 3px solid var(--accent); border-radius: var(--radius);
  padding: var(--s5) var(--s6) var(--s6); text-decoration: none; color: inherit;
  box-shadow: 0 2px 0 var(--gold-lo); transition: transform .15s, box-shadow .15s, border-color .15s; }
.jcard:hover { transform: translateY(-3px); box-shadow: 0 8px 20px oklch(0 0 0 / .08);
  border-top-color: var(--vermilion); }
.jcard__top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); }
.jcard__zi { font-family: var(--song); font-weight: 900; font-size: var(--t-lg);
  color: var(--accent-deep); letter-spacing: .1em; }
.jcard__n { font-family: var(--hei); font-size: var(--t-xs); letter-spacing: .12em;
  color: var(--ink-faint); }
.jcard__dyn { font-family: var(--hei); font-size: var(--t-xs); letter-spacing: .14em;
  color: var(--ink-faint); margin: var(--s2) 0 var(--s3); }
.jcard__blurb { font-size: var(--t-sm); line-height: 1.9; color: var(--ink-soft); margin: 0; }
.jcard__go { display: inline-block; margin-top: var(--s4); font-family: var(--hei);
  font-size: var(--t-xs); color: var(--vermilion); opacity: .7; }
.jcard:hover .jcard__go { opacity: 1; }

/* ---------------- 篇 list rows (部 landing) ---------------- */
.vlist { display: grid; gap: var(--s2); }
.vrow { display: flex; align-items: baseline; gap: var(--s4); padding: var(--s3) var(--s4);
  background: var(--paper-raised); border: 1px solid var(--rule);
  border-left: 3px solid var(--accent); border-radius: var(--radius);
  text-decoration: none; color: inherit; transition: border-color .15s, background .15s; }
.vrow:hover { border-left-color: var(--vermilion); background: var(--accent-wash); }
.vrow__no { font-family: var(--hei); font-size: var(--t-xs); font-weight: 700;
  color: var(--accent-deep); flex: 0 0 3.6em; letter-spacing: .06em; }
.vrow__name { font-family: var(--song); font-weight: 700; font-size: var(--t-md);
  color: var(--ink); flex: 0 0 auto; letter-spacing: .05em; }
.vrow__genre { font-family: var(--hei); font-size: 10.5px; letter-spacing: .12em;
  color: oklch(0.42 0.10 var(--hue)); background: var(--accent-wash);
  border: 1px solid var(--accent-line); border-radius: 999px; padding: 1px 9px; flex: 0 0 auto; }
.vrow__span { font-family: var(--hei); font-size: var(--t-xs); color: var(--ink-faint);
  line-height: 1.6; min-width: 0; }
.more-line { margin: var(--s5) 0 0; }
.morelink { font-family: var(--hei); font-size: var(--t-sm); color: var(--vermilion);
  text-decoration: none; border-bottom: 1px solid var(--gold); padding-bottom: 2px; }
.morelink:hover { color: var(--accent-deep); }

/* ---------------- prose / 段 rendering ---------------- */
.prose { max-width: 880px; }
.zhang { margin: 0 0 var(--s7); scroll-margin-top: 110px; }
.zhang__no { display: flex; align-items: center; gap: var(--s3); margin: 0 0 var(--s3);
  font-family: var(--hei); font-size: 11px; letter-spacing: .14em; color: var(--ink-faint); }
.zhang__no span:first-child { color: oklch(0.42 0.10 var(--hue)); font-weight: 700; }
.zhang__no::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.zhang__speaker { font-family: var(--hei); font-size: 10.5px; letter-spacing: .12em;
  color: #fff; background: oklch(0.52 0.10 var(--hue)); border-radius: 999px; padding: 1px 9px; }
.zhang__t { font-family: var(--song); font-size: 1.14rem; line-height: 2.15;
  color: var(--ink); margin: 0; text-align: justify; letter-spacing: .01em; }
.charlink { color: var(--gold-deep); text-decoration: none; font-weight: 700;
  border-bottom: 1px solid var(--gold-lo); }
.charlink:hover { color: var(--vermilion); border-bottom-color: var(--vermilion); }

/* 異文校記 */
.appa { margin: var(--s3) 0 0; padding: var(--s3) var(--s4); max-width: var(--measure);
  background: var(--paper-sunk); border: 1px dashed var(--rule-strong);
  border-radius: var(--radius); }
.appa__tag { display: inline-block; font-family: var(--hei); font-size: 10.5px;
  font-weight: 700; letter-spacing: .14em; color: var(--vermilion); margin-bottom: 4px; }
.appa p { margin: 0 0 4px; font-family: var(--hei); font-size: 12.5px; line-height: 1.8;
  color: var(--ink-soft); }
.appa p:last-child { margin-bottom: 0; }
.appa__var b { color: var(--ink); }
.zhang__src { font-family: var(--hei); font-size: 11.5px; color: var(--ink-faint);
  margin: 6px 0 0; letter-spacing: .04em; }

/* 篇末附錄（清華簡原文 / 注釋） */
.pian-appendix { margin-top: var(--s9); padding: var(--s5) var(--s6);
  background: var(--paper-sunk); border: 1px solid var(--rule); border-radius: var(--radius); }
.pian-appendix__h { font-family: var(--hei); font-size: 12px; font-weight: 700;
  letter-spacing: .16em; color: var(--vermilion); margin: 0 0 var(--s3);
  padding-left: 11px; border-left: 3px solid var(--vermilion); }
.pian-appendix p { font-family: var(--song); font-size: 15px; line-height: 2;
  color: var(--ink-soft); margin: 0 0 var(--s3); text-align: justify; }
.pian-appendix p:last-child { margin-bottom: 0; }

/* 書序 條目 */
.xu-item { display: grid; grid-template-columns: 3.2em 1fr; gap: var(--s4);
  padding: var(--s4) 0; border-bottom: 1px dotted var(--rule); scroll-margin-top: 110px; }
.xu-item__n { font-family: var(--hei); font-size: 11px; letter-spacing: .1em;
  color: var(--ink-faint); padding-top: 6px; }
.xu-item__t { font-family: var(--song); font-size: 1.06rem; line-height: 2.05;
  color: var(--ink); margin: 0; text-align: justify; }
.xu-item__links { margin: var(--s2) 0 0; font-family: var(--hei); font-size: 11.5px;
  color: var(--ink-faint); }
.xu-item__links a { color: var(--accent-deep); text-decoration: none;
  border-bottom: 1px solid var(--gold-lo); margin-right: var(--s3); }
.xu-item__links a:hover { color: var(--vermilion); }

/* ---------------- RHS panels ---------------- */
.panel { background: var(--paper-raised); border: 1px solid var(--rule);
  border-top: 3px solid var(--accent); border-radius: var(--radius); padding: var(--s5); }
.panel__title { font-family: var(--hei); font-size: 11.5px; font-weight: 700;
  letter-spacing: .18em; color: var(--ink-faint); margin: 0 0 var(--s3);
  padding-bottom: var(--s2); border-bottom: 1px solid var(--rule); }
.panel__lede { font-family: var(--hei); font-size: var(--t-xs); line-height: 1.8;
  color: var(--ink-soft); margin: 0; }
.panel--vermilion { border-top-color: var(--vermilion); background: var(--vermilion-lo); }
.jingjian-text { font-family: var(--hei); font-size: var(--t-sm); line-height: 1.95;
  color: var(--ink); margin: 0; }
.kv { display: grid; gap: var(--s3); margin: 0; }
.kv div { display: grid; grid-template-columns: 4.6em 1fr; gap: var(--s3);
  font-family: var(--hei); font-size: var(--t-xs); line-height: 1.75; }
.kv dt { color: var(--ink-faint); letter-spacing: .1em; }
.kv dd { margin: 0; color: var(--ink-soft); }
.worldlist { list-style: none; margin: var(--s3) 0 0; padding: 0; display: grid; gap: var(--s2); }
.worldlist li { font-family: var(--hei); font-size: var(--t-xs); line-height: 1.75;
  color: var(--ink-soft); padding-left: 14px; position: relative; }
.worldlist li::before { content: "◦"; position: absolute; left: 0; color: var(--gold-deep); }

/* 圖例 */
.legend { display: grid; gap: var(--s3); }
.legend__row { display: grid; grid-template-columns: auto 1fr; gap: var(--s3);
  align-items: start; font-family: var(--hei); font-size: var(--t-xs);
  line-height: 1.7; color: var(--ink-soft); }
.legend__row b { color: var(--ink); font-weight: 600; }
.legend-inline { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--s4); }
.legend-inline .legend__row { background: var(--paper-raised); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: var(--s4); }
.swatch { display: inline-block; font-family: var(--song); font-size: 13px; }

/* ---------------- people nav ---------------- */
.nav-people ul { list-style: none; margin: 0; padding: 0; }
.nav-people a { display: flex; align-items: baseline; gap: var(--s2); padding: var(--s2) var(--s3);
  text-decoration: none; font-size: var(--t-sm); color: var(--ink-soft);
  border-left: 2px solid transparent; border-radius: 0 var(--radius) var(--radius) 0; }
.nav-people a:hover { background: var(--accent-wash); border-left-color: var(--accent); color: var(--ink); }
.nav-people .np__tier { font-family: var(--hei); font-size: 10px; color: var(--gold-deep); }
.nav-vols__list { display: grid; gap: 1px; }
.nav-vols__list a { display: block; padding: 5px var(--s3); font-family: var(--hei);
  font-size: 12.5px; color: var(--ink-soft); text-decoration: none;
  border-left: 2px solid transparent; border-radius: 0 var(--radius) var(--radius) 0; }
.nav-vols__list a:hover { background: var(--accent-wash); border-left-color: var(--accent); color: var(--ink); }

/* ---------------- pager ---------------- */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4);
  padding: var(--s7) 0 var(--s9); }
.pager a { display: flex; flex-direction: column; gap: 4px; padding: var(--s4) var(--s5);
  background: var(--paper-raised); border: 1px solid var(--rule); border-radius: var(--radius);
  text-decoration: none; transition: border-color .15s, transform .15s; }
.pager a:hover { border-color: var(--vermilion); transform: translateY(-2px); }
.pager__next { text-align: right; }
.pager .dir { font-family: var(--hei); font-size: 10.5px; letter-spacing: .18em;
  color: var(--ink-faint); }
.pager .who { font-family: var(--song); font-size: var(--t-md); font-weight: 700;
  color: var(--accent-deep); }
@media (max-width: 720px) { .pager { grid-template-columns: 1fr; } }

/* ---------------- footer ---------------- */
.foot { background: oklch(0.215 0.018 50); color: oklch(0.84 0.012 85); margin-top: var(--s9); }
.foot__inner { max-width: 1480px; margin: 0 auto; padding: var(--s8) var(--s5);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--s7); }
.foot__h { font-family: var(--song); font-size: var(--t-md); font-weight: 700;
  color: var(--gold); letter-spacing: .14em; margin: 0 0 var(--s3); }
.foot__p { font-family: var(--hei); font-size: var(--t-xs); line-height: 1.9;
  color: oklch(0.78 0.012 85); margin: 0 0 var(--s3); }
.foot__p--dim { color: oklch(0.64 0.012 85); }
.foot__links { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); }
.foot__links a { font-family: var(--hei); font-size: var(--t-xs); color: oklch(0.84 0.012 85);
  text-decoration: none; }
.foot__links a:hover { color: var(--gold); }

/* =========================================================
   THEME MODULE (主題閱讀) — 論語 edition, OKLCH.
   Adapted from classical-reading-site/references/style-theme.css.
   The skill's original shipped in HSL, which violates SKILL.md's
   own "OKLCH, not HSL" rule and would fail the HSL-drift gate.
   Every accent below is oklch(... var(--hue)/--cat-hue/--card-hue/
   --mhue/--chue); neutral shadows are oklch(0 0 0 / .x); #fff stays.
   Append AFTER style-core.css + style-lunyu.css.
   ========================================================= */

/* --- PHASE 4 — 主題閱讀 / 年表 --- */
.slip-head--theme { background:
   radial-gradient(120% 140% at 0% 0%, oklch(0.96 0.02 var(--hue)), var(--paper)); }
.slip-head--theme .slip-head__inner { display: flex; align-items: center; gap: var(--s6);
   max-width: 1180px; margin: 0 auto; padding: var(--s9) var(--s5); position: relative; z-index: 1; }
.theme-mark { width: 92px; height: 92px; border-radius: var(--radius);
   background: linear-gradient(135deg, oklch(0.93 0.02 var(--mhue,30)), var(--paper-raised));
   border: 1px solid var(--rule); display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
   box-shadow: 0 2px 0 var(--gold-lo); }
.theme-mark__cat { font-family: var(--hei); font-weight: 700; font-size: var(--t-xs);
   letter-spacing: .22em; color: oklch(0.40 0.11 var(--mhue,30)); writing-mode: vertical-rl; }
.slip-head--theme .juan-lead__kicker { color: oklch(0.42 0.10 var(--hue)); }

/* 主題正文 */
.theme-body .theme-h { font-family: var(--song); font-size: var(--t-xl); font-weight: 900;
   color: var(--accent-deep); margin: var(--s8) 0 var(--s4); padding-bottom: var(--s2);
   border-bottom: 2px solid var(--gold); position: relative; }
.theme-body .theme-h::before { content: ""; position: absolute; left: 0; bottom: -2px;
   width: 52px; height: 2px; background: var(--vermilion); }
.theme-body p { font-size: var(--t-md); line-height: 2.15; color: var(--ink); margin: 0 0 var(--s5); }
.tlink { color: var(--accent-deep); font-weight: 700; text-decoration: none;
   border-bottom: 1.5px solid var(--gold); padding-bottom: 1px; }
.tlink:hover { color: var(--vermilion); border-bottom-color: var(--vermilion); }

/* 左欄：主題導覽 */
.nav-theme__cat { font-family: var(--hei); font-size: 10.5px; font-weight: 700; letter-spacing: .2em;
   color: oklch(0.40 0.12 var(--chue,30)); margin: var(--s4) 0 var(--s2) var(--s2); padding-top: var(--s3); }
.nav-theme__cat:first-child { margin-top: 0; padding-top: 0; }
.nav-theme__item { display: block; padding: var(--s2) var(--s3); font-size: var(--t-sm);
   color: var(--ink-soft); text-decoration: none; border-left: 2px solid transparent;
   border-radius: 0 var(--radius) var(--radius) 0; margin-left: var(--s2); }
.nav-theme__item:hover { background: var(--accent-wash); border-left-color: var(--accent); color: var(--ink); }
.nav-theme__item.is-current { background: var(--accent-wash); border-left-color: var(--vermilion);
   color: var(--accent-deep); font-weight: 700; }
.nav-cats { list-style: none; margin: 0; padding: 0; }
.nav-cats a { display: flex; flex-direction: column; padding: var(--s2) var(--s3); text-decoration: none;
   color: var(--ink-soft); border-left: 2px solid transparent; border-radius: 0 var(--radius) var(--radius) 0; }
.nav-cats a:hover { background: var(--accent-wash); border-left-color: var(--accent); }

/* 右欄：相關卷次 / 關聯主題 */
.tref-list { display: grid; gap: var(--s2); }
.tref { display: flex; align-items: baseline; gap: var(--s3); padding: var(--s3);
   background: var(--paper-sunk); border: 1px solid var(--rule); border-radius: var(--radius); text-decoration: none;
   transition: border-color .15s; }
.tref:hover { border-color: var(--accent); }
.tref__no { font-family: var(--hei); font-weight: 700; color: var(--accent-deep); flex: 0 0 auto; font-size: var(--t-sm); }
.tref__span { font-family: var(--song); font-size: var(--t-xs); color: var(--ink-soft); line-height: 1.5; }
.trel-list { display: grid; gap: var(--s1); }
.trel { display: block; font-size: var(--t-sm); color: var(--accent-deep); text-decoration: none;
   padding: var(--s3) 0; border-bottom: 1px dashed var(--rule); }
.trel:hover { color: var(--vermilion); }

/* 主題 landing：分類 + 卡片 */
.tsec { margin-top: var(--s9); scroll-margin-top: 100px; }
.tsec__desc { font-size: var(--t-sm); line-height: 1.9; color: var(--ink-soft); margin: var(--s2) 0 0; max-width: 60ch; }
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--s5); margin-top: var(--s5); }
.tcard { display: block; background: var(--paper-raised); border: 1px solid var(--rule);
   border-top: 3px solid oklch(0.45 0.13 var(--card-hue,30)); border-radius: var(--radius); padding: var(--s5);
   text-decoration: none; color: inherit; box-shadow: 0 2px 0 var(--gold-lo);
   transition: transform .15s, box-shadow .15s; }
.tcard:hover { transform: translateY(-3px); box-shadow: 0 6px 16px oklch(0 0 0 / .09); border-top-color: var(--vermilion); }
.tcard__cat { font-family: var(--hei); font-size: 10.5px; letter-spacing: .18em; color: oklch(0.40 0.12 var(--card-hue,30)); }
.tcard h3 { font-family: var(--song); font-size: var(--t-lg); font-weight: 900; color: var(--ink);
   margin: var(--s2) 0 var(--s3); line-height: 1.4; }
.tcard p { font-size: var(--t-sm); line-height: 1.85; color: var(--ink-soft); margin: 0 0 var(--s3); }
.tcard__era { font-family: var(--hei); font-size: var(--t-xs); letter-spacing: .1em; color: var(--ink-faint); }

/* 一頁速讀 box（主題頁頭） */
.summary__meta { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); margin-top: var(--s4);
   font-family: var(--hei); font-size: var(--t-xs); color: var(--ink-soft); letter-spacing: .04em; }
.summary__meta b { color: var(--accent-deep); font-weight: 700; }

/* 年表：時間軸（論語非編年，預留；一般不用） */
.tl { position: relative; padding-left: 108px; margin: var(--s7) 0; }
.tl::before { content: ""; position: absolute; left: 92px; top: 6px; bottom: 6px; width: 3px;
   background: linear-gradient(var(--accent), var(--vermilion)); border-radius: 2px; }
.tl-item { position: relative; margin-bottom: var(--s7); }
.tl-item::before { content: ""; position: absolute; left: -24px; top: 7px; width: 14px; height: 14px;
   border-radius: 50%; background: oklch(0.45 0.15 var(--hue)); border: 3px solid var(--paper);
   box-shadow: 0 0 0 2px oklch(0.45 0.15 var(--hue)); }
.tl-rail { position: absolute; left: -108px; width: 80px; text-align: right; padding-top: 2px; }
.tl-year { font-family: var(--hei); font-weight: 700; font-size: var(--t-sm); color: var(--ink-soft);
   letter-spacing: .04em; }
.tl-card { background: var(--paper-raised); border: 1px solid var(--rule);
   border-left: 4px solid oklch(0.45 0.15 var(--hue)); border-radius: var(--radius); padding: var(--s5); }
.tl-card__top { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.tl-tag { font-family: var(--hei); font-size: 10.5px; letter-spacing: .12em; color: #fff;
   background: oklch(0.42 0.14 var(--hue)); padding: 2px var(--s3); border-radius: 99px; white-space: nowrap; }
.tl-title { font-family: var(--song); font-size: var(--t-lg); font-weight: 900; color: var(--accent-deep);
   text-decoration: none; }
.tl-title:hover { color: var(--vermilion); }
.tl-ji { font-family: var(--hei); font-size: var(--t-xs); letter-spacing: .1em; color: var(--ink-faint);
   margin: var(--s2) 0; }
.tl-note { font-size: var(--t-sm); line-height: 1.9; color: var(--ink-soft); margin: 0; }

@media (max-width: 720px) {
  .tl { padding-left: 0; }
  .tl::before { display: none; }
  .tl-rail { position: static; width: auto; text-align: left; margin-bottom: var(--s2); }
  .tl-item::before { display: none; }
  .slip-head--theme .slip-head__inner { flex-direction: column; align-items: flex-start; gap: var(--s4); }
}

/* --- PHASE 4 — 主題閱讀 視覺強化 (polish layer) --- */

/* 分類主色：依 id 注入 --cat-hue，驅動整段配色（尚書版） */
#cat-tianming { --cat-hue: 14;  }   /* 天命與革命 — 朱 */
#cat-zhi     { --cat-hue: 45;  }   /* 政體與制度 — 赭金 */
#cat-jian    { --cat-hue: 150; }   /* 修身與鏡鑑 — 青玉 */

/* 分類區塊：淡彩底 + 描邊，形成清晰視覺分組 */
.tsec {
  background: linear-gradient(180deg,
    oklch(0.965 0.02 var(--cat-hue)) 0%,
    oklch(0.985 0.015 var(--cat-hue)) 55%,
    transparent 100%);
  border: 1px solid oklch(0.88 0.04 var(--cat-hue));
  border-radius: var(--radius);
  padding: var(--s7) var(--s6) var(--s6);
  margin-top: var(--s8);
  scroll-margin-top: 100px;
}
.tsec .band-head { text-align: left; align-items: flex-start; margin-bottom: var(--s5); }
.tsec .band-head__eyebrow {
  display: inline-block;
  font-family: var(--hei); font-size: 10.5px; font-weight: 700; letter-spacing: .24em;
  color: oklch(0.34 0.12 var(--cat-hue));
  background: oklch(0.92 0.03 var(--cat-hue));
  border: 1px solid oklch(0.84 0.05 var(--cat-hue));
  padding: 3px 12px; border-radius: 99px; margin: 0 0 var(--s3);
}
.tsec .band-head h2 { color: oklch(0.32 0.13 var(--cat-hue)); letter-spacing: .1em; }
.tsec .band-head__rule {
  margin: var(--s4) 0 0; width: 132px; height: 3px;
  border: none; border-radius: 2px;
  background: linear-gradient(90deg, oklch(0.48 0.14 var(--cat-hue)), transparent);
}
.tsec .band-head__rule::after { display: none; }
