/* ============================================================
   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 */

  /* ---- per-紀色相（各頁覆寫 --hue，卡片覆寫 --card-hue）---- */
  --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) ---- */
/* Centered flex keeps the last row of featured cards visually balanced. */
.plgrid { display:flex; flex-wrap:wrap; justify-content:center; gap:var(--s4); margin-top:var(--s5); }
.plcard { flex:1 1 200px; max-width:260px; min-width:160px; 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; }
body.no-baihua .zhang__baihua { 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);}

/* =========================================================
   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; }
/* Theme card grid: centered flex so 1, 2 or 3 cards stay balanced. */
.tgrid { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s5); margin-top: var(--s5); }
.tcard { flex: 1 1 160px; max-width: 300px; min-width: 140px; 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-ren   { --cat-hue: 12;  }
#cat-li    { --cat-hue: 42;  }
#cat-xue   { --cat-hue: 158; }
#cat-junzi { --cat-hue: 232; }
#cat-zheng { --cat-hue: 268; }
#cat-xiao  { --cat-hue: 318; }

/* 分類區塊：淡彩底 + 描邊，形成清晰視覺分組 */
.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; }

/* ============================================================
   style-subpage.css — SUBPAGE + HUB components
   市場與商業 deep-dives (t08 hub injection + t08a/b/c subpages)
   Consumed by themes/t08.html and hand-authored themes/t08a|b|c.html.
   OKLCH + var-driven, matching the core design system.
   ============================================================ */

/* ---- cross-links / pills ---- */
.pill { display:inline-block; font-family:var(--hei); font-size:var(--t-xs);
  padding:2px 11px; border-radius:99px; background:var(--accent-wash);
  color:var(--accent-deep); margin:0 var(--s1) var(--s2) 0; letter-spacing:.04em; }
.plink { color:var(--accent-deep); font-weight:700; text-decoration:none;
  border-bottom:1.5px solid var(--gold); padding-bottom:1px; }
.plink:hover { color:var(--vermilion); border-bottom-color:var(--vermilion); }

/* ---- HUB: org chart ---- */
.org { margin:var(--s6) 0; text-align:center; }
.org__root { display:inline-block; background:var(--ink); color:var(--paper);
  font-family:var(--hei); font-weight:700; font-size:var(--t-md);
  padding:var(--s3) var(--s6); border-radius:var(--radius); box-shadow:0 3px 0 var(--gold-lo); }
.org__line { width:2px; height:22px; background:var(--rule-strong); margin:0 auto; }
.org__row { display:flex; flex-wrap:wrap; justify-content:center; gap:var(--s3); }
.org__node { flex:0 1 auto; min-width:120px; background:var(--paper-raised);
  border:1px solid var(--rule); border-radius:var(--radius); padding:var(--s3) var(--s4);
  font-family:var(--hei); font-size:var(--t-sm); color:var(--ink-1); text-align:left; }
.org__node b { color:var(--accent-deep); display:block; margin-bottom:3px; }
.org__node--key { border-top:3px solid var(--vermilion); }
.org__node--sup { border-top:3px solid var(--gold); }

/* ---- HUB: subpage cards ---- */
.subcards { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:var(--s4); margin:var(--s5) 0 var(--s6); }
.subcard { display:flex; flex-direction:column; text-decoration:none; color:inherit;
  background:var(--paper-raised); border:1px solid var(--rule); border-top:3px solid var(--vermilion);
  border-radius:var(--radius); padding:var(--s5); transition:transform .15s, box-shadow .15s; }
.subcard:hover { transform:translateY(-3px); box-shadow:0 6px 16px oklch(0 0 0 / .09);
  border-top-color:var(--gold); }
.subcard__no { font-family:var(--hei); font-weight:700; font-size:var(--t-xs);
  letter-spacing:.16em; color:var(--vermilion); }
.subcard h3 { font-family:var(--song); font-size:var(--t-md); font-weight:900;
  color:var(--ink); margin:var(--s2) 0 var(--s2); line-height:1.4; }
