@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:wght@400;700&display=swap');

:root{
  --plum:#56228b;
  --plum-soft:#7a44b3;
  --ochre:#8b4513;
  --ink:#1f1726;
  --sand:#f8f3ea;
  --sand-2:#efe6d9;
  --line:rgba(31,23,38,.14);
  --shadow:0 16px 34px -20px rgba(31,23,38,.45);
  --shadow-soft:0 10px 26px -18px rgba(31,23,38,.4);
  --r-a:18px;
  --r-b:26px;
}

*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%;overflow-x:clip}
body{
  margin:0;
  font-size:17px;
  line-height:1.68;
  color:var(--ink);
  background-color:var(--sand);
  background-image:radial-gradient(rgba(31,23,38,.055) 1px,transparent 1.5px);
  background-size:26px 26px;
  font-family:'Atkinson Hyperlegible',system-ui,-apple-system,'Segoe UI',Roboto,'Noto Sans SC',sans-serif;
  overflow-x:hidden;
}
img,svg,video{max-width:100%;height:auto;display:block}
main,.stage,.article,.rail,.hero,.hero-copy,.hero-figure,footer{min-width:0}
p{margin:0 0 1em;overflow-wrap:break-word}
small{font-size:.88rem}
a{color:var(--plum);text-decoration-thickness:1.5px;text-underline-offset:3px;overflow-wrap:break-word}
a:focus-visible,summary:focus-visible{outline:3px solid var(--ochre);outline-offset:3px}
article[id]{scroll-margin-top:176px}

.skip{
  position:absolute;left:12px;top:-70px;z-index:80;
  background:var(--ink);color:var(--sand);
  padding:.7rem 1.1rem;border-radius:0 0 14px 14px;text-decoration:none;
  transition:top .2s ease;
}
.skip:focus{top:0}

