/* চাঁদাবাজ — a public ledger.
   The visual register is deliberately documentary rather than promotional:
   ruled rows, tabular figures, numbered entries. It should read like a record
   being kept, not like a campaign. No web fonts are loaded — Bangla renders
   from system faces so that reading this site sends no request to a third
   party. */

:root {
  color-scheme: light;

  --paper:      #f7f5f0;
  --paper-2:    #fffdf8;
  --ink:        #16130f;
  --ink-2:      #4a443c;
  /* #726b60 rather than a lighter grey: this colour carries report metadata,
     reference codes and filter labels, and at #7d756a every one of them
     measured 4.17:1 on the paper background — below the 4.5:1 AA floor. */
  --ink-3:      #726b60;
  --rule:       #ddd6c8;
  --rule-2:     #ebe5d9;

  --accent:     #8c1c13;
  --accent-2:   #b8271a;
  --accent-ink: #fff6f4;

  --paid:       #a8531a;
  --refused:    #1d6b45;
  --negotiated: #2a5a8c;
  --pending:    #6f6a60;

  --shadow: 0 1px 2px rgb(22 19 15 / .06), 0 8px 24px -12px rgb(22 19 15 / .18);

  --bn: 'Hind Siliguri', 'Noto Sans Bengali', SolaimanLipi, Kalpurush,
        'Nirmala UI', Vrinda, 'Bangla MN', 'Kohinoor Bangla',
        'Lohit Bengali', system-ui, sans-serif;
  --mono: 'SF Mono', ui-monospace, 'Cascadia Mono', Menlo, Consolas, monospace;

  --wrap: 1120px;
  --r: 3px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper:   #14120f;
    --paper-2: #1c1916;
    --ink:     #f0ece4;
    --ink-2:   #b9b1a4;
    --ink-3:   #857d70;
    --rule:    #332e28;
    --rule-2:  #26221d;
    --accent:  #e0503f;
    --accent-2:#f06a58;
    --accent-ink: #1a0d0b;
    --paid:       #d98a4a;
    --refused:    #4fb583;
    --negotiated: #6ba3d9;
    --pending:    #948c80;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 8px 24px -12px rgb(0 0 0 / .7);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper:   #14120f;  --paper-2: #1c1916;
  --ink:     #f0ece4;  --ink-2:   #b9b1a4;  --ink-3: #857d70;
  --rule:    #332e28;  --rule-2:  #26221d;
  --accent:  #e0503f;  --accent-2:#f06a58;  --accent-ink: #1a0d0b;
  --paid: #d98a4a; --refused: #4fb583; --negotiated: #6ba3d9; --pending: #948c80;
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 8px 24px -12px rgb(0 0 0 / .7);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--bn);
  font-size: 16px;
  line-height: 1.65;
  font-feature-settings: 'tnum' 0;
}
[lang="en"] body, body[data-lang="en"] { line-height: 1.6; }

h1,h2,h3,h4 { line-height: 1.18; margin: 0; font-weight: 700; letter-spacing: -.015em; }
p { margin: 0 0 1em; }
a { color: inherit; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; }
.mono { font-family: var(--mono); font-size: .9em; }
.muted { color: var(--ink-3); }
.sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }

/* ---- header ---- */
.top {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.top-in { display: flex; align-items: center; gap: 18px; height: 62px; }
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; margin-inline-end: auto; }
.brand b { color: var(--ink); }
.brand b { font-size: 21px; letter-spacing: -.03em; }
.brand span { font-size: 11px; color: var(--ink-3); letter-spacing: .1em; text-transform: uppercase; }

.nav { display: flex; gap: 4px; align-items: center; }
.nav a {
  text-decoration: none; font-size: 14.5px; color: var(--ink-2);
  padding: 7px 11px; border-radius: var(--r);
}
.nav a:hover { background: var(--rule-2); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; background: var(--rule-2); }

/* The call-to-action button lives inside .nav, and `.nav a` (0,1,1) outranks
   `.btn` (0,1,0) — so without these rules the button silently inherits the
   muted link colour and the link padding, rendering dark brown text on the
   dark accent background at roughly 1.05:1. Invisible. Anything styled as a
   .btn inside the nav needs its own selector at matching specificity. */
