/* Source annotations and a quieter reading scale. */
:root{--verse-size:24px}
body{font-size:14px}
.reading-space{scroll-behavior:auto}
.wordmark{font-size:26px;letter-spacing:-1.5px;padding-right:3px}
.wordmark sup{font-size:14px;line-height:1;font-weight:650;top:-3px;letter-spacing:-.6px;margin-left:3px;color:var(--text)}
.main-nav>button{font-size:13px}
.surf-meta h1{font-size:35px}
.surf-copy .verse-text{font-size:var(--verse-size);line-height:1.8}
.surf-copy .parallel-text{font-size:calc(var(--verse-size) - 3px)}
.source-node{min-height:68px}
.source-node strong{font-size:13px}.source-node small{font-size:11px}
.branch-verse{padding:20px 0 22px}
.branch-verse>header{margin-bottom:11px}
.branch-verse>.verse-text{font-size:clamp(17px,calc(var(--verse-size) - 4px),26px);line-height:1.8}
.branch-verse>.parallel-text{font-size:clamp(15px,calc(var(--verse-size) - 6px),23px);margin-top:14px;padding-top:14px}
.branch-verse.selected:before{top:21px;bottom:22px}
.branch-readhead strong{font-size:15px}
.continuous-reader{max-width:800px;padding-top:30px}
.reading-hero{padding:26px 0 24px;overflow:visible}
.reading-hero h1{font-size:clamp(34px,4vw,44px);font-weight:510;letter-spacing:-.05em;line-height:1.25}
.reading-hero>p{font-size:17px;margin-top:12px}
.reading-hero>span{font-size:11px;margin-top:11px}
.chapter-names{display:flex;align-items:center;gap:16px;margin-top:8px;color:var(--muted);line-height:1.6}
.chapter-latin{font-size:13px;letter-spacing:-.01em}
.chapter-names>[lang=ar]{font:22px/1.5 'Segoe UI',Tahoma,sans-serif;color:var(--subtle)}
.chapter-basmalah{margin-top:25px;padding-top:20px;border-top:1px solid var(--line);color:var(--muted)}
.chapter-basmalah>p{font-size:16px;line-height:1.8;letter-spacing:-.02em}
.chapter-basmalah>.basmalah-arabic{font:25px/1.8 'Segoe UI',Tahoma,sans-serif;letter-spacing:0;margin-bottom:9px;text-align:center}
.chapter-basmalah>small{display:block;margin-top:7px;font-size:13px;line-height:1.8;color:var(--subtle)}
.reading-bar{min-height:60px;gap:12px;padding:9px 0;margin-bottom:0}
.continuous-verse{padding:20px 8px 23px;scroll-margin-top:74px}
.continuous-verse>header{margin-bottom:12px;min-height:26px;gap:10px}
.continuous-verse .verse-text{font-size:var(--verse-size);line-height:1.75}
.continuous-verse .parallel-text{font-size:calc(var(--verse-size) - 3px);line-height:1.8;margin-top:15px;padding-top:15px}
.continuous-verse .arabic-text{font-size:30px;line-height:1.9;margin-bottom:16px}
.continuous-verse.is-reading:before{top:23px;bottom:25px;left:-9px}
.reading-discover{display:none}
.reading-note{margin-top:16px;font-size:14px}
.chapter-boundary{padding-top:28px;gap:22px}
.chapter-boundary>button{font-size:17px;gap:12px;min-height:46px}
.chapter-boundary small{margin-bottom:5px}

