@import url('https://fonts.googleapis.com/css2?family=Cormorant+Infant:wght@300;400;500;600;700&family=Great+Vibes&display=swap');

:root {
  --ink: #000000;
  --green: #00ff80;
  --blue: #0000ff;
  --fg: #f2fff8;
  --dim: #9db8aa;
  --maxw: 1180px;
  --edge: 3px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--ink);
  scroll-behavior: smooth;
  scroll-padding-bottom: 7rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding-bottom: 7.5rem;
  background: var(--ink);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.75;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: linear-gradient(to right, rgba(0, 255, 128, 0.08) 1px, transparent 1px);
  background-size: 25% 100%;
}

main,
.foot,
.bar,
.mark {
  position: relative;
}

main,
.foot {
  z-index: 1;
}

h1,
h2,
h3 {
  font-family: "Cormorant Infant", Georgia, "Songti SC", "SimSun", serif;
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}

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

.mark {
  position: fixed;
  top: 0.7rem;
  right: 0.7rem;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--green);
  color: var(--ink);
  border: var(--edge) solid var(--blue);
  text-decoration: none;
  font-family: "Cormorant Infant", Georgia, serif;
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1;
  transition: none;
}

.mark:hover,
.mark:focus-visible {
  background: var(--blue);
  color: var(--green);
  border-color: var(--green);
}

/* 顶部大块 */
.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 45vh;
  padding: 5.5rem 1.25rem 3rem;
  border-bottom: var(--edge) solid var(--green);
}

.hero::before {
  content: "01";
  position: absolute;
  top: -0.15em;
  right: 0.1em;
  z-index: 0;
  font-family: "Cormorant Infant", Georgia, serif;
  font-weight: 700;
  font-size: clamp(7rem, 30vw, 19rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2px rgba(0, 255, 128, 0.4);
  pointer-events: none;
}

.hero-in {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  max-width: 62rem;
  margin: 0 auto;
  text-align: center;
}

.seal {
  margin: 0;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  background: var(--green);
  color: var(--ink);
  border: var(--edge) solid var(--blue);
  overflow: hidden;
  font-family: "Cormorant Infant", Georgia, serif;
  font-weight: 700;
  font-size: 2.4rem;
  line-height: 1;
}

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

.hero-txt {
  min-width: 0;
  max-width: 46rem;
}

h1 {
  font-size: clamp(2.1rem, 7vw, 4.4rem);
  margin: 0;
}

.lead {
  margin: 0.9rem auto 0;
  max-width: 42rem;
  color: var(--dim);
  font-size: 1rem;
  line-height: 1.7;
}

/* 正文 + 右侧栏 */
.body {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 17rem;
  gap: 3rem;
  align-items: start;
}

.prose {
  min-width: 0;
  counter-reset: chap;
}

.prose > section {
  position: relative;
  counter-increment: chap;
  padding: 2.6rem 0 2.8rem;
  border-bottom: var(--edge) solid var(--green);
  scroll-margin-top: 6rem;
  scroll-margin-bottom: 7rem;
}

.prose > section:last-child {
  border-bottom: 0;
}

.prose > section::before {
  content: "0" counter(chap);
  position: absolute;
  top: 1.5rem;
  right: 0;
  font-family: "Cormorant Infant", Georgia, serif;
  font-weight: 700;
  font-size: clamp(2.1rem, 6vw, 3.6rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(0, 255, 128, 0.55);
  pointer-events: none;
}

.prose h2 {
  padding-right: 4.6rem;
  font-size: clamp(1.6rem, 3.6vw, 2.4rem);
  margin-bottom: 0.35rem;
}

.prose h3 {
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
  margin-top: 1.6rem;
}

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

.prose ul,
.prose ol {
  margin: 0 0 1.2em;
  padding-left: 1.4rem;
  max-width: 68ch;
}

.prose li {
  margin-bottom: 0.5em;
}

.prose a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.prose strong {
  color: var(--green);
}

.prose blockquote {
  margin: 1.4rem 0;
  padding: 0.9rem 1.1rem;
  border-left: 6px solid var(--blue);
  background: rgba(0, 255, 128, 0.06);
}

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

.prose img {
  max-width: 100%;
  height: auto;
  display: block;
  border: var(--edge) solid var(--green);
}

.prose figure {
  margin: 1.4rem 0;
}

.prose figcaption {
  margin-top: 0.5rem;
  font-size: 0.86rem;
  color: var(--dim);
}

hr {
  border: 0;
  border-top: var(--edge) solid var(--green);
  margin: 0.4rem 0 1.6rem;
}

/* 右侧栏 */
.rail {
  position: sticky;
  top: 5.5rem;
  border: var(--edge) solid var(--blue);
  background: var(--ink);
  padding: 1rem 1.1rem 1.5rem;
  scroll-margin-top: 5.5rem;
}

.rail h2 {
  font-size: 1.4rem;
  margin: 0 0 0.3rem;
}

.rail hr {
  border-top: var(--edge) solid var(--blue);
  margin: 0.3rem 0 0.9rem;
}

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

.rail-list li {
  border-bottom: 2px dashed rgba(0, 255, 128, 0.35);
}

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

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0.45rem 0.4rem;
  margin: 0 -0.4rem;
  color: var(--fg);
  text-decoration: none;
  font-size: 0.96rem;
  line-height: 1.4;
}

.rail-list a::before {
  content: "◆";
  color: var(--green);
  font-size: 0.62em;
  margin-right: 0.55em;
}

.rail-list a:hover,
.rail-list a:focus-visible {
  background: var(--green);
  color: var(--ink);
}

.rail-list a:hover::before,
.rail-list a:focus-visible::before {
  color: var(--ink);
}

/* 页脚 */
.foot {
  max-width: var(--maxw);
  margin: 3.5rem auto 0;
  padding: 2rem 1.25rem 2.5rem;
  border-top: var(--edge) solid var(--green);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem 2rem;
  align-items: start;
}

.cta {
  grid-column: 1 / -1;
  margin: 0;
}

.cta a {
  display: block;
  background: var(--blue);
  color: var(--green);
  border: var(--edge) solid var(--green);
  padding: 1.1rem 1.2rem;
  text-align: center;
  text-decoration: none;
  font-family: "Cormorant Infant", Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 5vw, 2.6rem);
  line-height: 1.2;
  letter-spacing: 0.04em;
}

