:root {
    --tableaux-border-color: #aaaaaa;
    --revadded-before: "";
    --revadded-after: "";
    --revadded-background-color: #fffff8;
    --revadded-color: rgb(0, 158, 115);

    --revdeleted-background-color: #fffff8;
    --revdeleted-color: rgb(213, 94, 0);

    --revchanged-background-color: #fffff8;
    --revchanged-color: rgb(230, 159, 0);

    --revchanged-before: "";
    --revchanged-after: "";
    --revdeleted-before: "";
    --revdeleted-after: "";
}

/* Shamelessly stolen from
   https://steemit.com/unicode/@markgritter/why-did-unicode-reject-the-external-link-symbol
*/
.exlink::after {
    content: "";
    background-size: cover;
    display: inline-block;
    width: 0.6em;
    height: 0.75em;
    position: relative;
    top: 0.05em;
    left: 0.2em;
    margin-right: 0.3em;
    background-image: url(data:image/svg+xml;utf8;base64,IDxzdmcgaGVpZ2h0PSIxMDI0IiB3aWR0aD0iNzY4IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik02NDAgNzY4SDEyOFYyNTcuOTA1OTk5OTk5OTk5OTVMMjU2IDI1NlYxMjhIMHY3NjhoNzY4VjU3Nkg2NDBWNzY4ek0zODQgMTI4bDEyOCAxMjhMMzIwIDQ0OGwxMjggMTI4IDE5Mi0xOTIgMTI4IDEyOFYxMjhIMzg0eiIgZmlsbD0iIzc4ODE4NyIvPjwvc3ZnPg==);
}

.revadded {
    font-weight: bold;
}

.revdeleted {
    font-style: italic;
    text-decoration: line-through;
    text-decoration-thickness: 1.5px;
}

.revchanged {
    font-style: italic;
    font-weight: bold;
}

pre.language-none {
    background-color: var(--verbatim-even-background-color);
    padding: 0.5em;
}

.sidebar .screen {
    color: black;
}

.cmdsynopsis-wrap {
    border: 1px solid var(--tableaux-border-color);
    padding-left: 0.5em;
    padding-right: 0.5em;
    border-radius: 0.5em;
}

code.literal {
    border: none;
    background-color: inherit;
    border: none;
    padding: 0;
    margin: 0;
    font-size: inherit;
}

.cover .fill .copyright {
    padding-bottom: 0;
    margin-bottom: 0;
}

.uri {
    white-space: nowrap;
}

.docslink a,
.docslink a:visited {
    color: #7f7f7f;
    text-decoration: none;
}

.docslink::before {
    color: #7f7f7f;
    content: "← ";
}

.toc li .impldetail {
    font-weight: bold;
}

.impldetail::after {
    font-weight: normal;
    content: "✵";
    font-size: 80%;
    vertical-align: super;
}

.newinver {
    margin-left: 1em;
    font-size: 70%;
    font-family: sans-serif;
    color: white;
    background-color: black;
    padding-left: 4px;
    padding-right: 4px;
    padding-top: 3px;
    padding-bottom: 1px;
    border: 1px solid black;
    border-radius: 4px;
}

/* ============================================================ */

.element-syntax {
    padding: 4px;
    line-height: 1.25;
    white-space: nowrap;
}

