/* =========================
   VARIABLEN
   ========================= */

:root {
    --color-text: #334155;
    --color-border: #cbd5e1;
    --color-bg: white;
    --color-bg-blue: #d6eaff;
    --radius: .375rem;
    --container-width: 64rem;
}


/* =========================
   FUNDAMENT / RESET
   ========================= */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

body {
    margin: 0;
    overflow-y: scroll;
    color: var(--color-text);
    background: var(--color-bg);
    font-family: ui-sans-serif, system-ui, sans-serif;
    line-height: 1.6;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

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

/* =========================
   LAYOUT 
   ========================= */

main {
    max-width: var(--container-width);
    margin-inline: auto;
    padding-inline: 1rem;
    padding-top: 6rem;
}  

section {
    border:1px solid var(--color-border);
    border-radius:var(--radius);
    padding: 1.5rem;
    margin-bottom:1.5rem;
    display:flow-root;
} 


/* =========================
   HEADER 
   ========================= */

.header {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-bg);
    z-index: 1000;
}

.header-inner {
    max-width: var(--container-width);
    margin-inline: auto;
    height: 4rem;
    padding-inline: 1rem;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: .75rem;
}

.brand-logo-link,
.brand-title-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.logo {
    height: 1.5rem;
    width: auto;
}

.brand-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}


/* =========================
   NAVIGATION  
   ========================= */

.nav-mobile {
    display: flex;
    flex-direction: column;
}

.nav-mobile > div + div {
    margin-top: 1.5rem;
}

.nav-mobile > div {
    display: flex;
    flex-direction: column;
}

.nav-mobile a {
    padding-block: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.nav-responsive {
    display: none;
    flex-direction: row;
    align-items: center;
}

.nav-desktop {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.nav-desktop > div + div, .nav-responsive > div + div {
    margin-left: 4rem;
}

.nav-desktop > div, .nav-responsive > div {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-toggle, .nav-toggle-responsive {
    font-size: 1.25rem;
    text-decoration: none;
}


/* =========================
   TYPOGRAPHIE / LINKS
   ========================= */

a {
    text-decoration: underline;
    color: inherit;
    text-underline-offset: .125rem;
}

nav a {
    text-decoration: none;
}

h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 0;
}

h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 0;
}

h2 a{
    text-decoration: none;
}

/* =========================
   BUTTONS
   ========================= */

button, .button {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-bg);
    padding: .5rem 1rem;
    text-decoration: none;
    cursor: pointer;
}
 

/* =========================
   FORMULARE
   ========================= */

form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

form button {
    align-self: flex-start;
}

input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
textarea,
select {
    width: 100%;
    border:1px solid var(--color-border);
    border-radius:var(--radius);
    background:var(--color-bg);
    padding: .5rem .75rem;
}


/* =========================
   TABELLEN
   ========================= */

table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

th, td {
    padding: 1rem;
    border-bottom: 1px solid var(--color-border); 
    text-align: left;  
}

th {
    font-weight: 600;
}


/* =========================
   DETAILS
   ========================= */

details {
    border-bottom:1px solid var(--color-border);
    padding-block: .75rem;
}

summary {
    cursor: pointer;
    font-weight: 500;
}


details > summary + * {
  margin-top: 1rem;
  /*display: block;*/
}


/* =========================
   CONTENT ELEMENTE
   ========================= */

.formel,
.formel-liste {
    display: inline-block;
    margin-bottom: 1rem;
    background-color: var(--color-bg-blue); 
}
       
mjx-container[jax="CHTML"][display="true"] {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    display: block;
    padding: 0.5em 0;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

.heroimage {
    width: 100%;
    border-radius:var(--radius);
    margin-bottom: 2rem;
}

.contentimage {
    float: left;
    width: 10rem;
    border-radius:var(--radius);
    margin-right: 1.5rem;
    margin-bottom: 0.5rem;
}


/* =========================
   HILFSKLASSEN
   ========================= */

.top {
    display: block;
    margin-bottom: .5rem;
}

.left   { 
    text-align:left; 
}

.center { 
    text-align:center; 
}

.right  { 
    text-align:right; 
}

.active {
    text-decoration: underline;
    text-underline-offset: .25rem;
}

.icon {
    width: 1.25rem;
    height: 1.25rem;
    flex: none;
    fill: currentColor;
}
   
.card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
}


.info, .info-border {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 1rem 1rem 1rem;
    margin-bottom: 1rem;    
}

.border-bottom, .info-border {
    border-bottom: 1px solid var(--color-border);    
}

.number_pos {
    color: green;
}

.number_neg {
    color: red;
}


/* =========================
   RESPONSIVE 
   ========================= */

@media (min-width: 1024px) {
    .nav-responsive {
        display: flex;
    }

    .nav-toggle-responsive {
        display: none;
    }
}