.subcard p { font-size:var(--t-xs); line-height:1.75; color:var(--ink-soft); margin:0 0 var(--s3); }
.subcard__go { font-family:var(--hei); font-size:var(--t-xs); font-weight:700;
  color:var(--gold-text); margin-top:auto; }

/* ---- HUB: overview mapping table ---- */
.maptable { width:100%; border-collapse:collapse; margin:var(--s5) 0 var(--s4);
  font-family:var(--hei); font-size:var(--t-sm); }
.maptable caption { font-family:var(--kai); font-size:var(--t-md); font-weight:700;
  color:var(--ink); text-align:left; margin-bottom:var(--s3); }
.maptable th { background:var(--paper-sunk); text-align:left; padding:var(--s3);
  border:1px solid var(--rule); color:var(--ink); font-weight:700; }
.maptable td { padding:var(--s3); border:1px solid var(--rule); vertical-align:top;
  color:var(--ink-1); line-height:1.75; }
.maptable tr:nth-child(even) td { background:var(--paper-raised); }
.maptable td b { color:var(--accent-deep); }

/* ---- SUBPAGE: section sub-nav (lhs) ---- */
.subnav { list-style:none; margin:0 0 var(--s5); padding:0; }
.subnav__title { font-family:var(--hei); font-size:10.5px; font-weight:700;
  letter-spacing:.2em; color:var(--ink-faint); margin:0 0 var(--s2); }
.subnav li { margin-bottom:1px; }
.subnav a { display:block; padding:var(--s2) var(--s3); font-family:var(--hei);
  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; }
.subnav a:hover, .subnav a.is-current { background:var(--accent-wash);
  border-left-color:var(--vermilion); color:var(--accent-deep); font-weight:700; }

/* ---- SUBPAGE: process flow (CSS boxes + arrows) ---- */
.flow { display:flex; flex-wrap:wrap; align-items:stretch; gap:var(--s3); margin:var(--s5) 0; }
.fnode { flex:1 1 170px; min-width:150px; background:var(--paper-raised);
  border:1px solid var(--rule); border-top:3px solid var(--accent);
  border-radius:var(--radius); padding:var(--s4); }
.fnode__t { font-family:var(--hei); font-weight:700; font-size:var(--t-sm);
  color:var(--accent-deep); margin:0 0 var(--s2); line-height:1.4; }
.fnode__d { font-size:var(--t-xs); line-height:1.65; color:var(--ink-soft); margin:0; }
.fnode--anc { border-top-color:var(--vermilion); }
.fnode--mod { border-top-color:var(--gold); }
.farrow { display:flex; align-items:center; justify-content:center;
  color:var(--ink-faint); font-size:var(--t-lg); font-weight:700; flex:0 0 auto; min-width:24px; }

/* ---- SUBPAGE: ancient↔modern two-column ---- */
.cmp { display:grid; grid-template-columns:1fr 1fr; gap:0; margin:var(--s5) 0;
  border:1px solid var(--rule); border-radius:var(--radius); overflow:hidden; }
.cmp__col { padding:var(--s4) var(--s5); }
.cmp__col--anc { background:oklch(0.95 0.04 28 / .12); border-right:1px solid var(--rule); }
.cmp__col--mod { background:oklch(0.96 0.03 80 / .14); }
.cmp__h { font-family:var(--hei); font-size:11px; font-weight:700; letter-spacing:.14em; margin:0 0 var(--s3); }
.cmp__col--anc .cmp__h { color:var(--vermilion); }
.cmp__col--mod .cmp__h { color:var(--gold-text); }
.cmp__col ul { margin:0; padding-left:var(--s5); }
.cmp__col li { font-size:var(--t-sm); line-height:1.85; color:var(--ink-1); margin-bottom:var(--s2); }
.cmp__col li b { color:var(--accent-deep); }

