@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@300;400;500;600;700&family=Source+Sans+3:wght@300;400;500;600;700&display=swap');

:root{
  --ink:#1f1726;
  --ink-2:#2b2033;
  --purple:#56228b;
  --purple-soft:#7a3fb5;
  --brown:#8b4513;
  --paper:#f7f1e8;
  --paper-2:#efe6d9;
  --line:rgba(247,241,232,.16);
  --rail:248px;
  --grain:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.38'/%3E%3C/svg%3E");
}

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

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

body{
  margin:0;
  background:var(--ink);
  color:var(--paper);
  font-family:'Lexend','Source Sans 3','PingFang SC','Microsoft YaHei',system-ui,-apple-system,sans-serif;
  font-size:17px;
  line-height:1.75;
  letter-spacing:.01em;
  overflow-x:hidden;
}

body::before{
  content:'';
  position:fixed;
  inset:0;
  background-image:var(--grain);
  opacity:.05;
  pointer-events:none;
  z-index:0;
}

img{display:block;max-width:100%}
a{color:inherit;text-decoration:none}
h1,h2,h3{font-weight:600;letter-spacing:.02em}

hr{
  border:0;
  height:1px;
  margin:10px 0 18px;
  background:linear-gradient(90deg,rgba(86,34,139,.6),rgba(139,69,19,.28),transparent);
}

/* ---- 左侧竖排固定栏 ---- */
.rail{
  position:fixed;
  inset:0 auto 0 0;
  width:var(--rail);
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:26px 16px 34px;
  overflow-y:auto;
  border-right:1px solid var(--line);
  background:linear-gradient(168deg,#3a1a5c 0%,#271839 40%,#1f1726 70%,#33200f 100%);
  z-index:30;
}

.rail::after{
  content:'';
  position:absolute;
  inset:0;
  background-image:var(--grain);
  opacity:.09;
  pointer-events:none;
}

.brand{
  margin:0;
  font-size:1.14rem;
  line-height:1.35;
}

.brand a{
  display:inline-block;
  padding:4px 2px 8px;
  color:#fff;
}

.brand a::before{
  content:'';
  display:block;
  width:36px;
  height:36px;
  margin-bottom:12px;
  border-radius:56% 44% 48% 52%/48% 52% 46% 54%;
  background:linear-gradient(140deg,var(--purple-soft),var(--brown));
  box-shadow:0 0 0 6px rgba(122,63,181,.14);
}

.rail .rule{margin:2px 0 14px}

.rail-nav ol{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:4px;
}

.rail-nav a{
  display:flex;
  align-items:center;
  min-height:44px;
  padding:8px 14px;
  border:1px solid transparent;
  border-radius:16px 16px 16px 20px;
  font-size:.95rem;
  color:rgba(247,241,232,.82);
  transition:background .25s ease,transform .25s ease,color .25s ease,border-color .25s ease;
}

.rail-nav a:hover,
.rail-nav a:focus-visible{
  color:#fff;
  background:rgba(122,63,181,.24);
  border-color:rgba(247,241,232,.22);
  transform:translateX(3px);
  outline:none;
}

/* ---- 顶部细条 ---- */
.topbar{
  position:fixed;
  top:0;
  left:var(--rail);
  right:0;
  height:44px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:0 22px;
  font-size:.8rem;
  letter-spacing:.18em;
  color:rgba(247,241,232,.6);
  background:rgba(31,23,38,.88);
  backdrop-filter:blur(8px);
  border-bottom:1px solid var(--line);
  z-index:25;
}

.topbar::before{
  content:'';
  flex:0 0 auto;
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--brown);
  box-shadow:0 0 0 3px rgba(139,69,19,.24);
}

.topbar span{
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
}

/* ---- 主区 ---- */
main{
  position:relative;
  z-index:1;
  margin-left:var(--rail);
  padding:70px 26px 0;
}

article{
  max-width:900px;
  margin:0 auto;
}

