:root {
    color-scheme: light dark;
    --brand-color: #db0000;
    --brand-color: Teal;
    --spacing: 1em;
    --font-size: 1.25rem;
    --special-text-color: #141412;
    --border-color: black;
    --brand-alternative: DarkCyan;
    --light-border-color: lightgray;
    --ultra-light: #eee;
}

/* Reset */

*,
::after,
::before {
    box-sizing: border-box;
}

ol,
ul {
    padding: 0;
}

li {
    line-height: 140%;
}

li + li {
    margin-top: 0.25em;
}

blockquote,
body,
dd,
dl,
figure,
h2,
h3,
h4,
ol,
p,
ul {
    margin: 0;
}

ol[class],
ul[class] {
    list-style: none;
}

a:not([class]) {
    text-decoration-skip-ink: auto;
}

button,
notice4 input,
select,
textarea {
    font: inherit;
}

[hidden] {
    display: none;
}

/* Layout */

html {
    overflow-y: scroll;
}

body {
    font-family: "sys2", "Arial", sans-serif;
    text-rendering: auto;
    font-size: large;
    color: #141412;
    min-height: 100vh;
    line-height: 1.6;
}

.site {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    min-height: 100vh;
}

/* Accessibility */

#skip a {
    display: block;
    position: absolute;
    left: -999px;
    top: -999px;
}

#skip a:focus {
    left: 0;
    top: 0;
    padding: 3px;
    background: #ffc;
    border: 1px solid #990000;
    z-index: 100;
}

/* Formatting */

h1,
h2,
h3,
h4 {
    line-height: 1.25;
}

h1 {
    font-size: 2em;
    margin: 0.6em 0 0.2em;
}

h2 {
    font-size: 1.5em;
    color: var(--brand-color);
}

h2 a.tm-heading-anchor,
h3 a.tm-heading-anchor,
h4 a.tm-heading-anchor {
    visibility: hidden;
}

h2:hover a.tm-heading-anchor,
h3:hover a.tm-heading-anchor,
h4:hover a.tm-heading-anchor {
    visibility: visible;
}

h3 {
    font-size: 1.2em;
}

h4 {
    font-size: 1.1em;
}

.content h2,
.content h3,
.content h4 {
    margin-top: 1.5em;
    padding-left: 0.8em;
    margin-left: -0.8em;
    margin-right: -0.8em;
}

.content h2:first-child,
.content ul.TOC + h2,
.content p:first-child,
.content ul.TOC + p {
    margin-top: 0;
}

hr {
    clear: both;
}

em {
    color: #666;
    letter-spacing: -0.02em;
    font-style: normal;
    font-size: 0.95em;
}

/* Links */

a {
    font-weight: 500;
    color: var(--brand-color);
    hyphens: none;
    -webkit-hyphens: none;
}

a:hover {
    text-decoration: none;
}

a.active {
    outline: none;
    font-weight: bold;
    text-decoration: none;
}

:target::before {
    content: "";
    display: block;
    height: 80px;
    /* fixed header height*/
    margin: -80px 0 0;
    /* negative fixed header height */
}

a.iconlink {
    text-decoration: none;
    font-weight: bold;
    font-size: xx-large;
    margin-top: -0.45em;
}

a.current {
    text-decoration: none;
    color: inherit;
}

.icon {
    height: 1.05em;
}

/* Tables */

table {
    display: block;
    width: fit-content;
    max-width: 100%;
    overflow-x: auto;
    text-align: left;
    font-size: inherit;
    padding-bottom: 2px;
    border-collapse: collapse;
}

table td,
table th {
    border: 1px solid;
    padding: 0.25em 0.5em;
    vertical-align: top;
}

table th {
    background-color: var(--light-border-color);
    border-color: gray;
}

table td {
    border-color: var(--light-border-color);
}

thead {
    -webkit-hyphens: none;
    -ms-hyphens: none;
    hyphens: none;
}

table::-webkit-scrollbar {
    -webkit-appearance: none;
    width: 4px;
    height: 8px;
}