/* ---- SUBPAGE: policy-insight callout ---- */
.insight { background:linear-gradient(180deg, var(--gold-lo), transparent);
  border:1px solid var(--rule); border-left:4px solid var(--gold);
  border-radius:var(--radius); padding:var(--s5); margin:var(--s6) 0; }
.insight__tag { font-family:var(--hei); font-size:11px; font-weight:700;
  letter-spacing:.16em; color:var(--gold-text); margin:0 0 var(--s2); }
.insight h3 { font-family:var(--song); font-size:var(--t-md); font-weight:900;
  color:var(--ink); margin:0 0 var(--s3); }
.insight p { margin:0 0 var(--s3); line-height:1.95; font-size:var(--t-sm); color:var(--ink-1); }
.insight p:last-child { margin-bottom:0; }
.insight b { color:var(--accent-deep); }

/* ---- SUBPAGE: source quote block ---- */
.srcq { background:var(--slip); border:1px solid var(--rule); border-radius:var(--radius);
  padding:var(--s4) var(--s5); margin:var(--s5) 0; font-family:var(--kai);
  font-size:var(--t-md); line-height:2; color:var(--ink); }
.srcq cite { display:block; margin-top:var(--s2); font-family:var(--hei);
  font-size:var(--t-xs); font-style:normal; color:var(--ink-faint); letter-spacing:.05em; }

/* ---- HUB wrapper: inherit category hue from the host theme page ---- */
/* The theme page sets --card-hue; the injected hub must re-declare the
   accent vars from it so org/subcard/maptable accents match the category. */
.theme-hub {
  --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) / .08);
  --accent-line: oklch(0.485 0.115 var(--hue) / .32);
}

/* ---- responsive for new components ---- */
@media (max-width:720px) {
  .cmp { grid-template-columns:1fr; }
  .cmp__col--anc { border-right:0; border-bottom:1px solid var(--rule); }
  .fnode { flex-basis:100%; }
  .farrow { transform:rotate(90deg); }
}

/* ============================================================
   style-荀子.css — SITE CHROME layer (荀子 build)
   Defines the shell + landing + reading-page + mulu classes that
   style-core / style-theme / style-subpage do NOT cover.
   OKLCH + var(tokens) only. Appended LAST to assets/style.css.
   Signature hue 242 (青出於藍).
   ============================================================ */

:root {
  --card-hue: 242;
  --hue: 242;
}

/* ---------- topbar (4-tab nav, every page) ---------- */
.topbar { position: sticky; top: 0; z-index: 60;
  background: color-mix(in oklch, var(--paper-raised) 90%, transparent);
  backdrop-filter: blur(9px); border-bottom: 1px solid var(--rule); }
.topbar__inner { max-width: 1480px; margin: 0 auto;
  display: flex; align-items: center; gap: var(--s5);
  padding: 9px var(--s5); }
.topbar__brand { font-family: var(--song); font-weight: 700; font-size: var(--t-md);
  color: var(--ink); text-decoration: none; display: flex; align-items: baseline; gap: 8px; }
.topbar__brand b { font-size: var(--t-lg); letter-spacing: .04em; }
.topbar__brand small { font-family: var(--hei); font-size: 11px; color: var(--ink-faint);
  letter-spacing: .14em; }
.topbar__nav { display: flex; gap: 2px; margin-left: auto; font-family: var(--hei); }
.topbar__nav a { padding: 8px 15px; text-decoration: none; color: var(--ink-soft);
  font-size: 14px; border-radius: var(--radius); transition: all .18s; }
.topbar__nav a:hover { background: var(--accent-wash); color: var(--ink); }
.topbar__nav a.is-current { color: var(--vermilion); background: var(--vermilion-lo);
  font-weight: 700; }
.topbar__toggles { display: flex; gap: 6px; }
.topbar__toggles button { font: inherit; font-size: 12px; cursor: pointer;
  border: 1px solid var(--rule); background: var(--paper); color: var(--ink-soft);
  border-radius: 999px; padding: 4px 11px; transition: all .15s; }
