1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
/* CSS3_ style sheet for the output of Docutils HTML writers.              */
/* Generic responsive design for all screen sizes.                         */
/*                                                                         */
/* :Author: Günter Milde                                                   */
/*                                                                         */
/* :Id: $Id: responsive.css 8642 2021-03-26 13:51:14Z milde $                                                               */
/* :Copyright: © 2021 Günter Milde.                                        */
/* :License: Released under the terms of the `2-Clause BSD license`_,      */
/*    in short:                                                            */
/*                                                                         */
/*    Copying and distribution of this file, with or without modification, */
/*    are permitted in any medium without royalty provided the copyright   */
/*    notice and this notice are preserved.                                */
/*                                                                         */
/*    This file is offered as-is, without any warranty.                    */
/*                                                                         */
/* .. _2-Clause BSD license: http://www.spdx.org/licenses/BSD-2-Clause     */
/* .. _CSS3: http://www.w3.org/TR/CSS3                                     */


/* General Settings */
/* ================ */


* { box-sizing: border-box; }

body {
  background-color: #fafaf6;
  margin: auto;
  --field-indent: 6.6em; /* indent of fields in field lists */
  --sidebar-margin-right: 0; /* adapted in media queries below */
}
main {
  counter-reset: figure table;
}
body > * {
  background-color: white;
  line-height: 1.6;
  padding: 0.5rem calc(29% - 7.2rem); /* go from 5% to 15% (8.15em/54em) */
  margin: auto;
  max-width: 100rem;
}

/* Vertical Space (Parskip) */
p, ol, ul, dl, li,
div.line-block,
div.topic,
table {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}
h1, h2, h3, h4, h5, h6,
dl > dd {
  margin-bottom: 0.5em;
}
blockquote > table,
div.topic > table {
  margin-top: 0;
  margin-bottom: 0;
}

/* Indented Blocks */
blockquote, figure, div.topic {
  margin: 1em 2%;
  padding-left: 1em;
}
div.line-block div.line-block,
pre, dd, dl.option-list {
  margin-left: calc(2% + 1em);
}

/* Object styling */
/* ============== */

footer, header,
.sidebar, .marginal {
  font-size: small;
}

/* Frontmatter */
div.topic.dedication {
  padding: 0;
  margin: 1.4em 0;
  font-style: italic;
  font-size: large;
}
.dedication p.topic-title {
  display: none;
}

blockquote p.attribution,
div.topic p.attribution {
  text-align: right;
}

/* Table of Contents */
nav.contents,
div.topic.contents {
  padding: 0;
}
ul.auto-toc > li > p {
  padding-left: 1em;
  text-indent: -1em;
}
nav.contents ul,
div.topic.contents ul {
  padding-left: 1em;
}
main > div.topic.contents  ul:not(.auto-toc) {
  list-style-type: square;
}
main > div.topic.contents  ul ul:not(.auto-toc) {
  list-style-type: disc;
}
main > div.topic.contents  ul ul ul:not(.auto-toc) {
  list-style-type: '\2023\ ';
}
main > div.topic.contents  ul ul ul ul:not(.auto-toc) {
  list-style-type: '\2B29\ ';
}
main > div.topic.contents  ul ul ul ul ul:not(.auto-toc) {
  list-style-type: '\00B7\ ';
}
div.topic.contents ul > li::marker {
  color: grey;
}


/* Transitions */
hr {
  margin: 1em 10%;
}

/* Lists */

ul, ol {
  padding-left: 1.1em; /* indent by bullet width (Firefox, DejaVu fonts) */
}
dl.field-list > dd,
dl.docinfo > dd {
  margin-left: var(--field-indent); /* adapted in media queries or HTML */
}
dl.option-list > dd {
  margin-left: 20%;
}
/* run-in: start field-body on same line after long field names */
dl.field-list.run-in > dd p {
  display: block;
}
/* "description style" like in most dictionaries, encyclopedias etc. */
dl.description > dt {
  clear: left;
  float: left;
  margin: 0;
  padding: 0;
  padding-right: 0.5em;
  font-weight: bold;
}
dl.description > dd:after {
  display: block;
  content: "";
  clear: both;
}
/* start lists nested in description/field lists on new line */
dd > dl:first-child,
dd > ul:first-child,
dd > ol:first-child {
    clear: left;
}

/* Footnotes and Citations */
/* TODO: use <aside> */
dl.footnote {
  font-size: small;
  padding-left: 0.5em;
  border-left: solid;
  border-left-width: thin;
}
dt.label > span.fn-backref {
}

/* Images, Figures, and Tables */
img {
  display: block;
}
p > img, p > a > img,
figure > img, figure > a > img {
  display: inline;
}

figcaption,
table > caption {
  /*   font-size: small; */
  font-style: italic;
}
figcaption > .legend {
  font-size: small;
  font-style: initial;
}
figure.numbered > figcaption > p:before {
  counter-increment: figure;
  content: "Figure " counter(figure) ": ";
  font-weight: bold;
  font-style: initial;
}

table tr {
  text-align: left;
  vertical-align: baseline;
}
table.booktabs { /* "booktabs" style (no vertical lines) */
  border-top: 2px solid;
  border-bottom: 2px solid;
}
table.booktabs * {
  border: 0;
}
table.booktabs th {
  border-bottom: thin solid;
}
table.numbered > caption:before {
  counter-increment: table;
  content: "Table " counter(table) ": ";
  font-weight: bold;
  font-style: initial;
}

/* Admonitions and System Messages */
.admonition,
div.system-message {
  border: thin solid silver;
  margin: 1em 2%;
  padding: 0.5em 1em;
}
.caution p.admonition-title,
.attention p.admonition-title,
.danger p.admonition-title,
.warning p.admonition-title,
div.error {
  color: maroon;
}
div.system-message > p > span.literal {
  overflow-wrap: break-word;
}

