@import url('https://fonts.googleapis.com/css2?family=Lexend+Mega:wght@100..900&family=Public+Sans:wght@100..900&display=swap');

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

:root {
  --ink: #171f26;
  --blue: #c8e0f4;
  --rose: #f5e0e8;
  --paper: #e9f1f7;
  --paper-2: #f7eef2;
  --edge: rgba(23, 31, 38, .14);
  --edge-soft: rgba(23, 31, 38, .09);
  --hi: rgba(255, 255, 255, .92);
  --lo: rgba(23, 31, 38, .16);
  --radius: 18px;
  --head: 'Lexend Mega', 'Public Sans', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --body: 'Public Sans', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
}

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

body {
  margin: 0;
  overflow-x: clip;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background: linear-gradient(155deg, var(--paper) 0%, var(--paper-2) 58%, #edf4fa 100%);
  background-attachment: fixed;
}

menu { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; }

a { color: inherit; }

a:focus-visible,
summary:focus-visible {
  outline: 3px solid #6f9fc4;
  outline-offset: 3px;
  border-radius: 14px;
}

.skip {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip:focus {
  position: fixed;
  left: .8rem;
  top: .8rem;
  width: auto;
  height: auto;
  clip-path: none;
  z-index: 60;
  padding: .7rem 1.1rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
}

/* 顶部细条 */
.strip {
  background: linear-gradient(90deg, var(--blue), var(--rose) 62%, #dfeaf4);
  border-bottom: 1px solid var(--edge-soft);
  text-align: center;
  padding: .5rem 1rem;
  font-size: .78rem;
  letter-spacing: .17em;
  color: var(--ink);
}
.strip span {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

/* 品牌行 */
.site-head {
  display: grid;
  gap: .85rem;
  padding: 1.05rem clamp(1rem, 4vw, 2.6rem) 1rem;
}

.brand-row { display: flex; justify-content: center; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 46px;
  padding: .35rem 1.05rem .35rem .7rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--edge);
  background: linear-gradient(145deg, #f3f9fd, #e2ecf5);
  box-shadow: -5px -5px 12px var(--hi), 5px 5px 14px var(--lo);
  transition: transform .15s ease, box-shadow .15s ease;
}
.brand:active {
  transform: scale(.985);
  box-shadow: inset 3px 3px 9px var(--lo), inset -3px -3px 9px var(--hi);
}
.brand-mark { display: block; width: 30px; height: 30px; border-radius: 50%; }
.brand-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--blue), var(--rose));
  border: 1px solid var(--edge);
  box-shadow: inset -2px -2px 5px var(--lo), inset 2px 2px 5px var(--hi);
}
.brand-name {
  font-family: var(--head);
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: .01em;
}

/* 菜单 */
.nav-row { display: flex; justify-content: center; }

.nav-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  width: 100%;
}

.nav-details > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
  padding: .45rem 1.15rem;
  border-radius: 999px;
  font-size: .95rem;
  border: 1px solid var(--edge);
  background: linear-gradient(145deg, #f4fafd, #e4eef6);
  box-shadow: -5px -5px 12px var(--hi), 5px 5px 14px var(--lo);
  transition: transform .15s ease;
}
.nav-details > summary::-webkit-details-marker { display: none; }
.nav-details > summary::before {
  content: "";
  width: .48rem;
  height: .48rem;
  border-radius: 50%;
  background: var(--ink);
  opacity: .55;
}
.nav-details[open] > summary::before { background: #3f6c92; opacity: 1; }
.nav-details > summary:active { transform: scale(.97); }

.nav-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
  max-width: 100%;
}
.nav-pills li { display: block; }

.nav-pills a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 .85rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: .93rem;
  color: var(--ink);
  border: 1px solid rgba(23, 31, 38, .13);
  background: linear-gradient(145deg, #eef6fb, #dee9f3);
  box-shadow: -4px -4px 10px var(--hi), 4px 4px 11px var(--lo);
  transition: transform .15s ease, box-shadow .15s ease;
}
.nav-pills li:nth-child(even) a { background: linear-gradient(145deg, #f9eef3, #f0e0e9); }
.nav-pills a:hover { transform: translateY(-1px); }
.nav-pills a:active {
  transform: scale(.97);
  box-shadow: inset 3px 3px 8px var(--lo), inset -3px -3px 8px var(--hi);
}

/* 主视觉 */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 45vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: clamp(2rem, 7vw, 3.2rem) clamp(1rem, 5vw, 3rem) clamp(3rem, 9vw, 4.4rem);
  border-block: 1px solid var(--edge-soft);
  background: linear-gradient(158deg, var(--blue), var(--rose));
}
.hero-fig {
  position: absolute;
  inset: 0;
  margin: 0;
  z-index: 0;
  overflow: hidden;
}
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  will-change: transform;
  transform: scale(1.06);
}
.hero-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(150deg, rgba(200, 224, 244, .84), rgba(245, 224, 232, .88));
}
.hero-text {
  position: relative;
  z-index: 2;
  display: grid;
  gap: .85rem;
  max-width: 32ch;
}
.hero h1 {
  margin: 0;
  font-family: var(--head);
  font-weight: 800;
  font-size: clamp(1.85rem, 6.4vw, 3.1rem);
  line-height: 1.16;
  letter-spacing: -.012em;
  text-wrap: balance;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .6);
}
.hero-desc {
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(23, 31, 38, .8);
}
.hero-band {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 15px;
  z-index: 3;
  background: linear-gradient(90deg, var(--ink) 0 32%, var(--blue) 32% 68%, var(--rose) 68% 100%);
  clip-path: polygon(0 55%, 100% 0, 100% 100%, 0 100%);
}

