/* ============================================================
   高性价比人生 · 视觉系统 v3
   「素纸 · 墨字 · 一线朱」—— 从"卡片堆叠"回到"编辑排版"

   三条纪律：
   1. 不用卡片：条目靠发丝线与留白切分，不靠边框、圆角、阴影。
   2. 不用四色：全站只有墨阶 + 一线朱，其余颜色都降到低饱和矿物色。
   3. 不用字距炫技：微型大写字距只保留 .06–.16em，其余按正常中文排版。
   ============================================================ */

:root {
  /* 纸 —— 近白微暖，越干净越耐读 */
  --paper:    #FBFAF8;
  --paper-2:  #F3F1ED;
  --card:     #FFFFFF;
  --veil:     rgba(27, 26, 24, .030);

  /* 墨 —— 四阶灰，够用就行 */
  --ink:      #1B1A18;
  --ink-2:    #3A3833;
  --ink-3:    #67635B;
  --ink-4:    #98948C;
  --hair:     rgba(27, 26, 24, .085);
  --hair-2:   rgba(27, 26, 24, .17);

  /* 一线朱 —— 全站唯一强调色，只用在真正需要"指一下"的地方 */
  --v:        #9E3B2E;
  --v-soft:   rgba(158, 59, 46, .085);
  /* 朱在墨底上的亮版（海报首屏、印章用） */
  --v-poster: #C95845;

  /* 四类收益：同为低饱和矿物色，摆在一起不吵 */
  --jade:      #4F6B58;
  --jade-soft: rgba(79, 107, 88, .09);
  --brass:     #8A6C3B;
  --brass-soft:rgba(138, 108, 59, .10);
  --slate:     #4C5B6B;
  --slate-soft:rgba(76, 91, 107, .09);

  /* 旧名兼容（JS / 内联样式里还在用） */
  --vermilion: var(--v);
  --vermilion-soft: var(--v-soft);
  --pine: var(--jade);
  --ochre: var(--brass);

  --mark:     rgba(226, 196, 122, .40);

  --serif: "Songti SC", "Source Han Serif SC", "Noto Serif SC", "STSong", Georgia, "Times New Roman", serif;
  --sans:  "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, system-ui, "Segoe UI", sans-serif;
  --mono:  "SF Mono", ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;

  --nav-h:  64px;
  --side-w: 240px;
  --r:      3px;          /* 圆角一律贴近直角，浮层最多 4px */

  --sh-1: 0 1px 2px rgba(27, 26, 24, .035);
  --sh-2: 0 12px 34px -18px rgba(27, 26, 24, .22);
  --ease: cubic-bezier(.22,.68,.28,1);

  color-scheme: light;
}

html.dark {
  --paper:    #161513;
  --paper-2:  #1E1D1A;
  --card:     #1F1E1B;
  --veil:     rgba(235, 232, 226, .035);

  --ink:      #EAE7E1;
  --ink-2:    #B3AEA5;
  --ink-3:    #827E75;
  --ink-4:    #5F5B53;
  --hair:     rgba(235, 232, 226, .10);
  --hair-2:   rgba(235, 232, 226, .20);

  --v:        #CC7A6B;
  --v-soft:   rgba(204, 122, 107, .14);
  --v-poster: #A8452F;

  --jade:      #8AAE97;
  --jade-soft: rgba(138, 174, 151, .13);
  --brass:     #C3A76C;
  --brass-soft:rgba(195, 167, 108, .13);
  --slate:     #93A4B6;
  --slate-soft:rgba(147, 164, 182, .13);

  --mark:     rgba(200, 164, 80, .26);

  --sh-1: 0 1px 2px rgba(0, 0, 0, .28);
  --sh-2: 0 12px 34px -18px rgba(0, 0, 0, .60);

  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  scroll-padding-top: calc(var(--nav-h) + 26px);
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15.5px/1.9 var(--sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

/* 纸纹：只留极其微弱的一层，消掉纯色块的塑料感 */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 300; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .018;
  mix-blend-mode: multiply;
}
html.dark body::after { opacity: .035; mix-blend-mode: screen; }

a { color: var(--v); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--v); outline-offset: 2px; border-radius: 2px; }
mark {
  background: var(--mark); color: inherit; border-radius: 1px;
  padding: .06em .12em; box-shadow: none;
}
::selection { background: var(--mark); color: var(--ink); }

.num, .tnum { font-variant-numeric: tabular-nums; }
h1, h2, h3, h4 { font-weight: 600; }
p { hanging-punctuation: allow-end; }

/* 通用「微型标签」：字距收敛到 0.12em，避免通篇字母间距炫技 */
.micro {
  font: 400 11px/1 var(--sans);
  letter-spacing: .12em;
  color: var(--ink-4);
}

