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

:root {
  --lime: #87ff71;
  --sun: #ffce5c;
  --ink: #192617;
  --paper: #fdfbf1;
  --card: #ffffff;
  --limesoft: #dcffd3;
  --sunsoft: #ffeec9;
  --inkmine: rgba(25, 38, 23, .14);
  --r: 28px;
  --ui: "Nunito", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --disp: "Fredoka", "Nunito", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  overflow-x: hidden;
  font-family: var(--ui);
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(var(--inkmine) 1.1px, transparent 1.2px);
  background-size: 22px 22px;
}

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--disp);
  line-height: 1.2;
  letter-spacing: .01em;
}

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---------- 顶部 ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--lime);
  border-bottom: 4px dashed var(--ink);
  background-image: repeating-linear-gradient(135deg, rgba(25,38,23,.07) 0 8px, transparent 8px 16px);
}

.bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas: "l b r";
  align-items: center;
  gap: 8px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px clamp(10px, 2.4vw, 22px);
}

.nav-l { grid-area: l; }
.nav-r { grid-area: r; }
.brand { grid-area: b; }

.nav p {
  display: flex;
  flex-wrap: nowrap;
  gap: 2px;
  margin: 0;
  padding: 0;
}

.nav-l p { justify-content: flex-end; }
.nav-r p { justify-content: flex-start; }

.nav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 10px 9px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 12px;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}

.nav a:hover,
.nav a:focus-visible {
  background: var(--ink);
  color: var(--lime);
  transform: rotate(-2deg);
}

.ic {
  flex: none;
  width: 11px;
  height: 11px;
  background: var(--ink);
  border-radius: 2px;
}

.nav a:hover .ic,
.nav a:focus-visible .ic { background: var(--lime); }

.nav p a:nth-child(2n) .ic { border-radius: 50%; }
.nav p a:nth-child(3n) .ic { clip-path: polygon(50% 0, 100% 100%, 0 100%); border-radius: 0; }
.nav p a:nth-child(4n) .ic { transform: rotate(45deg); }
.nav p a:nth-child(5n) .ic { background: none; border: 3px dotted var(--ink); }
.nav p a:nth-child(5n):hover .ic { border-color: var(--lime); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  text-decoration: none;
  font-family: var(--disp);
  font-weight: 700;
  font-size: clamp(16px, 2vw, 22px);
  letter-spacing: .02em;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 999px;
  transform: rotate(-1.6deg);
  box-shadow: 4px 4px 0 var(--ink);
}

.brand-mark {
  position: relative;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--sun);
  border: 3px solid var(--ink);
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 4px;
  background: var(--ink);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.anchors {
  display: flex;
  gap: 6px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(10px, 2.4vw, 22px) 8px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.anchors a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 12px;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  background: var(--ink);
  color: var(--lime);
  border-radius: 999px;
}

.anchors a:nth-child(even) {
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--ink);
}

.anchors a:hover,
.anchors a:focus-visible {
  background: var(--sun);
  color: var(--ink);
  border: 2px solid var(--ink);
}

.anchors .ic { background: currentColor; }

/* ---------- 头图 ---------- */

.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  height: clamp(330px, 45vh, 460px);
  padding: clamp(14px, 3vw, 34px);
  padding-bottom: clamp(46px, 7vw, 74px);
  background: var(--sun);
  background-image: radial-gradient(rgba(25, 38, 23, .16) 1.4px, transparent 1.5px);
  background-size: 26px 26px;
  clip-path: polygon(0 0, 100% 0, 100% 86%, 0 100%);
}

.hero-art {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  border: 4px solid var(--ink);
}

.b1 {
  width: 190px;
  height: 190px;
  left: -50px;
  top: 24px;
  background: var(--lime);
  opacity: .9;
}

.b2 {
  width: 92px;
  height: 92px;
  left: 150px;
  bottom: 42px;
  background: var(--paper);
  mix-blend-mode: multiply;
}

.sqi {
  position: absolute;
  left: 76px;
  top: 130px;
  width: 54px;
  height: 54px;
  background: var(--ink);
  transform: rotate(24deg);
  opacity: .85;
}

.tri {
  position: absolute;
  right: 46%;
  top: 34px;
  width: 68px;
  height: 68px;
  background: var(--lime);
  border: 4px solid var(--ink);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  transform: rotate(-12deg);
}

