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

:root{
  --red:#FF4D3D;
  --ink:#1B1B2F;
  --cream:#F5F1E8;
  --muted:#4A4A5E;
  --line:rgba(27,27,47,.16);
  --display:'Lexend','Source Sans 3',system-ui,-apple-system,'PingFang SC','Microsoft YaHei',sans-serif;
  --text:'Source Sans 3',system-ui,-apple-system,'PingFang SC','Microsoft YaHei',sans-serif;
}

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

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

body{
  margin:0;
  background:var(--cream);
  color:var(--ink);
  font-family:var(--text);
  font-size:17px;
  line-height:1.75;
  -webkit-font-smoothing:antialiased;
}

img{max-width:100%;display:block}
a{color:inherit}
p{margin:0 0 18px}
ul,ol{margin:0;padding:0}

/* ---------- 顶部两行 ---------- */
.top{
  position:sticky;
  top:0;
  z-index:60;
  background:var(--ink);
  border-bottom:3px solid var(--red);
}

.brandrow{
  display:flex;
  align-items:center;
  padding:12px 20px 10px;
}

.brand{
  display:inline-flex;
  align-items:center;
  gap:12px;
  min-height:44px;
  text-decoration:none;
  color:var(--cream);
}

.brandname{
  font-family:var(--display);
  font-weight:700;
  font-size:22px;
  letter-spacing:.02em;
  line-height:1.2;
}

.mark{
  width:38px;
  height:38px;
  flex:none;
  display:grid;
  place-items:center;
  background:var(--red);
  color:var(--ink);
  border-radius:4px;
  font-family:var(--display);
  font-weight:700;
  font-size:17px;
  object-fit:cover;
}

.mark-dot::after{
  content:"";
  width:14px;
  height:14px;
  background:var(--cream);
  border-radius:2px;
}

.menu{padding:0 20px 12px}

.menu ol{
  list-style:none;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.menu .pill{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:8px 15px;
  border:2px solid rgba(245,241,232,.55);
  border-radius:999px;
  color:var(--cream);
  text-decoration:none;
  font-size:16px;
  line-height:1.2;
  transition:background-color .16s ease,color .16s ease,border-color .16s ease;
}

.menu .pill:hover,
.menu .pill:focus-visible{
  background:var(--red);
  border-color:var(--red);
  color:var(--ink);
}

/* ---------- 首屏 ---------- */
.hero{
  display:grid;
  grid-template-columns:1fr 1fr;
  align-items:center;
  min-height:100vh;
  background:var(--cream);
  overflow:hidden;
}

.hero-text{padding:56px 5vw 56px 6vw}

.hero h1{
  font-family:var(--display);
  font-weight:700;
  font-size:clamp(34px,4.6vw,62px);
  line-height:1.08;
  letter-spacing:-.01em;
  margin:0 0 24px;
  max-width:15ch;
  overflow-wrap:break-word;
}

.hero h1::after{
  content:"";
  display:block;
  width:84px;
  height:10px;
  margin-top:22px;
  background:var(--red);
}

.lede{
  font-size:18px;
  line-height:1.7;
  color:var(--muted);
  max-width:34ch;
  margin:0;
}

.hero-art{
  position:relative;
  align-self:stretch;
  min-height:320px;
  background:var(--red);
  clip-path:polygon(14% 0,100% 0,100% 100%,0 100%);
  display:grid;
  place-items:center;
  overflow:hidden;
}

.hero-img{
  width:100%;
  height:100%;
  object-fit:cover;
  will-change:transform;
}

.hero-plate{
  width:56%;
  aspect-ratio:1/1;
  background:var(--ink);
  border:8px solid var(--cream);
  border-radius:4px;
}

/* ---------- 主体骨架 ---------- */
.shell{
  display:grid;
  grid-template-columns:240px minmax(0,1fr);
  border-top:3px solid var(--ink);
}

.rail{
  position:sticky;
  top:112px;
  align-self:start;
  background:var(--ink);
  color:var(--cream);
  padding:28px 18px 34px;
  border-right:3px solid var(--red);
}

.rail-title{
  font-family:var(--display);
  font-weight:600;
  font-size:15px;
  letter-spacing:.24em;
  color:var(--red);
  margin:0 0 14px;
}

.rail-title span{border-bottom:2px solid var(--red);padding-bottom:4px}

.rail-list{
  list-style:none;
  counter-reset:rail;
  display:flex;
  flex-direction:column;
}

.rail-list li{counter-increment:rail}

.rail-list a{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:40px;
  padding:7px 2px;
  font-size:16px;
  line-height:1.35;
  color:var(--cream);
  text-decoration:none;
  border-bottom:1px solid rgba(245,241,232,.16);
  transition:color .16s ease;
}

.rail-list a::before{
  content:counter(rail,decimal-leading-zero);
  font-family:var(--display);
  font-size:12px;
  font-weight:600;
  color:var(--red);
  flex:none;
}

.rail-list a:hover,
.rail-list a:focus-visible{color:var(--red)}

main{min-width:0;background:var(--cream)}
.wrap{padding:0}

.doc{padding:52px 5vw 76px}

/* ---------- 正文 ---------- */
.prose{
  max-width:70ch;
  overflow-wrap:break-word;
}

.prose section{
  margin-top:44px;
  padding-top:38px;
  border-top:2px solid var(--line);
  scroll-margin-top:132px;
}

.prose section:first-of-type{
  margin-top:0;
  padding-top:0;
  border-top:0;
}

.prose h2{
  display:flex;
  align-items:baseline;
  gap:12px;
  font-family:var(--display);
  font-weight:700;
  font-size:clamp(24px,2.8vw,33px);
  line-height:1.24;
  margin:0 0 18px;
}

.prose h2::before{
  content:"";
  flex:none;
  width:13px;
  height:13px;
  border-radius:2px;
  background:var(--red);
  transform:translateY(-4px);
}

.prose h2 span{display:inline}

.prose h3{
  display:flex;
  align-items:baseline;
  gap:10px;
  font-family:var(--display);
  font-weight:600;
  font-size:20px;
  line-height:1.35;
  margin:30px 0 12px;
}

.prose h3::before{
  content:"";
  flex:none;
  width:8px;
  height:8px;
  background:var(--ink);
  border-radius:50%;
  transform:translateY(-3px);
}

.prose p{font-size:17px;line-height:1.8;margin:0 0 18px}

.prose ul,
.prose ol{
  padding-left:24px;
  margin:0 0 18px;
}

.prose li{margin-bottom:9px;line-height:1.75}

.prose a{
  color:var(--ink);
  text-decoration:underline;
  text-decoration-color:var(--red);
  text-decoration-thickness:2px;
  text-underline-offset:3px;
}

.prose a:hover{background:rgba(255,77,61,.14)}

.prose strong{font-weight:700}

.prose blockquote{
  margin:0 0 18px;
  padding:6px 0 6px 18px;
  border-left:6px solid var(--red);
  color:var(--muted);
}

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

.prose img{
  width:auto;
  height:auto;
  margin:0 0 18px;
  border:2px solid var(--ink);
  border-radius:4px;
}

.prose figure{margin:0 0 20px}
.prose figcaption{font-size:15px;color:var(--muted);margin-top:-10px}

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

.prose th,
.prose td{
  border:2px solid var(--line);
  padding:9px 12px;
  text-align:left;
}

.prose th{background:var(--ink);color:var(--cream);font-weight:600}

.prose code{
  font-family:ui-monospace,'SFMono-Regular',Menlo,monospace;
  font-size:.92em;
  background:rgba(27,27,47,.08);
  padding:1px 5px;
  border-radius:3px;
}

.prose hr{border:0;border-top:2px solid var(--line);margin:30px 0}

/* ---------- 页脚 ---------- */
.foot{
  display:grid;
  grid-template-columns:1.15fr 1fr;
  background:var(--ink);
  color:var(--cream);
  border-top:4px solid var(--red);
}

.foot section{padding:40px 5vw 34px}

.foot-brand{border-right:2px solid rgba(245,241,232,.14)}

.foot h3{
  font-family:var(--display);
  font-weight:700;
  font-size:24px;
  line-height:1.3;
  margin:0 0 16px;
}

.foot h3 span{
  display:inline-block;
  border-bottom:3px solid var(--red);
  padding-bottom:5px;
}

.foot-mark{display:flex;align-items:center}

.foot .mark{width:44px;height:44px}

.foot ul{
  list-style:none;
  display:flex;
  flex-wrap:wrap;
  gap:4px 20px;
}

.foot a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  color:var(--cream);
  text-decoration:none;
  font-size:16px;
  border-bottom:2px solid transparent;
  transition:color .16s ease,border-color .16s ease;
}

