/* 洋葱资讯 — 站点样式 */

:root {
  --paper: #F3F0E9;
  --paper-2: #EBE7DD;
  --ink: #14120F;
  --ink-2: #33302A;
  --muted: #57524A;
  --faint: #6D665A;
  --rule: #C9C2B4;
  --rule-2: #DDD8CC;
  --accent: #D2431E;
  --accent-dark: #9C2F12;
  --up: #B3261E;
  --down: #0E8055;
  --base: #2B5FA8;

  --serif: "Noto Serif SC", "Songti SC", "Source Han Serif SC", "SimSun", serif;
  --sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;

  --gutter: 64px;
  --measure: 720px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }

.sans { font-family: var(--sans); }
.num { font-variant-numeric: tabular-nums; }

.tag {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--faint);
}

.wrap { padding-left: var(--gutter); padding-right: var(--gutter); }

/* ---------- 刊头 ---------- */

.masthead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding-top: 26px;
  padding-bottom: 18px;
  border-bottom: 4px solid var(--ink);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
}

.brand:hover { color: var(--ink); }

.brand-mark { display: block; flex: none; }

.brand-name {
  font-size: 38px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
}

.masthead nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.masthead nav a { color: var(--faint); }
.masthead nav a:hover,
.masthead nav a[aria-current="page"] { color: var(--accent); }

.subhead {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-top: 8px;
}

/* ---------- 首页头条 ---------- */

.lede {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  padding-top: 44px;
}

.lede-num {
  font-size: 92px;
  font-weight: 900;
  line-height: 0.82;
  letter-spacing: -0.05em;
  color: var(--accent);
}

.lede h1 {
  margin: 18px 0 26px 0;
  font-size: 72px;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.035em;
  max-width: 14em;
}

.lede h1 a { color: var(--ink); }
.lede h1 a:hover { color: var(--accent-dark); }

.lede-body {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 44px;
  align-items: start;
  border-top: 2px solid var(--ink);
  padding-top: 22px;
}

.lede-body p {
  margin: 0;
  font-size: 18px;
  line-height: 2;
  color: var(--ink-2);
}

.mark { border-bottom: 2px solid var(--accent); }

.verdict {
  border: 2px solid var(--ink);
  padding: 20px 22px;
}

.verdict-claim {
  font-size: 21px;
  line-height: 1.7;
  font-weight: 700;
}

.verdict-note {
  margin-top: 16px;
  border-top: 1px solid var(--rule);
  padding-top: 14px;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.85;
  color: var(--muted);
}

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--paper);
  background: var(--accent);
  padding: 14px 28px;
}

.btn:hover { color: var(--paper); background: var(--accent-dark); }

/* ---------- 首页列表 ---------- */

.index-head {
  margin-top: 60px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 10px;
}

.entry {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) 200px;
  gap: 40px;
  align-items: start;
  padding: 30px 0;
  border-bottom: 1px solid var(--rule);
}

.entry-num {
  font-size: 62px;
  font-weight: 900;
  line-height: 0.82;
  letter-spacing: -0.05em;
}

.entry h2 {
  margin: 0;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.entry h2 a { color: var(--ink); }
.entry h2 a:hover { color: var(--accent-dark); }

.entry-sum {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.85;
  color: var(--muted);
  margin-top: 12px;
  max-width: 34em;
}

.entry-meta { text-align: right; padding-top: 10px; line-height: 2; }
.entry-meta .cat { color: var(--accent); }

.entry.placeholder { opacity: 0.4; }

/* ---------- 页脚 ---------- */

.foot {
  margin-top: 64px;
  border-top: 4px solid var(--ink);
  padding-top: 18px;
  padding-bottom: 64px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

/* ---------- 文章页 ---------- */

.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: transparent;
  z-index: 10;
}
.progress > i { display: block; height: 3px; width: 0; background: var(--accent); }

.article-shell {
  display: grid;
  grid-template-columns: 214px minmax(0, 1fr);
  gap: 68px;
  align-items: start;
  padding-top: 48px;
}

.toc { position: sticky; top: 32px; }

.toc-title { padding-bottom: 12px; border-bottom: 2px solid var(--ink); }

.toc ol {
  list-style: none;
  margin: 14px 0 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
  font-family: var(--sans);
  counter-reset: toc;
}

.toc a {
  display: block;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted);
  padding-left: 14px;
  border-left: 2px solid transparent;
}

.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--ink); font-weight: 700; border-left-color: var(--accent); }

.article { max-width: var(--measure); counter-reset: sec; }

.article-head { border-bottom: 4px solid var(--ink); padding-bottom: 26px; }

