/* -------------------------------------------- */
/* Brain Simulation Section */
/* Version: 1.8 */
/* -------------------------------------------- */
/* Created by @twotribes, Germany */
/* -------------------------------------------- */
/* StyleSheet Scope: ACTOR-INDEPENDENT RESOURCES */
/* !-------------------------------------------- */

/* !-------------------------------------------- */
/* !COMPONENT: Emphasized text */
/* !-------------------------------------------- */

.stage em {
    font-style: normal;
    font-weight: bolder;
}

/* !-------------------------------------------- */
/* !COMPONENT: Links & Buttons */
/* !-------------------------------------------- */

/* --- Initalize abstract buttons and links */
button, input[type="submit"], input[type="button"] {
    border: none;
    border-radius: 0;
    display: inline-block;
    margin: 0;
    padding: 0;
    background: none;
    font-family: inherit;
    font-size: inherit;
    font-weight: 200;
    text-align: inherit;
    cursor: pointer;
    overflow: hidden;
    -webkit-appearance: none;
}

button:focus {
    outline: none; /* removes outline in Chrome */
}

/* Firefox older than v58 basically freezes line-height to an arbitrary value, so we have to adjust a bit */
button, input[type="submit"]::-moz-focus-inner {
    border: 0;
    padding: 0;
    margin-top: -1px;
    margin-bottom: -1px;
}

a {
    display: inline-block;
    font-family: inherit;
    font-size: inherit;
    font-weight: 200;
    text-decoration: none;
    color: inherit;
}

/* --- Simple links */
.link-action {
    color: #006968;
    transition: color ease 0.2s;
}

.link-action:hover, 
.link-action.item-active {
    color: #c51718;
    transition: color ease 0.2s;
}

.link-action.action-icon {
    font-weight: 400;
}

.link-action.action-icon:before {
    content: "→\00a0";
    color: inherit;
    font-weight: 200;
}

.link-action.action-size-small {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: bolder;
    letter-spacing: 0.1em;
}

/* --- Expanders/Collapsers */
.expander-action {
    font-size: 12px;
    color: #006968;
    text-transform: uppercase;
    font-weight: bolder;
    letter-spacing: 0.1em;
    position: relative;
    padding-left: 18px;
    transition: color ease 0.2s;
}

.expander-action:hover {
    color: #c51718;
    transition: color ease 0.2s;
}

.expander-action:before {
    content: "";
    display: block;
    position: absolute;
    top: 2px;
    left: 0;
    height: 12px;
    width: 12px;
    background: transparent url("./img/icon_expander.svg") center no-repeat;
}

.expander-action.item-active:before {
    transform: rotateX(180deg);
}

/* --- Menu actions (global + subnavigation) */
.menu-action {
    font-weight: 400;
    letter-spacing: 0.1em;
    line-height: 1;
    color: #006968;
    display: block;
    width: 100%;
    height: 100%;
    transition: color ease 0.2s;
}

.menu-action:hover, 
.item-active .menu-action {
    color: #c51718;
    transition: color ease 0.2s;
}

/* --- Page actions */
/* Container + Link text */
.page-action {
    display: block;
    font-size: 12px;
    color: #006968;
    text-transform: uppercase;
    font-weight: bolder;
    letter-spacing: 0.1em;
    text-align: center;
    position: relative;
    padding-top: 50px;
    transition: color ease 0.2s;
}

.page-action.action-horizontal {
    text-align: left;
    padding: 12px 0 0 50px;
    min-height: 40px;
}

.page-action:hover {
    color: #c51718;
    transition: color ease 0.2s;
}

/* Icons */
.page-action:before {
    content: "";
    display: block;
    position: absolute;
    width: 40px;
    height: 40px;
    border: 5px solid rgba(153,195,194,0.5);
    border-radius: 50%;
    top: 0;
    left: 50%;
    margin-left: -20px;
    background: transparent url("./img/icon_page_back.svg") center -5px no-repeat;
    transition: border-color ease 0.2s;
}

.page-action:hover:before {
    border-color: rgba(236,95,106,0.5);
    transition: border-color ease 0.2s;
}

.page-action.action-horizontal:before {
    left: 0;
    margin-left: 0;
}

.page-action.action-up:before {
    transform: rotateZ(90deg);
}

.page-action.action-next:before {
    transform: rotateZ(180deg);
}

.page-action.action-close:before {
    background-image: url("./img/icon_page_close.svg");
}

.page-action.action-download:before {
    background-image: url("./img/icon_page_download.svg");
}

/* !-------------------------------------------- */
/* !COMPONENT: Graphical headers */
/* !-------------------------------------------- */

