@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:wght@400;700&family=Crimson+Pro:wght@400;500;600;700&display=swap');

:root {
  --paper: #ffffff;
  --mist: #f5f5f5;
  --ink: #1f1f1f;
  --muted: #5c5c5c;
  --line: rgba(31, 31, 31, 0.12);
  --glass: rgba(255, 255, 255, 0.74);
  --serif: "Crimson Pro", Georgia, "Songti SC", "Noto Serif SC", serif;
  --sans: "Atkinson Hyperlegible", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  --r: 10px;
  --shadow: 0 6px 26px rgba(31, 31, 31, 0.07);
  --shadow-lift: 0 14px 38px rgba(31, 31, 31, 0.12);
}

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

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

body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.78;
  letter-spacing: 0.005em;
  max-width: 100%;
}

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

a {
  color: var(--ink);
  text-underline-offset: 3px;
}

/* ---------- 顶部细条 + 顶栏 ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 70;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.masthead.is-scrolled,
.menu-open .masthead {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 24px rgba(31, 31, 31, 0.06);
}

.strip {
  background: var(--ink);
  color: var(--paper);
}

.strip p {
  margin: 0 auto;
  max-width: 1180px;
  padding: 6px 20px;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.22em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--serif);
  font-size: 1.24rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  color: var(--ink);
  transition: opacity 0.2s ease;
}

.brand:hover {
  opacity: 0.65;
}

.burger {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.burger::before {
  content: "";
  width: 18px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 6px 0 currentColor, 0 -6px 0 currentColor;
}

.burger:hover {
  transform: scale(1.03);
  background: var(--paper);
}

.menu-open .burger::before {
  box-shadow: 0 0 0 currentColor;
}

/* ---------- 全屏遮罩菜单 ---------- */

.drawer {
  position: fixed;
  inset: 0;
  z-index: 65;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 20px 40px;
  overflow-y: auto;
  background: rgba(245, 245, 245, 0.96);
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.44s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, visibility 0.44s linear;
}

.menu-open .drawer {
  transform: none;
  opacity: 1;
  visibility: visible;
}

.drawer-list {
  list-style: none;
  counter-reset: dnum;
  width: 100%;
  max-width: 520px;
  margin: 0;
  padding: 0;
}

.drawer-list li {
  counter-increment: dnum;
  border-bottom: 1px solid var(--line);
}

.drawer-list a {
  display: flex;
  align-items: baseline;
  gap: 14px;
  min-height: 56px;
  padding: 12px 4px;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 4.4vw, 1.7rem);
  line-height: 1.4;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.drawer-list a::before {
  content: counter(dnum, decimal-leading-zero);
  font-family: var(--sans);
  font-size: 16px;
  color: var(--muted);
  min-width: 26px;
}

.drawer-list a:hover,
.drawer-list a:focus-visible {
  transform: translateX(8px);
  opacity: 0.7;
}

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

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 30px;
  min-height: 70vh;
  max-width: 1180px;
  margin: 0 auto;
  padding: 72px 20px 118px;
  overflow: hidden;
  background: var(--paper);
  border-bottom-left-radius: var(--r);
  border-bottom-right-radius: var(--r);
  box-shadow: var(--shadow);
}

.hero::after {
  content: "";
  position: absolute;
  left: -6%;
  right: -6%;
  bottom: -26px;
  height: 86px;
  background: var(--ink);
  transform: skewY(-3.2deg);
  transform-origin: left bottom;
  z-index: -1;
}

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

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.95rem, 6.4vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.hero-art {
  margin: 0;
}

.hero-img {
  width: 100%;
  max-height: 44vh;
  object-fit: cover;
  border-radius: var(--r);
  box-shadow: var(--shadow-lift);
}