/* ---------- 顶栏 ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; height: var(--nav-h); z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--hair);
}
.nav-in { height: 100%; display: flex; align-items: center; gap: 18px; padding: 0 28px; }
.brand { display: flex; align-items: baseline; gap: 12px; white-space: nowrap; }
.brand b { font: 600 17px/1 var(--serif); letter-spacing: .06em; color: var(--ink); }
.brand span {
  font: 400 10.5px/1 var(--sans); letter-spacing: .16em; color: var(--ink-4);
  padding-left: 12px; border-left: 1px solid var(--hair-2);
}

.search { flex: 1; max-width: 380px; margin-left: auto; position: relative; }
.search input {
  width: 100%; height: 36px; padding: 0 40px 0 34px;
  border: 1px solid var(--hair); border-radius: var(--r);
  background: transparent;
  color: var(--ink); font: 14px var(--sans);
  transition: border-color .22s var(--ease);
}
.search input:focus { outline: 0; border-color: var(--ink-4); background: transparent; box-shadow: none; }
.search input::placeholder { color: var(--ink-4); }
.search svg {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px; stroke: var(--ink-4); fill: none; stroke-width: 1.6; pointer-events: none;
}
.search kbd {
  position: absolute; right: 11px; top: 50%; transform: translateY(-50%);
  font: 10.5px var(--mono); color: var(--ink-4);
  border: 1px solid var(--hair); border-radius: 2px; padding: 1px 5px;
}

.nav-r { display: flex; align-items: center; gap: 20px; }
.icon-btn {
  width: 30px; height: 30px; border-radius: 2px; display: grid; place-items: center;
  color: var(--ink-4); transition: color .18s;
}
.icon-btn:hover { background: none; color: var(--ink); }
.icon-btn svg { width: 16px; height: 16px; fill: currentColor; }

/* 导航项：纯文字，不加胶囊、不加边框 */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: auto; padding: 0; border: 0; border-radius: 0;
  font-size: 13.5px; color: var(--ink-3);
  transition: color .18s;
}
.pill:hover { color: var(--ink); text-decoration: none; }
.pill i {
  font-style: normal; font: 400 11px var(--sans); color: var(--ink-4);
  min-width: 0; text-align: center; font-variant-numeric: tabular-nums;
}
.pill.has i { color: var(--v); }
.menu-btn { display: none; }

/* ---------- 侧栏 ---------- */
.sidebar {
  position: fixed; top: var(--nav-h); bottom: 0; left: 0; width: var(--side-w);
  background: var(--paper-2); border-right: 1px solid var(--hair);
  padding: 30px 24px 100px; overflow-y: auto; overscroll-behavior: contain; z-index: 30;
  scrollbar-width: thin; scrollbar-color: var(--hair-2) transparent;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--hair-2); border-radius: 3px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }

/* 分组标题：朱色小方块 + 宽字距小字 + 延长发丝线，层次从这级拉开 */
.side-h {
  display: flex; align-items: center; gap: 8px;
  font: 600 11px/1 var(--sans); letter-spacing: .16em; color: var(--ink-3);
  margin: 30px 0 13px;
}
.side-h:first-child { margin-top: 0; }
.sg:first-child .side-h { margin-top: 0; }
.side-h::before { content: ""; flex: none; width: 5px; height: 5px; background: var(--v); }
.side-h::after { content: ""; flex: 1; height: 1px; background: var(--hair); }

/* 入口模式：从首页「三种进入方式」进来时，侧栏只点亮与之对应的那一组 */
.sg { transition: opacity .45s var(--ease); }
.sidebar[data-mode] .sg { opacity: .34; }
.sidebar[data-mode] .sg[data-on="1"] { opacity: 1; }
.sg[data-on="1"] > .side-h { color: var(--ink); }
.sg[data-on="1"] > .side-h::after { background: var(--v-soft); }

.side-note {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; gap: 8px; margin-bottom: 22px;
  padding: 9px 12px; border: 0; border-left: 2px solid var(--v); border-radius: 0;
  background: var(--card); font-size: 12.5px; color: var(--ink-2);
}
.side-note b { font: 400 10.5px/1 var(--sans); letter-spacing: .14em; color: var(--v); }
.side-note button { margin-left: auto; font-size: 11.5px; color: var(--ink-4); text-decoration: underline; }
.side-note button:hover { color: var(--v); }

.scene-list { display: grid; gap: 1px; }
.scene {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 7px 10px; border-radius: 2px; border-left: 2px solid transparent;
  font-size: 13.5px; color: var(--ink-2); text-align: left;
  transition: background .16s var(--ease), color .16s, border-color .16s;
}
.scene:hover { background: var(--card); color: var(--ink); }
.scene[aria-pressed="true"] {
  background: var(--card); border-left-color: var(--v); color: var(--ink);
  box-shadow: var(--sh-1);
}
.scene em {
  font-style: normal; flex: none; width: 16px; text-align: center;
  font: 400 13px var(--serif); color: var(--ink-4);
}
.scene[aria-pressed="true"] em { color: var(--v); }
.scene i {
  font-style: normal; margin-left: auto; font: 400 11px var(--sans);
  color: var(--ink-4); font-variant-numeric: tabular-nums;
}