.cta a:hover,
.cta a:focus-visible {
  background: var(--green);
  color: var(--ink);
}

.f-brand {
  margin: 0;
  font-family: "Cormorant Infant", Georgia, serif;
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.08em;
}

.f-links {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1rem;
}

.f-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.4rem 0;
  color: var(--fg);
  text-decoration: none;
  font-size: 0.96rem;
  border-bottom: 2px solid var(--blue);
}

.f-links a:hover,
.f-links a:focus-visible {
  color: var(--green);
  border-color: var(--green);
}

.foot small {
  grid-column: 1 / -1;
  color: var(--dim);
  font-size: 0.84rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(0, 255, 128, 0.3);
}

/* 底部固定条 */
.bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  background: var(--ink);
  border-top: var(--edge) solid var(--green);
}

.find {
  display: flex;
  gap: 0.3rem;
  flex: 0 0 auto;
  margin: 0;
}

.find-in {
  width: 8rem;
  height: 44px;
  padding: 0 0.6rem;
  background: var(--ink);
  color: var(--fg);
  border: 2px solid var(--blue);
  font: inherit;
  font-size: 0.94rem;
}

.find-in::placeholder {
  color: var(--dim);
}

.find-in:focus {
  outline: 2px solid var(--green);
  outline-offset: 1px;
}

.find-go {
  height: 44px;
  padding: 0 0.85rem;
  background: var(--blue);
  color: #ffffff;
  border: 2px solid var(--blue);
  font: inherit;
  font-size: 0.94rem;
  font-weight: 700;
  cursor: pointer;
}

.find-go:hover,
.find-go:focus-visible {
  background: var(--green);
  border-color: var(--green);
  color: var(--ink);
}

.nav {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.nav ul {
  display: flex;
  gap: 0.3rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.8rem;
  color: var(--fg);
  text-decoration: none;
  white-space: nowrap;
  font-size: 0.94rem;
  border: 2px solid transparent;
}

.nav a::before {
  content: "◆";
  color: var(--green);
  font-size: 0.6em;
  margin-right: 0.5em;
}

.nav a:hover,
.nav a:focus-visible {
  border-color: var(--green);
  color: var(--green);
}

/* 入场 */
.rv {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.14s steps(3), transform 0.14s steps(3);
}

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

@media (max-width: 900px) {
  .body {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }

  .rail {
    position: static;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .hero {
    min-height: 45vh;
    padding: 5rem 1rem 2.5rem;
  }

  .hero-in {
    flex-direction: column;
    gap: 1rem;
  }

  .lead {
    font-size: 0.96rem;
  }

  .find-in {
    width: 5.5rem;
  }

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

  .nav a {
    padding: 0 0.6rem;
  }
}

@media (max-width: 400px) {
  .find-in {
    width: 4.4rem;
  }
}

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

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

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