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

:root {
  --blue: #3bb1ff;
  --red: #ff5252;
  --ink: #000000;
  --paper: #ffffff;
  --tint: #eef7ff;
  --line: 4px solid #000000;
  --head-h: 84px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Public Sans", system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: "Lexend Mega", "Public Sans", system-ui, sans-serif; font-weight: 800; line-height: 1.16; letter-spacing: -0.01em; margin: 0 0 0.6em; }

/* ---------- 头部 ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  background: var(--paper);
  border-bottom: var(--line);
}

.brand-mark {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  min-height: 46px;
  background: var(--red);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  font-family: "Lexend Mega", sans-serif;
  font-size: 21px;
  font-weight: 800;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark img { width: 26px; height: 26px; }
.brand-mark:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }

.site-head nav { flex: 1 1 auto; min-width: 0; }
.site-head nav p {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  margin: 0;
}
.site-head nav a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 6px 9px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
.site-head nav a:hover,
.site-head nav a:focus-visible { background: var(--blue); }
.site-head nav a:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

/* ---------- 头部主视觉 ---------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 18px;
  min-height: 45vh;
  padding: 30px 16px 28px;
  text-align: right;
  border-bottom: 6px solid var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(var(--ink) 1.2px, transparent 1.2px);
  background-size: 15px 15px;
  background-position: 0 0;
}
.hero-txt { max-width: 780px; }

.kicker {
  display: inline-block;
  margin: 0 0 12px;
  padding: 3px 11px;
  font-size: 16px;
  font-weight: 700;
  background: var(--blue);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
}
.hero h1 {
  margin: 0;
  font-size: clamp(1.65rem, 6.6vw, 3.5rem);
  text-shadow: 3px 3px 0 var(--paper), -1px -1px 0 var(--paper);
}
.lead {
  margin: 16px 0 0 auto;
  max-width: 30em;
  padding: 11px 14px;
  font-size: 1rem;
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--red);
}

.hero-plate {
  margin: 0;
  width: min(100%, 560px);
  background: var(--paper);
  border: 4px solid var(--ink);
  box-shadow: 8px 8px 0 var(--blue);
}
.hero-img { width: 100%; }

/* ---------- 正文区 ---------- */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 14px 52px;
}
.grid > * { min-width: 0; }

.rail {
  padding: 13px 13px 15px;
  background: var(--tint);
  border: 3px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
}
.rail-h { font-size: 1rem; margin: 0 0 11px; }
.rail-h span {
  display: inline-block;
  padding: 3px 9px;
  background: var(--red);
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
.rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
}
.rail-list a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 5px 8px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
}
.rail-list a:hover { background: var(--blue); }
.rail-list em {
  font-style: normal;
  font-family: "Lexend Mega", sans-serif;
  font-size: 0.78rem;
  padding: 0 5px;
  background: var(--red);
  border: 2px solid var(--ink);
}
.rail-top {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-top: 14px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  background: var(--ink);
  color: #fff;
  border: 2px solid var(--ink);
}
.rail-top:hover { background: var(--blue); color: var(--ink); }

/* ---------- 正文排版 ---------- */
.prose { min-width: 0; }
.prose p { margin: 0 0 1.05em; }
.prose section {
  padding-top: 20px;
  margin-bottom: 34px;
  border-top: 4px solid var(--ink);
  scroll-margin-top: 104px;
}
.prose section:first-child { padding-top: 0; border-top: 0; }

.prose h2 {
  font-size: clamp(1.25rem, 3.6vw, 1.85rem);
  margin: 0 0 0.75em;
}
.prose h2 span,
.prose h3 span {
  display: inline-block;
  padding: 2px 10px;
  background: var(--blue);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
}
.prose h3 { font-size: 1.1rem; margin: 1.5em 0 0.6em; }

.prose ul, .prose ol { padding-left: 1.35em; margin: 0 0 1.05em; }
.prose li { margin: 0.35em 0; }
.prose strong { background: var(--blue); padding: 0 3px; }
.prose a { font-weight: 700; text-decoration: none; border-bottom: 3px solid var(--red); }
.prose a:hover { background: var(--red); }
.prose blockquote {
  margin: 1.2em 0;
  padding: 12px 15px;
  background: var(--tint);
  border: 3px solid var(--ink);
  border-left: 8px solid var(--red);
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose figure { margin: 1.2em 0; border: 3px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); }
.prose figcaption { padding: 6px 10px; font-size: 16px; background: var(--paper); border-top: 3px solid var(--ink); }
.prose time {
  display: inline-block;
  padding: 1px 9px;
  font-size: 16px;
  font-weight: 700;
  background: var(--ink);
  color: #fff;
}
.prose table { width: 100%; border-collapse: collapse; margin: 1.2em 0; }
.prose th, .prose td { border: 2px solid var(--ink); padding: 7px 9px; text-align: left; vertical-align: top; }
.prose th { background: var(--blue); }

/* ---------- 页脚 ---------- */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 26px 14px 22px;
  background: var(--ink);
  color: #fff;
  border-top: 6px solid var(--red);
}
.foot-id { display: flex; align-items: center; gap: 12px; }
.foot-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  background: var(--red);
  border: 3px solid #fff;
  color: var(--ink);
  font-family: "Lexend Mega", sans-serif;
  font-size: 20px;
  font-weight: 800;
  text-decoration: none;
}
.foot-logo img { width: 24px; height: 24px; }
.foot-brand { margin: 0; font-size: clamp(1.4rem, 7vw, 2.9rem); line-height: 1.05; }
.foot-brand span {
  display: inline-block;
  padding: 2px 10px;
  color: var(--ink);
  background: var(--blue);
  border: 3px solid #fff;
  box-shadow: 5px 5px 0 var(--red);
}
.foot-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  flex: 1 1 240px;
  justify-content: flex-end;
}
.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 6px 10px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  border: 2px solid #fff;
}
.foot-nav a:hover { background: var(--red); border-color: var(--ink); color: var(--ink); }
.foot-copy { font-size: 16px; font-weight: 700; padding-top: 10px; }

/* ---------- 动效 ---------- */
.js .rv { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.js .rv.in { opacity: 1; transform: none; }
.js .rail-list li { opacity: 0; transform: translateX(-12px); transition: opacity 0.45s ease, transform 0.45s ease; }
.js .rail-list li.in { opacity: 1; transform: none; }

/* ---------- 断点 ---------- */
@media (min-width: 760px) {
  .site-head { padding: 10px 18px; }
  .site-head nav a { padding: 7px 12px; }
  .hero { padding: 40px 22px 36px; }
  .foot { padding: 32px 20px 26px; }
}

@media (min-width: 960px) {
  .grid {
    grid-template-columns: 236px minmax(0, 1fr);
    gap: 36px;
    padding: 44px 20px 76px;
  }
  .rail { position: sticky; top: 92px; }
  .hero { min-height: 45vh; padding: 48px 24px 40px; }
  .hero-txt { padding-right: 6px; }
  .prose section { scroll-margin-top: 112px; }
  .foot-brand { font-size: clamp(1.8rem, 4vw, 3.2rem); }
}

@media (max-width: 420px) {
  .site-head nav a { padding: 6px 7px; }
  .brand-mark { width: 44px; height: 44px; min-height: 44px; }
  .foot-nav { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rv, .js .rail-list li { opacity: 1; transform: none; transition: none; }
}

@media print {
  .site-head, .foot-nav { position: static; }
}

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