/* Sources and credits: each source as a ruled row (the shared .rows), with its terms set out beneath it. */

.page-hero.plain .lede { max-width: 36em; }

.cr-body { padding: 24px 0 112px; }
.cr-main { min-width: 0; container-type: inline-size; }
.cr-intro { margin-bottom: 64px; max-width: 46em; }
.nw { white-space: nowrap; }

/* One group of sources: the Quran, recitation, adhkar and so on */
.cr-group + .cr-group { margin-top: 88px; }
.cr-group > .label { display: block; }
.cr-group h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; margin-top: 12px; scroll-margin-top: 96px; }
.cr-group h2 + p { margin-top: 14px; font-size: 17.5px; color: var(--muted); max-width: 36em; }
.cr-group .rows { margin-top: 30px; }

/* The source's name sits where .rows puts its term */
.rows > li > h3.term { font-family: var(--display); font-weight: 400; letter-spacing: 0.1em; font-size: 14px; line-height: 1.45; padding-top: 3px; text-transform: none; }
.rows > li { scroll-margin-top: 96px; }
.cr-item { display: grid; gap: 10px; min-width: 0; }
.rows > li .cr-item p.who { color: var(--ink); font-size: 17.5px; line-height: 1.5; }
.cr-item p.who strong { font-weight: 600; }
.cr-item a { overflow-wrap: anywhere; }
.cr-item a:hover { text-decoration-thickness: 2px; }
.cr-item cite { font-style: italic; }

/* Licence, what changed, where it is used */
.terms { margin: 6px 0 0; display: grid; gap: 0; border-top: 1px dashed var(--line); }
.terms > div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 4px 16px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.terms dt { font-family: var(--display); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); padding-top: 4px; }
.terms dd { margin: 0; font-size: 15.5px; line-height: 1.55; color: var(--ink); min-width: 0; }
.terms dd p + p { margin-top: 6px; }
.rows > li .terms dd p { color: var(--ink); }
.rows > li .terms dd p.copyline { color: var(--muted); }
.terms dd .quiet { color: var(--muted); }
/* Where Khalis changed something, the row is set in brass so it is easy to find; the words say it too. */
.terms > div.changed { background: var(--brass-soft); border-bottom-color: transparent; border-radius: 12px; padding: 12px 14px; margin: 8px 0 2px; }
.terms > div.changed dt { color: var(--brass); }

/* "Used in": small links to the part of the app, each with its hour's dot */
.used { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.used a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 500; }
.used a::before { content: ''; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent); }
.used a:hover { text-decoration: underline; text-decoration-color: var(--gold); }

/* The six reciters, named */
.reciters { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.reciters li { border: 1px solid var(--line); background: var(--sheet); border-radius: 999px; padding: 5px 14px; font-size: 14.5px; font-weight: 500; color: var(--ink); }
.reciters li.hl { border-color: var(--gold); }
.reciters li.hl::after { content: ' · words highlighted'; font-weight: 400; color: var(--muted); }

/* Copyright lines, word for word */
.copyline { font-size: 14px; color: var(--muted); overflow-wrap: break-word; }
.fontlic { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.fontlic li { display: grid; gap: 1px; }
.fontlic .copyline { display: block; }

/* This website: the same rows, on the sheet */
.cr-site { margin-top: 30px; background: var(--sheet); border: 1px solid var(--line); border-radius: 28px; padding: 14px 40px; }
.cr-group .cr-site .rows { margin-top: 0; border-top: 0; }
.cr-site .rows > li:last-child { border-bottom: 0; }
.cr-site .rows > li .cr-item p.who { font-size: 17px; }
.cr-site .reciters li { background: var(--bg); }

/* Tanzil's notice, kept as it is written: its own line breaks on wider screens, reflowed on a phone */
.cr-notice { margin: 28px 0 0; }
.notice-text {
  padding: 26px 28px; background: var(--deep); color: var(--on-deep); border-radius: 22px;
  font: 400 13.5px/1.6 ui-monospace, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
}
.notice-text > * { margin: 1.6em 0 0; }
.notice-text > :first-child, .notice-text > .tight { margin-top: 0; }
.notice-text p, .notice-text li { white-space: pre-line; }
.notice-text .in { padding-left: 2ch; }
.notice-text ul { list-style: none; }
.notice-text li { padding-left: 2ch; text-indent: -2ch; }
.notice-text li + li { margin-top: 1.6em; }
/* The rules of = and - are cut to the box's width, so they never wrap. */
.notice-text .rule { overflow: hidden; white-space: pre; opacity: 0.55; }
.cr-notice figcaption { margin-top: 12px; font-size: 14px; color: var(--muted); }

.cr-thanks { margin-top: 88px; display: grid; gap: 16px; max-width: 760px; }
.cr-thanks p.big { font-family: var(--display); font-size: clamp(22px, 2.4vw, 28px); line-height: 1.3; letter-spacing: 0.02em; color: var(--ink); }
.cr-thanks p { color: var(--muted); }

@media (max-width: 920px) {
  .cr-body { padding-top: 0; }
  .toc ol { display: flex; flex-wrap: wrap; gap: 8px; border-left: 0; }
  .toc a { padding: 6px 14px; margin: 0; border: 1px solid var(--line); border-radius: 999px; background: var(--sheet); color: var(--ink); font-size: 14px; }
  .toc a:hover { border-color: var(--gold); }
}
@media (max-width: 640px) {
  .cr-site { padding: 26px 18px 18px; border-radius: 22px; }
  .cr-group + .cr-group, .cr-thanks { margin-top: 64px; }
  .notice-text { padding: 20px 18px; font-size: 12.5px; border-radius: 18px; }
  .notice-text p, .notice-text li { white-space: normal; }
  .notice-text p.lines { white-space: pre-line; }
  .notice-text .in { padding-left: 0; }
}
@media (max-width: 560px) {
  .terms > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .terms dt { padding-top: 0; }
  .cr-intro { margin-bottom: 48px; }
}
.cr-item .quiet { color: var(--muted); font-size: 0.88em; overflow-wrap: anywhere; }

/* When the reading column is narrow (beside the contents list on a small laptop, or on a tablet),
   each source's name sits above its details instead of beside them. */
@container (max-width: 760px) {
  .rows > li { grid-template-columns: minmax(0, 1fr); gap: 8px; }
}
@container (max-width: 820px) {
  .cr-site .rows > li { grid-template-columns: minmax(0, 1fr); gap: 8px; }
}
