:root {
  --paper: #ffffff;
  --mist: #f5f5f5;
  --ink: #1f1f1f;
  --ink-2: #3c3c3c;
  --line: #e6e6e6;
  --glass: rgba(255, 255, 255, 0.74);
  --r: 28px;
  --el-sm: 0 1px 2px rgba(31, 31, 31, 0.06), 0 2px 6px rgba(31, 31, 31, 0.05);
  --el-md: 0 2px 6px rgba(31, 31, 31, 0.06), 0 12px 26px rgba(31, 31, 31, 0.08);
  --el-lg: 0 6px 16px rgba(31, 31, 31, 0.07), 0 24px 50px rgba(31, 31, 31, 0.1);
  --el-xl: 0 12px 28px rgba(31, 31, 31, 0.08), 0 44px 88px rgba(31, 31, 31, 0.13);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: clip;
  font-family: Poppins, "Open Sans", system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background-color: var(--mist);
  background-image:
    radial-gradient(900px 540px at 86% -8%, #ffffff 0%, rgba(255, 255, 255, 0) 62%),
    radial-gradient(780px 480px at -10% 44%, #efefef 0%, rgba(239, 239, 239, 0) 60%),
    radial-gradient(700px 420px at 50% 110%, #ededed 0%, rgba(237, 237, 237, 0) 65%);
  background-attachment: fixed;
}

img,
svg,
video,
iframe,
canvas {
  max-width: 100%;
  height: auto;
}

img { height: auto; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 10px;
}

/* ---------- 左侧竖排栏 ---------- */
.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: 180px;
  max-width: 100%;
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px 14px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px) saturate(1.3);
  border-right: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--el-md);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}

.rail.is-scrolled {
  box-shadow: var(--el-lg);
  background: rgba(255, 255, 255, 0.88);
}

.rail-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--el-sm);
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rail-brand:hover {
  transform: translateY(-2px);
  box-shadow: var(--el-md);
}

.rail-logo {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: block;
}

.rail-mark {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 7px;
  background: var(--ink);
  box-shadow: 0 4px 10px rgba(31, 31, 31, 0.35);
}

.rail-nav {
  flex: 1 1 auto;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.rail-nav ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.rail-nav a {
  display: block;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink-2);
  text-decoration: none;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.rail-nav a:hover {
  background: #fff;
  color: var(--ink);
  box-shadow: var(--el-sm);
  transform: translateY(-1px);
}

.rail-cta {
  display: block;
  text-align: center;
  min-height: 44px;
  padding: 11px 12px;
  border-radius: 16px;
  background: var(--ink);
  color: #fff;
  font-size: 16px;
  text-decoration: none;
  box-shadow: var(--el-lg);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rail-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--el-xl);
}

/* ---------- 版心 ---------- */
main {
  display: block;
  max-width: 100%;
  overflow-x: clip;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(16px, 3vw, 40px) clamp(14px, 3vw, 40px) 0;
  display: grid;
  grid-template-columns: 226px minmax(0, 1fr);
  gap: clamp(14px, 2vw, 26px);
  align-items: start;
}

.wrap > aside { grid-column: 1; grid-row: 1 / -1; align-self: start; }
.wrap > section { grid-column: 2; }

.wrap > section,
.side {
  position: relative;
  z-index: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(1.25);
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: var(--r);
  box-shadow: var(--el-md);
  padding: clamp(20px, 2.6vw, 38px);
  transition: box-shadow 0.35s ease, transform 0.35s ease;
}

.wrap > section + section { margin-top: clamp(14px, 2vw, 22px); }

.wrap > section:hover {
  z-index: 3;
  box-shadow: var(--el-lg);
}

.wrap > section[id] { scroll-margin-top: 26px; }

/* ---------- 侧栏 ---------- */
.side {
  position: sticky;
  top: 26px;
  z-index: 2;
  padding: 22px 16px;
}

.side h2 {
  font-size: 18px;
  margin: 0 0 20px;
  padding-left: 4px;
}

.side-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.side-list a {
  display: block;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 13px;
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink-2);
  text-decoration: none;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.side-list a:hover {
  background: #fff;
  color: var(--ink);
  box-shadow: var(--el-sm);
  transform: translateX(2px);
}

/* ---------- 标题与正文 ---------- */
h1 {
  font-size: clamp(26px, 4.2vw, 44px);
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

h2,
h3 { overflow-wrap: anywhere; }

h2 > span,
h3 > span { display: inline-block; position: relative; }

h2 > span::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -7px;
  width: 38px;
  height: 3px;
  border-radius: 3px;
  background: var(--ink);
}

.wrap > section h2 {
  font-size: clamp(20px, 2.4vw, 27px);
  line-height: 1.4;
  margin: 0 0 20px;
  font-weight: 600;
}

.wrap > section h3 {
  font-size: 18px;
  margin: 1.5em 0 0.6em;
  font-weight: 600;
}

.wrap > section p { margin: 0 0 1em; color: var(--ink-2); }

.wrap > section ul,
.wrap > section ol { margin: 0 0 1em; padding-left: 1.3em; }

.wrap > section li { margin: 0.35em 0; color: var(--ink-2); }

.wrap > section a {
  color: var(--ink);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.wrap > section > *:last-child { margin-bottom: 0; }

.wrap > section blockquote {
  margin: 1.2em 0;
  padding: 14px 18px;
  border-left: 3px solid var(--ink);
  background: rgba(255, 255, 255, 0.7);
  border-radius: 0 16px 16px 0;
  color: var(--ink-2);
}

.wrap > section table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 16px;
}

