/* The edition pages (issue #180): centred masthead, justified text, footnotes small and italic. */
.masthead { text-align: center; }
.masthead-period { font-size: 1rem; font-weight: 400; }
main p, main li { text-align: justify; }
.footnote-ref a { text-decoration: none; }
.footnotes-sep { margin-top: 2.5rem; }
.footnotes { font-size: 0.875rem; font-style: italic; }
/* Each figure fits the column, and its interactive chart link sits small and muted under it (issue #179). */
main img { max-width: 100%; height: auto; }
main a.chart-link { color: var(--muted); font-size: 0.875rem; }
main .chart-note { color: var(--muted); font-size: 0.8125rem; }
main .figure-use { font-size: 0.8125rem; text-align: left; }
/* The signed-off page (issue #190): tables, anchors, the Contents box, the appendix panel and the figure viewer. */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
main h2[id], main h3[id] { scroll-margin-top: 1.5rem; }
.table-scroll { overflow-x: auto; margin: 1.25rem 0; }
main table { border-collapse: collapse; width: 100%; font-size: 0.9375rem; }
main th, main td { border-bottom: 1px solid var(--rule); padding: 8px 10px; text-align: left; vertical-align: top; }
main th { color: var(--muted); font-weight: 500; border-bottom-color: var(--context); }
nav.contents { border: 1px solid var(--rule); border-radius: 10px; padding: 12px 20px 14px; margin: 1.75rem 0; }
nav.contents .contents-label { color: var(--muted); font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 6px; text-align: left; }
nav.contents ul { margin: 0; padding-left: 1.1rem; }
nav.contents ul ul { padding-left: 1.25rem; font-size: 0.9375rem; }
nav.contents li { text-align: left; }
aside.preview-note { border: 1px solid var(--accent); border-radius: 10px; padding: 12px 20px; margin: 2rem 0; }
aside.preview-note p { text-align: left; }
section.appendix { background: var(--grid); border-top: 4px solid var(--accent); border-radius: 0 0 12px 12px; padding: 8px 28px 28px; margin-top: 56px; }
@media (max-width: 600px) { section.appendix { padding: 8px 14px 14px; } }
main img { cursor: zoom-in; }
.csv-table { max-height: 360px; overflow: auto; margin: 4px 0 8px; }
.csv-table table { font-size: 0.8125rem; }
dialog.figure-viewer { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--ground); color: var(--text); overflow: hidden; }
dialog.figure-viewer::backdrop { background: rgba(0, 0, 0, 0.7); }
.figure-viewer .viewer-bar { position: absolute; top: 0; right: 0; z-index: 1; display: flex; gap: 8px; padding: 12px; }
.figure-viewer button { font: inherit; font-size: 0.875rem; color: var(--ink); background: var(--grid); border: 1px solid var(--rule); border-radius: 8px; padding: 6px 12px; cursor: pointer; }
.figure-viewer button:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 2px; }
.figure-viewer .viewer-stage { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: grab; touch-action: none; }
.figure-viewer .viewer-stage img { max-width: 100%; max-height: 100%; cursor: inherit; transform-origin: center center; user-select: none; }
