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

:root {
  --blue: #3bb1ff;
  --red: #ff5252;
  --ink: #000;
  --paper: #fff;
  --sh: 6px 6px 0 var(--ink);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Chakra Petch', -apple-system, 'PingFang SC', 'Microsoft YaHei', 'Heiti SC', sans-serif;
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.15; font-weight: 700; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.hide { display: none !important; }

/* ---------- 顶部两行 ---------- */
.bar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 3px solid var(--ink);
}

.bar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 10px 16px;
  border-bottom: 3px solid var(--ink);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
  font-family: 'Russo One', 'Chakra Petch', system-ui, sans-serif;
  font-size: 20px;
  letter-spacing: .4px;
}

.mark {
  display: grid;
  place-items: center;
  min-width: 36px;
  height: 36px;
  padding: 0 4px;
  background: var(--red);
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  font-size: 15px;
}

.search { display: flex; align-items: stretch; }

.search input {
  width: 148px;
  min-height: 44px;
  padding: 0 10px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
  border: 3px solid var(--ink);
  border-right: 0;
  border-radius: 0;
  appearance: none;
}

.search input:focus { outline: 3px solid var(--blue); outline-offset: -6px; }

.search button {
  min-height: 44px;
  padding: 0 14px;
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  background: var(--blue);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 0;
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
}

.search button:hover { background: var(--red); }

.bar-menu ol {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bar-menu li { border-right: 3px solid var(--ink); }

.bar-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 14px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: background .15s linear;
}

.bar-menu a:hover,
.bar-menu a:focus-visible { background: var(--blue); }

.num {
  font-family: 'Russo One', monospace;
  font-size: 11px;
  line-height: 1;
  padding: 3px 4px;
  color: var(--paper);
  background: var(--ink);
}

/* ---------- 首屏 ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100svh - 190px);
  background: var(--blue);
  border-bottom: 3px solid var(--ink);
}

.hero-txt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 18px;
  padding: 34px 20px 46px;
  text-align: left;
}

.hero h1 {
  font-size: clamp(28px, 5vw, 56px);
  letter-spacing: -.5px;
}

.hero-sub {
  margin: 0;
  max-width: 44ch;
  font-size: 17px;
}

.cta {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 22px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  color: var(--paper);
  background: var(--ink);
  border: 3px solid var(--ink);
  box-shadow: 6px 6px 0 var(--red);
  transition: transform .12s linear, box-shadow .12s linear;
}

.cta:hover,
.cta:focus-visible {
  transform: translate(3px, 3px);
  box-shadow: 3px 3px 0 var(--red);
}

.hero-art {
  border-left: 3px solid var(--ink);
  background: var(--red);
  min-height: 260px;
}

.hero-art .hero-pic,
.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- 正文 + 侧栏 ---------- */
.wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  align-items: start;
  gap: 26px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 16px 54px;
}

.col { min-width: 0; }

.prose > article {
  padding: 22px 20px;
  margin: 0 0 30px;
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: var(--sh);
}

.prose > article:last-child { margin-bottom: 0; }

.prose article[id] { scroll-margin-top: 170px; }

.prose h2 { font-size: clamp(22px, 3vw, 30px); margin: 0 0 14px; }
.prose h3 { font-size: 20px; margin: 22px 0 10px; }

.prose small {
  display: inline-block;
  margin-bottom: 8px;
  padding: 1px 8px;
  font-size: 15px;
  font-weight: 700;
  background: var(--red);
  border: 3px solid var(--ink);
}

.prose p { margin: 0 0 14px; }
.prose p:last-child { margin-bottom: 0; }

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

.prose li { margin: .3em 0; }

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

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

.prose blockquote {
  margin: 0 0 14px;
  padding: 12px 16px;
  background: var(--blue);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
}

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

.prose img { border: 3px solid var(--ink); margin: 0 0 14px; }

/* ---------- 侧栏 ---------- */
.rail {
  position: sticky;
  top: 170px;
  padding: 18px 16px;
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: var(--sh);
}

.kick {
  display: inline-block;
  padding: 1px 8px;
  font-size: 15px;
  font-weight: 700;
  background: var(--red);
  border: 3px solid var(--ink);
}

.rail-h {
  margin: 8px 0 0;
  font-size: 20px;
}

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

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 10px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border: 3px solid var(--ink);
  transition: background .15s linear, box-shadow .15s linear;
}

.rail-list a:hover,
.rail-list a:focus-visible {
  background: var(--blue);
  box-shadow: 3px 3px 0 var(--ink);
}

/* ---------- 页脚 ---------- */
.foot {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 22px;
  padding: 30px 16px 20px;
  background: var(--ink);
  color: var(--paper);
  border-top: 3px solid var(--ink);
}

.foot article { min-width: 0; }

.huge {
  margin: 0;
  font-family: 'Russo One', 'Chakra Petch', system-ui, sans-serif;
  font-size: clamp(34px, 8vw, 86px);
  line-height: .95;
  color: var(--blue);
  word-break: break-word;
}

.f-col small {
  display: inline-block;
  padding: 1px 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  background: var(--red);
}

.f-col h2 {
  margin: 8px 0 10px;
  font-size: 20px;
}

.f-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.f-col a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 6px 0;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 2px solid var(--blue);
}

.f-col a:hover,
.f-col a:focus-visible { color: var(--blue); }

.colophon {
  grid-column: 1 / -1;
  margin: 6px 0 0;
  padding-top: 12px;
  font-size: 16px;
  border-top: 3px solid var(--blue);
}

/* ---------- 回到顶部 ---------- */
.totop {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  background: var(--blue);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s linear;
}

.totop.on { opacity: 1; pointer-events: auto; }

/* ---------- 滚动揭示 ---------- */
.js .prose > article {
  opacity: 0;
  transform: translateY(18px);
}

.js .prose > article.in {
  opacity: 1;
  transform: none;
  transition: opacity .45s ease, transform .45s ease;
}

/* ---------- 断点 ---------- */
@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-txt { padding: 28px 16px 34px; }
  .hero-art { border-left: 0; border-top: 3px solid var(--ink); height: 230px; }
  .wrap { grid-template-columns: 1fr; padding: 20px 16px 44px; }
  .rail { position: static; }
  .foot { grid-template-columns: 1fr 1fr; }
  .f-brand { grid-column: 1 / -1; }
  .prose article[id] { scroll-margin-top: 200px; }
}

@media (max-width: 560px) {
  .bar-top { padding: 8px 12px; }
  .brand { font-size: 18px; }
  .search { flex: 1 1 100%; }
  .search input { flex: 1 1 auto; width: auto; }
  .bar-menu a { padding: 10px 11px; font-size: 15px; }
  .foot { grid-template-columns: 1fr; }
  .f-brand { grid-column: auto; }
  .totop { right: 10px; bottom: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .prose > article { opacity: 1; transform: none; transition: none; }
  .cta, .totop { transition: none; }
  .cta:hover { transform: none; }
}

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