body {
  margin: 0;
  padding: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 100%;
  line-height: 1.45;
  background: #121212;
  background: var(--page-background);
  color: #e0e0e0;
  color: var(--text);
}

.page {
  min-height: calc(100vh - 2.65em);
  box-sizing: border-box;
  padding: 1.5em 5% 3em;
  background: #121212;
  background: var(--page-background);
  color: #e0e0e0;
  color: var(--text);
}

header,
main,
footer,
nav,
article,
section,
blockquote,
figure,
figcaption,
picture {
  display: block;
}

img {
  max-width: 100%;
  height: auto;
}

p {
  margin: 0.4em 0;
}

h1,
h2,
h3 {
  max-width: 32em;
  margin-right: auto;
  margin-left: auto;
  font-weight: normal;
  line-height: 1.2;
  text-align: center;
}

h1 {
  margin-top: 0.5em;
  margin-bottom: 0.2em;
  font-size: 225%;
}

h2 {
  margin-top: 1.8em;
  margin-bottom: 0.2em;
  font-size: 175%;
}

h3 {
  margin-top: 1.5em;
  margin-bottom: 0.2em;
  font-size: 130%;
}

a {
  color: #a8c4e0;
  color: var(--link);
  font-weight: bold;
}

a:visited {
  color: #cfb8df;
  color: var(--visited);
}

a:hover {
  background: #26323a;
  background: var(--hover-background);
}

.theme-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  outline: 0;
}

.theme-label {
  display: none;
  padding: 0.65em 5%;
  font-size: 92%;
  text-align: right;
  cursor: pointer;
}

.theme-dark-option {
  font-family: "Times New Roman", Georgia, serif;
}

.theme-light-option {
  font-family: "Times New Roman", Georgia, serif;
}

@supports (--theme: value) {
  .theme-label {
    display: block;
  }
}

