/* The block content panel — bean lrmo. Tokens only, so it follows the light
   and dark palettes below rather than hardcoding either. */
.lib-page #document .seg { margin: .2rem 0 .8rem; }
.lib-page #document .seg button[aria-selected="true"] { font-weight: 600; }
.lib-page #document .docbody { padding: 0 16px 8px; }
.lib-page #document .dockw { padding: 4px 16px; }
.lib-page #document p.kw, .lib-page #document .dockw p.kw { display: inline; margin: 0; }
.lib-page #document .docsec p.kw { display: block; margin: 2px 0 6px; }
.lib-page #document p.kw .pill { margin: 0 2px 2px 0; }
.lib-page #document ul.toc, .lib-page #document ul.toc ul { list-style: none; margin: 0; padding-left: 1.1rem; }
.lib-page #document ul.toc { padding-left: 0; }
.lib-page #document ul.toc li { margin: .15rem 0; }
.lib-page #document ul.toc li.leaf { padding-left: 1rem; }
.lib-page #document ul.toc summary { cursor: pointer; }
.lib-page #document td ul { margin: .3rem 0 0; padding-left: 1.1rem; }
.lib-page #document .docsec { margin: 0 0 1rem; }
.lib-page #document .docsec h3 { margin: .2rem 0 .3rem; font-size: 1rem; }
.lib-page #document .sum { padding: .55rem .7rem; border: 1px dashed var(--line); border-radius: 6px; }
.lib-page #document .sum p { margin: .35rem 0 0; }
.lib-page #document td { white-space: normal; vertical-align: top; }
.lib-page #blocks details > summary { cursor: pointer; }
.lib-page #blocks .block-body { margin: .4rem 0 .2rem; }
.lib-page #blocks .block-body pre {
  white-space: pre-wrap; word-break: break-word; margin: 0;
  padding: .55rem .7rem; background: var(--panel); border: 1px solid var(--line);
  border-radius: 6px; font-size: 12.5px; line-height: 1.45; max-height: 22rem; overflow: auto;
}
.lib-page #blocks .block-body .note { margin: .35rem 0 0; font-size: 11.5px; color: var(--muted); }
/* EXTRACT AND AGENT SUMMARY, SIDE BY SIDE -- owner, 2026-09-24: "the extract
   of a node is shown, but no agentic summary". Beside, never instead: the
   extract is the source's words and the summary is an agent's account of
   them, so a reader must be able to hold one against the other. Two columns
   where there is room, stacked on a phone, extract first either way. */
.lib-page #blocks td { white-space: normal; vertical-align: top; }
.lib-page #blocks td.bt { min-width: 15rem; }
.lib-page #blocks .pair { display: grid; grid-template-columns: 1fr; gap: .6rem; }
@media (min-width: 760px) { .lib-page #blocks .pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.lib-page #blocks .pair > div { min-width: 0; }
.lib-page #blocks .lbl { margin: 0 0 .3rem; font-size: 11.5px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em; }
.lib-page #blocks .sum { padding: .55rem .7rem; border: 1px dashed var(--line); border-radius: 6px;
  font-size: 13px; line-height: 1.5; }
.lib-page #blocks .sum p { margin: .35rem 0 0; }
/* A WITHHELD ENTRY -- issue #1794. Said in words, styled as information
   rather than as an error: not publishing a refused work is the system
   working, and the banner is there so it is not mistaken for a gap. */
.lib-page #blocks .wh-banner { margin: 8px 16px 12px; padding: .6rem .8rem; border: 1px solid var(--info);
  background: var(--info-soft); border-radius: 8px; font-size: .86rem; line-height: 1.5; }
.lib-page #blocks .wh-banner p { margin: 0 0 .35rem; }
.lib-page #blocks .wh-banner p:last-child { margin: 0; }
.lib-page #blocks .wh-line { color: var(--muted); font-size: .8rem; }
/* THEMED, since 2026-10-07: every library page sits on the site's default
   layout, inside the theme's content column, so this sheet styles ONE
   wrapper. Every selector starts .lib-page, and there is no rule on body,
   :root or a -- a rule there would restyle the theme on every page that
   shares this file's reader. The palette is keyed on the scheme the SITE
   paints (data-fa-scheme on html, set by head_custom.html's first-paint
   block and by docs-ui.js's toggle), so it follows the reader's choice
   rather than the OS alone. Dark is the default because the site's is.
   --bg is the theme's own ground, which a sticky header must paint over. */
