@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400&family=Nunito:ital,wght@0,700;0,800;0,900;1,700&display=swap');

:root {
  --plum: #56228b;
  --clay: #8b4513;
  --ink: #1f1726;
  --cream: #fdfaf5;
  --sand: #f4ece1;
  --mist: #f0e9f6;
  --line: rgba(31, 23, 38, .13);
  --r-lg: 24px;
  --r-md: 16px;
  --r-card: 4px;
  --head: "Nunito", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --text: "DM Sans", "PingFang SC", system-ui, -apple-system, "Microsoft YaHei", sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.78;
  color: var(--ink);
  background-color: var(--cream);
  background-image:
    radial-gradient(circle at 10% 5%, rgba(139, 69, 19, .11), transparent 36%),
    radial-gradient(circle at 92% 20%, rgba(86, 34, 139, .12), transparent 40%),
    radial-gradient(circle at 48% 98%, rgba(139, 69, 19, .09), transparent 44%);
  background-attachment: fixed;
}

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

main [id] { scroll-margin-top: 122px; }

/* 顶栏 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(253, 250, 245, .94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: background .25s ease;
}

.bar-brand { display: flex; align-items: center; padding: .5rem 1.1rem .2rem; }

.logo {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
  text-decoration: none;
  color: var(--ink);
}

.logo-img { height: 1.6rem; width: auto; border-radius: 8px; }

.logo-txt {
  font-family: var(--head);
  font-weight: 900;
  font-size: 1.18rem;
  letter-spacing: .03em;
  color: var(--plum);
  transition: color .25s ease;
}

.bar-menu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
  padding: .2rem 1.1rem .65rem;
}

.burger {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
  padding: .55rem 1.05rem;
  border: 0;
  border-radius: 999px;
  background: var(--mist);
  color: var(--ink);
  font-family: var(--head);
  font-weight: 800;
  font-size: .95rem;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}

.burger::before {
  content: "";
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  box-shadow: 0 5px 0 var(--ink), 0 -5px 0 var(--ink);
  transition: background .2s ease, box-shadow .2s ease;
}

.cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .55rem 1.2rem;
  border-radius: 999px;
  background: var(--plum);
  color: #fff;
  font-family: var(--head);
  font-weight: 800;
  font-size: .95rem;
  text-decoration: none;
  box-shadow: 0 10px 20px -12px rgba(86, 34, 139, .95);
}

/* 全屏遮罩菜单 */
.menu-panel {
  position: fixed;
  inset: 0;
  z-index: 60;
  padding: 7.5rem 1.2rem 2rem;
  overflow: auto;
  background: var(--ink);
  color: #f3edf8;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity .28s ease, transform .28s ease, visibility .28s;
}

body.menu-open .menu-panel { opacity: 1; visibility: visible; transform: none; }

body.menu-open .topbar {
  z-index: 80;
  background: var(--ink);
  border-bottom-color: rgba(255, 255, 255, .14);
}

