/* ==========================================================
   CSO 华人数据页面
   ========================================================== */

/* CSO 页面整体 */
.cso-chinese-page {
    width: 100%;
}

/* 页面标题 */
.cso-header {
    margin-bottom: 20px;
}

.cso-header h1 {
    margin-bottom: 6px;
}

.cso-header p {
    margin: 0;
    color: #666;
}


/* ==========================================================
   CSO 折叠卡片
   与原来的投票折叠样式保持一致
   ========================================================== */

.cso-item {
    margin-bottom: 16px;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    background: #fff;
}


/* 标题 */
.cso-title {
    background: #f7f7f7;
    padding: 12px;
    font-weight: bold;
    cursor: pointer;
    position: relative;
    padding-right: 40px;
}


/* 默认箭头 */
.cso-title::after {
    content: "▼";
    position: absolute;
    right: 12px;
    font-size: 12px;
    transition: transform 0.3s ease;
}


/* 点击展开后箭头翻转 */
.cso-title.active::after {
    transform: rotate(180deg);
}


/* 展开区域 */
.cso-content {
    padding: 12px;
    display: none;
    background: #fff;
}


/* 数据区域 */
.cso-data {
    line-height: 1.7;
}


/* 加载提示 */
.cso-loading {
    color: #666;
}


/* 手机端 */
@media (max-width: 768px) {

    .cso-title {
        padding: 12px;
        padding-right: 40px;
    }

    .cso-content {
        padding: 12px;
    }

}


/* 小工具卡片 */
.polls-widget-accordion .poll-widget-item {
    margin-bottom: 16px;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    background: #fff;
}

/* 小工具标题 */
.polls-widget-accordion .poll-widget-title {
    background: #f7f7f7;
    padding: 12px;
    font-weight: bold;
    cursor: pointer;
    position: relative;
}

/* 箭头 */
.polls-widget-accordion .poll-widget-title::after {
    content: "▼";
    position: absolute;
    right: 12px;
    font-size: 12px;
    transition: transform 0.3s ease;
}

/* 展开时箭头翻转 */
.polls-widget-accordion .poll-widget-title.active::after {
    transform: rotate(180deg);
}

/* 展开区域 */
.polls-widget-accordion .poll-widget-content {
    padding: 12px;
    display: none;
    background: #fff;
}

/* 压缩侧边栏小工具的间距 */
.ct-sidebar {
  row-gap: 12px !important;  /* 控制 Grid 行间距 */
  gap: 12px !important;
}

/* 每个小工具底部间距（双保险） */
.ct-sidebar .ct-widget {
  margin-bottom: 12px !important;
}


.cso-stat-card {
    padding: 20px 10px;
    text-align: center;
}

.cso-stat-label {
    font-size: 16px;
    margin-bottom: 8px;
}

.cso-stat-number {
    font-size: 36px;
    font-weight: bold;
    line-height: 1.3;
}

.cso-stat-year {
    margin-top: 6px;
    color: #666;
    font-size: 14px;
}

/*人口总数下方的注释*/

.cso-stat-note {
    margin-top: 4px;
    font-size: 12px;
    color: #999;
    text-align: center;
    line-height: 1.4;
}

.cso-gender-grid {
    display: flex;
    gap: 16px;
    margin-top: 10px;
}

.cso-gender-card {
    flex: 1;
    padding: 18px;
    text-align: center;
    border: 1px solid #eee;
    border-radius: 5px;
    background: #fafafa;
}

.cso-gender-label {
    font-size: 16px;
    margin-bottom: 8px;
}

.cso-gender-number {
    font-size: 28px;
    font-weight: bold;
}

@media (max-width: 600px) {
    .cso-gender-grid {
        flex-direction: column;
    }
}
/* =========================
   年龄结构：人口金字塔
   ========================= */

.cso-age-pyramid {
    width: 100%;
    margin-top: 10px;
}

/* 表头 */

