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

:root{
  --red:#E8452B;
  --ink:#111418;
  --yel:#F7C838;
  --paper:#FDF8EE;
  --line:#DCD3C1;
}

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

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

body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:'Kalam','Patrick Hand',system-ui,-apple-system,'PingFang SC','Hiragino Sans GB','Microsoft YaHei',sans-serif;
  font-size:17px;
  line-height:1.65;
}

h1,h2,h3,h4{line-height:1.25;letter-spacing:.01em}
a{color:var(--red)}
img{max-width:100%}
div[id]{scroll-margin-top:24px}

/* 头部 */
.sitehead{
  background:var(--ink);
  color:var(--paper);
  padding:16px max(20px,5vw) 12px;
}

.brandrow{
  display:flex;
  align-items:center;
  gap:12px;
}

.logo{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:44px;
  min-height:44px;
  padding:0 6px;
  background:var(--red);
  border-radius:4px;
  color:var(--paper);
  text-decoration:none;
  overflow:hidden;
}

.logo img{display:block;width:40px;height:40px;object-fit:contain}
.logo-fallback{font-size:1.3rem;font-weight:700}

.brandname{
  font-size:1.35rem;
  font-weight:700;
  letter-spacing:.03em;
  color:var(--yel);
}

.pillnav{
  margin-top:14px;
  overflow-x:auto;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
}

.pillnav::-webkit-scrollbar{height:0}

.pillnav p{
  margin:0;
  display:flex;
  gap:8px;
  padding-bottom:4px;
}

.pillnav a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:0 16px;
  border-radius:999px;
  background:var(--yel);
  color:var(--ink);
  text-decoration:none;
  font-weight:700;
  white-space:nowrap;
  transition:background-color .18s ease,color .18s ease;
}

.pillnav a:hover,
.pillnav a:focus-visible{
  background:var(--red);
  color:var(--paper);
}

/* 首屏 */
.hero{
  min-height:100vh;
  display:grid;
  grid-template-columns:1.04fr .96fr;
  align-items:center;
  gap:40px;
  padding:64px max(24px,5vw) 72px;
}

.hero-copy{
  border-left:10px solid var(--red);
  padding-left:22px;
}

.hero-copy h1{
  margin:0;
  font-size:clamp(1.95rem,5.2vw,3.4rem);
  font-weight:700;
}

.hero-desc{
  margin:20px 0 0;
  max-width:32em;
  font-size:1.05rem;
  color:#3B3F45;
}

.collage{
  margin:0;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  align-items:center;
  min-height:400px;
}

.shard{
  border-radius:4px;
  overflow:hidden;
}

.shard-img,
.shard img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.shard-a{
  height:250px;
  background:var(--red);
  transform:translateY(-26px) rotate(-2.5deg);
}

.shard-b{
  height:280px;
  background:var(--ink);
  transform:translateY(28px) rotate(2.5deg);
}

/* 正文区 */
.sheet{
  max-width:1140px;
  margin:0 auto;
  display:grid;
  grid-template-columns:236px minmax(0,1fr);
  gap:36px;
  padding:52px max(20px,4vw) 64px;
  border-top:3px solid var(--ink);
}

.toc{
  position:sticky;
  top:24px;
  align-self:start;
  background:var(--ink);
  color:var(--paper);
  border-radius:4px;
  padding:20px 18px;
}

.toc small{
  display:block;
  color:var(--yel);
  font-size:.9rem;
  letter-spacing:.22em;
}

.toc h2{
  margin:.15em 0 .7em;
  font-size:1.2rem;
  color:var(--paper);
}

.toc ol{
  margin:0;
  padding:0;
  list-style:none;
  display:grid;
  gap:2px;
}

.toc a{
  display:flex;
  align-items:center;
  min-height:40px;
  padding:4px 2px;
  color:var(--paper);
  text-decoration:none;
  border-bottom:1px solid rgba(253,248,238,.18);
  transition:color .18s ease;
}

.toc a:hover,
.toc a:focus-visible{color:var(--yel)}

.totop{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  margin-top:14px;
  padding:0 14px;
  border-radius:999px;
  background:var(--yel);
  color:var(--ink);
  text-decoration:none;
  font-weight:700;
}

.body{
  background:#FFFFFF;
  border-radius:4px;
  padding:30px 30px 34px;
}

