/* Nepal Public Data — charts (assets/charts.js) and the topic pages that hold them (stream C).
   Colors only from the tokens in npd.css; light and dark both come from there. Spacing on a 4/8 px scale.
   Sections: 1 topic page head, highlight cards, section chips  2 sections and figures  3 every-figure list,
   related topics, topics index  4 chart marks  5 tooltip, keys, notes, figures table  6 motion and print. */

/* ================================================================ 1. topic head */
@media (prefers-reduced-motion:no-preference){html{scroll-behavior:smooth}}
.thead{padding-block:48px 8px}
.thead .kicker a{color:inherit;text-decoration:none}
.thead .kicker a:hover{text-decoration:underline}
.thead h1{margin-top:12px;font-size:clamp(40px,7.4vw,64px);letter-spacing:-.03em;line-height:1.04}
.thead h1 .ticon{display:block;width:56px;height:56px;padding:13px;margin-bottom:18px;border-radius:16px;background:var(--accent-soft);color:var(--accent-ink)}
.thead .lede{margin-top:16px;font-size:clamp(18px,2.2vw,22px);line-height:1.5;color:var(--ink-2);max-width:40em}
.thead .lede p+p{margin-top:10px}
.fig-num{font-weight:650;color:var(--ink)}
/* prose numbers read as prose (design review #8, quick win 13): bold stays only on the head's answer line
   (.st-line .fig-num) and on a chart's one-line answer (.npc-say b); the numbers in section text and the head's lede
   are plain, so the one that matters stands out */
.tsec>.sub b,.tsec>.sub .fig-num,.thead .lede b,.thead .lede .fig-num{font-weight:inherit;color:inherit}

/* highlight cards: a grid on wide screens, a swipeable row on phones */
.kpis{display:grid;gap:12px;margin-top:32px;grid-template-columns:repeat(auto-fill,minmax(min(100%,232px),1fr))}
.npc-kpis{margin-top:0}
@media (min-width:900px){.kpis:has(>.kpi:nth-child(5)):not(:has(>.kpi:nth-child(7))){grid-template-columns:repeat(3,minmax(0,1fr))}}
.kpi.card{padding:18px 18px 14px;gap:6px;border-radius:20px;text-decoration:none;color:inherit;transition:border-color var(--ease),box-shadow var(--ease),transform var(--ease)}
.kpi.card:hover{border-color:var(--line-2);box-shadow:var(--shadow);transform:translateY(-1px)}
.kpi.card:active{transform:translateY(0)}
.kpi .lab{font-size:13.5px;font-weight:600;color:var(--ink-2)}
.kpi .val{font-size:clamp(27px,3.2vw,34px);font-weight:700;letter-spacing:-.025em;line-height:1.08;font-variant-numeric:normal;overflow-wrap:anywhere}
.kpi .per{font-size:13px;color:var(--muted)}
.kpi .knote{font-size:13px;color:var(--ink-2);line-height:1.4}
.kpi .spk{display:block;min-height:40px;margin-top:4px}
.kpi .spk .spkc{display:block;margin-top:2px;font-size:11.5px;line-height:1.3;color:var(--muted)}
.kpi .spk:empty{display:none}
.kpi .src{margin-top:auto}
@media (max-width:639px){
  .kpis{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:minmax(232px,80%);overflow-x:auto;scroll-snap-type:x mandatory;
    margin-inline:calc(-1 * var(--gut));padding:2px var(--gut) 10px;scroll-padding-inline:var(--gut);scrollbar-width:none;overscroll-behavior-x:contain}
  .kpis::-webkit-scrollbar{display:none}
  .kpis>.kpi{scroll-snap-align:start}
  .npc-kpis{margin-inline:0;padding-inline:0;scroll-padding-inline:0}
}

/* section chips: under the head; page-topic.js moves them into a bar that stays under the header at every width
   (top:var(--hdr-vis), so it moves up while the header is hidden). Sections need no scroll-margin of their own: the
   jump offset in npd.css counts this bar (--subnav, measured by assets/npd.js). */
.toc{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;padding-block:10px;margin-top:24px}
.toc::-webkit-scrollbar{display:none}
.toc a{flex:none;display:inline-flex;align-items:center;min-height:40px;padding:0 16px;border-radius:999px;background:var(--surface-2);color:var(--ink-2);
  font-size:14.5px;font-weight:600;text-decoration:none;white-space:nowrap;transition:background var(--ease),color var(--ease)}
.toc a:hover{background:var(--surface-3);color:var(--ink)}
.toc a:active{transform:translateY(1px)}
.toc a.on{background:var(--ink);color:var(--bg)}
.tocbar{position:sticky;top:calc(var(--hdr-vis) + env(safe-area-inset-top,0px));z-index:20;background:color-mix(in srgb,var(--bg) 88%,transparent);-webkit-backdrop-filter:saturate(1.4) blur(14px);backdrop-filter:saturate(1.4) blur(14px);border-bottom:1px solid var(--line);transition:top var(--ease)}
.tocbar .toc{margin:0;margin-inline:calc(-1 * var(--gut));padding-inline:var(--gut);scroll-padding-inline:var(--gut)}