body.menu-open .logo-txt { color: #fff; }
body.menu-open .burger { background: rgba(255, 255, 255, .14); color: #fff; }
body.menu-open .burger::before { background: #fff; box-shadow: 0 5px 0 #fff, 0 -5px 0 #fff; }

.menu-nav ol {
  counter-reset: m;
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 560px;
  display: grid;
  gap: .1rem;
}

.menu-nav li { counter-increment: m; border-bottom: 1px solid rgba(255, 255, 255, .12); }

.menu-nav a {
  display: flex;
  align-items: baseline;
  gap: .9rem;
  min-height: 54px;
  padding: .8rem .2rem;
  color: #f3edf8;
  font-family: var(--head);
  font-weight: 800;
  font-size: 1.12rem;
  text-decoration: none;
}

.menu-nav a::before {
  content: counter(m, decimal-leading-zero);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: #c1a4e2;
}

/* 头图 */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  min-height: 45vh;
  padding: 2.2rem 1.2rem 1.7rem;
  overflow: hidden;
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  background: linear-gradient(160deg, #3a1c58, var(--ink));
}

.hero-fig { position: absolute; inset: -12% 0; margin: 0; }

.hero-fig img { width: 100%; height: 100%; object-fit: cover; display: block; }

.hero-fig--blank {
  background:
    radial-gradient(circle at 74% 26%, rgba(139, 69, 19, .6), transparent 58%),
    radial-gradient(circle at 18% 82%, rgba(86, 34, 139, .75), transparent 55%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(255deg, rgba(31, 23, 38, .9), rgba(86, 34, 139, .62) 56%, rgba(139, 69, 19, .44));
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .22) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: .45;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 32rem;
  text-align: right;
  color: #fff;
}

.hero-copy small {
  display: block;
  margin-bottom: .45rem;
  font-family: var(--head);
  font-weight: 800;
  font-size: .72rem;
  letter-spacing: .24em;
  color: #e2cff5;
}

.hero h1 {
  margin: 0 0 .55rem;
  font-family: var(--head);
  font-weight: 900;
  font-size: clamp(1.7rem, 6.6vw, 2.9rem);
  line-height: 1.18;
  text-wrap: balance;
}

.hero-copy p { margin: 0; font-size: .97rem; line-height: 1.68; color: #ece4f4; }

/* 主体两栏 */
.shell {
  display: grid;
  gap: 1.6rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.7rem 1.1rem 2.6rem;
}

@media (min-width: 900px) {
  .shell {
    grid-template-columns: 258px minmax(0, 1fr);
    gap: 2.4rem;
    padding-top: 2.2rem;
    align-items: start;
  }
}

.side {
  padding: 1rem 1rem 1.1rem;
  border-radius: var(--r-card);
  background: var(--mist);
  box-shadow: 0 16px 34px -26px rgba(31, 23, 38, .85);
}

@media (min-width: 900px) {
  .side {
    position: sticky;
    top: 124px;
    max-height: calc(100vh - 150px);
    overflow: auto;
  }
}

.side small {
  display: block;
  font-family: var(--head);
  font-weight: 800;
  font-size: .7rem;
  letter-spacing: .2em;
  color: var(--clay);
}

.side h2 {
  margin: .18rem 0 .7rem;
  font-family: var(--head);
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--plum);
}

.side-list { counter-reset: s; list-style: none; margin: 0; padding: 0; }
.side-list li { counter-increment: s; }
.side-list li + li { border-top: 1px solid rgba(31, 23, 38, .09); }

.side-list a {
  display: flex;
  align-items: baseline;
  gap: .55rem;
  min-height: 44px;
  padding: .45rem .1rem;
  font-size: .95rem;
  line-height: 1.5;
  color: var(--ink);
  text-decoration: none;
}

.side-list a:hover { color: var(--plum); }

.side-list a::before {
  content: counter(s, decimal-leading-zero);
  font-family: var(--head);
  font-weight: 800;
  font-size: .76rem;
  color: var(--clay);
}

/* 正文 */
.body { min-width: 0; }

.body > section {
  padding: 1.3rem 0 1.8rem;
  border-bottom: 1px dashed rgba(31, 23, 38, .16);
}

.body > section:first-child { padding-top: .2rem; }
.body > section:last-child { border-bottom: 0; padding-bottom: .4rem; }

.body h2,
.body h3 {
  font-family: var(--head);
  font-weight: 900;
  line-height: 1.34;
  letter-spacing: .01em;
  color: var(--plum);
}

.body h2 { margin: .1rem 0 .85rem; font-size: clamp(1.28rem, 4.2vw, 1.66rem); }
.body h3 { margin: 1.4rem 0 .5rem; font-size: 1.08rem; color: #4a2064; }

.body small {
  display: block;
  font-family: var(--head);
  font-weight: 800;
  font-size: .72rem;
  letter-spacing: .2em;
  color: var(--clay);
}

.body p { margin: 0 0 1rem; }
.body ul, .body ol { margin: 0 0 1rem; padding-left: 1.25rem; }
.body li { margin: .32rem 0; }
.body a { text-underline-offset: 3px; }
.body strong { color: #3d1657; }

.body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.1rem 0;
  border-radius: var(--r-md);
}

.body figure {
  margin: 1.3rem 0;
  padding: .7rem;
  border-radius: var(--r-card);
  background: var(--sand);
}

.body figure img { margin: 0; }
.body figcaption { padding-top: .55rem; font-size: .86rem; color: #5c5067; }

.body blockquote {
  margin: 1.2rem 0;
  padding: .85rem 1rem;
  border-left: 4px solid var(--clay);
  border-radius: var(--r-card);
  background: var(--sand);
}

.body blockquote p:last-child { margin: 0; }

.body table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.body th, .body td { padding: .5rem .55rem; text-align: left; border-bottom: 1px solid var(--line); }
.body code { padding: .1em .35em; border-radius: 3px; background: var(--sand); font-size: .9em; }
.body hr { margin: 1.5rem 0; border: 0; border-top: 1px dashed var(--line); }

/* 页脚 */
.site-foot {
  margin-top: 2.2rem;
  padding: 2.2rem 1.1rem 1.1rem;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  background-color: var(--ink);
  background-image:
    radial-gradient(circle at 88% 0, rgba(139, 69, 19, .38), transparent 46%),
    radial-gradient(circle at 4% 100%, rgba(86, 34, 139, .55), transparent 52%);
  color: #ded3ea;
}

.foot-grid { display: grid; gap: 1.7rem; max-width: 1180px; margin: 0 auto; }

@media (min-width: 820px) {
  .foot-grid { grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 2rem; }
}

.site-foot a { color: #e8dff4; text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }

.foot-logo {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-family: var(--head);
  font-weight: 900;
  font-size: 1.2rem;
  color: #fff;
}

.foot-brand p { margin: .5rem 0 0; max-width: 34ch; font-size: .92rem; line-height: 1.7; color: #c4b6d6; }

.site-foot dl { margin: 0; }
.site-foot dt {
  margin-bottom: .5rem;
  font-family: var(--head);
  font-weight: 800;
  font-size: .82rem;
  letter-spacing: .18em;
  color: #fff;
}
.site-foot dd { margin: 0; }

.foot-nav a, .foot-sec dd {
  display: block;
  min-height: 40px;
  padding: .38rem 0;
  font-size: .95rem;
  line-height: 1.6;
}

.sub-form { display: flex; flex-wrap: wrap; gap: .45rem; }

.sub-form input {
  flex: 1 1 9rem;
  min-height: 44px;
  padding: 0 .8rem;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font: inherit;
  font-size: .92rem;
}

.sub-form input::placeholder { color: #b6a7c9; }

.sub-form button {
  min-height: 44px;
  padding: 0 1.05rem;
  border: 0;
  border-radius: 12px;
  background: var(--clay);
  color: #fff;
  font-family: var(--head);
  font-weight: 800;
  font-size: .9rem;
  cursor: pointer;
}

.foot-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1180px;
  margin: 1.8rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, .14);
}

.foot-base p { margin: 0; font-size: .88rem; color: #b3a5c6; }
.foot-base a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 .4rem; font-size: .9rem; color: #fff; }

/* 动效 */
@media (prefers-reduced-motion: no-preference) {
  .rise { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .55s cubic-bezier(.22, .8, .3, 1); }
  .rise.in { opacity: 1; transform: none; }
  .menu-nav a { transition: color .2s ease, padding-left .2s ease; }
  .menu-nav a:hover { color: #c8a9e8; padding-left: .45rem; }
}

@media (max-width: 520px) {
  .hero { min-height: 45vh; padding: 1.7rem 1rem 1.35rem; }
  .hero-copy { max-width: 100%; }
  .hero-copy p { font-size: .92rem; }
  .body h2 { font-size: 1.28rem; }
}

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