/* The Tersenet website and manual. System fonts, no external resources. */
:root {
  color-scheme: light dark;
  --bg: #fbfaf7; --fg: #1f1f1d; --mute: #6b6a66; --link: #1d5aa6;
  --rule: #dcdad3; --box: #f1efe9; --head: #e9e6de;
  /* Code colours: each at least 4.5:1 against --box. */
  --hc: #6b6a66; --hs: #3a6b1f; --hn: #9a4800; --hk: #7b3294; --ht: #1c6b70; --hm: #a3303d;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #18191b; --fg: #e3e1db; --mute: #9b9993; --link: #8dbbf2;
    --rule: #3b3c40; --box: #222326; --head: #2b2c30;
    --hc: #9b9993; --hs: #a8cc8c; --hn: #e6b07a; --hk: #cfa2ee; --ht: #7cc7c4; --hm: #f0919b;
  }
}
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 1.0625rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
}
header, main, footer { max-width: 40em; margin: 0 auto; padding: 0 1rem; }
header nav { display: flex; flex-wrap: wrap; gap: .25em 1.25em; padding: 1em 0; border-bottom: 1px solid var(--rule); font-size: .9375em; }
header a { color: var(--mute); text-decoration: none; }
header a.home { color: var(--fg); font-weight: 600; }
header a:hover, header a[aria-current] { color: var(--link); }
/* The site's header and footer, on every page (one template). */
header.site, footer.site { max-width: none; padding: 0; background: var(--head); }
header.site nav, footer.site p { max-width: 40em; margin: 0 auto; padding: .8em 1rem; }
header.site nav { border: 0; font-size: 1em; }
header.site a { font-size: .9375em; }
header.site a.home { margin-right: auto; }
footer.site { margin-top: 2em; }
footer.site p { padding: 1.2em 1rem 2em; color: var(--mute); font-size: .875em; }
footer.site a { color: inherit; }
main { padding-top: .5em; padding-bottom: 1em; }
h1, h2 { line-height: 1.25; margin: 1.6em 0 .6em; }
h1 { font-size: 1.6em; }
h2 { font-size: 1.2em; }
article > h1:first-child { margin-top: 1em; }
p, ul, pre, figure, .table { margin: 0 0 1em; }
ul { padding-left: 1.4em; }
li { margin: .25em 0; }
a { color: var(--link); text-underline-offset: .15em; }
code, pre { font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", "DejaVu Sans Mono", monospace; font-size: .875em; }
code { background: var(--box); padding: .05em .3em; border-radius: 3px; }
code.addr { overflow-wrap: anywhere; }
pre { background: var(--box); padding: .75em 1em; border-radius: 4px; overflow-x: auto; line-height: 1.45; }
pre code { background: none; padding: 0; }
/* Code colouring (by the fence's language word): comments are also
   italic, and command lines have a rule at their start. */
pre .c { color: var(--hc); font-style: italic; }
pre .s { color: var(--hs); }
pre .n { color: var(--hn); }
pre .k { color: var(--hk); }
pre .t { color: var(--ht); }
pre .m { color: var(--hm); }
pre.sh { border-left: 3px solid var(--mute); padding-left: calc(1em - 3px); }
figure { text-align: center; }
figure svg { max-width: 100%; height: auto; vertical-align: top; }
.table { overflow-x: auto; }
table { border-collapse: collapse; font-size: .9375em; line-height: 1.45; }
th, td { padding: .35em .75em .35em 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
th { border-bottom: 2px solid var(--mute); font-weight: 600; }
th:last-child, td:last-child { padding-right: 0; }
.ac { text-align: center; }
.ae { text-align: right; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2em 0; }
main.landing { padding-top: 1.5em; }
.pn { display: flex; justify-content: space-between; gap: 1em; margin-top: 2em; padding: 1em 0 2em; border-top: 1px solid var(--rule); font-size: .9375em; }
a[rel=next] { margin-left: auto; text-align: right; }
/* The front page. */
.front h1 { font-size: 2.2em; margin: .8em 0 .3em; }
.front .lede { font-size: 1.125em; }
.small, .downloads span { color: var(--mute); font-size: .9375em; }
.cmd { display: flex; gap: .5em; align-items: stretch; margin: 0 0 1em; }
.cmd pre { flex: 1; margin: 0; }
.cmd button { font: inherit; font-size: .875em; padding: 0 1em; border: 1px solid var(--rule); border-radius: 4px; background: var(--head); color: var(--fg); cursor: pointer; }
.shot { margin: 1.5em 0; }
.shot img { max-width: 100%; height: auto; border: 1px solid var(--rule); border-radius: 4px; vertical-align: top; }
.downloads { display: grid; grid-template-columns: repeat(auto-fit, minmax(16em, 1fr)); gap: 0 1.5em; }
.downloads h3 { margin: .8em 0 .3em; font-size: 1em; }
.downloads ul { list-style: none; padding: 0; margin: 0 0 .4em; }
.downloads a { overflow-wrap: anywhere; }
.downloads p { font-size: .875em; margin: 0 0 1em; }
.downloads code { overflow-wrap: anywhere; }
