:root {
  --acid: #80ff00;
  --neon: #00ff00;
  --ink: #1f2617;
  --ink-deep: #12180c;
  --paper: #eff8dd;
  --paper-2: #dff0c0;
  --rail: #26311c;
  --rail-line: #46583a;
  --muted: #a9c78d;
  --r: 10px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background-color: var(--ink);
  background-image: radial-gradient(rgba(128, 255, 0, .22) 1px, transparent 1px);
  background-size: 20px 20px;
  color: var(--paper);
  font-family: 'Noto Sans Arabic', system-ui, -apple-system, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: .01em;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: 'Noto Naskh Arabic', 'Noto Sans Arabic', system-ui, 'PingFang SC', 'Microsoft YaHei', sans-serif; }

/* ---------- 顶栏 ---------- */
.bar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 10px clamp(12px, 3vw, 30px);
  background: rgba(31, 38, 23, .93);
  backdrop-filter: blur(7px);
  border-bottom: 2px solid var(--acid);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 5px 15px 5px 8px;
  border-radius: 999px;
  background: var(--acid);
  color: var(--ink);
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
  transform: rotate(-1.6deg);
  box-shadow: 3px 3px 0 var(--neon);
  animation: jitter 6s ease-in-out infinite;
}
.brand .mark { border-radius: 50%; width: 26px; height: 26px; }

.dock { flex: 1 1 auto; min-width: 0; }
.dock ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.dock a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid var(--rail-line);
  background: var(--rail);
  color: var(--acid);
  font-size: 16px;
  text-decoration: none;
  transition: transform .16s ease, background .16s ease, color .16s ease;
}
.dock a:hover,
.dock a:focus-visible {
  background: var(--neon);
  color: var(--ink);
  border-color: var(--neon);
  transform: rotate(-2.5deg) scale(1.05);
}

.find { margin: 0; flex: 0 1 auto; }
.find input {
  min-height: 40px;
  width: 128px;
  padding: 0 14px;
  font: inherit;
  font-size: 16px;
  color: var(--paper);
  background: transparent;
  border: 1px dashed var(--acid);
  border-radius: 999px;
}
.find input:focus { outline: 2px solid var(--neon); outline-offset: 2px; }

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 26px;
  padding: 64px 18px 76px;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}
.ghost {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-7deg);
  font-size: clamp(54px, 16vw, 200px);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  letter-spacing: -.03em;
  color: transparent;
  -webkit-text-stroke: 2px rgba(0, 255, 0, .34);
  z-index: 0;
  pointer-events: none;
}
.blob {
  position: absolute;
  width: min(74vw, 460px);
  height: min(74vw, 460px);
  border-radius: 46% 54% 58% 42% / 52% 44% 56% 48%;
  background: var(--neon);
  opacity: .25;
  filter: blur(2px);
  mix-blend-mode: screen;
  transform: rotate(12deg);
  z-index: 0;
}
.hero h1 {
  position: relative;
  z-index: 2;
  margin: 0;
  max-width: 18ch;
  font-size: clamp(30px, 8.4vw, 76px);
  line-height: 1.06;
  letter-spacing: -.015em;
  color: var(--acid);
  text-shadow: 4px 4px 0 var(--ink-deep), 9px 9px 0 rgba(0, 255, 0, .38);
}
.down {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 8px 26px;
  border-radius: 999px;
  background: var(--neon);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  transform: rotate(2deg);
  box-shadow: 4px 4px 0 var(--ink-deep);
  transition: transform .16s ease;
}
.down:hover { transform: rotate(-2deg) scale(1.06); }

/* ---------- 舞台 ---------- */
.stage { padding: 0 clamp(12px, 3vw, 32px) 72px; }

