/*
 * SPDX-License-Identifier: GPL-2.0-or-later
 *
 * Selected and adapted rules from OTW-Archive's official site skin:
 * https://github.com/otwcode/otwarchive/tree/master/public/stylesheets/site/2.0
 * Copyright (c) Organization for Transformative Works and contributors.
 * See the repository LICENSE and NOTICE.md files.
 */

html,
body,
div,
span,
h1,
h2,
h3,
h4,
p,
blockquote,
a,
dl,
dt,
dd,
ol,
ul,
li,
main,
header,
footer,
nav,
section {
  border: 0;
  outline: 0;
  font-weight: inherit;
  font-style: inherit;
  font-size: 100%;
  font-family: inherit;
  vertical-align: baseline;
  list-style: none;
  margin: 0;
  padding: 0;
}

body {
  background: #fff;
  color: #2a2a2a;
  font: 100%/1.125 "Lucida Grande", "Lucida Sans Unicode", Verdana, Helvetica, sans-serif, "GNU Unifont";
}

.heading,
h1,
h2,
h3,
h4 {
  font-family: Georgia, serif;
  font-weight: 400;
  overflow-wrap: break-word;
}

h1 {
  font-size: 2.5em;
  line-height: 1;
  margin: 0.5em 0;
}

h2 {
  display: inline;
  font-size: 2.143em;
  line-height: 1;
  margin: 0.429em 0;
}

h3 {
  font-size: 1.286em;
  line-height: 1;
  margin: 0.5375em 0;
}

h4 {
  font-size: 1.143em;
  line-height: 1.125;
  margin: 0.5em 0;
}

p,
li,
dd {
  margin: 0.643em 0;
}

a,
a:link {
  color: #900;
  text-decoration: none;
}

a:visited {
  color: #666;
}

a:hover,
a:visited:hover {
  color: #999;
}

a:active,
a:focus,
button:focus {
  outline: 1px dotted;
}

.group::after {
  content: " ";
  display: block;
  height: 0;
  clear: both;
  visibility: hidden;
}

.wrapper {
  box-shadow: 1px 1px 5px #aaa;
  margin-bottom: 1em;
  padding: 0.643em;
}

#outer.wrapper {
  box-shadow: none;
  margin: 0;
  padding: 0;
}

.landmark,
#skiplinks {
  height: 0;
  clear: both;
  color: transparent;
  font-size: 0;
  line-height: 0;
  margin: 0;
  opacity: 0;
}

#skiplinks a:focus {
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: auto;
  height: auto;
  padding: 0.5em 1em;
  color: #fff;
  background: #900;
  font-size: 16px;
  line-height: 1.5;
  opacity: 1;
}

#header {
  position: relative;
  margin: 0 0 1em;
  padding: 0;
  font-size: 0.875em;
}

#header .heading {
  float: left;
  margin: 0;
  padding: 0.375em;
}

#header .heading a {
  color: #900;
  border: 0;
  font-size: 1.714em;
  line-height: 1.75em;
}

#header .primary {
  width: 100%;
  clear: both;
  overflow: hidden;
  background: #900;
  box-shadow:
    inset 0 -6px 10px rgba(0, 0, 0, 0.35),
    1px 1px 3px -1px rgba(0, 0, 0, 0.25),
    inset 0 -1px 0 rgba(0, 0, 0, 0.85);
}

#header .primary li {
  float: left;
  margin: 0;
}

#header .primary li:first-child {
  margin-left: 2em;
}

#header .primary a {
  display: block;
  padding: 0.429em 0.75em;
  color: #fff;
}

#header .primary a:hover,
#header .primary a:focus {
  color: #111;
  background: #ddd;
}

#main {
  position: relative;
  min-height: 450px;
  margin: auto;
  padding: 0.5em 2.5em 3.5em;
  font-size: 0.875em;
  line-height: 1.286;
}

.actions > * {
  display: inline;
  padding-left: 0.25em;
}

ul.actions,
p.actions {
  float: right;
  padding: 0 0.25em 0.25em 0;
  text-align: center;
}

