/* The editor chrome and the report page use the same brand at different reading scales. */
#reader-activity { margin: 18px 0 14px; }
.reader-summary { padding: 13px 18px; }
.reader-summary .work-title { display: flex; align-items: center; gap: 12px; }
.reader-summary p { margin: 5px 0 0; font-size: 13px; }
.reader-summary .time { margin-inline-start: 8px; }
.live-doc:has(.doc-workspace) {
  --page-rule: #d0dadc;
  --paper-type: "PT Serif", Georgia, "Songti SC", SimSun, serif;
  --toolbar-type: var(--font);
  border: 1px solid #bbcbce;
  background: #fff;
  border-radius: 8px;
  overflow: clip;
  min-width: 0;
}
.doc-toolbar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px;
  min-height: 50px; padding: 8px 15px; background: #fbfdfd; border-bottom: 1px solid var(--page-rule);
}
.doc-toolbar .doc-heading { margin: 0 auto 0 0; min-width: 0; color: var(--ink); }
.doc-toolbar .doc-heading :is(h2,h3,h4) { margin: 0; font: 650 17px/1.3 var(--toolbar-type); }
.doc-toolbar :is(button,select) { min-height: 31px; font: 550 13px/1.3 var(--toolbar-type); }
.doc-toolbar button { border-radius: 4px; padding: 4px 9px; border: 1px solid transparent; }
.doc-toolbar button:hover { background: #edf4f5; }
.doc-toolbar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.live-doc > :is(.doc-info,.doc-tools,.doc-help,.doc-error) { padding: 0 15px; margin: 6px 0; }
.live-doc > :is(.doc-info,.doc-help):empty { display: none; }
.doc-toolbar button[aria-pressed="true"],.doc-toolbar button[aria-expanded="true"] {
  color: #075d6b; background: #e6f3f4; border-color: #c6e1e3;
}
.doc-workspace {
  display: flex; align-items: stretch; isolation: isolate; min-height: 540px;
  background: #e8edef; position: relative;
}
.doc-outline,.doc-sidebar { min-width: 0; background: #f9fbfb; overflow-wrap: anywhere; }
.doc-outline { flex: 0 0 clamp(125px,15%,200px); padding: 16px 9px; border-inline-end: 1px solid var(--page-rule); }
.doc-sidebar { flex: 0 0 clamp(218px,23%,300px); padding: 15px 12px; border-inline-start: 1px solid var(--page-rule); }
.doc-outline :is(h3,h4),.doc-sidebar :is(h3,h4) {
  color: #29444b; font: 650 14px/1.35 var(--toolbar-type); margin: 0 0 10px;
}
.doc-general { margin: 14px 0 18px; padding: 11px; background: #eef5f6; border: 1px solid #c8d9dc; border-radius: 6px; }
.doc-general h5 { margin: 0 0 6px; color: #29444b; font: 650 13px/1.35 var(--toolbar-type); }
.doc-general p { margin: 5px 0 9px; color: #486168; font-size: 12px; line-height: 1.45; }
.doc-general .field { display: block; font-size: 12px; font-weight: 600; }
.doc-general textarea { display: block; width: 100%; min-height: 96px; margin: 5px 0 8px; resize: vertical; font-size: 13px; }
.doc-general .btn { width: auto; max-width: 100%; min-height: 40px; font-size: 13px; }
.doc-general textarea { box-sizing: border-box; }
.doc-general .doc-general-hint { font-weight: 600; }
.doc-general-requests h5 { margin-top: 12px; }
.doc-general-requests ul { list-style: none; margin: 6px 0 0; padding: 0; }
.doc-general-requests li { padding: 8px 0; border-top: 1px solid #d4e1e3; }
.doc-general-requests li p { white-space: pre-wrap; overflow-wrap: anywhere; }
.doc-general-requests li small { display: block; color: var(--muted); margin: 4px 0; }
.doc-outline button {
  width: 100%; display: block; text-align: start; line-height: 1.45;
  padding: 7px 8px; color: #36545b; border-radius: 4px; font-size: 12.5px;
}
.doc-outline button:hover,.doc-outline button[aria-current="true"],.doc-outline button[aria-current="location"] {
  color: #005969; background: #e3f0f2;
}
.doc-outline ol,.doc-outline ul { list-style: none; margin: 0; padding: 0; }
.doc-outline button[data-jump-chapter] {
  display: grid; grid-template-columns: 1.4em minmax(0,1fr); column-gap: 5px; align-items: baseline;
}
.doc-outline .chapter-number { color: #677b80; font-variant-numeric: tabular-nums; }
.doc-outline button small { grid-column: 2; font-size: 10.5px; color: var(--muted); }
.doc-outline-actions { border-bottom: 1px solid var(--page-rule); padding-bottom: 5px; margin-bottom: 6px; }
.doc-planned-outline { font-size: 12px; padding: 4px 6px 8px; }
.doc-planned-outline li { margin-top: 5px; }
.doc-outline-dialog .field :is(input,textarea,select) { display: block; width: 100%; margin: 5px 0; }
.doc-outline-dialog details { margin: 10px 0; }
.doc-outline-dialog .doc-outline-error { color: #8b3326; }
.doc-sheet [data-gap-text] { cursor: text; user-select: text; }
.doc-map { margin: 18px 0; }
.doc-map img { display: block; width: 100%; height: auto; }
.supplied-figure img { width: auto; max-width: 100%; max-height: 65vh; }
.supplied-figure a { display: block; width: fit-content; max-width: 100%; cursor: zoom-in; }
.doc-map figcaption,.doc-calculation { font: 400 13px/1.5 var(--font); margin: 7px 0; }
.doc-map small { display: block; color: var(--muted); }
.doc-calculation { display: grid; grid-template-columns: auto 1fr; gap: 2px 9px; }
.doc-calculation dt { font-weight: 600; }
.doc-calculation dd { margin: 0; }
.doc-plot { margin: 10px 0; }
.doc-plot .plot-row { display: grid; grid-template-columns: minmax(45px,1fr) minmax(60px,2fr) minmax(40px,auto); gap: 5px; align-items: center; font-size: 12px; }
.plot-track { height: 15px; position: relative; border-left: 1px solid #a1b5b9; }
.plot-track::before { content:""; position: absolute; left: var(--zero); height: 100%; border-left: 1px solid #a1b5b9; }
.plot-track i { position: absolute; top: 3px; height: 9px; left: var(--left); width: var(--bar); background: #0197af; }
.doc-canvas { flex: 1 1 0; min-width: 0; padding: clamp(14px,2vw,32px); }
.doc-canvas .doc-chapters { margin: 0 auto; max-width: 790px; display: grid; gap: 20px; }
.doc-chapters article.doc-sheet {
  background: white; border: 1px solid #cbd4d6; border-radius: 1px;
  padding: clamp(22px,3.3vw,58px) clamp(22px,3.65vw,64px) clamp(26px,3.5vw,60px);
  box-shadow: 0 2px 6px #17394019;
  color: #253032; min-width: 0; scroll-margin-top: 16px;
}
.doc-sheet header { border-bottom: 1px solid var(--page-rule); margin-bottom: 20px; padding-bottom: 12px; }
.doc-running-head { display: flex; align-items: center; gap: 10px; color: #46626a; font: 500 11px/1.3 var(--toolbar-type); }
.doc-running-head img { width: 50px; height: 28px; object-fit: contain; }
.doc-sheet .doc-sheet-header > h4 { margin: 20px 0 9px; }
.doc-sheet .doc-sheet-header > small { color: var(--muted); font-size: 12px; margin-right: 10px; }
.doc-sheet :is(h2,h3),.doc-sheet .doc-sheet-header > h4,.doc-sheet .doc-chapter-title strong {
  color: #153c45; font: 600 clamp(21px,2.05vw,32px)/1.22 var(--paper-type);
  letter-spacing: -.02em; overflow-wrap: anywhere;
}
.doc-sheet .doc-body { padding: 0; max-width: none; min-width: 0; }
.doc-sheet .doc-translation-warning { color: #765510; background: #fff8e7; border-inline-start: 3px solid #cba751; padding: 8px 11px; }
.doc-sheet .doc-body > p[role="status"] { color: var(--muted); font: 400 13px/1.5 var(--toolbar-type); }
.doc-sheet .doc-body p[data-paragraph] {
  font: 400 clamp(15px,1.12vw,18px)/1.7 var(--paper-type); color: #263238;
  margin: 0 0 .85em; text-wrap: pretty; cursor: text; user-select: text;
}
.doc-sheet .doc-body h4 {
  font: 650 clamp(16px,1.15vw,19px)/1.4 var(--paper-type); color: #1a4951; margin: 1.45em 0 .48em;
}
.doc-sheet .doc-body p.estimate-lead {
  color: #735315; font-weight: 650; border-inline-start: 3px solid #cba751; padding-inline-start: 10px;
}
.doc-sheet .doc-body p.held-passage {
  border-inline-start: 3px solid #a57321; padding: 7px 11px; color: #694817; background: #fff8e7;
  font: 600 14px/1.6 var(--toolbar-type);
}
.doc-sheet ::selection { color: #142d34; background: #b6dfe7; }
.doc-sheet mark { color: inherit; background: #fae7a6; border-bottom: 1px solid #c19d3f; }
.doc-sheet .doc-gaps,.doc-sheet details { font: 400 13px/1.5 var(--toolbar-type); }
.doc-sheet .doc-gaps { margin: 16px 0; padding: 9px 12px; }
.doc-sheet .doc-exhibits { color: #304a50; }
.doc-sidebar blockquote { margin: 8px 0; color: #39545a; border-inline-start: 2px solid #a4cacf; }
.doc-sidebar .doc-requests ol { padding: 0; }
.doc-sidebar .doc-requests li,.doc-sidebar .doc-form form {
  background: #fff; border: 1px solid #c8d9dc; padding: 11px; margin: 8px 0 12px; border-radius: 6px;
  font: 400 13px/1.5 var(--toolbar-type);
}
.doc-sidebar .doc-form form { box-shadow: 0 0 0 1px #92bdc5; }
.doc-sidebar textarea { resize: vertical; min-height: 85px; font-size: 14px; }
.doc-sidebar [name=operation] { width: 100%; }
.doc-operation-hint { display: block; margin: .35rem 0 .8rem; color: var(--muted); }
.doc-answer { border-inline-start: 3px solid var(--accent); padding-inline-start: .65rem; margin: .7rem 0; }
.doc-answer p { white-space: pre-wrap; overflow-wrap: anywhere; }
.doc-sidebar .doc-answer-sources { overflow-wrap: anywhere; padding: 0; list-style: none; }
.doc-sidebar .actions { gap: 5px 8px; flex-wrap: wrap; }
.doc-quote-bar:not([hidden]) {
  position: fixed; z-index: 30; bottom: auto; margin: 0; max-width: calc(100vw - 20px);
  gap: 4px; border-color: #b6cccf; box-shadow: 0 3px 16px #183a422c;
}
.doc-quote-bar .btn { min-height: 30px; font-size: 13px; }
.doc-workspace [hidden],.live-doc .doc-quote-bar[hidden] { display: none !important; }
@media (max-width: 920px) {
  .doc-workspace { flex-wrap: wrap; }
  .doc-outline { flex-basis: 100%; max-height: 170px; overflow-y: auto; border: 0; border-bottom: 1px solid var(--page-rule); }
  .doc-outline :is(ol,ul) { columns: 2; column-gap: 16px; }
}
@media (max-width: 680px) {
  .doc-toolbar { padding: 7px 9px; gap: 4px 6px; }
  .doc-workspace { display: block; min-height: 360px; }
  .doc-canvas { padding: 10px 6px; }
  .doc-chapters article.doc-sheet { padding: 22px 17px 25px; }
  .doc-sidebar { border-inline-start: 0; border-top: 1px solid var(--page-rule); }
  .doc-sidebar:has(#passage-request) {
    position: fixed; inset: auto 5px 5px; z-index: 31; max-height: 62dvh; overflow-y: auto;
    box-shadow: 0 -4px 22px #12353d30; border: 1px solid #b3cad0; border-radius: 9px;
  }
  .doc-outline button { font-size: 12px; padding: 5px 8px; }
}

/* Keep the stored citation text in the DOM so passage selection offsets stay stable. */
.manuscript-note span { font-size: 0; }
.manuscript-note::after { content: "[" attr(data-note) "]"; }
ol.source-register { list-style: decimal; padding-inline-start: 2em; }
