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

:root{
  --ink:#192617;
  --ink2:#22331d;
  --neon:#87ff71;
  --mustard:#ffce5c;
  --paper:#eef4e6;
  --line:rgba(135,255,113,.32);
  --rail:116px;
}

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

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

body{
  margin:0 0 0 var(--rail);
  font-family:'DM Sans',system-ui,-apple-system,'PingFang SC','Microsoft YaHei',sans-serif;
  font-size:17px;
  line-height:1.75;
  color:var(--paper);
  background-color:var(--ink);
  background-image:
    radial-gradient(rgba(135,255,113,.16) 1px, transparent 1px),
    radial-gradient(rgba(255,206,92,.11) 1px, transparent 1px);
  background-size:26px 26px, 26px 26px;
  background-position:0 0, 13px 13px;
  overflow-x:hidden;
}

img{max-width:100%;display:block}
p{margin:0 0 1em}
a{color:var(--mustard)}

::selection{background:var(--neon);color:var(--ink)}

hr{
  border:0;
  border-top:3px dashed rgba(255,206,92,.5);
  margin:0 0 18px;
}

/* 左侧竖排导航 */
.mast{
  position:fixed;
  inset:0 auto 0 0;
  width:var(--rail);
  z-index:60;
  display:flex;
  flex-direction:column;
  gap:12px;
  padding-bottom:18px;
  background:var(--ink);
  border-right:3px dashed var(--line);
}

.strip{
  overflow:hidden;
  height:28px;
  display:flex;
  align-items:center;
  background:var(--mustard);
  color:var(--ink);
  border-bottom:3px solid var(--ink);
}

.strip-in{
  display:block;
  white-space:nowrap;
  font-size:12px;
  font-weight:700;
  letter-spacing:.08em;
  animation:slide 16s linear infinite;
}

@keyframes slide{
  from{transform:translateX(0)}
  to{transform:translateX(-50%)}
}

.mark{
  margin:6px auto 0;
  width:52px;
  height:52px;
  display:grid;
  place-items:center;
  background:var(--neon);
  color:var(--ink);
  text-decoration:none;
  font-weight:700;
  font-size:18px;
  overflow:hidden;
  border-radius:4px;
  clip-path:polygon(50% 0,100% 26%,100% 74%,50% 100%,0 74%,0 26%);
  transform:rotate(-4deg);
  transition:transform .18s ease, background .18s ease;
}

.mark:hover,.mark:focus-visible{transform:rotate(4deg) scale(1.06);background:var(--mustard)}
.mark img{width:100%;height:100%;object-fit:cover}

.mast-nav p{
  margin:0;
  padding:0 6px;
  display:flex;
  flex-direction:column;
  gap:2px;
}

.mast-nav a{
  position:relative;
  display:block;
  padding:11px 8px 11px 22px;
  font-size:16px;
  line-height:1.35;
  color:var(--paper);
  text-decoration:none;
  border-bottom:1px dotted rgba(238,244,230,.18);
  transition:background .16s ease, color .16s ease, transform .16s ease;
}

.mast-nav a::before{
  content:'';
  position:absolute;
  left:7px;
  top:20px;
  width:8px;
  height:8px;
  background:var(--mustard);
  transform:rotate(45deg);
}

.mast-nav a:nth-child(2n)::before{
  border-radius:50%;
  background:var(--neon);
  transform:none;
}

.mast-nav a:nth-child(3n)::before{
  background:var(--mustard);
  border-radius:0;
  transform:none;
  clip-path:polygon(50% 0,100% 100%,0 100%);
}

.mast-nav a:hover,.mast-nav a:focus-visible{
  color:var(--ink);
  background:var(--neon);
  transform:translateX(3px);
}

.mast-nav a:hover::before,.mast-nav a:focus-visible::before{background:var(--ink)}

/* 主区域 */
main{margin-left:0}

.hero{
  position:relative;
  overflow:hidden;
  min-height:45vh;
  display:grid;
  grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);
  align-items:center;
  gap:26px;
  padding:38px 32px 36px;
  border-bottom:3px solid var(--mustard);
  background-image:radial-gradient(rgba(238,244,230,.12) 1px, transparent 1px);
  background-size:14px 14px;
}