.cso-age-pyramid-header {
    display: grid;
    grid-template-columns: 1fr 90px 1fr;
    align-items: center;
    margin-bottom: 8px;
    font-weight: bold;
    font-size: 14px;
}

.cso-age-header-male {
    text-align: right;
    padding-right: 12px;
}

.cso-age-header-label {
    text-align: center;
}

.cso-age-header-female {
    text-align: left;
    padding-left: 12px;
}


/* 每一个年龄段 */

.cso-age-pyramid-row {
    display: grid;
    grid-template-columns: 1fr 90px 1fr;
    align-items: center;
    min-height: 34px;
}


/* 男性区域 */

.cso-age-male {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

.cso-age-number-left {
    width: 55px;
    text-align: right;
    font-size: 13px;
}


/* 女性区域 */

.cso-age-female {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
}

.cso-age-number-right {
    width: 55px;
    text-align: left;
    font-size: 13px;
}


/* 年龄标签 */

.cso-age-pyramid-label {
    text-align: center;
    font-size: 13px;
    white-space: nowrap;
}


/* 男性柱 */

.cso-age-bar-left-wrap {
    width: 100%;
    height: 20px;
    display: flex;
    justify-content: flex-end;
    background: #f0f0f0;
}

.cso-age-bar-left {
    height: 100%;
    background: #3d5685;
}


/* 女性柱 */

.cso-age-bar-right-wrap {
    width: 100%;
    height: 20px;
    background: #f0f0f0;
}

.cso-age-bar-right {
    height: 100%;
    background: #58bda5;
}


/* 移动端 */

@media (max-width: 600px) {

    .cso-age-pyramid-header,
    .cso-age-pyramid-row {
        grid-template-columns: 1fr 65px 1fr;
    }

    .cso-age-number-left,
    .cso-age-number-right {
        width: 42px;
        font-size: 11px;
    }

    .cso-age-pyramid-label {
        font-size: 11px;
    }

    .cso-age-bar-left-wrap,
    .cso-age-bar-right-wrap {
        height: 16px;
    }

}

/*国籍*/
.cso-citizenship-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.cso-citizenship-card {
    flex: 1 1 calc(50% - 8px);
    box-sizing: border-box;
    padding: 20px;
    text-align: center;
    border: 1px solid #eee;
    border-radius: 5px;
    background: #fafafa;
}

.cso-citizenship-label {
    font-size: 16px;
    margin-bottom: 8px;
}

.cso-citizenship-number {
    font-size: 28px;
    font-weight: bold;
}

.cso-citizenship-percent {
    margin-top: 5px;
    font-size: 14px;
    color: #666;
}

@media (max-width: 600px) {

    .cso-citizenship-card {
        flex-basis: 100%;
    }

}

/* =========================================
   居住地分布
   ========================================= */

.cso-residence-list {
    width: 100%;
}


/* =========================
   第一层：郡/地区
   ========================= */

.cso-residence-group {
    margin-bottom: 8px;
}

.cso-residence-group-title {
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: 0 14px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #fafafa;
    cursor: pointer;
}

.cso-residence-group-title:hover {
    background: #f5f5f5;
}

.cso-residence-group-left {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 12px;
    min-width: 0;
}

.cso-residence-group-name {
    width: 90px;
    flex-shrink: 0;
    font-weight: 500;
}

.cso-residence-bar-wrap {
    flex: 1;
    height: 18px;
    background: #eee;
    border-radius: 3px;
    overflow: hidden;
}

.cso-residence-bar {
    height: 100%;
    background: #315f8c;
    border-radius: 3px;
}

.cso-residence-group-value {
    width: 75px;
    text-align: right;
    font-weight: bold;
    flex-shrink: 0;
}

.cso-residence-group-percent {
    width: 52px;
    text-align: right;
    color: #666;
    font-size: 13px;
    flex-shrink: 0;
}

.cso-residence-arrow {
    width: 25px;
    text-align: right;
    flex-shrink: 0;
}


/* =========================
   第二层：城镇 / 统计区域
   ========================= */

.cso-residence-group-content {
    padding: 4px 14px 8px 14px;
}

.cso-residence-place {
    display: flex;
    align-items: center;
    min-height: 40px;
    border-bottom: 1px solid #eee;
    gap: 10px;
}

.cso-residence-place:last-child {
    border-bottom: none;
}

.cso-residence-place-name {
    width: 300px;
    flex-shrink: 0;
    font-size: 14px;
}

.cso-residence-place-bar-wrap {
    flex: 1;
    height: 12px;
    background: #f0f0f0;
    border-radius: 2px;
    overflow: hidden;
}

.cso-residence-place-bar {
    height: 100%;
    background: #7c9bb8;
    border-radius: 2px;
}

.cso-residence-place-number {
    width: 70px;
    text-align: right;
    font-size: 14px;
    font-weight: 500;
    flex-shrink: 0;
}

.cso-residence-place-percent {
    width: 48px;
    text-align: right;
    color: #777;
    font-size: 13px;
    flex-shrink: 0;
}


/* =========================
   其他/未细分地区
   ========================= */

.cso-residence-other {
    margin-top: 10px;
    padding: 12px 14px;
    border-top: 1px solid #ddd;
}

.cso-residence-other-title {
    font-weight: 500;
    margin-bottom: 6px;
}


/* =========================
   手机端
   ========================= */

@media (max-width: 600px) {

    .cso-residence-group-name {
        width: 70px;
    }

    .cso-residence-place-name {
        width: 180px;
    }

    .cso-residence-group-value {
        width: 60px;
    }

    .cso-residence-group-percent {
        width: 45px;
    }

    .cso-residence-place-number {
        width: 60px;
    }

    .cso-residence-place-percent {
        width: 42px;
    }

}

/* =========================
   婚姻状况
   ========================= */

.cso-marriage-data {
    width: 100%;
}

.cso-marriage-row {
    display: grid;
    grid-template-columns: 190px 1fr 90px;
    align-items: center;
    gap: 14px;
    min-height: 42px;
}

.cso-marriage-label {
    font-size: 15px;
    color: #244f7d;
    line-height: 1.4;
}

.cso-marriage-bar-wrap {
    height: 18px;
    background: #eeeeee;
    border-radius: 3px;
    overflow: hidden;
}

.cso-marriage-bar {
    height: 100%;
    background: #315f8d;
    border-radius: 3px;
    min-width: 2px;
    transition: width 0.3s ease;
}

.cso-marriage-number {
    text-align: right;
    font-size: 15px;
    font-weight: 600;
    color: #244f7d;
    white-space: nowrap;
}

@media (max-width: 600px) {

    .cso-marriage-row {
        grid-template-columns: 125px 1fr 65px;
        gap: 8px;
        min-height: 40px;
    }

    .cso-marriage-label {
        font-size: 14px;
    }

    .cso-marriage-bar-wrap {
        height: 14px;
    }

    .cso-marriage-number {
        font-size: 14px;
    }

}

/* =========================
   教育程度
   ========================= */

.cso-education-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    margin-bottom: 12px;
    background: #f7f7f7;
    border: 1px solid #e1e1e1;
    border-radius: 6px;
}

