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

:root{
  --bg:#000000;
  --panel:#121212;
  --panel-2:#181818;
  --line:#1d1d1d;
  --fg:#ededed;
  --dim:#9c9c9c;
  --neon:#3dff9e;
  --violet:#8b7bff;
  --gold:#ffd166;
  --fb:"Fredoka","Nunito","PingFang SC","Hiragino Sans GB","Microsoft YaHei",system-ui,sans-serif;
  --fn:"Nunito","PingFang SC","Hiragino Sans GB","Microsoft YaHei",system-ui,sans-serif;
  color-scheme:dark;
}

*,*::before,*::after{box-sizing:border-box;border-radius:0}

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

body{
  margin:0;
  background:var(--bg);
  color:var(--fg);
  font-family:var(--fn);
  font-size:17px;
  line-height:1.72;
  font-weight:400;
  padding-bottom:calc(96px + env(safe-area-inset-bottom));
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
}

h1,h2,h3,h4{
  font-family:var(--fb);
  font-weight:600;
  line-height:1.2;
  letter-spacing:.01em;
  margin:0;
}

a{color:var(--fg);text-decoration:none}
a:hover{color:var(--neon)}
img{max-width:100%;height:auto;display:block}
p{margin:0 0 1em}

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

/* 角落品牌图标 */
.mark{
  position:fixed;
  top:14px;left:14px;
  z-index:80;
  width:48px;height:48px;
  display:grid;place-items:center;
  background:var(--panel);
  box-shadow:0 0 0 1px #202020, 0 0 22px rgba(61,255,158,.14);
  font-family:var(--fb);
  font-size:22px;
  font-weight:600;
  color:var(--neon);
  text-shadow:0 0 12px rgba(61,255,158,.55);
  overflow:hidden;
}
.mark img{width:100%;height:100%;object-fit:cover}
.mark:hover{background:#1b1b1b}

/* 底部固定导航条 */
.dock{
  position:fixed;
  left:0;right:0;bottom:0;
  z-index:90;
  display:flex;
  align-items:center;
  gap:10px;
  padding:9px 12px calc(9px + env(safe-area-inset-bottom));
  background:#070707;
  box-shadow:0 -1px 0 #171717, 0 -18px 34px rgba(0,0,0,.92);
}

.dock-nav{
  flex:1 1 auto;
  min-width:0;
  overflow-x:auto;
  scrollbar-width:none;
}
.dock-nav::-webkit-scrollbar{display:none}

.dock-nav p{
  display:flex;
  gap:4px;
  margin:0;
}

.dock-nav a{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:0 12px;
  font-family:var(--fb);
  font-size:16px;
  font-weight:500;
  color:#b6b6b6;
  white-space:nowrap;
  transition:background .18s ease,color .18s ease;
}
.dock-nav a:hover,
.dock-nav a.is-on{
  background:var(--panel-2);
  color:var(--neon);
}

.search{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  background:var(--panel);
  padding:0 10px;
  min-height:44px;
}
.search input{
  width:86px;
  border:0;
  background:transparent;
  color:var(--fg);
  font-family:var(--fn);
  font-size:16px;
  padding:8px 0;
}
.search input::placeholder{color:#7c7c7c}
.search:focus-within{background:#1e1e1e;box-shadow:inset 0 0 0 1px #2a2a2a}

/* 首屏 */
.hero{
  display:flex;
  align-items:center;
  gap:18px;
  min-height:45vh;
  max-width:1140px;
  margin:0 auto;
  padding:88px 22px 26px;
}

.hero-mark{
  flex:0 0 auto;
  width:72px;height:72px;
  display:grid;place-items:center;
  background:var(--panel);
  font-family:var(--fb);
  font-size:34px;
  font-weight:600;
  color:var(--neon);
  text-shadow:0 0 16px rgba(61,255,158,.6);
  box-shadow:inset 0 0 0 1px #1f1f1f;
}

.hero-copy{min-width:0}

.hero h1{
  font-size:clamp(27px,6vw,44px);
  font-weight:700;
  color:#fff;
  letter-spacing:-.01em;
}

.hero-sub{
  margin:12px 0 0;
  max-width:52ch;
  color:var(--dim);
  font-size:16px;
}

/* 两栏 */
.wrap{
  display:grid;
  grid-template-columns:258px minmax(0,1fr);
  gap:34px;
  max-width:1140px;
  margin:0 auto;
  padding:6px 22px 64px;
}

.rail{
  align-self:start;
  position:sticky;
  top:88px;
  background:#0b0b0b;
  padding:18px 16px 16px;
}

.rail-title{
  font-size:16px;
  letter-spacing:.22em;
  color:var(--neon);
  text-shadow:0 0 10px rgba(61,255,158,.4);
}

.rail-sub{
  margin:6px 0 0;
  font-size:16px;
  color:#7e7e7e;
}

.rail-list{
  list-style:none;
  margin:14px 0 0;
  padding:0;
}
.rail-list a{
  display:flex;
  align-items:center;
  min-height:44px;
  padding:0 6px;
  border-top:1px solid var(--line);
  color:#cfcfcf;
  font-size:16px;
}
.rail-list a:hover{color:var(--neon);background:#131313}

.rail-top{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  margin-top:10px;
  color:var(--gold);
  font-size:16px;
}
.rail-top:hover{color:var(--neon)}

.body{min-width:0}

.prose{max-width:70ch}

.prose > section{
  position:relative;
  border-top:1px solid var(--line);
  padding:34px 0 8px;
  scroll-margin-top:96px;
}
.prose > section::before{
  content:"";
  position:absolute;
  top:-1px;left:0;
  width:54px;height:2px;
  background:var(--neon);
  box-shadow:0 0 12px rgba(61,255,158,.7);
}
.prose > section:first-child{border-top:0;padding-top:10px}
.prose > section:first-child::before{display:none}

.prose h2{
  font-size:clamp(22px,3.6vw,31px);
  color:#fff;
  text-shadow:0 0 16px rgba(61,255,158,.16);
  margin-bottom:.5em;
}
.prose h3{
  font-size:clamp(19px,2.6vw,23px);
  color:#f2f2f2;
  margin:1.4em 0 .5em;
}
.prose h2 + p,
.prose h3 + p{color:#cfcfcf}

.prose p{color:#d5d5d5}

.prose a{
  color:var(--neon);
  text-decoration:underline;
  text-underline-offset:3px;
  text-decoration-thickness:1px;
}

.prose ul,.prose ol{padding-left:1.25em;margin:0 0 1.1em}
.prose li{margin-bottom:.45em}
.prose li::marker{color:var(--neon)}

.prose blockquote{
  margin:0 0 1.2em;
  padding:14px 18px;
  background:var(--panel);
  border-left:3px solid var(--violet);
  color:#dedede;
}
.prose blockquote p:last-child{margin-bottom:0}

.prose figure{margin:0 0 1.2em}
.prose figcaption{font-size:16px;color:#8d8d8d;padding-top:8px}
.prose img{background:#0e0e0e;width:100%}

.prose table{
  width:100%;
  border-collapse:collapse;
  margin:0 0 1.2em;
  font-size:16px;
}
.prose th,.prose td{
  text-align:left;
  padding:11px 12px;
  border-bottom:1px solid var(--line);
  vertical-align:top;
}
.prose th{background:var(--panel);color:#fff;font-family:var(--fb)}
.prose hr{border:0;border-top:1px solid var(--line);margin:1.6em 0}

.prose code{
  font-family:ui-monospace,Menlo,Consolas,monospace;
  font-size:.94em;
  background:var(--panel-2);
  padding:2px 6px;
}

/* 页脚 */
.foot{
  max-width:1140px;
  margin:0 auto;
  padding:0 22px 30px;
}

.foot-top{
  display:grid;
  grid-template-columns:1.15fr 2fr;
  gap:30px;
  background:#0a0a0a;
  padding:28px 22px;
}

.foot-brand{
  font-family:var(--fb);
  font-size:24px;
  font-weight:600;
  color:#fff;
  margin:0 0 14px;
}

.sub-form{display:flex;gap:8px;flex-wrap:wrap}
.sub-form input{
  flex:1 1 120px;
  min-width:0;
  min-height:44px;
  border:0;
  background:var(--panel);
  color:var(--fg);
  font-family:var(--fn);
  font-size:16px;
  padding:10px 12px;
}
.sub-form input::placeholder{color:#7c7c7c}
.sub-form button{
  flex:0 0 auto;
  min-height:44px;
  padding:0 20px;
  border:0;
  background:var(--neon);
  color:#00170c;
  font-family:var(--fb);
  font-size:16px;
  font-weight:600;
  cursor:pointer;
  transition:filter .18s ease;
}
.sub-form button:hover{filter:brightness(1.12)}

.foot-links{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:0 16px;
  align-content:start;
}
.foot-links a{
  display:flex;
  align-items:center;
  min-height:44px;
  color:#c4c4c4;
  font-size:16px;
  border-bottom:1px solid #161616;
}
.foot-links a:hover{color:var(--neon)}

.foot-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-top:26px;
  padding-top:20px;
  border-top:1px solid #161616;
}

.foot-logo{
  width:42px;height:42px;
  display:grid;place-items:center;
  background:var(--panel);
  font-family:var(--fb);
  font-size:20px;
  font-weight:600;
  color:var(--neon);
  overflow:hidden;
}
.foot-logo img{width:100%;height:100%;object-fit:cover}
.foot-logo:hover{background:#1c1c1c}

.foot-copy{
  margin:0;
  font-size:16px;
  color:#8b8b8b;
}

/* 动效 */
html.js .prose > section{
  opacity:0;
  transform:translateY(16px);
}
html.js .prose > section.in{
  opacity:1;
  transform:none;
  transition:opacity .55s ease, transform .55s cubic-bezier(.2,.7,.3,1);
}

/* 窄屏 */
@media (max-width:820px){
  body{font-size:17px;padding-bottom:calc(92px + env(safe-area-inset-bottom))}
  .hero{min-height:42vh;gap:14px;padding:84px 16px 22px}
  .hero-mark{width:56px;height:56px;font-size:26px}
  .search input{width:72px}
  .wrap{
    grid-template-columns:minmax(0,1fr);
    gap:22px;
    padding:4px 16px 48px;
  }
  .rail{position:static;padding:14px 12px}
  .rail-list{
    display:flex;
    gap:6px;
    margin-top:12px;
    overflow-x:auto;
    scrollbar-width:none;
  }
  .rail-list::-webkit-scrollbar{display:none}
  .rail-list li{flex:0 0 auto}
  .rail-list a{
    border-top:0;
    background:var(--panel-2);
    padding:0 12px;
    white-space:nowrap;
  }
  .prose{max-width:none}
  .foot{padding:0 16px 26px}
  .foot-top{grid-template-columns:minmax(0,1fr);gap:22px;padding:22px 16px}
  .foot-links{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media (max-width:420px){
  .dock{gap:8px;padding-left:10px;padding-right:10px}
  .dock-nav a{padding:0 10px;font-size:16px}
  .hero h1{font-size:27px}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  html.js .prose > section{opacity:1;transform:none;transition:none}
  .sub-form button{transition:none}
}

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