/* =============================================================================
   SectraTEK Lab: paper.css  (owner: paper agent TR1)
   IEEE-style layout for Lab Technical Reports (LAB-TR-000N). Loaded after lab.css through
   front matter  extra_css: /assets/paper.css . Reads tokens only; both themes come from the tokens.
   No inline styles, no external requests, no motion.

   CLASS CONTRACT (stable; do not rename). Use only these plus existing Lab components.
   -----------------------------------------------------------------------------
   PAGE SHAPE (recommended: front matter  layout: bare )
     reading and wide layouts print their own page head with an h1, so a paper-head h1 would be a second h1.
     With  layout: bare  the paper supplies the only h1. Skeleton:

       <div class="lab-section lab-section--tight"><div class="container lab-layout">
         <nav class="lab-toc" aria-label="On this page"><p class="lab-toc__title">On this page</p><ol>
           <li><a href="#abstract">Abstract</a></li><li><a href="#s1">I. Introduction</a></li> ...</ol></nav>
         <article class="paper"> ... </article>
       </div></div>

     (If a paper is built with layout reading, put nav.lab-toc as the first child of article.paper: it becomes an
     in-flow contents box and, from 80 em, a sticky note in the left margin. The automatic page head is then
     hidden by this file so only the paper-head shows. Prefer bare: it keeps the DOM to one h1.)

   HEAD
     header.paper-head > p.eyebrow ("Lab Technical Report LAB-TR-000N") + h1 (title)
                       + p.paper-authors + p.paper-affil + p.paper-status ("Lab Technical Report, not peer reviewed")
   ABSTRACT AND KEYWORDS
     section.paper-abstract > h2 ("Abstract") + p      (h2 here is a run-in style label, not a numbered section)
     p.paper-keywords > <strong>Index Terms</strong> then comma separated terms
   SECTIONS
     section.paper-section#s1 > h2 > span.paper-num ("I.") + title      (roman numerals; ids s1, s2, ...)
     h3 > span.paper-num ("A.") + title                                  (subsections, italic in IEEE manner)
     h4 (optional paragraph heading, run-in feel)
     Unnumbered sections (Ethics and data, Acknowledgment, References): section.paper-section with h2 and no span.paper-num
   FIGURES
     figure.paper-fig > (svg | img | div) + figcaption   caption below; write <figcaption><strong>Fig. 1.</strong> text</figcaption>
     Wide SVGs: give them viewBox and class="paper-svg" (scales to column). Figures numbered in reading order.
     SVG colours: token classes below (fill/stroke via classes .pf-ink .pf-muted .pf-line .pf-accent .pf-accent-soft
       .pf-surface .pf-warn .pf-ok .pf-fill-* ), never hard-coded colours.
   TABLES
     div.paper-table > div.paper-table-cap + table      caption above: <div class="paper-table-cap"><strong>TABLE I.</strong> Title in small caps</div>
     table needs thead with th scope="col"; row headers th scope="row". Numeric cells: class="num" (right aligned, tabular).
     Add class="paper-table paper-table--wide" if five or more columns (reduces size, scrolls on phones).
   CODE AND EQUATIONS
     pre.paper-code (monospace block; for pseudocode, listings, formulas)
   REFERENCES
     ol.paper-refs > li#ref-1 ... (hanging "[n]" numbers drawn by CSS: do not type [n] in the li)
     in-text citation: <a href="#ref-3">[3]</a>  (styled as a quiet bracketed link)
   META BLOCKS (cite-as, download, version history, corrections)
     section.paper-meta > h2 + content. May contain .lab-cite (cite-as), .code-block (BibTeX), dl.lab-keys, ul, table.
   OTHER
     p.paper-note (small remark under a figure/table, e.g. source line)
     .paper-dl (definition list of terms) and details/summary are styled, aside.lab-callout is reused as is.

   TYPE: body in a system serif stack (Charter, Cambria, Georgia), headings, captions, tables and labels in the
   Lab sans stack (Inter). Body 17 px / 1.62, measure 42 rem (about 72 characters).
   PRINT: letter/A4 paper, serif 10.5 pt, justified, sans captions 8.5 pt, no site chrome, figures and tables kept whole,
   links shown as plain text, page numbers in the footer where the browser supports @page margin boxes.
   Contents: 1 Page shell  2 Head  3 Abstract  4 Sections  5 Figures  6 Tables  7 Code  8 References  9 Meta blocks
             10 Contents box  11 Print  12 Forced colours
   ============================================================================= */

