/* Source reading only; proposal layout stays unchanged. */
.source-dialog {
  width: min(920px, calc(100% - 32px));
  height: min(800px, calc(100dvh - 48px));
  max-height: calc(100dvh - 48px);
  padding: 0;
  border: 1px solid #d4cabb;
  border-radius: 12px;
  background: #f2eee6;
  color: #191713;
  box-shadow: 0 24px 90px #0006;
}
.source-dialog::backdrop { background: #11100ddb; }
.source-dialog[open] { display: flex; flex-direction: column; }
.source-dialog-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 14px 24px; border-bottom: 1px solid #d4cabb; flex-shrink: 0;
}
.source-dialog-title { font: 600 16px/1.5 "Microsoft YaHei", sans-serif; margin: 0; }
.source-dialog-close {
  min-height: 44px; padding: 8px 14px; border: 1px solid #b33223;
  border-radius: 6px; background: #fffdf8; color: #82291f;
  font: 500 14px/1.5 "Microsoft YaHei", sans-serif; cursor: pointer;
}
.source-dialog-close:hover { background: #b33223; color: #fffdf8; }
.source-dialog-close:focus-visible { outline: 3px solid #b33223; outline-offset: 3px; }
.source-dialog-frame { border: 0; width: 100%; flex: 1; min-height: 0; background: #f2eee6; }
body.source-reader-open { overflow: hidden; }
.source-page {
  margin: 0; padding: 30px clamp(20px, 5vw, 44px);
  background: #f2eee6; color: #191713;
  font: 16px/1.85 "Microsoft YaHei", "PingFang SC", sans-serif;
  overflow-wrap: anywhere;
}
.source-page * { box-sizing: border-box; }
.source-page a { color: #b33223; text-underline-offset: 4px; }
.source-page a:focus-visible { outline: 3px solid #b33223; outline-offset: 4px; }
.source-page-header, .source-directory, .source-articles, .source-page-footer { max-width: 820px; margin-inline: auto; }
.source-page-header { display: flex; justify-content: space-between; gap: 20px; font-size: 14px; padding-bottom: 22px; }
.source-directory { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 30px; }
.source-directory a { text-decoration: none; padding: 6px 12px; background: #e8e0d3; border-radius: 4px; }
.source-article { display: none; }
.source-article:target { display: block; }
.source-articles:not(:has(.source-article:target)) .source-article:first-child { display: block; }
.source-page h1 { font-size: clamp(25px, 4vw, 34px); line-height: 1.45; font-weight: 600; margin: 6px 0 18px; }
.source-page h2 { font-size: 18px; line-height: 1.6; margin: 26px 0 12px; }
.source-page p { margin: 0 0 16px; }
.source-page ul { padding-left: 23px; margin: 16px 0 24px; }
.source-page li + li { margin-top: 10px; }
.source-meta { color: #625b52; font-size: 12px; letter-spacing: .04em; }
.source-description { color: #625b52; }
.source-table-wrap { overflow-x: auto; margin: 18px 0 24px; }
.source-page table { width: 100%; border-collapse: collapse; text-align: left; font-size: 15px; }
.source-page th, .source-page td { padding: 12px 14px; border-bottom: 1px solid #d4cabb; vertical-align: top; }
.source-page thead { background: #e8e0d3; }
.source-page tbody th { font-weight: 500; min-width: 115px; }
.source-page caption { text-align: left; color: #625b52; font-size: 14px; padding-bottom: 10px; }
.source-scope { border-left: 3px solid #b33223; padding: 10px 16px; background: #e8e0d3; color: #625b52; font-size: 14px; }
.source-originals { display: flex; flex-wrap: wrap; gap: 12px 24px; padding-top: 8px; font-size: 14px; }
.source-page-footer { border-top: 1px solid #d4cabb; padding-top: 18px; margin-top: 30px; color: #625b52; font-size: 12px; }
.source-page.is-embedded .source-page-header, .source-page.is-embedded .source-directory { display: none; }
@media (max-width: 480px) {
  .source-dialog { width: calc(100% - 16px); height: calc(100dvh - 24px); max-height: calc(100dvh - 24px); }
  .source-dialog-bar { padding: 10px 16px; gap: 12px; }
  .source-dialog-title { font-size: 14px; }
  .source-page { padding: 24px 18px; }
  .source-page-header { flex-direction: column; gap: 6px; }
  .source-page th, .source-page td { padding: 10px 8px; }
}
@media print {
  .source-dialog, .source-page-header, .source-directory { display: none !important; }
  .source-page { padding: 0; background: white; }
  .source-article { display: block; break-before: page; }
  .source-article:first-child { break-before: auto; }
}