.topbar__toggles button:hover { border-color: var(--accent); color: var(--ink); }
.topbar__toggles button.is-off { opacity: .45; text-decoration: line-through; }

/* ---------- foot ---------- */
.foot { border-top: 1px solid var(--rule); background: var(--paper-sunk);
  margin-top: var(--s9); }
.foot__inner { max-width: 1480px; margin: 0 auto; padding: var(--s6) var(--s5);
  display: flex; flex-wrap: wrap; gap: var(--s4); justify-content: space-between;
  align-items: center; font-family: var(--hei); font-size: var(--t-xs);
  color: var(--ink-faint); }
.foot__links a { color: var(--ink-soft); text-decoration: none; margin-left: var(--s4); }
.foot__links a:hover { color: var(--vermilion); }

/* ---------- landing masthead / hero ---------- */
.masthead { padding: var(--s9) var(--s5) var(--s7);
  background: radial-gradient(145% 120% at 100% 0%, oklch(0.94 0.04 var(--hue)), var(--paper));
  border-bottom: 1px solid var(--rule); position: relative; overflow: hidden; }
.masthead__inner { max-width: 1180px; margin: 0 auto; display: grid; gap: var(--s5); }
.hero__kicker { font-family: var(--hei); font-size: var(--t-xs); letter-spacing: .32em;
  color: var(--accent-deep); font-weight: 700; }
.hero__title { font-family: var(--song); font-size: var(--t-4xl); line-height: 1.04;
  color: var(--ink); margin: 0; font-weight: 900; letter-spacing: .02em; }
.hero__sub { font-family: var(--kai); font-size: var(--t-lg); color: var(--ink-soft);
  margin: 0; }
.hero__meta { font-family: var(--hei); font-size: var(--t-sm); color: var(--ink-faint);
  letter-spacing: .04em; }
.hero__quote { font-family: var(--kai); font-size: var(--t-md); line-height: 1.95;
  color: var(--ink-1); border-left: 3px solid var(--vermilion); padding-left: var(--s4);
  max-width: var(--measure); margin: var(--s2) 0 0; }
.hero__quote-by { display: block; font-family: var(--hei); font-size: var(--t-xs);
  color: var(--ink-faint); margin-top: var(--s2); letter-spacing: .06em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s3); }
.btn { display: inline-block; font-family: var(--hei); font-size: var(--t-sm); font-weight: 700;
  text-decoration: none; padding: 10px 22px; border-radius: 999px;
  background: var(--vermilion); color: var(--paper); border: 1px solid var(--vermilion);
  transition: all .15s; }
.btn:hover { box-shadow: 0 4px 14px var(--vermilion-lo); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent-deep); box-shadow: none; }

/* ---------- band-head (section title, reused) ---------- */
.band-head { text-align: center; margin: var(--s8) auto var(--s5); max-width: 820px; }
.band-head__eyebrow { display: inline-block; font-family: var(--hei); font-size: 10.5px;
  font-weight: 700; letter-spacing: .24em; color: var(--accent-deep);
  background: var(--accent-wash); border: 1px solid var(--accent-line);
  padding: 3px 12px; border-radius: 99px; margin: 0 0 var(--s3); }
.band-head h2 { font-family: var(--song); font-size: var(--t-2xl); font-weight: 900;
  color: var(--ink); margin: 0; letter-spacing: .08em; }
.band-head__rule { margin: var(--s4) auto 0; width: 120px; height: 3px; border: none;
  border-radius: 2px; background: linear-gradient(90deg, var(--vermilion), var(--gold)); }
.band-head__sub { font-family: var(--hei); font-size: var(--t-sm); color: var(--ink-soft);
  margin: var(--s3) auto 0; max-width: 60ch; line-height: 1.7; }

/* ---------- stats strip ---------- */
.stats { display: flex; flex-wrap: wrap; gap: var(--s7); justify-content: center;
  margin: var(--s6) 0; }
