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

:root {
  --mint: #b4fde1;
  --sky: #add8e6;
  --ink: #172620;
  --paper: #f5fffb;
  --paper2: #e9fbf5;
  --deep: #0b5f47;
  --clay: 4px 4px 0 var(--ink), inset -3px -3px 0 rgba(23, 38, 32, .14);
  --r: 22px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  overflow-x: hidden;
  font-family: 'Josefin Sans', "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 6%, var(--mint) 0, transparent 40%),
    radial-gradient(circle at 90% 3%, var(--sky) 0, transparent 36%),
    #f8fffc;
  background-attachment: fixed;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 {
  font-family: 'Cinzel', Georgia, "Songti SC", serif;
  line-height: 1.28;
  letter-spacing: .01em;
  margin: 0 0 .5em;
}

small {
  display: block;
  font-size: 15px;
  line-height: 1.6;
  font-weight: 600;
  letter-spacing: .14em;
  color: #2c7a63;
  margin-bottom: 6px;
}

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

/* ---- 顶栏：单行不换行，保证首屏短 ---- */
.top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 14px 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 auto;
  min-width: 0;
  min-height: 44px;
  padding: 4px 14px 4px 6px;
  text-decoration: none;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
  background: linear-gradient(160deg, var(--mint), #dcfff2);
  border: 3px solid var(--ink);
  border-radius: 20px;
  box-shadow: var(--clay);
}

.brand span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand .mark {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid var(--ink);
  background: var(--sky);
  object-fit: cover;
}

.more { margin-left: auto; flex: 0 0 auto; position: relative; }

.more summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 15px;
  font-size: 16px;
  font-weight: 600;
  background: var(--mint);
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: var(--clay);
}

.more summary::-webkit-details-marker { display: none; }
.more[open] summary { background: var(--sky); }

.drop {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  z-index: 45;
  width: min(80vw, 330px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: var(--r);
  box-shadow: var(--clay);
}

.drop-a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 10px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  background: var(--paper2);
  border-radius: 12px;
}

.drop-a:hover { background: var(--mint); }

.chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  font-weight: 600;
  text-decoration: none;
  background: var(--sky);
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: var(--clay);
}

.chip:hover { transform: translate(-1px, -2px); }

/* ---- 粘性锚点条 ---- */
.dock {
  position: sticky;
  top: 0;
  z-index: 30;
  margin-top: 8px;
  background: rgba(180, 253, 225, .93);
  backdrop-filter: blur(6px);
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
}

.dock-nav {
  display: flex;
  gap: 6px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 6px 14px;
  overflow-x: auto;
  scrollbar-width: none;
}

.dock-nav::-webkit-scrollbar { display: none; }

.dock-a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: 3px solid transparent;
  border-radius: 999px;
  transition: background .18s ease-out, border-color .18s ease-out;
}

.dock-a:hover,
.dock-a:focus-visible {
  background: #ffffff;
  border-color: var(--ink);
}

/* ---- 主区 ---- */
main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: 22px;
  align-items: start;
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 16px 44px;
}

