/* ============================================================================
   ai-notes · 全站样式
   定位：以阅读为主，辅以数据可视化（排行榜的评分条与对比表）
   ========================================================================== */

:root {
  --paper: #fbfbfd;
  --surface: #ffffff;
  --surface-2: #f5f6fa;
  --ink: #14161c;
  --ink-2: #33384a;
  --muted: #6b7280;
  --muted-2: #9aa1ae;
  --line: rgba(20, 22, 28, 0.09);
  --line-2: rgba(20, 22, 28, 0.16);

  --accent: #4f46e5;
  --accent-ink: #4338ca;
  --accent-soft: #eef2ff;
  --gold: #b45309;
  --gold-soft: #fef3c7;
  --green: #0f766e;
  --green-soft: #ccfbf1;
  --rose: #be123c;
  --rose-soft: #ffe4e6;

  --wrap: 1080px;
  --read: 74ch;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(20, 22, 28, 0.04), 0 12px 32px -24px rgba(20, 22, 28, 0.3);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  font-size: 16px;
  line-height: 1.78;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.3; letter-spacing: -0.02em; font-weight: 700; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { margin: 0; padding-left: 1.3em; }
[hidden] { display: none !important; }

:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.25);
  border-radius: 6px;
}

/* ---------------------------------------------------------------- 布局 */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 22px;
}

.section { padding-block: 64px; }
.section-sm { padding-block: 40px; }

/* ---------------------------------------------------------------- 页头 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 251, 253, 0.82);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 24px -22px rgba(20, 22, 28, 0.5);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 62px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  letter-spacing: -0.01em;
  flex: none;
}
.brand-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: linear-gradient(140deg, #6366f1, #4f46e5);
  color: #fff;
  font-size: 14px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  flex-wrap: wrap;
}
.nav a {
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--ink-2);
  transition: background 0.16s var(--ease), color 0.16s var(--ease);
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a.is-active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.nav a.is-hot::after {
  content: 'NEW';
  margin-left: 5px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
  background: var(--accent);
  padding: 1px 4px;
  border-radius: 4px;
  vertical-align: 2px;
}

/* ---------------------------------------------------------------- Hero */
.hero { padding-block: 56px 8px; }
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-kicker::after {
  content: '';
  width: 40px;
  height: 1px;
  background: currentColor;
  opacity: 0.35;
}
.hero h1 {
  margin-top: 18px;
  font-size: clamp(32px, 4.4vw, 52px);
  letter-spacing: -0.035em;
  line-height: 1.14;
}
.hero .lede {
  margin-top: 18px;
  font-size: clamp(15.5px, 1.4vw, 17.5px);
  color: var(--muted);
  max-width: 60ch;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}
.stat-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.stat-pill strong {
  font-size: 17px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- 卡片 */
.card {
  padding: 22px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform 0.22s var(--ease), border-color 0.22s var(--ease),
    box-shadow 0.22s var(--ease);
}
a.card:hover {
  transform: translateY(-3px);
  border-color: var(--line-2);
  box-shadow: 0 1px 2px rgba(20, 22, 28, 0.04), 0 20px 40px -28px rgba(20, 22, 28, 0.4);
}

.card-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 18px;
  margin-bottom: 14px;
}
.card h3 { font-size: 16.5px; }
.card p { margin-top: 8px; font-size: 14px; color: var(--muted); line-height: 1.68; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}
.section-head h2 { font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -0.028em; }
.section-head p { margin-top: 8px; font-size: 14.5px; color: var(--muted); max-width: 56ch; }
.section-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-ink);
  white-space: nowrap;
}
.section-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------------------------------------------------------------- 正文 */
.prose {
  max-width: var(--read);
  font-size: 16.5px;
  line-height: 1.85;
  color: var(--ink-2);
}
.prose > * + * { margin-top: 1.05em; }
.prose h2 {
  margin-top: 2.2em;
  font-size: 25px;
  color: var(--ink);
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.prose h3 { margin-top: 1.8em; font-size: 19px; color: var(--ink); }
.prose h4 { margin-top: 1.5em; font-size: 16.5px; color: var(--ink); }
.prose a { color: var(--accent-ink); border-bottom: 1px solid rgba(79, 70, 229, 0.35); }
.prose a:hover { border-bottom-color: currentColor; }
.prose strong { color: var(--ink); font-weight: 650; }
.prose li + li { margin-top: 0.42em; }
.prose blockquote {
  margin: 1.6em 0;
  padding: 2px 0 2px 18px;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 6px;
}
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }

/* ---------------------------------------------------------------- 文章头 */
.article-hero { padding-block: 46px 4px; }
.byline {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
  font-size: 13px;
  color: var(--muted-2);
}
.article-title {
  margin-top: 16px;
  font-size: clamp(28px, 3.6vw, 42px);
  letter-spacing: -0.032em;
  line-height: 1.2;
}
.article-lede {
  margin-top: 16px;
  font-size: 16.5px;
  color: var(--muted);
  max-width: 62ch;
}

/* 长文目录 */
.toc {
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  margin-block: 30px;
}
.toc-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 10px;
}
.toc ol { padding-left: 1.15em; font-size: 14.5px; }
.toc li + li { margin-top: 5px; }
.toc a { color: var(--ink-2); }
.toc a:hover { color: var(--accent-ink); }

/* ---------------------------------------------------------------- 领域块 */
.domain {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 22px;
  padding-block: 38px;
  border-top: 1px solid var(--line);
}
.domain:first-of-type { border-top: 0; }
.domain-badge {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-size: 26px;
}
.domain-no {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--muted-2);
  margin-bottom: 6px;
}
.domain h2 {
  font-size: clamp(21px, 2.4vw, 27px);
  letter-spacing: -0.028em;
}
.domain-sub {
  margin-top: 6px;
  font-size: 14.5px;
  color: var(--muted);
}
.domain-body { margin-top: 18px; }
.domain-body > * + * { margin-top: 1em; }
.domain-body h3 {
  margin-top: 1.7em;
  font-size: 15.5px;
  color: var(--accent-ink);
  letter-spacing: 0.01em;
}
.domain-body h3::before {
  content: '▍';
  margin-right: 4px;
  opacity: 0.55;
}

/* 风险块 */
.risk-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--surface-2);
  color: var(--ink-2);
  border: 1px solid var(--line);
}
.tag.is-red { background: var(--rose-soft); color: var(--rose); border-color: transparent; }
.tag.is-amber { background: var(--gold-soft); color: var(--gold); border-color: transparent; }
.tag.is-green { background: var(--green-soft); color: var(--green); border-color: transparent; }
.tag.is-indigo { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }

/* 场景例 */
.scene {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 12px;
  background: linear-gradient(160deg, #f7f8ff, #fbfbff);
  border: 1px solid rgba(79, 70, 229, 0.14);
  font-size: 14.5px;
  color: var(--ink-2);
}
.scene-label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent-ink);
  margin-bottom: 6px;
}

/* ---------------------------------------------------------------- 排行榜 */
.rank-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14.5px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.rank-table th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
  padding: 13px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.rank-table td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.rank-table tr:last-child td { border-bottom: 0; }