/* 带名头的筛选行：钱 / 时间 / 毅力 —— 两列网格，换行也对齐文字列 */
.chips-row { display: grid; grid-template-columns: 32px 1fr; gap: 3px 10px; margin-bottom: 10px; align-items: baseline; }
.chips-row:last-child { margin-bottom: 0; }
.chips-k {
  font: 400 10.5px/1.9 var(--sans); letter-spacing: .08em; color: var(--ink-4);
  text-align: justify; text-align-last: justify;
}

/* 筛选：方点 + 文字；「换回什么」一组方点固定用各自的颜色 */
.chips { display: flex; flex-wrap: wrap; gap: 3px 16px; margin-bottom: 9px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  white-space: nowrap;
  border: 0; background: none; border-radius: 0;
  padding: 3px 0; font-size: 13px; line-height: 1.5; color: var(--ink-2);
  transition: color .18s var(--ease);
}
.chip::before {
  content: ""; flex: none; width: 6px; height: 6px; border-radius: 1px;
  border: 1.2px solid var(--ink-4); transition: background .18s, border-color .18s;
}
.chip:hover { color: var(--ink); }
.chip[aria-pressed="true"] { color: var(--ink); }
.chip[aria-pressed="true"]::before { background: currentColor; border-color: currentColor; }
.chips[data-dim="lens"] .chip[data-v="死亡率"]::before { border-color: var(--v); }
.chips[data-dim="lens"] .chip[data-v="金钱"]::before   { border-color: var(--jade); }
.chips[data-dim="lens"] .chip[data-v="自由"]::before   { border-color: var(--brass); }
.chips[data-dim="lens"] .chip[data-v="时间"]::before   { border-color: var(--slate); }
.chips[data-dim="lens"] .chip[aria-pressed="true"][data-v="死亡率"] { color: var(--v); }
.chips[data-dim="lens"] .chip[aria-pressed="true"][data-v="金钱"]   { color: var(--jade); }
.chips[data-dim="lens"] .chip[aria-pressed="true"][data-v="自由"]   { color: var(--brass); }
.chips[data-dim="lens"] .chip[aria-pressed="true"][data-v="时间"]   { color: var(--slate); }

.sec-link {
  display: flex; align-items: baseline; gap: 10px; width: 100%; padding: 4px 8px 4px 0;
  font-size: 13px; color: var(--ink-2); text-align: left;
  border-radius: 2px; transition: color .16s, background .16s;
}
.sec-link:hover { color: var(--ink); background: var(--card); }
.sec-link[aria-pressed="true"] { color: var(--v); }
.sec-link b {
  font: 400 11px var(--sans); color: var(--ink-4); flex: none; width: 18px;
  font-variant-numeric: tabular-nums;
}
.sec-link[aria-pressed="true"] b { color: var(--v); }
.sec-link span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sec-link i { font-style: normal; font: 400 11px var(--sans); color: var(--ink-4); }

/* 排序：文字页签，选中加下划线，不做分段控件 */
.sort-sw { display: flex; gap: 18px; border: 0; border-radius: 0; background: none; overflow: visible; }
.sort-sw button {
  flex: none; padding: 2px 0 4px; font-size: 13.5px; color: var(--ink-3);
  border: 0; border-bottom: 1.5px solid transparent; border-radius: 0;
  transition: color .18s, border-color .18s;
}
.sort-sw button:hover { background: none; color: var(--ink); }
.sort-sw button[aria-pressed="true"] { background: none; color: var(--ink); border-bottom-color: var(--ink); }

.card-sec {
  display: block;
  font: 400 11px var(--sans); letter-spacing: .12em; color: var(--ink-4);
  margin-bottom: 10px; cursor: pointer; transition: color .18s;
}
.card-sec:hover { color: var(--v); }

.toggle { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--ink-2); padding: 4px 0; cursor: pointer; }
.toggle input {
  appearance: none; -webkit-appearance: none;
  width: 14px; height: 14px; margin: 0; flex: none;
  border: 1px solid var(--ink-4); border-radius: 2px; background: var(--card);
  transition: all .18s var(--ease); position: relative;
}
.toggle input:checked { background: var(--ink); border-color: var(--ink); }
.toggle input:checked::after {
  content: ""; position: absolute; left: 3.5px; top: 1px;
  width: 4px; height: 7.5px;
  border-right: 1.6px solid var(--paper); border-bottom: 1.6px solid var(--paper);
  transform: rotate(40deg);
}
.reset {
  margin-top: 14px; font-size: 12.5px; color: var(--ink-4);
  border-bottom: 1px solid var(--hair-2); padding-bottom: 1px;
}
.reset:hover { color: var(--v); border-bottom-color: var(--v); }
.side-foot {
  margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--hair);
  font-size: 11.5px; line-height: 1.8; color: var(--ink-4);
}
.side-foot p { margin: 4px 0; }
.side-foot a { color: var(--ink-3); }
.backdrop { display: none; }

