/* =========================================================
   一杯山楂水 · 银行合规周报
   报纸/内刊式排版：纸白底、墨黑字、细线、少量深红。
   ========================================================= */

:root {
  --bg: #fbfaf7;
  --surface: #f4f1ea;
  --tint: #f3efe6;
  --text: #171614;
  --text-soft: #3d3a34;
  --muted: #6f6a60;
  --faint: #9b958a;
  --line: #e0dbd1;
  --line-strong: #c8c1b4;
  --rule: #171614;
  --accent: #b3261e;
  --accent-soft: rgba(179, 38, 30, 0.08);
  --mark: rgba(179, 38, 30, 0.16);
  --glass: rgba(251, 250, 247, 0.92);
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.14), 0 2px 6px rgba(0, 0, 0, 0.05);
  --font-display: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC",
    "Noto Serif CJK SC", "SimSun", Georgia, serif;
  --font-serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC",
    "Noto Serif CJK SC", "SimSun", Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", sans-serif;
  --read-size: 18px;
  --read-lh: 2.05;
  --measure: 680px;
  --toc-w: 220px;
  --wrap: 1200px;
}

:root[data-theme="sepia"] {
  --bg: #f5eddc;
  --surface: #ede3cc;
  --tint: #efe4ce;
  --text: #2f2618;
  --text-soft: #443a2b;
  --muted: #7b6d57;
  --faint: #a8997f;
  --line: #ded1b4;
  --line-strong: #c9b996;
  --rule: #2f2618;
  --accent: #9c2f1c;
  --accent-soft: rgba(156, 47, 28, 0.08);
  --mark: rgba(156, 47, 28, 0.18);
  --glass: rgba(245, 237, 220, 0.92);
  --shadow: 0 18px 48px rgba(60, 40, 10, 0.14), 0 2px 6px rgba(60, 40, 10, 0.06);
}

:root[data-theme="dark"] {
  --bg: #131312;
  --surface: #1d1c1a;
  --tint: #211f1c;
  --text: #eae7e0;
  --text-soft: #c9c5bc;
  --muted: #9a948a;
  --faint: #6c6c68;
  --line: #2b2a27;
  --line-strong: #4a4741;
  --rule: #eae7e0;
  --accent: #e2675b;
  --accent-soft: rgba(226, 103, 91, 0.1);
  --mark: rgba(226, 103, 91, 0.24);
  --glass: rgba(19, 19, 18, 0.92);
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-autospace: ideograph-alpha ideograph-numeric;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

img {
  max-width: 100%;
}

svg {
  display: block;
}

::selection {
  background: var(--mark);
}

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--rule);
  padding: 8px 14px;
  text-decoration: none;
  font-size: 13px;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- 报头 ---------- */

.masthead {
  padding-top: 14px;
}

.mast-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 36px;
}

.mast-date {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.mast-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mast-link {
  font-size: 12.5px;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.06em;
}

.mast-link:hover {
  color: var(--text);
}

.mast-title {
  text-align: center;
  margin-top: 14px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 5.6vw, 70px);
  line-height: 1.08;
  letter-spacing: 0.01em;
}

.mast-title a {
  text-decoration: none;
}

.mast-sub {
  text-align: center;
  margin-top: 16px;
  color: var(--muted);
  font-size: 12.5px;
  letter-spacing: 0.24em;
}

.masthead .wrap::after {
  content: "";
  display: block;
  height: 7px;
  margin-top: 24px;
  border-top: 3px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

/* ---------- 主题切换 ---------- */

.theme-toggle {
  position: relative;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: var(--text-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.theme-toggle:hover {
  background: var(--surface);
  color: var(--text);
}

.theme-toggle svg {
  position: absolute;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.35s cubic-bezier(0.4, 0.2, 0.2, 1), opacity 0.25s ease;
}

.theme-toggle .i-moon {
  fill: currentColor;
  stroke: none;
}

.theme-toggle .i-sun {
  opacity: 0;
  transform: rotate(70deg) scale(0.6);
}

[data-theme="dark"] .theme-toggle .i-sun {
  opacity: 1;
  transform: none;
}

[data-theme="dark"] .theme-toggle .i-moon {
  opacity: 0;
  transform: rotate(-70deg) scale(0.6);
}

/* ---------- 搜索条 ---------- */

.toolbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.toolbar-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 6px;
  padding-bottom: 6px;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 220px;
}

.search-box .i-search {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.8;
  stroke-linecap: round;
  pointer-events: none;
}

#search {
  width: 100%;
  background: transparent;
  color: var(--text);
  border: 0;
  border-radius: 0;
  padding: 11px 70px 11px 28px;
  font-size: 15px;
  font-family: var(--font-sans);
  outline: none;
}

#search::placeholder {
  color: var(--faint);
}

