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

:root {
  --ink: #000000;
  --paper: #ffffff;
  --line: rgba(0, 0, 0, 0.16);
  --line-strong: rgba(0, 0, 0, 0.42);
  --glass: rgba(255, 255, 255, 0.74);
  --soft: rgba(0, 0, 0, 0.05);
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --r: 28px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background-color: var(--paper);
  background-image: radial-gradient(rgba(0, 0, 0, 0.14) 1px, transparent 1px);
  background-size: 22px 22px;
  background-position: -11px -11px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.75;
  font-weight: 400;
  letter-spacing: 0.004em;
}

h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.3;
  margin: 0 0 0.7rem;
}

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--ink); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

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

.sr {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

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

/* ---------- 页面骨架 ---------- */

.shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.1rem 1rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.shell > .hero { order: 1; }
.rail { order: 2; }
.shell > div { order: 3; }

.shell > div {
  background: var(--glass);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  backdrop-filter: blur(10px) saturate(120%);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1.4rem 1.1rem;
  scroll-margin-top: 1rem;
  transition: border-color 0.22s ease, transform 0.22s ease;
}

.shell > div:hover { border-color: var(--line-strong); }

@media (min-width: 720px) {
  .shell > div { padding: 2.2rem 2rem; }
}

.shell div > h2 { font-size: 1.3rem; }
.shell div > h3 { font-size: 1.1rem; }

h2 > span, h3 > span { position: relative; }

/* ---------- 左侧目录 ---------- */

.rail {
  border-left: 2px solid var(--ink);
  padding: 0.2rem 0 0.4rem 0.9rem;
}

.rail-title {
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: none;
  margin: 0 0 0.55rem;
  font-weight: 600;
}

.rail-title > span::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  margin-right: 0.5rem;
  background: var(--ink);
  vertical-align: 2px;
}

.rail-title-2 { margin-top: 1.1rem; }

.rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: rail;
  display: flex;
  flex-direction: column;
}

.rail-list li { counter-increment: rail; }

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0.35rem 0.3rem;
  font-size: 0.95rem;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.22s ease, background 0.22s ease;
}

.rail-list a::before {
  content: counter(rail, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 0.75rem;
  margin-right: 0.55rem;
  color: rgba(0, 0, 0, 0.55);
}

.rail-list a:hover {
  padding-left: 0.7rem;
  background: var(--soft);
}

.rail-note {
  font-size: 0.9rem;
  line-height: 1.65;
  color: rgba(0, 0, 0, 0.78);
  margin: 0;
}

/* ---------- 首屏 ---------- */

.hero {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  border: 2px solid var(--ink);
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.86);
  padding: 1.5rem 1.15rem;
  scroll-margin-top: 1rem;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  align-items: flex-start;
  text-align: right;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  margin: 0;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  align-self: flex-start;
}

.hero h1 {
  font-size: clamp(1.85rem, 5.6vw, 3.1rem);
  line-height: 1.14;
  margin: 0;
  letter-spacing: -0.025em;
}

.lede {
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(0, 0, 0, 0.8);
  margin: 0;
  max-width: 46ch;
}

.hero-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0.2rem 0 0;
  justify-content: flex-end;
  width: 100%;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 0.95rem;
  text-decoration: none;
  background: transparent;
  transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-solid {
  background: var(--ink);
  color: var(--paper);
}

.btn-solid:hover { background: #1a1a1a; }

.hero-art {
  margin: 0;
  align-self: flex-end;
  width: 108px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r);
  padding: 0.7rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.5);
}

.hero-art .mark,
.hero-art .hero-img { width: 100%; height: auto; }

.hero-art figcaption {
  font-family: var(--mono);
  font-size: 0.66rem;
  line-height: 1.45;
  text-align: center;
  color: rgba(0, 0, 0, 0.6);
}

/* ---------- 正文排版 ---------- */

.page-body { display: block; }

.shell div ul,
.shell div ol { padding-left: 1.25rem; margin: 0 0 1rem; }
.shell div li { margin-bottom: 0.4rem; }

