/* Preserve the source drawer's type proportions at a larger, responsive reading size. */
.full-hadith-page.ism-article-page {
  --ism-reading-size: clamp(15px, calc(8.75px + 1.25vw), 18.75px);
  --ism-reading-unit: calc(var(--ism-reading-size) / 15);
  --ism-hadith-spacing: calc(28 * var(--ism-reading-unit));
  --measure: min(750px, calc(100% - 48px));
  --ism-reading: "Saner Uthman Arabic Reading Text 18", "UthmanTN ScreenText EnglishClarity SafeMarks", "UthmanTNB", serif;
  --ism-rule: #eee9e1;
  --narrator-panel-width: 520px;
}

.ism-article-page .narrator-profile-panel__scroll {
  position: relative;
}

.ism-article-page .narrator-menu-toggle {
  font-family: "Uthman Author ExtraBold", "Saner Uthman Arabic Calm Screen", serif;
  font-size: 15px;
  font-weight: 800;
}

.ism-article-page .narrator-profile-panel__brand {
  block-size: 17.52px;
  display: block;
  inline-size: auto;
  inset-block-start: calc(25.24px + env(safe-area-inset-top, 0px));
  inset-inline-start: var(--narrator-panel-gutter);
  opacity: 1;
  pointer-events: none;
  position: absolute;
  transition: opacity .18s ease, visibility 0s;
  user-select: none;
  visibility: visible;
}

/* Reveal with the unframed controls as soon as the drawer reaches its scroll origin. */
.ism-article-page .narrator-profile-panel__brand:has(+ .narrator-compact-toolbar:not(.is-at-top)),
.ism-article-page .narrator-profile-panel__brand:has(+ .narrator-compact-toolbar.is-close-hidden),
.ism-article-page .narrator-profile-panel__brand:has(+ .narrator-compact-toolbar.is-menu-open) {
  opacity: 0;
  transition: opacity .18s ease, visibility 0s linear .18s;
  visibility: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .ism-article-page .narrator-profile-panel .narrator-profile-panel__scroll > .narrator-profile-panel__brand {
    transition: none;
  }
}

.ism-article-page .takhrij-graph-modal-close {
  top: 0;
  background: transparent;
}

.full-hadith-page.ism-article-page .fiqh-heading {
  margin: 0 0 calc(8 * var(--ism-reading-unit));
  color: #363636;
  font-family: var(--first-hadith-display);
  font-size: calc(21 * var(--ism-reading-unit) - 5px);
  font-weight: 400;
  line-height: 1.35;
  text-rendering: optimizeLegibility;
}

.full-hadith-page.ism-article-page :is(
  .topic-title,
  .ism-source-author,
  .takhrij-judgment-title,
  .takhrij-investigations-title,
  .primary-reference-title,
  .takhrij-variant-title
) {
  color: #2d2518;
  font-family: var(--author);
  font-size: calc(16 * var(--ism-reading-unit));
  font-weight: 800;
  line-height: 1.55;
  font-synthesis: none;
}

.full-hadith-page.ism-article-page :is(
  .primary-hadith-text,
  .commentary-text,
  .takhrij-judgment-text,
  .takhrij-variant-text,
  .takhrij-critic-text
) {
  margin: 0;
  color: #3f3931;
  font-family: var(--ism-reading);
  font-size: calc(15 * var(--ism-reading-unit));
  font-weight: 500;
  line-height: 2.2;
  word-spacing: .09em;
  white-space: pre-line;
  overflow-wrap: anywhere;
  text-wrap: pretty;
  user-select: text;
}

@media screen and (min-width: 761px) {
  .full-hadith-page.ism-main-article #primary-hadith .primary-hadith-text {
    font-size: 18.25px;
  }
}

.full-hadith-page.ism-article-page .takhrij-judgment-text {
  font-size: calc(13 * var(--ism-reading-unit));
}

.ism-article-page .takhrij-judgment-body {
  padding-block-end: calc(20 * var(--ism-reading-unit));
  border-block-end: 1px solid var(--ism-rule);
}

