@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap');

:root{
  --plum:#56228b;
  --plum-deep:#3a1b57;
  --clay:#8b4513;
  --leaf:#4f7b52;
  --ink:#1f1726;
  --muted:#6d6154;
  --paper:#f7f0e6;
  --paper-2:#efe3d3;
  --line:rgba(31,23,38,.13);
  --r-lg:26px;
  --r-md:18px;
  --r-sm:10px;
  --shadow:0 16px 36px -20px rgba(31,23,38,.5);
}

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

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

body{
  margin:0;
  font-family:Roboto,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",system-ui,sans-serif;
  font-size:17px;
  line-height:1.78;
  color:var(--ink);
  overflow-wrap:break-word;
  background-color:var(--paper);
  background-image:
    radial-gradient(circle at 10% 6%, rgba(86,34,139,.10), transparent 40%),
    radial-gradient(circle at 90% 18%, rgba(139,69,19,.11), transparent 44%),
    radial-gradient(circle at 50% 96%, rgba(79,123,82,.10), transparent 46%),
    repeating-linear-gradient(93deg, rgba(31,23,38,.032) 0 1px, transparent 1px 7px),
    repeating-linear-gradient(1deg, rgba(31,23,38,.026) 0 1px, transparent 1px 9px);
  background-attachment:fixed;
}

img{max-width:100%}
a{color:var(--plum)}
:focus-visible{outline:2px solid var(--clay);outline-offset:3px}

/* ---------- 顶栏 ---------- */
.masthead{
  position:sticky;
  top:0;
  z-index:40;
  display:flex;
  align-items:center;
  gap:.55rem;
  padding:.5rem clamp(.8rem,3vw,1.6rem);
  background:rgba(247,240,230,.92);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
}

.mark{
  flex:0 0 auto;
  display:grid;
  place-items:center;
  width:42px;
  height:42px;
  border-radius:16px 20px 15px 22px;
  background:var(--plum);
  color:#fff;
  text-decoration:none;
  font-weight:700;
  font-size:1.05rem;
  overflow:hidden;
}
.mark img{width:100%;height:100%;object-fit:contain}

.brand-name{
  font-weight:700;
  letter-spacing:.02em;
  white-space:nowrap;
}

.drawer{
  margin-left:auto;
  display:flex;
  align-items:center;
}

.drawer > summary{
  display:none;
  align-items:center;
  gap:.5rem;
  min-height:44px;
  padding:.3rem .8rem;
  border-radius:14px;
  border:1px solid var(--line);
  background:#fff;
  cursor:pointer;
  list-style:none;
  font-size:.96rem;
}
.drawer > summary::-webkit-details-marker{display:none}

.burger{
  display:inline-block;
  position:relative;
  width:16px;
  height:2px;
  border-radius:2px;
  background:currentColor;
}
.burger::before,.burger::after{
  content:"";
  position:absolute;
  left:0;
  width:16px;
  height:2px;
  border-radius:2px;
  background:currentColor;
}
.burger::before{top:-5px}
.burger::after{top:5px}

.drawer > menu{
  display:flex;
  flex-wrap:wrap;
  gap:.1rem;
  margin:0;
  padding:0;
  list-style:none;
}

.masthead details:not([open]) > menu{display:flex}

.drawer > menu a{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:.3rem .62rem;
  border-radius:13px;
  color:var(--ink);
  text-decoration:none;
  font-size:.95rem;
}
.drawer > menu a::before{
  content:"";
  width:7px;
  height:7px;
  margin-right:.42rem;
  border-radius:62% 38% 55% 45%;
  background:var(--clay);
  opacity:.72;
}
.drawer > menu a:hover{
  background:rgba(86,34,139,.1);
  color:var(--plum);
}