/* --- General container */
.substance-header {
    border-bottom: 1px solid #f39fa6;
    padding: 0 0 0 20px;
    margin-bottom: 20px;
    position: relative;
}

.substance-header.header-box {
    height: 140px;
    background: #ccc;
    margin-bottom: 30px;
    border-bottom: none;
    border-radius: 0 20px 20px 0;
}

/* Background image colorizer */
.substance-header.header-box:before {
    content: "";
    display: block;
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 100%;
    background: url("./img/back_header.svg") 0 0 no-repeat;
    border-radius: 0 20px 20px 0;
    background-image: url("./img/back_header2.svg");
}

.substance-header.header-box.header-inverse:before {
    background-image: url("./img/back_header_inverse3.svg");
}

/* Column bar */
.substance-header.header-box:after {
    content: "";
    display: block;
    position: absolute;
    bottom: -10px;
    left: 254px;
    height: 19px;
    width: 658px;
    background: rgba(197,23,24,0.5);
}

.substance-header.header-box.header-inverse:after {
    background: rgba(0,105,104,0.5);
}

/* --- Headline */
.substance-header:not(.header-box) .header-title {
    position: relative;
    bottom: -5px;
    margin-top: -5px;
    display: inline-block;
    font-size: 20px;
    font-weight: 200;
    font-style: italic;
    color: #c51718;
    padding-bottom: 5px;
    border-bottom: 9px solid rgba(197,23,24,0.3);
}

.substance-header.header-box .header-title {
    position: absolute;
    left: 254px;
    top: 50%;
    padding-right: 20px;
    font-size: 30px;
    font-weight: 400;
    font-style: italic;
    color: #fff;
    transform: translateY(-50%);
}

.substance-header.header-box .header-title em {
    font-weight: bolder;
    font-style: italic;
}

/* --- Helper elements */
.substance-header .header-action {
    position: absolute;
    bottom: 10px;
    right: 0;
}

/* !-------------------------------------------- */
/* !COMPONENT: Graphical time/date-stamps */
/* !-------------------------------------------- */

.substance-timestamp {
    color: #fff;
}

/* Vertical arrangement */
.substance-timestamp.timestamp-vertical {
    width: 68px;
    text-align: center;
}

/* --- Day (only used for vertical short display and complete display) */
/* Default color red */
.substance-timestamp .date-day {
    display: inline-block;
    vertical-align: middle;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    overflow: hidden;
    line-height: 34px;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    background: rgba(243,159,166,0.8);
    position: relative;
    z-index: 10;
}

/* Vertical arrangement */
.substance-timestamp.timestamp-vertical.vertical-light .date-day {
    background: rgba(153,195,194,0.8);
}

/* Complete arrangement */
/* Default color green */
.substance-timestamp.timestamp-complete .date-day {
    position: relative;
    right: -15px;
    background: rgba(153,195,194,0.8);
}

/* Emphasis & outline version */
.substance-timestamp.timestamp-complete.timestamp-emphasis .date-day {
    background: rgba(243,159,166,0.8);
}

.substance-timestamp.timestamp-complete.timestamp-outline .date-day {
    background: #fff;
    border: 2px solid rgba(153,195,194,0.8);
    color: rgba(153,195,194,0.8);
    line-height: 28px;
}

.substance-timestamp.timestamp-complete.timestamp-outline.timestamp-emphasis .date-day {
    border-color: rgba(243,159,166,0.5);
    color: rgba(243,159,166,0.8);
}

/* --- Month */
/* Default color red */
.substance-timestamp .date-month {
    display: inline-block;
    vertical-align: middle;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    line-height: 50px;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    background: rgba(243,159,166,0.7);
}

.substance-timestamp .date-month mark {
    color: inherit;
    background: none;
    display: block;
}

/* Vertical arrangement */
.substance-timestamp.timestamp-vertical .date-month {
    font-size: 16px;
    position: relative;
    top: -13px;
}

.substance-timestamp.timestamp-vertical.vertical-light .date-month {
    background: rgba(143,214,217,0.7);
}

/* Complete arrangement */
/* Default color green */
.substance-timestamp.timestamp-complete .date-month {
    background: rgba(143,214,217,0.7);
    position: relative;
    z-index: 11;
}

/* Emphasis & outline version */
.substance-timestamp.timestamp-complete.timestamp-emphasis .date-month {
    background: rgba(243,159,166,0.7);
}

.substance-timestamp.timestamp-complete.timestamp-outline .date-month {
    background: #fff;
    border: 2px solid rgba(143,214,217,0.7);
    color: rgba(143,214,217,0.7);
    line-height: 44px;
}

