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

:root{
  --paper:#fafaf8;
  --grey:#4a4a4a;
  --ink:#1a1a1a;
  --line:rgba(26,26,26,.28);
  --faint:rgba(74,74,74,.09);
  --glass:rgba(250,250,248,.76);
  --step:steps(3,end);
}

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

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

body{
  margin:0;
  font-family:Inter,-apple-system,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  font-size:16.5px;
  line-height:1.72;
  color:var(--ink);
  background-color:var(--paper);
  background-image:
    radial-gradient(rgba(26,26,26,.15) 1px,transparent 1.3px),
    repeating-linear-gradient(93deg,rgba(74,74,74,.05) 0 1px,transparent 1px 5px);
  background-size:14px 14px,100% 100%;
  background-attachment:fixed;
}

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

a{color:inherit}
a:focus-visible,summary:focus-visible{
  outline:2.5px dashed var(--ink);
  outline-offset:3px;
}

.skip{
  position:absolute;
  left:-9999px;
  top:0;
  z-index:90;
}
.skip:focus{
  left:12px;
  top:10px;
  padding:10px 14px;
  background:var(--ink);
  color:var(--paper);
  border-radius:12px;
  font-size:15px;
  text-decoration:none;
}

/* 顶部细条 */
.ticker{
  margin:0;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  padding:5px clamp(12px,4vw,32px);
  font-size:12px;
  line-height:1.7;
  letter-spacing:.16em;
  color:var(--grey);
  border-bottom:1px dashed var(--line);
  background:rgba(250,250,248,.94);
  white-space:nowrap;
  overflow:hidden;
}
.ticker span{flex:0 0 auto}
.ticker-r{
  max-width:56%;
  overflow:hidden;
  text-overflow:ellipsis;
  opacity:.72;
}

/* 顶栏 */
.masthead{
  position:sticky;
  top:0;
  z-index:40;
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:8px;
  padding:8px clamp(10px,3.4vw,30px);
  background:linear-gradient(rgba(250,250,248,.97),rgba(250,250,248,.87));
  -webkit-backdrop-filter:blur(6px);
  backdrop-filter:blur(6px);
  border-bottom:1.5px solid var(--ink);
}

menu{margin:0;padding:0;list-style:none}

.rail{
  display:flex;
  flex-wrap:wrap;
  gap:0 2px;
  justify-self:start;
}
.rail a,
.drawer menu a{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:44px;
  padding:7px 10px;
  font-size:14px;
  line-height:1.4;
  color:var(--grey);
  text-decoration:none;
  border-bottom:2px solid transparent;
  transition:color .12s var(--step),transform .12s var(--step),border-color .12s var(--step);
}
.rail a::before{
  content:"";
  width:7px;
  height:7px;
  flex:0 0 auto;
  border:1.6px solid var(--ink);
  border-radius:52% 44% 58% 46%;
  transform:rotate(8deg);
  opacity:.8;
}
.rail a:hover,
.drawer menu a:hover{
  color:var(--ink);
  transform:translate(-1px,-1px);
  border-bottom-color:var(--ink);
}

.brand{
  justify-self:center;
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:44px;
  padding:4px 10px;
  font-size:19px;
  font-weight:600;
  letter-spacing:-.015em;
  text-decoration:none;
  transform:rotate(-.7deg);
}
.mark{width:15px;height:15px;flex:0 0 auto;opacity:.85}

.drawer{justify-self:end;position:relative}
.drawer > summary{
  display:inline-flex;
  align-items:center;
  gap:9px;
  min-height:44px;
  padding:7px 14px;
  font-size:14px;
  letter-spacing:.1em;
  color:var(--ink);
  cursor:pointer;
  list-style:none;
  border:1.5px solid var(--ink);
  border-radius:14px;
  background:var(--glass);
  box-shadow:2px 2px 0 rgba(26,26,26,.82);
  transform:rotate(.6deg);
  transition:transform .12s var(--step),box-shadow .12s var(--step);
}
.drawer > summary::-webkit-details-marker{display:none}
.drawer > summary::after{
  content:"+";
  font-size:15px;
  line-height:1;
  opacity:.8;
}
.drawer[open] > summary::after{content:"–"}
.drawer > summary:hover{
  transform:rotate(-.4deg) translate(-1px,-1px);
  box-shadow:4px 4px 0 rgba(26,26,26,.82);
}