.cso-education-total-label {
    font-size: 15px;
    color: #244f7d;
    font-weight: 600;
}

.cso-education-total-number {
    font-size: 20px;
    font-weight: 700;
    color: #244f7d;
}

.cso-education-row {
    display: grid;
    grid-template-columns: 250px minmax(120px, 1fr) 80px 55px;
    align-items: center;
    gap: 12px;
    min-height: 42px;
    border-bottom: 1px solid #eeeeee;
}

.cso-education-row:last-child {
    border-bottom: none;
}

.cso-education-label {
    font-size: 15px;
    line-height: 1.4;
    color: #244f7d;
}

.cso-education-bar-wrap {
    height: 18px;
    background: #eeeeee;
    border-radius: 3px;
    overflow: hidden;
}

.cso-education-bar {
    height: 100%;
    background: #315f8d;
    border-radius: 3px;
    min-width: 2px;
    transition: width 0.3s ease;
}

.cso-education-number {
    text-align: right;
    font-size: 15px;
    font-weight: 600;
    color: #244f7d;
    white-space: nowrap;
}

.cso-education-percent {
    text-align: right;
    font-size: 14px;
    color: #777;
    white-space: nowrap;
}


/* 手机端 */

@media (max-width: 600px) {

    .cso-education-total {
        padding: 12px;
    }

    .cso-education-total-label {
        font-size: 14px;
    }

    .cso-education-total-number {
        font-size: 18px;
    }

    .cso-education-row {
        grid-template-columns: 125px minmax(50px, 1fr) 58px 45px;
        gap: 8px;
        min-height: 40px;
    }

    .cso-education-label {
        font-size: 14px;
    }

    .cso-education-bar-wrap {
        height: 14px;
    }

    .cso-education-number {
        font-size: 14px;
    }

    .cso-education-percent {
        font-size: 13px;
    }

}

