/* "How the world invests in <country>" — country-page section. Theme tokens
   for every UI colour; the three series fills are chart-internal and were
   validated as a four-slot categorical set (blue, amber, teal, violet) for CVD separation,
   lightness band and contrast on the light and dark chart surfaces. */
.country-global-investors { color: var(--white); font-family: var(--font-sans); --cgi-a: #3B82F6; --cgi-b: #D97706; --cgi-c: #0D9488; --cgi-d: #7C3AED; } /* theme-guardrail-allow: chart-internal series colours; #3B82F6 is the funnel's --funnel-b value (that token is scoped to the funnel widget), amber and teal validated as adjacent pairs with it */
.cgi-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 4px 0 22px; }
.cgi-kpi { display: grid; align-content: start; gap: 4px; padding: 16px 18px; border: 1px solid var(--border-light); border-radius: 12px; background: var(--surface-card); color: inherit; text-decoration: none; }
a.cgi-kpi:hover { border-color: var(--border-mid); }
.cgi-kpi strong { font-family: var(--font-display); font-size: 2.1rem; line-height: 1; letter-spacing: -0.02em; color: var(--blue-ink); font-variant-numeric: tabular-nums; }
.cgi-kpi span { font-size: .9rem; line-height: 1.35; font-weight: 600; }
.cgi-kpi small { font-size: .75rem; line-height: 1.45; color: var(--text-light); }
.cgi-kpi-view { display: grid; gap: 4px; }
.cgi-kpi-view[hidden] { display: none; }
.cgi-seg--mini { margin: 6px 0 0; }
.cgi-seg--mini button { padding: .2rem .6rem; font-size: .72rem; }
.cgi-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.cgi-card { margin: 0; padding: 18px 20px 16px; border: 1px solid var(--border-light); border-radius: 12px; background: var(--surface-card); display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.cgi-card--wide { grid-column: 1 / -1; }
.cgi-axis--sub { font-size: 10px; fill: var(--text-faint); }
.cgi-bar-cell--long { width: 160px; }
.cgi-table tbody th small { font-weight: 400; color: var(--text-lighter); }
.cgi-card figcaption h3 { margin: 0 0 6px; font-family: var(--font-display); font-size: 1.15rem; line-height: 1.25; letter-spacing: -0.01em; }
.cgi-card figcaption p { margin: 0; font-size: .85rem; line-height: 1.5; color: var(--text-light); }
.cgi-svg { display: block; width: 100%; height: auto; overflow: visible; }
.cgi-gridline { stroke: var(--chart-grid); stroke-width: 1; }
.cgi-baseline { stroke: var(--chart-axis); stroke-width: 1; }
.cgi-axis { fill: var(--text-lighter); font-size: 11px; }
.cgi-axis--y { text-anchor: end; }
.cgi-label { fill: var(--white); font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cgi-label--strong { font-size: 13px; font-weight: 700; }
.cgi-label--tiny { font-size: 10px; }
.cgi-fill-a { fill: var(--cgi-a); background: var(--cgi-a); }
.cgi-fill-b { fill: var(--cgi-b); background: var(--cgi-b); }
.cgi-fill-c { fill: var(--cgi-c); background: var(--cgi-c); }
.cgi-fill-d { fill: var(--cgi-d); background: var(--cgi-d); }
.cgi-fill-rest { fill: var(--surface-data); stroke: var(--chart-band-border); stroke-width: 1; background: var(--surface-data); }
.cgi-swatch.cgi-fill-rest { border: 1px solid var(--chart-band-border); box-sizing: border-box; }
.cgi-bar[data-partial="true"] rect { opacity: .72; }
.cgi-bar:hover rect:not(.cgi-fill-rest), .cgi-dot:hover circle { filter: brightness(1.12); }
.cgi-line-a { fill: none; stroke: var(--cgi-a); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.cgi-stroke-a { fill: var(--surface-card); stroke: var(--cgi-a); stroke-width: 2; }
.cgi-line-b { fill: none; stroke: var(--cgi-b); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.cgi-stroke-b { fill: var(--surface-card); stroke: var(--cgi-b); stroke-width: 2; }
.cgi-label.cgi-ink-a { fill: var(--cgi-a); }
.cgi-label.cgi-ink-b { fill: var(--cgi-b); }
.cgi-legend--top { margin: 0; }
.cgi-foot { margin: 0; font-size: .8rem; color: var(--text-lighter); }
.cgi-view[hidden], [data-cgi-views] figcaption[hidden] { display: none; }
.cgi-dot.is-active .cgi-stroke-b { r: 6; fill: var(--cgi-b); }
/* Hover / focus tooltip (js/country-global-investors.js) on [data-tip] marks. */
.cgi-hit { fill: transparent; }
[data-country-global-investors] [data-tip] { cursor: default; outline: none; }
.cgi-dot.is-active .cgi-hit { fill: var(--chart-band); }
.cgi-dot.is-active .cgi-stroke-a { r: 6; fill: var(--cgi-a); }
.cgi-bar.is-active .cgi-fill-rest { stroke: var(--cgi-a); }
.cgi-tip { position: fixed; left: 0; top: 0; z-index: 60; max-width: 300px; padding: 8px 10px; border-radius: 8px; background: var(--chart-tooltip-bg); color: var(--chart-tooltip-ink); box-shadow: var(--shadow-md); font: 12px/1.45 var(--font-sans); pointer-events: none; display: flex; flex-direction: column; gap: 2px; }
.cgi-tip[hidden] { display: none; }
.cgi-tip strong { font-weight: 700; font-size: 12.5px; }
.cgi-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; list-style: none; font-size: .78rem; color: var(--text-light); }
.cgi-legend li { display: inline-flex; align-items: center; gap: 7px; }
.cgi-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.cgi-hbars { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; font-size: .85rem; }
.cgi-hbars li { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(0, 3fr) minmax(180px, auto); align-items: center; gap: 14px; }
.cei .cgi-hbars li { grid-template-columns: minmax(140px, 1fr) minmax(0, 3fr) minmax(64px, auto); }
.cgi-h-label { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cgi-h-track { display: block; height: 14px; border-radius: 5px; background: var(--chart-band); overflow: hidden; }
.cgi-h-fill { display: block; height: 100%; border-radius: 4px; }
.cgi-h-val { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.cgi-h-val small { font-weight: 400; color: var(--text-lighter); }
.cgi-h-val--change { font-weight: 600; color: var(--text-lighter); min-width: 64px; text-align: right; font-variant-numeric: tabular-nums; }
.cgi-h-val--change.cei-up { color: var(--blue-ink); }
.cgi-h-val--change.cei-down { color: var(--text-light); }
.cei-head { display: flex; justify-content: space-between; gap: 12px; }
.cei-head-change { text-align: right; min-width: 64px; }
.cgi-h-label strong { color: var(--white); }
.cgi-investors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 28px; margin: 0; padding: 0; list-style: none; counter-reset: cgi; }
.cgi-investors li { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto auto auto; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--border-light); font-size: .85rem; }
.cgi-logo { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; background: var(--logo-tile-bg); border: 1px solid var(--logo-tile-border); overflow: hidden; font-weight: 700; color: var(--text-light); }
.cgi-logo img { width: 28px; height: 28px; object-fit: contain; }
.cgi-inv-name { display: grid; min-width: 0; }
.cgi-inv-name a { color: inherit; font-weight: 600; text-decoration: none; }
.cgi-inv-name a:hover { text-decoration: underline; }
.cgi-inv-name small { font-size: .72rem; color: var(--text-lighter); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cgi-inv-num { display: grid; justify-items: end; min-width: 44px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.cgi-inv-num strong { font-size: .95rem; }
.cgi-inv-num small { font-size: .66rem; color: var(--text-lighter); }
.cgi-status { margin: 0 0 14px; font-size: .78rem; color: var(--text-lighter); }
.cgi-source, .cgi-method { margin: 14px 0 0; font-size: .75rem; line-height: 1.6; color: var(--text-light); }
.cgi-method summary { cursor: pointer; font-weight: 600; }
.cgi-method p { margin: 8px 0 0; }
/* Review additions: two-column cards, compact tables, ranked lists, inline KPIs. */
.cgi-cols { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.cgi-cols--even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
.cgi-hbars--compact li { grid-template-columns: 8.5em minmax(0, 1fr) 3em; gap: 10px; }
.cgi-mini-title { margin: 0 0 6px; font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-lighter); }
.cgi-mini-title + .cgi-list { margin-bottom: 14px; }
.cgi-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: .82rem; }
.cgi-list li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--border-light); }
.cgi-list li span { display: grid; min-width: 0; }
.cgi-list li span small { font-size: .72rem; color: var(--text-lighter); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cgi-list li a { color: inherit; font-weight: 600; text-decoration: none; }
.cgi-list li a:hover { text-decoration: underline; }
.cgi-list li strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.cgi-list li strong small { font-weight: 400; color: var(--text-lighter); }
/* Exits list: company names in the same weight as the linked buyer names. */
.cgi-list--named li > span { font-weight: 600; }
.cgi-table { width: 100%; border-collapse: collapse; font-size: .8rem; font-variant-numeric: tabular-nums; }
.cgi-table th, .cgi-table td { padding: 7px 10px 7px 0; border-bottom: 1px solid var(--border-light); text-align: left; vertical-align: middle; }
.cgi-table thead th { font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-lighter); }
.cgi-table tbody th { font-weight: 600; }
.cgi-table td small { color: var(--text-lighter); }
.cgi-bar-cell { display: inline-block; width: 64px; height: 8px; margin-right: 8px; border-radius: 4px; background: var(--chart-band); vertical-align: middle; overflow: hidden; }
.cgi-bar-cell i { display: block; height: 100%; border-radius: 4px; }
/* Industry table with full-width bars (sector card): VC since the recent year and the foreign share, both on the same blue. */
.cgi-table--bars { font-size: .875rem; table-layout: fixed; }
.cgi-table--bars th:first-child { width: 24%; }
.cgi-table--bars th, .cgi-table--bars td { padding: 9px 16px 9px 0; }
.cgi-cell-bar { display: grid; grid-template-columns: minmax(0, 1fr) 4.2em; align-items: center; gap: 10px; }
.cgi-cell-bar > span:last-child { text-align: right; font-weight: 600; }
.cgi-cell-track { display: block; height: 12px; border-radius: 6px; background: var(--chart-band); overflow: hidden; }
.cgi-cell-track i { display: block; height: 100%; border-radius: 6px; }
.cgi-kpis--inline { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 16px; }
.cgi-kpis--inline .cgi-kpi strong { font-size: 1.7rem; }
.cgi-kpis--inline .cgi-kpi span { font-size: .8rem; font-weight: 500; color: var(--text-light); }
.cgi-hbars li.is-hl .cgi-h-label { color: var(--blue-ink); }
.cei-up { color: var(--blue-ink); font-weight: 600; }
.cgi-seg { display: inline-flex; align-self: flex-start; gap: 2px; padding: 3px; margin: 0 0 14px; border-radius: 999px; background: var(--surface-data); }
.cgi-seg button { border: 0; border-radius: 999px; padding: .3rem .9rem; background: transparent; font: inherit; font-size: .8rem; font-weight: 600; color: var(--text-light); cursor: pointer; }
.cgi-seg button[aria-pressed="true"] { background: var(--surface-card); color: var(--blue-ink); box-shadow: 0 1px 2px var(--border-light); }
.cgi-seg button:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
@media (max-width: 960px) {
  .cgi-cols { grid-template-columns: minmax(0, 1fr); }
  .cgi-table thead { display: none; }
  .cgi-table tr { display: grid; grid-template-columns: minmax(0, 1fr); padding: 6px 0; }
  .cgi-table th, .cgi-table td { border: 0; padding: 2px 0; }
  .cgi-table--bars tr { border-bottom: 1px solid var(--border-light); padding: 8px 0; gap: 4px; }
  .cgi-table--bars td::before { content: attr(data-label); display: block; font-size: .7rem; color: var(--text-lighter); }
  .cgi-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cgi-investors { grid-template-columns: minmax(0, 1fr); }
  .cgi-kpis--inline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .cgi-kpis { grid-template-columns: minmax(0, 1fr); }
  .cgi-hbars li { grid-template-columns: minmax(90px, 0.8fr) minmax(0, 1.4fr) auto; }
  .cgi-investors li { grid-template-columns: 32px minmax(0, 1fr) auto; }
  .cgi-investors li .cgi-inv-num:nth-of-type(n+2) { display: none; }
}