/* ---------- 主区 ---------- */
.main { padding: calc(var(--nav-h) + 8px) 0 140px var(--side-w); }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 40px; }

/* 首屏 */
.hero { padding: 44px 0 8px; }
.kicker {
  display: flex; align-items: center; gap: 10px; margin-bottom: 20px;
  font: 400 11px/1 var(--sans); letter-spacing: .14em; color: var(--ink-3);
}
.kicker::before { content: ""; flex: none; width: 8px; height: 8px; background: var(--v); }
.hero h1 {
  font: 600 44px/1.32 var(--serif); letter-spacing: -.012em; margin: 0; color: var(--ink);
}
.hero h1 em { font-style: normal; color: var(--v); }
.hero .lede {
  margin: 20px 0 0; font-size: 15.5px; line-height: 1.95; color: var(--ink-2); max-width: 58ch;
}
.hero .lede b { color: var(--ink); font-weight: 600; }
.stat-row {
  display: flex; gap: 44px; flex-wrap: wrap; margin-top: 32px; padding-top: 24px;
  border-top: 1px solid var(--hair);
}
.stat { font: 400 11.5px/1 var(--sans); letter-spacing: .04em; color: var(--ink-3); }
.stat b {
  display: block; margin-bottom: 10px;
  font: 400 34px/1 var(--serif); letter-spacing: -.01em; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat b i { font-style: normal; color: var(--v); }

/* 全景：上下两条发丝线框住，不做卡片 */
.field-wrap {
  margin: 38px 0 4px; padding: 22px 0 16px;
  border: 0; border-top: 1px solid var(--hair-2); border-bottom: 1px solid var(--hair);
  border-radius: 0; background: none; box-shadow: none;
}
.field-hd { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.field-hd h3 { margin: 0; font: 400 11px/1 var(--sans); letter-spacing: .14em; color: var(--ink-4); }
.field-hd .hint { font-size: 11.5px; color: var(--ink-4); margin-left: auto; }
#field { display: block; width: 100%; }
#field circle { cursor: pointer; transition: r .14s var(--ease), opacity .14s; }
#field circle.dim { opacity: .09; }
#field circle.on { stroke: var(--ink); stroke-width: .9; }
.axis-lab { font: 10.5px var(--sans); letter-spacing: .06em; fill: var(--ink-4); }
.grid-line { stroke: var(--hair); stroke-width: .6; }
.legend {
  display: flex; gap: 20px; flex-wrap: wrap; margin-top: 14px;
  padding-top: 12px; border-top: 1px solid var(--hair);
  font-size: 11.5px; color: var(--ink-3);
}
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }

/* 情境条 */
.scenes-strip {
  display: flex; gap: 8px; overflow-x: auto; padding: 8px 0 14px;
  margin: 0 -40px; padding-left: 40px; padding-right: 40px; scrollbar-width: none;
}
.scenes-strip::-webkit-scrollbar { display: none; }
.scene-card {
  flex: none; border: 1px solid var(--hair); background: transparent; border-radius: var(--r);
  padding: 10px 15px; min-width: 146px; text-align: left;
  transition: border-color .2s var(--ease), background .2s;
}
.scene-card:hover { transform: none; box-shadow: none; border-color: var(--ink-4); }
.scene-card[aria-pressed="true"] { background: var(--veil); border-color: var(--v); }
.scene-card b { display: block; font: 500 13.5px/1.5 var(--sans); color: var(--ink); }
.scene-card[aria-pressed="true"] b { color: var(--v); }
.scene-card i { font-style: normal; font-size: 11.5px; color: var(--ink-4); }

/* ---------- 节 ---------- */
.sec-block { margin-top: 72px; scroll-margin-top: 92px; }
.sec-h {
  position: relative; display: flex; align-items: baseline; gap: 20px;
  padding-top: 26px; margin-bottom: 14px; border-top: 1px solid var(--hair-2);
}
/* 章节开头的短粗朱线 —— 编辑排版里的「节标」 */
.sec-h::before {
  content: ""; position: absolute; left: 0; top: -2px;
  width: 56px; height: 3px; background: var(--v);
}
.sec-h::after { content: none; }
.sec-h h2 { font: 600 28px/1.42 var(--serif); letter-spacing: -.006em; margin: 0; }
.sec-h .n {
  font: 400 46px/0.9 var(--serif); letter-spacing: -.02em; color: var(--v);
  flex: none; padding-bottom: 2px; font-variant-numeric: tabular-nums;
}
.sec-h .shown { margin-left: auto; font: 400 11px var(--sans); letter-spacing: .04em; color: var(--ink-4); flex: none; padding-bottom: 6px; }
/* 从侧栏目录翻到某一节时，标题闪一下作为「到了」的回执 */
.sec-block.jump-in > .sec-h { animation: secFlash 1.7s var(--ease); }
@keyframes secFlash {
  0%   { background: var(--v-soft); }
  60%  { background: var(--v-soft); }
  100% { background: transparent; }
}
.sec-intro { margin: 0; font-size: 14.5px; line-height: 1.95; color: var(--ink-3); max-width: 62ch; }
.blocks { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 18px 0 2px; }
.blk {
  border: 0; border-bottom: 1px solid var(--hair); border-radius: 0;
  padding: 2px 0 4px; font-size: 13px; color: var(--ink-3); background: none;
  transition: color .18s, border-color .18s;
}
.blk:hover { border-color: var(--v); color: var(--v); }
.blk b { font-weight: 400; color: inherit; }
.blk:hover b { color: inherit; }
.blk i { font-style: normal; font: 400 11px var(--sans); color: var(--ink-4); margin-left: 6px; }

/* ============================================================
   条目 —— 全站最核心的组件
   不是卡片：一条发丝横线 + 大留白，读起来像书页
   ============================================================ */
.card {
  position: relative;
  background: none;
  border: 0; border-top: 1px solid var(--hair);
  border-radius: 0;
  padding: 28px 0 30px;
  margin: 0;
  box-shadow: none;
  content-visibility: auto; contain-intrinsic-size: auto 340px;
}
.card:hover { transform: none; border-color: var(--hair); box-shadow: none; }
.card::before {
  content: ""; position: absolute; left: -22px; top: 30px; width: 2px; height: 26px;
  background: var(--v); opacity: 0;
  transition: opacity .22s var(--ease);
}
.card.picked::before { opacity: 1; }
.card.picked .card-h .idx { color: var(--v); }
.card.flash { animation: flash 1.6s var(--ease); }
@keyframes flash {
  0%, 100% { background: transparent; }
  15% { background: var(--v-soft); }
}

/* 行 1：序号 + 标题 + 工具 */
.card-h { display: flex; align-items: flex-start; gap: 14px; }
.card-h .idx {
  flex: none; min-width: 24px; padding-top: 7px;
  font: 400 14px/1 var(--serif); letter-spacing: .02em; color: var(--ink-4);
  font-variant-numeric: tabular-nums;
  transition: color .2s var(--ease);
}
.card:hover .card-h .idx { color: var(--v); }
.card-h h3 {
  margin: 0; flex: 1; min-width: 0;
  font: 600 19.5px/1.62 var(--serif); letter-spacing: -.004em; color: var(--ink);
  overflow-wrap: anywhere;
}
.card-h .tools { flex: none; display: flex; gap: 0; margin-top: 5px; opacity: 0; transition: opacity .2s var(--ease); }
.card:hover .tools, .card:focus-within .tools { opacity: 1; }
.tool {
  width: 26px; height: 26px; border-radius: 2px; display: grid; place-items: center;
  color: var(--ink-4); transition: background .18s, color .18s;
}
.tool:hover { background: var(--paper-2); color: var(--ink); }
.tool.on { color: var(--v); opacity: 1; }
.card-h .tools .tool.on { opacity: 1; }
.tool svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; }

