/* World and Europe views and history (story C.5; boards KWorld, KEurope): loaded by the world scope's pages only,
 * so market pages do not pay for it (NFR30). */
:root { --s0: #e9eef6; --s1: #c3d0e6; --s2: #8fa6cc; --s3: #5a77a8; --s4: #2f4a7a; --viz-5: #c0457a;
  /* diverging (signed flows, D100 (2)): deficit red ← grey around balance → surplus blue */
  --d0: #b1403b; --d1: #e9aaa3; --d2: #e4e3df; --d3: #a9bcdc; --d4: #3d5c94; }
.page-h { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; margin: 10px 0 0; line-height: 1.15; }
.crumb { font-family: var(--mono); font-size: 12px; color: var(--ink-3); margin-top: 18px; }
.lede { color: var(--ink-2); margin: 6px 0 0; max-width: 70ch; }
.sec { display: grid; gap: 12px; margin-top: 28px; min-width: 0; }
.sec h2 { font-size: 19px; font-weight: 800; margin: 0; }
.sec-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; justify-content: space-between; }
.sub { color: var(--ink-3); font-size: 13px; }
.wstrip .v small { font-size: 13px; font-weight: 500; color: var(--dark-ink); }
.wstrip .v.pending { font-size: 15px; color: var(--dark-ink); }
.wstrip .chip { margin-top: 6px; background: var(--dark-line); }
.wstrip > div { display: grid; gap: 4px; align-content: start; }
.wstrip .def { font: inherit; font-size: 12px; color: var(--dark-ink); background: none; border: 0; padding: 0; text-align: left; cursor: help;
  text-decoration: underline dotted; text-underline-offset: 3px; justify-self: start; }
