/* Layout: a calm reading site, light look only (same as the approved post design).
   Full-width bands (header, hero, footer) with a 780px column.
   A post is one bordered card: dark title block on top, tables and worked solutions below. */
:root {
  color-scheme: light;
  --font: 'Hind Siliguri', sans-serif;
  --bg: #F4F6FB;
  --surface: #FFFFFF;
  --ink: #121B33;
  --muted: #56617A;
  --line: #DCE2EF;
  --line-soft: #E8ECF5;
  --band: #121B33;
  --band-ink: #FFFFFF;
  --band-muted: #B7C2E3;
  --band-chip: #243056;
  --band-chip-ink: #E6EBFD;
  --gold: #FFE36E;
  --gold-ink: #121B33;
  --accent: #2748D8;
  --link: #2748D8;
  --zebra: #F7F9FD;
  --tint: #F5F7FC;
  --chip: #E6EBFD;
  --chip-ink: #2748D8;
  --pill-bd: #CBD3E6;
  --wrong: #C23B3B;
  --focus: #2748D8;
  --red: #D93F3F; --red-soft: #FCE8E7; --blue-soft: #E6EBFD; --hl-soft: #FFF3B8; --rule: #E5E9F4;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
}
a { color: var(--link); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap {
  max-width: 780px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* header */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 24px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--ink); text-decoration: none; }
.mark { width: 28px; height: 28px; border-radius: 50%; background: var(--band); display: inline-flex; align-items: center; justify-content: center; }
.mark i { width: 11px; height: 11px; border-radius: 50%; background: var(--gold); }
.menu { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 15px; }
.menu a { text-decoration: none; color: var(--ink); }
.menu a:hover { color: var(--link); text-decoration: underline; }

