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

:root {
  --paper: #fafaf8;
  --ink: #1a1a1a;
  --pencil: #4a4a4a;
  --line: #d9d7cf;
  --wash: #f1f0ea;
  --hand: 2px solid var(--ink);
  --r1: 14px 5px 16px 6px / 6px 16px 5px 14px;
  --r2: 6px 15px 5px 17px / 16px 6px 14px 5px;
}

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

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

html.lock { overflow: hidden; }

body {
  margin: 0;
  overflow-x: hidden;
  font-family: 'Nunito Sans', Rubik, system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.68;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    repeating-linear-gradient(0deg, rgba(26, 26, 26, .028) 0 1px, transparent 1px 4px),
    radial-gradient(rgba(74, 74, 74, .055) 0 2px, transparent 2px),
    radial-gradient(rgba(26, 26, 26, .04) 0 1px, transparent 1px);
  background-size: auto, 213px 171px, 131px 121px;
}

h1, h2, h3, h4, h5 {
  font-family: Rubik, 'Nunito Sans', system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.24;
  letter-spacing: -.012em;
  margin: 0 0 .55em;
}

p { margin: 0 0 1em; }

a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid rgba(26, 26, 26, .26);
}

a:hover {
  border-bottom-color: var(--ink);
  background: rgba(26, 26, 26, .055);
}

a, button { transition: transform .02s linear, background-color .02s linear; }

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

/* ---------- 页头 ---------- */
.masthead {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  border-bottom: 2px solid var(--ink);
  background: var(--paper);
}

.menu-btn {
  font: inherit;
  font-size: 16px;
  padding: 11px 14px;
  color: var(--ink);
  background: var(--paper);
  border: var(--hand);
  border-radius: var(--r1);
  cursor: pointer;
}

.menu-btn:hover { background: var(--wash); transform: rotate(-1.4deg); }

.topnav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.nav-l, .nav-r {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin: 0;
  min-width: 0;
}

.nav-l { justify-self: start; }
.nav-r { justify-self: end; justify-content: flex-end; }

.topnav a {
  padding: 11px 10px;
  font-size: 16px;
  border-bottom: 0;
  border-radius: var(--r1);
  white-space: nowrap;
}

.topnav a:hover { transform: rotate(-1.2deg); }

.topnav .brand {
  justify-self: center;
  font-family: Rubik, sans-serif;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: .01em;
  padding: 8px 12px;
  border-bottom: 0;
  border-left: 2px dashed var(--line);
  border-right: 2px dashed var(--line);
  white-space: nowrap;
}

.head-cta {
  padding: 12px 17px;
  font-size: 16px;
  font-weight: 600;
  color: var(--paper);
  background: var(--ink);
  border: 0;
  border-radius: var(--r1);
  transform: rotate(-.8deg);
  white-space: nowrap;
}

.head-cta:hover {
  background: #000;
  color: var(--paper);
  transform: rotate(.6deg);
}

/* ---------- 粘性锚点条 ---------- */
.strip {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  gap: 3px;
  overflow-x: auto;
  padding: 7px 16px;
  background: var(--ink);
  border-bottom: 2px solid var(--ink);
}

.strip a {
  color: var(--paper);
  border: 0;
  border-radius: var(--r2);
  padding: 11px 12px;
  font-size: 16px;
  white-space: nowrap;
}

