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

:root{
  --ink:#0B0B0C;
  --cream:#F4F1E8;
  --red:#FF3C2F;
  --panel:#111114;
  --mute:rgba(244,241,232,.6);
  --hair:rgba(244,241,232,.2);
  --head:118px;
}

*{box-sizing:border-box}

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

body{
  margin:0;
  background:var(--ink);
  color:var(--cream);
  font-family:"Space Mono",ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:17px;
  line-height:1.72;
  letter-spacing:.01em;
  overflow-x:hidden;
}

img{display:block;max-width:100%}
a{color:var(--cream);text-decoration:none}
a:hover{color:var(--red)}
h1,h2,h3{line-height:1.14;letter-spacing:-.015em;margin:0 0 .5em}
:focus-visible{outline:3px solid var(--red);outline-offset:3px}

main [id]{scroll-margin-top:calc(var(--head) + 12px)}

/* ---------- 顶部：品牌行 + 菜单行 ---------- */
.top{
  position:sticky;
  top:0;
  z-index:40;
  background:var(--ink);
  border-bottom:2px solid var(--red);
}

.brandrow{
  padding:10px clamp(14px,4vw,44px);
  border-bottom:2px solid var(--hair);
}

.brand{
  display:inline-flex;
  align-items:center;
  gap:11px;
  min-height:46px;
  padding:2px 0;
  font-size:clamp(20px,4.8vw,27px);
  font-weight:700;
  letter-spacing:-.035em;
}

.brand-mark{width:20px;height:20px}
.brand-dot{display:block;width:15px;height:15px;background:var(--red);flex:none}

.menubar{
  display:flex;
  justify-content:flex-end;
  padding:6px clamp(14px,4vw,44px);
}

.burger{
  display:inline-flex;
  align-items:center;
  gap:11px;
  min-height:44px;
  padding:9px 15px;
  background:transparent;
  color:var(--cream);
  border:2px solid var(--cream);
  border-radius:4px;
  font:inherit;
  font-size:15px;
  letter-spacing:.1em;
  cursor:pointer;
  transition:background-color .16s ease,color .16s ease,border-color .16s ease;
}

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

.bars{position:relative;display:block;width:18px;height:2px;background:currentColor}
.bars::before,.bars::after{content:"";position:absolute;left:0;width:18px;height:2px;background:currentColor}
.bars::before{top:-6px}
.bars::after{top:6px}

.x{position:relative;display:block;width:16px;height:16px}
.x::before,.x::after{content:"";position:absolute;top:7px;left:0;width:16px;height:2px;background:currentColor}
.x::before{transform:rotate(45deg)}
.x::after{transform:rotate(-45deg)}

/* ---------- 全屏遮罩菜单 ---------- */
.sheet{
  position:fixed;
  inset:0;
  z-index:60;
  display:flex;
  flex-direction:column;
  padding:16px clamp(16px,5vw,56px) 40px;
  background:var(--ink);
  overflow-y:auto;
}

.sheet[hidden]{display:none}

.sheet-top{display:flex;justify-content:flex-end;padding-top:4px}

.sheet ol{
  list-style:none;
  margin:clamp(14px,5vh,56px) 0 0;
  padding:0;
}

.sheet a{
  display:flex;
  align-items:center;
  gap:16px;
  min-height:56px;
  padding:12px 2px;
  border-bottom:2px solid var(--hair);
  font-size:clamp(18px,5vw,26px);
  font-weight:700;
  letter-spacing:-.02em;
  transition:color .16s ease,border-color .16s ease;
}

.sheet a:hover,.sheet a:focus-visible{color:var(--red);border-bottom-color:var(--red)}
.sheet a .n{color:var(--red);font-size:13px;letter-spacing:.1em;flex:none}

/* ---------- 首屏 ---------- */
.hero{
  background:var(--cream);
  color:var(--ink);
  min-height:calc(100svh - var(--head));
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  padding:clamp(18px,4vw,52px) clamp(16px,5vw,64px) 0;
  overflow:hidden;
}

.hero-top{text-align:right;padding-top:clamp(8px,3vw,32px)}

.hero h1{
  margin:0 0 0 auto;
  max-width:22ch;
  font-size:clamp(29px,7.3vw,74px);
  letter-spacing:-.03em;
}

.band{
  height:16px;
  margin-top:clamp(16px,4vw,44px);
  background:var(--red);
  clip-path:polygon(0 100%,100% 0,100% 100%);
}

.hero-media{line-height:0}

.hero-media:empty{
  min-height:32vh;
  background:var(--red);
  margin:0 calc(-1 * clamp(16px,5vw,64px));
}

.hero-img{
  width:100%;
  height:min(44vh,400px);
  object-fit:cover;
  border-radius:18px 18px 0 0;
}