/* ================================================================ 2. sections and figures */
.tsec{padding-block:48px 56px}
.tsec>h2{font-size:clamp(28px,4.4vw,42px);letter-spacing:-.028em;line-height:1.1}
.tsec>.sub{margin:14px 0 28px;font-size:18px;line-height:1.55;color:var(--ink-2);max-width:65ch}
html[data-lang="ne"] .tsec>.sub{font-size:18.5px;line-height:1.65}
.tsec>.sub p+p{margin-top:12px}
.figs{display:grid;gap:16px;grid-template-columns:minmax(0,1fr)}
@media (min-width:900px){
  .figs{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
  .figs>.fig.wide{grid-column:1/-1}
}
.figure.fig{display:flex;flex-direction:column;padding:20px 20px 16px;border-radius:20px;min-width:0}
.fig h3{font-size:18px;font-weight:650;letter-spacing:-.012em;line-height:1.3}
.fig .fsub{margin-top:4px;font-size:14px;color:var(--muted)}
.fig .cv{margin-top:16px;min-width:0}
.fig .fnote{margin-top:12px;font-size:13px;line-height:1.45;color:var(--ink-2)}
.fig .srcnote{margin-top:8px;font-size:12.5px}
.fig .srcnote .cn{color:var(--ink-2)}
.fig .srcnote a{color:inherit}
.fig .srcnote a:hover{color:var(--accent-ink)}
.fig .ftab:empty{display:none}
@media (max-width:519px){
  .figure.fig{padding:16px 14px 12px;border-radius:16px}
  .fig h3{font-size:17px}
}

/* ================================================================ 3. every figure, related topics, topics index */
.mlist{list-style:none;margin:16px 0 0;padding:0;display:grid;column-gap:40px;grid-template-columns:repeat(auto-fill,minmax(min(100%,440px),1fr))}
.mlist li{display:flex;justify-content:space-between;align-items:baseline;gap:16px;padding:12px 0;border-bottom:1px solid var(--line);min-width:0}
.mlist li>a{font-weight:600;color:var(--ink);text-decoration:none;min-width:0}
.mlist li>a:hover{color:var(--accent-ink);text-decoration:underline}
.mlist .v{text-align:right;font-size:14px;color:var(--ink-2);font-variant-numeric:tabular-nums;max-width:55%}
@media (max-width:519px){
  .mlist li{flex-direction:column;gap:2px}
  .mlist .v{text-align:left;max-width:none}
}
.tchips{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px}
.tchip{display:inline-flex;align-items:center;gap:10px;min-height:44px;padding:6px 18px 6px 8px;border:1px solid var(--line);border-radius:999px;background:var(--surface);
  color:var(--ink);font-weight:600;text-decoration:none;transition:border-color var(--ease),box-shadow var(--ease),transform var(--ease)}
.tchip:hover{border-color:var(--line-2);box-shadow:var(--shadow);color:var(--ink)}
.tchip:active{transform:translateY(1px)}
.tchip .ticon{width:30px;height:30px;padding:6px;border-radius:999px;background:var(--accent-soft);color:var(--accent-ink);flex:none}
.tgrid{gap:16px;margin-top:16px}
.tcard.card{padding:22px;gap:10px;border-radius:20px}
a.tcard:hover{transform:translateY(-2px)}
a.tcard:active{transform:translateY(0)}
.tcard .ticon{width:48px;height:48px;padding:11px;border-radius:14px;background:var(--accent-soft);color:var(--accent-ink);flex:none}
.tcard .tname{margin-top:6px;font-size:21px;font-weight:700;letter-spacing:-.018em;line-height:1.2}
.tcard .tblurb{font-size:15px;line-height:1.45;color:var(--ink-2)}
.tcard .tfact{margin-top:4px;padding:12px 14px;border-radius:14px;background:color-mix(in srgb,var(--surface-2) 75%,var(--surface));font-size:13.5px;line-height:1.4;color:var(--ink-2)}
.tcard .tfact b{display:block;margin-bottom:2px;font-size:24px;font-weight:700;letter-spacing:-.02em;color:var(--ink)}
.tcard .tcount{margin-top:auto;padding-top:8px;font-size:12.5px;color:var(--muted)}
/* topics.html (topic_pages.topics_index): the collections fill one row on a desktop, two by two on a tablet */
@media (min-width:560px){.tgrid.cgrid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (min-width:1000px){.tgrid.cgrid{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr)}}

/* ================================================================ 4. charts */
.npc-host{position:relative;min-width:0}
.npc{position:relative;min-width:0}
.npc-plot{position:relative}
.npc-plot.npc-scroll{max-height:560px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.npc-svg{display:block;width:100%;height:auto;overflow:visible;font-family:var(--sans);touch-action:pan-y;-webkit-tap-highlight-color:transparent;user-select:none;-webkit-user-select:none}
.npc-svg:focus{outline:none}
.npc-svg:focus-visible{outline:2px solid var(--accent);outline-offset:4px;border-radius:8px}
.npc-svg text{fill:var(--muted)}
.npc-svg .yl,.npc-svg .xl,.npc-svg .lg{font-variant-numeric:tabular-nums}
.npc-svg .lg,.npc-svg .mh,.npc-svg .ep{font-size:.92em}
.npc-svg .ev,.npc-svg .bv{fill:var(--ink);font-weight:650}
.npc-svg .nm{fill:var(--ink-2);font-weight:500}
.npc-svg .bl,.npc-svg .al{fill:var(--ink-2)}
.npc-svg .bv2{fill:var(--muted)}
.npc-svg .rl,.npc-svg .pk{fill:var(--ink-2);font-weight:600}
.npc-svg .in{fill:var(--on-accent);font-weight:650;pointer-events:none}
.npc-svg .ev,.npc-svg .bv,.npc-svg .bv2,.npc-svg .rl,.npc-svg .nm,.npc-svg .ep{paint-order:stroke;stroke:var(--surface);stroke-width:3px;stroke-linejoin:round}
.npc-svg .g{stroke:var(--grid);stroke-width:1;shape-rendering:crispEdges}
.npc-svg .z,.npc-svg .g.z{stroke:var(--line-2);stroke-width:1;shape-rendering:crispEdges}
.npc-svg .ln{fill:none;stroke-width:2;stroke-linejoin:round;stroke-linecap:round}
.npc-svg .ln.main{stroke-width:2.25}
.npc-svg .ln.pv{stroke-dasharray:4 4;stroke-linecap:butt}
.npc-svg .ar.flat{fill:var(--c1);opacity:.1}
.npc-svg .dt{stroke:var(--surface);stroke-width:2}
.npc-svg .dt.ho{fill:var(--surface);stroke-width:2}
.npc-svg .dt.mid{stroke:none}
.npc-svg .dt.mid.ho{stroke-width:1.5;fill:var(--surface)}
.npc-svg .dt.pv{fill-opacity:.42}
.npc-svg .ld{stroke:var(--line-2);stroke-width:1}
.npc-svg .xh{stroke:var(--ink-2);stroke-width:1;opacity:0;transition:opacity var(--ease);pointer-events:none}
.npc-svg .xh.on{opacity:.4}
.npc-svg .hd{stroke:var(--surface);stroke-width:2;opacity:0;transition:opacity var(--ease);pointer-events:none}
.npc-svg .hd.on{opacity:1}
.npc-svg .hb{fill:var(--surface-2);opacity:0;transition:opacity var(--ease);pointer-events:none}
.npc-svg .hb.on{opacity:1}
.npc-svg .mk{transition:opacity var(--ease),fill-opacity var(--ease)}
.npc-svg .mk.pv{fill-opacity:.42}
.npc-svg .hit{fill:transparent}
.npc-svg.golink .row{cursor:pointer}
.npc-svg.hov .row:not(.on) .mk,.npc-svg.hov .row:not(.on) .dt{opacity:.45}
.npc-svg.hov .row.on .bl,.npc-svg.hov .row.on .al{fill:var(--ink)}
.npc-svg .cm{stroke:var(--ink-2);stroke-width:2;stroke-linecap:round}
.npc-svg .ref{stroke:var(--ink-2);stroke-width:1.5;stroke-dasharray:3 3;opacity:.75}
.npc-svg .db{stroke:var(--line-2);stroke-width:3;stroke-linecap:round}
.npc-svg .cl{transition:opacity var(--ease)}
.npc-svg.heat.hov .cl{opacity:.8}
.npc-svg .hatch{fill:var(--surface);opacity:.6}
.npc-svg .sel{fill:none;stroke:var(--ink);stroke-width:2;opacity:0;transition:opacity var(--ease);pointer-events:none}
.npc-svg .sel.on{opacity:1}
.npc-spark{display:block;width:100%;height:40px;overflow:visible}
.npc-spark .sa{fill:var(--c1);opacity:.1}
.npc-spark .sl{fill:none;stroke:var(--c1);stroke-width:2;stroke-linejoin:round;stroke-linecap:round}
.npc-spark .sl.pv{stroke-dasharray:3 3;stroke-linecap:butt}
.npc-spark .se{fill:var(--c1);stroke:var(--surface);stroke-width:2}
.npc-spark .se.ho{fill:var(--surface);stroke:var(--c1)}

/* small multiples */
.npc-mgrid{display:grid;row-gap:20px}
.npc-pan{min-width:0}
.npc-pan .ph{display:flex;flex-direction:column;gap:1px;margin-bottom:6px;font-size:14px;line-height:1.3}
.npc-pan .pt{font-weight:650;color:var(--ink);text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.npc-pan a.pt:hover{color:var(--accent-ink);text-decoration:underline}
.npc-pan .pvv{font-size:12.5px;color:var(--muted);white-space:nowrap}
.npc-pan .pvv b{font-size:14px;color:var(--ink);font-variant-numeric:tabular-nums}

/* parts: the list under the 100% bar */
ul.npc-parts{list-style:none;margin:16px 0 0;padding:0;display:grid;gap:10px 28px;grid-template-columns:repeat(auto-fill,minmax(min(100%,240px),1fr))}
.npc-parts li{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:baseline;gap:8px;font-size:14px}
.npc-parts .pn{color:var(--ink-2)}
.npc-parts b{font-variant-numeric:tabular-nums}
.npc-parts .pv{font-size:13px;color:var(--muted);font-variant-numeric:tabular-nums}
.npc-parts .k{align-self:center}

/* ================================================================ 5. tooltip, keys, notes, the figures table */
.npc-tip{position:absolute;left:0;top:0;z-index:6;pointer-events:none;max-width:min(300px,92%);padding:8px 11px;border:1px solid var(--line-2);border-radius:12px;
  background:var(--surface);color:var(--ink);box-shadow:var(--shadow);font-size:13px;line-height:1.35;opacity:0;transition:opacity var(--ease);white-space:normal}
.npc-tip.on{opacity:1}
.npc-tip .th{margin-bottom:4px;font-size:12px;font-weight:600;color:var(--muted)}
.npc-tip .tr{display:flex;align-items:center;gap:7px;padding-block:1px}
.npc-tip .tr b{font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}
.npc-tip .tr span{color:var(--ink-2)}
.npc-tip .tr em{font-style:normal;font-size:11.5px;color:var(--muted)}
.npc i.k,.npc-tip i.k{flex:none;display:inline-block;width:10px;height:10px;border-radius:3px;background:var(--kc)}
.npc i.k.line,.npc-tip i.k.line{width:14px;height:3px;border-radius:2px}
.npc i.k.dot,.npc-tip i.k.dot{border-radius:50%}
.npc i.k.tick,.npc-tip i.k.tick{width:3px;height:12px;border-radius:2px}
.npc i.k.dash{width:0;height:14px;border-radius:0;background:none;border-left:2px dashed var(--kc)}
.npc-key{display:flex;flex-wrap:wrap;gap:6px 18px;margin:0 0 12px;font-size:13px;line-height:1.3;color:var(--ink-2)}
.npc-key .ki{display:inline-flex;align-items:center;gap:7px}
.npc-cap{margin:0 0 10px;font-size:13.5px;color:var(--ink-2)}
.npc-cap b{color:var(--ink);font-variant-numeric:tabular-nums}
/* calculated values (shares, per person): a badge and what the values are, over the chart */
.npc-cap.npc-calc{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;min-height:20px;line-height:1.35}
.npc-cap.npc-calc .badge{flex:none}
.npc-skel{width:100%}
.npc-note{margin-top:10px;font-size:12.5px;line-height:1.45;color:var(--ink-2)}
.npc-say{margin:10px 0 0;font-size:14px;line-height:1.5;color:var(--ink);max-width:72ch;text-wrap:pretty}
.npc-data{margin-top:10px}
.npc-data summary{display:inline-flex;align-items:center;min-height:32px}
.npc-dt{margin-top:8px}
.npc-tw{max-height:440px;overflow:auto;overscroll-behavior:contain}
.npc-table{font-size:13.5px}
.npc-table th,.npc-table td{padding:8px 10px}
.npc-table thead th{z-index:2;min-width:6.5em;vertical-align:bottom;line-height:1.3}
.npc-table thead th:first-child{min-width:0}
.npc-tw.per tbody th{white-space:nowrap}
.npc-table thead th:first-child{left:0;z-index:3}
.npc-table tbody th{position:sticky;left:0;top:auto;z-index:1;background:var(--surface);color:var(--ink);font-size:13.5px;font-weight:600;min-width:7em}
.npc-table tbody tr:hover th{background:var(--bg-2)}
.npc-table .st{font-size:11px;color:var(--muted)}
.npc-table .fn,.npc-table .ab{margin-left:2px;font-size:10px;color:var(--muted)}
.npc-table .fn{color:var(--accent-ink)}
.npc-fn{margin:8px 0 0;padding-left:22px;font-size:12.5px;line-height:1.45;color:var(--ink-2)}
html[data-lang="ne"] .npc-fn{list-style-type:devanagari}
.npc-tt{max-height:none}
.npc-tt.tall{max-height:520px}
.npc-tt .lt{font-weight:700}
.npc-map{min-height:120px}

/* league and versus: providers ranked, and any two side by side (the select style of the rankings page) */
.lg-table thead th{min-width:6em}
.lg-table .lg-rank{width:2.4em;min-width:0;color:var(--muted);font-variant-numeric:tabular-nums}
.lg-table tbody th{min-width:9em;white-space:normal}
.lg-table td{font-variant-numeric:tabular-nums}
.lg-table td small,.vs-table td small{color:var(--ink-2)}
.lg-share{min-width:6.5em}
.lg-share .lg-v{display:block}
.lg-bar{display:block;height:4px;margin:4px 0 0 auto;border-radius:2px;background:var(--c1);max-width:100%}
.lg-rest th,.lg-rest td{color:var(--ink-2)}
.lg-rest th,.lg-rest td,.lg-table tfoot th,.lg-table tfoot td{border-top:1px solid var(--line-2)}
.lg-table tfoot th,.lg-table tfoot td{font-weight:650;background:var(--surface)}
.lg-table tfoot th{position:sticky;left:0}
.vs-pick{display:flex;flex-wrap:wrap;gap:10px 16px;margin:0 0 14px}
.vs-l{display:flex;flex-direction:column;gap:6px;flex:1 1 220px;min-width:0}
.vs-l>span{font-size:13px;font-weight:650;color:var(--muted)}
.vs-l select{height:44px;width:100%;max-width:100%;border:1px solid var(--line-strong);border-radius:12px;background:var(--surface);padding:0 36px 0 12px;font-size:15px;color:var(--ink);cursor:pointer;
  appearance:none;-webkit-appearance:none;background-image:linear-gradient(45deg,transparent 50%,var(--muted) 50%),linear-gradient(135deg,var(--muted) 50%,transparent 50%);
  background-position:calc(100% - 18px) 19px,calc(100% - 13px) 19px;background-size:5px 5px;background-repeat:no-repeat}
.vs-l select:hover{border-color:var(--muted)}
.vs-l select:focus-visible{outline:none;border-color:var(--accent);box-shadow:0 0 0 1px var(--accent),0 0 0 4px color-mix(in srgb,var(--accent) 28%,transparent)}
.vs-table thead th{min-width:7em}
.vs-table tbody th{min-width:10em;white-space:normal;font-weight:600}
.vs-table td{font-variant-numeric:tabular-nums}
.vs-dot{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:6px}
.vs-line{margin-top:16px}
/* targets: a plan's indicators, status and target */
.tg-table tbody th{min-width:12em;white-space:normal;font-weight:600}
.tg-table tbody th a{color:var(--ink);text-decoration:underline;text-decoration-color:var(--line-2);text-underline-offset:3px}
.tg-table tbody th a:hover{text-decoration-color:var(--accent)}
.tg-table td{font-variant-numeric:tabular-nums;white-space:nowrap}
.tg-table td.tg-t{font-weight:650}
.tg-table td.tg-aim{color:var(--ink-2)}
.tg-up,.tg-down{font-size:10px;color:var(--accent-ink)}
.tg-pick{display:flex;flex-direction:column;gap:6px;margin:0 0 14px;max-width:420px}
.tg-pick label{font-size:13px;font-weight:650;color:var(--muted)}
.tg-pick select{height:44px;width:100%;max-width:100%;border:1px solid var(--line-strong);border-radius:12px;background:var(--surface);padding:0 36px 0 12px;font-size:15px;color:var(--ink);cursor:pointer;
  appearance:none;-webkit-appearance:none;background-image:linear-gradient(45deg,transparent 50%,var(--muted) 50%),linear-gradient(135deg,var(--muted) 50%,transparent 50%);
  background-position:calc(100% - 18px) 19px,calc(100% - 13px) 19px;background-size:5px 5px;background-repeat:no-repeat}
.tg-pick select:hover{border-color:var(--muted)}
.tg-pick select:focus-visible{outline:none;border-color:var(--accent);box-shadow:0 0 0 1px var(--accent),0 0 0 4px color-mix(in srgb,var(--accent) 28%,transparent)}
.tg-code{display:inline-block;min-width:3.6em;margin-right:4px;font-size:12px;font-weight:600;color:var(--muted);font-variant-numeric:tabular-nums}
.tg-table th.tg-trh{min-width:9.5em;white-space:normal;font-size:12px;font-weight:600;color:var(--muted)}
.tg-table td.tg-tr{white-space:normal;min-width:9.5em}
.tg-bar{position:relative;display:block;height:14px;margin:2px 6px 3px}
.tg-line{position:absolute;left:0;right:0;top:6px;height:2px;border-radius:2px;background:var(--line-2)}
.tg-mile{position:absolute;top:1px;width:2px;height:12px;margin-left:-1px;background:var(--ink-2)}
.tg-dot{position:absolute;top:2px;width:10px;height:10px;margin-left:-5px;border-radius:50%;background:var(--accent)}
.tg-dot.tg-out{background:var(--surface);border:2px solid var(--accent);width:6px;height:6px}
.tg-w{display:block;font-size:12px;line-height:1.3}
.tg-ok{color:var(--good)}
.tg-mid{color:var(--warn-ink)}
.tg-bad{color:var(--bad)}
.tg-na{color:var(--muted)}
@media (max-width:560px){
  /* each indicator becomes a card: its name, then its figures side by side with their headings, then the scale */
  .tg-wrap{overflow:visible;max-height:none;border:0}
  .tg-table,.tg-table tbody,.tg-table tr{display:block;width:100%}
  .tg-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .tg-table tr{padding:10px 0 8px;border-bottom:1px solid var(--line)}
  .tg-table tbody th{display:block;min-width:0;padding:0 2px 6px;border:0}
  .tg-table td{display:inline-block;vertical-align:top;box-sizing:border-box;padding:2px 2px 4px;border:0;text-align:left;white-space:normal}
  .tg-c2 td{width:50%}
  .tg-c4 td{width:25%}
  .tg-table td::before{content:attr(data-label) "\A" attr(data-sub);white-space:pre;display:block;font-size:11px;line-height:1.25;font-weight:600;color:var(--muted);margin-bottom:2px}
  .tg-table td.tg-tr,.tg-table td.tg-aim{display:block;width:100%;min-width:0}
  .tg-table td.tg-tr::before{display:none}
  .tg-table td.tg-aim::before{content:attr(data-label);display:inline;margin-right:6px;font-size:12px}
  .tg-bar{margin:6px 6px 4px}
  .tg-code{min-width:0}
}
@media (max-width:560px){
  .vs-table thead th{min-width:0}
  .vs-table tbody th{min-width:6.5em}
  .vs-table th,.vs-table td{padding:7px 6px}
  .lg-table thead th{min-width:4.5em}
  .lg-table tbody th{min-width:7.5em}
}

/* ---------- constituency map (assets/constmap.js) ---------- */
.npc-constmap{--cm-park:var(--line)}
.cm-pick{max-width:300px}
.cm{display:block;width:100%;height:auto;cursor:pointer}
.cm .cm-c path{stroke:var(--surface);stroke-width:.7;stroke-linejoin:round;vector-effect:non-scaling-stroke}
.cm .cm-c path.cm-out{opacity:.3;cursor:default}
.cm .cm-k path{fill:var(--cm-park);stroke:var(--surface);stroke-width:.7;vector-effect:non-scaling-stroke;pointer-events:none}
.cm .cm-ld{fill:none;stroke:var(--surface);stroke-width:1.6;stroke-linejoin:round;vector-effect:non-scaling-stroke;pointer-events:none}
.cm .cm-lp{fill:none;stroke:var(--ink-2);stroke-width:1.1;stroke-linejoin:round;vector-effect:non-scaling-stroke;pointer-events:none}
.cm .cm-hi{fill:none;stroke:var(--ink);stroke-width:2.4;stroke-linejoin:round;vector-effect:non-scaling-stroke;pointer-events:none}
.cm-plot+.npc-key{margin-top:10px}
.npc-tip .cm-tn b{font-size:14px;font-weight:700;white-space:normal}
.npc-constmap .npc-key{margin-top:10px}

/* ================================================================ 6. motion and print */
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .npc-tip,.npc-svg *,.kpi.card,.tcard,.tchip,.toc a{transition:none!important}
  .kpi.card:hover,a.tcard:hover{transform:none}
}
@media print{
  .tocbar{position:static}
  .npc-tip{display:none}
  .npc-tw,.npc-plot.npc-scroll{max-height:none;overflow:visible}
}

/* ---------- banks.html (assets/bankcharts.js): find your bank, coins, how income becomes profit ---------- */
.npc-svg .lim{stroke:var(--ink);stroke-width:1.5;stroke-dasharray:6 3}
.bk-cards{display:grid;gap:16px;grid-template-columns:minmax(0,1fr)}
@media (min-width:760px){.bk-cards.two{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}}
.bk-card{border:1px solid var(--line);border-radius:16px;background:var(--surface);padding:16px 16px 6px;min-width:0}
.bk-h h4{margin:0;font-size:20px;line-height:1.25;letter-spacing:-.01em;text-wrap:balance}
.bk-kind{margin:4px 0 0;color:var(--muted);font-size:13px}
.bk-rows{display:grid;margin-top:6px}
.bk-r{padding:14px 0;border-top:1px solid var(--line);min-width:0}
.bk-r:first-child{border-top:0}
.bk-l{margin:0;font-size:13px;font-weight:650;color:var(--muted);display:flex;flex-wrap:wrap;gap:6px 8px;align-items:center}
.bk-v{margin:2px 0 0;font-size:24px;font-weight:700;letter-spacing:-.01em;font-variant-numeric:tabular-nums;color:var(--ink)}
.bk-s{margin:6px 0 0;font-size:14px;line-height:1.55;color:var(--ink-2);max-width:62ch}
.bk-pic{margin-top:10px}
.bk-own{font-size:11px;font-weight:650;color:var(--ink-2);border:1px dashed var(--line-2);border-radius:999px;padding:2px 8px;white-space:nowrap}
.bk-coins{display:block}
.bk-coins .off{fill:var(--surface-3)}
.bk-coins .on{fill:var(--c1)}
.bk-meter,.bk-ruler{max-width:420px}
.bk-track{position:relative;height:12px;border-radius:6px;background:var(--surface-3)}
.bk-fill{position:absolute;left:0;top:0;bottom:0;border-radius:6px;background:var(--c1)}
.bk-lim{position:absolute;top:-5px;bottom:-5px;width:0;border-left:2px dashed var(--ink)}
.bk-scale{position:relative;display:flex;justify-content:space-between;font-size:12px;color:var(--muted);margin-top:8px;min-height:16px;font-variant-numeric:tabular-nums}
.bk-liml{position:absolute;top:0;transform:translateX(calc(-100% - 4px));white-space:nowrap;color:var(--ink);font-weight:600}
.bk-line{position:relative;height:26px;margin:0 9px;border-bottom:1px solid var(--line-2)}
.bk-line i{position:absolute;transform:translateX(-50%);border-radius:50%}
.bk-dot{width:10px;height:10px;bottom:-5px;background:var(--c2)}
.bk-me{width:16px;height:16px;bottom:-8px;background:var(--c1);box-shadow:0 0 0 3px var(--surface);z-index:1}
.bk-line .bk-allm{width:0;height:24px;bottom:-12px;border-radius:0;border-left:2px dashed var(--ink)}
.bk-trs{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));margin-top:6px}
.bk-tn{display:block;font-size:13px;color:var(--ink-2);font-weight:600}
.bk-spk{display:block;margin-top:4px}
.bk-spk svg{max-width:100%;height:auto}
.bk-spkc{display:block;font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
.bk-cgrid{display:grid;gap:12px;grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}
.bk-ct{border:1px solid var(--line);border-radius:12px;padding:10px 10px 12px;background:var(--surface);min-width:0}
.bk-ct.all{border-color:var(--c1)}
.bk-cn{margin:0 0 8px;font-size:13px;font-weight:650;line-height:1.3;min-height:2.6em}
.bk-cn a{color:var(--ink);text-decoration:none;border-radius:4px}
.bk-cn a:hover{text-decoration:underline}
.bk-cn a:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.bk-cv{margin:8px 0 0;font-size:15px;font-weight:700;font-variant-numeric:tabular-nums}
.bk-cv small{display:block;font-size:12px;font-weight:400;color:var(--muted)}
.npc-svg.wf .wf-t{fill:var(--c1)}
.npc-svg.wf .wf-u{fill:var(--c1);opacity:.55}
.npc-svg.wf .wf-d{fill:var(--c2)}
.npc-svg.wf .wf-c{stroke:var(--ink-2);stroke-dasharray:3 2;stroke-width:1}
.npc-svg.wf .wf-j{stroke:var(--line-2);stroke-width:1}
.npc-svg.wf .z{stroke:var(--line-2);stroke-width:1}
.npc-svg.wf text{fill:var(--ink-2)}
.npc-svg.wf .wf-lt,.npc-svg.wf .wf-vt{fill:var(--ink);font-weight:700}

/* "In 30 seconds": the plain-words opening of a topic page (topic_pages.brief_html) */
.brief{margin-top:24px}
.brief-h{font-size:13px!important;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--accent-ink);margin:0 0 10px}
.brief ul{list-style:none;margin:0;padding:18px 22px;display:grid;gap:10px;border:1px solid var(--line);border-left:4px solid var(--accent);border-radius:0 14px 14px 0;background:var(--surface);max-width:52em}
.brief li{position:relative;padding-left:18px;font-size:17px;line-height:1.6}
.brief li::before{content:"";position:absolute;left:0;top:.62em;width:7px;height:7px;border-radius:50%;background:var(--accent)}
.brief .fig-num{font-weight:700;font-variant-numeric:tabular-nums}
@media (max-width:560px){.brief ul{padding:14px 16px}.brief li{font-size:16px}}


