/* ============================================
   慢者生存 v2 — 丝滑流畅版
   ============================================ */

:root {
  --bg: var(--btc-bg, #FBF8F3);
  --bgc: #FFFFFF;
  --bgs: #F6F1E8;
  --t: #1A1611;
  --t2: #524739;
  --t3: #968773;
  --a: #B86B1A;
  --ah: #9C5810;
  --ap: #F2DCC0;
  --accent-soft: rgba(184, 107, 26, 0.08);
  --bd: rgba(180, 100, 20, 0.10);
  --bdh: rgba(180, 100, 20, 0.22);
  --sh: 0 4px 24px rgba(160, 80, 10, 0.06);
  --shl: 0 12px 44px rgba(160, 80, 10, 10%);
  --r1: 10px;
  --r2: 16px;
  --r3: 24px;
  --r4: 32px;
  --ff: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --fs: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --nh: 64px;
  --content-w: 720px;
  --wide-w: 960px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  font-size: 17px;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nh) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--ff);
  background: var(--bg);
  color: var(--t);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.8;
  font-feature-settings: "palt";
  overflow-x: hidden;
  opacity: 0;
  animation: pageEnter 0.4s var(--ease-out) 0.1s forwards;
}

@keyframes pageEnter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

::selection { background: var(--ap); color: var(--ah); }

a {
  color: var(--a);
  text-decoration: none;
  transition: color 0.25s var(--ease-out);
}
a:hover { color: var(--ah); }

/* ====== View Transitions API ====== */
@supports (view-transition-name: none) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 0.3s;
    animation-timing-function: var(--ease-out);
  }
  ::view-transition-old(root) { animation-name: vt-out; }
  ::view-transition-new(root) { animation-name: vt-in; }
  @keyframes vt-out {
    to { opacity: 0; transform: translateY(-12px); }
  }
  @keyframes vt-in {
    from { opacity: 0; transform: translateY(12px); }
  }
}

/* ====== 进度条 ====== */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--a), #D4831E);
  z-index: 1000;
  transition: width 0.08s linear;
  box-shadow: 0 0 8px rgba(184, 107, 26, 0.4);
}

/* ====== 导航 ====== */
nav.t {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nh);
  background: rgba(251, 248, 243, 0.82);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid transparent;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1rem, 5vw, 2.5rem);
  transition: border-color 0.3s var(--ease-out), background 0.3s var(--ease-out);
}

nav.t.scrolled {
  border-bottom-color: var(--bd);
  background: rgba(251, 248, 243, 0.95);
}

.nb {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--t);
  font-family: var(--ff);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: opacity 0.2s;
}
.nb:active { opacity: 0.7; }

.ni {
  width: 34px; height: 34px;
  border-radius: var(--r1);
  background: linear-gradient(135deg, var(--a), #D4831E);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 15px; font-weight: 700;
  box-shadow: 0 2px 10px rgba(184, 107, 26, 0.3);
  transition: transform 0.3s var(--ease-bounce);
}
.nb:hover .ni { transform: scale(1.08) rotate(-3deg); }

.nr { font-family: var(--fs); font-size: 0.8rem; color: var(--t3); font-weight: 400; }

.nav-menu-btn {
  display: none;
  background: none; border: none; cursor: pointer;
  padding: 8px; color: var(--t);
  transition: opacity 0.2s;
}
.nav-menu-btn:active { opacity: 0.5; }

.nav-links { display: flex; align-items: center; gap: 1.8rem; }

.nav-links a {
  font-family: var(--fs);
  font-size: 0.85rem;
  color: var(--t2);
  font-weight: 400;
  position: relative;
  transition: color 0.25s var(--ease-out);
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--a);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}
.nav-links a:hover { color: var(--a); }
.nav-links a:hover::after { transform: scaleX(1); }

/* ====== 封面 ====== */
.cv {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nh) + 3rem) 2rem 5rem;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.cv-bg-wrap { position: absolute; inset: 0; pointer-events: none; z-index: 0; }

.cv-glow { position: absolute; border-radius: 50%; filter: blur(100px); opacity: 0.4; will-change: transform; }

