/* Editorial reading furniture; colors inherit the site's light/dark palette. */
.reading-content { min-width: 0; max-width: 74ch; overflow-wrap: break-word; }
.reading-meta { display: flex; flex-wrap: wrap; gap: .45rem .7rem; align-items: baseline; margin: 1.1rem 0 0; color: var(--muted); font: .875rem/1.5 var(--font-ui); }
.reading-meta > :first-child { color: var(--ink-2); font-weight: 650; }
.reading-meta-note::before { content: "·"; margin-right: .7rem; }
.reading-layout { display: grid; grid-template-columns: minmax(0, 1fr) 16rem; gap: 3rem; align-items: start; }
.reading-sidebar { position: sticky; top: calc(var(--header-h) + 1.25rem); min-width: 0; display: grid; gap: 1.6rem; }
.reading-sidebar .aside-box { position: static; font-size: .9rem; line-height: 1.6; }
.reading-sidebar .aside-box h2 { font-size: .9rem; }
.reading-toc { min-width: 0; border: 1px solid var(--rule); background: var(--surface); border-radius: 5px; font-family: var(--font-ui); }
.reading-toc summary { display: flex; align-items: center; flex-wrap: wrap; gap: .3rem .6rem; padding: .9rem 1rem; list-style: none; cursor: pointer; color: var(--ink); font-size: .875rem; font-weight: 700; }
.reading-toc summary::-webkit-details-marker { display: none; }
.reading-toc summary::after { content: "+"; font-size: 1.1rem; font-weight: 400; margin-left: auto; line-height: 1; }
.reading-toc[open] summary::after { content: "−"; }
.reading-toc .toc-count { color: var(--muted); font-size: .875rem; font-weight: 400; }
.reading-toc nav { border-top: 1px solid var(--rule); max-height: min(56dvh, 38rem); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.reading-toc .toc-list { margin: 0; padding: .45rem 0 .65rem; list-style: none; }
.toc-list li { margin: 0; padding: 0; }
.toc-list a { display: block; border-left: 2px solid transparent; padding: .42rem .9rem; color: var(--ink-2); font-size: .875rem; line-height: 1.45; text-decoration: none; overflow-wrap: anywhere; }
.toc-list .toc-level-3 a { padding-left: 1.55rem; font-size: .875rem; }
.toc-list a:hover { color: var(--accent); background: var(--surface-2); }
.toc-list a[aria-current="location"] { border-left-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.toc-list a:focus-visible { outline-offset: -3px; }
.reading-content :is(h2,h3,h4,h5,h6) { scroll-margin-top: calc(var(--header-h) + 1.8rem); }
.reading-content :is(h2,h3,h4):target { background: var(--accent-soft); box-shadow: -.4rem 0 0 var(--accent-soft), .4rem 0 0 var(--accent-soft); border-radius: 2px; }
.heading-anchor { display: inline-flex; align-items: center; justify-content: center; min-width: 1.6rem; min-height: 1.8rem; vertical-align: baseline; margin-left: .25em; padding: 0 .15em; font-family: var(--font-ui); font-size: .875em; font-weight: 400; color: var(--muted); text-decoration: none; }
.heading-anchor:hover, .heading-anchor:focus-visible { color: var(--accent); }
.prose .table-wrap { max-width: 100%; border: 1px solid var(--rule); border-radius: 4px; scrollbar-width: thin; }
.prose .table-wrap table { margin: 0; font-size: .9rem; line-height: 1.55; }
.prose th { color: var(--ink); background: var(--surface-2); }
.prose td, .prose th { padding: .7rem .8rem; }
.prose tbody tr:nth-child(even) { background: var(--surface-2); }
.prose tbody tr:last-child td { border-bottom: 0; }
.prose .callout { padding: 1.2rem 1.3rem; line-height: 1.7; margin-block: 1.6rem; }
.prose .callout-note { background: var(--surface); }
.prose .callout-caveat { border-left-width: 4px; }
.prose .evidence { margin-block: 1.6rem; padding: 1.4rem; }
.prose .evidence .weight { margin-bottom: .8rem; }
.prose .evidence > h3 { line-height: 1.4; }
.prose .evidence .refs { line-height: 1.8; }

.message-preview { position: fixed; z-index: 100; width: min(25rem, calc(100vw - 1.5rem)); max-height: calc(100dvh - 1.5rem); overflow: auto; margin: 0; padding: 0; background: var(--surface); color: var(--ink); border: 1px solid var(--rule-strong); border-radius: 7px; box-shadow: 0 12px 40px rgb(0 0 0 / .19); font: .9rem/1.55 var(--font-ui); }
.preview-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .45rem .65rem .45rem 1rem; background: var(--surface-2); border-bottom: 1px solid var(--rule); color: var(--muted); font-size: .875rem; }
.preview-close { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border: 0; background: transparent; font-size: 1.5rem; cursor: pointer; }
.preview-body { padding: .9rem 1rem; }
.preview-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .65rem; margin: 0 0 .65rem; color: var(--muted); font-size: .875rem; }
.preview-meta strong { color: var(--ink); }
.preview-meta time { width: 100%; }
.preview-quote { margin: 0; padding: 0; border: 0; max-height: 11rem; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.preview-quote .redacted { white-space: normal; }
.preview-media { border: 1px solid var(--rule); background: var(--surface-2); padding: .55rem .7rem; margin: .6rem 0 0; color: var(--ink-2); font-size: .875rem; }
.preview-media.withheld { border-style: dashed; }
.preview-bottom { display: flex; align-items: center; flex-wrap: wrap; gap: .3rem .7rem; border-top: 1px solid var(--rule); padding: .75rem 1rem; }
.preview-open { font-size: .875rem; font-weight: 650; }
.preview-hint { font-size: .875rem; color: var(--muted); }
.preview-status, .preview-forwarded { margin: 0; }
.preview-forwarded { color: var(--muted); margin-bottom: .55rem; }
.preview-annotation { border-left: 4px solid var(--note-edge); background: var(--note); color: var(--note-ink); }
.preview-note-label { color: var(--note-ink); font-size: .875rem; font-weight: 750; margin: 0 0 .65rem; }

@media (max-width: 60rem) {
  .reading-layout { display: flex; flex-direction: column; gap: 1.8rem; }
  .page-grid.has-reading-tools { display: flex; flex-direction: column; gap: 1.8rem; }
  .reading-layout > .reading-content, .page-grid.has-reading-tools > .reading-content { width: 100%; }
  .reading-sidebar { display: contents; position: static; }
  .reading-toc { order: -1; width: 100%; max-width: 74ch; position: sticky; top: var(--header-h); z-index: 15; }
  .reading-toc nav { max-height: 48dvh; }
  .reading-toc summary { padding: .8rem 1rem; }
  .reading-sidebar .aside-box { margin-top: .3rem; width: 100%; max-width: 65ch; }
  .toc-list a { padding-block: .65rem; font-size: .875rem; }
  .toc-list .toc-level-3 a { font-size: .875rem; }
  .reading-content :is(h2,h3,h4,h5,h6) { scroll-margin-top: calc(var(--header-h) + 5rem); }
}
@media (max-width: 30rem) {
  .prose .callout, .prose .evidence { padding: 1rem; }
  .prose td, .prose th { padding: .55rem .6rem; min-width: 7rem; }
}
/* Document navigation and evidence share the same panel hierarchy. */
.reading-toc { border: 1px solid var(--rule); border-radius: 10px; background: var(--surface); }
.reading-toc summary { padding: 1rem; font-family: var(--font-mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 500; color: var(--ink-2); }
.reading-toc summary::after { color: var(--accent); }
.toc-list a { font-size: .875rem; padding-block: .65rem; }
.toc-list .toc-level-3 a { font-size: .875rem; }
.toc-list a[aria-current="location"] { background: var(--accent-soft); color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
.toc-list a:hover { background: var(--surface-2); color: var(--ink); }
.reading-sidebar .aside-box { padding: 1.25rem; font-size: .875rem; }
.reading-sidebar .aside-box h2 { font-size: 1rem; }
.reading-meta { font-size: .8125rem; }
.reading-meta > :first-child { font-family: var(--font-mono); font-size: .75rem; font-weight: 400; }
.heading-anchor { opacity: 0; }
:is(h2,h3,h4):hover > .heading-anchor, .heading-anchor:focus-visible { opacity: 1; }
.prose .table-wrap { border: 1px solid var(--rule); border-radius: 10px; }
.prose .callout { border-radius: 0 10px 10px 0; }
.prose .callout-caveat { border-left-width: 3px; }
.prose .evidence { padding: 1.4rem; }
.message-preview { border-radius: 12px; box-shadow: var(--shadow); }
.preview-top { padding-block: .65rem; font-family: var(--font-mono); font-size: .75rem; }
.preview-meta time { font-family: var(--font-mono); font-size: .75rem; }
.preview-annotation { border-left-color: var(--note-edge); }
.preview-note-label { color: var(--note-ink); }
.preview-annotation .preview-meta, .preview-annotation .preview-meta strong { color: var(--note-ink); }
@media (max-width: 60rem) {
  .reading-toc { position: static; }
  .reading-toc summary { padding: 1rem; }
  .toc-list a, .toc-list .toc-level-3 a { font-size: .875rem; }
}
@media (max-width: 30rem) { .prose .evidence { padding: 1rem; } }
@media print {
  :root, :root[data-theme], :root:not([data-theme]) { color-scheme: light !important; --ink: #111; --ink-2: #222; --muted: #444; --rule: #ccc; --rule-strong: #777; --paper: #fff; --surface: #fff; --surface-2: #f4f4f4; --accent: #111; --note: #f4f4f4; --note-ink: #222; --note-edge: #777; --bar: #111; --bar-ink: #fff; --danger: #762929; --ok: #285b3c; }
  .reading-toc, .heading-anchor, .message-preview, .reading-meta-note { display: none !important; }
  .reading-sidebar { display: block; position: static; margin-top: 1.5rem; }
  .reading-sidebar .aside-box { font-size: 9pt; break-inside: avoid; }
  .page-grid, .page-grid.has-reading-tools, .reading-layout { display: block; }
  main.wrap { max-width: none; padding: 0; }
  .page { padding-block: 0; }
  .page-head { max-width: none; margin-bottom: 1.5rem; }
  .page-head h1 { font-size: 28pt; }
  .reading-content, .prose { max-width: none; font-size: 11pt; line-height: 1.55; color: #111; }
  .reading-content :is(h2,h3,h4) { break-after: avoid; color: #111; background: none !important; box-shadow: none !important; }
  .prose p, .prose li { orphans: 3; widows: 3; }
  .prose .callout, .prose .evidence, .prose blockquote { box-shadow: none; }
  .prose .table-wrap { overflow: visible; }
  .prose tr { break-inside: avoid; }
  .prose th { background: #f4f4f4; }
  a.msgref { background: none; color: #111; border-color: #aaa; }
  .site-footer { background: #fff; color: #333; font-size: 8pt; margin-top: 2rem; }
  .site-footer .inner { padding: 1rem 0 0; }
  @page { margin: 18mm; }
}
