/* Field Lab article shell for research pages: header, footer, reading column, prose, tables, notes.
 * Load after tokens.css and field-lab.css. Plain CSS, tokens only, no Tailwind, so a page can be inlined and stay self-contained. */
html { background: var(--bg); scroll-padding-top: 4.5rem; }
body { margin: 0; min-height: 100vh; }

/* Header and footer: the same chrome as the home page and research.html. */
.site-header { position: fixed; inset: 0 0 auto; z-index: 50; border-bottom: 1px solid var(--ink); background: rgb(var(--bg-rgb) / .95); backdrop-filter: blur(24px); }
.site-header-inner { max-width: 72rem; height: 3.5rem; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.site-brand { display: inline-flex; align-items: center; }
.site-nav { display: flex; align-items: center; }
.site-nav a:not(.fl-btn) { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; font-size: .875rem; color: var(--ink-2); text-decoration: none; }
.site-nav a:not(.fl-btn):hover, .site-nav a[aria-current] { color: var(--ink); }
.site-nav .fl-btn { min-height: 44px; font-size: .875rem; }
.site-footer { border-top: 1px solid var(--line); padding: var(--space-6) var(--space-4); }
.site-footer-inner { max-width: 72rem; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4); }
.site-footer .fl-mono { font-size: .75rem; letter-spacing: .05em; color: var(--ink-2); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: var(--space-5); }
.site-footer a { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; font-size: .75rem; }
/* Links outside .art (breadcrumb, footer, skip link) match research.html: ink, 1px underline, 2px on hover. */
.art-crumb a, .site-footer a, .skip { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.art-crumb a:hover, .site-footer a:hover { text-decoration-thickness: 2px; }
@media (min-width: 640px) {
  .site-header-inner, .site-footer { padding-inline: 2rem; }
  .site-nav { gap: 1.75rem; }
}
@media (max-width: 639px) { .site-nav a.gh:not(.fl-btn) { display: none; } .site-nav { gap: var(--space-2); } .site-header-inner { padding-inline: var(--space-4); gap: var(--space-3); } .site-nav a:not(.fl-btn) { min-width: 0; font-size: .8125rem; } .site-nav .fl-btn { padding-inline: var(--space-3); } }

/* Page frame. The header is fixed, so the first block clears it. */
.art-wrap { max-width: 72rem; margin: 0 auto; padding: calc(3.5rem + var(--space-5)) var(--space-4) calc(var(--section-y) / 2); }
@media (min-width: 640px) { .art-wrap { padding-inline: 2rem; } }
.art-crumb { display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--space-4); min-height: 44px; font-size: .875rem; }
.art-col { max-width: 46rem; }
.art-head { max-width: 46rem; margin-top: var(--space-5); }

