:root {
  --bg: #f5f5f5;
  --card: #ffffff;
  --ink: #1f1f1f;
  --muted: #63636a;
  --line: #e6e6e6;
  --r: 28px;
  --shadow: 0 4px 6px rgba(0, 0, 0, .05), 0 16px 36px rgba(0, 0, 0, .05);
}

* { box-sizing: border-box; }

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Cabin", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: "Amatic SC", "Cabin", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-weight: 700;
}

a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
p { margin: 0 0 14px; }
.vh {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
[id] { scroll-margin-top: 142px; }

/* 顶部 */
.head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.head-row {
  position: relative;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 16px;
}

.mark {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 15px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  overflow: hidden;
}
.mark-img { width: 44px; height: 44px; object-fit: cover; }
.mark-txt {
  font-family: "Amatic SC", "Cabin", sans-serif;
  font-size: 26px;
  line-height: 1;
  letter-spacing: .04em;
}

.search {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 300px;
  margin-left: auto;
}
.search input {
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
  padding: 0 16px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.search input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.search button {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  font: inherit;
  font-size: 16px;
  color: #fff;
  background: var(--ink);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}
.search button:hover { background: #3a3a3a; }

.burger {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 14px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}
.burger-lines,
.burger-lines::before,
.burger-lines::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  content: "";
  position: relative;
}
.burger-lines::before { position: absolute; top: -6px; left: 0; }
.burger-lines::after { position: absolute; top: 6px; left: 0; }
body.menu-open .burger-lines { background: transparent; }
body.menu-open .burger-lines::before { transform: rotate(45deg); top: 0; }
body.menu-open .burger-lines::after { transform: rotate(-45deg); top: 0; }
.burger-txt { line-height: 1; }

/* 锚点条 / 全屏菜单 */
.nav {
  background: var(--card);
  border-top: 1px solid var(--line);
}
.nav p {
  display: flex;
  gap: 8px;
  margin: 0 auto;
  padding: 8px 16px;
  max-width: 1180px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav p::-webkit-scrollbar { display: none; }
.nav p a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 15px;
  border-radius: 999px;
  background: var(--bg);
  font-size: 16px;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease;
}
.nav p a:hover,
.nav p a.on { background: var(--ink); color: #fff; }

body.menu-open { overflow: hidden; }
body.menu-open .nav {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 110px 20px 40px;
  overflow-y: auto;
  background: rgba(255, 255, 255, .98);
  border: 0;
}
body.menu-open .nav p {
  flex-direction: column;
  align-items: center;
  gap: 6px;
  max-width: none;
  overflow: visible;
  padding: 0;
}
body.menu-open .nav p a {
  min-height: 56px;
  padding: 0 24px;
  font-size: 26px;
  background: transparent;
}
body.menu-open .nav p a:hover,
body.menu-open .nav p a.on { background: var(--ink); color: #fff; }

/* 首屏 */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 80px 20px 140px;
  text-align: center;
  background: var(--card);
}
.hero h1 {
  position: relative;
  z-index: 2;
  margin: 0;
  max-width: 15em;
  font-size: clamp(44px, 8.6vw, 104px);
  line-height: 1.06;
  letter-spacing: .01em;
}
.hero-cue {
  position: absolute;
  z-index: 3;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
  font-size: 16px;
  text-decoration: none;
  transition: background .2s ease, color .2s ease;
}
.hero-cue:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.slash {
  position: absolute;
  left: -8%;
  right: -8%;
  bottom: 17%;
  z-index: 1;
  height: 58px;
  background: linear-gradient(90deg, #1f1f1f 0%, #4c4c4c 60%, #1f1f1f 100%);
  transform: rotate(-3.4deg);
  border-radius: 4px;
}

/* 主体 */
.wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 16px 88px;
}

.rail {
  background: var(--card);
  border-radius: var(--r);
  padding: 18px 16px;
  box-shadow: var(--shadow);
}
.rail-title {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: .06em;
  color: var(--muted);
}
.rail ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rail a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  font-size: 16px;
  line-height: 1.3;
  text-decoration: none;
  transition: background .2s ease;
}
.rail a:hover { background: var(--bg); }

.body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  min-width: 0;
}
.body > section {
  grid-column: 1 / -1;
  min-width: 0;
  padding: 26px 22px;
  background: var(--card);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow-wrap: break-word;
  transition: box-shadow .35s ease, transform .35s ease;
}
.body > section.hit { outline: 3px solid var(--ink); outline-offset: 4px; }

.intro { background: var(--ink); color: #fff; }
.intro h2 { margin: 0 0 8px; font-size: clamp(30px, 4vw, 44px); line-height: 1.1; }
.subtitle { margin: 0; color: #cfcfcf; font-size: 16px; }

.body section h2 {
  margin: 0 0 10px;
  font-size: clamp(26px, 3.2vw, 38px);
  line-height: 1.14;
  letter-spacing: .01em;
}
.body section h3 { margin: 26px 0 8px; font-size: 21px; line-height: 1.35; }
.body section h3 + p { margin-top: 0; }
.body section p + h3 { margin-top: 28px; }
.body section ul,
.body section ol { margin: 0 0 16px; padding-left: 1.35em; }
.body section li { margin: 0 0 6px; }
.body section li::marker { color: var(--muted); }
.body section blockquote {
  margin: 18px 0;
  padding: 4px 0 4px 16px;
  border-left: 3px solid var(--ink);
  color: #3d3d3d;
}
.body section figure { margin: 18px 0; }
.body section figcaption { font-size: 15px; color: var(--muted); margin-top: 8px; }
.body section table { width: 100%; border-collapse: collapse; font-size: 16px; }
.body section th,
.body section td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.body section code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .95em;
  background: var(--bg);
  padding: 1px 5px;
  border-radius: 6px;
}
.body section strong { font-weight: 700; }
.body section > *:last-child { margin-bottom: 0; }
.body section a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* 页脚 */
footer {
  background: var(--card);
  border-top: 1px solid var(--line);
  padding: 48px 16px 26px;
}
.foot {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  max-width: 1180px;
  margin: 0 auto;
}
footer address { font-style: normal; }
.foot-brand {
  display: block;
  font-family: "Amatic SC", "Cabin", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 700;
  font-size: clamp(32px, 6.4vw, 58px);
  line-height: 1;
  letter-spacing: .02em;
}
footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
footer ul a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 16px;
  color: #4a4a50;
  text-decoration: none;
}
footer ul a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.foot-top { margin: 0; }
.foot-top a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 16px;
  text-decoration: none;
}
.foot-top a:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.foot-base {
  max-width: 1180px;
  margin: 30px auto 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--muted);
}
.foot-base p { margin: 0; }

