@import url('https://fonts.googleapis.com/css2?family=Lexend+Mega:wght@100..900&family=Public+Sans:wght@100..900&display=swap');

:root {
  --g: #87ff71;
  --y: #ffce5c;
  --ink: #192617;
  --paper: #f7f4e8;
  --card: #ffffff;
  --soft: 0 16px 34px rgba(25, 38, 23, 0.16);
  --head: "Lexend Mega", "Public Sans", system-ui, sans-serif;
  --body: "Public Sans", system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

body {
  margin: 0;
  background-color: var(--paper);
  background-image: radial-gradient(rgba(25, 38, 23, 0.14) 1px, transparent 1.5px);
  background-size: 22px 22px;
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.75;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: relative;
  z-index: 40;
  background: var(--ink);
  color: var(--paper);
  border-bottom: 5px solid var(--g);
}

.brandrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 12px;
  max-width: 1120px;
  margin: 0 auto;
}

.brand {
  flex: 1 1 100%;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
  color: var(--g);
  font-family: var(--head);
  font-weight: 900;
  font-size: clamp(18px, 4.6vw, 25px);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.brand .mark {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  background: var(--y);
  clip-path: polygon(50% 0, 100% 38%, 82% 100%, 18% 100%, 0 38%);
}

.cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  background: var(--y);
  color: var(--ink);
  border: 2px solid var(--y);
  text-decoration: none;
  font-family: var(--head);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.02em;
  transform: rotate(-1.6deg);
}

.cta:hover {
  background: var(--g);
  border-color: var(--g);
}

.burger {
  margin-left: auto;
  min-width: 62px;
  min-height: 44px;
  padding: 0 12px;
  background: transparent;
  color: var(--g);
  border: 2px dashed var(--g);
  border-radius: 0;
  font-family: var(--head);
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
}

.burger:hover {
  background: var(--g);
  color: var(--ink);
  border-style: solid;
}

/* ---------- 全屏菜单 ---------- */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-content: center;
  padding: 56px 20px 32px;
  background: var(--ink);
  color: var(--paper);
  background-image: radial-gradient(rgba(135, 255, 113, 0.22) 2px, transparent 2px);
  background-size: 26px 26px;
  overflow: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s;
}

body[data-open="1"] .drawer {
  opacity: 1;
  visibility: visible;
  transform: none;
}

body[data-open="1"] {
  overflow: hidden;
}

.closer {
  position: absolute;
  top: 14px;
  right: 14px;
  min-width: 62px;
  min-height: 44px;
  padding: 0 12px;
  background: var(--y);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 0;
  font-family: var(--head);
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
}

.menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
  counter-reset: m;
  max-width: 560px;
}

.menu li {
  counter-increment: m;
}

.menu a {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  padding: 8px 10px;
  text-decoration: none;
  font-family: var(--head);
  font-weight: 800;
  font-size: clamp(19px, 4.6vw, 27px);
  line-height: 1.2;
  border-bottom: 1px dashed rgba(247, 244, 232, 0.28);
}

.menu a::before {
  content: counter(m, decimal-leading-zero);
  font-size: 13px;
  color: var(--y);
  letter-spacing: 0.1em;
}

.menu a:hover,
.menu a:focus-visible {
  background: var(--g);
  color: var(--ink);
}

.menu a:hover::before,
.menu a:focus-visible::before {
  color: var(--ink);
}

/* ---------- 骨架 ---------- */
.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 14px;
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  min-height: 45vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 26px 0 30px;
}

.hero-art {
  position: absolute;
  inset: -10px 0 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateY(var(--shift, 0));
  will-change: transform;
}

.hero-art span {
  position: absolute;
  display: block;
}

.dots {
  width: 92px;
  height: 92px;
  right: 48%;
  top: 4%;
  background-image: radial-gradient(var(--ink) 2px, transparent 2.4px);
  background-size: 13px 13px;
  opacity: 0.45;
}

.ring {
  width: 130px;
  height: 130px;
  right: -34px;
  bottom: -26px;
  border: 6px dashed var(--ink);
  border-radius: 50%;
  opacity: 0.4;
  animation: spin 26s linear infinite;
}

.tri {
  width: 150px;
  height: 140px;
  left: -46px;
  bottom: -34px;
  background: var(--g);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  mix-blend-mode: multiply;
  transform: rotate(9deg);
}

.sq {
  width: 104px;
  height: 104px;
  right: 8%;
  top: 46%;
  background: var(--y);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  animation: bob 7s ease-in-out infinite alternate;
}