/* ---- 首屏 ---- */
.hero{
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  min-height:100vh;
  padding:96px 24px 110px;
  overflow:hidden;
  text-align:center;
  border-radius:22px 22px 46% 46%/22px 22px 9% 9%;
  background:
    radial-gradient(120% 80% at 72% 8%,rgba(122,63,181,.5),transparent 62%),
    linear-gradient(172deg,#3a1a5c 0%,#1f1726 58%,#33200f 100%);
  scroll-margin-top:56px;
}

.hero::after{
  content:'';
  position:absolute;
  right:-14%;
  bottom:-18%;
  width:min(560px,82vw);
  aspect-ratio:1;
  border-radius:52% 48% 43% 57%/46% 55% 45% 54%;
  background:radial-gradient(circle at 35% 30%,rgba(139,69,19,.36),rgba(122,63,181,.2) 55%,transparent 74%);
  filter:blur(6px);
  pointer-events:none;
}

.hero.has-img{background-color:#241a2e}

.hero-media img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  opacity:.42;
}

.hero-copy{
  position:relative;
  z-index:2;
  max-width:640px;
}

.badge{
  display:inline-flex;
  align-items:center;
  margin:0 0 20px;
  padding:8px 18px;
  font-size:.8rem;
  letter-spacing:.16em;
  border:1px solid rgba(247,241,232,.36);
  border-radius:999px;
  background:rgba(31,23,38,.42);
  backdrop-filter:blur(6px);
}

.hero h1{
  margin:0;
  font-size:clamp(2rem,5.4vw,3.4rem);
  line-height:1.2;
  text-shadow:0 6px 30px rgba(0,0,0,.42);
}

.lede{
  max-width:34em;
  margin:18px auto 0;
  font-size:1rem;
  color:rgba(247,241,232,.84);
}

/* ---- 正文各节 ---- */
section > div:not(.hero){
  margin:22px 0;
  padding:30px 26px;
  color:var(--ink);
  background:var(--paper);
  border:1px solid rgba(86,34,139,.22);
  border-radius:18px;
  scroll-margin-top:76px;
}

section > div:not(.hero):nth-of-type(even){
  background:var(--paper-2);
  border-radius:18px 26px 18px 24px;
}

section > div:not(.hero) h2{
  margin:0 0 4px;
  font-size:1.34rem;
  line-height:1.42;
  color:var(--purple);
}

section > div:not(.hero) h3{
  margin:22px 0 6px;
  font-size:1.08rem;
  color:#4a2a12;
}

section > div:not(.hero) hr{
  background:linear-gradient(90deg,rgba(86,34,139,.5),rgba(139,69,19,.22),transparent);
}

section > div:not(.hero) p{margin:0 0 14px}
section > div:not(.hero) p:last-child{margin-bottom:0}
section > div:not(.hero) ul,
section > div:not(.hero) ol{padding-left:1.25em;margin:0 0 14px}
section > div:not(.hero) li{margin:4px 0}

section > div:not(.hero) a{
  color:var(--purple);
  text-decoration:underline;
  text-underline-offset:3px;
  text-decoration-thickness:1px;
}

section > div:not(.hero) a:hover{color:var(--brown)}

section > div:not(.hero) strong{color:#3d1c62}

section > div:not(.hero) blockquote{
  margin:16px 0;
  padding:12px 18px;
  border-left:3px solid var(--brown);
  border-radius:0 16px 16px 0;
  background:rgba(139,69,19,.09);
}

section > div:not(.hero) img{
  border-radius:18px;
  border:1px solid rgba(86,34,139,.2);
  margin:14px 0;
}

section > div:not(.hero) time{
  display:inline-block;
  padding:2px 10px;
  border-radius:999px;
  background:rgba(86,34,139,.1);
  font-size:.86rem;
}

/* ---- 页脚 ---- */
.foot{
  position:relative;
  z-index:1;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:14px 26px;
  margin-left:var(--rail);
  padding:28px 26px;
  border-top:1px solid var(--line);
  background:rgba(31,23,38,.72);
}

.f-logo{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  font-weight:600;
  letter-spacing:.05em;
}

.f-nav ol{
  display:flex;
  flex-wrap:wrap;
  gap:2px 6px;
  margin:0;
  padding:0;
  list-style:none;
}

.f-nav a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:6px 11px;
  border-radius:14px;
  font-size:.9rem;
  color:rgba(247,241,232,.78);
  transition:background .22s ease,color .22s ease;
}

.f-nav a:hover,
.f-nav a:focus-visible{
  color:#fff;
  background:rgba(122,63,181,.24);
  outline:none;
}

.f-legal{
  display:flex;
  align-items:center;
  gap:16px;
  font-size:.86rem;
  color:rgba(247,241,232,.6);
}

.totop{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:6px 13px;
  border:1px solid var(--line);
  border-radius:14px;
  transition:border-color .22s ease,color .22s ease;
}

.totop:hover{border-color:rgba(247,241,232,.4);color:#fff}

/* ---- 滚动显现 ---- */
.reveal{
  opacity:0;
  transform:translateY(16px);
  transition:opacity .6s ease,transform .6s cubic-bezier(.2,.7,.3,1);
}

.reveal.in{opacity:1;transform:none}

::selection{background:rgba(122,63,181,.5);color:#fff}

/* ---- 窄屏 ---- */
@media (max-width:900px){
  .rail{
    position:static;
    width:auto;
    padding:16px 16px 12px;
    border-right:0;
    border-bottom:1px solid var(--line);
    overflow:visible;
  }

  .brand{font-size:1.06rem}

  .brand a::before{
    width:26px;
    height:26px;
    margin-bottom:8px;
    box-shadow:0 0 0 4px rgba(122,63,181,.14);
  }

  .rail .rule{margin:0 0 10px}

  .rail-nav{overflow-x:auto;padding-bottom:4px}

  .rail-nav ol{
    flex-direction:row;
    flex-wrap:nowrap;
    gap:6px;
  }

  .rail-nav a{
    border-color:var(--line);
    white-space:nowrap;
    padding:8px 13px;
    font-size:.9rem;
  }

  .rail-nav a:hover{transform:none}

  .topbar{
    position:static;
    left:auto;
    height:auto;
    padding:10px 16px;
    font-size:.78rem;
    letter-spacing:.12em;
  }

  main{margin-left:0;padding:16px 14px 0}

  .hero{
    min-height:86vh;
    padding:70px 18px 84px;
    border-radius:18px 18px 40% 40%/18px 18px 8% 8%;
    scroll-margin-top:20px;
  }

  section > div:not(.hero){padding:24px 18px;margin:16px 0;scroll-margin-top:24px}

  .foot{margin-left:0;padding:22px 16px;justify-content:flex-start}
  .f-legal{width:100%;justify-content:space-between}
}

@media (max-width:520px){
  body{font-size:16px}
  .hero{min-height:78vh}
  .topbar{display:none}
  main{padding-top:12px}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .reveal{opacity:1;transform:none}
  *{transition-duration:.001ms!important;animation-duration:.001ms!important}
}

button[aria-expanded]{min-width:44px;min-height:44px}