table::-webkit-scrollbar-thumb {
    border-radius: 4px;
    background-color: rgba(128, 128, 128, 0.5);
    -webkit-box-shadow: 0 0 1px rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 1px rgba(0, 0, 0, 0.5);
}

/* Buttons */

button {
    font-weight: 700;
    text-transform: uppercase;
    color: var(--brand-color);
    background-color: #fff;
    border: 2px solid var(--brand-color);
}

button:hover {
    background-color: var(--brand-color);
    color: #fff;
}

/* Code and Preformatted text */

pre {
    overflow-x: auto;
}

code {
    display: inline-block;
    background-color: rgba(0, 0, 0, 0.07);
}

code,
kbd,
pre,
samp {
    font-family: "essential_pragmatapro", monospace;
    font-size: 0.85em;
    -webkit-hyphens: none;
    -moz-hyphens: none;
    -ms-hyphens: none;
    hyphens: none;
    border-radius: 6px;
    word-wrap: break-word;
    white-space: normal;
    word-break: break-word;
    -webkit-user-select: all !important;
}

pre code {
    font-size: 1em;
    padding: 0.125em 0.25em;
}

code,
kbd {
    background-color: rgba(128, 128, 128, 0.2);
    padding: 0 0.25em;
}

em code {
    /* color: var(--border-color); */
    letter-spacing: 0em;
    font-style: normal;
    font-size: 1em;
    background: none;
}

.icon {
    display: inline-block;
    width: auto;
    height: 1.25em;
    margin-right: 0.25em;
    fill: currentColor;
}

.iconlink {
    display: inline-flex;
    align-items: center;
}

.anchor {
    text-decoration: none;
}

/* Header */

.header {
    flex: none;
    color: #fff;
    background-color: var(--brand-color);
}

.header a {
    color: inherit;
    text-decoration: none;
}

.header a.active {
    color: gold;
}

header.header {
    z-index: 20;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    padding-top: 1em;
    padding-bottom: 0.5em;
}

.header a:hover {
    text-decoration: underline;
}

header small {
    color: #888;
}

.headernav {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    margin-top: 0.2em;
    justify-content: flex-end;
    float: right;
}

.headernav .naviitem:first-child {
    margin-left: 0;
}

.naviitem {
    margin: 0 0 0 1em;
}

/* Main content */

.main {
    flex: 1 0 auto;
}

main a[href^="https://"]:not([href*="tekl.de"]):not([href*="tekl.local"])::after, main a[href^="http://"]:not([href*="tekl.de"]):not([href*="tekl.local"])::after
{
    content: url(/themes/emergency/external-link.svg);
    margin-left: 0.2em;
}

main,
div.hero {
    max-width: 50em;
    margin-left: auto;
    margin-right: auto;
    width: -webkit-fill-available;
    width: -moz-available;
}

.content {
    padding: 1em 0;
    max-width: 60ch;
}

.content > * + * {
    margin-top: 1em;
}

.content ol,
.content ul {
    padding-left: 1em;
}

/* Footer */

.footer {
    z-index: 50;
    background-color: rgba(128, 128, 128, 0.2);
    flex: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(128, 128, 128, 0.4);
    position: relative;
}

.footer div:nth-child(2) {
    text-align: right;
}

.footer div em {
    font-size: 0.8em;
}

.footer,
.header,
.main {
    padding: var(--spacing);
}

.footernav {
    display: flex;
    justify-content: space-between;
    max-width: 60ch;
    border-top: 1px solid #eee;
    padding-top: 0.5em;
    margin-top: 1em;
}

.footernav a.iconlink {
    font-size: 0.9em;
}

.footernav a.iconlink:last-child {
    text-align: right;
}

/* Notifications */

.notification {
    position: fixed;
    z-index: 100;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1rem;
    background-color: #fff;
    font-size: 1rem;
    transform: translate(0, 100%);
    transition: transform 0.3s ease;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.25);
}

.notification .prompt {
    display: flex;
    align-items: center;
}

.notification .prompt > p {
    flex: 1 0 0%;
    padding-right: 1rem;
}

.notification.active {
    transform: translate(0, 0);
}

.withhero {
    padding-top: 10px;
}

