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

:root{
  --g:#00ff80;
  --b:#0000ff;
  --k:#000000;
  --w:#ffffff;
  --edge:3px;
}

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

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

body{
  margin:0;
  background:var(--w);
  color:var(--k);
  font-family:'Raleway',system-ui,-apple-system,'Segoe UI','Noto Sans SC',sans-serif;
  font-size:17px;
  line-height:1.65;
  overflow-x:hidden;
  overflow-wrap:break-word;
}

h1,h2,h3{
  font-family:'Lora',Georgia,'Songti SC',serif;
  font-weight:700;
  line-height:1.14;
  margin:0;
  letter-spacing:-0.01em;
}

p{margin:0 0 14px}
ul,ol{margin:0 0 14px;padding-left:22px}
li{margin:0 0 6px}
a{color:var(--b);text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:3px}
a:hover{background:var(--g);color:var(--k)}
img{max-width:100%;height:auto;display:block}
small{font-size:16px;line-height:1.3}

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

/* 底部固定导航条 */
.nv{
  position:fixed;
  left:0;right:0;bottom:0;
  z-index:60;
  background:var(--k);
  border-top:4px solid var(--g);
  padding:6px 6px calc(6px + env(safe-area-inset-bottom,0px));
}
.nv ol{
  list-style:none;
  margin:0 auto;
  padding:0;
  max-width:1180px;
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  align-items:center;
  gap:2px;
}
.nv li{margin:0}
.nv a{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-height:44px;
  padding:0 9px;
  color:var(--g);
  font-weight:700;
  font-size:16px;
  text-decoration:none;
}
.nv a:hover,.nv a:focus-visible{background:var(--g);color:var(--k)}
.nv-ic{width:11px;height:11px;fill:currentColor;flex:none}
.nv-brand{
  flex:1 0 100%;
  display:flex;
  justify-content:center;
  order:0;
  border-bottom:2px solid var(--g);
  margin-bottom:4px;
}
.nv-brand a{
  color:var(--w);
  font-family:'Lora',Georgia,serif;
  font-size:20px;
  letter-spacing:0.02em;
  padding:0 14px;
  min-height:44px;
}

/* 外壳 */
.shell{
  max-width:1180px;
  margin:0 auto;
  padding:16px 14px 240px;
  display:grid;
  grid-template-columns:1fr;
  grid-template-areas:"main" "rail";
  gap:20px;
}
main{grid-area:main;min-width:0}
.rail{grid-area:rail}

/* 侧栏 */
.rail{
  background:var(--k);
  color:var(--w);
  border:var(--edge) solid var(--k);
  border-radius:18px;
  padding:14px 16px 16px;
  box-shadow:6px 6px 0 var(--g);
}
.rail-k{
  display:block;
  color:var(--g);
  font-weight:700;
  letter-spacing:0.22em;
  font-size:16px;
}
.rail-h{
  color:var(--w);
  font-size:23px;
  margin:2px 0 12px;
  border-bottom:3px solid var(--g);
  padding-bottom:8px;
}
.rail-list{list-style:none;margin:0;padding:0}
.rail-list li{margin:0;border-bottom:1px solid rgba(0,255,128,0.35)}
.rail-list li:last-child{border-bottom:0}
.rail-list a{
  display:flex;
  align-items:center;
  min-height:42px;
  color:var(--g);
  font-weight:600;
  text-decoration:none;
}
.rail-list a:hover,.rail-list a:focus-visible{background:var(--g);color:var(--k)}

/* 头图 */
.hero{
  position:relative;
  overflow:hidden;
  min-height:70vh;
  display:flex;
  align-items:center;
  background:var(--g);
  border:var(--edge) solid var(--k);
  border-radius:18px;
  box-shadow:8px 8px 0 var(--k);
  padding:38px 18px 46px;
  margin-bottom:26px;
}
.hero-mark{
  position:absolute;
  right:-12px;
  bottom:-10px;
  margin:0;
  font-family:'Lora',Georgia,serif;
  font-weight:700;
  font-size:clamp(60px,16vw,180px);
  line-height:0.82;
  letter-spacing:-0.05em;
  color:rgba(0,0,255,0.22);
  white-space:nowrap;
  pointer-events:none;
  will-change:transform;
}
.hero-in{
  position:relative;
  z-index:1;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:14px;
  width:100%;
  text-align:right;
}
.hero-art{flex:none}
.hero-img,.hero-fig{
  width:74px;
  height:auto;
  border:var(--edge) solid var(--k);
  border-radius:18px;
  background:var(--w);
}
.hero-fig{height:74px}
.hero-copy{min-width:0}
.hero h1{
  font-size:clamp(27px,7vw,56px);
  border-bottom:6px solid var(--b);
  padding-bottom:10px;
  display:inline-block;
}
.hero-desc{
  margin:14px 0 0;
  font-size:17px;
  font-weight:500;
  max-width:34ch;
  margin-left:auto;
}