/* ---------------- If the budget were Rs 100 (finance.html, pipeline/page_defs/hubs.py budget100) ---------------- */
.b1-grid{display:grid;gap:16px;grid-template-columns:repeat(auto-fit,minmax(min(100%,360px),1fr));margin-top:16px}
.b1-side{padding:18px;border:1px solid var(--line);border-radius:16px;background:var(--surface);min-width:0}
.b1-side h3{margin:0 0 12px;font-size:17px}
.b1-coins{display:grid;grid-template-columns:repeat(10,1fr);gap:4px;max-width:300px}
.b1-coins i{display:block;aspect-ratio:1;border-radius:50%;background:var(--c)}
.b1-list{list-style:none;margin:16px 0 0;padding:0;display:grid;gap:8px}
.b1-list li{display:grid;grid-template-columns:12px 64px minmax(0,1fr);gap:4px 10px;align-items:baseline}
.b1-sw{width:12px;height:12px;border-radius:50%;background:var(--c);align-self:center}
.b1-rs{font-size:17px;font-variant-numeric:tabular-nums;white-space:nowrap}
.b1-lab{font-size:14px;line-height:1.4;color:var(--ink-2)}
.b1-lab small{display:block;font-size:12.5px;color:var(--muted)}
.b100 .srcnote{margin-top:14px}