.book-header,
.book-footer {
  max-width: 45em;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.book-header {
  margin-bottom: 2.5em;
}

.book-title {
  margin-bottom: 0;
  letter-spacing: 0.04em;
}

.book-subtitle,
.cs {
  color: #aaa;
  color: var(--muted);
  font-style: italic;
  text-align: center;
}

.book-subtitle {
  max-width: 45em;
  margin: 0 auto 1.5em;
}

.cs {
  margin: 0.15em auto 1.5em;
}

.toc {
  max-width: 34em;
  margin: 2em auto 3.5em;
  padding: 1em 0;
  border-top: 1px solid #666;
  border-bottom: 1px solid #666;
  border-color: var(--rule);
}

.toc h2 {
  margin-top: 0;
  font-size: 130%;
}

.toc ol {
  margin: 0.5em 0 0;
  padding-left: 0;
  list-style: none;
  text-align: center;
}

.toc li {
  margin: 0;
  line-height: 1.3;
}

.toc a {
  display: inline-block;
  padding: 0.1em 0.15em;
}

.ct {
  margin-bottom: 0.15em;
}

.cb {
  max-width: 45em;
  margin-right: auto;
  margin-left: auto;
  text-align: left;

  overflow-wrap: break-word;
  word-wrap: break-word;
}

:where(.cb) > p + p {
  margin-top: 0.85em;
}

.c {
  max-width: 45em;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.cu {
  max-width: none;
  text-align: center;
}

.l {
  max-width: 45em;
  margin-right: auto;
  margin-left: auto;
  text-align: left;
}

.a {
  margin-top: -0.25em;
  margin-bottom: 0;
}

.a + p {
  margin-top: 1.2em;
}

.a + .a {
  margin-top: 0.25em;
}

.i {
  font-style: italic;
}

.s {
  font-size: 92%;
}

.f {
  color: #aaa;
  color: var(--muted);
}

.q {
  max-width: 45em;
  margin-right: auto;
  margin-left: auto;
  margin-top: 1.8em;
  margin-bottom: 0.35em;
  padding: 0;
  text-align: center;
}

.q p {
  margin: 0;
}

.qw {
  max-width: 38em;
  margin: 0.25em auto 0;
  color: #aaa;
  color: var(--muted);
  font-size: 92%;
  font-style: italic;
  text-align: center;
}

.qa {
  max-width: 38em;
  margin: 0.55em auto 1.8em;
  color: #aaa;
  color: var(--muted);
  font-size: 92%;
  text-align: center;
}

.qa cite {
  font-style: normal;
}

.p {
  max-width: 45em;
  margin: 2em auto;
  text-align: center;
  page-break-inside: avoid;
  break-inside: avoid;
}

.ps {
  max-width: 20em;
}

.p img {
  display: block;
  margin-right: auto;
  margin-left: auto;
}

.pc {
  max-width: 38em;
  margin: 0.55em auto 0;
  color: #aaa;
  color: var(--muted);
  font-size: 92%;
  font-style: italic;
  text-align: center;
}

.ri {
  font-style: italic;
  font-weight: normal;
  letter-spacing: 0.02em;
}

.d {
  width: 50%;
  max-width: 21em;
  height: 0;
  margin: 3em auto;
  border: 0;
  border-top: 1px solid #666;
  border-top-color: var(--rule);
}

.u {
  max-width: none;
}

.cabal {
  color: #fff6d8;
  color: var(--cabal);
  font-weight: bold;
  text-shadow: 0 0 4px #ffe28a,
               0 0 12px #ffc832,
               0 0 28px #d49000,
               0 0 48px rgba(212, 144, 0, 0.5);
  text-shadow: var(--cabal-shadow);
}

.flame {
  color: #ffe4d0;
  color: var(--flame);
  font-weight: bold;
  text-shadow: 0 0 4px #ffb080,
               0 0 12px #ff7030,
               0 0 28px #c83c00,
               0 0 48px rgba(200, 60, 0, 0.5);
  text-shadow: var(--flame-shadow);
}

@supports (text-wrap: balance) {
  h1,
  h2,
  h3 {
    text-wrap: balance;
  }
}

@supports (text-wrap: pretty) {
  .cb {
    text-wrap: pretty;
  }
}

@media (min-width: 42em) {
  .cb {
    text-align: justify;
  }
}

.theme-toggle:checked ~ .page {
  --page-background: #fff;
  --text: #111;
  --muted: #5e5e59;
  --link: #23527c;
  --visited: #65477c;
  --hover-background: #e8eef3;
  --rule: #999;
  --cabal: #6b4a00;
  --cabal-shadow: 0 0 4px rgba(212, 160, 20, 0.65),
                  0 0 12px rgba(230, 180, 40, 0.40),
                  0 0 24px rgba(255, 200, 60, 0.25);
  --flame: #7a1500;
  --flame-shadow: 0 0 4px rgba(216, 70, 30, 0.65),
                  0 0 12px rgba(230, 100, 40, 0.40),
                  0 0 24px rgba(255, 140, 60, 0.25);
}

.theme-toggle:checked + .theme-label {
  background: #fff;
  color: #111;
}

.theme-toggle:checked + .theme-label .theme-dark-option {
  opacity: 0.55;
  text-decoration: none;
}

.theme-toggle:checked + .theme-label .theme-light-option {
  opacity: 1;
  text-decoration: underline;
}

body {
  --page-background: #121212;
  --text: #e0e0e0;
  --muted: #aaa;
  --link: #a8c4e0;
  --visited: #cfb8df;
  --hover-background: #26323a;
  --rule: #666;
  --cabal: #fff6d8;
  --cabal-shadow: 0 0 4px #ffe28a,
                  0 0 12px #ffc832,
                  0 0 28px #d49000,
                  0 0 48px rgba(212, 144, 0, 0.5);
  --flame: #ffe4d0;
  --flame-shadow: 0 0 4px #ffb080,
                  0 0 12px #ff7030,
                  0 0 28px #c83c00,
                  0 0 48px rgba(200, 60, 0, 0.5);
}

.theme-label {
  background: #121212;
  color: #e0e0e0;
}

.theme-dark-option {
  opacity: 1;
  text-decoration: underline;
}

.theme-light-option {
  opacity: 0.55;
}

@media print {
  body,
  .theme-toggle:checked ~ .page {
    --page-background: #fff;
    --text: #111;
    --muted: #111;
    --link: #111;
    --visited: #111;
    --rule: #777;
    --cabal: #111;
    --cabal-shadow: none;
    --flame: #111;
    --flame-shadow: none;
    padding: 0;
    background: #fff;
    color: #111;
  }

  .page {
    min-height: 0;
    padding: 0;
    background: #fff;
    color: #111;
  }

  a,
  a:visited {
    background: transparent;
    color: #111;
  }

  .book-subtitle,
  .cs,
  .f,
  .qw,
  .qa,
  .pc {
    color: #111;
  }

  .d {
    border-top-color: #777;
  }

  .cabal,
  .flame {
    color: #111;
    text-shadow: none;
  }

  .theme-toggle,
  .theme-label {
    display: none;
  }
}
