:root{
  --paper:#F4EDE0;
  --ink:#241F1A;
  --flame:#DE5F35;
  --paper-2:#EDE3D2;
  --paper-3:#E5D9C4;
  --rail-h:58px;
  --edge:clamp(14px,4vw,34px);
}

*{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',"PingFang SC","Hiragino Sans GB","Microsoft YaHei",system-ui,-apple-system,sans-serif;
  font-size:17px;
  line-height:1.72;
  letter-spacing:.01em;
  overflow-x:hidden;
}

body::before{
  content:"";
  position:fixed;
  inset:-12% -12% 0 -12%;
  z-index:-2;
  pointer-events:none;
  will-change:transform;
  background:
    radial-gradient(58% 46% at 84% 6%, rgba(222,95,53,.17), rgba(222,95,53,0) 70%),
    radial-gradient(52% 42% at 6% 88%, rgba(36,31,26,.10), rgba(36,31,26,0) 72%);
}

body::after{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  pointer-events:none;
  opacity:.55;
  background-image:
    repeating-linear-gradient(0deg, rgba(36,31,26,.055) 0 1px, rgba(0,0,0,0) 1px 33px);
}

img{max-width:100%;height:auto;display:block}
menu{margin:0;padding:0;list-style:none}
ol,ul{padding-left:1.2em}

a{color:var(--ink);text-decoration:none}
a:focus-visible,
summary:focus-visible{
  outline:3px solid var(--flame);
  outline-offset:2px;
}

/* ---------- 顶栏 ---------- */
.top{
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px var(--edge);
  border-bottom:2px solid var(--ink);
  background:var(--paper);
  position:relative;
  z-index:8;
}

.mark{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:2px 4px;
  flex:0 0 auto;
}

.mark-img{
  width:44px;height:44px;
  border:2px solid var(--ink);
  border-radius:10px;
  object-fit:cover;
  background:var(--paper-2);
}

.mark-t{
  font-size:21px;
  font-weight:700;
  letter-spacing:.06em;
  border-bottom:2px solid var(--flame);
  padding-bottom:1px;
}

.menus{
  display:flex;
  gap:8px;
  margin-left:6px;
}

.grp{position:relative}

.grp-t{
  list-style:none;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:44px;
  padding:8px 14px;
  font-size:16px;
  font-weight:700;
  color:var(--ink);
  background:var(--paper);
  border:2px solid var(--ink);
  border-radius:10px;
  user-select:none;
}

.grp-t::-webkit-details-marker{display:none}
.grp-t::marker{content:""}

.grp-t::after{
  content:"＋";
  font-size:14px;
  line-height:1;
  color:var(--flame);
}

.grp[open] > .grp-t{
  background:var(--ink);
  color:var(--paper);
}

.grp[open] > .grp-t::after{color:var(--paper)}

.grp-m{
  position:absolute;
  top:calc(100% + 8px);
  left:0;
  z-index:20;
  min-width:186px;
  padding:8px;
  background:var(--paper);
  border:2px solid var(--ink);
  border-radius:10px;
}

.grp-m li + li{margin-top:2px}

.grp-m a{
  display:flex;
  align-items:center;
  min-height:44px;
  padding:6px 12px;
  font-size:16px;
  border-radius:8px;
  border-bottom:1px dashed rgba(36,31,26,.3);
}

.grp-m li:last-child a{border-bottom:0}

.grp-m a:hover{
  background:var(--flame);
  color:#fff;
  border-bottom-color:transparent;
}

.top-cta{
  margin-left:auto;
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:9px 20px;
  font-size:16px;
  font-weight:700;
  color:#fff;
  background:var(--flame);
  border:2px solid var(--ink);
  border-radius:10px;
  transform:rotate(-1.2deg);
  transition:transform .18s ease, background .18s ease;
}

.top-cta:hover{
  background:var(--ink);
  transform:rotate(1.2deg) translateY(-1px);
}

/* ---------- 锚点条 ---------- */
.rail{
  position:sticky;
  top:0;
  z-index:9;
  display:flex;
  gap:6px;
  padding:8px var(--edge);
  overflow-x:auto;
  scrollbar-width:none;
  background:var(--paper);
  border-bottom:2px solid var(--ink);
  -webkit-overflow-scrolling:touch;
}

