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

:root {
  --ink: #1f2617;
  --ink-2: #26301c;
  --ink-3: #33401f;
  --lime: #80ff00;
  --green: #00ff00;
  --paper: #f4f8ec;
  --paper-2: #e6f0d6;
  --text: #e7f4d6;
  --muted: #b4c99a;
  --radius: 10px;
  --font: 'Lexend', 'Source Sans 3', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.62;
  color: var(--text);
  background:
    radial-gradient(circle at 1px 1px, rgba(128, 255, 0, .17) 1px, transparent 1px) 0 0 / 26px 26px,
    radial-gradient(70vw 62vh at 88% -10%, rgba(0, 255, 0, .16), transparent 72%),
    radial-gradient(60vw 50vh at -10% 40%, rgba(0, 255, 0, .08), transparent 70%),
    var(--ink);
  overflow-x: clip;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--lime); }
p { margin: 0; }
mark { background: var(--lime); color: var(--ink); }

/* ── 顶部细条 ───────────────────────────── */
.topline {
  background: var(--lime);
  color: var(--ink);
  border-bottom: 2px solid var(--ink);
  overflow: hidden;
}

.marquee {
  display: flex;
  white-space: nowrap;
  width: max-content;
  animation: slide 30s linear infinite;
  will-change: transform;
}

.marquee span {
  display: inline-block;
  padding: 7px 0;
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .16em;
}

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

/* ── 页头 ───────────────────────────────── */
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 18px;
  padding: 14px 22px;
  border-bottom: 2px dashed rgba(128, 255, 0, .38);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--paper);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: .01em;
}

.brand:hover { animation: jitter .4s ease; }
.brand:hover .mark { rotate: 8deg; }

.mark {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--lime);
  color: var(--ink);
  font-size: 1.1rem;
  rotate: -8deg;
  box-shadow: 3px 3px 0 var(--green);
  transition: rotate .2s ease;
}

.mark-sm { width: 28px; height: 28px; font-size: .95rem; }

img.mark { object-fit: contain; padding: 3px; }

@keyframes jitter {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  25% { transform: translate(-1px, 1px) rotate(-.7deg); }
  50% { transform: translate(1px, -1px) rotate(.6deg); }
  75% { transform: translate(-1px, 0) rotate(-.3deg); }
}

/* ── 折叠菜单 ───────────────────────────── */
.gnav { position: relative; }

.gnav > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 18px;
  border: 2px solid var(--lime);
  border-radius: 999px;
  color: var(--lime);
  font-weight: 600;
  cursor: pointer;
  background: rgba(128, 255, 0, .09);
  user-select: none;
}

.gnav > summary::-webkit-details-marker { display: none; }
.gnav > summary::after { content: "▾"; font-size: .8rem; }
.gnav[open] > summary::after { content: "▴"; }
.gnav > summary:hover { background: var(--lime); color: var(--ink); }

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

.gnav-list li a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: .98rem;
}

.gnav-list li a:hover {
  background: var(--lime);
  color: var(--ink);
  rotate: -2deg;
}

/* ── 粘性锚点条 ─────────────────────────── */
.rail {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  gap: 6px;
  padding: 8px 16px;
  overflow-x: auto;
  background: rgba(31, 38, 23, .95);
  backdrop-filter: blur(6px);
  border-bottom: 2px solid rgba(0, 255, 0, .45);
  scrollbar-width: none;
}

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

.rail-list { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }

.rail-list a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 13px;
  font-size: .95rem;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  border: 2px solid transparent;
  border-radius: 999px;
}

.rail-list a:hover {
  color: var(--ink);
  background: var(--green);
  border-color: var(--lime);
}

/* ── 首屏 ───────────────────────────────── */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: 34px;
  min-height: 70vh;
  padding: 44px 30px 58px;
  overflow: hidden;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(2.25rem, 6.4vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -.03em;
  color: #fff;
  rotate: -1.6deg;
  transform-origin: left center;
  text-shadow: 4px 4px 0 rgba(128, 255, 0, .55);
  overflow-wrap: anywhere;
}

.hero .lead {
  margin: 20px 0 26px;
  max-width: 46ch;
  font-size: 1.06rem;
  line-height: 1.68;
  color: #d5e6c0;
}