.nav a.btn {
  color: var(--accent-ink);
  background: var(--accent);
  padding: 9px 17px;
  font-weight: 600;
  font-size: 14.5px;
}
.nav a.btn:hover {
  background: var(--accent-2);
  color: var(--accent-ink);
}
.nav a.btn[aria-current="page"] {
  background: var(--accent);
  color: var(--accent-ink);
}

.icon-btn {
  background: none; border: 1px solid var(--rule); border-radius: var(--r);
  padding: 6px 10px; cursor: pointer; font-size: 13px; color: var(--ink-2);
}
.icon-btn:hover { border-color: var(--ink-3); color: var(--ink); }

.burger { display: none; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--r); border: 1px solid transparent;
  background: var(--accent); color: var(--accent-ink); font-weight: 600;
  text-decoration: none; cursor: pointer; font-size: 15px;
  transition: background .15s, border-color .15s, transform .06s;
}
.btn:hover { background: var(--accent-2); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: none; border-color: var(--rule); color: var(--ink); }
.btn.ghost:hover { border-color: var(--ink-3); background: var(--rule-2); }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---- hero ---- */
.hero { padding: 68px 0 40px; border-bottom: 1px solid var(--rule); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 22px;
}
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--refused); }
@media (prefers-reduced-motion: no-preference) {
  .pulse { animation: pulse 2.4s ease-in-out infinite; }
  @keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .3 } }
}
.hero h1 { font-size: clamp(34px, 6vw, 62px); letter-spacing: -.035em; max-width: 17ch; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede { font-size: clamp(16px, 2vw, 19px); color: var(--ink-2); max-width: 56ch; margin-top: 20px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* ---- stat strip ---- */
.strip { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--rule); }
.strip > div { padding: 22px 20px; border-inline-start: 1px solid var(--rule); }
.strip > div:first-child { border-inline-start: none; padding-inline-start: 0; }
.strip dt { font-size: 12px; color: var(--ink-3); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 6px; }
.strip dd { margin: 0; font-size: clamp(22px, 3vw, 31px); font-weight: 700; letter-spacing: -.03em; }

/* ---- sections ---- */
.sec { padding: 56px 0; border-bottom: 1px solid var(--rule); }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.sec-head h2 { font-size: clamp(22px, 3vw, 30px); letter-spacing: -.03em; }
.sec-head p { margin: 8px 0 0; color: var(--ink-2); max-width: 62ch; }

/* ---- report card ---- */
.cards { display: grid; gap: 0; border-top: 1px solid var(--rule); }
.card {
  display: grid; grid-template-columns: 62px 1fr auto; gap: 18px;
  padding: 22px 4px; border-bottom: 1px solid var(--rule-2);
  text-decoration: none; align-items: start;
}
.card:hover { background: var(--paper-2); }
.card-idx { font-family: var(--mono); font-size: 12.5px; color: var(--ink-3); padding-top: 3px; }
.card-body { min-width: 0; }
.card-tags { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin-bottom: 9px; }
.card-quote {
  margin: 0; font-size: 15.5px; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 11px; font-size: 13px; color: var(--ink-3); }
.card-amt { text-align: end; font-weight: 700; font-size: 19px; letter-spacing: -.02em; white-space: nowrap; }
.card-amt small { display: block; font-size: 12px; font-weight: 400; color: var(--ink-3); letter-spacing: 0; margin-top: 3px; }

.tag {
  font-size: 12px; padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--rule); color: var(--ink-2); background: var(--paper-2);
  white-space: nowrap;
}
.tag.role { border-color: color-mix(in srgb, var(--accent) 40%, var(--rule)); color: var(--accent); }
.tag.out { border: none; color: var(--accent-ink); font-weight: 600; }
.tag.out[data-o="paid"]       { background: var(--paid); }
.tag.out[data-o="refused"]    { background: var(--refused); }
.tag.out[data-o="negotiated"] { background: var(--negotiated); }
.tag.out[data-o="pending"]    { background: var(--pending); }
.tag.unv { border-style: dashed; color: var(--ink-3); }

