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

:root {
  --ink: #171f26;
  --panel: #1d272f;
  --panel-2: #22303a;
  --blue: #c8e0f4;
  --pink: #f5e0e8;
  --text: #dde7f0;
  --muted: #9db0c0;
  --line: rgba(200, 224, 244, 0.14);
  --sh-out: -6px -6px 16px rgba(255, 255, 255, 0.05), 7px 9px 20px rgba(0, 0, 0, 0.55);
  --sh-out-sm: -3px -3px 9px rgba(255, 255, 255, 0.055), 4px 5px 12px rgba(0, 0, 0, 0.5);
  --sh-in: inset -4px -4px 10px rgba(255, 255, 255, 0.05), inset 5px 6px 14px rgba(0, 0, 0, 0.45);
  --r: 14px;
  --r-card: 4px;
  --serif: 'Playfair Display', 'Songti SC', 'Times New Roman', serif;
}

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

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: Inter, 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.8;
  background-image:
    radial-gradient(900px 520px at 10% -10%, rgba(200, 224, 244, 0.10), transparent 62%),
    radial-gradient(700px 440px at 94% 2%, rgba(245, 224, 232, 0.09), transparent 64%);
  background-attachment: fixed;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.25;
  color: var(--blue);
  letter-spacing: 0.01em;
}

p { margin: 0 0 14px; }
img { max-width: 100%; height: auto; }
menu, ul { list-style: none; margin: 0; padding: 0; }
figure { margin: 0; }
a { color: var(--blue); }
button, summary, a { -webkit-tap-highlight-color: transparent; }

.page { display: block; }

/* 顶部 */
.topbar {
  position: relative;
  z-index: 20;
  padding: 14px 20px 6px;
  background: rgba(23, 31, 38, 0.94);
}

.brandline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  max-width: 1080px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 46px;
  text-decoration: none;
  color: var(--blue);
}

.logo {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(145deg, #d9e9f8, #b4cde4);
  color: #17212a;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
  box-shadow: var(--sh-out-sm);
}

.brandname {
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: 0.08em;
}

.call {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 16px;
  color: var(--pink);
  text-decoration: none;
  background: linear-gradient(145deg, #24313c, #1a232b);
  box-shadow: var(--sh-out-sm);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.call.static { max-width: 52%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 0 3px rgba(245, 224, 232, 0.16);
}

.call:active { transform: scale(0.97); box-shadow: var(--sh-in); }

.navrow { max-width: 1080px; margin: 12px auto 0; }

.nav { position: relative; }

.nav > summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  cursor: pointer;
  list-style: none;
  font-size: 16px;
  color: var(--blue);
  background: linear-gradient(145deg, #24313c, #1a232b);
  box-shadow: var(--sh-out-sm);
}

.nav > summary::-webkit-details-marker { display: none; }

.bars,
.bars::before,
.bars::after {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--blue);
}

.bars::before,
.bars::after { content: ''; }
.bars::before { transform: translateY(-5px); }
.bars::after { transform: translateY(3px); }

.nav > menu {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.nav > menu > li > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 16px;
  color: var(--text);
  text-decoration: none;
  background: linear-gradient(145deg, #222f39, #19222a);
  box-shadow: var(--sh-out-sm);
  transition: transform 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.nav > menu > li > a:hover { color: var(--blue); }
.nav > menu > li > a:active { transform: scale(0.97); box-shadow: var(--sh-in); }

/* 主体 */
main { display: block; }

.wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 22px 20px 56px;
}

.rail {
  order: 2;
  padding: 18px 16px;
  border-radius: var(--r);
  background: linear-gradient(145deg, #1f2a33, #171f26);
  box-shadow: var(--sh-in);
}

.rail-h {
  margin: 0 0 6px;
  font-size: 20px;
}

.subtitle {
  margin: 0 0 16px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--muted);
}

.toc { display: grid; gap: 6px; }

.toc > li > a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 16px;
  color: var(--text);
  text-decoration: none;
  background: linear-gradient(145deg, #24313c, #1a232b);
  box-shadow: var(--sh-out-sm);
}

.toc > li > a:hover { color: var(--blue); }
.toc > li > a:active { box-shadow: var(--sh-in); transform: scale(0.98); }

.board { order: 1; }

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 45vh;
  padding: 6px 4px 26px;
}

.hero.tight { min-height: 32vh; }

.hero-copy h1 {
  margin: 0;
  font-size: clamp(29px, 5.4vw, 46px);
  color: #eaf3fb;
}

.hero-fig { flex: 0 0 auto; }

.mark {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(145deg, #daeaf9, #b3cce3);
  color: #17212a;
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 700;
  box-shadow: var(--sh-out);
  animation: bob 7s ease-in-out infinite;
}

.hero-art {
  width: 150px;
  border-radius: 16px;
  box-shadow: var(--sh-out);
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* 正文 */
.prose { display: block; }

.prose > article {
  max-width: 72ch;
  margin: 0 0 22px;
  padding: 22px 20px 8px;
  border-radius: var(--r-card);
  background: linear-gradient(150deg, #1f2a33, #1a222a);
  box-shadow: var(--sh-out);
  scroll-margin-top: 24px;
}

.prose > article::after {
  content: '';
  display: block;
  height: 2px;
  margin: 16px 0 14px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--blue), var(--pink));
  opacity: 0.55;
}

.prose > article > h2 {
  margin: 0 0 6px;
  font-size: clamp(21px, 2.6vw, 26px);
}

.prose > article > h2 + p { color: var(--muted); font-size: 16px; }

.prose > article p { font-size: 17px; line-height: 1.85; }

.prose > article ul,
.prose > article ol {
  margin: 0 0 16px;
  padding-left: 22px;
}

.prose > article ul { list-style: none; padding-left: 0; }

.prose > article ul > li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
}

.prose > article ul > li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 13px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pink);
}

