/* 第3套 · zh 宣纸杂志 / 书院 */
:root {
  --paper: #f7f1e6;
  --paper-deep: #efe6d4;
  --paper-edge: #e4d8c4;
  --ink: #1a1714;
  --ink-soft: #4a433c;
  --ink-fade: #7a7268;
  --seal: #9b1d2e;
  --seal-deep: #7a1724;
  --seal-wash: rgba(155, 29, 46, 0.08);
  --line: #c4b39a;
  --rule: #9b1d2e;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
}

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse at 12% 0%, rgba(26, 23, 20, 0.035), transparent 42%),
    radial-gradient(ellipse at 88% 100%, rgba(155, 29, 46, 0.04), transparent 46%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 31px,
      rgba(155, 29, 46, 0.035) 32px
    );
  font-family: "Palatino Linotype", "Book Antiqua", "Songti SC", "STSong", "SimSun", "NSimSun", "FangSong", serif;
  line-height: 1.85;
  font-size: 17px;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--seal);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--seal-deep);
}

.paper {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
}

/* —— 眉栏 —— */
.inkbar {
  border-bottom: 1px solid var(--ink);
  background: rgba(247, 241, 230, 0.92);
}

.inkbar .paper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 10px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: 18px;
}

.brand:hover {
  color: var(--seal);
}

.brand-mark {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.inkbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
}

.inkbar nav a {
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.16em;
  font-size: 15px;
  padding: 6px 0 4px;
  border-bottom: 2px solid transparent;
}

.inkbar nav a:hover {
  color: var(--seal);
}

.inkbar nav a.active,
.inkbar nav a[aria-current="page"] {
  color: var(--seal);
  border-bottom-color: var(--seal);
}

/* —— 封面 Hero —— */
.cover {
  position: relative;
  margin: 36px auto 56px;
  padding: 48px 52px 44px;
  border: 1px solid var(--ink);
  box-shadow: inset 0 0 0 6px var(--paper), inset 0 0 0 7px var(--seal);
  background:
    linear-gradient(180deg, rgba(155, 29, 46, 0.03), transparent 28%),
    var(--paper-deep);
}

.cover-eyebrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 28px;
  font-size: 13px;
  letter-spacing: 0.28em;
  color: var(--seal);
  text-transform: none;
}

.cover-eyebrow span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.cover h1 {
  margin: 0 0 22px;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.28;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.cover-lead,
.lead {
  margin: 0 0 22px;
  color: var(--ink-soft);
  font-size: 18px;
}

.cover-lead:last-of-type {
  margin-bottom: 28px;
}

.cover-stamp {
  position: absolute;
  right: 36px;
  top: 36px;
  width: 92px;
  height: 92px;
  pointer-events: none;
  transform: rotate(-12deg);
}

/* —— 按钮 —— */
.cta,
a.cta {
  display: inline-block;
  padding: 12px 28px;
  background: var(--seal);
  color: #f7f1e6;
  text-decoration: none;
  letter-spacing: 0.18em;
  font-size: 15px;
  border: 1px solid var(--seal);
}

.cta:hover,
a.cta:hover {
  background: var(--seal-deep);
  color: #f7f1e6;
  border-color: var(--seal-deep);
}

.cta.is-loading,
a.cta.is-loading,
[data-download].is-loading {
  opacity: 0.72;
  pointer-events: none;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  align-items: center;
}

.cta-note {
  margin: 0;
  font-size: 14px;
  color: var(--ink-fade);
  letter-spacing: 0.08em;
}

/* —— 章节 —— */
.chapter {
  position: relative;
  margin: 0 auto 64px;
  padding-top: 8px;
}

.chapter-head {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ink);
}

.chapter-head h2 {
  margin: 8px 0 0;
  font-size: clamp(22px, 3vw, 28px);
  letter-spacing: 0.08em;
  line-height: 1.4;
  font-weight: 700;
}

.chap-mark {
  position: relative;
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  border: 2px solid var(--seal);
  border-radius: 50%;
  box-shadow: inset 0 0 0 5px var(--paper), inset 0 0 0 6px var(--seal);
  color: var(--seal);
}

.chap-mark::after {
  content: attr(data-zh);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  letter-spacing: 0;
  font-weight: 700;
}

.chapter p {
  margin: 0 0 16px;
  color: var(--ink);
}

.chapter h3 {
  margin: 28px 0 10px;
  font-size: 19px;
  letter-spacing: 0.12em;
  color: var(--seal);
  font-weight: 700;
}