.stat { text-align: center; }
.stat__n { font-family: var(--song); font-size: var(--t-2xl); font-weight: 900;
  color: var(--accent-deep); line-height: 1; }
.stat__l { font-family: var(--hei); font-size: var(--t-xs); color: var(--ink-faint);
  letter-spacing: .12em; margin-top: 6px; }

/* ---------- guide (reading guide cards) ---------- */
.guide { display: grid; gap: var(--s4); max-width: 880px; margin: 0 auto; }
.guide__intro { font-family: var(--song); font-size: var(--t-md); line-height: 1.95;
  color: var(--ink); margin: 0; text-align: justify; }
.guide__msg { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.guide__msg li { font-family: var(--hei); font-size: var(--t-sm); color: var(--ink-1);
  line-height: 1.8; padding: var(--s3) var(--s4); background: var(--paper-raised);
  border: 1px solid var(--rule); border-left: 3px solid var(--accent);
  border-radius: var(--radius); }
.guide__msg li b { color: var(--accent-deep); }

/* ---------- preview rows (people / themes on landing) ---------- */
.preview { max-width: 1180px; margin: 0 auto; padding: 0 var(--s5); }
.preview__head { display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--s4); margin-bottom: var(--s4); }
.preview__head a { font-family: var(--hei); font-size: var(--t-sm); color: var(--accent-deep);
  text-decoration: none; border-bottom: 1.5px solid var(--gold); }
.preview__head a:hover { color: var(--vermilion); border-bottom-color: var(--vermilion); }
.people-preview { display: grid; gap: var(--s6); }
.pp__cat { }
.pp__cat-h { font-family: var(--hei); font-size: 12px; 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); }
.pp__list { display: flex; flex-wrap: wrap; gap: var(--s4); }

/* ---------- world snapshot callout ---------- */
.worldsnap { background: var(--slip); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: var(--s5) var(--s6); font-family: var(--hei); font-size: var(--t-sm); line-height: 1.95;
  color: var(--ink-1); max-width: 880px; margin: var(--s5) auto 0; }
.worldsnap b { color: var(--accent-deep); }

/* ---------- mulu / 正文 index ---------- */
.mulu { max-width: 1180px; margin: 0 auto; padding: var(--s7) var(--s5) var(--s9); }
.mulu__head { text-align: center; margin-bottom: var(--s6); }
.mulu__intro { font-family: var(--hei); font-size: var(--t-sm); line-height: 1.9;
  color: var(--ink-soft); max-width: 60ch; margin: var(--s3) auto 0; }
.clmap { margin-top: var(--s7); }
.clmap__cluster { background: var(--paper-raised); border: 1px solid var(--rule);
  border-top: 3px solid oklch(0.45 0.13 var(--card-hue)); border-radius: var(--radius);
  padding: var(--s5) var(--s6); scroll-margin-top: 110px; }
.clmap__h { font-family: var(--song); font-size: var(--t-lg); font-weight: 900;
  color: var(--ink); margin: 0 0 var(--s2); }
.clmap__sub { font-family: var(--hei); font-size: var(--t-xs); color: var(--ink-faint);
  margin: 0 0 var(--s4); }
.clmap__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--s3); }
.clmap__item { display: flex; flex-direction: column; gap: 2px; text-decoration: none;
  padding: var(--s3) var(--s4); background: var(--paper); border: 1px solid var(--rule);
  border-radius: var(--radius); transition: all .15s; }
.clmap__item:hover { border-color: var(--accent); background: var(--accent-wash); }
.clmap__no { font-family: var(--hei); font-size: 11px; color: var(--accent-deep); font-weight: 700; }
.clmap__name { font-family: var(--song); font-size: var(--t-sm); color: var(--ink); line-height: 1.4; }
.clmap__cnt { font-family: var(--hei); font-size: 10.5px; color: var(--ink-faint); }

/* ---------- reading page: slip-head ---------- */
.slip-head { background: radial-gradient(120% 140% at 0% 0%, oklch(0.96 0.03 var(--hue)), var(--paper));
  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); }