/* =========================
   就业/经济状态
   ========================= */

.cso-economic-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    margin-bottom: 12px;
    background: #f7f7f7;
    border: 1px solid #e1e1e1;
    border-radius: 6px;
}

.cso-economic-total-label {
    font-size: 15px;
    color: #244f7d;
    font-weight: 600;
}

.cso-economic-total-number {
    font-size: 20px;
    font-weight: 700;
    color: #244f7d;
}

.cso-economic-row {
    display: grid;
    grid-template-columns: 250px minmax(120px, 1fr) 80px 55px;
    align-items: center;
    gap: 12px;
    min-height: 42px;
    border-bottom: 1px solid #eeeeee;
}

.cso-economic-row:last-child {
    border-bottom: none;
}

.cso-economic-label {
    font-size: 15px;
    line-height: 1.4;
    color: #244f7d;
}

.cso-economic-bar-wrap {
    height: 18px;
    background: #eeeeee;
    border-radius: 3px;
    overflow: hidden;
}

.cso-economic-bar {
    height: 100%;
    background: #315f8d;
    border-radius: 3px;
    min-width: 2px;
    transition: width 0.3s ease;
}

.cso-economic-number {
    text-align: right;
    font-size: 15px;
    font-weight: 600;
    color: #244f7d;
    white-space: nowrap;
}

.cso-economic-percent {
    text-align: right;
    font-size: 14px;
    color: #777;
    white-space: nowrap;
}


/* 手机端 */

@media (max-width: 600px) {

    .cso-economic-total {
        padding: 12px;
    }

    .cso-economic-total-label {
        font-size: 14px;
    }

    .cso-economic-total-number {
        font-size: 18px;
    }

    .cso-economic-row {
        grid-template-columns:
            125px
            minmax(50px, 1fr)
            58px
            45px;

        gap: 8px;
        min-height: 40px;
    }

    .cso-economic-label {
        font-size: 14px;
    }

    .cso-economic-bar-wrap {
        height: 14px;
    }

    .cso-economic-number {
        font-size: 14px;
    }

    .cso-economic-percent {
        font-size: 13px;
    }

}

/* =========================
   就业行业
   ========================= */

.cso-industry-data {
    width: 100%;
}

.cso-industry-row {
    display: grid;
    grid-template-columns: 250px minmax(120px, 1fr) 80px 55px;
    align-items: center;
    gap: 12px;
    min-height: 42px;
    border-bottom: 1px solid #eeeeee;
}

.cso-industry-row:last-child {
    border-bottom: none;
}

.cso-industry-label {
    font-size: 15px;
    line-height: 1.4;
    color: #244f7d;
}

.cso-industry-bar-wrap {
    height: 18px;
    background: #eeeeee;
    border-radius: 3px;
    overflow: hidden;
}

.cso-industry-bar {
    height: 100%;
    background: #315f8d;
    border-radius: 3px;
    min-width: 2px;
    transition: width 0.3s ease;
}

.cso-industry-number {
    text-align: right;
    font-size: 15px;
    font-weight: 600;
    color: #244f7d;
    white-space: nowrap;
}

