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

:root{
  --red:#FF4B5C;
  --ink:#111827;
  --cream:#F5F1E8;
  --paper:#FFFDF7;
  --line:2px solid #111827;
  --r:28px;
  --pad:clamp(16px,4vw,40px);
  --head:188px;
}

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

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

body{
  margin:0;
  overflow-x:hidden;
  background:var(--cream);
  color:var(--ink);
  font-family:'Work Sans',system-ui,-apple-system,'PingFang SC','Hiragino Sans GB','Microsoft YaHei',sans-serif;
  font-size:17px;
  line-height:1.7;
  letter-spacing:.005em;
}

img{display:block;max-width:100%}
a{color:inherit}
p{margin:0 0 1em}

h1,h2,h3{
  font-family:'Outfit','Work Sans',system-ui,sans-serif;
  line-height:1.14;
  letter-spacing:-.022em;
  margin:0 0 .5em;
}

/* ---------- 顶部两行：品牌行 + 菜单行 ---------- */

.top{
  position:sticky;
  top:0;
  z-index:60;
  background:var(--cream);
  border-bottom:3px solid var(--ink);
  padding:10px var(--pad) 0;
}

.brand-row{
  border-bottom:2px solid rgba(17,24,39,.16);
  padding-bottom:8px;
}

.brand{
  display:inline-flex;
  align-items:center;
  gap:12px;
  min-height:44px;
  padding:4px 0;
  text-decoration:none;
  font-family:'Outfit',sans-serif;
  font-weight:700;
  font-size:1.12rem;
  letter-spacing:-.01em;
}

.brand-mark{
  width:40px;
  height:40px;
  flex:0 0 auto;
  display:grid;
  place-items:center;
  border:var(--line);
  border-radius:13px;
  background:var(--red);
  color:var(--cream);
  font-weight:700;
  font-size:1.05rem;
  object-fit:cover;
}

.menu{
  display:flex;
  flex-wrap:wrap;
  gap:4px;
  padding:8px 0 10px;
}

.menu a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:8px 12px;
  font-size:1rem;
  font-weight:500;
  text-decoration:none;
  border:2px solid transparent;
  border-radius:999px;
  transition:background-color .18s ease,color .18s ease,border-color .18s ease;
}

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

/* ---------- 主舞台 ---------- */

.stage{
  max-width:1240px;
  margin:0 auto;
  padding:0 var(--pad) 56px;
  display:grid;
  grid-template-columns:minmax(0,1fr) 296px;
  gap:26px;
  align-items:start;
}

.stage > section{grid-column:1}

/* ---------- 首屏 ---------- */

.hero{
  grid-column:1 / -1;
  display:grid;
  grid-template-columns:1.05fr 1fr;
  align-items:center;
  gap:clamp(20px,4vw,52px);
  min-height:100vh;
  padding:clamp(18px,3.4vw,44px) 0 clamp(24px,3.4vw,48px);
}

.hero-fig{
  margin:0;
  height:clamp(280px,60vh,540px);
  border:3px solid var(--ink);
  border-radius:var(--r);
  overflow:hidden;
  background:var(--red);
}

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

.hero-txt{text-align:right}

.hero h1{
  font-size:clamp(2.15rem,6vw,4.5rem);
  font-weight:700;
  margin-bottom:.34em;
  text-wrap:balance;
}

.lede{
  margin:0 0 0 auto;
  max-width:34ch;
  font-size:clamp(1rem,1.6vw,1.18rem);
  color:#3a3f4d;
}

/* ---------- 正文区（页面内容直接子块） ---------- */

.stage > section[id]{
  background:var(--paper);
  border:var(--line);
  border-radius:var(--r);
  padding:clamp(20px,3.4vw,40px);
  margin-bottom:26px;
  scroll-margin-top:var(--head);
}

.stage > section[id]:last-of-type{margin-bottom:0}

.stage > section[id] > *:first-child{margin-top:0}
.stage > section[id] > *:last-child{margin-bottom:0}

.stage > section[id] h2{
  font-size:clamp(1.4rem,2.6vw,2rem);
  margin:0 0 .7em;
}

.stage > section[id] h3{
  font-size:clamp(1.15rem,1.9vw,1.4rem);
  margin:1.5em 0 .6em;
}

.stage > section[id] h2 span,
.stage > section[id] h3 span{
  display:inline-block;
  border-bottom:4px solid var(--red);
  padding-bottom:3px;
}

.stage > section[id] ul,
.stage > section[id] ol{
  padding-left:1.25em;
  margin:0 0 1em;
}

.stage > section[id] li{margin-bottom:.42em}

.stage > section[id] a{
  text-decoration:none;
  font-weight:500;
  border-bottom:2px solid var(--red);
  transition:background-color .16s ease,color .16s ease;
}