.juan-plate { flex: 0 0 auto; width: 84px; height: 84px; border-radius: var(--radius);
  background: linear-gradient(135deg, oklch(0.93 0.03 var(--hue)), var(--paper-raised));
  border: 1px solid var(--rule); display: flex; flex-direction: column; align-items: center;
  justify-content: center; box-shadow: 0 2px 0 var(--gold-lo); }
.juan-plate__no { font-family: var(--hei); font-size: 10.5px; letter-spacing: .14em;
  color: var(--accent-deep); }
.juan-plate__big { font-family: var(--song); font-size: var(--t-2xl); font-weight: 900;
  color: var(--ink); line-height: 1; }
.juan-lead { }
.juan-lead__kicker { font-family: var(--hei); font-size: var(--t-xs); letter-spacing: .2em;
  color: var(--accent-deep); font-weight: 700; }
.juan-lead__title { font-family: var(--song); font-size: var(--t-2xl); font-weight: 900;
  color: var(--ink); margin: var(--s2) 0 var(--s2); }
.juan-lead__meta { font-family: var(--hei); font-size: var(--t-xs); color: var(--ink-faint);
  letter-spacing: .04em; }
.juan-lead__desc { font-family: var(--hei); font-size: var(--t-sm); color: var(--ink-soft);
  line-height: 1.8; margin: var(--s2) 0 0; max-width: 56ch; }

/* ---------- reading page: chapter ---------- */
.zhang { padding: var(--s5) 0; border-top: 1px solid var(--rule); scroll-margin-top: 110px; }
.zhang:first-of-type { border-top: none; }
.zhang__no { font-family: var(--hei); font-size: var(--t-xs); color: var(--ink-faint);
  margin: 0 0 var(--s2); letter-spacing: .05em; }
.zhang__no span { color: var(--accent-deep); font-weight: 700; }
.zhang__speaker { font-family: var(--hei); font-size: var(--t-xs); color: var(--vermilion);
  margin-left: var(--s3); font-weight: 700; }
.zhang__t { font-family: var(--song); font-size: 1.18rem; line-height: 2.1; color: var(--ink);
  text-align: justify; margin: 0 0 var(--s3); max-width: var(--measure); }
.appa { margin: var(--s4) 0 0; padding: var(--s3) var(--s4); background: var(--paper-sunk);
  border: 1px solid var(--rule); border-radius: var(--radius); font-family: var(--hei);
  font-size: var(--t-xs); color: var(--ink-soft); }
.appa__tag { display: inline-block; font-weight: 700; letter-spacing: .1em;
  color: var(--vermilion); margin-right: var(--s2); }
.appa__var { margin: 4px 0; }

/* ---------- reading page: LHS nav-vols ---------- */
.nav-vols { font-family: var(--hei); }
.nav-vols__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-vols__list { list-style: none; margin: 0 0 var(--s5); padding: 0; }
.nav-vols__list a { display: flex; align-items: baseline; gap: var(--s3); padding: 5px 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;
  transition: all .18s; }
.nav-vols__list a:hover, .nav-vols__list a.is-current { background: var(--accent-wash);
  border-left-color: var(--vermilion); color: var(--ink); }
.nav-vols__no { font-size: 11px; color: var(--accent-deep); font-weight: 700; flex: 0 0 auto; }

/* ---------- RHS context panel ---------- */
.ctx { display: grid; gap: var(--s5); align-content: start; }
.ctx .panel__title { letter-spacing: .12em; }

/* ---------- panel (base; --gold/--vermilion variants in core/theme) ---------- */
.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: 12px; font-weight: 700;
  letter-spacing: .12em; color: var(--accent-deep); margin: 0 0 var(--s3); }
.panel__lede { font-family: var(--hei); font-size: var(--t-xs); color: var(--ink-soft);
  line-height: 1.7; margin: var(--s3) 0 0; }
