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

html {
  -webkit-text-size-adjust: 100%;
  font-size: var(--root-size);
}
html[lang="bn"] { font-size: var(--root-size-bn); }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Never fake bold: Li Ador Noirrit stops at weight 500 and faked bold smears Bangla letters. */
  font-synthesis-weight: none;
}
strong, b { font-weight: var(--weight-semibold); }
/* Bangla content (lang="bn") inside an English page starts from the Bangla regular weight.
   Zero specificity, so any component class that sets a weight still wins. */
:where([lang="bn"]:not(html, h1, h2, h3, strong, b, button, .btn)) { font-weight: var(--weight-regular); }
html[lang="bn"] body { line-height: var(--leading-bn); }

h1, h2, h3 {
  margin: 0;
  line-height: var(--leading-tight);
  font-weight: var(--weight-semibold);
  letter-spacing: -0.01em;
  color: var(--c-text);
}
html[lang="bn"] h1, html[lang="bn"] h2, html[lang="bn"] h3 { letter-spacing: 0; line-height: 1.4; }
h1 { font-size: var(--text-xl); }
h2 { font-size: var(--text-lg); }
h3 { font-size: var(--text-base); }
p { margin: 0; }

a { color: var(--c-primary); text-underline-offset: 2px; }
a:hover { color: var(--c-primary-hover); }

img { max-width: 100%; }
[hidden] { display: none !important; }

/* Clear, consistent focus for keyboard users. */
:focus { outline: none; }
:focus-visible { box-shadow: var(--focus-ring); border-radius: var(--radius-sm); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--s-5) var(--s-4) var(--s-7);
}
main.container { flex: 1 0 auto; }

.narrow { max-width: var(--container-narrow); margin-left: auto; margin-right: auto; }
.narrow-wide { max-width: 52rem; margin-left: auto; margin-right: auto; }

.stack > * + * { margin-top: var(--s-4); }
.stack-lg > * + * { margin-top: var(--s-6); }
.stack-sm > * + * { margin-top: var(--s-2); }

.row { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.row-between { justify-content: space-between; }

.muted { color: var(--c-muted); }
.small { font-size: var(--text-sm); }
.center { text-align: center; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

@media (min-width: 48rem) {
  .container { padding: var(--s-6) var(--s-5) var(--s-8); }
  h1 { font-size: var(--text-2xl); }
}