/* ---------- 主体：左索引 + 右正文 ---------- */
.wrap{
  display:grid;
  grid-template-columns:1fr;
  gap:clamp(22px,4vw,46px);
  max-width:1180px;
  margin:0 auto;
  padding:clamp(28px,6vw,72px) clamp(16px,5vw,48px);
}

@media (min-width:900px){
  .wrap{grid-template-columns:236px minmax(0,1fr);align-items:start}
}

.rail{
  border:2px solid var(--hair);
  border-radius:18px;
  background:var(--panel);
  padding:14px 12px 10px;
}

@media (min-width:900px){
  .rail{position:sticky;top:calc(var(--head) + 16px)}
}

.rail-k{
  margin:0 0 8px;
  padding-left:4px;
  color:var(--red);
  font-size:12px;
  letter-spacing:.28em;
}

.rail ol{list-style:none;margin:0;padding:0}

.rail a{
  display:flex;
  align-items:center;
  gap:9px;
  min-height:42px;
  padding:5px 4px;
  font-size:14px;
  line-height:1.35;
  border-bottom:2px solid transparent;
  transition:border-color .16s ease,color .16s ease;
}

.rail a:hover,.rail a:focus-visible{border-bottom-color:var(--red)}
.rail a b{color:var(--red);font-size:12px;flex:none}

/* ---------- 正文 ---------- */
.doc-sec{min-width:0}
.doc{max-width:70ch}

.doc-head{
  margin:0 0 30px;
  padding-bottom:16px;
  border-bottom:2px solid var(--red);
}

.doc-head h2{font-size:clamp(22px,4.4vw,34px);margin:0 0 10px}
.subtitle{margin:0;color:var(--mute);font-size:15px;line-height:1.65}

section h2{
  margin:0 0 .7em;
  padding-bottom:.35em;
  font-size:clamp(21px,4vw,30px);
  border-bottom:2px solid var(--hair);
}

section h3{font-size:18px;color:var(--red)}
section p{margin:0 0 1.1em}
section ul,section ol{margin:0 0 1.2em;padding-left:1.25em}
section li{margin-bottom:.45em}
section blockquote{
  margin:0 0 1.2em;
  padding:2px 0 2px 16px;
  border-left:4px solid var(--red);
  color:var(--mute);
}
section a{border-bottom:2px solid var(--red)}

section article{
  margin-top:clamp(26px,5vw,50px);
  padding-top:clamp(26px,5vw,50px);
  border-top:2px dashed var(--hair);
}

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

/* ---------- 页脚 ---------- */
.foot{
  max-width:1180px;
  margin:0 auto;
  padding:clamp(26px,5vw,60px) clamp(16px,5vw,48px) 26px;
  border-top:2px solid var(--red);
}

.foot-mark{
  margin:0 0 clamp(20px,4vw,36px);
  font-size:clamp(28px,8.6vw,78px);
  font-weight:700;
  line-height:.96;
  letter-spacing:-.045em;
}

.foot-grid{
  display:grid;
  gap:22px;
  padding-top:20px;
  border-top:2px solid var(--hair);
}

@media (min-width:760px){
  .foot-grid{grid-template-columns:minmax(0,1fr) minmax(0,1.5fr) minmax(0,1fr)}
}

.foot-addr{
  display:grid;
  gap:2px;
  font-style:normal;
  font-size:14px;
  color:var(--mute);
  word-break:break-all;
}

.foot-addr .k{color:var(--red);font-size:11px;letter-spacing:.24em}

.foot-nav dl{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  gap:0 10px;
  margin:0;
  font-size:14px;
}

.foot-nav dt{color:var(--red);font-size:11px;padding-top:13px}
.foot-nav dd{margin:0}

.foot-nav a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:2px 0;
}

.foot-links{
  display:flex;
  flex-wrap:wrap;
  gap:0 20px;
  list-style:none;
  margin:0;
  padding:0;
}

.foot-links a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  font-size:14px;
}

.copy{margin:24px 0 0;color:var(--mute);font-size:13px;letter-spacing:.06em}

/* ---------- 入场 ---------- */
.reveal-ready .rv{opacity:0;transform:translateY(12px)}

.reveal-ready .rv.on{
  opacity:1;
  transform:none;
  transition:opacity .45s ease,transform .45s ease;
  transition-delay:calc(var(--i,0) * 45ms);
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .reveal-ready .rv{opacity:1;transform:none;transition:none}
  .burger,.sheet a,.rail a{transition:none}
}

@media (max-width:520px){
  .hero{padding-top:14px}
  .hero-img{height:34vh}
  .foot-links{gap:0 16px}
}

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