.rank-table tbody tr { transition: background 0.16s var(--ease); }
.rank-table tbody tr:hover { background: #fafaff; }

/* 名次做成独立徽标，不要让它被表格行拉成整条色块 */
.rank-cell { width: 66px; }
.rank-badge {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding-inline: 6px;
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted-2);
  background: var(--surface-2);
}
.rank-badge.rank-1 { background: linear-gradient(140deg, #f59e0b, #d97706); color: #fff; }
.rank-badge.rank-2 { background: linear-gradient(140deg, #94a3b8, #64748b); color: #fff; }
.rank-badge.rank-3 { background: linear-gradient(140deg, #d6a06b, #b0723a); color: #fff; }

/* 宽表在窄屏上横向滚动，不硬挤 */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
}
.table-wrap .rank-table { min-width: 0; }
@media (max-width: 760px) {
  .table-wrap .rank-table { min-width: 660px; }
}

.tool-name { font-weight: 650; color: var(--ink); font-size: 15px; }
.tool-vendor { font-size: 12px; color: var(--muted-2); margin-top: 2px; }
.tool-cat {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  background: var(--surface-2);
  color: var(--muted);
  white-space: nowrap;
}

.score-cell { min-width: 168px; }
.score-top {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 5px;
}
.score-val {
  font-size: 16px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.score-max { font-size: 11px; color: var(--muted-2); }
.bar {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}
.bar > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6366f1, #4f46e5);
}
.bar.is-green > i { background: linear-gradient(90deg, #2dd4bf, #0f766e); }
.bar.is-amber > i { background: linear-gradient(90deg, #fbbf24, #d97706); }
.bar.is-rose > i { background: linear-gradient(90deg, #fb7185, #be123c); }
.bar.is-slate > i { background: linear-gradient(90deg, #94a3b8, #475569); }

.best-for { font-size: 13.5px; color: var(--muted); line-height: 1.6; }

/* 分维度榜 */
.dim-card { display: flex; flex-direction: column; gap: 12px; }
.dim-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.dim-title { font-size: 15px; font-weight: 700; }
.dim-weight { font-size: 11.5px; color: var(--muted-2); }
.dim-list { display: flex; flex-direction: column; gap: 9px; }
.dim-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 40px;
  gap: 10px;
  align-items: center;
  font-size: 13.5px;
}
.dim-rank { color: var(--muted-2); font-family: ui-monospace, monospace; font-size: 11.5px; }
.dim-name { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dim-score { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12.5px; }

/* 方法论 */
.method {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}
.method h3 { font-size: 16px; margin-bottom: 12px; }
.method p { font-size: 14px; color: var(--muted); line-height: 1.72; }
.method p + p { margin-top: 10px; }
.weights {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.weight-pill {
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 12.5px;
  font-weight: 600;
}

/* 提示条 */
.notice {
  display: flex;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--gold-soft);
  border: 1px solid rgba(180, 83, 9, 0.18);
  font-size: 14px;
  color: #7c4a10;
  line-height: 1.7;
}
.notice strong { color: #6b3f0c; }

/* ---------------------------------------------------------------- 页脚 */
.site-footer {
  margin-top: 70px;
  padding-block: 40px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13.5px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--accent-ink); }
.footer-note { font-size: 12.5px; color: var(--muted-2); line-height: 1.7; max-width: 52ch; }

/* 下一篇 */
.pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 44px;
}
.pager a {
  display: block;
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.pager a:hover { border-color: var(--line-2); transform: translateY(-2px); }
.pager-label { font-size: 11.5px; color: var(--muted-2); letter-spacing: 0.1em; text-transform: uppercase; }
.pager-title { margin-top: 5px; font-size: 15px; font-weight: 650; }

/* ---------------------------------------------------------------- 响应式 */
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .domain { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .domain-badge { width: 46px; height: 46px; font-size: 20px; border-radius: 13px; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .pager { grid-template-columns: minmax(0, 1fr); }
  .section { padding-block: 44px; }
  .rank-table th, .rank-table td { padding: 11px 12px; }
  .rank-table { font-size: 13.5px; }
  .score-cell { min-width: 120px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  a.card:hover, .pager a:hover { transform: none; }
}

/* ---------------------------------------------------------------- 章节目录 */
.chapter-list {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.chapter {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  transition: background 0.16s var(--ease);
}
.chapter:last-child { border-bottom: 0; }
.chapter:hover { background: #fafaff; }
.chapter-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--accent-soft);
  font-size: 20px;
}
.chapter-no {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--muted-2);
}
.chapter h3 { font-size: 16.5px; margin-top: 3px; display: flex; align-items: center; gap: 8px; }
.chapter p { font-size: 13.5px; color: var(--muted); margin-top: 5px; line-height: 1.65; }
.chapter-meta { font-size: 12px; color: var(--muted-2); margin-top: 7px; }
.chapter-arrow { color: var(--muted-2); font-size: 18px; transition: transform 0.18s var(--ease), color 0.18s var(--ease); }
.chapter:hover .chapter-arrow { transform: translateX(3px); color: var(--accent-ink); }

/* ---------------------------------------------------------------- 迷你榜 */
.mini-rank {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.mini-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 150px 46px;
  gap: 16px;
  align-items: center;
  padding: 15px 22px;
  border-bottom: 1px solid var(--line);
  transition: background 0.16s var(--ease);
}
.mini-row:last-child { border-bottom: 0; }
.mini-row:hover { background: #fafaff; }
.mini-no {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  color: var(--muted-2);
}
.mini-row:nth-child(1) .mini-no,
.mini-row:nth-child(2) .mini-no,
.mini-row:nth-child(3) .mini-no { color: var(--accent-ink); font-weight: 700; }
.mini-name { font-size: 15px; font-weight: 650; color: var(--ink); }
.mini-sub { font-size: 12px; color: var(--muted-2); margin-top: 2px; }
.mini-score { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }

@media (max-width: 640px) {
  .chapter { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; padding: 16px; }
  .chapter-icon { width: 40px; height: 40px; font-size: 17px; border-radius: 11px; }
  .mini-row { grid-template-columns: 28px minmax(0, 1fr) 44px; gap: 10px; padding: 13px 16px; }
  .mini-row .bar { display: none; }
}

/* 翻页卡：标签与标题必须分两行 */
.pager-label { display: block; }
.pager-title { display: block; }
/* ---------------------------------------------------------------- 移动端导航
   6 个栏目在窄屏放不下，改成「品牌一行 + 可横向滑动的导航条」，
   比汉堡菜单更省一次点击，也不会出现换行错位 */
@media (max-width: 720px) {
  .header-inner {
    flex-wrap: wrap;
    align-items: center;
    height: auto;
    padding-block: 10px;
    gap: 4px;
  }
  .brand { width: 100%; }
  .nav {
    width: 100%;
    margin-left: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding-bottom: 2px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent);
    mask-image: linear-gradient(90deg, #000 92%, transparent);
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a {
    white-space: nowrap;
    font-size: 13.5px;
    padding: 6px 11px;
  }
  .nav a.is-hot::after { font-size: 8px; }
}
/* ============================================================================
   液态玻璃层
   云雾渐变画布 + 磨砂玻璃面板。玻璃要有"折射"，底层必须有颜色变化。
   ========================================================================== */

:root {
  --glass-bg: linear-gradient(155deg, rgba(255, 255, 255, 0.88), rgba(233, 239, 255, 0.6));
  --glass-bg-soft: linear-gradient(155deg, rgba(255, 255, 255, 0.8), rgba(236, 242, 255, 0.48));
  --glass-border: rgba(255, 255, 255, 0.96);
  --glass-inner: inset 0 1px 0 rgba(255, 255, 255, 0.96), inset 0 -1px 0 rgba(255, 255, 255, 0.4);
  --glass-shadow: 0 30px 66px -40px rgba(30, 41, 90, 0.5), 0 8px 22px -16px rgba(30, 41, 90, 0.18), 0 0 0 1px rgba(99, 102, 241, 0.05);
  --glass-blur: blur(24px) saturate(185%);
  --glass-blur-soft: blur(18px) saturate(165%);
}

/* ---------------------------------------------------------------- 画布 */
body {
  background: #eef1fb;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  width: auto;
  height: auto;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(46% 38% at 6% 0%, rgba(99, 102, 241, 0.6), transparent 62%),
    radial-gradient(40% 40% at 94% -4%, rgba(139, 92, 246, 0.54), transparent 64%),
    radial-gradient(48% 40% at 82% 52%, rgba(56, 189, 248, 0.36), transparent 66%),
    radial-gradient(42% 38% at 8% 76%, rgba(244, 114, 182, 0.3), transparent 68%),
    linear-gradient(180deg, #e8ecff 0%, #f5f7ff 38%, #e9efff 100%);
}

/* 阅读区保持通透：正文段落直接落在画布上，只有容器才是玻璃 */
.site-header {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.3));
  -webkit-backdrop-filter: blur(26px) saturate(190%);
  backdrop-filter: blur(26px) saturate(190%);
  border-bottom-color: transparent;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.6);
}
.site-header.is-scrolled {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.58));
  border-bottom-color: rgba(255, 255, 255, 0.8);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.7), 0 12px 30px -26px rgba(30, 41, 90, 0.5);
}

.site-footer {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.66));
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-top-color: rgba(255, 255, 255, 0.85);
}

/* ---------------------------------------------------------------- 玻璃容器 */
.card,
.chapter-list,
.mini-rank,
.rank-table,
.toc,
.method,
.pager a,
.stat-pill,
.card-icon,
.domain-badge {
  background: var(--glass-bg);
  border-color: var(--glass-border);
  -webkit-backdrop-filter: var(--glass-blur-soft);
  backdrop-filter: var(--glass-blur-soft);
  box-shadow: var(--glass-inner), var(--glass-shadow);
}

/* 表格与章节列表用更强的玻璃，因为面积大、需要更实的底 */
.rank-table,
.chapter-list,
.mini-rank {
  background: var(--glass-bg);
}

a.card:hover,
.pager a:hover {
  background: var(--glass-bg);
  box-shadow: var(--glass-inner), 0 38px 74px -40px rgba(30, 41, 90, 0.5);
}

/* 表头与条纹也要半透明，否则像糊了白纸 */
.rank-table th {
  background: rgba(255, 255, 255, 0.42);
  border-bottom-color: rgba(255, 255, 255, 0.7);
}
.rank-table td { border-bottom-color: rgba(20, 22, 28, 0.07); }
.rank-table tbody tr:hover { background: rgba(255, 255, 255, 0.45); }

.rank-badge { background: rgba(255, 255, 255, 0.6); }

/* ---------------------------------------------------------------- 正文分块 */
.domain {
  margin-block: 16px;
  padding: 30px 32px;
  border-radius: 22px;
  border-top: 0;
  background: var(--glass-bg-soft);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: var(--glass-blur-soft);
  backdrop-filter: var(--glass-blur-soft);
  box-shadow: var(--glass-inner), var(--glass-shadow);
}
.domain:first-of-type { border-top: 1px solid var(--glass-border); }

.domain-badge {
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.5));
}

/* 场景引用块：淡紫玻璃 */
.scene {
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.72), rgba(238, 242, 255, 0.5));
  border-color: rgba(99, 102, 241, 0.2);
  -webkit-backdrop-filter: var(--glass-blur-soft);
  backdrop-filter: var(--glass-blur-soft);
  box-shadow: var(--glass-inner);
}

/* 提示条：保留琥珀色语义，但做成半透明磨砂 */
.notice {
  background: linear-gradient(155deg, rgba(254, 243, 199, 0.9), rgba(253, 230, 138, 0.55));
  -webkit-backdrop-filter: var(--glass-blur-soft);
  backdrop-filter: var(--glass-blur-soft);
  box-shadow: var(--glass-inner), 0 20px 44px -34px rgba(180, 83, 9, 0.35);
}

/* 标签、药丸、权重徽标 */
.tag {
  background: rgba(255, 255, 255, 0.62);
  border-color: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.tag.is-indigo { background: rgba(224, 231, 255, 0.85); border-color: transparent; }
.tag.is-red { background: rgba(255, 228, 230, 0.9); border-color: transparent; }
.tag.is-amber { background: rgba(254, 243, 199, 0.9); border-color: transparent; }
.tag.is-green { background: rgba(204, 251, 241, 0.9); border-color: transparent; }

.weight-pill {
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

/* 进度条底槽也半透明 */
.bar { background: rgba(255, 255, 255, 0.5); }

/* 正文里的分隔线 */
.prose h2 { border-top-color: rgba(20, 22, 28, 0.08); }

@media (max-width: 640px) {
  .domain { padding: 22px 18px; border-radius: 18px; }
}
/* ============================================================================
   图表与流程图
   ========================================================================== */

.chart-figure {
  margin: 0;
  padding: 24px;
  border-radius: 18px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: var(--glass-blur-soft);
  backdrop-filter: var(--glass-blur-soft);
  box-shadow: var(--glass-inner), var(--glass-shadow);
}
.chart-figure--inline {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 26px;
  align-items: center;
}

.chart-svg { display: block; width: 100%; height: auto; }

.chart-label { font-size: 13px; font-weight: 600; fill: #33384a; }
.chart-value {
  font-size: 13px;
  font-weight: 750;
  fill: #14161c;
  font-variant-numeric: tabular-nums;
}
.chart-note { font-size: 11px; fill: #9aa1ae; }
.chart-axis-label { font-size: 12px; font-weight: 600; fill: #6b7280; }

.chart-caption {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(20, 22, 28, 0.07);
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.65;
}

.chart-legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 8px;
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--muted);
}
.legend-item i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex: none;
}

.donut-total {
  font-size: 30px;
  font-weight: 800;
  fill: var(--ink);
  font-variant-numeric: tabular-nums;
}
.donut-sub { font-size: 11px; fill: var(--muted-2); }
.donut-legend { display: flex; flex-direction: column; gap: 9px; }
.donut-legend .legend-item { width: 100%; font-size: 13px; color: var(--ink-2); }
.donut-legend .legend-item b {
  margin-left: auto;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- 流程图 */
.flow {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
}
.flow-step {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 0;
  min-width: 0;
}
.flow-node {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 14px;
  border-radius: 13px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.86), rgba(238, 243, 255, 0.6));
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: var(--glass-inner);
}
.flow-icon { font-size: 17px; line-height: 1; }
.flow-title { font-size: 13.5px; font-weight: 700; }
.flow-desc { font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.flow-arrow {
  flex: none;
  color: var(--accent);
  font-size: 15px;
  font-weight: 700;
  opacity: 0.7;
}
.flow--compact .flow-node { padding: 11px 12px; }

@media (max-width: 860px) {
  .chart-figure--inline { grid-template-columns: minmax(0, 1fr); }
  .donut-legend { flex-direction: row; flex-wrap: wrap; gap: 10px 18px; }
  .donut-legend .legend-item { width: auto; }
}

@media (max-width: 640px) {
  .chart-figure { padding: 16px; border-radius: 14px; }
  .flow { flex-direction: column; align-items: stretch; gap: 4px; }
  .flow-step { flex-direction: column; align-items: stretch; gap: 4px; }
  .flow-arrow { text-align: center; transform: rotate(90deg); }
}