:root {
  --ink: #16242f;
  --ink-soft: #3d4f5c;
  --lapis: #1f4f6e;
  --lapis-deep: #14384f;
  --gold: #b08d3a;
  --gold-soft: #d6bc74;
  --paper: #eef1ee;
  --paper-2: #e3e8e4;
  --line: rgba(31, 79, 110, 0.14);
  --white: #f8faf8;
  --shadow: 0 18px 50px rgba(20, 56, 79, 0.08);
  --radius: 2px;
  --font-display: "STKaiti", "KaiTi", "华文楷体", "Songti SC", "SimSun", serif;
  --font-body: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --max: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  background: var(--paper);
  line-height: 1.75;
  font-size: 17px;
  min-height: 100vh;
  position: relative;
}
a { color: var(--lapis); text-decoration: none; transition: color .25s ease, opacity .25s ease; }
a:hover { color: var(--gold); }
img { max-width: 100%; height: auto; }
.wrap { width: min(100% - 2rem, var(--max)); margin-inline: auto; }

.ink-bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(31,79,110,.12), transparent 60%),
    radial-gradient(900px 500px at 90% 0%, rgba(176,141,58,.10), transparent 55%),
    linear-gradient(180deg, #f4f6f4 0%, #e8ece9 45%, #e3e7e4 100%);
}
.ink-bg::after {
  content: "";
  position: absolute; inset: 0;
  opacity: .35;
  background-image:
    linear-gradient(rgba(22,36,47,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22,36,47,.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, #000 35%, transparent 80%);
}

.site-header {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(10px);
  background: rgba(248,250,248,.82);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 72px; gap: 1rem;
}
.brand { display: flex; align-items: center; gap: .85rem; color: inherit; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, var(--gold-soft), transparent 45%),
    radial-gradient(circle at 70% 70%, rgba(255,255,255,.35), transparent 40%),
    linear-gradient(145deg, var(--lapis), var(--lapis-deep));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25), 0 8px 20px rgba(20,56,79,.22);
  animation: breath 5s ease-in-out infinite;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong {
  font-family: var(--font-display);
  font-size: 1.35rem; font-weight: 600; letter-spacing: .12em;
}
.brand-text em {
  font-style: normal; font-size: .72rem; color: var(--ink-soft); letter-spacing: .18em;
}
.site-nav { display: flex; gap: 1.25rem; align-items: center; }
.site-nav a {
  color: var(--ink-soft); letter-spacing: .12em; font-size: .95rem;
  position: relative; padding: .35rem 0;
}
.site-nav a.active, .site-nav a:hover { color: var(--lapis-deep); }
.site-nav a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.nav-toggle {
  display: none; width: 42px; height: 42px; border: 1px solid var(--line);
  background: transparent; border-radius: var(--radius); cursor: pointer;
}
.nav-toggle span {
  display: block; width: 18px; height: 1px; margin: 6px auto; background: var(--ink);
  transition: transform .3s ease, opacity .3s ease;
}

.hero {
  position: relative; min-height: min(88vh, 760px);
  display: grid; place-items: center; overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  position: relative; z-index: 2; text-align: center;
  padding: 5rem 0 4rem; animation: rise .9s ease both;
}
.hero-brand {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 7vw, 4.8rem);
  letter-spacing: .28em;
  color: var(--lapis-deep);
  font-weight: 600;
}
.hero-title {
  margin: 0 0 1rem;
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  font-weight: 500; letter-spacing: .36em;
  color: var(--ink-soft);
}
.hero-lead {
  max-width: 34em; margin: 0 auto 2rem;
  color: var(--ink-soft); letter-spacing: .06em;
}
.hero-actions { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }
.hero-aura {
  position: absolute; inset: 10% 5% auto; height: 70%;
  background:
    radial-gradient(ellipse at center, rgba(176,141,58,.16), transparent 55%),
    radial-gradient(ellipse at 50% 80%, rgba(31,79,110,.18), transparent 60%);
  filter: blur(8px);
  animation: drift 12s ease-in-out infinite alternate;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 1.4rem;
  border: 1px solid transparent; letter-spacing: .16em; font-size: .92rem;
}
.btn-primary {
  background: linear-gradient(135deg, var(--lapis), var(--lapis-deep));
  color: #f7faf8; box-shadow: var(--shadow);
}
.btn-primary:hover { color: #fff; filter: brightness(1.05); }
.btn-ghost {
  border-color: rgba(31,79,110,.28); color: var(--lapis-deep); background: rgba(255,255,255,.35);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

.section { padding: 4.5rem 0; }
.section-soft { background: rgba(255,255,255,.35); border-block: 1px solid var(--line); }
.section-head { text-align: center; margin-bottom: 2.5rem; }
.section-head h2 {
  margin: 0 0 .55rem; font-family: var(--font-display);
  font-size: 1.8rem; letter-spacing: .28em; font-weight: 600;
}
.section-head p { margin: 0; color: var(--ink-soft); letter-spacing: .12em; }

.cat-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
}
.cat-block {
  padding: 1.4rem 1.2rem 1.1rem;
  border-top: 1px solid var(--gold-soft);
  background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,.18));
}
.cat-block-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: .9rem; gap: 1rem;
}
.cat-block-head h3 { margin: 0; font-family: var(--font-display); letter-spacing: .2em; font-size: 1.2rem; }
.cat-block-head .more { color: var(--ink-soft); font-size: .85rem; letter-spacing: .12em; }
.title-list { list-style: none; margin: 0; padding: 0; }
.title-list li { border-bottom: 1px dashed rgba(31,79,110,.12); }
.title-list a {
  display: block; padding: .72rem 0; color: var(--ink);
  letter-spacing: .04em;
}
.title-list a:hover { padding-left: .35rem; color: var(--lapis); }
.title-list .empty, .empty-block { color: var(--ink-soft); padding: 1rem 0; }

