@charset "UTF-8";
/* Jinn in Islam — reading styles on top of the shared sakina.css.
   Calm, light-first reading room with a soft lavender accent. */

/* ---------- Header pieces ---------- */
.masthead { display: flex; align-items: center; gap: clamp(12px, 3vw, 32px); min-width: 0; }
.masthead .sk-brand { flex: none; }
.site-nav { display: flex; gap: 4px; }
.edition { white-space: nowrap; }
.reading-progress { position: fixed; inset: 0 0 auto 0; z-index: 60; height: 3px; pointer-events: none; }
.reading-progress span { display: block; height: 100%; width: 0; border-radius: 0 3px 3px 0; background: linear-gradient(90deg, var(--primary), var(--jinn)); transition: width .15s linear; }
.mobile-chapters { display: none; }
.mobile-chapters summary, .mobile-toc summary {
  display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 18px;
  border-radius: 16px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600; list-style: none;
}
.mobile-chapters summary::-webkit-details-marker, .mobile-toc summary::-webkit-details-marker { display: none; }
.mobile-chapters summary::after, .mobile-toc summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3); transform: rotate(45deg) translateY(-3px); transition: transform .3s var(--spring); }
.mobile-chapters[open] summary::after, .mobile-toc[open] summary::after { transform: rotate(225deg) translateY(-3px); }
.mobile-chapters nav { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; }

/* Chapter links (sidebar and mobile list) */
.reading-chapters nav a, .mobile-chapters nav a {
  display: flex; align-items: flex-start; gap: 12px; padding: 9px 12px; border-radius: 14px;
  font-size: 14.5px; line-height: 1.45; color: var(--text-2); transition: background-color .2s, color .2s;
}
.reading-chapters nav a:hover, .mobile-chapters nav a:hover { background: var(--sunk); color: var(--text); }
.reading-chapters nav a[aria-current], .mobile-chapters nav a[aria-current] { background: var(--jinn-soft); color: var(--text); font-weight: 650; }
.chapter-number { width: 22px; flex: none; padding-top: 2px; font-size: 12.5px; font-weight: 700; color: var(--text-3); font-variant-numeric: tabular-nums; }
[aria-current] > .chapter-number { color: var(--jinn); }
.is-read > .chapter-number { color: var(--primary); }
.is-read > span:last-child::after { content: " ✓"; color: var(--primary); font-weight: 700; }

/* ---------- Portal ---------- */
.portal { display: flex; flex-direction: column; }
.portal-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 420px); align-items: center; gap: clamp(32px, 6vw, 80px); padding-top: clamp(28px, 5vw, 64px); }
.portal-hero__text { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.portal-hero h1 { font-size: clamp(44px, 6vw, 78px); max-width: 15ch; }
.portal-hero .sk-lede { margin: 0; max-width: 54ch; }
.portal-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.resume { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; color: var(--text); }
.resume:hover { color: var(--text); }
.resume strong { font-weight: 600; }
.resume svg { color: var(--jinn); }
.portal-art {
  position: relative; margin: 0; min-height: 360px; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 48px 28px 32px; text-align: center; background: var(--jinn-soft); border: 1px solid var(--line);
}
.portal-art::before { content: ""; position: absolute; inset: 0; background-image: var(--pattern-img); background-size: 72px; opacity: .1; }
.portal-art::after { content: ""; position: absolute; inset: 14px; border: 1px solid var(--line-2); border-radius: 999px 999px 18px 18px; }
.portal-art > * { position: relative; z-index: 1; }
.portal-art__star { fill: var(--gold-bright); }
.portal-art blockquote { margin: 0; font-family: var(--font-naskh); font-size: clamp(30px, 3.4vw, 40px); line-height: 1.6; color: var(--text); }
.portal-art figcaption { display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; line-height: 1.5; color: var(--text-2); max-width: 30ch; }
.portal-art figcaption span { font-size: 13px; font-weight: 600; color: var(--jinn); }

.portal-body { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); padding-top: clamp(64px, 9vw, 104px); }
.collection-note { display: flex; flex-direction: column; gap: 14px; align-self: start; position: sticky; top: calc(var(--header-h) + 24px); }
.collection-note p { margin: 0; font-size: 14.5px; color: var(--text-2); }
.large-number { font-family: var(--font-display); font-size: 64px !important; line-height: 1 !important; color: var(--text) !important; }
.large-number span { display: block; margin-top: 6px; font-family: var(--font-ui); font-size: 14px; color: var(--text-3); }
.draft-note { padding: 12px 14px; border-radius: 14px; background: var(--gold-soft); color: var(--text) !important; }
.chapter-list { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.list-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.list-title h2 { font-size: clamp(34px, 4vw, 48px); }
.list-title > span { font-size: 13.5px; color: var(--text-3); }
.chapter-list ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.chapter-row { display: flex; align-items: center; gap: 20px; padding: 18px 22px; color: var(--text); }
.chapter-row:hover { color: var(--text); }
.row-number { font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.chapter-row.is-read .row-number { background: var(--primary-soft); color: var(--primary); }
.chapter-row__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.topic { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--jinn); }
.chapter-row h3 { font-family: var(--font-display); font-weight: 400; font-size: 25px; line-height: 1.15; }
.chapter-row p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--text-2); }
.row-link { color: var(--jinn); }

