/* Dark mode - Light Pastel Purple Inversion */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #E1DAED; /* Very light pastel purple for "dark" mode background */
        color: #4F356B; /* Darker pastel purple for text (for contrast) */
    }

    blockquote {
        background: #EDE8F5; /* Lighter pastel purple for blockquote */
    }

    a {
        color: #A687D0; /* Slightly more vibrant pastel purple for links */
    }

    header {
        background: #A687D0; /* Slightly more vibrant pastel purple header */
        border-bottom: 2px dotted #C7B4DE; /* Pastel purple dotted border */
    }

    .article-meta, .menu a {
        background: #E1DAED; /* Very light pastel purple */
        color: #4F356B; /* Darker pastel purple text */
    }

    table {
        margin: auto;
        border-top: 1px solid #B4A3CC; /* Darker pastel purple for table borders */
        border-bottom: 1px solid #B4A3CC;
    }
    table thead th { border-bottom: 1px solid #B4A3CC; }
    th, td { padding: 5px; }
    tr:nth-child(even) { background: #F2EDF7; } /* Even lighter pastel purple for even rows */

}


/* Light mode - Actual Pastel Pink (Main Theme) */
@media (prefers-color-scheme: light) {
    body {
        background-color: #FFD1DC; /* Your actual pastel pink body background */
        color: #4F356B; /* Darker pastel purple for main text (for contrast) */
    }

    blockquote {
        background: #FFEBF0; /* Lighter pink for subtle blockquote contrast */
    }

    a {
        color: #C7B4DE; /* Pastel purple for links */
    }

    header {
        background: #C7B4DE; /* Pastel purple header */
    }

    .article-meta, .menu a {
        background: #FFD1DC; /* Pastel pink */
        color: #4F356B; /* Darker pastel purple text */
    }

    table {
        margin: auto;
        border-top: 1px solid #DBCFE0; /* Muted pastel purple for table borders */
        border-bottom: 1px solid #DBCFE0;
    }
    table thead th { border-bottom: 1px solid #DBCFE0; }
    th, td { padding: 5px; }
    tr:nth-child(even) { background: #FFEBF0; } /* Lighter pink for even rows */

}


/* Shared styles */
body {
    max-width: 800px;
    margin: auto;
    padding: .2em;
    line-height: 1.5em;
}

h1 {
    line-height: 1.5em;
}

#TableOfContents, #TOC {
    border: 1px solid light-dark(#DBCFE0, #B4A3CC); /* Pastel border that adapts to light/dark mode */
    border-radius: 5px;
}

/* Header and Footer */
.menu li { display: inline-block; }
.article-meta, .menu a {
    text-decoration: none;
    padding: 5px;
    border-radius: 5px;
    border-style: dotted;
    border-width: 1px;
    margin: 20px 0px 20px 0px;
}

.terms { font-size: .9em; }
.menu, .article-meta, footer { text-align: center; }
.title { font-size: 1.1em; }
footer a { text-decoration: none; }

.pull-left {
    float: left
}
.pull-right {
    float: right
}

a {
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

header {
    position: relative;
    width: 100%;
    height: 1.75rem;
    font-size: 1rem;
}

header ul,
header ol {
    margin: 0;
    padding: 0;
    list-style: none
}
header nav {
    padding: 0 0.5rem
}

header a {
    color: #fff; /* White text for header links (to ensure contrast on pastel purple header) */
    line-height: 1.75rem;
    padding: 0 0.5rem
}
header a:hover,
header .current a {
    color: #fff
}

/* Code Boxes */
pre {
    border: 2px solid light-dark(#C7B4DE, #A687D0); /* Pastel purple border that adapts to light/dark mode */
    padding: 1em;
    overflow-x: auto;
}
pre code { background: none; }

code {
    background-color: light-dark(#F8EBFD, #EDE8F5); /* Pastel background that adapts to light/dark mode */
    border-radius: 3px;
    padding: 0.2em;
    overflow-x: auto;
}

/* Images, tables, misc. */
img, iframe, video {
    max-width: 100%;
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

main {
    hyphens: auto;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7em;
    hyphens: auto;
    display: block;
    font-size: 1.1em;
}
main a {
    font-weight: bold;
}

blockquote {
    border-left: 5px solid light-dark(#C7B4DE, #A687D0); /* Pastel purple border that adapts to light/dark mode */
    padding: 3px 1em 3px;
}

.content-wrapper {
    padding: 0px 12px 0px 12px;
}
#foxy {
    min-width: 40px;
    float: right;
    padding: 10px;
    display: block;
}


#table-of-contents {
}

/* Small devices, phones */
@media only screen and (min-width : 480px) {
    #foxy {
        min-width: 40px;
        float: center;
        padding: 10px 10px 10px 20px;
        display: block;
    }

}

/* Desktop screen styles for TOC */
@media screen and (min-width: 768px) {
    #table-of-contents {
        position: fixed;
        top: 50%;
        right: 15px;
        transform: translateY(-50%);
        background-color: light-dark(#FFD1DC, #E1DAED); /* Pastel pink or light pastel purple background that adapts to light/dark mode */
        padding: 10px;
        box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
        width: 250px;
        max-height: 70vh;
        overflow-y: auto;
    }
}

.flex-container {
    display: flex;
    flex-direction: column; /* Stack items vertically */
    align-items: center; /* Center items horizontally */
    margin: 0; /* Remove any default margins */
}

.responsive-video {
    width: 960px; /* Set desired width */
    height: auto; /* Maintain aspect ratio */
    margin-bottom: 0; /* Remove bottom margin */
}