.article h1 {
  margin: 16px 0 20px 0;
  font-size: 56px;
  line-height: 1.16;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.article-meta .sep { color: var(--rule); }

.abstract {
  border: 2px solid var(--ink);
  padding: 26px 28px;
  margin: 34px 0 46px 0;
}

.abstract p { margin: 0; font-size: 17px; line-height: 2.05; color: var(--ink-2); }

.up { color: var(--up); font-weight: 700; }
.down { color: var(--down); font-weight: 700; }

.article h2 {
  margin: 64px 0 22px 0;
  font-size: 40px;
  font-weight: 900;
  line-height: 1.28;
  letter-spacing: -0.03em;
  border-top: 2px solid var(--ink);
  padding-top: 22px;
  scroll-margin-top: 24px;
}

.article h2::before {
  counter-increment: sec;
  content: counter(sec, decimal-leading-zero);
  display: block;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 12px;
}

.article h3 {
  margin: 44px 0 16px 0;
  font-size: 23px;
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: -0.01em;
}

.article p {
  margin: 0 0 24px 0;
  font-size: 18px;
  line-height: 2.05;
  color: var(--ink-2);
}

.article strong { font-weight: 700; color: var(--ink); }

.article ul, .article ol {
  margin: 0 0 24px 0;
  padding-left: 1.4em;
  font-size: 18px;
  line-height: 2.05;
  color: var(--ink-2);
}

.article li { margin-bottom: 8px; }

.article blockquote {
  margin: 40px 0;
  padding: 4px 0 4px 26px;
  border-left: 4px solid var(--accent);
}

.article blockquote p {
  margin: 0;
  font-size: 23px;
  line-height: 1.85;
  font-weight: 700;
  color: var(--ink);
}

/* 表格 */

.table-scroll { overflow-x: auto; margin: 30px 0; }

.article table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-family: var(--sans);
}

.article th {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--faint);
  text-align: left;
  padding: 0 14px 10px 0;
  border-bottom: 2px solid var(--ink);
  vertical-align: bottom;
}

.article td {
  font-size: 14.5px;
  line-height: 1.8;
  padding: 13px 14px 13px 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}

.article th:last-child, .article td:last-child { padding-right: 0; }
.article td:first-child, .article th:first-child { white-space: nowrap; }
.article td strong { color: var(--ink); }

/* 图 */

figure { margin: 34px 0; }

figure.chart {
  border: 2px solid var(--ink);
  background: #FCFCFB;
  padding: 26px 24px 20px 24px;
}

.fig-title { font-size: 17px; font-weight: 700; margin-bottom: 4px; }

figcaption {
  font-family: var(--sans);
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--faint);
  margin-top: 12px;
}

figure.chart figcaption { margin-top: 0; margin-bottom: 18px; }

.legend {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  font-family: var(--sans);
  margin-bottom: 14px;
}

.legend span { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.legend i { display: block; width: 14px; height: 2px; }

.chart-svg { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--sans); }

/* 传导路径图 */

.flow { display: flex; flex-direction: column; gap: 0; }

.flow-lane {
  border-top: 1px solid var(--rule);
  padding: 20px 0;
}

.flow-lane:first-child { border-top: 0; padding-top: 0; }

.flow-lane-name {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  margin-bottom: 14px;
}

.flow-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.flow-row:last-child { margin-bottom: 0; }

.node {
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.5;
  padding: 8px 12px;
  border: 1px solid var(--ink);
  background: var(--paper);
}

.node.seed { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.node.out { border-width: 2px; font-weight: 700; }

.arrow { font-family: var(--sans); font-size: 13px; color: var(--faint); flex: none; }

.flow-join {
  border-top: 2px solid var(--ink);
  padding-top: 20px;
}

/* CSV 数据块 */

.data-block { margin: 30px 0; border: 1px solid var(--rule); background: #FCFCFB; }

.data-block > .tag { display: block; padding: 10px 16px; border-bottom: 1px solid var(--rule); }

.data-block pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--ink-2);
}

/* 资料来源 */

.sources { margin-top: 56px; border-top: 4px solid var(--ink); padding-top: 20px; }

.sources ol {
  list-style: none;
  margin: 14px 0 0 0;
  padding: 0;
  counter-reset: src;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sources li {
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--muted);
  counter-increment: src;
  padding-left: 26px;
  position: relative;
}

.sources li::before {
  content: counter(src);
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.disclaimer {
  margin-top: 28px;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.9;
  color: var(--faint);
  border-top: 1px solid var(--rule);
  padding-top: 16px;
}

.back {
  margin-top: 40px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

/* ---------- 响应式 ---------- */

@media (max-width: 1080px) {
  :root { --gutter: 40px; }
  .article-shell { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .toc {
    position: static;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--rule);
    padding-bottom: 24px;
  }
  .toc ol { flex-direction: row; flex-wrap: wrap; gap: 8px 18px; }
  .toc a { padding-left: 0; border-left: 0; }
  .toc a.is-active { border-left: 0; }
  .lede h1 { font-size: 58px; }
}

@media (max-width: 820px) {
  .lede-body { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .entry { grid-template-columns: 76px minmax(0, 1fr); }
  .entry-num { font-size: 46px; }
  .entry-meta { grid-column: 2; text-align: left; padding-top: 0; margin-top: 10px; }
}

@media (max-width: 640px) {
  :root { --gutter: 20px; }
  .masthead { flex-direction: column; align-items: flex-start; gap: 14px; }
  .masthead nav { gap: 18px; flex-wrap: wrap; }
  .brand-name { font-size: 30px; }
  .subhead { flex-direction: column; gap: 4px; }
  .lede { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 30px; }
  .lede-num { font-size: 60px; margin-bottom: 14px; }
  .lede h1 { font-size: 38px; letter-spacing: -0.025em; margin-top: 12px; }
  .lede-body p { font-size: 17px; }
  .article h1 { font-size: 34px; letter-spacing: -0.025em; }
  .article h2 { font-size: 27px; margin-top: 48px; }
  .article h3 { font-size: 20px; }
  .article p, .article ul, .article ol { font-size: 17px; }
  .article blockquote p { font-size: 19px; }
  .abstract { padding: 20px 18px; }
  figure.chart { padding: 18px 14px 14px 14px; }
  .foot { flex-direction: column; gap: 8px; }
}
