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

:root{
  --ink:#1f1f1f;
  --paper:#ffffff;
  --ash:#f5f5f5;
  --line:rgba(31,31,31,.16);
  --line-hard:rgba(31,31,31,.3);
  --muted:rgba(31,31,31,.64);
  --sans:'Source Sans 3','PingFang SC','Hiragino Sans GB','Microsoft YaHei',system-ui,sans-serif;
  --display:'Bebas Neue','Source Sans 3','PingFang SC','Hiragino Sans GB','Microsoft YaHei',system-ui,sans-serif;
  --wrap:1140px;
  --ease:cubic-bezier(.22,.68,.28,1);
}

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

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

body{
  margin:0;
  font-family:var(--sans);
  font-size:17px;
  line-height:1.72;
  color:var(--ink);
  background-color:var(--paper);
  background-image:radial-gradient(rgba(31,31,31,.05) 1px,transparent 1px);
  background-size:26px 26px;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}

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

.wrap{max-width:var(--wrap);margin:0 auto;padding:0 20px}

/* —— 吸顶胶囊导航 —— */
.topbar{
  position:sticky;
  top:0;
  z-index:60;
  background:rgba(255,255,255,.84);
  backdrop-filter:blur(16px) saturate(120%);
  -webkit-backdrop-filter:blur(16px) saturate(120%);
  border-bottom:1px solid var(--line);
  transition:box-shadow .3s var(--ease);
}
.topbar.is-stuck{box-shadow:0 10px 26px rgba(31,31,31,.1)}

