@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&display=swap');

:root {
  --blue: #3bb1ff;
  --red: #ff5252;
  --ink: #000000;
  --paper: #fbf7ef;
  --soft: #cfe9ff;
  --line: 3px;
  --shadow: 5px 5px 0 var(--ink);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: "DM Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(rgba(0, 0, 0, 0.1) 1.4px, transparent 1.5px);
  background-size: 26px 26px;
  overflow-x: clip;
}

img { max-width: 100%; }

a { color: var(--ink); }

.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;
}

/* 顶栏 */
.top {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #fff;
  border-bottom: var(--line) solid var(--ink);
}

.brandrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 16px;
  border-bottom: var(--line) solid var(--ink);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 5px 14px 5px 6px;
  border: var(--line) solid var(--ink);
  border-radius: 12px;
  background: var(--blue);
  box-shadow: 4px 4px 0 var(--ink);
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.logo:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }

.logo .mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.search {
  display: flex;
  flex: 1 1 200px;
  min-width: 0;
  border: var(--line) solid var(--ink);
  border-radius: 12px;
  background: #fff;
  box-shadow: 4px 4px 0 var(--ink);
  overflow: hidden;
}

.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 10px 12px;
  min-height: 44px;
  font: inherit;
  font-size: 16px;
  background: transparent;
  color: var(--ink);
}

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

.search button {
  border: 0;
  border-left: var(--line) solid var(--ink);
  background: var(--red);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  padding: 0 18px;
  min-height: 44px;
  cursor: pointer;
}

.burger {
  margin-left: auto;
  min-height: 44px;
  padding: 8px 18px;
  border: var(--line) solid var(--ink);
  border-radius: 12px;
  background: var(--red);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  box-shadow: 4px 4px 0 var(--ink);
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.burger:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }

.menu { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

.menu ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 10px 0;
  list-style: none;
}

.menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 14px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  font-weight: 500;
  font-size: 16px;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}

.menu a:hover { background: var(--blue); box-shadow: 3px 3px 0 var(--ink); transform: translate(-1px, -1px); }

/* 全屏遮罩菜单 */
body.menu-open { overflow: hidden; }

body.menu-open .menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  max-width: none;
  margin: 0;
  padding: 88px 20px 40px;
  overflow: auto;
  background-color: var(--blue);
  background-image: radial-gradient(rgba(0, 0, 0, 0.16) 1.6px, transparent 1.7px);
  background-size: 22px 22px;
  border: 0;
}

body.menu-open .menu ol { flex-direction: column; gap: 12px; padding: 0; }

body.menu-open .menu a {
  font-size: clamp(20px, 5vw, 30px);
  font-weight: 700;
  padding: 12px 18px;
  border-width: var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 6px 6px 0 var(--ink);
}

body.menu-open .burger {
  position: fixed;
  top: 14px;
  right: 16px;
  z-index: 80;
  background: #fff;
}

/* 首屏 */
.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100svh;
  overflow: hidden;
  border-bottom: 5px solid var(--ink);
  background-color: var(--blue);
  background-image: radial-gradient(rgba(0, 0, 0, 0.16) 1.8px, transparent 1.9px);
  background-size: 24px 24px;
}

.hero-media { position: absolute; inset: 0; }

.hero-media:empty { display: none; }

.hero-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 820px;
  padding: 96px 20px;
  text-align: center;
}

.kicker {
  display: inline-block;
  margin: 0 0 18px;
  padding: 5px 16px;
  border: var(--line) solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 8vw, 4.2rem);
  line-height: 1.1;
  font-weight: 700;
  color: #fff;
  text-shadow: 4px 4px 0 var(--ink);
}

.hero .lead {
  margin: 0 0 26px;
  font-size: 17px;
  line-height: 1.6;
  color: #fff;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.7);
}

.hero-cta { margin: 0; }

.hero-cta a {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 12px 30px;
  border: var(--line) solid var(--ink);
  border-radius: 18px;
  background: var(--red);
  box-shadow: 6px 6px 0 var(--ink);
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.hero-cta a:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--ink); }