.cv-glow-1 {
  width: 700px; height: 700px;
  top: -250px; left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(184, 107, 26, 0.18) 0%, transparent 70%);
  animation: float1 12s ease-in-out infinite;
}
.cv-glow-2 {
  width: 500px; height: 500px;
  bottom: -150px; right: -5%;
  background: radial-gradient(circle, rgba(200, 100, 20, 0.12) 0%, transparent 70%);
  animation: float2 15s ease-in-out infinite;
}
.cv-glow-3 {
  width: 400px; height: 400px;
  top: 30%; left: -10%;
  background: radial-gradient(circle, rgba(240, 180, 60, 0.08) 0%, transparent 70%);
  animation: float3 18s ease-in-out infinite;
}

@keyframes float1 { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(30px); } }
@keyframes float2 { 0%,100% { transform: translateY(0) translateX(0); } 50% { transform: translateY(-20px) translateX(-15px); } }
@keyframes float3 { 0%,100% { transform: translateY(0); } 50% { transform: translateY(40px); } }

.cv-line {
  position: absolute; top: 0; left: 50%;
  transform: translateX(-50%);
  width: 1px; height: 100%;
  background: linear-gradient(to bottom, transparent, rgba(184, 107, 26, 0.12) 30%, rgba(184, 107, 26, 0.12) 70%, transparent);
}

.cv-i { position: relative; z-index: 1; max-width: 760px; width: 100%; }

.cv-top { animation: fadeIn 0.8s var(--ease-out) 0.05s both; margin-bottom: 2rem; }

.bg {
  font-family: var(--fs); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--a);
  padding: 6px 18px; background: var(--ap);
  border: 1px solid var(--bdh); border-radius: 100px;
  display: inline-flex; align-items: center; gap: 6px;
}

.cv-title-block { animation: fadeIn 0.8s var(--ease-out) 0.18s both; margin-bottom: 1.5rem; }
.cv-ttl-row { display: flex; align-items: center; justify-content: center; margin-bottom: 0.4rem; }
.ct {
  font-family: var(--ff);
  font-size: clamp(3.5rem, 12vw, 7rem);
  font-weight: 700; color: var(--t);
  letter-spacing: 0.08em; line-height: 1; white-space: nowrap;
}
.cv-ttl-sub {
  font-family: var(--fs); font-size: 0.74rem; font-weight: 500;
  letter-spacing: 0.4em; color: var(--t3);
  text-transform: uppercase; margin-top: 0.8rem;
  animation: fadeIn 0.8s var(--ease-out) 0.28s both;
}

.cv-divider {
  display: flex; align-items: center; justify-content: center;
  gap: 1rem; margin: 1.6rem auto;
  animation: fadeIn 0.8s var(--ease-out) 0.38s both;
}
.cv-divider-line { width: 60px; height: 1px; background: linear-gradient(90deg, transparent, var(--a), transparent); }
.cv-divider-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--a); flex-shrink: 0; }

.cv-quote-block {
  position: relative; z-index: 1; width: 100%;
  max-width: 640px; margin: 3rem auto 0;
  animation: fadeIn 0.8s var(--ease-out) 0.85s both;
}
.cq {
  padding: 2rem 2.5rem; background: var(--bgc);
  border: 1px solid var(--bd); border-radius: var(--r4);
  box-shadow: var(--sh); text-align: left; position: relative;
  transition: box-shadow 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
.cq:hover { box-shadow: var(--shl); transform: translateY(-2px); }
.cq::before {
  content: '\201C'; position: absolute;
  top: 0.6rem; left: 1.2rem; font-size: 3.5rem;
  color: var(--a); opacity: 0.15;
  font-family: Georgia, serif; line-height: 1;
}
.cq p { font-size: 0.95rem; line-height: 2; color: var(--t2); }

.cm {
  display: flex; align-items: center; justify-content: center;
  gap: 1.2rem; flex-wrap: wrap;
  font-family: var(--fs); font-size: 0.8rem; color: var(--t3);
  margin: 1.8rem 0 2.2rem;
  animation: fadeIn 0.8s var(--ease-out) 0.58s both;
}
.cm-i { display: flex; align-items: center; gap: 0.4rem; }

.cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 44px;
  background: linear-gradient(135deg, var(--a), #D4831E);
  color: #fff; border-radius: var(--r2);
  font-family: var(--fs); font-size: 1rem; font-weight: 600;
  text-decoration: none;
  transition: all 0.35s var(--ease-out);
  box-shadow: 0 8px 28px rgba(184, 107, 26, 0.25), 0 2px 8px rgba(184, 107, 26, 0.15);
  animation: fadeIn 0.8s var(--ease-out) 0.68s both;
  border: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 38px rgba(184, 107, 26, 0.32), 0 3px 12px rgba(184, 107, 26, 0.2);
  color: #fff;
}
.cta:active { transform: translateY(-1px) scale(0.98); }
.cta-arrow { display: inline-block; transition: transform 0.3s var(--ease-out); }
.cta:hover .cta-arrow { transform: translateX(4px); }

/* ====== 章节列表 ====== */
.cs2 { padding: 5rem 2rem 5rem; background: var(--bgs); border-top: 1px solid var(--bd); }

.cs2-i { max-width: var(--wide-w); margin: 0 auto; }

.sh { text-align: center; margin-bottom: 3rem; }
.sh-l {
  font-family: var(--fs); font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--a);
  display: block; margin-bottom: 0.8rem;
}
.sh h2 { font-family: var(--ff); font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 700; letter-spacing: 0.02em; }

