/* Business and the economy (business.html) and the sector pages (sector-telecom.html, sector-electricity.html).
   Markup: pipeline/page_defs/business.py and pipeline/page_defs/sectorkit.py. Builds on npd.css, charts.css and
   story.css: the opening is a night-sky band (.story, always dark) with the long-run line glowing across it;
   everything else follows the visitor's theme through the site's tokens (--k1 ... --k8 for series). */

/* ---------- the opening ---------- */
.bz-hero .st-num{font-variant-numeric:tabular-nums}
.bz-hero .kpis{position:relative;z-index:1}
.bz-hero .st-meta a{color:var(--muted);text-decoration:underline;text-decoration-color:var(--line-2)}
.bz-hero .st-meta a:hover{color:var(--ink)}
.bz-heroart{position:relative;margin-top:clamp(18px,3vw,30px);height:clamp(90px,14vw,150px);border-bottom:1px solid rgba(255,255,255,.12)}
.bz-heroart svg{position:absolute;inset:0;width:100%;height:100%;display:block;filter:drop-shadow(0 0 10px rgba(91,155,255,.45))}
.bz-heroart span{position:absolute;bottom:-22px;font-size:12px;font-weight:600;letter-spacing:.04em;color:var(--muted);font-variant-numeric:tabular-nums;white-space:nowrap}
.bz-ha{left:0}.bz-hb{right:0}
.bz-hero .kpis{margin-top:40px}
.bz-sp{display:flex;align-items:center;gap:8px;margin-top:2px}
.bz-spark{width:96px;height:28px;flex:none;overflow:visible}
.bz-sc{font-size:11.5px;line-height:1.3;color:var(--muted)}
.mtn-tocbar .toc{padding-block:8px}

/* ---------- sections and figures ---------- */
.bz-sec>.sub{max-width:70ch}
.bz-sec>.sub a,.bz-more a{font-weight:600}
.bz-two{display:grid;gap:16px;margin-top:16px;grid-template-columns:minmax(0,1fr);align-items:start}
@media (min-width:900px){.bz-two{grid-template-columns:repeat(2,minmax(0,1fr))}}
.bz-two:empty{display:none}
.bz-sec>.bz-fig,.bz-sec>.bz-two+.bz-fig{margin-top:16px}
.bz-fig{display:flex;flex-direction:column;gap:6px;min-width:0;border-radius:20px;padding:20px 20px 14px}
.bz-fig h3{font-size:17px;letter-spacing:-.01em}
.bz-fig .fsub{font-size:13.5px;color:var(--muted)}
.bz-fig .srcnote{margin-top:6px;font-size:12.5px;color:var(--muted)}
.bz-fig .srcnote a{color:inherit}
.bz-fig .srcnote a:hover{color:var(--accent-ink)}
.bz-fig details.data{margin-top:6px;font-size:14px}
.bz-fig details.data summary{cursor:pointer;color:var(--accent-ink);font-weight:600;min-height:32px;display:flex;align-items:center}
.bz-fig .rows{margin-top:8px}
@media (max-width:519px){.bz-fig{padding:16px 14px 12px;border-radius:16px}}
.bz-more{margin-top:14px;font-size:15px}