.actions a,
.actions a:link,
.actions button,
button {
  position: relative;
  display: inline-block;
  box-sizing: content-box;
  width: auto;
  min-height: 1.286em;
  height: auto;
  overflow: visible;
  padding: 0.25em 0.75em;
  color: #444;
  background: linear-gradient(#fff 2%, #ddd 95%, #bbb 100%);
  border: 1px solid #bbb;
  border-bottom-color: #aaa;
  border-radius: 0.25em;
  font: 400 100%/1.286 "Lucida Grande", "Lucida Sans Unicode", Verdana, Helvetica, sans-serif, "GNU Unifont";
  text-decoration: none;
  vertical-align: middle;
  white-space: nowrap;
}

.actions a:visited {
  color: #111;
}

.actions a:hover,
.actions a:focus,
.actions button:hover,
.actions button:focus,
button:hover,
button:focus {
  color: #900;
  border-color: #999;
  box-shadow: inset 2px 2px 2px #bbb;
}

button:disabled {
  color: #777;
  background: #ddd;
  cursor: not-allowed;
  box-shadow: none;
}

dl.meta {
  position: relative;
  overflow: hidden;
  clear: right;
  padding: 1.286em 0.75em;
  border: 1px solid #ccc;
}

.meta dt {
  float: left;
  clear: left;
  min-width: 10.5em;
  width: 25%;
}

.meta dd {
  float: left;
  width: 72.5%;
  margin: 0 0 0.643em;
}

.meta dd ul li {
  display: inline;
  margin: auto;
  padding-right: 0.5em;
}

.meta .stats dl {
  float: left;
  margin-top: 0;
}

.meta .stats dl dt,
.meta .stats dl dd {
  float: left;
  clear: none;
  width: auto;
  min-width: 0;
  margin: 0 0.375em 0 0;
  padding-right: 0.25em;
}

.meta .stats dl dd {
  padding-right: 0.75em;
}

div.preface {
  float: none;
  margin: 1.5em 3em;
  padding: 0.643em 0.643em 0;
}

div.preface .module {
  float: none;
  width: auto;
  margin: 0;
  padding: 0 0 0.643em;
}

.chapter .preface {
  border-top: 1px solid;
}

.preface h3 {
  background: transparent;
  border-bottom: 1px solid;
}

.preface h2.title {
  display: block;
  clear: right;
  border-bottom: 0;
}

div.preface .title,
div.preface .byline,
div.preface .byline a {
  border: 0;
  text-align: center;
}

.preface blockquote {
  border: 0;
}

div.preface .notes,
div.preface .summary {
  min-height: 5em;
}

div.afterword {
  margin-bottom: 2.5em;
}

.userstuff {
  line-height: 1.5;
  overflow-wrap: break-word;
}

.userstuff p,
.userstuff details {
  margin: 1.286em auto;
  padding: 0;
}

.userstuff blockquote,
.userstuff address {
  margin-left: 1.5em;
  padding: 0.75em;
  border-left: 2px solid #999;
  line-height: 1.5;
}

#workskin {
  position: relative;
  max-width: 72em;
  margin: auto;
  padding: 0 0.25em;
  overflow-x: auto;
  overflow-y: hidden;
  font-size: 1.08em;
}

#workskin .module {
  float: none;
}

#footer {
  clear: both;
  min-height: 4em;
  padding: 1em 3em;
  color: #111;
  background: #ddd;
  border-top: 1px solid #ccc;
  font-size: 0.75em;
}

@media only screen and (max-width: 62em) {
  #main {
    width: auto;
    margin: auto;
    padding-right: 3.5%;
    padding-left: 3.5%;
  }

  #workskin {
    margin: auto 1.5%;
  }
}

@media only screen and (max-width: 42em) {
  #outer {
    position: relative;
    background: #fff;
    font-size: 0.875em;
  }

  #header .primary li:first-child {
    margin-left: 0;
  }

  #main {
    position: static;
  }

  dl.meta dt,
  dl.meta dd {
    float: none;
    width: auto;
  }

  dl.meta dd {
    margin-left: 1em;
  }

  #workskin {
    margin: auto;
  }
}

