body.tadabur-page {
  min-height: 100vh;
  overflow-x: hidden;
}

body.tadabur-page .tadabur-shell {
  width: min(100% - 24px, 980px);
  max-width: 100vw;
  margin: clamp(18px, 4vw, 48px) auto clamp(28px, 6vw, 72px);
}

body.tadabur-page .tadabur-shell--wide {
  width: min(100% - 24px, 1120px);
}

body.tadabur-page .tadabur-shell--article {
  width: min(100% - 24px, 1040px);
}

body.tadabur-page .tadabur-panel {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-width: 0;
  padding: clamp(16px, 3vw, 30px);
  background: #fffaf0;
  border: 1px solid #d9c28a;
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(67, 49, 15, 0.13);
}

body.tadabur-page .tadabur-panel::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(185, 145, 61, 0.34);
  border-radius: 6px;
  pointer-events: none;
}

body.tadabur-page .tadabur-panel::after {
  content: "";
  position: absolute;
  inset-inline: clamp(32px, 9vw, 120px);
  top: 0;
  height: 3px;
  background: #b9913d;
  pointer-events: none;
}

body.tadabur-page .tadabur-panel > * {
  position: relative;
  z-index: 1;
}

body.tadabur-page .tadabur-heading {
  margin: clamp(18px, 4vw, 34px) auto clamp(16px, 3vw, 28px);
  padding: clamp(22px, 5vw, 42px) clamp(18px, 5vw, 48px);
  color: #fff8e7;
  text-align: center;
  background: #123e36;
  border: 1px solid #b9913d;
  border-radius: 8px;
  box-shadow: 0 14px 30px rgba(20, 48, 42, 0.18);
}

body.tadabur-page .tadabur-heading h1 {
  margin: 0;
  color: #fff8e7;
  font: 700 clamp(2.1rem, 7vw, 4rem) "qpc-hafs", "Alyamama", "Traditional Arabic", serif;
  line-height: 1.45;
}

body.tadabur-page .tadabur-heading p {
  margin: 8px auto 0;
  max-width: 620px;
  color: #f3e6c5;
  font-size: clamp(1.08rem, 3vw, 1.35rem);
  line-height: 1.8;
}

body.tadabur-page .tadabur-kicker {
  color: #d9bd6d !important;
  font-weight: 700;
}

body.tadabur-page .tadabur-content {
  display: grid;
  gap: clamp(12px, 2vw, 18px);
}

body.tadabur-page .tadabur-book {
  position: relative;
  min-height: 132px;
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 22px);
  padding: clamp(18px, 3vw, 26px);
  color: #173f35;
  text-align: right;
  text-decoration: none;
  background: #fffdf8;
  border: 1px solid #dbc48b;
  border-bottom: 3px solid #b9913d;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75), 0 8px 18px rgba(74, 52, 15, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

body.tadabur-page .tadabur-book:hover {
  transform: translateY(-2px);
  color: #fff8e7;
  background: #123e36;
  border-color: #b9913d;
  box-shadow: 0 14px 26px rgba(49, 39, 14, 0.14);
}

body.tadabur-page .tadabur-book__mark {
  flex: 0 0 clamp(58px, 10vw, 78px);
  width: clamp(58px, 10vw, 78px);
  height: clamp(58px, 10vw, 78px);
  display: grid;
  place-items: center;
  color: #123e36;
  background: #f3e6c5;
  border: 1px solid #c79b38;
  border-radius: 50%;
  font: 700 clamp(1.3rem, 4vw, 1.8rem) "Alyamama", "Traditional Arabic", serif;
  line-height: 1;
}

body.tadabur-page .tadabur-book:hover .tadabur-book__mark {
  color: #fff8e7;
  background: #b9913d;
}

body.tadabur-page .tadabur-book__body,
body.tadabur-page .tadabur-book__title,
body.tadabur-page .tadabur-book__author,
body.tadabur-page .tadabur-book__meta {
  display: block;
}

