/* Deenpedia: বহু-পাতার অংশের স্টাইল (নূর এমারেল্ড)। scripts/pages/build.py এর পাতাগুলো এটা ব্যবহার করে। */
:root {
  --bg: #F6F8F6; --surface: #FFFFFF; --ink: #13241F; --muted: #4A5C56; --line: #E1E8E4;
  --accent: #0F5C4A; --accent-soft: #E3EFEA; --gold: #8A6420; --gold-bright: #C8973A; --gold-soft: #F6EEDC;
  --warn: #9B3426; --warn-soft: #F7E8E4; --head: #0A3F33; --head-ink: #F6F8F6; --hasan: #1F3F73; --hasan-soft: #EAF0FA;
  --body: "Noto Sans Bengali", "Hind Siliguri", system-ui, sans-serif;
  --brand: "Plus Jakarta Sans", system-ui, sans-serif;
  --arabic: "Amiri", "Scheherazade New", "Traditional Arabic", serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0B1714; --surface: #12211C; --ink: #E8EFEC; --muted: #9DB3AA; --line: #233630;
  --accent: #6CC4A1; --accent-soft: #15302A; --gold: #E2C07A; --gold-bright: #E2C07A; --gold-soft: #2A2414;
  --warn: #EE9A8A; --warn-soft: #2E1B17; --head: #07120F; --head-ink: #E8EFEC; --hasan: #A9C2EE; --hasan-soft: #18233A; color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #0B1714; --surface: #12211C; --ink: #E8EFEC; --muted: #9DB3AA; --line: #233630;
  --accent: #6CC4A1; --accent-soft: #15302A; --gold: #E2C07A; --gold-bright: #E2C07A; --gold-soft: #2A2414;
  --warn: #EE9A8A; --warn-soft: #2E1B17; --head: #07120F; --head-ink: #E8EFEC; --hasan: #A9C2EE; --hasan-soft: #18233A; color-scheme: dark; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 1.05rem; line-height: 1.8; }
a { color: var(--accent); text-underline-offset: 3px; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
img, svg { max-width: 100%; }
.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)); }
.wide { max-width: 1080px; }
.ar { font-family: var(--arabic); direction: rtl; text-align: right; color: var(--accent); font-size: 1.55rem; line-height: 2.1; margin: 0 0 .4em; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 16px; top: 8px; z-index: 50; background: var(--surface); padding: 6px 12px; }

/* হেডার */
header.top { background: var(--head); color: var(--head-ink); position: sticky; top: 0; z-index: 20;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='-24 -24 48 48'%3E%3Cg fill='none' stroke='%23C8973A' stroke-opacity='.16' stroke-width='1'%3E%3Crect x='-11' y='-11' width='22' height='22'/%3E%3Crect x='-11' y='-11' width='22' height='22' transform='rotate(45)'/%3E%3C/g%3E%3C/svg%3E"); }
.top .bar { display: flex; align-items: center; gap: 12px; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; margin-right: auto; }
.brand img { width: 36px; height: 36px; }
.brand b { font: 800 1.3rem/1 var(--brand); letter-spacing: -.03em; display: block; }
.brand b i { font-style: normal; color: var(--gold-bright); }
.brand small { font-size: .72rem; opacity: .8; display: block; line-height: 1.3; }
.iconbtn { background: transparent; border: 1px solid rgba(255,255,255,.3); color: var(--head-ink); border-radius: 8px; padding: 4px 10px; font-size: .85rem; }
nav.main { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; padding-bottom: 8px; }
nav.main::-webkit-scrollbar { display: none; }
nav.main a { color: var(--head-ink); text-decoration: none; font-size: .92rem; padding: 4px 11px; border-radius: 999px; white-space: nowrap; opacity: .88; }
nav.main a:hover, nav.main a[aria-current="page"] { background: rgba(255,255,255,.13); opacity: 1; }

/* ব্রেডক্রাম্ব ও শিরোনাম */
.crumbs { font-size: .85rem; color: var(--muted); margin: 18px 0 6px; }
.crumbs a { color: var(--muted); }
.crumbs span[aria-hidden] { margin: 0 6px; }
h1 { font-size: clamp(1.6rem, 4.5vw, 2.2rem); line-height: 1.35; margin: .2em 0 .4em; color: var(--ink); }
h2 { font-size: 1.35rem; line-height: 1.4; margin: 1.8em 0 .6em; padding-bottom: .3em; border-bottom: 2px solid var(--gold-bright); }
h3 { font-size: 1.12rem; margin: 1.4em 0 .4em; }
.lead { font-size: 1.12rem; color: var(--muted); }
.eyebrow { font-size: .8rem; font-weight: 600; letter-spacing: .02em; color: var(--gold); text-transform: none; }
main { padding-bottom: 48px; }

/* কার্ড */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; margin: 14px 0; }
.dolil { break-inside: avoid; }
.dolil .tr { margin: .2em 0 .5em; }
.dolil .meta, .refline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: .9rem; }
.ref { font-weight: 600; color: var(--accent); }
.grade { display: inline-block; font-size: .78rem; font-weight: 600; border-radius: 999px; padding: 1px 11px; }
.grade.sahih { background: var(--accent-soft); color: var(--accent); }
.grade.hasan { background: var(--hasan-soft); color: var(--hasan); }
.grade.daif, .grade.mawdu { background: var(--warn-soft); color: var(--warn); }
.note { background: var(--gold-soft); border-radius: 12px; padding: 12px 16px; margin: 14px 0; }
.warnbox { background: var(--warn-soft); border-radius: 12px; padding: 12px 16px; margin: 14px 0; }
.review { font-size: .88rem; background: var(--accent-soft); border-radius: 10px; padding: 8px 14px; margin: 10px 0 0; }