.ism-article-page .takhrij-judgment-text + .takhrij-judgment-text {
  margin-block-start: 4px;
}

.ism-article-page :is(.commentary-text, .takhrij-variant-text) + :is(.commentary-text, .takhrij-variant-text) {
  margin-block-start: calc(10 * var(--ism-reading-unit));
}

.ism-article-page .takhrij-variant-text + .takhrij-variant-text {
  margin-block-start: 4px;
}

.full-hadith-page.ism-article-page :is(
  .primary-hadith-book,
  .ism-source-book
) {
  margin: calc(1 * var(--ism-reading-unit)) 0 calc(10 * var(--ism-reading-unit));
  color: #928a80;
  font-family: var(--source);
  font-size: calc(12.5 * var(--ism-reading-unit));
  font-weight: 500;
  line-height: 1.55;
  word-spacing: .04em;
}

.ism-article-page .primary-hadith-card {
  margin-block-start: calc(24 * var(--ism-reading-unit));
}

.ism-article-page .primary-hadith-byline {
  margin: 0 0 var(--ism-hadith-spacing);
  padding: 0 0 calc(12 * var(--ism-reading-unit));
  border: 0;
  border-block-end: 1px solid var(--ism-rule);
}

.full-hadith-page.ism-article-page .primary-hadith-byline-title {
  margin: 0;
  color: #2d2518;
  font-family: var(--author);
  font-size: calc(14 * var(--ism-reading-unit) - 2px);
  font-weight: 800;
  line-height: 1.55;
  font-synthesis: none;
}

.ism-article-page .primary-hadith-bio {
  margin: calc(5 * var(--ism-reading-unit)) 0 0;
  color: #3f3931;
  font-family: var(--ism-reading);
  font-size: calc(13 * var(--ism-reading-unit) - 2px);
  font-weight: 500;
  line-height: 2;
  word-spacing: .09em;
  text-wrap: pretty;
}

.ism-article-page .primary-hadith-bio-reference {
  margin: calc(5 * var(--ism-reading-unit)) 0 0;
  color: #81796f;
  font-family: var(--source);
  font-size: calc(11.5 * var(--ism-reading-unit));
  font-weight: 500;
  line-height: 1.8;
  word-spacing: .04em;
  text-wrap: pretty;
}

.ism-article-page .paired-hadith-quote {
  inline-size: 100%;
  padding: 0;
  border: 0;
}

.ism-article-page .paired-hadith-quote > .primary-hadith-text {
  inline-size: 100%;
}

.ism-article-page .ism-source-author {
  margin: 0;
}

.ism-article-page .commentary-row {
  margin: 0 0 calc(22 * var(--ism-reading-unit));
  padding: 0 0 calc(20 * var(--ism-reading-unit));
  border-block-end: 1px solid var(--ism-rule);
}

.ism-article-page .comment-divider {
  display: none;
}

.ism-article-page .topic-section + .topic-section {
  margin-block-start: calc(28 * var(--ism-reading-unit));
}

.ism-article-page .topic-title {
  margin: 0 0 calc(18 * var(--ism-reading-unit));
}

/* The fiqh discussion follows the same reading rhythm as the transmission study. */
.ism-article-page .ism-fiqh-document .topic-section {
  padding: 0;
  border: 0;
}

.ism-article-page .ism-fiqh-document .topic-title {
  margin: 0 0 8px;
}

.full-hadith-page.ism-article-page .ism-fiqh-document .commentary-text {
  font-size: calc(15 * var(--ism-reading-unit) - 1px);
}

.ism-article-page .ism-fiqh-document .commentary-text + .commentary-text {
  margin-block-start: 4px;
}

.ism-article-page .ism-fiqh-references {
  margin-block-start: calc(24 * var(--ism-reading-unit));
  padding: 0;
  border: 0;
}

.ism-article-page .ism-fiqh-references .primary-reference-title {
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  font-size: calc(16 * var(--ism-reading-unit) - 3px);
}

