:root {
  --paper: #fdfbf7;
  --gray: #f5f5f5;
  --ink: #1a1a1a;
  --line: #e0e0e0;
  --mute: #57544e;
  --max: 1180px;
}

*,
*::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: "Source Sans 3", "Songti SC", "STSong", "Noto Serif SC", serif;
  font-size: 17px;
  line-height: 1.75;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 95;
  pointer-events: none;
  opacity: 0.26;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='140' height='140' filter='url(#g)' opacity='0.55'/></svg>");
}

menu {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

img {
  max-width: 100%;
  height: auto;
}

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

h1,
h2,
h3 {
  font-family: "Bebas Neue", "Songti SC", "STSong", serif;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* 顶部：品牌独占一行，菜单行在下 */
.top {
  position: relative;
  z-index: 70;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.brandline {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px 24px 8px;
}

.brand {
  display: inline-block;
  font-family: "Bebas Neue", "Songti SC", "STSong", serif;
  font-size: clamp(26px, 5vw, 42px);
  line-height: 1.1;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.toolbar {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.menu > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 16px;
  letter-spacing: 0.12em;
  cursor: pointer;
  background: var(--paper);
}

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

.menu[open] > summary {
  position: relative;
  z-index: 80;
}

.bars {
  display: block;
  position: relative;
  width: 18px;
  height: 2px;
  background: var(--ink);
}

.bars::before,
.bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--ink);
}

.bars::before {
  top: -6px;
}

.bars::after {
  top: 6px;
}

.menu > .panel {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  flex-direction: column;
  justify-content: center;
  padding: 96px 24px 32px;
  background: var(--paper);
  overflow: auto;
  border: 0;
}

.menu[open] > .panel {
  display: flex;
}

.menu > .panel > li {
  border-bottom: 1px solid var(--line);
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
}

.menu > .panel > li:first-child {
  border-top: 1px solid var(--line);
}

.menu > .panel > li > a {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 12px 4px;
  font-size: 21px;
  text-decoration: none;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 22px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 16px;
  letter-spacing: 0.08em;
  text-decoration: none;
}

/* 版心：左栏目录 + 右栏正文 */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px 80px;
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr);
  gap: 0 46px;
  align-items: start;
}

.hero {
  grid-column: 1 / -1;
  min-height: 45vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 40px 0 36px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.glyph {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  color: var(--ink);
}

.hero h1 {
  margin: 0;
  max-width: 22ch;
  font-size: clamp(32px, 6.2vw, 58px);
  line-height: 1.16;
}

.side {
  position: sticky;
  top: 26px;
  padding-right: 24px;
  border-right: 1px solid var(--line);
}

.side h2 {
  margin: 0 0 6px;
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: 0.06em;
}

.side hr {
  border: 0;
  border-top: 2px solid var(--ink);
  width: 44px;
  margin: 0 0 16px;
}

.sidenav > li {
  border-bottom: 1px solid var(--line);
}

.sidenav > li > a {
  display: block;
  padding: 11px 2px;
  min-height: 40px;
  font-size: 16px;
  line-height: 1.4;
  text-decoration: none;
}

.court {
  min-width: 0;
}

/* 正文 */
.prose > section {
  margin: 0 0 30px;
  padding: 26px 26px 30px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-bottom: 3px solid var(--ink);
  border-radius: 28px;
  animation: rise 180ms steps(3, end) both;
}

.prose > section:nth-child(2) {
  animation-delay: 40ms;
}
.prose > section:nth-child(3) {
  animation-delay: 80ms;
}
.prose > section:nth-child(4) {
  animation-delay: 120ms;
}
.prose > section:nth-child(5) {
  animation-delay: 160ms;
}
.prose > section:nth-child(6) {
  animation-delay: 200ms;
}
.prose > section:nth-child(7) {
  animation-delay: 240ms;
}

@keyframes rise {
  from {
    transform: translateY(8px);
  }
  to {
    transform: none;
  }
}

.prose h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3.6vw, 32px);
  line-height: 1.25;
}

.prose h2 + hr {
  border: 0;
  border-top: 2px solid var(--ink);
  width: 64px;
  margin: 0 0 18px;
}

.prose h3 {
  margin: 22px 0 8px;
  font-size: 21px;
  line-height: 1.35;
}

.prose h3 + hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0 0 14px;
}

.prose p {
  margin: 0 0 16px;
}

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

.prose a {
  text-underline-offset: 3px;
}

.prose menu,
.prose ul,
.prose ol {
  padding-left: 1.2em;
}

.prose li {
  margin: 0 0 8px;
}

.prose blockquote {
  margin: 0 0 16px;
  padding: 6px 0 6px 18px;
  border-left: 3px solid var(--ink);
  color: var(--mute);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  font-size: 16px;
}

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

.prose img {
  border-radius: 20px;
  border: 1px solid var(--line);
  margin: 0 0 16px;
}

/* 页脚 */
.foot {
  border-top: 1px solid var(--ink);
  background: var(--gray);
  padding: 44px max(24px, calc((100vw - var(--max)) / 2)) 24px;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 30px 40px;
  align-items: start;
}

.f-mega {
  grid-column: 1 / -1;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.mega {
  margin: 0;
  font-family: "Bebas Neue", "Songti SC", "STSong", serif;
  font-size: clamp(46px, 13vw, 148px);
  line-height: 0.92;
  letter-spacing: 0.04em;
  word-break: keep-all;
}

.f-col {
  min-width: 0;
}

.f-col .f-text,
.f-col .f-kw {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--mute);
}

.f-kw {
  letter-spacing: 0.08em;
}

.fnav > li {
  border-bottom: 1px solid var(--line);
}

.fnav > li > a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 0;
  font-size: 16px;
  text-decoration: none;
}

.f-bar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 16px;
  color: var(--mute);
}

.f-top {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 4px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
}

@media (max-width: 900px) {
  .wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding-bottom: 56px;
  }

  .hero {
    min-height: 38vh;
    margin-bottom: 28px;
  }

  .court {
    order: 1;
  }

  .side {
    order: 2;
    position: static;
    padding: 24px 0 0;
    margin-top: 12px;
    border-right: 0;
    border-top: 1px solid var(--line);
  }

  .sidenav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 18px;
  }

  .foot {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .fnav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 18px;
  }
}

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

  .brandline {
    padding: 16px 18px 6px;
  }

  .toolbar {
    padding: 0 18px 14px;
  }

  .wrap {
    padding: 0 18px 48px;
  }

  .hero {
    flex-direction: column;
    gap: 10px;
    padding: 32px 0 28px;
    min-height: 34vh;
  }

  .glyph {
    width: 38px;
    height: 38px;
  }

  .prose > div {
    padding: 20px 18px 24px;
    border-radius: 22px;
  }

  .cta {
    padding: 10px 16px;
  }

  .menu > .panel {
    padding: 88px 18px 28px;
  }
}

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

  .prose > div {
    animation: none;
  }
}

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