/* ------------------------------------------------------------------------------------------
   TYPOGRAPHY OVERRIDE - the one place this sheet reaches inside #content, and it has to.

   AsciiDoctor's stylesheet asks for "Noto Serif" (body), "Open Sans" (headings) and
   "Droid Sans Mono" (code). A standalone asciidoctor page fetches all three from Google Fonts
   with a <link> in its own <head>; ours does not, and none of the three is installed on a
   typical Windows or macOS machine. Each family therefore falls back to a DIFFERENT generic -
   Times New Roman, Arial and Courier New - and the page renders in three unrelated typefaces.
   That is the "font mix", and it is a property of the vendored sheet, not of the content.

   Fixed with system stacks rather than by adding the web-font <link>: a generated manual is
   read from file://, from a review branch and from an air-gapped machine, and a stylesheet
   that silently degrades when a CDN is unreachable reintroduces exactly the same mismatch it
   was meant to cure. Everything else about the AsciiDoc look - spacing, rules, admonitions,
   block chrome, the rouge palette - is left to the vendored sheet untouched.
   ------------------------------------------------------------------------------------------ */
:root {
  /* sphinx-rtd-theme's own stacks. It serves Lato and Roboto Slab as web fonts; nothing is
     fetched here - a strict CSP and offline reading are both normal for this manual - so each
     stack names the real face first and falls back to something with the same posture. Georgia
     for headings is the important one: RTD's slab serif against a sans body is most of what
     makes the theme recognisable. */
  --font-body: Lato, "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue",
               Arial, sans-serif;
  --font-head: "Roboto Slab", Georgia, "Times New Roman", ff-tisa-web-pro, serif;
  --font-mono: SFMono-Regular, "Cascadia Code", Menlo, Monaco, Consolas,
               "Liberation Mono", monospace;
}
body,
#content,
#content p, #content li, #content td, #content th, #content dt, #content dd,
#content .paragraph, #content .admonitionblock td.content,
#content .quoteblock, #content .verseblock { font-family: var(--font-body); }
#content h1, #content h2, #content h3, #content h4, #content h5, #content h6,
#content .title, #content caption.title, #content .admonitionblock td.icon .title,
.sidebar, .toc { font-family: var(--font-body); }
#content code, #content pre, #content kbd, #content tt, #content .literalblock pre,
#content .listingblock pre, #content pre.rouge, #content .hljs { font-family: var(--font-mono); }
/* AsciiDoctor sizes its monospace at 0.9em of a serif body; against a sans body that reads
   small and thin, so it is nudged back to parity with the surrounding text. */
#content code, #content pre, #content tt { font-size: .875em; }
#content { font-size: 1rem; line-height: 1.6; }
/* ------------------------------------------------------------------------------------------
   THE SHELL, styled after sphinx-rtd-theme.

   The vendored asciidoctor sheet owns everything inside #content - the prose, the tables, the
   admonitions, the rouge palette. This owns only what surrounds it: the navigation rail, the
   on-this-page list and the search results, which the AsciiDoc look has no opinion about.

   Read the Docs is a DARK rail against a white page, with the project name on a blue band and
   the body text set in Lato. Those three do most of the recognising, so they are what this
   reproduces - not a pixel copy, which would mean vendoring a theme this file exists to avoid.
   ------------------------------------------------------------------------------------------ */
:root {
  --rtd-rail:        #343131;   /* the nav rail                                    */
  --rtd-rail-deep:   #2c2a2a;   /* nested entries, one step further back           */
  --rtd-brand:       #2980b9;   /* the project band, and every link in the content */
  --rtd-rail-fg:     #d9d9d9;
  --rtd-rail-muted:  #b3b3b3;
  --rtd-page:        #fcfcfc;   /* the page behind the article                     */
  --rtd-content:     #ffffff;
  --rtd-fg:          #404040;
  --rtd-line:        #e1e4e5;
}

html, body { margin: 0; padding: 0; background: var(--rtd-page); color: var(--rtd-fg); }

.page { display: grid; grid-template-columns: 300px minmax(0, 1fr) 14rem; min-height: 100vh; }

/* --- the rail ---------------------------------------------------------------------------- */
.sidebar { background: var(--rtd-rail); padding: 0 0 2rem; position: sticky; top: 0;
           align-self: start; max-height: 100vh; overflow: auto; }

.brand { display: block; background: var(--rtd-brand); color: #fff; text-decoration: none;
         font-weight: 700; font-size: 1.15rem; padding: 1.1rem 1.25rem; line-height: 1.2; }
.brand:hover { background: #2472a4; }

.searchbox { padding: .75rem 1.25rem 1rem; background: var(--rtd-brand); margin: 0; }
.searchbox input { width: 100%; box-sizing: border-box; padding: .4rem .6rem; border: 0;
                   border-radius: 2px; background: #fff; color: var(--rtd-fg);
                   font-size: .9rem; }

ul.nav { list-style: none; margin: 0; padding: 0; }
ul.nav li { margin: 0; }
ul.nav a { display: block; padding: .55rem 1.25rem; color: var(--rtd-rail-fg);
           text-decoration: none; font-size: .9rem;
           border-bottom: 1px solid rgba(255, 255, 255, .05); }
ul.nav a:hover { background: #4e4a4a; color: #fff; }
ul.nav a.current { background: var(--rtd-content); color: var(--rtd-brand); font-weight: 700;
                   border-bottom-color: var(--rtd-line); }

/* A command's output folds under one entry rather than sitting beside the manual's chapters. */
ul.nav-children { list-style: none; margin: 0; padding: 0; background: var(--rtd-rail-deep); }
ul.nav-children a { padding-left: 2.25rem; font-size: .86rem; color: var(--rtd-rail-muted); }

/* --- the article ------------------------------------------------------------------------- */
.content { background: var(--rtd-content); padding: 2.4rem 3rem; min-width: 0;
           border-right: 1px solid var(--rtd-line); }
#content { max-width: 50rem; }
#content a { color: var(--rtd-brand); }
#content h1, #content h2, #content h3, #content h4 { color: var(--rtd-fg); font-weight: 700;
                                                     font-family: var(--font-head); }
#content h1 { border-bottom: 1px solid var(--rtd-line); padding-bottom: .3rem; }

/* --- on this page ------------------------------------------------------------------------ */
.toc { padding: 2.4rem 1rem; font-size: .85rem; position: sticky; top: 0; align-self: start;
       max-height: 100vh; overflow: auto; }
.toc-title { font-weight: 700; color: #888; text-transform: uppercase; letter-spacing: .05em;
             font-size: .72rem; margin-bottom: .6rem; }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc a { color: #666; text-decoration: none; display: block; padding: .2rem 0;
         border-left: 2px solid transparent; padding-left: .6rem; }
.toc a:hover { color: var(--rtd-brand); border-left-color: var(--rtd-brand); }

/* --- search results ---------------------------------------------------------------------- */
.hit { padding: .8rem 0; border-bottom: 1px solid var(--rtd-line); }
.hit a { color: var(--rtd-brand); font-weight: 700; text-decoration: none; }
.hit p { color: #666; margin: .25rem 0 0; font-size: .9rem; }

@media (max-width: 1100px) {
  .page { grid-template-columns: 1fr; }
  .sidebar, .toc { position: static; max-height: none; }
  .content { border-right: 0; }
}