@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400;500;600;700&family=Comic+Neue:wght@300;400;700&display=swap');

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

:root {
  --purple: #56228b;
  --ochre: #8b4513;
  --ink: #1f1726;
  --text: #efe7f6;
  --dim: #c8bad6;
  --accent: #e3a86a;
  --line: rgba(239, 231, 246, .14);
  --rail: 232px;
  --r-card: 10px;
  --font: "Baloo 2", "Comic Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background:
    radial-gradient(58% 38% at 6% 0%, rgba(86, 34, 139, .58), transparent 72%),
    radial-gradient(48% 38% at 96% 22%, rgba(139, 69, 19, .38), transparent 72%),
    radial-gradient(52% 44% at 18% 92%, rgba(86, 34, 139, .3), transparent 74%),
    var(--ink);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(circle at 22% 18%, rgba(227, 168, 106, .07), transparent 42%),
    radial-gradient(circle at 78% 74%, rgba(86, 34, 139, .12), transparent 46%);
}

img { max-width: 100%; }
figure { margin: 0; }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 90;
  padding: 12px 18px;
  background: var(--ochre);
  color: #fff;
  text-decoration: none;
  border-radius: 0 0 14px 0;
}
.skip:focus { left: 0; top: 0; }

/* ---------- 左侧竖排导航 ---------- */

.rail {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  width: var(--rail);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 14px 22px;
  background: linear-gradient(175deg, rgba(86, 34, 139, .62), rgba(31, 23, 38, .95) 62%);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(6px);
}

.mark {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(145deg, var(--purple), var(--ochre));
  border-radius: 54% 46% 52% 48% / 48% 54% 46% 52%;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .35);
  text-decoration: none;
}
.mark-img { width: 100%; height: 100%; object-fit: cover; }
.mark-glyph {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.rail-nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}

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

.rail-nav li {
  opacity: 0;
  transform: translateX(-10px);
  animation: slidein .5s cubic-bezier(.2, .8, .3, 1) forwards;
}
.rail-nav li:nth-child(1) { animation-delay: .06s; }
.rail-nav li:nth-child(2) { animation-delay: .12s; }
.rail-nav li:nth-child(3) { animation-delay: .18s; }
.rail-nav li:nth-child(4) { animation-delay: .24s; }
.rail-nav li:nth-child(5) { animation-delay: .3s; }
.rail-nav li:nth-child(6) { animation-delay: .36s; }
.rail-nav li:nth-child(7) { animation-delay: .42s; }

@keyframes slidein {
  to { opacity: 1; transform: none; }
}

.rail-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  font-size: 1rem;
  line-height: 1.3;
  color: #f0e7f7;
  text-decoration: none;
  border-radius: 16px 8px 16px 8px;
  transition: background .25s ease, color .25s ease;
}
.rail-nav a::before {
  content: "";
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 60% 40% 55% 45%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 69, 19, .35);
  transition: transform .25s ease, background .25s ease;
}
.rail-nav a:hover,
.rail-nav a:focus-visible {
  background: rgba(139, 69, 19, .38);
  color: #fff;
}
.rail-nav a:hover::before { transform: scale(1.35) rotate(20deg); }

.cta {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 14px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  text-align: center;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--ochre), var(--purple));
  box-shadow: 0 10px 24px rgba(86, 34, 139, .45);
  transition: transform .2s ease, box-shadow .2s ease;
}
.cta:hover, .cta:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(139, 69, 19, .5);
}

/* ---------- 主体网格 ---------- */

main {
  position: relative;
  z-index: 1;
  margin-left: var(--rail);
  max-width: 1180px;
  padding: 22px clamp(16px, 3vw, 34px) 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 262px;
  gap: 22px;
  align-items: start;
}

main > div { grid-column: 1; }

main > .hero {
  grid-column: 1 / -1;
  border: 0;
  background: none;
  padding: 0;
}

main > div {
  position: relative;
  padding: 22px 22px 26px;
  background: rgba(239, 231, 246, .045);
  border: 1px solid rgba(239, 231, 246, .09);
  border-bottom: 3px solid rgba(139, 69, 19, .92);
  border-radius: var(--r-card);
  scroll-margin-top: 18px;
}

main > div:nth-of-type(even) {
  border-bottom-color: rgba(86, 34, 139, .95);
}

main > div h2 {
  margin: 2px 0 12px;
  font-size: 1.45rem;
  line-height: 1.35;
  color: #faf5fd;
}

main > div h3 {
  margin: 18px 0 8px;
  font-size: 1.15rem;
  line-height: 1.4;
  color: #f6eefb;
}

main > div p {
  margin: 0 0 12px;
  color: #e4d9ec;
}

main > div ul,
main > div ol {
  margin: 0 0 14px;
  padding-left: 1.25em;
  color: #e4d9ec;
}
main > div li { margin-bottom: 6px; }

main > div a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