body.tadabur-page .tadabur-book__body {
  min-width: 0;
}

body.tadabur-page .tadabur-book__title {
  overflow-wrap: anywhere;
  font: 700 clamp(1.55rem, 5vw, 2.3rem) "qpc-hafs", "Alyamama", "Traditional Arabic", serif;
  line-height: 1.45;
}

body.tadabur-page .tadabur-book__author {
  margin-top: 3px;
  color: #5d6d60;
  font-size: clamp(1rem, 2.8vw, 1.15rem);
  font-weight: 700;
}

body.tadabur-page .tadabur-book__meta {
  margin-top: 7px;
  color: #8a6c2b;
  font-size: clamp(.92rem, 2.4vw, 1rem);
  font-weight: 700;
}

body.tadabur-page .tadabur-book:hover .tadabur-book__author,
body.tadabur-page .tadabur-book:hover .tadabur-book__meta {
  color: #d9bd6d;
}

body.tadabur-page .tadabur-toc {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 18px);
}

body.tadabur-page .toc-section {
  min-width: 0;
  padding: clamp(16px, 3vw, 22px);
  background: #fffdf8;
  border: 1px solid #dbc48b;
  border-bottom: 3px solid #b9913d;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75), 0 8px 18px rgba(74, 52, 15, 0.08);
}

body.tadabur-page .toc-section--wide {
  grid-column: 1 / -1;
}

body.tadabur-page .toc-section h2 {
  margin: 0 0 12px;
  color: #123e36;
  font: 700 clamp(1.35rem, 4vw, 1.9rem) "qpc-hafs", "Alyamama", "Traditional Arabic", serif;
  line-height: 1.45;
}

body.tadabur-page .toc-subtitle {
  margin: -4px 0 12px;
  color: #8a6c2b;
  font-weight: 700;
}

body.tadabur-page .toc-list {
  display: grid;
  gap: 8px;
}