.wstrip .def:hover, .wstrip .def[aria-expanded="true"] { color: #fff; }
.wstrip .deftext { font-size: 12px; line-height: 1.4; color: var(--dark-ink); }
.stripnote { margin: 8px 2px 0; max-width: 90ch; }
.maphint { margin: 0; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pills button { font: inherit; font-size: 13px; font-weight: 600; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-3); background: var(--bg); color: var(--ink); cursor: pointer; }
.pills button[aria-pressed="true"] { background: var(--dark); color: #fff; border-color: var(--dark); }
.measure-def { font-size: 13px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.mapbox { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; overflow-x: auto; }
svg.tilemap { width: 100%; margin: 0 auto; height: auto; display: block; }
svg.tilemap text { font-family: var(--mono); font-size: 9px; font-weight: 700; fill: var(--ink); pointer-events: none; }
svg.tilemap text.lv { font-size: 6px; }
svg.tilemap a rect { stroke: none; }
svg.tilemap a:focus-visible rect, svg.tilemap a:hover rect { stroke: var(--accent); stroke-width: 2; }
.tl.s0 rect { fill: var(--s0); } .tl.s1 rect { fill: var(--s1); } .tl.s2 rect { fill: var(--s2); }
.tl.s3 rect { fill: var(--s3); } .tl.s4 rect { fill: var(--s4); }
.tl.s3 text, .tl.s4 text { fill: #fff; }
.tl.d0 rect { fill: var(--d0); } .tl.d1 rect { fill: var(--d1); } .tl.d2 rect { fill: var(--d2); }
.tl.d3 rect { fill: var(--d3); } .tl.d4 rect { fill: var(--d4); }
.tl.d0 text, .tl.d4 text { fill: #fff; }
.tl.gap rect { fill: var(--line-2); stroke: var(--line-3); stroke-dasharray: 2 2; }
.tl.gap text, .tl.out text, .tl.other text { fill: var(--ink-3); }
.tl.out rect { fill: var(--bg); stroke: var(--line-3); }
.tl.other rect { fill: var(--bg); stroke: var(--s3); stroke-dasharray: 3 2; }
.tl.ring rect { stroke: var(--ink); stroke-width: 2; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin-top: 10px; font-size: 12px; color: var(--ink-2); }
.legend .sw { display: inline-flex; gap: 2px; } .legend .sw i { width: 22px; height: 12px; display: block; border-radius: 2px; }
.legend .sw i.s0 { background: var(--s0); } .legend .sw i.s1 { background: var(--s1); } .legend .sw i.s2 { background: var(--s2); }
.legend .sw i.s3 { background: var(--s3); } .legend .sw i.s4 { background: var(--s4); }
.legend .sw i.d0 { background: var(--d0); } .legend .sw i.d1 { background: var(--d1); } .legend .sw i.d2 { background: var(--d2); }
.legend .sw i.d3 { background: var(--d3); } .legend .sw i.d4 { background: var(--d4); }
.legend .gapsw, .legend .ringsw, .legend .outsw { width: 14px; height: 12px; display: inline-block; vertical-align: middle; border-radius: 2px; }
.legend .gapsw { background: var(--line-2); border: 1px dashed var(--line-3); } .legend .ringsw { border: 2px solid var(--ink); }
.legend .outsw { background: var(--bg); border: 1px solid var(--line-3); }
details.alt { margin-top: 4px; } details.alt summary { cursor: pointer; font-size: 13px; color: var(--accent); }
tr.reg td { font-weight: 700; } tr.sub-r td:first-child { padding-left: 28px; color: var(--ink-2); }
tr.grp td { background: var(--surface); font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
tr.grp td b { margin-right: 14px; }
tr.grp .gsrc { display: inline-block; margin: 3px 14px 3px 0; white-space: nowrap; }
.cov { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.cov .bar { width: 64px; height: 6px; background: var(--line-2); border-radius: 3px; overflow: hidden; }
.cov .bar i { display: block; height: 100%; background: var(--ink-3); }
.bars { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: grid; gap: 10px; }
.brow { display: grid; grid-template-columns: 170px minmax(0, 1fr) 80px; gap: 12px; align-items: center; font-size: 13px; }
.brow .track { display: flex; height: 20px; border-radius: 6px; overflow: hidden; background: var(--line-2); }
.brow .track i { display: block; height: 100%; } .brow .tot { text-align: right; font-family: var(--mono); }
.k0 { background: var(--gov); } .k1 { background: var(--s2); } .k2 { background: #c9a24a; }
.bkey { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--ink-2); }
.bkey i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; vertical-align: -2px; margin-right: 6px; }
.dstats { display: flex; flex-wrap: wrap; gap: 10px 32px; } .dstats div { display: grid; gap: 2px; } .dstats b { font-family: var(--mono); font-size: 22px; }
svg.dchart { width: 100%; height: 120px; display: block; } svg.dchart rect { fill: var(--gov); } svg.dchart rect:hover { fill: var(--ink); }
.daxis { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.wcards .card { display: grid; gap: 6px; align-content: start; }
.wcards .t { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; }
.st { font-family: var(--mono); font-size: 11px; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.st.live { background: var(--green-soft); color: var(--green); }
.levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.levels > div { background: var(--panel); padding: 14px 16px; } .levels b { font-family: var(--mono); font-size: 13px; } .levels p { margin: 4px 0 0; font-size: 13px; color: var(--ink-2); }
.callout { border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 12px 14px; border-radius: 0 12px 12px 0; font-size: 14px; }
.ccm { font-family: var(--mono); font-size: 10px; font-weight: 700; border: 1px solid var(--line-3); color: var(--ink-2); border-radius: 4px; padding: 0 4px; margin-left: 6px; }
.hctl { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-top: 14px; font-size: 13px; }
.hctl select { font: inherit; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--line-3); background: var(--bg); color: var(--ink); }
.geos { display: flex; flex-wrap: wrap; gap: 6px; }
.gchip { display: inline-flex; gap: 4px; align-items: center; padding: 3px 4px 3px 10px; border-radius: 999px; border: 2px solid currentColor; font-weight: 600; }
.gchip button { border: 0; background: none; cursor: pointer; font-size: 15px; color: inherit; }
.gchip.c0, .ln.c0 { color: var(--viz-1); stroke: var(--viz-1); } .gchip.c1, .ln.c1 { color: var(--viz-2); stroke: var(--viz-2); }
.gchip.c2, .ln.c2 { color: var(--viz-3); stroke: var(--viz-3); } .gchip.c3, .ln.c3 { color: var(--viz-4); stroke: var(--viz-4); }
.gchip.c4, .ln.c4 { color: var(--viz-5); stroke: var(--viz-5); }
.chart path.ln { fill: none; stroke-width: 2; }
.chart circle.c0 { fill: var(--viz-1); } .chart circle.c1 { fill: var(--viz-2); } .chart circle.c2 { fill: var(--viz-3); }
.chart circle.c3 { fill: var(--viz-4); } .chart circle.c4 { fill: var(--viz-5); }
@media (max-width: 560px) { .brow { grid-template-columns: 90px minmax(0, 1fr) 64px; } }
.brow .track.gap { background: repeating-linear-gradient(45deg, var(--line-2) 0 3px, var(--bg) 3px 6px); border: 1px dashed var(--line-3); }
.chart path.ln.thin { stroke-dasharray: 4 4; stroke-width: 1.5; opacity: .7; }
td > .ccm:first-child, .gchip > .ccm:first-child { margin: 0 6px 0 0; }

.dbars { display: flex; align-items: flex-end; gap: 2px; height: 140px; border-bottom: 1px solid var(--line-3); }
.dbars button { flex: 1 1 0; min-width: 0; padding: 0; border: 0; border-radius: 2px 2px 0 0; background: var(--gov); cursor: pointer; }
.dbars button:hover, .dbars button:focus-visible { background: var(--s3); outline: 2px solid var(--accent); outline-offset: 1px; }
.dbars button[aria-pressed="true"] { background: var(--ink); }
.dpanel { display: grid; gap: 8px; border-top: 1px solid var(--line-2); padding-top: 12px; }
.dpanel h3 { margin: 0; font-size: 16px; } .dpanel p { margin: 0; font-size: 14px; }
.dpanel .tablebox { max-height: 420px; overflow-y: auto; }

td.cred { font-size: 12px; color: var(--ink-2); max-width: 420px; }
.cbars { display: flex; align-items: flex-end; gap: 2px; height: 160px; border-bottom: 1px solid var(--line-3); }
.cbars .col { flex: 1 1 0; min-width: 0; align-self: stretch; display: flex; flex-direction: column; justify-content: flex-end; }
.cbars .col:hover { outline: 1px solid var(--accent); }
.cp-imf, .cp-ibrd, .cp-ida, .cp-iadb { background: #8fa6cc; } .cp-paris_club { background: #2f4a7a; } .cp-china { background: #a8361a; }
.cp-other_official { background: #5a77a8; } .cp-private { background: #c9a24a; } .cp-fc_bank_loans { background: #8f5a00; }
.cp-fc_bonds { background: #16181d; } .cp-lc_debt { background: #2f6b45; }
.bkey i[class^="cp-"] { width: 12px; height: 12px; border-radius: 3px; display: inline-block; vertical-align: -2px; margin-right: 6px; }
.dpanel thead th { position: sticky; top: 0; z-index: 1; }

.comp > p { margin: 0; font-size: 14px; }
.cbars .col.on { outline: 2px solid var(--ink); outline-offset: 1px; }
.cbars .col { cursor: pointer; }
.m0 { background: var(--viz-1); } .m1 { background: var(--viz-2); } .m2 { background: var(--viz-3); } .m3 { background: var(--viz-4); }
.m4 { background: var(--viz-5); } .m5 { background: #5a77a8; } .mo { background: var(--line-3); }
.bkey i[class^="m"] { width: 12px; height: 12px; border-radius: 3px; display: inline-block; vertical-align: -2px; margin-right: 6px; }
.chart circle[data-i] { cursor: pointer; }
button.linkish { border: 0; background: none; color: var(--accent); cursor: pointer; font: inherit; padding: 0; }
td.act { white-space: nowrap; text-align: right; }
.comp .tablebox { max-height: 460px; overflow-y: auto; } .comp thead th { position: sticky; top: 0; z-index: 1; }