.hero-plate {
  min-height: 26vh;
  border-radius: var(--r);
  background: linear-gradient(135deg, #ededed 0%, #f8f8f8 46%, #e2e2e2 100%);
  box-shadow: inset 0 0 0 1px var(--line);
}

/* ---------- 正文区 ---------- */

.body-zone {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
  padding: 44px 20px 70px;
}

.prose {
  min-width: 0;
  padding: 6px clamp(16px, 3vw, 36px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  word-break: break-word;
}

.prose > section {
  padding: 30px 0;
  border-bottom: 1px dashed var(--line);
  scroll-margin-top: 108px;
}

.prose > section:last-child {
  border-bottom: 0;
}

.prose > section:first-child {
  padding-top: 20px;
}

.prose h2,
.prose h3 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

.prose h2 {
  margin: 0.5em 0 0.24em;
  font-size: clamp(1.42rem, 3.6vw, 1.95rem);
  line-height: 1.24;
}

.prose h3 {
  margin: 1.1em 0 0.3em;
  font-size: clamp(1.14rem, 2.6vw, 1.32rem);
  line-height: 1.34;
}

.prose p {
  margin: 0.72em 0;
}

.prose .subtitle,
.prose .subhead,
.prose .desc,
.prose .lead {
  margin-top: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

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

.prose li {
  margin: 0.42em 0;
}

.prose li::marker {
  color: var(--muted);
}

.prose blockquote {
  margin: 1.1em 0;
  padding: 0.15em 0 0.15em 1em;
  border-left: 3px solid var(--ink);
  color: var(--muted);
  font-style: italic;
}

.prose figure {
  margin: 1.2em 0;
}

.prose figure img {
  border-radius: var(--r);
}

.prose figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

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

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

.prose th {
  font-family: var(--serif);
  font-weight: 600;
  background: var(--mist);
}

.prose hr {
  border: 0;
  border-top: 1px dashed var(--line);
  margin: 1.4em 0;
}

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

.rail {
  position: sticky;
  top: 104px;
  padding: 18px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}

.rail h2 {
  margin: 0 0 2px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.16rem;
  line-height: 1.4;
}

.rail .subtitle {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.rail-nav ol {
  list-style: none;
  counter-reset: rnum;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.rail-nav li {
  counter-increment: rnum;
  border-bottom: 1px solid var(--line);
}

.rail-nav a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-height: 42px;
  padding: 9px 2px;
  font-size: 16px;
  line-height: 1.5;
  text-decoration: none;
  color: var(--ink);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.rail-nav a::before {
  content: counter(rnum, decimal-leading-zero);
  font-size: 15px;
  color: var(--muted);
  min-width: 22px;
}

.rail-nav a:hover {
  opacity: 0.62;
  transform: translateX(4px);
}

.rail-top {
  margin: 14px 0 0;
}

.rail-top a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 16px;
  color: var(--muted);
}

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

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 36px;
  padding: 40px 20px 46px;
  background: var(--ink);
  color: var(--paper);
}

.f-brand {
  font-family: var(--serif);
  font-size: clamp(1.55rem, 5.4vw, 2.6rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: 0.02em;
}

.f-nav ol {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.f-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 16px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.86);
  transition: color 0.2s ease;
}

.f-nav a:hover {
  color: var(--paper);
  text-decoration: underline;
}

.f-legal p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.66);
}

/* ---------- 动效 ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

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

@media (max-width: 900px) {
  .body-zone {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding-top: 34px;
  }

  .rail {
    position: static;
  }

  .hero {
    min-height: 62vh;
    padding-bottom: 108px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 17px;
  }

  .hero {
    padding: 46px 16px 100px;
    gap: 22px;
    min-height: 0;
  }

  .hero::after {
    height: 70px;
    bottom: -20px;
  }

  .hero-img {
    max-height: 34vh;
  }

  .body-zone {
    padding: 30px 16px 56px;
  }

  .foot {
    flex-direction: column;
    align-items: flex-start;
    padding: 32px 16px 40px;
  }

  .f-nav ol {
    gap: 0 14px;
  }
}

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

  .drawer,
  .burger,
  .drawer-list a,
  .rail-nav a,
  .brand,
  .f-nav a,
  .masthead {
    transition: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

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