.collage {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  position: relative;
  max-width: 1180px;
  margin: 0 auto 26px;
  padding: 24px 20px;
  border-radius: var(--r);
  background-color: var(--acid);
  background-image: radial-gradient(var(--ink) 1.4px, transparent 1.4px);
  background-size: 12px 12px;
  transform: rotate(-.7deg);
  box-shadow: 7px 7px 0 var(--ink-deep);
}
.chip { flex: 1 1 58px; height: 62px; border-radius: var(--r); mix-blend-mode: multiply; animation: jitter 5.4s ease-in-out infinite; }
.chip-1 { background: var(--neon); }
.chip-2 { background: #b6ff5c; animation-delay: -1.1s; }
.chip-3 { background: #4ecf00; animation-delay: -2.4s; }
.chip-4 { background: #d6ff9c; animation-delay: -3.6s; }
.collage-img { flex: 1 1 220px; border-radius: var(--r); mix-blend-mode: multiply; }
.tape {
  position: absolute;
  width: 78px;
  height: 22px;
  background: rgba(255, 255, 255, .62);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
}
.tape-a { top: -11px; left: 22px; transform: rotate(-8deg); }
.tape-b { bottom: -10px; right: 34px; transform: rotate(6deg); }

.deck {
  max-width: 1180px;
  margin: 0 auto 30px;
  padding: clamp(18px, 3vw, 30px);
  border-radius: var(--r);
  background: var(--neon);
  color: var(--ink);
  transform: rotate(.6deg);
  box-shadow: 6px 6px 0 var(--ink-deep);
}
.deck h2 {
  margin: 0 0 .25em;
  font-size: clamp(22px, 3.6vw, 34px);
  line-height: 1.2;
  word-break: break-word;
}
.deck .subtitle {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: none;
  color: #2b3a1d;
}

/* ---------- 分栏 ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 244px;
  gap: 28px;
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
}

.prose { min-width: 0; }
.prose > section {
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--r);
  padding: clamp(18px, 3vw, 34px);
  margin: 0 0 26px;
  scroll-margin-top: 104px;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, .45);
  animation: rise .55s cubic-bezier(.2, .7, .3, 1) both;
}
.prose > section:nth-child(odd) { transform: rotate(-.32deg); }
.prose > section:nth-child(even) { transform: rotate(.28deg); }
.prose > section:nth-child(2) { animation-delay: .05s; }
.prose > section:nth-child(3) { animation-delay: .1s; }
.prose > section:nth-child(4) { animation-delay: .15s; }
.prose > section:nth-child(5) { animation-delay: .2s; }
.prose > section:nth-child(6) { animation-delay: .25s; }
.prose > section:nth-child(7) { animation-delay: .3s; }
.prose > section:nth-child(8) { animation-delay: .35s; }

.prose h2 {
  margin: .1em 0 .45em;
  font-size: clamp(21px, 3.2vw, 30px);
  line-height: 1.24;
  color: var(--ink-deep);
}
.prose h2 + p {
  font-size: 17px;
  color: #3a4a2b;
  border-left: 4px solid var(--acid);
  padding-left: 12px;
}
.prose h3 { margin: 1.3em 0 .4em; font-size: 19px; color: #2b3a1d; }
.prose p { margin: 0 0 1em; }
.prose ul, .prose ol { margin: 0 0 1em; padding-left: 1.25em; }
.prose li { margin: 0 0 .35em; }
.prose a { color: #14610a; text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { background: var(--neon); color: var(--ink); }
.prose strong { color: var(--ink-deep); }
.prose blockquote {
  margin: 0 0 1em;
  padding: 12px 16px;
  border-radius: var(--r);
  background: var(--paper-2);
}
.prose blockquote p:last-child { margin: 0; }
.prose img { border-radius: var(--r); margin: 0 0 1em; }
.prose figure { margin: 0 0 1em; }
.prose code {
  font-size: .94em;
  padding: .1em .38em;
  border-radius: 6px;
  background: var(--paper-2);
}
.prose pre {
  overflow-x: auto;
  padding: 14px;
  border-radius: var(--r);
  background: var(--ink-deep);
  color: var(--acid);
}
.prose hr { border: 0; border-top: 2px dashed #b9d69a; margin: 1.6em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; margin: 0 0 1em; }
.prose th, .prose td { padding: 8px 10px; text-align: left; border-bottom: 1px solid #c3dca6; }
.prose th { background: var(--paper-2); }

/* ---------- 右侧索引 ---------- */
.rail { position: sticky; top: 104px; }
.rail ul {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.rail a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px dashed var(--rail-line);
  background: var(--rail);
  color: var(--acid);
  font-size: 16px;
  text-decoration: none;
  transition: transform .16s ease, background .16s ease, color .16s ease;
}
.rail a:hover { transform: translateX(-3px) rotate(-1.5deg); background: var(--acid); color: var(--ink); }
.rail a[aria-current="true"] {
  background: var(--neon);
  color: var(--ink);
  border-style: solid;
  border-color: var(--neon);
  font-weight: 700;
}

/* ---------- 页脚 ---------- */
.foot {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding: 40px clamp(16px, 4vw, 44px) 28px;
  background: var(--ink-deep);
  border-top: 3px solid var(--neon);
  color: var(--muted);
  font-size: 16px;
}
.foot p { margin: 0; min-width: 0; word-break: break-word; }
.f-brand { color: var(--acid); font-weight: 700; font-size: 20px; line-height: 1.3; }
.f-top a { display: inline-flex; align-items: center; min-height: 40px; color: var(--neon); }
.foot small {
  grid-column: 1 / -1;
  padding-top: 16px;
  border-top: 1px dashed #37452a;
  text-align: center;
  font-size: 15px;
  color: #8fa87a;
}

/* ---------- 动效 ---------- */
@keyframes jitter {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(1px, -2px) rotate(1deg); }
  50% { transform: translate(-2px, 1px) rotate(-1deg); }
  75% { transform: translate(2px, 1px) rotate(.6deg); }
}
@keyframes rise {
  from { opacity: 0; translate: 0 16px; }
  to { opacity: 1; translate: 0 0; }
}

/* ---------- 断点 ---------- */
@media (max-width: 940px) {
  .split { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .rail { position: static; order: 2; }
  .rail ul { flex-direction: row; flex-wrap: wrap; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .bar { padding: 8px 10px; gap: 8px; }
  .brand { font-size: 16px; padding: 4px 12px 4px 6px; }
  .dock { order: 3; flex-basis: 100%; }
  .dock ul { gap: 6px; }
  .dock a { padding: 4px 11px; font-size: 16px; }
  .find { order: 2; flex: 1 1 120px; }
  .find input { width: 100%; }
  .prose > section { scroll-margin-top: 150px; }
  .foot { grid-template-columns: 1fr 1fr; }
  .foot small { font-size: 14px; }
}

@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}
