:root {
  --plum: #56228b;
  --plum-deep: #3f1568;
  --clay: #8b4513;
  --ink: #1f1726;
  --muted: #5f5569;
  --paper: #fdfbf7;
  --card: #ffffff;
  --line: rgba(86, 34, 139, 0.16);
  --line-soft: rgba(31, 23, 38, 0.1);
  --r: 18px;
  --sand: #d9b48a;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.72;
  letter-spacing: -0.01em;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: -12% -18% auto -18%;
  height: 74vh;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(38vw 30vw at 14% 6%, rgba(86, 34, 139, 0.15), transparent 70%),
    radial-gradient(30vw 26vw at 86% 20%, rgba(139, 69, 19, 0.13), transparent 72%),
    radial-gradient(22vw 18vw at 50% 46%, rgba(139, 69, 19, 0.07), transparent 70%);
  filter: blur(6px);
}

img {
  max-width: 100%;
}

a {
  color: var(--plum);
}

div {
  scroll-margin-top: 132px;
}

/* ---------- 头部 ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(253, 251, 247, 0.97);
  border-bottom: 1px solid var(--line);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 9px 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-right: auto;
  text-decoration: none;
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

.brand .mark {
  width: 34px;
  height: 34px;
  border-radius: 12px 4px 12px 4px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.search {
  flex: 0 1 190px;
  min-width: 0;
}

.search input {
  width: 100%;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
}

.search input:focus {
  outline: 2px solid rgba(86, 34, 139, 0.4);
  outline-offset: 1px;
}

.menu > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--plum);
  font-size: 15px;
  cursor: pointer;
  user-select: none;
}

.menu > summary::-webkit-details-marker {
  display: none;
}

.menu > summary:hover {
  background: rgba(86, 34, 139, 0.07);
}

.bars {
  display: block;
  width: 17px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
}

.menu[open] > summary {
  position: relative;
  z-index: 42;
  background: var(--paper);
}

.menu-panel {
  position: fixed;
  inset: 0;
  z-index: 41;
  margin: 0;
  padding: 78px 20px 32px;
  list-style: none;
  background: #fdfbf7;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.menu-panel li a {
  display: flex;
  align-items: center;
  min-height: 54px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid transparent;
  text-decoration: none;
  color: var(--ink);
  font-size: 19px;
  letter-spacing: -0.02em;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.menu-panel li a:hover {
  background: #fff;
  border-color: var(--line);
  color: var(--plum);
}

.head-nav {
  display: flex;
  gap: 6px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.head-nav::-webkit-scrollbar {
  display: none;
}

.head-nav a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--muted);
  font-size: 15px;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease;
}

.head-nav a:hover {
  background: rgba(86, 34, 139, 0.09);
  color: var(--plum);
}

/* ---------- 主区 ---------- */
main {
  position: relative;
  z-index: 1;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  gap: clamp(20px, 5vw, 60px);
  align-items: center;
  padding: 44px 0 56px;
}

.hero.no-fig {
  grid-template-columns: 1fr;
  max-width: 760px;
  margin: 0 auto;
}

.hero-copy {
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  padding: 6px 16px;
  border: 1px solid rgba(139, 69, 19, 0.42);
  border-radius: 999px;
  color: var(--clay);
  font-size: 14px;
  letter-spacing: 0.1em;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--clay);
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 5.4vw, 3.7rem);
  line-height: 1.14;
  letter-spacing: -0.038em;
  font-weight: 600;
}

.lead {
  max-width: 34ch;
  margin: 0 auto 30px;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.08rem);
}

.hero-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  border: 1px solid var(--plum);
  border-radius: 999px;
  background: var(--plum);
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  background: var(--plum-deep);
}

.btn.ghost {
  background: transparent;
  color: var(--plum);
}

.btn.ghost:hover {
  background: rgba(86, 34, 139, 0.08);
}

.hero-fig {
  position: relative;
  margin: 0;
}

.hero-fig img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 24px 118px 24px 118px;
  border: 1px solid var(--line);
}

.tag-float {
  position: absolute;
  left: -6px;
  bottom: 20px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--clay);
  font-size: 14px;
  letter-spacing: 0.06em;
  animation: drift 6s ease-in-out infinite;
}

@keyframes drift {
  50% {
    transform: translateY(-8px);
  }
}