.rule {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 28px 0;
}

/* —— 核心能力：诗节，非卡片宫格 —— */
.verse {
  margin: 0 0 8px;
  padding: 8px 0 20px;
  border-top: 1px dashed var(--line);
}

.verse:first-of-type {
  border-top: 0;
}

.verse h3 {
  margin-top: 16px;
}

.verse-kicker {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.32em;
  color: var(--seal);
}

/* —— 平台表 —— */
.scrolltbl {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0 8px;
  background: transparent;
}

.scrolltbl th,
.scrolltbl td {
  border: 1px solid var(--ink);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  font-size: 16px;
}

.scrolltbl th {
  background: var(--seal-wash);
  color: var(--ink);
  letter-spacing: 0.12em;
  font-weight: 700;
}

.scrolltbl caption {
  caption-side: top;
  text-align: left;
  margin: 0 0 10px;
  font-size: 14px;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
}

/* —— 报纸摘录 —— */
.clip {
  margin: 0 0 22px;
  padding: 18px 22px 16px 26px;
  border-left: 3px solid var(--seal);
  background: repeating-linear-gradient(
    180deg,
    transparent,
    transparent 27px,
    rgba(26, 23, 20, 0.04) 28px
  );
}

.clip p {
  margin: 0 0 10px;
}

.clip footer {
  font-size: 14px;
  color: var(--ink-fade);
  letter-spacing: 0.1em;
}

/* —— 数字印章 —— */
.seals {
  display: flex;
  flex-wrap: wrap;
  gap: 28px 36px;
  margin: 20px 0 8px;
  align-items: flex-start;
}

.seal {
  position: relative;
  width: 132px;
  min-height: 132px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--seal);
  transform: rotate(-6deg);
}

.seal svg {
  position: absolute;
  inset: 0;
  width: 132px;
  height: 132px;
}

.seal strong {
  position: relative;
  font-size: 34px;
  line-height: 1;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.seal em {
  position: relative;
  margin-top: 8px;
  font-style: normal;
  font-size: 13px;
  letter-spacing: 0.16em;
}

.seal-note {
  flex: 1 1 240px;
  min-width: 220px;
}

/* —— FAQ 始终展开 —— */
.askscroll {
  margin-top: 8px;
}

.ask {
  margin: 0 0 22px;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--line);
}

.ask:last-child {
  border-bottom: 0;
}

.ask h3 {
  margin: 0 0 8px;
  color: var(--ink);
  letter-spacing: 0.06em;
}

.ask p {
  margin: 0 0 10px;
  color: var(--ink-soft);
}

/* —— 向导步骤 —— */
.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  margin: 0 0 22px;
  padding: 4px 0 8px 72px;
  border-bottom: 1px dashed var(--line);
}

.steps li::before {
  counter-increment: step;
  content: counter(step, cjk-ideographic);
  position: absolute;
  left: 0;
  top: 8px;
  width: 48px;
  height: 48px;
  border: 1px solid var(--seal);
  border-radius: 50%;
  color: var(--seal);
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0;
  font-size: 18px;
  background: var(--paper);
}

.check {
  margin: 8px 0 0;
  padding-left: 22px;
}

.check li {
  margin: 0 0 8px;
}

/* —— 页脚 —— */
.colophon {
  margin-top: 24px;
  padding: 36px 0 48px;
  border-top: 2px solid var(--ink);
  color: var(--ink-soft);
  font-size: 14px;
  letter-spacing: 0.04em;
}

.colophon p {
  margin: 0 0 10px;
}

.colophon nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 16px;
}

.colophon nav a {
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.14em;
}

.colophon nav a:hover {
  color: var(--seal);
}

.safe-line {
  color: var(--seal);
  letter-spacing: 0.08em;
}

/* —— 讲义页眉花 —— */
.lecture-open {
  margin: 28px 0 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--seal);
  font-size: 15px;
  letter-spacing: 0.22em;
  color: var(--seal);
}

/* —— 窄屏 —— */
@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  .paper {
    width: calc(100% - 28px);
  }

  .inkbar .paper {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 14px 0;
  }

  .cover {
    padding: 28px 20px 24px;
    margin-top: 20px;
  }

  .cover-stamp {
    width: 64px;
    height: 64px;
    right: 12px;
    top: 16px;
  }

  .chapter-head {
    gap: 12px;
  }

  .steps li {
    padding-left: 62px;
  }

  .scrolltbl th,
  .scrolltbl td {
    padding: 10px 8px;
    font-size: 14px;
  }
}