/* 行 2：元信息 —— 电平条 + 发丝线分隔的微型标签 */
.meta {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 0 12px; margin: 13px 0 0 36px;
  font-size: 12px; color: var(--ink-3);
}
.meter { display: inline-flex; align-items: flex-end; gap: 2.5px; height: 9px; }
.meter i {
  display: block; width: 2.5px; border-radius: 0; background: var(--hair-2);
  transition: background .2s;
}
.meter i:nth-child(1) { height: 5px; }
.meter i:nth-child(2) { height: 7px; }
.meter i:nth-child(3) { height: 9px; }
.meter[data-r="极高"] i { background: var(--v); }
.meter[data-r="高"]   i:nth-child(-n+2) { background: var(--v); }
.meter[data-r="一般"] i:nth-child(1) { background: var(--ink-4); }

.m-ratio { color: var(--ink-3); letter-spacing: .02em; }
.m-ratio[data-r="极高"] { color: var(--v); }
.meta .sep { width: 1px; height: 9px; background: var(--hair-2); }
.m-grade {
  display: inline-grid; place-items: center; width: 15px; height: 15px;
  border-radius: 0; font: 500 10px/1 var(--serif); letter-spacing: 0;
  border: 1px solid currentColor;
}
.m-grade[data-g="A"] { color: var(--jade); }
.m-grade[data-g="B"] { color: var(--brass); }
.m-grade[data-g="C"] { color: var(--ink-4); }
.m-lens { color: var(--ink-3); }
.m-cost { color: var(--ink-4); }
.tag {
  border: 1px solid currentColor; border-radius: 0; padding: 0 6px;
  font-size: 10.5px; font-weight: 400; letter-spacing: .04em; line-height: 15px;
  background: none;
}
.tag.warn   { color: var(--brass); }
.tag.danger { color: var(--v); }
.tag.who    { color: var(--slate); }
.side-h em { font-style: normal; font-size: 11px; letter-spacing: 0; color: var(--ink-4); }