.hero::after{
  content:'';
  position:absolute;
  right:-52px;
  bottom:-72px;
  width:230px;
  height:230px;
  border:14px solid var(--neon);
  border-radius:50%;
  opacity:.22;
  transform:rotate(12deg);
  pointer-events:none;
}

.hero-txt{position:relative;z-index:2;max-width:640px}

.hero h1{
  margin:0 0 14px;
  font-size:clamp(29px,4.9vw,52px);
  line-height:1.16;
  letter-spacing:-.02em;
}

.hero h1::after{
  content:'';
  display:block;
  width:74px;
  height:10px;
  margin-top:16px;
  background:var(--mustard);
  clip-path:polygon(0 30%,100% 0,100% 70%,0 100%);
}

.hero-desc{
  margin:0;
  max-width:46ch;
  font-size:17px;
  color:rgba(238,244,230,.84);
}

.hero-art{
  position:relative;
  min-height:230px;
  z-index:1;
}

.hero-art .art{
  position:absolute;
  width:62%;
  height:auto;
  object-fit:cover;
  border:4px solid var(--ink);
  border-radius:4px;
  box-shadow:0 10px 0 rgba(135,255,113,.32);
  background:var(--ink2);
}

.hero-art .art-0{
  top:0;
  left:0;
  transform:rotate(-5deg);
  clip-path:polygon(0 0,100% 3%,97% 100%,3% 96%);
}

.hero-art .art-1{
  bottom:0;
  right:0;
  width:54%;
  transform:rotate(6deg);
  box-shadow:0 10px 0 rgba(255,206,92,.34);
}

/* 正文双栏 */
.wrap{
  display:grid;
  grid-template-columns:minmax(0,1fr) 248px;
  gap:44px;
  align-items:start;
  max-width:1160px;
  margin:0 auto;
  padding:36px 32px 64px;
}

.body{min-width:0;font-size:17px}

.body > section{
  padding:0 0 28px;
  margin:0 0 34px;
  border-bottom:3px dotted rgba(135,255,113,.26);
  scroll-margin-top:24px;
}

.body > section:last-child{border-bottom:0;margin-bottom:0;padding-bottom:0}

.body h2{
  margin:0 0 10px;
  font-size:clamp(22px,3.3vw,30px);
  line-height:1.28;
  letter-spacing:-.01em;
  color:var(--neon);
}

.body h3{
  margin:26px 0 8px;
  font-size:19px;
  line-height:1.4;
  color:var(--mustard);
}

.body h2 + hr{margin-bottom:20px}

.body p{margin:0 0 1.05em}

.body ul,.body ol{
  margin:0 0 1.2em;
  padding-left:1.35em;
}

.body li{margin:0 0 .45em}

.body li::marker{color:var(--neon)}

.body a{
  color:var(--mustard);
  text-decoration:none;
  border-bottom:2px dotted rgba(255,206,92,.65);
}

.body a:hover{border-bottom-style:solid;color:var(--neon)}

.body blockquote{
  margin:0 0 1.2em;
  padding:14px 18px;
  border-left:5px solid var(--neon);
  background:rgba(135,255,113,.07);
  border-radius:0 4px 4px 0;
}

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

.body figure{margin:0 0 1.2em}
.body figcaption{font-size:16px;color:rgba(238,244,230,.7);margin-top:8px}

.body table{
  width:100%;
  border-collapse:collapse;
  margin:0 0 1.2em;
  font-size:16px;
}

.body th,.body td{
  border:2px dotted rgba(238,244,230,.24);
  padding:9px 11px;
  text-align:left;
}

.body th{background:rgba(255,206,92,.12)}

.body img{border-radius:4px;border:3px solid var(--ink2)}

.body code{
  font-family:ui-monospace,Menlo,Consolas,monospace;
  font-size:.94em;
  background:rgba(135,255,113,.14);
  padding:1px 5px;
  border-radius:3px;
}

/* 右栏 */
.side{
  position:sticky;
  top:22px;
  padding:16px;
  background:var(--ink2);
  border:3px solid var(--neon);
  border-radius:4px;
  box-shadow:8px 8px 0 rgba(255,206,92,.34);
  transform:rotate(-.7deg);
}

.side h2{
  margin:0 0 8px;
  font-size:17px;
  letter-spacing:.04em;
  color:var(--mustard);
}

