/* Rendered QuickText content (see RenderHtml), in the Render View, Slide View and mobile Render
   View. The panes around it are styled in text.css (desktop) and text-mobile.css (mobile). */

/* The rendered document (see RenderHtml). Everything is set through the variables below, so a
   rendering style only needs to redefine them. Sizes are in em, so --qt-base-size scales the
   whole document. It is one of three base sizes, chosen by a context class below: desktop (the
   default, with no class), mobile, or slides (relative to a fixed-size slide, which is scaled to
   fit the screen). The text colour is likewise one of two, for display (desktop or mobile) or
   slides. Colours are the same in light and dark mode, like a printed page. */

div.qt-render {
    --qt-base-size-desktop: 16px;
    --qt-base-size-mobile: 20px;
    --qt-base-size-slides: 30px;
    --qt-base-size: var(--qt-base-size-desktop);
    --qt-font: "Open Sans", "IBM Plex Sans", sans-serif;
    --qt-heading-font: var(--qt-font);
    --qt-text-color-display: black;
    --qt-text-color-slides: #333333;
    --qt-text-color: var(--qt-text-color-display);
    --qt-background-color: white;
    --qt-heading-color: navy;
    --qt-bullet-color: navy;
    --qt-line-height: 1.5;
    --qt-padding: 1em 1.5em;
    --qt-paragraph-gap: 0.75em;

    --qt-h1-size: 2em;
    --qt-h1-weight: bold;
    --qt-h1-margin: 0.75em 0 0.4em 0;
    --qt-h2-size: 1.5em;
    --qt-h2-weight: bold;
    --qt-h2-margin: 0.75em 0 0.4em 0;

    --qt-list-indent-1: 1.5em;
    --qt-list-indent-2: 3em;
    --qt-bullet-1: "\2022";
    --qt-bullet-2: "\25E6";
    --qt-bullet-scale: 2;
    --qt-bullet-gap: 0.7em;
    --qt-list-item-gap: 0.2em;
    --qt-list-spaced-gap: 1.125em;
    --qt-number-indent-1: 2em;
    --qt-number-indent-2: 4em;
    --qt-number-color: navy;
    --qt-number-gap: 0.4em;

    --qt-bold-weight: bold;
    --qt-underline-thickness: 0.06em;
    --qt-underline-offset: 0.15em;
    --qt-strike-thickness: 0.06em;
    --qt-code-font: "DejaVu Sans Mono", Menlo, Consolas, monospace;
    --qt-code-size: 0.9em;
    --qt-code-color: #333333;
    --qt-code-background: #EEEEEE;
    --qt-code-padding: 0.1em 0.3em;
    --qt-code-radius: 3px;
    --qt-code-block-padding: 0.6em 0.9em;
    --qt-code-block-line-height: 1.4;
    --qt-tab-size: 4;

    --qt-rule-color: #999999;
    --qt-rule-thickness: 1px;
    --qt-rule-margin: 1em 0;

    --qt-indent-1: 2em;
    --qt-indent-2: 4em;

    --qt-slide-title-size: 1.6em;
    --qt-slide-title-color: black;
    --qt-slide-title-rule-color: var(--qt-heading-color);
    --qt-slide-title-rule-thickness: 0.05em;
    --qt-slide-title-gap: 0.6em;
    --qt-slide-h2-size: 1.2em;
    --qt-slide-more-color: red;
    --qt-slide-footer-size: 0.65em;
    --qt-slide-footer-color: #777777;
    --qt-slide-footer-gap: 1em;
    --qt-slide-footer-rule-color: #CCCCCC;
    --qt-slide-footer-rule-thickness: 2px;
    --qt-slide-dark-text: white;
    --qt-slide-dark-footer-color: #CCCCCC;
    --qt-slide-dark-footer-rule-color: #CCCCCC;
    --qt-slide-pic-box-alpha: 80%;
    font-size: var(--qt-base-size);
    font-family: var(--qt-font);
    color: var(--qt-text-color);
    background-color: var(--qt-background-color);
    line-height: var(--qt-line-height);
    padding: var(--qt-padding);
    overflow-wrap: anywhere;
    min-height: 100%;
    box-sizing: border-box;
}

div.qt-render.qt-context-mobile {
    --qt-base-size: var(--qt-base-size-mobile);
}

div.qt-render.qt-context-slides {
    --qt-base-size: var(--qt-base-size-slides);
    --qt-text-color: var(--qt-text-color-slides);
}

/* Heading margins are in the heading's own em, so they scale with its font size */
div.qt-render h1.qt-h1 {
    font-family: var(--qt-heading-font);
    font-size: var(--qt-h1-size);
    font-weight: var(--qt-h1-weight);
    color: var(--qt-heading-color);
    margin: var(--qt-h1-margin);
    line-height: 1.2;
}

div.qt-render h2.qt-h2 {
    font-family: var(--qt-heading-font);
    font-size: var(--qt-h2-size);
    font-weight: var(--qt-h2-weight);
    color: var(--qt-heading-color);
    margin: var(--qt-h2-margin);
    line-height: 1.2;
}

