.stg-frame { display:inline-block; width:var(--stg-width,100px); max-width:100%; vertical-align:middle; }
.stg-frame .stg-core, .stg-frame .stg-core *, .stg-frame .stg-legend, .stg-frame .stg-legend * { box-sizing:border-box !important; font-family:Arial,Helvetica,sans-serif !important; letter-spacing:normal !important; text-transform:none !important; margin:0 !important; padding:0 !important; line-height:1.15 !important; }
.stg-frame .stg-core { display:flex !important; flex-direction:column; justify-content:center; gap:3px; width:100%; height:40px; background:#fff !important; color:#20242a !important; font-size:11px !important; text-align:center; padding:3px 4px !important; overflow:hidden; border-radius:inherit; }
.stg-frame .stg-core.stg-large { height:80px; text-align:left; font-size:14px !important; }
.stg-frame .stg-label,.stg-frame .stg-title,.stg-frame .stg-description { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.stg-frame .stg-title { font-weight:bold; }
.stg-frame .stg-description { font-size:10px !important; color:#555; }
.stg-frame .stg-visual { display:flex !important; align-items:center; justify-content:center; gap:3px; min-height:0; }
.stg-frame .stg-unit { display:block; flex:1; height:12px; border-radius:999px; background:#e9ebee; }
.stg-frame .stg-large .stg-unit { height:19px; }
.stg-frame .stg-direction { display:block; width:22px; height:13px; }
.stg-frame .stg-block { border-radius:2px; }
.stg-frame .stg-arrow { clip-path:polygon(0 0,65% 0,100% 50%,65% 100%,0 100%,30% 50%); }
.stg-frame .stg-dot { width:13px; border-radius:50%; }
.stg-frame .stg-overlap-svg { display:block; width:100%; height:20px; max-width:180px; }
.stg-frame .stg-large .stg-overlap-svg { height:30px; }
.stg-frame .stg-track { display:block; width:100%; height:5px; background:#e9ebee; border-radius:999px; overflow:hidden; }
.stg-frame .stg-fill { display:block; height:100%; border-radius:inherit; }
.stg-frame .stg-large .stg-track { height:10px; }
.stg-frame .stg-limits { display:flex; justify-content:space-between; font-size:9px !important; color:#555; }
.stg-frame .stg-icon-text { flex-direction:row; align-items:center; }
.stg-frame .stg-icon { display:block; width:20px; height:20px; flex:none; }
.stg-frame .stg-large .stg-icon { width:30px; height:30px; }
.stg-frame .stg-segment { display:block; height:13px; min-width:0; }
.stg-frame .stg-distribution_range .stg-visual { gap:1px; background:white; }
.stg-frame .stg-large .stg-segment { height:20px; }
.stg-frame .stg-bucket { display:flex; position:relative; flex:1; height:14px; background:#eee; align-items:flex-end; margin-bottom:10px !important; }
.stg-frame .stg-large .stg-bucket { height:38px; }
.stg-frame .stg-bucket-fill { display:block; width:100%; }
.stg-frame .stg-bucket-label { position:absolute; top:100%; width:100%; text-align:center; color:#555; font-size:9px !important; }
.stg-frame .stg-comparison .stg-visual { flex-direction:column; align-items:stretch; gap:2px; }
.stg-frame .stg-comparison-row { display:flex; align-items:center; gap:3px; }
.stg-frame .stg-comparison-label { font-size:9px !important; white-space:nowrap; max-width:65%; overflow:hidden; text-overflow:ellipsis; }
.stg-frame .stg-comparison.stg-small > .stg-label { display:none; }
.stg-frame .stg-legend { display:flex; flex-wrap:wrap; gap:4px 8px; background:#fff !important; color:#222 !important; font-size:11px !important; padding:4px !important; }
.stg-frame .stg-legend-item { display:inline-flex; align-items:center; gap:3px; }
.stg-frame .stg-swatch { display:inline-block; width:8px; height:8px; }
.stg-tooltip { display:block; position:fixed; z-index:9200; max-width:280px; padding:8px 10px; background:#30343b !important; color:#fff !important; border-radius:5px; box-shadow:0 3px 12px #0003; font: 0.88rem/1.35 Arial,Helvetica,sans-serif !important; opacity:0; transform:translateY(4px); pointer-events:none; transition:opacity 160ms ease,transform 160ms ease; white-space:pre-line; }
.stg-tooltip.stg-visible { opacity:1; transform:translateY(0); }
@media(prefers-reduced-motion:reduce){.stg-tooltip{transition:none;}}
@media print {.stg-frame {break-inside:avoid; print-color-adjust:exact; -webkit-print-color-adjust:exact;} .stg-tooltip{display:none!important;} .stg-frame .stg-core::after{content:attr(aria-label);font-size:9px;white-space:normal;} .stg-frame .stg-core{height:auto;min-height:40px;overflow:visible;}}
.stg-frame .stg-icon-text.stg-large { flex-direction:column; align-items:flex-start; }
.stg-frame .stg-icon-text.stg-large .stg-visual { justify-content:flex-start; }
.stg-frame .stg-comparison.stg-large .stg-track { height:8px; }
.stg-frame .stg-core .stg-visual > span { min-width:0; }
.stg-frame .stg-core svg { max-width:100% !important; overflow:visible; }

/* v1.1: compact geometry, recessed tracks and type-specific large layouts. */
.stg-frame .stg-core { gap:3px; padding:3px 7px !important; flex-shrink:0; }
.stg-frame .stg-core > .stg-label,
.stg-frame .stg-core > .stg-description,
.stg-frame .stg-core > .stg-limits { flex:none; }
.stg-frame .stg-core > .stg-visual { flex:none; min-height:0; }
.stg-frame .stg-core.stg-large { padding:7px 10px !important; gap:5px; }
.stg-frame .stg-large .stg-label { font-size:15px !important; font-weight:600 !important; }
.stg-frame .stg-description { font-size:10px !important; }
.stg-frame .stg-unit { height:10px; flex:0 1 100%; min-width:0; }
.stg-frame .stg-range_by_unit .stg-visual { gap:5px; padding:0 3px !important; }
.stg-frame .stg-large .stg-unit { height:15px; }
.stg-frame .stg-empty, .stg-frame .stg-large .stg-bucket { background:#f0f1f3 !important; box-shadow:inset 0 1px 3px #0002; }
.stg-frame .stg-direction { width:18px; height:10px; }
.stg-frame .stg-dot { width:10px; }
.stg-frame .stg-large .stg-direction { width:23px; height:14px; }
.stg-frame .stg-large .stg-dot { width:14px; }
.stg-frame .stg-overlap-svg { height:15px !important; width:80% !important; flex:none; }
.stg-frame .stg-large .stg-overlap-svg { height:24px !important; }
.stg-frame .stg-track { height:4px; border-radius:2px; }
.stg-frame .stg-fill { border-radius:0; }
.stg-frame .stg-large .stg-track { height:8px; }
.stg-frame .stg-icon { width:16px !important; height:16px !important; }
.stg-frame .stg-large .stg-icon { width:24px !important; height:24px !important; }
.stg-frame:has(> .stg-large:is(.stg-icon-text,.stg-icon_text,.stg-directional,.stg-overlap)) { max-width:min(100%,180px); }
.stg-frame .stg-core.stg-large:is(.stg-icon-text,.stg-icon_text,.stg-directional,.stg-overlap) { text-align:center; align-items:center; }
.stg-frame .stg-core.stg-large:is(.stg-directional,.stg-overlap) > .stg-visual { width:100%; }
.stg-frame .stg-core.stg-icon_text.stg-small { flex-direction:row; align-items:center; }
.stg-frame .stg-core.stg-icon_text.stg-small > .stg-label { flex:0 1 auto; min-width:0; }
.stg-frame .stg-icon-group { display:flex; align-items:center; justify-content:center; gap:5px; max-width:100%; }
.stg-frame .stg-icon-group .stg-label { min-width:0; }
.stg-frame .stg-core.stg-large:is(.stg-distribution_range,.stg-distribution_buckets,.stg-comparison) { height:120px; }
.stg-frame .stg-segment { height:10px; }
.stg-frame .stg-large .stg-segment { height:16px; }
.stg-frame .stg-distribution_range .stg-visual { border-radius:2px; overflow:hidden; }
.stg-frame .stg-bucket { height:11px; border-radius:2px; }
.stg-frame .stg-large .stg-bucket { height:44px; }
.stg-frame .stg-bucket-fill { border-radius:2px; }
.stg-frame .stg-large .stg-comparison-row { gap:6px; }
.stg-frame .stg-large .stg-comparison-label { font-size:11px !important; }
.stg-frame .stg-comparison.stg-large .stg-visual { gap:8px; }
.stg-frame .stg-comparison.stg-large .stg-track { height:7px; }
@media print { .stg-frame .stg-core.stg-large, .stg-frame .stg-overlap.stg-core { height:auto !important; min-height:40px; overflow:visible; } }

.stg-frame .stg-core.stg-small.stg-range_by_spectrum { gap:2px; }
.stg-frame .stg-core.stg-small.stg-comparison { gap:1px; }
.stg-frame .stg-core.stg-small.stg-distribution_buckets { gap:1px; padding:2px 7px !important; }
.stg-frame .stg-core.stg-small.stg-overlap { gap:2px; }
.stg-frame .stg-core.stg-small.stg-icon_text { justify-content:center; }

/* v1.2: stacked icon and number faces. */
.stg-frame .stg-core.stg-icon_text.stg-small,
.stg-frame .stg-core.stg-number.stg-small,
.stg-frame .stg-core.stg-large:is(.stg-icon_text,.stg-number) {
    flex-direction:column !important; align-items:center !important;
    justify-content:center !important; text-align:center !important; gap:1px;
}
.stg-frame .stg-core:is(.stg-icon_text,.stg-number) > .stg-label,
.stg-frame .stg-core:is(.stg-icon_text,.stg-number) > .stg-description {
    width:100%; min-width:0; flex:none;
}
.stg-frame .stg-core:is(.stg-icon_text,.stg-number) > .stg-visual { width:100%; flex:none; }
.stg-frame .stg-core .stg-number-value {
    display:block !important; font-size:20px !important; font-weight:700 !important;
    line-height:1 !important; font-variant-numeric:tabular-nums !important;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%;
}
.stg-frame .stg-large .stg-number-value { font-size:30px !important; }
.stg-frame .stg-core.stg-large:is(.stg-icon_text,.stg-number) { gap:2px; padding:4px 7px !important; }
.stg-frame:has(> .stg-large.stg-number) { max-width:min(100%,180px); }