.cso-industry-percent {
    text-align: right;
    font-size: 14px;
    color: #777;
    white-space: nowrap;
}


/* 手机端 */

@media (max-width: 600px) {

    .cso-industry-row {
        grid-template-columns: 125px minmax(50px, 1fr) 58px 45px;
        gap: 8px;
        min-height: 40px;
    }

    .cso-industry-label {
        font-size: 14px;
    }

    .cso-industry-bar-wrap {
        height: 14px;
    }

    .cso-industry-number {
        font-size: 14px;
    }

    .cso-industry-percent {
        font-size: 13px;
    }

}

/* =========================
   收入情况
   ========================= */

.cso-income-data {
    width: 100%;
}

.cso-income-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}

.cso-income-card {
    padding: 16px 18px;
    border: 1px solid #e3e3e3;
    background: #f8f8f8;
    border-radius: 5px;
}

.cso-income-label {
    font-size: 14px;
    color: #555;
    margin-bottom: 8px;
}

.cso-income-number {
    font-size: 22px;
    font-weight: 600;
    color: #244f7d;
}


/* 手机端 */

@media (max-width: 600px) {

    .cso-income-summary {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .cso-income-card {
        padding: 13px 14px;
    }

    .cso-income-number {
        font-size: 20px;
    }

}

/* =========================
   社会阶层
   ========================= */

.cso-social-class-data {
    width: 100%;
}

.cso-social-class-row {
    display: grid;
    grid-template-columns: 250px minmax(120px, 1fr) 80px 55px;
    align-items: center;
    gap: 12px;
    min-height: 42px;
    border-bottom: 1px solid #eeeeee;
}

.cso-social-class-row:last-child {
    border-bottom: none;
}

.cso-social-class-label {
    font-size: 15px;
    line-height: 1.4;
    color: #244f7d;
}

.cso-social-class-bar-wrap {
    height: 18px;
    background: #eeeeee;
    border-radius: 3px;
    overflow: hidden;
}

.cso-social-class-bar {
    height: 100%;
    background: #315f8d;
    border-radius: 3px;
    min-width: 2px;
    transition: width 0.3s ease;
}

.cso-social-class-number {
    text-align: right;
    font-size: 15px;
    font-weight: 600;
    color: #244f7d;
    white-space: nowrap;
}

.cso-social-class-percent {
    text-align: right;
    font-size: 14px;
    color: #777;
    white-space: nowrap;
}


/* 手机端 */

@media (max-width: 600px) {

    .cso-social-class-row {
        grid-template-columns: 125px minmax(50px, 1fr) 58px 45px;
        gap: 8px;
        min-height: 40px;
    }

    .cso-social-class-label {
        font-size: 14px;
    }

    .cso-social-class-bar-wrap {
        height: 14px;
    }

    .cso-social-class-number {
        font-size: 14px;
    }

    .cso-social-class-percent {
        font-size: 13px;
    }

}

/* ==========================================================
   年份切换
   ========================================================== */

.cso-year-switcher {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 6px;
    padding: 4px;
    width: fit-content;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #f7f7f7;
}

.cso-year-btn {
    appearance: none;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #244f7d;
    padding: 7px 18px;
    font-size: 15px;
    line-height: 1.2;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.cso-year-btn:hover {
    background: #e9eef3;
}

.cso-year-btn.active {
    background: #315f8d;
    color: #fff;
}

.cso-current-year {
    margin: 0 0 16px;
    color: #777;
    font-size: 13px;
}

.cso-no-data {
    padding: 18px 10px;
    color: #999;
    text-align: center;
    font-size: 14px;
}

@media (max-width: 600px) {
    .cso-year-switcher {
        width: 100%;
        box-sizing: border-box;
        justify-content: space-between;
    }

    .cso-year-btn {
        flex: 1;
        padding: 7px 8px;
        font-size: 14px;
    }

    .cso-current-year {
        margin-bottom: 12px;
        font-size: 12px;
    }
}
