:root {
  --green: #0b6e44;
  --green-deep: #08502f;
  --paper: #f2f7f3;
  --sheet: #ffffff;
  --ink: #10241a;
  --muted: #4d6357;
  --in: #1a8a4e;
  --out: #b43c0a;
  --line: #d3e2d7;
  --rule: #e6efe9;
  --display: 'Anek Bangla', 'Hind Siliguri', system-ui, sans-serif;
  --body: 'Hind Siliguri', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
}
img { max-width: 100%; display: block; }
a { color: var(--green); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid #7cc39b;
  outline-offset: 2px;
  border-radius: 6px;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* উপরের বার */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.brand span { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: -0.01em; }
.top nav { display: flex; gap: 18px; font-size: 15px; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover { color: var(--green); }

/* Hero */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; padding-block: 40px 72px; }
.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-stretch: 87.5%;
  font-size: clamp(40px, 6.4vw, 68px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 20px;
}
.hero p.lead { font-size: 19px; color: var(--muted); max-width: 34em; margin: 0 0 28px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: 999px;
  background: var(--green); color: #fff; text-decoration: none;
  font-weight: 600; font-size: 17px; border: 0; cursor: pointer; font-family: var(--body);
}
.btn:hover { background: var(--green-deep); }
.btn.ghost { background: transparent; color: var(--green); box-shadow: inset 0 0 0 1.5px var(--green); }
.btn.ghost:hover { background: #e3efe7; }
.btn.danger { background: var(--out); }
.btn.danger:hover { background: #8f2f07; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.note { font-size: 14px; color: var(--muted); margin-top: 14px; }

/* খাতার পাতা: হিসাবের লাইন আর চলতি ব্যালেন্স */
.ledger {
  margin: 0;
  background: var(--sheet);
  border-radius: 22px;
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px -36px rgba(8, 80, 47, 0.45);
  overflow: hidden;
}
.ledger-head { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 22px 12px; }
.ledger-head b { font-family: var(--display); font-size: 21px; }
.ledger-head small { color: var(--muted); font-size: 14px; }
.ledger table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ledger th {
  text-align: right; font-weight: 600; font-size: 13px; color: var(--muted);
  padding: 8px 22px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: #f8fbf9;
}
.ledger th:first-child, .ledger td:first-child { text-align: left; }
.ledger td { padding: 11px 22px; border-bottom: 1px solid var(--rule); text-align: right; font-size: 16px; }
.ledger td:first-child { font-size: 15px; }
.ledger td small { display: block; color: var(--muted); font-size: 12px; }
.ledger .in { color: var(--in); font-weight: 600; }
.ledger .out { color: var(--out); font-weight: 600; }
.ledger tr.row { transition: opacity 0.35s ease, transform 0.35s ease; }
.ledger tr.row.wait { opacity: 0; transform: translateY(6px); }
.balance {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 22px; color: #fff; background: var(--green);
  transition: background 0.5s ease;
}
.balance span { font-size: 15px; opacity: 0.9; }
.balance strong { font-family: var(--display); font-size: 30px; font-variant-numeric: tabular-nums; }
.balance.neg { background: var(--out); }

/* কী কী করা যায়: খাতার লাইনের মতো */
section.block { padding: 64px 0; border-top: 1px solid var(--line); }
section.block h2 {
  font-family: var(--display); font-weight: 700; font-stretch: 87.5%;
  font-size: clamp(30px, 4.2vw, 42px); line-height: 1.15; margin: 0 0 8px; letter-spacing: -0.01em;
}
section.block > .wrap > p { color: var(--muted); max-width: 40em; margin: 0 0 32px; }
.lines { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; }
.lines li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; padding: 18px 0; border-bottom: 1px dashed var(--line); }
.lines .mark {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: #e3efe7; color: var(--green); font-size: 20px; font-weight: 700; font-family: var(--display);
}
.lines h3 { margin: 0 0 2px; font-size: 18px; line-height: 1.35; }
.lines p { margin: 0; color: var(--muted); font-size: 15.5px; }

.roles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--sheet); }
.roles div { padding: 20px; border-right: 1px solid var(--line); }
.roles div:last-child { border-right: 0; }
.roles b { display: block; font-family: var(--display); font-size: 20px; color: var(--green); }
.roles span { font-size: 15px; color: var(--muted); }

footer { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--muted); font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 28px; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 18px; }

/* আইনি পাতা */
.doc { max-width: 720px; padding-block: 24px 72px; }
.doc h1 { font-family: var(--display); font-weight: 700; font-size: clamp(32px, 5vw, 44px); line-height: 1.15; margin: 8px 0 6px; }
.doc .updated { color: var(--muted); margin: 0 0 28px; }
.doc h2 { font-size: 21px; margin: 34px 0 8px; line-height: 1.35; }
.doc p, .doc li { max-width: 68ch; }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc .bn { margin-top: 48px; padding-top: 24px; border-top: 2px solid var(--line); }
.lang { display: inline-flex; gap: 8px; margin: 4px 0 18px; font-size: 15px; }

/* Account মোছা */
.panel { background: var(--sheet); border: 1px solid var(--line); border-radius: 20px; padding: 24px; margin: 20px 0; }
.panel label { display: block; font-weight: 600; margin: 0 0 6px; }
.panel input {
  width: 100%; min-height: 50px; border-radius: 12px; border: 1.5px solid var(--line);
  padding: 0 14px; font-size: 17px; font-family: var(--body); background: #fbfdfc; color: var(--ink);
}
.panel input:focus { border-color: var(--green); }
.panel .row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.msg { margin-top: 12px; font-size: 15px; }
.msg.err { color: var(--out); }
.msg.ok { color: var(--in); font-weight: 600; }
.warn { background: #fbece5; color: #7a2a08; border-radius: 14px; padding: 14px 16px; }
[hidden] { display: none !important; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding-block-start: 16px; }
  .lines { grid-template-columns: 1fr; }
  .roles { grid-template-columns: 1fr 1fr; }
  .roles div:nth-child(2) { border-right: 0; }
  .roles div:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .top nav { gap: 14px; font-size: 14px; }
}
@media (max-width: 480px) {
  .top nav a.hide-sm { display: none; }
  .ledger td, .ledger th { padding-left: 14px; padding-right: 14px; }
  .roles { grid-template-columns: 1fr; }
  .roles div { border-right: 0; border-bottom: 1px solid var(--line); }
  .roles div:last-child { border-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ledger tr.row, .balance { transition: none; }
}
