/* Bangladesh Energy Price Monitor (/analytics/energy-price-monitor).
   Generated from the original stand-alone index.html: every selector is scoped
   under .epm so nothing leaks into the site header/footer or Tailwind, the
   dark-mode rules are dropped (the site is light only) and the sticky section
   nav sits below the 5rem site header. Font faces come from Google Fonts
   (see the page's <HeadContent>). */
/* Layout: masthead with as-of stamps → sticky section nav → overview (KPI tiles, cross-energy index, latest revisions) → one band per fuel type, each chart-first with its ledger beneath. */
.epm{
  --bg:#f5f7f6; --surface:#ffffff; --surface-2:#edf1ef; --line:#dce3df; --line-strong:#c3ccc7;
  --ink:#162332; --ink-2:#465364; --ink-3:#6a7686;
  --accent:#007a26; --accent-soft:#e5f5e9; --brand:#01b22e; --brand-2:#94c93d; --headline:#009a28; --lime-soft:#f1f8e5; --lime-ink:#4d7a12;
  --up:#b4261a; --up-soft:#fbe9e7; --down:#1f6fb2; --down-soft:#e4eff9;
  --changed:#e6f3cf; --changed-ink:#3b5a0c;
  --bar:#94c93d;
  --s1:#0a8f34; --s2:#1f3f6e; --s3:#86b52a; --s4:#2a9fd6; --s5:#d1477a; --s6:#a7a9ac; --s7:#6a4fb8;
  --f-display:"Rubik","Source Sans 3","Segoe UI",system-ui,sans-serif;
  --f-body:"Source Sans 3","Segoe UI",system-ui,sans-serif;
  --f-mono:"IBM Plex Mono",ui-monospace,"SFMono-Regular",Menlo,monospace;
}
.epm *{box-sizing:border-box}
.epm{background:var(--bg);color:var(--ink);font-family:var(--f-body);font-size:15px;line-height:1.5}
.epm .wrap{max-width:1240px;margin:0 auto;padding-inline:clamp(16px,3vw,32px)}
.epm h1,.epm h2,.epm h3{font-family:var(--f-display);text-wrap:balance;margin:0;letter-spacing:-.01em}
.epm h1{font-size:clamp(28px,4.4vw,44px);font-weight:700;line-height:1.08;color:var(--headline)}
.epm h2{font-size:25px;font-weight:600;color:var(--headline)}
.epm h3{font-size:16px;font-weight:600}
.epm p{margin:0}
.epm .num{font-family:var(--f-mono);font-variant-numeric:tabular-nums}
.epm .eyebrow{font-family:var(--f-display);font-size:12px;font-weight:650;letter-spacing:.09em;text-transform:uppercase;color:var(--ink-3)}
.epm .muted{color:var(--ink-2)}
.epm .small{font-size:13px}

/* brand */
.epm .brand{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px 24px;padding-bottom:18px;margin-bottom:22px;border-bottom:1px solid var(--line)}
.epm .brand img{height:62px;width:auto;max-width:100%}
.epm .brand .upd{font-family:var(--f-mono);font-size:12.5px;color:var(--ink-3)}
.epm .mast{position:relative}
.epm .mast::before{content:"";position:absolute;inset:0 0 auto 0;height:5px;background:linear-gradient(90deg,var(--brand) 0 62%,var(--brand-2) 62% 100%)}

/* author */
.epm .author{display:flex;align-items:center;gap:14px;margin-top:18px;padding:12px 16px 12px 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface);width:fit-content;max-width:100%}
.epm .author img{width:68px;height:68px;border-radius:50%;object-fit:cover;flex:none;box-shadow:0 0 0 3px var(--surface),0 0 0 5px var(--brand)}
.epm .author-txt{display:flex;flex-direction:column;gap:1px;min-width:0;font-size:13.5px;color:var(--ink-2);line-height:1.4}
.epm .author-txt b{font-family:var(--f-display);font-size:16px;font-weight:600;color:var(--ink)}
.epm .author-txt a{color:var(--accent);text-decoration:none;font-family:var(--f-mono);font-size:12.5px;overflow-wrap:anywhere;user-select:all}
.epm .author-txt a:hover{text-decoration:underline}
.epm .author-txt .eyebrow{font-size:10.5px}

/* masthead */
.epm .mast{padding-block:28px 20px;border-bottom:1px solid var(--line)}
.epm .mast-row{display:flex;flex-wrap:wrap;gap:20px 40px;align-items:flex-end;justify-content:space-between}
.epm .mast .lede{max-width:62ch;margin-top:10px;color:var(--ink-2)}
.epm .stamps{display:flex;flex-wrap:wrap;gap:8px}
.epm .stamp{display:flex;flex-direction:column;gap:2px;padding:8px 12px;border:1px solid var(--brand-2);border-radius:6px;background:var(--surface);min-width:0}
.epm .stamp b{font-family:var(--f-mono);font-size:13px;font-weight:600}
.epm .stamp span{font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-3);font-family:var(--f-display);font-weight:650}

