@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700&family=Syne:wght@400;500;600;700&display=swap');

:root {
  --ink: #1f1726;
  --ink-soft: #271d31;
  --plum: #56228b;
  --plum-lt: #7c3fbe;
  --clay: #8b4513;
  --clay-lt: #b46a33;
  --cream: #f4ece2;
  --muted: rgba(244, 236, 226, 0.66);
  --faint: rgba(244, 236, 226, 0.42);
  --line: rgba(244, 236, 226, 0.15);
  --rail: 250px;
  --shadow: 0 20px 44px -22px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(244, 236, 226, 0.06);
  --font-head: 'Syne', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  --font-body: 'Manrope', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
}

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

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

body {
  margin: 0;
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.72;
  background-color: var(--ink);
  background-image:
    radial-gradient(1100px 560px at 88% -12%, rgba(86, 34, 139, 0.38), transparent 62%),
    radial-gradient(880px 520px at -12% 34%, rgba(139, 69, 19, 0.3), transparent 66%),
    repeating-linear-gradient(135deg, rgba(244, 236, 226, 0.024) 0 2px, transparent 2px 7px);
  background-attachment: fixed;
  overflow-x: hidden;
}

a { color: var(--cream); text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--clay-lt);
  outline-offset: 3px;
}

img, svg { max-width: 100%; }

/* ---------- 左侧固定竖排导航 ---------- */
.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--rail);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 26px 20px 28px;
  border-right: 1px solid var(--line);
  background:
    radial-gradient(420px 320px at 20% 0%, rgba(139, 69, 19, 0.34), transparent 70%),
    linear-gradient(180deg, #241a2e, #1a1223);
}

.rail-brand {
  margin: 0;
  font-family: var(--font-head);
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.rail-brand a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-right: 8px;
}

.rail-brand a::before {
  content: "";
  width: 12px;
  height: 12px;
  margin-right: 9px;
  border-radius: 60% 40% 55% 45%;
  background: linear-gradient(135deg, var(--clay-lt), var(--plum-lt));
  flex: none;
}

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

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

.pill {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 16px;
  font-size: 16px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: background-color 0.22s ease, color 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
}

.pill:hover,
.pill:focus-visible {
  color: var(--cream);
  background: rgba(139, 69, 19, 0.3);
  border-color: rgba(180, 106, 51, 0.75);
  transform: translateX(3px);
}

.pill.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--plum), #6b2fa8);
  border-color: transparent;
}

.rail-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.03em;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--clay), var(--plum));
  box-shadow: 0 14px 26px -14px rgba(139, 69, 19, 0.95);
  transition: filter 0.2s ease, transform 0.2s ease;
}

.rail-cta:hover,
.rail-cta:focus-visible { filter: brightness(1.15); transform: translateY(-2px); }

/* ---------- 主区 ---------- */
.main { padding-bottom: 18px; }

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 16px;
  padding: 34px 20px 42px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.hero-copy { position: relative; z-index: 1; max-width: 760px; }

.hero h1 {
  margin: 0 0 14px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.85rem, 7.4vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.hero-lead { margin: 0; color: var(--muted); font-size: 17px; }

.hero-art {
  position: absolute;
  top: 6px;
  right: -30px;
  width: 140px;
  opacity: 0.34;
  pointer-events: none;
  animation: drift 12s ease-in-out infinite;
}

.hero-band {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 9px;
  background: linear-gradient(90deg, var(--clay), var(--plum) 42%, var(--plum) 58%, var(--clay));
  transform: skewY(-1.4deg);
  transform-origin: right bottom;
}

@keyframes drift {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(-2deg); }
}

/* ---------- 正文：aside 在左 + content 卡片 ---------- */
.sheet {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  padding: 26px 20px 20px;
  align-items: start;
}

.side {
  padding: 2px 0 2px 14px;
  border-left: 2px solid var(--plum);
}

.side h2 {
  margin: 0 0 4px;
  font-family: var(--font-head);
  font-size: 17px;
  letter-spacing: 0.06em;
}

.side .subtitle {
  margin: 0 0 12px;
  font-size: 16px;
  color: var(--faint);
}

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

.side-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 8px;
  font-size: 16px;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.side-list a:hover,
.side-list a:focus-visible { color: var(--cream); border-bottom-color: var(--clay); }
.side-list a.is-active { color: var(--cream); font-weight: 700; }

