/* Betjili Facts BD — design system
   Modern editorial UI: fluid type, generous spacing, soft elevation, a teal→indigo
   accent, and a real dark mode. Distinct by construction from the other two sites
   in the portfolio (dark/gold/rounded and warm-paper/serif/square).
   No external fonts, no trackers, no frameworks. */

:root {
  color-scheme: light dark;

  --bg: #F6F9FC;
  --bg-tint: #ECF3F8;
  --surface: #FFFFFF;
  --surface-2: #F1F6FA;
  --border: #DDE7F0;
  --border-strong: #B9C9D9;
  --text: #0D1926;
  --text-strong: #05101B;
  --muted: #56697C;
  --accent: #0D8E8E;
  --accent-hi: #0A6F6F;
  --accent-2: #5B62E0;
  --accent-ink: #FFFFFF;
  --accent-wash: #E4F4F4;
  --danger: #C2402F;
  --danger-wash: #FBEAE7;
  --ok: #1A7A52;
  --ok-wash: #E4F3EC;

  --grad: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);

  --r-lg: 18px;
  --r: 14px;
  --r-sm: 10px;
  --r-pill: 999px;

  --sh-1: 0 1px 2px rgba(13, 25, 38, .05), 0 1px 3px rgba(13, 25, 38, .04);
  --sh-2: 0 2px 4px rgba(13, 25, 38, .04), 0 8px 20px rgba(13, 25, 38, .07);
  --sh-3: 0 4px 8px rgba(13, 25, 38, .05), 0 18px 44px rgba(13, 25, 38, .11);

  --container: 1120px;
  --measure: 68ch;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Noto Sans Bengali", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "DejaVu Sans Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0A121D;
    --bg-tint: #0E1826;
    --surface: #111E2E;
    --surface-2: #152337;
    --border: #223349;
    --border-strong: #354A64;
    --text: #E6EEF7;
    --text-strong: #FFFFFF;
    --muted: #9CB0C6;
    --accent: #34CFC4;
    --accent-hi: #6FE3DA;
    --accent-2: #8B90F5;
    --accent-ink: #06202A;
    --accent-wash: #102E33;
    --danger: #F08A78;
    --danger-wash: #2E1A17;
    --ok: #5FCF9B;
    --ok-wash: #102A20;

    --sh-1: 0 1px 2px rgba(0, 0, 0, .4);
    --sh-2: 0 2px 6px rgba(0, 0, 0, .45), 0 10px 26px rgba(0, 0, 0, .35);
    --sh-3: 0 6px 14px rgba(0, 0, 0, .5), 0 22px 52px rgba(0, 0, 0, .45);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1100px 520px at 82% -8%, var(--accent-wash), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: clamp(1rem, .97rem + .18vw, 1.09rem);
  line-height: 1.72;
  letter-spacing: -.003em;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 76px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 22px; }

/* ---------- typography ---------- */

h1, h2, h3, h4 {
  line-height: 1.16; margin: 0 0 .5em;
  font-weight: 700; letter-spacing: -.028em; color: var(--text-strong);
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 1.5rem + 2.9vw, 3.5rem); letter-spacing: -.036em; }
h2 { font-size: clamp(1.5rem, 1.24rem + 1.15vw, 2.15rem); margin-top: 2.1em; }
h3 { font-size: clamp(1.1rem, 1.03rem + .32vw, 1.3rem); margin-top: 1.7em; }
p, ul, ol { margin: 0 0 1.1em; }
main p, main li { max-width: var(--measure); }
a { color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hi); }
strong { color: var(--text-strong); font-weight: 640; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.lead {
  font-size: clamp(1.12rem, 1.04rem + .42vw, 1.35rem);
  line-height: 1.56; color: var(--muted); max-width: 60ch; text-wrap: pretty;
}

:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--accent);
  color: var(--accent-ink); padding: 12px 18px; z-index: 100; border-radius: 0 0 var(--r-sm) 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 66px; }
