:root {
  --sans: "Space Grotesk", "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --serif: Georgia, "Songti SC", "Noto Serif SC", "SimSun", serif;
  --pad: clamp(1rem, 4vw, 3.5rem);
  --ink: #000000;
  --paper: #ffffff;
}

*,
*::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.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
}

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

[id] {
  scroll-margin-top: 104px;
}

/* ---------- masthead ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem var(--pad);
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
}

.mark {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  background: var(--ink);
  color: var(--paper);
  border: 2px solid var(--ink);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1;
  text-decoration: none;
  overflow: hidden;
}

.mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.jump {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  justify-content: flex-end;
}

.jump-list {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: j;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.jump-list li {
  flex: 0 0 auto;
  counter-increment: j;
}

.jump-list li::before {
  content: counter(j, decimal-leading-zero);
  display: block;
  padding-left: 0.62rem;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  opacity: 0.5;
  line-height: 1;
  margin-bottom: 0.15rem;
}

.jump-list a {
  display: block;
  min-height: 40px;
  padding: 0.5rem 0.62rem 0.55rem;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  line-height: 1.35;
  white-space: nowrap;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

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

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: center;
  gap: 1rem;
  min-height: 64vh;
  padding: clamp(2.5rem, 7vw, 5rem) var(--pad) clamp(3.5rem, 9vw, 7rem);
  border-bottom: 2px solid var(--ink);
}

.hero-kicker {
  margin: 0;
  font-size: 0.74rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-weight: 600;
}

.hero-h1 {
  margin: 0;
  max-width: 20ch;
  font-size: clamp(2.1rem, 6.6vw, 4.9rem);
  line-height: 1.03;
  letter-spacing: -0.025em;
  font-weight: 700;
}

.hero-dek {
  margin: 0;
  max-width: 46ch;
  font-family: var(--serif);
  font-size: clamp(1rem, 2.1vw, 1.15rem);
  line-height: 1.8;
}

.hero-bg {
  position: absolute;
  left: -0.04em;
  right: 0;
  bottom: -0.16em;
  z-index: 0;
  font-size: clamp(4rem, 19vw, 15rem);
  line-height: 0.78;
  font-weight: 700;
  letter-spacing: -0.055em;
  white-space: nowrap;
  opacity: 0.09;
  pointer-events: none;
  user-select: none;
  will-change: transform;
}

.hero-bg span {
  margin-left: 0.15em;
}

.hero > *:not(.hero-bg) {
  position: relative;
  z-index: 1;
}

/* ---------- shell ---------- */

.shell {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: clamp(1.2rem, 3.5vw, 3.5rem);
  align-items: start;
  padding: clamp(1.5rem, 4vw, 3rem) var(--pad) clamp(2.5rem, 7vw, 5rem);
}

/* ---------- rail ---------- */

.rail {
  position: sticky;
  top: 100px;
  padding-right: 1rem;
  border-right: 1px solid var(--ink);
}

.rail-h {
  margin: 0 0 0.85rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.3em;
}

.rail-h span {
  display: inline-block;
}

.rail-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rail-list li {
  border-bottom: 1px solid var(--ink);
}

.rail-list a {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  min-height: 40px;
  padding: 0.6rem 0;
  font-size: 0.82rem;
  line-height: 1.4;
  text-decoration: none;
}

.rail-list a:hover .rail-t {
  text-decoration: underline;
}

.rail-n {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  opacity: 0.55;
  font-variant-numeric: tabular-nums;
}

/* ---------- div body ---------- */

.body {
  min-width: 0;
}

.body > article {
  padding-block: clamp(2rem, 5vw, 3.6rem);
  border-top: 2px solid var(--ink);
}

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

.body h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.9rem, 4.6vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.body h2 {
  margin: 0 0 0.9rem;
  font-size: clamp(1.35rem, 2.7vw, 2.05rem);
  line-height: 1.16;
  letter-spacing: -0.012em;
  font-weight: 700;
}

.body h3 {
  margin: 1.7rem 0 0.5rem;
  font-size: 1.06rem;
  letter-spacing: 0.02em;
  font-weight: 600;
}

.body h2 > span,
.body h3 > span {
  display: inline;
}

.body h2 > span::before {
  content: "";
  display: inline-block;
  width: 0.42em;
  height: 0.42em;
  margin-right: 0.5em;
  vertical-align: 0.08em;
  background: var(--ink);
}

.body p {
  margin: 0 0 1.1rem;
  max-width: 70ch;
  font-family: var(--serif);
  font-size: 1.03rem;
  line-height: 1.85;
}

.body article > p:first-of-type::first-letter {
  float: left;
  margin: 0.08em 0.12em 0 0;
  font-family: var(--sans);
  font-size: 2.9em;
  font-weight: 700;
  line-height: 0.82;
}

.body ul,
.body ol {
  margin: 0 0 1.2rem;
  padding-left: 1.15rem;
  max-width: 66ch;
}

.body li {
  margin: 0.4rem 0;
  line-height: 1.75;
}