.start {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 26px;
  background: var(--lime);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: 6px 6px 0 var(--green);
  rotate: -2deg;
  transition: rotate .18s ease, box-shadow .18s ease, translate .18s ease;
}

.start::after { content: "➜"; }
.start:hover { rotate: 0deg; translate: -2px -2px; box-shadow: 10px 10px 0 var(--green); }

.hero-art {
  position: relative;
  margin: 0;
  border: 8px solid var(--paper);
  border-radius: 14px;
  background: var(--ink-2);
  box-shadow: 14px 14px 0 rgba(0, 255, 0, .34);
  rotate: 2deg;
  overflow: hidden;
}

.hero-art img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: saturate(160%);
}

.collage {
  position: relative;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  background: repeating-linear-gradient(45deg, #2a3420 0 12px, #1f2617 12px 24px);
}

.st {
  position: absolute;
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
  font-size: 1.7rem;
  border: 3px solid var(--ink);
  box-shadow: 0 0 0 6px rgba(0, 255, 0, .24);
}

.st-a { top: 14%; left: 12%; rotate: -12deg; animation: bob 5.5s ease-in-out infinite; }
.st-b { bottom: 13%; right: 15%; background: var(--green); rotate: 9deg; }
.st-c { top: 44%; right: 7%; width: 58px; height: 58px; font-size: 1.15rem; background: var(--paper); rotate: 20deg; }

@keyframes bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -12px; }
}

/* ── 主体网格 ───────────────────────────── */
.stage {
  display: grid;
  grid-template-columns: 296px minmax(0, 1fr);
  align-items: start;
  gap: 28px;
  padding: 8px 30px 72px;
}

.side {
  position: sticky;
  top: 64px;
  margin: 0;
  padding: 18px 18px 22px;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 9px 9px 0 rgba(0, 255, 0, .3);
  rotate: -.9deg;
}

.side h2 {
  margin: 0;
  font-size: 1.16rem;
  letter-spacing: .03em;
  display: inline-block;
  background: linear-gradient(transparent 58%, var(--lime) 58%);
}

.side .subtitle {
  margin: 6px 0 14px;
  padding-bottom: 10px;
  font-size: .98rem;
  color: #4c5a3f;
  border-bottom: 2px dashed #c3d4ac;
}

.side-list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }

.side-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 4px;
  color: var(--ink);
  text-decoration: none;
  font-size: .98rem;
  border-bottom: 1px solid #dde7cf;
}