/* ---- filters ---- */
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 8px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 12.5px; color: var(--ink-3); letter-spacing: .04em; }
select, input[type="text"], input[type="search"], input[type="number"], input[type="month"], textarea {
  width: 100%; padding: 10px 12px; background: var(--paper-2);
  border: 1px solid var(--rule); border-radius: var(--r); outline: none;
}
select:focus, input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
textarea { resize: vertical; min-height: 150px; line-height: 1.7; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 4px; }
.chip {
  padding: 7px 14px; border: 1px solid var(--rule); border-radius: 999px;
  background: var(--paper-2); cursor: pointer; font-size: 13.5px; color: var(--ink-2);
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); font-weight: 600; }

.result-line { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 0 4px; font-size: 13.5px; color: var(--ink-3); }

/* ---- bar rows (dashboard) ---- */
.bars { display: grid; gap: 2px; }
.bar-row { display: grid; grid-template-columns: 26px 1fr 5.5rem; gap: 14px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--rule-2); }
.bar-rank { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); }
.bar-label { font-size: 14.5px; min-width: 0; }
.bar-track { position: relative; height: 7px; background: var(--rule-2); border-radius: 999px; margin-top: 7px; overflow: hidden; }
.bar-fill { position: absolute; inset-block: 0; inset-inline-start: 0; background: var(--accent); border-radius: 999px; width: var(--w, 0%); }
.bar-val { text-align: end; font-weight: 600; font-variant-numeric: tabular-nums; font-size: 14px; }
.bar-val small { display: block; font-weight: 400; font-size: 11.5px; color: var(--ink-3); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }

.panel { border: 1px solid var(--rule); border-radius: var(--r); padding: 24px; background: var(--paper-2); }
.panel h3 { font-size: 17px; margin-bottom: 6px; }
.panel p { color: var(--ink-2); font-size: 14.5px; margin: 0; }

/* ---- notice ---- */
.notice {
  border: 1px solid var(--rule); border-inline-start: 3px solid var(--accent);
  background: var(--paper-2); padding: 16px 18px; border-radius: var(--r);
  font-size: 14.5px; color: var(--ink-2);
}
.notice.warn { border-inline-start-color: var(--paid); }
.notice.good { border-inline-start-color: var(--refused); }
.notice strong { color: var(--ink); }

/* ---- steps ---- */
.steps { counter-reset: s; display: grid; gap: 0; }
.step { display: grid; grid-template-columns: 44px 1fr; gap: 18px; padding: 22px 0; border-bottom: 1px solid var(--rule-2); }
.step-n { font-family: var(--mono); font-size: 12px; color: var(--accent); padding-top: 4px; }
.step h3 { font-size: 17.5px; margin-bottom: 5px; }
.step p { margin: 0; color: var(--ink-2); font-size: 14.8px; }

/* ---- form ---- */
.form-sec { padding: 30px 0; border-bottom: 1px solid var(--rule-2); }
.form-sec > h2 { font-size: 19px; margin-bottom: 4px; }
.form-sec > .hint { color: var(--ink-3); font-size: 14px; margin-bottom: 20px; }
.radio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 9px; }
.opt {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px;
  border: 1px solid var(--rule); border-radius: var(--r); cursor: pointer; background: var(--paper-2);
  font-size: 14.5px;
}
.opt:hover { border-color: var(--ink-3); }
.opt:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--paper-2)); }
.opt input { margin: 3px 0 0; accent-color: var(--accent); flex: none; }
.err { color: var(--accent-2); font-size: 13.5px; margin-top: 6px; }
.counter { font-size: 12.5px; color: var(--ink-3); text-align: end; margin-top: 5px; }

/* ---- detail ---- */
.detail-head { padding: 44px 0 26px; border-bottom: 1px solid var(--rule); }
.detail-amt { font-size: clamp(32px, 6vw, 52px); font-weight: 700; letter-spacing: -.04em; margin: 14px 0 6px; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--rule); }
.kv dt { font-size: 12px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 5px; }
.kv dd { margin: 0; font-size: 15.5px; font-weight: 600; }
blockquote.account {
  margin: 30px 0; padding: 24px 26px; background: var(--paper-2);
  border: 1px solid var(--rule); border-inline-start: 3px solid var(--rule);
  border-radius: var(--r); font-size: 17px; line-height: 1.8; white-space: pre-wrap;
}