.bar {
  width: 12px;
  height: 88px;
  left: 46%;
  top: 6%;
  background: var(--ink);
  transform: rotate(-14deg);
  opacity: 0.25;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes bob {
  from {
    transform: translateY(0) rotate(0deg);
  }
  to {
    transform: translateY(-16px) rotate(14deg);
  }
}

.badge {
  position: relative;
  z-index: 2;
  align-self: flex-start;
  margin: 0 0 12px;
  padding: 6px 13px;
  background: var(--y);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  font-family: var(--head);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.04em;
  transform: rotate(-2.6deg);
}

h1 {
  position: relative;
  z-index: 2;
  margin: 0;
  max-width: 22ch;
  font-family: var(--head);
  font-weight: 900;
  font-size: clamp(30px, 7.4vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

/* ---------- 主区 ---------- */
.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  padding: 6px 0 44px;
}

.side {
  background: var(--y);
  border: 2px dashed var(--ink);
  box-shadow: var(--soft);
  padding: 14px;
}

.side small {
  display: block;
  font-family: var(--head);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.24em;
  color: rgba(25, 38, 23, 0.62);
  line-height: 1.4;
}

.side h2 {
  margin: 2px 0 10px;
  font-family: var(--head);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.side-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 8px;
}

.side-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 2px;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1px dotted rgba(25, 38, 23, 0.55);
}

.side-list a:hover {
  background: var(--ink);
  color: var(--g);
}

.side-top {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-family: var(--head);
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  border-bottom: 3px solid var(--ink);
}

.doc {
  background: var(--card);
  border: 2px solid var(--ink);
  box-shadow: var(--soft);
  padding: 20px 16px 28px;
  min-width: 0;
}

.prose {
  font-size: 17px;
  line-height: 1.8;
}

.prose > *:first-child {
  margin-top: 0;
}

.prose p {
  margin: 0 0 15px;
}

.prose h2 {
  position: relative;
  margin: 32px 0 12px;
  padding-left: 16px;
  font-family: var(--head);
  font-size: clamp(22px, 3.6vw, 30px);
  font-weight: 900;
  line-height: 1.28;
  letter-spacing: -0.025em;
}

.prose h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.16em;
  width: 8px;
  height: 1em;
  background: var(--g);
}

.prose h3 {
  margin: 24px 0 8px;
  font-family: var(--head);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.prose ul,
.prose ol {
  margin: 0 0 16px;
  padding-left: 1.25em;
}

.prose li {
  margin: 6px 0;
}

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

.prose a:hover {
  background: var(--g);
}

.prose blockquote {
  margin: 20px 0;
  padding: 12px 16px;
  background: #eefbe8;
  border-left: 7px solid var(--g);
}

.prose figure {
  margin: 18px 0;
}

.prose img {
  border: 2px solid var(--ink);
}

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

.prose th,
.prose td {
  border: 1px solid var(--ink);
  padding: 8px 10px;
  text-align: left;
}

.prose th {
  background: var(--y);
  font-family: var(--head);
  font-weight: 800;
}

.prose article + article {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 2px dashed rgba(25, 38, 23, 0.28);
}

.prose time {
  font-family: var(--head);
  font-size: 15px;
  letter-spacing: 0.02em;
}

article[id] {
  scroll-margin-top: 18px;
}

/* ---------- 页脚 ---------- */
.foot {
  background: var(--ink);
  color: var(--paper);
  border-top: 5px solid var(--y);
}

.foot-top {
  display: grid;
  gap: 16px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 26px 14px 20px;
}

.foot-brand {
  margin: 0;
  font-family: var(--head);
  font-size: clamp(20px, 4.4vw, 26px);
  font-weight: 900;
  color: var(--g);
  letter-spacing: -0.02em;
}

.subform {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.subform input {
  flex: 1 1 160px;
  min-height: 46px;
  padding: 0 12px;
  background: transparent;
  color: var(--paper);
  border: 2px solid var(--g);
  border-radius: 0;
  font: inherit;
  font-size: 16px;
}

.subform input::placeholder {
  color: rgba(247, 244, 232, 0.62);
}

.subform button {
  min-height: 46px;
  padding: 0 20px;
  background: var(--y);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 0;
  font-family: var(--head);
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
}

.subform button:hover {
  background: var(--g);
}

.foot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 16px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 4px 14px 24px;
}

.foot-grid dl {
  margin: 0;
}

.foot-grid dt {
  margin-bottom: 6px;
  font-family: var(--head);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--y);
  line-height: 1.5;
}

.foot-grid dd {
  margin: 0;
}

.foot-grid a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 4px 0;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1px dotted rgba(247, 244, 232, 0.32);
}

.foot-grid a:hover,
.foot-links a:hover {
  color: var(--g);
}

.foot-col .foot-note {
  margin: 0 0 8px;
  font-size: 16px;
  color: rgba(247, 244, 232, 0.72);
}

.foot-col .side-top {
  color: var(--paper);
  border-bottom-color: var(--g);
}

.foot-col .side-top:hover {
  color: var(--g);
}

.foot-low {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 14px 26px;
  border-top: 1px dashed rgba(247, 244, 232, 0.3);
}

.copy {
  margin: 0;
  font-size: 15px;
  color: rgba(247, 244, 232, 0.78);
}

.foot-links {
  display: flex;
  gap: 18px;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  font-family: var(--head);
  font-size: 15px;
  font-weight: 800;
  color: var(--g);
  text-decoration: none;
}

/* ---------- 断点 ---------- */
@media (min-width: 720px) {
  .doc {
    padding: 30px 34px 36px;
  }
  .hero {
    padding: 40px 0 44px;
  }
  .foot-top {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 34px 14px 24px;
  }
  .foot-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 940px) {
  .wrap,
  .brandrow,
  .foot-top,
  .foot-grid,
  .foot-low {
    padding-left: 24px;
    padding-right: 24px;
  }
  .stage {
    grid-template-columns: 264px minmax(0, 1fr);
    gap: 30px;
    align-items: start;
  }
  .side {
    position: sticky;
    top: 18px;
    padding: 18px;
  }
  .side-list {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero {
    min-height: 45vh;
  }
}

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

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