.logo { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--text-strong); font-weight: 700; }
.logo-mark {
  width: 30px; height: 30px; flex: none; border-radius: 9px;
  background: var(--grad); box-shadow: var(--sh-1);
}
.logo-text { font-size: 1.08rem; letter-spacing: -.03em; }
.logo-accent { color: var(--accent); }

.nav { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav ul { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav a {
  display: block; padding: 8px 12px; border-radius: var(--r-pill);
  color: var(--muted); text-decoration: none; font-size: .92rem; font-weight: 500;
  transition: background .15s ease, color .15s ease;
}
.nav a:hover { color: var(--text-strong); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--accent); background: var(--accent-wash); font-weight: 600; }
.lang {
  border: 1px solid var(--border-strong); border-radius: var(--r-pill);
  padding: 7px 14px !important; color: var(--muted) !important; white-space: nowrap;
  font-size: .86rem !important;
}

.burger { display: none; background: none; border: 0; padding: 10px; cursor: pointer; margin-left: auto; border-radius: var(--r-sm); }
.burger span { display: block; width: 22px; height: 2px; background: var(--text); margin: 4px 0; border-radius: 2px; }

@media (max-width: 1060px) {
  .burger { display: block; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--surface); border-bottom: 1px solid var(--border);
    box-shadow: var(--sh-2);
    flex-direction: column; align-items: stretch; gap: 4px; padding: 12px 22px 20px;
  }
  .nav.open { display: flex; }
  .nav ul { flex-direction: column; }
  .nav a { padding: 12px 14px; border-radius: var(--r-sm); }
  .lang { text-align: center; margin-top: 8px; }
}

/* ---------- breadcrumbs ---------- */

.crumbs { padding: 18px 22px 0; max-width: var(--container); margin: 0 auto; }
.crumbs ol {
  display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0;
  font-size: .82rem; color: var(--muted);
}
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--border-strong); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }

/* ---------- sections & hero ---------- */

section { padding: 40px 0; }
@media (min-width: 900px) { section { padding: 56px 0; } }

.hero { padding-top: 44px; padding-bottom: 12px; }
.hero h1 { margin-bottom: .38em; }
.hero-grid { display: grid; gap: 30px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.08fr .92fr; gap: 48px; } }
.hero img { width: 100%; height: auto; border-radius: var(--r-lg); box-shadow: var(--sh-2); }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 14px; }
.btn {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 14px 28px; border-radius: var(--r-pill); font-weight: 650; font-size: 1rem;
  text-decoration: none; border: 1.5px solid transparent; line-height: 1.3;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: var(--sh-2); }
.btn-primary:hover { color: #fff; transform: translateY(-2px); box-shadow: var(--sh-3); }
.btn-secondary { border-color: var(--border-strong); color: var(--text-strong); background: var(--surface); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn-sub { font-size: .76rem; font-weight: 400; opacity: .9; }

.disclosure {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: .82rem; color: var(--muted); margin: 6px 0 0;
}
.disclosure::before {
  content: "18+"; font-weight: 700; font-size: .7rem; letter-spacing: .02em;
  background: var(--danger-wash); color: var(--danger); border-radius: var(--r-pill);
  padding: 3px 9px; flex: none;
}

/* ---------- cards ---------- */

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
@media (min-width: 620px) { .grid-2, .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 940px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 24px;
  box-shadow: var(--sh-1);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--border-strong); }
.card h3 { margin-top: 0; font-size: 1.14rem; }
.card p { color: var(--muted); font-size: .96rem; }
.card p:last-child { margin-bottom: 0; }
.card-link {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 12px;
  font-weight: 640; text-decoration: none; font-size: .93rem;
}
.card-link::after { content: "→"; transition: transform .15s ease; }
.card:hover .card-link::after { transform: translateX(3px); }

.fact { display: flex; flex-direction: column; gap: 2px; }
.fact-value { font-size: 1.8rem; font-weight: 700; letter-spacing: -.03em; color: var(--accent); }
.fact-label { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .09em; }

/* ---------- tables ---------- */

.table-wrap {
  overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--sh-1); margin: 0 0 1.6em;
}
table { border-collapse: collapse; width: 100%; min-width: 580px; font-size: .95rem; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--border); vertical-align: top; }
thead th {
  background: var(--surface-2); font-size: .74rem; letter-spacing: .09em;
  text-transform: uppercase; color: var(--muted); font-weight: 650;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-2); }
