article {
    line-height: 1.5;
    overflow-x: hidden; 
}
    /*article > * {
        overflow-x: auto;
        max-width: 100%;
    }*/
    article mjx-container {
        max-width: 100%;
        overflow-x: auto; /* vandret scroll ved behov */
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch; /* bedre scroll på iOS */
        margin: 0.5em 0;
        padding: 0.5em 0;
    }

    article h3 {
        font-size: 1.5rem; /* text-xl */
        font-weight: 600; /* font-semibold */
        margin-bottom: 0.5rem; /* mb-2 */
    }

    article blockquote {
        margin: 0.5rem 0; /* my-2 */
        padding-left: 1rem; /* pl-4 */
        border-left: 0.15rem solid #4a5565;
        color: #4a5565;
    }

    article a {
        color: #1c398e;
        /* text-decoration: underline;*/
    }

    article ul, article ol {
        margin: 0.5rem 0; /* mb-2 */
        padding-left: 3rem;
    }


        article ul li {
            margin-bottom: 0.5rem; /* mb-2 */
            list-style-type: disc;
        }

        article ol li {
            margin-bottom: 0.5rem; /* mb-2 */
            list-style-type: decimal;
        }

    article table {
        display: block; /* så tabellen kan få overflow */
        overflow-x: auto; /* scroll kun vandret når nødvendigt */
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch; /* bedre scroll på iOS */
        border-collapse: collapse;
        max-width: 96%;
        min-width: 50%;
        margin: 1rem auto; 
    }

        article table > thead,
        article table > tbody,
        article table > tfoot {
            display: table;
            min-width: 50%;
            max-width: 100%;
            margin:auto;
        }

    article th, article td {
        border: 1px solid #cbd5e0; /* border-gray-300 */
        padding: .5rem .75rem;
        text-align: center;
    }
    article th {
        background-color: #cbd5e1;
    }

    /* Gælder Chrome, Edge, Safari */
    article table::-webkit-scrollbar,
    article mjx-container::-webkit-scrollbar {
        height: 8px; /* horisontal scrollbar-højde */
        width: 0px; /* vertikal scrollbar-bredde */
    }

    article table::-webkit-scrollbar-track,
    article mjx-container::-webkit-scrollbar-track {
        background: transparent; /* evt. lys grå baggrund */
    }

    article table::-webkit-scrollbar-thumb,
    article mjx-container::-webkit-scrollbar-thumb {
        background-color: #cbd5e1; /* selve barens farve */
        border-radius: 4px;
    }

        article table::-webkit-scrollbar-thumb:hover,
        article mjx-container::-webkit-scrollbar-thumb:hover {
            background-color: #94a3b8; /* lidt mørkere ved hover */
        }

    /* Firefox */
    article table,
    article mjx-container {
        scrollbar-width: thin; /* smal scrollbar */
        scrollbar-color: #cbd5e1 transparent; /* farve på tommel + baggrund */
    }

mjx-container {
    cursor: pointer;
    max-width: 100%;
    overflow-x: auto; /* vandret scroll ved behov */
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch; /* bedre scroll på iOS */
}



@media (max-width: 640px) {
    article ul,
    article ol {
        padding-left: 1.25rem;
    }
    article table > thead,
    article table > tbody,
    article table > tfoot {
        min-width: 100%;
    }
}

.dark article blockquote {
    border-color: #6a7282;
    color: #6a7282;
}

.dark article a {
    color: #a3bffa;
}

.dark article th, .dark article td {
    border-color: #4b5563; /* border-gray-600 */
}
.dark article th {
    background-color: #1e293b;
   
}

.dark img,
.dark canvas {
    filter: invert(0.8);
    -webkit-filter: invert(0.8);
}

    .dark img.no-invert {
        filter: none; /* behold original farve */
    }

.dark mark {
    background-color: #38bdf8; /* sky-400 */
}

/* home svg in breadcrumbs */
.dark #home {
    fill: rgb(243 244 246); /* text-gray-100 */
}

#home {
    fill: rgb(31 41 55); /* text-gray-800 */
}


#drawing > div::-webkit-scrollbar {
    display: none;
}


/* Læg menupanelet ude til venstre og sæt transition */
#burger-menu .menu-panel {
    transform: translateX(-100%);
    transition: transform 0.3s ease-out;
}

/* Når <details> har [open], lad det glide tilbage til 0 */
#burger-menu[open] .menu-panel {
    transform: translateX(0);
}

/* Gør linjerne klar til animation omkring SVG’ens midte */
#burger-menu summary .burger-icon line {
    /* Sørg for at rotere vha. SVG’ens koordinatsystem */
    transform-box: fill-box;
    transform-origin: 98% 98%;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* animation når menu er open */
#burger-menu[open] summary .line1 {
    transform: rotate(-45deg);
    color: red;
}

#burger-menu[open] summary .line2 {
    opacity: 0;
}

#burger-menu[open] summary .line3 {
    transform: rotate(45deg);
    color: red;
}


/* language selector - Chrome, Edge, Safari */
details summary::-webkit-details-marker {
    display: none;
}

/* language selector - Firefox */
details summary::marker {
    content: none;
}



html body::-webkit-scrollbar {
    display: none;
}

/* Remove spinner from number inputs*/
input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* floating labels in inputs */
.peer:focus ~ label,
.peer:not(:placeholder-shown) ~ label {
    top: -0.875rem; /* -top-3.5 */
    font-size: 0.875rem; /* text-sm */
    color: #4b5563; /* text-gray-600 */
}

.math-input-container input {
    height: 3.5rem; /* 56px ved 16px base */
    box-sizing: border-box;
}

/* MathJax dialog */
.CtxtMenu_Info, CtxtMenu_MousePost {
    margin-left: 0 !important;
    margin-top: 0 !important;
    top: 25% !important;
    transform: translate(-50%, -25%);
    background-color: #45556c !important;
    padding: 0.3rem 0.3rem !important;
    border: 1px solid #45556c !important;
    min-width: 40% !important;
    max-width: 100% !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    overflow-x: auto;
}

.CtxtMenu_InfoTitle, .CtxtMenu_MenuClose {
    display: none !important;
}

.CtxtMenu_InfoContent {
    color: #000000 !important;
    background-color: #e2e8f0 !important;
    max-width: 100% !important;
    max-height: 50vh !important;
    padding: 3rem !important;
    margin: 0 !important;
    border-radius: 0.75rem !important;
}

/* Venstrejustér MathJax block-formler (v3, CHTML output) */
mjx-container[jax="CHTML"][display="true"] {
    justify-content: flex-start !important;
    text-align: left !important;
}
