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

:root {
  --acid: #80ff00;
  --acid2: #00ff00;
  --ink: #1f2617;
  --paper: #edf1e2;
  --paper2: #f8fbea;
  --line: #c9d4af;
  --rail: 236px;
  --r: 10px;
  --fc: "Barlow Condensed", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --fb: "Barlow", "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%;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--fb);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(var(--line) 1.1px, transparent 1.1px);
  background-size: 13px 13px;
  overflow-x: clip;
  filter: saturate(1.05);
}

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

.shell { min-height: 100vh; }

/* ---------- 左侧固定竖排导航 ---------- */
.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--rail);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px 16px 24px;
  background-color: var(--ink);
  background-image: repeating-linear-gradient(48deg, rgba(128, 255, 0, .07) 0 9px, transparent 9px 19px);
  border-right: 4px solid var(--acid);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 4px;
  font-family: var(--fc);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--acid);
  text-decoration: none;
  rotate: -2deg;
}

.brand-mark {
  width: 13px;
  height: 13px;
  background: var(--acid2);
  border: 2px solid #000;
  border-radius: 3px;
  box-shadow: 3px 3px 0 #000;
}

.rail-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.rail-nav a {
  display: block;
  min-height: 44px;
  padding: 11px 10px;
  font-family: var(--fc);
  font-size: 1.12rem;
  letter-spacing: .05em;
  color: #e7f5cf;
  text-decoration: none;
  border-left: 3px solid transparent;
  border-radius: 0 8px 8px 0;
  transition: transform .16s ease, background .16s ease, color .16s ease;
}

.rail-nav a:hover,
.rail-nav a:focus-visible {
  background: var(--acid);
  color: var(--ink);
  border-left-color: var(--acid2);
  transform: translateX(3px);
}

.rail-nav a[aria-current="true"] {
  background: var(--acid2);
  color: var(--ink);
  font-weight: 700;
  border-left-color: #fff;
}

.rail-foot { margin-top: auto; padding-top: 8px; }

.rail-cta {
  display: block;
  min-height: 44px;
  padding: 12px 10px;
  text-align: center;
  font-family: var(--fc);
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--ink);
  background: var(--acid);
  border: 2px solid #000;
  border-radius: 999px;
  text-decoration: none;
  rotate: 1.6deg;
  box-shadow: 3px 3px 0 #000;
  transition: rotate .16s ease, background .16s ease;
}

.rail-cta:hover { rotate: -1.4deg; background: var(--acid2); }

/* ---------- 主体 ---------- */
.stage {
  margin-left: var(--rail);
  max-width: 1060px;
  padding-bottom: 8px;
  min-width: 0;
}

main { padding: 0 22px; }

/* Hero */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 178px minmax(0, 1fr);
  gap: 20px 22px;
  align-items: start;
  min-height: 45vh;
  padding: 30px 0 0;
}

.sticker {
  position: relative;
  margin: 0;
  padding: 10px 10px 8px;
  background: var(--acid);
  border: 2px solid var(--ink);
  border-radius: var(--r);
  rotate: -3deg;
  box-shadow: 5px 5px 0 var(--ink);
  animation: jitter 5.5s ease-in-out infinite;
}

.sticker img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  filter: saturate(1.6) contrast(1.05);
}

.sticker figcaption {
  padding-top: 4px;
  font-family: var(--fc);
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .14em;
  text-align: center;
  color: var(--ink);
}

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

.hero-copy { min-width: 0; }

.hero h1 {
  margin: 0 0 8px;
  font-family: var(--fc);
  font-size: clamp(2.25rem, 7.2vw, 4.3rem);
  font-weight: 700;
  line-height: .95;
  letter-spacing: -.005em;
  text-wrap: balance;
  overflow-wrap: break-word;
}

.hero h2 {
  margin: 0;
  font-family: var(--fc);
  font-size: clamp(1rem, 2.8vw, 1.4rem);
  font-weight: 600;
  letter-spacing: .16em;
  color: #46583a;
}

.hero .subtitle {
  display: inline-block;
  max-width: 100%;
  margin: 16px 0 0;
  padding: 9px 13px;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--acid2);
  border: 2px solid var(--ink);
  border-radius: 8px;
  rotate: .9deg;
  box-shadow: 3px 3px 0 var(--ink);
  mix-blend-mode: multiply;
}

.ticker {
  grid-column: 1 / -1;
  margin: 24px -22px 0;
  padding: 7px 0;
  overflow: hidden;
  background: var(--ink);
  border-top: 2px solid var(--ink);
  border-bottom: 3px solid var(--acid);
  color: var(--acid);
}

.ticker-track {
  display: inline-block;
  white-space: nowrap;
  font-family: var(--fc);
  font-size: 1.05rem;
  letter-spacing: .2em;
  animation: marq 26s linear infinite;
}

.ticker-track i { font-style: normal; padding: 0 18px; }

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

/* 正文区块 */
main > section:not(.hero) {
  position: relative;
  margin: 0 0 26px;
  padding: 24px 20px 28px;
  background: var(--paper2);
  background-image: radial-gradient(rgba(31, 38, 23, .12) 1px, transparent 1px);
  background-size: 16px 16px;
  border: 2px solid var(--ink);
  border-bottom: 6px solid var(--acid);
  border-radius: var(--r);
  box-shadow: 7px 7px 0 rgba(31, 38, 23, .13);
  scroll-margin-top: 24px;
  overflow-wrap: break-word;
}

