/* The manual's stylesheet. The page is set like the Roland owner's manuals
   of the early 1980s that the synth recreates: black ink on white paper,
   Helvetica, headings in a column of their own beside the text, and
   hairline rules.

   One rule decides the rest: dark is the instrument, and paper is the
   manual. Everything the synth made, its captures, plots, and clips, stays
   dark, as the window draws it. Everything written is on paper. The
   window's amber means the same here as there: sound, playing now. */

@font-face {
  font-family: "JetBrains Mono";
  src: url("JetBrainsMono-Medium.ttf") format("truetype");
  font-weight: 500;
}

:root {
  /* Paper and ink. */
  --paper: #f8f8f5;
  --paper-deep: #ececE7;
  --ink: #161616;
  --ink-2: #474744;
  --ink-3: #7a7a75;
  --rule: #d3d3cd;
  /* The window's own colors, from src/theme.zig, for what it made. */
  --panel: #121211;
  --well: #252522;
  --well-hover: #32322e;
  --panel-text: #c8c6bc;
  --panel-bright: #f1efe6;
  --panel-dim: #86857c;
  --amber: #ff9f40;
  --alarm: #d93a2e;
  /* The cover's band of color. */
  --band-1: #e2382b;
  --band-2: #f26b1d;
  --band-3: #ff9f40;
  --band-4: #ffc845;

  --sans: "Helvetica Neue", Helvetica, "Nimbus Sans", "Nimbus Sans L", "Liberation Sans", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* The grid: a column for the headings, the text beside it at a
     readable measure, and figures as wide as the page allows. */
  --side: 12.5rem;
  --gutter: 2.5rem;
  --measure: 40rem;
  --page: 92rem;
  --margin: 3rem;
  --mast: 3rem;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.58 var(--sans);
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
}

[id] {
  scroll-margin-top: calc(var(--mast) + 1.25rem);
}

main {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--margin) 5rem;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* The masthead: where you are, and the way to the pages either side. */

.masthead {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: var(--mast);
  padding: 0 max(var(--margin), calc((100% - var(--page)) / 2 +
    var(--margin)));
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  font-size: 14px;
  line-height: 1;
}

.masthead a {
  color: var(--ink-2);
  text-decoration: none;
}

.masthead a:hover {
  color: var(--ink);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: none;
}

.brand .brand-mark {
  height: 13px;
  width: auto;
  color: var(--ink);
}

/* In an instrument's book, between the manual's wordmark and the book's. */
.brand-sep {
  flex: none;
  margin: 0 -0.9rem;
  color: var(--ink-3);
}

.where {
  display: flex;
  align-items: baseline;
  min-width: 0;
  margin: 0;
  white-space: nowrap;
}

/* A long name gives way: the section's first, then the chapter's. */
.masthead .where a {
  flex: 0 1 auto;
  min-width: 3em;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
  font-weight: 700;
}

.where .section {
  flex: 0 1000 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink-3);
}

.where .section:not(:empty)::before {
  content: "/";
  margin: 0 0.6rem;
  color: var(--rule);
}

.pages {
  display: flex;
  gap: 1.25rem;
  margin-left: auto;
  flex: none;
  white-space: nowrap;
}

