/* ═══════════════════════════════════════════
   Kinh Dịch Tâm — Shared Styles
   Design: hunter.io inspired
   ═══════════════════════════════════════════ */

/* Fonts loaded via <link> in HTML head for parallel download — no render-blocking @import */

:root {
  --bg:        #ffffff;
  --surface:   #f8f9fa;
  --border:    #e9ecef;
  --text:      #212529;
  --text-dim:  #6c757d;
  --orange:    #f15a24;
  --orange-lt: #fef3ee;
  --blue:      #206bc4;
  --blue-lt:   #eef4fb;
  --teal:      #1a6b5e;
  --teal-lt:   #edf7f4;
  --navy:      #0f172a;
  --shadow:    0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 24px rgba(0,0,0,0.08);
  --toc-h:     50px;
  --font-sans: 'Segoe UI Variable', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-padding-top: 64px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ── TOP NAV ── */
.top-nav {
  background: #fff;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
}
.top-nav .logo {
  color: var(--navy);
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.top-nav .crumb { color: var(--text-dim); font-size: 0.85rem; }
.top-nav .crumb a { color: var(--text-dim); text-decoration: none; }
.top-nav .crumb a:hover { color: var(--orange); }

/* ── HERO ── */
.hero {
  text-align: center;
  padding: 60px 24px 52px;
  border-bottom: 1px solid var(--border);
}
.hero h1 {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: clamp(2.6rem, 5.5vw, 4rem);
  color: var(--orange);
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0;
  font-feature-settings: 'cv04' 1, 'cv09' 1;
}
.hero .subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-weight: 400;
  color: var(--text-dim);
  margin-top: 12px;
}
.hero .subtitle em {
  font-style: normal;
  color: var(--orange);
  font-weight: 500;
}

/* ── SEARCH ── */
.search-wrap {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 18px;
  width: 100%;
  max-width: 420px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-box:focus-within {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(241,90,36,0.1);
}
.search-box input {
  flex: 1;
  border: none;
  outline: none;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text);
  background: transparent;
}
.search-box input::placeholder { color: #adb5bd; }
.search-box .search-icon {
  color: var(--text-dim);
  font-size: 1rem;
  flex-shrink: 0;
}
.search-box .search-shortcut {
  font-size: 0.7rem;
  color: #adb5bd;
  background: var(--surface);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.hero-sm { padding: 48px 24px 40px; }
.hero-sm h1 { font-size: clamp(2rem, 4vw, 2.8rem); letter-spacing: -0.02em; }
.hero-sm .subtitle { font-size: 1.05rem; margin-top: 8px; }
.hero-sm .subtitle em { font-weight: 500; }

/* ── BOOK CARDS (index) ── */
.books {
  max-width: 1100px;
  margin: 0 auto;
  padding: 56px 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.book-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px 28px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.book-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: #dde;
}
.book-card .icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}
.book-card .icon.dao  { background: var(--orange); }
.book-card .icon.dich { background: var(--blue); }
.book-card .icon.dich-teal { background: var(--teal); }
.book-card .icon.khac { background: var(--text-dim); }
.book-card h2 {
  font-size: 1.35rem;
  font-weight: 700;
}
.book-card h2 strong {
  color: var(--navy);
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.01em;
}
.book-card .zh { font-size: 0.95rem; color: var(--text-dim); font-weight: 400; }
.book-card .desc { font-size: 0.9rem; color: var(--text-dim); line-height: 1.7; }
.book-card .desc strong { color: var(--navy); font-weight: 600; }
.book-card .badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  background: var(--orange);
  padding: 3px 10px;
  border-radius: 12px;
  align-self: flex-start;
}
.book-card .badge.soon {
  background: #e9ecef;
  color: var(--text-dim);
}

/* ── INTRO BLOCK (dao-duc-kinh landing) ── */
.intro-block {
  max-width: 80%;
  margin: 0 auto;
  padding: 40px 24px 0;
}
.intro-text {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 36px;
  font-size: 0.92rem;
  line-height: 1.85;
  color: var(--text);
}
.intro-text p { margin-bottom: 16px; }
.intro-text p:last-child { margin-bottom: 0; }
.intro-text h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin: 28px 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.intro-text h3:first-of-type { margin-top: 0; }
.intro-text ul {
  margin: 8px 0 16px 20px;
  padding: 0;
}
.intro-text ul li {
  margin-bottom: 8px;
  line-height: 1.7;
}
.intro-text strong { color: var(--orange); font-weight: 600; }
.intro-text a {
  color: var(--orange);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}
.intro-text a:hover {
  border-bottom-color: var(--orange);
  color: #d1481a;
}
@media (max-width: 640px) {
  .intro-block { max-width: 100%; padding: 28px 14px 0; }
  .intro-text { padding: 24px 20px; font-size: 0.85rem; }
}

/* ── CHOICE CARDS (dao-duc-kinh landing) ── */
.choices {
  max-width: 920px;
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}
.choices.cols-2 { grid-template-columns: repeat(2, 1fr); }
.choice-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 36px 30px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: all 0.2s;
  overflow: hidden;
}
.choice-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: #dde;
}
/* Old structure: <a class="choice-card"> directly */
a.choice-card {
  text-decoration: none;
  color: inherit;
}
/* New structure: <div class="choice-card"> → <a class="choice-card-link"> */
.choice-card .choice-card-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  flex: 1;
  padding: 36px 30px;
  text-decoration: none;
  color: inherit;
}
.choice-card .choice-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
}
.choice-card .choice-icon.full { background: var(--blue); }
.choice-card .choice-icon.chap { background: var(--orange); }
.choice-card .choice-icon.compare { background: var(--text-dim); }
.choice-card .choice-icon.quoc { background: #5a6c7d; }
.choice-card .choice-icon.epub { background: var(--teal); }
.choice-card .choice-icon.video { background: #e74c3c; }
.choice-card h2 { font-size: 1.2rem; font-weight: 700; color: var(--navy); }
.choice-card .desc { font-size: 0.9rem; color: var(--text-dim); line-height: 1.7; }
.choice-card .arrow { font-size: 0.85rem; font-weight: 600; color: var(--orange); margin-top: auto; }
.choice-card .epub-dl {
  display: block;
  font-size: 0.8rem;
  color: var(--text-dim);
  text-decoration: none;
  padding: 8px 30px 16px;
  margin-top: -8px;
}
.choice-card .epub-dl:hover { color: var(--orange); }
.choice-card .soon-tag { font-size: 0.82rem; font-weight: 500; color: var(--text-dim); margin-top: auto; font-style: italic; }
.choice-card.soon { cursor: default; }
.choice-card.soon:hover { transform: none; box-shadow: none; border-color: var(--border); }

/* ── CHAPTER LIST ── */
.chapter-list {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px 56px;
}
.chapter-list h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}
.chapter-list .subhead {
  font-size: 0.75rem;
  margin-top: 20px;
  margin-bottom: 10px;
  border: none;
}
.chapter-list .subhead.dao { color: var(--blue); }
.chapter-list .subhead.duc { color: var(--orange); }
.chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 6px;
}
.chapter-grid a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.87rem;
  color: var(--text);
  text-decoration: none;
  transition: 0.15s;
  border: 1px solid transparent;
}
.chapter-grid a:hover { background: #eef4fb; color: var(--blue); border-color: #d0e3f7; }
.chapter-grid a.dao { color: var(--blue); }
.chapter-grid a.duc { color: var(--orange); }
.chapter-grid span.disabled { display: block; padding: 8px 12px; border-radius: 6px; font-size: 0.87rem; color: var(--text-dim); font-style: italic; opacity: 0.6; }
.chapter-grid span.disabled em { font-style: italic; }

/* ── Accordion TOC (details/summary) ── */
.toc-list { display: flex; flex-direction: column; gap: 2px; }
.toc-list .duc { display: block; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; color: var(--orange); text-decoration: none; font-weight: 600; }
.toc-list .duc:hover { background: #fff7f2; border-color: var(--orange); }
.toc-details { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.toc-details summary { list-style: none; cursor: pointer; padding: 10px 14px; display: flex; align-items: center; gap: 8px; }
.toc-details summary::-webkit-details-marker { display: none; }
.toc-details summary::before { content: '▸'; font-size: 0.75rem; color: var(--text-dim); transition: transform 0.2s; width: 12px; flex-shrink: 0; }
.toc-details[open] summary::before { transform: rotate(90deg); }
.toc-details summary .duc { border: none; padding: 0; flex: 1; }
.toc-details summary .duc:hover { background: none; }
.toc-subs { padding: 0 14px 8px 32px; display: flex; flex-direction: column; gap: 1px; }
.toc-subs .duc-sub { display: block; padding: 4px 8px; border-radius: 4px; color: var(--text-dim); text-decoration: none; font-size: 0.88rem; }
.toc-subs .duc-sub:hover { color: var(--orange); background: #fff7f2; }
.toc-list .duc-sub { display: block; padding: 6px 14px 6px 28px; border-radius: 4px; color: var(--text-dim); text-decoration: none; font-size: 0.9rem; }
.toc-list .duc-sub:hover { color: var(--orange); }
.toc-badge { font-size: 0.75rem; color: var(--text-dim); white-space: nowrap; margin-left: auto; padding-left: 8px; display: inline-flex; align-items: center; gap: 2px; }
.toc-details[open] .toc-badge { color: var(--orange); }
.toc-caret { font-size: 0.9rem; transition: transform 0.2s; display: inline-block; }
.ch-body .toc-details { margin-bottom: 28px; }
.ch-body .toc-details summary .duc { color: var(--orange); text-decoration: none; font-weight: 600; }
.ch-body .toc-subs .duc-sub { text-decoration: none; color: var(--text-dim); }

/* ── Font-size toggle (cùng cột với .scroll-top) ── */
.font-size-ctrl {
  position: fixed;
  right: 28px;
  bottom: 80px; /* 28px + 44px scroll-top + 8px gap */
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0.5;
  transition: opacity 0.2s;
}
.font-size-ctrl:hover { opacity: 1; }
.font-size-ctrl button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: #fff;
  color: var(--navy);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.font-size-ctrl button:active { background: var(--orange); color: #fff; }

/* ── CHAPTER NAV (prev/next) ── */
.ch-nav {
  max-width: 860px;
  margin: 0 auto;
  padding: 20px 24px 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.ch-nav-bottom { padding: 0 24px 20px; }
.ch-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: 0.15s;
}
.ch-nav a:hover { background: var(--surface); border-color: #dde; }

/* ── CONTAINER ── */
.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 24px 48px;
}
.container-tight { padding-top: 48px; display: flex; flex-direction: column; gap: 48px; }

/* Trang chương/hồi — cột đọc 60% trên màn rộng
   (860px ~45% @ 1920px; landing dùng intro-block 80% nên không đụng) */
@media (min-width: 1440px) {
  .container,
  .ch-nav {
    max-width: 60%;
  }
}

/* ── CHAPTER CARD ── */
.ch {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s;
  scroll-margin-top: 64px;
}
.ch:hover { box-shadow: var(--shadow-md); }
.ch-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 20px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.ch-num {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.ch-title-vi { font-size: 1.2rem; font-weight: 700; color: var(--navy); }
.ch-part-vi { display: block; font-size: 1rem; color: var(--text-dim); margin-top: .3rem; }
.ch-part-vi b { color: var(--orange); font-weight: 600; }
.ch-title-zh { font-size: 0.92rem; color: var(--text-dim); margin-left: auto; font-weight: 400; }
.ch-body { padding: 28px; }
.ch-body h3 { margin-top: 2.2em; margin-bottom: 0.6em; color: var(--orange); font-weight: 700; }
.ch-body h4 { margin-top: 1.8em; margin-bottom: 0.4em; }
.ch-body h3:first-child { margin-top: 0; }

/* ── SECTION LABEL ── */
.sec-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 16px;
  margin-top: 24px;
}
.sec-label:first-child { margin-top: 0; }

/* ── LEGEND ── */
.legend-row {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding: 16px;
  font-size: 0.85rem;
  color: var(--text-dim);
}
.legend-row .dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: middle;
}
.dot.blue   { background: var(--blue); }
.dot.teal   { background: var(--teal); }
.dot.orange { background: var(--orange); }

/* ── NOTE / NDLR ── */
.ndlr {
  background: #e8f2fc;
  border-radius: 10px;
  padding: 16px 24px;
  margin: 32px auto;
  max-width: 780px;
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.7;
}
.ndlr p { margin: 0; }

/* ── KINH VĂN ── */
.kv-block { margin-bottom: 28px; }
.kv-han {
  font-family: 'Noto Serif TC', 'Times New Roman', 'Songti SC', serif;
  font-size: 1.3rem;
  line-height: 2.2;
  color: var(--blue);
  padding: 24px;
  background: var(--blue-lt);
  border-radius: 10px;
  text-align: justify;
  word-spacing: 0.1em;
}
.kv-lines { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.kv-seg { transition: color 0.2s, font-weight 0.2s; }
.kv-seg.highlight { color: var(--orange); font-weight: 700; }

.kv-line {
  padding: 14px 18px;
  background: var(--surface);
  border-left: 4px solid var(--orange);
  border-radius: 0 8px 8px 0;
  font-size: 0.95rem;
  line-height: 1.85;
}
.kv-line .hv { display: block; color: var(--text-dim); font-style: italic; font-size: 0.9rem; margin-bottom: 4px; }
.kv-line .vi { display: block; color: var(--orange); font-weight: 500; }
.ch-body .kv-lines { margin: 0 0 24px; }
.ch-body a.noteref { color: var(--orange); text-decoration: none; font-size: 0.75em; }

/* ── STICKY TOC ── */
.toc {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  display: flex;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.14);
  height: var(--toc-h);
}
.toc-btn {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border: none;
  background: rgba(255,255,255,0.08);
  color: #cbd5e1;
  cursor: pointer;
  border-radius: 6px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.15s;
  margin: 0 4px;
}
.toc-btn:hover { background: rgba(255,255,255,0.18); color: #fff; }
.toc-btn:first-child { margin-left: 10px; }
.toc-btn:last-child { margin-right: 10px; }
.toc-scroll {
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 4px;
}
.toc-scroll::-webkit-scrollbar { display: none; }
.toc a {
  display: inline-block;
  color: #cbd5e1;
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.toc a:hover, .toc a:focus { background: rgba(255,255,255,0.12); color: #fff; }
.toc a.dao { color: #93c5fd; }
.toc a.duc { color: #fdba74; }
.toc .sep { color: #475569; padding: 0 4px; font-size: 0.75rem; user-select: none; flex-shrink: 0; }
.toc .label {
  color: #93c5fd;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border: 1px solid rgba(147,197,253,0.25);
  border-radius: 4px;
  flex-shrink: 0;
}
.toc .label.duc { color: #fdba74; border-color: rgba(253,186,116,0.25); margin-left: 12px; }

/* ── COMMENTARY ── */
.cm-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 8px;
}
.cm-row .cm-han {
  font-family: 'Noto Serif TC', 'Times New Roman', 'Songti SC', serif;
  color: var(--teal);
  padding: 16px;
  background: #fafbfc;
  font-size: 0.88rem;
  line-height: 1.85;
}
.cm-row .cm-han .kv { color: var(--orange); font-weight: 500; }
.cm-row .cm-vi {
  color: var(--text-dim);
  padding: 16px;
  background: #fdfdfd;
  font-size: 0.88rem;
  line-height: 1.85;
}
.cm-row .cm-vi strong { color: var(--orange); font-weight: 700; }
/* Bổ sung của người biên tập (bản màu 2022): nền xanh lá, chữ Hán xanh, như bản song ngữ */
.cm-row.bs { background: #eef7ee; border-left: 4px solid #4caf50; border-radius: 0 8px 8px 0; }
.cm-row.bs .cm-han { color: #1b5e20; padding-left: 8px; }
.cm-row.bs .cm-vi { color: #2e4a2e; font-style: italic; }
.cm-row.bs .cm-han::before, .cm-row.bs .cm-vi::before {
  content: "Người biên tập"; display: block; margin-bottom: 4px;
  font-size: .72em; font-style: normal; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: #2e7d32;
}
/* Ảnh trong bản Nhân Kỷ: không vượt khung đọc (ảnh gốc có thể rộng hơn 1000 px) */
.book-img img { display: block; max-width: 100%; height: auto; margin: 0 auto; }
/* figure.book-img (2026-11-24): chú thích ảnh trong bài Nhân Kỷ (span.chuthich của nguồn) */
figure.book-img figcaption { margin: 10px auto 0; max-width: 680px; font-size: 0.88rem; line-height: 1.6; color: var(--text-dim); text-align: center; }
.cm-row .cm-vi em { color: var(--text-dim); font-style: italic; font-weight: 400; }

/* ── FOOTER ── */
.footer {
  text-align: center;
  padding: 36px 24px;
  font-size: 0.82rem;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.footer a { color: var(--orange); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* ── QUÁCH ĐIẾM SỞ GIẢN ── */

/* Content wrapper: 80% like intro */
.page-quach-diem .qd-content {
  max-width: 80%;
  margin: 0 auto;
  padding: 0 24px 48px;
}

/* Centered TOC nav */
.page-quach-diem .qd-toc {
  text-align: center;
  margin: 40px 0 48px;
  font-size: 0.9rem;
}
.page-quach-diem .qd-toc a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
  transition: 0.15s;
}
.page-quach-diem .qd-toc a:hover { background: #eef2ff; color: var(--navy); }
.page-quach-diem .qd-toc .sep {
  color: var(--border);
  margin: 0 4px;
  user-select: none;
}

/* Section */
.page-quach-diem .qd-section { margin: 60px 0; }
.page-quach-diem .qd-section h2 {
  color: var(--navy);
  font-size: 1.6rem;
  margin-bottom: 8px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--orange);
}
.page-quach-diem .qd-section h2 .zh {
  font-family: 'Noto Serif TC', 'Times New Roman', serif;
  font-size: 1.2rem;
  color: var(--text-dim);
  font-weight: 400;
}
.page-quach-diem .qd-section h3 {
  color: var(--text-dim);
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 36px;
  margin-bottom: 16px;
  padding-left: 12px;
  border-left: 3px solid var(--orange);
}

/* Column headers: "Bản Quách Điếm" / "Bản Vương Bật" */
.page-quach-diem .qd-col-headers {
  display: grid;
  grid-template-columns: 58fr 42fr;
  gap: 24px;
  margin-top: 4px;
  margin-bottom: 18px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}
.page-quach-diem .qd-col-headers span { text-align: center; }
.page-quach-diem .qd-col-headers span:first-child { color: var(--orange); }
.page-quach-diem .qd-col-headers span:last-child { color: var(--blue); }

/* 2-column comparison group */
.page-quach-diem .qd-group {
  display: grid;
  grid-template-columns: 58fr 42fr;
  gap: 24px;
  margin-bottom: 32px;
}
.page-quach-diem .qd-group-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.page-quach-diem .qd-group-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Page badge (Quách Điếm / Vương Bật) */
.page-quach-diem .qd-page-badge {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  padding: 4px 14px;
  border-radius: 6px 6px 0 0;
  align-self: flex-start;
}
.page-quach-diem .qd-badge-left {
  background: var(--orange);
}
.page-quach-diem .qd-badge-right {
  background: var(--blue);
}

/* Left column Hán văn — orange + bold */
.page-quach-diem .qd-col.qd-quach-diem .kv-han {
  color: var(--orange);
  font-weight: 700;
}

.page-quach-diem .qd-col {
  padding: 24px;
  border-radius: 10px;
}
.page-quach-diem .qd-quach-diem {
  background: #fefaf6;
  border-left: 3px solid var(--orange);
}
.page-quach-diem .qd-vuong-bat {
  background: #f8fafc;
  border-left: 3px solid var(--blue);
  height: 100%;
}
.page-quach-diem .qd-col .kv-han {
  font-size: 1.15rem;
  line-height: 2.1;
  color: var(--blue);
  background: transparent;
  padding: 0;
  margin-bottom: 14px;
}
.page-quach-diem .qd-col .hv {
  display: block;
  color: var(--text-dim);
  font-style: italic;
  font-size: 0.88rem;
  line-height: 1.8;
  margin-bottom: 10px;
}
.page-quach-diem .qd-col .vi {
  display: block;
  color: var(--text);
  line-height: 1.9;
  font-size: 0.94rem;
}
.page-quach-diem .qd-col a {
  display: inline-block;
  margin-top: 12px;
  color: var(--blue);
  font-weight: 500;
  text-decoration: none;
  font-size: 0.9rem;
}
.page-quach-diem .qd-col a:hover { color: var(--orange); text-decoration: underline; }

.page-quach-diem .qd-ref {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-top: 10px;
  font-style: italic;
}
.page-quach-diem .qd-empty { display: flex; align-items: center; justify-content: center; }
.page-quach-diem .qd-na { color: var(--text-dim); font-style: italic; }

/* Appendix (full-width) */
.page-quach-diem .qd-appendix {
  background: #fafafa;
  padding: 28px;
  border-radius: 10px;
  border-left: 3px solid var(--teal);
  margin-bottom: 28px;
}
.page-quach-diem .qd-appendix .kv-han {
  font-size: 1.15rem;
  line-height: 2.1;
  color: var(--blue);
  background: transparent;
  padding: 0;
  margin-bottom: 12px;
}
.page-quach-diem .qd-appendix .hv {
  color: var(--text-dim);
  font-style: italic;
  font-size: 0.88rem;
  line-height: 1.8;
  margin-bottom: 10px;
}
.page-quach-diem .qd-appendix .vi {
  color: var(--text);
  line-height: 1.9;
}

/* Mobile connector: bridge between Quách Điếm → Vương Bật */
.page-quach-diem .qd-group-left::after {
  display: none;
}
@media (max-width: 700px) {
  .page-quach-diem .qd-group-left::after {
    display: block;
    content: "▼  Bản Vương Bật tương đương  ▼";
    text-align: center;
    font-size: 0.82rem;
    color: var(--blue);
    font-weight: 500;
    padding: 8px 0 4px;
    opacity: 0.75;
  }
  .hero h1 { font-size: 2rem; }
  .cm-row { grid-template-columns: 1fr; }
  .page-quach-diem .qd-content { max-width: 100%; padding: 0 12px 48px; }
  .page-quach-diem .qd-group { grid-template-columns: 1fr; }
  .page-quach-diem .qd-col-headers { display: none; }
  .page-quach-diem .qd-section h2 { font-size: 1.3rem; }
  .page-quach-diem .qd-col { padding: 16px; }
  .container { padding: 20px 4px 48px; }
  .ch-body { padding: 14px 6px; }
  .kv-han { font-size: 1.05rem; padding: 14px 8px; }
  .kv-line { padding: 12px 10px; }
  .kv-lines { gap: 10px; }
  .ch-head { flex-wrap: wrap; padding: 14px 10px; }
  .cm-row { gap: 6px; }
  .cm-row .cm-han { padding: 12px 10px; }
  .cm-row .cm-vi { padding: 12px 10px; }
  .sec-label { margin: 0 0 12px; }
  .ndlr { margin: 0.8rem 0 !important; }
  .toc { padding: 8px 10px; }
  .toc a { font-size: 0.75rem; padding: 4px 7px; }
}
@media (max-width: 480px) {
  .hero { padding: 40px 18px 36px; }
  .hero-sm { padding: 32px 14px 28px; }
  .books { padding: 32px 14px; gap: 18px; grid-template-columns: 1fr; }
  .book-card { padding: 22px 18px; }
  .choices { padding: 28px 14px; gap: 16px; }
  .choice-card { padding: 24px 20px; }
  .chapter-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

/* ── BOOK SINGLE COLUMN (Bí ẩn Kinh Dịch) ── */
.ch-body .book-intro {
  font-style: italic;
  color: var(--blue);
  padding: 24px;
  background: var(--blue-lt);
  border-radius: 10px;
  text-align: justify;
  line-height: 2;
  margin-bottom: 20px;
}
.ch-body .book-img {
  text-align: center;
  margin: 28px 0;
}
.ch-body .book-img img {
  display: block;
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.ch-body .book-img img.img-landscape {
  max-width: 50%;
}
.ch-body .book-img img.img-portrait {
  max-width: 150px;
}
.ch-body p {
  margin-bottom: 20px;
  text-align: justify;
  line-height: 2;
}
.ch-body .sign {
  text-align: right;
  font-style: italic;
  color: var(--text-dim);
}
.ch-body .letter-title {
  text-align: center;
  font-weight: 700;
  color: var(--navy);
  text-indent: 0;
}
.ch-body .nhc-volume {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
  text-align: center;
  margin: 0 0 20px;
}
.ch-body .biblio-head {
  font-weight: 700;
  color: var(--navy);
  font-family: 'Noto Serif TC', 'Times New Roman', 'Songti SC', serif;
  margin-top: 28px;
  margin-bottom: 8px;
  text-indent: 0;
  text-align: left;
  line-height: 1.6;
}
.ch-body .biblio-head + p {
  margin-bottom: 12px;
  color: var(--text-dim);
}
.ch-body blockquote.speech {
  margin: 0 0 20px;
  padding: 16px 20px;
  border-left: 3px solid var(--orange);
  background: var(--blue-lt);
  font-style: italic;
  color: var(--text);
}
.ch-body blockquote.speech p {
  margin-bottom: 0;
  text-indent: 0;
}
.chapter-grid.nhc-phu-luc {
  grid-template-columns: 1fr;
}
.ch-body img.h-pic,
.kv-han img.h-pic {
  display: inline;
  height: 1.25em;
  width: auto;
  vertical-align: -0.18em;
  margin: 0 0.04em;
  mix-blend-mode: multiply;
}
.ch-body strong {
  color: var(--orange);
  font-weight: 700;
}
.ch-body .img-caption {
  text-align: center;
  font-size: 0.84rem;
  color: var(--text-dim);
  font-style: italic;
  margin-top: -20px;
  margin-bottom: 24px;
}
/* Tố Thư — Hán-Việt: cùng khối kiểu kinh văn, màu teal */
.tt-page .ch-body p.hv {
  font-family: 'Noto Serif TC', 'Times New Roman', 'Songti SC', serif;
  font-size: 1.3rem;
  line-height: 2.2;
  color: #0f4a40;
  padding: 24px;
  background: #f2f5f4;
  border-radius: 10px;
  text-align: justify;
  word-spacing: 0.1em;
  font-style: normal;
  margin: 0 0 16px;
}
.tt-page .ch-body .kv-han + p.hv {
  margin-top: 10px;
}
/* Tố Thư: tiểu mục id="sub-N" là h2 — cùng giao diện .ch-body h3 */
.tt-page .ch-body h2 { font-size: 1.17em; margin-top: 2.2em; margin-bottom: 0.6em; color: var(--orange); font-weight: 700; }
.tt-page .ch-body h2:first-child { margin-top: 0; }
.tt-page .ch-body h2.tt-section,
.tt-page .ch-body h3.tt-section {
  color: var(--navy);
  border-bottom: 1px solid #e9ecef;
  padding-bottom: 0.35em;
}
/* Chỉ Tố Thư — không đụng .sec-label toàn site */
.tt-page .tt-unit .sec-label {
  color: var(--orange);
}
/* Tố Thư — hover chú giải ↔ từ trong kinh văn / Hán-Việt */
.tt-page .ch-body .tt-note {
  cursor: pointer;
  border-radius: 6px;
  padding: 2px 6px;
  margin-left: -6px;
  margin-right: -6px;
  transition: background 0.15s;
}
.tt-page .ch-body .tt-note.tt-hl {
  background: var(--orange-lt);
}
.tt-page .ch-body .tt-anno {
  transition: color 0.15s, font-weight 0.15s;
  cursor: pointer;
}
.tt-page .ch-body .tt-anno.tt-hl {
  color: var(--orange) !important;
  font-weight: 700;
}
.tt-page .ch-body .tt-ref.tt-hl,
.tt-page .ch-body .tt-anno.tt-hl + .tt-ref {
  color: var(--orange);
  font-weight: 700;
}
/* Tố Thư — Dịch nghĩa: nổi bật nhẹ (viền trái cam, chữ cam đậm) */
.tt-page .ch-body .tt-dich {
  font-size: 1.08rem;
  color: #b4441a;
  background: var(--orange-lt);
  border-left: 4px solid var(--orange);
  border-radius: 10px;
  padding: 18px 24px;
  margin: 0 0 16px;
}
.tt-page .ch-body .tt-dich p {
  margin: 0 0 12px;
}
.tt-page .ch-body .tt-dich p:last-child { margin-bottom: 0; }
/* Tố Thư — NDLR: nghiêng, chữ nhỏ hơn (inline trong đoạn văn + khối .ndlr) */
.tt-page .ch-body .tt-ndlr {
  font-style: italic;
  font-size: 0.9em;
  color: var(--text-dim);
}
.tt-page .ch-body .ndlr { font-style: italic; }
.tt-page .ch-body .ndlr em,
.tt-page .ch-body .tt-ndlr em { font-style: normal; }
.tt-page .ch-body .book-img img { max-width: 100%; }
/* Tố Thư · Tam toàn bản (body.tt2-page) — thêm vào CSS .tt-page ở trên */
.tt2-page .ch-body h2.tt-luan,
.tt2-page .ch-body h3.tt-luan {
  font-size: 1.1rem;
  color: var(--navy);
  border-left: 3px solid var(--orange);
  padding-left: 12px;
}
/* Trích dẫn kinh điển trong Luận giải / chú thích: cùng kiểu khối, nhỏ hơn */
.tt2-page .ch-body .kv-han.tt-quote,
.tt2-page .ch-body p.hv.tt-quote {
  font-size: 1.08rem;
  line-height: 2;
  padding: 14px 20px;
  margin: 0 0 8px;
}
.tt2-page .ch-body .kv-han.tt-quote { margin-top: 8px; }
.tt2-page .ch-body .kv-han.tt-quote + p.hv.tt-quote { margin-top: 6px; }
.tt2-page .ch-body p.tt-nghia {
  font-size: 0.95rem;
  color: #b4441a;
  background: var(--orange-lt);
  border-radius: 10px;
  padding: 12px 20px;
  margin: 0 0 20px;
}
.tt2-page .ch-body blockquote.tt-cite {
  margin: 0 0 16px;
  padding: 4px 0 4px 18px;
  border-left: 3px solid var(--border);
  color: #495057;
}
.tt2-page .ch-body blockquote.tt-cite p { margin: 0; }
.tt2-page .toc-subs .duc-sub.lv2 { padding-left: 26px; font-size: 0.84rem; }
@media (max-width: 640px) {
  .tt-page .ch-body p.hv,
  .tt-page .ch-body .tt-dich { font-size: 1rem; padding: 14px 10px; }
  .tt2-page .ch-body .kv-han.tt-quote,
  .tt2-page .ch-body p.hv.tt-quote { font-size: 0.95rem; padding: 10px 10px; }
  .tt2-page .ch-body p.tt-nghia { padding: 10px 10px; }
}
.ch-body a {
  color: var(--blue);
  text-decoration: underline;
}
.ch-body a:hover {
  color: var(--orange);
}

/* ── Ẩn Dụ & Ẩn Ý items ── */
.an-du-item {
  padding-left: 0;
  margin-bottom: 32px;
}
.an-du-num {
  font-weight: 700;
  color: var(--orange);
  font-size: 1.05rem;
  margin-bottom: 8px;
  line-height: 1.5;
}
.an-du-text p {
  text-align: justify;
  line-height: 2;
  margin-bottom: 0;
}

/* Nav disabled (hồi chưa có) */
.ch-nav-disabled {
  color: var(--text-dim);
  font-style: italic;
  opacity: 0.6;
}

@media (max-width: 640px) {
  .ch-body .book-intro { padding: 12px 14px; }
}

/* ── DỊCH TƯỢNG LUẬN (tuong-luan.html) ── */
.page-dich-tuong-luan .tl-content {
  max-width: 80%;
  margin: 0 auto;
  padding: 0 24px 48px;
}

.page-dich-tuong-luan .tl-toc {
  text-align: center;
  margin: 40px auto 48px;
  font-size: 0.82rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px;
  max-width: 90%;
}
.page-dich-tuong-luan .tl-toc .tl-toc-label {
  color: var(--text-dim);
  font-weight: 500;
  margin-right: 4px;
  white-space: nowrap;
}
.page-dich-tuong-luan .tl-toc a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
  transition: 0.15s;
  white-space: nowrap;
  background: #f5f7fa;
}
.page-dich-tuong-luan .tl-toc a:hover { background: #e0e7ff; color: var(--navy); }

/* Entry card */
.page-dich-tuong-luan .tl-entry {
  margin-bottom: 36px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* Page badge */
.page-dich-tuong-luan .tl-page-badge {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  background: var(--navy);
  padding: 4px 14px;
  border-radius: 6px 6px 0 0;
  margin-left: 20px;
}

/* 2-column group (like qd-group) */
.page-dich-tuong-luan .tl-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

/* Language label */
.page-dich-tuong-luan .tl-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

/* French block (left column) */
.page-dich-tuong-luan .tl-group-left {
  background: #f5f8fd;
  border-left: 3px solid var(--blue);
  padding: 22px 24px;
  font-size: 0.95rem;
  line-height: 1.9;
  color: var(--text);
}
.page-dich-tuong-luan .tl-group-left .tl-label { color: var(--blue); }
.page-dich-tuong-luan .tl-group-left p { margin-bottom: 10px; }
.page-dich-tuong-luan .tl-group-left p:last-child { margin-bottom: 0; }

/* Vietnamese block (right column) */
.page-dich-tuong-luan .tl-group-right {
  background: #fefaf6;
  border-left: 3px solid var(--orange);
  padding: 22px 24px;
  font-size: 0.94rem;
  line-height: 1.9;
  color: var(--text);
}
.page-dich-tuong-luan .tl-group-right .tl-label { color: var(--orange); }
.page-dich-tuong-luan .tl-group-right p { margin-bottom: 10px; }
.page-dich-tuong-luan .tl-group-right p:last-child { margin-bottom: 0; }

/* Shared text styles */
.page-dich-tuong-luan .tl-group-left strong,
.page-dich-tuong-luan .tl-group-right strong {
  color: var(--orange);
  font-weight: 700;
}
.page-dich-tuong-luan .tl-group-left em,
.page-dich-tuong-luan .tl-group-right em {
  color: var(--text-dim);
  font-style: italic;
}

/* ── GHI CHÚ NGUYỄN DUY CẦN (ghi-chu-nguyen-duy-can.html) ── */
.page-ghi-chu-ndc .gc-content {
  max-width: 80%;
  margin: 0 auto;
  padding: 0 24px 48px;
}

.page-ghi-chu-ndc .gc-filter-hint {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin: 32px auto 16px;
  max-width: 80%;
}

.page-ghi-chu-ndc .gc-filters {
  text-align: center;
  margin: 12px auto 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  max-width: 90%;
}
.page-ghi-chu-ndc .gc-filter-btn {
  background: #f5f7fa;
  border: 1px solid #e0e4ea;
  color: var(--text-dim);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: 0.15s;
  white-space: nowrap;
}
.page-ghi-chu-ndc .gc-filter-btn:hover {
  background: #e8ecf2;
  color: var(--navy);
}
.page-ghi-chu-ndc .gc-filter-btn.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
  font-weight: 600;
}
.page-ghi-chu-ndc .gc-filter-sep {
  color: #d0d5dd;
  user-select: none;
  font-size: 0.8rem;
}
.page-ghi-chu-ndc .gc-filter-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin: 0 2px;
}

.page-ghi-chu-ndc .gc-section-title {
  color: var(--navy);
  font-size: 1.4rem;
  margin: 48px 0 28px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--orange);
}

.page-ghi-chu-ndc .gc-entry {
  display: flex;
  flex-direction: column;
  margin-bottom: 24px;
  font-size: 0.94rem;
  line-height: 2;
  color: var(--text);
}
.page-ghi-chu-ndc .gc-topic-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  background: var(--navy);
  padding: 4px 14px;
  border-radius: 6px 6px 0 0;
  margin-left: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
/* Topic badge colors */
.page-ghi-chu-ndc .gc-entry[data-tags*="Đạo giáo"] .gc-topic-badge { background: var(--teal); }
.page-ghi-chu-ndc .gc-entry[data-tags*="Thuật Dưỡng Sinh"] .gc-topic-badge { background: #7c3aed; }
.page-ghi-chu-ndc .gc-entry[data-tags*="Thiền đạo tinh hoa"] .gc-topic-badge { background: #b45309; }
/* Topic filter active colors */
.page-ghi-chu-ndc .gc-filter-btn[data-filter="Đạo giáo"].active { background: var(--teal); border-color: var(--teal); }
.page-ghi-chu-ndc .gc-filter-btn[data-filter="Thuật Dưỡng Sinh"].active { background: #7c3aed; border-color: #7c3aed; }
.page-ghi-chu-ndc .gc-filter-btn[data-filter="Thiền đạo tinh hoa"].active { background: #b45309; border-color: #b45309; }

.page-ghi-chu-ndc .gc-entry-body {
  padding: 20px 24px;
  background: var(--surface);
  border-left: 3px solid var(--orange);
  border-radius: 0 8px 8px 0;
}
.page-ghi-chu-ndc .gc-entry .gc-p { margin-bottom: 12px; }
.page-ghi-chu-ndc .gc-entry .gc-p:last-child { margin-bottom: 0; }
.page-ghi-chu-ndc .gc-entry strong { color: var(--orange); }
.page-ghi-chu-ndc .gc-entry-plain { padding: 20px 24px; display: block; }
.page-ghi-chu-ndc .gc-entry-plain .gc-entry-body { padding: 0; }

.page-ghi-chu-ndc .intro-text blockquote {
  background: #f8f6f0;
  border-left: 4px solid var(--navy);
  margin: 18px 0;
  padding: 18px 24px;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #3d3d3d;
}
.page-ghi-chu-ndc .intro-text blockquote p {
  margin-bottom: 10px;
  line-height: 2;
}
.page-ghi-chu-ndc .intro-text blockquote p:last-child {
  margin-bottom: 0;
}

/* ── RESPONSIVE (Ghi chú NDC) ── */
@media (max-width: 700px) {
  .page-ghi-chu-ndc .gc-content { max-width: 100%; padding: 0 8px 48px; }
  .page-ghi-chu-ndc .gc-entry { font-size: 0.9rem; }
  .page-ghi-chu-ndc .gc-entry-body { padding: 16px 14px; }
  .page-ghi-chu-ndc .gc-filters { gap: 4px; }
  .page-ghi-chu-ndc .gc-filter-btn { padding: 4px 10px; font-size: 0.78rem; }
}

/* ── RESPONSIVE (Dịch Tượng Luận) ── */
@media (max-width: 700px) {
  .page-dich-tuong-luan .tl-content { max-width: 100%; padding: 0 12px 48px; }
  .page-dich-tuong-luan .tl-group { grid-template-columns: 1fr; }
  .page-dich-tuong-luan .tl-group-left,
  .page-dich-tuong-luan .tl-group-right { padding: 16px 18px; font-size: 0.9rem; }
  .page-dich-tuong-luan .tl-toc { max-width: 100%; font-size: 0.78rem; }
}

/* ── Lưu Tâm Vũ appendix: hồi mục đối liên (scoped — không ảnh hưởng sách khác) ── */
.page-ltv-appendix .ch-body h5.sigil_not_in_toc,
.page-ltv-appendix .ch-body h5.hoi-muc {
  margin: 2.6em 0 0.85em;
  padding: 14px 18px 14px 16px;
  border-left: 3px solid var(--orange);
  background: linear-gradient(90deg, rgba(241, 90, 36, 0.07) 0%, rgba(241, 90, 36, 0.02) 55%, transparent 100%);
  border-radius: 0 10px 10px 0;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--navy);
  font-weight: 600;
}
.page-ltv-appendix .ch-body h5.sigil_not_in_toc:first-child,
.page-ltv-appendix .ch-body h5.hoi-muc:first-child {
  margin-top: 0.2em;
}
.page-ltv-appendix .hoi-muc-num {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 6px;
  line-height: 1.3;
}
.page-ltv-appendix .hoi-muc-num a {
  color: var(--orange);
  text-decoration: none;
}
.page-ltv-appendix .hoi-muc-num a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.page-ltv-appendix .hoi-muc-title {
  display: block;
  font-weight: 600;
  color: var(--navy);
}
@media (max-width: 640px) {
  .page-ltv-appendix .ch-body h5.sigil_not_in_toc,
  .page-ltv-appendix .ch-body h5.hoi-muc {
    font-size: 0.98rem;
    padding: 12px 12px 12px 12px;
    margin: 2.1em 0 0.7em;
  }
}

/* ── SCROLL TO TOP ── */
.scroll-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s;
  box-shadow: 0 2px 12px rgba(241,90,36,0.35);
  z-index: 999;
}
.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
}
.scroll-top:hover {
  background: #d94a1a;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(241,90,36,0.45);
}

/* ── Thiên Kỷ (trang tập chỉ tiếng Việt; .cm-han chỉ còn ở Phụ lục 2 song ngữ) ── */
.tk-page .cm-row .cm-han { font-size: 1.02rem; line-height: 1.95; }
.tk-page .cm-row .cm-vi { color: var(--text); font-size: 0.95rem; }
.tk-page .cm-row .cm-vi p { margin: 0 0 0.7em; }
.tk-page .cm-row .cm-vi p:last-child { margin-bottom: 0; }
/* Chú thích của người dịch (NDLR): ref [N] trong bài + khối cuối trang */
.tk-page sup.nd { font-size: 0.7rem; line-height: 0; margin-left: 1px; }
.tk-page sup.nd a { color: var(--orange); text-decoration: none; font-weight: 600; }
.tk-page .cm-vi .ndlr { margin: 0 0 0.7em; padding: 8px 12px; max-width: none; border-radius: 6px; font-size: 0.85rem; line-height: 1.6; font-style: italic; }
.tk-page .cm-vi .ndlr sup.nd { font-style: normal; font-weight: 600; color: var(--orange); }
.tk-page :target { background: #fff7f2; }
.tk-tools { max-width: 1100px; margin: 0 auto; padding: 20px 16px 4px; text-align: center; }
.tk-tools label { display: inline-flex; align-items: center; gap: 12px; padding: 10px 20px 10px 14px; border: 2px solid var(--border); border-radius: 999px; background: #fff; color: var(--navy); font-size: 1rem; font-weight: 600; cursor: pointer; user-select: none; box-shadow: var(--shadow-sm, 0 1px 4px rgba(0,0,0,0.06)); transition: border-color .15s, background .15s, color .15s; }
.tk-tools label:hover { border-color: var(--orange); }
.tk-tools input { -webkit-appearance: none; appearance: none; position: relative; flex-shrink: 0; width: 46px; height: 26px; margin: 0; border-radius: 13px; background: #ced4da; cursor: pointer; transition: background .15s; }
.tk-tools input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.3); transition: left .15s; }
.tk-tools input:checked { background: var(--orange); }
.tk-tools input:checked::after { left: 23px; }
.tk-tools label:has(input:checked) { border-color: var(--orange); background: #fff7f2; color: var(--orange); }
.tk-page.nozh .cm-row { grid-template-columns: 1fr; }
.tk-page.nozh .cm-row .cm-han { display: none; }
.tk-page .cm-row.tk-h { background: #f8f9fa; border-color: #dee2e6; margin-top: 18px; }
.tk-page .cm-row.tk-h .cm-han { font-weight: 700; color: var(--teal); }
.tk-page .cm-row.tk-h .cm-vi h2, .tk-page .cm-row.tk-h .cm-vi h3 { margin: 0; font-size: 1.2rem; line-height: 1.5; font-weight: 700; color: var(--navy); border: 0; padding: 0; }
.tk-page .cm-row.tk-h .cm-vi h3 { font-size: 1.1rem; }
.tk-page .cm-row.tk-h1 .cm-vi h2 { font-size: 1.4rem; color: var(--orange); }
.tk-page .tk-meta { color: var(--text-dim); font-size: 0.85rem; margin: 0 0 14px; }
.tk-page h2.tk-part { margin: 40px 0 18px; padding: 0 0 10px; font-size: 2.2rem; line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; color: var(--orange); border-bottom: 3px solid var(--orange); }
.tk-page .ch-body > .toc-details { margin-bottom: 8px; }
/* Thiên Kỷ chỉ tiếng Việt (từ 2026-10-16): mỗi đoạn = .cm-row.tk-vi (giữ id để dẫn chiếu), số đoạn .tk-sn ở lề trái */
.tk-page .cm-row.tk-vi { display: block; position: relative; margin: 0; padding: 0 0 0 2.6em; border: 0; border-radius: 6px; overflow: visible; }
.tk-page .cm-row.tk-vi .cm-vi { padding: 2px 0 0.9em; background: none; font-size: 1rem; line-height: 1.85; }
.tk-page .tk-sn { position: absolute; left: 0; top: 0.45em; width: 2em; text-align: right; font-size: 0.7rem; line-height: 1.6; color: #adb5bd; text-decoration: none; font-variant-numeric: tabular-nums; }
.tk-page .tk-sn:hover { color: var(--orange); }
.tk-page .tk-chua { color: var(--text-dim); font-style: italic; }
.tk-page .cm-hinh { padding-left: 2.6em; }
@media (max-width: 640px) {
  .tk-page .cm-row.tk-vi { padding-left: 2.1em; }
  .tk-page .tk-sn { width: 1.7em; }
  .tk-page .cm-hinh { padding-left: 0; }
}

/* ── Review sách Nguyễn Duy Cần ── */
.choice-card.review-card { grid-column: 1 / -1; cursor: default; }
.choice-card.review-card:hover { transform: none; }
.review-card .review-list { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 10px; }
.review-card .review-list a { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 18px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--navy); font-weight: 600; text-decoration: none; transition: border-color 0.2s, color 0.2s; }
.review-card .review-list a:hover { border-color: var(--orange); color: var(--orange); }
.review-card .review-list .arrow { white-space: nowrap; }
.review-article { max-width: 1100px; margin: 0 auto; padding: 40px 24px 56px; font-size: 1.02rem; line-height: 1.85; color: var(--text); }
.review-article p { margin: 0 0 18px; }
.review-article strong { color: var(--navy); }
.review-article a { color: var(--orange); font-weight: 600; text-decoration: none; border-bottom: 2px solid transparent; transition: border-color 0.2s; }
.review-article a:hover { border-bottom-color: var(--orange); }
.review-article .review-figure { margin: 28px 0; }
.review-article .review-figure img { display: block; width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--border); }
.review-article .review-figure figcaption { margin-top: 8px; font-size: 0.85rem; color: var(--text-dim); text-align: center; }
.review-article .review-cover { float: left; width: 240px; margin: 6px 32px 20px 0; }
.review-article .review-cover img { display: block; width: 100%; height: auto; border-radius: 4px; box-shadow: var(--shadow-md); }
.review-article .review-figure { clear: both; }
.review-article .review-cover.cover-set { width: 280px; }
.review-article .review-cover.cover-set img { box-shadow: none; border-radius: 0; }
@media (max-width: 640px) {
  .choices.cols-2.stack-mobile { grid-template-columns: 1fr; }
  .review-card .review-list a { flex-direction: column; gap: 4px; }
  .review-article { padding: 28px 16px 44px; font-size: 0.98rem; }
  .review-article .review-cover { float: none; width: 200px; margin: 0 auto 24px; }
  .review-article .review-figure { margin: 22px -16px; }
  .review-article .review-figure img { border-radius: 0; border-left: 0; border-right: 0; }
}

.choice-card.feature-card { grid-column: 1 / -1; background: linear-gradient(135deg, var(--orange-lt) 0%, #fff 78%); border-color: #f7c9b8; }
.choice-card.feature-card:hover { border-color: var(--orange); }
.choice-card .choice-icon.med { background: var(--orange); }
.feature-card .desc { max-width: 720px; }

.interview-article { max-width: 920px; }
.book-covers { margin: 0 0 32px; }
.book-covers-grid { display: flex; justify-content: center; align-items: flex-start; gap: 24px; }
.book-covers-grid a { display: block; width: min(42%, 220px); }
.book-covers-grid img { display: block; width: 100%; height: auto; border: 1px solid var(--border); border-radius: 6px; box-shadow: var(--shadow-md); }
.book-covers figcaption { margin-top: 12px; color: var(--text-dim); font-size: 0.82rem; line-height: 1.6; text-align: center; }
.video-embed { position: relative; padding-top: 56.25%; margin: 0 0 30px; overflow: hidden; border-radius: 12px; background: #000; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.interview-article .excerpt-intro { margin: 0 0 16px; color: var(--navy); font-size: 1.04rem; line-height: 1.75; }
.salmanoff-excerpt {
  margin: 0 0 34px;
  padding: 24px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--teal);
  border-radius: 0 14px 14px 0;
}
.salmanoff-excerpt p { margin: 0 0 16px; line-height: 1.8; }
.salmanoff-excerpt p:last-of-type { margin-bottom: 0; }
.salmanoff-excerpt footer { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--border); color: var(--text-dim); font-size: 0.82rem; }
.salmanoff-excerpt cite { color: var(--navy); font-style: normal; font-weight: 600; }
.interview-intro {
  padding: 22px 26px;
  margin: 0 0 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--orange);
  border-radius: 0 12px 12px 0;
  color: var(--navy);
}
.interview-intro h2 { margin: 0 0 12px; color: var(--navy); font-size: 1.15rem; line-height: 1.4; }
.interview-intro p { margin: 0 0 12px; font-size: 0.96rem; line-height: 1.8; }
.interview-intro p:last-child { margin-bottom: 0; }
.interview-intro a { color: var(--orange); font-weight: 500; }
.interview-toc {
  margin: 0 0 44px;
  padding: 24px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.interview-toc h2 { margin: 0 0 14px; color: var(--text-dim); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.interview-toc ol { columns: 2; column-gap: 34px; padding-left: 1.2rem; }
.interview-toc li { margin: 0 0 8px; break-inside: avoid; font-size: 0.92rem; line-height: 1.55; }
.interview-toc a { color: var(--navy); font-weight: 500; text-decoration: none; border-bottom: 0; }
.interview-toc a:hover { color: var(--orange); }
.interview-section { margin: 0 0 48px; }
.interview-section h2 {
  margin: 0 0 22px;
  padding: 0 0 12px;
  color: var(--navy);
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  line-height: 1.25;
  letter-spacing: -0.015em;
  border-bottom: 2px solid var(--border);
}
.qa { display: flex; flex-direction: column; gap: 14px; }
.qa-turn { padding: 18px 22px; background: #fff; border: 1px solid var(--border); border-left: 3px solid var(--border); border-radius: 12px; }
.qa-turn p { margin: 0 0 12px; }
.qa-turn p:last-child { margin-bottom: 0; }
.qa-speaker { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.06em; line-height: 1.4; text-transform: uppercase; }
.qa-speaker span { color: var(--text-dim); font-size: 0.7rem; font-weight: 500; letter-spacing: 0; text-transform: none; }
.qa-q { background: var(--blue-lt); border-color: #dbe8f8; border-left-color: var(--blue); }
.qa-q .qa-speaker { color: var(--blue); }
.qa-a { border-left-color: var(--teal); }
.qa-a .qa-speaker { color: var(--teal); }
@media (max-width: 760px) {
  .interview-toc ol { columns: 1; }
}
@media (max-width: 640px) {
  .interview-article { padding: 24px 14px 40px; }
  .book-covers-grid { gap: 14px; }
  .book-covers-grid a { width: 46%; }
  .salmanoff-excerpt { padding: 18px; margin-bottom: 28px; }
  .interview-intro { padding: 18px; }
  .interview-toc { padding: 18px; margin-bottom: 32px; }
  .interview-toc ol { padding-left: 1rem; }
  .interview-section { margin-bottom: 36px; }
  .qa { gap: 10px; }
  .qa-turn { padding: 14px 16px; }
  .qa-speaker { font-size: 0.7rem; }
}

/* ── Nhân Kỷ (2026-11-23) ── */
/* Khung lưu ý y khoa: mọi trang tập, Lời nói đầu, DVD, Phụ lục 1, landing, Địa Kỷ (cùng kiểu p.pl3-warn của Phụ lục 3) */
p.nk-warn, .ch-body p.nk-warn, .intro-text p.nk-warn { margin: 0 0 18px; padding: 10px 14px; border: 1px solid #f5c2c7; border-left: 4px solid #dc3545; background: #fff5f5; border-radius: 6px; font-size: 0.92rem; line-height: 1.7; text-align: left; color: var(--text); }
.nk-warn strong, .intro-text .nk-warn strong { color: #dc3545; font-weight: 700; }
/* Nút trước/sau: «Tập X : Thiên Y» nhỏ + tên thiên */
.ch-nav a.nk-nav { max-width: 48%; }
.ch-nav .nk-nav-t { display: flex; flex-direction: column; line-height: 1.35; }
.ch-nav .nk-nav-t small { font-size: 0.72rem; font-weight: 400; color: var(--text-dim); }
.ch-nav a.nk-nav-next { text-align: right; margin-left: auto; }
@media (max-width: 640px) { .ch-nav:has(.nk-nav) > a { flex: 1 1 0; min-width: 0; max-width: none; } }
/* Mục lục landing: «Tập X : Thiên Y» nhỏ + tên thiên */
.chapter-grid a.nk-toc small { display: block; font-size: 0.75rem; color: var(--text-dim); }
.chapter-list .nk-toc-note { margin: -4px 0 14px; color: var(--text-dim); font-size: 0.9rem; line-height: 1.7; }
/* Cột Hán giản thể (lang="zh-Hans"): ưu tiên font giản thể nếu máy có, không tải thêm web font */
.cm-row .cm-han:lang(zh-Hans) { font-family: 'Noto Serif SC', 'Noto Serif TC', 'Times New Roman', 'Songti SC', 'SimSun', serif; }