/* ---------- charts (sectorkit: line, stacked columns) ---------- */
.bz-scroll{overflow-x:auto;margin-top:6px;-webkit-overflow-scrolling:touch}
.bz-svg{min-width:420px}
.bz-svg text{font-size:12px;fill:var(--muted);font-variant-numeric:tabular-nums}
.bz-svg .yl{text-anchor:end}
.bz-svg .xl{text-anchor:middle}
.bz-svg .el{font-size:13px;font-weight:700}
.bz-svg .el2{font-size:11.5px;fill:var(--muted)}
.bz-svg .z0{stroke:var(--line-strong)}
.ln{fill:none;stroke-width:2.5;stroke-linejoin:round;stroke-linecap:round}
.ar{stroke:none;opacity:.16}
.ln.k1{stroke:var(--k1)}.ln.k2{stroke:var(--k2)}.ln.k3{stroke:var(--k3)}.ln.k4{stroke:var(--k4)}
.ln.k5{stroke:var(--k5)}.ln.k6{stroke:var(--k6)}.ln.k7{stroke:var(--k7)}.ln.k8{stroke:var(--k8)}
.ar.k1,.dt.k1,rect.k1{fill:var(--k1)}.ar.k2,.dt.k2,rect.k2{fill:var(--k2)}.ar.k3,.dt.k3,rect.k3{fill:var(--k3)}
.ar.k4,.dt.k4,rect.k4{fill:var(--k4)}.ar.k5,.dt.k5,rect.k5{fill:var(--k5)}.ar.k6,.dt.k6,rect.k6{fill:var(--k6)}
.ar.k7,.dt.k7,rect.k7{fill:var(--k7)}.ar.k8,.dt.k8,rect.k8{fill:var(--k8)}
.dt{stroke:var(--surface);stroke-width:2}
.bz-svg text.el.k1{fill:color-mix(in srgb,var(--k1) 78%,var(--ink))}.bz-svg text.el.k2{fill:color-mix(in srgb,var(--k2) 78%,var(--ink))}
.bz-svg text.el.k3{fill:color-mix(in srgb,var(--k3) 78%,var(--ink))}.bz-svg text.el.k4{fill:color-mix(in srgb,var(--k4) 78%,var(--ink))}
.bz-svg text.el.k5{fill:color-mix(in srgb,var(--k5) 78%,var(--ink))}.bz-svg text.el.k6{fill:color-mix(in srgb,var(--k6) 70%,var(--ink))}
.bz-svg text.el.k7{fill:color-mix(in srgb,var(--k7) 55%,var(--ink))}.bz-svg text.el.k8{fill:var(--ink-2)}
.bz-svg rect{stroke:var(--surface);stroke-width:1}

/* legends, the share bar, bar meters */
.bz-leg{list-style:none;margin:6px 0 0;padding:0;display:flex;flex-wrap:wrap;gap:6px 16px;font-size:13.5px;color:var(--ink-2)}
.bz-leg li{display:flex;align-items:center;gap:7px}
.bz-leg li b{font-weight:700;color:var(--ink);font-variant-numeric:tabular-nums}
.bz-leg i{display:inline-block;width:12px;height:12px;border-radius:4px;flex:none}
.bz-leg i.k1,.bz-share i.k1,.bz-m-k1 i{background:var(--k1)}.bz-leg i.k2,.bz-share i.k2,.bz-m-k2 i{background:var(--k2)}
.bz-leg i.k3,.bz-share i.k3,.bz-m-k3 i{background:var(--k3)}.bz-leg i.k4,.bz-share i.k4,.bz-m-k4 i{background:var(--k4)}
.bz-leg i.k5,.bz-share i.k5,.bz-m-k5 i{background:var(--k5)}.bz-leg i.k6,.bz-share i.k6,.bz-m-k6 i{background:var(--k6)}
.bz-leg i.k7,.bz-share i.k7,.bz-m-k7 i{background:var(--k7)}.bz-leg i.k8,.bz-share i.k8,.bz-m-k8 i{background:var(--k8)}
.bz-share{display:flex;height:30px;margin-top:12px;border-radius:10px;overflow:hidden;gap:2px;background:var(--surface-2)}
.bz-share i{display:block;height:100%;min-width:2px}
.bz-share+.bz-leg{margin-top:12px;display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,220px),1fr));gap:8px 16px}
.bz-share+.bz-leg li{align-items:flex-start}
.bz-share+.bz-leg i{margin-top:4px}