/* ---------- 顶部：细条 / 品牌行 / 胶囊菜单 ---------- */
.top{
  position:sticky;top:0;z-index:50;
  background:rgba(248,243,234,.97);
  border-bottom:1px solid var(--line);
  backdrop-filter:blur(6px);
  min-width:0;max-width:100%;
}
.strip{
  margin:0;
  background:var(--plum);
  color:#f7ecdd;
  text-align:center;
  font-size:.95rem;
  letter-spacing:.2em;
  padding:.34rem .8rem;
  overflow-wrap:break-word;
}
.brand-row{margin:0;padding:.5rem clamp(14px,4vw,34px) .05rem}
.brand{
  display:inline-flex;align-items:center;gap:.55rem;
  min-height:40px;
  color:var(--ink);
  font-size:1.16rem;font-weight:700;letter-spacing:.01em;
  text-decoration:none;
}
.brand::before{
  content:"";width:17px;height:17px;flex:none;
  border-radius:46% 54% 40% 60% / 58% 42% 58% 42%;
  background:linear-gradient(140deg,var(--plum),var(--ochre));
}
.nav{
  display:flex;flex-wrap:wrap;align-items:center;gap:.4rem .55rem;
  padding:.25rem clamp(14px,4vw,34px) .62rem;
  min-width:0;max-width:100%;
}
.nav summary{
  list-style:none;cursor:pointer;flex:none;
  display:inline-flex;align-items:center;min-height:40px;
  padding:.32rem .9rem;
  border:1px dashed var(--ochre);border-radius:999px;
  color:var(--ochre);font-size:.95rem;
}
.nav summary::-webkit-details-marker{display:none}
.nav summary::after{content:"▾";margin-left:.45rem;font-size:.8em}
.nav[open] summary::after{content:"▴"}
.nav summary:hover{background:#fff}
.pills{
  display:flex;flex-wrap:wrap;gap:.4rem;
  list-style:none;margin:0;padding:0;
  flex:1 1 0%;min-width:0;max-width:100%;
}
.nav:not([open]) > .pills{display:none}
.pills li{flex:none}
.pills a{
  display:inline-flex;align-items:center;min-height:40px;
  padding:.38rem .92rem;
  border:1px solid var(--line);border-radius:999px;
  background:#fff;color:var(--ink);
  font-size:.95rem;text-decoration:none;white-space:nowrap;
  transition:transform .18s ease,background .18s ease,color .18s ease,border-color .18s ease;
}
.pills a:hover,.pills a:focus-visible{
  background:var(--plum);border-color:var(--plum);color:#fff;
  transform:translateY(-2px);
}

/* ---------- 首屏 ---------- */
.hero{
  position:relative;
  min-height:calc(100vh - 170px);
  display:flex;flex-direction:column;justify-content:flex-end;
  gap:clamp(18px,4vw,40px);
  padding:clamp(30px,6vw,64px) clamp(16px,5vw,56px) 0;
  text-align:right;
  background-image:radial-gradient(rgba(86,34,139,.2) 1px,transparent 1.6px);
  background-size:19px 19px;
  overflow:hidden;
}
.hero::after{
  content:"";position:absolute;z-index:0;
  width:min(52vw,520px);aspect-ratio:1;right:-12vw;top:2vh;
  border-radius:46% 54% 40% 60% / 58% 42% 58% 42%;
  background:radial-gradient(circle at 32% 30%,rgba(139,69,19,.24),rgba(86,34,139,.16) 58%,transparent 72%);
  pointer-events:none;
}
.hero-copy{position:relative;z-index:1;max-width:760px;margin-left:auto}
.kicker{
  display:block;
  color:var(--ochre);
  letter-spacing:.24em;
  font-size:.82rem;
  margin-bottom:.55rem;
}
.hero h1{
  margin:0 0 .7rem;
  font-size:clamp(2rem,6.4vw,3.5rem);
  line-height:1.12;
  letter-spacing:-.015em;
  color:var(--ink);
  overflow-wrap:break-word;
}
.lead{
  margin:0 0 1.3rem;
  font-size:1.06rem;
  color:rgba(31,23,38,.8);
  max-width:46ch;
  margin-left:auto;
}
.hero-cta{margin:0 0 .4rem}
.btn{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:46px;padding:.62rem 1.5rem;
  border-radius:999px;
  background:var(--plum);color:#fff;
  font-weight:700;text-decoration:none;
  box-shadow:var(--shadow-soft);
  transition:transform .2s ease,background .2s ease;
}
.btn:hover{background:var(--plum-soft);transform:translateY(-3px)}
.hero-figure{margin:0;position:relative;z-index:1}
.hero-figure:empty{display:none}
.hero-figure img{
  width:100%;max-height:44vh;object-fit:cover;
  border-radius:96px 26px 96px 26px;
  box-shadow:var(--shadow);
  will-change:transform;
}

/* ---------- 正文 + 侧栏 ---------- */
.stage{
  max-width:1160px;margin:0 auto;
  padding:clamp(26px,5vw,54px) clamp(16px,4vw,32px) clamp(40px,6vw,72px);
  display:grid;grid-template-columns:minmax(0,1fr) 300px;
  gap:clamp(22px,4vw,48px);
  align-items:start;
}
.article{min-width:0;overflow-wrap:break-word}
.article > *{max-width:100%}
.article > article{
  padding:1.7rem 0;
  border-top:1px solid var(--line);
}
.article > article:first-child{border-top:0;padding-top:.4rem}
.article h2{
  margin:.1em 0 .55em;
  font-size:clamp(1.36rem,3vw,1.86rem);
  line-height:1.28;
  color:var(--plum);
  letter-spacing:-.01em;
  overflow-wrap:break-word;
}
.article h3{
  margin:.2em 0 .5em;
  font-size:1.16rem;
  line-height:1.35;
  color:var(--ochre);
  overflow-wrap:break-word;
}
.article small{
  display:block;
  color:var(--ochre);
  letter-spacing:.2em;
  font-size:.8rem;
  margin-bottom:.25rem;
}
.article h2 > small,.article h3 > small{letter-spacing:.2em}
.article p{margin:0 0 1.05em;max-width:68ch}
.article ul,.article ol{padding-left:1.25rem;margin:0 0 1.1em}
.article li{margin:0 0 .45em;overflow-wrap:break-word}
.article img{
  width:100%;margin:1.2rem 0;
  box-shadow:var(--shadow);
}
.article blockquote{
  margin:1.3rem 0;padding:1rem 1.25rem;
  background:#fff;
  border-left:5px solid var(--ochre);
  border-radius:0;
  box-shadow:var(--shadow-soft);
}
.article blockquote p:last-child{margin-bottom:0}
.article figure{margin:1.3rem 0;max-width:100%}
.article figure img{margin:0}
.article figcaption{font-size:.88rem;color:rgba(31,23,38,.66);padding-top:.5rem}
.article strong{color:var(--plum)}
.article table{width:100%;border-collapse:collapse;font-size:.96rem}
.article pre{max-width:100%;overflow-x:auto}

.rail{
  position:sticky;top:176px;
  background:var(--sand-2);
  border-radius:var(--r-b);
  padding:1.1rem 1.2rem 1.35rem;
  box-shadow:var(--shadow);
  min-width:0;
}
.rail small{
  display:block;
  color:var(--ochre);
  letter-spacing:.22em;
  font-size:.78rem;
}
.rail h2{
  margin:.18rem 0 .8rem;
  font-size:1.14rem;
  line-height:1.3;
  color:var(--plum);
}
.rail-list{list-style:none;margin:0;padding:0}
.rail-list li{min-width:0}
.rail-list a{
  display:flex;align-items:center;min-height:44px;
  padding:.3rem 0;
  border-bottom:1px dashed var(--line);
  color:var(--ink);text-decoration:none;font-size:.96rem;
  transition:color .16s ease,padding-left .16s ease;
}
.rail-list a:hover{color:var(--plum);padding-left:.3rem}
.rail-list li:last-child a{border-bottom:0}

/* ---------- 页脚 ---------- */
footer{
  margin-top:2.4rem;
  background:var(--ink);
  color:#f1e7d9;
  padding:clamp(28px,5vw,54px) clamp(18px,5vw,48px) 1.8rem;
  display:grid;
  grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);
  gap:.8rem 1.4rem;
  border-radius:var(--r-b) var(--r-b) 0 0;
  overflow-wrap:break-word;
}
footer p{margin:0;font-size:.98rem;min-width:0}
.foot-cta{
  grid-column:1/-1;
  font-size:clamp(1.4rem,4vw,2.05rem);
  line-height:1.2;
  padding-bottom:.9rem;
  border-bottom:1px solid rgba(241,231,217,.22);
}
.foot-cta a{
  display:inline-flex;align-items:center;min-height:46px;
  color:#f8e9cf;text-decoration:none;
  border-bottom:3px solid var(--ochre);
}
.foot-cta a:hover{color:#fff}
.foot-brand{font-weight:700;letter-spacing:.02em}
.foot-links{display:flex;flex-wrap:wrap;gap:.3rem 1rem;min-width:0}
.foot-links a{
  display:inline-flex;align-items:center;min-height:44px;
  color:#f1e7d9;text-decoration:none;
  border-bottom:1px solid transparent;
}
.foot-links a:hover{border-bottom-color:var(--ochre)}
footer small{
  grid-column:1/-1;
  text-align:center;
  padding-top:.7rem;
  color:rgba(241,231,217,.72);
}

/* ---------- 动效 ---------- */
@media (prefers-reduced-motion: no-preference){
  .reveal{opacity:0;transform:translateY(16px);transition:opacity .55s ease,transform .55s ease}
  .reveal.in{opacity:1;transform:none}
}
@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto}
  .btn,.pills a,.rail-list a{transition:none}
}