main > section:not(.hero):nth-of-type(3n) { rotate: -.45deg; }
main > section:not(.hero):nth-of-type(3n+2) { rotate: .4deg; }
main > section:not(.hero):nth-of-type(4n) { border-bottom-color: var(--acid2); }

main > section > :first-child { margin-top: 0; }
main > section > :last-child { margin-bottom: 0; }

main > section h2 {
  margin: 0 0 10px;
  font-family: var(--fc);
  font-size: clamp(1.55rem, 4.6vw, 2.3rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: .01em;
}

main > section h2::after {
  content: "";
  display: block;
  width: 54px;
  height: 5px;
  margin-top: 8px;
  background: var(--acid);
  border-radius: 3px;
}

main > section h3 {
  margin: 22px 0 8px;
  font-family: var(--fc);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: .04em;
}

main > section p,
main > section li { font-size: 1rem; }

main > section ul,
main > section ol { padding-left: 1.25em; }

main > section li { margin: .35em 0; }

main > section a {
  color: #2c6000;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

main > section a:hover { background: var(--acid); color: var(--ink); }

main > section figure { margin: 18px 0; }

main > section img {
  max-width: 100%;
  height: auto;
  border: 2px solid var(--ink);
  border-radius: var(--r);
}

main > section blockquote {
  margin: 18px 0;
  padding: 12px 16px;
  background: #fff;
  border-left: 6px solid var(--acid2);
  border-radius: 0 8px 8px 0;
}

main > section blockquote p { margin: .3em 0; }

main > section table {
  width: 100%;
  border-collapse: collapse;
  font-size: .96rem;
}

main > section th,
main > section td {
  padding: 8px 10px;
  border: 1px solid var(--line);
  text-align: left;
}

main > section th { background: var(--acid); font-family: var(--fc); letter-spacing: .05em; }

main > section code {
  padding: 1px 5px;
  font-size: .92em;
  background: #e5eccf;
  border-radius: 4px;
}

/* ---------- 页脚 ---------- */
.site-foot {
  margin: 40px 0 0;
  padding: 30px 22px 24px;
  background: var(--ink);
  color: #dbeac4;
  border-top: 6px solid var(--acid);
  overflow-wrap: break-word;
}

.foot-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 1016px;
}

.foot-card { font-style: normal; min-width: 0; }

.foot-brand {
  display: block;
  margin-bottom: 6px;
  font-family: var(--fc);
  font-size: 1.55rem;
  letter-spacing: .1em;
  color: var(--acid);
}

.foot-desc { display: block; font-size: .95rem; line-height: 1.65; color: #b6c79b; }

.foot-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
  align-content: start;
  min-width: 0;
}

.foot-links a {
  display: inline-block;
  min-height: 40px;
  padding: 9px 2px;
  font-family: var(--fc);
  font-size: 1.02rem;
  letter-spacing: .06em;
  color: var(--acid2);
  text-decoration: none;
}

.foot-links a:hover { color: var(--ink); background: var(--acid); }

.foot-base {
  margin: 24px 0 0;
  padding-top: 14px;
  max-width: 1016px;
  border-top: 1px dashed rgba(128, 255, 0, .45);
  font-size: .88rem;
  letter-spacing: .1em;
  color: #a2b587;
}

/* ---------- 入场动效 ---------- */
.js main > section {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s ease, transform .5s cubic-bezier(.2, .8, .3, 1);
}

.js main > section.in { opacity: 1; transform: none; }

/* ---------- 断点 ---------- */
@media (max-width: 900px) {
  .rail {
    position: sticky;
    inset: auto;
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-right: 0;
    border-bottom: 4px solid var(--acid);
    overflow-x: auto;
    overflow-y: hidden;
  }

  .brand { font-size: 1.3rem; padding: 4px 2px; }

  .rail-nav { flex: 1 1 auto; min-width: 0; }

  .rail-nav ul { flex-direction: row; gap: 2px; }

  .rail-nav a {
    white-space: nowrap;
    padding: 11px 10px;
    border-left: 0;
    border-bottom: 3px solid transparent;
    border-radius: 8px 8px 0 0;
  }

  .rail-nav a:hover { transform: none; }

  .rail-foot { margin: 0; padding: 0; }

  .rail-cta { white-space: nowrap; padding: 10px 14px; font-size: .95rem; }

  .stage { margin-left: 0; }

  main { padding: 0 16px; }

  .hero {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 20px 0 0;
    min-height: 0;
  }

  .hero-copy { order: 1; }
  .sticker { order: 2; max-width: 126px; }

  .hero .subtitle { font-size: .97rem; rotate: 0deg; }

  .ticker { margin: 18px -16px 0; }

  main > section:not(.hero) {
    margin-bottom: 22px;
    padding: 20px 15px 22px;
    box-shadow: 4px 4px 0 rgba(31, 38, 23, .14);
    scroll-margin-top: 92px;
  }

  main > section:not(.hero):nth-of-type(3n),
  main > section:not(.hero):nth-of-type(3n+2) { rotate: 0deg; }

  .site-foot { margin: 32px 0 0; padding: 26px 16px 22px; }

  .foot-top { grid-template-columns: 1fr; gap: 16px; }
}

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

  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  .ticker-track { animation: none; }

  .js main > section { opacity: 1; transform: none; }
}

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