.lib-page {
  --bg:#27262b; --fg:#e8eaed; --muted:#a9b0b8; --line:#4a4950; --panel:#1f1e23;
  --accent:#7fc7a1; --accent-soft:#16291f; --warn:#e0b25e; --warn-soft:#2a2213;
  --info:#8db4ec; --info-soft:#1d2937; --box:#1f1e23;
}
html[data-fa-scheme="light"] .lib-page {
  --bg:#fff; --fg:#17191c; --muted:#5b6168; --line:#d9dde2; --panel:#f6f7f9;
  --accent:#276749; --accent-soft:#e6f2ec; --warn:#8a5300; --warn-soft:#fdf3e0;
  --info:#1a5fb4; --info-soft:#e7eefb; --box:#fff;
}
.lib-page, .lib-page * { box-sizing:border-box; }
/* The theme's list bullet is drawn by li::before in .main-content; the
   table of contents is a tree, not a bulleted list. */
.lib-page ul.toc li::before { content:none; }
.lib-page .lib-head { padding:16px 0; border-bottom:1px solid var(--line); }
.lib-page h1 { margin:0 0 6px; }
.lib-page .badges { display:flex; flex-wrap:wrap; gap:8px; margin:8px 0 0; }
.lib-page .badge { border:1px solid var(--line); border-radius:8px; padding:5px 10px; font-size:.82rem; background:var(--panel); }
.lib-page .badge b { font-variant-numeric:tabular-nums; }
.lib-page .badge.q b { color:var(--warn); }
/* The view panel (viewPanelHtml): the entry's primary asset, under the head. */
.lib-page .lib-view { padding:10px 0; border-bottom:1px solid var(--line); }
.lib-page .lib-view summary { cursor:pointer; font-size:1rem; }
.lib-page .lib-view .pdf-viewer { margin:.6rem 0 0 !important; }
.lib-page .lib-view img { display:block; max-width:100%; height:auto; border:1px solid var(--line); border-radius:6px; }
.lib-page .lib-view-absent p { margin:0; }
.lib-page .toolbar { padding:10px 0; display:flex; flex-wrap:wrap; gap:8px; align-items:center; border-bottom:1px solid var(--line); }
.lib-page input, .lib-page select, .lib-page button { font:inherit; color:var(--fg); background:var(--box);
  border:1px solid var(--line); border-radius:6px; padding:6px 9px; }
.lib-page input { flex:1 1 200px; min-width:0; }
.lib-page .seg { display:inline-flex; border:1px solid var(--line); border-radius:6px; overflow:hidden; }
.lib-page .seg button { border:0; border-radius:0; background:transparent; cursor:pointer; padding:6px 12px; }
.lib-page .seg button[aria-pressed="true"] { background:var(--accent-soft); color:var(--fg); font-weight:600; }
.lib-page .lib-main { padding:0 0 40px; }
.lib-page table { border-collapse:collapse; width:100%; font-size:.86rem; }
/* min-width, border-left, background and font-size undo the theme's own
   cell rules, which are type selectors and so lose to these. */
.lib-page th, .lib-page td { text-align:left; padding:7px 10px; border:0; border-bottom:1px solid var(--line); white-space:nowrap;
  min-width:0; background:transparent; font-size:inherit; }
.lib-page th { position:sticky; top:0; background:var(--bg); color:var(--muted); font-size:.74rem;
  text-transform:uppercase; letter-spacing:.04em; }
.lib-page th button { border:0; background:transparent; padding:0; font:inherit; color:inherit;
  cursor:pointer; text-transform:inherit; letter-spacing:inherit; }
.lib-page th button:hover { color:var(--fg); text-decoration:underline; }
.lib-page th[aria-sort] button::after { content:" ▲"; }
.lib-page th[aria-sort="descending"] button::after { content:" ▼"; }
.lib-page td.num { text-align:right; font-variant-numeric:tabular-nums; }
.lib-page tbody tr:hover { background:var(--panel); }
.lib-page .slug { font-family:ui-monospace, Menlo, monospace; }
/* A row's secondary links -- source, README, a referenced entry's own -- are
   24 px targets (WCAG 2.5.8). As plain inline text they were 16 px tall and
   sat closer than 24 px to the title link beside them. */