.drawer menu{
  position:absolute;
  right:0;
  top:calc(100% + 10px);
  width:min(292px,86vw);
  display:grid;
  gap:2px;
  padding:10px;
  counter-reset:nav;
  background:rgba(250,250,248,.97);
  -webkit-backdrop-filter:blur(8px);
  backdrop-filter:blur(8px);
  border:1.5px solid var(--ink);
  border-radius:18px;
  box-shadow:5px 6px 0 rgba(26,26,26,.16);
  transform:rotate(-.5deg);
}
.drawer menu a{
  width:100%;
  justify-content:flex-start;
  min-height:44px;
  border-bottom:1px dashed var(--line);
  counter-increment:nav;
}
.drawer menu a::before{
  content:counter(nav,decimal-leading-zero);
  font-size:12px;
  letter-spacing:.1em;
  color:var(--grey);
  opacity:.75;
}
.drawer menu li:last-child a{border-bottom-color:transparent}

/* 首屏 */
.hero{
  position:relative;
  overflow:hidden;
  min-height:45vh;
  display:grid;
  place-content:center;
  justify-items:center;
  gap:12px;
  text-align:center;
  padding:clamp(30px,7vh,66px) 20px clamp(34px,7vh,62px);
  border-bottom:1.5px solid var(--ink);
  background-image:radial-gradient(rgba(26,26,26,.22) 1.2px,transparent 1.35px);
  background-size:19px 19px;
}
.hero::after{
  content:"";
  position:absolute;
  inset:auto 0 0 0;
  height:26px;
  background:repeating-linear-gradient(104deg,rgba(74,74,74,.1) 0 2px,transparent 2px 9px);
  opacity:.5;
  pointer-events:none;
}
.hero h1{
  position:relative;
  margin:0;
  max-width:23ch;
  font-size:clamp(27px,6.1vw,54px);
  line-height:1.16;
  font-weight:600;
  letter-spacing:-.032em;
  transform:rotate(-.6deg);
}
.hero h1::after{
  content:"";
  position:absolute;
  left:-2%;
  right:-2%;
  bottom:-13px;
  height:9px;
  border-radius:44% 58% 52% 46%;
  background:linear-gradient(92deg,rgba(26,26,26,.7),rgba(26,26,26,.16));
  transform:rotate(-.8deg);
  opacity:.6;
}
.lede{
  margin:14px 0 0;
  max-width:38ch;
  font-size:16px;
  line-height:1.65;
  color:var(--grey);
}
.scrawl{
  position:absolute;
  top:11%;
  right:max(5%,7vw);
  width:clamp(42px,6.5vw,72px);
  height:auto;
  opacity:.55;
  transform:rotate(9deg);
}

/* 主体：左栏目录 + 右侧正文 */
main{
  max-width:1180px;
  margin:0 auto;
  padding:34px clamp(14px,4vw,32px) 60px;
  display:grid;
  grid-template-columns:236px minmax(0,1fr);
  gap:clamp(20px,3.4vw,40px);
  align-items:start;
}

.side{
  position:sticky;
  top:78px;
  padding:14px 14px 18px;
  border:1.5px solid var(--ink);
  border-radius:18px;
  background:var(--glass);
  -webkit-backdrop-filter:blur(4px);
  backdrop-filter:blur(4px);
  box-shadow:4px 5px 0 rgba(26,26,26,.13);
  transform:rotate(-.8deg);
}
.side::before{
  content:"";
  position:absolute;
  left:50%;
  top:-9px;
  width:56px;
  height:17px;
  margin-left:-28px;
  background:rgba(74,74,74,.16);
  border-left:1px solid rgba(26,26,26,.14);
  border-right:1px solid rgba(26,26,26,.14);
  transform:rotate(-3deg);
}
.side h2{
  margin:0 0 10px;
  font-size:15px;
  font-weight:500;
  letter-spacing:.2em;
  color:var(--grey);
}
.side h2 > span{border-bottom:1.5px dashed var(--line);padding-bottom:2px}

.side-list{display:grid;gap:1px}
.side-list a{
  display:flex;
  align-items:center;
  gap:9px;
  min-height:40px;
  padding:4px 8px;
  font-size:15px;
  line-height:1.45;
  text-decoration:none;
  border-radius:11px;
  transition:background .12s var(--step),transform .12s var(--step),color .12s var(--step);
}
.side-list a::before{
  content:"";
  width:6px;
  height:6px;
  flex:0 0 auto;
  background:var(--grey);
  border-radius:60% 40% 55% 45%;
  transform:rotate(12deg);
  opacity:.7;
}
.side-list a:hover{
  background:var(--faint);
  color:var(--ink);
  transform:translateX(2px);
}