/* 主体两栏 */
.main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 32px;
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px 16px 56px;
}

.article { min-width: 0; }

.article div {
  margin: 0 0 28px;
  padding: 24px 20px 20px;
  border: var(--line) solid var(--ink);
  border-bottom-width: 10px;
  border-bottom-color: var(--blue);
  border-radius: 18px;
  background: #fff;
  box-shadow: 6px 6px 0 var(--ink);
  scroll-margin-top: 140px;
}

.article div:nth-child(even) { border-bottom-color: var(--red); }

.article div:target { outline: 4px solid var(--red); outline-offset: 4px; }

.article h2 {
  margin: 0 0 12px;
  font-size: clamp(1.35rem, 4vw, 1.9rem);
  line-height: 1.25;
  font-weight: 700;
}

.article h3 {
  margin: 20px 0 8px;
  font-size: 1.15rem;
  line-height: 1.3;
}

.article p { margin: 0 0 14px; }

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

.article li { margin: 0 0 8px; }

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

.article strong { background: var(--blue); padding: 0 3px; }

.article blockquote {
  margin: 0 0 16px;
  padding: 10px 14px;
  border: var(--line) solid var(--ink);
  border-left-width: 10px;
  border-left-color: var(--red);
  border-radius: 12px;
  background: #fff4f4;
}

.article img {
  display: block;
  height: auto;
  border: var(--line) solid var(--ink);
  border-radius: 14px;
}

.article table { width: 100%; border-collapse: collapse; margin: 0 0 16px; }

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

.article th { background: var(--soft); }

/* 侧栏 */
.side {
  position: sticky;
  top: 132px;
  align-self: start;
  padding: 18px;
  border: var(--line) solid var(--ink);
  border-bottom-width: 8px;
  border-bottom-color: var(--red);
  border-radius: 18px;
  background: #fff;
  box-shadow: 6px 6px 0 var(--ink);
}

.side h2 { margin: 0 0 4px; font-size: 20px; line-height: 1.3; }

.side .subtitle { margin: 0 0 14px; font-size: 16px; }

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

.side-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: #fff;
  font-size: 16px;
  text-decoration: none;
  transition: background-color 0.12s ease, box-shadow 0.12s ease;
}

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

/* 页脚 */
.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px 24px;
  padding: 40px 20px 32px;
  border-top: 5px solid var(--ink);
  background: var(--ink);
  color: #fff;
}

.foot .cta {
  flex: 1 1 100%;
  margin: 0;
  font-size: clamp(1.6rem, 6vw, 2.6rem);
  font-weight: 700;
  line-height: 1.15;
}

.foot .cta a {
  display: inline-block;
  padding: 4px 0;
  color: #fff;
  text-decoration: none;
  border-bottom: 6px solid var(--blue);
}

.foot .fbrand { flex: 1 1 170px; margin: 0; font-size: 18px; font-weight: 700; }

.foot .fnote { flex: 1 1 170px; font-size: 16px; color: var(--soft); }

/* 滚动进入 */
.reveal { opacity: 0; transform: translateY(14px); }

.reveal.in { opacity: 1; transform: none; transition: opacity 0.45s ease, transform 0.45s ease; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0.001ms !important; }
}

/* 窄屏 */
@media (max-width: 860px) {
  .main { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 24px 14px 40px; }
  .side { position: static; }
  .article div { scroll-margin-top: 170px; }
}

@media (max-width: 640px) {
  body { font-size: 17px; }
  .brandrow { padding: 8px 12px; gap: 8px; }
  .logo { order: 1; font-size: 18px; }
  .burger { order: 2; }
  .search { order: 3; flex: 1 1 100%; }
  .hero { min-height: 88svh; }
  .hero-copy { padding: 84px 16px 72px; }
  .hero .lead { font-size: 16px; }
  .article div { padding: 20px 16px 18px; border-radius: 16px; }
  .foot small:last-child { text-align: left; }
  .side-list a { font-size: 16px; }
}

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