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

:root {
  --paper: #ffffff;
  --mist: #f5f5f5;
  --ink: #1f1f1f;
  --line: rgba(31, 31, 31, .88);
  --hair: rgba(31, 31, 31, .16);
  --mute: #6b6b6b;
  --glass: rgba(255, 255, 255, .74);
  --r: 28px;
  --el1: 0 2px 6px rgba(31, 31, 31, .08), 0 1px 0 rgba(31, 31, 31, .55);
  --el2: 0 10px 22px rgba(31, 31, 31, .1), 0 2px 0 rgba(31, 31, 31, .6);
  --el3: 0 22px 46px rgba(31, 31, 31, .16), 0 3px 0 rgba(31, 31, 31, .55);
  --el4: 0 34px 78px rgba(31, 31, 31, .24);
  --mono: 'Fira Code', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Fira Sans', system-ui, -apple-system, 'Segoe UI', 'Noto Sans SC', 'PingFang SC', sans-serif;
  --dock: 86px;
}

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

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

html.menu-open { overflow: hidden; }

body {
  margin: 0;
  padding: 0 0 calc(var(--dock) + 26px);
  background: var(--mist);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
  font-weight: 400;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(31, 31, 31, .17) 1px, transparent 1px),
    radial-gradient(120% 80% at 88% -10%, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0) 60%);
  background-size: 20px 20px, 100% 100%;
  opacity: .55;
}

[hidden] { display: none !important; }

h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -.015em;
  line-height: 1.2;
  margin: 0 0 .6em;
}

p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
li { margin: .35em 0; }
a { color: var(--ink); }
img { max-width: 100%; }
menu { list-style: none; margin: 0; padding: 0; }

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

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 12px;
  text-decoration: none;
  transition: top .18s ease;
}

.skip:focus { top: 12px; }

.shell {
  position: relative;
  z-index: 1;
}

/* 角落品牌 */
.brand,
.foot-logo {
  display: grid;
  place-items: center;
  text-decoration: none;
}

.brand {
  position: fixed;
  left: 14px;
  top: 12px;
  z-index: 70;
  width: 46px;
  height: 46px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: var(--el2);
}

.mark-img { display: block; width: 26px; height: 26px; object-fit: contain; }

.brand-bead {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--ink);
}

/* 主区 */
.main { padding: 74px 14px 0; }
.sheet { max-width: 1120px; margin: 0 auto; }

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  align-items: center;
  gap: clamp(16px, 3vw, 36px);
  min-height: 45vh;
  padding: clamp(16px, 2.4vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(158deg, rgba(255, 255, 255, .95), rgba(245, 245, 245, .8));
  backdrop-filter: blur(12px);
  box-shadow: var(--el3);
  overflow: hidden;
  isolation: isolate;
}

.hero::after {
  content: "";
  position: absolute;
  right: -50px;
  bottom: -70px;
  width: 260px;
  height: 260px;
  background-image: radial-gradient(rgba(31, 31, 31, .22) 1px, transparent 1px);
  background-size: 14px 14px;
  opacity: .5;
  pointer-events: none;
  z-index: 0;
}

.hero-media {
  margin: 0;
  position: relative;
  z-index: 1;
}

.hero-plate {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  background: var(--paper);
  box-shadow: var(--el3);
}

.hero-plate-mark { display: grid; place-items: center; padding: 26px; }

.hero-img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transform: scale(1.06);
  will-change: transform;
}

.hero-plate-mark .hero-img { aspect-ratio: 1 / 1; object-fit: contain; max-width: 220px; }

.hero-copy {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 6px 4px;
}

.hero-t {
  font-size: clamp(1.85rem, 5.6vw, 3.15rem);
  line-height: 1.12;
  margin-bottom: .5em;
  letter-spacing: -.03em;
}

.hero-d {
  color: var(--mute);
  font-size: 1rem;
  max-width: 34ch;
  margin: 0 auto;
}

/* 分栏：左栏 + 正文 */
.split {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: clamp(16px, 2.6vw, 30px);
  margin-top: 22px;
  align-items: start;
}

.rail {
  position: sticky;
  top: 76px;
  z-index: 2;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--glass);
  backdrop-filter: blur(14px);
  box-shadow: var(--el2);
}

.rail-h {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .18em;
  color: var(--mute);
  margin: 0 0 10px;
  padding-left: 2px;
}

.rail-h::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--ink);
  border-radius: 2px;
  flex: 0 0 auto;
}

.rail-list { display: grid; gap: 5px; }

.rail-a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 7px 11px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: var(--ink);
  text-decoration: none;
  font-size: .95rem;
  line-height: 1.35;
  transition: background .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.rail-a:hover {
  background: var(--paper);
  border-color: var(--line);
  box-shadow: var(--el1);
  transform: translateY(-1px);
}

.prose { min-width: 0; }

.prose > div {
  counter-increment: sec;
  position: relative;
  z-index: 1;
  margin: 0 0 22px;
  padding: clamp(18px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(255, 255, 255, .8);
  backdrop-filter: blur(10px);
  box-shadow: var(--el2);
  scroll-margin-top: 24px;
}

.prose > div:nth-child(3n+2) {
  z-index: 2;
  box-shadow: var(--el3);
}

.prose { counter-reset: sec; }

.prose h2 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: clamp(1.28rem, 3.4vw, 1.85rem);
  margin-bottom: .7em;
}

.prose h2::before {
  content: counter(sec, decimal-leading-zero);
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: .74rem;
  font-weight: 500;
  color: var(--mute);
  border: 1px solid var(--hair);
  border-radius: 8px;
  padding: 1px 6px;
  letter-spacing: .04em;
}