#search::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.search-box:focus-within .i-search {
  stroke: var(--text);
}

.search-kbd {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font: 500 11px/1 var(--font-sans);
  color: var(--faint);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 3px 6px;
  pointer-events: none;
}

.search-clear {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 12.5px;
  padding: 5px 6px;
}

.search-clear:hover {
  color: var(--text);
}

.search-box.has-q .search-kbd {
  display: none;
}

.search-box:not(.has-q) .search-clear {
  display: none;
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr);
  padding: 48px 0 52px;
  border-bottom: 1px solid var(--line);
}

.hero[hidden] {
  display: none;
}

.hero-text {
  padding-right: 52px;
}

.hero-kicker {
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  margin-bottom: 20px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 3.4vw, 44px);
  font-weight: 700;
  line-height: 1.34;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

.hero-title a {
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0 1px;
  background-repeat: no-repeat;
  background-position: 0 94%;
  transition: background-size 0.4s ease;
}

.hero-title a:hover {
  background-size: 100% 1px;
}

.hero-desc {
  margin-top: 20px;
  font-family: var(--font-serif);
  font-size: 16.5px;
  line-height: 1.9;
  color: var(--text-soft);
  text-wrap: pretty;
}

.hero-meta {
  margin-top: 20px;
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 26px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 4px;
}

.hero-cta span {
  display: inline-block;
  transition: transform 0.2s ease;
}

.hero-cta:hover span {
  transform: translateX(4px);
}