/* 1 Page shell -------------------------------------------------------------- */
.paper {
  --paper-serif: "Charter", "Bitstream Charter", "Sitka Text", Cambria, "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
  --paper-measure: 42rem;
  --paper-size: 1.0625rem;
  font-family: var(--paper-serif);
  font-size: var(--paper-size);
  line-height: 1.62;
  color: var(--ink);
  letter-spacing: 0;
  max-width: var(--paper-measure);
  margin-inline: auto;
  width: 100%;
  min-width: 0;
  overflow-wrap: break-word;
  hyphens: auto;
  font-variant-numeric: lining-nums proportional-nums;
  font-feature-settings: "kern", "liga";
}
.paper * { box-sizing: border-box; }
/* inside the contents grid the single column must be allowed to shrink (phones) */
.lab-layout:has(> .paper) { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 64em) { .lab-layout:has(> .paper) { grid-template-columns: 13rem minmax(0, 1fr); } }
.lab-layout > .paper { min-width: 0; }
.paper-code { max-width: 100%; }
/* a paper placed straight in main (no container) still gets gutters */
main > .paper { padding-inline: var(--gutter); padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem) var(--space-9); }
.paper p { margin: 0 0 0.95em; }
.paper a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.paper a:hover { color: var(--link-hover); }
.paper em, .paper i { font-style: italic; }
.paper strong, .paper b { font-weight: 650; }
.paper :not(pre) > code, .paper kbd { font-family: var(--font-mono); font-size: 0.84em; padding: 0.08em 0.34em; border-radius: 5px; background: var(--surface-3); font-variant-numeric: normal; hyphens: none; }
.paper ul, .paper ol { margin: 0 0 1em; padding-inline-start: 1.5em; }
.paper li { margin-block: 0.28em; padding-inline-start: 0.2em; }
.paper li::marker { color: var(--muted); }
.paper sup, .paper sub { line-height: 0; }
.paper blockquote { margin: 1.2em 0; padding-inline-start: 1em; border-inline-start: 2px solid var(--line-strong); color: var(--ink-2); font-style: italic; }
.paper hr { border: 0; border-block-start: 1px solid var(--line); margin: 2.4em 0; }
.paper :target { scroll-margin-top: 6rem; }
/* a section reached through the contents or a citation gets a brief outline for orientation, no animation */
.paper-section:target > h2, li:target { outline: 2px solid var(--accent-glow); outline-offset: 4px; border-radius: 4px; }
/* sans parts of the page */
.paper h1, .paper h2, .paper h3, .paper h4, .paper figcaption, .paper-table, .paper-table-cap,
.paper .eyebrow, .paper-status, .paper-keywords strong, .paper .lab-cite, .paper-refs li::before, .paper .paper-note { font-family: var(--font-sans); hyphens: none; }

/* 2 Head -------------------------------------------------------------------- */
.paper-head { padding-block-end: var(--space-6); margin-block-end: var(--space-6); border-block-end: 1px solid var(--line); }
.paper-head .eyebrow { display: block; margin: 0 0 var(--space-4); }
.paper-head h1 { margin: 0; font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.85rem); line-height: 1.1; letter-spacing: -0.03em; font-weight: var(--weight-semibold); text-wrap: balance; }
.paper .paper-authors { margin: var(--space-5) 0 0; font-size: 1.1875rem; font-weight: 600; letter-spacing: -0.005em; }
.paper .paper-affil { margin: 2px 0 0; color: var(--ink-2); font-style: italic; }
.paper .paper-status { display: inline-block; margin: var(--space-4) 0 0; padding: 4px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); font-size: var(--text-caption); line-height: 1.4; letter-spacing: 0.03em; color: var(--ink-2); background: var(--surface-2); }
.paper-head .lab-meta-line { margin-block-start: var(--space-4); padding-inline-start: 0; font-family: var(--font-sans); }