.verse-title{font-family:var(--sans);font-size:16px;font-weight:560;line-height:1.6;letter-spacing:-.02em;color:var(--text);margin:0 0 12px;white-space:pre-line}
.verse-title>small{display:block;font-size:12px;font-weight:400;color:var(--subtle);line-height:1.7;margin-top:4px}
.branch-verse>.verse-title{font-size:14px;margin-bottom:8px}
.verse-annotations{margin-top:15px;min-width:0;font-size:14px;letter-spacing:-.015em;color:var(--muted)}
.source-footnotes{border-top:1px solid var(--line)}
.source-footnotes>summary{list-style:none;display:flex;align-items:center;gap:7px;padding:11px 0 7px;cursor:pointer;width:100%;font-size:11px;line-height:1.5;color:var(--subtle);user-select:none}
.source-footnotes>summary::-webkit-details-marker{display:none}
.source-footnotes>summary:hover{color:var(--text)}
.source-footnotes>summary>svg{width:12px;height:12px}
.source-footnotes>summary>small{font-size:9px;opacity:.7}
.source-footnotes>summary>svg:last-child{margin-left:auto;width:10px;transition:transform .15s}
.source-footnotes[open]>summary>svg:last-child{transform:rotate(90deg)}
.source-footnotes-body{padding:4px 0 2px}
.source-footnote{font-size:14px;line-height:1.8;overflow-wrap:anywhere;letter-spacing:-.015em;color:var(--muted)}
.source-footnote+.source-footnote{border-top:1px solid var(--line);margin-top:13px;padding-top:13px}
.source-footnote>p{font-size:inherit;line-height:inherit;white-space:pre-line;margin-bottom:10px}
.source-footnote>p:last-child{margin-bottom:0}
.source-footnote .inline-reference{font:inherit;font-size:inherit;line-height:inherit;padding:0 1px}
.note-language{display:inline-block;font-size:9px;letter-spacing:.06em;margin-bottom:5px;opacity:.7}
.shared-footnotes{display:flex;flex-wrap:wrap;gap:6px}
.source-footnotes+.shared-footnotes{margin-top:8px}
.shared-footnotes>button,.source-tables-link{display:inline-flex;gap:5px;align-items:center;font-size:10px;color:var(--subtle);line-height:1.6;padding:4px 7px;border:1px solid var(--line);border-radius:6px}
.shared-footnotes>button:hover,.source-tables-link:hover{color:var(--text);border-color:var(--line-strong)}
.shared-footnotes svg,.source-tables-link svg{width:11px;height:11px}
.source-tables-link{margin-top:10px}
.branch-verse .verse-annotations{margin-top:12px}
.branch-verse .source-footnote{font-size:12px;line-height:1.85}
.source-table{margin-top:22px}.source-table>h3{font-size:13px;font-weight:500;margin-bottom:12px}
.source-table-scroll{overflow:auto;border:1px solid var(--line);border-radius:9px}
.source-table table{width:100%;border-collapse:collapse;font-size:12px;line-height:1.6;text-align:left}
.source-table th,.source-table td{padding:10px 13px;vertical-align:top;border-bottom:1px solid var(--line)}
.source-table th{font-weight:500;color:var(--body);background:var(--halo)}
.source-table tbody tr:last-child td{border:0}
.dialog-body>.source-footnote{font-size:15px}
.context-verse>.verse-annotations{font-size:14px}.context-verse .verse-title{font-size:15px}

