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

:root{
  --ink:#001e3c;
  --ink-deep:#00152b;
  --mint:#99ffcc;
  --neon:#00ff41;
  --text:#d9ece5;
  --dim:#9cbcb8;
  --line:rgba(153,255,204,.26);
  --line-soft:rgba(153,255,204,.14);
  --radius:18px;
  --serif:"EB Garamond",Georgia,"Songti SC","Noto Serif SC",serif;
  --sans:"Lato","Helvetica Neue",Arial,"PingFang SC","Microsoft YaHei",sans-serif;
}

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

html{
  scroll-behavior:smooth;
  -webkit-text-size-adjust:100%;
  background:var(--ink);
}

body{
  margin:0;
  min-height:100vh;
  font-family:var(--sans);
  font-size:17px;
  line-height:1.72;
  color:var(--text);
  background:
    radial-gradient(120% 78% at 10% -12%, #02315c 0%, rgba(2,49,92,0) 62%),
    linear-gradient(180deg,#001e3c 0%,#002644 52%,#00182f 100%);
  background-attachment:fixed;
  overflow-x:hidden;
}

body::before{
  content:"";
  position:fixed;
  inset:-22vmax;
  z-index:-1;
  pointer-events:none;
  background:
    radial-gradient(closest-side at 22% 18%, rgba(0,255,65,.16), rgba(0,255,65,0) 72%),
    radial-gradient(closest-side at 78% 62%, rgba(153,255,204,.14), rgba(153,255,204,0) 72%);
  filter:blur(34px);
  animation:drift 26s ease-in-out infinite alternate;
}

img{display:block;max-width:100%;height:auto}

a{color:var(--mint);text-decoration:none;transition:color .18s ease,background-color .18s ease}
a:hover{color:var(--neon)}

h1,h2,h3{font-family:var(--serif);font-weight:600}

.sr-only{
  position:absolute;width:1px;height:1px;padding:0;margin:-1px;
  overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;
}

/* ---------- 顶栏 ---------- */
.top{
  position:sticky;
  top:0;
  z-index:20;
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px clamp(12px,4vw,40px);
  background:rgba(0,20,40,.84);
  backdrop-filter:blur(12px);
  border-bottom:1px solid var(--line);
}

.mark{
  flex:0 0 auto;
  display:grid;
  place-items:center;
  width:44px;
  height:44px;
  border:1px solid var(--line);
  border-radius:50%;
  background:radial-gradient(circle at 34% 30%,rgba(0,255,65,.22),rgba(0,255,65,0) 70%);
  animation:breathe 5.4s ease-in-out infinite;
}
.mark img{width:26px;height:26px;object-fit:contain}
.mark svg{width:23px;height:23px}

.tabs{
  flex:1 1 auto;
  min-width:0;
  overflow-x:auto;
  scrollbar-width:none;
}
.tabs::-webkit-scrollbar{display:none}
.tabs p{
  margin:0;
  display:flex;
  gap:2px;
}
.tabs a{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:0 11px;
  font-size:16px;
  border-radius:999px;
  white-space:nowrap;
  color:var(--mint);
}
.tabs a:hover{background:rgba(0,255,65,.12);color:var(--neon)}

.seeker{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:2px;
  min-height:44px;
  padding-left:12px;
  border:1px solid var(--line);
  border-radius:999px;
  background:rgba(153,255,204,.06);
}
.seeker input{
  width:104px;
  padding:9px 0;
  font:inherit;
  font-size:15px;
  color:var(--text);
  background:none;
  border:0;
  outline:none;
}
.seeker input::placeholder{color:var(--dim)}
.seeker button{
  display:grid;
  place-items:center;
  width:40px;
  height:40px;
  padding:0;
  color:var(--mint);
  background:none;
  border:0;
  border-radius:50%;
  cursor:pointer;
}
.seeker button:hover{color:var(--neon)}
.seeker button svg{width:18px;height:18px}

/* ---------- 首屏 ---------- */
.hero{
  max-width:1120px;
  margin:0 auto;
  min-height:45vh;
  padding:clamp(22px,4vw,42px) clamp(16px,4vw,40px) 0;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:14px;
  text-align:left;
}

.hero h1{
  margin:0;
  font-size:clamp(2rem,6.4vw,3.5rem);
  line-height:1.16;
  letter-spacing:.01em;
  color:var(--mint);
  text-shadow:0 0 30px rgba(0,255,65,.22);
}

.lede{
  margin:0;
  max-width:54ch;
  font-size:17px;
  color:var(--dim);
}

.hero-art{
  margin:10px 0 0;
  min-height:132px;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:radial-gradient(90% 130% at 50% 0%,rgba(0,255,65,.12),rgba(0,255,65,0) 72%);
}
.hero-art svg{width:100%;height:100%;min-height:132px;display:block}
.hero-photo{width:100%;height:100%;object-fit:cover;min-height:132px}

.cell-a{animation:breathe 7.2s ease-in-out infinite;transform-origin:30% 50%}
.cell-b{animation:breathe 9s ease-in-out .6s infinite;transform-origin:70% 55%}
.rings{animation:drift 14s ease-in-out infinite alternate}

/* ---------- 主体 ---------- */
.stage{
  max-width:1120px;
  margin:0 auto;
  padding:clamp(28px,5vw,56px) clamp(16px,4vw,40px) clamp(44px,6vw,76px);
  display:grid;
  grid-template-columns:minmax(0,232px) minmax(0,1fr);
  gap:clamp(24px,4vw,56px);
  align-items:start;
}

.rail{
  position:sticky;
  top:84px;
  display:flex;
  flex-direction:column;
  gap:12px;
}

.rail h2{
  margin:0;
  display:flex;
  align-items:center;
  gap:8px;
  font-size:1.16rem;
  letter-spacing:.06em;
  color:var(--mint);
}
.rail h3{
  margin:8px 0 0;
  font-size:1rem;
  font-weight:500;
  letter-spacing:.14em;
  color:var(--dim);
}

.dot{
  display:inline-block;
  width:9px;
  height:9px;
  border-radius:50%;
  background:var(--neon);
  box-shadow:0 0 12px rgba(0,255,65,.85);
  animation:breathe 3.8s ease-in-out infinite;
}
.dot-dim{background:var(--mint);box-shadow:0 0 10px rgba(153,255,204,.55);width:7px;height:7px}

.rail-links{
  margin:0;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.rail-links a{
  display:flex;
  align-items:center;
  min-height:40px;
  padding:8px 14px;
  font-size:16px;
  color:var(--mint);
  border:1px solid var(--line-soft);
  border-radius:var(--radius);
  background:rgba(153,255,204,.04);
}
.rail-links a:hover{border-color:var(--neon);background:rgba(0,255,65,.1);color:var(--neon)}

.flow{min-width:0}
.flow section[id]{
  padding-block:26px;
  border-top:1px dashed var(--line-soft);
  scroll-margin-top:86px;
}
.flow section[id]:first-child{border-top:0;padding-top:0}

.js .flow section[id]{
  opacity:0;
  transform:translateY(12px);
  transition:opacity .5s ease,transform .5s ease;
}
.js .flow section[id].in{opacity:1;transform:none}
.flow section.hit{outline:1px solid rgba(0,255,65,.5);outline-offset:8px;border-radius:var(--radius)}

.flow h2{
  margin:0 0 .6em;
  display:flex;
  align-items:baseline;
  gap:12px;
  font-size:clamp(1.4rem,3vw,1.88rem);
  line-height:1.32;
  color:var(--mint);
}
.flow h2::before{
  content:"";
  flex:0 0 auto;
  width:10px;
  height:10px;
  border:2px solid var(--neon);
  border-radius:50%;
  background:rgba(0,255,65,.25);
}

.flow h3{
  margin:1.3em 0 .5em;
  font-size:1.2rem;
  color:var(--mint);
}

.flow p{margin:0 0 1em}
.flow ul,.flow ol{margin:0 0 1em;padding-left:1.3em}
.flow li{margin:.25em 0}
.flow a{border-bottom:1px solid rgba(0,255,65,.45)}
.flow strong{color:var(--mint)}
.flow img{margin:1em 0;border:1px solid var(--line);border-radius:var(--radius)}
.flow figure{margin:1em 0}
.flow blockquote{
  margin:1em 0;
  padding:6px 0 6px 16px;
  border-left:3px solid var(--neon);
  color:var(--dim);
}
.flow code{
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:.94em;
  padding:.1em .4em;
  border:1px solid var(--line-soft);
  border-radius:6px;
}

/* ---------- 页脚 ---------- */
.base{
  border-top:1px solid var(--line);
  background:rgba(0,18,36,.62);
  padding:clamp(28px,5vw,46px) clamp(16px,7vw,150px) 20px;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:24px;
}
.base h3{
  margin:0 0 12px;
  display:flex;
  align-items:center;
  gap:8px;
  font-size:1.05rem;
  letter-spacing:.08em;
  color:var(--mint);
}
.mini{
  margin:0;
  display:flex;
  flex-direction:column;
  gap:2px;
}
.mini a{
  display:flex;
  align-items:center;
  min-height:40px;
  font-size:16px;
  color:var(--dim);
}
.mini a:hover{color:var(--neon)}

.colophon{
  grid-column:1 / -1;
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid var(--line-soft);
  font-size:15px;
  color:var(--dim);
}
.colophon p{margin:0}
.colophon a{display:inline-flex;align-items:center;min-height:40px;color:var(--mint)}

@keyframes breathe{
  0%,100%{transform:scale(1)}
  50%{transform:scale(1.07)}
}
@keyframes drift{
  0%{transform:translate3d(0,0,0) rotate(0deg)}
  100%{transform:translate3d(4vw,-3vh,0) rotate(6deg)}
}

@media (max-width:880px){
  .stage{
    grid-template-columns:minmax(0,1fr);
    gap:22px;
  }
  .rail{
    position:static;
    gap:10px;
  }
  .rail-links{
    flex-direction:row;
    flex-wrap:wrap;
  }
  .rail-links a{padding:8px 12px}
  .base{grid-template-columns:minmax(0,1fr)}
  .flow section[id]{scroll-margin-top:78px}
  .hero{min-height:auto;padding-top:26px}
}

@media (max-width:430px){
  body{font-size:16px}
  .top{gap:6px;padding:8px 10px}
  .seeker{padding-left:8px}
  .seeker input{width:66px;font-size:14px}
  .tabs a{padding:0 9px;font-size:15px}
  .hero h1{font-size:1.95rem}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{
    animation:none !important;
    transition:none !important;
  }
  .js .flow section[id]{opacity:1;transform:none}
}

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