.ism-article-page .ism-fiqh-references .primary-reference-source {
  margin: 0;
}

.ism-article-page .ism-fiqh-references .primary-reference-source + .primary-reference-source {
  margin-block-start: 6px;
}

.ism-article-page .source-note {
  inline-size: 100%;
  max-inline-size: none;
  margin: calc(12 * var(--ism-reading-unit)) 0 0;
  padding: 0;
  border: 0;
  text-align: right;
}

.full-hadith-page.ism-article-page :is(
  .source-reference,
  .primary-hadith-reference,
  .primary-reference-source,
  .takhrij-row-reference
) {
  color: #81796f;
  font-family: var(--source);
  font-size: calc(12.75 * var(--ism-reading-unit));
  font-weight: 500;
  line-height: 1.8;
  word-spacing: .04em;
  overflow-wrap: anywhere;
  text-wrap: pretty;
  user-select: text;
}

.ism-article-page .primary-hadith-reference {
  margin: calc(12 * var(--ism-reading-unit)) 0 0;
}

.ism-article-page .source-note .source-reference {
  margin: 0 !important;
}

.ism-article-page :is(.ism-editorial-note, .takhrij-source-clarification) {
  margin: calc(12 * var(--ism-reading-unit)) 0 0;
  padding: calc(10 * var(--ism-reading-unit)) 0 0;
  border: 0;
  border-block-start: 1px solid var(--ism-rule);
}

.full-hadith-page.ism-article-page :is(
  .ism-editorial-note p,
  .takhrij-source-clarification,
  .primary-hadith-byline-note
) {
  margin: 0;
  color: #776f65;
  font-family: var(--source);
  font-size: calc(13 * var(--ism-reading-unit));
  font-weight: 500;
  line-height: 1.8;
  word-spacing: .04em;
  overflow-wrap: anywhere;
  text-wrap: pretty;
  user-select: text;
}

.ism-article-page .ism-editorial-note p + p {
  margin-block-start: calc(10 * var(--ism-reading-unit));
}

.full-hadith-page.ism-article-page .takhrij-source-clarification {
  margin-block-start: calc(12 * var(--ism-reading-unit));
}

.ism-article-page .takhrij-row-references {
  margin-block-start: calc(12 * var(--ism-reading-unit));
  padding: 0;
  border: 0;
}

.ism-article-page .takhrij-row-references-title {
  display: none;
}

.ism-article-page .takhrij-variant + .takhrij-variant {
  border-block-start: 0;
}

.full-hadith-page.ism-article-page .takhrij-investigations-title {
  margin: calc(24 * var(--ism-reading-unit)) 0 calc(8 * var(--ism-reading-unit));
  color: #a12c2c;
  font-size: calc(13 * var(--ism-reading-unit));
}

.ism-article-page .takhrij-variants {
  border-block: 0;
}

.ism-article-page .takhrij-variants .takhrij-variant {
  padding-block: calc(14 * var(--ism-reading-unit));
}

.ism-article-page .takhrij-variants .takhrij-variant:first-child {
  padding-block-start: 0;
}

.ism-article-page .takhrij-variants .takhrij-variant:last-child {
  padding-block-end: 0;
}

.ism-article-page .takhrij-variants .takhrij-variant-title {
  margin: 0 0 8px;
}

.ism-article-page .takhrij-variants .takhrij-variant-body {
  padding: 0;
}

.full-hadith-page.ism-article-page .takhrij-variant-text {
  font-size: calc(15 * var(--ism-reading-unit) - 1px);
}

html.ism-wording-animating {
  overflow-anchor: none;
  scroll-behavior: auto !important;
}

.ism-article-page .ism-wording-more {
  display: flow-root;
  margin-block-start: 4px;
}

.ism-article-page :is(.ism-wording-more__toggle, .ism-wording-more__close) {
  display: table;
  box-sizing: border-box;
  max-inline-size: 100%;
  min-block-size: 38px;
  margin: 14px auto 0;
  padding: 6px 16px;
  border: 0;
  border-radius: 3px;
  background: #f1f1f1;
  color: #555;
  font-family: var(--source);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.8;
  text-align: center;
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}