/* nav */
.epm nav.sec{position:sticky;top:calc(5rem + env(safe-area-inset-top,0px));z-index:20;background:color-mix(in srgb,var(--bg) 92%,transparent);backdrop-filter:blur(6px);border-bottom:1px solid var(--line)}
.epm nav.sec .wrap{display:flex;gap:4px;overflow-x:auto;padding-block:8px;scrollbar-width:none}
.epm nav.sec a{font-family:var(--f-display);font-weight:650;font-size:14px;color:var(--ink-2);text-decoration:none;padding:6px 12px;border-radius:999px;white-space:nowrap}
.epm nav.sec a:hover{background:var(--accent-soft);color:var(--accent)}
.epm nav.sec a.on{background:var(--accent);color:var(--surface)}
.epm nav.sec a:focus-visible,.epm button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

.epm section.band{padding-block:36px 8px;scroll-margin-top:130px}
.epm .band-head{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:8px 24px;margin-bottom:18px}
.epm .band-head p{max-width:70ch}

/* KPI tiles */
.epm .kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
@media (max-width:900px){.epm .kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:560px){.epm .kpis{grid-template-columns:minmax(0,1fr)}}
.epm .kpi{background:var(--surface);border:1px solid var(--line);transition:border-color .15s;border-radius:8px;padding:14px 16px 12px;display:flex;flex-direction:column;gap:4px;min-width:0}
.epm .kpi:hover{border-color:var(--brand-2)}
.epm .kpi .lbl{font-size:13px;color:var(--ink-2);font-weight:600}
.epm .kpi .val{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap}
.epm .kpi .val b{font-family:var(--f-display);font-size:32px;font-weight:600;line-height:1.1;font-variant-numeric:tabular-nums}
.epm .kpi .val small{font-size:13px;color:var(--ink-3)}
.epm .kpi .spark{height:34px;width:100%;margin-top:2px}
.epm .kpi .foot{font-size:13px;color:var(--ink-2);display:flex;flex-wrap:wrap;gap:4px 10px}
.epm .chip{display:inline-flex;align-items:center;gap:4px;font-family:var(--f-mono);font-size:12px;font-weight:600;padding:1px 7px;border-radius:4px;white-space:nowrap}
.epm .chip.up{background:var(--up-soft);color:var(--up)}
.epm .chip.down{background:var(--down-soft);color:var(--down)}
.epm .chip.flat{background:var(--surface-2);color:var(--ink-2)}
.epm .sector{font-family:var(--f-display);font-size:11px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;padding:2px 7px;border-radius:4px;border:1px solid var(--brand-2);color:var(--accent);white-space:nowrap}

/* panels */
.epm .grid2{display:grid;grid-template-columns:minmax(0,1.75fr) minmax(0,1fr);gap:16px;align-items:start}
@media (max-width:900px){.epm .grid2{grid-template-columns:minmax(0,1fr)}}
.epm .panel{background:var(--surface);border:1px solid var(--line);border-radius:8px;padding:16px;min-width:0}
.epm .panel-head{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:flex-start;gap:8px 16px;margin-bottom:10px}
.epm .panel-head p{font-size:13px;color:var(--ink-2);margin-top:2px}
.epm .chart-box{position:relative;height:340px}
.epm .chart-box.tall{height:380px}
@media (max-width:600px){.epm .chart-box,.epm .chart-box.tall{height:300px}}
.epm .legend{display:flex;flex-wrap:wrap;gap:6px 14px;font-size:13px;color:var(--ink-2);margin-bottom:8px}
.epm .legend span{display:inline-flex;align-items:center;gap:6px}
.epm .legend i{width:14px;height:3px;border-radius:2px;display:inline-block}
.epm .seg{display:inline-flex;border:1px solid var(--line-strong);border-radius:6px;overflow:hidden}
.epm .seg button{font:600 13px var(--f-body);background:var(--surface);color:var(--ink-2);border:0;padding:5px 11px;cursor:pointer;border-left:1px solid var(--line-strong)}
.epm .seg button:first-child{border-left:0}
.epm .seg button:hover{background:var(--surface-2)}
.epm .seg button[aria-pressed="true"]{background:var(--accent);color:var(--surface)}

/* tooltip */
.epm .tip{position:absolute;pointer-events:none;z-index:5;background:var(--surface);border:1px solid var(--brand);border-radius:6px;box-shadow:0 6px 18px rgb(0 0 0 / .12);padding:8px 10px;font-size:12.5px;min-width:170px;opacity:0;transition:opacity .12s}
.epm .tip.show{opacity:1}
.epm .tip .d{font-family:var(--f-display);font-weight:700;margin-bottom:4px;color:var(--ink)}
.epm .tip .r{display:flex;align-items:center;gap:7px;justify-content:space-between;line-height:1.6}
.epm .tip .r span{display:inline-flex;align-items:center;gap:6px;color:var(--ink-2)}
.epm .tip .r i{width:9px;height:9px;border-radius:50%;display:inline-block}
.epm .tip .r b{font-family:var(--f-mono);font-weight:600;color:var(--ink)}

