:root{
  --neon:#87ff71;
  --sun:#ffce5c;
  --ink:#192617;
  --cream:#f3f1e2;
  --paper:#fffdf3;
  --line:rgba(25,38,23,.22);
  --r:10px;
}

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

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

body{
  margin:0;
  font-family:'Inter',system-ui,-apple-system,'Segoe UI','PingFang SC','Hiragino Sans GB','Microsoft YaHei',sans-serif;
  font-size:17px;
  line-height:1.72;
  color:var(--ink);
  background-color:var(--cream);
  background-image:radial-gradient(var(--line) 1px,transparent 1px);
  background-size:22px 22px;
  -webkit-font-smoothing:antialiased;
}

img{max-width:100%}
a{color:inherit}

/* ── 顶部滚动条 ───────────────────────────── */
.ticker{
  background:var(--ink);
  color:var(--neon);
  overflow:hidden;
  padding:7px 0;
  font-size:16px;
  letter-spacing:.16em;
  border-bottom:2px solid var(--ink);
}
.ticker__track{
  display:flex;
  width:max-content;
  gap:30px;
  animation:marq 28s linear infinite;
}
.ticker__track span{
  display:inline-flex;
  align-items:center;
  gap:30px;
  white-space:nowrap;
  font-weight:500;
}
.ticker__track span::after{
  content:"◆";
  color:var(--sun);
  font-size:11px;
  letter-spacing:0;
}
@keyframes marq{
  from{transform:translate3d(0,0,0)}
  to{transform:translate3d(-50%,0,0)}
}

/* ── 头部：品牌居中，菜单分列 ─────────────── */
.masthead{
  position:sticky;
  top:0;
  z-index:30;
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:10px;
  padding:8px 18px;
  background:var(--sun);
  border-bottom:3px dashed var(--ink);
}

.nav ol{
  display:flex;
  flex-wrap:wrap;
  gap:2px;
  margin:0;
  padding:0;
  list-style:none;
}
.nav--l ol{justify-content:flex-end}
.nav a{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:0 11px;
  font-size:16px;
  font-weight:500;
  text-decoration:none;
  border-radius:999px;
  border:2px solid transparent;
}
.nav a:hover,
.nav a:focus-visible{
  background:var(--ink);
  color:var(--neon);
  outline:none;
}

.brand{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 16px;
  min-height:44px;
  font-size:1.15rem;
  font-weight:600;
  letter-spacing:.02em;
  text-decoration:none;
  color:var(--ink);
  background:var(--neon);
  border:2px solid var(--ink);
  border-radius:999px;
  transform:rotate(-1.6deg);
  box-shadow:3px 3px 0 var(--ink);
}
.brand__mark{
  display:block;
  border-radius:6px;
  border:1px solid var(--ink);
  background:var(--paper);
}

/* ── 主体网格 ─────────────────────────────── */
.page{
  display:grid;
  grid-template-columns:minmax(0,1fr) 300px;
  align-items:start;
  gap:26px;
  max-width:1180px;
  margin:0 auto;
  padding:26px 20px 64px;
}

main [id]{scroll-margin-top:96px}

/* ── Hero：斜切底边 + 形状拼贴 ────────────── */
.hero{
  grid-column:1 / -1;
  position:relative;
  display:grid;
  place-items:center;
  min-height:45vh;
  padding:58px 20px 92px;
  overflow:hidden;
  text-align:center;
  background:var(--neon);
  border-radius:var(--r);
  clip-path:polygon(0 0,100% 0,100% calc(100% - 54px),0 100%);
}
.hero__inner{
  position:relative;
  z-index:3;
  max-width:min(680px,100%);
}
.hero h1{
  display:inline-block;
  max-width:100%;
  margin:0;
  padding:.26em .5em;
  font-size:clamp(2rem,5.4vw,3.5rem);
  line-height:1.16;
  font-weight:600;
  letter-spacing:-.02em;
  color:var(--neon);
  background:var(--ink);
  border-radius:var(--r);
  transform:rotate(-1.6deg);
  box-shadow:6px 6px 0 rgba(25,38,23,.22);
}
.hero__lede{
  margin:24px auto 0;
  max-width:46ch;
  font-size:17px;
  font-weight:500;
  line-height:1.65;
  color:var(--ink);
}
.hero__img{
  position:absolute;
  inset:0;
  z-index:1;
  width:100%;
  height:100%;
  object-fit:cover;
  opacity:.5;
  mix-blend-mode:multiply;
  transform:scale(1.12);
  will-change:transform;
}
.shape{
  position:absolute;
  z-index:2;
  pointer-events:none;
  mix-blend-mode:multiply;
}
.shape--a{
  width:160px;height:160px;
  top:-48px;left:-38px;
  background:var(--sun);
  border-radius:50%;
}
.shape--b{
  width:118px;height:118px;
  right:-26px;bottom:44px;
  background:var(--neon);
  border:6px dashed var(--ink);
  border-radius:8px;
  transform:rotate(17deg);
}
.shape--c{
  width:0;height:0;
  top:26%;right:14%;
  border-left:38px solid transparent;
  border-right:38px solid transparent;
  border-bottom:66px solid var(--ink);
  opacity:.7;
  transform:rotate(9deg);
}

/* ── 正文卡 ───────────────────────────────── */
.article{
  min-width:0;
  padding:24px clamp(16px,3vw,36px) 32px;
  background:var(--paper);
  border:2px solid var(--ink);
  border-bottom:7px solid var(--neon);
  border-radius:var(--r);
  box-shadow:6px 6px 0 rgba(25,38,23,.14);
}

