/* docs.pixelfx.co: additions to the website's look (assets/site/) for what docs pages have and the website's pages
   don't. Colors only through the website's variables, so dark mode (night.css) follows. */

/* Text */
.prose img,.prose video{max-width:100%;height:auto}
.prose h1{font-size:40px;margin-top:2em;padding-top:.6em;border-top:2px solid var(--ink)}
.prose :is(h1,h2,h3,h4,h5,h6){scroll-margin-top:16px}
.prose h5,.prose h6{font-size:17px;margin-top:1.3em}
.prose hr{border:0;border-top:2px solid var(--ink);margin:2.4em 0}
.prose hr:has(+:is(h1,h2)){display:none}          /* those headings draw their own line */
.prose li>ul,.prose li>ol{margin-top:6px}
.prose li>p{margin:0}
.prose li>p+*{margin-top:.6em}
.prose sup{line-height:0}
.prose s{color:var(--mute)}

/* The "#" link after a heading: shown on hover, copies a link to the section */
.prose .hlink{border:0;margin-left:.3em;color:var(--mute);font-weight:400;opacity:0}
.prose :is(h1,h2,h3,h4,h5,h6):hover .hlink,.prose .hlink:focus{opacity:1}
@media (hover:none){.prose .hlink{display:none}}

/* On a phone the website's single column (1fr) would grow to the widest code block or table; minmax(0,1fr) keeps it
   to the screen and lets those scroll sideways */
@media (max-width:900px){.postgrid{grid-template-columns:minmax(0,1fr)}}
/* The same for the website's lists (display:grid): a code block in a list item scrolls instead of widening the list */
.prose :is(ul,ol){grid-template-columns:minmax(0,1fr)}
/* A word longer than the line (a URL as link text, a long setting name) breaks instead of widening the page */
.prose{overflow-wrap:break-word}

/* The TOC (the website's .toc): the level below nested; a long one scrolls by itself instead of running off the
   bottom of the screen while it sticks */
.toc ol ol{margin-top:6px;padding-left:14px;gap:4px;list-style:disc;font-size:13px}
@media (min-width:901px){.toc{max-height:calc(100vh - 40px);overflow-y:auto}}

/* Code blocks, with a Copy button (docs.js) */
.prose pre{position:relative;background:var(--paper2);border:2px solid var(--ink);padding:14px 16px;overflow-x:auto;font-size:14px;line-height:1.55}
.prose pre code{background:none;padding:0;font-size:inherit;white-space:pre}
.prose pre .copy{position:absolute;top:6px;right:6px;font:11px Silkscreen,monospace;text-transform:uppercase;color:var(--ink);background:var(--paper);border:2px solid var(--ink);padding:4px 8px;cursor:pointer;opacity:0}
.prose pre:hover .copy,.prose pre .copy:focus-visible{opacity:1}
@media (hover:none){.prose pre .copy{opacity:1}}

/* Tables written as HTML in the Markdown (Markdown tables get the website's table.spec): full width, in the
   website's table look (the converter puts the outermost in a .tbl, which scrolls sideways on a phone) */
.prose table:not(.spec){width:100%;border-collapse:collapse;border:2px solid var(--ink);background:var(--paper);font-size:15px;line-height:1.5}
.prose table:not(.spec) :is(td,th){border:1px solid var(--khaki);padding:8px 12px;vertical-align:top}
.prose table:not(.spec) :is(th,thead td){background:var(--cream);text-align:left}
.prose table.spec :is(td,th){vertical-align:top}

/* The InfoFrame tables (table.infoframe, the VSIF pages): byte names in the first column, fields centered
   over their bits, small value tables inside cells */
.prose table.infoframe{text-align:center}
.prose table.infoframe :is(td,th){vertical-align:middle}
.prose table.infoframe thead td{text-align:center;border-bottom:2px solid var(--ink);font-weight:600}
.prose table.infoframe>tbody>tr>td:first-child{font:13px Silkscreen,monospace;background:var(--cream);white-space:nowrap}
.prose table.infoframe table{border-width:1px;border-color:var(--khaki);margin:2px 0}
.prose table.infoframe table tr:first-child td{background:var(--cream);font-weight:600}

/* <details>: the website's look (its FAQ), with room for the images, lists and nested sections of the guides */
.prose details{margin-bottom:0;padding:0 20px}
.prose details[open]{padding-bottom:18px}
.prose details+details{margin-top:12px}
.prose summary{font-size:17px;margin:0 -20px}
.prose details[open]>summary{margin-bottom:14px}
.prose details p{padding:0;color:var(--ink);max-width:none}
.prose details details summary{font-size:16px}
/* The website's open look (details[open] summary: "–", cream) also reaches the summary of a closed <details> inside
   an open one; the website has no nested ones */