/* 3 Abstract and index terms ------------------------------------------------ */
.paper-abstract { margin-block: 0 var(--space-4); }
.paper-abstract h2 { margin: 0 0 0.5em; font-size: var(--text-caption); line-height: 1.3; letter-spacing: 0.1em; text-transform: uppercase; font-weight: var(--weight-semibold); color: var(--muted); }
.paper-abstract p { font-size: 1.03125rem; line-height: 1.58; padding-inline-start: var(--space-4); border-inline-start: 3px solid var(--accent); margin-bottom: 0; }
.paper .paper-keywords { margin: var(--space-4) 0 var(--space-7); font-size: 0.96875rem; color: var(--ink-2); }
.paper-keywords strong { font-size: var(--text-caption); letter-spacing: 0.08em; text-transform: uppercase; font-weight: var(--weight-semibold); color: var(--muted); margin-inline-end: 0.5em; }

/* 4 Sections ---------------------------------------------------------------- */
.paper-section { margin-block: 0 var(--space-7); }
.paper-section > h2, .paper-meta > h2 {
  margin: 0 0 0.7em; font-size: 0.9375rem; line-height: 1.3; font-weight: var(--weight-semibold);
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); scroll-margin-top: 6rem;
}
.paper-num { display: inline-block; min-width: 2.2em; margin-inline-end: 0.35em; color: var(--accent); font-feature-settings: "tnum"; font-variant-numeric: tabular-nums lining-nums; }
.paper-section > h2 .paper-num { min-width: 0; margin-inline-end: 0.6em; }
.paper h3 { margin: 1.9em 0 0.5em; font-size: 1.0625rem; line-height: 1.35; font-weight: var(--weight-semibold); font-style: italic; letter-spacing: -0.005em; color: var(--ink); scroll-margin-top: 6rem; }
.paper h3 .paper-num { font-style: normal; min-width: 0; margin-inline-end: 0.5em; }
.paper h4 { margin: 1.4em 0 0.3em; font-size: 0.96875rem; font-weight: var(--weight-semibold); color: var(--ink-2); }
.paper-dl { margin: 0 0 1em; }
.paper-dl dt { margin-block-start: 0.8em; font-weight: 650; }
.paper-dl dd { margin: 0.15em 0 0; color: var(--ink-2); }
.paper details { margin: 1em 0; padding: var(--space-3) var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-2); font-size: 0.96875rem; }
.paper summary { cursor: pointer; font-family: var(--font-sans); font-weight: var(--weight-medium); }
.paper .lab-callout { margin-block: 1.6em; font-family: var(--font-sans); font-size: 0.96875rem; }
.paper .paper-note { margin: 0.5em 0 1em; font-size: var(--text-caption); line-height: 1.5; color: var(--muted); }

