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

:root {
  --acid: #80ff00;
  --neon: #00ff00;
  --ink: #1f2617;
  --paper: #eef3e2;
  --glass: rgba(255, 255, 255, .58);
  --dim: rgba(31, 38, 23, .28);
  --deep: #3a5a12;
}

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

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

body {
  margin: 0;
  padding-bottom: 104px;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.75 Inter, system-ui, -apple-system, "Segoe UI", "Noto Sans SC", "PingFang SC", sans-serif;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(31, 38, 23, .16) 1px, transparent 1px);
  background-size: 16px 16px;
  opacity: .55;
}

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

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

::selection { background: var(--neon); color: var(--ink); }

a:focus-visible, button:focus-visible {
  outline: 3px solid var(--neon);
  outline-offset: 2px;
}

/* 顶部主视觉 */
.hero {
  position: relative;
  z-index: 1;
  overflow: hidden;
  min-height: 45vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 1rem 3.6rem;
  margin-bottom: 1.1rem;
  background: var(--acid);
  border-bottom: 6px solid var(--ink);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 30px), 0 100%);
}

.heroImg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .72;
  filter: saturate(155%) contrast(1.05);
  mix-blend-mode: multiply;
}

.ghost {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  z-index: 1;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  font-size: clamp(2.4rem, 13vw, 8rem);
  line-height: 1;
  letter-spacing: .03em;
  white-space: nowrap;
  opacity: .17;
  pointer-events: none;
}

.heroText {
  position: relative;
  z-index: 2;
  max-width: 58ch;
}

.hero h1 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  font-size: clamp(2.1rem, 6.6vw, 4rem);
  line-height: 1.06;
  letter-spacing: -.01em;
  text-wrap: balance;
}

.lede {
  margin: 1rem auto 0;
  max-width: 50ch;
  padding: .6rem .9rem;
  background: rgba(255, 255, 255, .62);
  backdrop-filter: blur(9px) saturate(160%);
  -webkit-backdrop-filter: blur(9px) saturate(160%);
  border: 2px solid var(--ink);
  font-size: 1rem;
  line-height: 1.65;
}

.sticker {
  position: absolute;
  z-index: 3;
  font-size: 1.2rem;
  line-height: 1;
  padding: .32rem .42rem;
  background: var(--neon);
  border: 3px solid var(--ink);
  transform: rotate(var(--rot, 7deg));
  animation: jit 3.4s ease-in-out infinite;
}

.s1 { top: 11%; left: 6%; }
.s2 { bottom: 21%; right: 8%; background: #fff; animation-delay: -1.1s; }
.s3 { top: 24%; right: 14%; animation-delay: -2.2s; }

@keyframes jit {
  50% { transform: rotate(calc(var(--rot, 7deg) * -1)) translateY(-5px); }
}

/* 跑马灯 */
.ticker {
  position: relative;
  z-index: 1;
  overflow: hidden;
  background: var(--ink);
  color: var(--neon);
  border-block: 3px solid var(--ink);
  padding: .5rem 0;
  font-family: "Playfair Display", Georgia, serif;
  letter-spacing: .16em;
}

.run {
  display: flex;
  gap: 2rem;
  width: max-content;
  font-size: .95rem;
  white-space: nowrap;
  animation: slide 28s linear infinite;
}

.run span { padding-inline: .5rem; }

@keyframes slide {
  to { transform: translateX(-50%); }
}

/* 骨架 */
.wrap {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.5rem clamp(.85rem, 3vw, 2rem) 2rem;
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

/* 侧栏 */
.rail {
  position: sticky;
  top: 1rem;
}

.rail .box {
  background: var(--glass);
  backdrop-filter: blur(10px) saturate(160%);
  -webkit-backdrop-filter: blur(10px) saturate(160%);
  border: 3px solid var(--ink);
  padding: .9rem .85rem 1rem;
  transform: rotate(-1.2deg);
  box-shadow: 5px 6px 0 rgba(31, 38, 23, .16);
}

.rail h2 {
  margin: 0 0 .4rem;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.05rem;
  letter-spacing: .14em;
}

.rail hr {
  border: 0;
  height: 5px;
  background: var(--acid);
  margin: 0 0 .6rem;
}

.rail ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .1rem;
}

.rail a {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-height: 40px;
  padding: .25rem .2rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 15.5px;
  line-height: 1.4;
  border-bottom: 1px dashed var(--dim);
}

.rail b {
  font-family: "Playfair Display", Georgia, serif;
  font-size: .8rem;
  color: var(--deep);
  min-width: 1.7em;
}

.rail a:hover { background: var(--acid); }

/* 正文 */
.doc {
  min-width: 0;
}

.prose {
  background: var(--glass);
  backdrop-filter: blur(11px) saturate(150%);
  -webkit-backdrop-filter: blur(11px) saturate(150%);
  border: 3px solid var(--ink);
  border-radius: 0;
  padding: 1.2rem clamp(.9rem, 2.4vw, 1.9rem) 1.6rem;
  box-shadow: 7px 8px 0 rgba(31, 38, 23, .14);
}

.prose section {
  padding: 1.5rem 0 1.8rem;
  border-bottom: 2px dashed var(--dim);
}

.prose section[id] { scroll-margin-top: 1.4rem; }

.prose section:last-child { border-bottom: 0; padding-bottom: .4rem; }

.prose h2 {
  margin: 0 0 .5rem;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.55rem, 3.9vw, 2.35rem);
  line-height: 1.16;
  letter-spacing: -.005em;
  text-wrap: balance;
}