td strong { color: var(--accent); }

/* ---------- steps ---------- */

.steps { list-style: none; counter-reset: st; margin: 0 0 1.6em; padding: 0; }
.steps > li {
  counter-increment: st; position: relative; padding: 0 0 26px 60px; max-width: var(--measure);
}
.steps > li::before {
  content: counter(st); position: absolute; left: 0; top: -2px;
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--accent-wash); color: var(--accent);
  display: grid; place-items: center; font-weight: 700; font-size: 1rem;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}
.steps > li:not(:last-child)::after {
  content: ""; position: absolute; left: 18.5px; top: 44px; bottom: 8px;
  width: 2px; border-radius: 2px;
  background: linear-gradient(var(--border), transparent);
}
.steps h3 { margin: 4px 0 6px; font-size: 1.08rem; }
.steps p { margin-bottom: 0; }

/* ---------- callouts ---------- */

.callout {
  border: 1px solid color-mix(in srgb, var(--danger) 30%, var(--border));
  background: var(--danger-wash);
  border-radius: var(--r-lg); padding: 20px 22px; margin: 0 0 1.7em;
}
.callout strong {
  display: block; margin-bottom: 7px; font-size: 1.02rem; font-weight: 680;
  color: var(--text-strong);
}
.callout.tip { border-color: color-mix(in srgb, var(--ok) 30%, var(--border)); background: var(--ok-wash); }
.callout.note { border-color: var(--border-strong); background: var(--surface-2); }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }

/* ---------- figures ---------- */

figure { margin: 0 0 2em; }
figure img {
  width: 100%; height: auto; display: block;
  border-radius: var(--r-lg); border: 1px solid var(--border);
  background: var(--surface); box-shadow: var(--sh-2);
}
figcaption {
  font-size: .86rem; color: var(--muted); margin-top: 12px;
  max-width: var(--measure); line-height: 1.55; padding-left: 14px;
  border-left: 2px solid var(--accent); border-radius: 1px;
}

/* The diagrams are raster and always light. In dark mode, take the edge off so
   they read as illustrations on the page rather than as a light source. */
@media (prefers-color-scheme: dark) {
  figure img { filter: brightness(.93) contrast(1.02); }
  figure img:hover { filter: none; }
}

.fig-standard { max-width: 880px; }
.fig-wide     { max-width: 100%; }
.fig-square   { max-width: 620px; }
.fig-portrait { max-width: 460px; }
.fig-square, .fig-portrait { margin-left: auto; margin-right: auto; }
@media (max-width: 640px) { .fig-portrait { max-width: 320px; } .fig-square { max-width: 100%; } }
.hero figure, .hero .fig-standard, .hero .fig-wide,
.hero .fig-square, .hero .fig-portrait { max-width: 100%; margin: 0; }

/* ---------- FAQ ---------- */

