:root {
  --ink: #243447;
  --muted: #778797;
  --line: #e6ecf1;
  --accent: #087f77;
  --accent-soft: #e9f6f3;
  --navy: #172d42;
  --paper: #fff;
  --page: #f3f6f9;
}
* { box-sizing: border-box; }
html { color-scheme: light; }
body {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 0 20px;
  background: var(--page);
  color: var(--ink);
  font: 14px/1.7 "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; transition: color .15s, background-color .15s, border-color .15s; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.site-header { background: var(--navy); border-radius: 12px; overflow: hidden; box-shadow: 0 5px 18px #182e4210; }
.header-inner { display: flex; align-items: stretch; min-height: 82px; }
.brand { display: flex; align-items: center; justify-content: flex-start; flex: none; width: 190px; padding: 0 12px; border-right: 1px solid #ffffff18; }
.brand:hover { color: #9ce2d5; }
.brand-logo { display: block; width: 164px; height: auto; max-width: 100%; }
.top-nav { display: flex; flex-wrap: wrap; align-items: center; align-content: center; gap: 5px 6px; padding: 16px 20px; }
.top-nav a { padding: 5px 9px; border-radius: 6px; color: #d2dce5; white-space: nowrap; }
.top-nav a:hover { background: #ffffff12; color: #fff; }
.top-nav a[aria-current="page"] { background: #c1eae0; color: #14483f; font-weight: 700; }
.utility-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 14px 0; padding: 12px 16px; background: #fff; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }
.utility-bar > a { color: #627386; }
.search { display: flex; gap: 6px; }
.search input { width: 220px; min-width: 0; height: 34px; border: 1px solid #dfe6ed; border-radius: 6px; padding: 4px 11px; background: #f8fafc; color: var(--ink); font: inherit; }
.search input:focus { background: #fff; }
.search button { border: 0; border-radius: 6px; padding: 4px 15px; background: var(--accent); color: white; cursor: pointer; font: inherit; }
.search button:hover { background: #076c66; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; padding: 0; clip: rect(0,0,0,0); white-space: nowrap; }
.shell { width: 100%; }
.breadcrumbs { padding: 6px 4px 16px; color: var(--muted); font-size: 13px; }
.reference-block, .source-detail { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: 0 4px 20px #20354a04; }
.block-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 62px; padding: 17px 22px; border-bottom: 1px solid var(--line); background: #fff; }
.block-title h1, .block-title h2 { position: relative; margin: 0; padding-left: 14px; font-size: 17px; line-height: 1.5; font-weight: 700; color: var(--navy); }
.block-title h1::before, .block-title h2::before { content: ""; position: absolute; left: 0; top: 5px; bottom: 5px; width: 4px; border-radius: 4px; background: var(--accent); }
.block-title > span { flex: none; padding: 3px 10px; background: #f1f5f8; border-radius: 20px; font-size: 12px; color: var(--muted); }
.block-title > a { flex: none; color: var(--accent); font-size: 12px; }
.reference-links { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0 22px; margin: 0; padding: 8px 22px 16px; list-style: none; }
.reference-links li { min-width: 0; border-bottom: 1px solid #f0f3f6; }
.reference-links a { display: block; position: relative; padding: 7px 0 7px 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reference-links a::before { content: ""; position: absolute; top: 17px; left: 0; width: 4px; height: 4px; background: #b3c4d0; border-radius: 50%; }
.reference-links a:hover { background: #f5faf9; }
.reference-links a:hover::before { background: var(--accent); }
.reference-links .book-author { color: #8a98a5; font-size: 12px; }
.reference-links a:hover .book-author { color: var(--accent); }
.category-links { grid-template-columns: repeat(2,minmax(0,1fr)); }
.empty-line { margin: 0; padding: 20px 22px; color: var(--muted); font-size: 13px; }
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; padding: 20px 16px; border-top: 1px solid var(--line); }
.pagination a, .pagination span { padding: 6px 14px; font-size: 13px; }
.pagination a { border: 1px solid #dce5e9; border-radius: 6px; color: var(--accent); background: #fff; }
.pagination a:hover { border-color: var(--accent); background: var(--accent-soft); }
.pagination span { color: #718192; }
.pagination span[aria-disabled] { color: #abb5bf; }
.source-title { padding: 28px 22px 22px; text-align: center; background: linear-gradient(180deg,#f0f7f8,#fff); border-bottom: 1px solid var(--line); }
.source-title h1 { margin: 0 0 20px; color: var(--navy); font-size: 28px; line-height: 1.45; }
.primary-button { display: block; width: 100%; max-width: 360px; margin: 0 auto; padding: 10px 18px; border-radius: 7px; background: var(--accent); color: #fff; font-size: 15px; font-weight: 700; text-align: center; box-shadow: 0 3px 10px #087f771c; }
.primary-button:hover { background: #076c66; color: white; }
.book-nav { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px 20px; padding: 17px 22px; font-size: 13px; }
.book-nav a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #5b7084; }
.book-nav a:hover { color: var(--accent); }
.book-nav span { color: #9da9b4; }
.info-table { margin: 0 22px 24px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.info-row { display: grid; grid-template-columns: 98px minmax(0,1fr); border-bottom: 1px solid var(--line); }
.info-row:last-child { border-bottom: 0; }
.info-label { display: flex; align-items: center; justify-content: center; padding: 13px 9px; background: #f6f9fb; color: #647a8d; font-weight: 500; border-right: 1px solid var(--line); }
.info-value { margin: 0; padding: 13px 17px; overflow-wrap: anywhere; line-height: 1.9; }
.info-value a { display: inline-block; padding: 1px 9px; background: var(--accent-soft); border-radius: 4px; color: var(--accent); font-size: 13px; }
.description { white-space: pre-line; }
.chapter-section, .detail-recent { margin: 0 22px 24px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.chapter-section .block-title, .detail-recent .block-title { min-height: 52px; padding: 13px 16px; background: #fafcfd; }
.chapter-section h2, .detail-recent h2 { font-size: 15px; }
.chapter-nav { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; padding: 16px 16px 0; font-size: 13px; overflow-wrap: anywhere; }
.chapter-nav a, .chapter-nav span { padding: 9px 11px; border-radius: 6px; background: #f5f8fa; }
.chapter-nav span { color: #8c9aa7; }
.site-footer { margin-top: 24px; padding: 10px 16px 0; text-align: center; font-size: 12px; color: #8995a1; }
.site-footer p { margin: 0 0 4px; }
.copyright-notice { max-width: 760px; margin: 16px auto 0; border: 1px solid #e1e8ed; border-radius: 8px; background: #f8fafb; text-align: left; color: #748391; overflow: hidden; }
.copyright-notice summary { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 16px; color: #536b7b; cursor: pointer; font-size: 13px; font-weight: 700; list-style: none; user-select: none; }
.copyright-notice summary::-webkit-details-marker { display: none; }
.copyright-notice summary::before { content: "▸"; color: var(--accent); transition: transform .2s ease; }
.copyright-notice[open] summary::before { transform: rotate(90deg); }
.copyright-notice summary span { color: #9aa8b3; font-size: 12px; font-weight: 400; }
.copyright-notice-body { padding: 0 18px 14px; animation: copyright-slide-down .22s ease-out; }
.copyright-notice ul { margin: 0; padding-left: 18px; }
.copyright-notice li { margin: 2px 0; }
@keyframes copyright-slide-down { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin-top: 12px; }
@media (max-width: 1000px) { body { width: calc(100% - 32px); } }
@media (max-width: 620px) {
  body { width: calc(100% - 20px); padding-top: 10px; font-size: 13px; }
  .header-inner { display: block; }
  .brand { width: 100%; justify-content: flex-start; padding: 12px 16px 9px; border: 0; }
  .brand-logo { width: 178px; }
  .top-nav { padding: 0 10px 12px; gap: 4px; }
  .top-nav a { padding: 4px 8px; }
  .utility-bar { padding: 10px; margin: 10px 0; gap: 8px; }
  .utility-bar > a { font-size: 11px; }
  .search { gap: 4px; }
  .search input { width: 114px; height: 32px; padding: 4px 8px; }
  .search button { padding: 4px 9px; }
  .reference-links { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 12px; padding: 6px 12px 12px; }
  .reference-links a { padding: 7px 0 7px 10px; }
  .block-title { padding: 13px 14px; min-height: 54px; }
  .block-title h1, .block-title h2 { font-size: 15px; }
  .block-title > span { padding: 2px 8px; }
  .source-title { padding: 22px 16px 20px; }
  .source-title h1 { font-size: 23px; margin-bottom: 16px; }
  .book-nav, .chapter-nav { grid-template-columns: 1fr; gap: 8px; }
  .book-nav { padding: 14px; }
  .info-table { margin: 0 12px 16px; }
  .info-row { grid-template-columns: 72px minmax(0,1fr); }
  .info-label { padding: 10px 5px; font-size: 12px; }
  .info-value { padding: 10px; }
  .chapter-section, .detail-recent { margin: 0 12px 16px; }
  .chapter-section .block-title, .detail-recent .block-title { padding: 12px; }
  .chapter-nav { padding: 12px 12px 0; }
  .empty-line { padding: 16px 12px; }
  .pagination { gap: 4px; padding: 16px 10px; }
  .pagination a, .pagination span { padding: 5px 10px; }
  .site-footer { padding: 0 6px; margin-top: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  a { transition: none; }
  .copyright-notice summary::before,
  .copyright-notice-body { animation: none; transition: none; }
}
