/* ==========================================================================
   SAS LEX.ICON — shared stylesheet (style.css)
   --------------------------------------------------------------------------
   Loaded by EVERY generated and hand-maintained HTML page (year tables, corpus
   indexes, SASLEXICON.html, timeline, authors index + detail pages, keywords
   index + detail pages, quick title search, md_to_html hand pages, and the
   LexJansen.html tribute page). Changes here apply site-wide immediately — no
   HTML regeneration needed.

   Reorganized 2026-09-16 into topical sections. Rules are identical to the
   previous single-block layout; only section placement and comments changed,
   plus a few redundant declarations were merged. Section order preserves the
   original cascade for the sticky/position rules (which are order-sensitive).

   Contents:
     1.  Variables & Reset
     2.  Typography & Links
     3.  Site Banner
     4.  Site Header (SASLEXICON.html masthead)
     5.  Page Head (icon + title)
     6.  Corpus Switcher
     7.  Sticky Nav Bar + A-Z Alpha Nav + Anchor Offsets
     8.  Sticky Back-Link Bar + Homepage Exceptions
     9.  Year Table Layout
     10. Sticky thead Base + Compositor Promotion + Zebra Striping
     11. Other Table Widths
     12. Sorting & Filter Controls
     13. Authors Index — Filter Bar
     14. Authors Index — Letter Tables (virtualized)
     15. Footer (locked) + Footnote + JS Spacers
     16. LexJansen Decoration (.lex / .vinyls)
     17. Bibliography Modal
     18. Quick Title Search
     19. Hover Preview Popup
   ========================================================================== */


/* --------------------------------------------------------------------------
   1. VARIABLES & RESET
   --------------------------------------------------------------------------
   The four layout heights below are shared by every sticky element; change
   them once and all sticky offsets follow (banner, table-nav, filter bar,
   letter headers). Used by: all pages.
   -------------------------------------------------------------------------- */
:root {
  --banner-h: 48px;       /* fixed top .site-banner height (every page) */
  --sticky-nav-h: 28px;   /* div.table-nav / sticky back-link bar height */
  --filter-bar-h: 43px;   /* .global-filter-bar on authors.html */
  --letter-h2-h: 42px;    /* .letter-header on authors.html (= its 42px height) */
}

/* Smooth in-page anchor scrolling; forced permanent scrollbar keeps layout
   width stable. Used by: all pages. */
html {
  scroll-behavior: smooth;
  overflow-y: scroll;
  overflow-anchor: none;
}
/* Respect users who disable motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* While typing in filters, rows under the pointer can scroll-jump; suppress
   anchor scrolling on the body rows. Used by: all pages. */
tbody { overflow-anchor: none; }

/* Base page canvas: system font stack, white background, and top padding that
   clears the fixed banner, driven by --banner-h so the two can never drift
   apart. Used by: all pages. */
body {
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  color: #1a1a1a;
  line-height: 1.55;
  background: #fff;
  padding-top: var(--banner-h);
}

/* Content column: centered, width-capped; the 72px bottom padding reserves
   room for the JS-locked footer (see section 14). Used by: all pages. */
main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2px 20px 72px;
}


/* --------------------------------------------------------------------------
   2. TYPOGRAPHY & LINKS
   --------------------------------------------------------------------------
   Headings, base table cells, code blocks, links, blockquotes and footnote
   paragraphs. Used by: all pages.
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 { clear: both; }
h1 {
  border-bottom: 2px solid #e8e8e8;
  padding-bottom: .35em;
}
h2 {
  margin-top: 1.4em;
  border-bottom: 1px solid #eee;
  padding-bottom: .25em;
}

/* Base table machinery shared by every table class on the site. Per-table
   layout/width overrides live in sections 8 and 10. */
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  margin: 1em 0;
}
th, td {
  border: 1px solid #ddd;
  padding: 4px 8px;
  text-align: left;
  vertical-align: top;
}
th {
  background: #eef2f6;
  border: 2px solid #bbb;
}

