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

:root {
  --ink: #1f1f1f;
  --ink-soft: #4a4a4a;
  --paper: #ffffff;
  --paper-2: #f5f5f5;
  --line: #e3e3e3;
  --r: 10px;
  --rail: 186px;
  --ui: system-ui, -apple-system, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --display: 'Space Grotesk', system-ui, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --e1: 0 1px 2px rgba(31, 31, 31, .08), 0 2px 6px rgba(31, 31, 31, .06);
  --e2: 0 4px 10px rgba(31, 31, 31, .10), 0 12px 26px rgba(31, 31, 31, .08);
  --e3: 0 10px 24px rgba(31, 31, 31, .14), 0 26px 58px rgba(31, 31, 31, .10);
  --e4: 0 20px 44px rgba(31, 31, 31, .20), 0 44px 96px rgba(31, 31, 31, .12);
}

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

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

body {
  margin: 0;
  background: var(--paper-2);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 17px;
  line-height: 1.62;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.18;
  margin: 0 0 12px;
}

p {
  margin: 0 0 14px;
}

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

/* ---------- 左侧固定竖排导航 ---------- */

.rail-nav {
  position: fixed;
  top: 0;
  right: auto;
  bottom: 0;
  left: 0;
  width: var(--rail);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px 16px 26px;
  background: var(--paper);
  box-shadow: 6px 0 24px rgba(31, 31, 31, .10);
  overflow-y: auto;
  overflow-x: hidden;
}

.brand {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  box-shadow: var(--e3);
  position: relative;
  z-index: 3;
  transition: transform .2s ease, box-shadow .2s ease;
}

.brand img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
}

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

.search {
  flex: 0 0 auto;
  position: relative;
  z-index: 2;
}

.search__input {
  width: 100%;
  min-height: 42px;
  padding: 9px 14px;
  border: 0;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  box-shadow: inset 0 0 0 1px var(--line);
}

.search__input::placeholder {
  color: #8a8a8a;
}

.rail-nav__list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  position: relative;
  z-index: 1;
}

.pill {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 15px;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.25;
  box-shadow: var(--e1);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

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

/* ---------- 主区 ---------- */

.site-main {
  margin-left: var(--rail);
  padding-bottom: 46px;
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: 70vh;
  min-height: 70svh;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 34px 34px 92px;
  overflow: hidden;
  background: var(--ink);
}

.hero--plain {
  background:
    radial-gradient(120% 90% at 15% 10%, #3b3b3b 0%, #1f1f1f 62%, #101010 100%);
}

.hero__media {
  position: absolute;
  inset: -8% 0 auto 0;
  height: 118%;
  z-index: 0;
  overflow: hidden;
}

.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .74;
  will-change: transform;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(196deg, rgba(31, 31, 31, .10) 0%, rgba(31, 31, 31, .58) 52%, rgba(31, 31, 31, .90) 100%);
  pointer-events: none;
}

.hero__card {
  position: relative;
  z-index: 3;
  max-width: min(560px, 100%);
  text-align: right;
  padding: 26px 28px 24px;
  border-radius: var(--r);
  background: rgba(255, 255, 255, .93);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--e4);
  transform: translateZ(0);
  animation: rise .6s cubic-bezier(.2, .75, .3, 1) both;
}

.hero__title {
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1.06;
  margin: 0 0 10px;
}

.hero__lead {
  font-size: 16px;
  color: var(--ink-soft);
  margin: 0 0 18px;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  box-shadow: var(--e3);
  transition: transform .18s ease, box-shadow .18s ease;
}

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

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

/* ---------- 层叠网格：侧栏压在主区之上 ---------- */

.shell {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  max-width: 1180px;
  margin: -58px auto 0;
  padding: 0 30px;
}

.rail {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 6;
}

.rail__card {
  background: var(--paper);
  border-radius: var(--r);
  padding: 18px 16px;
  box-shadow: var(--e3);
}

.rail__card--mark {
  box-shadow: var(--e2);
  background: var(--ink);
  color: #fff;
}

.kicker {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .2em;
  color: var(--ink-soft);
  margin-bottom: 2px;
}

.rail__title {
  font-size: 21px;
  margin: 0 0 12px;
}

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

.rail__list a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 4px 10px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 16px;
  background: var(--paper-2);
}

.rail__list a:hover {
  background: var(--ink);
  color: #fff;
}