div.hero {
    text-align: center;
    overflow: hidden;
}

.content,
.footernav,
article > header {
    max-width: inherit;
}

.content .notice1 > * + *,
.content .notice2 > * + *,
.content .notice3 > * + * {
    margin-top: 1em;
}

ul {
    margin-left: 0.2em;
}

.tm-heading-anchor {
    display: inline-block;
    width: 0.8em;
    margin-left: -0.8em;
    text-decoration: none;
    color: var(--ultra-light);
}

.left {
    float: left;
    margin-top: 0.5em;
    clear: left;
}

.left:before {
    content: "";
    clear: both;
}

.left.hero {
    margin-top: 0.25em;
}

.right {
    float: right;
    margin-left: 1em;
    /* clear: right; */
}

.right:before {
    content: "";
    clear: both;
}

.right.hero {
    width: 60%;
}

.right.hero img {
    border: 0;
}

.right.hero50 {
    width: 50%;
}

/* Images */

figure.center {
    display: table;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    line-height: 1.2;
}

.notice6 figure.left + p {
    margin-left: 73px;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
    margin-right: 0.5em;
    display: inline;
}

.center img,
.right img {
    border: 1px solid lightgray;
    border: 1px solid rgba(160, 160, 160, 0.5);
    border-radius: 6px;
    margin: 0 auto;
}

figcaption {
    display: block;
    margin: 0.25em auto 0 auto;
    width: 80%;
}

img.small-right {
    max-width: 40%;
    float: right;
    margin-left: 1em;
    clear: right;
    display: block;
}

.border img {
    border: 1px solid lightgray;
    border: 1px solid rgba(160, 160, 160, 0.5);
    border-radius: 6px;
}

.noborder img {
    border: 0;
}

div.hero img {
    width: auto;
    max-height: 260px;
}

/* Definition lists */

dl {
    border-top: 1px solid var(--light-border-color);
    border-bottom: 1px solid var(--light-border-color);
    padding: 0.5em 0;
    box-sizing: border-box;
    font-size: 85%;
}

dt,
dd {
    width: 100%;
    margin: 0;
    box-sizing: border-box;
    display: inline-block;
    vertical-align: top;
}

dt {
    font-weight: bold;
}

dt::after {
    content: ":";
}

dd {
    padding-left: 40px;
}

/* Quotes */

blockquote {
    padding: 0.25em;
    background: #fdf8ce;
    background: rgba(255, 247, 179, 0.5);
    border-radius: 6px;
    border-left: 3px solid #e3dfb1;
    border-left: 3px solid rgba(212, 200, 66, 0.47);
    font-size: 0.9em;
}