/* 行 3：说人话 —— 一根朱线带出的衬线引文，是每张卡里声音最大的部分 */
.human {
  margin: 20px 0 0 36px;
  padding: 2px 0 2px 22px;
  background: none;
  border-radius: 0;
  border-left: 2px solid var(--v);
  box-shadow: none;
  font: 400 17px/1.92 var(--serif);
  color: var(--ink);
  overflow-wrap: anywhere;
}

/* 行 4：成本 / 收益 / 备注 */
.rows {
  display: grid; grid-template-columns: 40px 1fr;
  gap: 8px 16px; margin: 22px 0 0 36px;
  font-size: 15px; line-height: 1.95;
}
.rows .k {
  font: 400 11.5px/2.5 var(--sans); letter-spacing: .06em; color: var(--ink-4);
  text-align: right; margin-right: -.06em;
}
.rows .v { color: var(--ink-2); min-width: 0; overflow-wrap: anywhere; }
.rows .v.dim { color: var(--ink-3); font-size: 14px; }
.rows strong { font-weight: 600; color: var(--ink); }
.sec-block .card:last-child { border-bottom: 1px solid var(--hair); }

/* 行 5：来源 */
.src { margin: 24px 0 0 36px; border-top: 0; }
.src summary {
  list-style: none; cursor: pointer; user-select: none;
  display: flex; align-items: center; gap: 7px; padding-top: 0;
  font: 400 12px/1 var(--sans); letter-spacing: .04em; color: var(--ink-4);
  transition: color .18s;
}
.src summary:hover { color: var(--ink); }
.src summary::-webkit-details-marker { display: none; }
.src summary::before {
  content: "＋"; width: auto; height: auto; flex: none;
  border: 0; transform: none; font-size: 11px; color: currentColor;
  transition: none;
}
.src[open] summary::before { content: "－"; transform: none; }
.src .body { padding-top: 12px; font-size: 13px; line-height: 1.85; color: var(--ink-3); }
.src .body ol { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.src .body li { counter-increment: s; position: relative; padding-left: 22px; margin-bottom: 9px; overflow-wrap: anywhere; }
.src .body li::before {
  content: counter(s) "."; position: absolute; left: 0; top: 1px;
  font: 400 11px var(--sans); color: var(--ink-4);
}
.src .body a { display: block; font-size: 11.5px; color: var(--ink-4); word-break: break-all; }
.src .body a:hover { color: var(--v); }

.xref { color: var(--v); cursor: pointer; border-bottom: 1px solid color-mix(in srgb, var(--v) 35%, transparent); }
.xref:hover { border-bottom-color: var(--v); }
abbr.term { text-decoration: none; border-bottom: 1px dotted var(--ink-4); cursor: help; }
abbr.term:hover { color: var(--v); border-bottom-color: var(--v); }

/* ---------- 浮层 ---------- */
.pop {
  position: absolute; z-index: 60; background: var(--card);
  border: 1px solid var(--hair-2); border-radius: 4px;
  box-shadow: 0 2px 6px rgba(27,26,24,.05), 0 22px 44px -20px rgba(27,26,24,.28);
  padding: 14px 16px; font-size: 13px; line-height: 1.8; color: var(--ink-2); max-width: 430px;
}
.pop b { display: block; color: var(--ink); font-weight: 600; margin-bottom: 4px; }
#xref-pop .xp-h { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
#xref-pop .xp-h b { flex: 1; font-family: var(--serif); font-size: 15px; font-weight: 600; }
#xref-pop .xp-h button {
  flex: none; border: 1px solid var(--hair-2); background: none;
  border-radius: 2px; padding: 3px 10px; font-size: 12px; color: var(--ink-3);
  transition: border-color .18s, color .18s;
}
#xref-pop .xp-h button:hover { border-color: var(--ink); color: var(--ink); }
#xref-pop .xp-s { opacity: .7; font-size: 11.5px; margin-bottom: 6px; }
#xref-pop .xp-b { max-height: 210px; overflow: auto; }
#xref-pop .xp-b + .xp-b { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--hair); }