.panel--vermilion { border-top-color: var(--vermilion); }
.panel--vermilion .panel__title { color: var(--vermilion); }
.jingjian-text { font-family: var(--song); font-size: var(--t-sm); line-height: 1.9;
  color: var(--ink-1); }

/* ---------- bio paragraph (Module A annotate target) ---------- */
.pbio__p { margin: 0 0 12px; font-size: 15px; line-height: 1.9; color: var(--ink);
  max-width: var(--measure); text-align: justify; }

/* ---------- charlink (personal-name links) ---------- */
.charlink { color: var(--gold-text); text-decoration: none;
  border-bottom: 1px dotted var(--gold-line); cursor: pointer; }
.charlink:hover { color: var(--vermilion); border-bottom-color: var(--vermilion); }

/* ---------- pager (prev/next 篇) ---------- */
.pager { display: flex; justify-content: space-between; gap: var(--s4);
  max-width: 1180px; margin: var(--s7) auto 0; padding: var(--s5); }
.pager a { text-decoration: none; font-family: var(--hei); font-size: var(--t-sm);
  color: var(--ink-soft); display: flex; flex-direction: column; gap: 2px;
  padding: var(--s3) var(--s4); border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--paper-raised); transition: all .15s; min-width: 0; }
.pager a:hover { border-color: var(--accent); color: var(--ink); }
.pager a span { font-size: 11px; color: var(--ink-faint); }
.pager a b { font-family: var(--song); font-size: var(--t-md); color: var(--accent-deep); }
.pager__next { text-align: right; margin-left: auto; }

/* ---------- people landing categories ---------- */
.people-cat { scroll-margin-top: 100px; margin-top: var(--s7); }
.people-cat .band-head { text-align: left; margin-left: 0; align-items: flex-start; }
.people-cat .band-head h2 { letter-spacing: .06em; }

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  .hero__title { font-size: var(--t-3xl); }
  .topbar__inner { flex-wrap: wrap; gap: var(--s3); }
  .topbar__nav { order: 3; width: 100%; margin-left: 0; justify-content: space-between; }
  .topbar__toggles { margin-left: auto; }
  .slip-head__inner { flex-direction: column; align-items: flex-start; gap: var(--s4); }
  .clmap__grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}

/* ============================================================
   主題閱讀 — 荀子 components (deep-dive themes, hubs, subpages).
   Appended last so equal-specificity rules win the cascade.
   ============================================================ */

/* 主題頁容器（essay / subpage / landing 共用） */
.wrap { max-width: 1480px; margin: 0 auto; padding: 0 var(--s5); }

/* tooltip: site.js toggles .is-on (core only knew .show — dead Module A) */
#anno-tip.is-on { opacity: 1; }

/* 一頁速讀（theme essay + subpage） */
.summary { background: var(--paper-raised); border: 1px solid var(--rule);
  border-left: 4px solid var(--accent); border-radius: var(--radius);
  padding: var(--s5) var(--s6); margin-bottom: var(--s6); }
.summary__tag { display: inline-block; font-family: var(--hei); font-size: 10.5px;
  font-weight: 700; letter-spacing: .24em; color: var(--accent-deep);
  background: var(--accent-wash); border: 1px solid var(--accent-line);
  padding: 3px 12px; border-radius: 99px; margin: 0 0 var(--s3); }
.summary p { font-family: var(--song); font-size: var(--t-md); line-height: 2;
  color: var(--ink); margin: 0; text-align: justify; }
.theme-body .summary p { margin: 0; }

/* 子題 header plate */
.juan-plate__zi { font-family: var(--hei); font-size: 10.5px; letter-spacing: .2em;
  color: var(--accent-deep); }
.juan-lead__span { font-family: var(--hei); font-size: var(--t-sm); color: var(--ink-soft);
  margin: var(--s2) 0 0; line-height: 1.8; }

/* panel head/body（hub 政策面板 + 子題鏡鑑/相關） */
.panel__head { font-family: var(--hei); font-size: 12px; font-weight: 700;
  letter-spacing: .14em; color: var(--accent-deep); margin: 0 0 var(--s3); }
