@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap');

:root {
  --ink: #000000;
  --paper: #ffffff;
  --rule: 3px solid #000000;
  --rail: 252px;
  --pad: clamp(16px, 4vw, 46px);
  --pix: 'Press Start 2P', 'VT323', ui-monospace, "PingFang SC", "Microsoft YaHei", monospace;
  --txt: 'VT323', ui-monospace, SFMono-Regular, Menlo, "PingFang SC", "Microsoft YaHei", monospace;
}

*, *::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: var(--txt);
  font-size: 19px;
  line-height: 1.7;
  overflow-x: hidden;
}

img { max-width: 100%; }
a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--pix);
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* ---------- 左侧固定导航 ---------- */
.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail);
  background: var(--ink);
  color: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 18px 16px 24px;
  z-index: 20;
  overflow-y: auto;
}

.brand {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  min-height: 46px;
  border: 3px solid var(--paper);
  color: var(--paper);
  text-decoration: none;
  line-height: 1;
}

.brand:hover { background: var(--paper); color: var(--ink); }
.mark { display: block; width: 30px; height: 30px; object-fit: contain; }
.mark-t { font-family: var(--pix); font-size: 12px; padding: 0 6px; }

.rail-h {
  margin: 0 0 10px;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.34em;
  color: #999;
}

.rail-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rail-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 15px;
  border: 2px solid var(--paper);
  border-radius: 999px;
  color: var(--paper);
  text-decoration: none;
  font-size: 17px;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

.rail-nav a:hover,
.rail-nav a.on { background: var(--paper); color: var(--ink); }

/* ---------- 右上主按钮 ---------- */
.cta {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 12px 22px;
  background: var(--ink);
  color: var(--paper);
  border: 3px solid var(--ink);
  text-decoration: none;
  font-size: 17px;
  letter-spacing: 0.08em;
}

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

/* ---------- 主区 ---------- */
main {
  margin-left: var(--rail);
  counter-reset: sec;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(16px, 3vw, 40px);
  align-items: end;
  min-height: 45vh;
  padding: 88px var(--pad) 0;
  border-bottom: var(--rule);
}

.hero-text {
  text-align: right;
  padding-bottom: clamp(20px, 4vw, 44px);
}

.hero h1 {
  margin: 0 0 0 auto;
  max-width: 15ch;
  font-size: clamp(30px, 4.6vw, 54px);
  line-height: 1.36;
}

.hero-dek {
  margin: 18px 0 0 auto;
  max-width: 30ch;
  padding-top: 14px;
  border-top: 2px solid var(--ink);
  font-size: 17px;
  line-height: 1.6;
}

.hero-fig {
  position: relative;
  margin: 0;
  min-height: 38vh;
  overflow: hidden;
}

.hero-fig img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 38vh;
  object-fit: cover;
  clip-path: polygon(0 0, 100% 0, 100% 84%, 0 100%);
}

.hero-fig figcaption {
  position: absolute;
  left: 0;
  bottom: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--pix);
  font-size: 11px;
  line-height: 1;
  padding: 8px 12px;
  letter-spacing: 0.16em;
}

/* ---------- 正文区块 ---------- */
main > div:not(.hero) {
  position: relative;
  counter-increment: sec;
  max-width: 980px;
  padding: clamp(34px, 6vw, 72px) var(--pad);
  border-bottom: var(--rule);
  scroll-margin-top: 110px;
}

main > div:not(.hero):nth-of-type(even) {
  margin-left: auto;
  margin-right: 0;
  border-left: var(--rule);
}

main > div:not(.hero)::before {
  content: counter(sec, decimal-leading-zero);
  display: block;
  font-family: var(--pix);
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.22em;
  margin-bottom: 16px;
}

main h2,
main h3 {
  margin: 0 0 0.7em;
  border-bottom: var(--rule);
  padding-bottom: 0.42em;
}

main h2 { font-size: clamp(20px, 2.6vw, 29px); line-height: 1.45; }
main h3 { font-size: clamp(17px, 2vw, 21px); line-height: 1.5; }
main h2 span, main h3 span { display: inline-block; }

main p { margin: 0 0 1.15em; }

main > div:not(.hero) > p:first-of-type::first-letter {
  float: left;
  font-family: var(--pix);
  font-size: clamp(34px, 5vw, 52px);
  line-height: 0.86;
  padding: 8px 12px 0 0;
}

