/* Chain bloc: the few layouts energy.css does not already carry. */
.intro { font-size: 13.5px; color: var(--text-secondary); line-height: 1.55; margin: 0 0 12px; max-width: 880px; }
.mn-h4 { font-size: 12.5px; color: var(--text-secondary); margin: 8px 0 4px; font-weight: 600; }

/* Overview: one chain per card, one stage per row. */
.ov-chain { margin-bottom: 18px; }
.ov-stage { display: grid; grid-template-columns: 150px 1fr 150px; gap: 12px; align-items: center; padding: 7px 0; border-top: 1px solid var(--border); }
.ov-stage:first-of-type { border-top: 0; }
.ov-stage.is-bottleneck .ov-name { color: var(--accent); }
.ov-name { font-size: 13px; color: var(--text-primary); font-weight: 600; display: flex; flex-direction: column; line-height: 1.25; }
.ov-name small { font-weight: 400; color: var(--text-muted); font-size: 10.5px; }
.ov-stat { font-size: 11.5px; color: var(--text-muted); text-align: right; font-variant-numeric: tabular-nums; line-height: 1.4; }
.ov-stat b { color: var(--text-primary); font-size: 13px; }
.ov-demand { font-style: normal; font-size: 10px; color: var(--text-muted); border: 1px solid var(--border); border-radius: 8px; padding: 0 5px; margin-left: 4px; }
.ov-pending { font-size: 12px; color: var(--text-muted); padding: 6px 0; }
.ov-badge { display: inline-block; font-size: 10.5px; padding: 1px 7px; border-radius: 10px; border: 1px solid var(--accent); color: var(--accent); margin-left: 8px; vertical-align: middle; }
.ov-soon { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ov-soon span { font-size: 12px; color: var(--text-muted); border: 1px dashed var(--border); border-radius: 10px; padding: 2px 9px; }

/* Chain detail: stage cards with a bar list and a trend. */
.st-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; }
@media (max-width: 900px) { .st-grid { grid-template-columns: 1fr; } }
.hb-row { display: grid; grid-template-columns: 130px 1fr 110px; gap: 10px; align-items: center; padding: 3px 0; font-size: 12.5px; }
.hb-name { color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-track { height: 12px; border-radius: 3px; background: var(--surface-raised); overflow: hidden; }
.hb-fill { height: 100%; border-radius: 3px; }
.hb-val { font-size: 11.5px; color: var(--text-muted); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Corridors */
.co-row { display: grid; grid-template-columns: 1fr 90px; gap: 8px; align-items: center; padding: 4px 0; font-size: 12.5px; border-top: 1px solid var(--border); }
.co-row:first-child { border-top: 0; }
.co-pair { display: flex; gap: 6px; align-items: baseline; }
.co-pair .arrow { color: var(--text-muted); }
.co-bar { height: 6px; border-radius: 3px; background: var(--surface-raised); margin-top: 3px; }
.co-bar i { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.net-row { display: grid; grid-template-columns: 120px 1fr 90px; gap: 8px; align-items: center; font-size: 12px; padding: 3px 0; }
.net-track { position: relative; height: 10px; background: var(--surface-raised); border-radius: 3px; }
.net-track i { position: absolute; top: 0; height: 100%; border-radius: 3px; }
.net-pos { background: #1baf7a; } .net-neg { background: #eb6834; }

/* Value page */
.vc-mix-row { display: grid; grid-template-columns: 150px 1fr 120px; gap: 10px; align-items: center; padding: 5px 0; font-size: 12.5px; }

/* Country view: one row per stage, share bar, rank, sparkline. */
.ct-row { display: grid; grid-template-columns: 170px 1fr 120px 110px; gap: 10px; align-items: center; padding: 4px 0; font-size: 12.5px; border-top: 1px solid var(--border); }
.ct-row:first-of-type { border-top: 0; }
.ct-row.is-absent { color: var(--text-muted); }
.ct-row.is-best .hb-name { color: var(--accent); font-weight: 600; }
.ct-rank { font-size: 11.5px; color: var(--text-muted); text-align: right; font-variant-numeric: tabular-nums; }
.ct-spark svg { display: block; width: 100%; height: 26px; }
.ct-head { font-size: 11px; color: var(--text-muted); }

/* Facilities map: tinted countries under warm bubbles, legends, tooltip, zoom. */
.fa-map { margin: 6px 0 2px; position: relative; border-radius: 6px; overflow: hidden; }
.fa-map svg { display: block; width: 100%; height: auto; cursor: grab; touch-action: none; user-select: none; }
.fa-map svg:active { cursor: grabbing; }
.fa-map .fa-land, .fa-map .fa-dot, .fa-map .fa-grat { vector-effect: non-scaling-stroke; }
.fa-map .fa-land.has-data { cursor: pointer; }
.fa-map .fa-land.has-data:hover { stroke: var(--text-primary); stroke-width: 1; }
.fa-map .fa-dot { fill-opacity: 0.82; stroke-width: 0.7; cursor: pointer; }
.fa-map .fa-dot:hover { fill-opacity: 1; stroke-width: 1.4; }
.fa-map .fa-label { font-size: 10.5px; font-weight: 600; fill: var(--text-primary); paint-order: stroke; stroke: var(--surface-1); stroke-width: 3px; stroke-linejoin: round; pointer-events: none; }
.fa-map .fa-labels { font-size: 10.5px; }
.fa-map .fa-legend-text { font-size: 10px; fill: var(--text-secondary); paint-order: stroke; stroke: var(--surface-1); stroke-width: 2.5px; stroke-linejoin: round; pointer-events: none; }
.fa-map .fa-legend-title { font-weight: 600; fill: var(--text-primary); }
.fa-tip { position: absolute; z-index: 3; pointer-events: none; max-width: 260px; padding: 6px 9px; border-radius: 5px; background: var(--surface-raised); border: 1px solid var(--border); box-shadow: 0 2px 10px rgba(0,0,0,0.12); font-size: 12px; line-height: 1.35; color: var(--text-primary); display: flex; flex-direction: column; gap: 1px; }
.fa-tip[hidden] { display: none; }
.fa-tip span { color: var(--text-secondary); }
.fa-tip small { color: var(--text-muted); font-size: 10.5px; }
.fa-zoom { position: absolute; top: 8px; right: 8px; display: flex; flex-direction: column; gap: 3px; }
.fa-zoom button { width: 26px; height: 26px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface-raised); color: var(--text-primary); font-size: 15px; line-height: 1; cursor: pointer; }
.fa-zoom button:hover { background: var(--surface-1); }
.fa-zoom button:disabled { opacity: 0.4; cursor: default; }
.fa-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 8px; align-items: center; padding: 4px 0; font-size: 12.5px; border-top: 1px solid var(--border); }
.fa-row:first-child { border-top: 0; }
.fa-row a { color: var(--text-primary); text-decoration: none; }
.fa-row a:hover { text-decoration: underline; }
.fa-row small { color: var(--text-muted); margin-left: 6px; }
