@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:wght@400;700&family=Crimson+Pro:wght@400;500;600;700&display=swap');

:root{
  --bg:#000000;
  --panel:#0a0a0a;
  --panel2:#121212;
  --line:#1b1b1b;
  --line2:#2b2b2b;
  --txt:#e9ecee;
  --dim:#9aa4aa;
  --neon:#7cffb2;
  --gold:#e8c46a;
  --blue:#8fb4ff;
  --purple:#c9a6ff;
  --serif:"Crimson Pro",Georgia,"Songti SC",serif;
  --sans:"Atkinson Hyperlegible",-apple-system,"Segoe UI","Noto Sans SC",sans-serif;
}

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

html{
  scroll-behavior:smooth;
  color-scheme:dark;
  -webkit-text-size-adjust:100%;
  overflow-x:clip;
  max-width:100%;
}

body{
  margin:0;
  max-width:100%;
  background:var(--bg);
  color:var(--txt);
  font-family:var(--sans);
  font-size:1.0625rem;
  line-height:1.72;
  letter-spacing:.01em;
  overflow-x:hidden;
  overflow-wrap:break-word;
}

img{display:block;max-width:100%;height:auto}
a{color:inherit;text-decoration:none}
:focus-visible{outline:2px solid var(--neon);outline-offset:3px}

.skip{
  position:fixed;
  left:1rem;
  top:-4.5rem;
  z-index:99;
  padding:.7rem 1.1rem;
  background:var(--panel2);
  border:1px solid var(--neon);
  color:var(--neon);
  transition:top .2s ease;
}
.skip:focus{top:.8rem}

/* 顶栏 */
.top{
  position:sticky;
  top:0;
  z-index:60;
  max-width:100%;
  background:rgba(0,0,0,.94);
  backdrop-filter:blur(6px);
  border-bottom:1px solid var(--line);
}

.bar{
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:.7rem;
  max-width:1280px;
  margin:0 auto;
  padding:.55rem clamp(.7rem,2vw,1.5rem);
}

.nav{min-width:0}
.nav ol{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:.15rem;
  margin:0;
  padding:0;
  list-style:none;
}
.nav-l ol{justify-content:flex-start}
.nav-r ol{justify-content:flex-end}