.hero-quote {
  border-left: 1px solid var(--line);
  padding-left: 52px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.quote-label {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.hero-quote blockquote {
  margin-top: 18px;
  font-family: var(--font-display);
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 700;
  line-height: 1.7;
  text-wrap: pretty;
}

.quote-foot {
  margin-top: 22px;
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
}

/* ---------- 继续阅读 ---------- */

.continue {
  padding-top: 34px;
}

.continue[hidden] {
  display: none;
}

.sec-h {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 4px;
}

.sec-h h2 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.continue-link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.continue-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.6;
}

.continue-link:hover .continue-title {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.continue-progress {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ---------- 周报索引 ---------- */

.result-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 44px 0 14px;
  border-bottom: 1px solid var(--rule);
}

.result-line h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.result-line small {
  font-family: var(--font-sans);
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 400;
  margin-left: 12px;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

.row {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 32px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: background-color 0.18s ease;
}

.row:hover {
  background: var(--surface);
}

.row-date {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 4px;
  font-variant-numeric: tabular-nums;
}

.row-day {
  font-size: 13px;
  letter-spacing: 0.04em;
}

.row-year {
  font-size: 11.5px;
  color: var(--faint);
  letter-spacing: 0.12em;
}

.row-kicker {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 8px;
}

.row-title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.01em;
}

.row:hover .row-title {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

.row-desc {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.row-snippet {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-soft);
  background: var(--tint);
  border: 1px solid var(--line);
  padding: 8px 12px;
}

.row-snippet[hidden] {
  display: none;
}

.row-meta {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.03em;
}

mark {
  background: var(--mark);
  color: inherit;
  padding: 0 1px;
}

.empty {
  padding: 48px 0 12px;
  font-size: 14px;
  color: var(--muted);
}

.empty[hidden] {
  display: none;
}

.empty button {
  border: 0;
  background: none;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  margin-left: 4px;
}

/* ---------- 二维码关注区 ---------- */

.kicker {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.subscribe {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  margin: 64px 0;
  padding: 40px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.subscribe-qr img {
  display: block;
  width: 168px;
  height: 168px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
}

.subscribe-text .kicker {
  color: var(--accent);
}

.subscribe-text h2 {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.subscribe-text p {
  margin-top: 8px;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--text-soft);
}

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

.site-footer {
  margin-top: 80px;
  border-top: 1px solid var(--line);
  padding: 32px 0 48px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
}

.footer-note {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
}

.footer-links {
  font-size: 12px;
  color: var(--muted);
}

.footer-links a {
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-links span {
  margin: 0 8px;
}

/* ---------- 详情页页头 ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  height: 60px;
}

.hdr-back {
  justify-self: start;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  letter-spacing: 0.04em;
}

.hdr-back:hover {
  color: var(--text);
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 21px;
  text-decoration: none;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 4px;
}

.hdr-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 7px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--text-soft);
  font-family: var(--font-display);
  font-size: 16px;
  cursor: pointer;
}

.hdr-btn:hover {
  background: var(--surface);
  color: var(--text);
}

.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 60;
  pointer-events: none;
}

.progress i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
}

/* ---------- 阅读设置 ---------- */

.settings-panel {
  position: fixed;
  top: 70px;
  right: max(20px, calc((100vw - 1200px) / 2 + 24px));
  z-index: 70;
  width: 300px;
  padding: 20px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
}

.settings-panel[hidden] {
  display: none;
}

.settings-title {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--muted);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.settings-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.settings-group > span {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--muted);
}

.seg {
  display: flex;
  border: 1px solid var(--line);
}

.seg button {
  border: 0;
  border-left: 1px solid var(--line);
  background: none;
  color: var(--muted);
  padding: 5px 8px;
  font-size: 12px;
  cursor: pointer;
}

.seg button:first-child {
  border-left: 0;
}

.seg button:hover {
  color: var(--text);
}

.seg button.on {
  background: var(--text);
  color: var(--bg);
}

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

.article-wrap {
  display: grid;
  grid-template-columns: minmax(0, var(--measure)) var(--toc-w);
  gap: 56px;
  justify-content: center;
  max-width: 1000px;
  padding-top: 56px;
  padding-bottom: 40px;
}

.article-head {
  padding-bottom: 32px;
  border-bottom: 1px solid var(--rule);
}

.article-kicker {
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  margin-bottom: 20px;
}

.article-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

.article-meta {
  margin-top: 20px;
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
}

.article-meta span {
  margin: 0 6px;
  color: var(--faint);
}

.article-audience {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
}

/* ---------- 目录 ---------- */

.toc {
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding-bottom: 20px;
}

.toc-h {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--muted);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}

.toc a {
  display: block;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  text-decoration: none;
  padding: 5px 0;
}

.toc a.toc-h3 {
  padding-left: 14px;
  font-size: 12.5px;
}

.toc a:hover {
  color: var(--text);
}

.toc a.active {
  color: var(--text);
  font-weight: 600;
}

.toc-mobile {
  display: none;
  margin-top: 28px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.toc-mobile summary {
  padding: 12px 16px;
  font-size: 13px;
  cursor: pointer;
  list-style: none;
}

.toc-mobile summary::-webkit-details-marker {
  display: none;
}

.toc-mobile summary::after {
  content: "＋";
  float: right;
  color: var(--muted);
}

.toc-mobile[open] summary::after {
  content: "－";
}

.toc-mobile nav {
  padding: 4px 16px 14px;
  border-top: 1px solid var(--line);
}

.toc-mobile a {
  display: block;
  padding: 6px 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  text-decoration: none;
}

.toc-mobile a.toc-h3 {
  padding-left: 14px;
  font-size: 12.5px;
}

.toc-mobile a:hover {
  color: var(--text);
}

/* ---------- 正文 ---------- */

.prose {
  margin-top: 40px;
  font-family: var(--font-serif);
  font-size: var(--read-size);
  line-height: var(--read-lh);
  color: var(--text);
  text-wrap: pretty;
}

[data-font="sans"] .prose {
  font-family: var(--font-sans);
}

.prose > p {
  margin: 1.35em 0;
}

.prose > p.lead {
  font-size: calc(var(--read-size) + 1px);
  color: var(--text-soft);
}

.prose h2 {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1.5;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin: 2.2em 0 0.9em;
  padding-top: 0.8em;
  border-top: 1px solid var(--line);
  scroll-margin-top: 24px;
}

.prose h3 {
  font-family: var(--font-display);
  font-size: 18.5px;
  line-height: 1.6;
  font-weight: 700;
  margin: 1.9em 0 0.6em;
  scroll-margin-top: 24px;
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--line-strong);
}

.prose a:hover {
  text-decoration-color: var(--text);
}

.prose ul {
  margin: 1.2em 0;
  padding-left: 0;
  list-style: none;
}

.prose li {
  position: relative;
  padding-left: 1.4em;
  margin: 0.45em 0;
  font-size: 15px;
  line-height: 1.85;
  color: var(--text-soft);
  word-break: break-word;
}

.prose li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--faint);
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 48px 0;
}

.prose .callout {
  margin: 2.1em 0;
  padding: 20px 24px;
  background: var(--tint);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: calc(var(--read-size) + 0.5px);
  line-height: 1.9;
}

.prose .takeaway {
  margin: 2.4em 0;
  padding: 30px 32px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.prose .takeaway h2 {
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--accent);
}

.prose .takeaway p {
  margin: 0;
  font-family: var(--font-display);
  font-size: calc(var(--read-size) + 2px);
  font-weight: 700;
  line-height: 1.9;
}

.prose .sources li {
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--muted);
}

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--tint);
  padding: 1px 4px;
}