.shell div figure {
  margin: 1.1rem 0;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.6);
}

.shell div blockquote {
  margin: 1.1rem 0;
  padding: 0.6rem 0 0.6rem 1rem;
  border-left: 3px solid var(--ink);
  color: rgba(0, 0, 0, 0.82);
}

.shell div table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.shell div th,
.shell div td {
  border: 1px solid var(--line);
  padding: 0.5rem 0.6rem;
  text-align: left;
}

/* ---------- 页脚 ---------- */

.foot {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.2rem 1rem 8.5rem;
  border-top: 1px solid var(--line);
}

.foot-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.6rem;
}

.fmark {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  margin: 0 0 0.4rem;
}

.fdesc {
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(0, 0, 0, 0.76);
  margin: 0;
}

.ftitle {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  font-weight: 600;
  margin: 0 0 0.6rem;
}

.ftitle > span::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  margin-right: 0.5rem;
  border: 1px solid var(--ink);
  vertical-align: 1px;
}

.faddr {
  font-style: normal;
  font-family: var(--mono);
  font-size: 0.88rem;
  line-height: 1.7;
  margin-bottom: 0.7rem;
}

.subs {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 0.6rem;
}

.subs input {
  flex: 1 1 9rem;
  min-width: 0;
  min-height: 44px;
  padding: 0.4rem 0.9rem;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 999px;
}

.subs button {
  min-height: 44px;
  padding: 0.4rem 1.1rem;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.22s ease;
}

.subs button:hover { background: #1f1f1f; }

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

.flist a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 0.92rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

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

.foot-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  margin-top: 1.8rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.copy {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: rgba(0, 0, 0, 0.7);
}

.fbar-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.9rem;
  margin: 0;
  padding: 0;
}

.fbar-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 0.85rem;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.fbar-links a:hover { border-bottom-color: var(--ink); }

/* ---------- 底部固定导航条 ---------- */

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--ink);
}

.brand {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.6rem 0 0.25rem;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-right: 1px solid var(--line);
}

.dock-list {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0;
  padding: 0.1rem 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

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

.dock-list dt { margin: 0; }
.dock-list dd { margin: 0; display: none; }

.dock-list a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  padding: 0.35rem 0.7rem;
  font-size: 0.9rem;
  white-space: nowrap;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.dock-list a svg {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
}

.dock-list a:hover,
.dock-list a[aria-current="true"] {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

@media (min-width: 1000px) {
  .dock-list { gap: 0.4rem; }
  .dock-list dd {
    display: block;
    font-family: var(--mono);
    font-size: 0.72rem;
    color: rgba(0, 0, 0, 0.6);
    margin-right: 0.5rem;
    margin-left: -0.1rem;
    align-self: center;
  }
  .dock { padding: 0.45rem 1rem; gap: 0.7rem; }
}

/* ---------- 断点 ---------- */

@media (min-width: 620px) {
  .hero {
    flex-direction: row-reverse;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 2rem;
    min-height: 62vh;
  }
  .hero-copy { flex: 1 1 auto; }
  .hero-art { align-self: center; width: 140px; flex: 0 0 auto; }
  .foot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
}

@media (min-width: 980px) {
  .shell {
    display: grid;
    grid-template-columns: 236px minmax(0, 1fr);
    column-gap: 3rem;
    padding: 2.5rem 2rem 5rem;
    align-items: start;
  }
  .rail {
    grid-column: 1;
    grid-row: 1 / span 80;
    align-self: start;
    position: sticky;
    top: 1.5rem;
  }
  .shell > .hero,
  .shell > div { grid-column: 2; }
  .hero { min-height: 70vh; }
  .foot { padding: 2.6rem 2rem 8rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal,
  .reveal.in { opacity: 1; transform: none; transition: none; }
}

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

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

@media (max-width: 380px) {
  .hero h1 { font-size: 1.7rem; }
  .eyebrow { font-size: 0.72rem; }
}

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