@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&family=JetBrains+Mono:wght@400&family=Playfair+Display:ital@1&display=swap');

:root {
  --paper: #ffffff;
  --stone: #f5f5f5;
  --ink: #1f1f1f;
  --mute: #6b6b6b;
  --line: #e4e4e4;
  --r-lg: 24px;
  --r-md: 18px;
  --shadow: 0 4px 6px rgba(0, 0, 0, .05), 0 14px 30px rgba(0, 0, 0, .04);
  --shadow-hi: 0 8px 14px rgba(0, 0, 0, .06), 0 20px 44px rgba(0, 0, 0, .06);
}

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

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

body {
  margin: 0;
  background: var(--stone);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* ===== 顶部两行：品牌行 + 菜单行 ===== */
.masthead {
  background: var(--paper);
  padding: 16px 0 0;
  border-bottom: 1px solid var(--line);
}

.brand-row {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 12px;
}

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

.brand-name {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -.015em;
}

.brand-logo {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 9px;
  display: block;
}

.menu-row {
  max-width: 1200px;
  margin: 0 auto;
  padding: 6px 20px 10px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.menu {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
}

.menu-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--mute);
  text-decoration: none;
  font-size: 1rem;
  transition: background .2s ease, color .2s ease;
}

.menu-link:hover {
  background: var(--stone);
  color: var(--ink);
}

.cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .16);
  transition: transform .25s ease, background .2s ease;
}

.cta:hover { transform: scale(1.03); }

/* ===== Hero：超大左对齐标题 ===== */
.hero {
  max-width: 1200px;
  margin: 20px auto 0;
  padding: 0 20px;
}

.hero-box {
  background: var(--paper);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 44px 40px;
  min-height: 70vh;
  display: flex;
  align-items: center;
}

.hero-title {
  margin: 0;
  font-family: 'Playfair Display', 'Songti SC', 'Noto Serif SC', 'Source Han Serif SC', serif;
  font-weight: 700;
  font-size: clamp(2.2rem, 5.4vw, 4.4rem);
  line-height: 1.1;
  letter-spacing: -.02em;
  max-width: 22ch;
  overflow-wrap: anywhere;
}

/* ===== 主容器：aside 在左，正文在右 ===== */
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 20px 80px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.rail {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 20px;
}

.rail-block {
  background: var(--paper);
  border-radius: var(--r-md);
  padding: 16px 14px;
  box-shadow: var(--shadow);
}

.rail-h {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .05em;
  color: var(--mute);
}

.rail-h > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tick {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--ink);
  display: block;
}

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

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 10px;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 1rem;
  transition: background .2s ease;
}

.rail-list a:hover { background: var(--stone); }

.rail-up {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  transition: background .2s ease, border-color .2s ease;
}

.rail-up:hover {
  background: var(--stone);
  border-color: var(--ink);
}

/* ===== 正文卡片 ===== */
.prose {
  max-width: 860px;
  min-width: 0;
}

.prose > section {
  background: var(--paper);
  border-radius: var(--r-md);
  box-shadow: var(--shadow);
  padding: 28px;
  margin-bottom: 18px;
  scroll-margin-top: 26px;
  overflow-wrap: anywhere;
}

.prose > section > h2::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--ink);
  margin-right: 10px;
  vertical-align: middle;
}

.prose h2,
.prose h3 {
  font-family: 'Playfair Display', 'Songti SC', 'Noto Serif SC', 'Source Han Serif SC', serif;
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -.01em;
  margin: 0 0 .6em;
}

.prose h2 { font-size: 1.6rem; }
.prose h3 { font-size: 1.22rem; }

.prose h2 > span,
.prose h3 > span { display: inline; }

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

.prose a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

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

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

.prose blockquote {
  margin: 1.2em 0;
  padding: 2px 0 2px 16px;
  border-left: 3px solid var(--ink);
  color: #3a3a3a;
}

.prose img { border-radius: 12px; }

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}

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

.prose pre { overflow-x: auto; }
.prose time { color: var(--mute); font-variant-numeric: tabular-nums; }

/* ===== 页脚 ===== */
.colophon {
  max-width: 1160px;
  margin: 0 auto 48px;
  padding: 30px 28px;
  background: var(--paper);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}

.foot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}

.foot-address {
  font-style: normal;
  display: block;
  margin: 0;
}

.foot-brand {
  font-family: 'Playfair Display', 'Songti SC', 'Noto Serif SC', serif;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -.01em;
}

.foot-nav dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 14px;
  align-items: center;
}

.foot-nav dt {
  margin: 0;
  color: var(--mute);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.foot-nav dd { margin: 0; }

.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.foot-nav a:hover { border-bottom-color: var(--ink); }

.foot-strip {
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

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

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--stone);
  color: var(--ink);
  text-decoration: none;
}

.foot-links a:hover { background: var(--line); }

.foot-copy {
  margin: 0;
  color: var(--mute);
}

/* ===== 揭示动效 ===== */
html.js .hero-box,
html.js .rail-block,
html.js .prose > section {
  opacity: 0;
  transform: translateY(16px);
}

html.js .in {
  opacity: 1;
  transform: none;
  transition: opacity .55s ease, transform .55s cubic-bezier(.2, .7, .25, 1);
  transition-delay: calc(var(--i, 0) * 55ms);
}

html.js .prose > section {
  transition: opacity .55s ease, transform .55s cubic-bezier(.2, .7, .25, 1), box-shadow .3s ease;
  transition-delay: calc(var(--i, 0) * 55ms);
}

html.js .in:hover {
  transform: translateY(-2px) scale(1.004);
  box-shadow: var(--shadow-hi);
  transition-delay: 0ms;
}

/* ===== 断点 ===== */
@media (max-width: 960px) {
  .wrap {
    grid-template-columns: 1fr;
    padding-bottom: 60px;
  }

  .rail {
    position: static;
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .hero-box {
    min-height: 0;
    padding: 38px 26px;
  }

  .prose { max-width: none; }

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

@media (max-width: 560px) {
  .hero { padding: 0 14px; margin-top: 14px; }
  .hero-box { padding: 30px 20px; }
  .hero-title { font-size: 2rem; }

  .wrap { padding: 14px 14px 48px; }
  .rail { grid-template-columns: 1fr; }

  .rail-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .rail-list a {
    border: 1px solid var(--line);
    padding: 0 12px;
  }

  .prose > section { padding: 20px; }
  .colophon { padding: 24px 18px; margin-bottom: 32px; }
  .foot-strip { justify-content: flex-start; }
}

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

  html.js .hero-box,
  html.js .rail-block,
  html.js .prose > section {
    opacity: 1;
    transform: none;
    transition: none;
  }

  html.js .in:hover,
  .cta:hover { transform: none; }
}

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