.prose h2 > span { display: inline-block; }

.prose h3 {
  font-size: 1.14rem;
  margin-top: 1.4em;
}

.prose h3 > span { display: inline-block; }

.prose p,
.prose li { color: #2b2b2b; }

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

.prose img {
  height: auto;
  border: 1px solid var(--hair);
  border-radius: 18px;
  box-shadow: var(--el1);
}

.prose blockquote {
  margin: 1.2em 0;
  padding: 12px 18px;
  border-left: 3px solid var(--ink);
  background: var(--mist);
  border-radius: 0 14px 14px 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
}

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

/* 大块行动区 */
.cta {
  max-width: 1120px;
  margin: 34px auto 20px;
  padding: 0 14px;
}

.cta-a {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 20px;
  padding: clamp(20px, 4vw, 36px) clamp(18px, 4vw, 36px);
  border: 1px solid var(--ink);
  border-radius: var(--r);
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  box-shadow: var(--el4);
  transition: transform .2s ease, box-shadow .2s ease;
}

.cta-a:hover {
  transform: translateY(-2px);
  box-shadow: 0 40px 90px rgba(31, 31, 31, .3);
}

.cta-t {
  margin: 0;
  font-size: clamp(1.6rem, 5.6vw, 2.6rem);
  letter-spacing: -.03em;
  color: var(--paper);
}

.cta-t > span { display: inline-block; }

.cta-sub {
  font-family: var(--mono);
  font-size: .8rem;
  letter-spacing: .16em;
  color: rgba(255, 255, 255, .78);
}

/* 页脚单行 */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 14px 8px;
  border-top: 1px solid var(--hair);
}

.foot-logo {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
  box-shadow: var(--el1);
}

.foot-nav { flex: 1 1 auto; }

.foot-nav menu {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
}

.foot-a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 6px;
  color: var(--mute);
  font-size: .86rem;
  text-decoration: none;
  border-radius: 9px;
}

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

.foot-meta {
  font-family: var(--mono);
  font-size: .76rem;
  letter-spacing: .06em;
  color: var(--mute);
}

/* 底部固定条 */
.dock {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  margin: 0 auto;
  z-index: 80;
  max-width: 560px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(16px);
  box-shadow: var(--el3);
}

.menu { margin: 0; }

.burger {
  list-style: none;
  position: relative;
  z-index: 95;
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper);
  box-shadow: var(--el1);
  cursor: pointer;
  user-select: none;
}

.burger::-webkit-details-marker { display: none; }

.burger-t {
  font-family: var(--mono);
  font-size: .76rem;
  letter-spacing: .14em;
}

.burger-bars { display: grid; gap: 4px; }

.burger-bars i {
  display: block;
  width: 14px;
  height: 2px;
  background: var(--ink);
  transition: transform .2s ease;
}

.menu[open] > .burger {
  position: fixed;
  left: 22px;
  bottom: 24px;
  z-index: 96;
  box-shadow: var(--el3);
}

.menu[open] .burger-bars i:first-child { transform: translateY(3px) rotate(45deg); }
.menu[open] .burger-bars i:last-child { transform: translateY(-3px) rotate(-45deg); }

.tray {
  display: none;
  counter-reset: tray;
}

.menu[open] > .tray {
  display: grid;
  gap: 6px;
  align-content: start;
  position: fixed;
  inset: 0;
  z-index: 90;
  padding: 80px 22px 110px;
  overflow: auto;
  background: rgba(245, 245, 245, .88);
  backdrop-filter: blur(18px);
}

.tray li { counter-increment: tray; margin: 0; }

.tray-a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .84);
  box-shadow: var(--el1);
  color: var(--ink);
  text-decoration: none;
  font-size: 1.02rem;
}

.tray-a::before {
  content: counter(tray, decimal-leading-zero);
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--mute);
  border: 1px solid var(--hair);
  border-radius: 7px;
  padding: 1px 6px;
  flex: 0 0 auto;
}

.tray-a:hover { background: var(--paper); }

.finder { flex: 1 1 auto; min-width: 0; }

.finder-q {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--hair);
  border-radius: 15px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: .92rem;
  appearance: none;
}

.finder-q::placeholder { color: var(--mute); }

.dock-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: .8rem;
  letter-spacing: .1em;
  text-decoration: none;
  flex: 0 0 auto;
}

/* 滚动揭示 */
.js .reveal:not(.in) {
  opacity: 0;
  transform: translateY(16px);
}

.js .reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity .52s ease, transform .52s cubic-bezier(.2, .7, .2, 1);
}

@media (min-width: 900px) {
  .prose > div:nth-child(even) { margin-left: 28px; }
}

@media (max-width: 860px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; }
  .rail-h { margin-bottom: 8px; }
  .rail-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }
  .rail-list li { flex: 0 0 auto; margin: 0; }
  .rail-a {
    white-space: nowrap;
    border-color: var(--hair);
    background: var(--paper);
    padding: 8px 13px;
  }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .main { padding: 70px 12px 0; }
  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding: 20px 16px 16px;
  }
  .hero-copy { order: 1; padding: 0; }
  .hero-media { order: 2; }
  .hero-img { aspect-ratio: 16 / 9; }
  .hero-plate-mark { padding: 14px; }
  .hero-d { font-size: .96rem; }
  .cta { padding: 0 12px; }
  .foot { padding: 14px 12px 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal:not(.in) { opacity: 1; transform: none; }
  .hero-img { transform: none; }
  .cta-a:hover, .rail-a:hover { transform: none; }
}

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