.lib-page a.src { display:inline-block; min-width:24px; min-height:24px; line-height:24px; }
/* The row's PRIMARY links -- the title and the slug -- are 24 px targets too.
   Fixing a.src alone left the title a 16 px inline box, and wherever the
   title cell wrapped (a short title whose "source" link falls to the next
   line, which depends on the fonts the runner has) that 24 px source link
   sat 10.6 px below the title's centre: axe's target-size, serious, on
   main's CI for cat-harness/nist-sp-800-207 ("Zero Trust Architecture").
   A rule for the CLASS of link, not that entry: every listing link is a
   24 px target whatever wraps next to it. */
.lib-page a.lib-title, .lib-page a.lib-view { display:inline-block; min-height:24px; line-height:24px; }
.lib-page .pill { display:inline-block; font-size:.7rem; padding:1px 7px; border-radius:999px;
  border:1px solid var(--line); color:var(--muted); }
.lib-page .pill.ok { color:var(--accent); background:var(--accent-soft); border-color:var(--accent); }
.lib-page .pill.warn { color:var(--warn); background:var(--warn-soft); border-color:var(--warn); }
.lib-page .pill.info { color:var(--info); background:var(--info-soft); border-color:var(--info); }
.lib-page #desktop { display:grid; grid-template-columns:repeat(auto-fill, minmax(230px, 1fr));
  gap:14px; padding:16px; }
.lib-page .card { border:1px solid var(--line); border-radius:10px; background:var(--panel);
  padding:12px; display:flex; flex-direction:column; gap:6px; }
.lib-page .card h3 { margin:0; font-size:.92rem; line-height:1.3; }
.lib-page .card .slug { font-size:.74rem; color:var(--muted); }
.lib-page .card .rows { font-size:.78rem; color:var(--muted); display:grid;
  grid-template-columns:auto 1fr; gap:1px 8px; margin-top:2px; }
.lib-page .card .rows b { color:var(--fg); font-weight:600; font-variant-numeric:tabular-nums; }
.lib-page .card .tags { display:flex; flex-wrap:wrap; gap:4px; margin-top:4px; }
.lib-page .spine { height:6px; border-radius:3px; background:var(--accent); opacity:.65; }
.lib-page .empty { color:var(--muted); padding:24px 16px; }
.lib-page h2 { font-size:.95rem; margin:24px 0 4px; }
.lib-page p.note { color:var(--muted); font-size:.82rem; margin:0 0 8px; }
.lib-page .wrap { overflow:auto; }
/* THE BOOK'S AVATAR, first in its row -- bean zrvt, issue #1006. A fixed box
   so a row does not reflow when the cover arrives, and a glyph of the same
   size when there is no picture, so "no cover" never looks like a broken one. */
.lib-page .lib-ava { display:inline-flex; align-items:center; justify-content:center;
  width:34px; height:46px; margin-right:8px; vertical-align:middle; flex:0 0 auto;
  border:1px solid var(--line); background:var(--panel); overflow:hidden; }
.lib-page .lib-ava img { width:100%; height:100%; object-fit:cover; display:block; }
.lib-page .lib-ava svg { width:22px; height:22px; fill:none; stroke:var(--muted); stroke-width:1.6; }
.lib-page td.lib-first { white-space:nowrap; }
.lib-page .card .lib-ava { width:56px; height:76px; }
/* THE LISTING FITS MORE OF ITSELF, AND SAYS WHEN IT DOES NOT -- bean gnqa,
   findings 1 and 2. Measured 2026-10-02 at 1280 px: a 3636 px table in a
   1224 px box, every cell nowrap, so the title and source path alone were
   2,000 px and nine of thirteen columns sat past the right edge with
   nothing on screen saying so. The long TEXT cells now wrap inside a
   bounded width; the short numeric and pill cells keep nowrap, because a
   count broken over two lines is harder to read than one scrolled to. */