/* ---------- the growth board (a heat table) ---------- */
.bz-wide{margin-top:16px}
.bz-hkey{margin-top:8px}
.bz-hkey i{width:22px}
.bz-heatwrap{margin-top:12px}
.bz-heat{border-collapse:separate;border-spacing:2px;width:100%;font-size:13px;font-variant-numeric:tabular-nums}
.bz-heat th,.bz-heat td{padding:6px 7px;white-space:nowrap}
.bz-heat thead th{font-size:12px;font-weight:600;color:var(--muted);text-align:right}
.bz-heat thead th:first-child{text-align:left}
.bz-heat tbody th{font-weight:500;text-align:left;white-space:normal;min-width:16ch;max-width:32ch;line-height:1.3;
  position:sticky;left:0;z-index:1;background:var(--surface);box-shadow:4px 0 6px -4px rgba(0,0,0,.18)}
.bz-heat td{border-radius:6px;text-align:right;color:var(--ink)}
.bz-heat .bz-tot th{font-weight:700}
.bz-heat .bz-tot td{font-weight:700;box-shadow:inset 0 0 0 1.5px var(--line-strong)}
.hn{background:color-mix(in srgb,var(--k3) 34%,var(--surface))}
.h0{background:color-mix(in srgb,var(--k1) 7%,var(--surface))}
.h1{background:color-mix(in srgb,var(--k1) 16%,var(--surface))}
.h2{background:color-mix(in srgb,var(--k1) 26%,var(--surface))}
.h3{background:color-mix(in srgb,var(--k1) 36%,var(--surface))}
.h4{background:color-mix(in srgb,var(--k1) 46%,var(--surface))}
.bz-hkey i.hn,.bz-hkey i.h0,.bz-hkey i.h1,.bz-hkey i.h2,.bz-hkey i.h3,.bz-hkey i.h4{box-shadow:inset 0 0 0 1px var(--line)}

/* ---------- facts list, doors, notes, the report door ---------- */
.bz-facts{list-style:none;margin:10px 0 0;padding:0;display:grid;gap:12px}
.bz-facts li{display:flex;flex-direction:column;gap:2px;font-size:14px;color:var(--ink-2)}
.bz-facts b{font-size:26px;font-weight:750;letter-spacing:-.02em;color:var(--ink);font-variant-numeric:tabular-nums}
.bz-doors{display:grid;gap:14px;grid-template-columns:repeat(auto-fill,minmax(min(100%,260px),1fr))}
.bz-door{position:relative;padding:18px 18px 16px;gap:6px}
.bz-door:hover{border-color:var(--line-2);box-shadow:var(--shadow);transform:translateY(-1px)}
.bz-dt{font-size:17px;font-weight:700;letter-spacing:-.01em;padding-right:24px}
.bz-dd{font-size:14px;line-height:1.5;color:var(--muted)}
.bz-dn{font-size:32px;font-weight:800;letter-spacing:-.03em;line-height:1.05;color:var(--accent-ink);font-variant-numeric:tabular-nums}
.bz-dl{font-size:13px;color:var(--ink-2)}
.bz-go{position:absolute;top:16px;right:16px;color:var(--accent-ink);font-weight:700}
.bz-hot{grid-column:span 1;border-color:color-mix(in srgb,var(--accent) 40%,var(--line));
  background:linear-gradient(160deg,color-mix(in srgb,var(--accent) 9%,var(--surface)),var(--surface) 60%)}
@media (min-width:900px){.bz-doors{grid-template-columns:repeat(4,minmax(0,1fr))}.bz-hot{grid-column:span 2}}
.bz-note{max-width:80ch;padding:16px 18px;border:1px solid var(--line);border-radius:14px;background:var(--surface);font-size:15px;line-height:1.6}
.bz-note p+p{margin-top:10px}
.bz-note a{font-weight:600}
.bz-report{flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:16px;padding:20px 22px;
  background:linear-gradient(160deg,color-mix(in srgb,var(--accent) 8%,var(--surface)),var(--surface) 70%)}