.rail::-webkit-scrollbar{display:none}

.rail a{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  min-height:42px;
  padding:7px 15px;
  font-size:16px;
  border:2px solid var(--ink);
  border-radius:999px;
  background:var(--paper);
  transition:background .16s ease, color .16s ease, border-color .16s ease;
}

.rail a:hover,
.rail a.on{
  background:var(--flame);
  border-color:var(--flame);
  color:#fff;
}

/* ---------- 容器 ---------- */
.wrap{
  max-width:1180px;
  margin:0 auto;
  padding:0 var(--edge);
}

/* ---------- 首屏 ---------- */
.hero{
  display:grid;
  grid-template-columns:1.02fr .98fr;
  align-items:center;
  gap:clamp(18px,4vw,54px);
  min-height:100vh;
  padding:clamp(22px,5vh,64px) 0;
  border-bottom:2px solid var(--ink);
}

.hero-art{
  position:relative;
  overflow:hidden;
  border:2px solid var(--ink);
  border-radius:10px;
  background:linear-gradient(158deg, var(--paper-2), var(--paper-3));
  aspect-ratio:4 / 5;
  display:grid;
  place-items:center;
  isolation:isolate;
}

.hero-art > .hero-img{
  width:100%;
  height:100%;
  object-fit:cover;
  transform:scale(1.06);
  will-change:transform;
}

.badge{
  position:absolute;
  top:14px;
  left:14px;
  z-index:2;
  padding:6px 14px;
  font-size:16px;
  font-weight:700;
  color:#fff;
  background:var(--flame);
  border:2px solid var(--ink);
  border-radius:999px;
  transform:rotate(-3deg);
}

.hero-copy{
  text-align:center;
  padding:0 4px;
}

.hero-copy h1{
  margin:.1em 0 .35em;
  font-size:clamp(30px,5.4vw,58px);
  line-height:1.18;
  letter-spacing:.02em;
}

.lede{
  margin:0 auto;
  max-width:34ch;
  font-size:17px;
  color:#4a423a;
}

/* ---------- 正文区 ---------- */
.story{
  display:grid;
  grid-template-columns:224px minmax(0,1fr);
  align-items:start;
  gap:clamp(18px,3vw,42px);
  padding:clamp(24px,5vw,58px) 0;
}

.side{
  position:sticky;
  top:calc(var(--rail-h) + 14px);
  border:2px solid var(--ink);
  border-radius:10px;
  padding:14px 14px 16px;
  background:var(--paper-2);
}

.side-t{
  margin:0;
  font-size:19px;
  letter-spacing:.08em;
}

.side hr{
  margin:8px 0 12px;
  width:46px;
}

.toc{
  margin:0;
  padding:0;
  list-style:none;
  counter-reset:none;
}

.toc li + li{margin-top:2px}

.toc a{
  display:flex;
  align-items:center;
  gap:8px;
  min-height:40px;
  padding:4px 6px;
  font-size:16px;
  border-radius:8px;
  border-bottom:1px dashed rgba(36,31,26,.28);
  transition:background .15s ease, padding-left .15s ease;
}

.toc li:last-child a{border-bottom:0}

.toc a:hover{
  background:var(--paper);
  padding-left:11px;
}

.num{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:24px;
  height:24px;
  font-size:14px;
  font-weight:700;
  color:#fff;
  background:var(--flame);
  border-radius:50%;
}

.side-kw{
  margin:14px 0 0;
  padding-top:12px;
  border-top:2px dashed rgba(36,31,26,.3);
  font-size:15px;
  color:#6b6055;
  text-align:center;
}

.prose{
  max-width:74ch;
  min-width:0;
}

.prose article{
  padding:clamp(20px,4vw,46px) 0;
  border-bottom:2px dashed rgba(36,31,26,.3);
  scroll-margin-top:calc(var(--rail-h) + 18px);
}

.prose article:first-child{padding-top:0}
.prose article:last-child{border-bottom:0;padding-bottom:0}

.prose h2{
  margin:0 0 .2em;
  font-size:clamp(23px,3vw,33px);
  line-height:1.28;
  letter-spacing:.02em;
}