.prose details:not([open])>summary{border-bottom:0;background:none}
.prose details:not([open])>summary:after{content:"+"}

/* The steps of the install guides (tools/sections.mjs): the heading is the toggle, with "+" / "–" at its end, in
   place of a "Click to expand/collapse" box under it */
.prose hr:has(+details.step){display:none}          /* the step draws its own line, like a heading */
.prose details.step{border:0;background:none;padding:0;margin:2.4em 0 0}
.prose details.step[open]{padding:0}
.prose details.step>summary{display:flex;align-items:baseline;gap:16px;margin:0;padding:.75em 0 0;border:0;border-top:2px solid var(--ink);background:none;font:inherit}
.prose details.step[open]>summary{margin-bottom:.5em;border-bottom:0;background:none}
.prose details.step>summary>:is(h1,h2,h3,h4,h5,h6){flex:1;margin:0;padding:0;border:0;scroll-margin-top:36px}
.prose details.step>summary:after{content:"+";font:26px Silkscreen,monospace}
.prose details.step[open]>summary:after{content:"\2013"}
.prose details.step>summary:hover:after{color:var(--tealD)}

/* Variants (tools/sections.mjs): tabs in the look of the website's option buttons, one variant shown at a time.
   The checked radio button picks it (CSS only); docs.js picks the same variant in the other steps. */
.prose .variants{margin:1.4em 0}
.prose .vtabs{position:relative;display:flex;flex-wrap:wrap;gap:8px;margin-bottom:1.1em}
.prose .vtabs input{position:absolute;left:0;top:0;width:1px;height:1px;margin:0;opacity:0}
.prose .vtabs label{cursor:pointer;border:2px solid var(--ink);background:var(--paper);color:var(--ink);font:13px/1.35 Silkscreen,monospace;text-transform:uppercase;padding:8px 11px 7px}
.prose .vtabs label:hover{background:var(--cream)}
.prose .vtabs input:checked+label{background:var(--ink);color:var(--cream);box-shadow:3px 3px 0 var(--teal)}
html[data-theme=night] .prose .vtabs input:checked+label{color:#121419}
.prose .vtabs input:focus-visible+label{outline:3px solid var(--peri);outline-offset:2px}
.prose .vpanel{border-left:2px solid var(--ink);padding-left:20px;scroll-margin-top:100px}
.prose .vpanel>:first-child{margin-top:0}
@supports selector(:has(a)){        /* without :has() every variant shows, one after the other */
    .prose .vpanel{display:none}
    .prose .variants:has(>.vtabs>input:nth-of-type(1):checked)>.vpanel:nth-child(2),
    .prose .variants:has(>.vtabs>input:nth-of-type(2):checked)>.vpanel:nth-child(3),
    .prose .variants:has(>.vtabs>input:nth-of-type(3):checked)>.vpanel:nth-child(4),
    .prose .variants:has(>.vtabs>input:nth-of-type(4):checked)>.vpanel:nth-child(5),
    .prose .variants:has(>.vtabs>input:nth-of-type(5):checked)>.vpanel:nth-child(6),
    .prose .variants:has(>.vtabs>input:nth-of-type(6):checked)>.vpanel:nth-child(7),
    .prose .variants:has(>.vtabs>input:nth-of-type(7):checked)>.vpanel:nth-child(8),
    .prose .variants:has(>.vtabs>input:nth-of-type(8):checked)>.vpanel:nth-child(9){display:block}
}
/* Printed: every variant, under its name (docs.js opens every step before printing) */
@media print{
    .prose .vtabs{display:none}
    .prose .vpanel{display:block!important}
    .prose .vpanel:before{content:attr(data-name);display:block;font-weight:700;margin:1em 0 .4em}
}

/* The index: the website's page head (.head, spaced as on www.pixelfx.co/support), then one card per "## " section
   of index.md. Without an intro the title gets the whole width. */
.docindex{padding:36px 0 60px}
.docindex .head{margin-bottom:36px}
.docindex .head.solo{grid-template-columns:1fr}
.docindex .head .prose{color:var(--mute);font-size:18px}
.doccards{columns:330px 3;column-gap:28px}
.doccard{break-inside:avoid;margin:0 6px 34px 0;border:2px solid var(--ink);background:var(--paper);box-shadow:var(--sh);padding:22px 24px 24px;font-size:17px;line-height:1.55}
.doccard h2{font-size:26px;margin:0;padding:0;border:0}
.doccard h3{font:12px Silkscreen,monospace;text-transform:uppercase;letter-spacing:.02em;color:var(--mute);margin-top:1.5em}
.doccard p{color:var(--mute)}
.doccard ul{padding-left:20px;gap:4px}
.doccard .hlink{display:none}
@media (max-width:600px){.doccard{margin-right:0;box-shadow:none}}