.ism-article-page .ism-wording-more__toggle::-webkit-details-marker {
  display: none;
}

.ism-article-page #wording-more > summary {
  inline-size: 108px;
  padding: 12px 20px 10px;
  font-family: var(--author);
  font-size: 14px;
  font-weight: 800;
  font-synthesis: none;
  line-height: 1.2;
  white-space: nowrap;
}

.ism-article-page .ism-wording-more__toggle::marker {
  content: "";
}

.ism-article-page :is(.ism-wording-more__toggle, .ism-wording-more__close):focus-visible {
  outline: 2px solid #326891;
  outline-offset: 3px;
}

.ism-article-page .ism-wording-more__body:focus {
  outline: none;
}

.ism-article-page .ism-wording-more__close[hidden],
.ism-article-page .ism-wording-more.is-enhanced[open] > summary {
  display: none;
}

/* Measure the folded control synchronously, including after a viewport change. */
.ism-article-page .ism-wording-more.is-enhanced.is-measuring > summary {
  display: table;
}

.ism-article-page .ism-wording-more.is-measuring > .ism-wording-more__body {
  display: none;
}

@media (hover: hover) {
  .ism-article-page :is(.ism-wording-more__toggle, .ism-wording-more__close):hover {
    background: #e8e8e8;
    color: #333;
  }
}

@media (pointer: coarse) {
  .ism-article-page :is(.ism-wording-more__toggle, .ism-wording-more__close) {
    min-block-size: 44px;
  }
}

@media print {
  .ism-article-page .ism-wording-more {
    height: auto !important;
    overflow: visible !important;
  }

  .ism-article-page .ism-wording-more::details-content {
    display: contents;
    content-visibility: visible;
  }

  .ism-article-page :is(.ism-wording-more__toggle, .ism-wording-more__close) {
    display: none !important;
  }
}

.ism-article-page :is(.takhrij-judgment-title, .primary-reference-title) {
  inline-size: 100%;
  border-color: var(--ism-rule);
}

.ism-article-page .primary-reference {
  margin-block-start: calc(24 * var(--ism-reading-unit));
  padding-block-end: calc(16 * var(--ism-reading-unit));
  border-block-end: 1px solid var(--ism-rule);
}

.ism-article-page .primary-reference .primary-reference-title {
  padding-block-start: 0;
  font-size: calc(16 * var(--ism-reading-unit) - 3px);
}

.ism-article-page .primary-reference-source + .primary-reference-source {
  margin-block-start: 6px;
}

.ism-article-page :is(#references-more, #fiqh-references-more) :is(.ism-wording-more__toggle, .ism-wording-more__close) {
  margin-inline-start: 0;
  margin-inline-end: auto;
  padding-inline: 0;
  border-radius: 0;
  background: transparent;
  color: #326891;
  text-align: right;
}

.ism-article-page .primary-reference-book {
  color: #3f3931;
  font-weight: 700;
}

.ism-article-page .fiqh-intro-divider {
  block-size: 2px;
  margin-block: calc(28 * var(--ism-reading-unit)) calc(20 * var(--ism-reading-unit));
  background: #121212;
}

.ism-article-page .fiqh-source {
  margin-block: calc(14 * var(--ism-reading-unit)) calc(30 * var(--ism-reading-unit));
}

.ism-article-page .takhrij-section {
  margin-block: var(--ism-hadith-spacing) calc(28 * var(--ism-reading-unit));
}

.ism-article-page :is(.takhrij-judgment-title, .primary-reference-title) {
  padding-block-start: calc(20 * var(--ism-reading-unit));
}

/* Keep the assessment and its qualifications together on a quiet editorial surface. */
.ism-article-page .takhrij-judgment-panel {
  margin-inline: -24px;
  padding: 40px 48px;
  background: #f7f7f6;
}

