body {
    font-family: sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
    line-height: 1.6;
}

header {
    background-color: #333;
    color: #fff;
    padding: 1em 0;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

header h1 {
    margin: 0;
}

main {
    max-width: 1200px; /* Adjust as needed for wider layout */
    margin: 20px auto;
    padding: 0 20px; /* Add some horizontal padding */
}

/* Flexbox for Main Content Area */
.container {
    display: flex;
    gap: 20px; /* Space between sidebar and main content */
}

.sidebar {
    flex: 0 0 250px; /* Don't grow, don't shrink, base width 250px */
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    align-self: flex-start; /* Stick to the top */
    position: sticky; /* Make it stick as you scroll */
    top: 20px; /* Distance from the top when sticky */
    max-height: calc(100vh - 40px); /* Limit height for scrolling */
    overflow-y: auto; /* Enable scrolling if TOC is too long */
}

.sidebar h2 {
    margin-top: 0;
    color: #555;
    font-size: 1.2em;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

/* Styling the Table of Contents (Hugo renders it as ul/li) */
.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar ul li {
    margin-bottom: 5px;
}

.sidebar ul ul { /* Nested lists for sub-headings */
    margin-left: 15px;
    border-left: 1px dotted #ccc;
    padding-left: 5px;
}

.sidebar ul li a {
    text-decoration: none;
    color: #007bff;
    display: block;
    padding: 5px 0;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.sidebar ul li a:hover {
    background-color: #e9ecef;
    color: #0056b3;
}

/* Active link styling (you'd need JS for this if you want it dynamic based on scroll position) */
/* .sidebar ul li a.active {
    font-weight: bold;
    background-color: #007bff;
    color: #fff;
} */

.content-main {
    flex-grow: 1; /* Allows the main content to take up remaining space */
    background-color: #fff;
    padding: 20px 30px; /* More padding for readability */
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Basic styling for content elements */
.content-main h1, .content-main h2, .content-main h3 {
    color: #333;
    margin-top: 1.5em;
    padding-bottom: 0.3em;
    border-bottom: 1px solid #eee;
}

.content-main table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1em;
}

.content-main table th,
.content-main table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.content-main table th {
    background-color: #f2f2f2;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        flex-direction: column; /* Stack sidebar and content on small screens */
    }

    .sidebar {
        flex: auto; /* Allow sidebar to take full width */
        position: static; /* Remove sticky behavior on small screens */
        max-height: none;
        overflow-y: visible;
        margin-bottom: 20px; /* Space below sidebar */
    }
}

mark {
    /* Make it an inline-block to allow proper padding, margin, border */
    display: inline-block;
    vertical-align: middle; /* Helps align with surrounding text */

    /* Callout Box Styling */
    background-color: #fffbe6; /* Very light blue background (for 'note' style) */
    border: 1px solid #ffe58f; /* Medium blue border */
    border-radius: 4px; /* Slightly rounded corners */
    padding: 1em 2em; /* Padding around the text */
    margin: 0 0.4em; /* Small horizontal margin to separate from other text */

    /* Text Styling */
    color: #262626; /* Dark gray text for good contrast */
    font-weight: normal; /* Override potential browser defaults for mark */
    line-height: 1.4; /* Ensure good line height within the box */
    text-decoration: none; /* Remove any default underline if present */
    box-shadow: 0 1px 2px rgba(0,0,0,0.08); /* Subtle shadow for depth */
}

/* Optional: Add an Icon using a Pseudo-element */
mark::before {
    content: '⚠️'; /* Unicode character for info symbol (you can change this!) */
    /* Other options: '💡' (lightbulb), '⚠️' (warning), '✅' (check), '🔥' (fire) */
    margin-right: 0.4em; /* Space between icon and text */
    font-size: 0.9em; /* Adjust icon size relative to text */
    vertical-align: -0.1em; /* Fine-tune vertical alignment */
}