.element-syntax { color: #000000; }
.element-syntax .attr { color: #000000; }
.element-syntax .value { color: rgb(9,70,138); }
.element-syntax .comment,
.element-syntax .opt-type { color: #948695; }
.element-syntax { border-radius: 0.25em; }

.element-syntax-language-construct      {
    border: 1px solid black;
    background-color: var(--secondary-color);
 }

.pipeline-error code,
p.element-syntax code {
    font-size: inherit;
    border: none;
    background-color: inherit;
}

.pipeline-error code {
    padding: 0;
    border-radius: none;
}

/* ============================================================ */

.panelset.variablelist {
    margin-bottom: 1em;
}

p.nodiff {
    background-color: #ffeeee;
    border-radius: 0.5em;
    border: 1px solid #ff0000;
    padding-left: 1em;
    padding-right: 1em;
}

/* ============================================================ */

.book header {
    min-height: 420px;
}

.book header .cover img {
    float: left;
}

.book header .date {
    margin-top: 1em;
}

.book header .docversion {
    margin-top: 0em;
    margin-bottom: 8em;
}

.book header h1 {
    text-align: right;
}

.cover .fill {
    text-align: right;
    padding-right: 1em;
}

.screen-wrap {
    border-radius: 0.25em;
}   

main {
    padding-bottom: 2rem;
}

.footnote-body {
    font-size: 90%;
}

.sidebar pre code {
    background-color: inherit;
}

.fgbody {
    width: 100%;
    display: flex;
    flex-direction: row;
}

.fgbody .formalobject + .formalobject {
    margin-top: 0;
}

.fgbody .figure {
    background-color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.fgbody .figure header {
    background-color: white;
}

.fgbody .figure header .title {
    background-color: white;
}

.colophon {
  border: inherit;
  margin: inherit;
  padding: inherit;
}

/* Manage tables before special kinds of tables */

table {
    width: 100%;
    border: 1px solid var(--tableaux-border-color);
}

table thead {
    background-color: var(--focused-color);
}

table thead tr td,
table thead tr th,
table tbody tr td,
table tbody tr th {
    border-bottom: 1px dotted var(--tableaux-border-color);
    border-right: 1px dotted var(--tableaux-border-color);
}

nav table {
    border: none;
}

nav table thead tr td,
nav table thead tr th,
nav table tbody tr td,
nav table tbody tr th {
    border-bottom: inherit;
    border-right: inherit;
}

/* ============================================================ */

div.declare-step table tbody tr td {
    font-size: 95%;
}

div.declare-step > p {
    padding: 0;
    margin: 0;
    padding-bottom: 0.25rem;
    font-weight: bold;
    font-size: 110%;
}

table.tableaux {
    width: 100%;
    margin-bottom: 1rem;
    border-spacing: 0;
    border-collapse: separate;
}

table.tableaux thead th {
    font-weight: normal;
}

table.tableaux thead th,
table.tableaux tbody td {
    border-right: 1px solid var(--tableaux-border-color);
}

table.tableaux thead th.port {
    width: 20%;
}

table.tableaux thead th.check {
    width: 10%;
    text-align: center;
}

table.tableaux tbody td.check {
    width: 10%;
    text-align: center;
    font-family: serif;
    font-size: 90%;
}

table.tableaux thead th.optname {
    width: 40%;
}

table.tableaux tbody td.optname {
    width: 40%;
}

table.tableaux thead th.binding {
    width: 20%;
}

table.tableaux tbody td.errcode {
    line-height: 1.5;
    vertical-align: top;
}

table.tableaux tbody td.description {
    font-family: sans-serif;
    font-size: 100%;
    line-height: 1.5;
}

table.tableaux tbody td.primary,
table.tableaux tbody td.required {
    font-weight: bold;
}

table.tableaux thead tr th:first-of-type,
table.tableaux tbody tr td:first-of-type {
    border-left: 1px solid var(--tableaux-border-color);
}

table.tableaux thead th,
table.tableaux tbody td {
    padding: 0.25em;
}

table.tableaux tbody td {
    font-family: monospace;
    font-size: 125%;
}

table.tableaux thead tr:nth-child(1) th,
table.tableaux tbody tr:nth-child(1) td {
    border-top: 1px solid var(--tableaux-border-color);
}

table.tableaux tbody tr:last-of-type td {
    border-bottom: 1px solid var(--tableaux-border-color);
}

table.tableaux thead tr th {
    background-color: #eeeeee;
}

table.tableaux tbody tr:nth-child(even) td {
    background-color: #eeeeee;
}

/* ============================================================ */

table.md-ext-opt {
    width: 100%;
    margin-bottom: 1rem;
    border-spacing: 0;
    border-collapse: separate;
}

table.md-ext-opt thead th,
table.md-ext-opt tbody td {
    border-right: 1px solid var(--tableaux-border-color);
}

table.md-ext-opt thead tr th.md-ext-prop {
   width: 45%;
}

table.md-ext-opt thead tr th.md-ext-value {
   width: 55%;
}

table.md-ext-opt tbody tr:nth-child(even) td {
    background-color: #eeeeee;
}

table.md-ext-opt thead tr th {
    background-color: #eeeeee;
}

table.md-ext-opt tbody tr:nth-child(even) td {
    background-color: #eeeeee;
}

table.md-ext-opt thead tr th:first-of-type,
table.md-ext-opt tbody tr td:first-of-type {
    border-left: 1px solid var(--tableaux-border-color);
}

table.md-ext-opt thead th,
table.md-ext-opt tbody td {
    padding: 0.25em;
}

table.md-ext-opt thead tr:nth-child(1) th,
table.md-ext-opt tbody tr:nth-child(1) td {
    border-top: 1px solid var(--tableaux-border-color);
}

table.md-ext-opt tbody tr:last-of-type td {
    border-bottom: 1px solid var(--tableaux-border-color);
}

/* ============================================================ */

table.tableaux.error-list tbody td {
    font-family: serif;
    font-size: inherit;
}

table.tableaux.error-list thead th.code,
table.tableaux.error-list tbody td.code {
    vertical-align: top;
    width: 20%;
}

table.tableaux.error-list tbody td.code code {
    background-color: inherit;
    border: none;
}

/* ============================================================ */

.element-syntax-table table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: none;
}

.element-syntax-table table tr td {
    padding: 0;
    padding-left: 0.5em;
    padding-right: 0.5em;
    border-right: none;
}

.element-syntax-table table tr td {
    border-bottom: 1px dotted #888888;
}

.element-syntax-table table tr:last-child td {
    border-bottom: none;
}

.element-syntax-table table tr td.code {
    font-family: var(--mono-family);
    background-color: var(--secondary-color);
    border-right: 1px solid black;
    border-left: 1px solid black;
}

.element-syntax-table table tr td.code.first {
    border-top: 1px solid black;
    border-top-left-radius: 0.25em;
    border-top-right-radius: 0.25em;
}

.element-syntax-table table tr td.code.last {
    border-bottom: 1px solid black;
    border-bottom-left-radius: 0.25em;
    border-bottom-right-radius: 0.25em;
}

.element-syntax-table table tr td.desc {
    padding-left: 1em;
    font-style: italic;
}

/* ============================================================ */

.introduction > header {
    display: none;
}
