/* Jamuna Bank Watch: one calm scrolling page.
   Colour has one meaning: red = High alert or land lost, amber = Watch, teal = the AI and controls. */
:root {
  color-scheme: light;
  --paper: #f4f6f5;
  --surface: #ffffff;
  --ink: #15212a;
  --ink-2: #4a5861;
  --muted: #6f7c84;
  --rule: #dde3e0;
  --soft: #eaefed;
  --accent: #17607a;
  --high: #c0261a;
  --watch: #c27a00;
  --rule-bar: #a8b3b9;
  --f: "Public Sans", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --f-bn: "Hind Siliguri", "Noto Sans Bengali", "Nirmala UI", sans-serif;
  --r: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #0e1418; --surface: #151d22; --ink: #e6ecee; --ink-2: #b2bec4; --muted: #8796a0;
    --rule: #26323a; --soft: #1c262c; --accent: #6bb6cb; --high: #f06a5d; --watch: #eea43a; --rule-bar: #5a666d;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0e1418; --surface: #151d22; --ink: #e6ecee; --ink-2: #b2bec4; --muted: #8796a0;
  --rule: #26323a; --soft: #1c262c; --accent: #6bb6cb; --high: #f06a5d; --watch: #eea43a; --rule-bar: #5a666d;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body { margin: 0; font: 16px/1.6 var(--f); background: var(--paper); color: var(--ink); overflow-x: hidden; }
a { color: var(--accent); text-underline-offset: 2px; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0; }
code { font-size: 13px; background: var(--soft); padding: 1px 5px; border-radius: 4px; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[lang="bn"] { font-family: var(--f-bn); }
.wrap { max-width: 1120px; margin-inline: auto; padding-inline: 24px; }

/* ---- header -------------------------------------------------------------- */
.top { position: sticky; top: 0; z-index: 1000; background: color-mix(in srgb, var(--paper) 88%, transparent);
       backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.top-in { display: flex; align-items: center; gap: 16px; height: 56px; }
.name { font-weight: 700; font-size: 17px; color: var(--ink); text-decoration: none; letter-spacing: -.01em; white-space: nowrap; }
.jump { margin-left: auto; display: flex; gap: 22px; }
.jump a { color: var(--ink-2); text-decoration: none; font-size: 14px; white-space: nowrap; }
.jump a:hover { color: var(--ink); }

/* ---- hero ---------------------------------------------------------------- */
.hero { padding-top: 72px; padding-bottom: 24px; }
.tag { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.hero h1 { font-size: clamp(28px, 4.2vw, 44px); line-height: 1.15; letter-spacing: -.02em; max-width: 22ch; font-weight: 700; }
.hero h1 em { font-style: normal; color: var(--high); }
.lede { margin-top: 18px; font-size: 18px; color: var(--ink-2); max-width: 60ch; }

/* ---- sections ------------------------------------------------------------ */
.sec { padding-top: 72px; }
.sec-head { margin-bottom: 24px; max-width: 70ch; }
.step { font-size: 13px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.sec h2 { font-size: clamp(22px, 2.8vw, 30px); line-height: 1.2; letter-spacing: -.015em; }
.sub { margin-top: 10px; color: var(--ink-2); }
.fine { font-size: 13.5px; color: var(--muted); margin-top: 12px; }

/* ---- 1. forecast ---------------------------------------------------------- */
.forecast { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.map-card { border-radius: var(--r); overflow: hidden; border: 1px solid var(--rule); background: var(--soft); }
.map { height: 560px; }
.side { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; gap: 18px; }

.seg { display: flex; background: var(--soft); border-radius: 8px; padding: 3px; gap: 3px; }
.seg button { flex: 1; font: inherit; font-size: 15px; font-weight: 500; border: 0; border-radius: 6px; padding: 7px 10px; cursor: pointer;
              background: transparent; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / .12); }
.seg [lang="bn"] { font-size: 13px; color: var(--muted); }

.stats { display: flex; flex-direction: column; gap: 10px; }
.stat { display: flex; align-items: baseline; gap: 12px; }
.stat b { font-size: 30px; line-height: 1; min-width: 2.6ch; text-align: right; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat span { color: var(--ink-2); font-size: 15px; }
.stat strong { color: var(--ink); }
.stat.hi b { color: var(--high); }
.stat.wa b { color: var(--watch); }

.key { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--ink-2); }
.key span { display: inline-flex; align-items: center; gap: 6px; }
.key i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.key i.dot { border-radius: 50%; background: var(--high); box-shadow: 0 0 0 2px #fff inset, 0 0 0 1px var(--rule); }

.mini { font-size: 15px; font-weight: 600; border-top: 1px solid var(--rule); padding-top: 16px; }
.mini span { font-weight: 400; font-size: 13px; color: var(--muted); margin-left: 6px; }
.list { list-style: none; margin: -8px 0 0; padding: 0; }
.list button { width: 100%; display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; align-items: center; text-align: left;
               font: inherit; font-size: 14px; color: var(--ink); background: none; border: 0; border-radius: 6px; padding: 8px 6px; cursor: pointer; }
.list button:hover { background: var(--soft); }
.list .n { width: 22px; height: 22px; border-radius: 50%; background: var(--high); color: #fff; font-size: 12px; font-weight: 700;
           display: grid; place-items: center; }
.list .w { color: var(--ink-2); line-height: 1.35; }
.list .r { font-weight: 600; font-variant-numeric: tabular-nums; }
.list .none { color: var(--muted); font-size: 14px; padding: 8px 0; }

.pin span { width: 24px; height: 24px; border-radius: 50%; background: #c0261a; color: #fff; border: 2px solid #fff; font: 700 12px/20px var(--f);
            display: block; text-align: center; box-shadow: 0 1px 4px rgb(0 0 0 / .4); }

/* ---- 2. predicted vs actual ---------------------------------------------------- */
.cmp-bar { display: flex; gap: 16px 24px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px; }
.cmp-line { font-size: 17px; max-width: 60ch; color: var(--ink-2); }
.cmp-line b { color: var(--ink); }
.pick { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.pick select { font: inherit; font-size: 15px; color: var(--ink); background: var(--surface); border: 1px solid var(--rule);
               border-radius: 8px; padding: 7px 10px; max-width: 100%; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.duo figure { margin: 0; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; }
.duo figcaption { padding: 10px 14px; font-size: 14px; color: var(--ink-2); display: flex; gap: 10px; align-items: center; }
.pill { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 2px 8px; border-radius: 99px; color: #fff; }
.pill.pred { background: var(--accent); }
.pill.act { background: var(--high); }
.cmap { width: 100%; background: #1d2a30; }
.duo .key { padding: 10px 14px; }

/* ---- 3. score ------------------------------------------------------------- */
.bars { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.bar { display: grid; grid-template-columns: 260px 1fr 52px; gap: 14px; align-items: center; font-size: 15px; color: var(--ink-2); }
.bt { height: 22px; background: var(--soft); border-radius: 4px; overflow: hidden; }
.bt i { display: block; height: 100%; background: var(--rule-bar); border-radius: 4px; }
.bv { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.bar.me { color: var(--ink); font-weight: 600; }
.bar.me .bt i { background: var(--accent); }
.bar.me .bv { font-size: 18px; color: var(--accent); }
.bars .fine { margin-top: 4px; }

/* ---- 4. how it works -------------------------------------------------------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
.steps li { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 22px; counter-increment: s; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
                    background: var(--accent); color: var(--surface); font-weight: 700; margin-bottom: 14px; }
.steps .when { display: block; font-size: 13px; color: var(--muted); }
.steps b { display: block; font-size: 19px; margin: 2px 0 8px; }
.steps p { color: var(--ink-2); font-size: 15px; }

/* ---- footer -------------------------------------------------------------------- */
.foot { margin-top: 88px; border-top: 1px solid var(--rule); padding-block: 28px 40px; font-size: 13.5px; color: var(--muted); }
.foot p + p { margin-top: 8px; }
.foot b { color: var(--ink-2); }

/* ---- leaflet --------------------------------------------------------------------- */
.leaflet-container { font: 14px/1.45 var(--f); background: #1d2a30; }
.leaflet-popup-content { margin: 12px 14px; }

/* ---- small screens ------------------------------------------------------------------ */
@media (max-width: 860px) {
  .wrap { padding-inline: 16px; }
  .jump { gap: 14px; }
  .jump a:last-child { display: none; }
  .hero { padding-top: 44px; }
  .sec { padding-top: 56px; }
  .forecast { grid-template-columns: 1fr; }
  .map { height: 420px; }
  .duo, .steps { grid-template-columns: 1fr; }
  .bar { grid-template-columns: 1fr 48px; gap: 6px 12px; }
  .bar .bl { grid-column: 1 / -1; }
  .bars { padding: 18px; }
}
@media (max-width: 420px) {
  .name { font-size: 15px; }
  .jump a { font-size: 13px; }
}