.wrap > section th,
.wrap > section td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  overflow-wrap: anywhere;
}

.wrap > section pre {
  max-width: 100%;
  overflow-x: auto;
  margin: 1.2em 0;
  padding: 14px 16px;
  font-size: 15px;
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--el-sm);
}

.wrap > section code { overflow-wrap: anywhere; }

/* ---------- 首屏 ---------- */
.hero {
  display: flex;
  align-items: center;
  min-height: 45vh;
  z-index: 2;
  box-shadow: var(--el-lg);
}

.hero-card {
  position: relative;
  z-index: 2;
  width: 100%;
  text-align: center;
  padding: 6px 0;
}

.hero-badge {
  display: inline-block;
  max-width: 100%;
  margin: 0 0 16px;
  padding: 7px 18px;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--el-sm);
  font-size: 16px;
  letter-spacing: 0.03em;
  color: var(--ink-2);
  transform: translateZ(0);
  overflow-wrap: anywhere;
}

.hero-art {
  position: absolute;
  right: clamp(0px, 3vw, 34px);
  top: -10px;
  z-index: -1;
  width: clamp(66px, 10vw, 116px);
  margin: 0;
  filter: drop-shadow(0 18px 26px rgba(31, 31, 31, 0.18));
  will-change: transform;
}

.hero-art svg { display: block; width: 100%; height: auto; }

/* ---------- 页脚 ---------- */
.foot {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 30px);
  max-width: 1120px;
  margin: clamp(26px, 4vw, 54px) 14px 44px;
  padding: clamp(24px, 3vw, 42px);
  position: relative;
  z-index: 2;
  overflow-wrap: anywhere;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(18px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: var(--r);
  box-shadow: var(--el-lg);
}

.foot > * { min-width: 0; }

.foot h2 { font-size: 19px; margin: 0 0 22px; font-weight: 600; }
.foot h3 { font-size: 16px; margin: 0 0 12px; font-weight: 600; }

.foot-cta { grid-column: 1 / -1; }

.sub-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 460px;
}

.sub-form input {
  flex: 1 1 160px;
  min-width: 0;
  max-width: 100%;
  min-height: 46px;
  padding: 11px 16px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--el-sm);
}

.sub-form input::placeholder { color: #8a8a8a; }

.sub-form button {
  min-height: 46px;
  padding: 11px 26px;
  font: inherit;
  font-size: 16px;
  color: #fff;
  background: var(--ink);
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  box-shadow: var(--el-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sub-form button:hover {
  transform: translateY(-2px);
  box-shadow: var(--el-lg);
}

.foot-kw,
.foot-host {
  margin: 0 0 8px;
  font-size: 16px;
  color: var(--ink-2);
  word-break: break-all;
}

.foot-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.foot-list a {
  display: block;
  min-height: 44px;
  padding: 10px 0;
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink-2);
  text-decoration: none;
}

.foot-list a:hover { color: var(--ink); text-decoration: underline; }

.foot-base {
  grid-column: 1 / -1;
  margin-top: 4px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.foot-base p {
  margin: 0;
  font-size: 16px;
  color: var(--ink-2);
  word-break: break-all;
}

/* ---------- 回到顶部 ---------- */
.top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 7;
  display: inline-block;
  max-width: calc(100% - 32px);
  min-height: 44px;
  padding: 11px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid #fff;
  box-shadow: var(--el-lg);
  color: var(--ink);
  font-size: 16px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.top:hover {
  transform: translateY(-2px);
  box-shadow: var(--el-xl);
}

/* ---------- 桌面细节 ---------- */
@media (min-width: 900px) {
  body { padding-left: 180px; }

  .foot {
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 52px;
  }

  .wrap > section + section { margin-left: 12px; }
}

/* ---------- 移动端 ---------- */
@media (max-width: 899px) {
  .rail {
    position: sticky;
    inset: auto;
    top: 0;
    width: auto;
    max-width: 100%;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-right: 0;
    border-bottom: 1px solid rgba(230, 230, 230, 0.9);
    backdrop-filter: blur(18px) saturate(1.4);
    z-index: 9;
  }

  .rail-brand {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border-radius: 14px;
  }

  .rail-nav {
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .rail-nav::-webkit-scrollbar { display: none; }

  .rail-nav ol { flex-direction: row; gap: 4px; }

  .rail-nav a {
    white-space: nowrap;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.85);
  }

  .rail-cta {
    flex: 0 0 auto;
    padding: 10px 14px;
    font-size: 16px;
  }

  .wrap {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 14px;
  }

  .wrap > section,
  .wrap > aside { grid-column: 1; grid-row: auto; }

  .wrap > .hero { order: 1; }
  .wrap > aside { order: 2; }
  .wrap > section:not(.hero) { order: 3; }

  .side {
    position: static;
    top: auto;
    padding: 16px 14px;
  }

  .side h2 { font-size: 17px; margin-bottom: 14px; }

  .side-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  .side-list a {
    padding: 9px 12px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 12px;
  }

  .wrap > section + section { margin-top: 14px; }
  .wrap > section[id] { scroll-margin-top: 96px; }

  .hero { min-height: 34vh; padding-top: 30px; }

  .hero-art {
    width: 58px;
    right: 2px;
    top: -16px;
    opacity: 0.62;
  }

  .wrap > section,
  .side { border-radius: 22px; }

  .foot {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-radius: 22px;
    margin-bottom: 72px;
  }

  .top { bottom: 14px; right: 14px; max-width: calc(100% - 28px); }
}

@media (max-width: 420px) {
  .hero-art { display: none; }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

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