/* ---------- Reading layout ---------- */
.reading-layout { display: grid; grid-template-columns: 270px minmax(0, 720px) 240px; justify-content: space-between; gap: 40px; padding-top: 36px; }
.reading-chapters, .reading-sidebar { position: sticky; top: calc(var(--header-h) + 20px); align-self: start; max-height: calc(100vh - var(--header-h) - 40px); overflow-y: auto; scrollbar-width: thin; }
.reading-chapters { display: flex; flex-direction: column; gap: 4px; }
.reading-chapters .sk-eyebrow, .reading-sidebar > .sk-eyebrow { padding: 0 12px 8px; }
.reading-chapters nav { display: flex; flex-direction: column; gap: 2px; }
.reading-sidebar { display: flex; flex-direction: column; gap: 14px; }
.reading-sidebar > .sk-eyebrow { padding: 8px 0 0; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.back-link:hover { color: var(--text); }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc > ul { border-inline-start: 1px solid var(--line-2); }
.toc ul ul { padding-inline-start: 12px; }
.toc a { display: block; padding: 7px 0 7px 16px; margin-inline-start: -1px; border-inline-start: 2px solid transparent; font-size: 14px; line-height: 1.45; color: var(--text-2); transition: color .2s, border-color .2s; }
.toc a:hover { color: var(--text); }
.toc a.is-active { color: var(--text); font-weight: 600; border-inline-start-color: var(--jinn); }
.progress-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.progress-ring { --p: 0; position: relative; width: 50px; height: 50px; flex: none; border-radius: 50%; background: conic-gradient(var(--jinn) calc(var(--p) * 1%), var(--sunk) 0); }
.progress-ring span { position: absolute; inset: 5px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: 12.5px; font-weight: 700; }
.progress-card__text { display: flex; flex-direction: column; line-height: 1.35; }
.progress-card__text strong { font-size: 14.5px; }
.progress-card__text small { font-size: 12.5px; color: var(--text-3); }
.next-card { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; color: var(--text); }
.next-card:hover { color: var(--text); }
.next-card strong { font-size: 22px; line-height: 1.15; font-weight: 400; }
.next-card__go { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--jinn); }