.article-list { list-style: none; margin: 0; padding: 0; }
.article-list li + li { border-top: 1px solid var(--line); }
.article-list a {
  display: grid; gap: .35rem; padding: 1.25rem 0; color: inherit;
}
.article-list .tag {
  color: var(--gold); font-size: .78rem; letter-spacing: .18em;
}
.article-list strong {
  font-size: 1.15rem; letter-spacing: .08em; font-weight: 600;
  font-family: var(--font-display);
}
.article-list .excerpt { color: var(--ink-soft); font-size: .95rem; }
.article-list.dense a { padding: 1.05rem 0; }

.page-hero {
  padding: 3.2rem 0 2rem; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.45), transparent);
}
.page-hero h1 {
  margin: .8rem 0 0; font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem); letter-spacing: .18em; font-weight: 600;
}
.page-lead { margin: .9rem 0 0; max-width: 40em; color: var(--ink-soft); }
.breadcrumb {
  display: flex; flex-wrap: wrap; gap: .45rem; align-items: center;
  color: var(--ink-soft); font-size: .88rem; letter-spacing: .08em;
}
.breadcrumb a { color: var(--ink-soft); }
.breadcrumb a:hover { color: var(--gold); }

.article-layout { padding: 2.5rem 0 4rem; max-width: 760px; }
.sutra-body {
  font-size: 1.06rem; line-height: 2; letter-spacing: .04em;
  color: var(--ink);
}
.sutra-body p, .sutra-body div { margin: 0 0 1em; }
.sutra-body img { display: block; margin: 1.2rem auto; }

.article-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
  margin: 2.5rem 0; padding-top: 1.5rem; border-top: 1px solid var(--line);
}
.article-nav a, .article-nav span {
  display: grid; gap: .35rem; padding: 1rem;
  border: 1px solid var(--line); background: rgba(255,255,255,.4);
  color: inherit; min-height: 88px;
}
.article-nav .next { text-align: right; }
.article-nav span:first-child, .article-nav a span {
  color: var(--ink-soft); font-size: .82rem; letter-spacing: .14em;
}
.article-nav strong { font-family: var(--font-display); font-weight: 600; letter-spacing: .06em; }
.article-nav .disabled { opacity: .45; }

