@import url('https://fonts.googleapis.com/css2?family=Didact+Gothic&family=Poiret+One&display=swap');

:root {
  --blue: #3bb1ff;
  --red: #ff5252;
  --ink: #000000;
  --yellow: #ffdb58;
  --paper: #f3f0e9;
  --line: 3px solid #000;
  --hard: 5px 5px 0 #000;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  padding-bottom: 104px;
  background: var(--paper);
  color: #14100c;
  font: 17px/1.72 "Didact Gothic", system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  overflow-wrap: break-word;
}

h1, h2, h3 {
  font-family: "Poiret One", "Didact Gothic", system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.32;
  margin: 0 0 12px;
}

a { color: #000; }

img { max-width: 100%; }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 60;
  background: var(--yellow);
  border: var(--line);
  padding: 10px 16px;
  font-weight: 700;
  text-decoration: none;
}
.skip:focus { left: 10px; top: 10px; }

/* ---------- 栅格骨架 ---------- */
.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 20px 44px;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

/* ---------- 首屏 ---------- */
.hero {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .8fr);
  align-items: center;
  gap: 22px;
  min-height: 45vh;
  margin-top: 6px;
  padding: 22px 24px;
  border: var(--line);
  box-shadow: 7px 7px 0 #000;
  background-color: #fff;
  background-image: radial-gradient(#b7d8ef 1.5px, transparent 1.6px);
  background-size: 15px 15px;
}

.hero-txt { text-align: center; }

.hero h1 {
  font-size: clamp(26px, 5.4vw, 44px);
  margin: 0 0 14px;
  text-wrap: balance;
}

.hero-p {
  margin: 0 auto;
  max-width: 34ch;
  font-size: 17px;
  line-height: 1.7;
  background: var(--yellow);
  border: 2px solid #000;
  padding: 6px 10px;
  display: inline-block;
}

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

.hero-img {
  display: block;
  width: 100%;
  height: auto;
  border: var(--line);
  box-shadow: 6px 6px 0 #000;
  background: #dff0ff;
  transform: rotate(-1deg);
}

.blob {
  display: block;
  position: relative;
  aspect-ratio: 5 / 4;
  background: var(--blue);
  border: var(--line);
  box-shadow: 6px 6px 0 #000;
  transform: rotate(-1deg);
}
.blob::after {
  content: "";
  position: absolute;
  inset: 20% 24% 30% 18%;
  background: var(--red);
  border: var(--line);
}

/* ---------- 侧栏 ---------- */
.rail {
  grid-column: 1;
  position: sticky;
  top: 16px;
  border: var(--line);
  box-shadow: var(--hard);
  background: #fff;
  padding: 14px 14px 18px;
}

.rail-h {
  font-size: 16px;
  letter-spacing: .18em;
  margin: 0 0 12px;
}

.rail-h span {
  display: inline-block;
  border-bottom: 4px solid var(--red);
  padding-bottom: 2px;
}

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

.rail-list a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 7px 8px;
  border: 2px solid transparent;
  text-decoration: none;
  font-size: 16px;
  line-height: 1.4;
}

.rail-list a:hover,
.rail-list a:focus-visible {
  border-color: #000;
  background: var(--yellow);
  box-shadow: 3px 3px 0 #000;
}