.stage > section[id] a:hover,
.stage > section[id] a:focus-visible{
  background:var(--red);
  color:var(--cream);
}

.stage > section[id] strong{font-weight:700}

.stage > section[id] blockquote{
  margin:1.2em 0;
  padding:14px 18px;
  background:var(--cream);
  border-left:7px solid var(--red);
  border-radius:0 16px 16px 0;
}

.stage > section[id] blockquote p:last-child{margin-bottom:0}

.stage > section[id] table{
  width:100%;
  border-collapse:collapse;
  margin:1.1em 0;
  font-size:1rem;
}

.stage > section[id] th,
.stage > section[id] td{
  border:2px solid var(--ink);
  padding:8px 10px;
  text-align:left;
  vertical-align:top;
}

.stage > section[id] th{background:var(--cream)}

.stage > section[id] img{
  border:var(--line);
  border-radius:18px;
  margin:1em 0;
  height:auto;
}

.stage > section[id] code{
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  background:var(--cream);
  border-radius:6px;
  padding:1px 5px;
  font-size:.95em;
}

/* ---------- 右侧栏 ---------- */

.rail{
  grid-column:2;
  grid-row:2 / span 9;
  position:sticky;
  top:calc(var(--head) + 12px);
  align-self:start;
  background:var(--red);
  color:var(--cream);
  border:var(--line);
  border-radius:var(--r);
  padding:20px 16px 18px;
}

.rail-title{
  font-size:1.02rem;
  letter-spacing:.16em;
  margin:0 0 12px;
}

.rail-title span{
  display:inline-block;
  padding-bottom:4px;
  border-bottom:3px solid var(--ink);
}

.rail-nav{display:flex;flex-direction:column;gap:2px}

.rail-nav a{
  display:flex;
  align-items:center;
  min-height:40px;
  padding:6px 10px;
  font-size:1rem;
  text-decoration:none;
  border:2px solid transparent;
  border-radius:14px;
  transition:background-color .16s ease,color .16s ease;
}

.rail-nav a:hover,
.rail-nav a:focus-visible{
  background:var(--cream);
  color:var(--ink);
}

/* ---------- 页脚 ---------- */

.foot{
  margin-top:8px;
  background:var(--ink);
  color:var(--cream);
  border-top:4px solid var(--red);
  padding:clamp(24px,4vw,48px) var(--pad) 22px;
}

.foot-cta{max-width:1240px;margin:0 auto}

.foot-title{
  font-size:clamp(1.6rem,4.2vw,2.7rem);
  margin:0 0 22px;
}

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

.foot-cols{
  display:flex;
  flex-wrap:wrap;
  gap:26px;
  padding-top:20px;
  border-top:2px solid rgba(245,241,232,.24);
}

.foot-cols > *{flex:1 1 170px;min-width:0}

.foot-cols dl{margin:0}

.foot-cols dt{
  font-family:'Outfit',sans-serif;
  font-size:1rem;
  font-weight:700;
  letter-spacing:.16em;
  color:var(--red);
  margin-bottom:8px;
}

.foot-cols dd{margin:0}

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

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

.copy{
  max-width:1240px;
  margin:22px auto 0;
  padding-top:14px;
  border-top:2px solid rgba(245,241,232,.16);
  font-size:1rem;
  color:rgba(245,241,232,.72);
}

/* ---------- 焦点可见性 ---------- */

a:focus-visible{outline:3px solid var(--ink);outline-offset:2px}

/* ---------- 断点 ---------- */

@media (max-width:1000px){
  .stage{display:block}
  .hero{
    grid-template-columns:1fr;
    min-height:0;
    padding-top:18px;
  }
  .hero-txt{order:-1;text-align:left}
  .lede{margin:0;max-width:none}
  .hero-fig{height:clamp(220px,44vh,340px)}
  .rail{position:static;margin:6px 0 26px}
  .rail-nav{flex-direction:row;flex-wrap:wrap;gap:4px}
  .rail-nav a{border-color:rgba(245,241,232,.45);border-radius:999px;padding:6px 12px}
  .stage > section[id]{scroll-margin-top:210px}
}

@media (max-width:600px){
  body{font-size:16px}
  .brand{font-size:1rem}
  .menu a{padding:7px 10px;font-size:.98rem;min-height:40px}
  .hero h1{font-size:clamp(1.95rem,8vw,2.6rem)}
  .foot-cols{gap:18px}
  .foot-cols > *{flex:1 1 130px}
}

@media (max-width:380px){
  .menu a{padding:6px 8px;font-size:.94rem}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *{
    transition-duration:.01ms !important;
    animation-duration:.01ms !important;
  }
  .hero-fig img{transform:none !important}
}

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