/* WikiLeague — production stylesheet
 *
 * Visual language: Wikipedia (Vector 2022 skin), adapted for the
 * Baseball Documents Archive. System font stack so no third-party
 * font loads. Dark mode via prefers-color-scheme. Print stylesheet
 * strips chrome and renders references with full URLs.
 */

:root {
  /* Light theme (default) */
  --wl-bg: #ffffff;
  --wl-bg-soft: #f8f9fa;
  --wl-bg-alt: #eaecf0;
  --wl-text: #202122;
  --wl-text-muted: #54595d;
  --wl-link: #3366cc;
  --wl-link-visited: #795cb2;
  --wl-link-hover: #447ff5;
  --wl-link-new: #d33;
  --wl-border: #a2a9b1;
  --wl-border-subtle: #c8ccd1;
  --wl-rule: #eaecf0;
  --wl-verified-bg: #e7f5ef;
  --wl-verified-fg: #0a5a45;
  --wl-verified-border: #b8e0cf;
  --wl-review-bg: #fbf2e2;
  --wl-review-fg: #7a4800;
  --wl-review-border: #efd8a8;
  --wl-placeholder-bg: #eaecf0;
  --wl-placeholder-fg: #54595d;
  --wl-placeholder-border: #c8ccd1;
  --wl-focus: #36c;

  --wl-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --wl-serif: "Linux Libertine", "Georgia", "Times New Roman", serif;
  --wl-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --wl-bg: #101418;
    --wl-bg-soft: #1c1f24;
    --wl-bg-alt: #262a30;
    --wl-text: #e6e8eb;
    --wl-text-muted: #a2a9b1;
    --wl-link: #6da5ff;
    --wl-link-visited: #b39ddb;
    --wl-link-hover: #8fbcff;
    --wl-link-new: #f06b6b;
    --wl-border: #3a3f47;
    --wl-border-subtle: #2a2e34;
    --wl-rule: #1c1f24;
    --wl-verified-bg: #15302a;
    --wl-verified-fg: #6ee7b7;
    --wl-verified-border: #1e4d42;
    --wl-review-bg: #2e2516;
    --wl-review-fg: #f4c069;
    --wl-review-border: #4a3a1d;
    --wl-placeholder-bg: #262a30;
    --wl-placeholder-fg: #a2a9b1;
    --wl-placeholder-border: #3a3f47;
    --wl-focus: #6da5ff;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--wl-bg);
  color: var(--wl-text);
  font-family: var(--wl-sans);
  font-size: 14px;
  line-height: 1.6;
}

a {
  color: var(--wl-link);
  text-decoration: none;
}
a:hover { color: var(--wl-link-hover); text-decoration: underline; }
a:visited { color: var(--wl-link-visited); }
a:focus-visible {
  outline: 2px solid var(--wl-focus);
  outline-offset: 2px;
  border-radius: 2px;
}
a.new { color: var(--wl-link-new); }
a.new:visited { color: var(--wl-link-new); }
a.external::after {
  content: " \2197";
  font-size: 0.85em;
  color: var(--wl-link);
}

/* Skip link for keyboard / screen reader users. */
.wl-skip {
  position: absolute;
  left: -10000px;
  top: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.wl-skip:focus {
  position: static;
  width: auto;
  height: auto;
  padding: 6px 10px;
  background: var(--wl-bg-alt);
  color: var(--wl-text);
  border: 1px solid var(--wl-border);
}

/* ---------- Top chrome ---------- */

.wl-topbar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--wl-border-subtle);
  background: var(--wl-bg);
}

.wl-logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--wl-text);
}
.wl-logo:hover { text-decoration: none; }

.wl-logo-img {
  height: 40px;
  width: auto;
  display: block;
  /* The supplied wordmark is black on transparent; invert in dark mode so
   * the letterforms read on the dark background. */
}
@media (prefers-color-scheme: dark) {
  .wl-logo-img { filter: invert(1) hue-rotate(180deg); }
}

.wl-wordmark-sub {
  font-size: 11px;
  color: var(--wl-text-muted);
  letter-spacing: 0.3px;
  line-height: 1.2;
  max-width: 14em;
}

.wl-search {
  flex: 1;
  max-width: 520px;
}
.wl-search-input {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--wl-border);
  border-radius: 2px;
  font: inherit;
  background: var(--wl-bg);
  color: var(--wl-text);
}
.wl-search-input::placeholder { color: var(--wl-text-muted); }
.wl-search-input:focus-visible {
  outline: 2px solid var(--wl-focus);
  outline-offset: 1px;
}

.wl-utility {
  display: flex;
  gap: 1rem;
  font-size: 12.5px;
}
.wl-utility a { color: var(--wl-link); }

/* ---------- Tab row ---------- */

.wl-tabs {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--wl-border-subtle);
  background: var(--wl-bg-soft);
  padding: 0 1rem;
  font-size: 13px;
}
.wl-tabs ul {
  list-style: none;
  display: flex;
  gap: 0;
  margin: 0;
  padding: 0;
}
.wl-tabs li {
  padding: 6px 12px 8px;
  border-right: 1px solid var(--wl-rule);
  color: var(--wl-link);
}
.wl-tabs li a { display: block; }
.wl-tabs li.wl-tab-active {
  font-weight: 500;
  border-bottom: 1px solid var(--wl-bg);
  margin-bottom: -1px;
  background: var(--wl-bg);
  border-left: 1px solid var(--wl-border-subtle);
  border-top: 1px solid var(--wl-border-subtle);
  border-right: 1px solid var(--wl-border-subtle);
}
.wl-tabs li.wl-tab-active a { color: var(--wl-text); }

/* ---------- Layout: sidebar + content ---------- */

.wl-page {
  display: grid;
  grid-template-columns: 11rem 1fr;
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem;
  gap: 1.5rem;
}

.wl-sidebar h4 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--wl-text-muted);
  margin: 1.25rem 0 0.4rem;
  border-bottom: 1px solid var(--wl-rule);
  padding-bottom: 4px;
}
.wl-sidebar h4:first-child { margin-top: 0; }
.wl-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0 0 0.5rem;
  font-size: 13px;
}
.wl-sidebar li { padding: 2px 0; }

/* ---------- Main content ---------- */

.wl-main {
  min-width: 0;
}

.wl-firstHeading {
  font-family: var(--wl-serif);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.2;
  margin: 0 0 0.25rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--wl-border-subtle);
}
.wl-tagline {
  font-size: 13px;
  color: var(--wl-text-muted);
  font-style: italic;
  margin: 0 0 1rem;
}