/* Color is confined to the navigation choices. */
.navigation-dialog,.reading-selectors{--picker-accent:#94b3ff}
body[data-theme=light] .navigation-dialog,body[data-theme=light] .reading-selectors{--picker-accent:#3d63d8}
.navigation-select{display:flex;align-items:center;gap:8px;min-width:0;min-height:36px;max-width:350px;padding:7px 10px;border:1px solid var(--line);border-radius:9px;background:var(--surface);line-height:1.6;text-align:left;transition:background .15s,border-color .15s}
.navigation-select>span{color:var(--subtle);font-size:10px;flex-shrink:0}
.navigation-select>strong{font-size:12px;font-weight:470;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.navigation-select>svg{width:12px;height:12px;margin-left:5px;color:var(--subtle)}
.navigation-select:hover{border-color:color-mix(in srgb,var(--picker-accent) 35%,var(--line));background:color-mix(in srgb,var(--picker-accent) 5%,var(--surface))}
.verse-select{flex-shrink:0}.verse-select>strong{font-variant-numeric:tabular-nums}
.navigation-dialog{width:min(780px,100%);max-height:min(82dvh,800px);background:var(--surface-raised)}
.navigation-dialog>.dialog-header{border-bottom:0;padding:20px 24px 10px}
.navigation-dialog h2{font-size:16px;font-weight:520}
.navigation-search{display:flex;align-items:center;gap:10px;margin:4px 24px 17px;padding:0 13px;border:1px solid var(--line-strong);border-radius:11px;background:var(--bg);flex-shrink:0}
.navigation-search>svg{width:16px;height:16px;color:var(--subtle)}
.navigation-search:focus-within{border-color:color-mix(in srgb,var(--picker-accent) 60%,var(--line-strong));box-shadow:0 0 0 3px color-mix(in srgb,var(--picker-accent) 7%,transparent)}
.navigation-search>input{width:100%;border:0;background:none;border-radius:0;outline:none;padding:12px 0;font-size:13px;line-height:1.6}
.navigation-subtitle{display:flex;align-items:baseline;justify-content:space-between;gap:15px;margin:0 25px 15px;color:var(--muted);font-size:13px;flex-shrink:0}
.navigation-subtitle>small{font-size:11px;color:var(--subtle)}
.navigation-results{min-height:100px;overflow-y:auto;overscroll-behavior:contain;padding:0 23px 23px;scrollbar-gutter:stable}
.surah-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.surah-choice{display:flex;align-items:center;gap:13px;min-height:73px;border:1px solid var(--line);border-radius:12px;padding:12px;text-align:left;background:var(--halo);min-width:0;transition:background .15s,border-color .15s}
.surah-choice>b{display:grid;place-items:center;width:34px;height:34px;flex-shrink:0;font-size:12px;font-weight:450;letter-spacing:-.02em;border:1px solid var(--line);border-radius:10px;color:var(--subtle);font-variant-numeric:tabular-nums}
.surah-choice>span{flex:1;min-width:0}.surah-choice strong{font-size:13px;line-height:1.5;font-weight:500;display:block;overflow-wrap:anywhere}
.surah-choice small{display:block;margin-top:4px;color:var(--subtle);font-size:10px;line-height:1.6}
.surah-choice>i{font:19px/1.5 'Segoe UI',Tahoma,sans-serif;max-width:70px;color:var(--subtle)}
.surah-choice:hover,.scope-choice-list>button:hover,.verse-choice-grid>button:hover{background:color-mix(in srgb,var(--picker-accent) 6%,var(--surface));border-color:color-mix(in srgb,var(--picker-accent) 28%,var(--line))}
.surah-choice.selected,.scope-choice-list>button.selected,.verse-choice-grid>button.selected{background:color-mix(in srgb,var(--picker-accent) 10%,var(--surface));border-color:color-mix(in srgb,var(--picker-accent) 45%,var(--line))}
.surah-choice.selected>b{color:var(--picker-accent);border-color:color-mix(in srgb,var(--picker-accent) 25%,var(--line))}
.surah-choice.selected strong,.verse-choice-grid>button.selected{color:var(--picker-accent)}
.verse-choice-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(55px,1fr));gap:8px}
.verse-choice-grid>button{border:1px solid var(--line);border-radius:10px;padding:10px 4px;min-height:44px;font-size:13px;font-variant-numeric:tabular-nums;background:var(--halo)}
.scope-choice-list{display:flex;flex-direction:column;gap:7px}
.scope-choice-list>button{display:flex;align-items:center;gap:13px;padding:13px 15px;min-height:47px;text-align:left;line-height:1.6;font-size:13px;border:1px solid var(--line);border-radius:10px;background:var(--halo)}
.scope-choice-list>button>span{flex:1}.scope-choice-list small{font-size:11px;color:var(--subtle)}.scope-choice-list svg{width:13px;height:13px;color:var(--subtle)}
.navigation-empty{padding:45px 15px;text-align:center;color:var(--subtle);font-size:13px}

.focus-exitbar sup{font-size:11px;font-weight:600}
.focus-solo .verse-text{font-size:calc(var(--verse-size) + 2px);line-height:1.8}
.focus-display .continuous-reader{max-width:760px;padding-top:95px}
.focus-display .reading-hero{display:block;padding:0 0 24px}
.focus-display .reading-hero h1{font-size:32px}
.focus-display .chapter-boundary{display:flex;padding:28px 0 20px}
.focus-display .continuous-verse{padding:20px 0 24px}
.focus-display .continuous-verse .verse-text{font-size:var(--verse-size);line-height:1.8}
.focus-display .continuous-verse{scroll-margin-top:85px}

@media(max-width:899px){
 .continuous-reader{padding-top:22px}.reading-hero{padding:22px 0}.reading-hero h1{font-size:35px}.chapter-basmalah{margin-top:20px;padding-top:16px}.chapter-basmalah>p{font-size:14px}
 .continuous-verse{padding:19px 0 21px}.continuous-verse>header{margin-bottom:10px}.continuous-verse .verse-text{font-size:var(--verse-size);line-height:1.8}.continuous-verse .parallel-text{font-size:calc(var(--verse-size) - 3px)}
 .continuous-verse.is-reading:before{top:22px;bottom:22px}.reading-position{font-size:10px}.navigation-select{gap:6px;padding:7px 8px;max-width:240px}.navigation-select>strong{font-size:11px}
 .chapter-boundary>button{font-size:15px}.focus-display .continuous-reader{padding-top:87px}.focus-display .reading-hero h1{font-size:30px}.focus-display .continuous-verse .verse-text{font-size:var(--verse-size)}
 .surf-copy .verse-text{font-size:var(--verse-size)}.branch-verse>.verse-text{font-size:clamp(17px,calc(var(--verse-size) - 4px),26px)}.branch-verse{padding:19px 0 21px}
 .dialog-body{padding:22px}.setting-row{padding:17px 0}.setting-row strong{font-size:14px}
}
@media(max-width:540px){
 .navigation-dialog{max-height:85dvh;border-radius:17px}.navigation-dialog>.dialog-header{padding:16px 17px 9px}.navigation-search{margin:3px 17px 14px}.navigation-results{padding:0 16px 18px}
 .surah-choice-grid{grid-template-columns:1fr}.surah-choice{min-height:66px}.surah-choice>i{max-width:100px;font-size:21px}.surah-choice strong{font-size:14px}
 .reading-selectors{gap:5px}.navigation-select{max-width:180px;gap:5px;padding:6px 7px}.navigation-select>svg{margin-left:0}.verse-select{max-width:87px}.reading-position{gap:3px;font-size:9px}.reading-bar{gap:7px}
 .wordmark{font-size:24px}.wordmark sup{font-size:13px}.verse-title{font-size:15px}.chapter-names{gap:13px}.chapter-latin{font-size:12px}.chapter-names>[lang=ar]{font-size:21px}
}
@media(prefers-reduced-motion:reduce){.navigation-select,.surah-choice,.source-footnotes>summary>svg{transition:none}}