/* ---------------- Atlas: Nepal in maps (atlas.html, pipeline/page_defs/atlas.py) ---------------- */
.at-grid{display:grid;gap:16px;grid-template-columns:repeat(auto-fill,minmax(min(100%,420px),1fr))}
.at-map{margin:0;min-width:0}
.at-map h3 a{color:inherit;text-decoration:none}
.at-map h3 a:hover{color:var(--accent-ink);text-decoration:underline}
.at-svg{display:block;width:100%;height:auto;margin-top:8px}
.at-svg path{stroke:var(--bg);stroke-width:.6;vector-effect:non-scaling-stroke;stroke-linejoin:round}
.at-svg a:hover path{opacity:.75}
.at-pv path{fill:none;stroke:var(--ink);stroke-opacity:.5;stroke-width:1.2;vector-effect:non-scaling-stroke;pointer-events:none}
.a-q1{fill:var(--q1);background:var(--q1)}.a-q2{fill:var(--q2);background:var(--q2)}.a-q3{fill:var(--q3);background:var(--q3)}
.a-q4{fill:var(--q4);background:var(--q4)}.a-q5{fill:var(--q5);background:var(--q5)}.a-na{fill:var(--surface-2);background:var(--surface-2)}
.at-leg{list-style:none;display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:6px 14px;margin:10px 0 0;padding:0;font-size:12.5px;line-height:1.35}
.at-leg li{display:grid;grid-template-columns:14px minmax(0,1fr);gap:0 8px;align-items:center}
.at-leg i{width:14px;height:14px;border-radius:3px;border:1px solid var(--line)}
.at-leg small{grid-column:2;color:var(--muted);font-size:11.5px}
.at-hl{margin:8px 0 0;font-size:13.5px;line-height:1.45;color:var(--ink-2)}
.at-hl b{color:var(--ink);margin-right:6px}
.at-miss{margin:6px 0 0;font-size:12.5px;color:var(--muted)}
.at-note{margin-top:16px;font-size:12.5px;color:var(--muted);max-width:80ch}