/* ---------- 遮罩弹窗 ---------- */
.mask {
  position: fixed; inset: 0; z-index: 70;
  background: color-mix(in srgb, var(--ink) 32%, transparent);
  display: flex; align-items: center; justify-content: center; padding: 26px;
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
}
.mask[hidden] { display: none; }
.modal {
  background: var(--card); border: 1px solid var(--hair-2);
  border-radius: 4px; box-shadow: 0 8px 20px rgba(27,26,24,.08), 0 50px 90px -34px rgba(27,26,24,.40);
  width: min(940px, 100%); max-height: 100%; display: flex; flex-direction: column; overflow: hidden;
}
.modal-h { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--hair); flex: none; }
.modal-h b { font: 500 15px var(--sans); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-h button, .modal-h a {
  flex: none; border: 1px solid var(--hair-2); background: none; color: var(--ink-3);
  border-radius: 2px; padding: 4px 12px; font-size: 12.5px; text-decoration: none;
  transition: border-color .18s, color .18s;
}
.modal-h button:hover, .modal-h a:hover { color: var(--ink); border-color: var(--ink); }
.modal-b { display: flex; min-height: 0; flex: 1; }
.modal-toc {
  width: 208px; flex: none; border-right: 1px solid var(--hair);
  overflow-y: auto; padding: 16px 10px 26px;
  background: var(--paper-2);
  scrollbar-width: thin;
}
.modal-toc a { display: block; padding: 5px 10px; border-radius: 2px; color: var(--ink-3); font-size: 13px; }
.modal-toc a:hover { background: var(--card); color: var(--ink); text-decoration: none; }
.modal-toc a.lv3 { padding-left: 22px; font-size: 12.5px; color: var(--ink-4); }
.modal-doc { flex: 1; min-width: 0; overflow-y: auto; padding: 30px 38px 70px; line-height: 1.95; }
.modal-doc h2 {
  font: 600 18px/1.5 var(--serif); margin: 30px 0 12px; padding-top: 10px;
  border-top: 1px solid var(--hair);
}
.modal-doc h2:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.modal-doc h3 { font: 600 15px/1.6 var(--sans); margin: 22px 0 8px; }
.modal-doc p, .modal-doc li { color: var(--ink-2); font-size: 14.5px; }
.modal-doc ul, .modal-doc ol { padding-left: 22px; }
.modal-doc strong { color: var(--ink); }
.modal-doc code { font: 12.5px var(--mono); background: var(--paper-2); padding: 2px 6px; border-radius: 2px; }
.modal-doc table { border-collapse: collapse; font-size: 13px; min-width: 100%; }
.modal-doc th, .modal-doc td { border: 1px solid var(--hair); padding: 8px 12px; text-align: left; color: var(--ink-2); }
.modal-doc th { background: var(--paper-2); color: var(--ink); font-weight: 600; }

/* ---------- 清单 ---------- */
.list-panel { padding: 16px 20px 22px; }
.list-item {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 0;
  border-bottom: 1px solid var(--hair); font-size: 13.5px;
}
.list-item b { font-weight: 400; color: var(--ink); }
.list-item span { color: var(--ink-4); font: 400 11px var(--sans); flex: none; padding-top: 3px; font-variant-numeric: tabular-nums; }
.list-item button { margin-left: auto; color: var(--ink-4); font-size: 12px; }
.list-item button:hover { color: var(--v); }
.list-actions { display: flex; gap: 9px; margin-top: 18px; flex-wrap: wrap; }
.btn {
  border: 1px solid var(--hair-2); border-radius: 2px; padding: 8px 16px;
  font-size: 13px; color: var(--ink-2); background: none;
  transition: border-color .18s var(--ease), color .18s, background .18s;
}
.btn:hover { border-color: var(--ink); color: var(--ink); transform: none; }
.btn.pri { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn.pri:hover { color: var(--paper); background: var(--ink); filter: brightness(.88); }
.empty-note { color: var(--ink-4); font-size: 13px; padding: 26px 0; text-align: center; }

/* ---------- 状态 / 空态 ---------- */
.status { color: var(--ink-4); padding: 80px 0; text-align: center; font-size: 14px; }
.status .bar { max-width: 200px; height: 1px; margin: 18px auto 0; background: var(--hair); overflow: hidden; }
.status .bar i { display: block; height: 100%; width: 0; background: var(--ink); transition: width .25s var(--ease); }
.empty {
  border: 1px solid var(--hair); border-radius: var(--r);
  padding: 56px 26px; text-align: center; color: var(--ink-3); margin-top: 30px;
}
.empty button {
  margin-top: 16px; border: 1px solid var(--hair-2); border-radius: 2px;
  padding: 7px 18px; font-size: 13px; transition: border-color .18s, color .18s;
}
.empty button:hover { border-color: var(--ink); color: var(--ink); }

/* ---------- 页脚 ---------- */
.foot {
  margin-top: 90px; padding-top: 26px; border-top: 1px solid var(--hair);
  color: var(--ink-4); font-size: 12.5px; line-height: 1.95;
}
.foot a { color: var(--ink-3); border-bottom: 1px solid var(--hair-2); }
.foot a:hover { color: var(--ink); border-bottom-color: var(--ink); text-decoration: none; }

/* 免责声明：写法务话，但要用一线朱点出来，别让人当免责小字跳过去 */
.foot-disclaim {
  margin: 16px 0 0; padding-left: 13px; border-left: 2px solid var(--v);
  color: var(--ink-3); font-size: 12px; line-height: 1.95;
}
.foot-disclaim b { margin-right: .45em; color: var(--v); font-weight: 500; letter-spacing: .12em; }

/* ---------- 每日一条 ---------- */
.daily {
  position: fixed; right: 26px; bottom: 26px; z-index: 35;
  background: var(--card); border: 1px solid var(--hair-2); border-radius: 3px;
  box-shadow: 0 10px 30px -16px rgba(27,26,24,.28);
  padding: 18px 20px; width: 312px; max-width: calc(100vw - 52px);
}
.daily .dh { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.daily .dh b { font: 400 10.5px/1 var(--sans); letter-spacing: .18em; color: var(--v); }
.daily .dh button { margin-left: auto; color: var(--ink-4); font-size: 15px; line-height: 1; }

/* ---------- 阅读进度环 · 点击回页首 ----------
   平时藏起来，滚动过首屏才浮现；环 = 已读进度，一线朱；箭头回页首 */
.totop {
  position: fixed; right: 22px; bottom: 26px; z-index: 34;
  width: 50px; height: 50px; border-radius: 50%;
  background: var(--card); box-shadow: 0 10px 30px -16px rgba(27,26,24,.28);
  opacity: 0; transform: translateY(14px) scale(.92); pointer-events: none;
  transition: opacity .28s var(--ease), transform .28s var(--ease);
}
.totop.on { opacity: 1; transform: none; pointer-events: auto; }
.totop:hover { box-shadow: 0 14px 34px -14px rgba(27,26,24,.36); }
.tt-ring { position: absolute; inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); transform: rotate(-90deg); }
.tt-track, .tt-bar { fill: none; stroke-width: 2.6; }
.tt-track { stroke: var(--hair-2); }
.tt-bar { stroke: var(--v); stroke-linecap: round; }
.tt-arr { width: 19px; height: 19px; color: var(--ink-2); fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 900px) {
  .totop { right: 16px; bottom: 20px; width: 46px; height: 46px; }
  .tt-arr { width: 17px; height: 17px; }
}
.daily h4 { margin: 0 0 8px; font: 600 16px/1.6 var(--serif); }
.daily p {
  margin: 0 0 12px; font-size: 13px; color: var(--ink-3); line-height: 1.85;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}

#shot { position: fixed; left: -99999px; top: 0; }

/* ---------- 响应式 ---------- */
@media (max-width: 1040px) {
  :root { --nav-h: 58px; }
  .nav-in { padding: 0 18px; gap: 12px; }
  .brand span { display: none; }
  .nav-r { gap: 14px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .nav-r::-webkit-scrollbar { display: none; }
  .pill { flex: none; white-space: nowrap; font-size: 12.5px; }
  .pill i { display: none; }
  .search { max-width: none; }
  .search kbd { display: none; }
  .menu-btn { display: grid; }
  .sidebar {
    transform: translateX(-100%); transition: transform .28s var(--ease);
    width: min(var(--side-w), 84vw);
    background: var(--paper);
  }
  .sidebar.open { transform: none; box-shadow: 0 20px 60px -18px rgba(27,26,24,.40); }
  .backdrop {
    display: block; position: fixed; inset: 0;
    background: color-mix(in srgb, var(--ink) 30%, transparent);
    z-index: 25; opacity: 0; pointer-events: none; transition: opacity .28s var(--ease);
  }
  .backdrop.on { opacity: 1; pointer-events: auto; }
  .main { padding-left: 0; }
  .wrap { padding: 0 22px; max-width: 100%; }
  .hero { padding-top: 30px; }
  .hero h1 { font-size: 32px; }
  .stat-row { gap: 26px; }
  .stat b { font-size: 23px; }
  .card { padding: 22px 0 24px; }
  .card::before { left: -12px; }
  .card-h { gap: 11px; }
  .card-h h3 { font-size: 17.5px; }
  .card-h .idx { padding-top: 6px; min-width: 20px; }
  .sec-h { gap: 13px; padding-top: 22px; }
  .sec-h .n { font-size: 33px; }
  .sec-h h2 { font-size: 22px; }
  .sec-h::before { width: 42px; }
  .card-h .tools { opacity: 1; }
  .meta, .human, .rows, .src { margin-left: 0; }
  .human { padding-left: 16px; font-size: 16px; }
  .rows { grid-template-columns: 1fr; gap: 2px; margin-top: 20px; }
  .rows .k { text-align: left; line-height: 1.9; padding-top: 10px; }
  .rows .k:first-child { padding-top: 0; }
  .scenes-strip { margin: 0 -22px; padding-left: 22px; padding-right: 22px; }
  .daily { right: 14px; bottom: 14px; width: min(312px, calc(100vw - 28px)); }
  @media (max-width: 820px) { .modal-toc { display: none; } .modal-doc { padding: 22px 22px 56px; } }
}

@media print {
  .nav, .sidebar, .daily, .card-h .tools, .field-wrap, .scenes-strip { display: none !important; }
  body::after { display: none; }
  .main { padding: 0; }
  .card { break-inside: avoid; border-top-color: #d5d0c8; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