/* 正文骨架 */
.shell {
  display: grid;
  gap: clamp(1.3rem, 3.5vw, 2rem);
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(1.6rem, 5vw, 2.8rem) clamp(1rem, 4vw, 2.5rem) clamp(2.4rem, 6vw, 3.6rem);
}

.prose {
  max-width: 70ch;
  font-size: 1.06rem;
  line-height: 1.8;
}

.prose article {
  padding: 1.5rem 0 1.9rem;
  border-bottom: 1px solid var(--edge-soft);
  scroll-margin-top: 1.5rem;
}
.prose article:last-child { border-bottom: 0; padding-bottom: .6rem; }
.prose article:first-child { padding-top: .3rem; }

.prose h2,
.prose h3 {
  font-family: var(--head);
  font-weight: 800;
  line-height: 1.3;
  margin: .25rem 0 .7rem;
  letter-spacing: -.008em;
}
.prose h2 { font-size: clamp(1.32rem, 3.6vw, 1.85rem); }
.prose h3 { font-size: clamp(1.1rem, 2.6vw, 1.28rem); }

.prose p { margin: 0 0 1rem; }
.prose ul, .prose ol { margin: 0 0 1rem; padding-left: 1.35rem; }
.prose li { margin: .35rem 0; }

.prose a {
  color: #143a56;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.prose img {
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--edge);
  margin: .4rem 0 1rem;
}

.prose blockquote {
  margin: 1.2rem 0;
  padding: 1rem 1.15rem;
  border-radius: 16px;
  border: 1px solid var(--edge);
  background: linear-gradient(145deg, #f4fafd, #e6eff6);
  box-shadow: inset -3px -3px 8px var(--hi), inset 3px 3px 9px var(--lo);
}
.prose blockquote > :last-child { margin-bottom: 0; }

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: .95rem;
}
.prose th, .prose td {
  border: 1px solid var(--edge);
  padding: .5rem .7rem;
  text-align: left;
  vertical-align: top;
}
.prose th { background: rgba(200, 224, 244, .5); }
.prose code {
  font-size: .9em;
  padding: .1em .38em;
  border-radius: 6px;
  background: rgba(23, 31, 38, .08);
}
.prose hr { border: 0; border-top: 1px dashed var(--edge); margin: 1.4rem 0; }

/* 眉题 */
.prose small,
.rail small,
footer small {
  display: block;
  font-family: var(--body);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .2em;
  color: rgba(23, 31, 38, .6);
  margin-bottom: .3rem;
}
small + h2, small + h3 { margin-top: 0; }

/* 侧栏 */
.rail {
  border-radius: var(--radius);
  border: 1px solid var(--edge);
  background: linear-gradient(145deg, #f4fafd, #e4eef6);
  box-shadow: -6px -6px 16px var(--hi), 6px 6px 18px var(--lo);
  padding: 1.1rem 1.05rem 1.25rem;
  align-self: start;
}
.rail h2 {
  font-family: var(--head);
  font-size: 1.02rem;
  font-weight: 800;
  margin: 0 0 .85rem;
}
.rail-list { display: grid; gap: .45rem; }
.rail-list a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: .3rem .85rem;
  border-radius: 13px;
  text-decoration: none;
  font-size: .94rem;
  color: var(--ink);
  border: 1px solid rgba(23, 31, 38, .11);
  background: linear-gradient(145deg, #f8fcfd, #e8f0f7);
  box-shadow: -3px -3px 8px var(--hi), 3px 3px 9px var(--lo);
  transition: transform .15s ease;
}
.rail-list li:nth-child(even) a { background: linear-gradient(145deg, #fbf1f5, #f1e3eb); }
.rail-list a:hover { transform: translateX(2px); }
.rail-list a:active { transform: scale(.98); }

/* 页脚 */
footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.9rem clamp(1rem, 4vw, 2.5rem) 2rem;
  border-top: 1px solid var(--edge);
  display: grid;
  gap: 1.5rem;
}

.foot-name {
  margin: 0 0 .4rem;
  font-family: var(--head);
  font-size: 1.02rem;
  font-weight: 800;
}
.foot-desc {
  margin: 0;
  font-size: .93rem;
  line-height: 1.7;
  color: rgba(23, 31, 38, .76);
  max-width: 40ch;
}

.foot-links h2 {
  font-family: var(--head);
  font-size: 1rem;
  font-weight: 800;
  margin: 0 0 .8rem;
}

.foot-list {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.foot-list a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 .75rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: .89rem;
  color: var(--ink);
  border: 1px solid rgba(23, 31, 38, .12);
  background: linear-gradient(145deg, #f2f9fd, #e4edf5);
  box-shadow: -3px -3px 8px var(--hi), 3px 3px 9px var(--lo);
}
.foot-list li:nth-child(even) a { background: linear-gradient(145deg, #faf0f4, #f0e2ea); }
.foot-list a:active { transform: scale(.97); }

.foot-bar {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 1rem;
  border-top: 1px dashed var(--edge);
  font-size: .84rem;
  color: rgba(23, 31, 38, .68);
}

/* 动效 */
.stagger {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .52s ease, transform .52s ease;
}
.stagger.in { opacity: 1; transform: none; }

@media (min-width: 760px) {
  footer { grid-template-columns: 1.35fr 1fr; }
}

@media (min-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr) 286px; align-items: start; }
  .rail { position: sticky; top: 1.2rem; }
}

@media (max-width: 420px) {
  body { font-size: 16.5px; }
  .nav-pills a { padding: 0 .7rem; font-size: .9rem; }
  .hero { min-height: 42vh; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stagger { opacity: 1; transform: none; transition: none; }
}

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