main > div strong { color: #fff; }

main > div small {
  display: block;
  margin-bottom: 4px;
  font-size: .84rem;
  font-weight: 600;
  letter-spacing: .14em;
  color: var(--accent);
}

/* ---------- 首屏 ---------- */

.hero {
  position: relative;
  overflow: hidden;
  min-height: 45vh;
  border-radius: 26px 12px 26px 12px;
  background: linear-gradient(140deg, rgba(86, 34, 139, .6), rgba(139, 69, 19, .45));
  box-shadow: 0 20px 46px rgba(0, 0, 0, .38);
}

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

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

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(102deg, rgba(31, 23, 38, .95) 0%, rgba(31, 23, 38, .72) 46%, rgba(31, 23, 38, .22) 100%);
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 54px;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg, var(--ochre), var(--purple));
  clip-path: polygon(0 46%, 100% 0, 100% 100%, 0 100%);
  opacity: .92;
}

.hero-txt {
  position: relative;
  z-index: 2;
  max-width: 620px;
  padding: 30px 26px 78px;
}

.hero-txt small {
  display: block;
  margin-bottom: 8px;
  font-size: .84rem;
  font-weight: 600;
  letter-spacing: .16em;
  color: var(--accent);
}

.hero-txt h1 {
  margin: 0 0 12px;
  font-size: clamp(1.85rem, 4.6vw, 2.9rem);
  line-height: 1.2;
  letter-spacing: .5px;
  color: #fff;
  text-shadow: 0 6px 22px rgba(0, 0, 0, .45);
}

.lede {
  margin: 0;
  max-width: 46ch;
  font-size: 1.05rem;
  color: #ecdfef;
}

/* ---------- 侧栏 ---------- */

.side {
  grid-column: 2;
  grid-row: 2;
  position: sticky;
  top: 20px;
  align-self: start;
  padding: 18px 16px 20px;
  background: rgba(86, 34, 139, .3);
  border: 1px solid var(--line);
  border-radius: 22px 10px 22px 10px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .3);
}

.side small {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .16em;
  color: var(--accent);
}

.side h2 {
  margin: 2px 0 10px;
  font-size: 1.12rem;
  color: #f8f1fc;
}

.side-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.side-list li + li { border-top: 1px dashed rgba(239, 231, 246, .16); }

.side-list a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 4px;
  font-size: .96rem;
  color: #ece3f5;
  text-decoration: none;
  transition: color .2s ease, padding-left .2s ease;
}
.side-list a:hover,
.side-list a:focus-visible {
  color: var(--accent);
  padding-left: 8px;
}

/* ---------- 页脚 ---------- */

footer {
  position: relative;
  z-index: 1;
  margin-left: var(--rail);
  padding: 20px clamp(14px, 3vw, 34px) 34px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 26px;
  text-align: center;
  font-size: .86rem;
  color: var(--dim);
  border-top: 1px solid var(--line);
  background: rgba(31, 23, 38, .55);
}

footer dl {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
}

footer dt {
  color: var(--accent);
  font-weight: 600;
}

footer dd {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
  justify-content: center;
  margin: 0;
}

footer dd a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 2px;
  color: #e6dbf1;
  text-decoration: none;
  transition: color .2s ease;
}
footer dd a:hover,
footer dd a:focus-visible { color: var(--accent); }

.copy {
  flex: 0 0 100%;
  margin: 2px 0 0;
  font-size: .8rem;
  opacity: .78;
}

/* ---------- 滚动显现 ---------- */

.js-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .65s ease, transform .65s cubic-bezier(.2, .8, .3, 1);
}
.js-reveal.in {
  opacity: 1;
  transform: none;
}

:where(a, button):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- 断点 ---------- */

@media (max-width: 980px) {
  main { grid-template-columns: minmax(0, 1fr); }
  .side {
    grid-column: 1;
    grid-row: auto;
    position: static;
  }
}

@media (max-width: 900px) {
  .rail {
    top: auto;
    bottom: 0;
    right: 0;
    width: auto;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-right: 0;
    border-top: 1px solid var(--line);
    background: rgba(31, 23, 38, .97);
  }

  .mark { width: 44px; height: 44px; }

  .rail-nav {
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0;
  }

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

  .rail-nav li { animation: none; opacity: 1; transform: none; }

  .rail-nav a {
    white-space: nowrap;
    min-height: 44px;
    padding: 8px 10px;
    font-size: .95rem;
    border-radius: 14px;
  }

  .cta {
    flex: 0 0 auto;
    margin: 0;
    min-height: 44px;
    padding: 10px 14px;
    font-size: .9rem;
    white-space: nowrap;
  }

  main {
    margin-left: 0;
    display: block;
    padding: 14px 14px 112px;
  }

  main > div { margin-bottom: 16px; scroll-margin-top: 10px; }

  .hero {
    min-height: 320px;
    border-radius: 22px 10px 22px 10px;
  }

  .hero-txt { padding: 26px 20px 70px; }

  .side { margin-top: 6px; }

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

@media (max-width: 420px) {
  .hero { min-height: 300px; }
  .hero-txt h1 { font-size: 1.7rem; }
  .lede { font-size: 1rem; }
  main > div { padding: 18px 16px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rail-nav li { animation: none; opacity: 1; transform: none; }
  .js-reveal { opacity: 1; transform: none; transition: none; }
  .cta, .side-list a, .rail-nav a { transition: none; }
  .cta:hover { transform: none; }
}

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