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

:root {
  --paper: #fdfbf7;
  --wash: #f5f5f5;
  --ink: #1a1a1a;
  --line: #e0e0e0;
  --rule: #e4dfd5;
  --soft: #3c3c3c;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Atkinson Hyperlegible', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', 'Noto Sans SC', sans-serif;
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0.36;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.28'/%3E%3C/svg%3E");
}

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

a {
  color: inherit;
}

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

/* ---------- 顶部 ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.ticker {
  margin: 0;
  padding: 7px 18px;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.18em;
  text-align: center;
  color: var(--soft);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.nav p {
  display: flex;
  flex-wrap: wrap;
  gap: 0 2px;
  margin: 0;
}

.nav a {
  display: inline-block;
  min-height: 44px;
  padding: 12px 9px;
  font-size: 16px;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-decoration: none;
}

.brand .mark {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid var(--ink);
  background: var(--wash);
}

/* ---------- 版面 ---------- */

.page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 272px;
  gap: 54px;
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.body {
  min-width: 0;
}

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

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  min-height: 70vh;
  padding: 56px 0 0;
}

.badge {
  position: absolute;
  top: 22px;
  right: 0;
  margin: 0;
  padding: 5px 11px;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.12em;
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 4px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(29px, 5.4vw, 54px);
  line-height: 1.24;
  letter-spacing: -0.01em;
}

.hero h2 {
  margin: 4px 0 0;
  font-size: 16px;
  line-height: 1.6;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.hero .subtitle {
  margin: 0;
  max-width: 54ch;
  color: var(--soft);
  font-size: 17px;
}

.hero-img {
  margin-top: auto;
  width: 100%;
  max-height: 44vh;
  height: auto;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 4px;
  filter: grayscale(1) contrast(1.05);
}

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

.content {
  padding-top: 6px;
}

.content div {
  padding: 52px 0;
  border-top: 1px solid var(--rule);
  scroll-margin-top: 136px;
}

.content div:first-child {
  border-top: 0;
  padding-top: 10px;
}

.content h2 {
  margin: 0 0 14px;
  font-size: clamp(22px, 3.2vw, 31px);
  line-height: 1.34;
}

.content h3 {
  margin: 30px 0 10px;
  font-size: 20px;
  line-height: 1.45;
}

.content p {
  margin: 0 0 18px;
}

.content ul,
.content ol {
  margin: 0 0 18px;
  padding-left: 22px;
}

.content li {
  margin: 0 0 9px;
}

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

.content a:hover {
  background: var(--wash);
}

.content blockquote {
  margin: 26px 0;
  padding: 6px 0 6px 20px;
  border-left: 3px solid var(--ink);
  color: var(--soft);
}

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

.content table {
  width: 100%;
  margin: 0 0 20px;
  border-collapse: collapse;
}

.content th,
.content td {
  padding: 9px 11px;
  text-align: left;
  border: 1px solid var(--line);
}

.content th {
  background: var(--wash);
}

.content code {
  padding: 1px 5px;
  font-size: 16px;
  background: var(--wash);
  border: 1px solid var(--line);
}

.content hr {
  margin: 32px 0;
  border: 0;
  border-top: 1px solid var(--rule);
}

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

.side {
  position: sticky;
  top: 128px;
  padding-top: 56px;
}

.side h2 {
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0.18em;
}

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

.side a {
  display: block;
  min-height: 44px;
  padding: 11px 12px;
  font-size: 16px;
  text-decoration: none;
  background: var(--wash);
  border: 1px solid var(--line);
  border-bottom: 2px solid var(--ink);
  border-radius: 4px;
}

.side a:hover {
  background: var(--paper);
}

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

.foot {
  margin-top: 60px;
  border-top: 2px solid var(--ink);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--wash);
}

.cta-link {
  display: inline-block;
  padding: 6px 0;
  font-size: clamp(24px, 4.2vw, 36px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.06em;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.cta-link:hover {
  border-bottom-color: var(--ink);
}

.cta-top {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 12px 18px;
  font-size: 16px;
  text-decoration: none;
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 4px;
}

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

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

.foot-bottom address {
  font-style: normal;
  font-size: 16px;
  padding: 10px 0;
  color: var(--soft);
}

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

.foot-bottom a {
  display: inline-block;
  min-height: 44px;
  padding: 12px 10px;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

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

/* ---------- 滚动显现 ---------- */

html.js .reveal {
  opacity: 0;
  transform: translateY(8px);
}

html.js .reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.18s linear, transform 0.18s linear;
}

/* ---------- 响应式 ---------- */

@media (max-width: 980px) {
  .page {
    grid-template-columns: minmax(0, 1fr);
    gap: 38px;
  }

  .side {
    position: static;
    padding-top: 26px;
    border-top: 1px solid var(--rule);
  }
}

@media (max-width: 860px) {
  .bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .brand {
    order: -1;
    justify-content: center;
    padding: 10px 0;
  }

  .nav p {
    justify-content: center;
  }

  .ticker {
    white-space: normal;
    letter-spacing: 0.1em;
  }

  .cta {
    padding: 28px 20px;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 16px;
  }

  .hero {
    min-height: auto;
    padding: 34px 0 0;
  }

  .badge {
    position: static;
    align-self: flex-start;
    margin-bottom: 2px;
  }

  .hero h1 {
    font-size: 28px;
  }

  .hero-img {
    margin-top: 10px;
    max-height: none;
  }

  .content div {
    padding: 38px 0;
    scroll-margin-top: 158px;
  }

  .foot-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

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

  html.js .reveal {
    opacity: 1;
    transform: none;
  }

  * {
    transition: none !important;
    animation: none !important;
  }
}

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