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

:root {
  --paper: #fdfbf7;
  --ash: #f5f5f5;
  --ink: #1a1a1a;
  --line: #ded9d0;
  --line-soft: #ebe7e0;
  --mute: #5c574e;
  --hh: 122px;
  --sans: 'Outfit', 'Rubik', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --serif: 'Songti SC', 'Noto Serif SC', 'Source Han Serif SC', Georgia, 'Times New Roman', serif;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

main {
  display: block;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

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

hr {
  height: 0;
  border: 0;
  border-top: 1px solid var(--ink);
  margin: 16px 0;
}

/* 页头 */
.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
}

.brandrow {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 13px clamp(14px, 4vw, 40px) 8px;
}

.rule {
  display: block;
  height: 1px;
  background: var(--line);
}

.brand {
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 0 4px;
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-decoration: none;
  white-space: nowrap;
}

.mark {
  display: block;
  width: 10px;
  height: 10px;
  background: var(--ink);
  flex: none;
}

.cta {
  grid-column: 3;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 15px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
}

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

nav {
  padding: 0 clamp(10px, 3vw, 40px) 9px;
}

nav p {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 2px;
}

nav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 9px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

nav a::before {
  content: "";
  display: block;
  width: 5px;
  height: 5px;
  flex: none;
  background: var(--ink);
  opacity: 0.45;
}

nav a:hover {
  background: var(--ash);
  border-bottom-color: var(--ink);
}

/* 首屏 */
.hero {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: clamp(40px, 8vw, 88px) clamp(16px, 5vw, 64px);
  border-bottom: 1px solid var(--ink);
  text-align: right;
}

.hero h1 {
  margin: 0;
  max-width: 17ch;
  font-family: var(--sans);
  font-size: clamp(2.3rem, 7.2vw, 5.4rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.02em;
}

/* 主体框架 */
.wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: clamp(26px, 5vw, 58px) clamp(16px, 4vw, 40px) clamp(46px, 7vw, 88px);
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 52px);
  align-items: start;
}

.toc {
  position: sticky;
  top: calc(var(--hh) + 16px);
  border: 1px solid var(--ink);
  background: var(--ash);
  padding: 13px 13px 9px;
}

.toc h2 {
  margin: 0 0 9px;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.toc hr {
  width: 40px;
  margin: 0 0 9px;
}

.toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1px;
}

.toc a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 8px;
  font-size: 16px;
  line-height: 1.35;
  text-decoration: none;
  border-left: 2px solid transparent;
}

.toc a:hover {
  background: var(--paper);
  border-left-color: var(--ink);
}

/* 正文 */
.sheet {
  min-width: 0;
}

.body {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.85;
  max-width: 66ch;
}

.body div {
  padding: 26px 0;
  border-top: 1px solid var(--line-soft);
  scroll-margin-top: calc(var(--hh) + 20px);
}

.body div:first-child {
  padding-top: 0;
  border-top: 0;
}

.body h2 {
  margin: 0 0 10px;
  font-family: var(--sans);
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.01em;
}

.body h2 + hr {
  width: 56px;
  border-top-width: 2px;
  margin: 0 0 18px;
}

.body h3 {
  margin: 26px 0 8px;
  font-family: var(--sans);
  font-size: 1.14rem;
  font-weight: 700;
  line-height: 1.35;
}

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

.body ul,
.body ol {
  margin: 0 0 16px;
  padding-left: 1.25em;
}

.body li {
  margin-bottom: 8px;
}

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

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

.body img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
}

.body strong {
  font-weight: 700;
}

/* 页脚 */
.base {
  border-top: 1px solid var(--ink);
  background: var(--ash);
  padding: 16px clamp(16px, 4vw, 40px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
}

.base small {
  font-size: 16px;
  letter-spacing: 0.04em;
  color: var(--mute);
}

.base p {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

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

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

/* 逐条浮现 */
html.js [data-rv] {
  opacity: 0;
  transform: translateY(6px);
}

html.js [data-rv].in {
  opacity: 1;
  transform: none;
  transition: opacity 0.18s linear, transform 0.18s linear;
  transition-delay: calc(var(--i, 0) * 35ms);
}

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

  html.js [data-rv] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 860px) {
  .wrap {
    grid-template-columns: minmax(0, 1fr);
  }

  .toc {
    position: static;
  }

  .toc ul {
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  }

  .body {
    max-width: none;
  }
}

@media (max-width: 700px) {
  .masthead {
    position: static;
  }

  .brandrow {
    grid-template-columns: 1fr auto;
  }

  .rule {
    display: none;
  }

  .brand {
    grid-column: 1;
    justify-self: start;
  }

  .cta {
    grid-column: 2;
  }

  nav p {
    justify-content: flex-start;
  }

  .hero {
    min-height: 54vh;
  }

  .body div {
    scroll-margin-top: 16px;
  }
}

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