.gs-wrap{
    --gs-border:#d8dce1;
    --gs-muted:#646970;
    --gs-text:#22252a;
    --gs-blue:#1f6fd1;
    --gs-purple:#7357c8;
    --gs-teal:#168b86;
    max-width:1200px;
    margin:2rem auto;
    color:var(--gs-text);
}

.gs-title{
    margin:0 0 1.25rem;
}

.gs-detail-grid{
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:1rem;
    margin-bottom:1.4rem;
}

.gs-panel{
    --gs-panel-color:var(--gs-blue);
    min-width:0;
    border:1px solid var(--gs-border);
    border-top:4px solid var(--gs-panel-color);
    border-radius:14px;
    background:#fff;
    padding:1.25rem 1.35rem 1rem;
    overflow:hidden;
}

.gs-panel--population{--gs-panel-color:var(--gs-blue)}
.gs-panel--work{--gs-panel-color:var(--gs-purple)}
.gs-panel--economy{--gs-panel-color:var(--gs-teal)}

.gs-panel-heading{
    display:flex;
    align-items:center;
    gap:.7rem;
    min-width:0;
    margin-bottom:1.15rem;
}

.gs-panel-heading h3{
    min-width:0;
    margin:0;
    font-size:clamp(1.15rem,1.7vw,1.55rem);
    line-height:1.2;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.gs-panel-icon{
    flex:0 0 auto;
    display:grid;
    place-items:center;
    width:2.2rem;
    height:2.2rem;
    color:var(--gs-panel-color);
}

.gs-panel-icon svg{
    width:100%;
    height:100%;
    display:block;
    fill:currentColor;
}

.gs-list{
    margin:0;
    min-width:0;
}

.gs-list > div{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    column-gap:1rem;
    min-width:0;
    padding:.72rem 0;
    border-bottom:1px solid #eceef0;
}

.gs-list > div:last-child{
    border-bottom:0;
}

.gs-list dt{
    min-width:0;
    margin:0;
    color:var(--gs-muted);
    white-space:nowrap;
    overflow:visible;
    text-overflow:clip;
    font-size:clamp(.86rem,1.15vw,1rem);
}

.gs-list dd{
    min-width:5.6rem;
    margin:0;
    font-weight:700;
    text-align:right;
    white-space:nowrap;
    font-variant-numeric:tabular-nums;
    font-size:clamp(.9rem,1.15vw,1.02rem);
}

.gs-chart-panel{
    color:var(--gs-blue);
    border:1px solid var(--gs-border);
    border-radius:14px;
    background:#fff;
    padding:1.3rem 1.35rem 1rem;
    overflow:hidden;
}

.gs-chart-heading{
    display:flex;
    align-items:baseline;
    justify-content:space-between;
    gap:1rem;
    margin-bottom:.4rem;
}

.gs-chart-heading h3{
    margin:0;
    color:var(--gs-text);
    font-size:clamp(1.15rem,1.7vw,1.5rem);
}

.gs-chart-source{
    color:var(--gs-muted);
    font-size:.88rem;
    white-space:nowrap;
}

.gs-chart{
    width:100%;
    height:auto;
    display:block;
    overflow:visible;
}

.gs-axis{
    stroke:#9ea4aa;
    stroke-width:1;
}

.gs-gridline{
    stroke:#e3e6e9;
    stroke-width:1;
    stroke-dasharray:4 5;
}

.gs-line{
    fill:none;
    stroke:currentColor;
    stroke-width:3;
    stroke-linejoin:round;
    stroke-linecap:round;
}

.gs-point{
    fill:currentColor;
}

.gs-label{
    font-size:11px;
    fill:#646970;
}

.gs-axis-label{
    font-size:11px;
    fill:#646970;
}

.gs-axis-title{
    font-size:12px;
    fill:#50575e;
    font-weight:600;
}

.gs-point-value{
    font-size:10px;
    fill:currentColor;
    font-weight:700;
}

.gs-chart-footer{
    margin-top:.2rem;
    color:var(--gs-muted);
    font-size:.86rem;
}

.gs-source{
    margin:.85rem 0 0;
    color:var(--gs-muted);
    font-size:.82rem;
}

.gs-source a{
    color:inherit;
}

.gs-notice{
    padding:1rem;
    border:1px solid var(--gs-border);
    background:#fff;
}

/* Existing metric-shortcode compatibility */
.gs-cards{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:1rem;
    margin-bottom:1.5rem;
}

.gs-card{
    min-width:0;
    overflow:hidden;
    border:1px solid var(--gs-border);
    border-radius:12px;
    background:#fff;
    padding:1rem;
    text-align:center;
}

.gs-value,
.gs-card-label{
    display:block;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

@media(max-width:1000px){
    .gs-detail-grid{
        grid-template-columns:1fr;
    }

    .gs-panel-heading h3,
    .gs-list dt{
        font-size:1rem;
    }

    .gs-chart-heading{
        align-items:flex-start;
        flex-direction:column;
        gap:.2rem;
    }
}

@media(max-width:600px){
    .gs-wrap{
        margin:1.25rem auto;
    }

    .gs-panel,
    .gs-chart-panel{
        padding:1rem;
        border-radius:10px;
    }

    .gs-list > div{
        column-gap:.7rem;
    }

    .gs-list dd{
        min-width:4.7rem;
    }

    .gs-chart-source{
        white-space:normal;
    }
}