.reach{
  flex:0 0 auto;
  margin-left:.3rem;
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:.3rem .95rem;
  border-radius:999px;
  background:var(--clay);
  color:#fff;
  text-decoration:none;
  font-size:.95rem;
  box-shadow:0 8px 18px -12px rgba(139,69,19,.9);
}
.reach::before{
  content:"";
  width:8px;
  height:8px;
  margin-right:.45rem;
  border-radius:50%;
  background:#f7e5c9;
}
.reach:hover{background:#7a3b10}

/* ---------- 首屏 ---------- */
.hero{
  position:relative;
  isolation:isolate;
  overflow:hidden;
  min-height:70vh;
  display:grid;
  place-items:center;
  border-radius:0 0 var(--r-lg) var(--r-lg);
  background:linear-gradient(165deg,var(--plum),var(--plum-deep) 58%,#2a173c);
  box-shadow:var(--shadow);
  margin-bottom:1.5rem;
}
.hero-art{position:absolute;inset:0;z-index:-2}
.hero-art img{width:100%;height:100%;object-fit:cover;display:block}
.hero::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  background:linear-gradient(180deg, rgba(31,23,38,.26), rgba(31,23,38,.64));
}
.hero-copy{
  max-width:24em;
  padding:5rem 1.25rem;
  text-align:center;
}
.hero-copy h1{
  margin:0;
  color:#fff;
  font-size:clamp(1.65rem,4.6vw,2.6rem);
  line-height:1.38;
  font-weight:700;
  letter-spacing:.01em;
  text-shadow:0 3px 22px rgba(0,0,0,.42);
}

/* ---------- 主区 ---------- */
.wrap{
  max-width:1120px;
  margin:0 auto;
  padding:0 clamp(1rem,3vw,2rem) 3rem;
  display:grid;
  grid-template-columns:minmax(0,1fr) 286px;
  gap:clamp(1rem,3vw,2.3rem);
  align-items:start;
}

.col{
  min-width:0;
  padding:clamp(1.1rem,2.4vw,2rem);
  border:1px solid var(--line);
  border-radius:var(--r-lg);
  background:rgba(255,255,255,.62);
  box-shadow:var(--shadow);
}

/* ---------- 正文 ---------- */
.prose{font-size:1.02rem}

.prose > article{
  padding:2rem 0 1rem;
  border-top:1px solid var(--line);
  scroll-margin-top:96px;
}
.prose > article:first-child{
  border-top:0;
  padding-top:.2rem;
}
.prose > article:nth-child(even){
  border-radius:var(--r-md);
}

.prose h2{
  margin:.1rem 0 .85rem;
  font-size:clamp(1.28rem,2.6vw,1.62rem);
  line-height:1.42;
  color:var(--plum);
}
.prose h3{
  margin:1.5rem 0 .5rem;
  font-size:1.14rem;
  line-height:1.5;
  color:var(--clay);
}
.prose p{margin:0 0 1.05em}
.prose ul,.prose ol{pargin:0}
.prose ul,.prose ol{margin:0 0 1.05em;padding-left:1.3rem}
.prose li{margin:.32em 0}
.prose a{color:var(--plum);text-underline-offset:3px}
.prose strong{color:var(--ink)}
.prose blockquote{
  margin:1.2em 0;
  padding:.85em 1em;
  border-left:4px solid var(--clay);
  border-radius:0 var(--r-md) var(--r-md) 0;
  background:rgba(139,69,19,.07);
}
.prose blockquote p:last-child{margin-bottom:0}
.prose img{
  display:block;
  height:auto;
  margin:1.1em 0;
  border-radius:var(--r-md);
  box-shadow:var(--shadow);
}

/* ---------- 侧栏 ---------- */
.side{
  position:sticky;
  top:78px;
  padding:1.1rem 1rem 1.2rem;
  border:1px solid var(--line);
  border-radius:var(--r-md);
  background:#fffdfa;
  box-shadow:var(--shadow);
}
.side small{
  display:block;
  font-size:.95rem;
  letter-spacing:.24em;
  color:var(--clay);
  margin-bottom:.12rem;
}
.side h2{
  margin:0 0 .65rem;
  font-size:1.16rem;
  letter-spacing:.03em;
}
.side-list{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap:.1rem;
}
.side-list a{
  display:flex;
  align-items:center;
  min-height:44px;
  padding:.3rem .55rem;
  border-radius:var(--r-sm);
  border-bottom:2px solid transparent;
  color:var(--ink);
  text-decoration:none;
  font-size:.97rem;
  transition:background .2s ease,border-color .2s ease,color .2s ease;
}
.side-list a:hover{
  background:rgba(139,69,19,.08);
  border-bottom-color:var(--clay);
  color:var(--clay);
}

/* ---------- 页脚 ---------- */
.foot{
  margin-top:1rem;
  padding:1.1rem clamp(1rem,3vw,2rem);
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  justify-content:space-between;
  gap:.8rem 1rem;
  border-top:1px solid var(--line);
  background:var(--paper-2);
  border-radius:var(--r-lg) var(--r-lg) 0 0;
}
.f-brand{
  display:flex;
  align-items:center;
  gap:.55rem;
  font-weight:600;
}
.f-logo{
  display:grid;
  place-items:center;
  width:40px;
  height:40px;
  border-radius:15px 19px 14px 21px;
  background:var(--clay);
  color:#fff;
  text-decoration:none;
  font-weight:700;
}
.f-nav{
  display:flex;
  flex-wrap:wrap;
  gap:.05rem .45rem;
}
.f-nav a{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:.2rem .5rem;
  border-radius:var(--r-sm);
  color:var(--ink);
  text-decoration:none;
  font-size:.95rem;
}
.f-nav a:hover{color:var(--plum);background:rgba(86,34,139,.1)}
.f-copy p{margin:0;font-size:.95rem;color:var(--muted)}

/* ---------- 动效 ---------- */
.reveal{
  opacity:0;
  transform:translateY(15px);
  transition:opacity .62s ease,transform .62s ease;
}
.reveal.in{opacity:1;transform:none}

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

/* ---------- 断点 ---------- */
@media (max-width:960px){
  .wrap{
    grid-template-columns:minmax(0,1fr);
    padding-bottom:2.2rem;
  }
  .side{
    position:static;
    order:-1;
  }
  .side-list{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media (max-width:900px){
  .drawer > summary{display:inline-flex}
  .masthead details:not([open]) > menu{display:none}
  .drawer > menu{
    position:absolute;
    top:100%;
    left:0;
    right:0;
    flex-direction:column;
    flex-wrap:nowrap;
    gap:.1rem;
    padding:.55rem clamp(.8rem,3vw,1.6rem) .8rem;
    background:var(--paper);
    border-bottom:1px solid var(--line);
    border-radius:0 0 var(--r-md) var(--r-md);
    box-shadow:var(--shadow);
  }
  .drawer > menu a{width:100%;min-height:46px}
  .hero{min-height:62vh}
  .brand-name{font-size:1rem}
  .foot{
    flex-direction:column;
    align-items:flex-start;
  }
  .f-nav{gap:.05rem .3rem}
}

@media (max-width:430px){
  body{font-size:16.5px}
  .brand-name{display:none}
  .reach{margin-left:.2rem;padding:.3rem .8rem}
  .side-list{grid-template-columns:minmax(0,1fr)}
  .hero-copy{padding:4.2rem 1rem}
}

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