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

:root {
  --ink: #000000;
  --paper: #ffffff;
  --muted: #4a4a4a;
  --faint: #d6d6d6;
  --line: #000000;
  --pad: clamp(1rem, 4vw, 2.5rem);
  --wide: 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: "Plus Jakarta Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: .01em;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.1;
  margin: 0;
}

p { margin: 0 0 1rem; }
img { max-width: 100%; }

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 60;
  background: var(--ink);
  color: var(--paper);
  padding: .75rem 1.1rem;
  text-decoration: none;
  font-weight: 700;
}
.skip:focus { left: 0; }

/* ---------- 顶栏 ---------- */
.bar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem .75rem;
  padding: .55rem var(--pad);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.brand {
  order: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  text-decoration: none;
  padding: .2rem;
}

.brand-img {
  width: 36px;
  height: 36px;
  display: block;
  object-fit: contain;
  border: 1px solid var(--line);
}

.brand-txt {
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: .08em;
  border: 1px solid var(--line);
  padding: .35rem .5rem;
}

.find {
  order: 2;
  margin-left: auto;
  display: flex;
}

.find-in {
  font: inherit;
  font-size: 1rem;
  min-height: 44px;
  width: 9.5rem;
  padding: .45rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  outline-offset: 2px;
}
.find-in::placeholder { color: var(--muted); }

.pillnav {
  order: 3;
  width: 100%;
  display: flex;
  gap: .45rem;
  overflow-x: auto;
  padding-bottom: .2rem;
  scrollbar-width: none;
}
.pillnav::-webkit-scrollbar { display: none; }

.pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: .45rem 1rem;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: background-color .22s ease, color .22s ease;
}
.pill:hover,
.pill:focus-visible {
  background: var(--ink);
  color: var(--paper);
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  min-height: 78vh;
  min-height: 78svh;
  display: grid;
  align-items: end;
  padding: clamp(2.5rem, 10vw, 6rem) var(--pad) clamp(2rem, 7vw, 4.5rem);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.grid-bg {
  position: absolute;
  inset: 0;
  margin: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, .11) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, .11) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .35), #000);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .35), #000);
}

.hero-in {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--wide);
  margin: 0 auto;
  text-align: right;
}

.hero h1 {
  font-size: clamp(2.3rem, 8.4vw, 6.5rem);
  line-height: .98;
  letter-spacing: -.035em;
  margin-left: auto;
  max-width: 15ch;
  word-break: break-word;
}

.hero-desc {
  margin: clamp(1rem, 3vw, 1.75rem) 0 0 auto;
  padding-top: 1rem;
  max-width: 46ch;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
  text-align: right;
}

/* ---------- 正文布局 ---------- */
.spread {
  max-width: var(--wide);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 5rem) var(--pad);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
}

.side {
  align-self: start;
  border-top: 2px solid var(--line);
  padding-top: .9rem;
}

.side small {
  display: block;
  font-size: .8rem;
  letter-spacing: .22em;
  color: var(--muted);
  margin-bottom: .25rem;
}

.side h2 {
  font-size: 1.25rem;
  margin-bottom: .8rem;
}

.side-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .3rem .75rem;
}

.side-list a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: .3rem .75rem;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid var(--faint);
  border-radius: 999px;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.side-list a:hover,
.side-list a:focus-visible,
.side-list a.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

/* ---------- 正文内容 ---------- */
.content {
  counter-reset: sec;
  min-width: 0;
}

.content > article {
  counter-increment: sec;
  padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(2rem, 5vw, 3.5rem);
  border-top: 1px solid var(--line);
  scroll-margin-top: 7.5rem;
}

.content > article:first-child {
  border-top: 0;
  padding-top: 0;
}

.content h2 {
  font-size: clamp(1.45rem, 3.4vw, 2.3rem);
  margin-bottom: 1rem;
}

.content h2::before {
  content: counter(sec, decimal-leading-zero);
  display: block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .24em;
  color: var(--muted);
  margin-bottom: .55rem;
}

.content h3 {
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
  margin: 1.8rem 0 .6rem;
}

.content h4 {
  font-size: 1.05rem;
  margin: 1.4rem 0 .4rem;
}

.content p,
.content ul,
.content ol,
.content blockquote,
.content table,
.content figure {
  max-width: 68ch;
}

.content p {
  line-height: 1.85;
  color: #111;
}

.content ul,
.content ol {
  padding-left: 1.25rem;
  margin: 0 0 1.1rem;
}

.content li { margin-bottom: .4rem; }
.content li::marker { color: var(--ink); font-weight: 700; }

.content a {
  text-decoration: underline;
  text-underline-offset: .18em;
  text-decoration-thickness: 1px;
  transition: background-color .2s ease;
}
.content a:hover { background: var(--ink); color: var(--paper); }

