/* unsets  */
a {
    color: unset;
    text-decoration: none;
}
/* sets */
:root {
    color-scheme: light dark;
}
.crimson {color: crimson;}
.black {color: black;}
.underline {text-decoration: underline;}
.right {text-align: right;}
body {
    max-width: 800px;
    margin: 0 auto;
    padding: 0.5em;
    overflow-x: hidden;
}
time {
    white-space: pre;
}
main {
    margin: 2em 0;
}
hr {
    border: none;
    border-bottom: 1px solid black;
}
h1 {
    font-size: 1.4em;
}
h2 {
    font-size: 1.3em;
}
article a, .floater a {
    color: crimson;
}
.underline {
    white-space: nowrap;
    text-decoration: underline;
}
.article-list p {
    margin-top: 0;
}
.content-header:hover > a:after {
    content: ' ¶';
}
ul {
    list-style-type: square;
}
sup {
    font-size: inherit;
    vertical-align: inherit;
}
nav {
    position: relative;
    padding-bottom: 1.4em;
}
nav .logo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.4em;
}
nav .sections {
    position: absolute;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-items: center;
}
nav .sections a {
    color: black;
    font-size: large;
    font-weight: bold;
}
#search {
    height: 1.2em;
    overflow: hidden;
    border: 1px solid #ddd;
    background-color: white;
}
#search input {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
}
details[markdown=block] {
    background-color: rgba(0, 0, 0, 0.03);
}
.home-link {
    color: transparent;
}
.home-link:before {
    background-image: url(/static/icon.png);
    background-size: 32px;
    background-repeat: no-repeat;
    background-position: 0% 50%;
    content: 'RedSails.org';
    color: crimson;
    padding-left: 1.2em;
    font-size: 2em;
}
.outbound {
    font-size: 0.8em;
}
article {
    font-size: 1.2em;
    line-height: 1.5em;
}
/* header */
.info {
    display: flex;
    grid-auto-flow: column;
    grid-gap: 0.3rem;
    align-items: baseline;
}
.title {
    margin: 0;
    display: block;
}
.authors {
    white-space: nowrap;
}
.sections summary, .author {
    font-size: 1.2rem;
    font-weight: bold;
    color: black;
}
.source-date {
    display: none;
}
.list-date {
    font-size: small;
}
.list-date:before {
    content: '↯';
    margin-right: 0.1rem;
    display: inline-block;
}
.share a {
    background: var(--bg) center no-repeat;
    display: inline-block;
    width: 15px;
    height: 10px;
    overflow: hidden;
    color: transparent;
}
/* extra */
.extra {
    font-size: smaller;
}
.extra *:last-child {
    padding-bottom: 1em;
}
/* comments */
.comment {
    padding: 0.5em;
    margin: 0;
    margin-top: 0.5em;
    background-color: white;
    box-shadow: 0px 3px 3px black;
}
.comment a {
    word-break: break-all;
}
.comment p {
    margin: 0;
    margin-bottom: 0.5em;
}
.comment p:last-child {
    margin-bottom: 0;
}
.comment.odd {
    background-color: #eee;
}
.floater {
    position: fixed;
    bottom: 0;
    left: 0;
    background-color: white;
    box-shadow: 0 0 3px black;
    margin: 0;
    padding: 0;
    padding-left: 1em;
    padding-right: 1em;
    width: calc(100% - 2em);
}
table {
    border-collapse: collapse;
    font-size: 0.9rem;
}
td {
    padding: 0px .5em;
    vertical-align: top;
}
table.sitemap {
    width: 100%;
}
table.sitemap a {
    text-decoration: underline;
}
table.sitemap tr:nth-child(10n + 1),
table.sitemap tr:nth-child(10n + 2),
table.sitemap tr:nth-child(10n + 3),
table.sitemap tr:nth-child(10n + 4),
table.sitemap tr:nth-child(10n + 5) {
    background-color: rgba(0, 0, 0, 0.04);
}
table.sitemap td {
    padding: 2px;
    border: none;
}
table.sitemap td.unbreakable {
    white-space: nowrap;
}
.author:not(:last-child):after {
    content: ',';
}
figure {
    margin: 0;
}
.centered {
    display: block;
    margin: 0 auto;
    text-align: center;
}
.sitemap * {
    font-size: unset;
}
.frame {
    overflow: hidden;
}
.frame a {
    line-height: 0;
    font-size: 0;
}
.frame img {
    max-height: 50vh;
    max-width: min(100%, 100vw);
}
.full-width {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow: hidden;
}
@media (prefers-color-scheme: dark) {
    /*
      Credit to Samuel Meilleur for the CSS, Johan Winther for `prefer-color-scheme`
      https://github.com/SamuelMeilleur/redsails-dark-theme/
    */
    body {
      background-color: rgb(35,33,38);
    }

    nav #search {
      height: unset;
      background-color: rgb(45,43,48);
      border: none;
      border-radius: 10px;
    }

    nav #search input {
      height: 1.75rem;
      width: 10rem;
      border-radius: 10px;
      background: rgb(45,43,48);
      padding: 0.25rem 0.75rem;
      color: white;
    }

    main,
    main .author,
    nav .sections summary {
      color: white;
    }

    nav .sections a {
        color: crimson;
    }

    hr {
      border-bottom: 1px solid white;
    }

    .floater {
      color: white;
      background-color: rgb(35,33,38);
      box-shadow: 0 0 2px #ccc;
    }
}
