@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Orbitron:wght@700;900&display=swap');

:root {
  --ink: #000000;
  --bg: #ffffff;
  --line: #000000;
  --soft: rgba(0, 0, 0, 0.14);
  --rail: 236px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'JetBrains Mono', ui-monospace, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

::selection {
  background: #000;
  color: #fff;
}

:focus-visible {
  outline: 2px solid #000;
  outline-offset: 3px;
}

.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail);
  padding: 26px 20px 32px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  background: var(--bg);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-family: 'Orbitron', 'JetBrains Mono', sans-serif;
  font-weight: 900;
  font-size: 15px;
  letter-spacing: 0.14em;
}

.brand .mark {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  font-size: 14px;
  letter-spacing: 0;
}

.brand .bn {
  word-break: break-word;
  line-height: 1.3;
}

.nav ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.nav li {
  margin: 0;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 4px;
  font-size: 16px;
  line-height: 1.4;
  border-bottom: 1px solid var(--soft);
  transition: padding-left 0.22s ease, background 0.22s ease, color 0.22s ease;
}

.nav a::before {
  content: "";
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  background: var(--ink);
  transition: background 0.22s ease;
}

.nav a .idx {
  font-family: 'Orbitron', 'JetBrains Mono', sans-serif;
  font-size: 11px;
  letter-spacing: 0.1em;
  opacity: 0.5;
}

.nav a:hover,
.nav a.on {
  background: var(--ink);
  color: var(--bg);
  padding-left: 10px;
}

.nav a:hover::before,
.nav a.on::before {
  background: var(--bg);
}

.nav a:hover .idx,
.nav a.on .idx {
  opacity: 0.8;
}

.stage {
  margin-left: var(--rail);
  min-width: 0;
}