.prose > article ol { list-style: decimal; }
.prose > article ol > li { margin-bottom: 8px; }

.prose a {
  color: var(--blue);
  text-underline-offset: 3px;
  text-decoration-color: rgba(200, 224, 244, 0.5);
}

.prose strong { color: #f2f8fd; }

.prose blockquote {
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: var(--r-card);
  background: linear-gradient(150deg, #22303a, #1b242c);
  box-shadow: var(--sh-in);
  color: var(--muted);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  font-size: 16px;
}

.prose th, .prose td {
  padding: 9px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.prose code {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace;
  font-size: 15px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
}

/* 页脚 */
footer {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 20px 26px;
  border-top: 1px solid var(--line);
}

.fcols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

address { font-style: normal; }

.fbrand {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--pink);
  letter-spacing: 0.08em;
}

.fcol ul { display: grid; gap: 2px; }

.fcol a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 16px;
  color: var(--muted);
  text-decoration: none;
}

.fcol a:hover { color: var(--blue); }

.fbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.copy {
  margin: 0;
  font-size: 16px;
  color: var(--muted);
}

.fbar ul { display: flex; flex-wrap: wrap; gap: 16px; }

.fbar a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 16px;
  color: var(--muted);
  text-decoration: none;
}

.fbar a:hover { color: var(--pink); }

/* 滚动显示 */
.reveal {
  opacity: 0;
  transform: translateY(16px);
}

.reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity 520ms ease, transform 520ms ease;
}

@media (min-width: 880px) {
  .topbar {
    position: sticky;
    top: 0;
    padding-bottom: 12px;
    background: rgba(23, 31, 38, 0.92);
    backdrop-filter: blur(10px);
  }

  .nav > summary { display: none; }

  .wrap {
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 34px;
    padding-top: 30px;
  }

  .rail { order: 1; position: sticky; top: 148px; align-self: start; }
  .board { order: 2; }

  .prose > article { scroll-margin-top: 148px; }

  .fcols { grid-template-columns: 1.2fr 1fr 1fr; gap: 28px; }
}

@media (max-width: 879px) {
  .nav > menu { margin-top: 12px; }

  .nav[open] > menu { flex-direction: column; }

  .nav > menu > li > a { width: 100%; }

  .mark { width: 78px; height: 78px; font-size: 33px; }
  .hero-art { width: 110px; }
}

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

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