.substance-timestamp.timestamp-complete.timestamp-outline.timestamp-emphasis .date-month {
    border-color: rgba(243,159,166,0.7);
    color: rgba(243,159,166,0.7);
}

/* --- Year (not used in vertical short display) */
/* Default color red */
.substance-timestamp .date-year {
    display: inline-block;
    position: relative;
    left: -15px;
    vertical-align: middle;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    overflow: hidden;
    line-height: 68px;
    font-size: 20px;
    font-weight: 400;
    text-align: center;
    background: rgba(243,159,166,0.5);
}

/* Complete arrangement */
/* Default color green */
.substance-timestamp.timestamp-complete .date-year {
    width: 45px;
    height: 45px;
    line-height: 45px;
    font-size: 12px;
    background: rgba(153,195,194,0.5);
    z-index: 12;
}

/* Emphasis & outline version */
.substance-timestamp.timestamp-complete.timestamp-emphasis .date-year {
    background: rgba(243,159,166,0.5);
}

.substance-timestamp.timestamp-complete.timestamp-outline .date-year {
    background: #fff;
    border: 2px solid rgba(153,195,194,0.5);
    color: rgba(153,195,194,0.7);
    line-height: 39px;
    z-index: 10;
}

.substance-timestamp.timestamp-complete.timestamp-outline.timestamp-emphasis .date-year {
    border-color: rgba(243,159,166,0.5);
    color: rgba(243,159,166,0.8);
}

/* !-------------------------------------------- */
/* !COMPONENT: Images with container */
/* !-------------------------------------------- */

.substance-image {
    border: 1px solid rgba(213,205,192,0.7);
    padding: 10px;
}

.substance-image.image-sidekick {
    padding: 0;
    border: none;
}

.substance-image img {
    display: inline-block;
    max-width: 100%;
    height: auto;
}

.substance-image.image-sidekick img {
    width: 100%;
}

/* !-------------------------------------------- */
/* !COMPONENT: Embedded videos */
/* !-------------------------------------------- */

.substance-video {
    padding: 10px 10px 56.25% 10px;
    overflow: hidden;
    position: relative;
}

.substance-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* !-------------------------------------------- */
/* !COMPONENT: Structured text (from Markdown sources) */
/* !-------------------------------------------- */

.substance-richtext {
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
}

.substance-richtext.richtext-inverse {
    color: #fff;
}

.substance-richtext.richtext-flattened {
    font-size: inherit;
    line-height: inherit;
}

.substance-richtext * {
    font-weight: 200;
    line-height: 1.4;
}

.substance-richtext.richtext-flattened * {
    font-weight: inherit;
}

/* --- Truncated, flat snippets */
/* We're assuming font-size 14px here because it's currently used in all instances */

.substance-richtext.richtext-flattened.richtext-truncated {
    overflow: hidden;
    position: relative;
    max-height: 55px;
}

.substance-richtext.richtext-flattened.richtext-truncated:after {
    content: "";
    display: block;
    position: absolute;
    bottom: 0;
    right: 0;
    height: 20px;
    width: 50%;
    background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,1));
}

/* --- Headlines */
/* h1 shouldn't be used here */
.substance-richtext h1, 
.substance-richtext h2 {
    margin-top: 1.2em;
    font-size: 22px;
    font-style: italic;
    color: #c51718;
    padding-bottom: 0.1em;
    padding-left: 32px;
    padding-right: 32px;
    margin-left: -32px;
    margin-right: -32px;
    border-bottom: 1px solid #f39fa6;
    margin-bottom: 0.4em;
}

.substance-richtext h3 {
    margin-top: 1.2em;
    font-size: 18px;
    font-style: italic;
    color: #c51718;
    margin-bottom: 0.3em;
}

/* h5 + h6 shouldn't be used here */
.substance-richtext h4, 
.substance-richtext h5, 
.substance-richtext h6 {
    font-size: 15px;
    font-weight: 400;
    font-style: italic;
    color: #c51718;
    margin-bottom: 0.3em;
}

.substance-richtext h1:first-child, 
.substance-richtext h2:first-child, 
.substance-richtext h3:first-child, 
.substance-richtext h4:first-child, 
.substance-richtext h5:first-child, 
.substance-richtext h6:first-child {
    margin-top: 0;
}

.substance-richtext.richtext-flattened h1, 
.substance-richtext.richtext-flattened h2, 
.substance-richtext.richtext-flattened h3, 
.substance-richtext.richtext-flattened h4, 
.substance-richtext.richtext-flattened h5, 
.substance-richtext.richtext-flattened h6 {
    display: inline;
    font-size: inherit;
    line-height: inherit;
    font-style: normal;
    margin: 0;
    padding: 0;
    border: none;
    color: inherit;
}

