  .epilib-docs {
    display: grid;
    grid-template-columns: 220px minmax(0, 720px) 200px;
    justify-content: center;
    gap: 2.5em;
    margin: 1.5em auto;
    padding: 0 1em;
    max-width: 1320px;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.75;
    color: #222;
  }
  @media (max-width: 1240px) {
    .epilib-docs {
      grid-template-columns: 220px minmax(0, 1fr) 200px;
    }
  }
  @media (max-width: 1100px) {
    .epilib-docs {
      grid-template-columns: 220px minmax(0, 1fr);
    }
    .epilib-docs-toc { display: none; }
  }
  @media (max-width: 800px) {
    .epilib-docs {
      grid-template-columns: 1fr;
    }
  }

  /* ----- Content ----- */
  .epilib-docs-content {
    min-width: 0;
  }
  .epilib-docs-content h1,
  .epilib-docs-content h2,
  .epilib-docs-content h3,
  .epilib-docs-content h4,
  .epilib-docs-content h5,
  .epilib-docs-content h6 {
    font-family: inherit;
    font-weight: bold;
    margin: 0 0 0.6em;
    line-height: 1.3;
    clear: left;
  }
  .epilib-docs-content h1,
  .epilib-docs-content h2 { padding-top: 1.4em; }
  .epilib-docs-content h3,
  .epilib-docs-content h4 { padding-top: 0.8em; }
  .epilib-docs-content h5,
  .epilib-docs-content h6 { padding-top: 0.4em; }
  .epilib-docs-content > h1:first-child { padding-top: 0; }
  .epilib-docs-content :is(h1,h2,h3,h4,h5,h6) + :is(h1,h2,h3,h4,h5,h6) {
    padding-top: 0.5em;
  }
  .epilib-docs-content h1 {
    font-size: 200%;
    border-bottom: 1px solid #ddd;
    padding-bottom: 0.2em;
  }
  .epilib-docs-content h2 {
    font-size: 155%;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.15em;
  }
  .epilib-docs-content h3 { font-size: 125%; }
  .epilib-docs-content h4 { font-size: 110%; }
  .epilib-docs-content h5 { font-size: 100%; color: #555; }
  .epilib-docs-content h6 {
    font-size: 88%; color: #555;
    text-transform: uppercase; letter-spacing: 0.04em;
  }
  .epilib-docs-content p,
  .epilib-docs-content ul,
  .epilib-docs-content ol {
    margin: 0 0 1.3em;
  }
  /* Default list items get minimal spacing; this covers both tight lists and
     loose lists whose items happen to be a single short paragraph. */
  .epilib-docs-content li { margin: 0.25em 0; }
  /* Genuinely multi-block items (e.g., a paragraph followed by another
     paragraph or a nested list) get more breathing room. */
  .epilib-docs-content li:has(> p + *) { margin: 0.7em 0; }
  .epilib-docs-content li > ul,
  .epilib-docs-content li > ol { margin: 0.2em 0 0.4em; }
  .epilib-docs-content code,
  .epilib-docs-content pre {
    font-family: Consolas, "Liberation Mono", Courier, monospace;
    font-size: 100%;
  }
  .epilib-docs-content code {
    background: #f0f4f8;
    color: inherit;
    padding: 0.1em 0.35em;
    border: 1px solid #dde2e8;
    border-radius: 3px;
  }
  .epilib-docs-content table code {
    background: none;
    border: none;
    padding: 0;
  }
  /* Multi-line inline code (from flattened Dokuwiki `<code>` blocks inside
     table cells) preserves newlines via `&#10;` entities. */
  .epilib-docs-content code.multiline {
    display: block;
    white-space: pre;
    margin: 0.3em 0;
    padding: 0.5em 0.7em;
    background: #f0f4f8;
    border: 1px solid #dde2e8;
    border-radius: 3px;
    font-size: 100%;
  }
  .epilib-docs-content pre {
    background: #f6f8fa;
    padding: 0.8em 1em;
    border: 1px solid #dde2e8;
    border-radius: 4px;
    overflow-x: auto;
  }
  /* Syntax highlighting (Pygments "vs" theme) */
  .epilib-docs-content .codehilite { background: transparent; }
  .epilib-docs-content .codehilite .hll { background-color: #ffc; }
  .epilib-docs-content .codehilite .c,
  .epilib-docs-content .codehilite .ch,
  .epilib-docs-content .codehilite .cm,
  .epilib-docs-content .codehilite .cpf,
  .epilib-docs-content .codehilite .c1,
  .epilib-docs-content .codehilite .cs { color: #008000; }
  .epilib-docs-content .codehilite .k,
  .epilib-docs-content .codehilite .kc,
  .epilib-docs-content .codehilite .kd,
  .epilib-docs-content .codehilite .kn,
  .epilib-docs-content .codehilite .kp,
  .epilib-docs-content .codehilite .kr,
  .epilib-docs-content .codehilite .cp,
  .epilib-docs-content .codehilite .ow { color: #00F; }
  .epilib-docs-content .codehilite .kt,
  .epilib-docs-content .codehilite .nc { color: #2B91AF; }
  .epilib-docs-content .codehilite .s,
  .epilib-docs-content .codehilite .sa,
  .epilib-docs-content .codehilite .sb,
  .epilib-docs-content .codehilite .sc,
  .epilib-docs-content .codehilite .dl,
  .epilib-docs-content .codehilite .sd,
  .epilib-docs-content .codehilite .s2,
  .epilib-docs-content .codehilite .se,
  .epilib-docs-content .codehilite .sh,
  .epilib-docs-content .codehilite .si,
  .epilib-docs-content .codehilite .sx,
  .epilib-docs-content .codehilite .sr,
  .epilib-docs-content .codehilite .s1,
  .epilib-docs-content .codehilite .ss { color: #A31515; }
  .epilib-docs-content pre code {
    background: none;
    border: none;
    padding: 0;
    border-radius: 0;
  }
  .epilib-docs-content table {
    border-collapse: collapse;
    margin: 0 0 1.1em;
    font-size: 95%;
    width: 100%;
  }
  .epilib-docs-content table th,
  .epilib-docs-content table td {
    border: 1px solid #ddd;
    padding: 0.45em 0.7em;
    text-align: left;
    vertical-align: top;
  }
  .epilib-docs-content table th {
    background: #f3f3f3;
    font-weight: 600;
  }
  .epilib-docs-content table tr:nth-child(2n) td {
    background: #fafafa;
  }
  .epilib-docs-content img {
    max-width: 100%;
    height: auto;
  }
  .epilib-docs-content img.align-left {
    float: left; margin: 0 1em 0.5em 0;
  }
  .epilib-docs-content img.align-right {
    float: right; margin: 0 0 0.5em 1em;
  }
  .epilib-docs-content img.align-center {
    display: block; margin: 0.5em auto;
  }
  .epilib-docs-content a {
    text-decoration: underline;
    text-decoration-color: rgba(0, 102, 204, 0.4);
    text-underline-offset: 2px;
    transition: text-decoration-color 0.15s;
  }
  .epilib-docs-content a:hover {
    text-decoration-color: currentColor;
  }
  .epilib-docs-content a.missing-link {
    color: #006;
    text-decoration-style: dashed;
  }
  .epilib-docs-content a[href^="http"]::after {
    content: "";
    display: inline-block;
    width: 0.85em;
    height: 0.85em;
    margin-left: 0.25em;
    vertical-align: -1px;
    background-color: currentColor;
    opacity: 0.8;
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/><polyline points='15 3 21 3 21 9'/><line x1='10' y1='14' x2='21' y2='3'/></svg>");
    mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/><polyline points='15 3 21 3 21 9'/><line x1='10' y1='14' x2='21' y2='3'/></svg>");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
  }
  .epilib-docs-content .headerlink {
    color: #aaa; text-decoration: none; margin-left: 0.25em;
    opacity: 0; transition: opacity 0.15s, color 0.15s;
  }
  .epilib-docs-content :hover > .headerlink,
  .epilib-docs-content .headerlink:focus { opacity: 1; }
  .epilib-docs-content .headerlink:hover { color: #555; }
  /* The top-level page heading already serves as the page title; suppress
     its permalink # — there's nothing useful to link to. */
  .epilib-docs-content > :is(h1, h2):first-child .headerlink {
    display: none;
  }

  /* ----- Left sidebar (global nav) ----- */
  .epilib-docs-nav {
    font-size: 0.9em;
    line-height: 1.45;
    position: sticky;
    top: 1em;
    max-height: calc(100vh - 2em);
    display: flex;
    flex-direction: column;
  }
  /* Search box stays fixed at the top of the sidebar; the nav list scrolls
     within its own space. The search dropdown can overflow the nav freely
     because the nav container itself doesn't clip. */
  .epilib-docs-nav > ul {
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
  }
  /* At narrow widths (e.g. high zoom), collapse the sidebar into normal
     page flow above the content: drop sticky positioning, the flex layout,
     and the inner ul's scrollbox. Must come AFTER the default nav rules so
     it wins on source order. DOM order is nav → article → aside, so it
     naturally lands above the content. */
  @media (max-width: 800px) {
    .epilib-docs-nav {
      position: static;
      max-height: none;
      overflow: visible;
      display: block;
      padding-bottom: 1em;
      border-bottom: 1px solid #ddd;
      margin-bottom: 1.5em;
    }
    .epilib-docs-nav > ul {
      overflow: visible;
      flex: none;
    }
  }
  .epilib-docs-search {
    position: relative;
    margin-bottom: 1em;
  }
  .epilib-docs-search input {
    width: 100%;
    padding: 0.45em 0.7em;
    font: inherit;
    font-size: 0.95em;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
  }
  .epilib-docs-search input:focus {
    outline: none;
    border-color: #1a3a6e;
  }
  .epilib-docs-search-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    max-height: 60vh;
    overflow-y: auto;
    z-index: 100;
    display: none;
  }
  .epilib-docs-search-results.open { display: block; }
  .epilib-docs-search-results article {
    display: block;
    padding: 0.5em 0.7em;
    margin: 0;
    border-bottom: 1px solid #f0f0f0;
  }
  .epilib-docs-search-results article:last-child { border-bottom: none; }
  .epilib-docs-search-results h3 {
    display: block;
    margin: 0 0 0.15em;
    padding: 0;
    font-size: 0.95em;
    font-weight: 600;
  }
  .epilib-docs-search-results h3 a {
    display: inline;
    padding: 0;
    margin: 0;
    text-indent: 0;
    text-decoration: none;
  }
  .epilib-docs-search-results h3 a:hover { text-decoration: underline; }
  .epilib-docs-search-results p {
    display: block;
    margin: 0;
    padding: 0;
  }
  .epilib-docs-search-context {
    color: #888;
    font-weight: 400;
  }
  .epilib-docs-search-results h3 a {
    color: #1a3a6e;
    text-decoration: none;
  }
  .epilib-docs-search-results h3 a:hover,
  .epilib-docs-search-results h3 a:focus {
    text-decoration: underline;
    outline: none;
  }
  .epilib-docs-search-results article:focus-within {
    background: #f5f8fc;
  }
  .epilib-docs-search-results p {
    margin: 0;
    font-size: 0.85em;
    color: #666;
    line-height: 1.4;
  }
  .epilib-docs-search-empty {
    padding: 0.7em;
    color: #888;
    font-size: 0.9em;
    font-style: italic;
  }
  .epilib-docs-nav ul {
    list-style: none; padding: 0; margin: 0;
  }
  .epilib-docs-nav ul ul {
    padding-left: 0.9em; margin: 0.1em 0 0.3em;
  }
  .epilib-docs-nav li { display: block; margin: 0.15em 0; }
  .epilib-docs-nav a {
    color: #444; text-decoration: none; display: block;
    padding: 0.15em 0.4em; border-radius: 3px;
  }
  .epilib-docs-nav a:hover { background: #f0f0f0; color: #000; }
  .epilib-docs-nav li.active > a {
    background: #e8eef5; color: #1a3a6e; font-weight: 600;
  }
  .epilib-docs-nav details {
    margin-top: 0.5em;
  }
  .epilib-docs-nav > ul > li {
    margin-top: 0.5em;
  }
  .epilib-docs-nav > ul > li > a,
  .epilib-docs-nav summary {
    list-style: none;
    cursor: pointer;
    padding: 0.25em 0.4em;
    font-weight: 600;
    color: #111;
    user-select: none;
  }
  .epilib-docs-nav summary::-webkit-details-marker { display: none; }
  /* Disclosure chevron drawn as a CSS border triangle so its geometric
     center matches the box center — rotating around the default origin
     keeps it visually anchored (a text ▸ glyph isn't centered in its
     em-box and drifts horizontally when rotated). */
  .epilib-docs-nav summary::before,
  .epilib-docs-nav > ul > li > a::before {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    border: 4px solid transparent;
    border-left-color: #888;
    vertical-align: middle;
    margin-right: 0.25em;
    /* The triangle's apex is at the border-box center, so the default
       transform-origin would pivot at the pointy end. Move it to the
       visible triangle's bbox center (x=25% of the 8px-wide border box). */
    transform-origin: 25% 50%;
    transition: transform 0.12s ease;
  }
  .epilib-docs-nav > ul > li > a::before {
    visibility: hidden;
  }
  .epilib-docs-nav details[open] > summary::before {
    transform: rotate(90deg);
  }

  /* ----- Right sidebar (page TOC) ----- */
  .epilib-docs-toc {
    font-size: 0.85em;
    line-height: 1.45;
    position: sticky;
    top: 1em;
    max-height: calc(100vh - 2em);
    overflow-y: auto;
  }
  .epilib-docs-toc-title {
    font-size: 0.9em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #555;
    margin: 0 0 0.5em;
    padding-left: 0.4em;
  }
  .epilib-docs-page-meta {
    margin-top: 1.5em;
    padding: 1.2em 0.4em 0;
    border-top: 1px solid #eee;
    font-size: 0.85em;
    color: #555;
  }
  /* No TOC above? The meta block is the only child of the aside and
     doesn't need its separator line / top padding. */
  .epilib-docs-page-meta:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
  }
  .epilib-docs-modified {
    margin-bottom: 0.6em;
  }
  .epilib-docs-edit {
    display: inline-flex;
    align-items: center;
    color: #555;
    text-decoration: none;
  }
  .epilib-docs-edit svg {
    margin-right: 0.6em;
  }
  .epilib-docs-edit:hover { color: #000; }
  .epilib-docs-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  /* Outer ul draws the 2px guide line; nested ones just indent. The hover
     bar (a ::before on the hovered <a>) is offset back by the cumulative
     nested padding so it always lands on the outer guide line. */
  .epilib-docs-toc > ul {
    border-left: 2px solid #eee;
  }
  .epilib-docs-toc ul ul {
    padding-left: 0.8em;
  }
  .epilib-docs-toc li { display: block; margin: 0; }
  .epilib-docs-toc a {
    color: #555;
    text-decoration: none;
    display: block;
    padding: 0.15em 0.6em;
    position: relative;
  }
  .epilib-docs-toc a:hover {
    color: #000;
  }
  /* Scope to TOC entries (inside the ul) only — the Edit-on-GitHub link
     is a sibling anchor in the same aside but shouldn't get the bar. */
  .epilib-docs-toc ul a:hover::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #aaa;
  }
  .epilib-docs-toc > ul > li > a:hover::before { left: -2px; }
  .epilib-docs-toc > ul > li > ul > li > a:hover::before { left: calc(-0.8em - 2px); }
  .epilib-docs-toc > ul > li > ul > li > ul > li > a:hover::before { left: calc(-1.6em - 2px); }
  .epilib-docs-toc > ul > li > ul > li > ul > li > ul > li > a:hover::before { left: calc(-2.4em - 2px); }
