@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,400;0,500;1,400&display=swap');

:root{
  --ink:#1f1f1f;
  --paper:#ffffff;
  --mist:#f5f5f5;
  --line:rgba(31,31,31,.12);
  --e1:0 1px 2px rgba(31,31,31,.07), 0 2px 6px rgba(31,31,31,.05);
  --e2:0 4px 10px rgba(31,31,31,.07), 0 12px 26px rgba(31,31,31,.06);
  --e3:0 10px 22px rgba(31,31,31,.09), 0 24px 52px rgba(31,31,31,.09);
  --e4:0 16px 34px rgba(31,31,31,.12), 0 40px 88px rgba(31,31,31,.13);
  --r:28px;
}

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

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

body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:'JetBrains Mono',ui-monospace,SFMono-Regular,Menlo,Consolas,'Courier New',monospace;
  font-size:16.5px;
  line-height:1.7;
  letter-spacing:.01em;
  overflow-x:hidden;
}

img{max-width:100%;height:auto;display:block}
a{color:inherit}
:focus-visible{outline:2px solid var(--ink);outline-offset:3px;border-radius:6px}
::selection{background:var(--ink);color:var(--paper)}

/* ---------- 顶部两行：品牌行 + 药丸菜单 ---------- */
.top{
  position:relative;
  z-index:40;
  padding:16px 20px 10px;
  background:var(--paper);
}

.brandrow{display:flex;align-items:center}

.brand{
  display:inline-flex;
  align-items:center;
  gap:10px;
  min-height:44px;
  font-size:20px;
  font-weight:500;
  letter-spacing:.08em;
  text-decoration:none;
}

.mark{width:34px;height:34px;border-radius:12px;box-shadow:var(--e2)}

.pills{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px;
}