.side hr{border-top:3px dotted rgba(255,206,92,.55);margin-bottom:10px}

.side nav p{
  margin:0;
  display:flex;
  flex-direction:column;
}

.side a{
  display:block;
  padding:10px 4px;
  font-size:16px;
  line-height:1.4;
  color:var(--paper);
  text-decoration:none;
  border-bottom:1px dotted rgba(238,244,230,.22);
  transition:color .16s ease, padding-left .16s ease;
}

.side a:last-child{border-bottom:0}

.side a:hover,.side a:focus-visible{color:var(--neon);padding-left:9px}

/* 页脚 */
.base{
  display:grid;
  grid-template-columns:1.15fr 1fr;
  gap:26px;
  padding:44px 32px 18px;
  background:var(--ink2);
  border-top:3px solid var(--mustard);
  background-image:
    repeating-linear-gradient(135deg, rgba(135,255,113,.06) 0 10px, transparent 10px 20px);
}

.base .big{
  margin:0;
  font-size:clamp(38px,8.4vw,86px);
  line-height:.94;
  letter-spacing:-.045em;
  color:var(--neon);
  word-break:break-all;
}

.base-links nav p{
  margin:0;
  display:flex;
  flex-wrap:wrap;
  gap:4px 18px;
}

.base-links a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:6px 0;
  font-size:16px;
  color:var(--paper);
  text-decoration:none;
  border-bottom:2px dotted rgba(255,206,92,.7);
}

.base-links a:hover,.base-links a:focus-visible{color:var(--neon);border-bottom-style:solid}

.base-bar{
  grid-column:1 / -1;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  margin-top:8px;
  padding-top:14px;
  font-size:16px;
  border-top:3px dotted rgba(238,244,230,.26);
  color:rgba(238,244,230,.8);
}

.base-bar a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:6px 12px;
  color:var(--ink);
  background:var(--mustard);
  border-radius:4px;
  text-decoration:none;
  font-weight:700;
  transition:transform .18s ease, background .18s ease;
}

.base-bar a:hover,.base-bar a:focus-visible{transform:translateY(-2px);background:var(--neon)}

/* 进场 */
.body > section.rv{
  opacity:0;
  transform:translateY(16px);
  transition:opacity .5s ease, transform .5s ease;
}

.body > section.rv.in{opacity:1;transform:none}

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

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .strip-in{animation:none}
  .body > section.rv{opacity:1;transform:none;transition:none}
  .mark,.mast-nav a,.side a,.base-bar a{transition:none}
}

/* 移动端 */
@media (max-width:840px){
  body{margin-left:0;font-size:17px}

  .mast{
    position:sticky;
    top:0;
    left:auto;
    right:auto;
    width:auto;
    flex-direction:row;
    align-items:center;
    flex-wrap:wrap;
    gap:0;
    padding:0;
    border-right:0;
    border-bottom:3px dashed var(--line);
    background:var(--ink);
  }

  .strip{flex:0 0 100%;width:100%;height:24px;border-bottom-width:0}

  .mark{
    margin:8px 10px;
    width:44px;
    height:44px;
    flex:0 0 auto;
    font-size:16px;
  }

  .mast-nav{
    flex:1 1 0;
    min-width:0;
    overflow-x:auto;
    margin:8px 0;
    -webkit-overflow-scrolling:touch;
  }

  .mast-nav p{
    flex-direction:row;
    gap:4px;
    padding:0 10px 0 0;
  }

  .mast-nav a{
    white-space:nowrap;
    padding:11px 13px;
    font-size:16px;
    border-bottom:0;
    border-radius:4px;
    background:rgba(135,255,113,.09);
  }

  .mast-nav a::before{display:none}

  .hero{
    grid-template-columns:1fr;
    min-height:0;
    gap:22px;
    padding:26px 18px 28px;
  }

  .hero h1{font-size:clamp(26px,7.6vw,38px)}
  .hero-art{min-height:210px}

  .wrap{
    grid-template-columns:1fr;
    gap:30px;
    padding:24px 18px 44px;
  }

  .body > section{scroll-margin-top:128px}

  .side{
    position:static;
    transform:none;
    order:2;
  }

  .base{
    grid-template-columns:1fr;
    gap:18px;
    padding:32px 18px 16px;
  }

  .base-bar{flex-wrap:wrap;gap:10px}
}

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