:root {
    --primary-color: #007bff; /* 主题蓝 */
    --secondary-color: #6c757d; /* 灰色 */
    --background-color: #f8f9fa; /* 浅灰背景 */
    --text-color: #343a40; /* 深灰文字 */
    --light-gray: #e9ecef;
    --border-color: #dee2e6;
    --info-color: #17a2b8; /* Info Blue */
    --warning-color: #fd7e14; /* Orange */
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    margin: 0;
    padding: 0;
    scroll-behavior: smooth; /* Smooth scroll for internal links if needed */
}

header {
    background-color: var(--primary-color);
    color: white;
    padding: 2rem 1rem;
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    margin-bottom: 0.5rem;
    font-size: 2.5rem;
    font-weight: 600;
}

header .subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

main {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1rem;
}

section {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.07);
    overflow: hidden; /* Contains floats */
}

section h2 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--light-gray);
    padding-bottom: 0.5rem;
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    font-weight: 500;
}

section h3 {
    color: var(--text-color);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 500;
}

article { /* Use article tag for main text content within sections */
    font-size: 1rem;
}

p {
    margin-bottom: 1rem;
}

strong {
    color: var(--primary-color);
    font-weight: 600;
}

ul, ol {
    margin-bottom: 1rem;
    padding-left: 25px;
}

li {
    margin-bottom: 0.6rem;
}

ol li {
    margin-bottom: 0.8rem; /* More space for ordered list items */
}

ol ul { /* Nested lists */
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    padding-left: 20px;
}


.highlight-box {
    background-color: var(--light-gray);
    border-left: 5px solid var(--primary-color);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    font-size: 1.1rem;
    font-weight: bold;
    text-align: center;
}

.chart-container {
    width: 100%;
    max-width: 700px; /* Limit chart max width */
    margin: 1.5rem auto; /* Center */
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: #fff; /* White background for chart area */
    position: relative; /* Needed for chart responsiveness */
    height: 350px; /* Default height, adjust per chart if needed */
}

.chart-note {
    font-size: 0.85rem;
    color: var(--secondary-color);
    text-align: center;
    margin-top: 0.5rem;
}

/* For side-by-side layout - chart and text */
.chart-half {
    width: calc(50% - 1rem); /* Calculate width considering gap */
    float: left;
    margin-right: 2rem; /* Space between chart and text */
    box-sizing: border-box;
    margin-bottom: 1rem; /* Space below when stacked */
}
.text-half {
    width: calc(50% - 1rem);
    float: left;
    box-sizing: border-box;
}

/* Clearfix for float containment */
section::after, .content-split::after {
    content: "";
    display: table;
    clear: both;
}

/* Styles for side-by-side text and stressors chart */
.content-split {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    gap: 2rem; /* Space between text and chart */
    margin-bottom: 1.5rem;
    align-items: flex-start; /* Align items at the top */
}

.text-part {
    flex: 1; /* Allow text to take available space */
    min-width: 300px; /* Minimum width before wrapping */
}

.chart-part {
    flex: 1;
    display: flex;
    justify-content: center; /* Center chart horizontally */
    align-items: center;
    min-width: 300px;
}

.chart-container.small-chart {
    max-width: 450px; /* Smaller max width */
    height: 300px; /* Adjust height */
    margin: 0 auto; /* Ensure centering */
    padding: 0.5rem;
}

/* Simulated Student Voice Blockquote */
.student-voice {
    background-color: #f0f8ff; /* Alice blue */
    border-left: 5px solid var(--info-color); /* Info color */
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #555;
    border-radius: 4px;
}
.student-voice p {
    margin-bottom: 0;
}
.student-voice strong { /* Make the "(模拟学生心声)" bold but not primary color */
    color: inherit;
    font-weight: bold;
}


/* Simulated Case Study Styles */
.case-study {
    background-color: #fffaf0; /* Floral white */
    border: 1px solid var(--warning-color); /* Orange border */
    border-radius: 6px;
    padding: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1.5rem;
}
.case-study h3 {
    color: var(--warning-color); /* Orange title */
    margin-top: 0;
    border-bottom: 1px dashed var(--warning-color);
    padding-bottom: 0.3rem;
    margin-bottom: 1rem;
    font-size: 1.2rem; /* Slightly smaller heading */
}
.case-study p, .case-study ul {
    font-size: 0.95rem;
    color: #495057; /* Darker gray text */
    margin-bottom: 0.8rem;
}
.case-study ul {
    padding-left: 18px;
}
.case-study strong { /* Make bold text standard color within case */
    color: inherit;
    font-weight: bold;
}

