/* WANDR audit page. Paper styling per docs/benchmark-research-style-guide.md,
   taken from public/automationbench-audit-v2/css/paper.css: Charter text,
   small-caps section heads, an italic title over a hairline rule, Burgundy
   links and booktabs tables. This page is static, so the base layout that the
   AutomationBench viewer gets from styles.css is included here. */

@font-face { font-family: "XCharter"; font-style: normal; font-weight: 400; font-display: swap; src: local("XCharter-Roman"), local("XCharter"), local("Charter Roman"), local("Charter-Roman"); }
@font-face { font-family: "XCharter"; font-style: italic; font-weight: 400; font-display: swap; src: local("XCharter-Italic"), local("Charter Italic"), local("Charter-Italic"); }
@font-face { font-family: "XCharter"; font-style: normal; font-weight: 700; font-display: swap; src: local("XCharter-Bold"), local("Charter Bold"), local("Charter-Bold"); }
@font-face { font-family: "XCharter"; font-style: italic; font-weight: 700; font-display: swap; src: local("XCharter-BoldItalic"), local("Charter Bold Italic"), local("Charter-BoldItalic"); }

html.paper {
  --paper: #ffffff;
  --ink: #000000;
  --muted: #404040;
  --line: #d9d9d9;
  --burgundy: #900020;
  background: var(--paper);
  color: var(--ink);
  --font-body: "XCharter", "Charter", "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --font-mono: "DejaVu Sans Mono", "Bitstream Vera Sans Mono", Menlo, Consolas, monospace;
  --type-reading: 17px;
  --type-small: 15.3px;
  --type-foot: 13.6px;
  --type-display: 35px;
  --leading-reading: 1.4;
  --text-width: 620px;
  font-synthesis: small-caps;
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html.paper *, html.paper *::before, html.paper *::after { box-sizing: border-box; }
html.paper body { margin: 0; min-width: 320px; background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: var(--type-reading); line-height: var(--leading-reading); }
html.paper .app-shell { min-height: 100dvh; overflow: clip; }
html.paper a { color: var(--burgundy); text-decoration: none; }
html.paper a:hover { text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
html.paper a:focus-visible { outline: 1px solid var(--burgundy); outline-offset: 3px; }
html.paper code { font-family: var(--font-mono); font-size: 0.82em; overflow-wrap: anywhere; }
html.paper .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
html.paper .skip-link { position: absolute; top: 9px; left: 16px; z-index: 2; padding: 7px 10px; transform: translateY(-150%); background: var(--ink); color: var(--paper); font-size: var(--type-foot); }
html.paper .skip-link:focus { transform: translateY(0); }

/* Running heads: lowercase small caps. */
html.paper .sc,
html.paper .publication-meta,
html.paper .draft-banner,
html.paper .brand-project,
html.paper .site-nav a,
html.paper .header-release,
html.paper .footer-notes a { font-family: var(--font-body); font-size: var(--type-small); font-variant-caps: all-small-caps; letter-spacing: 0.06em; text-transform: lowercase; font-weight: 400; }

/* Header and footer run across the window: 64px left gutter, 32px right. */
html.paper .site-header-inner,
html.paper .site-footer-inner { width: calc(100% - 96px); margin-inline: 64px 0; }
html.paper .site-header-inner { min-height: 64px; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px 24px; padding-block: 12px; }
html.paper .brand { display: inline-flex; align-items: center; gap: 10px; width: fit-content; color: var(--ink); }
html.paper .brand:hover { text-decoration: none; }
html.paper .brand-assets { display: inline-flex; align-items: center; gap: 7px; }
html.paper .brand-icon { display: block; width: 18px; height: 18px; object-fit: contain; }
html.paper .brand-logo { display: block; width: 76px; height: auto; }
html.paper .brand-divider { color: var(--muted); }
html.paper .brand-project { color: var(--ink); font-size: var(--type-reading); white-space: nowrap; }
html.paper .site-nav { grid-column: 2; grid-row: 1; justify-self: center; display: flex; align-items: center; gap: 28px; }
html.paper .site-nav a { color: var(--ink); font-size: var(--type-reading); }
html.paper .site-nav a:hover, html.paper .site-nav a.is-active { color: var(--burgundy); text-decoration: none; }
html.paper .header-release { grid-column: 3; grid-row: 1; justify-self: end; margin: 0; color: var(--muted); text-align: right; }
html.paper .site-footer { padding-block: 26px 34px; color: var(--ink); }
html.paper .site-footer-inner { display: flex; align-items: baseline; justify-content: space-between; gap: 28px; }
html.paper .footer-notes { margin-inline-start: auto; }
html.paper .footer-notes a { color: var(--burgundy); }

/* The reading column: 620px, centred. */
html.paper .page-container { width: min(var(--text-width), calc(100% - 96px)); margin-inline: auto; }

/* Page opening: draft line, breadcrumb, then the title over its rule. */
html.paper .lead { padding-top: 96px; }
html.paper .draft-banner { margin: 0 0 16px; color: var(--burgundy); }
html.paper .lead .publication-meta { margin: 0 0 40px; color: var(--ink); }
html.paper .lead .publication-meta a { color: var(--ink); }
html.paper .lead .publication-meta a:hover { color: var(--burgundy); }
html.paper .lead h1 { margin: 0; padding-bottom: 12px; border-bottom: 0.6px solid var(--ink); color: var(--muted); font-size: var(--type-display); font-style: italic; font-weight: 400; line-height: 1.3; }

html.paper .copy { padding-top: 24px; padding-bottom: 96px; }
html.paper .copy > p,
html.paper .copy li { margin: 0 0 14px; hyphens: auto; text-align: justify; }
html.paper .copy ul { margin: 14px 0; padding-left: 1.6em; }
html.paper .copy ul li { margin: 0 0 6px; padding-left: 0.2em; }

/* \section: \small lowercase small caps. \subsection: italic. */
html.paper .copy h2 { margin: 32px 0 10px; color: var(--ink); font-family: var(--font-body); font-size: var(--type-small); font-variant-caps: all-small-caps; font-weight: 400; letter-spacing: 0.06em; line-height: var(--leading-reading); text-transform: lowercase; }
html.paper .copy h3 { margin: 28px 0 8px; font-size: var(--type-reading); font-style: italic; font-weight: 400; line-height: var(--leading-reading); }

/* booktabs: heavy top and bottom rules, a light midrule, no fills. */
html.paper .table-figure { margin: 24px 0; }
html.paper .booktabs { width: 100%; border-collapse: collapse; border-top: 1.3px solid var(--ink); border-bottom: 1.3px solid var(--ink); font-size: var(--type-foot); line-height: 1.3; font-variant-numeric: lining-nums tabular-nums; }
html.paper .booktabs th, html.paper .booktabs td { padding: 4px 8px; vertical-align: baseline; text-align: left; }
html.paper .booktabs th:first-child, html.paper .booktabs td:first-child { padding-left: 4px; }
html.paper .booktabs thead th { padding-top: 6px; padding-bottom: 6px; border-bottom: 0.8px solid var(--ink); font-weight: 700; }
html.paper .booktabs tbody th { font-weight: 400; }
html.paper .booktabs tbody tr:first-child > * { padding-top: 6px; }
html.paper .booktabs tbody tr:last-child > * { padding-bottom: 6px; }
html.paper .booktabs .num { text-align: right; white-space: nowrap; }
html.paper .booktabs code { font-size: 12px; }

/* Figures. */
html.paper figure { margin: 28px 0; }
html.paper figure img { display: block; width: 100%; height: auto; }
html.paper figcaption { margin-top: 10px; color: var(--ink); font-size: var(--type-foot); line-height: 1.3; text-align: left; }
html.paper .table-figure figcaption { margin-top: 8px; }
html.paper .figure-label { font-style: italic; }

html.paper .closing { margin-top: 24px; }

@media (max-width: 1024px) {
  html.paper .site-nav { grid-column: 1 / -1; grid-row: 2; }
}

/* Phones: equal 20px gutters, stacked header (brand, release name, nav), ragged-right prose. */
@media (max-width: 680px) {
  html.paper .page-container,
  html.paper .site-header-inner,
  html.paper .site-footer-inner { width: auto; margin-inline: 20px; }
  html.paper .site-header-inner { min-height: 0; grid-template-columns: minmax(0, 1fr); gap: 6px; padding-block: 14px 0; }
  html.paper .site-header-inner > .brand { grid-column: 1; grid-row: 1; }
  html.paper .brand { gap: 7px; }
  html.paper .brand-assets { gap: 5px; }
  html.paper .brand-icon { width: 16px; height: 16px; }
  html.paper .brand-logo { width: 64px; }
  html.paper .header-release { grid-column: 1; grid-row: 2; justify-self: start; text-align: left; }
  html.paper .site-nav { grid-column: 1; grid-row: 3; justify-self: start; gap: 24px; }
  html.paper .site-footer-inner { flex-direction: column; align-items: flex-start; gap: 14px; }
  html.paper .footer-notes { margin-inline-start: 0; }
  html.paper .lead { padding-top: 32px; }
  html.paper .lead .publication-meta { margin-bottom: 20px; }
  html.paper .lead h1 { font-size: 28px; line-height: 1.25; }
  html.paper .copy > p, html.paper .copy li { text-align: left; hyphens: manual; overflow-wrap: break-word; }
  html.paper .booktabs { table-layout: fixed; }
  html.paper .booktabs th { overflow-wrap: anywhere; }
  html.paper .booktabs th:first-child { width: 40%; }
  html.paper .booktabs .num { white-space: normal; }
}

/* Click to enlarge (js/lightbox.js). The image is a borderless button; the enlarged view is a full-screen
   native dialog on the page colour with the caption beneath. No layout shift: the scrollbar gutter is reserved.
   Inside the dialog the image can be zoomed (click, or "zoom in"); the zoomed image scrolls in its viewport. */
html.paper { scrollbar-gutter: stable; }
html.paper.lightbox-open { overflow: hidden; }
html.paper .figure-zoom { display: block; width: 100%; margin: 0; padding: 0; border: 0; background: none; cursor: zoom-in; }
html.paper .figure-zoom:focus-visible { outline: 1px solid var(--burgundy); outline-offset: 3px; }
html.paper .lightbox { box-sizing: border-box; width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 48px 32px 32px;
  border: 0; background: var(--paper); color: var(--ink); cursor: zoom-out; }
html.paper .lightbox[open] { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; animation: lightbox-in 120ms ease-out; }
html.paper .lightbox::backdrop { background: var(--paper); }
html.paper .lightbox-viewport { max-width: 100%; max-height: calc(100dvh - 160px); overflow: hidden; overscroll-behavior: contain; cursor: default; }
html.paper .lightbox-viewport.is-zoomed { overflow: auto; scrollbar-color: var(--muted) var(--line); }
html.paper .lightbox-image { display: block; max-width: none; max-height: none; height: auto; cursor: zoom-in; }
html.paper .lightbox-viewport.is-zoomed .lightbox-image { cursor: zoom-out; }
html.paper .lightbox-image:focus-visible { outline: 1px solid var(--burgundy); outline-offset: -2px; }
html.paper .lightbox-caption { max-width: 820px; margin: 0; color: var(--ink); font-size: var(--type-foot); line-height: 1.3; text-align: left; }
html.paper .lightbox-tools { position: absolute; top: 14px; right: 24px; display: flex; gap: 18px; }
html.paper .lightbox-tools button { padding: 4px 0; border: 0; background: none; color: var(--burgundy);
  font-family: var(--font-body); font-size: var(--type-small); font-variant-caps: all-small-caps; letter-spacing: 0.06em; text-transform: lowercase; cursor: pointer; }
html.paper .lightbox-tools button:hover { text-decoration: underline; text-underline-offset: 3px; }
html.paper .lightbox-tools button:focus-visible { outline: 1px solid var(--burgundy); outline-offset: 3px; }
@keyframes lightbox-in { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 679px) { html.paper .lightbox { padding: 44px 16px 16px; } html.paper .lightbox-tools { right: 16px; } }
@media (prefers-reduced-motion: reduce) { html.paper .lightbox[open] { animation: none; } }

/* Highlighted row in a booktabs table (the OpenAI row in Table 1): accent colour only, no fill. */
html.paper .booktabs tr.is-highlight th, html.paper .booktabs tr.is-highlight td { color: var(--burgundy); }

/* Figures served through <picture> (a phone version below 680px): block-level, so the image fills the column. */
html.paper figure picture { display: block; }

/* Table headers wrap between words only, never inside one. */
html.paper .booktabs th { hyphens: manual; overflow-wrap: normal; word-break: normal; }