.content blockquote h2,
.content blockquote h3 {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

.TOC {
    width: 28%;
    float: right;
    font-size: smaller;
    margin: 1.25em 0 1em 1em;
    padding: 0.5em 1em;
    background: #eee;
    background: rgba(128, 128, 128, 0.2);
}

.footnotes {
    font-size: 80%;
    margin-top: 3em;
}

.footnotes::before {
    content: "Fußnoten";
    font-weight: bold;
}

.footnotes ol {
    margin: 0 1em;
}

.TOC:before {
    content: "Inhalt";
    display: block;
    width: auto;
    background: #ccc;
    background: rgba(128, 128, 128, 0.4);
    margin: -0.5em -1em 0.25em -1em;
    padding-left: 1em;
    font-weight: bold;
}

.subtitle {
    margin-top: 0.16em;
    display: inline-flex;
    margin-left: 1em;
    color: rgb(115, 196, 196);
    vertical-align: top;
}

figure + .postlist {
    margin-top: 2em;
}

.page-home .postlist {
    margin-top: 0;
}

.columns {
    display: flex;
    flex-wrap: wrap;
    width: calc(100% + 2em);
}

.columns > div {
    min-width: 250px;
    flex: 1;
    margin: 0 2em 1em 0;
}

aside.columns h3 {
    background: var(--brand-color);
    color: white;
    padding: 3px var(--spacing);
    margin: 0 calc(0px - var(--spacing)) 0.5em calc(0px - var(--spacing));
}

aside.columns h3 a {
    color: white;
    text-decoration: none;
    font-weight: inherit;
}

aside.columns h3 a:hover {
    text-decoration: underline;
}

.postlist .columns {
    width: auto;
    align-items: baseline;
}

.postlist .columns > div {
    min-width: inherit;
    margin-right: 0.5em;
    margin-bottom: 0;
}

.postlist .columns > div:first-child {
    flex: 0 0 30px;
}

.postlist .columns > div:nth-child(2) {
    flex: 5;
}

.postlist .columns > div:last-child {
    text-align: right;
    white-space: nowrap;
    font-size: small;
    vertical-align: baseline;
    margin-right: 0;
}

.postlist time {
    color: var(--light-border-color);
}

.page-00-news .post-entry .border img {
    width: 3em;
    border: none;
    margin-right: 0em;
}

.page-04-blog .postlist .postimage {
    margin-bottom: 1em;
}

.post-entry div {
    float: left;
    margin-right: 1em;
}

.post-entry header {
    margin-bottom: 0.5em;
}

.post-entry h3 a {
    font-weight: bold;
}

.post-entry {
    margin-bottom: 1em;
    clear: left;
}

.readmore {
    text-align: right;
}

/* Initial

.content>p:first-child::first-letter {
font-size: 310%;
display: block;
line-height: 1;
//float: left;
color: #888;
margin-left: -0.05em;
}
*/

/* Notices */

.content .notice1 h2,
.content .notice2 h2,
.content .notice3 h2,
.content .notice4 h2,
.content .notice5 h2,
.content .notice6 h2,
.content .notice1 h3,
.content .notice2 h3,
.content .notice3 h3,
.content .notice4 h3,
.content .notice5 h3,
.content .notice6 h3 {
    margin-top: 0.25em;
    margin-bottom: 0.25em;
}

.TOC + .notice1,
.TOC + .notice2,
.TOC + .notice3,
.TOC + .notice4,
.TOC + .notice5,
.TOC + .notice6 {
    width: 70%;
}

.notice1 {
    margin: 1em 0;
    padding: 10px 1em;
    background-color: #fdf0f0;
    border-left: 10px solid #d00;
    border-radius: 6px;
}

.content .notice1 h2,
.content .notice1 h3,
.content .notice1 h4 {
    color: #d00;
}

.notice2 {
    margin: 1em 0;
    padding: 10px 1em;
    background-color: #fffbf0;
    border-left: 10px solid #fb0;
    border-radius: 6px;
}

.content .notice2 h2,
.content .notice2 h3,
.content .notice2 h4 {
    color: #fb0;
}

.notice3 {
    margin: 1em 0;
    padding: 10px 1em;
    background-color: #f0f8fe;
    border-left: 10px solid #08e;
    border-radius: 6px;
}

.content .notice3 h2,
.content .notice3 h3,
.content .notice3 h4 {
    color: #08e;
}

.notice4,
.notice5 {
    margin: 1em 0;
    padding: 10px 1em;
    background-color: #f0f0f0;
    border-left: 10px solid #888;
    border-radius: 6px;
}

.notice6 {
    margin: 2em 0;
}

.content .notice4 h2,
.content .notice4 h3,
.content .notice4 h4 {
    color: #888;
}

.notice1 .left,
.notice2 .left,
.notice3 .left,
.notice4 .left,
.notice5 .left,
.notice6 .left {
    margin-top: 0;
}

/* MEDIA QUERIES */

@media screen and (min-width: 40em) {
    :root {
        --spacing: 2em;
        --font-size: 1.5rem;
    }
    .notification {
        left: auto;
        bottom: auto;
        right: var(--spacing);
        top: var(--spacing);
        max-width: 22em;
        transform: translate(150%, 0);
    }
}

@media only screen and (max-width: 1024px) {
    body {
        font-size: medium;
    }
    .subtitle {
        margin-top: 0.28em;
    }
    .headernav {
        margin-top: 0.3em;
    }
    .left {
        transform: scale(0.9);
    }
    .right {
        max-width: 50%;
    }
}

@media only screen and (max-width: 800px) {
    main,
    div.hero {
        margin-left: inherit;
        margin-right: inherit;
    }
}

@media only screen and (max-width: 736px) {
    header.header {
        position: inherit;
    }
}

@media only screen and (max-width: 684px) {
    .footer > div {
        text-align: center !important;
        width: 100%;
    }
}

@media only screen and (max-width: 480px) {
    body {
        font-size: medium;
    }
    main {
        font-size: large;
    }
    article > div > small {
        font-size: 85%;
        letter-spacing: -0.5px;
    }
    header.header {
        position: inherit;
        font-size: 0.85em;
    }
    .headernav .naviitem {
        margin-left: 0.85em;
        font-size: 1.2em;
    }
    .content {
        -webkit-hyphens: auto;
        -moz-hyphens: auto;
        -ms-hyphens: auto;
        hyphens: auto;
    }
    .page-04-blog .postlist .postimage {
        width: 40%;
    }
    .page-00-news .postlist .postimage {
        margin-bottom: 0.8em;
    }
    .TOC {
        float: none;
        width: 90%;
    }
    .TOC:before {
        width: auto;
    }
    figcaption {
        width: auto;
        text-align: center;
    }
    .TOC + .notice1,
    .TOC + .notice2,
    .TOC + .notice3,
    .TOC + .notice4,
    .TOC + .notice5,
    .TOC + .notice6 {
        width: 100%;
    }
    .right.hero,
    .right {
        width: 100%;
        max-width: 100%;
        float: none;
        margin: 0;
    }
    .right {
        margin-top: 0.5em;
    }
    .subtitle {
        margin-top: -0.1em;
        width: 8em;
        line-height: 1;
    }
}

@media only screen and (max-width: 412px) {
    .headernav .naviitem {
        font-size: 1em;
    }
}

@media only screen and (max-width: 380px) {
    header.header {
        padding-right: 1em;
    }
}

@media only screen and (max-width: 370px) {
    header.header {
        text-align: center;
    }
    a.iconlink {
        font-size: x-large;
    }
    .subtitle {
        width: 100%;
        margin: 0;
        display: block;
        float: none;
        clear: both;
        text-align: center;
    }
    .headernav {
        justify-content: center;
    }
}

/* Typemill specific */

.tmedit {
    position: fixed;
    bottom: 2px;
    z-index: 50;
    margin: 0 auto;
    left: 2px;
}

.tmedit a {
    text-decoration: none;
    color: rgba(128, 128, 128, 0.3);
}

/* Dark mode */

@media (prefers-color-scheme: dark) {
    :root {
        --special-text-color: #e4e4e2;
        --border-color: white;
        --brand-color: DarkCyan;
        --brand-alternative: Teal;
        --light-border-color: Gray;
        --ultra-light: #333;
    }
    body {
        background-color: #1e1e1e;
        color: #e4e4e2;
    }
    img {
        filter: brightness(85%);
    }
    em {
        color: #aaa;
    }
    .notice1 {
        background-color: #412020;
    }
    .notice2 {
        background-color: #403b30;
    }
    .notice3 {
        background-color: #203240;
    }
    .notice4 {
        background-color: #303030;
    }
}

/* Fonts */

@font-face {
    font-family: "sys2";
    src: url("/media/fonts/sys300-webfont.woff2") format("woff2"), url("/media/fonts/sys300-webfont.woff") format("woff"), url("/media/fonts/sys300-webfont.ttf") format("truetype"), url("/media/fonts/sys300-webfont.svg#sysbook") format("svg"), url("/media/fonts/sys300-webfont.eot?#iefix") format("embedded-opentype");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "sys2";
    src: url("/media/fonts/sys700-webfont.woff2") format("woff2"), url("/media/fonts/sys700-webfont.woff") format("woff"), url("/media/fonts/sys700-webfont.ttf") format("truetype"), url("/media/fonts/sys700-webfont.svg#sysbold") format("svg"), url("/media/fonts/sys700-webfont.eot?#iefix") format("embedded-opentype");
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "essential_pragmatapro";
    src: url("/media/fonts/Essential PPro-R_1.2.woff2") format("woff2");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