.wl-main h2 {
  font-family: var(--wl-serif);
  font-weight: 400;
  font-size: 22px;
  margin: 1.5rem 0 0.5rem;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid var(--wl-border-subtle);
}
.wl-main h3 {
  font-family: var(--wl-serif);
  font-weight: 700;
  font-size: 16px;
  margin: 1.25rem 0 0.4rem;
}
.wl-main p { margin: 0 0 0.8rem; }
.wl-main ul, .wl-main ol { padding-left: 1.5rem; }
.wl-main li { margin: 0.2rem 0; }

.wl-main blockquote {
  margin: 0.8rem 1.2rem;
  padding: 0.4rem 0.9rem;
  border-left: 3px solid var(--wl-border-subtle);
  color: var(--wl-text);
  font-size: 13.5px;
  background: var(--wl-bg-soft);
}
.wl-main blockquote cite {
  display: block;
  font-style: normal;
  font-size: 12px;
  color: var(--wl-text-muted);
  margin-top: 0.4rem;
}

.wl-ref {
  vertical-align: super;
  font-size: 0.78em;
  margin: 0 1px;
}
.wl-references { font-size: 12.5px; }
.wl-references ol { padding-left: 1.5rem; }
.wl-references li { margin: 0.35rem 0; }

/* ---------- Infobox ---------- */

.wl-infobox {
  float: right;
  clear: right;
  width: 300px;
  margin: 0 0 1rem 1.2rem;
  border: 1px solid var(--wl-border);
  background: var(--wl-bg-soft);
  font-size: 12.5px;
  line-height: 1.4;
}
.wl-infobox-title {
  background: var(--wl-bg-alt);
  padding: 8px 10px;
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  border-bottom: 1px solid var(--wl-border-subtle);
}
.wl-infobox-subtitle {
  background: var(--wl-bg-alt);
  padding: 4px 10px;
  font-style: italic;
  text-align: center;
  font-size: 12px;
  color: var(--wl-text-muted);
  border-bottom: 1px solid var(--wl-border-subtle);
}
.wl-infobox table {
  width: 100%;
  border-collapse: collapse;
}
.wl-infobox th, .wl-infobox td {
  padding: 5px 8px;
  border-top: 1px solid var(--wl-border-subtle);
  vertical-align: top;
  text-align: left;
}
.wl-infobox th {
  background: transparent;
  width: 38%;
  font-weight: 700;
  color: var(--wl-text);
}
.wl-infobox-section {
  background: var(--wl-bg-alt);
  text-align: center;
  font-weight: 700;
  padding: 5px 8px;
  border-top: 1px solid var(--wl-border-subtle);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.wl-pill {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
  vertical-align: middle;
}
.wl-pill-verified {
  background: var(--wl-verified-bg);
  color: var(--wl-verified-fg);
  border: 1px solid var(--wl-verified-border);
}
.wl-pill-review {
  background: var(--wl-review-bg);
  color: var(--wl-review-fg);
  border: 1px solid var(--wl-review-border);
}
.wl-pill-placeholder {
  background: var(--wl-placeholder-bg);
  color: var(--wl-placeholder-fg);
  border: 1px solid var(--wl-placeholder-border);
}

.wl-sha {
  font-family: var(--wl-mono);
  font-size: 11.5px;
  word-break: break-all;
}

/* ---------- Download CTA ---------- */

.wl-download {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin: 0 0 1rem;
  padding: 10px 14px;
  background: var(--wl-bg-soft);
  border: 1px solid var(--wl-border-subtle);
  border-left: 4px solid var(--wl-link);
  font-size: 13px;
}
.wl-download-link {
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}
.wl-download-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  color: var(--wl-text-muted);
  font-size: 12.5px;
}
.wl-download-stat {
  white-space: nowrap;
}

/* ---------- TOC ---------- */

.wl-toc {
  display: inline-block;
  margin: 0.8rem 0 1.2rem;
  padding: 8px 16px 10px;
  background: var(--wl-bg-soft);
  border: 1px solid var(--wl-border-subtle);
  font-size: 13px;
  min-width: 240px;
}
.wl-toc-title {
  font-weight: 700;
  text-align: center;
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--wl-text);
}
.wl-toc ol { padding-left: 1.5rem; margin: 0; }
.wl-toc li { margin: 1px 0; }

/* ---------- Main page sections ---------- */

.wl-mainpage-banner {
  border: 1px solid var(--wl-border-subtle);
  background: var(--wl-bg-soft);
  padding: 0.8rem 1rem;
  margin-bottom: 1rem;
  border-radius: 2px;
  font-size: 14.5px;
}
.wl-mainpage-banner h2 {
  font-family: var(--wl-serif);
  font-weight: 400;
  font-size: 22px;
  border: none;
  margin: 0 0 0.25rem;
  padding: 0;
}
.wl-mainpage-banner em { color: var(--wl-text-muted); }

.wl-mainpage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.wl-card {
  border: 1px solid var(--wl-border-subtle);
  border-radius: 2px;
  overflow: hidden;
  background: var(--wl-bg);
}
.wl-card-head {
  background: var(--wl-bg-alt);
  border-bottom: 1px solid var(--wl-border-subtle);
  padding: 5px 12px;
  font-weight: 700;
  font-size: 13px;
}
.wl-card-body {
  padding: 10px 14px;
  font-size: 13.5px;
}
.wl-card-body p { margin: 0 0 0.6rem; }
.wl-card-body p:last-child { margin-bottom: 0; }
.wl-card-body ul { padding-left: 1.3rem; margin: 0; }

.wl-categories {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 0.5rem;
}
.wl-category-tile {
  border: 1px solid var(--wl-border-subtle);
  padding: 8px 10px;
  font-size: 12.5px;
  background: var(--wl-bg);
}
.wl-category-tile a { font-weight: 600; }
.wl-category-tile .count {
  display: block;
  color: var(--wl-text-muted);
  font-size: 11.5px;
  margin-top: 2px;
}
.wl-category-tile.empty {
  background: var(--wl-bg-soft);
  color: var(--wl-text-muted);
}

/* ---------- Lead + breadcrumb ---------- */

.wl-lead { font-size: 14.5px; }
.wl-breadcrumb {
  font-size: 12.5px;
  color: var(--wl-text-muted);
  margin: 0.2rem 0 0.8rem;
}
.wl-section-title {
  font-family: var(--wl-serif);
  font-weight: 400;
  font-size: 20px;
  margin: 1.5rem 0 0.4rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--wl-border-subtle);
}

