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

:root{
  --paper:#ffffff;
  --mist:#f5f5f5;
  --ink:#1f1f1f;
  --line:#e6e6e6;
  --mute:#5f5f5f;
  --dim:#8a8a8a;
  --r:4px;
  --shadow:0 4px 6px rgba(0,0,0,.05), 0 14px 30px rgba(0,0,0,.05);
  --shadow-lift:0 8px 14px rgba(0,0,0,.07), 0 22px 44px rgba(0,0,0,.09);
}

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

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

body{
  margin:0;
  font-family:'Inter', system-ui, -apple-system, 'Segoe UI', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size:17px;
  line-height:1.68;
  color:var(--ink);
  background:var(--mist);
  font-weight:400;
  overflow-x:hidden;
}

img{ display:block; max-width:100%; height:auto; border-radius:var(--r); }

a{ color:inherit; }

h1,h2,h3,h4{
  margin:0 0 .55em;
  line-height:1.2;
  letter-spacing:-.02em;
  font-weight:600;
}

h2{ font-size:clamp(1.24rem, 2.4vw, 1.6rem); }
h3{ font-size:1.1rem; }
h4{ font-size:1rem; }

p{ margin:0 0 1em; }
p:last-child{ margin-bottom:0; }

ul,ol{ margin:0 0 1em; padding-left:1.3em; }
li{ margin:.2em 0; }

time{ font-size:16px; color:var(--dim); }

.page{ padding-bottom:104px; }