.num {
  font-family: "Poiret One", "Didact Gothic", sans-serif;
  font-style: normal;
  font-size: 19px;
  color: var(--red);
  min-width: 1.6em;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.rail-list li { animation: rise .4s both; }
.rail-list li:nth-child(1) { animation-delay: .02s; }
.rail-list li:nth-child(2) { animation-delay: .06s; }
.rail-list li:nth-child(3) { animation-delay: .1s; }
.rail-list li:nth-child(4) { animation-delay: .14s; }
.rail-list li:nth-child(5) { animation-delay: .18s; }
.rail-list li:nth-child(6) { animation-delay: .22s; }
.rail-list li:nth-child(7) { animation-delay: .26s; }

/* ---------- 正文 ---------- */
.board { grid-column: 2; min-width: 0; }

.prose {
  border: var(--line);
  box-shadow: var(--hard);
  background: #fff;
  padding: 26px 28px 34px;
  max-width: 760px;
}

.prose div[id] {
  padding: 24px 0 26px;
  border-top: 3px dashed #000;
  scroll-margin-top: 18px;
}
.prose div[id]:first-child {
  border-top: 0;
  padding-top: 0;
}

.prose h2 { font-size: clamp(21px, 2.9vw, 27px); }
.prose h2 span { box-shadow: inset 0 -.3em var(--yellow); }
.prose h3 { font-size: 19px; margin-top: 22px; }
.prose h3 span { box-shadow: inset 0 -.3em #cfe9ff; }

.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { margin: 0 0 14px; padding-left: 1.35em; }
.prose li { margin: 0 0 8px; }
.prose li::marker { color: var(--red); font-weight: 700; }

.prose a {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.prose a:hover { background: var(--yellow); }

.prose strong { background: var(--yellow); padding: 0 2px; }

.prose blockquote {
  margin: 0 0 16px;
  padding: 12px 16px;
  border: var(--line);
  border-left-width: 8px;
  background: #f0f8ff;
}
.prose blockquote p:last-child { margin-bottom: 0; }

.prose img {
  display: block;
  height: auto;
  border: var(--line);
  box-shadow: var(--hard);
  margin: 0 0 16px;
}

.prose table {
  display: block;
  overflow-x: auto;
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  margin: 0 0 16px;
}
.prose th, .prose td {
  border: 2px solid #000;
  padding: 8px 10px;
  text-align: left;
}
.prose th { background: var(--blue); }

/* ---------- 滚动显现 ---------- */
.pre { opacity: 0; transform: translateY(12px); }
.in { opacity: 1; transform: none; transition: opacity .45s ease, transform .45s ease; }

/* ---------- 页脚 ---------- */
footer {
  max-width: 1100px;
  margin: 18px auto 0;
  padding: 0 20px 26px;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 22px;
  background: var(--blue);
  border: var(--line);
  box-shadow: 7px 7px 0 #000;
}
.cta h2 {
  margin: 0;
  font-size: clamp(20px, 3.4vw, 28px);
}
.cta h2 span {
  display: inline-block;
  background: #fff;
  border: var(--line);
  padding: 2px 12px;
  transform: rotate(-.8deg);
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 11px 24px;
  background: var(--red);
  color: #fff;
  border: var(--line);
  box-shadow: 4px 4px 0 #000;
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
}
.cta-btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 #000; }

.fcols {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.fcol {
  border: var(--line);
  box-shadow: var(--hard);
  background: #fff;
  padding: 14px 16px 16px;
  min-width: 0;
}

.fcol h3 {
  margin: 0 0 10px;
  font-size: 17px;
}
.fcol h3 span {
  display: inline-block;
  border-bottom: 4px solid var(--blue);
  padding-bottom: 2px;
}

.chip {
  display: block;
  height: 8px;
  background: var(--red);
  border: 2px solid #000;
  margin: 0 0 10px;
}

.fcol dl { margin: 0; }
.fcol dt, .fcol dd { margin: 0; }

.fcol dl a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 4px;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 2px solid #e7e7e7;
}
.fcol dl a:hover { background: var(--yellow); }
.fcol dt:last-child a { border-bottom: 0; }

.fbar {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #000;
  color: #fff;
  border: var(--line);
  padding: 6px 16px;
  font-size: 16px;
}
.fbar a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 8px;
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.fbar a:hover { background: var(--red); }

/* ---------- 底部固定条 ---------- */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-top: var(--line);
  padding: 7px 12px;
  padding-bottom: max(7px, env(safe-area-inset-bottom));
  box-shadow: 0 -4px 0 rgba(0, 0, 0, .1);
}

.dock-brand {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 12px;
  background: var(--yellow);
  border: var(--line);
  box-shadow: 3px 3px 0 #000;
  font-family: "Poiret One", "Didact Gothic", sans-serif;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: .06em;
  text-decoration: none;
  white-space: nowrap;
}

.dock-list {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 2px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.dock-list li { flex: 0 0 auto; }

.dock-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 10px;
  font-size: 16px;
  white-space: nowrap;
  text-decoration: none;
  border: 2px solid transparent;
}
.dock-list a:hover { border-color: #000; background: #dff0ff; }
.dock-list a[aria-current] {
  background: var(--blue);
  border-color: #000;
  box-shadow: 3px 3px 0 #000;
  font-weight: 700;
}

.dock-cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 6px 16px;
  background: var(--red);
  color: #fff;
  border: var(--line);
  box-shadow: 3px 3px 0 #000;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
}
.dock-cta:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #000; }

/* ---------- 断点 ---------- */
@media (max-width: 880px) {
  .wrap {
    grid-template-columns: minmax(0, 1fr);
    padding: 12px 14px 36px;
    gap: 16px;
  }
  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding: 18px 16px;
    box-shadow: 5px 5px 0 #000;
  }
  .hero-art { order: 2; }
  .hero-img, .blob { transform: none; }
  .rail { position: static; grid-column: 1; order: 2; }
  .board { grid-column: 1; order: 3; }
  .prose { padding: 20px 18px 28px; max-width: none; }
  .fcols { grid-template-columns: minmax(0, 1fr); }
  footer { padding: 0 14px 22px; }
  .cta { box-shadow: 5px 5px 0 #000; }
  .dock { gap: 6px; padding-left: 8px; padding-right: 8px; }
  .dock-list a { padding: 6px 8px; font-size: 16px; }
  .dock-cta { padding: 6px 12px; }
}

@media (max-width: 380px) {
  .dock-brand { font-size: 16px; padding: 6px 9px; }
  .dock-cta { padding: 6px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pre { opacity: 1; transform: none; }
  .rail-list li { animation: none; }
  .cta h2 span, .hero-img, .blob { transform: none; }
}

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