/* tables */
.epm .tbl-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:8px;background:var(--surface)}
.epm .tbl-wrap.scroll{max-height:440px;overflow-y:auto}
.epm table{border-collapse:collapse;width:100%;font-size:13.5px}
.epm th,.epm td{padding:8px 10px;text-align:left;border-bottom:1px solid var(--line);vertical-align:top}
.epm thead th{position:sticky;top:0;background:var(--accent-soft);font-family:var(--f-display);font-weight:700;font-size:12px;letter-spacing:.04em;text-transform:uppercase;color:var(--accent);white-space:nowrap;z-index:1}
.epm td.n,.epm th.n{text-align:right;font-family:var(--f-mono);font-variant-numeric:tabular-nums;white-space:nowrap}
.epm tbody tr:hover td{background:color-mix(in srgb,var(--surface-2) 60%,transparent)}
.epm tr.grp td{background:var(--surface-2);font-family:var(--f-display);font-weight:700;font-size:11.5px;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-3);padding-block:5px}
.epm td.chg{background:var(--changed);color:var(--changed-ink);font-weight:600}
.epm td.na{color:var(--ink-3)}
.epm .note-cell{min-width:260px;color:var(--ink-2)}
.epm .src{color:var(--ink-3);font-size:12px;white-space:nowrap}
.epm .ser{display:inline-flex;align-items:center;gap:7px;white-space:nowrap}
.epm .ser i{width:10px;height:10px;border-radius:2px;display:inline-block}
.epm .inbar{display:flex;align-items:center;gap:8px;justify-content:flex-end}
.epm .inbar .tr{width:80px;height:8px;background:var(--surface-2);border-radius:2px;overflow:hidden}
.epm .inbar .tr div{height:100%;background:var(--bar);border-radius:0 2px 2px 0}

/* horizontal bars */
.epm .hbars{display:flex;flex-direction:column;gap:9px}
.epm .hbar{display:grid;grid-template-columns:minmax(0,11em) minmax(0,1fr) 5.2em;gap:10px;align-items:center;font-size:13px}
.epm .hbar .t{height:14px;background:var(--surface-2);border-radius:2px;position:relative}
.epm .hbar .t div{position:absolute;inset:0 auto 0 0;background:var(--bar);border-radius:0 4px 4px 0}
.epm .hbar .t div.hl{background:var(--brand)}
.epm .hbar .k{color:var(--ink-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.epm .hbar .v{text-align:right;font-family:var(--f-mono);font-weight:600}

/* feed */
.epm .feed{display:flex;flex-direction:column}
.epm .feed-item{display:grid;grid-template-columns:6.8em minmax(0,1fr);gap:10px;padding:10px 0;border-top:1px solid var(--line)}
.epm .feed-item:first-child{border-top:0;padding-top:2px}
.epm .feed-item .dt{font-family:var(--f-mono);font-size:12.5px;color:var(--ink-2)}
.epm .feed-item .tt{display:flex;flex-wrap:wrap;gap:6px;align-items:center;font-weight:600}
.epm .feed-item p{font-size:13px;color:var(--ink-2);margin-top:2px}

.epm .callout{display:flex;gap:10px;padding:10px 12px;border-radius:6px;background:var(--accent-soft);font-size:13px;color:var(--ink);margin-top:12px}
.epm .stack{display:flex;flex-direction:column;gap:16px}
.epm .mt16{margin-top:16px}
.epm details summary{cursor:pointer;font-family:var(--f-display);font-weight:700;font-size:15px;padding-block:6px;color:var(--ink)}
.epm .notes{columns:2 340px;column-gap:32px;font-size:13.5px;color:var(--ink-2)}
.epm .notes li{margin-bottom:8px;break-inside:avoid}
.epm .srcs{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:6px 24px;font-size:13px;padding:0;list-style:none}
.epm .srcs a{color:var(--accent);text-decoration-thickness:1px;text-underline-offset:2px}
.epm [hidden]{display:none!important}
/* notes panel */
.epm #sources{margin-top:40px;padding:26px clamp(16px,3vw,28px) 18px;background:var(--lime-soft);border:1.5px solid var(--brand-2);border-radius:12px;position:relative;overflow:hidden}
.epm #sources::before{content:"";position:absolute;inset:0 0 auto 0;height:5px;background:var(--brand-2)}
.epm #sources .band-head h2{color:var(--lime-ink)}
.epm #sources .notes li::marker{color:var(--brand-2)}
.epm .colophon{padding-block:30px 40px;margin-top:40px;color:var(--ink-3);font-size:12.5px;position:relative;background:var(--surface)}
.epm .colophon::before{content:"";position:absolute;inset:0 0 auto 0;height:5px;background:linear-gradient(90deg,var(--brand) 0 62%,var(--brand-2) 62% 100%)}
.epm .foot-row{display:flex;flex-wrap:wrap;align-items:center;gap:14px 28px}
.epm .foot-row img{height:40px;width:auto}
.epm .foot-row p{flex:1 1 380px;min-width:0;max-width:80ch}
@media (prefers-reduced-motion: reduce){.epm *{transition:none!important;scroll-behavior:auto!important}}

/* Tailwind preflight undo-s needed inside the dashboard */
.epm .notes{list-style:disc;padding-left:1.25em}
.epm .colophon .wrap{display:block}