/* ---------- 首屏 ---------- */
.top{
  position:relative;
  min-height:100svh;
  display:grid;
  align-items:end;
  overflow:hidden;
  padding:clamp(24px,6vw,60px) clamp(16px,5vw,64px) clamp(46px,9vh,96px);
  background:
    radial-gradient(rgba(31,31,31,.16) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(180deg,#ffffff 0%, #f5f5f5 78%);
}

.top-in{
  position:relative;
  margin-left:auto;
  max-width:1000px;
  text-align:right;
  will-change:transform;
}

.top h1{
  font-size:clamp(2.1rem, 8.4vw, 5.2rem);
  font-weight:600;
  letter-spacing:-.038em;
  line-height:1.03;
  margin:0 0 .4em;
}

.lede{
  max-width:36ch;
  margin-left:auto;
  color:var(--mute);
  font-size:16px;
  line-height:1.7;
  font-weight:400;
}

.blob{
  position:absolute;
  border-radius:var(--r);
  background:var(--paper);
  box-shadow:var(--shadow);
  animation:float 9s ease-in-out infinite alternate;
}
.blob-a{ width:clamp(88px,15vw,172px); aspect-ratio:1; top:13%; left:7%; }
.blob-b{
  width:clamp(62px,10vw,116px);
  height:clamp(42px,7vw,78px);
  top:36%; left:24%;
  background:var(--mist);
  border:1px solid var(--line);
  box-shadow:none;
  animation-delay:-4s;
}

@keyframes float{
  from{ transform:translate3d(0,0,0); }
  to{ transform:translate3d(0,-18px,0); }
}

/* ---------- 版心 ---------- */
.shell{
  max-width:1240px;
  margin:0 auto;
  padding:26px 16px 44px;
  display:grid;
  gap:18px;
  align-items:start;
}

div{ display:grid; gap:16px; }

div > section{
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:var(--r);
  box-shadow:var(--shadow);
  padding:clamp(20px,3vw,34px);
  scroll-margin-top:20px;
  transition:transform .22s ease, box-shadow .22s ease;
}
div > section:hover{ transform:translateY(-2px); box-shadow:var(--shadow-lift); }
div > section > :first-child{ margin-top:0; }
div > section > :last-child{ margin-bottom:0; }

div h2{ letter-spacing:-.025em; }
div ul,div ol{ color:var(--ink); }
div strong{ font-weight:600; }
div blockquote{
  margin:1em 0;
  padding:.6em 1em;
  border-left:3px solid var(--ink);
  background:var(--mist);
  border-radius:var(--r);
}
div pre{
  overflow-x:auto;
  background:var(--mist);
  border-radius:var(--r);
  padding:14px 16px;
  font-size:16px;
}

/* ---------- 右侧栏 ---------- */
.rail{ display:grid; gap:14px; }

.rail-card{
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:var(--r);
  box-shadow:var(--shadow);
  padding:20px;
}

.rail-card h2{ font-size:1.06rem; margin-bottom:.3em; }

.subtitle{
  color:var(--dim);
  font-size:16px;
  margin:0 0 14px;
}

.rail-list{ list-style:none; margin:0; padding:0; }
.rail-list li{ margin:0; }
.rail-list a{
  display:flex;
  align-items:center;
  gap:9px;
  min-height:42px;
  padding:9px 8px;
  text-decoration:none;
  font-size:16px;
  border-radius:var(--r);
  transition:background .18s ease, padding-left .18s ease;
}
.rail-list a::before{
  content:'';
  width:6px;
  height:6px;
  flex:0 0 6px;
  border-radius:1px;
  background:var(--ink);
  opacity:.32;
  transition:opacity .18s ease;
}
.rail-list a:hover{ background:var(--mist); padding-left:12px; }
.rail-list a:hover::before{ opacity:1; }

.rail-note{ background:#1f1f1f; color:#fff; border-color:#1f1f1f; }
.rail-note .kw{ font-size:16px; line-height:1.6; margin:0 0 .7em; }
.rail-note .mark{
  margin:0;
  font-size:16px;
  letter-spacing:.16em;
  color:#c9c9c9;
  text-transform:uppercase;
}

/* ---------- 页脚 ---------- */
.foot{
  background:var(--paper);
  border-top:1px solid var(--line);
}

.foot-row{
  max-width:1240px;
  margin:0 auto;
  padding:30px 16px 18px;
  display:grid;
  gap:18px;
}

.foot address{
  font-style:normal;
  display:flex;
  flex-direction:column;
  gap:5px;
}
.foot .mark{ font-weight:600; letter-spacing:-.01em; }
.foot .who{ color:var(--dim); font-size:16px; }

.foot-links{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-wrap:wrap;
  gap:4px 22px;
}
.foot-links a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  text-decoration:none;
  font-size:16px;
  color:var(--mute);
  border-bottom:1px solid transparent;
  transition:color .18s ease, border-color .18s ease;
}
.foot-links a:hover{ color:var(--ink); border-color:var(--ink); }

.foot-base{
  max-width:1240px;
  margin:0 auto;
  padding:12px 16px 22px;
  border-top:1px solid var(--line);
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  font-size:16px;
  color:var(--dim);
}
.foot-base a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  text-decoration:none;
  color:var(--ink);
}

/* ---------- 底部固定条 ---------- */
.dock{
  position:fixed;
  left:12px;
  right:12px;
  bottom:calc(12px + env(safe-area-inset-bottom));
  z-index:60;
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border:1px solid var(--line);
  border-radius:var(--r);
  background:rgba(255,255,255,.9);
  -webkit-backdrop-filter:blur(14px) saturate(1.4);
  backdrop-filter:blur(14px) saturate(1.4);
  box-shadow:0 10px 34px rgba(0,0,0,.15);
}

.dock .brand{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:0 10px;
  text-decoration:none;
  font-weight:600;
  letter-spacing:-.01em;
  white-space:nowrap;
  max-width:44vw;
  overflow:hidden;
  text-overflow:ellipsis;
}

.dock .menu{
  position:relative;
  margin-left:auto;
}

.dock summary{
  list-style:none;
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:44px;
  padding:0 12px;
  cursor:pointer;
  border:1px solid var(--line);
  border-radius:var(--r);
  background:var(--mist);
  font-size:16px;
  user-select:none;
}
.dock summary::-webkit-details-marker{ display:none; }
.dock summary:focus-visible{ outline:2px solid var(--ink); outline-offset:2px; }

.bars{
  width:15px;
  height:11px;
  border-top:2px solid var(--ink);
  border-bottom:2px solid var(--ink);
  position:relative;
}
.bars::after{
  content:'';
  position:absolute;
  left:0; right:0; top:50%;
  margin-top:-1px;
  height:2px;
  background:var(--ink);
}

.dock menu{
  counter-reset:navn;
  position:absolute;
  right:0;
  bottom:calc(100% + 14px);
  margin:0;
  padding:8px;
  list-style:none;
  min-width:228px;
  max-height:62vh;
  overflow:auto;
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:var(--r);
  box-shadow:0 18px 44px rgba(0,0,0,.18);
}

.dock menu li{ margin:0; }

.dock menu a{
  display:flex;
  align-items:center;
  gap:11px;
  min-height:44px;
  padding:10px 12px;
  text-decoration:none;
  font-size:16px;
  border-radius:var(--r);
  transition:background .16s ease;
}
.dock menu a::before{
  counter-increment:navn;
  content:counter(navn, decimal-leading-zero);
  font-size:12px;
  letter-spacing:.08em;
  color:var(--dim);
  font-variant-numeric:tabular-nums;
  flex:0 0 auto;
}
.dock menu a:hover{ background:var(--mist); }
.dock menu a:hover::before{ color:var(--ink); }

.dock .ping{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:44px;
  padding:0 14px;
  text-decoration:none;
  font-size:16px;
  color:#fff;
  background:var(--ink);
  border-radius:var(--r);
  white-space:nowrap;
}
.ring{
  width:9px;
  height:9px;
  border-radius:50%;
  border:2px solid #fff;
  box-shadow:0 0 0 3px rgba(255,255,255,.22);
}

/* ---------- 断点 ---------- */
@media (min-width:900px){
  div{ grid-template-columns:repeat(2, minmax(0,1fr)); }
  div > section:nth-child(3n+1){ grid-column:1 / -1; }
}

@media (min-width:980px){
  .shell{
    grid-template-columns:minmax(0,1fr) 300px;
    gap:20px;
    padding:44px 24px 60px;
  }
  .rail{ position:sticky; top:24px; }
  .foot-row{
    grid-template-columns:1fr auto;
    align-items:start;
    padding:40px 24px 24px;
  }
  .foot-base{ padding:14px 24px 30px; }
  .foot-links{ justify-content:flex-end; }
}

@media (min-width:880px){
  .dock{
    left:50%;
    transform:translateX(-50%);
    right:auto;
    width:min(1180px, calc(100% - 32px));
    bottom:16px;
    gap:4px;
    padding:10px 16px;
  }
  .dock .menu{ margin-left:14px; position:static; }
  nav.dock details.menu > menu{
    position:static;
    display:flex;
    flex-wrap:wrap;
    gap:2px;
    min-width:0;
    max-height:none;
    overflow:visible;
    border:0;
    box-shadow:none;
    background:transparent;
    padding:0;
  }
  .dock summary{ display:none; }
  .dock menu a{ padding:9px 11px; }
  .dock .ping{ margin-left:auto; }
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  .blob{ animation:none; }
  div > section{ transition:none; }
  div > section:hover{ transform:none; }
}

body.js div > section{ opacity:0; transform:translate3d(0,14px,0); }
body.js div > section.in{
  opacity:1;
  transform:none;
  transition:opacity .5s ease, transform .5s ease;
}
@media (prefers-reduced-motion: reduce){
  body.js div > section{ opacity:1; transform:none; transition:none; }
}

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