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

:root {
  --ink: #1f1f1f;
  --paper: #ffffff;
  --mist: #f5f5f5;
  --soft: #d8d8d8;
  --mute: #565656;
  --serif: 'Cormorant', 'Songti SC', 'Noto Serif SC', Georgia, serif;
  --sans: 'Montserrat', system-ui, -apple-system, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --dock: 64px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.78;
  letter-spacing: 0.01em;
  font-weight: 400;
  padding-bottom: calc(var(--dock) + 40px + env(safe-area-inset-bottom, 0px));
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; }

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

.frame-wrap { display: block; }

/* ---------- 左侧栏 ---------- */
.rail {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--soft);
  background: var(--paper);
}

.rail-k {
  margin: 0 0 10px;
  font-size: 15px;
  letter-spacing: 0.18em;
  color: var(--mute);
}

.rail-list {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.rail-list::-webkit-scrollbar { display: none; }

.rail-list a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 4px 12px;
  border: 1px solid var(--soft);
  text-decoration: none;
  font-size: 15px;
  white-space: nowrap;
  line-height: 1.3;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.rail-list a:hover { background: var(--mist); border-color: var(--ink); }
.rail-list a[aria-current='true'] { border-color: var(--ink); background: var(--mist); }

.rail-list .num {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.16em;
  color: var(--mute);
}

/* ---------- 主容器 ---------- */
.main {
  display: block;
  padding: 0 20px;
  max-width: 1220px;
  margin: 0 auto;
}

.doc { display: block; }

/* ---------- 头图 ---------- */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 45vh;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  background-color: var(--mist);
  background-image:
    repeating-linear-gradient(0deg, transparent 0 47px, rgba(31, 31, 31, 0.055) 47px 48px),
    repeating-linear-gradient(90deg, transparent 0 47px, rgba(31, 31, 31, 0.055) 47px 48px);
  border-bottom: 1px solid var(--ink);
}

.hero-art { position: absolute; inset: 0; }
.hero-art img,
.hero-img { width: 100%; height: 100%; object-fit: cover; }

.hero-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.9) 52%, rgba(255, 255, 255, 0.96) 100%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 640px;
  margin-left: auto;
  padding: 52px 0 30px;
  text-align: right;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 15px;
  letter-spacing: 0.26em;
  color: var(--mute);
}

h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(30px, 6.4vw, 58px);
  line-height: 1.12;
  letter-spacing: 0.005em;
  margin: 0 0 16px;
}

.lead {
  margin: 0 0 0 auto;
  max-width: 44ch;
  font-size: 16px;
  color: var(--mute);
  line-height: 1.7;
}

/* ---------- 标题与副标题 ---------- */
h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(24px, 3.6vw, 36px);
  line-height: 1.24;
  margin: 0 0 10px;
}

.subtitle {
  color: var(--mute);
  font-size: 16px;
  max-width: 62ch;
  margin: 0 0 28px;
}

/* ---------- Bento 网格 ---------- */
.intro { padding: 44px 0 6px; }

.bento {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(132px, auto);
  gap: 12px;
  margin: 0 0 40px;
}

.tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: 18px 16px;
  border: 1px solid var(--ink);
  background: var(--paper);
  text-decoration: none;
  transition: background 0.22s ease, transform 0.22s ease, opacity 0.5s ease var(--d, 0s);
}

.tile:hover,
.tile:focus-visible {
  background: var(--mist);
  transform: scale(1.02);
}

.t-a { grid-column: span 2; grid-row: span 2; background: var(--mist); }
.t-c { grid-column: span 2; }

.tile-n {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.2em;
  color: var(--mute);
}

.tile-t {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 21px;
  line-height: 1.28;
}

.t-a .tile-t { font-size: clamp(23px, 3.2vw, 30px); }

.tile-d { font-size: 15px; line-height: 1.62; color: var(--mute); }

/* ---------- 正文各栏目 ---------- */
section > div[id] {
  padding: 42px 0;
  border-bottom: 1px solid var(--soft);
  scroll-margin-top: 20px;
}

section > div[id] h2 { margin-top: 0; }

section > div[id] h3 {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.35;
  margin: 30px 0 8px;
}

section > div[id] p { max-width: 68ch; }
section > div[id] ul,
section > div[id] ol { padding-left: 22px; max-width: 68ch; margin: 0 0 1em; }
section > div[id] li { margin: 0.35em 0; }

section > div[id] a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

section > div[id] table {
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
  width: 100%;
  margin: 0 0 1.2em;
  font-size: 16px;
}