/* Type: Archivo squeezed per level, as on the site's own headings. */
.art h1, .art h2, .art h3 { font-family: var(--f-display); font-weight: 800; word-spacing: .15em; text-wrap: balance; overflow-wrap: break-word; }
.art h1 { margin: var(--space-3) 0 0; font-size: clamp(2.25rem, 7vw, 3.5rem); font-stretch: 68%; line-height: .95; letter-spacing: -.03em; }
.art h2 { margin: 0; font-size: clamp(1.5rem, 4vw, 1.875rem); font-stretch: 82%; line-height: 1.1; letter-spacing: -.03em; }
.art h3 { margin: var(--space-5) 0 0; font-size: 1.125rem; font-stretch: 90%; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }
.art-lede { margin: var(--space-4) 0 0; font-size: 1.125rem; line-height: 1.6; color: var(--ink-2); }
.art-col section { margin-top: calc(var(--section-y) / 2); padding-top: calc(var(--section-y) / 2); border-top: 1px solid var(--line); }
.art p, .art li, .art dd { line-height: 1.65; }
.art p { margin: var(--space-4) 0 0; }
.art .q { margin: var(--space-2) 0 0; font-weight: 700; }
.art .small, .art .figcap, .art caption { font-size: .875rem; line-height: 1.5; color: var(--ink-2); }
.art a:where(:not(.fl-btn)) { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.art a:hover { text-decoration-thickness: 2px; }
.art code { font: .875em var(--f-mono); overflow-wrap: anywhere; }
.art sup a { text-decoration: none; font-size: .75em; color: var(--accent-ink); }
.art pre { margin: var(--space-3) 0 0; padding: var(--space-3); overflow-x: auto; font: .75rem/1.5 var(--f-mono); background: var(--bg); border: 1px solid var(--line); }

/* Notes: an ink plate with a message, like fl-notice but free of a tag. */
.callout { margin-top: var(--space-5); padding: var(--space-3) var(--space-4); border: 1.5px solid var(--ink); background: var(--surface-2); }
.callout p:first-child { margin-top: 0; }
.callout p { font-size: .9375rem; }

/* Tables: mono labels over 1px rules; wide ones scroll inside their own box, never the page. */
.scroll { margin-top: var(--space-4); overflow-x: auto; }
.art table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.art caption { text-align: left; padding-bottom: var(--space-2); }
.art th, .art td { padding: var(--space-2) var(--space-2); text-align: right; border-top: 1px solid var(--line); vertical-align: top; }
.art th:first-child, .art td:first-child { text-align: left; }
.art thead th { border-top: 0; border-bottom: 1.5px solid var(--ink); font: var(--t-label); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.art tbody th { font-weight: 500; }
.art td.mono, .art th.mono { font-family: var(--f-mono); }

/* Disclosure, definitions, sources. */
.art details { margin-top: var(--space-5); padding: var(--space-3) var(--space-4); background: var(--surface); border: 1px solid var(--line); }
.art details[open] { border-color: var(--ink); }
.art details > :not(summary) { margin-top: var(--space-3); }
.art dl { margin: var(--space-4) 0 0; }
.art dt { margin-top: var(--space-3); font-weight: 700; }
.art dd { margin: 2px 0 0; color: var(--ink-2); }
.art ol.refs, .art ol.jump { padding-left: 1.4rem; color: var(--ink-2); }
.art ol.refs { font-size: .9rem; }
.art ol.refs li, .art ol.jump li { margin: var(--space-2) 0; }

/* Form controls inside an article. */
.art label { display: block; margin: 0 0 var(--space-1); font: var(--t-label); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.art input[type=text] { width: 100%; min-height: 44px; padding: 0 var(--space-3); font: 1rem var(--f-body); color: var(--ink); background: var(--bg); border: 1.5px solid var(--ink); border-radius: var(--radius-sm); }
.art .fl-btn { min-height: 44px; padding: 0 var(--space-4); font-size: .9375rem; }
.art .fl-btn[aria-pressed=true] { background: var(--ink); color: var(--bg); }
.art .fl-btn:disabled { text-decoration: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: var(--space-2); }
.skip:focus { left: var(--space-2); z-index: 60; padding: var(--space-2) var(--space-3); background: var(--surface); }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* Code: static highlight spans written into the page (no script). Weight and style carry meaning as well as colour. */
.art pre.code { margin-top: var(--space-3); }
.tok-kw { color: var(--accent-ink); font-weight: 700; }
.tok-fn { color: var(--ink); font-weight: 600; }
.tok-str { color: var(--chart-3); }
.tok-num { color: var(--accent-ink); }
.tok-com { color: var(--ink-2); font-style: italic; }
.tok-type { color: var(--chart-3); font-weight: 700; }

/* Drawn pictures (inline SVG): used by the search-cost article and the same pictures inside the SHA-256 article. */
.pic { margin: var(--space-4) 0 0; padding: var(--space-4); background: var(--surface); border: 1px solid var(--line); }
.pic svg { display: block; width: 100%; max-width: 40rem; height: auto; margin: 0 auto; }
.pic figcaption { margin-top: var(--space-3); font-size: .875rem; line-height: 1.5; color: var(--ink-2); }
.pic svg .t { font: 500 12px var(--f-body); fill: var(--ink); }
.pic svg .t2 { font: 500 12px var(--f-body); fill: var(--ink-2); }
.pic svg .tb { font: 700 13px var(--f-body); fill: var(--ink); }
.pic svg .box { fill: var(--bg); stroke: var(--ink); stroke-width: 1.5; }
.pic svg .miss { fill: var(--surface-2); stroke: var(--line); stroke-width: 1.5; }
.pic svg .hit { fill: var(--accent); stroke: var(--ink); stroke-width: 1.5; }
.pic svg .hit-t { font: 700 12px var(--f-body); fill: var(--on-accent); }
.pic svg .plate { fill: var(--ink); }
.pic svg .plate-t { font: 600 12px var(--f-body); fill: var(--bg); }
.pic svg .dash { stroke-dasharray: 5 3; }
.pic svg .ln { stroke: var(--ink); stroke-width: 1.5; fill: none; }
.pic svg .arr { fill: var(--ink); }

/* Contents box, under the title. */
.art-toc { margin:var(--space-4) 0; padding:var(--space-3) var(--space-4); border:1px solid var(--line,currentColor); border-radius:6px }
.art-toc .toc-h { margin:0 0 var(--space-2); font-weight:700 }
.art-toc ol { list-style:none; display:flex; flex-wrap:wrap; gap:0 var(--space-4); padding:0; margin:0 }
.art-toc a { display:inline-flex; align-items:center; min-height:44px; color:var(--ink-2) }
.art-toc a:hover { color:var(--ink) }
