/* Palette follows the approved BQL theme. No downloaded fonts or assets. */
:root {
  color-scheme: light;
  --canvas: #f4f7f6;
  --paper: #fff;
  --ink: #18211f;
  --muted: #59645f;
  --line: #d5deda;
  --accent: #2f625c;
  --tint: #dceae6;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent); text-underline-offset: .22em; overflow-wrap: anywhere; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.skip-link { position: absolute; left: 1rem; top: -5rem; background: white; padding: .75rem; z-index: 5; }
.skip-link:focus { top: 1rem; }
.site-header {
  max-width: 78rem; margin: 0 auto; padding: 1.8rem 2.5rem;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.wordmark { display: flex; flex-wrap: wrap; gap: .75rem; align-items: baseline; font-size: 1.2rem; font-weight: 650; color: var(--ink); text-decoration: none; }
.wordmark span { font-size: .88rem; color: var(--muted); font-weight: 400; }
.edition { color: var(--muted); font-size: .86rem; white-space: nowrap; }
.layout { max-width: 78rem; margin: auto; display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 2.5rem; padding: .7rem 2.5rem 3rem; }
.sidebar { padding: 1rem 0; }
.sidebar nav { position: sticky; top: 1.5rem; max-height: calc(100vh - 3rem); overflow-y: auto; padding: 0 .4rem 1rem 0; }
.nav-group { margin: 1.6rem 0 .55rem .85rem; color: var(--muted); font-size: .85rem; letter-spacing: .07em; }
.nav-group:first-child { margin-top: 0; }
.sidebar a, .mobile-nav nav a { display: block; padding: .6rem .85rem; margin: .12rem 0; font-size: .94rem; line-height: 1.55; color: var(--muted); border-left: 2px solid transparent; text-decoration: none; }
.sidebar a:hover, .mobile-nav nav a:hover { color: var(--ink); background: #eaf0ed; }
.sidebar a[aria-current], .mobile-nav nav a[aria-current] { border-left-color: var(--accent); color: var(--accent); background: var(--tint); font-weight: 600; border-radius: 0 .45rem .45rem 0; }
.reading-area { min-width: 0; }
main { background: var(--paper); border: 1px solid var(--line); border-radius: .8rem; padding: clamp(1.35rem, 4vw, 3.5rem); }
main:focus { outline: none; }
.document-header { padding: 0 0 1.9rem; border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 .85rem; color: var(--accent); font-size: .875rem; letter-spacing: .1em; }
h1 { font-family: "Songti SC", "Noto Serif CJK SC", "STSong", serif; font-size: clamp(1.8rem, 3.2vw, 2.55rem); font-weight: 600; line-height: 1.45; letter-spacing: .015em; margin: 0 0 1rem; text-wrap: balance; }
.document-meta { display: flex; flex-wrap: wrap; gap: .35rem 1rem; margin: 0; font-size: .85rem; line-height: 1.8; color: var(--muted); font-variant-numeric: tabular-nums; }
.source-link { display: inline-block; margin-top: .85rem; font-size: .875rem; }
.intro { color: var(--muted); line-height: 1.9; margin: 1.2rem 0 0; font-size: 1rem; }
.contents { border-bottom: 1px solid var(--line); padding: 1rem 0; font-size: .94rem; }
summary { cursor: pointer; color: var(--accent); line-height: 1.7; padding: .25rem 0; }
.contents ol { columns: 2; padding-left: 1.25rem; margin: .75rem 0 .35rem; }
.contents li { break-inside: avoid; padding: .3rem .5rem .3rem 0; }
.document-body { font-size: 1rem; line-height: 1.95; overflow-wrap: anywhere; }
.document-body > :first-child { margin-top: 1.6rem; }
.document-body p { margin: 1rem 0; }
.document-body h2 { font-size: 1.25rem; font-weight: 650; margin: 2.7rem 0 1rem; line-height: 1.6; scroll-margin-top: 2rem; }
.document-body h3 { font-size: 1.07rem; margin: 1.9rem 0 .7rem; font-weight: 600; scroll-margin-top: 2rem; }
.document-body ul, .document-body ol { padding-left: 1.45rem; }
.document-body li { padding-left: .15rem; margin: .6rem 0; }
.document-body strong { font-weight: 650; }
.document-body blockquote { margin: 1.4rem 0; padding: .25rem 1rem; border-left: 3px solid var(--accent); color: var(--muted); background: var(--canvas); }
.document-body code { font-size: .9em; font-family: ui-monospace, Menlo, Consolas, monospace; background: var(--canvas); padding: .1rem .3rem; border-radius: .25rem; word-break: break-word; }
.table-scroll { overflow-x: auto; margin: 1.4rem 0; border: 1px solid var(--line); border-radius: .45rem; }
table { border-collapse: collapse; width: 100%; min-width: 36rem; font-size: .9rem; line-height: 1.8; }
th, td { text-align: left; padding: .85rem 1rem; vertical-align: top; border-bottom: 1px solid var(--line); min-width: 8rem; }
th { background: var(--canvas); font-weight: 600; color: var(--accent); }
td { color: #34423d; }
tbody tr:last-child td { border-bottom: none; }
.pending-field { background: #fff0cc; color: #6a4812; padding: .08rem .18rem; border-radius: .2rem; }
.directory-group { margin-top: 2.2rem; }
.directory-group h2 { font-size: .9rem; letter-spacing: .08em; color: var(--muted); font-weight: 500; margin-bottom: .6rem; }
.directory-group ul { list-style: none; padding: 0; margin: 0; }
.directory-group li { border-bottom: 1px solid var(--line); }
.directory-group li:last-child { border-bottom: 0; }
.directory-group a { display: block; padding: 1.1rem .2rem; text-decoration: none; }
.directory-group a span { display: block; font-size: 1.12rem; color: var(--ink); line-height: 1.6; }
.directory-group a:hover span { color: var(--accent); }
.directory-group small { display: block; margin-top: .2rem; font-size: .9rem; line-height: 1.7; color: var(--muted); }
.site-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .6rem; color: var(--muted); font-size: .85rem; line-height: 1.7; padding: 1.4rem .1rem; }
.mobile-nav { display: none; }
@media (max-width: 850px) {
  .site-header { padding: 1.2rem 1.1rem; align-items: start; }
  .wordmark { font-size: 1.08rem; gap: .1rem; flex-direction: column; }
  .wordmark span { font-size: .8rem; }
  .edition { font-size: .8rem; padding-top: .15rem; white-space: normal; text-align: right; }
  .layout { display: block; padding: 0 .75rem 1.5rem; }
  .sidebar { display: none; }
  .mobile-nav { display: block; background: #eaf0ed; border: 1px solid var(--line); border-radius: .6rem; margin-bottom: .85rem; padding: .6rem .85rem; }
  .mobile-nav summary { padding: .25rem 0; font-size: .95rem; }
  .mobile-nav nav { padding-top: .9rem; }
  main { padding: 1.55rem 1.15rem; }
  h1 { font-size: 1.9rem; }
  .document-meta { gap: .2rem .8rem; }
  .document-header { padding-bottom: 1.5rem; }
  .contents ol { columns: 1; }
  .document-body { line-height: 1.95; }
  .document-body h2 { margin-top: 2.3rem; }
  .table-scroll { margin: 1.2rem 0; }
  table { min-width: 34rem; }
  th, td { padding: .7rem .8rem; }
  .site-footer { padding: 1.2rem .35rem; }
}
@media print {
  :root { background: white; color: black; }
  .site-header, .sidebar, .mobile-nav, .contents, .source-link, .site-footer, .skip-link { display: none !important; }
  .layout { display: block; padding: 0; margin: 0; max-width: none; }
  main { border: 0; padding: 0; border-radius: 0; }
  .document-body { font-size: 10.5pt; line-height: 1.7; }
  h1 { font-size: 21pt; }
  .table-scroll { overflow: visible; }
  table { min-width: 0; width: 100%; font-size: 8.5pt; }
  th, td { min-width: 0; padding: .4rem; }
  h2, h3 { break-after: avoid; }
  tr, .document-header { break-inside: avoid; }
  a { color: inherit; }
  .pending-field { background: white; border: 1px dashed #555; }
}
