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

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

:root {
  --ink: #1f1f1f;
  --paper: #ffffff;
  --mist: #f5f5f5;
  --line: rgba(31, 31, 31, .12);
  --faint: rgba(31, 31, 31, .55);
  --r: 10px;
  --e1: 0 1px 2px rgba(18, 18, 18, .06), 0 2px 6px rgba(18, 18, 18, .05);
  --e2: 0 4px 10px rgba(18, 18, 18, .07), 0 12px 26px rgba(18, 18, 18, .07);
  --e3: 0 10px 24px rgba(18, 18, 18, .10), 0 24px 52px rgba(18, 18, 18, .10);
  --e4: 0 18px 42px rgba(18, 18, 18, .16), 0 44px 88px rgba(18, 18, 18, .16);
}

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

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: 'Chakra Petch', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--ink);
  background:
    radial-gradient(1200px 560px at 90% -10%, #ffffff 0%, rgba(255, 255, 255, 0) 64%),
    radial-gradient(820px 500px at 2% 10%, #ffffff 0%, rgba(255, 255, 255, 0) 60%),
    var(--mist);
}

/* 顶部栏 */
.top {
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px clamp(14px, 4vw, 34px);
  background: rgba(255, 255, 255, .80);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid transparent;
  transition: box-shadow .25s ease, border-color .25s ease, background .25s ease;
}

.top.sc {
  border-bottom-color: var(--line);
  box-shadow: var(--e2);
  background: rgba(255, 255, 255, .92);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 6px 0 2px;
  color: var(--ink);
  text-decoration: none;
  font-family: 'Russo One', 'Chakra Petch', system-ui, sans-serif;
  font-size: 19px;
  letter-spacing: .06em;
  z-index: 2;
}

.brand-mark {
  width: 15px;
  height: 15px;
  border-radius: 4px;
  background: var(--ink);
  box-shadow: var(--e1);
  transform: rotate(45deg) translateZ(0);
  transition: transform .3s ease, box-shadow .3s ease;
}

.brand:hover .brand-mark,
.brand:focus-visible .brand-mark {
  transform: rotate(135deg);
  box-shadow: var(--e3);
}

.cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--r);
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: .02em;
  box-shadow: var(--e2);
  z-index: 2;
  transition: transform .2s ease, box-shadow .2s ease;
}

.cta:hover,
.cta:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--e3);
}

/* 骨架 */
.shell {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  align-items: start;
  gap: 26px;
  max-width: 1240px;
  margin: 26px auto 0;
  padding: 0 clamp(14px, 4vw, 34px);
}

/* 左侧锚点栏 */
.rail {
  position: sticky;
  top: 86px;
  z-index: 40;
  padding: 14px 12px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(255, 255, 255, .72);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  box-shadow: var(--e2);
  max-height: calc(100vh - 112px);
  overflow: auto;
}

.rail-h {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .18em;
  color: var(--faint);
  line-height: 1.4;
}

.rail-h span { display: inline-block; }

.rail nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: links;
}

.rail li { position: relative; }

.rail li::before {
  counter-increment: links;
  content: counter(links, decimal-leading-zero);
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  color: rgba(31, 31, 31, .34);
  pointer-events: none;
}

.rail nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 9px 10px 9px 32px;
  border-radius: 8px;
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.rail nav a::before {
  content: '';
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: currentColor;
  opacity: .45;
}

.rail nav a:hover,
.rail nav a:focus-visible,
.rail nav a.on {
  background: var(--ink);
  color: var(--paper);
  box-shadow: var(--e2);
  transform: translateX(2px);
}

.rail nav a.on::before { opacity: 1; }

.rail-h-top { margin: 12px 0 2px; }

.rail-h-top span a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--ink);
  font-size: 15px;
  letter-spacing: .04em;
  text-decoration: none;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--e1);
  transition: box-shadow .2s ease, transform .2s ease;
}

.rail-h-top span a:hover,
.rail-h-top span a:focus-visible {
  box-shadow: var(--e2);
  transform: translateY(-1px);
}

/* 主体 */
.main {
  position: relative;
  z-index: 10;
  min-width: 0;
}

/* 首屏 */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.06fr);
  align-items: center;
  gap: 30px;
  min-height: 70vh;
  padding: 10px 0 40px;
  text-align: right;
}

.hero-art {
  position: relative;
  margin: 0;
  min-height: 380px;
  z-index: 1;
}

.hero-art::before {
  content: '';
  position: absolute;
  inset: 8% 12% 10% 2%;
  border-radius: var(--r);
  background: linear-gradient(140deg, #ffffff 0%, var(--mist) 100%);
  box-shadow: var(--e1);
}

.hero-art img {
  position: absolute;
  width: 60%;
  height: auto;
  object-fit: cover;
  border-radius: var(--r);
  border: 6px solid var(--paper);
  background: var(--paper);
  box-shadow: var(--e4);
}

.hero-img-1 {
  top: 0;
  left: 2%;
  z-index: 2;
  transform: rotate(-3deg);
}

.hero-img-2 {
  bottom: 0;
  right: 0;
  z-index: 3;
  transform: rotate(2.4deg);
}

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

.hero-title {
  margin: 0 0 14px;
  font-family: 'Russo One', 'Chakra Petch', system-ui, sans-serif;
  font-weight: 400;
  font-size: clamp(30px, 5.2vw, 58px);
  line-height: 1.1;
  letter-spacing: .01em;
  color: var(--ink);
  text-shadow: 0 2px 0 rgba(255, 255, 255, .9), 0 10px 26px rgba(18, 18, 18, .10);
}

.lede {
  margin: 0 auto 22px;
  max-width: 46ch;
  font-size: 16.5px;
  line-height: 1.8;
  color: rgba(31, 31, 31, .72);
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: var(--r);
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--e3);
  transition: transform .2s ease, box-shadow .2s ease;
}