/* 正文 */
div{min-width:0}
.doc{padding-bottom:8px;counter-reset:sec}

.doc section{
  padding:28px 0 8px;
  border-top:1.5px dashed var(--line);
  scroll-margin-top:96px;
}
.doc section:first-child{border-top:0;padding-top:4px}
.doc section::before{
  content:"";
  display:block;
  width:38px;
  height:3px;
  margin-bottom:14px;
  background:var(--ink);
  opacity:.75;
  transform:rotate(-1.2deg);
}
.doc section:first-child::before{opacity:.35}

.doc h2{
  margin:0 0 15px;
  font-size:clamp(21px,3.6vw,31px);
  line-height:1.28;
  font-weight:600;
  letter-spacing:-.022em;
}
.doc h2 > span,
.doc h3 > span{
  background:linear-gradient(transparent 62%,rgba(74,74,74,.24) 62%,rgba(74,74,74,.24) 92%,transparent 92%);
  padding-bottom:2px;
}
.doc h3{
  margin:26px 0 10px;
  font-size:18.5px;
  line-height:1.45;
  font-weight:600;
}
.doc p{margin:0 0 1.05em;line-height:1.78;max-width:66ch}
.doc p:last-child{margin-bottom:.4em}
.doc ul,.doc ol{margin:0 0 1.1em;padding-left:1.35em;max-width:64ch}
.doc li{margin:.36em 0;line-height:1.72}
.doc a{
  text-decoration:underline;
  text-decoration-thickness:1.5px;
  text-underline-offset:3px;
}
.doc a:hover{background:var(--faint)}
.doc strong{font-weight:600}
.doc blockquote{
  margin:20px 0;
  padding:12px 16px;
  border-left:3px solid var(--ink);
  background:var(--faint);
  transform:rotate(-.25deg);
  max-width:64ch;
}
.doc blockquote p:last-child{margin-bottom:0}
.doc img{
  margin:18px 0;
  border:1.5px solid var(--ink);
  border-radius:18px;
}
.doc code{
  font-size:15px;
  padding:1px 5px;
  border:1px solid var(--line);
  border-radius:8px;
}
.doc hr{
  border:0;
  border-top:1.5px dashed var(--line);
  margin:26px 0;
}

/* 页脚 */
.base{
  margin-top:8px;
  padding:44px 20px 34px;
  text-align:center;
  border-top:1.5px solid var(--ink);
  background:repeating-linear-gradient(101deg,rgba(74,74,74,.055) 0 1px,transparent 1px 7px);
}
.cta{margin:0 0 20px}
.cta a{
  display:inline-block;
  min-height:54px;
  padding:13px 30px;
  font-size:clamp(20px,4.4vw,30px);
  font-weight:600;
  letter-spacing:-.022em;
  line-height:1.4;
  text-decoration:none;
  color:var(--ink);
  border:1.5px solid var(--ink);
  border-radius:18px;
  background:var(--glass);
  box-shadow:4px 5px 0 rgba(26,26,26,.88);
  transform:rotate(-.9deg);
  transition:transform .12s var(--step),box-shadow .12s var(--step);
}
.cta a:hover{
  transform:rotate(.5deg) translate(-2px,-2px);
  box-shadow:7px 8px 0 rgba(26,26,26,.88);
}
.base small{
  display:block;
  font-size:13px;
  line-height:1.9;
  letter-spacing:.18em;
  color:var(--grey);
}

/* 滚动显现 */
[data-in]{
  opacity:0;
  transform:translateY(11px) rotate(-.35deg);
  transition:opacity .32s var(--step),transform .32s var(--step);
}
[data-in].in{
  opacity:1;
  transform:translateY(0) rotate(0deg);
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,
  *::before,
  *::after{
    transition-duration:.01ms !important;
    animation-duration:.01ms !important;
  }
  [data-in]{opacity:1;transform:none}
}

@media (max-width:860px){
  .rail{display:none}
  .masthead{grid-template-columns:1fr auto}
  .brand{justify-self:start}
  main{
    grid-template-columns:minmax(0,1fr);
    padding-top:22px;
    gap:26px;
  }
  aside{position:static}
  .side{transform:none}
  .side-list{
    grid-template-columns:1fr 1fr;
    gap:2px;
  }
  .scrawl{top:7%;right:5%;width:44px}
  .doc section{scroll-margin-top:80px}
}

@media (max-width:420px){
  .side-list{grid-template-columns:1fr}
  .hero h1{font-size:clamp(25px,7.4vw,32px)}
  .cta a{padding:12px 20px}
}
</style>

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