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

:root {
  --paper: #ffffff;
  --mist: #f5f5f5;
  --ink: #1f1f1f;
  --ink-70: rgba(31, 31, 31, 0.7);
  --ink-45: rgba(31, 31, 31, 0.45);
  --line: rgba(31, 31, 31, 0.12);
  --glass: rgba(255, 255, 255, 0.66);
  --r: 18px;
  --e1: 0 1px 2px rgba(31, 31, 31, 0.06), 0 2px 6px rgba(31, 31, 31, 0.05);
  --e2: 0 4px 10px rgba(31, 31, 31, 0.07), 0 12px 26px rgba(31, 31, 31, 0.06);
  --e3: 0 8px 22px rgba(31, 31, 31, 0.09), 0 22px 48px rgba(31, 31, 31, 0.08);
  --e4: 0 18px 44px rgba(31, 31, 31, 0.12), 0 44px 96px rgba(31, 31, 31, 0.1);
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: 'Space Grotesk', 'DM Sans', system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  background-color: var(--mist);
  background-image:
    radial-gradient(circle at 12% 4%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 46%),
    radial-gradient(circle at 88% 0%, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0) 42%),
    radial-gradient(rgba(31, 31, 31, 0.11) 1px, rgba(31, 31, 31, 0) 1px);
  background-size: auto, auto, 22px 22px;
  background-attachment: fixed, fixed, fixed;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

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

.shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
  max-width: 1440px;
  margin: 0 auto;
  padding: 62px clamp(16px, 3vw, 40px) 0;
}

/* 顶部细条 */
.strip {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  height: 34px;
  padding: 0 clamp(16px, 3vw, 40px);
  background: rgba(31, 31, 31, 0.92);
  color: #fff;
  font-size: 14px;
  backdrop-filter: blur(8px);
}

.strip-brand {
  font-weight: 600;
  letter-spacing: 0.16em;
}

.strip-kw {
  letter-spacing: 0.3em;
  opacity: 0.72;
}

/* 左侧竖排胶囊导航 */
.rail {
  position: sticky;
  top: 56px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: calc(100vh - 84px);
}

.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  min-width: 54px;
  min-height: 54px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: var(--e3);
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mark:hover {
  transform: translateY(-2px);
  box-shadow: var(--e4);
}

.mark-img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.mark-txt {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.04em;
  text-align: center;
  word-break: break-all;
}

.rail-nav {
  overflow-y: auto;
  padding-right: 4px;
}

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

.pill {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  box-shadow: var(--e1);
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  backdrop-filter: blur(10px);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.pill:hover {
  background: var(--paper);
  box-shadow: var(--e3);
  transform: translateY(-2px);
}

.pill[aria-current] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  box-shadow: var(--e3);
}

main,
.wrap,
.stage {
  min-width: 0;
}