/* 5 Figures ----------------------------------------------------------------- */
.paper-fig { margin: 2em 0 2.2em; padding: 0; }
.paper-fig > svg, .paper-fig > img, .paper-fig .paper-svg { display: block; width: 100%; height: auto; max-width: 100%; margin-inline: auto; }
.paper-fig > :not(figcaption):not(svg):not(img) { max-width: 100%; }
.paper-fig svg { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); }
.paper-fig figcaption { margin-block-start: 0.7em; font-size: var(--text-small); line-height: 1.5; color: var(--ink-2); text-align: start; }
.paper-fig figcaption strong { color: var(--ink); font-weight: var(--weight-semibold); }
/* SVG paint classes (token based, both themes) */
.paper-fig svg text, .paper-fig svg .pf-text { font-family: var(--font-sans); fill: var(--ink-2); font-size: 12px; }
.paper-fig svg .pf-ink { fill: var(--ink); }
.paper-fig svg .pf-muted { fill: var(--muted); }
.paper-fig svg .pf-title { font-weight: 600; fill: var(--ink); }
.paper-fig svg .pf-mono { font-family: var(--font-mono); font-size: 11px; }
.paper-fig svg .pf-num { font-variant-numeric: tabular-nums; }
.paper-fig svg .pf-end { text-anchor: end; }
.paper-fig svg .pf-mid { text-anchor: middle; }
.paper-fig svg .pf-line { stroke: var(--line-strong); stroke-width: 1; fill: none; }
.paper-fig svg .pf-grid { stroke: var(--line); stroke-width: 1; fill: none; }
.paper-fig svg .pf-axis { stroke: var(--muted); stroke-width: 1; fill: none; }
.paper-fig svg .pf-arrow { stroke: var(--ink-2); stroke-width: 1.4; fill: none; }
.paper-fig svg .pf-arrowhead { fill: var(--ink-2); }
.paper-fig svg .pf-box { fill: var(--surface-2); stroke: var(--line-strong); stroke-width: 1; }
.paper-fig svg .pf-box-accent { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.2; }
.paper-fig svg .pf-surface { fill: var(--surface); }
.paper-fig svg .pf-fill-accent { fill: var(--accent-fill); }
.paper-fig svg .pf-fill-accent-soft { fill: var(--accent-soft); }
.paper-fig svg .pf-fill-info { fill: var(--info); }
.paper-fig svg .pf-fill-ok { fill: var(--success); }
.paper-fig svg .pf-fill-warn { fill: var(--warning); }
.paper-fig svg .pf-fill-muted { fill: var(--line-strong); }
.paper-fig svg .pf-fill-ink { fill: var(--ink-2); }
.paper-fig svg .pf-stroke-accent { stroke: var(--accent); fill: none; stroke-width: 2; }
.paper-fig svg .pf-on-accent { fill: #fff; }

/* 6 Tables ------------------------------------------------------------------ */
.paper-table { margin: 2em 0; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.paper-table-cap { margin: 0 0 0.6em; font-size: var(--text-caption); line-height: 1.45; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); text-align: center; }
.paper-table-cap strong { display: block; color: var(--ink); font-weight: var(--weight-semibold); letter-spacing: 0.1em; }
.paper-table table { width: 100%; min-width: 100%; border-collapse: collapse; border-block: 2px solid var(--ink); font-size: var(--text-small); line-height: 1.4; font-variant-numeric: lining-nums tabular-nums; }
.paper-table th, .paper-table td { padding: 7px 10px; text-align: start; vertical-align: top; border: 0; hyphens: none; }
.paper-table thead th { font-weight: var(--weight-semibold); color: var(--ink); border-block-end: 1px solid var(--ink); background: transparent; white-space: normal; }
.paper-table tbody th { font-weight: var(--weight-medium); color: var(--ink); }
.paper-table tbody tr + tr > * { border-block-start: 1px solid var(--line); }
.paper-table tbody td { color: var(--ink-2); }
.paper-table .num, .paper-table td.num, .paper-table th.num { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.paper-table tfoot td, .paper-table tfoot th { border-block-start: 1px solid var(--ink); font-weight: var(--weight-semibold); color: var(--ink); }
.paper-table caption { display: none; }
.paper-table--wide table { min-width: 36rem; font-size: var(--text-caption); }
.paper-table--wide th, .paper-table--wide td { padding: 6px 8px; }
.paper-table code { font-size: 0.9em; }
.paper-table:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 7 Code and equations ------------------------------------------------------ */
.paper-code { margin: 1.4em 0; padding: var(--space-4) var(--space-5); border: 1px solid var(--line); border-inline-start: 3px solid var(--accent); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--ink); font-family: var(--font-mono); font-size: 0.8125rem; line-height: 1.6; overflow-x: auto; white-space: pre; tab-size: 4; hyphens: none; }
.paper .code-block { margin-block: 1.4em; font-family: var(--font-sans); }

/* 8 References -------------------------------------------------------------- */
.paper-refs { list-style: none; counter-reset: pref; margin: 0; padding: 0; display: grid; gap: 0.7em; font-size: 0.9375rem; line-height: 1.5; hyphens: none; font-family: var(--paper-serif); }
.paper-refs > li { counter-increment: pref; position: relative; margin: 0; padding: 0 0 0 2.75rem; overflow-wrap: anywhere; }
.paper-refs > li::before { content: "[" counter(pref) "]"; position: absolute; inset-inline-start: 0; inset-block-start: 0.12em; width: 2.4rem; text-align: end; padding-inline-end: 0.15rem; font-size: var(--text-caption); font-weight: var(--weight-medium); color: var(--muted); font-variant-numeric: tabular-nums; }
.paper-refs .tag, .paper-refs .ref-note { font-family: var(--font-sans); font-size: var(--text-micro); color: var(--muted); }
.paper a[href^="#ref-"] { text-decoration: none; white-space: nowrap; }
.paper a[href^="#ref-"]:hover { text-decoration: underline; }

/* 9 Meta blocks: cite, download, versions, corrections ---------------------- */
.paper-meta { margin-block: var(--space-7) 0; padding-block-start: var(--space-6); border-block-start: 1px solid var(--line); font-family: var(--font-sans); font-size: 0.96875rem; }
.paper-meta p, .paper-meta li { font-family: var(--font-sans); }
.paper-meta .lab-cite { margin-block: 0 var(--space-5); }
.paper-meta dl.lab-keys { margin: 0; }
.paper-meta table { width: 100%; border-collapse: collapse; font-size: var(--text-small); }
.paper-meta th, .paper-meta td { padding: 7px 10px 7px 0; text-align: start; vertical-align: top; border-block-end: 1px solid var(--line); }
.paper-meta th { font-weight: var(--weight-semibold); color: var(--ink); }
.paper-meta ul { padding-inline-start: 1.2em; }

/* 10 Contents box (toc inside the article, reading layout) ------------------ */
.paper > .lab-toc { margin: 0 0 var(--space-6); padding: var(--space-4) var(--space-5); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-2); font-family: var(--font-sans); }
.paper > .lab-toc ol { border: 0; }
.paper > .lab-toc a { padding-inline-start: 0; border: 0; }
@media (min-width: 80em) {
  .paper { position: relative; }
  .paper > .lab-toc { float: left; position: sticky; inset-block-start: calc(var(--header-h) + var(--space-6)); width: 13rem; margin: 0 0 0 -15.5rem; padding: 0; border: 0; background: transparent; }
  .paper > .lab-toc ol { border-inline-start: 1px solid var(--line); }
  .paper > .lab-toc a { padding-inline-start: var(--space-4); margin-inline-start: -1px; border-inline-start: 2px solid transparent; }
  .paper > .lab-toc a[aria-current="true"] { border-inline-start-color: var(--accent); }
}
/* the automatic page head of reading/wide layouts duplicates the paper head: hide it when a paper is present */
.lab-head:has(+ .lab-body .paper) { display: none; }
.lab-body:has(> .container > .lab-prose > .paper) .lab-prose { max-width: none; font-size: inherit; line-height: inherit; letter-spacing: 0; }
/* the contents box in bare layout: keep the site's sticky behaviour, add paper padding */
.lab-layout > .lab-toc ~ .paper { padding-block-start: var(--space-3); }