/* home */
.hero { background: radial-gradient(900px 340px at 88% -10%, #2748D8 0%, rgba(39,72,216,0) 60%), linear-gradient(160deg, #121B33 0%, #0C1226 100%); color: var(--band-ink); position: relative; overflow: hidden; } color: var(--band-ink); position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -70px; bottom: -90px; width: 240px; height: 240px; border-radius: 50%; border: 36px solid rgba(255,227,110,.12); pointer-events: none; }
.hero .wrap { padding-block: 40px 44px; position: relative; z-index: 1; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); color: #E3F1EC; font-size: 14px; line-height: 1.4; padding: 4px 14px; border-radius: 999px; margin-bottom: 14px; }
.eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.hstats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.hstats span { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 12px; padding: 6px 14px; font-size: 14px; line-height: 1.5; color: var(--band-muted); }
.hstats b { color: var(--gold); font-size: 18px; margin-right: 4px; }
.hero h1 { margin: 0 0 8px; font-size: 32px; line-height: 1.45; font-weight: 700; text-wrap: balance; }
.hero p { margin: 0; color: var(--band-muted); font-size: 16px; line-height: 1.8; max-width: 56ch; }
.search { margin-top: 22px; display: flex; gap: 8px; max-width: 560px; }
.search input {
  flex: 1 1 auto; min-width: 0; font: inherit; font-size: 16px; line-height: 1.5;
  padding: 13px 16px; border-radius: 12px; border: 1px solid var(--line); box-shadow: 0 6px 18px rgba(0,0,0,.18);
  background: var(--surface); color: var(--ink);
}
.search input::placeholder { color: var(--muted); }
.list-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin: 28px 0 12px; }
.list-head h2 { margin: 0; font-size: 19px; line-height: 1.6; }
.list-head span { font-size: 14px; color: var(--muted); }
.plist { display: grid; gap: 12px; }
.pcard { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; color: var(--ink); text-decoration: none; }
.pcard:hover { border-color: var(--accent); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.tag { font-size: 13px; line-height: 1.6; background: var(--chip); color: var(--chip-ink); padding: 0 10px; border-radius: 999px; }
.pt { font-weight: 700; font-size: 18px; line-height: 1.6; text-wrap: balance; }
.pm { font-size: 14px; color: var(--muted); margin-top: 4px; }
.go { display: inline-block; margin-top: 8px; font-size: 15px; font-weight: 600; color: var(--link); }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: 14px; }

/* post: title block */
.post { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin-top: 24px; }
.ph { background: var(--band); padding: 26px 28px 24px; display: flex; flex-direction: column; gap: 10px; color: var(--band-ink); }
.crumb { font-size: 14px; line-height: 1.6; color: var(--band-muted); }
.crumb a { color: var(--band-muted); text-decoration: none; }
.crumb a:hover { text-decoration: underline; }
.cat { align-self: flex-start; background: var(--gold); color: var(--gold-ink); font-weight: 700; font-size: 14px; line-height: 1.4; padding: 3px 14px; border-radius: 999px; }
.ph h1 { margin: 0; font-weight: 700; font-size: 28px; line-height: 1.5; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.meta span { background: var(--band-chip); color: var(--band-chip-ink); font-size: 14px; line-height: 1.4; padding: 4px 14px; border-radius: 8px; }
.pub { font-size: 14px; color: var(--band-muted); }

/* post: content section */
.pb { padding: 24px 28px 36px; }
.intro { margin: 0 0 16px; font-size: 16px; line-height: 1.9; }
.toc { background: var(--tint); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.toc-t { font-weight: 700; font-size: 15px; line-height: 1.4; color: var(--band); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { text-decoration: none; background: var(--surface); border: 1px solid var(--pill-bd); font-size: 14px; line-height: 1.4; padding: 3px 12px; border-radius: 999px; color: var(--link); }
.chip:hover { border-color: var(--accent); }
.grp { display: flex; align-items: center; gap: 12px; margin: 34px 0 0; }
.toc + .grp { margin-top: 30px; }
.grp span { background: var(--band); color: var(--band-ink); font-weight: 700; font-size: 14px; line-height: 1.4; padding: 3px 16px; border-radius: 999px; }
.grp::after { content: ""; flex: 1 1 0; height: 1px; background: var(--line); }
.sec { margin-top: 26px; scroll-margin-top: 16px; }
.grp + .sec { margin-top: 18px; }
.sec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.num { flex: 0 0 auto; background: var(--band); color: var(--gold); font-weight: 700; font-size: 15px; line-height: 1; padding: 8px 10px; border-radius: 8px; }
.sec h2 { margin: 0; font-size: 19px; line-height: 1.6; color: var(--band); }

.tbl { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.tr { display: grid; grid-template-columns: var(--cols); gap: 12px; align-items: baseline; padding: 10px 16px; border-top: 1px solid var(--line-soft); }
.tbody > .tr:nth-child(even) { background: var(--zebra); }
.th { background: var(--band); color: var(--band-ink); font-weight: 600; font-size: 14px; line-height: 1.5; padding: 8px 16px; border-top: 0; }
.td { min-width: 0; font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.td.b { font-weight: 700; font-size: 16px; color: var(--band); }
.td.ans { font-weight: 700; font-size: 16px; color: var(--ink); }
.td.acc { color: var(--ink); font-weight: 600; }
.td.acc2 { color: var(--ink); font-weight: 600; font-size: 16px; }
.td.wrong { color: var(--wrong); text-decoration: line-through; }
.td.muted { font-size: 14px; color: var(--muted); }
.acc { color: var(--ink); font-weight: 600; }
.wrong { color: var(--wrong); }
u.key { font-weight: 700; text-underline-offset: 4px; }
.pill { display: inline-block; background: var(--chip); color: var(--chip-ink); font-weight: 700; padding: 0 10px; border-radius: 6px; }

.trbox { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.trbox p { margin: 0; padding: 14px 18px; font-size: 15px; line-height: 1.9; }
.trbox .src { background: var(--tint); }
.trbox .sol { border-top: 1px solid var(--line); color: var(--ink); }
.trbox .src { color: var(--band); font-weight: 700; }

.mq { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-top: 16px; }
.sec-head + .mq { margin-top: 6px; }
.mq-q { background: var(--tint); padding: 10px 16px; display: flex; gap: 10px; align-items: baseline; border-bottom: 1px solid var(--line); }
.badge { flex: 0 0 auto; background: var(--band); color: var(--gold); font-weight: 700; font-size: 14px; line-height: 1.4; padding: 1px 9px; border-radius: 6px; }
.mq-t { flex: 1 1 0; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-weight: 700; font-size: 16px; line-height: 1.7; color: var(--band); }
.mq-s { padding: 10px 16px; font-size: 15px; line-height: 1.7; overflow-x: auto; }
.st { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; padding: 3px 0; }
.mq-a { background: var(--band); color: var(--band-ink); font-weight: 700; font-size: 15px; line-height: 1.6; padding: 7px 16px; }

.fr { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; margin: 0 3px; line-height: 1.35; }
.fr > span:first-child { border-bottom: 1.5px solid currentColor; padding: 0 5px; }
.fr > span:last-child { padding: 0 5px; }
.pw { display: inline-flex; align-items: center; margin: 0 2px; }
.pw > b { font-size: 30px; font-weight: 300; line-height: 1; }
.pw > sup { font-size: 12px; align-self: flex-start; margin-top: 2px; }

.li { display: flex; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--line-soft); }
.tbody > .li:first-child { border-top: 0; }
.tbody > .li:nth-child(even) { background: var(--zebra); }
.li-l { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; background: var(--chip); color: var(--chip-ink); font-weight: 700; font-size: 14px; line-height: 26px; text-align: center; }
.li-b { flex: 1 1 0; min-width: 0; }
.li-q { font-size: 15px; line-height: 1.7; color: var(--band); font-weight: 700; }
.li-a { font-weight: 600; font-size: 15px; line-height: 1.7; color: var(--ink); overflow-wrap: anywhere; }

.share { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); }
.copy { font: inherit; font-size: 14px; background: var(--surface); color: var(--link); border: 1px solid var(--pill-bd); border-radius: 8px; padding: 6px 16px; min-height: 44px; cursor: pointer; }
.copy:hover { border-color: var(--accent); }
.share small { color: var(--muted); font-size: 14px; }
.pn { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 16px 0 8px; }
.pn a { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; text-decoration: none; color: var(--ink); }
.pn a:hover { border-color: var(--accent); }
.pn small { display: block; color: var(--muted); font-size: 13px; }
.pn b { font-size: 15px; line-height: 1.6; }

.foot { background: var(--band); color: var(--band-muted); margin-top: 40px; }
.foot .wrap { padding-block: 22px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; font-size: 14px; }
.foot b { color: var(--band-ink); }

.nf { padding-block: 64px; text-align: center; }
.nf h1 { font-size: 28px; margin: 0 0 8px; }

/* phones: same layout, tighter spacing (tables keep their header row and columns) */
@media (max-width: 600px) {
  .ph { padding: 20px 16px; }
  .ph h1 { font-size: 24px; }
  .pb { padding: 18px 14px 28px; }
  .tr, .th { gap: 8px; padding-left: 10px; padding-right: 10px; }
  .td { font-size: 14px; }
  .td.b, .td.ans, .td.acc2 { font-size: 15px; }
  .mq-q, .mq-s, .mq-a { padding-left: 12px; padding-right: 12px; }
  .li { padding-left: 10px; padding-right: 10px; gap: 10px; }
  .hero h1 { font-size: 26px; }
}

/* ---- additions: brand, home grids, pages, footer, ads, forms, admin ---- */
.bt { display: flex; flex-direction: column; line-height: 1.35; }
.bt small { font-weight: 400; font-size: 13px; color: var(--muted); }
.logo { display: block; height: 44px; width: auto; max-width: 240px; object-fit: contain; }
.brand:has(.logo) { gap: 10px; }

.blk { margin-top: 8px; }
.hero-sm .wrap { padding-block: 24px 26px; }
.hero-sm h1 { font-size: 26px; }
.gh { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin: 26px 0 12px; }
.gh h2 { margin: 0; font-size: 19px; line-height: 1.6; }
.gh span { font-size: 14px; color: var(--muted); }
.ygrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ycard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; text-decoration: none; color: var(--ink); }
.ycard:hover { border-color: var(--accent); }
.ycard b { font-size: 18px; line-height: 1.5; }
.ycard span { font-size: 14px; color: var(--muted); }
.chip.on { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); font-weight: 700; }
.chips.on-band { margin-top: 16px; }
.chips.on-band .chip { background: var(--band-chip); border-color: var(--band-chip); color: var(--band-chip-ink); }
.chips.on-band .chip.on { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.cats { display: flex; flex-wrap: wrap; gap: 8px; }
.cats .cat { text-decoration: none; }
.cat.alt { background: var(--band-chip); color: var(--band-chip-ink); }

.post.prose-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin-top: 20px; }
.ph.slim { padding: 22px 28px; }
.prose { font-size: 16px; line-height: 1.95; }
.prose h2 { font-size: 20px; margin: 1.4em 0 .4em; line-height: 1.6; }
.prose h3 { font-size: 17px; margin: 1.2em 0 .3em; }
.prose p, .prose ul, .prose ol { margin: 0 0 .9em; }
.prose ul, .prose ol { padding-left: 1.4em; }

.flinks { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.flinks a { color: var(--band-chip-ink); text-decoration: none; }
.flinks a:hover { text-decoration: underline; }
.fcopy { color: var(--band-muted); display: flex; flex-direction: column; gap: 2px; padding-top: 12px; border-top: 1px solid var(--band-chip); width: 100%; line-height: 1.6; }
.fcopy span { display: block; }

.ad { margin: 20px 0; text-align: center; min-height: 20px; }
.ad::before { content: "বিজ্ঞাপন"; display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; }

.fld { margin: 0 0 16px; display: flex; flex-direction: column; gap: 4px; }
.fld label { font-weight: 700; font-size: 15px; }
.fld small { color: var(--muted); font-size: 13px; line-height: 1.6; }
.fld input[type=text], .fld input[type=email], .fld input[type=url], .fld input[type=password], .fld textarea, .fld select {
  font: inherit; font-size: 16px; width: 100%; padding: 9px 12px; border: 1px solid var(--pill-bd); border-radius: 10px; background: #fff; color: var(--ink);
}
.fld input[type=file] { font: inherit; font-size: 15px; }
.fld textarea { line-height: 1.6; resize: vertical; }
.fld textarea.code, code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }
code { background: var(--tint); padding: 1px 6px; border-radius: 6px; }
.btn { display: inline-block; font: inherit; font-weight: 700; font-size: 16px; background: var(--band); color: #fff; border: 1px solid var(--band); border-radius: 10px; padding: 8px 20px; min-height: 44px; cursor: pointer; text-decoration: none; line-height: 1.6; }
.btn:hover { background: var(--accent); }
.btn.ghost { background: var(--surface); color: var(--link); border-color: var(--pill-bd); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.flash { padding: 10px 14px; border-radius: 10px; margin: 14px 0; font-size: 15px; border: 1px solid; }
.flash.ok { background: #E4F4EA; border-color: #A9D8BC; color: #0B5A47; }
.flash.err { background: #FBE9E7; border-color: #E8B4AE; color: #8A2F28; }
.flash.warn { background: #FFF6DC; border-color: #EBCF84; color: #5E4700; }
.cform { margin-top: 20px; }

/* admin */
.adm { padding-block: 20px 40px; }
.adm .card, .login .card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin: 0 0 18px; }
.adm .card h2, .login .card h2 { margin: 0 0 12px; font-size: 19px; line-height: 1.6; }
.card.narrow { max-width: 460px; }
.login { padding-block: 40px; max-width: 420px; }
.lg-brand { display: flex; align-items: center; gap: 10px; font-size: 20px; margin-bottom: 4px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.subnav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.subnav a { background: var(--surface); border: 1px solid var(--pill-bd); border-radius: 999px; padding: 3px 14px; text-decoration: none; font-size: 14px; }
.menu a.on { font-weight: 700; color: var(--accent); }
.inl { display: inline; margin: 0; }
.linkbtn { font: inherit; background: none; border: 0; color: var(--link); cursor: pointer; padding: 0; text-decoration: underline; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.chk { display: flex; align-items: flex-start; gap: 8px; font-weight: 400 !important; margin-top: 6px; }
.chk input { margin-top: 6px; }
.pv { background: var(--tint); border: 1px dashed var(--pill-bd); border-radius: 10px; padding: 10px; margin-bottom: 6px; display: inline-block; }
.pv-logo { max-height: 60px; max-width: 100%; display: block; }
.pv-fav { width: 32px; height: 32px; display: block; }
.badge-s { font-size: 12px; background: var(--gold); color: var(--gold-ink); padding: 1px 8px; border-radius: 999px; vertical-align: middle; }
.adm .top .wrap, .top.adm-top .wrap { max-width: 780px; }

/* search button + pager */
.search .sbtn { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); padding-inline: 18px; }
.search .sbtn:hover { background: #E8AA2C; }
.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin: 22px 0 6px; }
.pg { min-width: 40px; min-height: 40px; padding: 4px 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface); border: 1px solid var(--pill-bd); border-radius: 10px; color: var(--link); text-decoration: none; font-size: 15px; }
a.pg:hover { border-color: var(--accent); }
.pg.on { background: var(--band); border-color: var(--band); color: #fff; font-weight: 700; }
.pg.off { color: #9AA9A2; background: transparent; }
.gap { color: var(--muted); padding: 0 2px; }

.sec-note { margin: 0 0 12px; font-size: 15px; line-height: 1.85; }

/* newsletter */
.nl { margin-top: 30px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.nl-h { background: var(--band); color: var(--band-ink); padding: 18px 22px; }
.nl-h h2 { margin: 0 0 2px; font-size: 20px; line-height: 1.5; }
.nl-h p { margin: 0; color: var(--band-muted); font-size: 15px; line-height: 1.7; }
.nl form { display: flex; gap: 8px; padding: 18px 22px 8px; }
.nl input[type=email] { flex: 1 1 auto; min-width: 0; font: inherit; font-size: 16px; padding: 11px 14px; border: 1px solid var(--pill-bd); border-radius: 10px; background: #fff; color: var(--ink); }
.nl .btn { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); white-space: nowrap; }
.nl .btn:hover { background: #E8AA2C; }
.nl small { display: block; padding: 0 22px 16px; color: var(--muted); font-size: 13px; }
.nl .flash { margin: 14px 22px 0; }
@media (max-width: 520px) { .nl form { flex-direction: column; } .nl .btn { width: 100%; } .search { max-width: none; } }
.subs { width: 100%; border-collapse: collapse; font-size: 15px; }
.subs th, .subs td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line-soft); overflow-wrap: anywhere; }

/* ---- Header theme toggle ---- */
.top .wrap { position: relative; }
.hr { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tt { font: inherit; font-size: 14px; line-height: 1.4; background: var(--surface); color: var(--ink); border: 1px solid var(--pill-bd); border-radius: 999px; padding: 5px 14px; min-height: 36px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.tt:hover { border-color: var(--accent); }
.tt .ic { font-size: 15px; line-height: 1; }

/* ---- Post font-size control ---- */
.fs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--band-muted); }
.fs button { font: inherit; font-size: 15px; font-weight: 700; line-height: 1; min-width: 40px; min-height: 36px; padding: 0 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.1); color: var(--band-ink); cursor: pointer; }
.fs button:hover { background: rgba(255,255,255,.2); }
.fs button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.fs output { min-width: 44px; text-align: center; }
.pb { zoom: var(--fz, 1); }

/* ---- Dark theme ---- */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0D1221; --surface: #151C31; --ink: #E7ECF8; --muted: #9AA6C2; --line: #263052; --line-soft: #1F2846;
  --band: #1A2447; --band-chip: #26335F; --accent: #8FA6FF; --link: #9DB2FF; --zebra: #181F36; --tint: #181F36;
  --chip: #1D2850; --chip-ink: #AFC0FF; --pill-bd: #33406A; --wrong: #FF8A84; --focus: #9DB2FF;
  --red: #FF8A84; --red-soft: #3A1E24; --blue-soft: #1D2850; --hl-soft: #3A3417; --rule: #222B4A;
}
html[data-theme="dark"] .toc-t,
html[data-theme="dark"] .sec h2,
html[data-theme="dark"] .td.b,
html[data-theme="dark"] .trbox .src,
html[data-theme="dark"] .mq-t,
html[data-theme="dark"] .li-q { color: #C9D4FF; }

html[data-theme="dark"] input, html[data-theme="dark"] textarea, html[data-theme="dark"] select,
html[data-theme="dark"] .nl input[type=email] { background: #0F1815; color: var(--ink); }
html[data-theme="dark"] .pg.off { color: #6E827A; }
html[data-theme="dark"] .flash.ok { background: #16372B; border-color: #2E6B53; color: #A8E6CB; }
html[data-theme="dark"] .flash.err { background: #3A1F1C; border-color: #7A3A34; color: #F2B5AE; }
html[data-theme="dark"] .flash.warn { background: #3A3216; border-color: #7A6A2A; color: #F1DC92; }

/* =====================================================================
   Home — "answer script" design
   Scoped to body.home so post and list pages keep their own look.
   ===================================================================== */
.home {
  --hf: 'Hind Siliguri', sans-serif;
  --ui: 'Hind Siliguri', sans-serif;
  --bg: #F4F6FB; --ink: #121B33; --muted: #56617A; --line: #DCE2EF; --line-soft: #E8ECF5;
  --band: #121B33; --accent: #2748D8; --link: #2748D8; --focus: #2748D8; --pill-bd: #CBD3E6;
  --h-blue: #2748D8; --h-blue-soft: #E6EBFD; --h-red: #D93F3F; --h-red-soft: #FCE8E7; --h-hl: #FFE36E;
  --h-gold-soft: #FFF4C2; --h-rule: #E5E9F4;
  font-family: var(--ui); background: var(--bg); color: var(--ink);
}
html[data-theme="dark"] .home {
  --bg: #0D1221; --surface: #151C31; --ink: #E7ECF8; --muted: #9AA6C2; --line: #263052; --line-soft: #1F2846;
  --band: #1A2447; --accent: #8FA6FF; --link: #9DB2FF; --focus: #9DB2FF; --pill-bd: #33406A;
  --h-blue: #8FA6FF; --h-blue-soft: #1D2850; --h-red: #FF8A84; --h-red-soft: #3A1E24; --h-hl: #FFE36E;
  --h-gold-soft: #3A3417; --h-rule: #222B4A;
}
.home .mark i { background: var(--h-hl); }
.home .brand, .home .menu { font-family: var(--ui); }

.home .wrap { max-width: 1152px; }
.hm h1, .hm h2 { font-family: var(--hf); }

/* hero */
.hx { display: grid; gap: 36px; padding-block: 44px 20px; align-items: center; }
.hx-l h1 { margin: 0 0 14px; font-size: 38px; line-height: 1.4; font-weight: 700; letter-spacing: -.005em; text-wrap: balance; max-width: 18ch; }
.hx-l p { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.85; max-width: 46ch; }
.hs { margin-top: 26px; display: flex; align-items: center; gap: 10px; max-width: 540px; background: var(--surface); border: 1.5px solid var(--pill-bd); border-radius: 16px; padding: 6px 6px 6px 16px; transition: border-color .15s, box-shadow .15s; }
.hs:focus-within { border-color: var(--h-blue); box-shadow: 0 0 0 4px var(--h-blue-soft); }
.hs svg { flex: 0 0 auto; color: var(--muted); }
.hs input { flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 16px; padding: 10px 0; }
html[data-theme="dark"] .hs input { background: transparent; }
.hs input::placeholder { color: var(--muted); }
.hbtn { font: inherit; font-weight: 700; font-size: 16px; min-height: 44px; padding: 0 22px; border: 0; border-radius: 11px; background: var(--h-blue); color: #fff; cursor: pointer; }
html[data-theme="dark"] .hbtn { color: #0D1221; }
.hbtn:hover { filter: brightness(1.08); }
.hf { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 26px 0 0; }
.hf div { display: flex; align-items: baseline; gap: 8px; }
.hf dt { color: var(--muted); font-size: 15px; order: 2; }
.hf dd { margin: 0; font-family: var(--hf); font-weight: 700; font-size: 22px; line-height: 1.3; }

/* the one memorable element: the three newest exams as answer sheets */
.hx-r { position: relative; display: grid; gap: 12px; }
.sheet {
  position: relative; display: grid; gap: 8px; padding: 16px 18px 14px 58px; text-decoration: none; color: var(--ink);
  background:
    linear-gradient(90deg, transparent 43px, var(--h-red) 43px, var(--h-red) 44.5px, transparent 44.5px),
    repeating-linear-gradient(180deg, transparent 0 31px, var(--h-rule) 31px 32px),
    var(--surface);
  border: 1px solid var(--line); border-radius: 6px 14px 14px 6px; box-shadow: 0 1px 0 var(--line), 0 14px 28px -18px rgba(18,27,51,.35);
}
.sheet::before, .sheet::after { content: ""; position: absolute; left: 17px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); }
.sheet::before { top: 20%; } .sheet::after { bottom: 20%; }
.sheet:hover { border-color: var(--h-blue); }
.sh-t { font-family: var(--hf); font-weight: 700; font-size: 18px; line-height: 32px; text-wrap: balance; }
.sh-m { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; line-height: 32px; }
.sh-d, .sh-q { color: var(--muted); font-size: 14px; line-height: 32px; }

/* chips used in rows and sheets */
.rc { display: inline-block; font-size: 13px; line-height: 1.5; padding: 1px 10px; border-radius: 999px; background: var(--line-soft); color: var(--muted); }
.rc.t-ministry { background: var(--h-blue-soft); color: var(--h-blue); }
.rc.t-directorate { background: var(--h-red-soft); color: var(--h-red); }
.rc.t-division { background: var(--h-gold-soft); color: #7A5B00; }
html[data-theme="dark"] .rc.t-division { color: #FFE36E; }

/* sections */
.hb { margin-top: 44px; }
.hh { margin: 0 0 16px; font-size: 22px; line-height: 1.5; font-weight: 700; }
.hh-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 4px; }
.hh-row .hh { margin-bottom: 12px; }
.hc { color: var(--muted); font-size: 15px; }

/* category tiles */
.tiles { display: grid; gap: 12px; }
.tile { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 16px; row-gap: 2px; padding: 18px 20px; border-radius: 16px; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-left-width: 6px; }
.tile.t-ministry { border-left-color: var(--h-blue); }
.tile.t-directorate { border-left-color: var(--h-red); }
.tile.t-division { border-left-color: var(--h-hl); }
.tile:hover { background: var(--h-blue-soft); }
.tn { grid-row: 1 / 3; font-family: var(--hf); font-weight: 700; font-size: 34px; line-height: 1.2; min-width: 2ch; text-align: center; }
.tl { font-weight: 700; font-size: 19px; line-height: 1.5; }
.tx { color: var(--muted); font-size: 14px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }

/* year pills */
.yps { display: flex; flex-wrap: wrap; gap: 10px; }
.yp { display: inline-flex; align-items: baseline; gap: 8px; padding: 8px 18px; border-radius: 999px; border: 1.5px solid var(--pill-bd); background: var(--surface); color: var(--ink); text-decoration: none; min-height: 44px; }
.yp b { font-family: var(--hf); font-size: 17px; }
.yp span { color: var(--muted); font-size: 14px; }
.yp:hover { border-color: var(--h-blue); background: var(--h-blue-soft); }

/* exam rows */
.rows { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.row { position: relative; display: grid; grid-template-columns: 62px 1fr 22px; align-items: center; gap: 16px; padding: 16px 18px; text-decoration: none; color: var(--ink); border-top: 1px solid var(--line-soft); }
.row:first-child { border-top: 0; }
.row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--h-red); transform: scaleY(0); transition: transform .15s; }
.row:hover { background: var(--h-blue-soft); }
.row:hover::before { transform: scaleY(1); }
.rd { display: grid; justify-items: center; text-align: center; line-height: 1.25; }
.rd b { font-family: var(--hf); font-size: 26px; font-weight: 700; }
.rd small { font-size: 12.5px; color: var(--muted); }
.rb { display: grid; gap: 8px; min-width: 0; }
.rt { font-weight: 700; font-size: 17px; line-height: 1.6; text-wrap: balance; }
.rcs { display: flex; flex-wrap: wrap; gap: 6px; }
.rg { color: var(--muted); }
.row:hover .rg { color: var(--h-blue); }
.home .pager { margin-top: 18px; }
.home .empty { background: var(--surface); }

/* newsletter */
.home .nl { margin-top: 44px; border-radius: 22px; border: 0; background: var(--band); color: #fff; display: grid; gap: 0; padding: 10px; }
html[data-theme="dark"] .home .nl { background: #1A2447; }
.home .nl-h { background: transparent; padding: 20px 20px 4px; }
.home .nl-h h2 { color: #fff; font-size: 24px; }
.home .nl-h p { color: #BFC9E8; }
.home .nl form { padding: 14px 20px 6px; }
.home .nl input[type=email] { border: 1.5px solid transparent; border-radius: 12px; background: #fff; color: #121B33; }
.home .nl .btn { background: var(--h-hl); border-color: var(--h-hl); color: #121B33; border-radius: 12px; }
.home .nl small { color: #AEB9DC; padding: 0 20px 18px; }
.home .nl .flash { margin: 12px 20px 0; }

.home .foot { margin-top: 44px; }

@media (min-width: 860px) {
  .hx { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; padding-block: 64px 28px; }
  .hx-l h1 { font-size: 46px; }
  .hx-r { gap: 0; padding-block: 6px; }
  .hx-r .sheet:nth-child(1) { transform: rotate(-1.4deg); z-index: 1; }
  .hx-r .sheet:nth-child(2) { transform: rotate(1deg) translate(18px, -6px); z-index: 2; }
  .hx-r .sheet:nth-child(3) { transform: rotate(-.6deg) translate(-8px, -12px); z-index: 3; }
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .tile { grid-template-columns: 1fr; padding: 22px; row-gap: 4px; }
  .tn { grid-row: auto; text-align: left; font-size: 44px; }
  .tile:first-child { background: var(--band); color: #fff; }
  .tile:first-child .tx { color: #BFC9E8; }
  .tile:first-child:hover { filter: brightness(1.15); }
  .hh { font-size: 26px; }
}
@media (max-width: 859px) {
  .hx-r { grid-auto-flow: column; grid-auto-columns: 82%; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; padding-bottom: 8px; }
  .sheet { scroll-snap-align: start; }
}
@media (max-width: 520px) {
  .hx-l h1 { font-size: 32px; }
  .hs { padding-left: 12px; }
  .hbtn { padding: 0 16px; }
  .row { grid-template-columns: 52px 1fr; padding: 14px 14px; gap: 12px; }
  .row .rg { display: none; }
  .rd b { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) { .row::before, .hs { transition: none; } }

/* =====================================================================
   Post page — answer-script look (same family as the home page)
   ===================================================================== */
.post { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; margin-top: 24px; box-shadow: 0 24px 40px -32px rgba(18,27,51,.45); }

/* cover sheet */
.ph {
  position: relative; display: flex; flex-direction: column; gap: 12px; color: var(--ink);
  padding: 28px 30px 24px 74px;
  background:
    linear-gradient(90deg, transparent 54px, var(--red) 54px, var(--red) 55.5px, transparent 55.5px),
    repeating-linear-gradient(180deg, transparent 0 35px, var(--rule) 35px 36px),
    var(--surface);
  border-bottom: 1px solid var(--line);
}
.ph::before { content: ""; position: absolute; left: 20px; top: 30px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); box-shadow: 0 90px 0 var(--bg), 0 91px 0 1px var(--line); }
.crumb { color: var(--muted); }
.crumb a { color: var(--muted); }
.ph .crumb { font-size: 14px; line-height: 36px; margin-top: -6px; }
.cats { display: flex; flex-wrap: wrap; gap: 8px; }
.cat { background: var(--blue-soft); color: var(--accent); font-weight: 600; font-size: 14px; line-height: 1.5; padding: 2px 14px; border-radius: 999px; text-decoration: none; }
.cat.alt { background: var(--line-soft); color: var(--muted); }
.ph h1 { margin: 0; font-weight: 700; font-size: 30px; line-height: 36px; text-wrap: balance; color: var(--ink); }
.meta { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 1.5px; margin: 8px 0 0; background: var(--ink); border: 1.5px solid var(--ink); border-radius: 12px; overflow: hidden; }
.meta div { padding: 8px 14px 9px; background: var(--surface); }
.meta dt { font-size: 13px; line-height: 1.5; color: var(--muted); }
.meta dd { margin: 0; font-weight: 700; font-size: 16px; line-height: 1.5; }
html[data-theme="dark"] .meta { background: var(--pill-bd); border-color: var(--pill-bd); }
.fs { color: var(--muted); }
.fs button { border: 1px solid var(--pill-bd); background: var(--surface); color: var(--ink); }
.fs button:hover { background: var(--blue-soft); }
.fs button:focus-visible { outline: 2px solid var(--accent); }
.pubd { margin-left: auto; font-size: 14px; }

/* body */
.pb { padding: 26px 30px 38px; }
.intro { margin: 0 0 20px; font-size: 16px; line-height: 1.9; color: var(--ink); max-width: 68ch; }
.toc { background: var(--tint); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; gap: 12px; }
.toc-t { color: var(--ink); font-size: 15px; }
.chip { background: var(--surface); border: 1px solid var(--pill-bd); color: var(--ink); padding: 4px 13px; font-size: 14px; }
.chip:hover { background: var(--blue-soft); border-color: var(--accent); color: var(--accent); }
.grp { margin: 40px 0 0; gap: 14px; }
.grp span { background: var(--ink); color: var(--surface); font-size: 15px; padding: 4px 18px; border-radius: 10px; }
html[data-theme="dark"] .grp span { background: var(--blue-soft); color: #C9D4FF; }
.grp::after { background: var(--line); }
.sec { margin-top: 30px; }
.grp + .sec { margin-top: 20px; }
.sec-head { gap: 12px; margin-bottom: 12px; }
.num { background: var(--blue-soft); color: var(--accent); font-size: 14px; padding: 7px 11px; border-radius: 10px; min-width: 40px; text-align: center; }
.sec h2 { color: var(--ink); font-size: 20px; line-height: 1.55; }

/* tables: soft card, header is a quiet label row, answer column is marked */
.tbl { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface); }
.tr { padding: 12px 18px; border-top: 1px solid var(--line-soft); }
.tbody > .tr:nth-child(even) { background: transparent; }
.tr:hover { background: var(--tint); }
.th, .tr.th:hover { background: var(--tint); color: var(--muted); font-weight: 600; font-size: 14px; padding: 9px 18px; border-bottom: 1px solid var(--line); border-top: 0; }
.td { font-size: 15px; line-height: 1.65; }
.td.b { color: var(--ink); font-size: 16px; }
.td.ans { color: var(--accent); font-size: 16px; }
.td.acc, .td.acc2 { color: var(--ink); }
.td.wrong { color: var(--wrong); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.td.muted { color: var(--muted); }
.pill { background: var(--hl-soft); color: var(--ink); border-radius: 6px; }

/* question list */
.li { gap: 14px; padding: 14px 18px; }
.tbody > .li:nth-child(even) { background: transparent; }
.li-l { width: 30px; height: 30px; line-height: 30px; border-radius: 10px; background: var(--blue-soft); color: var(--accent); }
.li-q { color: var(--ink); font-size: 16px; }
.li-a { margin-top: 6px; padding: 8px 12px; border-left: 3px solid var(--accent); background: var(--tint); border-radius: 0 10px 10px 0; font-weight: 600; font-size: 15px; }

/* translation: source with red bar, solution with blue bar */
.trbox { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.trbox p { padding: 14px 20px 14px 22px; position: relative; }
.trbox p::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px; border-radius: 0 4px 4px 0; background: var(--accent); }
.trbox .src { background: var(--tint); color: var(--ink); font-weight: 700; }
.trbox .src::before { background: var(--red); }
.trbox .sol { border-top: 1px solid var(--line); }

/* maths: steps on a guide line, answer highlighted like a marker */
.mq { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); margin-top: 14px; }
.mq-q { background: var(--tint); padding: 12px 18px; }
.badge { background: var(--ink); color: var(--surface); border-radius: 8px; padding: 1px 10px; }
html[data-theme="dark"] .badge { background: var(--blue-soft); color: #C9D4FF; }
.mq-t { color: var(--ink); }
.mq-s { padding: 12px 18px 12px 22px; }
.mq-s .st { border-left: 2px solid var(--line); padding-left: 14px; margin-left: 4px; }
.mq-a { background: var(--hl-soft); color: var(--ink); border-top: 1px solid var(--line); padding: 10px 18px; font-size: 16px; }
.mq-a::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--red); margin-right: 10px; }

.share { border-top: 1px solid var(--line); }
.copy { border-radius: 10px; }
.pn a { border-radius: 14px; }
.pn a:hover { border-color: var(--accent); background: var(--blue-soft); }

@media (max-width: 600px) {
  .ph { padding: 22px 16px 20px 46px; background:
    linear-gradient(90deg, transparent 31px, var(--red) 31px, var(--red) 32.5px, transparent 32.5px),
    repeating-linear-gradient(180deg, transparent 0 31px, var(--rule) 31px 32px), var(--surface); }
  .ph::before { left: 9px; width: 12px; height: 12px; top: 24px; box-shadow: none; }
  .ph h1 { font-size: 23px; line-height: 32px; }
  .ph .crumb { line-height: 32px; margin-top: -4px; }
  .meta { grid-auto-flow: row; grid-template-columns: 1fr 1fr; }
  .meta div:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .pubd { margin-left: 0; flex-basis: 100%; }
  .pb { padding: 20px 14px 30px; }
  .tr, .li { padding-left: 12px; padding-right: 12px; }
  .th { padding-left: 12px; padding-right: 12px; }
  .mq-q, .mq-s, .mq-a { padding-left: 14px; padding-right: 14px; }
}

/* =====================================================================
   Home extras and footer
   ===================================================================== */
.qgrid { display: grid; gap: 14px; }
.qbox { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; }
.qbox h3 { margin: 0 0 12px; font-size: 16px; line-height: 1.5; color: var(--muted); font-weight: 600; }
.qps { display: flex; flex-wrap: wrap; gap: 8px; }
.qp { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 14px; border-radius: 999px; background: var(--blue-soft); color: var(--accent); text-decoration: none; font-weight: 600; font-size: 15px; }
.qp span { background: var(--surface); color: var(--muted); font-weight: 500; font-size: 13px; line-height: 1.5; padding: 0 8px; border-radius: 999px; }
.qp.alt { background: var(--red-soft); color: var(--red); }
.qp:hover { filter: brightness(.96); outline: 1.5px solid currentColor; }
.why { display: grid; gap: 12px; }
.why > div { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; }
.why > div:nth-child(1) { border-top: 4px solid var(--accent); }
.why > div:nth-child(2) { border-top: 4px solid var(--red); }
.why > div:nth-child(3) { border-top: 4px solid var(--gold); }
.why b { display: block; font-size: 18px; line-height: 1.5; margin-bottom: 6px; }
.why p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.8; }
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 52px 16px 20px; font-weight: 600; font-size: 16px; line-height: 1.6; position: relative; min-height: 52px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 8px; background: var(--blue-soft); color: var(--accent); text-align: center; line-height: 26px; font-size: 18px; font-weight: 700; }
.faq details[open] summary::after { content: "−"; }
.faq details[open] { border-color: var(--accent); }
.faq p { margin: 0; padding: 0 20px 18px; color: var(--muted); font-size: 15px; line-height: 1.85; }
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; padding: 24px 26px; border-radius: 22px; background: var(--hl-soft); border: 1.5px solid var(--ink); }
html[data-theme="dark"] .cta { border-color: var(--pill-bd); }
.cta h2 { margin: 0 0 4px; font-size: 21px; line-height: 1.5; }
.cta p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.7; }
.btn.cta-b { background: var(--ink); border-color: var(--ink); color: var(--surface); border-radius: 12px; padding: 10px 24px; }
html[data-theme="dark"] .btn.cta-b { background: var(--accent); border-color: var(--accent); color: #0D1221; }

.foot { background: var(--band); color: var(--band-muted); margin-top: 48px; }
.foot .wrap { padding-block: 32px 24px; gap: 24px; }
.fgrid { display: grid; gap: 22px 32px; width: 100%; }
.fabout b { display: block; color: #fff; font-size: 18px; line-height: 1.5; }
.fabout span { font-size: 14px; line-height: 1.7; }
.fcol { display: flex; flex-direction: column; gap: 6px; }
.fcol h3 { margin: 0 0 4px; font-size: 14px; font-weight: 600; color: #fff; }
.fcol a { color: var(--band-muted); text-decoration: none; font-size: 14px; line-height: 1.7; }
.fcol a:hover { color: #fff; text-decoration: underline; }
.foot .fcopy { width: 100%; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.14); }

@media (min-width: 860px) {
  .qgrid { grid-template-columns: 1.3fr 1fr; }
  .why { grid-template-columns: repeat(3, 1fr); }
  .fgrid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .ph { padding-right: 36px; }
}
@media (max-width: 859px) { .fgrid { grid-template-columns: 1fr 1fr; } .fabout { grid-column: 1 / -1; } }

/* =====================================================================
   Polish pass
   ===================================================================== */
::selection { background: var(--gold); color: #121B33; }
html { -webkit-text-size-adjust: 100%; }
body { text-rendering: optimizeLegibility; }

/* progress + back-to-top (post pages) */
.rp { position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 40; background: linear-gradient(90deg, var(--accent), var(--red)); transform: scaleX(0); transform-origin: left; pointer-events: none; }
.totop { position: fixed; right: 16px; bottom: 18px; z-index: 30; width: 46px; height: 46px; border-radius: 14px; border: 1px solid var(--pill-bd); background: var(--surface); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 10px 24px -10px rgba(18,27,51,.45); }
.totop[hidden] { display: none; }
.totop:hover { background: var(--blue-soft); color: var(--accent); }

/* hero atmosphere */
.hm { position: relative; background:
  radial-gradient(760px 380px at 88% -4%, rgba(39,72,216,.12), transparent 62%),
  radial-gradient(520px 280px at 4% 6%, rgba(255,227,110,.22), transparent 62%); }
.hm::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 520px; pointer-events: none;
  background-image: radial-gradient(var(--line) 1.2px, transparent 1.3px); background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%); mask-image: linear-gradient(180deg, #000 0%, transparent 85%); opacity: .8; }
.hm > * { position: relative; }
html[data-theme="dark"] .hm { background:
  radial-gradient(760px 380px at 88% -4%, rgba(143,166,255,.16), transparent 62%),
  radial-gradient(520px 280px at 4% 6%, rgba(255,227,110,.07), transparent 62%); }

.hx-l h1 { font-size: 40px; line-height: 1.32; letter-spacing: -.01em; max-width: 16ch; }
.hx-l p { font-size: 17px; }
.hs { box-shadow: 0 18px 36px -22px rgba(39,72,216,.55); }
.hf { display: inline-flex; gap: 0; margin-top: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.hf div { padding: 8px 20px; border-left: 1px solid var(--line); }
.hf div:first-child { border-left: 0; }
.hf dd { font-size: 22px; }
.hf dt { font-size: 14px; }

.sheet { box-shadow: 0 1px 0 var(--line), 0 22px 34px -22px rgba(18,27,51,.5); transition: border-color .15s, box-shadow .15s; }
.sheet:hover { box-shadow: 0 1px 0 var(--line), 0 26px 40px -20px rgba(39,72,216,.45); }

/* sections */
.hb { margin-top: 56px; }
.hh { font-size: 24px; letter-spacing: -.005em; }

/* tiles: share bar */
.tile { position: relative; transition: transform .15s, box-shadow .15s, background .15s; }
.tile:hover { transform: translateY(-2px); box-shadow: 0 16px 28px -22px rgba(18,27,51,.55); }
.tile::after { content: ""; position: absolute; right: 18px; top: 20px; width: 9px; height: 9px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); opacity: .45; }
.tb { grid-column: 1 / -1; display: block; height: 5px; border-radius: 999px; background: var(--line-soft); overflow: hidden; margin-top: 12px; }
.tb i { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.tile.t-directorate .tb i { background: var(--red); }
.tile.t-division .tb i { background: #E0B400; }
@media (min-width: 860px) {
  .tile:first-child .tb { background: rgba(255,255,255,.16); }
  .tile:first-child .tb i { background: var(--gold); }
}

/* rows */
.rows { box-shadow: 0 20px 36px -30px rgba(18,27,51,.45); }
.row { transition: background .12s; }
.rc.new { background: var(--gold); color: #121B33; font-weight: 700; }
.rt { font-size: 17px; }

/* year pills */
.yp { transition: border-color .12s, background .12s; }

/* newsletter */
.home .nl { position: relative; overflow: hidden; }
.home .nl::after { content: ""; position: absolute; right: -60px; top: -80px; width: 220px; height: 220px; border-radius: 50%; border: 34px solid rgba(255,227,110,.12); pointer-events: none; }
.home .nl > * { position: relative; z-index: 1; }

/* post polish */
.post { box-shadow: 0 30px 50px -36px rgba(18,27,51,.5); }
.tbl, .mq, .trbox { box-shadow: 0 10px 24px -22px rgba(18,27,51,.4); }
.sec { scroll-margin-top: 84px; }
.num { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent); }
.toc { background: linear-gradient(180deg, var(--tint), var(--surface)); }
.chip { transition: background .12s, border-color .12s, color .12s; }
.li-a { border-radius: 0 12px 12px 0; }

@media (max-width: 520px) {
  .hx-l h1 { font-size: 31px; }
  .hf { display: flex; }
  .hf div { flex: 1 1 0; padding: 8px 10px; justify-content: center; }
  .hb { margin-top: 44px; }
}
@media (prefers-reduced-motion: reduce) { .tile, .tile:hover { transition: none; transform: none; } }

/* longer hero title */
.hx-l h1 { max-width: 22ch; font-size: 36px; line-height: 1.38; }
@media (min-width: 860px) { .hx-l h1 { font-size: 42px; } }
@media (max-width: 520px) { .hx-l h1 { font-size: 28px; } }

/* ---- "কেন জব রিটেন সেরা" ---- */
.why2 { display: grid; gap: 14px; }
.wf { position: relative; overflow: hidden; background: var(--band); color: #fff; border-radius: 22px; padding: 26px 24px 24px; display: flex; flex-direction: column; gap: 8px; }
.wf::after { content: ""; position: absolute; right: -50px; bottom: -70px; width: 200px; height: 200px; border-radius: 50%; border: 30px solid rgba(255,227,110,.10); pointer-events: none; }
.wf h3 { margin: 10px 0 0; font-size: 24px; line-height: 1.4; font-weight: 700; }
.wf p { margin: 0; color: #C9D3F0; font-size: 16px; line-height: 1.85; max-width: 46ch; }
.stamp { align-self: flex-start; width: 96px; height: 96px; border-radius: 50%; display: grid; place-content: center; text-align: center; line-height: 1.2; color: #FF9C96; border: 3px solid #FF9C96; box-shadow: inset 0 0 0 4px var(--band), inset 0 0 0 5.5px #FF9C96; transform: rotate(-9deg); background: rgba(255,156,150,.08); }
.stamp span { font-size: 13px; font-weight: 600; }
.stamp b { font-size: 20px; font-weight: 700; }
.wtick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; position: relative; z-index: 1; }
.wtick span { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.16); color: #fff; font-size: 14px; line-height: 1.5; padding: 3px 12px 3px 8px; border-radius: 999px; }
.wtick span::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3.5 7.2l2.3 2.3 4.7-4.9' fill='none' stroke='%23121B33' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; }
.wc { display: flex; gap: 16px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 20px 22px; box-shadow: 0 14px 28px -24px rgba(18,27,51,.45); }
.wc h3 { margin: 0 0 4px; font-size: 18px; line-height: 1.5; }
.wc p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.8; }
.wi { flex: 0 0 auto; width: 52px; height: 52px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; }
.wi.b { background: var(--blue-soft); color: var(--accent); }
.wi.r { background: var(--red-soft); color: var(--red); }
@media (min-width: 860px) {
  .why2 { grid-template-columns: 1.25fr 1fr; grid-template-rows: 1fr 1fr; }
  .wf { grid-row: 1 / 3; padding: 34px 32px 30px; justify-content: center; }
  .wf h3 { font-size: 28px; }
}

/* ---- বিভাগ অনুযায়ী ---- */
.ctile { --c: var(--accent); --cs: var(--blue-soft); position: relative; display: flex; flex-direction: column; gap: 6px; padding: 20px 20px 18px; border-radius: 22px; text-decoration: none; color: var(--ink); background: linear-gradient(180deg, var(--cs), var(--surface) 70%); border: 1px solid var(--line); transition: transform .15s, box-shadow .15s, border-color .15s; }
.ctile.t-directorate { --c: var(--red); --cs: var(--red-soft); }
.ctile.t-division { --c: #B88F00; --cs: var(--hl-soft); }
html[data-theme="dark"] .ctile.t-division { --c: #FFE36E; }
.ctile:hover { transform: translateY(-3px); border-color: var(--c); box-shadow: 0 18px 30px -22px rgba(18,27,51,.55); }
.ct-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.ct-i { width: 52px; height: 52px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; background: var(--c); color: #fff; }
.ctile.t-division .ct-i { color: #121B33; background: #FFE36E; }
html[data-theme="dark"] .ctile .ct-i { color: #0D1221; }
.ct-n { font-size: 14px; font-weight: 600; line-height: 1.5; padding: 2px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.ct-t { font-size: 24px; font-weight: 700; line-height: 1.4; }
.ct-d { color: var(--muted); font-size: 15px; line-height: 1.7; }
.ct-b { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--pill-bd); }
.ct-l { min-width: 0; font-size: 14px; line-height: 1.5; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ct-l small { display: block; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.ct-a { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 1.5px solid var(--c); color: var(--c); transition: background .15s, color .15s; }
.ctile:hover .ct-a { background: var(--c); color: #fff; }
.ctile.t-division:hover .ct-a { color: #121B33; }
html[data-theme="dark"] .ctile:hover .ct-a { color: #0D1221; }
@media (prefers-reduced-motion: reduce) { .ctile, .ctile:hover { transition: none; transform: none; } }

/* featured image on a post */
.cover { padding: 22px 30px 0; }
.cover img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; border-radius: 16px; border: 1px solid var(--line); box-shadow: 0 18px 30px -24px rgba(18,27,51,.5); }
@media (max-width: 600px) { .cover { padding: 16px 14px 0; } .cover img { border-radius: 12px; } }

/* ---- exam list v2: separate cards ---- */
.home .rows { background: none; border: 0; border-radius: 0; overflow: visible; display: grid; gap: 12px; }
.home .row { grid-template-columns: 76px 1fr auto; gap: 18px; padding: 14px 18px 14px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 1px 0 var(--line), 0 14px 26px -22px rgba(18,27,51,.45); transition: transform .15s, border-color .15s, box-shadow .15s, background .15s; }
.home .row:first-child { border-top: 1px solid var(--line); }
.home .row::before { display: none; }
.home .row:hover { transform: translateY(-2px); border-color: var(--h-blue); background: var(--surface); box-shadow: 0 1px 0 var(--line), 0 20px 30px -18px rgba(39,72,216,.45); }
.home .rd { align-content: center; width: 76px; min-height: 84px; border-radius: 14px; background: linear-gradient(160deg, var(--h-blue), #1B2F8F); color: #fff; padding: 8px 4px; }
.home .rd b { font-size: 28px; color: #fff; }
.home .rd small { color: rgba(255,255,255,.85); }
.home .rt { font-size: 18px; }
.home .rg { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--h-blue-soft); color: var(--h-blue); padding: 8px; box-sizing: border-box; transition: background .15s, color .15s, transform .15s; }
.home .row:hover .rg { background: var(--h-blue); color: #fff; transform: translateX(3px); }
.home .rows .row:first-child .rd { background: linear-gradient(160deg, var(--h-red), #A3142B); }
.home .rows .row:first-child .rt::before { content: "সর্বশেষ"; display: inline-block; margin-right: 8px; padding: 0 10px; border-radius: 999px; background: var(--h-red); color: #fff; font-size: 12.5px; font-weight: 700; line-height: 22px; vertical-align: 2px; }
@media (max-width: 640px) {
  .home .row { grid-template-columns: 62px 1fr; gap: 12px; padding: 12px; }
  .home .rd { width: 62px; min-height: 72px; }
  .home .rd b { font-size: 24px; }
  .home .rt { font-size: 16.5px; }
}
.home .rd { background: linear-gradient(160deg, #2748D8, #1B2F8F); }
.home .rows .row:first-child .rd { background: linear-gradient(160deg, #D93F3F, #A3142B); }
.home .rows .row:first-child .rt::before { background: #D93F3F; color: #fff; }
html[data-theme="dark"] .home .row:hover .rg { background: var(--h-blue); color: #0E1530; }
@media (max-width: 640px) { .home .row .rg { display: none; } }

/* post seo blocks */
.pfaq, .prel { margin-top: 32px; }
.pfaq h2, .prel h2 { font-size: 20px; margin: 0 0 12px; }
.pfaq .faq { display: grid; gap: 10px; }
.prel { display: grid; gap: 8px; }
.prel h2 { margin-bottom: 4px; }
.prel a { display: block; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600; line-height: 1.6; }
.prel a:hover { border-color: var(--blue, #2748D8); }

/* blog feel */
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: 4px 0 14px; color: var(--muted); font-size: 14.5px; }
.byline .by-a { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; }
.byline .by-a i { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #2748D8; color: #fff; font-style: normal; font-size: 14px; }
.pend { margin-top: 32px; padding: 20px 22px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid #D93F3F; }
.pend h2 { margin: 0 0 8px; font-size: 20px; }
.pend p { margin: 0; line-height: 1.9; }
.tgs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tg { padding: 3px 12px; border-radius: 999px; background: var(--line-soft, #eef1f7); color: var(--muted); font-size: 14px; }

/* Q&A list (blog style, no tables) */
.post dl.qa { margin: 6px 0 0; }
.post dl.qa dt { font-weight: 700; font-size: 17px; line-height: 1.9; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.post dl.qa dt:first-child { border-top: 0; padding-top: 0; margin-top: 4px; }
.post dl.qa dd { margin: 0; line-height: 1.9; font-size: 17px; }
.post dl.qa .lb { color: var(--muted); font-size: 15px; font-weight: 400; }
.post dl.qa dd.ans { color: #0B7A3B; font-weight: 600; }
.post dl.qa dd.wrong { color: #C62828; text-decoration: line-through; }
.post dl.qa dd.wrong .lb { text-decoration: none; display: inline-block; }
.post dl.qa dd.acc, .post dl.qa dd.acc2 { color: #2748D8; }
.post dl.qa dd.muted { color: var(--muted); }
html[data-theme="dark"] .post dl.qa dd.ans { color: #6FE0A0; }
html[data-theme="dark"] .post dl.qa dd.acc, html[data-theme="dark"] .post dl.qa dd.acc2 { color: #8FA6FF; }
html[data-theme="dark"] .post dl.qa dd.wrong { color: #FF8A84; }
.post dl.qa .lq { color: var(--muted); margin-right: 2px; }

.post dl.qa dt.wrong { color: #C62828; text-decoration: line-through; text-decoration-thickness: 1.5px; }
html[data-theme="dark"] .post dl.qa dt.wrong { color: #FF8A84; }
