body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f9;
    color: #333;
}

header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem;
    text-align: center;
}

.container {
    display: flex;
    min-height: calc(100vh - 80px); /* Adjust based on header height */
}

/* Navigation Styles */
#section-nav {
    width: 250px;
    background-color: #ecf0f1;
    border-right: 1px solid #ddd;
    padding: 1rem;
    overflow-y: auto;
}

#section-nav h2 {
    font-size: 1.2rem;
    margin-top: 0;
    border-bottom: 2px solid #bdc3c7;
    padding-bottom: 0.5rem;
}

#nav-list {
    list-style-type: none;
    padding: 0;
}

#nav-list li {
    margin-bottom: 0.5rem;
}

#nav-list a {
    display: block;
    padding: 0.5rem;
    text-decoration: none;
    color: #2c3e50;
    border-radius: 4px;
    transition: background-color 0.2s;
    cursor: pointer;
}

#nav-list a:hover, #nav-list a.active {
    background-color: #3498db;
    color: white;
}

/* Content Area Styles */
#content-area {
    flex-grow: 1;
    padding: 2rem;
    background-color: white;
    overflow-y: auto;
}

#section-title {
    margin-top: 0;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Tree Structure Styles */
.tree-node {
    margin-left: 1.5rem; /* Indentation for hierarchy */
    border-left: 1px solid #eee; /* Visual guide line */
    padding-left: 0.5rem;
}

.tree-node > .node-header {
    display: flex;
    align-items: center;
    padding: 0.25rem 0;
    cursor: default; /* Not necessarily clickable everywhere */
}

.toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    color: #7f8c8d;
    width: 1.5rem; /* Consistent width */
    text-align: center;
    margin-right: 0.25rem;
    transition: transform 0.2s;
}

.toggle-btn.expanded {
    transform: rotate(90deg);
}

.checkbox-wrapper {
    margin-right: 0.5rem;
}

.node-label {
    font-size: 1rem;
    cursor: pointer; /* Can click label to toggle expand/collapse too maybe? */
}

/* Styling for checked items (optional visual feedback) */
input[type="checkbox"]:checked + .node-label {
    text-decoration: line-through;
    color: #95a5a6;
}

/* Hide children when collapsed */
.children-container {
    display: none;
}

.children-container.expanded {
    display: block;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    #section-nav {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #ddd;
        max-height: 200px; /* collapsible nav maybe? */
    }
}