.sheet > article {
  scroll-margin-top: 116px;
  margin-bottom: 20px;
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid var(--line);
  border-radius: 0;
  background: linear-gradient(160deg, rgba(244, 236, 226, 0.055), rgba(244, 236, 226, 0.015));
  box-shadow: var(--shadow);
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.sheet > article:hover {
  transform: translateY(-3px);
  border-color: rgba(180, 106, 51, 0.5);
  box-shadow: 0 26px 52px -24px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(244, 236, 226, 0.08);
}

.sheet > article h2 {
  margin: 0 0 12px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.32rem, 2.7vw, 1.85rem);
  line-height: 1.24;
  letter-spacing: -0.01em;
}

.sheet > article h3 {
  margin: 22px 0 8px;
  font-family: var(--font-head);
  font-size: 1.12rem;
  line-height: 1.35;
}

.sheet > article p { margin: 0 0 13px; }
.sheet > article p:last-child { margin-bottom: 0; }

.sheet > article a {
  color: #e6c9ac;
  text-decoration: underline;
  text-decoration-color: rgba(180, 106, 51, 0.65);
  text-underline-offset: 3px;
}

.sheet > article ul,
.sheet > article ol { margin: 0 0 14px; padding-left: 1.25em; }
.sheet > article li { margin-bottom: 6px; }

.sheet > article ul { list-style: none; padding-left: 0; }

.sheet > article ul > li {
  position: relative;
  padding-left: 20px;
}

.sheet > article ul > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 9px;
  height: 9px;
  border-radius: 62% 38% 55% 45%;
  background: var(--clay-lt);
}

.sheet > article blockquote {
  margin: 0 0 16px;
  padding: 14px 18px;
  border-left: 3px solid var(--clay);
  background: rgba(139, 69, 19, 0.16);
  color: #f0e2d4;
}

.sheet > article img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 16px;
  box-shadow: var(--shadow);
}

.sheet > article figure { margin: 0 0 16px; }

/* ---------- 页脚 ---------- */
.foot {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
  padding: 24px 20px 38px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
}

.foot-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 14px;
}

.foot address {
  font-style: normal;
  font-family: var(--font-head);
  font-size: 17px;
  letter-spacing: 0.03em;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 10px;
  font-size: 16px;
  color: var(--muted);
  border-bottom: 1px solid transparent;
}

.foot-links a:hover,
.foot-links a:focus-visible { color: var(--cream); border-bottom-color: var(--clay); }

.foot-nav dl {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 6px;
  margin: 0;
}

.foot-nav dt { margin: 0; }
.foot-nav dd { margin: 0; font-size: 16px; color: var(--faint); }
.foot-nav dd:empty { display: none; }

.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 8px;
  font-size: 16px;
  color: var(--muted);
}

.foot-nav a:hover,
.foot-nav a:focus-visible { color: var(--cream); }

.foot-copy {
  margin: 0;
  font-size: 16px;
  color: var(--faint);
}

/* ---------- 移动端 ---------- */
@media (max-width: 899px) {
  html { scroll-padding-top: 118px; }

  .rail {
    position: sticky;
    top: 0;
    inset: auto;
    width: auto;
    flex-direction: column;
    gap: 10px;
    padding: 10px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(30, 22, 38, 0.96);
    backdrop-filter: blur(10px);
  }

  .rail-brand { font-size: 17px; }

  .rail-brand a { min-height: 40px; }

  .rail-nav {
    flex: 0 0 auto;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .rail-nav ul { flex-direction: row; gap: 8px; }

  .pill {
    min-height: 40px;
    padding: 8px 14px;
    white-space: nowrap;
    transform: none;
  }

  .pill:hover { transform: none; }

  .rail-cta {
    position: absolute;
    top: 10px;
    right: 14px;
    min-height: 40px;
    padding: 8px 14px;
    font-size: 15px;
  }

  .sheet > article { scroll-margin-top: 122px; }
}

@media (min-width: 900px) {
  body { padding-left: var(--rail); }

  .hero {
    min-height: 45vh;
    grid-template-columns: minmax(0, 1fr) 190px;
    align-items: center;
    padding: 48px clamp(24px, 4vw, 56px) 58px;
  }

  .hero-art {
    position: static;
    width: 100%;
    opacity: 0.9;
  }

  .hero h1 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); }

  .sheet {
    grid-template-columns: 190px minmax(0, 1fr);
    gap: clamp(22px, 3.5vw, 46px);
    padding: clamp(28px, 4vw, 54px) clamp(24px, 4vw, 56px) 26px;
  }

  .side {
    grid-column: 1;
    grid-row: 1 / -1;
    position: sticky;
    top: 30px;
    align-self: start;
  }

  .sheet > article { grid-column: 2; }

  .foot { padding: 26px clamp(24px, 4vw, 56px) 44px; }
}

@media (min-width: 1280px) {
  .sheet {
    grid-template-columns: 214px minmax(0, 1fr) 60px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

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