:root {
  --ink: #000000;
  --paper: #ffffff;
  --u: 8px;
  --radius: 28px;
  --pad: clamp(16px, 4vw, 56px);
  --max: 1200px;
}

*,
*::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: "Archivo", "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Noto Sans SC", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  font-weight: 400;
  letter-spacing: 0.005em;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: "Space Grotesk", "Archivo", Helvetica, Arial, sans-serif;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

p {
  margin: 0 0 1em;
}

a {
  color: inherit;
  text-decoration: none;
}

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

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

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

/* ---------- 顶部：品牌行 + 胶囊菜单行 ---------- */
.topbar {
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
  padding: 0 var(--pad);
}

.brandrow {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 56px;
  border-bottom: 1px solid var(--ink);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-family: "Space Grotesk", "Archivo", Helvetica, Arial, sans-serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 15px;
  line-height: 1;
}

.brandrule {
  flex: 1;
  height: 1px;
  background: var(--ink);
  opacity: 0.28;
}

.pillnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
}

.pillist {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 16px;
  line-height: 1;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.pill:hover,
.pill:focus-visible {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-1px);
}

.nav-entry {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 16px;
  line-height: 1;
  transition: opacity 0.18s ease;
}

.nav-entry:hover,
.nav-entry:focus-visible {
  opacity: 0.76;
}

/* ---------- 主容器 ---------- */
.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ---------- 首屏 ---------- */
.hero {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 45vh;
  padding: calc(var(--u) * 4) 0 calc(var(--u) * 5);
  border-bottom: 2px solid var(--ink);
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.09) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.09) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: 0 0;
}

.hero h1 {
  margin: 0;
  text-align: right;
  font-size: clamp(2.3rem, 8.5vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  word-break: break-word;
}

/* ---------- 正文网格：左侧栏 + 正文 ---------- */
.board {
  display: grid;
  grid-template-columns: 1fr;
  gap: calc(var(--u) * 3);
  padding: calc(var(--u) * 4) 0;
}

.side {
  align-self: start;
  min-width: 0;
}

.side-h {
  margin: 0 0 8px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--ink);
  font-family: "Archivo", Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.24em;
}

.side-list li {
  border-bottom: 1px solid rgba(0, 0, 0, 0.16);
}

.side-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
  transition: padding-left 0.18s ease;
}

.side-list a:hover {
  padding-left: 8px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article {
  min-width: 0;
  counter-reset: sec;
}

.article > article {
  position: relative;
  padding: calc(var(--u) * 4) 0;
  border-top: 1px solid var(--ink);
  counter-increment: sec;
  scroll-margin-top: 150px;
}

.article > article:first-child {
  border-top: 2px solid var(--ink);
  padding-top: calc(var(--u) * 3);
}

.article > article::before {
  content: counter(sec, decimal-leading-zero);
  display: block;
  margin-bottom: 12px;
  font-family: "Space Grotesk", "Archivo", Helvetica, Arial, sans-serif;
  font-size: 13px;
  letter-spacing: 0.22em;
  opacity: 0.55;
}

.article h2 {
  margin: 0 0 16px;
  font-size: clamp(1.5rem, 3.4vw, 2.3rem);
}

.article h3 {
  margin: 24px 0 12px;
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
}

.article p {
  max-width: 68ch;
  margin: 0 0 1.05em;
}

.article ul,
.article ol {
  max-width: 68ch;
  margin: 0 0 1.2em;
  padding-left: 1.3em;
  list-style: disc;
}

.article ol {
  list-style: decimal;
}

.article li {
  margin-bottom: 0.4em;
}

.article a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.article a:hover {
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}

.article figure {
  margin: 24px 0;
  padding: 8px;
  border: 1px solid var(--ink);
  border-radius: 16px;
}

.article figure img {
  width: 100%;
  border-radius: 12px;
}

.article figcaption {
  padding-top: 8px;
  font-size: 16px;
  opacity: 0.7;
}

.article blockquote {
  margin: 24px 0;
  padding: 4px 0 4px 24px;
  border-left: 3px solid var(--ink);
}

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

.article th,
.article td {
  padding: 8px 10px;
  border: 1px solid var(--ink);
  text-align: left;
}

.article hr {
  border: 0;
  border-top: 1px solid var(--ink);
  margin: 24px 0;
}

/* ---------- 收尾块 ---------- */
.closing {
  display: grid;
  gap: 14px;
  max-width: 820px;
  padding: calc(var(--u) * 5) 0;
  border-top: 2px solid var(--ink);
}

.closing h2 {
  font-size: clamp(1.8rem, 4.4vw, 3rem);
}

.subtitle {
  max-width: 60ch;
  margin: 0;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.65;
  opacity: 0.82;
}

/* ---------- 页脚 ---------- */
.foot {
  margin-top: calc(var(--u) * 6);
  padding: calc(var(--u) * 5) var(--pad) calc(var(--u) * 3);
  border-top: 2px solid var(--ink);
}

.foot-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: var(--max);
  margin: 0 auto;
}

.faddr {
  font-family: "Space Grotesk", "Archivo", Helvetica, Arial, sans-serif;
  font-style: normal;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.flist li {
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
}

.flist a {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
}

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

.fcol-cta {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  min-height: 184px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
}

.cta-word {
  margin: 0;
  font-family: "Space Grotesk", "Archivo", Helvetica, Arial, sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.cta-btn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1;
}

.cta-btn:hover,
.cta-btn:focus-visible {
  background: #d8d8d8;
}

.foot-bottom {
  max-width: var(--max);
  margin: calc(var(--u) * 5) auto 0;
  padding-top: 16px;
  border-top: 1px solid var(--ink);
  text-align: center;
}

.copy {
  margin: 0;
  font-size: 16px;
  opacity: 0.75;
}

/* ---------- 动效 ---------- */
.stagger {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s cubic-bezier(0.2, 0.7, 0.3, 1), transform 0.55s cubic-bezier(0.2, 0.7, 0.3, 1);
}

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

/* ---------- 断点 ---------- */
@media (min-width: 720px) {
  .foot-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 900px) {
  .board {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: calc(var(--u) * 6);
  }

  .side {
    position: sticky;
    top: 156px;
  }
}

@media (min-width: 960px) {
  .topbar {
    position: sticky;
    top: 0;
    z-index: 20;
  }
}

@media (min-width: 1024px) {
  .foot-grid {
    grid-template-columns: 1.2fr 0.8fr 0.8fr 1.4fr;
    gap: 32px;
  }
}

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

  .hero {
    min-height: 0;
    padding: calc(var(--u) * 4) 0 calc(var(--u) * 4);
  }

  .hero h1 {
    font-size: clamp(2rem, 11vw, 3rem);
  }

  .pill {
    padding: 0 14px;
  }

  .nav-entry {
    margin-left: 0;
  }

  .foot {
    margin-top: calc(var(--u) * 5);
  }
}

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

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

  .pill,
  .side-list a {
    transition: none;
  }
}

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