/* ---------- 正文 ---------- */
.content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 296px;
  gap: clamp(22px, 4vw, 52px);
  align-items: start;
  padding: 6px 0 84px;
}

.prose > * {
  margin: 0 0 22px;
  padding: clamp(20px, 3.2vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--card);
}

.prose > *:last-child {
  margin-bottom: 0;
}

.prose h2 {
  margin: 0 0 14px;
  font-size: clamp(1.28rem, 2.5vw, 1.66rem);
  line-height: 1.32;
  letter-spacing: -0.024em;
  color: var(--plum);
  font-weight: 600;
}

.prose h2 small {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--clay);
}

.prose h3 {
  margin: 22px 0 10px;
  font-size: 1.09rem;
  letter-spacing: -0.015em;
}

.prose p {
  margin: 0 0 0.95em;
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose a {
  color: var(--plum);
  text-decoration: underline;
  text-decoration-color: rgba(86, 34, 139, 0.35);
  text-underline-offset: 3px;
}

.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 16px 0;
  border-radius: 16px;
}

.prose ul,
.prose ol {
  margin: 0 0 1em;
  padding-left: 1.25em;
}

.prose li {
  margin-bottom: 0.4em;
}

.prose blockquote {
  margin: 18px 0;
  padding: 12px 18px;
  border-left: 3px solid var(--clay);
  border-radius: 0 14px 14px 0;
  background: #faf6f0;
  color: var(--muted);
}

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

.prose table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  word-break: break-word;
  font-size: 15px;
}

.prose th,
.prose td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
}

/* ---------- 侧栏 ---------- */
.side {
  position: sticky;
  top: 132px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--card);
}

.side small {
  display: block;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--clay);
}

.side h3 {
  margin: 4px 0 12px;
  font-size: 16px;
  letter-spacing: -0.012em;
  color: var(--plum);
  font-weight: 600;
}

.side-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.side-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 15px;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease;
}

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

/* ---------- 页脚 ---------- */
.site-foot {
  position: relative;
  z-index: 1;
  margin-top: 30px;
  padding: clamp(30px, 5vw, 54px) 20px 22px;
  background: #251731;
  color: #efe7f5;
}

.foot-cta {
  max-width: 1120px;
  margin: 0 auto 30px;
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid rgba(239, 231, 245, 0.22);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
  display: grid;
  gap: 12px;
  justify-items: start;
}

.foot-cta small {
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--sand);
}

.foot-cta h2 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 2rem);
  letter-spacing: -0.028em;
  font-weight: 600;
}

.foot-cta .btn {
  margin-top: 6px;
  background: var(--sand);
  border-color: var(--sand);
  color: #251731;
}

.foot-cta .btn:hover {
  background: #e9c9a5;
}

.foot-grid {
  max-width: 1120px;
  margin: 0 auto;
  padding-bottom: 18px;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 20px;
  border-bottom: 1px solid rgba(239, 231, 245, 0.18);
}

.foot-col .mark {
  width: 34px;
  height: 34px;
  border-radius: 12px 4px 12px 4px;
  object-fit: cover;
  margin-bottom: 8px;
}

.foot-brand {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.foot-nav {
  display: grid;
  gap: 2px;
  align-content: start;
}

.foot-nav a {
  display: flex;
  align-items: center;
  min-height: 42px;
  color: #efe7f5;
  font-size: 15px;
  text-decoration: none;
}

.foot-nav a:hover {
  color: var(--sand);
}

.copy {
  margin: 0 0 6px;
  color: #cbbcd8;
  font-size: 14px;
}

.to-top {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--sand);
  font-size: 14px;
  text-decoration: none;
}

/* ---------- 断点 ---------- */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 28px 0 40px;
  }

  .hero-fig img {
    aspect-ratio: 16 / 11;
    border-radius: 20px 76px 20px 76px;
  }

  .tag-float {
    left: auto;
    right: 12px;
    bottom: 12px;
  }

  .content {
    grid-template-columns: 1fr;
    padding-bottom: 60px;
  }

  .side {
    position: static;
  }

  .foot-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 16px;
  }

  .search {
    display: none;
  }

  .menu-tag {
    display: none;
  }

  .menu > summary {
    padding: 0 13px;
  }

  .brand-txt {
    font-size: 16px;
  }

  .foot-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    letter-spacing: -0.03em;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .tag-float {
    animation: none;
  }

  .btn:hover {
    transform: none;
  }
}

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