.content strong { font-weight: 700; }

.content blockquote {
  margin: 1.5rem 0;
  padding: .2rem 0 .2rem 1.1rem;
  border-left: 3px solid var(--line);
  color: var(--muted);
  font-style: italic;
}

.content figure {
  margin: 1.6rem 0;
  border: 1px solid var(--line);
  padding: 0;
}

.content img {
  display: block;
  height: auto;
  border: 1px solid var(--line);
}

.content figure img { border: 0; }

.content figcaption {
  font-size: .9rem;
  color: var(--muted);
  padding: .6rem .8rem;
  border-top: 1px solid var(--faint);
}

.content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4rem 0;
  font-size: 1rem;
}

.content th,
.content td {
  border: 1px solid var(--line);
  padding: .6rem .8rem;
  text-align: left;
  vertical-align: top;
}

.content th { background: var(--ink); color: var(--paper); font-weight: 700; }

.content time {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

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

.content code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: .95em;
  border: 1px solid var(--faint);
  padding: .1em .35em;
}

/* ---------- 页脚 ---------- */
.foot {
  background: var(--ink);
  color: var(--paper);
  margin-top: clamp(2.5rem, 7vw, 5rem);
  padding: clamp(2rem, 5vw, 3.5rem) var(--pad) 1.4rem;
}

.foot a { color: var(--paper); text-decoration: none; }

.cta {
  max-width: var(--wide);
  margin: 0 auto clamp(2rem, 6vw, 3.5rem);
  border: 1px solid var(--paper);
  padding: clamp(1.4rem, 4vw, 2.5rem);
  display: grid;
  gap: 1rem;
  justify-items: start;
}

.cta small {
  font-size: .8rem;
  letter-spacing: .24em;
  color: var(--faint);
}

.cta h2 {
  font-size: clamp(1.8rem, 6vw, 3.6rem);
  line-height: 1;
  letter-spacing: -.03em;
}

.cta-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .5rem 1.4rem;
  font-size: 1rem;
  border: 1px solid var(--paper);
  border-radius: 999px;
  transition: background-color .22s ease, color .22s ease;
}
.cta-link:hover,
.cta-link:focus-visible {
  background: var(--paper);
  color: var(--ink);
}

.cols {
  max-width: var(--wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  border-top: 1px solid #3a3a3a;
  padding-top: 1.8rem;
}

.foot address {
  font-style: normal;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: .02em;
}

.brand-desc {
  margin-top: .6rem;
  max-width: 34ch;
  color: #c9c9c9;
  font-size: 1rem;
  line-height: 1.75;
}

.foot-nav dl {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .2rem 1rem;
}

.foot-nav dt,
.foot-nav dd { margin: 0; }

.foot-nav dl a,
.foot-ul a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 1rem;
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}

.foot-nav dl a:hover,
.foot-nav dl a:focus-visible,
.foot-ul a:hover,
.foot-ul a:focus-visible { border-color: var(--paper); }

.foot-ul {
  list-style: none;
  margin: .5rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.4rem;
}

.bar-bottom {
  max-width: var(--wide);
  margin: 2rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid #3a3a3a;
  text-align: center;
  font-size: .95rem;
  color: #b9b9b9;
}
.bar-bottom p { margin: 0; }

/* ---------- 滚动显现 ---------- */
.js-on .content > article {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s ease, transform .5s ease;
}
.js-on .content > article.is-in {
  opacity: 1;
  transform: none;
}

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

@media (min-width: 900px) {
  .bar {
    flex-wrap: nowrap;
    padding: .7rem var(--pad);
  }
  .find { order: 3; margin-left: 0; }
  .pillnav {
    order: 2;
    width: auto;
    flex: 1;
    justify-content: flex-end;
    overflow: visible;
  }
  .hero { min-height: 100vh; min-height: 100svh; }
  .spread {
    grid-template-columns: 232px minmax(0, 1fr);
    gap: clamp(2rem, 4vw, 4rem);
  }
  .side {
    position: sticky;
    top: 6.5rem;
  }
  .side-list { flex-direction: column; flex-wrap: nowrap; gap: .1rem; }
  .side-list a {
    width: 100%;
    border: 0;
    border-left: 1px solid var(--faint);
    border-radius: 0;
    padding: .45rem .7rem;
  }
  .side-list a:hover,
  .side-list a:focus-visible,
  .side-list a.is-active { border-left-color: var(--ink); }
}

@media (min-width: 1200px) {
  .hero h1 { font-size: clamp(3rem, 7.2vw, 7rem); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
  .js-on .content > article {
    opacity: 1;
    transform: none;
  }
}

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