img {
    border: 0;
}

.monospace {
    font-family: "Fira Mono", monospace;
}

.monospace.mod-small {
    font-size: 14px;
}

th {
    background: #CCC;
    font-weight: bold;
    text-align: center;
}

table.stripped tr:nth-child(even) td {
    background: #EEE;
}

table.stripped tr:nth-child(odd) td {
    background: #DDD;
}

.headerlabel {
    background: #CCC;
    font-weight: bold;
    text-align: right;
}

.headervalue {
    background: #EEE;
}

a.top {
    text-decoration: none;
}

table.header {
    background: #99C;
    border-bottom: 17px solid #669;
}

.nav {
    width: 20%;
}

* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

html {
    background: #333 url('//php.net/images/bg-texture-00.svg');
    color: #CCC;
}

body {
    margin: 3.25rem 0 0;
    font-family: "Fira Sans", "Source Sans Pro", Helvetica, Arial, sans-serif;
    font-weight: 400;
    font-size: 1rem;
    color: #333;
}

.header {
    background: #8892BF;
    box-shadow: 0 .25em .25em rgba(0, 0, 0, .1);
    border-bottom: .25rem solid #4F5B93;
    color: #FFF;
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1;
    margin-bottom: 0;
}

.header-inner {
    max-width: 1440px;
    padding: 0 .75rem;
    margin: auto;
    position: relative;
}

.header-brand {
    display: inline-block;
    max-height: 48px;
    padding: .75rem .75rem .75rem .75rem;
    margin-right: 1.5rem;
    text-decoration: none;
    line-height: 24px;
}

.header-brand-img {
    opacity: .75;
}

.header-brand-text {
    color: #E2E4EF;
    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
    text-decoration: none;
    line-height: 24px;
    vertical-align: top;
}

.header-menu {
    padding: 0;
    list-style: none;
    position: relative;
    left: 0;
    display: inline-block;
    margin: 0 10px 0 0;
    vertical-align: top;
}

.header-menu-item {
    float: left;
}

.header-menu-item.mod-active {
    color: #fff;
    background-color: #4F5B93;
    box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);
}

a.header-menu-item-link {
    display: inline-block;
    text-decoration: none;
    float: none;
    padding: .75rem;
    color: #E2E4EF;
    border: 0;
    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
    line-height: 24px;
}

a.header-menu-item-link:hover {
    color: #fff;
}

.menu-mobile {
    background: #4F5B93;
    padding: 0;
    margin: 0;
    list-style: none;
}

.menu-mobile-item {
    text-align: right;
    display: inline-block;
}

a.menu-mobile-item-link {
    display: inline-block;
    text-decoration: none;
    float: none;
    padding: .75rem;
    color: #E2E4EF;
    border: 0;
    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
    line-height: 24px;
}

.search-form {
    float: right;
    width: 25%;
    position: relative;
    margin-top: .625rem;
    margin-bottom: 0;
}

.search-input {
    width: 100%;
    border: 0;
    border-radius: 2px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .2);
    line-height: 24px;
    height: 24px;
    padding: 2px 8px;
    font-size: 16px;
}

.secondary-nav {
    max-width: 1440px;
    margin: auto;
    padding: .75rem 1.5rem;
    font-size: 14px;
}