.ism-article-page .takhrij-judgment-scholars {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-block-end: 20px;
}

.ism-article-page .takhrij-judgment-scholar-names {
  margin: 0;
  min-inline-size: 0;
  color: #736c64;
  font-family: var(--source);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.8;
  text-wrap: wrap;
}

.ism-article-page .takhrij-judgment-panel .takhrij-judgment-title {
  margin: 0 0 14px;
  padding: 0;
  border: 0;
}

.ism-article-page .takhrij-judgment-logo {
  display: block;
  inline-size: 40px;
  block-size: 40px;
  flex: 0 0 40px;
}

.ism-article-page .takhrij-judgment-panel .takhrij-judgment-body {
  padding: 0;
  border: 0;
}

.ism-article-page .takhrij-variant-status,
.ism-article-page .fiqh-source .fiqh-source-sub {
  font-size: calc(11.5 * var(--ism-reading-unit));
}

.ism-article-page .fiqh-source-main {
  font-size: calc(12.5 * var(--ism-reading-unit));
}

.ism-article-page .takhrij-trigger {
  inline-size: 100%;
  block-size: 36px;
  min-block-size: 36px;
  padding: 0 16px;
}

.ism-article-page .ism-takhrij-share {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px 10px;
  inline-size: 100%;
  margin: 28px auto 0;
}

.ism-article-page .ism-share-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  max-inline-size: 100%;
  min-block-size: 32px;
  padding: 4px 12px;
  border: 1px solid #dedbd7;
  border-radius: 999px;
  background: #fff;
  color: #55504b;
  font-family: var(--source);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
  appearance: none;
}

.ism-article-page .ism-share-pill:hover {
  background: #faf9f7;
}

.ism-article-page .ism-share-pill:focus-visible {
  outline: 2px solid #567b95;
  outline-offset: 3px;
}

.ism-article-page .ism-share-pill-icon {
  flex: none;
  inline-size: 22px;
  block-size: 22px;
}

.ism-article-page .ism-copy-pill .ism-share-pill-icon {
  inline-size: 18px;
  block-size: 18px;
}

.ism-article-page .ism-takhrij-share-status {
  color: #776f65;
  font-family: var(--source);
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 760px) {
  .full-hadith-page.ism-article-page {
    --measure: min(750px, calc(100% - 36px));
  }

  .full-hadith-page.ism-article-page .fiqh-heading {
    font-size: calc(20 * var(--ism-reading-unit) - 5px);
  }

  .ism-article-page .hadith-content {
    padding-block-start: 28px;
  }

  .ism-article-page .takhrij-variant-summary {
    column-gap: 8px;
  }

  .ism-article-page .takhrij-judgment-panel {
    margin-inline: -12px;
    padding: 32px 12px;
  }

  .ism-article-page .takhrij-judgment-logo {
    inline-size: 36px;
    block-size: 36px;
    flex-basis: 36px;
  }
}

