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

:root {
  --ink: #1D1E18;
  --orange: #E4572E;
  --teal: #17BEBB;
  --cream: #FFF6EE;
  --peach: #FFD9C4;
  --muted: #6E6C63;
  --line: 2px solid #1D1E18;
  --head: 'Abril Fatface', 'Songti SC', 'Noto Serif SC', Georgia, serif;
}

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Merriweather', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.78;
  font-weight: 400;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--ink); }

menu, ol, ul { margin: 0; padding: 0; list-style: none; }

summary { cursor: pointer; }

/* ---------- 顶部条 ---------- */
.bar {
  position: relative;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  background: var(--cream);
  border-bottom: var(--line);
}

.bar-l, .bar-r {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.bar-l { justify-content: flex-end; }
.bar-r { justify-content: flex-start; }

.bar-side { display: flex; flex-wrap: nowrap; }

.bar-side a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 10px 9px;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
  border: 2px solid transparent;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease;
}

.bar-side a::before {
  content: "";
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  background: var(--teal);
  border: 2px solid var(--ink);
}

.bar-side a:hover,
.bar-side a:focus-visible {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}

.bar-side a:hover::before,
.bar-side a:focus-visible::before { background: var(--orange); border-color: var(--cream); }

.bar-c { text-align: center; }

.brand {
  display: inline-block;
  padding: 6px 10px;
  font-family: var(--head);
  font-size: clamp(18px, 2.1vw, 26px);
  line-height: 1.15;
  letter-spacing: .02em;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 4px solid var(--teal);
  transition: color .16s ease, border-color .16s ease;
}

.brand:hover, .brand:focus-visible { color: var(--orange); border-color: var(--orange); }

.search { display: flex; gap: 0; margin-left: 8px; }

.search input {
  width: 118px;
  min-height: 44px;
  padding: 8px 10px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--ink);
  border-right: 0;
  border-radius: 0;
}

.search input::placeholder { color: var(--muted); }

.search button {
  min-height: 44px;
  padding: 8px 12px;
  font: inherit;
  font-size: 16px;
  color: var(--cream);
  background: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 0;
  cursor: pointer;
  transition: background-color .16s ease;
}

.search button:hover { background: var(--orange); border-color: var(--orange); color: #fff; }

/* 移动端菜单 */
.menu-d { display: none; position: relative; }

.menu-d > summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 14px;
  font-size: 16px;
  background: var(--teal);
  border: 2px solid var(--ink);
  list-style: none;
}

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

.menu-d[open] > summary { background: var(--ink); color: var(--cream); }

.drop {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--cream);
  border-top: var(--line);
  border-bottom: 3px solid var(--ink);
  max-height: 74vh;
  overflow-y: auto;
  z-index: 50;
}

.drop li + li { border-top: 1px solid #E3D8CE; }

.drop a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 18px;
  font-size: 16px;
  text-decoration: none;
}

.drop a:hover, .drop a:focus-visible { background: var(--peach); }

/* ---------- 粘性锚点条 ---------- */
.strip {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--ink);
  border-bottom: 3px solid var(--teal);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.strip ol {
  display: flex;
  counter-reset: sg;
  min-width: max-content;
}

.strip li { counter-increment: sg; }

.strip a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 12px 15px;
  font-size: 16px;
  color: var(--cream);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .16s ease, color .16s ease;
}

.strip a::before {
  content: counter(sg, decimal-leading-zero);
  font-family: var(--head);
  font-size: 15px;
  letter-spacing: .08em;
  color: var(--teal);
}