/* Literal and Code */
/* basic highlighting: for a complete scheme, see */
/* http://docutils.sourceforge.net/sandbox/stylesheets/ */
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
pre.code .literal.string, code .literal.string { color: #0C5404 }
pre.code .name.builtin, code .name.builtin { color: #352B84 }
pre.code .deleted, code .deleted { background-color: #DEB0A1}
pre.code .inserted, code .inserted { background-color: #A3D289}

/* Hyperlink References */
a {
  text-decoration: none;
  /* text-decoration-skip-ink: auto; !!nonstandard, default in modern browsers */
}
/* Wrap links at any place, if this is the only way to prevent overflow */
a:link{
  overflow-wrap: break-word;
}
.contents a, a.toc-backref, a.citation-reference {
  overflow-wrap: inherit;
}
/* Undecorated Links */
/* a.footnote-reference, a.fn-backref, .fn-backref a, */
/* a.citation-reference, */
.citation a.fn-backref,
.contents a, a.toc-backref {
  color: inherit;
}
a:link:hover {
  text-decoration: underline;}
/* highlight the active ToC entry */
.topic.contents :target {
  background-color: #d2e6ec;
}

/* Block Alignment */
/* Let content flow to the side of aligned images and figures */

/* no floats around this elements */
dl.footnote, dl.citation, /* errors with internal floats */
footer, header, hr,
h1, h2, h3 {
  clear: both;
}

img.align-left,
video.align-left,
figure.align-left,
table.align-left {
  margin-left: 0;
  padding-left: 0;
  margin-right: 0.5em;
  clear: left;
  float: left;
}
img.align-right,
video.align-right,
figure.align-right,
table.align-right {
  margin-left: 0.5em;
  margin-right: 0;
  clear: right;
  float: right;
}

/* Margin Elements */
/* see below for screen size dependent rules */
.sidebar,
.marginal,
.admonition.marginal {
  max-width: 40%;
  border: none;
  background-color: #efefea;
  margin: 0.5em var(--sidebar-margin-right) 0.5em 1em;
  padding: 0.5em;
  clear: right;
  float: right;
}
.sidebar {
  width: 40%;
}

/* Adaptive page layout */
/* ==================== */

@media (max-width: 30em) {
  /* Smaller margins and no floating elements for small screens */
  /* (main text less than 40 characters/line) */
  body > * {
    padding: 0.5rem 5%;
    line-height: 1.4
  }
  .sidebar,
  .marginal,
  .admonition.marginal {
    width: auto;
    max-width: 100%;
    float: none;
  }
  dl.option-list,
  pre {
    margin-left: 0;
  }
  body {
    --field-indent: 4em;
  }
  dl.field-list.narrow, dl.docinfo, dl.option-list {
    --field-indent: 2.4em;
  }
  pre, pre * {
  font-size: 0.9em;
  /* overflow: auto; */
  }
}

@media (min-width: 54em) {
  /* Move ToC to the left */
  /* Main text width before: 70% ≙ 35em ≙ 75…95 chrs (Dejavu/Times) */
  /*                  after:      ≳ 30em ≙ 54…70 chrs (Dejavu/Times) */
  body.with-toc {
    padding-left: 8%;
  }
  body.with-toc > * {
    margin-left: 0;
    padding-left: 22rem; /* fallback for webkit */
    padding-left: min(22%, 22rem);
    padding-right: 7%;
  }
  main > div.topic.contents { /* exclude local ToCs */
    position: fixed;
    top: 0;
    left: 0;
    width: min(25%, 25em);
    height: 100vh;
    margin: 0;
    background-color: #fafaf6;
    padding: 1em 2% 0 2%;
    overflow: auto;
  }
  main > div.topic.contents > * {
    padding-left: 0;
  }
}

@media (min-width: 70em) {
  body {
    --field-indent: 9em;
  }
}

@media (min-width: 77em) {
  /* Move marginalia to 6rem from right border       */
  /* .sidebar,                                       */
  /* .marginal,                                      */
  /* .admonition.marginal {                          */
  /*   margin-right: calc(6rem - 15%);               */
  /* }                                               */
  /* BUG: margin is calculated for break point width */
  /* workaround: variable + many breakpoints         */
  body > * {
    padding-left: 18%;
    padding-right: 28%; /* fallback for webkit */
    padding-right: min(28%, 28rem);
    --sidebar-margin-right: -20rem;
  }
  /* limit main text to ~ 50em ≙ 85…100 characters DejaVu rsp. …120 Times */
  body.with-toc > * {
    padding-left: min(22%, 22rem);
    padding-right: calc(78% - 50rem); /* fallback for webkit */
    padding-right: min(78% - 50rem, 28rem);
    --sidebar-margin-right: 0;
  }
}

@media (min-width: 85em) {
  body.with-toc > * {
    --sidebar-margin-right: -9rem;
  }
}

@media (min-width: 90em) {
  /* move marginalia into the margin */
  body > * {
    padding-left: min(22%, 22rem);
    --sidebar-margin-right: -23rem;
  }
  body.with-toc > * {
    --sidebar-margin-right: -14rem;
  }
}

@media (min-width: 99em) {
  /* move marginalia out of main text area */
  body.with-toc > * {
    --sidebar-margin-right: -20rem;
  }
  body > *, body.with-toc > * { /* for webkit */
    padding-left: 22rem;
    padding-right: 28rem;
  }
  .admonition.marginal,
  .marginal {
    width: 40%; /* make marginal figures, ... "full width" */
  }
}

@media (min-width: 104em) {
  body.with-toc > * {
    --sidebar-margin-right: -23rem;
  }
}