/* Article-only phone typography; narrator drawers retain their own scale. */
@media screen and (max-width: 760px) {
  body.full-hadith-page:is(.ism-main-article, .muhjan-article-page)
    .hadith-content {
    --ism-mobile-prose-size: clamp(16px, calc(16px + (100vw - 375px) / 53), 17px);
  }

  body.full-hadith-page:is(.ism-main-article, .muhjan-article-page)
    .hadith-content .primary-hadith-text,
  body.full-hadith-page:is(.ism-main-article, .muhjan-article-page)
    .hadith-content .takhrij-variant-text,
  body.full-hadith-page:is(.ism-main-article, .muhjan-article-page)
    .hadith-content .ism-fiqh-document .commentary-text {
    font-size: var(--ism-mobile-prose-size);
  }

  body.full-hadith-page:is(.ism-main-article, .muhjan-article-page)
    .hadith-content .takhrij-judgment-text {
    font-size: max(16px, calc(var(--ism-mobile-prose-size) - .75px));
  }

  /* Preserve the original source-introduction proportions: 12 / 15 and 11 / 15. */
  body.full-hadith-page:is(.ism-main-article, .muhjan-article-page)
    .hadith-content .primary-hadith-byline-title {
    font-size: calc(var(--ism-mobile-prose-size) * 12 / 15);
  }

  body.full-hadith-page:is(.ism-main-article, .muhjan-article-page)
    .hadith-content .primary-hadith-bio {
    font-size: calc(var(--ism-mobile-prose-size) * 11 / 15);
  }

  body.full-hadith-page:is(.ism-main-article, .muhjan-article-page)
    .hadith-content :is(.takhrij-judgment-title, .takhrij-investigations-title, .fiqh-heading) {
    font-size: 19px;
  }

  body.full-hadith-page:is(.ism-main-article, .muhjan-article-page)
    .hadith-content .takhrij-variant-title,
  body.full-hadith-page:is(.ism-main-article, .muhjan-article-page)
    .hadith-content .ism-fiqh-document .topic-title {
    font-size: 18px;
  }

  body.full-hadith-page:is(.ism-main-article, .muhjan-article-page)
    .hadith-content :is(
      .source-reference,
      .primary-hadith-reference,
      .primary-reference-source,
      .takhrij-row-reference
    ) {
    font-size: 13.5px;
  }

  body.full-hadith-page:is(.ism-main-article, .muhjan-article-page)
    .hadith-content .takhrij-judgment-text + .takhrij-judgment-text,
  body.full-hadith-page:is(.ism-main-article, .muhjan-article-page)
    .hadith-content .takhrij-variant-text + .takhrij-variant-text,
  body.full-hadith-page:is(.ism-main-article, .muhjan-article-page)
    .hadith-content .ism-fiqh-document .commentary-text + .commentary-text,
  body.full-hadith-page:is(.ism-main-article, .muhjan-article-page)
    .hadith-content .ism-wording-more {
    margin-block-start: 8px;
  }

  body.full-hadith-page:is(.ism-main-article, .muhjan-article-page)
    .hadith-content :is(
      .primary-hadith-text,
      .primary-hadith-bio,
      .commentary-text,
      .takhrij-judgment-text,
      .takhrij-variant-text,
      .takhrij-critic-text
    ) {
    text-wrap: wrap;
  }
}

/* The article masthead and audio controls follow the shared article template. */
.ism-article-page .audio-strip-block {
  position: relative;
}

.ism-article-page .audio-actions-wrap {
  flex-basis: auto;
  gap: 16px;
}

.full-hadith-page.ism-article-page .audio-action-link--share {
  inline-size: auto;
  gap: 6px;
}

.full-hadith-page.ism-article-page .audio-action-link--copy {
  inline-size: auto;
  gap: 6px;
}

.ism-article-page .ism-copy-icon {
  inline-size: 32px;
  block-size: 32px;
  flex: none;
  transform: translateY(-6px);
}

.ism-article-page :is(.ism-share-label, .ism-copy-label) {
  color: #363636;
  font-family: var(--source);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
  transform: translateY(-6px);
}

.ism-article-page .audio-action-link:focus-visible {
  outline: 2px solid #567b95;
  outline-offset: 3px;
  border-radius: 2px;
}

.ism-article-page .ism-strip-status {
  position: absolute;
  inset-inline-end: 0;
  inset-block-end: 4px;
  color: #776f65;
  font-family: var(--source);
  font-size: 12px;
  line-height: 1.5;
}

@media (min-width: 641px) {
  .ism-article-page :is(.audio-strip, .css-b8gc4a, .css-1xny6fl, .audio-action-link) {
    min-block-size: 84px;
    block-size: 84px;
  }

  .ism-article-page .css-1xny6fl {
    inline-size: 40px;
    flex-basis: 40px;
  }

  .ism-article-page :is(.css-1xny6fl svg, .audio-action-img) {
    inline-size: 32px;
    block-size: 32px;
  }

  .ism-article-page :is(.play-text, .ism-share-label, .ism-copy-label) {
    font-size: 15px;
  }

  .ism-article-page :is(.audio-action-link--share, .audio-action-link--copy) {
    flex-direction: row-reverse;
  }
}