/* শেয়ার বার */
.share { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.share button, .share a { border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 999px; padding: 3px 12px; font-size: .84rem; text-decoration: none; line-height: 1.7; }
.share button:hover, .share a:hover { border-color: var(--accent); color: var(--accent); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--head); color: var(--head-ink); padding: 8px 18px; border-radius: 999px; font-size: .9rem; z-index: 60; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.on { opacity: 1; }

/* পথের ধাপ */
.steps { list-style: none; padding: 0; margin: 16px 0; counter-reset: s; }
.steps li { margin: 10px 0; }
.step { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; text-decoration: none; color: inherit; }
a.step:hover { border-color: var(--accent); }
.step .num { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 700; }
.step.soon { opacity: .62; }
.step.soon .num { background: var(--muted); }
.step b { display: block; font-size: 1.08rem; }
.step span { color: var(--muted); font-size: .93rem; display: block; }
.step .done { margin-left: auto; color: var(--accent); font-weight: 700; display: none; }
.step.is-done .done { display: block; }
.chip { display: inline-block; font-size: .75rem; border-radius: 999px; padding: 0 9px; background: var(--gold-soft); color: var(--gold); margin-left: 6px; font-weight: 600; }

.sec-q { font-weight: 600; margin-top: 1em; }
details.qa { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; margin: 10px 0; }
details.qa summary { cursor: pointer; font-weight: 600; }
details.qa[open] summary { margin-bottom: 6px; }
.howto { padding-left: 1.3em; } .howto li { margin: 6px 0; }
.myth { border-left: 4px solid var(--warn); }
.myth .wrong { color: var(--warn); font-weight: 600; }
.seerah { border-left: 4px solid var(--gold-bright); }

/* চেকলিস্ট ও কুইজ */
.checklist { list-style: none; padding: 0; }
.checklist li { margin: 6px 0; }
.checklist label { display: flex; gap: 10px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; cursor: pointer; }
.checklist input { width: 20px; height: 20px; margin-top: 5px; accent-color: var(--accent); flex: none; }
.quiz .q { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin: 10px 0; }
.quiz .opts { display: grid; gap: 6px; margin-top: 6px; }
.quiz .opts button { text-align: left; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px; }
.quiz .opts button.right { background: var(--accent-soft); border-color: var(--accent); }
.quiz .opts button.wrong { background: var(--warn-soft); border-color: var(--warn); }
.quiz .why { display: none; font-size: .93rem; color: var(--muted); margin-top: 6px; }
.quiz .q.answered .why { display: block; }
.btn { display: inline-block; background: var(--accent); color: #fff; border: 0; border-radius: 999px; padding: 9px 22px; font-weight: 600; text-decoration: none; }
:root[data-theme="dark"] .btn { color: #07120F; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn { color: #07120F; } }
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.next { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 28px; }

/* শুরু করুন */
.choice { display: grid; gap: 8px; margin: 10px 0 18px; }
.choice label { display: flex; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; cursor: pointer; }
.choice input { accent-color: var(--accent); width: 18px; height: 18px; }
#result { display: none; } #result.on { display: block; }

/* ফুটার */

/* তালিকা পাতা */
.list { list-style: none; padding: 0; }
.list li { border-bottom: 1px solid var(--line); padding: 8px 0; }
table.t { border-collapse: collapse; width: 100%; background: var(--surface); font-size: .95rem; }
table.t th { background: var(--accent); color: #fff; text-align: left; padding: 7px 10px; }
table.t td { border-bottom: 1px solid var(--line); padding: 7px 10px; vertical-align: top; }
.tablewrap { overflow-x: auto; }

/* প্রিন্ট / PDF */
.printhead, .printfoot { display: none; }
@media print {
  @page { size: A4; margin: 16mm 14mm; }
  :root { --bg: #fff; --surface: #fff; --ink: #13241F; --muted: #4A5C56; --accent: #0F5C4A; --line: #E1E8E4; }
  body { font-size: 12pt; background: #fff; }
  header.top, footer.dpf, .share, .crumbs, .no-print, .toast, nav.main, .next, .quiz, .checklist-wrap { display: none !important; }
  .printhead { display: flex; align-items: center; gap: 10px; border-bottom: 2px solid #C8973A; padding-bottom: 8px; margin-bottom: 14px; }
  .printhead img { width: 34px; height: 34px; }
  .printhead b { font: 800 18pt/1 "Plus Jakarta Sans", sans-serif; color: #0F5C4A; letter-spacing: -.03em; }
  .printhead b i { font-style: normal; color: #8A6420; }
  .printfoot { display: block; border-top: 1px solid #E1E8E4; margin-top: 18px; padding-top: 6px; font-size: 9pt; color: #4A5C56; }
  .card { border-color: #E1E8E4; }
  a { color: #0F5C4A; text-decoration: none; }
  body.print-one main > *:not(#printzone) { display: none !important; }
}
#printzone { display: none; }
@media print { body.print-one #printzone { display: block; } }

/* রঙিন ব্লক ও আইকন */
.ico { flex: none; }
.blk { border-radius: 18px; padding: 6px 18px 14px; margin: 22px 0; border: 1px solid var(--line); background: var(--surface); }
.blk > h2 { display: flex; align-items: center; gap: 12px; border: 0; margin: 12px 0 6px; padding: 0; }
.tile { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--accent); color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.15); }
.tile.gold { background: var(--gold-bright); color: #0A3F33; }
.tile.red { background: var(--warn); color: #fff; }
.tile.light { background: rgba(255,255,255,.12); color: #E2C07A; box-shadow: inset 0 0 0 1px rgba(226,192,122,.5); }
.blk.why { background: var(--accent-soft); border-color: transparent; }
.blk.how { background: var(--surface); border-left: 5px solid var(--accent); }
.blk.ask { background: var(--gold-soft); border-color: transparent; }
.blk.ask details.qa { background: var(--surface); }
.blk.myth { background: var(--warn-soft); border-color: transparent; }
.blk.myth .card { background: var(--surface); }
.blk.seerah { background: var(--head); color: var(--head-ink); border-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='-24 -24 48 48'%3E%3Cg fill='none' stroke='%23C8973A' stroke-opacity='.14' stroke-width='1'%3E%3Crect x='-11' y='-11' width='22' height='22'/%3E%3Crect x='-11' y='-11' width='22' height='22' transform='rotate(45)'/%3E%3C/g%3E%3C/svg%3E"); }
.blk.seerah h2, .blk.seerah p { color: var(--head-ink); }
.blk.seerah a { color: #E2C07A; }
.blk.seerah .card { color: var(--ink); }
.blk.seerah .card p { color: var(--ink); }
.blk.seerah .card a { color: var(--accent); }
.blk.amal { background: var(--surface); border: 1px dashed var(--gold-bright); }
.blk.quizb { background: var(--surface); }
.blk.what { background: var(--surface); }
.hero { display: flex; gap: 16px; align-items: center; background: var(--head); color: var(--head-ink); border-radius: 20px; padding: 18px 20px; margin: 10px 0 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='-24 -24 48 48'%3E%3Cg fill='none' stroke='%23C8973A' stroke-opacity='.18' stroke-width='1'%3E%3Crect x='-11' y='-11' width='22' height='22'/%3E%3Crect x='-11' y='-11' width='22' height='22' transform='rotate(45)'/%3E%3C/g%3E%3C/svg%3E"); }
.hero h1 { color: var(--head-ink); margin: 0; }
.hero .eyebrow { color: #E2C07A; }
.hero .bigtile { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; flex: none; background: rgba(255,255,255,.08); color: #E2C07A; box-shadow: inset 0 0 0 1.5px rgba(226,192,122,.6); }
.step .num { position: relative; }
.step .num svg { width: 24px; height: 24px; }
.step .num small { position: absolute; right: -6px; bottom: -6px; background: var(--gold-bright); color: #0A3F33; border-radius: 999px; font-size: .7rem; padding: 0 6px; line-height: 1.5; font-weight: 700; }
.grid2 { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 14px 0; }
.feature { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; text-decoration: none; color: inherit; }
a.feature:hover { border-color: var(--accent); }
.feature b { display: block; } .feature span { color: var(--muted); font-size: .92rem; }
@media print { .blk { border: 1px solid #E1E8E4 !important; background: #fff !important; color: #13241F !important; } .blk.seerah h2, .blk.seerah p { color: #13241F !important; } .tile, .hero .bigtile { display: none; } .hero { background: #fff !important; color: #13241F; padding: 0; } .hero h1 { color: #0A3F33; } }
.step span.chip { display: inline-block; color: var(--gold); font-size: .75rem; vertical-align: middle; }
/* সূত্র তালিকা */
table.src { border-collapse: collapse; width: 100%; background: var(--surface); font-size: .95rem; border-radius: 12px; overflow: hidden; }
table.src th, table.src td { border-bottom: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; }
table.src thead th { background: var(--accent); color: #fff; }
table.src tbody th { color: var(--accent); font-weight: 600; white-space: nowrap; }
.blk h3 { font-size: 1.05rem; margin: 18px 0 4px; }
.list .ext { font-size: .85rem; color: var(--muted); }
@media (min-width: 760px) { .list.cols2 { columns: 2; column-gap: 28px; } .list.cols2 li { break-inside: avoid; } }
@media (max-width: 560px) { table.src tbody th { white-space: normal; } }
@media (max-width: 560px) { table.src.books th:nth-child(3), table.src.books td:nth-child(3) { display: none; } }
/* নামাজের সূরা */
.hero .sura-ar { margin: 0 0 0 auto; font: 700 2.2rem/1.4 'Amiri', serif; color: #E2C07A; direction: rtl; }
.card.sura { padding: 6px 0; }
.basmala { text-align: center; font-size: 1.7rem; color: var(--accent); margin: 14px 16px 6px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.sura-a { display: grid; grid-template-columns: 38px 1fr; gap: 12px; padding: 16px; border-bottom: 1px solid var(--line); scroll-margin-top: 90px; }
.sura-a:last-child { border-bottom: 0; }
.sura-a:target { background: var(--gold-soft, #F6EEDC); }
.sura-a .an { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--accent-soft, #E3EFEA); color: var(--accent); font-weight: 700; font-size: .85rem; }
.sura-a .ar { font-size: 1.75rem; line-height: 2.1; margin: 0 0 6px; }
.sura-a .tr { margin: 0 0 6px; }
.sura-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin: 18px 0 8px; }
.sura-card { display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.sura-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.sura-card .sn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: var(--accent-soft, #E3EFEA); color: var(--accent); font-weight: 700; font-size: .85rem; }
.sura-card b { display: block; } .sura-card small { color: var(--muted); font-size: .8rem; }
.sura-card .sar { font: 1.35rem 'Amiri', serif; color: var(--accent); }
.sura-card.first { grid-column: 1 / -1; background: var(--accent); border-color: var(--accent); color: #fff; }
.sura-card.first small { color: #DCE7E2; } .sura-card.first .sar { color: #E2C07A; } .sura-card.first .sn { background: rgba(255,255,255,.15); color: #fff; }
@media (max-width: 560px) { .hero .sura-ar { display: none; } .sura-a .ar { font-size: 1.5rem; } }
.para-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 12px 0 8px; }
.para-grid a { display: block; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-decoration: none; color: inherit; }
.para-grid a:hover { border-color: var(--accent); }
.para-grid b { display: block; color: var(--accent); font-size: 1.05rem; }
.para-grid b::before { content: "পারা "; font-weight: 600; font-size: .85rem; color: var(--muted); }
.para-grid small { color: var(--muted); font-size: .78rem; }
a.sura-card.first { margin: 14px 0 6px; }
/* নবীদের জীবনী */
dl.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
dl.facts div { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--surface); }
dl.facts dt { font-size: .8rem; color: var(--muted); font-weight: 600; }
dl.facts dd { margin: 2px 0 0; }
.ptoc { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 18px; }
.ptoc a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); text-decoration: none; color: inherit; font-size: .9rem; }
.ptoc a:hover { border-color: var(--accent); color: var(--accent); }
.blk.story { scroll-margin-top: 90px; }
.blk.story h2 .cn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft, #E3EFEA); color: var(--accent); font-size: .9rem; margin-right: 10px; flex: none; }
.nabi-grid .sura-card { grid-template-columns: 38px 1fr; }
.nabi-grid .sura-card.soon { opacity: .6; }
@media (max-width: 560px) { dl.facts { grid-template-columns: 1fr; } }
ol.life { list-style: none; margin: 8px 0 0; padding: 0 0 0 4px; }
ol.life li { position: relative; padding: 0 0 16px 26px; border-left: 2px solid var(--line); margin-left: 8px; }
ol.life li:last-child { border-left-color: transparent; padding-bottom: 0; }
ol.life li::before { content: ""; position: absolute; left: -8px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid #C8973A; }
ol.life b { display: block; color: var(--accent); }
.sec-h { margin: 28px 0 8px; }