/* A long chapter name is cut short here; the link's title has it whole. */
.pages a span {
  display: inline-block;
  max-width: 12em;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

.pages a[rel="prev"] span {
  margin-left: 0.35em;
}

.pages a[rel="next"] span {
  margin-right: 0.35em;
}

/* The front page's cover. */

.cover {
  padding: 4rem 0 0;
}

.cover .eyebrow {
  margin: 0 0 1.75rem;
  font: 500 14px/1.3 var(--sans);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.cover h1 {
  margin: 0;
}

.cover .wordmark {
  display: block;
  width: min(100%, 50rem);
  height: auto;
  color: var(--ink);
}

.cover .subtitle {
  display: block;
  margin-top: 1.6rem;
  font: 700 clamp(1.9rem, 4.2vw, 3.1rem)/1 var(--sans);
  text-transform: uppercase;
}

/* A band of color under the title, in stripes like the wordmark's. */
.band {
  display: grid;
  gap: 3px;
  margin: 2.25rem 0 3rem;
}

.band i {
  display: block;
  height: 4px;
}

.band i:nth-child(1) {
  background: var(--band-1);
}
.band i:nth-child(2) {
  background: var(--band-2);
}
.band i:nth-child(3) {
  background: var(--band-3);
}
.band i:nth-child(4) {
  background: var(--band-4);
}

.front .intro {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: start;
  column-gap: 3.5rem;
  margin-left: 0;
}

.front .intro > figure,
.front .intro > figure.wide {
  grid-column: 1 / -1;
  margin: 0 0 3rem;
}

.front .intro > p {
  max-width: none;
  margin: 0;
  font-size: 1.3rem;
  line-height: 1.45;
}

/* The features, as the originals' covers list them. */
.front .intro > ul {
  max-width: none;
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
  font-size: 15px;
  line-height: 1.45;
}

.front .intro > ul li {
  margin: 0 0 0.55rem;
}

/* A chapter's opening page. */

.opener {
  padding-top: 3rem;
}

/* The part, as a small label: here, and over each part of the contents. */
.opener .part,
.contents .part-name {
  margin: 0 0 1.25rem;
  color: var(--ink-3);
  font: 700 12.5px/1 var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* The title's size is the block's, so the number can be measured in it. */
.opener .title {
  display: grid;
  grid-template-columns: var(--side) minmax(0, 1fr);
  column-gap: var(--gutter);
  align-items: start;
  font-size: clamp(2.5rem, 5.2vw, 4.4rem);
}

.opener h1 {
  grid-column: 2;
  margin: 0;
  max-width: 18ch;
  font: 700 1em/1 var(--sans);
  letter-spacing: -0.03em;
  text-wrap: balance;
}

/* The chapter's number, as tall as the title's capitals and level with
   its first line. */
.opener .numeral {
  grid-column: 1;
  justify-self: start;
  height: 0.72em;
  width: auto;
  margin-top: 0.07em;
  color: var(--ink);
}

/* The chapter's sections. */
.toc {
  margin: 2.5rem 0 0 calc(var(--side) + var(--gutter));
}

/* Two columns at the text's measure, with no rules: the list is short, and
   the sections' own rules start just below it. */
.toc ol {
  max-width: var(--measure);
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 2.5rem;
}

.toc li {
  margin: 0;
  break-inside: avoid;
}

.toc a {
  display: block;
  padding: 0.2rem 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
  text-decoration: none;
}

.toc a:hover {
  text-decoration: underline;
}

/* The words before the first section sit in the text's column. */

.intro {
  margin-left: calc(var(--side) + var(--gutter));
  padding-top: 0.5rem;
}

.opener + .intro {
  padding-top: 3rem;
}

.intro > *,
.sect > .body > * {
  max-width: var(--measure);
}

.intro > :is(figure, .table, .contents),
.sect > .body > :is(figure, .table, .banks, .curves, pre.help, h3, .contents) {
  max-width: none;
}

/* A section: its heading in the margin, as the originals set "Waveform"
   and "Pulse Width", under a hairline across the page. */

.sect {
  display: grid;
  grid-template-columns: var(--side) minmax(0, 1fr);
  column-gap: var(--gutter);
  margin-top: 3.75rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--ink);
}

.sect > h2 {
  align-self: start;
  margin: 0;
  font: 700 1.18rem/1.22 var(--sans);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.sect > h2 a {
  color: inherit;
  text-decoration: none;
}

.sect > h2 a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.sect > .body > :first-child {
  margin-top: 0;
}

/* Figures with a wide strip, such as the panel, take the heading's column
   too. */
.sect > .body > figure.wide,
.intro > figure.wide {
  margin-left: calc(-1 * (var(--side) + var(--gutter)));
}

/* Text. */

p,
ul,
ol {
  margin: 0 0 1.05em;
}

p,
li,
figcaption {
  text-wrap: pretty;
}

ul {
  padding-left: 1.25rem;
}

ol {
  padding-left: 1.5rem;
}

li {
  margin: 0.2em 0;
}

strong {
  font-weight: 700;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--ink-3);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-color: var(--ink);
}

code,
pre {
  font-family: var(--mono);
}

:not(pre) > code {
  font-size: 0.86em;
  overflow-wrap: break-word;
}

.body h3 {
  margin: 2.75rem 0 0.75rem;
  font: 700 1.05rem/1.3 var(--sans);
}

/* Listings: files and commands, on a grey sheet. */
pre.listing {
  margin: 0 0 1.3rem;
  padding: 0.95rem 1.1rem;
  overflow-x: auto;
  background: var(--paper-deep);
  border-radius: 3px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
}

pre.help {
  width: fit-content;
  max-width: 100%;
}

/* A shell listing, with its copy button in the corner. */
.copyable {
  position: relative;
}

.copyable pre.listing {
  padding-right: 4.5rem;
}

.copyable .copy {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
}

/* A word, not a box: it sits on a grey sheet already. */
.copy {
  padding: 2px 0;
  background: none;
  border: 0;
  color: var(--ink-3);
  font: 500 11.5px/1.2 var(--sans);
  cursor: pointer;
}

.copy:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* A passage quoted from a source. */
blockquote {
  margin: 1.4rem 0 1.6rem;
  padding: 0.1rem 0 0.1rem 1.1rem;
  border-left: 2px solid var(--rule);
  color: var(--ink-2);
}

blockquote p:last-child {
  margin-bottom: 0;
}

/* The manual's own aside, as the originals print a NOTE. */
blockquote.note {
  border-left-color: var(--ink);
  color: var(--ink);
}

hr {
  border: 0;
  border-top: 1px solid var(--ink);
  margin: 2.5rem 0;
}

/* Tables: a rule under the header, and hairlines between the rows. */

.table {
  margin: 1.4rem 0 1.8rem;
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  font-size: 14.5px;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

th {
  padding: 0 16px 6px 0;
  border-bottom: 1px solid var(--ink);
  color: var(--ink-2);
  font: 700 12.5px/1.25 var(--sans);
  text-align: left;
  white-space: nowrap;
}

td {
  padding: 7px 16px 7px 0;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

td code {
  white-space: nowrap;
}

table.controls {
  font: 500 12.5px/1.45 var(--mono);
}

table.controls code {
  font-size: 1em;
}

.dim {
  color: var(--ink-3);
}

/* A key, framed as the window draws its caps, so a key reads as a thing to
   press: Ctrl and D, with a plus between. */
kbd {
  display: inline-block;
  min-width: 1.5em;
  padding: 0 0.35em;
  border: 1px solid var(--rule);
  border-bottom-width: 2px;
  border-radius: 3px;
  background: #fff;
  color: var(--ink);
  font: 500 0.76em/1.5 var(--mono);
  text-align: center;
  white-space: nowrap;
  vertical-align: 0.08em;
}

span.keys {
  white-space: nowrap;
}

/* A table of keys, a group at a time, each under its group's name. */
.body h3.keys-group,
.intro h3.keys-group {
  margin: 2rem 0 0.4rem;
  font-size: 0.95rem;
}

.body h3.keys-group + .table {
  margin-top: 0.4rem;
}

/* The columns line up from one group's table to the next. */
table.keys {
  width: 100%;
}

table.keys th:first-child {
  width: 13rem;
}

table.keys th:nth-child(2) {
  width: 10rem;
}

table.keys th:nth-child(3):not(:last-child) {
  width: 11rem;
}

/* The factory bank: group A beside group B. */
.banks {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1.5rem 2.5rem;
  margin: 1.4rem 0 1.8rem;
}

table.bank td:first-child,
table.bank td:last-child {
  font-family: var(--mono);
  font-size: 12.5px;
  white-space: nowrap;
}

/* Figures: what the synth made, dark, on the paper, with the words about
   it below. */

/* As wide as its pictures, and no narrower than the text, so the
   pictures, the player, and the recipe share a right edge. */
figure.example {
  width: fit-content;
  min-width: min(100%, var(--measure));
  max-width: 100%;
  margin: 2.25rem 0 2.75rem;
}

/* Plots line up under a scope and a spectrum side by side, so the gap
   between pictures is in pixels, as the build tool counts it. */
.shots {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px;
  overflow-x: auto;
}

/* A picture shows a unit of the window's design as a CSS pixel, so a
   section is as big as the window draws it, and shrinks only to fit. */
.shot {
  display: block;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  height: auto;
  background: var(--panel);
  border-radius: 3px;
}

/* A strip of small marks, such as the panel, shrinks too, but to no less
   than 80% of its size, where the marks still read; on a narrower page it
   scrolls. The build tool gives its size as --width. */
.shot.strip {
  min-width: calc(var(--width) * 0.8);
}

.plots svg.plot,
.shots + .plots svg.plot {
  margin-top: 12px;
}

.plots svg.plot:first-child {
  margin-top: 0;
}

.shots + .plots {
  margin-top: 12px;
}

svg.plot {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 3px;
}

.curves {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 1.4rem 0 1.8rem;
}

.curves svg.plot {
  margin: 0;
}

/* A section of the panel with its controls numbered, as the originals
   draw theirs: a circle under each control, and a line up to it. */
figure.panel-map {
  margin: 1.75rem 0 1.25rem;
}

.panel-map svg {
  display: block;
  max-width: 100%;
  height: auto;
}

.panel-map path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1;
}

.panel-map circle {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 1.5;
}

.panel-map text {
  fill: var(--ink);
  font: 700 10px var(--sans);
  text-anchor: middle;
  dominant-baseline: central;
}

.body h3 + figure.panel-map {
  margin-top: 0.5rem;
}

/* A control's number in the table, as the panel map circles it. */
table.controls .no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.3rem;
  height: 1.3rem;
  margin-right: 0.55rem;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  font: 700 9.5px/1 var(--sans);
  vertical-align: 1px;
}

/* The player: a strip of the window with a button, the clip's outline,
   and its readouts. The outline fills with amber as the clip plays. */

.player {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: min(100%, 30rem);
  margin-top: 12px;
  padding: 7px 14px 7px 7px;
  background: var(--panel);
  border-radius: 3px;
  color: var(--panel-text);
  font: 500 12px/1 var(--mono);
}

figure > .player:first-child {
  margin-top: 0;
}

.player audio {
  flex: 1;
  min-width: 0;
  height: 34px;
}

.player .play,
.player .wave {
  display: none;
}

.js .player audio {
  display: none;
}

.js .player .play {
  display: flex;
}

.js .player .wave {
  display: block;
}

.play {
  flex: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: var(--well);
  color: var(--panel-bright);
  cursor: pointer;
}

.play:hover {
  background: var(--well-hover);
}

.play:focus-visible {
  outline-color: var(--amber);
}

.play svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.play .stop,
.playing .play .go {
  display: none;
}

.playing .play .stop {
  display: inline;
}

.playing .play {
  color: var(--amber);
}

.wave {
  position: relative;
  flex: 1;
  min-width: 8rem;
  height: 34px;
  cursor: pointer;
}

.wave svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: #4b4a45;
}

.wave svg.played {
  fill: var(--amber);
  clip-path: inset(0 100% 0 0);
}

.wave:hover svg:not(.played) {
  fill: #66655e;
}

.wave .head {
  position: absolute;
  top: -3px;
  bottom: -3px;
  left: 0;
  width: 1px;
  background: var(--panel-bright);
  opacity: 0;
}

.started .wave .head,
.playing .wave .head {
  opacity: 1;
}

.player .time,
.player .peak {
  flex: none;
  margin: 0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.player .now {
  color: var(--panel-bright);
}

.playing .now {
  color: var(--amber);
}

.player .peak {
  color: var(--panel-dim);
}

figcaption {
  max-width: var(--measure);
  margin: 0.85rem 0 0;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.48;
}

figcaption .fig {
  margin-right: 0.3rem;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

figcaption .fig:hover {
  text-decoration: underline;
}

/* The recipe: the commands that make the figure, each with what it does
   and a copy button, and the files they use. */
/* Its commands wrap rather than widen the figure. */
.recipe {
  contain: inline-size;
  margin-top: 0.7rem;
  padding: 0.45rem 0.7rem;
  background: var(--paper-deep);
  border-radius: 3px;
}

.recipe .cmd {
  display: grid;
  grid-template-columns: 3.75rem minmax(0, 1fr) auto;
  align-items: baseline;
  column-gap: 0.5rem;
  max-width: none;
  margin: 0;
  padding: 0.25rem 0;
}

.recipe .what {
  color: var(--ink-3);
  font-size: 12.5px;
}

/* A command that wraps hangs its following lines under its first. */
.recipe .cmd code {
  padding-left: 2ch;
  text-indent: -2ch;
  font-size: 12.5px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.recipe .files {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  margin: 0.3rem 0 0.25rem 4.25rem;
}

details.file {
  font: 500 12px/1.4 var(--mono);
}

details.file[open] {
  flex-basis: 100%;
  order: 1;
}

details.file summary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--ink-2);
  cursor: pointer;
  list-style: none;
}

details.file summary::-webkit-details-marker {
  display: none;
}

details.file summary::before {
  content: "";
  border-style: solid;
  border-width: 4px 0 4px 6px;
  border-color: transparent transparent transparent currentColor;
}

details.file[open] summary::before {
  transform: rotate(90deg);
}

details.file summary:hover {
  color: var(--ink);
}

details.file pre.listing {
  margin: 0.4rem 0 0.2rem;
  background: var(--paper);
  font-size: 12.5px;
}

p.error {
  padding: 0.5rem 0.75rem;
  border: 2px solid var(--alarm);
  color: var(--alarm);
  font: 500 13px/1.4 var(--mono);
}

/* The contents: each part, and in it each chapter's number and name, with
   its sections. */

.contents {
  columns: 2 24rem;
  column-gap: 3rem;
  margin: 0.25rem 0 1rem;
}

.contents .part {
  break-inside: avoid;
  margin-bottom: 2.5rem;
}

/* The section's rule is over the contents already, so the parts and their
   chapters are set apart by space alone. */
.contents .part-name {
  margin: 0.35rem 0 0.4rem;
}

.contents ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.contents li {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  margin: 0;
  padding: 0.6rem 0;
}

.contents a.chapter {
  display: contents;
  color: var(--ink);
  font: 700 1.1rem/1.25 var(--sans);
  text-decoration: none;
}

.contents a.chapter .name {
  grid-column: 2;
}

.contents a.chapter:hover .name {
  text-decoration: underline;
}

.contents a.chapter .no {
  grid-column: 1;
  font-variant-numeric: tabular-nums;
}

.contents .sections {
  grid-column: 2;
  margin: 0.3rem 0 0;
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.55;
}

.contents .sections a {
  color: var(--ink-2);
  text-decoration: none;
}

.contents .sections a:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* The foot of a page: the chapters either side, under one rule, as a
   section starts. */

.turn {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 1rem max(var(--margin), calc((100% - var(--page)) / 2 +
    var(--margin))) 0;
  padding: 1.1rem 0 4rem;
  border-top: 1px solid var(--ink);
}

.turn a {
  display: block;
  color: var(--ink);
  text-decoration: none;
}

.turn a[rel="next"] {
  grid-column: 2;
  text-align: right;
}

.turn .dir {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--ink-3);
  font-size: 14px;
}

.turn .name {
  font: 700 1.3rem/1.2 var(--sans);
}

.turn a:hover .name {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

/* Narrower pages: the headings go above their sections. */

@media (max-width: 72rem) {
  :root {
    --margin: 2rem;
  }

  .intro,
  .toc {
    margin-left: 0;
  }

  .sect {
    display: block;
    margin-top: 3rem;
  }

  .sect > h2 {
    margin-bottom: 1.1rem;
    font-size: 1.35rem;
  }

  .sect > .body > figure.wide,
  .intro > figure.wide {
    margin-left: 0;
  }

  .opener .title {
    display: flex;
    gap: 0.3em;
  }

  .opener .numeral {
    flex: none;
  }

  .front .intro {
    grid-template-columns: 1fr;
  }

  .front .intro > ul {
    margin-top: 2rem;
  }

  .pages a span,
  .where .section {
    display: none;
  }
}

@media (max-width: 44rem) {
  :root {
    --margin: 1.1rem;
  }

  html {
    font-size: 16px;
  }

  /* A phone needs the height more than the bar. */
  .masthead {
    position: static;
    gap: 1rem;
  }

  [id] {
    scroll-margin-top: 1rem;
  }

  /* Long lines scroll, so the copy button gets a row of its own. */
  .copyable pre.listing {
    padding-top: 2.5rem;
    padding-right: 1.1rem;
  }

  .toc ol {
    columns: 1;
  }

  .turn {
    gap: 1rem;
  }

  .recipe .cmd {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .recipe .what {
    grid-column: 1;
  }

  .recipe .cmd code {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .recipe .copy {
    grid-column: 2;
    grid-row: 1;
  }

  .recipe .files {
    margin-left: 0;
  }

  .player .peak {
    display: none;
  }

  .front .intro > p {
    font-size: 1.15rem;
  }

  /* Tables scroll sideways here rather than stack their cells. */
  table.controls td {
    white-space: nowrap;
  }
}

/* On paper, the manual is a manual again. */

@media print {
  html {
    background: #fff;
    font-size: 10.5pt;
  }

  .masthead,
  .turn,
  .player,
  .copy,
  .recipe .files {
    display: none;
  }

  .opener {
    break-before: page;
  }

  .sect > h2 {
    break-after: avoid;
  }

  figure.example,
  blockquote,
  tr {
    break-inside: avoid;
  }

  a {
    text-decoration: none;
  }

  /* Paper can't scroll, so long lines wrap. */
  pre.listing {
    overflow: visible;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .shot.strip {
    min-width: 0;
  }
}