.faq details {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); margin-bottom: 10px; box-shadow: var(--sh-1);
  transition: border-color .15s ease;
}
.faq details[open] { border-color: var(--border-strong); }
.faq summary {
  cursor: pointer; padding: 17px 52px 17px 20px; font-weight: 640;
  list-style: none; position: relative; color: var(--text-strong);
  border-radius: var(--r);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 20px; top: 50%;
  width: 9px; height: 9px; margin-top: -6px;
  border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(45deg); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details > *:not(summary) { padding: 0 20px; }
.faq details > *:last-child { padding-bottom: 18px; }

/* ---------- final CTA ---------- */

.cta-band {
  background: var(--grad); color: #fff;
  border-radius: var(--r-lg); padding: 40px 34px;
  box-shadow: var(--sh-3); position: relative; overflow: hidden;
}
.cta-band::after {
  content: ""; position: absolute; inset: auto -60px -120px auto;
  width: 320px; height: 320px; border-radius: 50%;
  background: rgba(255, 255, 255, .1);
}
.cta-band > * { position: relative; }
.cta-band h2 { margin-top: 0; color: #fff; }
.cta-band .muted { color: rgba(255, 255, 255, .84); }
.cta-band p { max-width: 62ch; }
.cta-band a:not(.btn) { color: #fff; }
.cta-band .btn-primary { background: #fff; color: var(--accent-hi); border-color: #fff; }
.cta-band .btn-primary:hover { background: #fff; color: var(--accent-hi); }
.cta-band .btn-secondary { border-color: rgba(255, 255, 255, .6); color: #fff; background: transparent; }
.cta-band .btn-secondary:hover { background: #fff; color: var(--accent-hi); border-color: #fff; }
.cta-band .disclosure { color: rgba(255, 255, 255, .84); }
.cta-band .disclosure::before { background: rgba(255, 255, 255, .22); color: #fff; }

.inline-cta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 20px 22px; margin: 0 0 1.8em;
  box-shadow: var(--sh-1); position: relative; overflow: hidden;
}
.inline-cta::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--grad);
}
.inline-cta p { margin: 0; flex: 1 1 260px; }
.inline-cta .btn { padding: 11px 22px; }

/* ---------- footer ---------- */

.site-footer {
  background: var(--surface); border-top: 1px solid var(--border);
  margin-top: 52px; padding: 48px 0 0;
}
.footer-grid { display: grid; gap: 30px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 940px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer-h {
  font-size: .76rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 14px; font-weight: 650;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { color: var(--text); text-decoration: none; font-size: .94rem; }
.footer-col a:hover { color: var(--accent); }
.footer-col p { color: var(--muted); }
.legal { border-top: 1px solid var(--border); margin-top: 36px; padding-top: 20px; padding-bottom: 26px; }
.legal p { font-size: .8rem; color: var(--muted); max-width: none; margin: 0; }

/* ---------- sticky mobile CTA ---------- */

.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border); box-shadow: 0 -6px 24px rgba(13, 25, 38, .1);
  padding: 11px 16px calc(11px + env(safe-area-inset-bottom));
}
.sticky-text { font-size: .9rem; color: var(--muted); }
.sticky-cta .btn { padding: 12px 24px; }
@media (max-width: 520px) { .sticky-text { display: none; } .sticky-cta .btn { width: 100%; } }
@media (min-width: 900px) { body { padding-bottom: 0; } .sticky-cta { display: none; } }

/* ---------- misc ---------- */

.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 1.4em; padding: 0; list-style: none; }
.pill-row li {
  font-size: .84rem; color: var(--muted); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-pill); padding: 6px 14px;
}
.checklist { list-style: none; padding: 0; }
.checklist li { position: relative; padding-left: 30px; margin-bottom: 12px; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .42em;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--ok-wash);
}
.checklist li::after {
  content: ""; position: absolute; left: 5.5px; top: .78em;
  width: 8px; height: 4px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok);
  transform: rotate(-45deg);
}
.toc {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 22px 26px; margin-bottom: 34px; box-shadow: var(--sh-1);
}
.toc h2 {
  font-size: .76rem !important; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 12px !important; font-weight: 650;
}
.toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 36px; }
.toc li { margin-bottom: 6px; break-inside: avoid; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
@media (max-width: 640px) { .toc ol { columns: 1; } }

/* Source table — this site's editorial device: one row per external source. */
.src-row {
  display: grid; gap: 6px 20px; grid-template-columns: 1fr;
  padding: 18px 0; border-bottom: 1px solid var(--border);
}
@media (min-width: 760px) { .src-row { grid-template-columns: 200px 1fr 128px; align-items: baseline; } }
.src-row:first-of-type { border-top: 1px solid var(--border); }
.src-k { font-weight: 650; color: var(--text-strong); }
.src-v { color: var(--muted); }
.src-t {
  font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 650;
  padding: 4px 12px; border-radius: var(--r-pill); white-space: nowrap; justify-self: start;
}
.src-t.ok { background: var(--ok-wash); color: var(--ok); }
.src-t.no { background: var(--danger-wash); color: var(--danger); }
.src-t.part { background: var(--surface-2); color: var(--muted); }
