:root {
    --bg-main: #f8f9fa;
    --bg-panel: #ffffff;
    --bg-panel-soft: #f1f3f5;
    --border-color: #e2e8f0;
    --text-main: #1a1a2e;
    --text-secondary: #6c757d;
    --primary: #2563eb;
    --primary-light: rgba(37, 99, 235, 0.08);
    --success: #16a34a;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #0284c7;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-main: 0 4px 16px rgba(0, 0, 0, 0.06);
}

* {
    box-sizing: border-box;
}

body {
    background: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
}

a {
    color: var(--primary);
}

a:hover {
    color: #1d4ed8;
}

.top-nav {
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.page-shell {
    padding-bottom: 4rem;
}

.hero-section,
.page-header {
    padding: 4rem 0 2.5rem;
}

.hero-title,
.page-title {
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    line-height: 1.15;
    margin-bottom: 1rem;
    font-weight: 700;
    color: var(--text-main);
}

.hero-desc,
.page-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 720px;
}

.metric-kicker {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--primary);
    font-size: 0.82rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 600;
}

.section-block {
    padding: 2.5rem 0;
}

.muted-section {
    background: var(--bg-panel-soft);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.section-header {
    margin-bottom: 1.75rem;
}

.section-header h2,
.feature-card h3,
.principle-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-main);
}

.section-header p,
.feature-card p,
.principle-card p {
    color: var(--text-secondary);
    margin-bottom: 0;
}

.glass-panel,
.feature-card,
.principle-card,
.chart-card,
.table-shell,
.metric-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-main);
}

.feature-card,
.principle-card,
.chart-card,
.metric-card {
    padding: 1.4rem;
}

.feature-card,
.principle-card {
    height: 100%;
}

.metric-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.metric-item {
    display: flex;
    justify-content: space-between;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border-color);
}

.metric-name {
    color: var(--text-secondary);
}

.metric-value {
    font-weight: 600;
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    margin-bottom: 1rem;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 1.3rem;
}

.hero-feature-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.1rem 1.3rem;
    box-shadow: var(--shadow-main);
}

.hero-feature-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 1.2rem;
}

.hero-feature-title {
    font-weight: 600;
    font-size: 0.97rem;
    color: var(--text-main);
    margin-bottom: 0.2rem;
}

.hero-feature-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.chart-card-title,
.metric-card-label {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-bottom: 0.35rem;
}

.metric-card-value {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--text-main);
}

.metric-card-meta {
    color: var(--text-secondary);
    font-size: 0.82rem;
    margin-top: 0.35rem;
}

.tone-success { border-left: 3px solid var(--success); }
.tone-warning { border-left: 3px solid var(--warning); }
.tone-danger { border-left: 3px solid var(--danger); }
.tone-info { border-left: 3px solid var(--info); }
.tone-primary { border-left: 3px solid var(--primary); }
.tone-secondary { border-left: 3px solid var(--text-secondary); }

.chart-box {
    min-height: 320px;
}

.table-shell {
    padding: 1rem;
    overflow-x: auto;
}

.table {
    color: var(--text-main);
    margin-bottom: 0;
}

.table > :not(caption) > * > * {
    background: transparent;
    color: inherit;
    border-bottom-color: var(--border-color);
}

.table thead th {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-control,
.form-select {
    border-color: var(--border-color);
    color: var(--text-main);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.12);
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.site-footer {
    padding: 1.5rem 0 2.5rem;
    border-top: 1px solid var(--border-color);
}

.narrow-container {
    max-width: 520px;
}

.alert-warning {
    background-color: #fef9c3;
    border-color: #fde68a;
    color: #92400e;
}

.alert-danger {
    background-color: #fee2e2;
    border-color: #fca5a5;
    color: #991b1b;
}

@media (max-width: 768px) {
    .hero-section,
    .page-header {
        padding: 3rem 0 1.5rem;
    }

    .section-block {
        padding: 2rem 0;
    }

    .chart-box {
        min-height: 260px;
    }

    /* 导航收起时字号保持合理 */
    .top-nav .navbar-brand {
        font-size: 1rem;
    }

    /* 标题字号缩小，避免截断 */
    .page-title {
        font-size: 1.6rem;
    }
}

@media (max-width: 576px) {
    /* 图表在极窄屏上降低高度，避免大片空白 */
    .chart-box {
        min-height: 200px;
    }

    /* metric-card 改为两列布局，减少纵向滚动 */
    .row .col-md-2,
    .row .col-md-3,
    .row .col-xl-2 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    /* 表格字号略缩，配合 table-responsive 滑动 */
    .table {
        font-size: 0.82rem;
    }

    /* 行业筛选三个 select 纵向排列时撑满宽度 */
    .col-md-4 .form-select {
        font-size: 0.9rem;
    }
}