/* ---------- Card meta + main page meta ---------- */

.wl-card-meta {
  font-size: 12px;
  color: var(--wl-text-muted);
  margin-top: 0.4rem;
}
.wl-card-meta a { color: var(--wl-link); }

/* ---------- Category page ---------- */

.wl-category-blurb {
  color: var(--wl-text-muted);
  margin: 0 0 0.6rem;
  font-size: 14px;
}
.wl-category-count { margin: 0 0 1rem; }
.wl-article-list {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.wl-article-list th, .wl-article-list td {
  text-align: left;
  padding: 6px 10px;
  border-bottom: 1px solid var(--wl-rule);
  vertical-align: top;
}
.wl-article-list thead th {
  background: var(--wl-bg-soft);
  font-weight: 700;
  border-bottom: 1px solid var(--wl-border-subtle);
}
.wl-article-list .wl-col-meta { color: var(--wl-text-muted); white-space: nowrap; }
.wl-article-list .wl-col-status { white-space: nowrap; }
.wl-empty-category {
  padding: 1.2rem;
  background: var(--wl-bg-soft);
  border: 1px solid var(--wl-border-subtle);
  border-radius: 2px;
  margin: 1rem 0;
}
.wl-category-wantlist { margin-top: 2rem; }
.wl-category-wantlist h2 {
  font-family: var(--wl-serif);
  font-weight: 400;
  font-size: 18px;
  border-bottom: 1px solid var(--wl-border-subtle);
}

/* ---------- History page ---------- */

.wl-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 1rem 0 1.5rem;
}
.wl-history-table th, .wl-history-table td {
  text-align: left;
  padding: 6px 10px;
  border-bottom: 1px solid var(--wl-rule);
  vertical-align: top;
}
.wl-history-table thead th {
  background: var(--wl-bg-soft);
  font-weight: 700;
  border-bottom: 1px solid var(--wl-border-subtle);
}
.wl-history-entry {
  border-left: 3px solid var(--wl-border-subtle);
  padding: 0.4rem 0.9rem;
  margin: 0.6rem 0;
  background: var(--wl-bg-soft);
}
.wl-history-entry h3 {
  margin: 0 0 0.3rem;
  font-size: 14px;
  font-family: var(--wl-sans);
  font-weight: 700;
}
.wl-history-entry dl { margin: 0; }
.wl-history-entry dt {
  font-weight: 700;
  font-size: 12px;
  color: var(--wl-text-muted);
  margin-top: 0.3rem;
}
.wl-history-entry dd {
  margin: 0 0 0.2rem;
  font-size: 13px;
}
.wl-note {
  font-size: 12px;
  color: var(--wl-text-muted);
  margin-top: 1.5rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--wl-rule);
}

/* ---------- What links here ---------- */

.wl-links-group { margin: 1rem 0; }
.wl-links-group h2 {
  font-family: var(--wl-serif);
  font-size: 18px;
  font-weight: 400;
  margin: 1rem 0 0.4rem;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid var(--wl-border-subtle);
}
.wl-link-meta {
  color: var(--wl-text-muted);
  font-size: 12.5px;
}

/* ---------- Cite page ---------- */

.wl-cite-primary {
  padding: 0.6rem 0.9rem;
  background: var(--wl-bg-soft);
  border-left: 3px solid var(--wl-link);
  margin: 0.8rem 0 1.2rem;
}
.wl-cite-block {
  margin: 1rem 0;
  border: 1px solid var(--wl-border-subtle);
  border-radius: 2px;
  background: var(--wl-bg);
}
.wl-cite-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: var(--wl-bg-soft);
  border-bottom: 1px solid var(--wl-border-subtle);
}
.wl-cite-block-head h2 {
  margin: 0;
  font-family: var(--wl-serif);
  font-weight: 400;
  font-size: 16px;
  border: none;
  padding: 0;
}
.wl-cite-block blockquote,
.wl-cite-block pre {
  margin: 0;
  padding: 10px 14px;
  background: transparent;
  border: none;
  font-size: 13px;
  white-space: pre-wrap;
  word-break: break-word;
}
.wl-cite-block pre { font-family: var(--wl-mono); font-size: 12px; }
.wl-cite-copy {
  font: inherit;
  font-size: 12px;
  padding: 3px 10px;
  border: 1px solid var(--wl-border);
  background: var(--wl-bg);
  color: var(--wl-text);
  border-radius: 2px;
  cursor: pointer;
}
.wl-cite-copy:hover {
  background: var(--wl-bg-alt);
}
.wl-cite-copy.is-copied {
  background: var(--wl-verified-bg);
  color: var(--wl-verified-fg);
  border-color: var(--wl-verified-border);
}
.wl-cite-notes h2 {
  margin-top: 1.5rem;
}

/* ---------- Action chips (recent changes + wantlist) ---------- */

