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

:root{
  --ink:#171f26;
  --blue:#c8e0f4;
  --pink:#f5e0e8;
  --muted:#4c5c6a;
  --s-out:-6px -6px 16px rgba(255,255,255,.92),6px 6px 18px rgba(23,31,38,.14);
  --s-out-sm:-3px -3px 8px rgba(255,255,255,.9),3px 4px 10px rgba(23,31,38,.14);
  --s-in:inset -4px -4px 10px rgba(255,255,255,.95),inset 4px 4px 10px rgba(23,31,38,.14);
}

*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{
  margin:0;
  padding-bottom:110px;
  font-family:'Merriweather',Georgia,'Songti SC','Noto Serif SC',serif;
  font-size:17px;
  line-height:1.75;
  color:var(--ink);
  background:linear-gradient(158deg,#e9f2f9 0%,#f7ebf1 55%,#e6f0f8 100%);
  background-attachment:fixed;
  overflow-wrap:break-word;
}
img{max-width:100%}
h1,h2,h3,.foot-brand{font-family:'Abril Fatface','Merriweather','Songti SC',serif;font-weight:400;letter-spacing:.01em}
:focus-visible{outline:3px solid #6f97b8;outline-offset:3px;border-radius:8px}

/* 顶部大图区 */
.hero{
  position:relative;
  display:flex;
  align-items:flex-end;
  min-height:70vh;
  padding:108px 22px 66px;
  overflow:hidden;
  border-radius:0 0 50% 50%/0 0 70px 70px;
  background:linear-gradient(150deg,#dceaf6 0%,#f7e6ee 62%,#cfe3f3 100%);
}
.hero-media{position:absolute;inset:0;z-index:0}
.hero-img{display:block;width:100%;height:100%;object-fit:cover;filter:saturate(.94)}
.hero::after{
  content:"";
  position:absolute;inset:0;z-index:1;pointer-events:none;
  background:linear-gradient(180deg,rgba(233,242,249,.12) 0%,rgba(233,242,249,.5) 52%,rgba(247,235,241,.94) 100%);
}
.hero-copy{position:relative;z-index:2;width:100%;max-width:1080px;margin:0 auto}
.hero h1{margin:0 0 .4em;font-size:clamp(2rem,6.4vw,3.75rem);line-height:1.14;letter-spacing:.02em}
.hero .subtitle{max-width:46ch;margin:0;font-size:1.05rem;color:#2b3944}

.brand-orb{
  position:absolute;z-index:3;top:18px;left:20px;
  display:grid;place-items:center;
  width:50px;height:50px;overflow:hidden;
  border-radius:50%;
  background:linear-gradient(145deg,#f6fbfe,#d6e5f1);
  box-shadow:var(--s-out);
  color:var(--ink);text-decoration:none;
  font-family:'Abril Fatface',serif;font-size:1.3rem;
  transition:box-shadow .15s ease,transform .15s ease;
}
.brand-orb img{width:100%;height:100%;object-fit:cover}
.brand-orb:active{box-shadow:var(--s-in);transform:scale(.96)}

.badge{
  position:absolute;z-index:3;top:22px;right:20px;
  padding:8px 14px;border-radius:999px;
  background:linear-gradient(145deg,#fceff4,#efdae5);
  box-shadow:var(--s-out-sm);
  font-size:1rem;letter-spacing:.05em;
}

/* 主体：侧栏在左 */
.shell{padding:46px 20px 0;max-width:1140px;margin:0 auto}
.side{
  padding:20px 18px 22px;
  border-radius:16px;
  background:linear-gradient(145deg,#eff6fb,#dce8f3);
  box-shadow:var(--s-out);
  margin:0 0 30px;
}
.side h2{margin:0 0 .15rem;font-size:1.15rem}
.toc{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:8px}
.toc a{
  display:flex;align-items:center;min-height:44px;
  padding:6px 12px;border-radius:12px;
  text-decoration:none;color:var(--ink);font-size:1rem;
  background:linear-gradient(145deg,#f4fafd,#e0ebf4);
  box-shadow:var(--s-out-sm);
  transition:box-shadow .15s ease,transform .15s ease;
}
.toc a:hover{box-shadow:var(--s-out)}
.toc a:active{box-shadow:var(--s-in);transform:scale(.98)}

.subtitle{margin:.15rem 0 1rem;color:var(--muted);font-size:.95rem;letter-spacing:.02em}

main{min-width:0}

/* 正文 */
.prose h2{font-size:clamp(1.4rem,3.4vw,2rem);line-height:1.26;margin:0 0 .3rem}
.prose h3{font-size:1.2rem;line-height:1.4;margin:1.5rem 0 .5rem}
.prose p{margin:0 0 1rem}
.prose p:last-child{margin-bottom:0}
.prose ul,.prose ol{margin:0 0 1rem;padding-left:1.35rem}
.prose li{margin:.32rem 0}
.prose a{color:#155a76;text-decoration:underline;text-underline-offset:3px}
.prose a:hover{color:var(--ink)}
.prose blockquote{
  margin:1.2rem 0;padding:14px 18px;
  background:rgba(255,255,255,.62);
  border-left:4px solid var(--ink);
  border-radius:0;
}
.prose table{width:100%;border-collapse:collapse;font-size:.96rem;margin:0 0 1rem}
.prose th,.prose td{border-bottom:1px solid rgba(23,31,38,.18);padding:9px 10px;text-align:left;vertical-align:top}
.prose th{font-weight:700;background:rgba(255,255,255,.45)}

.prose > article{
  margin:0 0 30px;
  padding:32px 24px 36px;
  border-radius:0;
  border-bottom:3px solid var(--blue);
  background:linear-gradient(145deg,#eef6fb,#dde9f3);
  box-shadow:var(--s-out-sm);
  scroll-margin-top:20px;
}
.prose > article:nth-of-type(even){
  background:linear-gradient(145deg,#fbeef3,#f1dfe9);
  border-bottom-color:var(--pink);
}
.prose > article:last-child{margin-bottom:0}

/* 页脚 */
.foot{
  margin-top:52px;
  padding:52px 20px 26px;
  background:#171f26;
  color:#dde8f1;
}
.foot-top{
  display:grid;grid-template-columns:1fr;gap:30px;
  max-width:1080px;margin:0 auto;
}
.foot-brand{margin:0 0 .5rem;font-size:1.5rem;color:#fff}
.foot-addr{font-style:normal;font-size:.95rem;line-height:1.9;color:#a9bccc}
.foot-h{margin:0 0 .7rem;font-size:.9rem;letter-spacing:.14em;color:#8fa6b8}
.sub{display:flex;flex-wrap:wrap;gap:10px}
.sub input{
  flex:1 1 130px;min-height:46px;padding:10px 14px;
  border:0;border-radius:12px;
  font:inherit;font-size:1rem;
  color:#eef5fa;background:#212e39;
  box-shadow:inset 3px 3px 9px rgba(0,0,0,.55),inset -3px -3px 8px rgba(255,255,255,.06);
}
.sub input::placeholder{color:#8ba0b1}
.sub button{
  min-height:46px;padding:10px 22px;border:0;border-radius:12px;
  font:inherit;font-size:1rem;color:#171f26;cursor:pointer;
  background:linear-gradient(145deg,#dbeaf7,#bed5ea);
  box-shadow:-3px -3px 8px rgba(255,255,255,.14),3px 4px 10px rgba(0,0,0,.45);
  transition:box-shadow .15s ease,transform .15s ease;
}
.sub button:active{box-shadow:inset 3px 3px 8px rgba(23,31,38,.3);transform:scale(.97)}
.foot-links{list-style:none;margin:0;padding:0;display:grid;gap:2px}
.foot-links a{
  display:flex;align-items:center;min-height:42px;
  color:#cfdded;text-decoration:none;font-size:1rem;
}
.foot-links a:hover{color:#fff;text-decoration:underline;text-underline-offset:4px}
.copy{margin:36px 0 0;text-align:center;font-size:.9rem;color:#93a8b8}
.note{margin:.25rem 0 0;text-align:center;font-size:.86rem;color:#7d92a3}

/* 底部固定导航 */
.dock{
  position:fixed;left:0;right:0;bottom:0;z-index:60;
  padding:8px 10px calc(8px + env(safe-area-inset-bottom));
  background:rgba(236,245,251,.95);
  box-shadow:0 -8px 24px rgba(23,31,38,.16);
  backdrop-filter:blur(8px);
}
.dock dl{
  display:flex;flex-wrap:wrap;justify-content:center;gap:4px;
  max-width:1120px;margin:0 auto;
}
.dock dt{flex:0 0 auto;margin:0}
.dock-a{
  display:flex;align-items:center;gap:5px;
  min-height:44px;padding:7px 10px;border-radius:12px;
  text-decoration:none;color:var(--ink);font-size:1rem;line-height:1.2;
  background:linear-gradient(145deg,#f5fafd,#dde9f3);
  box-shadow:var(--s-out-sm);
  transition:box-shadow .15s ease,transform .15s ease;
}
.dock-a:hover{box-shadow:var(--s-out)}
.dock-a:active{box-shadow:var(--s-in);transform:scale(.96)}
.dock-ico{display:inline-flex;color:#3d5а68;color:#3d5a68}

/* 滚动显现 */
.reveal{opacity:0;transform:translateY(16px);transition:opacity .55s ease,transform .55s ease}
.reveal.in{opacity:1;transform:none}

@media (min-width:861px){
  body{padding-bottom:96px}
  .shell{
    display:grid;grid-template-columns:246px minmax(0,1fr);
    gap:38px;align-items:start;
    padding:56px 24px 0;
  }
  .side{position:sticky;top:24px;margin:0}
  .toc{grid-template-columns:1fr}
  .foot-top{grid-template-columns:1.1fr 1.1fr .9fr}
  .prose > article{padding:40px 34px 44px}
  .hero{padding:120px 32px 78px}
}

@media (max-width:560px){
  body{padding-bottom:160px;font-size:16.5px}
  .hero{min-height:70vh;padding:96px 18px 54px;border-radius:0 0 50% 50%/0 0 48px 48px}
  .dock-ico{display:none}
  .dock-a{padding:6px 11px;font-size:1rem}
  .prose > article{padding:26px 18px 30px}
  .foot-top{gap:26px}
  .foot{padding:44px 18px 22px}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .reveal{opacity:1;transform:none;transition:none}
  .dock-a,.toc a,.brand-orb,.sub button{transition:none}
}

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