.breadcrumbs {
    color: #999;
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumbs-item {
    display: inline-block;
}

.breadcrumbs-item + .breadcrumbs-item::before {
    padding: 0 .5rem 0;
    content: "\203A";
}

a.breadcrumbs-item-link {
    color: #ccc;
    text-decoration: none;
    line-height: 24px;
}

.content {
    background: #F2F2F2;
    max-width: 1440px;
    margin: auto;
    padding: 1.5rem;
}

.content a {
    color: #369;
}

.content a:hover {
    color: #AE508D;
    border-color: #AE508D;
    outline: 0;
}

.content a:visited {
    color: #8895A2;
}

h1 {
    font-weight: 500;
    color: #333;
    font-size: 1.75rem;
    line-height: 3rem;
    margin: 0 0 1.5rem;
    overflow: hidden;
    text-rendering: optimizeLegibility;
}

h1:after {
    display: table;
    width: 100%;
    content: " ";
    margin-top: -1px;
    border-bottom: 1px dotted;
}

pre {
    font-family: "Fira Mono", monospace;
    font-size: 14px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.footer {
    color: #F2F2F2;
    max-width: 1440px;
    margin: auto;
    padding: 1.5rem;
    line-height: 3rem;
}

.footer-nav {
    margin: 0;
    padding: 0;
}

.footer-nav-item {
    display: inline-block;
    margin: 0 0.75rem;
}

a.footer-nav-item-link {
    color: #ccc;
    text-decoration: none;
}

a.footer-nav-item-link:hover {
    color: #AE508D;
    border-color: #AE508D;
    outline: 0;
}

/* Standard Tables */
table.standard {
    border-collapse: collapse;
    border: 1px solid #d9d9d9;
    width: 100%;
    border-spacing: 2px;
}

table.standard td,
table.standard th {
    border: 1px solid #d9d9d9;
    padding: 2px;
}

table.standard tr:nth-child(even) td {
    background-color: #E6E6E6;
}

table.standard th {
    font-size: 1.125rem;
    padding: 20px 10px 5px 10px;
    color: #666;
    font-weight: normal;
}

table.standard td {
    padding: 5px 10px;
    vertical-align: middle;
}

table.standard tr:nth-child(even) td.subr,
table.standard tr:nth-child(even) th.subr,
table.standard tr td.subr,
table.standard tr th.subr,
table.standard tr:nth-child(even) td.sub,
table.standard tr:nth-child(even) th.sub,
table.standard tr td.sub,
table.standard tr th.sub {
    background: #E6E6E6;
}

table.standard td.subr,
table.standard th.subr {
    text-align: right;
}

.responsive-table {
    overflow-x: scroll;
}

.responsive-table table {
    word-break: normal;
}

.align-right {
    text-align: right;
}

.align-center {
    text-align: center;
}

.menu-icon {
    display: none;
    background: #4F5B93;
    padding: 14px 24px 10px;
    line-height: 24px;
    float: right;
    color: #fff;
    cursor: pointer;
}

.hide {
    display: none;
}

/* Shading for quotes */
.quote1 { color: #006486; }
.quote2 { color: #900; }
.quote3 { color: #a36008; }
.quote0 { color: #909; }

pre.flowed {
    max-width: 100ch;
    font-family: "Fira Sans", "Source Sans Pro", Helvetica, Arial, sans-serif;
    font-size: 16px;
}
pre.flowed code, pre.flowed pre {
    font-weight: 700;
    color: #369;
}
pre.flowed pre {
    background: rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.2);
    padding: 0.5rem;
    margin: 0;
}

div.quote {
    border-left: 2px solid #777;
    padding: 0;
    padding-left: 1em;
    margin: 0;
}

/* Highlight of diffs in commit messages */
.added   { color: #000099; }
.removed { color: #990000; }

/* Dim signatures */
.signature { font-size: smaller; color: gray; }
.signature a:link    { color: #9999ff; }
.signature a:hover   { color: #ff9999; }
.signature a:active  { color: #ff9999; }
.signature a:visited { color: #ff66ff; }

/* Subscription form */
form.subscription-form {
    display: flex;
    gap: 1em;
}

/* Thread tree, based on: https://www.cssscript.com/tree-view-unlimited-nesting/ */
.list-tree {
  --tree-clr: #075985;
  --tree-font-size: 1rem;
  --tree-item-height: 1.5;
  --tree-offset: 0.5rem;
  --tree-indent: 0.5rem;
  --tree-thickness: 1px;
  --tree-style: solid;
}
.list-tree ul{
  display: grid;
  list-style: none;
  font-size: var(--tree-font-size);
  padding-inline-start: var(--tree-indent);
  max-width: 50em;
}
.list-tree li{
  line-height: var(--tree-item-height);
  padding-inline-start: var(--tree-offset);
  border-left: var(--tree-thickness) var(--tree-style) var(--tree-clr);
  position: relative;
  text-indent: .5rem;

  &:last-child {
    border-color: transparent; /* hide (not remove!) border on last li element*/
  }

  & a, & b {
      display: grid;
      grid-template-columns: 1fr auto;
      align-item: start;
      & span.author {
        grid-column: 1 / 1;
        white-space: normal;
      }
      & span.date {
        grid-column: 2 / 2;
        white-space: nowrap;
        font-variant-numeric: tabular-nums;
      }
      & span.subject {
        grid-column: 1 / 2;
        white-space: normal;
      }
  }
  &::before{
    content: '';
    position: absolute;
    top: calc(var(--tree-font-size) / 2 + var(--tree-item-height) / 2 * -1 * var(--tree-font-size) + var(--tree-thickness));
    left: calc(var(--tree-thickness) * -1);
    width: calc(var(--tree-offset) + var(--tree-thickness) * 2);
    height: calc(var(--tree-item-height)  * var(--tree-font-size) - var(--tree-font-size) / 2);
    border-left: var(--tree-thickness) var(--tree-style) var(--tree-clr);
    border-bottom: var(--tree-thickness) var(--tree-style) var(--tree-clr);
  }
  &::after{
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--tree-clr);
    top: calc(var(--tree-item-height) / 2 * 1rem);
    left: var(--tree-offset) ;
    translate: calc(var(--tree-thickness) * -1) calc(var(--tree-thickness) * -1);
  }
  & li li{
    /*
    change line color etc.
    --tree-clr: rgb(175, 208, 84);
    */
  }
}

@media screen and (max-width: 760px) {
    .welcome {
        display: none;
    }

    .search-form {
        display: none;
    }

    blockquote {
        margin: 16px;
    }
}

@media screen and (max-width: 580px) {
    th.nav a {
        font-size: 2rem;
        text-decoration: none;
    }

    th.nav span {
        display: none;
    }

    .menu-icon {
        display: block;
    }

    .header-menu {
        display: none;
    }
}

@media screen and (max-width: 420px) {
    .content {
        padding: 0.5rem;
    }
}