.rail__brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  margin: 0 0 12px;
  line-height: 1.3;
}

.rail__top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
}

/* ---------- 正文 ---------- */

.content {
  position: relative;
  z-index: 4;
  background: var(--paper);
  border-radius: var(--r);
  padding: 30px 30px 36px;
  box-shadow: var(--e2);
  min-width: 0;
}

.content > div {
  padding: 28px 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 24px;
}

.content > div:first-child {
  border-top: 0;
  padding-top: 0;
}

.content > div:last-child {
  padding-bottom: 0;
}

.content h2 {
  font-size: clamp(22px, 3vw, 30px);
}

.content h3 {
  font-size: 19px;
  margin-top: 22px;
}

.content small {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .18em;
  color: var(--ink-soft);
  margin-bottom: 3px;
}

.content ul,
.content ol {
  padding-left: 22px;
  margin: 0 0 14px;
}

.content li {
  margin-bottom: 7px;
}

.content a {
  color: var(--ink);
  text-underline-offset: 3px;
}

.content blockquote {
  margin: 18px 0;
  padding: 14px 18px;
  border-radius: var(--r);
  background: var(--paper-2);
  box-shadow: var(--e1);
}

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

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

.content th,
.content td {
  text-align: left;
  padding: 10px 12px;
  background: var(--paper-2);
  border-bottom: 2px solid var(--paper);
}

.content figure {
  margin: 18px 0;
}

.content figcaption {
  font-size: 15px;
  color: var(--ink-soft);
  margin-top: 6px;
}

/* ---------- 页脚 ---------- */

.site-foot {
  margin-left: var(--rail);
  margin-top: 40px;
  padding: 26px 30px 20px;
  background: var(--paper);
  box-shadow: 0 -8px 26px rgba(31, 31, 31, .08);
}

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

.foot-grid dl {
  margin: 0;
}

.foot-grid dt {
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .16em;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.foot-grid dd {
  margin: 0 0 6px;
}

.foot-grid dd a,
.foot-bar__top {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  box-shadow: var(--e1);
}

.foot-grid dd a:hover,
.foot-bar__top:hover {
  background: var(--ink);
  color: #fff;
}

.foot-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1180px;
  margin: 16px auto 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--ink-soft);
}

.foot-bar__copy {
  font-family: var(--display);
  font-weight: 700;
}

/* ---------- 进场 ---------- */

.anim .content > div,
.anim .rail__card {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s ease, transform .5s cubic-bezier(.2, .75, .3, 1);
}

.anim .is-in {
  opacity: 1;
  transform: none;
}

/* ---------- 窄屏 ---------- */

@media (max-width: 980px) {
  html {
    scroll-behavior: smooth;
  }

  .rail-nav {
    position: sticky;
    inset: auto;
    top: 0;
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    box-shadow: 0 6px 20px rgba(31, 31, 31, .12);
    overflow: visible;
  }

  .brand {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .search {
    flex: 0 0 auto;
    order: 3;
  }

  .search__input {
    width: 104px;
    min-height: 40px;
    padding: 8px 12px;
    font-size: 15px;
  }

  .rail-nav__list {
    order: 2;
    flex: 1 1 auto;
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 2px 0;
    min-width: 0;
  }

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

  .pill {
    flex: 0 0 auto;
    white-space: nowrap;
    min-height: 40px;
    padding: 8px 14px;
    font-size: 15px;
  }

  .site-main {
    margin-left: 0;
  }

  .hero {
    min-height: 70svh;
    padding: 22px 16px 70px;
  }

  .hero__card {
    padding: 20px 18px;
  }

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

  .rail {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
  }

  .rail__card {
    flex: 1 1 220px;
    padding: 14px;
  }

  .content {
    padding: 22px 16px 26px;
  }

  .content > div {
    scroll-margin-top: 82px;
  }

  .site-foot {
    margin-left: 0;
    padding: 20px 14px 16px;
  }
}

@media (max-width: 560px) {
  .foot-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .foot-grid dt {
    margin-bottom: 4px;
  }

  .content table {
    display: block;
    overflow-x: auto;
  }
}

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

  .hero__card {
    animation: none;
  }

  .anim .content > div,
  .anim .rail__card {
    transition: none;
  }

  .hero__img {
    will-change: auto;
  }
}

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