.bz-report>div{flex:1 1 320px;min-width:0;display:flex;flex-direction:column;gap:6px}
.bz-report .kicker{font-size:12px;font-weight:650;letter-spacing:.08em;text-transform:uppercase;color:var(--accent-ink)}
.bz-report h3{font-size:19px}
.bz-report h3 a{color:inherit;text-decoration:none}
.bz-report h3 a:hover{text-decoration:underline}
.bz-report p{color:var(--ink-2);font-size:15px}

@media (prefers-reduced-motion:reduce){.bz-door{transition:none}.bz-door:hover{transform:none}}

.bz-heat caption{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* Power projects in the pipeline (sector-electricity.html#pipeline; markup: pipeline/page_defs/hydro.py, script: hydro.js) */
.hy-leg{display:flex;flex-wrap:wrap;gap:6px 16px;margin:4px 0 10px;font-size:14px;color:var(--muted)}
.hy-leg span{display:inline-flex;align-items:center;gap:6px}
.hy-leg i{display:inline-block;width:12px;height:12px;border-radius:3px}
.hy-leg i.bz-k1,.hy-track i.bz-k1{background:var(--k1)}.hy-leg i.bz-k2,.hy-track i.bz-k2{background:var(--k2)}
.hy-bars{display:grid;gap:8px}
.hy-bar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 12px;align-items:baseline;font-size:15px}
.hy-bar .num{font-variant-numeric:tabular-nums}
.hy-track{grid-column:1/-1;display:flex;height:10px;border-radius:5px;background:var(--line);overflow:hidden}
.hy-track i{display:block;height:100%}
.hy-lab{display:block;font-weight:600;margin:6px 0 6px}
.hy-q{width:100%;min-height:48px;padding:10px 14px;font-size:17px;border-radius:12px;border:1px solid var(--line-strong);
  background:var(--bg);color:var(--ink)}
.hy-q:focus-visible{outline:3px solid var(--accent);outline-offset:1px}
.hy-count{font-size:14px;color:var(--muted);min-height:1.4em;margin:8px 0}
.hy-st{display:inline-block;font-size:12.5px;padding:1px 8px;border-radius:999px;border:1px solid var(--line-strong);white-space:nowrap}
#pipeline .bz-two+.bz-fig,#pipeline .bz-fig+.bz-fig{margin-top:16px}

/* State-owned companies (state-companies.html; markup: pipeline/page_defs/statecos.py) */
.sc-table td:nth-child(2){white-space:nowrap}
.sc-table .sc-neg{color:var(--bad,#b42318)}
.sc-iss{display:grid;gap:8px;padding-left:1.2em;margin:10px 0}
.sc-iss .muted{color:var(--muted)}

/* The Department of Industry's FDI approvals inside the FDI section (pipeline/page_defs/doi_fdi.py) */
.bz-subh{margin:28px 0 4px;font-size:1.15rem}

/* Bank pages and Banking words (pipeline/page_defs/bank_pages.py) */
.bk-term{text-decoration:underline dotted;text-underline-offset:3px}
.bk-plain ul{display:grid;gap:10px;margin:8px 0 0;padding-left:1.2em;font-size:17px;line-height:1.55}
.bk-words{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,320px),1fr));gap:14px}
.bk-word{border:1px solid var(--line);border-radius:14px;padding:16px 18px;background:var(--bg);scroll-margin-top:90px}
.bk-word:target{outline:3px solid var(--accent);outline-offset:2px}
.bk-word h3{margin:0 0 6px;font-size:1.05rem}
.bk-word p{margin:6px 0}
.bk-ex{font-size:14px}
.bk-tleft td:nth-child(2),.bk-tleft th:nth-child(2){text-align:left}
/* Compare banks (bank-compare.html) */
.bc-pick{display:flex;flex-wrap:wrap;gap:12px;margin:0 0 16px}
.bc-l>span::before{content:"";display:inline-block;width:12px;height:12px;border-radius:3px;margin-right:6px;vertical-align:-1px;background:var(--k1)}
.bc-l:nth-child(2)>span::before{background:var(--k3)}.bc-l:nth-child(3)>span::before{background:var(--k4)}
.bc-table td small.bc-pos{display:block;color:var(--muted);font-size:12px;margin-top:2px}
.bc-table th[data-b] a{color:var(--ink)}
.bc-svg .ln.bc-o{stroke:var(--muted);stroke-width:1;opacity:.28;fill:none}
.bc-svg .ln.bc-all{stroke:var(--ink);stroke-width:1.5;stroke-dasharray:5 4;fill:none;opacity:.7}
.bc-svg .ln.bc-p{stroke-width:3}
.bc-svg .bc-off{display:none}
.bc-svg text.bc-all-l{fill:var(--muted)}
/* Hydropower, project by project (hydropower.html) */
.hy-leg i.bz-k5,.hy-track i.bz-k5,.hp-dot.bz-k5{background:var(--k5)}.hy-leg i.bz-k8,.hy-track i.bz-k8,.hp-dot.bz-k8{background:var(--k8)}
.hp-dot.bz-k1{background:var(--k1)}.hp-dot.bz-k2{background:var(--k2)}
.hp-steps{list-style:none;padding:0;margin:16px 0 0;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr));gap:14px;counter-reset:none}
.hp-step{position:relative;border:1px solid var(--line);border-radius:14px;padding:16px 18px 14px;background:var(--bg)}
.hp-step h3{margin:0 0 6px;font-size:1.05rem;display:flex;align-items:center;gap:8px}
.hp-step p{margin:6px 0}
.hp-n{position:absolute;top:12px;right:14px;font-size:13px;font-weight:700;color:var(--muted)}
.hp-dot{display:inline-block;width:12px;height:12px;border-radius:3px;flex:none}
.hp-fig{font-variant-numeric:tabular-nums}
.hp-scroll{max-height:560px;overflow:auto}
/* Foreign investment (foreign-investment.html) */
.fi-big{font-size:1.6rem;font-weight:700;margin:4px 0 0;letter-spacing:-.01em}
.fi-scroll{max-height:520px;overflow:auto}
/* Profit or loss, explained (bank pages) */
.pl-say{margin:4px 0 10px;font-size:16px;line-height:1.5;max-width:68ch}
.pl-rows{display:grid;gap:8px}
.pl-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 12px;align-items:baseline;font-size:14.5px}
.pl-v{font-variant-numeric:tabular-nums;white-space:nowrap}
.pl-track{grid-column:1/-1;position:relative;height:10px;border-radius:5px;background:var(--line)}
.pl-mid{position:absolute;left:50%;top:-3px;bottom:-3px;width:1px;background:var(--muted)}
.pl-bar{position:absolute;top:0;bottom:0;border-radius:3px}
.pl-up{background:var(--k1)}.pl-down{background:var(--k8)}
.pl-key{display:inline-block;width:12px;height:12px;border-radius:3px}
.pl-plain{margin:4px 0 12px;padding-left:1.2em;display:grid;gap:6px;font-size:15px}