.prose h3{
  margin:1.1em 0 .3em;
  font-size:clamp(19px,2.2vw,22px);
  line-height:1.35;
}

.prose p{margin:0 0 1em}
.prose ul,.prose ol{margin:0 0 1em}

.prose li{margin:.22em 0}

.prose a{
  color:var(--flame);
  border-bottom:2px solid rgba(222,95,53,.45);
  font-weight:700;
}

.prose a:hover{border-bottom-color:var(--flame)}

.prose img{
  margin:1em 0;
  border:2px solid var(--ink);
  border-radius:10px;
}

.prose blockquote{
  margin:1.1em 0;
  padding:12px 16px;
  border-left:6px solid var(--flame);
  border-radius:0 10px 10px 0;
  background:var(--paper-2);
}

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

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

.prose th,.prose td{
  border:2px solid var(--ink);
  padding:8px 10px;
  text-align:left;
  vertical-align:top;
}

.prose code{
  padding:1px 5px;
  background:var(--paper-2);
  border-radius:6px;
  font-size:.94em;
}

hr{
  border:0;
  border-top:2px solid var(--ink);
  width:64px;
  margin:10px 0 18px;
}

/* ---------- 页脚 ---------- */
.foot{
  border-top:2px solid var(--ink);
  background:var(--paper-2);
  padding:clamp(26px,5vw,58px) var(--edge) 22px;
  text-align:center;
}

.foot-cta{
  display:flex;
  flex-direction:column;
  align-items:center;
}

.foot-t{
  margin:0;
  font-size:clamp(24px,4vw,38px);
  letter-spacing:.06em;
}

.foot-cta hr{width:88px;margin:12px 0 20px}

.foot-go{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:58px;
  width:min(430px,100%);
  padding:12px 26px;
  font-size:20px;
  font-weight:700;
  color:#fff;
  background:var(--flame);
  border:2px solid var(--ink);
  border-radius:10px;
  transition:transform .18s ease, background .18s ease;
}

.foot-go:hover{
  background:var(--ink);
  transform:translateY(-2px);
}

.foot-note{
  margin-top:24px;
  padding-top:16px;
  border-top:2px dashed rgba(36,31,26,.3);
}

.foot-kw{
  margin:0;
  font-size:15px;
  letter-spacing:.14em;
  color:#6b6055;
}

.foot-legal p{
  margin:6px 0 0;
  font-size:15px;
  color:#6b6055;
}

/* ---------- 动效 ---------- */
.rv{
  opacity:0;
  transform:translateY(20px);
  transition:opacity .6s ease, transform .6s ease;
}

.rv.in{
  opacity:1;
  transform:none;
}

/* ---------- 窄屏 ---------- */
@media (max-width:900px){
  .story{
    grid-template-columns:minmax(0,1fr);
    gap:20px;
  }
  .side{position:static}
  .prose{max-width:none}
  .hero{
    grid-template-columns:minmax(0,1fr);
    min-height:0;
    padding-top:18px;
    gap:20px;
  }
  .hero-copy{order:-1}
  .hero-art{aspect-ratio:16 / 11}
}

@media (max-width:700px){
  .top{
    display:grid;
    grid-template-columns:1fr auto;
    gap:10px;
    align-items:center;
  }
  .mark{grid-column:1;grid-row:1}
  .top-cta{grid-column:2;grid-row:1;margin-left:0;transform:none}
  .menus{grid-column:1 / -1;grid-row:2;margin-left:0;display:flex;gap:8px}
  .grp{flex:1 1 0;position:static}
  .grp-t{width:100%;justify-content:center}
  .grp-m{
    position:static;
    margin-top:8px;
    min-width:0;
    width:100%;
  }
  .rail{padding:8px var(--edge)}
  .toc{columns:2;column-gap:12px}
  .toc li + li{margin-top:0}
  .toc a{border-bottom:1px dashed rgba(36,31,26,.28)}
}

@media (max-width:420px){
  body{font-size:16px}
  .toc{columns:1}
  .badge{font-size:15px;padding:5px 11px}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .rv{opacity:1;transform:none;transition:none}
  *{animation-duration:.001ms !important;transition-duration:.001ms !important}
  .hero-art > .hero-img{transform:none !important}
}

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