:root {
  --ink: #000000;
  --paper: #ffffff;
  --hair: #d6d6d6;
  --font-h: "Lexend", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-b: "Source Sans 3", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  padding-bottom: 136px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-b);
  font-size: 17px;
  line-height: 1.68;
  font-weight: 400;
  overflow-x: hidden;
}

img {
  max-width: 100%;
}

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

.kicker {
  display: block;
  font-family: var(--font-h);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100svh;
  border-bottom: 2px solid var(--ink);
}

.hero-art {
  margin: 0;
  background: var(--ink);
  overflow: hidden;
  display: block;
}

.hero-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.06);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 5vw, 80px);
  min-width: 0;
}

.hero-h1 {
  font-family: var(--font-h);
  font-weight: 700;
  font-size: clamp(2.2rem, 6.2vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0 0 26px;
  word-break: break-word;
}

.hero-h2 {
  font-family: var(--font-h);
  font-weight: 400;
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  letter-spacing: 0.08em;
  margin: -4px 0 0;
}

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

.wrap {
  width: min(1260px, 100%);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 44px);
}

.body-grid {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 60px);
  align-items: start;
  padding-block: clamp(32px, 5vw, 68px);
}

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

.rail {
  position: sticky;
  top: 24px;
  border-top: 3px solid var(--ink);
  padding-top: 12px;
}

.rail-h {
  font-family: var(--font-h);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin: 4px 0 10px;
}

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

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

.rail-nav a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 6px 2px;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.rail-nav a:hover,
.rail-nav a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}

/* ---------- content ---------- */

.content {
  min-width: 0;
}

.content > div {
  padding-block: clamp(28px, 4vw, 46px);
  border-top: 1px solid var(--ink);
  scroll-margin-top: 20px;
}

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

.content h2 {
  font-family: var(--font-h);
  font-size: clamp(1.5rem, 3.4vw, 2.35rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: 0 0 16px;
}

.content h3 {
  font-family: var(--font-h);
  font-size: 1.18rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 26px 0 10px;
}

.content p {
  margin: 0 0 16px;
  max-width: 66ch;
}

.content > div:first-child > p:first-of-type::first-letter {
  float: left;
  font-family: var(--font-h);
  font-weight: 700;
  font-size: 3.5em;
  line-height: 0.84;
  padding: 8px 10px 0 0;
}

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

.content li {
  margin-bottom: 8px;
}

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

.content strong {
  font-weight: 700;
}

.content blockquote {
  margin: 30px 0;
  padding: 20px 0 18px;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  font-family: var(--font-h);
  font-size: clamp(1.12rem, 2.4vw, 1.55rem);
  line-height: 1.36;
  letter-spacing: -0.012em;
}

.content blockquote p {
  margin: 0;
  max-width: none;
}

.content figure {
  margin: 26px 0;
}

.content figure img {
  display: block;
  width: 100%;
  height: auto;
  filter: grayscale(1);
}

.content figcaption {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--ink);
  font-size: 0.84rem;
  letter-spacing: 0.05em;
}

.content table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin: 20px 0;
}

.content th,
.content td {
  border-bottom: 1px solid var(--ink);
  padding: 10px 12px;
  text-align: left;
  white-space: nowrap;
}

.content pre {
  overflow-x: auto;
  padding: 16px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.9rem;
}

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

/* ---------- fixed footer bar ---------- */

.sitefoot {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  background: var(--ink);
  color: var(--paper);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas:
    "l b r"
    "c c c";
  align-items: center;
  gap: 0 clamp(10px, 3vw, 40px);
  padding: 8px clamp(14px, 3vw, 42px) calc(10px + env(safe-area-inset-bottom));
}

.fd-left {
  grid-area: l;
}

.fd-brand {
  grid-area: b;
}

.fd-right {
  grid-area: r;
}

.fd-cta {
  grid-area: c;
}

.sitefoot dl {
  display: flex;
  flex-wrap: wrap;
  gap: 0 clamp(10px, 2vw, 22px);
  margin: 0;
}

.fd-right dl {
  justify-content: flex-end;
}

.sitefoot dt {
  margin: 0;
}

.sitefoot a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 2px;
  color: var(--paper);
  font-family: var(--font-h);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.sitefoot a:hover,
.sitefoot a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 2px;
}

.brand {
  justify-content: center;
  min-height: 40px;
  padding: 0 12px;
  font-family: var(--font-h);
  font-size: clamp(0.95rem, 2vw, 1.12rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.cr {
  margin: 0;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-align: center;
  opacity: 0.7;
}

.sitefoot .cta {
  justify-content: center;
  margin-top: 10px;
  min-height: 54px;
  background: var(--paper);
  color: var(--ink);
  font-size: clamp(0.95rem, 3vw, 1.5rem);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-decoration: none;
}

.sitefoot .cta:hover,
.sitefoot .cta:focus-visible {
  text-decoration: none;
  background: var(--paper);
  color: var(--ink);
  outline: 2px solid var(--paper);
  outline-offset: 3px;
}

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

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- narrow ---------- */

@media (max-width: 860px) {
  .body-grid {
    grid-template-columns: 196px minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  body {
    padding-bottom: 152px;
    font-size: 16.5px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 100vh;
    min-height: 100svh;
  }

  .hero-copy {
    padding: 40px 20px 26px;
    justify-content: flex-start;
  }

  .hero-art {
    min-height: 168px;
  }

  .hero-h1 {
    font-size: clamp(1.95rem, 8.8vw, 2.9rem);
    margin-bottom: 20px;
  }

  .body-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
    padding-block: 30px;
  }

  .rail {
    position: static;
  }

  .rail-nav ol {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
  }

  .rail-nav li:last-child {
    border-bottom: 0;
  }

  .content p,
  .content ul,
  .content ol {
    max-width: none;
  }

  .sitefoot {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "b b"
      "l r";
    padding: 6px 12px calc(8px + env(safe-area-inset-bottom));
  }

  .fd-brand {
    border-bottom: 1px solid rgba(255, 255, 255, 0.35);
    padding-bottom: 4px;
  }

  .fd-cta {
    display: none;
  }

  .fd-left dl,
  .fd-right dl {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 8px;
  }

  .fd-right dl {
    justify-content: flex-start;
  }

  .sitefoot a {
    min-height: 40px;
    font-size: 0.8rem;
    justify-content: flex-start;
  }
}

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

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

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