main a {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

main a:hover { background: var(--ink); color: var(--paper); }

main ul, main ol { padding-left: 1.5em; margin: 0 0 1.2em; }
main li { margin-bottom: 0.45em; }

main blockquote {
  margin: 1.6em 0;
  padding: 0 0 0 1.2em;
  border-left: 7px solid var(--ink);
  font-size: 1.12em;
  line-height: 1.6;
}

main figure { margin: 1.6em 0; border-bottom: var(--rule); padding-bottom: 0.7em; }
main figcaption { font-size: 15px; color: #444; padding-top: 0.5em; }

main img { height: auto; }
main table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; font-size: 17px; }
main th, main td { border: 2px solid var(--ink); padding: 8px 10px; text-align: left; }
main code, main pre { font-family: ui-monospace, Menlo, monospace; font-size: 15px; }
main pre { overflow-x: auto; border: var(--rule); padding: 12px; }

/* ---------- 页脚 ---------- */
footer {
  display: grid;
  grid-template-columns: 1.4fr 1fr auto;
  gap: clamp(18px, 4vw, 48px);
  align-items: start;
  margin-left: var(--rail);
  padding: clamp(32px, 5vw, 58px) var(--pad);
  background: var(--ink);
  color: var(--paper);
  border-top: 7px solid var(--ink);
}

.foot-big {
  margin: 0 0 14px;
  font-family: var(--pix);
  font-size: clamp(26px, 5.4vw, 58px);
  line-height: 1;
  letter-spacing: 0.02em;
  word-break: break-word;
}

.foot-desc { margin: 0; max-width: 34ch; font-size: 16px; line-height: 1.65; color: #d8d8d8; }

.foot-h {
  margin: 0 0 8px;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.34em;
  color: #999;
}

.foot-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 20px;
}

.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 0;
  color: var(--paper);
  text-decoration: none;
  font-size: 16px;
  border-bottom: 1px solid #555;
}

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

.foot-copy {
  align-self: end;
  font-size: 14px;
  color: #999;
  white-space: nowrap;
}

/* ---------- 多栏正文（宽屏） ---------- */
@media (min-width: 1000px) {
  main > div:not(.hero) > p { column-count: 2; column-gap: 2.6rem; }
  main > div:not(.hero) > p:first-of-type { column-count: 1; }
}

/* ---------- 动效 ---------- */
.rv {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition: opacity 0.5s ease var(--d, 0ms), transform 0.5s ease var(--d, 0ms);
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; transition: none; }
  .hero-img { transform: none !important; }
}

/* ---------- 移动端 ---------- */
@media (max-width: 900px) {
  body { font-size: 18px; }

  .rail {
    position: static;
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    overflow: hidden;
  }

  .brand { min-width: 44px; min-height: 44px; flex: 0 0 auto; }

  .rail-h { display: none; }

  .rail-nav { flex: 1 1 auto; min-width: 0; overflow-x: auto; overflow-y: hidden; }
  .rail-nav ul { flex-direction: row; gap: 8px; padding-bottom: 4px; }
  .rail-nav a { white-space: nowrap; font-size: 15px; min-height: 44px; padding: 9px 13px; }

  .cta {
    position: static;
    display: flex;
    width: max-content;
    margin: 12px 16px 0 auto;
    min-height: 44px;
    padding: 10px 18px;
    font-size: 16px;
  }

  main { margin-left: 0; }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding: 26px var(--pad) 0;
    align-items: start;
  }

  .hero h1 { max-width: none; font-size: clamp(26px, 8vw, 38px); }
  .hero-text { padding-bottom: 18px; }
  .hero-dek { font-size: 16px; }
  .hero-fig { min-height: 34vh; }
  .hero-fig img { min-height: 34vh; }

  main > div:not(.hero) {
    max-width: none;
    margin-left: 0 !important;
    padding: clamp(28px, 8vw, 44px) var(--pad);
    border-left: 0 !important;
    scroll-margin-top: 20px;
  }

  main > div:not(.hero) > p { column-count: 1; }

  footer {
    margin-left: 0;
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .foot-nav ul { grid-template-columns: 1fr 1fr; }
  .foot-copy { align-self: start; }
}

@media (max-width: 420px) {
  .foot-nav ul { grid-template-columns: 1fr; }
  .hero h1 { font-size: 26px; }
}
</style>
===== END =====

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