/* ---------- 窄屏 ---------- */
@media (max-width:880px){
  article[id]{scroll-margin-top:210px}
  .stage{grid-template-columns:minmax(0,1fr);gap:26px}
  .rail{position:static;order:2;min-width:0}
  .hero{min-height:auto;padding-bottom:0}
  .hero::after{width:78vw;right:-18vw;top:1vh}
  .hero h1{font-size:clamp(1.85rem,8.4vw,2.6rem)}
  .lead{max-width:100%}
  .hero-figure img{max-height:38vh;border-radius:28px 24px 56px 24px}
  .nav{gap:.4rem}
  .pills{
    flex:1 1 100%;
    flex-wrap:nowrap;
    overflow-x:auto;
    overscroll-behavior-x:contain;
    -webkit-overflow-scrolling:touch;
    padding:0 0 .35rem;
    min-width:0;max-width:100%;
    scrollbar-width:thin;
  }
  .foot-links{gap:.2rem .8rem}
}
@media (max-width:480px){
  footer{grid-template-columns:minmax(0,1fr)}
  .foot-brand{grid-column:1/-1}
}
@media (max-width:420px){
  body{font-size:16.5px}
  .strip{letter-spacing:.1em}
  .brand{font-size:1.08rem}
  .hero{padding-top:26px}
  .article p{max-width:100%}
  .hero h1{font-size:clamp(1.7rem,8vw,2.2rem)}
  .kicker{letter-spacing:.16em}
}

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