/* --- Paragraphs + emphasis */
.substance-richtext p {
    margin-bottom: 0.9em;
}

.substance-richtext.richtext-flattened p {
    display: inline;
    margin: 0;
}

/* Emphasis */
.substance-richtext em, 
.substance-richtext b {
    font-weight: 400;
}

.substance-richtext strong {
    font-weight: 700;
    color: #444;
}

.substance-richtext a strong {
    color: inherit;
}

.substance-richtext i {
    font-style: italic;
}

.substance-richtext.richtext-flattened em, 
.substance-richtext.richtext-flattened b, 
.substance-richtext.richtext-flattened i, 
.substance-richtext.richtext-flattened strong {
    font-weight: inherit;
    text-decoration: none;
    color: inherit;
}

/* Strike-through */
.substance-richtext del {
    font-weight: inherit;
}

.substance-richtext.richtext-flattened del {
    text-decoration: none;
}

/* --- Embedded links */
.substance-richtext a {
    font-weight: 400;
    display: inline;
}

.substance-richtext a:before {
    content: "→\00a0";
    color: inherit;
    font-weight: 200;
}

.substance-richtext a:not([class]) {
    color: #006968;
    transition: color ease 0.2s;
}

.substance-richtext.richtext-inverse a:not([class]) {
    color: #fff;
    text-decoration: underline;
    transition: opacity ease 0.2s;
}

.substance-richtext a:not([class]):hover {
    color: #c51718;
    transition: color ease 0.2s;
}

.substance-richtext.richtext-inverse a:not([class]):hover {
    color: #fff;
    opacity: 0.75;
    transition: opacity ease 0.2s;
}

.substance-richtext.richtext-flattened a, 
.substance-richtext.richtext-flattened a:hover {
    pointer-events: none;
    font-weight: inherit;
    color: inherit;
    display: inline;
    cursor: default;
    opacity: 1;
    text-decoration: none;
}

.substance-richtext.richtext-flattened a:before {
    content: "";
}

/* --- Bullet lists */
.substance-richtext ul, 
.substance-richtext ol {
    margin-bottom: 0.9em;
}

.substance-richtext ol {
    counter-reset: li;
}

.substance-richtext.richtext-flattened ul, 
.substance-richtext.richtext-flattened ol {
    display: inline;
    margin: 0;
}

.substance-richtext li {
    margin-left: -32px;
    padding-left: 32px;
    position: relative;
    margin-bottom: 0.6em;
}

.substance-richtext li:last-child {
    margin-bottom: 0;
}

.substance-richtext.richtext-flattened li {
    display: inline;
    padding: 0;
    margin: 0;
}

.substance-richtext li:before {
    content: "";
    display: block;
    position: absolute;
    left: 8px;
    top: 0.355em;
    height: 10px;
    width: 10px;
    border: 5px solid rgba(236,95,106,0.6);
    border-radius: 50%;
}

.substance-richtext ol li:before {
    content: counter(li);
    counter-increment: li;
    top: -1px;
    left: -4px;
    height: 24px;
    width: 24px;
    border: none;
    border-radius: 50%;
    background: rgba(236,95,106,0.6);
    font-weight: 700;
    line-height: 22px;
    text-align: center;
    color: #fff;
}

.substance-richtext.richtext-flattened li:before {
    display: none;
}

.substance-richtext li p {
    margin-bottom: 0.9em;
}

.substance-richtext.richtext-flattened li p {
    margin: 0;
}

/* --- Image & video containers */
.substance-richtext .substance-image,
.substance-richtext .substance-video {
    background: #fff;
    width: calc(100% + 64px);
    margin: 1.2em -32px 1.2em -32px;
}

/* Sidekick images */
.substance-richtext .substance-image.image-sidekick {
    position: relative;
    height: 1px;
    margin: 0;
}

/* Floating images */
.substance-richtext > img, 
.substance-richtext *:not(.substance-image) img {
    max-width: 100%;
    float: left;
    margin: 0 0.9em 0.4em 0;
}

.substance-richtext.richtext-flattened img {
    display: none;
}

/* --- Quotations & special boxes */
.substance-richtext blockquote {
    margin: 0 0 1.2em -20px;
    padding-left: 20px;
    border-left: 3px solid rgb(213,205,192);
    color: #444;
}

.substance-richtext blockquote *:last-child {
    margin-bottom: 0;
}

.substance-richtext.richtext-flattened blockquote {
    display: inline;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    color: inherit;
}