/* bank pages: five years (bank_pages.profit_years, years_table, merger_block) */
.bz-svg rect.bk-first{fill:none;stroke:var(--ink);stroke-width:1.6;stroke-dasharray:5 4}
.bz-svg .bk-vl{text-anchor:middle;font-size:12.5px}
.bz-leg i.bk-first-key{background:none;border:1.6px dashed var(--ink);box-sizing:border-box}
.bk-years table{min-width:640px}
.bk-years td,.bk-years th{white-space:nowrap}
.bk-members{columns:2 240px;margin:10px 0 0;padding-left:18px;font-size:14px;line-height:1.5}
.bk-members small{margin-left:4px}
.bk-tall td,.bk-tall th{text-align:left}

/* bank-compare.html: the strips (bank_compare.strips) */
.bc-strip{min-width:640px}
.bc-strip .bc-sl{font-size:13.5px;font-weight:700;fill:var(--ink)}
.bc-strip .bc-ax{stroke:var(--line-strong);stroke-width:1.5}
.bc-strip .bc-zero{stroke:var(--muted);stroke-width:1}
.bc-strip .bc-med{stroke:var(--ink);stroke-width:2}
.bc-strip .bc-od{fill:var(--muted);opacity:.45;stroke:var(--surface);stroke-width:1}
.bc-strip .bc-dl{text-anchor:middle;font-size:12.5px}
.bc-strip circle.dt{stroke-width:2.5}
.bz-leg i.bc-med-key{width:3px;height:14px;border-radius:1px;background:var(--ink)}