.panel--vermilion .panel__head { color: var(--vermilion); }
.panel__body p { font-family: var(--hei); font-size: var(--t-sm); line-height: 1.9;
  color: var(--ink-soft); margin: 0 0 var(--s3); }
.panel__body p:last-child { margin-bottom: 0; }
.panel--gold .panel__body p { color: var(--ink-1); }

/* themes.html landing header（centered masthead pattern） */
.slip-head--site { background: radial-gradient(120% 140% at 50% 0%,
  oklch(0.96 0.03 var(--hue)), var(--paper)); border-bottom: 1px solid var(--rule);
  text-align: center; }
.slip-head--site .slip-head__inner { max-width: 1180px; margin: 0 auto;
  padding: var(--s8) var(--s5) var(--s7); display: flex; flex-direction: column;
  align-items: center; gap: var(--s3); }
.slip-head__l { display: flex; flex-direction: column; align-items: center; gap: var(--s3); }
.slip-head__kicker { font-family: var(--hei); font-size: var(--t-xs);
  letter-spacing: .32em; color: var(--accent-deep); font-weight: 700; }
.slip-head__title { font-family: var(--song); font-size: var(--t-2xl); font-weight: 900;
  color: var(--ink); margin: 0; letter-spacing: .08em; }
.slip-head--site .slip-head__inner::after { content: ""; width: 120px; height: 3px;
  border-radius: 2px; background: linear-gradient(90deg, var(--vermilion), var(--gold)); }

/* long-form essay column（theme essay + subpage bodies） */
.prose { max-width: var(--measure); }

/* landing guide band */
.guide-band { max-width: 880px; margin: var(--s6) auto 0; }
.guide-block { background: var(--paper-raised); border: 1px solid var(--rule);
  border-top: 3px solid var(--gold); border-radius: var(--radius); padding: var(--s6); }
.guide-block__head { font-family: var(--song); font-size: var(--t-lg); font-weight: 900;
  color: var(--ink); margin: 0 0 var(--s3); }
.guide-intro { font-family: var(--song); font-size: var(--t-md); line-height: 2.1;
  color: var(--ink-1); margin: 0; text-align: justify; }

/* nav list labels（landing 分類導覽 + 主題頁左欄） */
.nav-cats a { flex-direction: row; align-items: baseline; justify-content: space-between;
  gap: var(--s3); }
.nl__name { color: var(--ink-soft); font-family: var(--hei); font-size: var(--t-sm); }
.nl__date { font-family: var(--hei); font-size: 10.5px; color: var(--ink-faint);
  letter-spacing: .06em; white-space: nowrap; }
.nav-theme__item .nl__name { font-size: var(--t-sm); }

/* theme essay pager（prev/next 主題） */
.pager__prev { text-align: left; margin-right: auto; }
.pager a .dir { display: block; font-family: var(--hei); font-size: 11px;
  letter-spacing: .12em; color: var(--ink-faint); }
.pager a .who { font-family: var(--song); font-size: var(--t-md); font-weight: 700;
  color: var(--accent-deep); line-height: 1.5; }
.pager a:hover .who { color: var(--vermilion); }

/* 荀子 5 分類主色（drives .tsec backgrounds / headers） */
#cat-learn   { --cat-hue: 90;  }  /* 學習與成長 */
#cat-nature  { --cat-hue: 330; }  /* 人性與教育 */
#cat-order   { --cat-hue: 150; }  /* 制度與治理 */
#cat-wealth  { --cat-hue: 45;  }  /* 財政與民生 */
#cat-thought { --cat-hue: 25;  }  /* 認識與語言 */

@media (max-width: 720px) {
  .slip-head--site .slip-head__inner { padding: var(--s6) var(--s5); }
  .summary { padding: var(--s4) var(--s5); }
  .guide-block { padding: var(--s4) var(--s5); }
}