.hero-btn:hover,
.hero-btn:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--e4);
}

/* 正文区块 */
main div[id] { scroll-margin-top: 120px; }

.main > div:not(.hero) {
  position: relative;
  z-index: 2;
  margin: 0 0 22px;
  padding: clamp(20px, 3.2vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(255, 255, 255, .80);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: var(--e2);
}

.main > div:not(.hero)::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -11px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

.main > div:not(.hero):nth-of-type(even) { margin-left: 8px; }

.main h2 {
  position: relative;
  margin: 0 0 .7em;
  padding-left: 16px;
  font-family: 'Russo One', 'Chakra Petch', system-ui, sans-serif;
  font-weight: 400;
  font-size: clamp(21px, 2.7vw, 30px);
  line-height: 1.3;
  letter-spacing: .01em;
  color: var(--ink);
}

.main h2 > span { position: relative; display: inline-block; }

.main h2 > span::before {
  content: '';
  position: absolute;
  left: -16px;
  top: .16em;
  bottom: .16em;
  width: 6px;
  border-radius: 3px;
  background: var(--ink);
  box-shadow: var(--e1);
}

.main h3 {
  margin: 1.4em 0 .5em;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .01em;
}

.main h3 > span { display: inline-block; border-bottom: 2px solid var(--ink); padding-bottom: 2px; }

.main p {
  margin: 0 0 1em;
  color: rgba(31, 31, 31, .88);
  line-height: 1.85;
}

.main a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.main a:hover { background: rgba(31, 31, 31, .07); }

.main ul,
.main ol { margin: 0 0 1em; padding-left: 1.3em; line-height: 1.85; }

.main li { margin-bottom: .35em; }

.main figure { margin: 1.2em 0; }

.main img {
  max-width: 100%;
  height: auto;
  border-radius: var(--r);
  box-shadow: var(--e2);
}

.main blockquote {
  margin: 1.2em 0;
  padding: 12px 18px;
  border-left: 4px solid var(--ink);
  border-radius: 0 var(--r) var(--r) 0;
  background: var(--paper);
  box-shadow: var(--e1);
}

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

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

.main th,
.main td {
  padding: 9px 12px;
  border: 1px solid var(--line);
  text-align: left;
}

.main th { background: var(--mist); }

.main code {
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--mist);
  font-size: 15px;
}

/* 页脚 */
.foot {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px 22px;
  max-width: 1240px;
  margin: 44px auto 0;
  padding: clamp(26px, 4vw, 48px) clamp(14px, 4vw, 34px) 22px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(245, 245, 245, .6));
}

.foot-brand {
  grid-column: span 2;
  margin: 0;
  font-family: 'Russo One', 'Chakra Petch', system-ui, sans-serif;
  font-size: clamp(32px, 6.4vw, 68px);
  line-height: .96;
  letter-spacing: .02em;
  color: var(--ink);
  text-shadow: 0 2px 0 #ffffff, 0 12px 30px rgba(18, 18, 18, .12);
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  align-content: start;
}

.foot-links a,
.foot-top a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 11px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--e1);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}

.foot-links a:hover,
.foot-links a:focus-visible,
.foot-top a:hover,
.foot-top a:focus-visible {
  background: var(--ink);
  color: var(--paper);
  box-shadow: var(--e2);
}

.foot-top { margin: 0; }

.foot-copy {
  grid-column: 1 / -1;
  display: block;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--faint);
}

/* 揭示动画 */
.js .rv {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity .62s cubic-bezier(.2, .7, .3, 1),
    transform .62s cubic-bezier(.2, .7, .3, 1);
  transition-delay: var(--d, 0ms);
  will-change: opacity, transform;
}

.js .rv.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rv { opacity: 1; transform: none; transition: none; }
  .brand:hover .brand-mark { transform: rotate(45deg); }
}

/* 平板与手机 */
@media (max-width: 980px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    margin-top: 14px;
  }

  .rail {
    top: 62px;
    z-index: 60;
    max-height: none;
    overflow: visible;
    padding: 7px;
    box-shadow: var(--e2);
  }

  .rail-h { display: none; }

  .rail nav ul {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .rail li { flex: 0 0 auto; }

  .rail li::before { display: none; }

  .rail nav a {
    padding: 9px 13px;
    white-space: nowrap;
    border: 1px solid var(--line);
    background: var(--paper);
    box-shadow: var(--e1);
    font-size: 15.5px;
  }

  .rail nav a:hover,
  .rail nav a:focus-visible,
  .rail nav a.on { transform: none; }

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

  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    gap: 18px;
    padding: 6px 0 26px;
    text-align: left;
  }

  .hero-copy { order: -1; }

  .lede { margin-left: 0; }

  .hero-art {
    min-height: 250px;
    overflow: hidden;
    border-radius: var(--r);
  }

  .hero-art::before { inset: 10% 14% 12% 6%; }

  .main > div:not(.hero):nth-of-type(even) { margin-left: 0; }

  .foot { grid-template-columns: repeat(2, minmax(0, 1fr)); }

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

@media (max-width: 560px) {
  body { font-size: 16px; }

  .brand { font-size: 17px; }

  .cta { padding: 0 14px; font-size: 15.5px; }

  .hero-title { font-size: clamp(28px, 9vw, 38px); }

  .hero-art { min-height: 210px; }

  .hero-art img { width: 66%; border-width: 4px; }

  .main > div:not(.hero) { padding: 18px 16px; }

  .foot { grid-template-columns: minmax(0, 1fr); }

  .foot-links { gap: 8px; }
}

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