/* 首屏 */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  align-items: center;
  gap: clamp(16px, 3vw, 36px);
  min-height: 45vh;
  padding: clamp(20px, 3vw, 36px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 26px;
  overflow: hidden;
  text-align: center;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(245, 245, 245, 0.6));
  box-shadow: var(--e4);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(31, 31, 31, 0.18) 1px, rgba(31, 31, 31, 0) 1px);
  background-size: 20px 20px;
  opacity: 0.7;
  -webkit-mask-image: radial-gradient(72% 70% at 62% 42%, #000 38%, rgba(0, 0, 0, 0) 100%);
  mask-image: radial-gradient(72% 70% at 62% 42%, #000 38%, rgba(0, 0, 0, 0) 100%);
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(26px, 3.5vw, 44px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.01em;
}

.lede {
  max-width: 46ch;
  margin: 0 auto;
  color: var(--ink-70);
  line-height: 1.72;
}

.hero-visual {
  position: relative;
  z-index: 1;
  aspect-ratio: 4 / 3;
  border: 1px solid #fff;
  border-radius: var(--r);
  overflow: hidden;
  background: linear-gradient(140deg, #ffffff, #f5f5f5 58%, #ebebeb);
  box-shadow: var(--e4);
  transform: rotate(-1.4deg);
  will-change: transform;
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 14% -12% -16% 20%;
  z-index: -1;
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(6px);
}

.hero-img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.glow {
  position: absolute;
  right: -40px;
  bottom: -50px;
  z-index: 1;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(31, 31, 31, 0.2), rgba(31, 31, 31, 0) 70%);
}

/* 正文 */
.prose {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 16px;
  margin-top: clamp(24px, 3vw, 40px);
}

.prose-h {
  margin: 0;
  color: var(--ink-45);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.24em;
}

hr {
  height: 1px;
  margin: 0 0 6px;
  border: 0;
  background: linear-gradient(90deg, rgba(31, 31, 31, 0.32), rgba(31, 31, 31, 0.05));
}

.prose > section {
  position: relative;
  padding: clamp(20px, 2.4vw, 30px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--r);
  background: var(--glass);
  box-shadow: var(--e2);
  backdrop-filter: blur(14px);
  scroll-margin-top: 110px;
  transform: translateZ(0);
  animation: rise 0.55s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

.prose > section:nth-child(1) { animation-delay: 0.02s; }
.prose > section:nth-child(2) { animation-delay: 0.08s; }
.prose > section:nth-child(3) { animation-delay: 0.14s; }
.prose > section:nth-child(4) { animation-delay: 0.2s; }
.prose > section:nth-child(5) { animation-delay: 0.26s; }
.prose > section:nth-child(6) { animation-delay: 0.32s; }
.prose > section:nth-child(7) { animation-delay: 0.38s; }
.prose > section:nth-child(8) { animation-delay: 0.44s; }

.prose > section:nth-child(even) {
  margin-left: clamp(0px, 2vw, 26px);
}

.prose > section:nth-child(3n) {
  box-shadow: var(--e3);
}

.prose h2 {
  margin: 0 0 10px;
  font-size: clamp(20px, 2.1vw, 26px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.prose h3 {
  margin: 18px 0 8px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
}

.prose p {
  max-width: 70ch;
  margin: 0 0 12px;
  line-height: 1.78;
}

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

.prose ul,
.prose ol {
  margin: 0 0 12px;
  padding-left: 1.35em;
  line-height: 1.78;
}

.prose li {
  margin-bottom: 6px;
}

.prose a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.prose img {
  margin: 10px 0;
  border-radius: 14px;
  box-shadow: var(--e2);
}

.prose blockquote {
  margin: 12px 0;
  padding: 10px 0 10px 16px;
  border-left: 2px solid var(--ink);
  color: var(--ink-70);
}

.prose code {
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(31, 31, 31, 0.07);
  font-size: 15px;
}

.prose table {
  width: 100%;
  margin: 12px 0;
  border-collapse: collapse;
  font-size: 15px;
}

.prose th,
.prose td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 页脚：仅 p 与 small */
.site-foot {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 46px;
  padding: 28px clamp(16px, 3vw, 40px) 30px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
}

.site-foot p {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
}

.f-brand {
  font-weight: 700;
  letter-spacing: 0.06em;
}

.f-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 6px;
  color: var(--ink-70);
}

.f-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 2px;
  border-bottom: 1px solid transparent;
  text-decoration: none;
}

.f-nav a:hover {
  border-bottom-color: var(--ink);
}

.f-host,
.f-kw {
  color: var(--ink-70);
  word-break: break-all;
}

.site-foot small {
  grid-column: 1 / -1;
  padding-top: 12px;
  border-top: 1px solid rgba(31, 31, 31, 0.08);
  color: var(--ink-45);
  font-size: 14px;
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding: 46px 16px 0;
  }

  .rail {
    position: sticky;
    top: 34px;
    z-index: 40;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    height: auto;
    padding: 8px 0;
    background: rgba(245, 245, 245, 0.9);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
  }

  .mark {
    min-width: 44px;
    min-height: 44px;
    padding: 6px;
    border-radius: 14px;
  }

  .mark-img {
    width: 28px;
    height: 28px;
  }

  .mark-txt {
    font-size: 13px;
  }

  .rail-nav {
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 2px 2px;
    scrollbar-width: none;
  }

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

  .rail-nav ul {
    display: flex;
    gap: 8px;
  }

  .pill {
    white-space: nowrap;
    min-height: 42px;
    font-size: 15px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding: 22px 16px;
    border-radius: 20px;
    text-align: left;
  }

  .lede {
    margin: 0;
  }

  .hero-visual {
    aspect-ratio: 16 / 10;
    transform: none;
    margin-top: 6px;
  }

  .prose > section:nth-child(even) {
    margin-left: 0;
  }

  .prose > section {
    scroll-margin-top: 96px;
  }

  .site-foot {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 34px;
    padding: 22px 16px 26px;
  }
}

@media (max-width: 420px) {
  .hero h1 {
    font-size: 26px;
  }

  .strip-kw {
    letter-spacing: 0.2em;
  }
}

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

  .prose > section {
    animation: none;
  }

  .pill,
  .mark {
    transition: none;
  }
}

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