.case-study .case-note {
    font-size: 0.8rem;
    font-style: italic;
    color: var(--secondary-color);
    text-align: center;
    margin-top: 1rem;
    margin-bottom: 0;
}

/* Intervention Grid Styles */
.intervention-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsive grid */
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.intervention-item {
    background-color: var(--light-gray);
    padding: 1.5rem;
    border-radius: 6px;
    text-align: center;
    border: 1px solid var(--border-color);
    position: relative; /* Needed for icon positioning */
    transition: background-color 0.3s ease;
}

.intervention-item .icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.intervention-item h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.15rem; /* Slightly larger heading */
    display: inline-block; /* Allow icon beside it potentially */
    color: var(--primary-color); /* Make heading stand out */
}

.intervention-item p.summary {
    font-size: 0.95rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem; /* Space before details might appear */
    min-height: 3em; /* Reserve some space for summary text */
}


/* Intervention Item Interactivity */
.intervention-item.interactive {
    cursor: pointer;
}
.intervention-item.interactive:hover {
    background-color: #ddeeff; /* Light blue hover */
    border-color: #b8daff;
}

.intervention-item .details {
    display: none; /* Initially hidden */
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border-color);
    text-align: left; /* Align detail text left */
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.intervention-item.active .details {
    display: block; /* Show details when active */
}

.intervention-item .toggle-icon {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.2rem;
    transition: transform 0.3s ease;
    line-height: 1; /* Ensure proper vertical alignment */
}

.intervention-item.active .toggle-icon {
    transform: rotate(45deg); /* Change '+' to 'x' visually */
}

.click-hint {
    font-size: 0.9rem;
    color: var(--secondary-color);
    font-style: italic;
    margin-left: 0.5rem;
}


#sources ul {
    list-style-type: disc; /* Use bullets for sources */
}

#sources li {
     font-size: 0.9rem;
     margin-bottom: 0.4rem;
}
#sources strong { /* Make bold text standard color */
     color: inherit;
     font-weight: bold;
}


footer {
    text-align: center;
    margin-top: 3rem;
    padding: 1.5rem;
    font-size: 0.9rem;
    color: var(--secondary-color);
    border-top: 1px solid var(--border-color);
    background-color: #e9ecef; /* Light footer background */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    section {
        padding: 1.5rem;
    }
    section h2 {
        font-size: 1.6rem;
    }
     section h3 {
        font-size: 1.2rem;
    }
    /* Stack side-by-side chart/text */
    .chart-half, .text-half {
        width: 100%;
        float: none;
        margin-right: 0;
        margin-bottom: 1.5rem;
    }
    .chart-container.chart-half {
         margin-bottom: 1rem;
         height: 300px; /* Adjust height on mobile */
    }
    /* Stack stressors chart/text */
     .content-split {
        flex-direction: column;
        gap: 1rem;
    }
     .chart-part {
        order: -1; /* Move chart above text */
     }
    .chart-container.small-chart {
        max-width: 100%;
        height: 280px; /* Adjust height */
    }

    .click-hint {
        display: block;
        text-align: center;
        margin-left: 0;
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
     header h1 {
        font-size: 1.8rem;
    }
     header .subtitle {
         font-size: 1rem;
     }
     section {
        padding: 1rem;
    }
    section h2 {
        font-size: 1.4rem;
    }
    section h3 {
        font-size: 1.1rem;
    }
    .intervention-grid {
        grid-template-columns: 1fr; /* Single column */
        gap: 1rem;
    }
    .chart-container {
        height: 280px; /* Further adjust chart height */
    }
    .chart-container.small-chart {
        height: 250px;
    }
     .intervention-item .toggle-icon {
        top: 1rem;
        right: 1rem;
    }
    ul, ol {
        padding-left: 20px; /* Reduce list indent */
    }
}