.bar{
  max-width:var(--wrap);
  margin:0 auto;
  padding:9px 20px;
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.brand{
  font-family:var(--display);
  font-size:27px;
  letter-spacing:.06em;
  line-height:1;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  min-height:44px;
  white-space:nowrap;
}

.cta{
  margin-left:auto;
  background:var(--ink);
  color:var(--paper);
  border-radius:999px;
  padding:12px 20px;
  min-height:44px;
  display:inline-flex;
  align-items:center;
  font-size:16px;
  font-weight:600;
  text-decoration:none;
  white-space:nowrap;
  transition:transform .18s var(--ease),opacity .18s var(--ease);
}
.cta:hover{transform:translateY(-1px);opacity:.88}

.navshell{order:5;flex:1 0 100%;min-width:0}

.mainnav ul{
  display:flex;
  gap:8px;
  list-style:none;
  margin:0;
  padding:0 0 3px;
  overflow-x:auto;
  scrollbar-width:none;
  justify-content:flex-start;
}
.mainnav ul::-webkit-scrollbar{display:none}
.mainnav li{flex:0 0 auto}
.mainnav a{
  display:inline-flex;
  align-items:center;
  min-height:42px;
  padding:10px 15px;
  font-size:16px;
  text-decoration:none;
  background:var(--ash);
  border:1px solid transparent;
  border-radius:999px;
  white-space:nowrap;
  transition:background .2s var(--ease),color .2s var(--ease),border-color .2s var(--ease);
}
.mainnav a:hover{background:var(--ink);color:var(--paper);border-color:var(--ink)}

/* —— 首屏 —— */
.hero{
  min-height:70vh;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:60px 0 46px;
  background-image:radial-gradient(rgba(31,31,31,.17) 1px,transparent 1px);
  background-size:23px 23px;
  background-position:center;
}
.hero-card{max-width:900px;margin:0 auto}
.hero h1{
  font-family:var(--display);
  font-weight:700;
  font-size:clamp(34px,7.4vw,82px);
  line-height:1.08;
  letter-spacing:-.005em;
  margin:0 0 18px;
  word-break:break-word;
}
.lede{
  max-width:44ch;
  margin:0 auto 26px;
  color:var(--muted);
  font-size:17px;
  line-height:1.7;
}
.btn-more{
  display:inline-flex;
  align-items:center;
  min-height:46px;
  padding:12px 26px;
  border-radius:999px;
  background:var(--ink);
  color:var(--paper);
  font-weight:600;
  letter-spacing:.02em;
  text-decoration:none;
  transition:transform .18s var(--ease);
}
.btn-more:hover{transform:translateY(-2px)}

/* —— 双栏：正文在左，侧栏在右 —— */
.cols{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:22px;
  padding:26px 0 8px;
}

.reading{min-width:0}

.body{
  background:rgba(255,255,255,.72);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  border:1px solid var(--line);
  padding:24px 18px;
}

.body > div{
  background:rgba(255,255,255,.7);
  border:1px solid var(--line);
  padding:24px 18px;
  margin-bottom:16px;
  transition:transform .28s var(--ease),box-shadow .28s var(--ease),border-color .28s var(--ease);
}
.body > div:last-child{margin-bottom:0}
.body > div:hover{
  transform:translateY(-2px);
  box-shadow:0 14px 26px rgba(31,31,31,.08);
  border-color:var(--line-hard);
}

.body h2{
  font-family:var(--display);
  font-size:clamp(22px,3.4vw,31px);
  line-height:1.24;
  letter-spacing:.01em;
  margin:0 0 12px;
}
.body h3{
  font-family:var(--display);
  font-size:20px;
  line-height:1.3;
  letter-spacing:.02em;
  margin:22px 0 10px;
}
.body p{margin:0 0 15px}
.body p:last-child{margin-bottom:0}
.body ul,.body ol{margin:0 0 15px;padding-left:1.25em}
.body li{margin:0 0 6px;line-height:1.65}
.body strong{font-weight:700}
.body a{text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px}
.body blockquote{
  margin:0 0 16px;
  padding:4px 0 4px 14px;
  border-left:3px solid var(--ink);
  color:var(--muted);
}
.body img{max-width:100%;height:auto;display:block;border:1px solid var(--line)}
.body small{font-size:16px}

/* —— 右侧索引 —— */
.side{
  order:2;
  background:rgba(255,255,255,.72);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  border:1px solid var(--line);
  padding:16px 16px 8px;
}
.eyebrow{
  display:block;
  font-size:16px;
  letter-spacing:.22em;
  color:var(--muted);
}
.side-title{
  font-family:var(--display);
  font-size:22px;
  letter-spacing:.03em;
  margin:2px 0 12px;
}
.side-nav ul{list-style:none;margin:0;padding:0;display:grid;gap:0}
.side-nav a{
  display:flex;
  align-items:center;
  min-height:44px;
  font-size:16px;
  text-decoration:none;
  border-bottom:1px solid var(--line);
  transition:padding-left .2s var(--ease),font-weight .2s var(--ease);
}
.side-nav li:last-child a{border-bottom:0}
.side-nav a:hover,.side-nav a.on{padding-left:8px;font-weight:700}

/* —— 页脚：大字号品牌 + 三列 dl —— */
.foot{
  margin-top:44px;
  background:var(--ink);
  color:var(--paper);
  padding:40px 0 26px;
}
.foot-brand{
  font-family:var(--display);
  font-size:clamp(52px,15vw,150px);
  line-height:.92;
  letter-spacing:.02em;
  margin:0;
  opacity:.94;
  overflow:hidden;
  white-space:nowrap;
}
.foot-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:22px;
  margin:26px 0;
}
.foot dl{margin:0}
.foot dt{
  font-size:16px;
  letter-spacing:.2em;
  color:rgba(255,255,255,.56);
  margin-bottom:6px;
}
.foot dd{
  margin:0;
  display:flex;
  flex-wrap:wrap;
  gap:2px 16px;
  font-size:16px;
}
.foot dd a{
  display:inline-flex;
  align-items:center;
  min-height:42px;
  color:var(--paper);
  text-decoration:none;
  border-bottom:1px solid rgba(255,255,255,.28);
}
.foot dd a:hover{border-bottom-color:var(--paper)}
.copy{
  text-align:center;
  font-size:16px;
  color:rgba(255,255,255,.6);
  margin:0;
  padding-top:18px;
  border-top:1px solid rgba(255,255,255,.14);
}

/* —— 锚点偏移 —— */
#home,#about,#caohan-renshe,#caohan-yiwen,#caohan-haochu,#caohan-tiaoshu,#caohan-jieguo{
  scroll-margin-top:124px;
}

@media (min-width:900px){
  .bar{flex-wrap:nowrap;padding:10px 24px}
  .navshell{order:0;flex:1 1 auto}
  .mainnav ul{justify-content:center;overflow:visible}
  .wrap{padding:0 24px}
  .cols{grid-template-columns:minmax(0,1fr) 300px;gap:26px;align-items:start;padding-top:32px}
  .body{padding:30px 28px}
  .body > div{padding:28px 24px}
  .side{position:sticky;top:92px}
  .hero{padding:72px 0 56px}
  .foot{padding:56px 0 32px}
  .foot-grid{grid-template-columns:repeat(3,1fr);gap:28px;margin:30px 0}
  #home,#about,#caohan-renshe,#caohan-yiwen,#caohan-haochu,#caohan-tiaoshu,#caohan-jieguo{
    scroll-margin-top:96px;
  }
}

@media (min-width:1200px){
  .foot-grid{grid-template-columns:1.4fr 1fr 1fr}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{transition-duration:.01ms!important;animation-duration:.01ms!important}
  .body > div:hover,.btn-more:hover,.cta:hover{transform:none}
}

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