.sources-page {
  width: min(940px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 50px;
  color: #17251f;
}

.aalim-legal-page-host { min-height: 55vh; }
.legal-page-loading { padding: 48px 20px; text-align: center; color: #607068; }
.legal-copy-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.copyright-hero { background: radial-gradient(circle at 88% 18%, rgba(216, 177, 81, .3), transparent 30%), linear-gradient(135deg, #17372c, #315e49); }
.sources-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid #dbe5df;
}

.sources-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #173f30;
  text-decoration: none;
}

.sources-brand span {
  font-family: var(--font-urdu, serif);
  font-size: 32px;
  line-height: 1;
}

.sources-brand strong { font-size: 14px; letter-spacing: .02em; }

.sources-top-actions { display: flex; gap: 8px; }

.sources-top-actions a,
.sources-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #246b50;
  border-radius: 10px;
  color: #18543d;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.sources-hero {
  position: relative;
  overflow: hidden;
  margin: 34px 0 20px;
  padding: 38px 40px;
  border-radius: 22px;
  color: #f8fffb;
  background:
    radial-gradient(circle at 88% 18%, rgba(216, 177, 81, .28), transparent 30%),
    linear-gradient(135deg, #123f30, #216d50);
  box-shadow: 0 18px 44px rgba(18, 63, 48, .15);
}

.sources-hero::after {
  content: "ع";
  position: absolute;
  inset-inline-end: 32px;
  bottom: -40px;
  color: rgba(255, 255, 255, .07);
  font-family: var(--font-urdu, serif);
  font-size: 180px;
  line-height: 1;
}

.sources-eyebrow {
  margin: 0 0 8px;
  color: #efd797;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.sources-hero h1 { position: relative; z-index: 1; margin: 0; font-size: clamp(32px, 5vw, 50px); }
.sources-hero p:last-child { position: relative; z-index: 1; max-width: 700px; margin: 12px 0 0; color: #e7f2ec; line-height: 1.75; }

.sources-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

.source-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  padding: 23px;
  border: 1px solid #dbe5df;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(27, 66, 50, .055);
}

.source-card-featured { grid-column: 1 / -1; border-color: #b9d2c5; background: linear-gradient(135deg, #fff, #f4faf6); }
.source-number { color: #b27a20; font-size: 12px; font-weight: 900; letter-spacing: .08em; }
.source-card h2 { margin: 0 0 9px; color: #173f30; font-size: 18px; }
.source-card p { margin: 0; color: #55635d; font-size: 14px; line-height: 1.7; }
.source-card .source-credit { margin-bottom: 7px; color: #195b42; font-weight: 800; }
.source-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 17px; }
.sources-link { min-height: 34px; padding: 0 11px; border-color: #c7d9d0; background: #f6faf8; font-size: 12px; }
.sources-link:hover, .sources-top-actions a:hover { background: #e8f3ed; }

.sources-note {
  margin: 18px 0 0;
  padding: 13px 16px;
  border-inline-start: 3px solid #c28a2d;
  border-radius: 8px;
  color: #66736d;
  background: #fffaf0;
  font-size: 12px;
  line-height: 1.65;
}

.aalim-sources-footer-link {
  display: flex;
  justify-content: center;
  margin: -12px auto 28px;
  padding: 0 16px;
}

.aalim-sources-footer-link a { color: #315e49; font-size: 12px; font-weight: 800; text-underline-offset: 3px; }

/* Source records remain in content metadata; learner screens use the central Sources page. */
.challenge-citation-panel,
.qac-source-attribution { display: none !important; }

html[lang="ur"] .sources-page { font-family: var(--font-urdu, inherit); }
html[lang="ur"] .sources-hero p:last-child,
html[lang="ur"] .source-card p,
html[lang="ur"] .sources-note { line-height: 2; }

@media (max-width: 680px) {
  .sources-page { width: min(100% - 20px, 940px); padding-top: 12px; }
  .sources-brand strong { display: none; }
  .sources-hero { margin-top: 20px; padding: 28px 22px; border-radius: 17px; }
  .sources-hero::after { inset-inline-end: 8px; font-size: 130px; }
  .sources-grid { grid-template-columns: 1fr; }
  .legal-copy-grid { grid-template-columns: 1fr; }
  .source-card-featured { grid-column: auto; }
  .source-card { grid-template-columns: 32px minmax(0, 1fr); gap: 8px; padding: 18px 15px; }
  .source-actions { display: grid; grid-template-columns: 1fr; }
  .sources-link { width: 100%; }
}