.related { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.related h2 {
  margin: 0 0 1rem; font-family: var(--font-display);
  letter-spacing: .2em; font-size: 1.2rem;
}

.pager {
  display: flex; justify-content: center; align-items: center; gap: 1.2rem;
  margin-top: 2rem; letter-spacing: .12em;
}
.pager a {
  border: 1px solid var(--line); padding: .55rem 1rem; color: var(--lapis-deep);
  background: rgba(255,255,255,.45);
}

.ad-slot:empty { display: none; }
.ad-slot { margin: 1rem auto 2rem; }

.quanwen-hero .quanwen-eyebrow {
  margin: .6rem 0 0; color: var(--gold); letter-spacing: .22em; font-size: .88rem;
}
.quanwen-toc {
  display: flex; flex-wrap: wrap; gap: .55rem .9rem; margin-top: 1.4rem;
}
.quanwen-toc a {
  color: var(--ink-soft); font-size: .9rem; letter-spacing: .08em;
  border-bottom: 1px solid transparent;
}
.quanwen-toc a:hover { color: var(--lapis); border-bottom-color: var(--gold-soft); }
.quanwen-page { padding: 2rem 0 4rem; max-width: 820px; }
.quanwen-block { margin: 0 0 2.6rem; }
.quanwen-block h2 {
  margin: 0 0 1rem; font-family: var(--font-display);
  font-size: 1.45rem; letter-spacing: .16em; font-weight: 600;
  padding-bottom: .55rem; border-bottom: 1px solid var(--line);
}
.quanwen-block h3 {
  margin: 1.2rem 0 .55rem; font-family: var(--font-display);
  font-size: 1.08rem; letter-spacing: .1em; font-weight: 600;
}
.quanwen-block p { margin: 0 0 1em; line-height: 1.95; letter-spacing: .03em; }
.quanwen-list { margin: 0 0 1em; padding-left: 1.2rem; }
.quanwen-list li { margin: 0 0 .55rem; line-height: 1.85; }
.quanwen-note {
  padding: .9rem 1rem; background: rgba(31,79,110,.05);
  border-left: 2px solid var(--gold-soft); color: var(--ink-soft);
}
.vow-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
}
.vow-card {
  padding: 1rem 1.05rem; border-top: 1px solid var(--gold-soft);
  background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,.15));
}
.vow-no { display: block; color: var(--gold); font-size: .78rem; letter-spacing: .14em; margin-bottom: .25rem; }
.vow-name {
  display: block; font-family: var(--font-display); letter-spacing: .12em;
  margin-bottom: .45rem; font-size: 1.05rem;
}
.vow-card p { margin: 0; color: var(--ink-soft); font-size: .95rem; line-height: 1.75; }
.quanwen-sutra {
  padding: 1.2rem 0 0; border-top: 1px dashed var(--line);
}
@media (max-width: 760px) {
  .vow-grid { grid-template-columns: 1fr; }
}

.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(20,56,79,.04), rgba(20,56,79,.09));
  padding: 2.8rem 0 2.2rem; text-align: center;
}
.footer-brand {
  margin: 0; font-family: var(--font-display);
  letter-spacing: .28em; font-size: 1.2rem; color: var(--lapis-deep);
}
.footer-wish { margin: .7rem 0; color: var(--ink-soft); letter-spacing: .14em; font-size: .92rem; }
.footer-copy { margin: 0; color: var(--ink-soft); font-size: .85rem; }
.footer-copy a { color: inherit; }

@keyframes breath {
  0%, 100% { transform: scale(1); filter: saturate(1); }
  50% { transform: scale(1.04); filter: saturate(1.15); }
}
@keyframes drift {
  from { transform: translateY(0) scale(1); opacity: .85; }
  to { transform: translateY(18px) scale(1.05); opacity: 1; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
  .cat-grid { grid-template-columns: 1fr; }
  .article-nav { grid-template-columns: 1fr; }
  .article-nav .next { text-align: left; }
}
@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 72px;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(248,250,248,.96); border-bottom: 1px solid var(--line);
    padding: .5rem 1rem 1rem;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: .85rem .2rem; border-bottom: 1px dashed var(--line); }
  .header-inner { position: relative; }
  .hero-brand { letter-spacing: .18em; }
  .hero-title { letter-spacing: .18em; }
  .hero { min-height: 72vh; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important; transition: none !important;
  }
}