.nav a{
  display:flex;
  align-items:center;
  gap:.42rem;
  min-height:44px;
  padding:.7rem .55rem;
  font-size:.9rem;
  color:var(--dim);
  border:1px solid transparent;
  transition:color .18s ease,border-color .18s ease,background .18s ease;
}
.nav a:hover{color:#fff;background:var(--panel);border-color:var(--line2)}

.gl{width:6px;height:6px;flex:0 0 auto}
.g1{background:var(--neon);box-shadow:0 0 8px rgba(124,255,178,.55)}
.g2{background:var(--blue);border-radius:50%}
.g3{background:var(--gold);transform:rotate(45deg)}
.g4{background:var(--purple);border-radius:50%}

.brand{
  display:flex;
  align-items:center;
  gap:.55rem;
  padding:.5rem .9rem;
  border:1px solid var(--line2);
  font-family:var(--serif);
  font-size:1.15rem;
  font-weight:600;
  letter-spacing:.08em;
  color:#fff;
  white-space:nowrap;
  transition:border-color .2s ease,text-shadow .2s ease;
}
.brand:hover{border-color:var(--neon);text-shadow:0 0 10px rgba(124,255,178,.45)}
.brand-img{width:26px;height:26px;object-fit:contain}
.brand-glyph{
  width:12px;
  height:12px;
  flex:0 0 auto;
  border:2px solid var(--neon);
  transform:rotate(45deg);
  box-shadow:0 0 8px rgba(124,255,178,.5);
}

/* 分节条 */
.subbar{
  max-width:100%;
  border-top:1px solid var(--line);
  background:var(--panel);
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:thin;
}
.subbar ol{
  display:flex;
  width:max-content;
  max-width:1280px;
  margin:0 auto;
  padding:0 clamp(.7rem,2vw,1.5rem);
  list-style:none;
}
.subbar a{
  display:flex;
  align-items:center;
  gap:.45rem;
  min-height:42px;
  padding:.65rem .8rem;
  font-size:.82rem;
  color:var(--dim);
  white-space:nowrap;
  border-bottom:2px solid transparent;
  transition:color .18s ease,border-color .18s ease,background .18s ease;
}
.subbar b{font-family:var(--serif);font-weight:600;color:#3b3b3b}
.subbar a:hover{color:#fff;background:#0f0f0f;border-bottom-color:var(--neon)}

/* 首屏 */
.hero{
  position:relative;
  display:flex;
  align-items:center;
  min-height:100vh;
  min-height:100svh;
  max-width:100%;
  padding:clamp(3rem,8vw,6rem) clamp(1rem,5vw,3rem);
  overflow:hidden;
  border-bottom:1px solid var(--line);
}

.hero-bg{
  position:absolute;
  left:-.05em;
  top:50%;
  z-index:0;
  transform:translateY(-50%);
  font-family:var(--serif);
  font-weight:700;
  font-size:clamp(4.5rem,19vw,15rem);
  line-height:.85;
  letter-spacing:.02em;
  color:#101010;
  white-space:nowrap;
  pointer-events:none;
  will-change:transform;
}

.hero-in{position:relative;z-index:1;min-width:0;width:100%;max-width:760px}
.hero-glyph,.hero-mark{width:56px;height:56px;margin-bottom:1.5rem}
.hero-mark{object-fit:contain;border:1px solid var(--line2);background:var(--panel)}
.hero-glyph{position:relative;border:2px solid var(--line2)}
.hero-glyph::after{
  content:"";
  position:absolute;
  inset:14px;
  background:var(--neon);
  box-shadow:0 0 14px rgba(124,255,178,.55);
}

.hero h1{
  margin:0 0 1.1rem;
  font-family:var(--serif);
  font-size:clamp(2.1rem,6.2vw,4.2rem);
  line-height:1.12;
  letter-spacing:.01em;
  text-shadow:0 0 22px rgba(143,180,255,.18);
}

.lead{
  max-width:48ch;
  margin:0 0 1.9rem;
  font-size:1.05rem;
  color:var(--dim);
}

.cta{
  display:inline-flex;
  align-items:center;
  gap:.6rem;
  min-height:48px;
  padding:.8rem 1.4rem;
  border:1px solid var(--neon);
  color:var(--neon);
  font-size:.98rem;
  text-shadow:0 0 10px rgba(124,255,178,.4);
  transition:background .2s ease,color .2s ease,text-shadow .2s ease;
}
.cta::after{content:"→"}
.cta:hover{background:var(--neon);color:#000;text-shadow:none}

.rot{
  position:absolute;
  right:clamp(1rem,4vw,3rem);
  bottom:clamp(2rem,6vw,4rem);
  z-index:1;
  min-width:0;
  max-width:calc(100% - 2rem);
  font-size:.85rem;
  text-align:right;
  color:#585f63;
}
.rot-l{display:grid;gap:.12rem;margin:0;padding:0;list-style:none}
.rot-l li{opacity:.35;transition:opacity .4s ease,color .4s ease}
.rot-l li.on{opacity:1;color:var(--gold);text-shadow:0 0 10px rgba(232,196,106,.4)}

/* 正文 */
main{max-width:100%}

article{
  display:grid;
  grid-template-columns:minmax(0,1fr) 18.5rem;
  gap:clamp(1.5rem,4vw,3.5rem);
  max-width:1240px;
  margin:0 auto;
  padding:clamp(2.5rem,6vw,4.5rem) clamp(1rem,4vw,2rem) clamp(3rem,7vw,5rem);
  overflow-wrap:break-word;
}

article > section{
  grid-column:1;
  min-width:0;
  max-width:100%;
  scroll-margin-top:8.75rem;
  padding-bottom:2.2rem;
  margin-bottom:.4rem;
}
article > section:first-child{padding-top:0}
article > section + section{
  padding-top:2.2rem;
  border-top:1px solid var(--line);
}

article h2{
  display:flex;
  align-items:baseline;
  gap:.6rem;
  margin:0 0 .95rem;
  font-family:var(--serif);
  font-size:clamp(1.5rem,3.4vw,2rem);
  line-height:1.25;
  letter-spacing:.01em;
}
article h3{
  margin:1.5rem 0 .6rem;
  font-family:var(--serif);
  font-size:1.25rem;
  line-height:1.35;
}

article p{margin:0 0 1rem;max-width:70ch}
article strong{color:#fff}
article em{color:var(--gold);font-style:normal}
article ul,article ol{margin:0 0 1rem;padding-left:1.25rem}
article li{margin:.35rem 0}
article a{color:var(--blue);border-bottom:1px solid #26384d}
article a:hover{color:#fff;border-bottom-color:var(--neon)}
article blockquote{
  margin:1.2rem 0;
  padding:.7rem 1rem;
  background:var(--panel);
  border-left:2px solid var(--neon);
  color:var(--dim);
}
article hr{border:0;border-top:1px solid var(--line2);margin:1.6rem 0}
article table{
  display:block;
  width:100%;
  max-width:100%;
  overflow-x:auto;
  border-collapse:collapse;
  margin:1.1rem 0;
  font-size:.95rem;
}
article th,article td{border:1px solid var(--line2);padding:.55rem .7rem;text-align:left;vertical-align:top}
article th{background:var(--panel2);color:#fff;font-weight:700}
article code{
  padding:.08em .35em;
  background:#0e0e0e;
  border:1px solid var(--line);
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:.9em;
}
article pre{
  max-width:100%;
  overflow-x:auto;
  padding:1rem;
  background:#0b0b0b;
  border:1px solid var(--line2);
}
article figure{margin:1.2rem 0;max-width:100%}
article figcaption{margin-top:.45rem;font-size:.85rem;color:var(--dim)}
article > section > *:last-child{margin-bottom:0}

/* 侧栏 */
.rail{
  grid-column:2;
  grid-row:1 / span 40;
  align-self:start;
  min-width:0;
  position:sticky;
  top:8.75rem;
  padding:1.3rem 1.15rem;
  background:var(--panel);
  border:1px solid var(--line2);
}
.rail .rail-h{
  margin:0 0 .35rem;
  font-size:1.15rem;
  letter-spacing:.05em;
}
.rail .subtitle{
  margin:0 0 1rem;
  padding-bottom:.9rem;
  border-bottom:1px solid var(--line);
  font-size:.82rem;
  color:var(--dim);
}
.rail-l{display:grid;gap:.1rem;margin:0;padding:0;list-style:none}
.rail-l a{
  display:flex;
  align-items:baseline;
  gap:.55rem;
  min-height:40px;
  padding:.55rem .2rem;
  font-size:.86rem;
  color:#b8c0c5;
  border-bottom:1px solid #151515;
}
.rail-l a:hover{color:var(--neon)}
.rail-l span{font-family:var(--serif);font-size:.78rem;color:#3d3d3d}

/* 页脚 */
.foot{
  max-width:100%;
  border-top:1px solid var(--line2);
  background:#050505;
}
.foot-g{
  display:grid;
  grid-template-columns:1.1fr 1fr;
  gap:2rem;
  max-width:1240px;
  margin:0 auto;
  padding:clamp(2rem,5vw,3rem) clamp(1rem,4vw,2rem);
}
address{display:grid;gap:.4rem;align-content:start;min-width:0;font-style:normal}
.foot-brand{font-family:var(--serif);font-size:1.35rem;letter-spacing:.06em;color:#fff}
.foot-kw{font-size:.85rem;color:var(--dim)}
.foot-l{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:.1rem;
  min-width:0;
  margin:0;
  padding:0;
  list-style:none;
}
.foot-l a{
  display:flex;
  align-items:center;
  min-height:40px;
  padding:.6rem .3rem;
  font-size:.88rem;
  color:var(--dim);
  border-bottom:1px solid #141414;
}
.foot-l a:hover{color:var(--neon)}
.foot-b{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  max-width:1240px;
  margin:0 auto;
  padding:.9rem clamp(1rem,4vw,2rem) 1.6rem;
  border-top:1px solid var(--line);
  font-size:.8rem;
  color:#6b7378;
}
.copy{margin:0}
.totop{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:.4rem .85rem;
  border:1px solid var(--line2);
  color:var(--dim);
}
.totop:hover{color:var(--neon);border-color:var(--neon)}

/* 断点 */
@media (max-width:980px){
  article{grid-template-columns:minmax(0,1fr)}
  article > section{grid-column:1}
  .rail{
    grid-column:1;
    grid-row:auto;
    position:static;
    margin-top:1rem;
  }
  .foot-g{grid-template-columns:1fr}
}

@media (max-width:860px){
  .bar{
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:.2rem .5rem;
  }
  .brand{order:-1;width:100%;justify-content:center;margin-bottom:.3rem}
  .nav{width:100%}
  .nav ol{flex-wrap:wrap;justify-content:center;gap:.1rem}
  .nav a{font-size:.86rem;padding:.55rem .5rem}
  .rot{
    position:static;
    width:100%;
    max-width:100%;
    margin-top:2.2rem;
    text-align:left;
  }
  .rot-l{display:flex;flex-wrap:wrap;gap:.2rem 1rem}
  .rot-l li{flex:0 0 auto}
}

@media (max-width:560px){
  .foot-l{grid-template-columns:1fr}
  .hero{padding-top:2rem;padding-bottom:2.5rem;min-height:auto}
  .hero-glyph,.hero-mark{width:40px;height:40px;margin-bottom:1rem}
  .hero-glyph::after{inset:10px}
  .hero-bg{font-size:clamp(3.5rem,22vw,7rem)}
  article{padding-left:.9rem;padding-right:.9rem}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .hero-bg{transform:translateY(-50%);transition:none}
  .rot-l li{transition:none}
}

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