.strip a:hover, .strip a:focus-visible { background: var(--orange); color: #fff; }
.strip a:hover::before, .strip a:focus-visible::before { color: #fff; }

/* ---------- 首屏 ---------- */
.hero {
  min-height: 64vh;
  display: grid;
  place-items: center;
  padding: 62px 20px 56px;
  background: var(--orange);
  border-bottom: var(--line);
  text-align: center;
}

.hero h1 {
  margin: 0;
  max-width: 17ch;
  font-family: var(--head);
  font-weight: 400;
  font-size: clamp(31px, 7.6vw, 96px);
  line-height: 1.04;
  letter-spacing: .01em;
  color: var(--cream);
  text-wrap: balance;
  word-break: break-word;
}

/* ---------- 版式 ---------- */
.wrap {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  max-width: 1180px;
  margin: 0 auto;
}

.side {
  position: sticky;
  top: 62px;
  align-self: start;
  padding: 30px 18px 30px 22px;
  border-right: var(--line);
}

.side-mark {
  margin: 0 0 16px;
  padding-left: 10px;
  border-left: 7px solid var(--teal);
  font-family: var(--head);
  font-size: 17px;
  line-height: 1.3;
}

.side-top {
  display: block;
  padding: 11px 10px;
  min-height: 44px;
  text-align: center;
  font-size: 16px;
  text-decoration: none;
  border: 2px solid var(--ink);
  transition: background-color .16s ease, color .16s ease;
}

.side-top:hover, .side-top:focus-visible { background: var(--ink); color: var(--cream); }

.panel { padding: 44px 34px 64px; min-width: 0; }

.panel > h2 {
  margin: 0 0 10px;
  font-family: var(--head);
  font-weight: 400;
  font-size: clamp(26px, 3.3vw, 40px);
  line-height: 1.12;
}

.subtitle {
  margin: 0 0 30px;
  padding-bottom: 16px;
  border-bottom: 3px solid var(--teal);
  font-size: 16px;
  line-height: 1.65;
  color: var(--muted);
}

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

.prose div {
  margin-top: 40px;
  padding-top: 36px;
  border-top: var(--line);
}

.prose div:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

.prose div[id] { scroll-margin-top: 104px; }

.prose h2 {
  margin: 0 0 14px;
  font-family: var(--head);
  font-weight: 400;
  font-size: clamp(23px, 2.9vw, 33px);
  line-height: 1.16;
}

.prose h3 {
  margin: 26px 0 10px;
  font-family: var(--head);
  font-weight: 400;
  font-size: 21px;
  line-height: 1.25;
}

.prose p { margin: 0 0 18px; }

.prose p:last-child { margin-bottom: 0; }

.prose a {
  color: #B93A17;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}

.prose a:hover { color: var(--teal); }

.prose ul, .prose ol {
  margin: 0 0 18px;
  padding-left: 1.3em;
  list-style: disc;
}

.prose ol { list-style: decimal; }

.prose li { margin-bottom: 8px; }

.prose li::marker { color: var(--orange); font-weight: 700; }

.prose blockquote {
  margin: 24px 0;
  padding: 16px 20px;
  background: var(--peach);
  border-left: 8px solid var(--teal);
}

.prose blockquote p:last-child { margin-bottom: 0; }

.prose img {
  margin: 22px 0;
  border: 2px solid var(--ink);
}

.prose figure { margin: 22px 0; }

.prose figcaption {
  margin-top: 8px;
  font-size: 16px;
  color: var(--muted);
}

.prose table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 16px;
  margin: 0 0 20px;
}

.prose th, .prose td {
  border: 2px solid var(--ink);
  padding: 9px 11px;
  text-align: left;
}

.prose th { background: var(--teal); }

.prose hr {
  border: 0;
  border-top: var(--line);
  margin: 30px 0;
}

.prose strong { font-weight: 700; }

/* ---------- 动效 ---------- */
.js .rv {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .45s ease, transform .45s ease;
}

.js .rv.in { opacity: 1; transform: none; }

/* ---------- 页脚 ---------- */
.foot {
  margin-top: 10px;
  background: var(--ink);
  color: var(--cream);
  border-top: 3px solid var(--ink);
}

.cta { background: var(--teal); border-bottom: 3px solid var(--ink); }

.cta a {
  display: block;
  padding: 42px 20px;
  text-align: center;
  font-family: var(--head);
  font-size: clamp(30px, 6vw, 62px);
  line-height: 1.1;
  letter-spacing: .04em;
  color: var(--ink);
  text-decoration: none;
  transition: background-color .18s ease, color .18s ease;
}

.cta a:hover, .cta a:focus-visible { background: var(--orange); color: var(--cream); }

.foot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 38px 22px;
}

.foot address {
  font-style: normal;
  font-family: var(--head);
  font-size: clamp(20px, 2.5vw, 28px);
  line-height: 1.28;
  color: var(--cream);
}

.foot-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
  align-content: start;
}

.foot-links a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 0;
  font-size: 16px;
  color: var(--cream);
  text-decoration: none;
  border-bottom: 1px solid #3a3b34;
  transition: color .16s ease;
}

.foot-links a:hover, .foot-links a:focus-visible { color: var(--teal); }

.copy {
  margin: 0;
  padding: 14px 22px 28px;
  text-align: center;
  font-size: 16px;
  color: #B9B7AC;
  border-top: 1px solid #3a3b34;
}

/* ---------- 断点 ---------- */
@media (max-width: 980px) {
  .bar { grid-template-columns: auto 1fr auto; padding: 8px 12px; gap: 8px; }
  .bar-l { justify-content: flex-start; }
  .bar-a, .bar-b, .search { display: none; }
  .menu-d { display: block; }
  .wrap { grid-template-columns: minmax(0, 1fr); }
  .side {
    position: static;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 16px;
    border-right: 0;
    border-bottom: var(--line);
  }
  .side-mark { margin: 0; font-size: 16px; border-left-width: 5px; }
  .side-top { padding: 10px 12px; white-space: nowrap; }
  .panel { padding: 28px 16px 48px; }
  .hero { min-height: 56vh; padding: 48px 18px 44px; }
  .foot-grid { grid-template-columns: minmax(0, 1fr); padding: 30px 18px; }
  .cta a { padding: 32px 18px; }
}

@media (max-width: 420px) {
  .foot-links { grid-template-columns: minmax(0, 1fr); }
  .cta a { font-size: 28px; }
}

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

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