.wl-chip {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
  text-transform: lowercase;
  vertical-align: middle;
  margin-right: 0.4rem;
  background: var(--wl-bg-soft);
  border: 1px solid var(--wl-border-subtle);
  color: var(--wl-text-muted);
}
.wl-chip-verified, .wl-chip-resolved {
  background: var(--wl-verified-bg);
  color: var(--wl-verified-fg);
  border-color: var(--wl-verified-border);
}
.wl-chip-wanted,
.wl-chip-demoted,
.wl-chip-deleted {
  background: var(--wl-warn-bg, #fdecec);
  color: var(--wl-warn-fg, #b73a3a);
  border-color: var(--wl-warn-border, #f0c4c4);
}
.wl-chip-retrieved, .wl-chip-replaced, .wl-chip-renamed {
  background: var(--wl-review-bg);
  color: var(--wl-review-fg);
  border-color: var(--wl-review-border);
}

@media (prefers-color-scheme: dark) {
  /* Dark-mode variants for the warning/wanted/demoted chips. The light-mode
     pinks are unreadable on a dark canvas; provide CSS-var overrides that
     the .wl-chip-* classes pick up automatically. */
  :root {
    --wl-warn-bg: #3b1d18;
    --wl-warn-fg: #f6c9c3;
    --wl-warn-border: #6b2a23;
  }
}

/* ---------- Recent changes ---------- */

.wl-rc-day { margin: 1rem 0; }
.wl-rc-day h2 {
  font-family: var(--wl-serif);
  font-size: 18px;
  font-weight: 400;
  margin: 1rem 0 0.4rem;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid var(--wl-border-subtle);
}
.wl-rc-list { list-style: none; padding: 0; margin: 0; }
.wl-rc-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--wl-rule);
  font-size: 13.5px;
}
.wl-rc-by, .wl-rc-slug-bare, .wl-rc-slug-meta {
  font-size: 12px;
  color: var(--wl-text-muted);
}
.wl-rc-slug-bare { font-family: var(--wl-mono); }
.wl-rc-notes {
  margin: 0.2rem 0 0;
  font-size: 12.5px;
  color: var(--wl-text-muted);
}

/* ---------- Wantlist ---------- */

.wl-wantlist-summary {
  margin: 0 0 1.2rem;
}
.wl-wantlist-phase { margin: 1rem 0; }
.wl-wantlist-phase h2 {
  font-family: var(--wl-serif);
  font-size: 20px;
  font-weight: 400;
}
.wl-wantlist-cat { margin: 0.8rem 0; }
.wl-wantlist-cat h3 {
  font-family: var(--wl-sans);
  font-size: 14px;
  font-weight: 700;
  color: var(--wl-text);
  margin: 0.6rem 0 0.3rem;
}
.wl-want-list { list-style: none; padding: 0; margin: 0; }
.wl-want-row {
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--wl-rule);
  font-size: 13.5px;
}
.wl-want-resolved { color: var(--wl-text-muted); }
.wl-want-title { font-weight: 600; }
.wl-want-desc { color: var(--wl-text-muted); }
.wl-want-acquired summary {
  cursor: pointer;
  font-size: 12.5px;
  color: var(--wl-text-muted);
  padding: 0.3rem 0;
}

/* ---------- Categories / status / featured indexes ---------- */

.wl-cat-overview { margin: 1rem 0; padding-bottom: 0.6rem; border-bottom: 1px solid var(--wl-rule); }
.wl-cat-overview h2 {
  font-family: var(--wl-serif);
  font-size: 18px;
  font-weight: 400;
  margin: 0 0 0.2rem;
  padding: 0;
  border: none;
}
.wl-cat-count { font-size: 12px; color: var(--wl-text-muted); }
.wl-cat-overview.empty { color: var(--wl-text-muted); }
.wl-cat-overview.empty h2 { color: var(--wl-text-muted); }

.wl-status-section { margin: 1.2rem 0; }
.wl-status-section h2 {
  font-family: var(--wl-serif);
  font-size: 20px;
  font-weight: 400;
}
.wl-status-count { font-size: 12px; color: var(--wl-text-muted); font-weight: 400; }

/* ---------- Contents (alphabetical) ---------- */

.wl-jump {
  margin: 0.8rem 0 1.2rem;
  padding: 0.5rem 0.8rem;
  background: var(--wl-bg-soft);
  border: 1px solid var(--wl-border-subtle);
  font-size: 13px;
  text-align: center;
}
.wl-jump a { margin: 0 0.2rem; }
.wl-contents-letter { margin: 1.2rem 0; }
.wl-contents-letter h2 {
  font-family: var(--wl-serif);
  font-size: 22px;
  font-weight: 400;
  border-bottom: 1px solid var(--wl-border-subtle);
  padding-bottom: 0.2rem;
}
.wl-contents-letter ul { list-style: none; padding: 0; }
.wl-contents-letter li {
  padding: 4px 0;
  border-bottom: 1px solid var(--wl-rule);
  font-size: 13.5px;
}
.wl-contents-meta { color: var(--wl-text-muted); font-size: 12.5px; }

/* ---------- Timeline ---------- */

.wl-timeline-jump {
  margin: 0.8rem 0 1.5rem;
  padding: 0.5rem 0.8rem;
  background: var(--wl-bg-soft);
  border: 1px solid var(--wl-border-subtle);
  font-size: 13px;
}
.wl-timeline-decade { margin: 1.5rem 0; }
.wl-timeline-decade h2 {
  font-family: var(--wl-serif);
  font-size: 22px;
  font-weight: 400;
  border-bottom: 1px solid var(--wl-border-subtle);
  padding-bottom: 0.2rem;
}
.wl-timeline-blurb {
  color: var(--wl-text-muted);
  font-style: italic;
  margin: 0 0 0.6rem;
}
.wl-timeline-list { list-style: none; padding: 0; }
.wl-timeline-list li {
  display: grid;
  grid-template-columns: 8rem 1fr auto auto;
  gap: 0.6rem;
  padding: 4px 0;
  border-bottom: 1px solid var(--wl-rule);
  font-size: 13.5px;
  align-items: baseline;
}
.wl-timeline-date {
  color: var(--wl-text-muted);
  font-size: 12.5px;
  white-space: nowrap;
}
.wl-timeline-meta {
  color: var(--wl-text-muted);
  font-size: 12px;
  white-space: nowrap;
}

/* ---------- Search ---------- */

.wl-search-form {
  display: flex;
  gap: 0.4rem;
  margin: 0.8rem 0;
}
.wl-search-form input[type=search] {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid var(--wl-border);
  font: inherit;
  background: var(--wl-bg);
  color: var(--wl-text);
  border-radius: 2px;
}
.wl-search-form button {
  font: inherit;
  padding: 6px 14px;
  border: 1px solid var(--wl-border);
  background: var(--wl-bg-soft);
  cursor: pointer;
  border-radius: 2px;
  color: var(--wl-text);
}
.wl-search-results { list-style: none; padding: 0; }
.wl-search-results li {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--wl-rule);
}
.wl-search-results h3 {
  font-family: var(--wl-serif);
  font-size: 16px;
  font-weight: 400;
  margin: 0;
}
.wl-search-meta {
  font-size: 12px;
  color: var(--wl-text-muted);
  margin: 0.2rem 0;
}
.wl-search-status {
  font-size: 12px;
  color: var(--wl-text-muted);
  font-style: italic;
  margin: 0.2rem 0 0.6rem;
  min-height: 1em;
}
.wl-search-hit-tag {
  display: inline-block;
  font-family: var(--wl-sans);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--wl-text-muted);
  border: 1px solid var(--wl-rule);
  border-radius: 3px;
  padding: 1px 6px;
  margin-left: 0.4rem;
  vertical-align: middle;
}
.wl-search-results mark {
  background: #fff3a8;
  color: inherit;
  padding: 0 1px;
}