.body a {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.body strong {
  font-weight: 700;
}

.body blockquote {
  margin: 1.8rem 0;
  padding: 0.9rem 1.2rem;
  border-left: 4px solid var(--ink);
  border-radius: 10px;
  background: #f2f2f2;
  font-family: var(--serif);
  font-size: 1.1rem;
  line-height: 1.7;
}

.body blockquote p {
  margin: 0 0 0.6rem;
  font-size: inherit;
  max-width: none;
}

.body blockquote p:last-child {
  margin-bottom: 0;
}

.body figure {
  margin: 1.8rem 0;
}

.body img {
  display: block;
  width: 100%;
  border-radius: 10px;
  filter: grayscale(1) contrast(1.04);
}

.body figcaption {
  margin-top: 0.5rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--ink);
  font-size: 0.76rem;
  letter-spacing: 0.03em;
  line-height: 1.6;
}

.body table {
  width: 100%;
  margin: 0 0 1.2rem;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.body th,
.body td {
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--ink);
  text-align: left;
}

.body hr {
  height: 0;
  margin: 2rem 0;
  border: 0;
  border-top: 1px solid var(--ink);
}

/* ---------- colophon ---------- */

.colophon {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(2rem, 6vw, 4rem) var(--pad) 1.2rem;
}

.cta {
  display: grid;
  gap: 1.2rem;
  padding-bottom: clamp(1.5rem, 4vw, 2.6rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

.cta-h {
  margin: 0;
  font-size: clamp(2.2rem, 11vw, 6.4rem);
  line-height: 0.86;
  letter-spacing: -0.045em;
  font-weight: 700;
  text-transform: uppercase;
}

.cta-h span {
  display: inline;
}

.cta-link {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 1.2rem;
  border: 1px solid var(--paper);
  border-radius: 10px;
  color: var(--paper);
  font-size: 0.84rem;
  letter-spacing: 0.14em;
  text-decoration: none;
}

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

.foot-row {
  display: grid;
  grid-template-columns: 1.3fr auto 1fr;
  gap: clamp(1rem, 4vw, 3rem);
  align-items: start;
  padding-top: 1.5rem;
}

.foot-mark {
  margin: 0 0 0.4rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.foot-desc {
  margin: 0;
  max-width: 34ch;
  font-size: 0.78rem;
  line-height: 1.7;
  opacity: 0.72;
}

.foot-nav ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.78rem;
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

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

.foot-copy {
  text-align: right;
  font-size: 0.72rem;
  opacity: 0.6;
}

.foot-copy p {
  margin: 0.9rem 0 0;
}

/* ---------- reveal ---------- */

.js .wait {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.js .wait.in {
  opacity: 1;
  transform: none;
}

.rail-list li:nth-child(1) { transition-delay: 0.02s; }
.rail-list li:nth-child(2) { transition-delay: 0.06s; }
.rail-list li:nth-child(3) { transition-delay: 0.1s; }
.rail-list li:nth-child(4) { transition-delay: 0.14s; }
.rail-list li:nth-child(5) { transition-delay: 0.18s; }
.rail-list li:nth-child(6) { transition-delay: 0.22s; }
.rail-list li:nth-child(7) { transition-delay: 0.26s; }

/* ---------- wide: editorial columns ---------- */

@media (min-width: 1180px) {
  .body > article {
    column-count: 2;
    column-gap: clamp(2rem, 4vw, 3.4rem);
    column-rule: 1px solid #d8d8d8;
  }

  .body > article > h1,
  .body > article > h2,
  .body > article > h3,
  .body > article > figure,
  .body > article > blockquote,
  .body > article > ul,
  .body > article > ol,
  .body > article > table,
  .body > article > pre,
  .body > article > hr {
    column-span: all;
  }

  .body p {
    max-width: none;
  }
}

/* ---------- tablet ---------- */

@media (max-width: 900px) {
  .jump {
    justify-content: flex-start;
    margin-left: 0;
  }

  .jump-list li::before {
    display: none;
  }

  .jump-list a {
    padding: 0.65rem 0.55rem;
    font-size: 0.76rem;
  }
}

/* ---------- mobile ---------- */

@media (max-width: 760px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding-top: 1rem;
  }

  .rail {
    position: static;
    border-right: 0;
    border-bottom: 1px solid var(--ink);
    padding: 0 0 0.9rem;
    margin-bottom: 1.4rem;
  }

  .rail-h {
    display: none;
  }

  .rail-list {
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    scrollbar-width: none;
  }

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

  .rail-list li {
    flex: 0 0 auto;
    border-bottom: 0;
  }

  .rail-list a {
    align-items: center;
    min-height: 42px;
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--ink);
    border-radius: 10px;
    font-size: 0.78rem;
  }

  .rail-n {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-block: 1.6rem 2.6rem;
  }

  .hero-bg {
    font-size: 26vw;
  }

  .body p {
    font-size: 1rem;
  }

  .body article > p:first-of-type::first-letter {
    font-size: 2.4em;
  }

  .foot-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }

  .foot-copy {
    text-align: left;
  }

  .foot-copy p {
    margin: 0.2rem 0 0;
  }
}

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

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

  .js .wait {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

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