.strip a:hover { background: #000; color: var(--paper); }

/* ---------- 全屏菜单 ---------- */
.veil {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  padding: 24px;
  background: rgba(26, 26, 26, .97);
  color: var(--paper);
  opacity: 0;
  visibility: hidden;
  transform: rotate(-.5deg) scale(1.03);
  transition: none;
}

.veil.on {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.veil-close {
  position: absolute;
  top: 16px;
  right: 16px;
  font: inherit;
  font-size: 16px;
  padding: 11px 15px;
  color: var(--paper);
  background: transparent;
  border: 2px solid rgba(250, 250, 248, .6);
  border-radius: var(--r1);
  cursor: pointer;
}

.veil-close:hover { background: rgba(250, 250, 248, .12); }

.veil-links {
  display: grid;
  justify-items: center;
  gap: 2px;
  margin: 0;
}

.veil a {
  color: var(--paper);
  border: 0;
  border-bottom: 2px solid rgba(250, 250, 248, .22);
  font-family: Rubik, sans-serif;
  font-size: 23px;
  padding: 12px 18px;
}

.veil a:hover { background: rgba(250, 250, 248, .12); color: var(--paper); }

/* ---------- 主体网格 ---------- */
main {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 12px 36px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 26px 22px 64px;
}

main > div {
  grid-column: 2;
  min-width: 0;
  padding-bottom: 26px;
  margin-bottom: 26px;
  border-bottom: 1px dashed var(--line);
}

main > div:last-child { border-bottom: 0; }

main > aside {
  grid-column: 1;
  align-self: start;
  position: sticky;
  top: 78px;
  padding: 14px 12px;
  background: #fff;
  border: var(--hand);
  border-radius: var(--r1);
  transform: rotate(-.5deg);
}

main > div[id] { scroll-margin-top: 96px; }

/* ---------- 首屏 ---------- */
main > div.hero {
  grid-column: 1 / -1;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center;
  gap: 26px;
  min-height: 45vh;
  margin-bottom: 10px;
  padding: 18px 0 58px;
  border-bottom: 0;
}

.hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  height: 15px;
  background: var(--ink);
  clip-path: polygon(0 48%, 100% 0, 100% 100%, 0 100%);
}

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

.hero-copy h1 {
  font-size: clamp(29px, 5vw, 52px);
  letter-spacing: -.03em;
  margin-bottom: .38em;
}

.hero-lede {
  color: var(--pencil);
  font-size: 16.5px;
  max-width: 46ch;
  margin: 0 auto;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-fig {
  margin: 0;
  padding: 7px;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: var(--r2);
  transform: rotate(-1.3deg);
  overflow: hidden;
}

.hero-fig img {
  width: 100%;
  border-radius: 8px 3px 9px 4px;
  max-height: 40vh;
  object-fit: cover;
}

.hero-blank {
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: 8px 3px 9px 4px;
  background: repeating-linear-gradient(45deg, #efece4 0 9px, #f7f5ef 9px 18px);
}

/* ---------- 侧栏 ---------- */
.side-h {
  font-size: 16px;
  letter-spacing: .1em;
  margin: 0 0 8px;
}

.side-links {
  display: grid;
  gap: 1px;
  margin: 0;
}

.side-links a {
  display: block;
  padding: 10px 8px;
  font-size: 16px;
  border: 0;
  border-bottom: 1px dashed var(--line);
  border-radius: 4px;
}

.side-links a:last-child { border-bottom: 0; }

.side-links a:hover { background: var(--wash); transform: rotate(-.8deg); }

/* ---------- 正文字块 ---------- */
main > div > h2 {
  font-size: clamp(23px, 3vw, 31px);
  margin-top: .1em;
}

div h2 > span,
div h3 > span,
.side-h > span,
.cta-h > span {
  position: relative;
  display: inline-block;
  z-index: 0;
}

div h2 > span::after,
.cta-h > span::after {
  content: '';
  position: absolute;
  left: -5px;
  right: -5px;
  bottom: 0;
  height: 10px;
  background: rgba(26, 26, 26, .15);
  transform: rotate(-.8deg);
  z-index: -1;
}

div p { max-width: 70ch; color: var(--pencil); }

div h3 {
  font-size: 20px;
  margin-top: 1.4em;
  color: var(--ink);
}

div ul,
div ol {
  color: var(--pencil);
  padding-left: 1.3em;
  margin: 0 0 1.2em;
}

div li { margin-bottom: .4em; }

div blockquote {
  margin: 1.3em 0;
  padding: 12px 18px;
  border-left: 5px solid var(--ink);
  background: var(--wash);
  border-radius: 0 var(--r1) var(--r1) 0;
}

div blockquote p { margin: 0; }

div figure { margin: 1.4em 0; }

div figure img {
  padding: 5px;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: var(--r1);
  transform: rotate(-.5deg);
}

div figcaption {
  font-size: 15.5px;
  color: var(--pencil);
  padding-top: 8px;
}

div strong { color: var(--ink); }

div > p:first-of-type { font-size: 17.5px; }

/* ---------- 页脚 ---------- */
.foot {
  border-top: 3px solid var(--ink);
  background: #f2f1eb;
  padding: 34px 22px 22px;
}

.foot-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  max-width: 1160px;
  margin: 0 auto 26px;
  padding: 20px 22px;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: var(--r2);
  transform: rotate(-.4deg);
}

.cta-h { margin: 0; font-size: clamp(22px, 3vw, 30px); }

.cta-btn {
  padding: 13px 22px;
  font-size: 16px;
  font-weight: 600;
  color: var(--paper);
  background: var(--ink);
  border: 0;
  border-radius: var(--r1);
}

.cta-btn:hover { background: #000; color: var(--paper); transform: rotate(-1.2deg); }

.foot-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  max-width: 1160px;
  margin: 0 auto;
}

.foot-cols dt {
  font-family: Rubik, sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .08em;
  margin-bottom: 6px;
  padding-bottom: 5px;
  border-bottom: 2px solid var(--ink);
}

.foot-cols dd { margin: 0; }

.foot-cols a {
  display: inline-block;
  padding: 8px 0;
  font-size: 16px;
  border-bottom: 0;
}

.foot-cols a:hover { background: transparent; border-bottom: 2px solid var(--ink); }

.foot-base {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  max-width: 1160px;
  margin: 24px auto 0;
  padding-top: 14px;
  border-top: 1px dashed #c6c4bb;
  font-size: 16px;
}

.foot-base .copy {
  grid-column: 2;
  margin: 0;
  text-align: center;
  color: var(--pencil);
}

.totop {
  grid-column: 1;
  justify-self: start;
  padding: 11px 14px;
  border: var(--hand);
  border-radius: var(--r1);
  background: var(--paper);
}

.totop:hover { background: #fff; transform: rotate(-1.2deg); }

/* ---------- 窄屏 ---------- */
@media (max-width: 900px) {
  .masthead {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
  }

  .menu-btn { order: 1; }

  .head-cta { order: 2; margin-left: auto; }

  .topnav {
    order: 3;
    flex: 1 1 100%;
    display: flex;
    gap: 3px;
    overflow-x: auto;
    min-width: 0;
    padding-bottom: 2px;
    order: 3;
  }

  .nav-l, .nav-r { flex-wrap: nowrap; }

  .topnav .brand { border: 0; padding: 11px 10px; }

  main {
    display: block;
    padding: 18px 16px 46px;
  }

  main > aside {
    position: static;
    transform: none;
    margin-bottom: 22px;
  }

  .side-links {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .side-links a {
    white-space: nowrap;
    border-bottom: 1px solid var(--line);
    border-radius: var(--r1);
  }

  main > div.hero {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 6px 0 46px;
  }

  .hero-fig { max-width: 480px; margin: 0 auto; }

  .hero-fig img { max-height: 34vh; }

  .foot { padding: 26px 16px 18px; }
}

@media (max-width: 620px) {
  .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }

  .foot-base {
    grid-template-columns: 1fr auto;
  }

  .foot-base .copy { grid-column: 1; text-align: left; }

  .totop { grid-column: 2; justify-self: end; }

  .veil a { font-size: 20px; padding: 11px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}

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