.side-list a:hover { background: var(--lime); }
.side-list .num { font-weight: 700; font-size: .8rem; letter-spacing: .1em; color: #7c8e68; }

/* ── 正文 ───────────────────────────────── */
.prose {
  min-width: 0;
  counter-reset: sec;
}

.prose > article {
  position: relative;
  counter-increment: sec;
  margin: 0 0 26px;
  padding: 30px 28px 34px;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 0 20px 34px rgba(0, 0, 0, .38);
  scroll-margin-top: 88px;
  animation: rise .55s ease both;
}

.prose > article:nth-child(odd) { rotate: -.35deg; }
.prose > article:nth-child(even) { rotate: .35deg; }
.prose > article:nth-child(1) { animation-delay: .02s; }
.prose > article:nth-child(2) { animation-delay: .08s; }
.prose > article:nth-child(3) { animation-delay: .14s; }
.prose > article:nth-child(4) { animation-delay: .2s; }
.prose > article:nth-child(5) { animation-delay: .26s; }
.prose > article:nth-child(6) { animation-delay: .32s; }
.prose > article:nth-child(7) { animation-delay: .38s; }

.prose > article::before {
  content: counter(sec, decimal-leading-zero);
  position: absolute;
  top: -15px;
  left: 22px;
  padding: 2px 12px;
  background: var(--ink);
  color: var(--lime);
  font-weight: 700;
  font-size: .84rem;
  letter-spacing: .14em;
  border: 2px solid var(--lime);
  border-radius: 999px;
}

@keyframes rise {
  from { opacity: 0; translate: 0 22px; }
  to { opacity: 1; translate: 0 0; }
}

.prose h2 {
  display: inline-block;
  margin: 0 0 14px;
  font-size: clamp(1.4rem, 3.1vw, 1.95rem);
  line-height: 1.24;
  letter-spacing: -.01em;
  background: linear-gradient(transparent 62%, rgba(128, 255, 0, .8) 62%);
}

.prose h3 {
  margin: 26px 0 10px;
  font-size: 1.18rem;
  line-height: 1.35;
}

.prose p {
  margin: 0 0 1.05em;
  font-size: 1.03rem;
  line-height: 1.78;
  color: #28311f;
}

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

.prose ul,
.prose ol { margin: 0 0 1.1em; padding-left: 1.35em; color: #28311f; }
.prose li { margin-bottom: .5em; line-height: 1.72; }
.prose a { color: #1c4b00; text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--lime); }
.prose a:hover { background: var(--lime); }
.prose strong { background: linear-gradient(transparent 56%, rgba(0, 255, 0, .55) 56%); font-weight: 600; }

.prose blockquote {
  margin: 0 0 1.2em;
  padding: 14px 18px;
  border-left: 6px solid var(--green);
  background: var(--paper-2);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: #2a3421;
}

.prose blockquote p:last-child { margin-bottom: 0; }
.prose img { border-radius: var(--radius); border: 2px solid var(--ink); margin: 0 0 1.2em; }
.prose figure { margin: 0 0 1.2em; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: .98rem; }
.prose th,
.prose td { border: 1px solid #bfd0a8; padding: 10px; text-align: left; }
.prose th { background: var(--paper-2); }

/* ── 页脚 ───────────────────────────────── */
footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  padding: 26px 30px 34px;
  border-top: 2px dashed rgba(128, 255, 0, .45);
  background: rgba(0, 0, 0, .24);
}

.foot-brand { display: flex; align-items: center; gap: 10px; }
.foot-id { display: grid; gap: 2px; }
.foot-id .brand-name { font-weight: 700; color: var(--paper); }
.foot-id p { font-size: .9rem; line-height: 1.5; color: var(--muted); max-width: 34ch; }

.foot-nav { display: flex; flex-wrap: wrap; flex: 1 1 240px; justify-content: center; gap: 2px; }

.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 11px;
  font-size: .93rem;
  color: var(--muted);
  text-decoration: none;
  border-radius: 8px;
}

.foot-nav a:hover { color: var(--ink); background: var(--lime); }

.foot-meta { font-size: .9rem; color: var(--muted); }

/* ── 回顶 ───────────────────────────────── */
.totop {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  background: var(--lime);
  color: var(--ink);
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: 4px 4px 0 var(--green);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
}

.totop.on { opacity: 1; pointer-events: auto; }

/* ── 响应式 ─────────────────────────────── */
@media (min-width: 901px) {
  .gnav > summary { display: none; }
  .gnav-list { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px; }
}

@media (max-width: 900px) {
  .gnav { width: 100%; }
  .gnav[open] .gnav-list { display: grid; gap: 2px; padding: 10px 0 4px; }
  .gnav-list li a { display: flex; padding: 11px 14px; border-bottom: 1px dashed rgba(128, 255, 0, .28); border-radius: 0; }
  .hero { grid-template-columns: 1fr; min-height: 0; padding: 30px 20px 42px; gap: 24px; }
  .hero-copy h1 { rotate: -1deg; }
  .stage { grid-template-columns: 1fr; padding: 8px 20px 58px; gap: 22px; }
  .side { position: static; rotate: 0deg; }
  .prose > article:nth-child(n) { rotate: 0deg; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .masthead { padding: 12px 16px; }
  .rail { padding: 6px 12px; }
  .hero { padding: 24px 16px 38px; }
  .hero-copy h1 { font-size: clamp(2rem, 9vw, 2.6rem); text-shadow: 3px 3px 0 rgba(128, 255, 0, .55); }
  .hero-art { border-width: 6px; box-shadow: 9px 9px 0 rgba(0, 255, 0, .3); }
  .stage { padding: 6px 16px 54px; }
  .prose > article { padding: 26px 18px 28px; }
  .prose h2 { font-size: 1.34rem; }
  footer { flex-direction: column; align-items: flex-start; gap: 10px; padding: 22px 16px 30px; }
  .foot-nav { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

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