.kicker{
  display:block;
  margin:0 0 6px;
  font-size:16px;
  font-weight:600;
  letter-spacing:.16em;
  color:rgba(25,38,23,.6);
}
.kicker--ink{color:var(--ink)}

.article__title,
.side__title{
  margin:0;
  font-size:1.42rem;
  line-height:1.3;
  font-weight:600;
  letter-spacing:-.01em;
}

.article__body{margin-top:16px}
.article__body > :first-child{margin-top:0}
.article__body p,
.article__body li{
  font-size:17px;
  line-height:1.78;
}
.article__body p{margin:0 0 1.05em}
.article__body h2,
.article__body h3{
  margin:1.5em 0 .35em;
  font-size:1.32rem;
  line-height:1.3;
  font-weight:600;
  letter-spacing:-.01em;
}
.article__body small{
  display:block;
  margin:1.1em 0 -.1em;
  font-size:16px;
  font-weight:600;
  letter-spacing:.14em;
  color:rgba(25,38,23,.55);
}
.article__body small + h2,
.article__body small + h3{margin-top:.2em}
.article__body ul,
.article__body ol{margin:0 0 1.1em;padding-left:1.3em}
.article__body li{margin:.3em 0}
.article__body a{
  color:var(--ink);
  text-decoration:underline;
  text-decoration-thickness:2px;
  text-decoration-color:var(--neon);
  text-underline-offset:3px;
}
.article__body a:hover{background:var(--sun)}
.article__body section + section{
  margin-top:30px;
  padding-top:18px;
  border-top:2px dotted var(--line);
}
.article__body blockquote{
  margin:1.2em 0;
  padding:10px 18px;
  border-left:6px solid var(--sun);
  background:rgba(255,206,92,.2);
}
.article__body blockquote p:last-child{margin-bottom:0}
.article__body code{
  padding:2px 6px;
  font-size:15px;
  background:var(--cream);
  border-radius:6px;
}

.article__fig{
  margin:26px 0 0;
  overflow:hidden;
  border:2px solid var(--ink);
  border-radius:var(--r);
  background:var(--cream);
}
.article__fig:empty{display:none}
.figure__img{
  display:block;
  width:100%;
  height:auto;
}

/* ── 右侧栏 ───────────────────────────────── */
.side{
  position:sticky;
  top:96px;
  padding:18px;
  background:var(--sun);
  border:2px dashed var(--ink);
  border-radius:var(--r);
}
.side__list{
  counter-reset:s;
  display:grid;
  gap:8px;
  margin:14px 0 0;
  padding:0;
  list-style:none;
}
.side__list li{counter-increment:s}
.side__list a{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:44px;
  padding:8px 10px;
  font-size:16px;
  font-weight:500;
  text-decoration:none;
  color:var(--ink);
  background:var(--paper);
  border:1px solid var(--ink);
  border-radius:8px;
}
.side__list a::before{
  content:counter(s,decimal-leading-zero);
  flex:0 0 auto;
  padding:1px 5px;
  font-size:16px;
  font-weight:600;
  color:var(--neon);
  background:var(--ink);
  border-radius:5px;
}
.side__list a:hover{background:var(--neon)}

/* ── 页脚：三栏，仅 p 与 small ─────────────── */
.foot{
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:14px;
  padding:26px 20px;
  color:var(--cream);
  background:var(--ink);
  border-top:6px solid var(--neon);
}
.foot p{margin:0;font-size:16px}
.foot__brand{
  font-size:1.1rem;
  font-weight:600;
  color:var(--neon);
}
.foot__links{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  justify-content:center;
}
.foot a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:0 12px;
  font-size:16px;
  color:var(--sun);
  text-decoration:none;
  border-radius:999px;
}
.foot a:hover{background:rgba(255,206,92,.18)}
.foot__copy{
  font-size:16px;
  color:rgba(243,241,226,.72);
  justify-self:end;
}

/* ── 动效 ─────────────────────────────────── */
.reveal{opacity:0;transform:translateY(14px)}
.reveal.is-in{
  opacity:1;
  transform:none;
  transition:opacity .5s ease,transform .55s cubic-bezier(.2,.7,.3,1);
}

/* ── 断点 ─────────────────────────────────── */
@media (max-width:900px){
  .page{
    grid-template-columns:1fr;
    gap:20px;
    padding:18px 14px 52px;
  }
  main [id]{scroll-margin-top:190px}
  .side{position:static;top:auto;order:3}
  .masthead{
    grid-template-columns:1fr;
    justify-items:center;
    gap:4px;
    padding:10px 12px;
  }
  .brand{order:-1}
  .nav ol{justify-content:center}
  .nav a{padding:0 9px}
  .hero{
    min-height:42vh;
    padding:44px 16px 76px;
    clip-path:polygon(0 0,100% 0,100% calc(100% - 38px),0 100%);
  }
  .shape--a{width:112px;height:112px;top:-40px;left:-32px}
  .shape--c{display:none}
  .foot{
    grid-template-columns:1fr;
    justify-items:center;
    text-align:center;
    gap:10px;
  }
  .foot__copy{justify-self:center}
}

@media (max-width:420px){
  .hero h1{font-size:1.9rem}
  .hero__lede{margin-top:18px}
  .shape--b{width:88px;height:88px;bottom:30px}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .ticker__track{animation:none}
  .reveal{opacity:1;transform:none}
  .hero__img{transform:none}
  *{transition-duration:.001ms !important;animation-duration:.001ms !important}
}

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