.foot a:hover,
.foot a:focus-visible{color:var(--red);border-color:var(--red)}

.bar{
  grid-column:1/-1;
  border-top:1px solid rgba(245,241,232,.16);
  padding:15px 5vw 20px;
  font-size:15px;
  color:rgba(245,241,232,.75);
}

.bar p{margin:0}

/* ---------- 动效 ---------- */
.js-stagger .prose section{
  opacity:0;
  transform:translateY(16px);
  transition:opacity .34s ease,transform .34s ease;
}

.js-stagger .prose section.in{opacity:1;transform:none}

/* ---------- 断点 ---------- */
@media (max-width:900px){
  .top{position:static}

  .hero{
    grid-template-columns:1fr;
    min-height:0;
  }

  .hero-text{padding:40px 22px 30px}

  .hero h1{max-width:22ch;font-size:clamp(30px,8.4vw,44px)}

  .hero h1::after{width:64px;height:8px;margin-top:18px}

  .lede{font-size:17px;max-width:none}

  .hero-art{
    min-height:0;
    height:230px;
    clip-path:polygon(0 18%,100% 0,100% 100%,0 100%);
  }

  .hero-plate{width:130px}

  .shell{display:flex;flex-direction:column}

  main{order:1;width:100%}

  .rail{
    order:2;
    position:static;
    width:100%;
    border-right:0;
    border-top:3px solid var(--red);
    padding:26px 22px 32px;
  }

  .rail-list{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:0 14px;
  }

  .doc{padding:36px 22px 58px}

  .prose section{scroll-margin-top:20px}

  .prose h2{font-size:clamp(23px,6.4vw,29px)}

  .foot{grid-template-columns:1fr}

  .foot-brand{
    border-right:0;
    border-bottom:2px solid rgba(245,241,232,.14);
  }

  .foot section{padding:32px 22px}
  .bar{padding:14px 22px 22px}
}

@media (max-width:420px){
  body{font-size:16px}
  .brandname{font-size:20px}
  .menu .pill{font-size:16px;padding:8px 13px}
  .rail-list{grid-template-columns:1fr}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}

  *,
  *::before,
  *::after{
    transition-duration:.01ms !important;
    animation-duration:.01ms !important;
  }

  .js-stagger .prose section{opacity:1;transform:none}
}

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