.prose h3 {
  margin: 1.6rem 0 .4rem;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 600;
  font-size: 1.28rem;
  line-height: 1.3;
}

.prose hr {
  border: 0;
  height: 6px;
  max-width: 118px;
  background: var(--neon);
  margin: .5rem 0 1.1rem;
}

.prose p {
  margin: 0 0 1rem;
  font-size: 17px;
  line-height: 1.86;
}

.prose ul, .prose ol {
  margin: 0 0 1.1rem;
  padding-left: 1.4rem;
  line-height: 1.8;
}

.prose li { margin-bottom: .4rem; }

.prose ul li::marker { color: var(--deep); }

.prose strong {
  background: linear-gradient(transparent 62%, var(--acid) 62%);
  font-weight: 600;
}

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

.prose a:hover { background: var(--neon); color: var(--ink); }

.prose blockquote {
  margin: 1.2rem 0;
  padding: .8rem 1rem;
  background: rgba(255, 255, 255, .66);
  border-left: 9px solid var(--acid);
}

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

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .92em;
  background: rgba(31, 38, 23, .1);
  padding: .1em .34em;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 16px;
}

.prose th, .prose td {
  border: 2px solid var(--ink);
  padding: .4rem .5rem;
  text-align: left;
}

.prose img { display: block; margin: 1rem 0; border: 3px solid var(--ink); }

.prose figure { margin: 1rem 0; }

.prose figcaption { font-size: 14px; color: #4a5a3a; }

/* 底部固定导航 */
nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background: rgba(238, 243, 226, .84);
  backdrop-filter: blur(14px) saturate(170%);
  -webkit-backdrop-filter: blur(14px) saturate(170%);
  border-top: 3px solid var(--ink);
  padding: .5rem .5rem calc(.5rem + env(safe-area-inset-bottom));
}

nav ol {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .3rem;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 .3rem;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}

nav ol::-webkit-scrollbar { display: none; }

nav li { flex: 0 0 auto; }

nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: .35rem .8rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #fbfdf4;
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

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

.navMark a {
  background: var(--ink);
  color: var(--neon);
  font-family: "Playfair Display", Georgia, serif;
  letter-spacing: .08em;
  border-color: var(--ink);
}

.navMark a:hover { background: var(--deep); color: #fff; }

/* 页脚 */
footer {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: .2rem .8rem;
  margin-top: 1.4rem;
  padding: 1.15rem .9rem;
  background: var(--acid);
  border-top: 4px solid var(--ink);
  text-align: center;
}

footer p {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1rem;
  letter-spacing: .04em;
}

footer small {
  font-size: .84rem;
  letter-spacing: .18em;
  color: var(--deep);
}

/* 滚动揭示 */
.rv {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s ease;
}

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

@media (max-width: 860px) {
  .wrap {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding-top: 1.1rem;
  }

  .rail { position: static; }

  .rail .box { transform: none; box-shadow: 4px 4px 0 rgba(31, 38, 23, .14); }

  .rail ol {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    gap: .3rem;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .rail ol::-webkit-scrollbar { display: none; }

  .rail a {
    border: 2px solid var(--ink);
    border-radius: 999px;
    padding: .3rem .7rem;
    min-height: 40px;
    background: #fbfdf4;
  }
}

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

  .hero { padding: 2rem .9rem 3rem; min-height: 48vh; }

  .hero h1 { font-size: clamp(1.8rem, 8.6vw, 2.6rem); }

  .lede { font-size: .95rem; }

  .s3 { display: none; }

  nav ol { justify-content: flex-start; }

  .prose { padding: 1rem .85rem 1.3rem; box-shadow: 5px 6px 0 rgba(31, 38, 23, .14); }
}

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

  .run, .sticker { animation: none; }

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

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