/* 正文区块 */
div > section{
  scroll-margin-top:20px;
}
div > section:not(.hero){
  position:relative;
  background:var(--w);
  border:var(--edge) solid var(--k);
  border-bottom:10px solid var(--b);
  border-radius:18px;
  box-shadow:7px 7px 0 var(--k);
  padding:22px 18px 24px;
  margin-bottom:26px;
}
div > section:not(.hero) h2{
  font-size:clamp(21px,3.6vw,32px);
  margin-bottom:14px;
}
div > section:not(.hero) h3{font-size:20px;margin:22px 0 10px}
div > section > small{
  display:block;
  color:var(--b);
  font-weight:700;
  letter-spacing:0.18em;
  margin-bottom:5px;
}
div > section:not(.hero) h2 + p,
div > section:not(.hero) h3 + p{margin-top:0}
div > section:not(.hero) p{max-width:64ch}
div > section:not(.hero) ul,
div > section:not(.hero) ol{max-width:60ch}
div > section:not(.hero) blockquote{
  margin:18px 0;
  padding:12px 16px;
  border-left:8px solid var(--g);
  background:#f2fff8;
  font-family:'Lora',Georgia,serif;
}
div > section:not(.hero) table{
  width:100%;
  border-collapse:collapse;
  margin:16px 0;
  font-size:16px;
}
div > section:not(.hero) th,
div > section:not(.hero) td{
  border:2px solid var(--k);
  padding:8px 10px;
  text-align:left;
  vertical-align:top;
}
div > section:not(.hero) th{background:var(--g)}
div > section:not(.hero) figure{margin:18px 0}
div > section:not(.hero) figcaption{font-size:16px;margin-top:6px}

/* 内页 */
section.page{
  border:var(--edge) solid var(--k);
  border-radius:18px;
  box-shadow:7px 7px 0 var(--k);
  padding:24px 18px 26px;
  margin-bottom:26px;
}
section.page > small{
  display:block;
  color:var(--b);
  font-weight:700;
  letter-spacing:0.18em;
  margin-bottom:6px;
}
section.page h1{font-size:clamp(26px,6vw,46px);margin-bottom:14px}
.lead{font-weight:600;max-width:62ch}

/* 页脚 */
.ft{
  background:var(--k);
  color:var(--w);
  border-top:4px solid var(--g);
  padding:28px 14px 100px;
  display:grid;
  grid-template-columns:1fr;
  gap:18px;
}
.ft-brand{
  grid-column:1/-1;
  margin:0;
  font-family:'Lora',Georgia,serif;
  font-weight:700;
  font-size:clamp(32px,11vw,86px);
  line-height:0.94;
  letter-spacing:-0.035em;
  color:var(--g);
}
.ft dl{margin:0}
.ft dt{
  font-size:16px;
  font-weight:700;
  letter-spacing:0.18em;
  color:var(--g);
  border-bottom:2px solid var(--g);
  padding-bottom:5px;
}
.ft dd{margin:8px 0 0;font-size:16px;color:var(--w)}
.ft-links{display:flex;flex-wrap:wrap;gap:0 10px}
.ft-links a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  color:var(--g);
  text-decoration:none;
  font-weight:600;
}
.ft-links a:hover,.ft-links a:focus-visible{background:var(--g);color:var(--k)}
.ft-bar{
  grid-column:1/-1;
  display:flex;
  flex-wrap:wrap;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  border-top:3px solid var(--g);
  padding-top:14px;
}
.ft-bar p{margin:0;font-size:16px}
.ft-bar a{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:0 14px;
  background:var(--g);
  color:var(--k);
  border:2px solid var(--g);
  font-weight:700;
  text-decoration:none;
}
.ft-bar a:hover,.ft-bar a:focus-visible{background:var(--w);border-color:var(--w)}

/* 滚动进场 */
.js div > section{opacity:0;transform:translateY(16px)}
.js div > section.in{opacity:1;transform:none}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .js div > section{opacity:1;transform:none}
  .hero-mark{transform:none !important}
}

@media (min-width:640px){
  .hero{padding:46px 30px}
  .hero-img,.hero-fig{width:104px}
  .hero-fig{height:104px}
  .hero-copy{padding-right:4px}
  div > section:not(.hero){padding:30px 26px 30px}
  section.page{padding:32px 28px 34px}
  .ft{grid-template-columns:repeat(3,minmax(0,1fr));padding:36px 24px 110px;gap:22px}
}

@media (min-width:960px){
  .shell{
    grid-template-columns:250px minmax(0,1fr);
    grid-template-areas:"rail main";
    padding:26px 22px 170px;
    gap:26px;
  }
  .rail{position:sticky;top:24px;align-self:start}
  .nv ol{flex-wrap:nowrap}
  .nv-brand{flex:0 0 auto;order:2;border-bottom:0;margin:0}
  .nv li:nth-child(1),
  .nv li:nth-child(2),
  .nv li:nth-child(3){order:1}
  .nv li:nth-child(n+5){order:3}
  .nv a{padding:0 12px}
  .hero{min-height:70vh;padding:56px 44px}
  .hero-desc{font-size:18px}
  .ft{padding-bottom:110px}
}

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