/* bank pages: the five-year ledger in the hero (bank_pages.hero_ledger) */
.bk-ledger{position:relative;z-index:1;margin-top:clamp(20px,3vw,32px);max-width:760px}
.bk-ledger .lg-cap{margin:0 0 10px;font-size:13px;font-weight:600;color:var(--muted)}
.lg-cols{display:grid;gap:clamp(8px,2vw,18px)}
.lg-col{display:flex;flex-direction:column;align-items:stretch;min-width:0}
.lg-v{font-size:clamp(11.5px,1.5vw,14px);font-weight:700;color:var(--ink);font-variant-numeric:tabular-nums;text-align:center;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:6px}
.lg-plot{position:relative;height:clamp(84px,12vw,128px)}
.lg-plot::after{content:"";position:absolute;left:-6px;right:-6px;bottom:var(--z);border-top:1px solid var(--line-strong)}
.lg-bar,.lg-ghost{position:absolute;left:12%;right:12%;display:block;border-radius:5px 5px 2px 2px}
.lg-bar{background:linear-gradient(180deg,#5b9bff,rgba(91,155,255,.55));box-shadow:0 0 18px rgba(91,155,255,.35)}
.lg-bar.lg-loss{border-radius:2px 2px 5px 5px;background:linear-gradient(0deg,#5b9bff,rgba(91,155,255,.4))}
.lg-bar.lg-unaud{background:repeating-linear-gradient(135deg,rgba(91,155,255,.95) 0 6px,rgba(91,155,255,.45) 6px 11px)}
.lg-ghost{left:6%;right:6%;border:1.5px dashed var(--ink);opacity:.55;border-radius:6px;z-index:1}
.lg-y{margin-top:8px;font-size:12.5px;font-weight:600;color:var(--ink-2);text-align:center;font-variant-numeric:tabular-nums;white-space:nowrap}
.lg-y small{display:block;font-weight:500;color:var(--muted);font-size:11.5px}
@media (prefers-reduced-motion:no-preference){
  .lg-bar{transform-origin:50% calc(100% - 0px);animation:lgrise .7s cubic-bezier(.2,.7,.2,1) both}
  .lg-col:nth-child(2) .lg-bar{animation-delay:.06s}.lg-col:nth-child(3) .lg-bar{animation-delay:.12s}
  .lg-col:nth-child(4) .lg-bar{animation-delay:.18s}.lg-col:nth-child(5) .lg-bar{animation-delay:.24s}
}
@keyframes lgrise{from{opacity:0;transform:scaleY(.15)}to{opacity:1;transform:none}}
.lg-bar.lg-loss{transform-origin:50% 0}
.lg-ys{display:none}
@media (max-width:560px){
  .lg-yl{display:none}.lg-ys{display:inline}
  .lg-v{white-space:normal;font-size:11px;line-height:1.2;min-height:2.4em;display:flex;align-items:flex-end;justify-content:center}
  .lg-y{font-size:12px}
}

/* development-banks.html, finance-companies.html (page_defs/bfi_pages.py) */
.bc-strip .bf-dot{opacity:.7;stroke:var(--surface);stroke-width:1.2}
.bc-strip .bf-end{text-anchor:end}
.bf-side table,.bf-heat table{min-width:720px}
.bf-side td,.bf-side th,.bf-heat td{white-space:nowrap}
.bf-heat td.bf-h{background:rgba(91,155,255,calc(var(--a) * .55));font-variant-numeric:tabular-nums}