.cl {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.8rem;
}

.cc {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.1rem 1.3rem; background: var(--bgc);
  border: 1px solid var(--bd); border-radius: var(--r3);
  text-decoration: none; color: var(--t);
  transition: all 0.35s var(--ease-out);
  position: relative; overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.cc::before {
  content: ''; position: absolute;
  left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(to bottom, var(--a), #D4831E);
  opacity: 0; transition: opacity 0.3s var(--ease-out);
}
.cc::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(184, 107, 26, 0.04), transparent);
  opacity: 0; transition: opacity 0.3s var(--ease-out);
  pointer-events: none;
}
.cc:hover {
  border-color: var(--a);
  transform: translateX(4px);
  box-shadow: var(--sh);
  color: var(--t);
}
.cc:hover::before { opacity: 1; }
.cc:hover::after { opacity: 1; }
.cc:active { transform: translateX(2px) scale(0.99); }

.cn {
  font-family: var(--fs); font-size: 0.7rem; font-weight: 700;
  color: var(--a); min-width: 38px; height: 38px;
  border-radius: 10px; background: var(--ap);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all 0.35s var(--ease-out);
}
.cc:hover .cn { background: var(--a); color: #fff; transform: scale(1.05); }

.ci { flex: 1; min-width: 0; }
.ct2 { font-family: var(--ff); font-size: 0.94rem; font-weight: 600; line-height: 1.4; }
.cd { font-family: var(--fs); font-size: 0.76rem; color: var(--t3); margin-top: 0.2rem; }

.ca {
  color: var(--a); opacity: 0;
  transform: translateX(-5px);
  transition: all 0.3s var(--ease-out);
  flex-shrink: 0;
}
.cc:hover .ca { opacity: 1; transform: translateX(0); }

/* ====== 文章页 ====== */
.article-wrap { padding-top: var(--nh); }

.article-header {
  max-width: var(--content-w); margin: 0 auto;
  padding: 3rem 1.5rem 1.5rem; text-align: center;
}

.article-header .eyebrow {
  font-family: var(--fs); font-size: 0.74rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--a); margin-bottom: 1rem;
}
.article-header h1 {
  font-family: var(--ff); font-size: clamp(1.6rem, 5vw, 2.4rem);
  font-weight: 700; letter-spacing: 0.01em;
  line-height: 1.3; margin-bottom: 0.8rem;
}
.article-header .subtitle { font-family: var(--fs); font-size: 0.95rem; color: var(--t3); font-weight: 400; }
.article-header .divider {
  width: 40px; height: 2px;
  background: linear-gradient(90deg, var(--a), #D4831E);
  border-radius: 2px; margin: 1.5rem auto 0;
}

article.al {
  max-width: var(--content-w); margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

article.al h1 {
  font-family: var(--ff); font-size: clamp(1.5rem, 4.5vw, 2rem);
  font-weight: 700; margin-top: 2.5rem; margin-bottom: 1rem;
  line-height: 1.35; color: var(--t);
  scroll-margin-top: calc(var(--nh) + 1rem);
}
article.al h1:first-child { margin-top: 0; }

article.al h3 {
  font-family: var(--ff); font-size: 1.15rem; font-weight: 600;
  margin-top: 2.5rem; margin-bottom: 1rem; color: var(--t);
  letter-spacing: 0.01em; position: relative; padding-left: 0;
  scroll-margin-top: calc(var(--nh) + 1rem);
}
article.al h3::before {
  content: ''; display: inline-block;
  width: 4px; height: 1.15rem;
  background: linear-gradient(180deg, var(--a), #D4831E);
  border-radius: 2px; margin-right: 0.6rem; vertical-align: -0.1rem;
}

article.al p {
  font-family: var(--ff); font-size: 1.0625rem;
  line-height: 2.05; color: var(--t2);
  margin-bottom: 1.4rem; text-align: justify;
  letter-spacing: 0.01em; word-break: break-word;
  opacity: 0; animation: paraFade 0.5s var(--ease-out) forwards;
  animation-delay: calc(var(--n, 0) * 0.02s);
}

@keyframes paraFade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

article.al p:first-of-type { font-size: 1.1rem; color: var(--t2); font-weight: 400; }

/* ====== 章节 Prev/Next 导航 ====== */
.chapter-nav {
  max-width: var(--content-w); margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  display: flex; justify-content: space-between;
  align-items: stretch; gap: 1rem;
  border-top: 1px solid var(--bd); margin-top: 2rem;
}

.cn-link {
  display: flex; flex-direction: column; gap: 0.3rem;
  padding: 1rem 1.2rem; border-radius: var(--r2);
  background: var(--bgc); border: 1px solid var(--bd);
  text-decoration: none;
  transition: all 0.3s var(--ease-out);
  flex: 1; max-width: 48%;
  -webkit-tap-highlight-color: transparent;
}
.cn-link:hover { border-color: var(--a); box-shadow: var(--sh); transform: translateY(-2px); }
.cn-link:active { transform: translateY(0) scale(0.99); }

.cn-label { font-family: var(--fs); font-size: 0.74rem; color: var(--t3); }
.cn-title { font-family: var(--ff); font-size: 0.92rem; font-weight: 600; color: var(--t); }
.cn-link.next { text-align: right; margin-left: auto; }
.cn-link.placeholder { visibility: hidden; pointer-events: none; }

/* ====== 回到顶部 ====== */
.back-to-top {
  position: fixed; bottom: 2rem; right: 2rem;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--bgc); border: 1px solid var(--bd);
  box-shadow: var(--sh);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; opacity: 0;
  transform: translateY(10px) scale(0.8);
  transition: all 0.4s var(--ease-bounce);
  z-index: 800; color: var(--a);
  -webkit-tap-highlight-color: transparent;
}
.back-to-top.visible { opacity: 1; transform: translateY(0) scale(1); }
.back-to-top:hover { border-color: var(--a); background: var(--ap); transform: translateY(-3px) scale(1.05); }
.back-to-top:active { transform: scale(0.9); }

/* ====== Footer ====== */
footer.ft {
  background: var(--t); color: rgba(255, 255, 255, 0.6);
  padding: 3.5rem 2rem; text-align: center;
}
.ftt { font-family: var(--ff); font-size: 1.3rem; font-weight: 600; color: #fff; }
.ftd { font-family: var(--fs); font-size: 0.84rem; color: rgba(255, 255, 255, 0.35); margin-top: 0.6rem; }
.fth { width: 36px; height: 2px; background: var(--a); border-radius: 2px; margin: 1.4rem auto; }
.ftn { font-family: var(--fs); font-size: 0.74rem; color: rgba(255, 255, 255, 0.25); letter-spacing: 0.05em; }
.ftn a { color: rgba(255, 255, 255, 0.4); text-decoration: none; transition: color 0.2s; }
.ftn a:hover { color: var(--a); }

/* ====== 目录侧边栏 ====== */
.toc-sidebar {
  position: fixed; left: 1.5rem; top: 50%;
  transform: translateY(-50%); z-index: 500; display: none;
}
.toc-sidebar ul { list-style: none; padding: 0; margin: 0; }
.toc-sidebar a {
  display: block; font-family: var(--fs); font-size: 0.74rem;
  color: var(--t3); padding: 0.35rem 0; padding-left: 0.8rem;
  border-left: 2px solid transparent;
  transition: all 0.25s var(--ease-out); line-height: 1.5;
}
.toc-sidebar a:hover, .toc-sidebar a.active {
  color: var(--a); border-color: var(--a);
  padding-left: 1rem;
}

/* ====== 移动端目录按钮 ====== */
.mobile-toc {
  display: none; position: fixed; bottom: 2rem; left: 2rem;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--bgc); border: 1px solid var(--bd);
  box-shadow: var(--sh);
  align-items: center; justify-content: center;
  cursor: pointer; z-index: 800; color: var(--a);
  -webkit-tap-highlight-color: transparent;
  transition: all 0.3s var(--ease-out);
}
.mobile-toc:active { transform: scale(0.9); }

/* ====== 移动端目录面板 ====== */
.toc-panel {
  position: fixed; bottom: 0; left: 0; right: 0;
  max-height: 60vh; background: var(--bgc);
  border-top: 1px solid var(--bdh);
  border-radius: var(--r4) var(--r4) 0 0;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.1);
  padding: 1.5rem; z-index: 950;
  transform: translateY(100%);
  transition: transform 0.4s var(--ease-out);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.toc-panel.open { transform: translateY(0); }
.toc-panel h4 { font-family: var(--ff); font-size: 1rem; font-weight: 600; margin-bottom: 1rem; text-align: center; }
.toc-panel ul { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.toc-panel a {
  display: block; font-family: var(--fs); font-size: 0.82rem;
  color: var(--t2); padding: 0.6rem 0.8rem;
  border-radius: var(--r1); background: var(--bgs);
  transition: all 0.2s var(--ease-out);
}
.toc-panel a:hover, .toc-panel a.current { background: var(--ap); color: var(--a); }

.toc-overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.3);
  z-index: 940; opacity: 0; pointer-events: none;
  transition: opacity 0.3s var(--ease-out);
  backdrop-filter: blur(2px);
}
.toc-overlay.open { opacity: 1; pointer-events: auto; }

/* ====== 动画 ====== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.6s var(--ease-out) both; }

/* ====== 链接预加载指示器 ====== */
.preload-indicator {
  position: fixed; top: 0; left: 0; right: 0;
  height: 100vh; z-index: 9999;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  opacity: 1; transition: opacity 0.3s var(--ease-out);
  pointer-events: none;
}
.preload-indicator.hidden { opacity: 0; }
.preload-spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--bd);
  border-top-color: var(--a);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ====== 滑动手势提示 ====== */