div.qt-render p.qt-p,
div.qt-render div.qt-list {
    margin: 0 0 var(--qt-paragraph-gap) 0;
}

/* A heading at the very top doesn't need space above it, as the padding provides that. Here and
   wherever else the first or last thing in something has its margin removed, space asked for by
   backslashes (see QTSpace) doesn't count, so it adds to the space there rather than bringing the
   margin back. */
div.qt-render > h1.qt-h1:nth-child(1 of :not(.qt-vspace)),
div.qt-render > h2.qt-h2:nth-child(1 of :not(.qt-vspace)) {
    margin-top: 0;
}

/* Two or more blank lines: adds a second paragraph gap to the one already there */
div.qt-render div.qt-extra-space {
    height: var(--qt-paragraph-gap);
}

/* Space asked for by backslashes ending a line (see QTSpace), half a line for each, after a
   paragraph line or list item, or on its own */
div.qt-render .qt-vspace {
    display: block;
    height: calc(var(--qt-vspace) * var(--qt-line-height) * 0.5em);
}

div.qt-render div.qt-li-1,
div.qt-render div.qt-li-2 {
    position: relative;
    margin-bottom: var(--qt-list-item-gap);
}

div.qt-render div.qt-li-1 {
    padding-left: var(--qt-list-indent-1);
}

div.qt-render div.qt-li-2 {
    padding-left: var(--qt-list-indent-2);
}

div.qt-render div.qt-li-1::before,
div.qt-render div.qt-li-2::before {
    position: absolute;
    color: var(--qt-bullet-color);
    transform: scale(var(--qt-bullet-scale));
}

div.qt-render div.qt-li-1::before {
    content: var(--qt-bullet-1);
    left: calc(var(--qt-list-indent-1) - var(--qt-bullet-gap) - 0.4em);
}

div.qt-render div.qt-li-2::before {
    content: var(--qt-bullet-2);
    left: calc(var(--qt-list-indent-2) - var(--qt-bullet-gap) - 0.4em);
}

/* A list item after blank lines. Its margin overlaps the previous item's rather than adding to
   it, so the gap is exactly --qt-list-spaced-gap. */
div.qt-render div.qt-li-spaced {
    margin-top: var(--qt-list-spaced-gap);
}

/* A numbered list item (see RenderHtml.renderListItem). Its number takes the bullet's place, in a
   wider indent, and is right-aligned so numbers of different widths line up on their ends. */
div.qt-render div.qt-li-1.qt-li-numbered {
    padding-left: var(--qt-number-indent-1);
}

div.qt-render div.qt-li-2.qt-li-numbered {
    padding-left: var(--qt-number-indent-2);
}

div.qt-render div.qt-li-numbered::before {
    content: none;
}

div.qt-render span.qt-li-number {
    position: absolute;
    color: var(--qt-number-color);
}

div.qt-render div.qt-li-1 span.qt-li-number {
    right: calc(100% - var(--qt-number-indent-1) + var(--qt-number-gap));
}

div.qt-render div.qt-li-2 span.qt-li-number {
    right: calc(100% - var(--qt-number-indent-2) + var(--qt-number-gap));
}

div.qt-render strong.qt-bold {
    font-weight: var(--qt-bold-weight);
}

div.qt-render em.qt-italic {
    font-style: italic;
}

div.qt-render u.qt-underline {
    text-decoration: underline;
    text-decoration-thickness: var(--qt-underline-thickness);
    text-underline-offset: var(--qt-underline-offset);
}

div.qt-render s.qt-strike {
    text-decoration: line-through;
    text-decoration-thickness: var(--qt-strike-thickness);
}

/* Inline code. Its size is relative to the text around it, so it scales with headings too. Spaces
   are kept as typed, like everything else within it. */
div.qt-render code.qt-code {
    white-space: pre-wrap;
    font-family: var(--qt-code-font);
    font-size: var(--qt-code-size);
    color: var(--qt-code-color);
    background-color: var(--qt-code-background);
    padding: var(--qt-code-padding);
    border-radius: var(--qt-code-radius);
}

/* A code block. Lines are never wrapped, the block scrolling sideways instead. Its size is
   relative to the document's, as it has no surrounding text to follow. */
div.qt-render pre.qt-pre {
    margin: 0 0 var(--qt-paragraph-gap) 0;
    overflow-x: auto;
    white-space: pre;
    tab-size: var(--qt-tab-size);
    font-family: var(--qt-code-font);
    font-size: var(--qt-code-size);
    line-height: var(--qt-code-block-line-height);
    color: var(--qt-code-color);
    background-color: var(--qt-code-background);
    padding: var(--qt-code-block-padding);
    border-radius: var(--qt-code-radius);
}

div.qt-render hr.qt-hr {
    border: none;
    border-top: var(--qt-rule-thickness) solid var(--qt-rule-color);
    margin: var(--qt-rule-margin);
}

/* An indented line within a paragraph, a block of its own so its indent applies however it
   wraps (see RenderHtml.renderLines) */