/* ---------- 文末 ---------- */

.subscribe-inline {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 56px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.subscribe-inline img {
  flex-shrink: 0;
  width: 132px;
  height: 132px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
}

.subscribe-inline .kicker {
  color: var(--accent);
}

.subscribe-inline h2 {
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
}

.subscribe-inline p {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-soft);
}

.pn {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}

.pn-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 0;
  text-decoration: none;
}

.pn-next {
  text-align: right;
}

.pn-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.pn-title {
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.5;
}

.pn-item:hover .pn-title {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--text-soft);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.to-top:hover {
  color: var(--text);
  border-color: var(--text);
}

.to-top[hidden] {
  display: none;
}

/* ---------- 404 ---------- */

.error-page {
  max-width: 720px;
  padding-top: 110px;
  padding-bottom: 40px;
  text-align: center;
}

.error-code {
  font-family: var(--font-display);
  font-size: 72px;
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
  letter-spacing: 0.08em;
}

.error-page h1 {
  margin-top: 24px;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
}

.error-page > p {
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
}

.btn {
  display: inline-block;
  margin-top: 32px;
  padding: 10px 22px;
  border: 1px solid var(--rule);
  font-size: 13px;
  text-decoration: none;
  letter-spacing: 0.06em;
}

.btn:hover {
  background: var(--text);
  color: var(--bg);
}

.error-subscribe {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 20px;
  margin: 56px auto 0;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: left;
}

.error-subscribe img {
  width: 120px;
  height: 120px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
}

.error-subscribe p {
  font-size: 13px;
  line-height: 1.9;
  color: var(--text-soft);
}

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

@media (max-width: 980px) {
  .article-wrap {
    grid-template-columns: minmax(0, var(--measure));
    max-width: 760px;
    padding-top: 40px;
  }

  .toc-col {
    display: none;
  }

  .toc-mobile {
    display: block;
  }
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 36px 0 40px;
  }

  .hero-text {
    padding-right: 0;
  }

  .hero-quote {
    border-left: 0;
    border-top: 1px solid var(--line);
    margin-top: 32px;
    padding: 28px 0 0;
  }
}

@media (max-width: 720px) {
  .wrap {
    padding-left: 20px;
    padding-right: 20px;
  }

  .search-kbd {
    display: none;
  }

  .mast-date {
    font-size: 10.5px;
    letter-spacing: 0.1em;
  }

  .mast-sub {
    font-size: 11.5px;
    letter-spacing: 0.16em;
  }

  .masthead .wrap::after {
    margin-top: 18px;
  }

  .toolbar-inner {
    gap: 12px;
  }

  .row {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 24px 0;
  }

  .row-date {
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
    padding-top: 0;
  }

  .row-day {
    font-size: 12px;
  }

  .row-year {
    font-size: 10.5px;
  }

  .row-title {
    font-size: 19px;
  }

  .row-desc {
    font-size: 13.5px;
  }

  .subscribe {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 24px;
    margin: 48px 0;
    padding: 32px 24px;
    text-align: center;
  }

  .article-title {
    font-size: 30px;
  }

  .article-wrap {
    padding-top: 32px;
  }

  .prose h2 {
    font-size: 23px;
  }

  .prose h3 {
    font-size: 17.5px;
  }

  .subscribe-inline {
    flex-direction: column;
    align-items: flex-start;
  }

  .pn {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .pn-next {
    text-align: left;
    border-top: 1px solid var(--line);
  }

  .header-inner {
    height: 56px;
  }

  .wordmark {
    font-size: 19px;
  }

  .settings-panel {
    left: 12px;
    right: 12px;
    width: auto;
  }

  .error-page {
    padding-top: 80px;
  }
}

@media (max-width: 480px) {
  .mast-actions {
    gap: 10px;
  }

  .mast-link {
    font-size: 11.5px;
  }

  .hero-title {
    font-size: 27px;
  }

  .hero-quote blockquote {
    font-size: 19px;
  }

  .article-title {
    font-size: 27px;
  }

  .prose .takeaway {
    padding: 22px 20px;
  }

  .prose .callout {
    padding: 16px 18px;
  }

  .subscribe-qr img {
    width: 150px;
    height: 150px;
  }

  .error-subscribe {
    flex-direction: column;
    text-align: center;
  }

  .pn-title {
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
