@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,700;1,400&display=swap');

:root {
  --ink: #000000;
  --paper: #ffffff;
  --line: #000000;
  --soft: #6b6b6b;
  --sans: 'Plus Jakarta Sans', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
  --edge: clamp(16px, 4vw, 40px);
}

*,
*::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: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

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

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

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 顶栏 ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 65px;
  padding: 10px var(--edge);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.mark-glyph {
  display: inline-flex;
}

.mark-glyph svg,
.mark-glyph img {
  display: block;
  height: 22px;
  width: auto;
}

.drawer {
  position: relative;
}

.drawer summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 20px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  transition: background 0.22s ease, color 0.22s ease;
}

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

.drawer summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.22s ease;
}

.drawer[open] summary {
  background: var(--ink);
  color: var(--paper);
}

.drawer[open] summary::after {
  transform: translateY(2px) rotate(-135deg);
}

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

.drawer-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  width: min(76vw, 300px);
  max-height: min(68vh, 520px);
  overflow: auto;
  padding: 10px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 28px;
  display: grid;
  gap: 2px;
}

.drawer-menu li:nth-child(2) {
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.drawer-menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 16px;
  color: var(--ink);
  transition: background 0.2s ease, color 0.2s ease;
}

.drawer-menu a:hover {
  background: var(--ink);
  color: var(--paper);
}

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

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 10vh, 96px) var(--edge) clamp(36px, 9vh, 80px);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hero-mark {
  position: absolute;
  left: -0.06em;
  bottom: -0.14em;
  margin: 0;
  z-index: 0;
  font-size: clamp(66px, 17vw, 200px);
  line-height: 0.8;
  font-weight: 700;
  letter-spacing: -0.055em;
  white-space: nowrap;
  color: #000000;
  opacity: 0.07;
  pointer-events: none;
  will-change: transform;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-title {
  margin: 0;
  font-size: clamp(38px, 7.4vw, 86px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 700;
  max-width: 16ch;
}

.hero-lead {
  margin: clamp(18px, 2.4vw, 30px) 0 0;
  max-width: 44ch;
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.65;
  color: #141414;
}

/* ---------- 主体网格 ---------- */

.shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--edge) clamp(40px, 7vw, 80px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.index {
  position: sticky;
  top: 65px;
  z-index: 60;
  background: var(--paper);
  margin: 0 calc(-1 * var(--edge));
  padding: 10px var(--edge);
  border-bottom: 1px solid var(--line);
}

.index-eyebrow,
.index-title {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.index-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.index-list::-webkit-scrollbar {
  display: none;
}

.index-list li {
  counter-increment: ix;
  flex: 0 0 auto;
}

.index-list a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 0 15px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}

.index-list a::before {
  content: counter(ix, decimal-leading-zero);
  font-size: 14px;
  font-weight: 500;
  opacity: 0.5;
}

.index-list a:hover {
  background: var(--ink);
  color: var(--paper);
}

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

.prose {
  min-width: 0;
  padding-top: clamp(20px, 4vw, 44px);
}

.prose section {
  padding: clamp(28px, 4.5vw, 56px) 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 128px;
}

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

.prose h2 {
  margin: 0 0 16px;
  font-size: clamp(26px, 3.6vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 700;
  max-width: 24ch;
}

.prose h3 {
  margin: 30px 0 10px;
  font-size: clamp(19px, 2.2vw, 23px);
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.prose p {
  margin: 0 0 18px;
  max-width: 64ch;
  line-height: 1.78;
}

.prose ul,
.prose ol {
  margin: 0 0 18px;
  padding-left: 1.2em;
  max-width: 62ch;
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose li {
  margin: 0.4em 0;
}

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

.prose strong {
  font-weight: 700;
}

.prose blockquote {
  margin: 22px 0;
  padding: 4px 0 4px 18px;
  border-left: 3px solid var(--line);
  max-width: 60ch;
}

.prose figure {
  margin: 22px 0;
}

.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1.5px solid var(--line);
  border-radius: 28px;
}

.prose figcaption {
  margin-top: 8px;
  font-size: 15px;
  color: var(--soft);
}

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

.prose th,
.prose td {
  border-bottom: 1px solid #d4d4d4;
  padding: 10px;
  text-align: left;
}

.prose th {
  font-weight: 700;
}

.prose small {
  display: block;
  margin: 0 0 8px;
  font-size: 15px;
  letter-spacing: 0.16em;
  color: var(--soft);
}

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

/* ---------- 订阅 ---------- */

.signup {
  width: calc(100% - clamp(32px, 8vw, 80px));
  max-width: 1120px;
  margin: clamp(20px, 4vw, 40px) auto clamp(48px, 7vw, 72px);
  padding: clamp(22px, 4vw, 44px);
  border: 1.5px solid var(--line);
  border-radius: 28px;
}

.signup-eyebrow {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
  letter-spacing: 0.16em;
  color: var(--soft);
}

.signup-title {
  margin: 0;
  font-size: clamp(24px, 3.2vw, 34px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.signup-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.signup-form input {
  flex: 1 1 220px;
  min-height: 48px;
  padding: 0 18px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}

.signup-form input::placeholder {
  color: var(--ink);
  opacity: 0.45;
}

.signup-form button {
  min-height: 48px;
  padding: 0 30px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.signup-form button:hover {
  background: var(--paper);
  color: var(--ink);
}

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

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  padding: 20px var(--edge);
  border-top: 1px solid var(--line);
}

.foot p {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.foot small {
  font-size: 16px;
}

.foot small a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 2px;
  text-decoration: none;
}

.foot small a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------- 桌面 ---------- */

@media (min-width: 900px) {
  .shell {
    grid-template-columns: 232px minmax(0, 1fr);
    gap: clamp(32px, 5vw, 64px);
    padding-top: clamp(32px, 5vw, 60px);
  }

  .index {
    position: sticky;
    top: 96px;
    align-self: start;
    margin: 0;
    padding: 18px;
    border: 1.5px solid var(--line);
    border-radius: 28px;
    background: var(--paper);
  }

  .index-eyebrow {
    position: static;
    width: auto;
    height: auto;
    margin: 0 0 6px;
    padding: 0;
    clip: auto;
    overflow: visible;
    display: block;
    font-size: 15px;
    letter-spacing: 0.18em;
    color: var(--soft);
  }

  .index-title {
    position: static;
    width: auto;
    height: auto;
    margin: 0 0 14px;
    padding: 0;
    clip: auto;
    overflow: visible;
    font-size: 22px;
    line-height: 1.1;
    letter-spacing: -0.02em;
  }

  .index-list {
    flex-direction: column;
    gap: 1px;
    overflow: visible;
    padding: 0;
  }

  .index-list a {
    width: 100%;
    min-height: 40px;
    padding: 0 9px;
    border: 0;
    border-radius: 12px;
  }

  .prose {
    padding-top: 0;
  }

  .prose section {
    scroll-margin-top: 96px;
  }

  .prose h2 {
    max-width: 22ch;
  }
}

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

.js .prose section {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
}

.js .prose section.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

  .js .prose section {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-mark {
    transform: none !important;
  }
}

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