/* ---- footer ---- */
.foot { padding: 48px 0 60px; font-size: 14px; color: var(--ink-3); }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; margin-bottom: 34px; }
.foot h4 { font-size: 12px; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; font-weight: 600; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot a { text-decoration: none; color: var(--ink-2); }
.foot a:hover { color: var(--accent); }
.foot-note { border-top: 1px solid var(--rule); padding-top: 22px; max-width: 78ch; font-size: 13px; line-height: 1.7; }

/* ---- misc ---- */
.spinner { width: 18px; height: 18px; border: 2px solid var(--rule); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg) } }
.center { display: grid; place-items: center; padding: 60px 0; gap: 14px; }
.skeleton { background: linear-gradient(90deg, var(--rule-2), var(--rule), var(--rule-2)); background-size: 200% 100%; animation: sk 1.4s ease-in-out infinite; border-radius: var(--r); }
@keyframes sk { to { background-position: -200% 0 } }

table.ledger { width: 100%; border-collapse: collapse; font-size: 14px; }
table.ledger th { text-align: start; font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); padding: 10px 12px; border-bottom: 1px solid var(--rule); font-weight: 600; white-space: nowrap; }
table.ledger td { padding: 12px; border-bottom: 1px solid var(--rule-2); vertical-align: top; }
table.ledger tr:hover td { background: var(--paper-2); }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

@media (max-width: 900px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; gap: 28px; }
  .strip { grid-template-columns: 1fr 1fr; }
  .strip > div:nth-child(3) { border-inline-start: none; padding-inline-start: 0; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav { display: none; }
  .nav.open {
    display: flex; flex-direction: column; position: absolute; inset-inline: 0; top: 62px;
    background: var(--paper); border-bottom: 1px solid var(--rule); padding: 12px 20px 18px; gap: 2px;
  }
  .nav.open a { padding: 11px 12px; }
  /* Same specificity trap in the open mobile menu. */
  .nav.open a.btn {
    padding: 12px 16px;
    margin-top: 6px;
    justify-content: center;
    color: var(--accent-ink);
    background: var(--accent);
  }
  .burger { display: inline-flex; }
  .card { grid-template-columns: 1fr; gap: 10px; padding: 20px 0; }
  .card-idx { display: none; }
  .card-amt { text-align: start; }
  .hero { padding: 44px 0 32px; }
  .sec { padding: 40px 0; }
}

/* ---- institutional identity + verification ----
   Party is visually distinct from actor-type: it is an organisation, a
   different kind of claim. Verification is deliberately muted at the default
   tier — an "unverified" badge should not look like a decoration to skip. */
.tag.party {
  border-color: color-mix(in srgb, var(--negotiated) 45%, var(--rule));
  color: var(--negotiated);
  font-weight: 600;
}
.tag.verif { border-style: dashed; color: var(--ink-3); }
.tag.verif.v-corroborated {
  border-style: solid;
  border-color: color-mix(in srgb, var(--paid) 50%, var(--rule));
  color: var(--paid);
}
.tag.verif.v-verified {
  border-style: solid;
  border-color: var(--refused);
  color: var(--refused);
  font-weight: 600;
}

/* ---- funding ----
   Matches the Ko-fi widget's look (fixed pill, brand yellow, 50px radius)
   without loading Ko-fi's script. Hidden on the submit, removal and report
   pages, where an ask would be wrong. */
.kofi {
  position: fixed;
  inset-block-end: 20px;
  inset-inline-end: 20px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  border-radius: 50px;
  background: #ffdd00;
  color: #0b0b0a;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 12px rgb(0 0 0 / .15);
  transition: transform .12s ease, box-shadow .12s ease;
  max-width: calc(100vw - 40px);
}
.kofi:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgb(0 0 0 / .22); }
.kofi:active { transform: translateY(0); }
.kofi:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.kofi-cup { font-size: 15px; line-height: 1; }

@media (prefers-reduced-motion: reduce) { .kofi { transition: none; } }

/* On narrow screens shrink to the cup so it never covers content or the
   sticky header's breathing room. */
@media (max-width: 560px) {
  .kofi { padding: 11px 13px; inset-block-end: 14px; inset-inline-end: 14px; }
  .kofi span:not(.kofi-cup) { display: none; }
}
