:root {
  color-scheme: light;
  --ink: #24292f;
  --muted: #57636d;
  --line: #d7dce1;
  --wash: #f6f7f9;
  --gold: #816421;
  --gold-line: #b19a60;
  --blue: #2160ad;
  --serif: "Noto Serif SC", "Songti SC", SimSun, serif;
}

*, *::before, *::after { box-sizing: border-box }
body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font: 16px/1.75 "Microsoft YaHei", "PingFang SC", sans-serif;
  overflow-wrap: anywhere;
}
.wrap { width: min(1120px, calc(100% - 80px)); margin-inline: auto }
a { color: var(--blue); text-underline-offset: .18em }
a:hover { text-decoration: underline }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px }
[hidden] { display: none !important }
:where(h2, h3, h4, section)[id] { scroll-margin-top: 1rem }
.site-header { border-top: 3px solid var(--gold); border-bottom: 1px solid var(--line) }
.bar, .brand, .topnav, .meta, .crumbs { display: flex; align-items: center }
.bar { justify-content: space-between; gap: 1.25rem; min-height: 66px }
.brand { gap: .85rem; color: var(--ink); text-decoration: none }
.brand b, .brand strong { font: 700 24px Georgia, serif; letter-spacing: .025em }
.brand span { border-left: 1px solid var(--line); padding-left: .85rem; font-size: 14px }
.topnav { gap: 1.3rem; flex-wrap: wrap }
.topnav a { padding-block: .45rem; color: var(--muted); font-size: 14px; text-decoration: none }
.topnav a:hover, .topnav a[aria-current="page"] { color: var(--gold); text-decoration: underline }
.crumbs { flex-wrap: wrap; gap: .2rem .5rem; margin-block: 19px 0; color: var(--muted); font-size: 13px }
.crumbs a { text-decoration: none }
.crumbs a:hover { text-decoration: underline }
.mast { padding-block: 2rem 1.35rem; border-bottom: 1px solid var(--line) }
.kicker, .module-no { color: var(--gold); font-size: 13px; font-weight: 700; letter-spacing: .07em }
.kicker::before { content: ""; display: inline-block; width: 22px; margin: 0 .65rem .25em 0; border-top: 2px solid }
h1 { margin: .6rem 0 1rem; font: 700 clamp(34px, 4.1vw, 53px)/1.32 var(--serif); text-wrap: balance }
.mast p { max-width: 50em; margin: .7rem 0; line-height: 1.85 }
.meta { flex-wrap: wrap; gap: .3rem 1.1rem; margin-top: 1rem; color: var(--muted); font-size: 13px }
.chapter-art { display: block; max-width: 100%; height: auto; margin: 1.3rem 0 0 }
.home-feature { display: grid; grid-template-columns: minmax(250px, 1fr) minmax(0, 2.3fr); grid-template-rows: 1fr 1fr; gap: 1rem 2rem; align-items: end; padding-block: 2rem; border-bottom: 1px solid var(--line) }
.home-feature .mast { padding: 0; border: 0 }
.home-feature h1 { font-size: clamp(28px, 2.6vw, 38px) }
.home-feature h1 span { display: block }
.system-map { grid-column: 2; grid-row: 1 / 3; align-self: center; margin: 0 }
.system-map img { display: block; width: 100%; height: auto; border: 1px solid var(--line) }
.system-map figcaption { text-align: right }
.map-links { align-self: start; display: flex; flex-wrap: wrap; gap: .45rem .9rem; padding-top: .75rem; border-top: 1px solid var(--line); font-size: 14px }
@media (max-width: 860px) {
  .home-feature { display: flex; flex-direction: column; align-items: stretch; gap: 1rem; padding-block: 1.25rem }
  .map-links { align-self: stretch }
}
img.chapter-art, .chapter-art img { display: block; max-width: 100%; max-height: 240px; width: auto; height: auto; border: 1px solid var(--line) }
figcaption { margin-top: .4rem; color: var(--muted); font-size: 13px }
.section-title, .group h2 { margin: 2.25rem 0 .9rem; padding-bottom: .5rem; border-bottom: 1px solid var(--line); font-size: 23px; line-height: 1.5 }
.modules { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 1.35rem 0 }
.module-card {
  display: block; position: relative; min-width: 0; padding: 1rem 1.15rem;
  border: 1px solid var(--line); color: var(--ink); text-decoration: none;
}
.module-card::before { content: ""; position: absolute; top: -1px; left: -1px; width: 36px; border-top: 3px solid var(--gold-line) }
.module-card:hover { border-color: var(--gold-line); background: #fbfbf9; text-decoration: none }
.module-card :is(h2,h3,strong) { display: block; margin: .3rem 0 .45rem; font-size: 20px; line-height: 1.5 }
.module-card p { margin: .4rem 0; font-size: 14px; line-height: 1.7; color: var(--muted) }
.module-no { display: block; margin-bottom: .3rem }
.module-card small { display: block; margin-top: .8rem; color: var(--muted); font-size: 12px }
.module-card:first-child {
  grid-column: 1 / -1; display: flex; align-items: baseline; gap: .5rem 1.2rem;
  padding-block: .7rem; background: #fbfaf7;
}
.module-card:first-child :is(.module-no,h3,p,small) { margin: 0 }
.module-card:first-child small { margin-inline-start: auto }
.opening { padding-block: 1.35rem 0 }
.opening > p { max-width: 57rem }
.opening > table { margin-top: 1.25rem }
.opening > table :is(td,th):nth-child(2) { white-space: nowrap }
.article-lead {
  display: grid; grid-template-columns: minmax(0,1fr) minmax(200px,27%);
  align-items: center; gap: clamp(1.5rem,5vw,4.5rem); padding-block: 1.5rem;
  border-bottom: 1px solid var(--line);
}
.lead-text { min-width: 0; font-size: 17px; line-height: 1.85 }
.lead-text > :first-child { margin-top: 0 }
.lead-text > :last-child { margin-bottom: 0 }
.lead-text h2 { color: var(--gold); font-size: 14px; letter-spacing: .07em }
.lead-text p { margin: .65rem 0 }
.article-lead .chapter-art { margin: 0 }
.article-lead .chapter-art img { width: 100%; height: auto }
.group { margin-block: 2rem }
.layout .group:first-of-type, .layout .group:first-of-type > h2 { margin-top: 0 }
.catalog-module { margin-bottom: .5rem; border: 1px solid var(--line) }
.catalog-module summary {
  display: flex; justify-content: space-between; align-items: center; padding: .75rem 1rem;
  cursor: pointer; color: var(--ink); background: var(--wash); font-weight: 600;
}
.catalog-module summary::-webkit-details-marker { display: none }
.catalog-module summary::after { content: "＋"; margin-left: .75rem; font-weight: 400; color: var(--gold) }
.catalog-module[open] summary::after { content: "−" }
.catalog-module[open] summary { border-bottom: 1px solid var(--line) }
.catalog-module .group { margin: 1.25rem 1rem }
.catalog-module .group h3 { font-size: 16px; line-height: 1.65; margin: 0 0 .3rem }
.catalog-module .entry-list { margin: 0 }
.catalog-module .entry-list a { font-size: 15px; font-weight: 400 }
.entry-list, .search-results { list-style: none; padding: 0 }
.entry-list li, .search-results li { border-bottom: 1px solid var(--line); padding: .7rem 0 }
.entry-list a, .search-results a { font-weight: 600; text-decoration: none }
.entry-list a:hover, .search-results a:hover { text-decoration: underline }
.entry-list p, .search-results p { margin: .25rem 0 0; color: var(--muted); font-size: 14px }
.search-box { display: block; margin-block: 1rem; max-width: 48rem; font-size: 14px; color: var(--muted) }
.search-box input { display: block; margin-top: .4rem }
.search-results[role="status"] { font-size: 14px; color: var(--muted) }
.search-box input, input.search-box { max-width: 100%; width: 100%; padding: .75rem 1rem; border: 1px solid #a7b0b8; border-radius: 4px; color: var(--ink); background: white; font: inherit }
.layout { display: grid; grid-template-columns: minmax(180px, 224px) minmax(0, 736px); gap: clamp(32px, 6vw, 88px); padding: 2rem 0 3rem }
.rail { position: sticky; align-self: start; top: 1.25rem; max-height: calc(100vh - 2.5rem); overflow: auto; scrollbar-width: thin }
.rail :is(h2,h3,strong), .mobile-toc summary { display: block; margin: 0 0 .45rem; padding-bottom: .55rem; border-bottom: 1px solid var(--line); color: var(--gold); font-size: 14px; font-weight: 700 }
.rail ul, .rail ol, .mobile-toc ul, .mobile-toc ol { margin: 0; padding-left: 0; list-style: none }
.rail a, .mobile-toc a { display: block; padding-block: .32rem; color: var(--muted); font-size: 14px; line-height: 1.6; text-decoration: none }
.rail a:hover, .mobile-toc a:hover { color: var(--blue); text-decoration: underline }
.rail li :is(ul,ol), .mobile-toc li :is(ul,ol) { padding-left: 1rem }
.mobile-toc { display: none }
.prose { min-width: 0; line-height: 1.95 }
.prose > :first-child { margin-top: 0 }
.prose :is(h2,h3,h4) { line-height: 1.5 }
.prose h2 { margin: 1.9rem 0 .9rem; padding-bottom: .5rem; border-bottom: 1px solid var(--line); font-size: 23px }
.prose .mobile-toc + h2 { margin-top: 0 }
.prose h3 { margin: 1.45rem 0 .55rem; font-size: 19px }
.prose h4 { margin: 1.2rem 0 .5rem; font-size: 17px }
.prose p { margin: 0 0 1rem }
.prose :is(ol,ul) { padding-left: 1.65rem }
.prose li { margin: .35rem 0 }
.prose li::marker { color: var(--gold) }
.prose blockquote { margin: 1.25rem 0; padding: .85rem 1.2rem; background: var(--wash); border-left: 3px solid var(--gold-line) }
.prose blockquote > :last-child { margin-bottom: 0 }
.prose :where(img,svg) { max-width: 100% }
.prose table { border-collapse: collapse; width: 100%; font-size: 14px; line-height: 1.65 }
.prose :is(th,td) { padding: .55rem .7rem; border: 1px solid var(--line); vertical-align: top; text-align: left }
.prose th { background: #eaecf0 }
.prose .table-wrap { overflow-x: auto; margin: 1rem 0 }
.prose pre { overflow: auto; padding: 1rem; background: var(--wash) }
.prose :not(pre) > code { font-size: .92em; background: var(--wash); padding: .05rem .24rem }
.related { margin-top: 1.8rem }
.related a { display: inline-block; margin: .25rem .85rem .25rem 0 }
.neighbors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-block: 1.75rem }
.neighbors a { display: block; padding: .8rem 1rem; border: 1px solid var(--line); text-decoration: none; line-height: 1.65 }
.neighbors a:hover { border-color: var(--gold-line); text-decoration: underline }
.neighbors :is(small,span) { display: block }
.neighbors small { color: var(--muted); font-size: 12px }
.site-footer { margin-top: 2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px }
.site-footer .wrap, .site-footer.wrap { padding-block: 1.15rem 1.8rem }
.site-footer .bar { flex-direction: row; align-items: baseline; flex-wrap: wrap; min-height: 0 }
.rights { color: var(--muted); font-size: 13px }

@media (max-width: 860px) {
  .wrap { width: calc(100% - 44px) }
  .bar { flex-direction: column; align-items: flex-start; gap: .15rem; padding-block: .65rem .45rem }
  .topnav { gap: .2rem 1.1rem }
  .modules { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .layout { display: block; max-width: 736px; margin-inline: auto; padding-top: 1.2rem }
  .rail { display: none }
  .mobile-toc { display: block; margin: 0 0 1.2rem; border: 1px solid var(--line); background: var(--wash); padding: .55rem .9rem }
  .mobile-toc summary { display: list-item; cursor: pointer; margin: 0; padding: 0; border: 0 }
  .mobile-toc[open] summary { margin-bottom: .5rem }
  .module-card:first-child { flex-wrap: wrap }
}
@media (max-width: 720px) {
  .wrap { width: calc(100% - 36px) }
  .crumbs { margin-top: .85rem; font-size: 12px }
  .mast { padding-block: 1.45rem 1rem }
  .prose h2, .group h2, .section-title { font-size: 21px }
  .neighbors { grid-template-columns: 1fr }
  .article-lead { display: block; padding-block: 1.15rem }
  .lead-text { font-size: 16px }
  .article-lead .chapter-art { margin-top: 1rem; max-width: 320px }
  .crumbs > [aria-current="page"]:nth-child(n+5) { flex-basis: 100% }
  .crumbs > span[aria-hidden="true"]:nth-child(n+4):nth-last-child(2) { display: none }
  .opening > table { font-size: 13px }
  .opening > table :is(td,th) { padding: .5rem .4rem }
  .layout .group:first-of-type { margin-top: 1rem }
}
@media (max-width: 480px) {
  .modules { grid-template-columns: 1fr }
  .module-card, .module-card:first-child {
    display: grid; grid-template-columns: auto 1fr; align-items: baseline;
    gap: .15rem .75rem; padding: .85rem 1rem;
  }
  .module-card :is(.module-no,h3,p,small), .module-card:first-child small { margin: 0 }
  .module-card :is(p,small) { grid-column: 2 }
  .module-card small { margin-top: .35rem }
  .meta { gap: .3rem .8rem; font-size: 12px }
}