.dotgrid {
  position: absolute;
  left: 24px;
  bottom: 34px;
  width: 120px;
  height: 70px;
  background-image: radial-gradient(var(--ink) 2.2px, transparent 2.4px);
  background-size: 16px 16px;
  opacity: .55;
}

.squig {
  position: absolute;
  left: 42%;
  bottom: 22px;
  width: 130px;
  height: 22px;
  background-image: repeating-radial-gradient(circle at 12px 22px, var(--ink) 0 3px, transparent 3px 14px);
  opacity: .8;
}

.hero-shot {
  position: absolute;
  right: 0;
  top: 0;
  z-index: 2;
  width: min(58%, 620px);
  height: 100%;
  clip-path: polygon(16% 0, 100% 0, 100% 100%, 0 100%);
}

.hero-shot img,
.hero-shot .hero-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .92;
  mix-blend-mode: multiply;
}

.hero-ghost {
  position: absolute;
  left: clamp(8px, 2vw, 26px);
  top: clamp(6px, 2vw, 18px);
  z-index: 1;
  font-family: var(--disp);
  font-weight: 700;
  font-size: clamp(48px, 13vw, 138px);
  line-height: .84;
  letter-spacing: -.02em;
  max-width: 64%;
  color: rgba(25, 38, 23, .17);
  mix-blend-mode: multiply;
  will-change: transform;
}

.hero-txt {
  position: relative;
  z-index: 3;
  max-width: min(720px, 88%);
  text-align: right;
}

.hero-txt h1 {
  display: inline-block;
  margin: 0;
  padding: .3em .55em;
  font-size: clamp(1.6rem, 4.6vw, 2.9rem);
  color: var(--ink);
  background: var(--lime);
  border: 4px solid var(--ink);
  border-radius: 22px;
  transform: rotate(-1.6deg);
  box-shadow: 9px 9px 0 rgba(25, 38, 23, .22);
}

/* ---------- 主体 ---------- */

main { flex: 1 1 auto; }

.wrap {
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr);
  align-items: start;
  gap: clamp(18px, 3vw, 36px);
  max-width: 1160px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 52px) clamp(14px, 3vw, 28px);
}

.rail {
  position: relative;
  padding: 18px 16px 22px;
  background: var(--card);
  border: 3px solid var(--ink);
  border-bottom: 10px solid var(--lime);
  border-radius: var(--r);
  box-shadow: 7px 7px 0 rgba(25, 38, 23, .12);
}

.rail small {
  display: block;
  padding-left: 20px;
  position: relative;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .16em;
  color: #4c6047;
}

.rail small::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 12px;
  height: 12px;
  background: var(--sun);
  border: 2px solid var(--ink);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.rail h2 {
  margin: 6px 0 12px;
  font-size: 22px;
}

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

.rail-list a {
  display: block;
  min-height: 44px;
  padding: 11px 2px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 2px dotted rgba(25, 38, 23, .32);
}

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

.rail-list a:hover,
.rail-list a:focus-visible {
  color: #1d7a33;
  padding-left: 6px;
}

.body { min-width: 0; }

.content > div {
  margin: 0 0 clamp(20px, 3vw, 34px);
  padding: clamp(18px, 3vw, 34px);
  background: var(--card);
  border: 3px solid var(--ink);
  border-bottom: 10px solid var(--lime);
  border-radius: var(--r);
  box-shadow: 8px 8px 0 rgba(25, 38, 23, .1);
  scroll-margin-top: 200px;
  animation: rise .5s ease both;
}

.content > div:nth-child(1) { animation-delay: .04s; }
.content > div:nth-child(2) { animation-delay: .09s; }
.content > div:nth-child(3) { animation-delay: .14s; }
.content > div:nth-child(4) { animation-delay: .19s; }
.content > div:nth-child(5) { animation-delay: .24s; }
.content > div:nth-child(6) { animation-delay: .29s; }
.content > div:nth-child(7) { animation-delay: .34s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(18px) rotate(-.6deg); }
  to { opacity: 1; transform: none; }
}

.content h2 {
  margin: 0 0 .6em;
  font-size: clamp(1.28rem, 3vw, 1.72rem);
}

.content h2::after {
  content: "";
  display: block;
  width: 74px;
  height: 8px;
  margin-top: 10px;
  background: var(--sun);
  border: 2px solid var(--ink);
  border-radius: 999px;
}

.content h3 {
  margin: 1.5em 0 .5em;
  font-size: clamp(1.1rem, 2.4vw, 1.32rem);
}