section > div[id] th,
section > div[id] td {
  border: 1px solid var(--soft);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

section > div[id] th { background: var(--mist); font-weight: 600; }

section > div[id] blockquote {
  margin: 0 0 1.2em;
  padding: 4px 0 4px 18px;
  border-left: 1px solid var(--ink);
  color: var(--mute);
  max-width: 64ch;
}

/* ---------- 收尾 ---------- */
.closing { padding: 54px 0 30px; }

.go {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-size: 16px;
  letter-spacing: 0.06em;
  transition: background 0.22s ease, color 0.22s ease;
}

.go:hover { background: transparent; color: var(--ink); }

/* ---------- 页脚 ---------- */
.foot {
  margin-top: 56px;
  padding: 44px 20px 24px;
  background: var(--mist);
  border-top: 1px solid var(--ink);
}

.foot-in {
  max-width: 1220px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

.fcol h3 {
  font-size: 15px;
  letter-spacing: 0.2em;
  font-weight: 500;
  margin: 0 0 12px;
  color: var(--mute);
  font-family: var(--sans);
}

.fmark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 10px;
}

.mark { width: 24px; height: 24px; object-fit: contain; }

.fdesc { font-size: 16px; color: var(--mute); max-width: 34ch; }

.flist { list-style: none; padding: 0; }

.flist a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 2px 0;
  text-decoration: none;
  font-size: 16px;
  border-bottom: 1px solid transparent;
}

.flist a:hover { border-bottom-color: var(--ink); }

.faddr {
  font-style: normal;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 16px;
  color: var(--mute);
}

.subs-l { display: block; font-size: 16px; color: var(--mute); margin-bottom: 10px; }
.subs-row { display: flex; gap: 8px; flex-wrap: wrap; }

.subs input {
  flex: 1 1 160px;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
}

.subs button {
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.subs button:hover { background: transparent; color: var(--ink); }

.subs-msg { margin: 10px 0 0; font-size: 15px; color: var(--mute); min-height: 1.4em; }

.foot-bottom {
  max-width: 1220px;
  margin: 34px auto 0;
  padding-top: 16px;
  border-top: 1px solid var(--soft);
}

.foot-bottom p { margin: 0; font-size: 15px; color: var(--mute); }

/* ---------- 底部固定导航 ---------- */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid var(--ink);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.docknav {
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: 1220px;
  margin: 0 auto;
  overflow-x: auto;
  scrollbar-width: none;
}

.docknav::-webkit-scrollbar { display: none; }

.dock ul { display: flex; gap: 2px; list-style: none; padding: 0; flex: 1 0 auto; }
.dock ul.dock-l { justify-content: flex-end; }
.dock ul.dock-r { justify-content: flex-start; }

.dock ul a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.dock ul a:hover { border-bottom-color: var(--ink); }

.dock .brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
}

.dock .cta {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  padding: 0 16px;
  margin-left: 6px;
  border-bottom-width: 1px;
  transition: background 0.2s ease, color 0.2s ease;
}

.dock .cta:hover { background: transparent; color: var(--ink); border-bottom-color: var(--ink); }

/* ---------- 入场 ---------- */
html.js .rv { opacity: 0; }
html.js .rv.in { opacity: 1; }

section > div[id] { transition: opacity 0.55s ease; }

html.js section > div[id] { opacity: 0; }
html.js section > div[id].in { opacity: 1; }

/* ---------- 桌面 ---------- */
@media (min-width: 780px) {
  body { --dock: 68px; }
  .main { padding: 0 40px; }
  .hero-copy { padding: 64px 0 40px; }
  .bento { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(146px, auto); gap: 16px; }
  .foot { padding: 56px 40px 28px; }
  .foot-in { grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 44px; }
  .dock ul a { font-size: 16px; padding: 0 12px; }
}

@media (min-width: 960px) {
  .frame-wrap { display: block; }
  .main { margin: 0 auto; }
}

@media (min-width: 1000px) {
  body { padding-bottom: calc(var(--dock) + 56px); }

  .page-outer { display: block; }

  .rail {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100vh;
    padding: 32px 24px;
    border-bottom: 0;
    border-right: 1px solid var(--soft);
    overflow-y: auto;
    background: var(--paper);
  }

  .rail-list { flex-direction: column; gap: 0; overflow: visible; }

  .rail-list a {
    width: 100%;
    border: 0;
    border-top: 1px solid var(--soft);
    padding: 12px 0;
    min-height: 46px;
  }

  .rail-list li:last-child a { border-bottom: 1px solid var(--soft); }

  .rail-list a:hover { background: var(--mist); }
  .rail-list a[aria-current='true'] { background: var(--mist); }

  .main {
    margin-left: 250px;
    max-width: none;
    padding: 0 56px;
  }

  .doc { max-width: 900px; }

  .foot { margin-left: 250px; }
}

@media (min-width: 1360px) {
  .main { padding: 0 72px; }
  .doc { max-width: 980px; }
}

/* ---------- 动效收敛 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
  html.js .rv,
  html.js section > div[id] { opacity: 1; }
  .tile:hover { transform: none; }
}

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