/* 文书：h1 靠上，避免被推下首屏 */
.hero {
  grid-column: 1 / -1;
  position: relative;
  overflow: hidden;
  min-height: 44vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: 22px 20px 54px;
  background: linear-gradient(150deg, var(--mint), var(--sky) 68%, #d4f4ff);
  border: 3px solid var(--ink);
  border-radius: 28px 28px 60% 60% / 28px 28px 26% 26%;
  box-shadow: 6px 6px 0 var(--ink);
}

.hero-art {
  position: absolute;
  inset: -6% 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: .42;
  will-change: transform;
}

.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero h1 {
  position: relative;
  margin: 0;
  max-width: 18ch;
  font-size: clamp(28px, 6.4vw, 54px);
  font-weight: 700;
  text-shadow: 0 2px 0 rgba(255, 255, 255, .75);
}

/* ---- 正文 ---- */
div { min-width: 0; }

div article { scroll-margin-top: 84px; }

div > article {
  padding: 26px 22px;
  margin-bottom: 18px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 3px 0 rgba(23, 38, 32, .13), 0 14px 28px -18px rgba(23, 38, 32, .6);
}

div > article:nth-of-type(even) { background: var(--paper2); }

div > article h2 {
  font-size: clamp(21px, 3.4vw, 28px);
  margin-top: .1em;
}

div > article h3 { font-size: 19px; margin-top: 1.1em; }
div > article p { margin: 0 0 1em; }
div > article p:last-child { margin-bottom: 0; }
div > article ul,
div > article ol { padding-left: 1.35em; margin: 0 0 1em; }
div > article li { margin: .35em 0; }
div > article a { color: var(--deep); text-underline-offset: 3px; }
div > article strong { color: #0d3a2c; }
div > article img {
  margin: 16px 0;
  border: 3px solid var(--ink);
  border-radius: 14px;
}
div > article blockquote {
  margin: 0 0 1em;
  padding: 12px 16px;
  background: #eafff7;
  border-left: 6px solid var(--mint);
  border-radius: 10px;
}

/* ---- 侧栏 ---- */
.rail-card {
  position: sticky;
  top: 76px;
  padding: 18px;
  background: linear-gradient(180deg, #eafff7, #dcf4ff);
  border: 3px solid var(--ink);
  border-radius: var(--r);
  box-shadow: var(--clay);
}

.rail-card h2 {
  font-size: 19px;
  margin-bottom: 14px;
}

.rail-nav { display: grid; gap: 6px; }

.rail-a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 12px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  background: #ffffff;
  border: 3px solid transparent;
  border-radius: 12px;
  transition: background .18s ease-out, border-color .18s ease-out;
}

.rail-a:hover { background: var(--mint); border-color: var(--ink); }

/* ---- 页脚 ---- */
footer {
  margin-top: 10px;
  padding: 36px 16px 28px;
  color: var(--mint);
  background: var(--ink);
  border-top: 6px solid var(--mint);
}

footer a { color: inherit; }
footer small { color: #8fe3c4; }

footer > article {
  max-width: 1120px;
  margin: 0 auto 26px;
}

.f-cta {
  text-align: center;
  padding: 32px 18px;
  background: linear-gradient(160deg, rgba(180, 253, 225, .14), rgba(173, 216, 230, .14));
  border: 3px solid var(--mint);
  border-radius: 26px;
  box-shadow: 6px 6px 0 rgba(180, 253, 225, .22);
}

.f-cta h2 {
  margin: .05em 0 .7em;
  font-size: clamp(24px, 5vw, 36px);
  color: #ffffff;
}

.f-btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 26px;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
  background: var(--mint);
  border: 3px solid #0d1a15;
  border-radius: 999px;
  box-shadow: 4px 4px 0 rgba(23, 38, 32, .7);
  transition: transform .2s cubic-bezier(.34, 1.56, .64, 1);
}

.f-btn:hover { transform: translate(-1px, -3px); }

.f-nav dl {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
  margin: 0;
}

.f-nav dt {
  font-size: 14px;
  font-weight: 700;
  color: #7fd0b2;
}

.f-nav dd { margin: 0; }

.f-nav dd a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  text-decoration: none;
  border: 3px solid transparent;
  border-radius: 12px;
  transition: border-color .18s ease-out;
}

.f-nav dd a:hover { border-color: var(--mint); }

.f-bottom {
  text-align: center;
  font-size: 15px;
  color: #a9e6cf;
}

.f-bottom p { margin: 0; }

/* ---- 入场 ---- */
.js div > article {
  opacity: 0;
  transform: translateY(16px);
}

.js div > article.in {
  opacity: 1;
  transform: none;
  transition: opacity .5s ease-out, transform .55s cubic-bezier(.34, 1.56, .64, 1);
}

@media (max-width: 900px) {
  main { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .rail { order: -1; }
  .rail-card { position: static; }
  .hero {
    min-height: 0;
    padding: 18px 18px 44px;
    border-radius: 24px 24px 52% 52% / 24px 24px 18% 18%;
  }
  .drop { right: auto; left: 0; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .top { padding: 10px 12px 6px; gap: 6px; }
  .brand { font-size: 15px; gap: 6px; padding: 4px 10px 4px 5px; }
  .brand .mark { width: 26px; height: 26px; border-width: 2px; }
  .chip, .more summary { padding: 0 12px; font-size: 15px; }
  .dock-nav { padding: 6px 12px; }
  main { padding: 14px 12px 36px; }
  .hero { padding: 16px 14px 38px; }
  .hero h1 { font-size: clamp(26px, 8.4vw, 40px); }
  div > article { padding: 20px 16px; }
  div article { scroll-margin-top: 76px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js div > article { opacity: 1; transform: none; }
  .hero-art { transform: none !important; }
  * { transition: none !important; }
}

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