.swipe-hint {
  position: fixed; bottom: 5.5rem; left: 50%;
  transform: translateX(-50%);
  font-family: var(--fs); font-size: 0.7rem;
  color: var(--t3); opacity: 0;
  pointer-events: none; z-index: 700;
  transition: opacity 0.3s; white-space: nowrap;
  display: none;
}
@media (max-width: 768px) { .swipe-hint { display: block; } }

/* ====== 响应式 ====== */
@media (max-width: 1024px) { .toc-sidebar { display: none; } }
@media (min-width: 1400px) { .toc-sidebar { display: block; } }

@media (max-width: 768px) {
  html { font-size: 16px; }
  nav.t { padding: 0 1rem; }
  .nr { display: none; }
  .cv { padding: calc(var(--nh) + 2rem) 1.25rem 4rem; min-height: 100svh; }
  .cv-ttl-row { gap: 1rem; }
  .ct { letter-spacing: 0.04em; }
  .cq { padding: 1.6rem 1.5rem; }
  .cq p { font-size: 0.9rem; }
  .cs2 { padding: 4rem 1rem 4rem; }
  .cl { grid-template-columns: 1fr; }
  article.al { padding: 1.5rem 1.25rem 3rem; }
  article.al p { font-size: 1rem; line-height: 2; text-align: left; }
  .article-header { padding: 2rem 1.25rem 1rem; }
  .chapter-nav { flex-direction: column; padding: 1.5rem 1.25rem 3rem; }
  .cn-link { max-width: 100%; }
  .mobile-toc { display: flex; }
  .back-to-top { bottom: 1rem; right: 1rem; }
  .nav-links { display: none; }
  .nav-menu-btn { display: block; }
  .toc-panel ul { grid-template-columns: 1fr; }
}

@media (max-width: 380px) {
  html { font-size: 15px; }
  .ct { font-size: clamp(2.5rem, 14vw, 4rem); }
}

@media print {
  nav.t, .scroll-progress, .back-to-top, .toc-sidebar, .mobile-toc, .chapter-nav { display: none; }
  body { font-size: 12pt; line-height: 1.8; }
  article.al { max-width: 100%; }
  article.al p { opacity: 1 !important; animation: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