/* 断点 */
@media (min-width: 720px) {
  .foot { grid-template-columns: 1.5fr 1fr 1fr auto; align-items: start; }
  .body > section { padding: 32px 30px; }
}

@media (min-width: 900px) {
  .wrap { grid-template-columns: 224px minmax(0, 1fr); gap: 24px; padding-top: 32px; }
  .rail { position: sticky; top: 142px; }
  .body { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .body > section:nth-child(odd) { grid-column: span 4; }
  .body > section:nth-child(even) { grid-column: span 2; }
}

@media (max-width: 719px) {
  .hero { padding-bottom: 120px; }
  .slash { height: 42px; bottom: 18%; }
  .search { max-width: none; }
  .burger-txt { display: none; }
  .burger { width: 44px; padding: 0; justify-content: center; }
}

@media (prefers-reduced-motion: no-preference) {
  .rv { opacity: 0; transform: translateY(20px); transition: opacity .55s ease, transform .55s ease; }
  .rv.in { opacity: 1; transform: none; }
  .body > section.rv.in:hover { transform: translateY(-4px); box-shadow: 0 10px 18px rgba(0, 0, 0, .07), 0 26px 56px rgba(0, 0, 0, .07); }
}

@media (prefers-reduced-motion: reduce) {
  .body > section,
  .nav p a,
  .hero-cue { transition: none; }
}

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