body.tadabur-page .toc-section--wide .toc-list {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

body.tadabur-page .toc-link {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  color: #173f35;
  text-decoration: none;
  background: #fbf1d8;
  border: 1px solid rgba(185, 145, 61, 0.28);
  border-radius: 8px;
  font-weight: 700;
  line-height: 1.7;
  transition: transform 180ms ease, background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

body.tadabur-page .toc-link::before {
  content: "۞";
  flex: 0 0 auto;
  color: #b9913d;
  font-size: .9em;
}

body.tadabur-page .toc-link:hover {
  transform: translateY(-1px);
  color: #fff8e7;
  background: #123e36;
  border-color: #b9913d;
}

body.tadabur-page .toc-link:hover::before {
  color: #d9bd6d;
}

body.tadabur-page .article-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(8px, 2vw, 14px);
  margin: clamp(14px, 3vw, 24px) 0;
}

body.tadabur-page .article-nav a,
body.tadabur-page .article-nav__disabled {
  min-height: 54px;
  display: grid;
  place-items: center;
  padding: 9px 12px;
  text-align: center;
  text-decoration: none;
  border: 1px solid #dbc48b;
  border-bottom: 3px solid #b9913d;
  border-radius: 8px;
  font-weight: 700;
  line-height: 1.5;
}

body.tadabur-page .article-nav a {
  color: #173f35;
  background: #fffdf8;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75), 0 8px 18px rgba(74, 52, 15, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

body.tadabur-page .article-nav a:hover {
  transform: translateY(-2px);
  color: #fff8e7;
  background: #123e36;
  border-color: #b9913d;
  box-shadow: 0 14px 26px rgba(49, 39, 14, 0.14);
}

body.tadabur-page .article-nav__disabled {
  color: #8b8165;
  background: #f1e8d0;
  opacity: .72;
}

body.tadabur-page .tadabur-article {
  padding: clamp(18px, 4vw, 34px);
  color: #173f35;
  background: #fffdf8;
  border: 1px solid #dbc48b;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75), 0 8px 18px rgba(74, 52, 15, 0.08);
  font-size: clamp(1.12rem, 2.8vw, 1.32rem);
  line-height: 2.08;
}

body.tadabur-page .tadabur-article p {
  margin: 0 0 1.05em;
}

body.tadabur-page .tadabur-article p:last-child {
  margin-bottom: 0;
}

body.tadabur-page .tadabur-article strong {
  color: #123e36;
}

body.tadabur-page .tadabur-article sup {
  color: #8a6c2b;
  font-size: .72em;
  line-height: 0;
}

body.tadabur-page .tadabur-article a {
  color: #164d3f;
  font-weight: 700;
}

body.tadabur-page .tadabur-article .article-center {
  text-align: center;
}

body.tadabur-page .ocr-note {
  margin: 0 0 1.2em;
  padding: 10px 12px;
  color: #6c5a2a;
  background: #fbf1d8;
  border: 1px solid rgba(185, 145, 61, 0.35);
  border-radius: 8px;
  font-size: .92em;
  line-height: 1.8;
}

body.tadabur-page .article-footnotes {
  margin-top: clamp(22px, 5vw, 36px);
  padding-top: clamp(16px, 4vw, 24px);
  border-top: 1px solid rgba(185, 145, 61, 0.38);
  font-family: inherit;
  font-size: clamp(.95rem, 2.2vw, 1.05rem);
  font-weight: 400;
  line-height: 1.85;
}

body.tadabur-page .article-footnotes h2 {
  margin: 0 0 10px;
  color: #123e36;
  font-family: inherit;
  font-size: clamp(1.05rem, 2.4vw, 1.2rem);
  font-weight: 700;
  line-height: 1.7;
}

body.tadabur-page .article-footnotes ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

body.tadabur-page .article-footnotes li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .45em;
  margin-bottom: .45em;
}

body.tadabur-page .article-footnotes .footnote-marker {
  direction: ltr;
  unicode-bidi: isolate;
  color: #8a6c2b;
  font-weight: 700;
}

body.tadabur-page .tadabur-article > p > .footnote-marker {
  direction: ltr;
  unicode-bidi: isolate;
  color: #8a6c2b;
  font-weight: 700;
}

body.tadabur-page .article-section-heading {
  margin: clamp(20px, 4vw, 30px) 0 clamp(12px, 3vw, 18px);
  padding: 12px 16px;
  color: #fff8e7;
  text-align: center;
  background: #164d3f;
  border: 1px solid #b9913d;
  border-radius: 8px;
  font-weight: 700;
}

body.tadabur-page .article-section-heading p {
  margin: 0;
}

body.tadabur-page .article-quran-quote,
body.tadabur-page .article-narration,
body.tadabur-page .article-poetry {
  font-weight: 700;
}

body.tadabur-page .article-quran-quote {
  color: #8f2520;
}

body.tadabur-page .article-narration {
  color: #205c8f;
}

body.tadabur-page .article-poetry {
  color: #2d6b4f;
}

@media (max-width: 640px) {
  body.tadabur-page .tadabur-shell {
    width: 100%;
    margin: 0 auto;
  }

  body.tadabur-page .tadabur-panel {
    border-inline: 0;
    border-radius: 0;
    padding: 14px 12px 18px;
  }

  body.tadabur-page .reader-menu {
    grid-template-columns: 1fr;
  }

  body.tadabur-page .tadabur-heading {
    margin-top: 14px;
  }

  body.tadabur-page .tadabur-book {
    align-items: flex-start;
  }

  body.tadabur-page .tadabur-toc,
  body.tadabur-page .toc-section--wide .toc-list {
    grid-template-columns: 1fr;
  }

  body.tadabur-page .article-nav {
    grid-template-columns: 1fr;
  }

  body.tadabur-page .tadabur-article {
    padding: 16px 14px;
  }
}