.article { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.article-header { display: flex; flex-direction: column; gap: 16px; }
.article-meta { display: flex; align-items: center; gap: 12px; font-size: 13.5px; font-weight: 600; color: var(--text-3); }
.article-header h1 { font-size: clamp(38px, 5vw, 58px); line-height: 1.05; }
.article-deck { margin: 0; font-size: clamp(18px, 1.8vw, 20px); line-height: 1.6; color: var(--text-2); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.review-notice { display: flex; align-items: center; gap: 10px; margin: 0; padding: 14px 18px; border-radius: 16px; background: var(--gold-soft); color: var(--gold); font-size: 14.5px; }
.review-notice strong { font-weight: 700; }
.mobile-toc { display: none; }
.mobile-toc .toc { padding: 10px 6px; }

/* ---------- Prose ---------- */
.prose { font-size: 18px; line-height: 1.78; color: var(--text-2); }
.prose > * + * { margin-top: 1.15em; }
.prose > p:first-of-type::first-letter { float: left; font-family: var(--font-display); font-size: 4.2em; line-height: .8; margin: .08em .12em 0 0; color: var(--jinn); }
.prose p { margin-bottom: 0; }
.prose strong { color: var(--text); }
.prose em, .prose i { color: var(--text); }
.prose h2 { margin-top: 1.9em; font-family: var(--font-display); font-weight: 400; font-size: clamp(28px, 3vw, 34px); line-height: 1.15; color: var(--text); }
.prose h3 { margin-top: 1.6em; font-size: 20px; color: var(--text); }
.prose a { color: var(--jinn); }
.prose ul, .prose ol { padding-inline-start: 1.3em; }
.prose li + li { margin-top: .45em; }
.prose ul li::marker { color: var(--gold-bright); }
.prose blockquote {
  position: relative; margin-inline: 0; padding: 24px 28px 22px; border-radius: 24px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  font-family: var(--font-display); font-size: 25px; line-height: 1.3; color: var(--text);
}
.prose blockquote p { margin: 0; }
.prose blockquote p + p { margin-top: .6em; }
.prose hr { border: 0; height: 1px; background: var(--line); }
.prose sup { line-height: 0; }
.footnote-ref {
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 19px; padding: 0 5px; margin: 0 1px;
  border-radius: 6px; background: var(--jinn-soft); color: var(--jinn) !important; font-family: var(--font-ui); font-size: 11.5px; font-weight: 700; text-decoration: none; vertical-align: 2px;
}
.footnote-ref:hover { background: var(--jinn); color: var(--on-accent) !important; }
.footnote { font-size: 15px; line-height: 1.6; color: var(--text-2); }
.footnote hr { display: none; }
.footnote ol { padding-inline-start: 1.6em; }
.footnote li { padding-inline-start: 4px; }
.footnote li::marker { color: var(--jinn); font-weight: 700; }
.footnote li:target { background: var(--jinn-soft); border-radius: 10px; }
.footnote-backref { margin-inline-start: 4px; text-decoration: none; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.55; }
.prose th, .prose td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
.prose th { background: var(--surface-2); color: var(--text); font-weight: 700; }
.prose tr:last-child td { border-bottom: 0; }

.chapter-pagination { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding-top: 24px; border-top: 1px solid var(--line); }
.chapter-pagination a { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; color: var(--text); font-weight: 600; line-height: 1.35; }
.chapter-pagination a:hover { color: var(--text); }
.chapter-pagination a span { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.chapter-pagination a:last-child { text-align: end; }

.about-page { width: min(760px, 100%); padding-top: clamp(32px, 5vw, 56px); display: flex; flex-direction: column; gap: 18px; }
.about-page h1 { font-size: clamp(40px, 5.4vw, 64px); }

/* ---------- Responsive ---------- */
@media (max-width: 1240px) {
  .reading-layout { grid-template-columns: minmax(0, 720px) 240px; justify-content: center; }
  .reading-chapters { display: none; }
  .mobile-chapters { display: block; padding-top: 16px; }
}
@media (max-width: 1060px) {
  .site-nav { display: none; }
}
@media (max-width: 900px) {
  .edition { display: none; }
}
@media (max-width: 980px) {
  .portal-hero, .portal-body { grid-template-columns: minmax(0, 1fr); }
  .portal-art { min-height: 280px; }
  .collection-note { position: static; }
  .reading-layout { grid-template-columns: minmax(0, 1fr); padding-top: 20px; }
  .reading-sidebar { display: none; }
  .mobile-toc { display: block; }
}
@media (max-width: 760px) {
  .chapter-row { padding: 16px; gap: 14px; align-items: flex-start; }
  .chapter-row h3 { font-size: 22px; }
  .row-link { display: none; }
  .prose { font-size: 17px; }
  .prose blockquote { font-size: 22px; padding: 20px; }
  .chapter-pagination { grid-template-columns: minmax(0, 1fr); }
  .chapter-pagination a:last-child { text-align: start; }
}
