/* 研究页签名模块：只加主题与少量专属组件，不改主骨架。
   原则：一个 [data-theme] 只改 accent / 标题字体 / 节奏，布局仍走 style.css。 */

html[data-theme][data-accent="an"] {
  --accent: #9db8d6;
  --line-strong: rgba(157, 184, 214, .34);
  --accent-soft: rgba(157, 184, 214, .10);
}
[data-accent="an"] h2,
[data-accent="an"] .an-quote {
  font-family: "Noto Serif CJK SC", "Songti SC", Georgia, serif;
  font-weight: 500;
  letter-spacing: -.01em;
}
[data-accent="an"] .section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.9rem); line-height: 1.28; }

/* 账本：一条记录的样子 */
.an-ledger {
  margin: 0 0 1.4rem;
  border: 1px solid var(--line);
  background: var(--bg-soft);
}
.an-ledger header {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .62rem .95rem; border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: .62rem; letter-spacing: .08em;
  color: var(--dim); text-transform: uppercase;
}
.an-ledger pre {
  margin: 0; padding: .95rem; overflow-x: auto;
  font-family: var(--mono); font-size: .74rem; line-height: 1.75; color: var(--muted);
}
.an-ledger .k { color: var(--accent); }
.an-ledger .v { color: var(--text); }
.an-ledger .d { color: var(--dim); }

/* 三条「不是」 */
.an-nots { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 1.4rem; }
.an-nots div { background: var(--bg-soft); padding: 1rem 1.15rem; display: flex; gap: .9rem; align-items: baseline; }
.an-nots b { font-family: var(--mono); font-size: .62rem; letter-spacing: .08em; color: var(--dim); min-width: 4.5rem; }
.an-nots span { color: var(--muted); font-size: .88rem; line-height: 1.7; }
.an-nots strong { color: var(--text); font-weight: 500; }

/* 风险提示：整页唯一一块高对比 */
.an-warn {
  margin: 0 0 1.4rem; padding: 1.15rem 1.25rem;
  border: 1px solid rgba(243, 201, 105, .45);
  background: rgba(243, 201, 105, .07);
}
.an-warn h3 { margin: .15rem 0 .55rem; font-size: .95rem; color: var(--amber); font-weight: 500; }
.an-warn p { margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.75; }
.an-warn code { color: var(--text); }

.an-quote {
  margin: 0 0 1.4rem; padding: 1.2rem 1.3rem;
  border-left: 2px solid var(--line-strong);
  color: var(--text); font-size: 1.02rem; line-height: 1.9;
}
.an-quote footer { margin-top: .8rem; font-family: var(--mono); font-size: .62rem; color: var(--dim); letter-spacing: .06em; }

/* ── 02 框架实验：数据条 ───────────────────────────── */
html[data-theme][data-accent="lab"] { --accent: #f3c969; --line-strong: rgba(243, 201, 105, .38); }
[data-accent="lab"] h2, [data-accent="lab"] .lab-tag { font-family: var(--mono); letter-spacing: -.01em; }
.lab-compare { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 1.4rem; }
.lab-cell { background: var(--bg-soft); padding: 1.15rem 1.2rem; }
.lab-cell strong { display: block; margin: .35rem 0 .3rem; font-family: var(--mono); font-size: 1.5rem; color: var(--text); }
.lab-cell p { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.65; }
.lab-cell-good strong { color: var(--accent); }
.lab-arrow { background: var(--bg-soft); display: flex; align-items: center; padding: 0 1rem; color: var(--dim); font-family: var(--mono); }
.lab-tag { font-size: .62rem; letter-spacing: .1em; color: var(--dim); text-transform: uppercase; }
.lab-neg { border: 1px solid var(--line); background: var(--bg-soft); padding: 1.1rem 1.25rem; margin-bottom: 1.4rem; }
.lab-neg h3 { margin: 0 0 .7rem; font-size: .9rem; color: var(--text); font-weight: 500; }
.lab-neg ul { margin: 0; padding-left: 1.1rem; columns: 2; column-gap: 2rem; }
.lab-neg li { color: var(--muted); font-size: .82rem; line-height: 1.9; break-inside: avoid; }

/* ── 03 CBAP OS：终端块 ────────────────────────────── */
html[data-theme][data-accent="os"] { --accent: #7fe0a0; --line-strong: rgba(127, 224, 160, .36); }
[data-accent="os"] h2, .os-term, .os-slots { font-family: var(--mono); }
.os-term { border: 1px solid var(--line); background: #060b09; margin-bottom: 1.4rem; }
.os-term header { display: flex; gap: .4rem; padding: .55rem .8rem; border-bottom: 1px solid var(--line); }
.os-term header i { width: 8px; height: 8px; border-radius: 50%; background: #2a3a33; display: inline-block; }
.os-term pre { margin: 0; padding: .95rem; font-size: .74rem; line-height: 1.85; color: #b7c8bf; overflow-x: auto; }
.os-term .p { color: #7fe0a0; }
.os-term .c { color: #e8eef4; }
.os-term .m { color: #6f8a7c; }
.os-slots { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 1.4rem; }
.os-slot { background: var(--bg-soft); display: grid; grid-template-columns: 9rem 1fr auto; gap: 1rem; align-items: center; padding: .85rem 1.1rem; }
.os-slot b { font-size: .74rem; color: var(--accent); font-weight: 400; }
.os-slot span { font-size: .8rem; color: var(--muted); }
.os-slot em { font-size: .66rem; color: var(--dim); font-style: normal; }

/* ── 04 桌宠：六态时间轴 ───────────────────────────── */
html[data-theme][data-accent="pet"] { --accent: #f0b67f; --line-strong: rgba(240, 182, 127, .38); }
[data-accent="pet"] .card, [data-accent="pet"] .pet-states { border-radius: 10px; }
.pet-states { display: flex; flex-wrap: wrap; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 1.4rem; }
.pet-state { flex: 1 1 12rem; background: var(--bg-soft); padding: 1rem 1.1rem; transition: background .25s ease; }
.pet-state:hover { background: rgba(240, 182, 127, .1); }
.pet-state b { display: block; font-family: var(--mono); font-size: .78rem; color: var(--accent); }
.pet-state span { display: block; margin-top: .35rem; font-size: .78rem; color: var(--muted); line-height: 1.7; }
.pet-json { border: 1px solid var(--line); background: var(--bg-soft); }
.pet-json header { padding: .55rem .9rem; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: .62rem; color: var(--dim); letter-spacing: .08em; }
.pet-json pre { margin: 0; padding: .9rem; font-family: var(--mono); font-size: .74rem; line-height: 1.8; color: var(--muted); overflow-x: auto; }
.pet-json .k { color: var(--accent); }

/* ── 05 工具：before / after ───────────────────────── */
html[data-theme][data-accent="tools"] { --accent: #b8c2cf; --line-strong: rgba(184, 194, 207, .34); }
.tool-bars { border: 1px solid var(--line); background: var(--bg-soft); padding: 1.1rem 1.25rem; margin-bottom: 1.4rem; }
.tool-bar { display: grid; grid-template-columns: 8rem 1fr 4.5rem; gap: .9rem; align-items: center; margin-bottom: .7rem; }
.tool-bar:last-child { margin-bottom: 0; }
.tool-bar b { font-family: var(--mono); font-size: .72rem; color: var(--muted); font-weight: 400; }
.tool-bar i { display: block; height: 10px; background: var(--accent); opacity: .75; }
.tool-bar em { font-family: var(--mono); font-size: .72rem; color: var(--dim); font-style: normal; text-align: right; }