/* Pagefind's excerpts wrap matches in <mark>, same treatment. */
.wl-search-results .pagefind-highlight {
  background: #fff3a8;
  color: inherit;
  padding: 0 1px;
}

/* ---------- Search filter sidebar (Phase 3 — Pagefind facets) ---------- */

.wl-search-grid {
  display: grid;
  grid-template-columns: 14rem 1fr;
  gap: 1.4rem;
  margin-top: 0.5rem;
}
.wl-search-filters-wrap {
  font-size: 13px;
}
.wl-search-filters-heading {
  font-family: var(--wl-serif);
  font-size: 1.05em;
  font-weight: 600;
  margin: 0 0 0.4rem;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid var(--wl-rule);
}
.wl-facet {
  border: none;
  padding: 0;
  margin: 0 0 0.9rem;
}
.wl-facet legend {
  font-weight: 600;
  font-size: 0.95em;
  color: var(--wl-text-muted, #54595d);
  padding: 0;
  margin-bottom: 0.25rem;
}
.wl-facet ul {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 14rem;
  overflow-y: auto;
}
.wl-facet li {
  padding: 0.1rem 0;
  line-height: 1.35;
}
.wl-facet label {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  cursor: pointer;
}
.wl-facet input[type=checkbox] {
  flex-shrink: 0;
}
.wl-facet-count {
  margin-left: auto;
  font-size: 0.85em;
  color: var(--wl-text-muted, #54595d);
  font-variant-numeric: tabular-nums;
}
.wl-search-more {
  font-style: italic;
  color: var(--wl-text-muted, #54595d);
  border-bottom: none !important;
  padding-top: 0.6rem !important;
}
@media (max-width: 860px) {
  .wl-search-grid {
    grid-template-columns: 1fr;
  }
  .wl-search-filters-wrap {
    order: 2;
  }
  .wl-facet ul {
    max-height: none;
  }
}

/* ---------- Citation export (Phase 3 — multi-doc bundle builder) ---------- */

.wl-citations-export {
  display: grid;
  grid-template-columns: 22rem 1fr;
  gap: 1.4rem;
  margin-top: 0.8rem;
}
.wl-citations-picker input[type=search] {
  width: 100%;
  padding: 5px 8px;
  font: inherit;
  border: 1px solid var(--wl-border);
  background: var(--wl-bg);
  color: var(--wl-text);
  border-radius: 2px;
  margin: 0.2rem 0 0.5rem;
}
.wl-citations-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 32rem;
  overflow-y: auto;
  border: 1px solid var(--wl-rule);
  border-radius: 2px;
}
.wl-citations-list li {
  padding: 0.25rem 0.5rem;
  font-size: 13px;
  border-bottom: 1px solid var(--wl-rule);
}
.wl-citations-list li:last-child { border-bottom: none; }
.wl-citations-list label {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  cursor: pointer;
}
.wl-citations-format {
  border: none;
  padding: 0;
  margin: 0 0 0.6rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 13px;
}
.wl-citations-format label {
  display: inline-flex;
  gap: 0.35rem;
  cursor: pointer;
}
.wl-citations-actions {
  display: flex;
  gap: 0.5rem;
  margin: 0.4rem 0;
}
.wl-citations-actions a[role=button],
.wl-citations-actions button {
  font: inherit;
  font-size: 13px;
  padding: 4px 10px;
  border: 1px solid var(--wl-border);
  background: var(--wl-bg-soft);
  color: var(--wl-text);
  cursor: pointer;
  text-decoration: none;
  border-radius: 2px;
}
.wl-citations-actions a[aria-disabled="true"],
.wl-citations-actions button[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}
#wl-citations-output {
  width: 100%;
  font-family: var(--wl-mono);
  font-size: 12.5px;
  padding: 0.6rem;
  border: 1px solid var(--wl-border);
  background: var(--wl-bg-soft, #f8f9fa);
  color: var(--wl-text);
  border-radius: 2px;
  resize: vertical;
}
@media (max-width: 860px) {
  .wl-citations-export {
    grid-template-columns: 1fr;
  }
  .wl-citations-list {
    max-height: 20rem;
  }
}

/* ---------- Compare page (Phase 3 — side-by-side structured-field diff) ---------- */

.wl-compare-page {
  display: grid;
  grid-template-columns: 20rem 1fr;
  gap: 1.4rem;
  margin-top: 0.8rem;
}
.wl-compare-picker input[type=search] {
  width: 100%;
  padding: 5px 8px;
  font: inherit;
  border: 1px solid var(--wl-border);
  background: var(--wl-bg);
  color: var(--wl-text);
  border-radius: 2px;
  margin: 0.2rem 0 0.5rem;
}
.wl-compare-output-wrap {
  min-width: 0;        /* allow the table to scroll horizontally if needed */
  overflow-x: auto;
}
.wl-compare-grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 0.5rem;
}
.wl-compare-grid th,
.wl-compare-grid td {
  border-bottom: 1px solid var(--wl-rule);
  padding: 0.5rem 0.7rem;
  vertical-align: top;
  text-align: left;
}
.wl-compare-grid thead th {
  background: var(--wl-bg-soft, #f8f9fa);
  font-weight: 600;
  border-bottom: 2px solid var(--wl-rule);
}
.wl-compare-grid thead a {
  color: var(--wl-link);
  text-decoration: none;
}
.wl-compare-grid thead a:hover { text-decoration: underline; }
.wl-compare-grid tbody th[scope="row"] {
  font-weight: 600;
  font-size: 0.92em;
  color: var(--wl-text-muted, #54595d);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--wl-bg-soft, #f8f9fa);
  white-space: nowrap;
}
.wl-compare-grid .wl-compare-rowhead { width: 7rem; }
.wl-compare-grid .wl-compare-kp {
  list-style: disc;
  padding-left: 1.1em;
  margin: 0;
}
.wl-compare-grid .wl-compare-kp li {
  margin-bottom: 0.25rem;
  line-height: 1.4;
}
.wl-compare-grid code.wl-sha-full {
  font-size: 0.78em;
  word-break: break-all;
}
.wl-compare-grid .wl-party-role {
  font-size: 0.78em;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--wl-text-muted, #54595d);
}
/* Metadata grid lives inside <details> so it doesn't dominate the page
   when the user mostly wants the text columns. */
.wl-compare-metadata-details {
  margin: 0.8rem 0 1rem;
}
.wl-compare-metadata-details > summary {
  cursor: pointer;
  font-family: var(--wl-serif);
  font-weight: 600;
  font-size: 1.05em;
  padding: 0.25rem 0;
  color: var(--wl-text);
}

/* Full-text columns: lay out as a flex/grid row that scales to the
   number of selected docs, with each column independently scrollable. */
.wl-compare-text-controls {
  margin: 0.4rem 0 0.5rem;
}
.wl-compare-text-controls input[type=search] {
  width: 100%;
  padding: 5px 10px;
  font: inherit;
  border: 1px solid var(--wl-border);
  background: var(--wl-bg);
  color: var(--wl-text);
  border-radius: 2px;
}
.wl-compare-text-columns {
  display: grid;
  grid-template-columns: repeat(var(--compare-text-cols, 1), minmax(0, 1fr));
  gap: 0.8rem;
  margin: 0.4rem 0;
  min-height: 0;
}
.wl-compare-text-col {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--wl-rule);
  border-radius: 2px;
  background: var(--wl-bg);
  min-width: 0;
}
.wl-compare-text-head {
  padding: 0.4rem 0.7rem;
  font-size: 13px;
  background: var(--wl-bg-soft, #f8f9fa);
  border-bottom: 1px solid var(--wl-rule);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem;
}
.wl-compare-text-head a {
  color: var(--wl-link);
  text-decoration: none;
}
.wl-compare-text-head a:hover { text-decoration: underline; }
.wl-compare-text-count {
  margin-left: auto;
  font-size: 0.85em;
  color: var(--wl-text-muted, #54595d);
  font-variant-numeric: tabular-nums;
}
.wl-compare-text-scroll {
  height: 70vh;
  overflow: auto;
  padding: 0.6rem 0.9rem;
}
.wl-compare-text {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--wl-mono);
  font-size: 12px;
  line-height: 1.55;
  margin: 0;
  color: var(--wl-text);
}
.wl-compare-text mark {
  background: #fff3a8;
  color: inherit;
  padding: 0 1px;
}
@media (max-width: 860px) {
  .wl-compare-page {
    grid-template-columns: 1fr;
  }
  .wl-compare-text-columns {
    grid-template-columns: 1fr;
  }
  .wl-compare-text-scroll {
    height: 40vh;
  }
}

/* ---------- Help namespace ---------- */

.wl-help-body { font-size: 14px; }
.wl-help-body h1 { display: none; } /* H1 from md body suppressed; layout already has firstHeading */
.wl-help-body h2 {
  font-family: var(--wl-serif);
  font-size: 20px;
  font-weight: 400;
  margin: 1.2rem 0 0.4rem;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid var(--wl-border-subtle);
}
.wl-help-body h3 {
  font-family: var(--wl-serif);
  font-size: 16px;
  font-weight: 700;
}
.wl-help-body table {
  border-collapse: collapse;
  font-size: 13px;
}
.wl-help-body th, .wl-help-body td {
  border: 1px solid var(--wl-border-subtle);
  padding: 4px 8px;
  text-align: left;
}
.wl-help-body code {
  font-family: var(--wl-mono);
  font-size: 12.5px;
  background: var(--wl-bg-soft);
  padding: 1px 4px;
  border-radius: 2px;
}
.wl-help-body pre {
  background: var(--wl-bg-soft);
  padding: 10px 14px;
  border: 1px solid var(--wl-border-subtle);
  border-radius: 2px;
  overflow-x: auto;
  font-size: 12.5px;
}
.wl-help-index { list-style: none; padding: 0; }
.wl-help-index li { padding: 0.4rem 0; border-bottom: 1px solid var(--wl-rule); }
.wl-help-related {
  margin-top: 1.5rem;
  padding: 0.8rem 1rem;
  background: var(--wl-bg-soft);
  border: 1px solid var(--wl-border-subtle);
}
.wl-help-related h2 { font-size: 14px; margin: 0 0 0.3rem; border: none; padding: 0; }

/* ---------- Relations + infobox extras ---------- */

.wl-rel-kind {
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--wl-text-muted);
}
.wl-relations dt {
  font-weight: 700;
  margin-top: 0.4rem;
}
.wl-relations dd {
  margin: 0 0 0.3rem 1rem;
}

/* ---------- Footer ---------- */

.wl-footer {
  max-width: 1280px;
  margin: 2rem auto 1rem;
  padding: 1rem;
  border-top: 1px solid var(--wl-border-subtle);
  font-size: 12px;
  color: var(--wl-text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
}
.wl-footer a { color: var(--wl-link); }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .wl-page {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }
  .wl-sidebar {
    border-top: 1px solid var(--wl-border-subtle);
    padding-top: 0.5rem;
    order: 2;
  }
  .wl-infobox {
    float: none;
    width: auto;
    margin: 0.5rem 0 1rem;
  }
  .wl-mainpage-grid { grid-template-columns: 1fr; }
  .wl-categories { grid-template-columns: repeat(2, 1fr); }
  .wl-topbar { flex-wrap: wrap; }
  .wl-search { order: 3; flex-basis: 100%; max-width: none; }
}

/* ---------- Status banner (placeholder / needs_review) ---------- */
/* Added Pass C 2026-05-19 — the project's most important epistemic UI
   element. Verified docs render no banner; non-verified docs render a
   visible warning above the infobox per CLAUDE.md §1.8. */

.wl-status-banner {
  display: block;
  padding: 0.75rem 1rem;
  margin: 0.5rem 0 1rem;
  border-left: 4px solid;
  border-radius: 2px;
  font-size: 0.95em;
  line-height: 1.5;
  background: #fff8e1;
  border-color: #f5a623;
  color: #5d3a00;
}

.wl-status-banner--placeholder {
  background: #fde8e8;
  border-color: #c0392b;
  color: #5b1a14;
}

/* Discrepancy banner — the article has one or more notes in
   research-logs/discrepancies/. Distinct from needs_review/placeholder:
   this isn't "the doc isn't ready yet" but "the archive has flagged a
   real source-vs-record disagreement worth knowing about." Neutral
   blue-grey rather than warning yellow. */
.wl-status-banner--discrepancy {
  background: #eef2f7;
  border-color: #4a6fa5;
  color: #1f2d44;
}
.wl-status-banner--discrepancy ul {
  margin: 0.4em 0 0 1.25em;
  padding: 0;
}
.wl-status-banner--discrepancy li {
  margin: 0.2em 0;
}

.wl-status-banner strong {
  font-weight: 700;
  margin-right: 0.25em;
}

.wl-status-banner a {
  color: inherit;
  text-decoration: underline;
}

@media (prefers-color-scheme: dark) {
  .wl-status-banner {
    background: #3a2e10;
    border-color: #d4a017;
    color: #f3e8b0;
  }
  .wl-status-banner--placeholder {
    background: #3b1d18;
    border-color: #e0635a;
    color: #f6c9c3;
  }
  .wl-status-banner--discrepancy {
    background: #1c2638;
    border-color: #7b9ad3;
    color: #d8e2f0;
  }
}

/* ---------- Discrepancy log pages ---------- */

.wl-discrepancy-meta {
  margin: 1rem 0 1.5rem;
  padding: 0.5rem 0.85rem;
  background: var(--wl-infobox-bg, #f8f9fa);
  border-left: 3px solid var(--wl-border, #c8ccd1);
}
.wl-discrepancy-affected {
  margin: 0;
  padding-left: 1.2em;
}
.wl-discrepancy-affected li {
  margin: 0.2em 0;
}
.wl-discrepancy-affected code.wl-meta-faint {
  font-size: 0.85em;
}
.wl-discrepancy-body {
  /* Inherit prose styling; no special rules needed. */
}

/* ---------- Unknown sentinel (METADATA_SCHEMA §4 distinction) ---------- */
/* A field whose value is the literal string "unknown" renders with an
   italic indicator, distinct from an empty field (which renders nothing). */

.wl-unknown {
  font-style: italic;
  color: var(--wl-text-muted, #54595d);
}

/* ---------- Party / additional-file / processing-note micro-styles ---------- */

.wl-party {
  margin: 0.1em 0;
}
.wl-party-role {
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--wl-text-muted, #54595d);
  margin-right: 0.35em;
}
.wl-party-aff {
  font-size: 0.85em;
  color: var(--wl-text-muted, #54595d);
}

.wl-additional {
  font-size: 0.9em;
  margin: 0.15em 0;
}
.wl-additional code {
  font-size: 0.92em;
}
.wl-additional-desc {
  color: var(--wl-text-muted, #54595d);
}

.wl-prev-hashes code {
  font-size: 0.85em;
  word-break: break-all;
}
.wl-prev-hash-date {
  font-size: 0.85em;
  color: var(--wl-text-muted, #54595d);
  margin-left: 0.35em;
}

/* ---------- Evidence-trail panel (article body, near references) ---------- */
/* Consolidates SHA + confirmation sources + Wayback snapshot + latest status
   transition into one panel. The point is to make STANDARDS §1.3/§1.4 the
   reader follows visually obvious — same data was previously scattered. */

.wl-evidence-trail {
  margin-top: 1.5em;
  padding: 1em 1.1em;
  background: var(--wl-infobox-bg, #f8f9fa);
  border-left: 3px solid var(--wl-verified-bg, #e7f5ef);
  border-radius: 2px;
}
.wl-evidence-trail h2,
.wl-evidence-trail h3 {
  font-family: var(--wl-serif);
  margin-top: 0.9em;
}
.wl-evidence-trail h2 { margin-top: 0; }
.wl-evidence-trail h3 {
  font-size: 1.05em;
  border-bottom: 1px solid var(--wl-border, #c8ccd1);
  padding-bottom: 0.15em;
}
.wl-evidence-grid {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.4em 1em;
  margin: 0.5em 0;
}
.wl-evidence-grid dt {
  font-weight: 600;
  color: var(--wl-text-muted, #54595d);
  white-space: nowrap;
}
.wl-evidence-grid dd {
  margin: 0;
  min-width: 0;
}
.wl-evidence-grid code {
  word-break: break-all;
  font-size: 0.92em;
}
.wl-sha-full {
  font-family: var(--wl-mono);
  font-size: 0.88em;
  word-break: break-all;
  user-select: all;
}
.wl-evidence-sources {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5em 0 0.75em;
  font-size: 0.94em;
}
.wl-evidence-sources th,
.wl-evidence-sources td {
  border-bottom: 1px solid var(--wl-border, #eaecf0);
  padding: 0.45em 0.6em;
  text-align: left;
  vertical-align: top;
}
.wl-evidence-sources thead th {
  font-weight: 600;
  color: var(--wl-text-muted, #54595d);
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: transparent;
}
.wl-evidence-sources td.wl-col-meta {
  white-space: nowrap;
  color: var(--wl-text-muted, #54595d);
}
.wl-evidence-sources a.external,
.wl-evidence-trail a.external {
  /* break-anywhere is less aggressive than break-all: the browser only
     splits a word when there is no other way to fit the line. Long URLs
     still wrap, but they don't decompose into one-char-per-line columns
     when the cell is very narrow. */
  overflow-wrap: anywhere;
  word-break: normal;
}
.wl-meta-faint {
  color: var(--wl-text-muted, #54595d);
  font-style: italic;
}

/* ---------- Build status page (skipped + warnings surfacing) ---------- */

.wl-build-status table {
  width: 100%;
  margin: 1rem 0;
  border-collapse: collapse;
}
.wl-build-status th,
.wl-build-status td {
  text-align: left;
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid var(--wl-border, #ddd);
  vertical-align: top;
  font-size: 0.92em;
}
.wl-build-status th {
  background: var(--wl-bg-subtle, #f4f4f4);
  font-weight: 600;
}
.wl-build-status code {
  font-size: 0.88em;
  word-break: break-all;
}

/* ---------- Print ---------- */

@media print {
  .wl-topbar,
  .wl-tabs,
  .wl-sidebar,
  .wl-footer,
  .wl-skip,
  .wl-search { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .wl-page {
    display: block;
    max-width: 100%;
    padding: 0;
    margin: 0;
  }
  .wl-firstHeading { font-size: 20pt; }
  .wl-main h2 { font-size: 14pt; page-break-after: avoid; }
  .wl-main h3 { font-size: 12pt; page-break-after: avoid; }
  .wl-infobox {
    float: none;
    width: 100%;
    margin: 0 0 1rem;
    page-break-inside: avoid;
  }
  /* Expose URLs after each link in print. */
  .wl-main a[href^="http"]::after {
    content: " <" attr(href) ">";
    font-size: 0.85em;
    color: #444;
    word-break: break-all;
  }
  .wl-references li { page-break-inside: avoid; }
}

/* ---------- PDF viewer page (Phase 4 Item 4) ----------
 * Inline pdf.js viewer embedded in an iframe. The viewer ships with
 * its own toolbar, scroll, search, and zoom — we just give it space
 * to render.
 */
.wl-view-intro {
  font-size: 12.5px;
  color: var(--wl-text-muted);
  margin: 0.4rem 0 0.8rem;
}
.wl-pdfjs {
  display: block;
  width: 100%;
  height: calc(100vh - 200px);
  min-height: 600px;
  border: 1px solid var(--wl-border-subtle);
  background: var(--wl-bg-soft);
  border-radius: 2px;
}
@media (max-width: 720px) {
  .wl-pdfjs {
    height: calc(100vh - 240px);
    min-height: 480px;
  }
}
@media print {
  /* Iframe prints poorly across browsers; skip the embed and let
   * researchers print the original PDF directly. */
  .wl-pdfjs { display: none; }
  .wl-view-intro::after {
    content: " To print, download the original PDF from the link above.";
  }
}

/* ---------- "View in source" link (Phase 4 Item 5) ----------
 * Appended to each blockquote whose excerpt was located in the
 * extracted PDF text. Sits below the cite line, smaller and quieter
 * than the cite itself — the cite is what's being cited; this is
 * just the affordance that opens the right page in the reader with
 * the passage pre-highlighted. Hidden in print where it's noise.
 */
.wl-excerpt-source {
  display: inline-block;
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--wl-link);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.wl-excerpt-source:hover {
  color: var(--wl-link-hover);
  border-bottom-color: var(--wl-link-hover);
}
.wl-excerpt-source:focus-visible {
  outline: 2px solid var(--wl-focus);
  outline-offset: 2px;
  border-radius: 2px;
}
@media print {
  .wl-excerpt-source { display: none; }
}

/* ---------- Page-reference anchors (Phase 4 Item 3) ----------
 * Discreet links injected into Key Provisions and quoted-excerpt
 * citations where a "p. N" / "pp. N–M" style page reference appears,
 * jumping to the reader at the matching #page-N anchor. The styling
 * intentionally reads like a typographic hint rather than a primary
 * link: the body text was written by curators as prose, not as link
 * bait, so blue-underline treatment would make every Key Provisions
 * line look like a sea of CTAs.
 */
a.wl-pageref,
a.wl-pageref:visited {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted var(--wl-link);
  padding-bottom: 0;
  white-space: nowrap;
}
a.wl-pageref:hover {
  color: var(--wl-link);
  border-bottom-style: solid;
  background: var(--wl-bg-soft);
}
a.wl-pageref:focus-visible {
  outline: 2px solid var(--wl-focus);
  outline-offset: 1px;
  border-radius: 2px;
}

/* ---------- Full-text reader (Phase 4 Item 2) ---------- */

.wl-fulltext-intro {
  font-size: 12.5px;
  color: var(--wl-text-muted);
  margin: 0.4rem 0 0.8rem;
}

.wl-fulltext-controls {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.6rem 1rem;
  align-items: center;
  padding: 8px 10px;
  margin: 0 0 1rem;
  background: var(--wl-bg);
  border: 1px solid var(--wl-border-subtle);
  border-radius: 2px;
  font-size: 13px;
}
.wl-fulltext-search {
  display: block;
  min-width: 0;
}
.wl-fulltext-search input[type="search"] {
  width: 100%;
  padding: 5px 8px;
  border: 1px solid var(--wl-border);
  border-radius: 2px;
  font: inherit;
  background: var(--wl-bg);
  color: var(--wl-text);
}
.wl-fulltext-search input[type="search"]:focus-visible {
  outline: 2px solid var(--wl-focus);
  outline-offset: 1px;
}
.wl-fulltext-counts {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  font-size: 12px;
}
.wl-fulltext-nav {
  background: var(--wl-bg-soft);
  border: 1px solid var(--wl-border-subtle);
  border-radius: 2px;
  padding: 3px 8px;
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
  color: var(--wl-text);
}
.wl-fulltext-nav:hover:not(:disabled) {
  background: var(--wl-bg-alt);
}
.wl-fulltext-nav:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.wl-fulltext-jump {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 12px;
  color: var(--wl-text-muted);
}
.wl-fulltext-jump input[type="number"] {
  width: 4.5rem;
  padding: 4px 6px;
  border: 1px solid var(--wl-border);
  border-radius: 2px;
  font: inherit;
  background: var(--wl-bg);
  color: var(--wl-text);
}

.wl-fulltext-pages {
  /* Reset list / paragraph spacing — every child here is a page section. */
}
.wl-fulltext-page {
  margin: 0 0 1.2rem;
  border: 1px solid var(--wl-border-subtle);
  border-radius: 2px;
  background: var(--wl-bg);
  scroll-margin-top: 60px; /* leave room for the sticky controls bar */
}
.wl-fulltext-page-head {
  font-family: var(--wl-sans);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin: 0;
  padding: 5px 12px;
  background: var(--wl-bg-soft);
  border-bottom: 1px solid var(--wl-border-subtle);
  color: var(--wl-text-muted);
}
.wl-fulltext-page-anchor {
  color: var(--wl-text-muted);
  text-decoration: none;
}
.wl-fulltext-page-anchor:hover {
  color: var(--wl-link);
  text-decoration: underline;
}
.wl-fulltext-page-body {
  margin: 0;
  padding: 12px 14px;
  font-family: var(--wl-mono);
  font-size: 12.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  color: var(--wl-text);
  background: transparent;
  border: none;
}

mark.wl-fulltext-mark {
  background: var(--wl-review-bg);
  color: var(--wl-review-fg);
  border: 1px solid var(--wl-review-border);
  padding: 0 1px;
  border-radius: 2px;
}
mark.wl-fulltext-mark--active {
  background: var(--wl-link);
  color: #fff;
  border-color: var(--wl-link);
}

/* Narrow layouts: collapse the three-column control bar to a stack and
 * drop the sticky behavior so the controls don't eat half the viewport. */
@media (max-width: 720px) {
  .wl-fulltext-controls {
    position: static;
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
}

/* Print: drop the chrome, render every page as a clean text block. */
@media print {
  .wl-fulltext-controls { display: none; }
  .wl-fulltext-page {
    border: none;
    page-break-inside: avoid;
  }
  .wl-fulltext-page-head {
    background: transparent;
    border-bottom: 1px solid #888;
    color: #444;
  }
  .wl-fulltext-page-body {
    font-size: 9.5pt;
  }
}