div.qt-render span.qt-indent-1,
div.qt-render span.qt-indent-2 {
    display: block;
}

div.qt-render span.qt-indent-1 {
    padding-left: var(--qt-indent-1);
}

div.qt-render span.qt-indent-2 {
    padding-left: var(--qt-indent-2);
}

/* Slides (see RenderHtml.slidesToHtml), in the Slide View. Sub-headings on slides are smaller than
   in the Render View, so they stand apart from the slide titles. */

/* Only the current slide shows */
div.qt-render div.qt-slide {
    display: none;
    height: 100%;
    flex-direction: column;
}

div.qt-render div.qt-slide.qt-slide-current {
    display: flex;
}

/* A slide's own background (see RenderHtml.backgroundToHtml), a colour or an image stretched to
   exactly fill the whole slide, padding included, behind everything on it. Placed against the
   slide's rendered document, which its scaling transform makes the containing block and stacking
   context, as for a section start slide's picture (see text-render-autogen.css). */
div.qt-render div.qt-slide-background {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-size: 100% 100%;
    background-repeat: no-repeat;
}

/* A slide showing a background image: the fills of its boxes are translucent, though not their
   text or borders (see text-render-block.css) */
div.qt-render div.qt-slide-pic div.qt-box-filled {
    background-color: color-mix(in srgb, var(--qt-box-fill) var(--qt-slide-pic-box-alpha), transparent);
}

div.qt-render div.qt-slide-pic div.qt-box-vibrant {
    background-color: color-mix(in srgb, var(--qt-box-vibrant-fill) var(--qt-slide-pic-box-alpha),
        transparent);
}

div.qt-render div.qt-slide-pic div.qt-box-dark {
    background-color: color-mix(in srgb, var(--qt-box-dark-fill) var(--qt-slide-pic-box-alpha),
        transparent);
}

div.qt-render div.qt-slide-pic div.qt-box.qt-box-colored {
    background-color: color-mix(in srgb, var(--qt-box-color) var(--qt-slide-pic-box-alpha), transparent);
}

/* A slide with a dark background colour: its text, title, footer, and the headings, bullets,
   numbers and table headers on it, are light, as in a dark box. Anything with a pale background on
   it has the usual colours again (see text-render-block.css). */
div.qt-render div.qt-slide.qt-slide-dark {
    color: var(--qt-slide-dark-text);
    --qt-heading-color: var(--qt-slide-dark-text);
    --qt-bullet-color: var(--qt-slide-dark-text);
    --qt-number-color: var(--qt-slide-dark-text);
    --qt-table-head-color: var(--qt-slide-dark-text);
    --qt-slide-title-color: var(--qt-slide-dark-text);
    --qt-slide-title-rule-color: var(--qt-slide-dark-text);
    --qt-slide-footer-color: var(--qt-slide-dark-footer-color);
    --qt-slide-footer-rule-color: var(--qt-slide-dark-footer-rule-color);
}

/* The slide's title, from the heading which started it. Its sizes are in its own em, so they
   scale with its font size. */
div.qt-render div.qt-slide-title {
    flex: 0 0 auto;
    font-family: var(--qt-heading-font);
    font-size: var(--qt-slide-title-size);
    font-weight: bold;
    line-height: 1.2;
    color: var(--qt-slide-title-color);
    border-bottom: var(--qt-slide-title-rule-thickness) solid var(--qt-slide-title-rule-color);
    padding-bottom: 0.2em;
    margin-bottom: var(--qt-slide-title-gap);
}

/* Content which doesn't fit is shrunk or cut short by SlideFitter, which sets its font size. Any
   still overflowing (e.g. sideways) is cut off. */
div.qt-render div.qt-slide-body {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* The marker ending a slide which has been cut short as it doesn't fit */
div.qt-render div.qt-slide-more {
    color: var(--qt-slide-more-color);
}

/* The footer (see RenderHtml.footerToHtml), across the bottom of the slide: the document's title,
   cut short if too long for one line, and the page number on the right. Its sizes are in its own
   em, so they scale with its font size, and autofit doesn't change it. */
div.qt-render div.qt-slide-footer {
    flex: 0 0 auto;
    display: flex;
    font-family: var(--qt-font);
    font-size: var(--qt-slide-footer-size);
    line-height: 1.2;
    color: var(--qt-slide-footer-color);
    border-top: var(--qt-slide-footer-rule-thickness) solid var(--qt-slide-footer-rule-color);
    padding-top: 0.4em;
    margin-top: var(--qt-slide-footer-gap);
}

div.qt-render span.qt-slide-footer-title {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

div.qt-render span.qt-slide-footer-page {
    flex: 0 0 auto;
    margin-left: auto;
    padding-left: 1em;
}

/* Its margins are in its own em (see h2.qt-h2 above), so they shrink with it */
div.qt-render div.qt-slide-body h2.qt-h2 {
    font-size: var(--qt-slide-h2-size);
}

div.qt-render div.qt-slide-body > :nth-child(1 of :not(.qt-vspace)) {
    margin-top: 0;
}
