/* The page is set like a LaTeX document: Latin Modern when the reader has it (most TeX users do), a sheet of paper
   on the grey of the editor's PDF viewer, booktabs-style tables. Colours are the editor's own. */
:root {
  --desk: #e9ebef; --paper: #ffffff; --ink: #1d2433; --muted: #5b6676; --line: #d5dae1; --rule: #1d2433;
  --accent: #2f6f4f; --accent-ink: #ffffff; --code-bg: #f3f5f7; --mark: rgba(255, 196, 0, .35);
  --serif: "Latin Modern Roman", "LM Roman 10", "CMU Serif", "TeX Gyre Pagella", "Palatino Linotype", Palatino,
           "Book Antiqua", Georgia, serif;
  --mono: "Latin Modern Mono", "LM Mono 10", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --desk: #0f1216; --paper: #1b1f26; --ink: #e6e8ec; --muted: #a3adbd; --line: #2f3640; --rule: #c9ced6;
    --accent: #5fb88a; --accent-ink: #0d1512; --code-bg: #14181e; --mark: rgba(255, 196, 0, .22);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { background: var(--desk); }
body { margin: 0; color: var(--ink); background: var(--desk); font: 1.0625rem/1.65 var(--serif);
       -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .16em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: .5rem; background: var(--paper); padding: .4rem .8rem; }
.skip:focus { left: .5rem; }

.desk { display: grid; grid-template-columns: minmax(11rem, 14rem) minmax(0, 47rem); gap: 2.5rem;
        justify-content: center; padding: 2.5rem 1.5rem 4rem; }

/* contents, like \tableofcontents in the margin */
.toc { position: sticky; top: 2rem; align-self: start; font-size: .95rem; line-height: 1.45; }
.toc-name { margin: 0 0 .8rem; font-weight: bold; }
.toc-name span { font-weight: normal; color: var(--muted); }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc a { display: block; padding: .18rem 0; color: var(--muted); text-decoration: none; }
.toc a:hover, .toc a:focus-visible { color: var(--ink); text-decoration: underline; }

/* the sheet */
.paper { min-width: 0; background: var(--paper); padding: 3.5rem 4rem 2.5rem; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
h1, h2, h3 { line-height: 1.2; font-weight: bold; }
h1 { font-size: 2.6rem; margin: 0 0 .9rem; letter-spacing: -.01em; }
h2 { font-size: 1.5rem; margin: 2.6rem 0 .7rem; }
h3 { font-size: 1.2rem; margin: 1.8rem 0 .5rem; }
h2:target, section:target > h2 { background: var(--mark); }   /* the editor's SyncTeX highlight */
p, ul, ol { margin: 0 0 1em; }
ul, ol { padding-left: 1.4em; }
li { margin: .3em 0; }
h2 + h3 { margin-top: 1rem; }

.masthead p { font-size: 1.15rem; color: var(--ink); }
.install { display: flex; align-items: stretch; gap: .5rem; margin: 1.6rem 0 .4rem; flex-wrap: wrap; }
/* The command stays whole on one line; the button moves below it when both don't fit. */
.install-note { margin: 0 0 .4rem; font-size: .95rem; color: var(--muted); }
.install code { flex: 1 0 auto; max-width: 100%; font-size: 1.05rem; padding: .7rem 1rem; background: var(--code-bg);
                border: 1px solid var(--line); border-radius: 4px; white-space: nowrap; overflow-x: auto; }

code { font-family: var(--mono); font-size: .9em; }
:not(pre) > code { background: var(--code-bg); padding: .06em .3em; border-radius: 3px; }
pre { position: relative; background: var(--code-bg); border: 1px solid var(--line); border-radius: 4px;
      padding: .85em 4.5em .85em 1em; overflow-x: auto; line-height: 1.5; margin: 0 0 1.2em; }
pre code { font-size: .92rem; }

button { font: inherit; font-size: .9rem; cursor: pointer; border-radius: 4px; padding: .35rem .8rem;
         border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
button:hover { border-color: var(--muted); }
button.primary, .install .copy { background: var(--accent); border-color: var(--accent); color: var(--accent-ink);
                                  font-weight: bold; }
pre .copy { position: absolute; top: .5rem; right: .5rem; padding: .15rem .55rem; font-size: .8rem; }

figure.shot { margin: 2.2rem -2rem; }
figure.shot img { display: block; width: 100%; height: auto; border: 1px solid var(--line); }
figcaption { margin-top: .6rem; text-align: center; font-size: .95rem; color: var(--muted); }

/* booktabs: rules above and below, a thin one under the header, no vertical lines */
.table { overflow-x: auto; margin: 1.2em 0 1.4em; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; line-height: 1.45;
        border-top: 1.5px solid var(--rule); border-bottom: 1.5px solid var(--rule); }
th { text-align: left; border-bottom: 1px solid var(--rule); padding: .45em 1em .45em 0; }
td { padding: .35em 1em .35em 0; vertical-align: top; }
td code, th code { white-space: nowrap; }
th.right, td.right { text-align: right; }
th.center, td.center { text-align: center; }

/* suggestion box */
.suggest { display: grid; gap: .35rem; max-width: 36rem; }
.suggest fieldset { border: 0; margin: 0 0 .6rem; padding: 0; display: grid; gap: .25rem; }
.suggest legend { font-weight: bold; margin-bottom: .3rem; padding: 0; }
.suggest label { font-weight: bold; margin-top: .5rem; }
.suggest label.choice { font-weight: normal; margin: 0; display: flex; gap: .5rem; align-items: baseline; cursor: pointer; }
.suggest input:not([type]), .suggest textarea, .suggest input[type="text"] {
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--paper); width: 100%;
  border: 1px solid var(--muted); border-radius: 4px; padding: .5rem .65rem; }
.suggest textarea { resize: vertical; }
.suggest button { justify-self: start; margin-top: .8rem; font-size: 1rem; padding: .5rem 1rem; }
.bug-only { display: none; }
.suggest:has(input[value="bug_report.yml"]:checked) .bug-only { display: grid; gap: .35rem; }

footer { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
footer p { margin: 0 0 .3em; }

@media (max-width: 900px) {
  .desk { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0; }
  .toc { position: static; padding: 1rem 16px .6rem; }
  .toc ul { display: flex; flex-wrap: wrap; gap: .1rem 1rem; }
  .paper { padding: 2rem 16px 2rem; box-shadow: none; }
  h1 { font-size: 2.1rem; }
  figure.shot { margin: 1.6rem -16px; }
  figure.shot img { border-left: 0; border-right: 0; }
}
@media (max-width: 400px) {
  .install code { font-size: .9rem; padding: .7rem .7rem; }
}
@media print {
  .toc, .suggest, .skip, .copy { display: none; }
  .desk { display: block; padding: 0; }
  .paper { box-shadow: none; padding: 0; }
}