.hero {
  position: relative;
  min-height: 70vh;
  display: grid;
  align-content: end;
  gap: 16px;
  padding: 64px 40px 48px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.ghost {
  position: absolute;
  top: 46%;
  left: 38px;
  transform: translateY(-50%);
  font-family: 'Orbitron', 'JetBrains Mono', sans-serif;
  font-weight: 900;
  font-size: clamp(64px, 15vw, 210px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  white-space: nowrap;
  opacity: 0.07;
  pointer-events: none;
  user-select: none;
  transition: opacity 0.26s ease;
}

.kicker {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.32em;
  font-family: 'Orbitron', 'JetBrains Mono', sans-serif;
}

.kicker::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 2px;
  margin-right: 10px;
  vertical-align: middle;
  background: var(--ink);
}

.hero h1 {
  margin: 0;
  max-width: 18ch;
  font-family: 'Orbitron', 'JetBrains Mono', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-weight: 900;
  font-size: clamp(2.4rem, 7.2vw, 6rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  word-break: break-word;
}

.lede {
  margin: 0;
  max-width: 46ch;
  font-size: 16px;
  line-height: 1.7;
  opacity: 0.82;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

.body {
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  gap: 48px;
  padding: 56px 0 72px;
  align-items: start;
}

.side {
  position: sticky;
  top: 28px;
  border-top: 2px solid var(--line);
  padding-top: 14px;
}

.side h2 {
  margin: 0 0 12px;
  font-family: 'Orbitron', 'JetBrains Mono', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3em;
}

.side h2 span {
  border-bottom: 2px solid var(--line);
  padding-bottom: 3px;
}

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

.side-list a {
  display: block;
  padding: 9px 0;
  min-height: 40px;
  font-size: 15px;
  line-height: 1.5;
  border-bottom: 1px solid var(--soft);
  transition: padding-left 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.side-list a:hover,
.side-list a.on {
  background: var(--ink);
  color: var(--bg);
  padding-left: 8px;
}

.prose {
  min-width: 0;
}

.prose section {
  border-top: 1px solid var(--line);
  padding: 40px 0 56px;
  scroll-margin-top: 20px;
}

.prose section:first-child {
  border-top: 0;
  padding-top: 0;
}

.prose h2 {
  margin: 0 0 20px;
  max-width: 24ch;
  font-family: 'Orbitron', 'JetBrains Mono', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-weight: 900;
  font-size: clamp(1.55rem, 3.6vw, 2.5rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
}

.prose h2 span {
  display: inline-block;
  padding-bottom: 3px;
  border-bottom: 5px solid var(--line);
}

.prose h3 {
  margin: 32px 0 12px;
  max-width: 28ch;
  font-family: 'Orbitron', 'JetBrains Mono', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 1.2rem;
  line-height: 1.35;
}

.prose h3 span {
  display: inline-block;
  padding-bottom: 2px;
  border-bottom: 2px solid var(--line);
}

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

.prose ul,
.prose ol {
  margin: 0 0 1.2em;
  padding-left: 1.35em;
  max-width: 66ch;
}

.prose li {
  margin: 0 0 0.5em;
}

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

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

.prose img {
  display: block;
  width: 100%;
  height: auto;
  margin: 24px 0;
  border: 1px solid var(--line);
}

.prose blockquote {
  margin: 24px 0;
  padding: 4px 0 4px 20px;
  border-left: 4px solid var(--line);
  font-size: 1.02rem;
}

.prose strong {
  font-weight: 700;
  border-bottom: 2px solid var(--line);
}

.prose time {
  font-family: 'Orbitron', 'JetBrains Mono', sans-serif;
  font-size: 13px;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 15px;
}

.prose th,
.prose td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
}

.foot {
  border-top: 2px solid var(--line);
  padding: 48px 40px 36px;
}

.foot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.foot h2 {
  margin: 0 0 14px;
  font-family: 'Orbitron', 'JetBrains Mono', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3em;
}

.foot h2 span {
  border-bottom: 2px solid var(--line);
  padding-bottom: 3px;
}

.foot dl {
  margin: 0;
}

.foot dt {
  font-size: 11px;
  letter-spacing: 0.2em;
  opacity: 0.6;
  margin-top: 12px;
}

.foot dd {
  margin: 4px 0 0;
  font-size: 15px;
  line-height: 1.6;
  word-break: break-word;
}

.foot dd.links a {
  display: block;
  padding: 9px 0;
  min-height: 40px;
  font-size: 15px;
  line-height: 1.5;
  border-bottom: 1px solid var(--soft);
  transition: padding-left 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.foot dd.links a:hover {
  background: var(--ink);
  color: var(--bg);
  padding-left: 8px;
}

.sub {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.sub input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
}

.sub button {
  height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--ink);
  color: var(--bg);
  font-family: inherit;
  font-size: 15px;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: background 0.22s ease, color 0.22s ease;
}

.sub button:hover {
  background: var(--bg);
  color: var(--ink);
}

.copy {
  max-width: 1200px;
  margin: 44px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-family: 'Orbitron', 'JetBrains Mono', sans-serif;
  font-size: 12px;
  letter-spacing: 0.14em;
}

.rv {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

@media (max-width: 900px) {
  .rail {
    position: static;
    width: auto;
    bottom: auto;
    padding: 14px 20px 0;
    gap: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow: visible;
  }

  .stage {
    margin-left: 0;
  }

  .nav ol {
    flex-direction: row;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav a {
    border-bottom: 0;
    border-left: 1px solid var(--soft);
    padding: 12px 14px;
    white-space: nowrap;
  }

  .nav li:first-child a {
    border-left: 0;
  }

  .nav a:hover,
  .nav a.on {
    padding-left: 14px;
  }

  .hero {
    min-height: 64vh;
    padding: 40px 20px 34px;
  }

  .ghost {
    left: 18px;
    font-size: clamp(52px, 20vw, 120px);
  }

  .wrap {
    padding: 0 20px;
  }

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

  .side {
    position: static;
  }

  .prose section {
    padding: 28px 0 38px;
  }

  .foot {
    padding: 32px 20px 28px;
  }

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

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

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

  .ghost {
    transition: none;
  }

  .nav a,
  .side-list a,
  .foot dd.links a {
    transition: none;
  }
}

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