.content p {
  margin: 0 0 1em;
  line-height: 1.85;
}

.content ul,
.content ol {
  margin: 0 0 1em;
  padding-left: 1.35em;
}

.content li { margin: .35em 0; }

.content li::marker { color: #2a8b3f; }

.content a {
  color: #196b2c;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}

.content img {
  max-width: 100%;
  height: auto;
  border: 3px solid var(--ink);
  border-radius: 20px;
}

.content blockquote {
  margin: 1.2em 0;
  padding: 12px 18px;
  background: var(--sunsoft);
  border-left: 8px solid var(--sun);
  border-radius: 6px 18px 18px 6px;
}

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

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

.content th,
.content td {
  padding: 9px 10px;
  border: 2px dotted rgba(25, 38, 23, .4);
  text-align: left;
}

.content th { background: var(--limesoft); }

/* ---------- 页脚 ---------- */

.foot {
  margin-top: clamp(26px, 4vw, 50px);
  padding: clamp(26px, 4vw, 46px) clamp(16px, 4vw, 40px) 16px;
  background: var(--ink);
  color: var(--limesoft);
  border-top: 8px solid var(--lime);
  background-image: radial-gradient(rgba(135, 255, 113, .18) 1.2px, transparent 1.3px);
  background-size: 24px 24px;
}

.fgrid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.7fr);
  gap: clamp(20px, 4vw, 48px);
  max-width: 1120px;
  margin: 0 auto;
}

.fbrand {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fmark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--sun);
  border: 3px solid var(--lime);
  position: relative;
}

.fmark::before {
  content: "";
  position: absolute;
  inset: 8px;
  background: var(--ink);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.fname {
  font-family: var(--disp);
  font-weight: 700;
  font-size: 20px;
  color: var(--sun);
}

.fkw {
  font-size: 15px;
  letter-spacing: .12em;
  color: var(--limesoft);
}

.fcols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 16px;
}

.fcols dl { margin: 0; }

.fcols dt {
  font-family: var(--disp);
  font-weight: 700;
  color: var(--sun);
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 2px dashed rgba(135, 255, 113, .45);
}

.fcols dd {
  margin: 0;
  font-size: 16px;
}

.fcols dd a {
  display: inline-block;
  min-height: 40px;
  padding: 8px 0;
  text-decoration: none;
  color: var(--limesoft);
}

.fcols dd a:hover,
.fcols dd a:focus-visible {
  color: var(--lime);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 4px;
}

.fbase {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  max-width: 1120px;
  margin: 26px auto 0;
  padding-top: 14px;
  border-top: 2px dashed rgba(135, 255, 113, .4);
  font-size: 15px;
}

.cpy { color: var(--limesoft); }

.totop {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 9px 16px;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
  background: var(--lime);
  border-radius: 999px;
  border: 2px solid var(--lime);
}

.totop:hover,
.totop:focus-visible { background: var(--sun); border-color: var(--sun); }

/* ---------- 响应式 ---------- */

@media (max-width: 900px) {
  .wrap { grid-template-columns: minmax(0, 1fr); }
  .rail { order: -1; }
  .rail-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  }
  .rail-list a { border-bottom: 0; }
  .fgrid { grid-template-columns: minmax(0, 1fr); }
  .content > div { scroll-margin-top: 220px; }
}

@media (max-width: 700px) {
  .bar {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "b b" "l r";
    gap: 4px;
  }
  .brand { justify-self: center; }
  .nav p { overflow-x: auto; padding-bottom: 4px; }
  .nav-l p { justify-content: flex-start; }
  .anchor, .nav a { font-size: 15px; }
  .hero { clip-path: polygon(0 0, 100% 0, 100% 91%, 0 100%); }
  .hero-ghost { font-size: clamp(42px, 15vw, 90px); max-width: 78%; }
  .tri { right: 20%; top: 22px; }
  .squig { display: none; }
  .b2 { left: 96px; }
}

@media (max-width: 430px) {
  body { font-size: 16px; }
  .hero-txt { max-width: 95%; }
  .blob.b1 { width: 130px; height: 130px; left: -44px; }
  .sqi { left: 40px; top: 96px; width: 40px; height: 40px; }
  .dotgrid { width: 82px; height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .content > div { animation: none; }
  .hero-ghost { transform: none !important; }
  .nav a:hover { transform: none; }
}

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