@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@300;400;500;600;700&family=Noto+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --paper: #fdfbf7;
  --paper-2: #f5f5f5;
  --ink: #1a1a1a;
  --line: #e0e0e0;
  --muted: #5c5c58;
  --radius: 18px;
}

*,
*::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: 'Be Vietnam Pro', 'Noto Sans', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: 0.004em;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  transition: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.4'/%3E%3C/svg%3E");
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

section {
  scroll-margin-top: 100px;
}

mark {
  background: #e9e6df;
  color: var(--ink);
}

/* 页头：品牌独占一行，菜单行在下 */
.masthead {
  border-bottom: 1px solid var(--line);
  padding: 0 clamp(18px, 4vw, 48px);
  background: var(--paper);
}

.brandline {
  padding: 14px 0 8px;
  border-bottom: 1px solid var(--line);
}

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

.mark {
  display: inline-block;
  line-height: 1;
}

img.mark {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  filter: grayscale(1) contrast(1.1);
}

.brandtext {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.mainnav {
  padding: 0;
}

.navlist {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 2px;
  list-style: none;
  margin: 0;
  padding: 5px 0 8px;
}

.navlist li {
  display: flex;
}

.navlist a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

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

.navlist a[aria-current="page"] {
  font-weight: 600;
  border-bottom-color: var(--ink);
}

/* 首屏 */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  min-height: 100svh;
  padding: clamp(30px, 5vw, 64px) clamp(20px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.ghost {
  position: absolute;
  right: 1%;
  bottom: -3%;
  z-index: 0;
  font-size: clamp(9rem, 27vw, 21rem);
  font-weight: 700;
  line-height: 0.8;
  letter-spacing: -0.05em;
  color: rgba(26, 26, 26, 0.055);
  pointer-events: none;
  user-select: none;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 34ch;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.1rem, 6.2vw, 4.2rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 700;
}

.lead {
  margin: 0 0 1.7rem;
  max-width: 36ch;
  font-size: 1.02rem;
  line-height: 1.8;
  color: var(--muted);
  font-weight: 300;
}

.hero-jump {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 10px 22px;
  font-size: 16px;
  text-decoration: none;
  border: 1px solid var(--ink);
  border-radius: 999px;
}

.hero-jump:hover {
  background: var(--ink);
  color: var(--paper);
}

.hero-fig {
  position: relative;
  z-index: 1;
}

.hero-pic {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  filter: grayscale(1) contrast(1.06);
}

/* 正文与侧栏 */
.spread {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 252px;
  gap: clamp(24px, 4vw, 56px);
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(34px, 5vw, 68px) clamp(20px, 5vw, 44px);
}

.sheet {
  min-width: 0;
}

.prose {
  max-width: 68ch;
  overflow-wrap: break-word;
}

.prose > section {
  padding-block: clamp(24px, 3.6vw, 44px);
  border-top: 1px solid var(--line);
}

.prose > section:first-child {
  border-top: 0;
  padding-top: 0;
}

.prose h2 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.36rem, 2.5vw, 1.85rem);
  line-height: 1.3;
  letter-spacing: -0.012em;
  font-weight: 600;
}

.prose h3 {
  margin: 1.7rem 0 0.5rem;
  font-size: 1.16rem;
  line-height: 1.45;
  font-weight: 600;
}

.prose p {
  margin: 0 0 1.05rem;
}

.prose ul,
.prose ol {
  margin: 0 0 1.15rem;
  padding-left: 1.35rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

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

.prose blockquote {
  margin: 1.5rem 0;
  padding: 0.25rem 0 0.25rem 1.1rem;
  border-left: 3px solid var(--ink);
  color: #3b3b39;
}

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

.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.4rem 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  filter: grayscale(1) contrast(1.05);
}

.prose table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  margin: 1.3rem 0;
  border-collapse: collapse;
  font-size: 16px;
}

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

.prose th {
  background: var(--paper-2);
  font-weight: 600;
}

.prose code {
  font-family: 'SFMono-Regular', 'Menlo', 'Consolas', monospace;
  font-size: 15px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2rem 0;
}

.prose strong {
  font-weight: 600;
}

/* 侧栏 */
.rail {
  align-self: start;
  position: sticky;
  top: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  background: rgba(255, 255, 255, 0.52);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 15px 14px;
}

small {
  display: block;
  margin-bottom: 2px;
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: 0.2em;
  color: var(--muted);
  font-weight: 400;
}

.card h2 {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

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

.rail-list li + li {
  border-top: 1px solid var(--line);
}

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

.rail-list a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.totop {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 6px;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
}

/* 页脚 */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: clamp(40px, 6vw, 84px);
  padding: 20px clamp(18px, 4vw, 48px) 26px;
  border-top: 1px solid var(--line);
  background: var(--paper-2);
}

.foot-brand a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  font-size: clamp(1.5rem, 4.6vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.foot-nav {
  min-width: 0;
}

.footlist {
  display: flex;
  flex-wrap: wrap;
  gap: 0 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footlist a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 8px;
  font-size: 16px;
  text-decoration: none;
  color: var(--muted);
}

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

.foot-copy {
  font-size: 16px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* 滚动出现：无过渡，瞬时到位 */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
}

.js [data-reveal].in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
  html {
    scroll-behavior: auto;
  }
}

@media (max-width: 900px) {
  .spread {
    grid-template-columns: minmax(0, 1fr);
  }
  .rail {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    order: 2;
  }
  .card {
    flex: 1 1 210px;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 17px;
  }
  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: auto;
    align-items: start;
    padding: 30px 20px 34px;
    gap: 26px;
  }
  .hero-copy {
    max-width: none;
  }
  .hero-fig {
    order: 2;
  }
  .ghost {
    right: auto;
    left: 46%;
    bottom: auto;
    top: 4px;
    font-size: clamp(7rem, 40vw, 12rem);
  }
  .lead {
    max-width: none;
  }
  .foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .spread {
    padding: 30px 20px 40px;
    gap: 28px;
  }
}

@media (max-width: 420px) {
  .navlist a {
    padding: 8px 10px;
  }
}

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