:root {
    --brand-red: #E60012;
    --brand-dark: #111111;
    /* 图表配色方案 */
    --chart-sd: #D05C46; /* Strongly Disagree */
    --chart-d: #F4A485;  /* Disagree */
    --chart-n: #E0E0E0;  /* Neutral */
    --chart-a: #90C2E7;  /* Agree */
    --chart-sa: #3D84B8; /* Strongly Agree */
}
body {
    font-family: 'Noto Sans SC', sans-serif;
    color: #333;
    background: #fff;
}

/* 文章排版优化 */
.prose p { margin-bottom: 1.5rem; line-height: 1.8; color: #4b5563; }
.prose h2 { font-size: 1.75rem; font-weight: 800; color: #111; margin-top: 4rem; margin-bottom: 1.5rem; letter-spacing: -0.02em; border-bottom: 1px solid #eee; padding-bottom: 1rem; }
.prose h3 { font-size: 1.25rem; font-weight: 700; color: #374151; margin-top: 2.5rem; margin-bottom: 1.5rem; display: flex; align-items: center; gap: 0.5rem; }
.prose h3::before { content: ''; display: block; width: 4px; height: 1.2em; background: var(--brand-red); border-radius: 2px; }
.prose ul { list-style-type: disc; padding-left: 1.5rem; margin-bottom: 1.5rem; color: #4b5563; }
.prose li { margin-bottom: 0.5rem; }
.prose strong { color: #1f2937; font-weight: 700; }

/* 引用块样式 */
.quote-box {
    border-left: 4px solid var(--brand-red);
    background: #FFF5F5;
    padding: 1.5rem;
    font-style: italic;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
    color: #555;
}

/* -------------------------------------
    发散条形图核心样式优化 (响应式防溢出)
    ------------------------------------- */
.diverge-bar {
    width: 0; /* 初始宽度由JS接管，为了实现平滑生长动画 */
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: white;
    position: relative; /* 核心：让绝对定位的标签基于此定位 */
    transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
    opacity: 0; /* 加载前隐藏，避免标签闪烁 */
    box-sizing: border-box;
}
.loaded .diverge-bar { 
    opacity: 1; 
}
.diverge-bar.text-dark { color: #666; }

/* 动态调整的文本标签 */
.chart-label {
    white-space: nowrap;
    z-index: 10;
    transition: all 0.3s ease; /* 进出条形图时增加平滑过渡 */
    pointer-events: none; /* 防止遮挡悬停事件 */
}

/* 图表容器通用样式 */
.chart-container {
    background: white;
    border: 1px solid #f3f4f6;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.chart-title {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: #1f2937;
}
.chart-legend {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    font-size: 0.75rem;
    color: #6b7280;
}
.legend-item { display: flex; align-items: center; gap: 0.25rem; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; }

.question-row {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2.5rem; /* 增加底部间距，为弹出的标签留出空间 */
}
@media (min-width: 768px) {
    .question-row { flex-direction: row; align-items: center; gap: 2rem; }
}
.question-text { flex: 0 0 35%; text-align: left; }
@media (min-width: 768px) { .question-text { text-align: right; } }

.question-cn { font-weight: 700; font-size: 0.875rem; color: #1f2937; line-height: 1.4; }
.question-en { font-size: 0.75rem; color: #9ca3af; font-style: italic; margin-top: 0.25rem; line-height: 1.2; }

.bar-wrapper { flex: 1; position: relative; height: 40px; display: flex; }
.center-line {
    position: absolute; left: 50%; top: -5px; bottom: -5px; width: 1px; background: #d1d5db; z-index: 10;
}
.left-stack { width: 50%; display: flex; justify-content: flex-end; padding-right: 1px; }
.right-stack { width: 50%; display: flex; justify-content: flex-start; padding-left: 1px; }

/* 政策卡片样式 */
.policy-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}
.policy-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-color: var(--brand-red);
}
.policy-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.policy-tag.red { background: #FEF2F2; color: var(--brand-red); }
.policy-tag.blue { background: #EFF6FF; color: var(--chart-sa); }

/* 趋势时间轴样式 */
.trend-block {
    padding-left: 1.5rem;
    border-left: 2px solid #e5e7eb;
    margin-bottom: 2rem;
    position: relative;
}
.trend-block::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--brand-red);
}

/* 案例卡片样式 */
.case-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    border: 1px solid #f3f4f6;
    margin-bottom: 2rem;
}
.case-header {
    padding: 1.5rem;
    color: white;
}
.case-header.qishui { 
    background: linear-gradient(135deg, #059669 0%, #6EE7B7 100%); 
    color: white; 
}
.case-header.tai { 
    background: linear-gradient(135deg, #7f1d1d 0%, #E60012 100%); 
    color: white;
}

.case-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 1.5rem;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}
@media (min-width: 768px) {
    .case-stats {
        grid-template-columns: repeat(4, 1fr);
    }
}
.stat-item h5 { font-size: 0.75rem; color: #6b7280; text-transform: uppercase; margin-bottom: 0.25rem; }
.stat-item p { font-weight: 700; color: #111; font-size: 0.9rem; }

.weight-bar-bg {
    background-color: #f3f4f6;
    border-radius: 9999px;
    height: 1.5rem;
    overflow: hidden;
    position: relative;
}
.weight-bar-fill {
    height: 100%;
    background-color: var(--chart-sa);
    border-radius: 9999px;
    display: flex;
    align-items: center;
    padding-left: 0.75rem;
    font-size: 0.75rem;
    color: white;
    font-weight: bold;
    transition: width 1s ease-out;
    width: 0;
}
.loaded .weight-bar-fill { width: var(--w); }

.icp-info a {
    color: #8da4d0;
    text-decoration: none;
    transition: 0.3s;
    font-size: 0.85rem;
}
.icp-info a:hover { color: var(--primary-color); text-decoration: underline; }