.lib-page #listing td.lib-first { white-space:normal; min-width:13rem; max-width:17rem; }
.lib-page #listing td.t-title { white-space:normal; min-width:14rem; max-width:22rem; }
.lib-page #listing td.t-title a.lib-title { display:inline-flex; align-items:center; min-height:24px; }
.lib-page #listing td.t-source { white-space:normal; min-width:9rem; max-width:14rem; }
.lib-page #listing td.t-source .slug { overflow-wrap:anywhere; }
.lib-page #listing td.t-source .pill { white-space:nowrap; }
.lib-page #queue td.slug { white-space:normal; overflow-wrap:anywhere; min-width:12rem; max-width:24rem; }
/* "Referenced by" OPENS rather than hovers -- finding 6. A title tooltip is
   unreachable by touch and by keyboard; a details element is both. */
.lib-page details.refs > summary { cursor:pointer; list-style:none; display:inline-flex; align-items:center; min-height:28px; }
.lib-page details.refs > summary::-webkit-details-marker { display:none; }
.lib-page details.refs > summary .pill::after { content:" \25B8"; }
.lib-page details.refs[open] > summary .pill::after { content:" \25BE"; }
.lib-page details.refs ul { margin:.3rem 0 0; padding-left:1rem; font-size:.72rem; color:var(--muted);
  white-space:normal; overflow-wrap:anywhere; max-width:22rem; }
/* THE EDGE CUE AT DESKTOP WIDTH. narrow-viewport.css fades a table's
   overflowing edge below 800 px; above it the scroll box is .wrap, and it
   had mask-image none. Same mask, same scroll-driven animation, so a box
   that does not overflow shows no fade. */
@media (min-width: 800px) {
  /* The entry's identity stays in view while the reader scrolls to its
     numbers: the first column is pinned to the scroll box's left edge. */
  .lib-page #listing th:first-child, .lib-page #listing td.lib-first { position:sticky; left:0; z-index:1;
    background:var(--bg); box-shadow:1px 0 0 var(--line); }
  .lib-page #listing th:first-child { z-index:2; }
  @supports (animation-timeline: scroll()) {
    /* Right edge only: the pinned first column already shows what is to
       the left, and a left fade would dim the entry's own name. */
    .lib-page #listing.wrap, .lib-page #queue.wrap {
      mask-image: linear-gradient(to right,
        #000 calc(100% - var(--fa-cue-r)), transparent 100%);
      animation: fa-scroll-cue linear both;
      animation-timeline: scroll(self inline);
    }
  }
}
/* ON A PHONE A ROW IS A CARD -- finding 2. At 390 px a sideways-scrolling
   table showed one column of thirteen: the cover, the slug and a button,
   none of the metadata the listing exists for. Each row now lays its cells
   out in a two-column grid, every cell labelled from its own header, and
   the header row stays as the SORT controls. Overrides narrow-viewport.css
   by id, which outranks its type selector. */
@media (max-width: 799.98px) {
  .lib-page #listing table, .lib-page #queue table { display:block; mask-image:none; animation:none; overflow:visible; }
  .lib-page #listing thead, .lib-page #queue thead, .lib-page #listing tbody, .lib-page #queue tbody { display:block; }
  .lib-page #listing thead tr, .lib-page #queue thead tr { display:flex; flex-wrap:wrap; gap:2px 12px; padding:6px 10px; }
  .lib-page #listing thead th, .lib-page #queue thead th { position:static; border:0; padding:2px 0; }
  .lib-page #listing thead tr::before { content:"Sort by"; font-size:.74rem; color:var(--muted); align-self:center; }
  .lib-page #listing tbody tr, .lib-page #queue tbody tr { display:grid; grid-template-columns:1fr 1fr; gap:2px 10px;
    padding:10px; border-bottom:1px solid var(--line); }
  .lib-page #listing tbody td, .lib-page #queue tbody td { display:block; border:0; padding:2px 0; white-space:normal;
    min-width:0; max-width:none; text-align:left; overflow-wrap:anywhere; }
  .lib-page #listing td.lib-first, .lib-page #listing td.t-title, .lib-page #listing td.t-source, .lib-page #listing td.t-refs, .lib-page #queue td.slug { grid-column:1 / -1; }
  .lib-page #listing td[data-label]::before, .lib-page #queue td[data-label]::before { content:attr(data-label);
    display:block; font-size:.66rem; letter-spacing:.04em; text-transform:uppercase; color:var(--muted); }
  .lib-page #listing td.lib-first::before, .lib-page #listing td.t-title::before { content:none; }
}