.body > div{
  padding-bottom:38px;
  margin-bottom:40px;
  border-bottom:2px dashed var(--line);
}

.body > div:last-child{
  border-bottom:0;
  margin-bottom:0;
  padding-bottom:4px;
}

.body h2{
  display:inline-block;
  margin:0 0 .7em;
  padding:.08em .45em;
  background:var(--yel);
  border-radius:4px;
  font-size:1.6rem;
}

.body h3{
  margin:1.5em 0 .5em;
  font-size:1.22rem;
  border-left:5px solid var(--red);
  padding-left:10px;
}

.body p{margin:0 0 1em}
.body ul,.body ol{margin:0 0 1.1em;padding-left:1.35em}
.body li{margin-bottom:.45em}
.body a{color:var(--red);text-decoration-thickness:2px;text-underline-offset:3px}

.body figure{margin:1.5em 0}
.body figure img{border-radius:4px;display:block}

.body dl{
  margin:0 0 1.2em;
  display:grid;
  gap:2px;
}

.body dt{font-weight:700}
.body dd{margin:0 0 .9em;color:#3B3F45}

.body blockquote{
  margin:1.4em 0;
  padding:12px 16px;
  background:var(--paper);
  border-left:6px solid var(--yel);
  border-radius:4px;
}

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

.body th,.body td{
  padding:8px 10px;
  border-bottom:2px solid var(--line);
  text-align:left;
}

.body th{background:var(--paper)}

/* 页脚 */
.foot{
  background:var(--ink);
  color:var(--paper);
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:18px 28px;
  padding:26px max(20px,5vw);
}

.foot-brand{
  display:flex;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
}

.flogo{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:40px;
  min-height:40px;
  padding:0 6px;
  background:var(--red);
  border-radius:4px;
  color:var(--paper);
  text-decoration:none;
  font-weight:700;
  overflow:hidden;
}

.flogo img{display:block;width:32px;height:32px;object-fit:contain}

.subform{display:flex}

.subform input{
  width:150px;
  min-height:40px;
  padding:0 12px;
  border:2px solid var(--yel);
  border-right:0;
  border-radius:4px 0 0 4px;
  background:transparent;
  color:var(--paper);
  font:inherit;
  font-size:.95rem;
}

.subform input::placeholder{color:#BEB6A6}

.subform button{
  min-height:40px;
  padding:0 16px;
  border:2px solid var(--yel);
  border-radius:0 4px 4px 0;
  background:var(--yel);
  color:var(--ink);
  font:inherit;
  font-weight:700;
  cursor:pointer;
  transition:background-color .18s ease,border-color .18s ease;
}

.subform button:hover{background:var(--red);border-color:var(--red);color:var(--paper)}

.foot-nav{
  display:flex;
  flex-wrap:wrap;
  gap:0 16px;
}

.foot-nav a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  color:var(--yel);
  text-decoration:none;
  transition:color .18s ease;
}

.foot-nav a:hover{text-decoration:underline}

.foot-meta p{
  margin:0;
  font-size:.95rem;
  color:#C7BFB0;
}

/* 滚动渐显 */
.reveal{opacity:0;transform:translateY(14px);transition:opacity .2s ease,transform .2s ease}
.reveal.in{opacity:1;transform:none}

/* 响应式 */
@media (max-width:860px){
  .hero{
    min-height:0;
    grid-template-columns:1fr;
    gap:30px;
    padding:36px 20px 46px;
  }

  .hero-copy{border-left-width:7px;padding-left:16px}

  .collage{min-height:0}

  .shard-a{height:180px;transform:translateY(-8px) rotate(-2deg)}
  .shard-b{height:200px;transform:translateY(12px) rotate(2deg)}

  .sheet{
    grid-template-columns:1fr;
    gap:24px;
    padding:34px 20px 48px;
  }

  .toc{position:static}

  .toc ol{grid-template-columns:1fr 1fr;gap:0 14px}

  .body{padding:22px 18px 26px}

  .body h2{font-size:1.38rem}

  .foot{padding:24px 20px;gap:16px}
  .subform input{width:130px}
}

@media (max-width:420px){
  .toc ol{grid-template-columns:1fr}
  .hero-copy h1{font-size:1.85rem}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .reveal,.reveal.in{opacity:1;transform:none;transition:none}
}

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