/* Inline code inside abstracts/keywords (backtick spans from markup_sas) */
code {
  font-family: Consolas, "Courier New", monospace;
  background: #f4f4f4;
  padding: 1px 4px;
  border-radius: 3px;
  font-size: .92em;
}
.grey { color: #777; }
pre {
  background: #f4f4f4;
  border: 1px solid #d0d5db;
  border-radius: 4px;
  padding: 10px 12px;
  margin: .75em 0;
  overflow-x: auto;
  line-height: 1.5;
}
pre code { background: none; padding: 0; border-radius: 0; }

/* Images in hand-maintained Markdown pages (md_to_html.py): inline
   .md-img plus the {left:} {center:} {right:} {duo:} alignment wrappers. */
.md-img {
  max-width: 100%;
  height: auto;
  border: 1px solid #d0d5db;
  border-radius: 4px;
  vertical-align: middle;
}
.img-left, .img-right, .img-center { display: block; }
.img-left { float: left; margin: .25em 1em .5em 0; padding-right: 1em; }
.img-right { float: right; margin: .25em 0 .5em 1em; padding-left: 1em; }
.img-center { text-align: center; margin: .5em 0; }
.img-left img, .img-right img { max-width: 100%; }
.img-duo { display: flex; gap: .6em; align-items: flex-start; margin: .5em 0; }
.img-duo img { flex: 1 1 0; min-width: 0; }
.img-duo-center { justify-content: center; }
.img-duo-right { justify-content: flex-end; }
.img-left.img-scale img, .img-right.img-scale img { width: 100%; }
.img-duo.img-scale img { flex: 0 1 auto; }

/* Global link colors; page-specific nav links (banner, switcher, footer)
   override these. Used by: all pages. */
a, a:link, a:visited { color: #0645ad; text-decoration: none; }
a:hover { text-decoration: underline; }

blockquote {
  border-left: 4px solid #ddd;
  margin: 1em 0;
  padding: 0 1em;
  color: #555;
}
ul { padding-left: 1.5em; }

/* Footnote / disclaimer paragraphs ("p.fn") rendered by footnote_html() at the
   bottom of every page, and by md_to_html for hand-maintained pages. */
p.fn {
  font-size: 11px;
  color: #888;
  margin: 0.4em 0;
}


/* --------------------------------------------------------------------------
   3. SITE BANNER
   --------------------------------------------------------------------------
   Fixed blue top bar with HOME / QUICK SEARCH / AUTHORS / KEYWORDS links.
   Emitted by generate_html.py (site_banner_html()) and present by hand on
   LexJansen.html. Used by: every page.
   -------------------------------------------------------------------------- */
.site-banner {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--banner-h);
  background: #0645ad;
  z-index: 50;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.site-banner-inner {
  max-width: 1440px; margin: 0 auto; padding: 0 20px;
  box-sizing: border-box; height: 100%;
  display: flex; align-items: center;
}
.site-banner-item,
.site-banner-item:link,
.site-banner-item:visited {
  flex: 1 1 0; text-align: center;
  color: #fff; font-size: 18px; font-weight: 700;
  line-height: var(--banner-h); white-space: nowrap; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.site-banner-icon { height: 44px; width: auto; display: block; }
.site-banner-item:hover,
.site-banner-item:focus { color: #ccc; text-decoration: none; }
@media (max-width: 700px) { .site-banner-item { font-size: 13px; } }
@media (max-width: 420px) { .site-banner-item { font-size: 11px; } }


/* --------------------------------------------------------------------------
   4. SITE HEADER — SASLEXICON.html masthead
   --------------------------------------------------------------------------
   Title row on the homepage only: 256px logo, "SAS LEX.ICON" title with the
   last-update date, and the hosted-by (hosted-logo) block on the right. The
   two `main:has(.site-title-row)` rules make the intro paragraph + corpus table
   header scroll normally on the homepage instead of going sticky (see §7).
   Used by: SASLEXICON.html.
   -------------------------------------------------------------------------- */
h1.site-title {
  display: flex; align-items: flex-end; gap: .18em;   /* flex with the logo so the date span sits on the baseline */
  font-size: 4em;
  margin: 0;
}
h1 .under-construction { color: #888; font-size: 14px; font-weight: normal; }

.site-title-row {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  border-bottom: 2px solid #e8e8e8; padding-bottom: .2em;
}
.site-title-row h1 { border: none; padding-bottom: 0; }   /* drop the base h1 underline */
.site-title-logo { width: auto; height: 64px; flex: 0 0 auto; display: block; }
.site-title-row .hosted-logo { margin-left: auto; }        /* push the hosted-by block to the far right */
main:has(.site-title-row) { padding-top: 6px; }            /* homepage: tighten the top gap */
@media (max-width: 900px) {
  .site-title-row .hosted-logo { width: 100%; justify-content: flex-start; margin-left: 0; }
}

/* hosted-by logo block — logo + "Hosted thanks to hospitality of … WUT" text.
   Emitted by generate_indexes_html.py for SASLEXICON.html. */
.hosted-logo { display: flex; align-items: center; justify-content: flex-end; gap: 16px; }
.hosted-logo .hosted-text { margin: 0; font-size: 12px; line-height: 1.4; text-align: right; }
.hosted-logo .hosted-text a { color: inherit; text-decoration: none; }
.hosted-logo .hosted-text a:hover { text-decoration: underline; }
.hosted-logo img { height: 72px; width: auto; display: block; border: 0; }


/* --------------------------------------------------------------------------
   5. PAGE HEAD — icon + title
   --------------------------------------------------------------------------
   Standard page header "h1.page-head" with a small PNG icon on the left.
   Used by: authors index, keywords index, timeline, quick title search, and
   hand-maintained pages via md_to_html.py.
   -------------------------------------------------------------------------- */
h1.page-head {
  margin: 8px 0;
  padding-bottom: .15em;
  display: flex; align-items: center; gap: 12px;
}
h1.page-head .page-head-icon { height: 1.2em; width: auto; flex: 0 0 auto; }


/* --------------------------------------------------------------------------
   6. CORPUS SWITCHER
   --------------------------------------------------------------------------
   Horizontal link strip on every corpus index page letting you jump between
   all conference indexes; the current conference is shown grey and bold.
   Emitted by generate_indexes_html.py. Used by: <corpus>/<corpus>.html.
   -------------------------------------------------------------------------- */
.corpus-switcher {
  display: flex; flex-wrap: wrap; justify-content: center;
  column-gap: 10px; row-gap: 2px;
  font-size: 13px; line-height: 1.3; margin: 8px 0;
}
.corpus-switcher a,
.corpus-switcher a:link,
.corpus-switcher a:visited { color: #0645ad; text-decoration: none; font-weight: bold;
  padding: 0; }
.corpus-switcher a:hover,
.corpus-switcher a:focus { text-decoration: underline; }
.corpus-switcher-current { color: #ccc; font-weight: bold; }


/* --------------------------------------------------------------------------
   7. STICKY NAV BAR (div.table-nav) + A-Z ALPHA NAV + ANCHOR OFFSETS
   --------------------------------------------------------------------------
   The bar sits directly under the site banner while the table scrolls below.
   Row 1: "back" link (left), year prev/next links (center, year tables only),
   and the A-Z alpha-nav (right/center). On narrow screens it collapses to a
   2-row grid. Used by: year tables, authors index, keywords index.
   -------------------------------------------------------------------------- */
/* Heading directly above the nav: tighten its bottom margin */
main > p:has(+ div.table-nav) { margin: 6px 0 4px; }
div.table-nav {
  position: sticky; top: var(--banner-h); z-index: 5; background: #fff;
  margin: 0; padding: 0 8px; border-bottom: 3px solid #ddd;
  display: flex; align-items: center; justify-content: space-between;
}
div.table-nav .back { flex: 0 0 auto; margin: 0; }
div.table-nav .year-nav, div.table-nav .year-prev { flex: 0 0 auto; margin: 0;
  min-width: 90px; text-align: center; white-space: nowrap; }
span.year-nav { margin-left: 24px; }

/* A-Z jump links (Top / A…Z / Bottom). Each letter anchors to the first row of
   that bucket; letters without papers fall back to the nearest preceding one. */
nav.alpha-nav { display: flex; flex-wrap: wrap; gap: 2px 12px; justify-content: center; }
nav.alpha-nav a { font-weight: 600; padding: 0 2px; }
/* When the bar only holds the alpha-nav (author/keyword index pages) center it. */
div.table-nav:has(> nav.alpha-nav:only-child) { justify-content: center; }

/* Narrow screens: 2-row grid (back / year / prev on top, alpha-nav below).
   Also grows --sticky-nav-h so every sticky offset that consumes it (year
   table thead, scroll-margins) tracks the taller two-row bar. */
@media (max-width: 1100px) {
  main:has(div.table-nav ~ div.year-table-wrap) { --sticky-nav-h: 53px; }
  div.table-nav { display: grid; grid-template-columns: auto 1fr auto;
                  grid-template-areas: "back mid prev" "nav nav nav"; }
  div.table-nav .back { grid-area: back; margin: 0; }
  div.table-nav .year-nav { grid-area: mid; margin: 0; text-align: center; }
  div.table-nav .year-prev { grid-area: prev; margin: 0; text-align: center; }
  nav.alpha-nav { grid-area: nav; }
}

/* Anchor targets must land fully visible below the sticky bars:
   - tr[id^="alpha-"] — first row of each letter bucket on year tables
   - h2[id^="alpha-"] — letter headers on the authors/keywords index
   - #year-table / #table-bottom / h1#top — jump-to-top / bottom links */
tr[id^="alpha-"] { scroll-margin-top: calc(var(--banner-h) + var(--sticky-nav-h) + 44px); }
h2[id^="alpha-"] { scroll-margin-top: calc(var(--banner-h) + var(--sticky-nav-h) + var(--filter-bar-h) + 52px); }
#year-table { scroll-margin-top: calc(var(--sticky-nav-h) + var(--banner-h)); }
#table-bottom { scroll-margin-top: calc(var(--sticky-nav-h) + var(--banner-h)); }
h1#top { scroll-margin-top: var(--banner-h); }


/* --------------------------------------------------------------------------
   8. STICKY BACK-LINK BAR + HOMEPAGE EXCEPTIONS
   --------------------------------------------------------------------------
   Pages that open with a lone "<p><a>…back…</a></p>" row followed by a table
   (year tables, author/keyword detail pages) get an automatic sticky back bar
   under the banner. ORDER-SENSITIVE: the two homepage exceptions below must
   follow (and out-specify) the base rule to keep SASLEXICON.html scrolling
   statically. Used by: year tables, detail pages, SASLEXICON.html.
   -------------------------------------------------------------------------- */
p:has(> a:only-child):has(~ table) {
  position: sticky; top: var(--banner-h); z-index: 4; background: #fff;
  margin: 0; padding: 4px 8px; border-bottom: 3px solid #ddd;
}
/* With a back-bar present, drop the table header just below it */
p:has(> a:only-child) ~ table thead th { top: calc(var(--sticky-nav-h) + var(--banner-h)); }

/* Homepage (SASLEXICON.html): intro paragraph + table header scroll with the page */
main:has(.site-title-row) > p:has(> a:only-child):has(~ table) {
  position: static; margin: 1em 0; padding: 0;
  border-bottom: none; background: transparent;
}
main:has(.site-title-row) > table.corpus-list thead,
main:has(.site-title-row) > table.corpus-list thead th {
  position: static; box-shadow: none;
}


/* --------------------------------------------------------------------------
   9. YEAR TABLE LAYOUT — <corpus>/<year>/<corpus>_<year>.html
   --------------------------------------------------------------------------
   The 7-column paper table: # / title / authors / abstract / keywords /
   extras / pages. Fixed layout, column widths from the colgroup, whole thead
   (header name row + per-column filter row) sticks below the nav bar as one
   opaque unit.
   -------------------------------------------------------------------------- */
.year-table-wrap {
  border: 1px solid #fff; border-radius: 4px; background: #fff;
  margin: 1.2em 0;
}
/* whole thead sticks as a unit so the 2-line header stays fully opaque */
div.table-nav ~ div.year-table-wrap table thead {
  position: sticky; top: calc(var(--sticky-nav-h) + var(--banner-h) - 1px); z-index: 3;
  background: #eef2f6;
}
div.table-nav ~ div.year-table-wrap table thead th {
  top: auto; z-index: auto; height: auto;
}

table.year { table-layout: fixed; }
table.year th, table.year td { overflow-wrap: anywhere; }
/* fixed column split (colgroup widths) */
table.year col:nth-child(1) { width: 3%; }
table.year col:nth-child(2) { width: 20%; }
table.year col:nth-child(3) { width: 12%; }
table.year col:nth-child(4) { width: 36%; }
table.year col:nth-child(5) { width: 19%; }
table.year col:nth-child(6) { width: 8%; }
table.year col:nth-child(7) { width: 4%; }

/* paper-# column: centered, tiny */
table.year th:nth-child(1) { text-align: center; }
table.year td:nth-child(1) { text-align: center; font-size: 8px; }
/* pages column: right-aligned so page numbers line up */
table.year th:nth-child(7) { text-align: left; }
table.year td:nth-child(7) { text-align: right; }


/* --------------------------------------------------------------------------
   10. STICKY thead BASE + COMPOSITOR PROMOTION + ZEBRA STRIPING
   --------------------------------------------------------------------------
   Default: every table header sticks below the site banner. Used by: year
   tables, corpus indexes, timeline, quick title search, author detail, keyword
   detail. (Year-table specifics are overridden in section 8.) The 1px offset
   on the named tables hides the banner's bottom edge seam.
   -------------------------------------------------------------------------- */
thead th { position: sticky; top: var(--banner-h); z-index: 1; box-shadow: inset 0 -2px 0 #bbb; }
table.corpus-years thead th,
table.title-search thead th,
table.timeline thead th { top: calc(var(--banner-h) - 1px); }

/* Promote the sticky layers to their own compositor layer: avoids repaint
   micro-shifts while scrolling. Applies to every element that sticks. */
thead, div.table-nav, .site-banner, .global-filter-bar, .letter-header { transform: translateZ(0); }

/* Generic even-row zebra; per-table row classes (r-odd/r-even) override it
   where granular control is needed (authors/keywords tables, title search). */
tbody tr:nth-child(even) { background: #fafbfc; }


/* --------------------------------------------------------------------------
   11. OTHER TABLE WIDTHS
   --------------------------------------------------------------------------
   table.corpus-list  — SASLEXICON.html corpus summary + timeline.html
   table.corpus-years — corpus index pages (<corpus>/<corpus>.html, year rows)
   table.timeline    — timeline.html conference list (sticky thead in §9 style)
   table.year-list   — author & keyword detail paper lists (#papers: fixed 6 col)
   -------------------------------------------------------------------------- */
table.corpus-list { width: 1200px; margin: 0 auto; }

table.corpus-years { width: 1000px; margin: 0 auto; table-layout: fixed; }
table.corpus-years th, table.corpus-years td { overflow-wrap: anywhere; }
table.corpus-years th:nth-child(1), table.corpus-years td:nth-child(1),
table.corpus-years th:nth-child(2), table.corpus-years td:nth-child(2),
table.corpus-years th:nth-child(3), table.corpus-years td:nth-child(3),
table.corpus-years th:nth-child(4), table.corpus-years td:nth-child(4) { width: 25%; }

table.timeline { width: 1200px; margin: 0 auto; }
table.timeline thead th { position: sticky; top: var(--banner-h); z-index: 3; }
table.timeline th:nth-child(1) { width: 60%; }
table.timeline th:nth-child(2) { width: 25%; }
table.timeline th:nth-child(3) { width: 15%; text-align: center; }
table.timeline td:nth-child(3) { text-align: center; font-variant-numeric: tabular-nums; }

table.year-list { width: 1400px; margin: 0 auto; }
/* Author detail pages (generate_authors_html.py): fixed 6-column split */
table.year-list#papers { table-layout: fixed; }
table.year-list#papers col:nth-child(1) { width: 16%; }
table.year-list#papers col:nth-child(2) { width: 11%; }
table.year-list#papers col:nth-child(3) { width: 45%; }
table.year-list#papers col:nth-child(4) { width: 16%; }
table.year-list#papers col:nth-child(5) { width: 8%; }
table.year-list#papers col:nth-child(6) { width: 4%; }


/* --------------------------------------------------------------------------
   12. SORTING & FILTER CONTROLS
   --------------------------------------------------------------------------
   The table-sort.js toolkit. Clickable sort headers with ▲/▼ indicators, the
   per-column substring filter input (.col-filter) with its × clear button, and
   the "Restore order" link on timeline.html.
   Used by: year tables, timeline, authors index + detail, keyword detail.
   -------------------------------------------------------------------------- */
/* sortable headers: click to sort (toggle asc/desc); thead is 2-line so hover
   shows which column is active */
table.year th.sortable, table.authors th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
table.year th.sortable:hover, table.authors th.sortable:hover { background: #dde6ef; }
table.year th.sort-asc::after, table.authors th.sort-asc::after { content: " \25B2"; font-size: 10px; color: #444; }
table.year th.sort-desc::after, table.authors th.sort-desc::after { content: " \25BC"; font-size: 10px; color: #444; }

/* per-column filter input inside sortable headers; the HTML `size` attribute
   controls width, font-size is fixed (box-sizing merged from a duplicate) */
input.col-filter {
  font-size: 13px; padding: 2px 6px; margin-left: 6px;
  border: 1px solid #bbb; border-radius: 3px; max-width: 100%;
  box-sizing: border-box;
}
input.col-filter:focus { outline: none; border-color: #0645ad; }

/* × button clearing an individual column filter */
.filter-clear { cursor: pointer; margin-left: 3px; color: #fff;
  font-weight: 700; font-size: 12px; user-select: none;
  background: #555; border: 1px solid #888; border-radius: 2px;
  width: 18px; height: 18px; line-height: 1; text-align: center;
  display: inline-flex; align-items: flex-start; justify-content: center;
  vertical-align: middle; box-sizing: border-box;
  padding-bottom: 0.3em; }
.filter-clear:hover { background: #333; border-color: #555; }

/* "Restore order" — plain-text link (timeline.html) and old <button> markup */
button.restore-order { font-size: 13px; padding: 4px 12px; cursor: pointer;
  border: 1px solid #888; border-radius: 3px; background: #eef2f6; }
button.restore-order:hover { background: #dde6ef; }
.restore-order { float: right; cursor: pointer; color: #999;
  font-size: 13px; user-select: none; }
.restore-order:hover { color: #0645ad; text-decoration: underline; }


/* --------------------------------------------------------------------------
   13. AUTHORS INDEX — FILTER BAR
   --------------------------------------------------------------------------
   Sticky filter strip below the table-nav on authors.html only: global text
   filter, conference multi-select dropdown, # papers checkboxes, "Selected
   authors" counter, and "Clear all filters". Sticking lower than the nav bar
   (top: nav height + banner) because it sits below it in the DOM.
   Used by: authors/authors.html.
   -------------------------------------------------------------------------- */
.global-filter-bar {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 16px;
  margin: 0; padding: 8px 12px;
  background: #f5f5f5; border-bottom: 1px solid #e0e0e0;
  position: sticky; top: calc(var(--sticky-nav-h) + var(--banner-h)); z-index: 6;
}
/* two flex sub-groups: left = global filter input, right = dropdowns + count */
.filter-left { display: flex; align-items: center; gap: 4px; }
.filter-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; }
/* each control group ("Conferences:", "# Papers:", "Selected authors") */
.filter-group { display: flex; align-items: center; gap: 4px; font-size: 13px; white-space: nowrap; }
.filter-group b { font-size: 12px; color: #555; }
.filter-group label { font-weight: normal; font-size: 12px; cursor: pointer; }
.filter-group select { font-size: 12px; padding: 2px 4px; cursor: pointer;
  border: 1px solid #bbb; border-radius: 3px; max-width: 180px; }
.filter-group input { margin: 0 1px 0 0; cursor: pointer; }

/* conference dropdown button ("All conferences ▾" / "N selected ▾") */
.conf-dropdown-btn { font-size: 12px; padding: 3px 8px; cursor: pointer;
  border: 1px solid #bbb; border-radius: 3px; background: #fff; white-space: nowrap; }
.conf-dropdown-btn:hover { border-color: #0645ad; }
.conf-dropdown-wrap { position: relative; display: inline-flex; }
/* absolute-positioned checkbox panel; .open flips display: none -> flex column */
.conf-dropdown-panel { display: none; position: absolute; top: 100%; left: 0; z-index: 10;
  background: #fff; border: 1px solid #ccc; border-radius: 3px;
  padding: 6px 10px; box-shadow: 2px 2px 6px rgba(0,0,0,0.15); }
.conf-dropdown-panel.open { display: flex; flex-direction: column; gap: 2px; }
.conf-dropdown-panel label { font-size: 12px; font-weight: normal; cursor: pointer; padding: 1px 0; }
.conf-dropdown-actions { display: flex; gap: 8px; padding-bottom: 4px; margin-bottom: 4px; border-bottom: 1px solid #eee; }
.conf-dropdown-actions button { font-size: 11px; padding: 2px 6px; cursor: pointer;
  border: 1px solid #bbb; border-radius: 3px; background: #f5f5f5; }
.conf-dropdown-actions button:hover { background: #e0e8f0; border-color: #0645ad; }

/* "Filter all tables:" label (overrides the lighter .filter-group label) */
.global-filter-bar label { font-weight: 600; margin-right: 8px;
  font-size: 14px; }
/* the global text input (filters author names across every letter table) */
.global-filter { font-size: 14px; padding: 4px 8px;
  border: 1px solid #bbb; border-radius: 3px; width: 240px; }
.global-filter:focus { outline: none; border-color: #0645ad; }
/* larger × for the global filter (22px vs 18px column clears) */
.global-filter-bar .filter-clear { width: 22px; height: 22px;
  font-size: 14px; vertical-align: middle; margin-left: 4px; }
/* "Clear all filters" pinned to the far right of the bar */
.clear-all-filters { cursor: pointer; color: #999; font-size: 13px;
  user-select: none; white-space: nowrap; position: absolute; right: 12px; }
.clear-all-filters:hover { color: #0645ad; text-decoration: underline; }
.filter-count { font-size: 12px; color: #666; white-space: nowrap; }


/* --------------------------------------------------------------------------
   14. AUTHORS INDEX — LETTER TABLES (virtualized)
   --------------------------------------------------------------------------
   One letter-section per A–Z bucket, each containing a table.authors. Rows are
   rendered on demand by authors.js / keywords.js as fixed single-line rows, so
   heights/paddings below are what keep the virtual window aligned.
   Used by: authors/authors.html, keywords/keywords.html.
   -------------------------------------------------------------------------- */
.letter-section { background: #fff; }
.letter-section { scroll-margin-top: calc(var(--banner-h) + var(--sticky-nav-h) + var(--filter-bar-h)); }

/* sticky letter label ("A", "B", …) — stacks under the nav + filter bars */
.letter-header {
  position: sticky;
  top: calc(var(--banner-h) + var(--sticky-nav-h) + var(--filter-bar-h));
  z-index: 3; background: #fff; margin: 0;
  padding: 0 10px;
  height: 42px;
  box-sizing: border-box;
  display: flex; align-items: center;
  font-size: 18px; font-weight: 700;
  border-bottom: 1px solid #bbb;
}

/* letter table: fixed 1200px, centered; column widths below by nth-child */
.letter-section table.authors { margin: 0 auto; border-collapse: separate; border-spacing: 0; table-layout: fixed; width: 1200px; }
.letter-section table.authors th:nth-child(1), .letter-section table.authors td:nth-child(1) { width: 26%; }
.letter-section table.authors th:nth-child(2), .letter-section table.authors td:nth-child(2) { width: 6%; }
.letter-section table.authors th:nth-child(3), .letter-section table.authors td:nth-child(3) { width: 7%; }
.letter-section table.authors th:nth-child(4), .letter-section table.authors td:nth-child(4) { width: 7%; }
.letter-section table.authors th:nth-child(5), .letter-section table.authors td:nth-child(5) { width: 54%; }

/* header styling: blue-grey bg, hairline column separators */
.letter-section table.authors thead { background: #eef2f6; }
.letter-section table.authors th { border: 1px solid #bbb; border-bottom: 1px solid #ddd; }
.letter-section table.authors th + th { border-left: 1px solid #bbb; }
.letter-section table.authors td { border: 1px solid #ddd; border-top: none; }
.letter-section table.authors td + td { border-left: 1px solid #ddd; }

/* header sticks under the letter-header (below it in DOM) */
.letter-section table.authors thead th {
  top: calc(var(--banner-h) + var(--sticky-nav-h) + var(--filter-bar-h) + var(--letter-h2-h));
  z-index: 2;
}

/* virtualized single-line rows (windowed by authors.js / keywords.js): fixed
   height, ellipsis truncation so off-screen rows keep a constant row pitch */
.letter-section table.authors tbody td {
  height: 34px;
  box-sizing: border-box;
  padding: 0 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.letter-section table.authors tbody td:nth-child(2),
.letter-section table.authors tbody td:nth-child(3),
.letter-section table.authors tbody td:nth-child(4) {
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.letter-section table.authors tbody td:nth-child(5) {
  font-size: 12px;
}
/* spacer <tr> used by the virtualization window: give it no height clamp */
.letter-section table.authors tr.spacer td {
  height: auto;
  overflow: visible;
}
/* explicit row backgrounds (r-odd/r-even beats the generic zebra in §9) */
.letter-section table.authors tbody tr { background: #fff; }
.letter-section table.authors tr.r-odd td { background: #fff; }
.letter-section table.authors tr.r-even td { background: #fafbfc; }


/* --------------------------------------------------------------------------
   15. FOOTER (locked) + FOOTNOTE + JS SPACERS
   --------------------------------------------------------------------------
   Every page ends with a page-footer drawn by footnote_html() (logo cell +
   disclaimer text). table-sort.js locks it to the viewport bottom via the
   .is-locked class and injects #footer-spacer to keep content height stable.
   .page-spacer is a separate JS hook on the authors/keywords indexes.
   -------------------------------------------------------------------------- */
.page-footer { padding: 12px 0; border-top: 1px solid #ddd; }
.page-footer.is-locked { position: fixed; bottom: 0; left: 0; right: 0;
  max-width: 1400px; margin: 0 auto; padding: 12px 20px;
  background: #fff; border-top: 1px solid #ddd; z-index: 5; }
/* spacer injected by table-sort.js under a locked footer (prevents content jump) */
#footer-spacer { display: none; height: 0; }
#footer-spacer.active { display: block; }

/* .page-spacer: NO CSS properties — it is a JS hook on authors.html /
   keywords.html. authors.js / keywords.js set its height dynamically to keep
   the last letter's rows clear of the locked footer. Do not delete. */
.page-spacer { }

/* footnote wrap: logo cell on the left, disclaimer paragraphs on the right;
   on very narrow screens it stacks vertically */
.footnote-wrap {
  display: flex; gap: 20px; align-items: flex-start;
  margin-top: 1.2em;
}
.footnote-logo { flex: 0 0 auto; }
.footnote-logo img { height: 96px; width: auto; display: block; }
.footnote-text { flex: 1 1 auto; min-width: 0; }
.footnote-text p.fn:first-child { margin-top: 0; }
@media (max-width: 500px) {
  .footnote-wrap { flex-direction: column; align-items: center; }
}


/* --------------------------------------------------------------------------
   16. LEXJANSEN DECORATION — .lex / .vinyls
   --------------------------------------------------------------------------
   Hand-maintained LexJansen.html tribute page only: .lex gives the memorial
   block an explicit white background (kept intentionally), .vinyls is the
   bottom-fixed decorative vinyl-record strip (z-index -1 puts it behind the
   page content).
   -------------------------------------------------------------------------- */
.lex {
  background-color: #fff;
}

.vinyls {
  z-index: -1;
  display: flex;
  justify-content: center;
  position: fixed;
  bottom: 0px;
  max-width: 1400px;
  height: 115px;
}
.vinyls img {
  align-self: flex-end;
}


/* --------------------------------------------------------------------------
   17. BIBLIOGRAPHY MODAL
   --------------------------------------------------------------------------
   "Bibliography" button + modal (overlay, checkbox filter groups, results
   table, actions, and a fallback textarea). Driven by bibliography.js from
   author detail pages, keyword detail pages, and quick title search.
   -------------------------------------------------------------------------- */
.biblio-btn { font-size: 13px; padding: 4px 12px; margin-left: 12px;
  vertical-align: middle; cursor: pointer;
  border: 1px solid #888; border-radius: 3px; background: #eef2f6; }
.biblio-btn:hover { background: #dde6ef; border-color: #0645ad; }
.biblio-btn:disabled { opacity: .45; cursor: default; }
.biblio-btn:disabled:hover { background: #eef2f6; border-color: #888; }

/* full-screen dimmed backdrop behind the centered modal */
.biblio-overlay { position: fixed; inset: 0; z-index: 200;
  background: rgba(0, 0, 0, 0.45);
  display: flex; align-items: center; justify-content: center; }
.biblio-overlay[hidden] { display: none; }

/* modal card: rounded white box, column flex, scrollable result area */
.biblio-modal { background: #fff; border-radius: 6px; box-shadow: 0 6px 30px rgba(0,0,0,0.25);
  width: calc(100% - 32px); max-width: 1400px; max-height: 90vh;
  display: flex; flex-direction: column; overflow: hidden; }
.biblio-modal-head { display: flex; align-items: baseline; gap: 12px;
  padding: 12px 16px 8px; border-bottom: 2px solid #e8e8e8; }
.biblio-modal-head h2 { margin: 0; font-size: 18px; border: none; padding: 0; }
.biblio-sub { font-size: 12px; color: #666; flex: 1 1 auto; }
.biblio-close { border: 1px solid #bbb; border-radius: 3px; background: #f5f5f5;
  cursor: pointer; font-size: 16px; line-height: 1; padding: 2px 8px; }
.biblio-close:hover { background: #e0e8f0; border-color: #0645ad; }

/* checkbox filter groups (conference / year / kind) */
.biblio-filters { display: flex; gap: 24px; flex-wrap: wrap;
  padding: 10px 16px; border-bottom: 1px solid #eee; }
.biblio-fgroup { border: 1px solid #ddd; border-radius: 3px; margin: 0;
  padding: 6px 10px; flex: 1 1 0; min-width: 0; }
.biblio-fgroup legend { font-size: 12px; font-weight: 700; padding: 0 4px; color: #555; }
.biblio-checks { display: flex; flex-wrap: wrap; gap: 4px 14px; max-width: none; }
.biblio-checks label { font-size: 13px; font-weight: normal; cursor: pointer; white-space: nowrap; }
.biblio-checks input { margin: 0 2px 0 0; cursor: pointer; }
.biblio-fgroup-actions { margin-top: 6px; display: flex; gap: 6px; }
.biblio-fgroup-actions .biblio-action { font-size: 11px; padding: 2px 8px; }

/* toolbar row: count + "local links only" toggle */
.biblio-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 16px 4px; }
.biblio-count { font-size: 13px; color: #666; margin-left: auto; white-space: nowrap; }
.biblio-local-links { font-size: 12px; color: #555; white-space: nowrap; cursor: pointer; }
.biblio-local-links input { margin: 0 3px 0 0; cursor: pointer; }

/* scrollable result table with its own sticky header inside the modal */
.biblio-scroll { overflow: auto; flex: 1 1 auto; padding: 0 16px; }
.biblio-table { width: 100%; font-size: 13px; margin: 8px 0 4px; table-layout: fixed; }
.biblio-table thead th { position: sticky; top: 0; z-index: 1;
  background: #eef2f6; }
.biblio-table th:first-child, .biblio-table td:first-child {
  width: 18px; padding-left: 3px; padding-right: 3px; text-align: center;
}
.biblio-table th:nth-child(2), .biblio-table td:nth-child(2) { width: 14%; }
.biblio-table th:nth-child(3), .biblio-table td:nth-child(3) { width: 6%; }
.biblio-col-check { width: 18px; }
.biblio-table td .biblio-table th { vertical-align: top; }

@media (max-width: 700px) {
  .biblio-fgroup { flex-basis: 100%; }
}

/* bottom action row (Copy / Download / Close + primary "Open" button) */
.biblio-actions { display: flex; justify-content: flex-end; gap: 10px;
  padding: 12px 16px; border-top: 1px solid #eee; }
.biblio-action { font-size: 13px; padding: 5px 14px; cursor: pointer;
  border: 1px solid #888; border-radius: 3px; background: #eef2f6; }
.biblio-action:hover { background: #dde6ef; border-color: #0645ad; }
.biblio-go { background: #0645ad; border-color: #0645ad; color: #fff; font-weight: 600; }
.biblio-go:hover { background: #04337d; }

/* fallback panel when no browser API (e.g. clipboard/exports) is available */
.biblio-fallback { padding: 12px 16px; border-top: 2px dashed #c0392b; }
.biblio-fallback p { margin: 0 0 8px; font-size: 13px; }
.biblio-fallback textarea { width: 100%; height: 220px; font-family: Consolas, "Courier New", monospace;
  font-size: 12px; box-sizing: border-box; }
.biblio-fallback .biblio-action { margin-top: 8px; }


/* --------------------------------------------------------------------------
   18. QUICK TITLE SEARCH — quicktitlessearch.html
   --------------------------------------------------------------------------
   Search input row + help box + results table. Rows are windowed by the worker
   (fixed 40px pitch, ellipsis), sortable headers re-use the sort arrows.
   -------------------------------------------------------------------------- */
.title-search-bar { display: flex; align-items: center; gap: 10px; margin: .4em 0 .4em; flex-wrap: wrap; }
#title-search { font-size: 16px; padding: 7px 12px; flex: 1 1 320px; max-width: 520px;
  border: 1px solid #999; border-radius: 3px; box-sizing: border-box; }
.title-search-clear { display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; font-size: 18px; line-height: 1; cursor: pointer;
  background: #444; color: #fff; border-radius: 50%; user-select: none; }
.title-search-clear:hover { background: #222; }
.title-search-count { font-size: 13px; color: #666; }
.title-search-status { font-size: 12px; color: #888; font-style: italic; }
.title-search-fields { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; color: #555; }
.title-search-field { cursor: pointer; white-space: nowrap; user-select: none; }
.title-search-field input { margin: 0 2px 0 0; vertical-align: middle; }
.title-search-filters { display: inline-flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.title-search-filter-label { font-size: 13px; color: #555; font-weight: 600; }
.title-search-filters .conf-dropdown-panel { max-height: 60vh; overflow-y: auto; }
.title-search-filters .conf-dropdown-panel label { white-space: nowrap; }
.title-search-bar .biblio-btn { margin-left: auto; }
.title-search-help { font-size: 13px; color: #555; background: #f5f7fa;
  border: 1px solid #ddd; border-left: 4px solid #0645ad; padding: 8px 12px;
  margin: 0 0 1em; line-height: 1.5; }
.title-search-help code { background: #eef2f6; padding: 1px 4px; border-radius: 3px; }
.title-search-result { display: none; margin-top: .5em; color: #666; }
.title-search-placeholder { color: #888; font-style: italic; margin: 1.5em 0; }
.title-search-count-bottom { font-size: 13px; }

table.title-search { table-layout: fixed; width: 100%; }
table.title-search th, table.title-search td { overflow-wrap: break-word; word-wrap: break-word; }
table.title-search thead th { cursor: pointer; white-space: nowrap; }
table.title-search th.sort-asc::after { content: " \25B2"; font-size: 10px; color: #444; }
table.title-search th.sort-desc::after { content: " \25BC"; font-size: 10px; color: #444; }
table.title-search tbody td {
  height: 40px; box-sizing: border-box; padding: 2px 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  vertical-align: middle;
}
table.title-search tbody tr { background: #fff; }
table.title-search tr.r-odd td { background: #fff; }
table.title-search tr.r-even td { background: #fafbfc; }
/* spacer row used by the virtualization window: no clamp, no borders */
table.title-search tr.spacer td {
  height: auto; padding: 0; border: none; background: transparent; overflow: visible;
}
@media (max-width: 700px) {
  .title-search-bar { flex-direction: column; align-items: stretch; }
  #title-search { max-width: none; }
  .title-search-count { text-align: left; }
  .title-search-filters { align-items: flex-start; }
  .title-search-bar .biblio-btn { margin-left: 0; }
}


/* --------------------------------------------------------------------------
   19. HOVER PREVIEW POPUP — preview.js
   --------------------------------------------------------------------------
   Thumbnail popup shown when hovering a paper-title link that carries a
   data-preview JPEG (year tables, author/keyword detail pages, quick title
   search). The popup is built by preview.js; the .preview-popup-note band
   overlays the thumbnail when the linked PDF is reported missing on the
   server (per-corpus text from preview_notes.json). The band is anchored by
   its BOTTOM edge, BAND_BOTTOM_GAP_FRAC (1/8) of the thumbnail height above
   the thumbnail's bottom edge -- preview.js measures and writes style.top on
   every show/image load/popup move, so nothing here positions it.

   The band is a child of .preview-popup (position: fixed), not of
   .preview-popup-imgwrap, which is why its offsets are relative to the popup.

   NOTE: this rule block has no counterpart for preview.js's click guard
   (missing-PDF -> source URL, via the data-source attribute on the same
   title links). That feature renders no UI -- it only decides whether a
   click opens a tab -- so it needs no CSS here.
   -------------------------------------------------------------------------- */
.preview-popup {
  position: fixed;
  z-index: 1000;
  display: none;
  pointer-events: none;
  background: #fff;
  border: 1px solid #b7b7b7;
  border-radius: 4px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  padding: 8px 8px 6px;
  max-width: 580px;
  font-family: inherit;
}
.preview-popup img {
  display: block;
  max-width: 560px;
  max-height: 660px;
  width: auto;
  height: auto;
  border: 1px solid #ddd;
  background: #fff;
}
/* caption under the thumbnail (paper title, 2-line wrap) */
.preview-popup .preview-popup-cap {
  margin: 5px 2px 0;
  font-size: 13px;
  line-height: 1.4;
  color: #444;
  max-width: 560px;
  overflow-wrap: break-word;
}
/* vertical red band shown when the PDF is missing on the server. Hidden by
   default; preview.js adds .show after its HEAD probe fails, then sets
   style.top to place it over the thumbnail (see section header). */
.preview-popup .preview-popup-note {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
   top: 0;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.93);
  color: #c92a2a;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.18);
  overflow-wrap: break-word;
  white-space: pre-line;
}
.preview-popup .preview-popup-note.show {
  display: block;
}
/* wrapper box around the thumbnail: a block that caps the image at MAX_W so a
   very wide page image cannot widen the popup. The note band is NOT positioned
   against this wrapper (it is a child of .preview-popup), so it needs no
   position:relative here. */
.preview-popup .preview-popup-imgwrap {
  display: block;
  max-width: 560px;
}