.pill{
  display:inline-flex;
  align-items:center;
  min-height:42px;
  padding:0 15px;
  border-radius:999px;
  background:var(--mist);
  box-shadow:var(--e1);
  font-size:16px;
  text-decoration:none;
  transition:background .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.pill:hover,
.pill:focus-visible{
  background:var(--ink);
  color:var(--paper);
  box-shadow:var(--e3);
  transform:translate3d(0,-2px,0);
}

/* ---------- 主区 ---------- */
main{display:block}

.hero{
  position:relative;
  z-index:1;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  justify-content:center;
  min-height:70vh;
  padding:34px 20px 52px;
}

.ghost{
  position:absolute;
  top:12%;
  left:-10px;
  z-index:0;
  margin:0;
  pointer-events:none;
  white-space:nowrap;
  font-size:clamp(3rem,21vw,13rem);
  line-height:.92;
  font-weight:500;
  letter-spacing:-.05em;
  color:var(--mist);
  -webkit-text-stroke:2px rgba(31,31,31,.07);
  will-change:transform;
}

.hero h1{
  position:relative;
  z-index:2;
  margin:0;
  font-size:clamp(2.3rem,8.4vw,5.4rem);
  line-height:1.08;
  font-weight:500;
  letter-spacing:-.035em;
  text-wrap:balance;
}

.lede{
  position:relative;
  z-index:2;
  max-width:36ch;
  margin:22px 0 0;
  padding:14px 18px;
  background:rgba(255,255,255,.72);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  border-radius:20px;
  box-shadow:var(--e2);
  font-size:16px;
  color:rgba(31,31,31,.78);
}

/* ---------- 内容层 ---------- */
.stage{
  position:relative;
  z-index:4;
  display:grid;
  grid-template-columns:1fr;
  gap:18px;
  max-width:1180px;
  margin:0 auto;
  padding:6px 20px 56px;
}

.side{
  position:relative;
  z-index:5;
  order:-1;
  padding:16px 16px 12px;
  background:var(--mist);
  border-radius:var(--r);
  box-shadow:var(--e3);
}

.side small{
  display:block;
  font-size:13px;
  letter-spacing:.3em;
  color:rgba(31,31,31,.5);
}

.side h2{
  margin:4px 0 12px;
  font-size:20px;
  line-height:1.4;
  font-weight:500;
  letter-spacing:.02em;
}

.side ul{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:6px;
  margin:0;
  padding:0;
  list-style:none;
}

.side a{
  display:flex;
  align-items:center;
  min-height:42px;
  padding:0 12px;
  border-radius:16px;
  background:var(--paper);
  box-shadow:var(--e1);
  font-size:15.5px;
  line-height:1.4;
  text-decoration:none;
  transition:background .18s ease, color .18s ease, transform .18s ease;
}

.side a:hover,
.side a:focus-visible{
  background:var(--ink);
  color:var(--paper);
  transform:translate3d(0,-2px,0);
}

.stage-body{position:relative;z-index:4;min-width:0}

.stage-body > *{
  position:relative;
  margin:0 0 18px;
  padding:26px 20px;
  background:var(--paper);
  border-radius:var(--r);
  box-shadow:var(--e2);
}

.stage-body > * + *{margin-top:-8px}
.stage-body > *:nth-child(odd){z-index:3}
.stage-body > *:nth-child(even){z-index:2}

.stage-body h2{
  margin:.1em 0 .55em;
  font-size:clamp(1.5rem,4.4vw,2rem);
  line-height:1.28;
  font-weight:500;
  letter-spacing:-.015em;
}

.stage-body h2 small,
.stage-body h3 small{
  display:block;
  margin-bottom:8px;
  font-size:13px;
  font-weight:400;
  letter-spacing:.26em;
  color:rgba(31,31,31,.45);
}

.stage-body h3{
  margin:1.5em 0 .5em;
  font-size:1.2rem;
  line-height:1.4;
  font-weight:500;
}

.stage-body p{margin:0 0 1em}
.stage-body ul,.stage-body ol{margin:0 0 1em;padding-left:1.25em}
.stage-body li{margin:.3em 0}

.stage-body a{
  text-decoration:underline;
  text-decoration-thickness:2px;
  text-underline-offset:3px;
}

.stage-body a:hover{background:var(--mist)}

.stage-body blockquote{
  margin:1.2em 0;
  padding:16px 18px;
  background:var(--mist);
  border-radius:20px;
  box-shadow:var(--e1);
}

.stage-body blockquote p:last-child{margin:0}

.stage-body figure{
  margin:1.2em 0;
  padding:12px;
  background:var(--mist);
  border-radius:22px;
  box-shadow:inset 0 0 0 1px var(--line);
}

.stage-body figure img{border-radius:14px}
.stage-body figcaption{font-size:14px;color:rgba(31,31,31,.6);margin-top:8px}

.stage-body img{border-radius:18px}

.stage-body hr{
  border:0;
  height:2px;
  background:var(--mist);
  margin:1.6em 0;
}

.stage-body table{
  width:100%;
  border-collapse:collapse;
  font-size:15.5px;
}

.stage-body th,
.stage-body td{
  padding:10px 12px;
  text-align:left;
  border-bottom:1px solid var(--line);
}

.stage-body code{
  background:var(--mist);
  border-radius:6px;
  padding:1px 5px;
  font-size:.94em;
}

.stage-body [id]{scroll-margin-top:20px}

/* ---------- 页脚 ---------- */
.foot{
  position:relative;
  z-index:8;
  display:grid;
  grid-template-columns:1fr;
  gap:24px;
  margin-top:34px;
  padding:40px 20px 26px;
  background:var(--ink);
  color:var(--paper);
  border-radius:36px 36px 0 0;
  box-shadow:var(--e4);
}

.cta{
  padding:22px;
  background:var(--paper);
  color:var(--ink);
  border-radius:var(--r);
  box-shadow:var(--e3);
}

.cta-brand{
  margin:0;
  font-size:clamp(1.6rem,5.4vw,2.1rem);
  line-height:1.18;
  font-weight:500;
  letter-spacing:-.02em;
}

.cta-btn{
  display:inline-flex;
  align-items:center;
  min-height:46px;
  margin-top:16px;
  padding:0 22px;
  border-radius:999px;
  background:var(--ink);
  color:var(--paper);
  font-size:16px;
  text-decoration:none;
  transition:background .18s ease, color .18s ease, box-shadow .18s ease;
}

.cta-btn:hover,
.cta-btn:focus-visible{
  background:var(--paper);
  color:var(--ink);
  box-shadow:inset 0 0 0 2px var(--ink);
}

.footnav{display:contents}

.foot dl{margin:0}

.foot dt{
  margin-bottom:8px;
  font-size:13px;
  letter-spacing:.26em;
  color:rgba(255,255,255,.55);
}

.foot dd{margin:0}

.foot dd a{
  display:inline-flex;
  align-items:center;
  min-height:42px;
  font-size:16px;
  text-decoration:none;
  color:rgba(255,255,255,.9);
  transition:color .18s ease, transform .18s ease;
}

.foot dd a:hover,
.foot dd a:focus-visible{
  color:var(--paper);
  text-decoration:underline;
  text-underline-offset:4px;
  transform:translate3d(3px,0,0);
}

.copy{
  grid-column:1 / -1;
  margin:0;
  padding-top:18px;
  border-top:1px solid rgba(255,255,255,.18);
  font-size:15px;
  color:rgba(255,255,255,.62);
}

/* ---------- 入场 ---------- */
.js .hero h1,
.js .lede,
.js .side,
.js .stage-body > *{
  opacity:0;
  transform:translate3d(0,20px,0);
  transition:opacity .55s ease, transform .55s cubic-bezier(.2,.7,.2,1);
}

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

/* ---------- 桌面 ---------- */
@media (min-width:900px){
  .top{
    position:sticky;
    top:0;
    padding:20px 40px 14px;
    background:rgba(255,255,255,.82);
    backdrop-filter:blur(16px) saturate(1.1);
    -webkit-backdrop-filter:blur(16px) saturate(1.1);
    border-bottom:1px solid var(--line);
  }

  .hero{padding:56px 40px 76px}

  .stage{
    grid-template-columns:224px minmax(0,1fr);
    gap:36px;
    padding:24px 40px 96px;
    align-items:start;
  }

  .side{
    position:sticky;
    top:168px;
    padding:20px 18px 14px;
  }

  .side ul{grid-template-columns:1fr}

  .stage-body > *{padding:34px 34px 30px}

  .stage-body [id]{scroll-margin-top:170px}

  .foot{
    grid-template-columns:1.5fr 1fr 1fr 1fr;
    gap:34px;
    padding:64px 40px 30px;
  }
}

@media (min-width:1280px){
  .hero h1{max-width:15ch}
}

@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto}
  .js .hero h1,
  .js .lede,
  .js .side,
  .js .stage-body > *{
    opacity:1;
    transform:none;
    transition:none;
  }
  .pill:hover,.side a:hover,.foot dd a:hover{transform:none}
}

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