/* article.css —— 文章详情页排版（颜色全部走主题变量，双主题通用） */
.art-wrap { max-width: 760px; margin: 0 auto; padding: 60px 0 80px; }
.art-crumb { font-size: .85rem; color: var(--text-dim); margin-bottom: 18px; }
.art-crumb a { color: var(--text-dim); }
.art-crumb a:hover { color: var(--accent); }
.art-title { font-family: var(--font-display); font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.3; color: var(--text); margin-bottom: 14px; }
.art-meta { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center;
  color: var(--text-dim); font-size: .85rem; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.art-meta .avatar { display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-contrast);
  font-weight: 700; font-size: .8rem; }
.art-meta .tag { font-size: .72rem; padding: 2px 9px; border-radius: 999px;
  background: var(--tag-bg); color: var(--accent); border: 1px solid var(--line); }
.art-body { padding-top: 28px; }
.art-body h2 { font-family: var(--font-display); font-size: 1.35rem; color: var(--text);
  margin: 40px 0 14px; padding-left: 12px; border-left: 3px solid var(--accent); }
.art-body h3 { font-family: var(--font-display); font-size: 1.1rem; color: var(--text); margin: 28px 0 10px; }
.art-body p { color: var(--text); margin-bottom: 1.1em; line-height: 1.85; }
.art-body ul, .art-body ol { margin: 0 0 1.2em 1.3em; color: var(--text); line-height: 1.8; }
.art-body li { margin-bottom: .4em; }
.art-body strong { color: var(--accent); }
.art-body a { border-bottom: 1px solid var(--accent); }
.art-body code { font-family: var(--font-mono); font-size: .88em; background: var(--code-inline-bg);
  color: var(--accent); padding: 2px 6px; border-radius: 4px; }
.art-body pre { background: var(--code-bg); color: var(--code-text, var(--text)); padding: 16px 18px;
  border-radius: var(--radius); overflow-x: auto; margin: 0 0 1.2em; line-height: 1.6;
  font-size: .86rem; border: 1px solid var(--line); }
.art-body pre code { background: none; color: inherit; padding: 0; font-size: inherit; }
.art-body blockquote { margin: 0 0 1.2em; padding: 12px 18px; border-left: 3px solid var(--accent);
  background: var(--tag-bg); color: var(--text-dim); border-radius: 0 var(--radius) var(--radius) 0; }
.art-body blockquote strong { color: var(--accent); }
.art-nav { margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.art-nav a { color: var(--text-dim); font-size: .9rem; max-width: 42%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.art-nav a:hover { color: var(--accent); }

/* ============ 富组件（自旧文章页移植，颜色全部走主题变量） ============ */
.art-body h2, .art-body h3 { scroll-margin-top: 80px; }

/* 标题编号徽章 */
.art-body h2 .n { display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px; height: 26px; padding: 0 6px; border-radius: 8px;
  background: var(--accent); color: var(--accent-contrast); font-size: .8rem; margin-right: 4px; }
.art-body h2:has(.n) { border-left: none; padding-left: 0; }

/* 渐变文字 */
.grad-text { background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent; }

/* 目录 */
.toc { background: var(--bg-card); border: 1px solid var(--line);
  border-left: 3px solid var(--accent); border-radius: var(--radius);
  padding: 16px 18px; margin: 4px 0 26px; font-size: .88rem; }
.toc .t { font-weight: 700; color: var(--accent); margin-bottom: 10px; font-size: .8rem; letter-spacing: .5px; }
.toc ul { list-style: none; display: grid; gap: 6px; }
.toc a { color: var(--text-dim); display: flex; gap: 8px; border: none; }
.toc a:hover { color: var(--accent); }
.toc .num { font-family: var(--font-mono); color: var(--text-dim); }

/* 提示块 */
.box { border-radius: var(--radius); padding: 14px 18px; margin: 1.1em 0; font-size: .92rem;
  border-left: 4px solid var(--accent); background: var(--tag-bg); color: var(--text); }
.box .bt { font-weight: 700; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; color: var(--accent); }
.box.warn, .box.ok { border-left-color: var(--accent-2); }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 1.1em 0; }
.kpi { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-align: center; }
.kpi .v { font-size: 1.55rem; font-weight: 800; font-family: var(--font-mono); color: var(--accent); font-variant-numeric: tabular-nums; }
.kpi .l { font-size: .78rem; color: var(--text-dim); margin-top: 2px; }

/* 表格 */
.tbl { overflow-x: auto; margin: 1.1em 0; border: 1px solid var(--line); border-radius: var(--radius); }
.art-body table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 420px; }
.art-body th, .art-body td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.art-body th { background: var(--tag-bg); color: var(--text); font-weight: 600; white-space: nowrap; }
.art-body tbody tr:last-child td { border-bottom: none; }
.good { color: var(--accent-2); font-weight: 700; }
.bad { color: var(--accent); font-weight: 700; }
.P { color: var(--accent-2); font-weight: 700; } .C { color: var(--accent); }
.low { color: var(--text-dim); } .high { color: var(--accent); font-weight: 700; }

/* 数据可视化 */
.viz { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin: 1.1em 0; }
.viz h4 { font-size: .85rem; color: var(--text-dim); font-weight: 600; margin-bottom: 16px; }
.bar-row { display: grid; grid-template-columns: 110px 1fr 44px; align-items: center; gap: 12px; margin-bottom: 14px; font-size: .9rem; }
.bar-row .lab { color: var(--text-dim); }
.bar-track { height: 24px; border-radius: 8px; background: var(--tag-bg); overflow: hidden; }
.bar { height: 100%; width: 0; border-radius: 8px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 1.2s cubic-bezier(.22, .68, .35, 1); }
.bar.plain { opacity: .75; }
.bar-val { font-family: var(--font-mono); font-weight: 700; text-align: right; color: var(--text); }

/* 来源序列可视化 */
.dline { margin: 8px 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.dline .lab { width: 150px; color: var(--text-dim); font-size: .85rem; }
.seq { display: flex; gap: 5px; align-items: center; }
.seq i { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center;
  font-style: normal; font-size: .72rem; font-weight: 700; }
.seq i.c { background: var(--tag-bg); color: var(--accent); border: 1px solid var(--line); }
.seq i.p { background: var(--tag-bg); color: var(--accent-2); border: 1px solid var(--line); }
.seq .ar { color: var(--text-dim); }

/* 代码块标签与语法色 */
.art-body pre { position: relative; }
.art-body pre .lbl { position: absolute; top: 8px; right: 12px; font-size: .72rem;
  color: var(--text-dim); font-family: var(--font-mono); letter-spacing: .5px; }
.art-body pre .k { color: var(--accent); }
.art-body pre .s { color: var(--accent-2); }
.art-body pre .c { color: var(--text-dim); font-style: italic; }
.art-body pre .n { color: var(--accent-2); }
.art-body pre .f, .art-body pre .nf { color: var(--accent); }

/* 弱化文字 */
.art-body .faint { color: var(--text-dim); font-size: .85rem; }
.art-body .dim { color: var(--text-dim); }