/* ---------------- hub cards (finance.html, customs.html; pipeline/page_defs/hubs.py) ---------------- */
.tcard .tkind{margin-top:6px;font-size:12.5px;font-weight:600;color:var(--muted)}
.tcard .tkind+.tname{margin-top:2px}
@media (max-width:559px){
  /* a compact row on phones: icon beside a shorter title, two lines of blurb, the figure inline */
  .hubgrid{gap:10px}
  .hubgrid .tcard{display:grid;grid-template-columns:32px minmax(0,1fr);column-gap:12px;row-gap:4px;padding:14px 16px}
  .hubgrid .tcard>.ticon{grid-row:1/span 4;width:32px;height:32px;padding:6px;margin:0}
  .hubgrid .tcard .tname{margin-top:0;font-size:17px}
  .hubgrid .tcard .tkind{margin-top:0}
  .hubgrid .tcard .tblurb{font-size:14px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .hubgrid .tcard .tfact{padding:8px 10px;font-size:13px}
  .hubgrid .tcard .tcount{padding-top:2px}
}
.at-miss{display:flex;gap:8px;align-items:center}
.at-nd{flex:none;width:14px;height:14px;border-radius:3px;border:1px solid var(--line);
  background:repeating-linear-gradient(45deg,var(--muted) 0 1.5px,var(--surface) 1.5px 4px)}
.at-more{margin:0 0 16px;font-size:15px;font-weight:600}
.bk-own{margin:6px 0 0;font-size:14px}
/* the list of bank pages (pipeline/page_defs/bank_pages.py bank_list): banks.html, sector-banking.html, bank-terms.html */
.bk-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,260px),1fr));gap:8px;list-style:none;padding:0;margin:0}
.bk-list a{display:flex;justify-content:space-between;gap:10px;align-items:baseline;padding:12px 14px;border:1px solid var(--line);
  border-radius:12px;text-decoration:none;color:var(--ink);min-height:48px}
.bk-list a:hover,.bk-list a:focus-visible{border-color:var(--accent)}
.bk-v{color:var(--muted);font-size:14px;white-space:nowrap}
/* the bank-page figures shown on banks.html (bank_pages.profit_table; their full styles are in business.css) */
#bank-pages .bz-fig{display:flex;flex-direction:column;gap:6px;min-width:0;border-radius:20px;padding:20px 20px 14px}
#bank-pages .bz-fig h3{font-size:17px;letter-spacing:-.01em;margin:0}
#bank-pages .bz-fig .fsub{font-size:13.5px;color:var(--muted);margin:0}
#bank-pages .bz-fig .srcnote{margin-top:6px;font-size:12.5px;color:var(--muted)}
#bank-pages .pl-say{margin:4px 0 10px;font-size:16px;line-height:1.5;max-width:68ch}