/* mobile ------------------------------------------------------------------- */
@media (max-width: 40em) {
  .paper { --paper-size: 1.03125rem; line-height: 1.6; }
  .paper-head h1 { font-size: clamp(1.6rem, 1.3rem + 2.2vw, 2rem); }
  .paper-code { padding: var(--space-3) var(--space-4); font-size: 0.75rem; }
  .paper-abstract p { padding-inline-start: var(--space-3); }
  .paper-refs > li { padding-inline-start: 2.4rem; }
  .paper-refs > li::before { width: 2.1rem; }
  .paper-fig svg { border-radius: var(--radius-sm); }
}

/* 11 Print ------------------------------------------------------------------ */
@page { size: A4; margin: 20mm 17mm 22mm; @bottom-center { content: counter(page); font: 9pt Georgia, serif; color: #444; } }
@media print {
  html, body { background: #fff !important; color: #000 !important; }
  .site-header, .mobile-nav, .site-footer, .lab-toc, .lab-crumbs, .skip-link, .toast-region, dialog, .lab-footer__proto, .btn, .copy-btn, .lab-cite__actions, nav { display: none !important; }
  main { display: block; padding: 0 !important; }
  .lab-layout { display: block !important; }
  .lab-section { padding: 0 !important; }
  .paper { max-width: none; margin: 0; padding: 0 !important; font-size: 10.5pt; line-height: 1.38; color: #000; text-align: justify; hyphens: auto; orphans: 3; widows: 3; font-variant-numeric: lining-nums; }
  .paper p { margin-bottom: 0.6em; }
  .paper-head { border: 0; padding-block-end: 8pt; margin-block-end: 8pt; text-align: center; }
  .paper-head h1 { font-size: 20pt; line-height: 1.15; letter-spacing: -0.01em; }
  .paper-head .eyebrow { color: #000; font-size: 8.5pt; }
  .paper-authors { font-size: 11pt; }
  .paper-affil { color: #000; }
  .paper-status { border: 0; background: none; padding: 0; font-size: 8.5pt; letter-spacing: 0.04em; color: #000; }
  .paper-abstract h2 { color: #000; text-align: center; }
  .paper-abstract p { border: 0; padding: 0; font-size: 9.5pt; font-weight: 500; }
  .paper-keywords { color: #000; font-size: 9.5pt; margin-bottom: 14pt; }
  .paper-section { margin-bottom: 12pt; }
  .paper-section > h2, .paper-meta > h2 { font-size: 9.5pt; color: #000; text-align: center; margin: 14pt 0 6pt; letter-spacing: 0.1em; break-after: avoid; }
  .paper-num, .paper a, .paper-keywords strong, .paper-table-cap strong, .paper-fig figcaption strong { color: #000 !important; }
  .paper h3 { font-size: 10.5pt; break-after: avoid; margin: 10pt 0 3pt; }
  .paper h4 { break-after: avoid; color: #000; }
  .paper a { text-decoration: none; }
  .paper-fig, .paper-table, .paper-code, .paper-refs > li, .paper .lab-cite, .paper .code-block { break-inside: avoid; }
  .paper-fig svg { border: 0; background: none; }
  .paper-fig figcaption { font-size: 8.5pt; color: #000; text-align: justify; }
  .paper-table-cap { font-size: 8pt; color: #000; }
  .paper-table table { font-size: 8.5pt; }
  .paper-table, .paper-table--wide table { overflow: visible; min-width: 0; }
  .paper-code { background: none; border: 1px solid #999; border-inline-start: 1px solid #999; font-size: 8pt; white-space: pre-wrap; overflow: visible; }
  .paper :not(pre) > code { background: none; padding: 0; }
  .paper-refs { font-size: 9pt; text-align: left; }
  .paper-refs > li::before { color: #000; }
  .paper-meta { break-before: auto; border-color: #999; }
  .paper details { border: 0; background: none; padding: 0; }
  .paper details > * { display: block; }
}

/* 12 Forced colours --------------------------------------------------------- */
@media (forced-colors: active) {
  .paper-abstract p { border-inline-start-color: Highlight; }
  .paper-fig svg, .paper-code, .paper-status, .paper details { border: 1px solid CanvasText; }
  .paper-table table { border-block-color: CanvasText; }
  .paper a { color: LinkText; }
}

/* 13 Reports index page (/research/reports/) */
.paper-reports { max-width: 62rem; }
.paper-reports .lab-callout { margin-block: 0 var(--space-6); }
.paper-reports .paper-table table { font-family: var(--font-sans); font-size: var(--text-ui); }
.paper-reports .paper-table td:nth-child(2) a { font-weight: var(--weight-medium); }
.paper-reports .paper-table td { color: var(--ink); }
.paper-reports .paper-table td:nth-child(3) { color: var(--ink-2); white-space: nowrap; }
.paper-reports .paper-table-cap { text-align: start; }
@media print { .paper-reports .lab-callout { display: none; } }
.paper-fig svg + svg { margin-top: 0.8em; }

/* phones: figures keep their reading size and scroll inside their own box */
.paper-fig:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
@media (max-width: 40em) {
  .paper-fig { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .paper-fig > svg, .paper-fig > .paper-svg { width: auto; min-width: 38rem; max-width: none; }
  .paper-fig figcaption { position: sticky; inset-inline-start: 0; max-width: calc(100vw - 2 * var(--gutter)); }
}
@media print { .paper-fig { overflow: visible; } .paper-fig > svg { min-width: 0; width: 100%; } }
.paper-reports .paper-table tbody th { white-space: nowrap; }
.paper-reports .paper-table table { min-width: 40rem; }