@media (max-width: 640px) {
  .full-hadith-page.ism-article-page .audio-strip .css-79elbk .audio-actions-wrap {
    grid-column: 1 / -1;
    inline-size: auto;
    gap: 20px;
  }

  .full-hadith-page.ism-article-page .audio-action-link--copy {
    block-size: 32px;
  }

  .ism-article-page .audio-action-img {
    margin-inline-end: 0;
  }

  .ism-article-page :is(.ism-share-label, .ism-copy-label, .ism-copy-icon) {
    transform: none;
  }
}

.ism-article-page .primary-hadith-text .ism-narrator-name {
  color: #326891;
}

.ism-article-page .primary-hadith-text a.ism-narrator-name:hover {
  color: #234e70;
}

/* Inline references remain distinct without interrupting Arabic letterforms. */
.ism-article-page :is(.commentary-text, .takhrij-judgment-text, .takhrij-variant-text) a {
  color: #326891;
  text-decoration: none;
  border: 0;
}

.ism-article-page :is(.commentary-text, .takhrij-judgment-text, .takhrij-variant-text) a:hover {
  color: #234e70;
  text-decoration: none;
}

.ism-article-page :is(.commentary-text, .takhrij-judgment-text, .takhrij-variant-text) a:focus-visible {
  outline: 2px solid #326891;
  outline-offset: 3px;
}

/* Keep the main study's editorial closing quieter than its book references. */
body.ism-article-page:not(.ism-related-study).site-endmatter-ready
  .site-endmatter__closing.article-closing {
  margin-block-start: 24px;
}

body.ism-article-page:not(.ism-related-study).site-endmatter-ready
  .site-endmatter__closing.article-closing .article-end-colophon {
  border-block-start: 1px solid var(--ism-rule);
  padding-block-start: 20px;
  font-size: 11.5px;
}

body.ism-article-page:not(.ism-related-study).site-endmatter-ready
  .site-endmatter__closing.article-closing .article-end-colophon strong {
  font-size: 12px;
}

body.ism-article-page:not(.ism-related-study).site-endmatter-ready
  .site-endmatter__closing.article-closing .article-end-colophon a {
  font-size: 11px;
}

@media screen and (min-width: 761px) {
  body.ism-article-page:not(.ism-related-study).site-endmatter-ready
    .site-endmatter__closing.article-closing {
    margin-inline-start: calc((100% - var(--measure)) / 2);
    margin-inline-end: auto;
  }
}

/* Related reading and a short selection from other subjects. */
body.site-endmatter-ready .site-endmatter__discovery.ism-discovery {
  --site-endmatter-rule-strong: #121212;
}

body.site-endmatter-ready .site-endmatter__discovery.ism-discovery .discovery-popular-title {
  border-block-end: 1px solid var(--site-endmatter-rule);
}

@media (min-width: 901px) {
  body.site-endmatter-ready .site-endmatter__discovery.ism-discovery .discovery-layout {
    grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
    gap: 32px;
  }

  body.site-endmatter-ready .site-endmatter__discovery.ism-discovery
    .reading-card--tafsir .reading-card-summary {
    max-inline-size: 90%;
    align-self: flex-start;
  }
}

@media (max-width: 760px) {
  body.site-endmatter-ready .site-endmatter__discovery.ism-discovery .discovery-popular {
    padding: 12px 0 0;
    border-block-start: 1px solid var(--site-endmatter-rule-strong);
  }

  body.site-endmatter-ready .site-endmatter__discovery.ism-discovery .discovery-popular::before {
    content: none;
  }

  body.site-endmatter-ready .site-endmatter__discovery.ism-discovery .discovery-popular-title {
    border-block-end: 0;
  }

  body.site-endmatter-ready .site-endmatter__discovery.ism-discovery .discovery-popular-list li + li {
    border-block-start: 0;
  }
}
