/* Module: base */
@font-face {
  font-family: "Noto Naskh Arabic";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/noto-naskh-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC;
}

@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("fonts/figtree-variable.ttf") format("truetype");
}

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/plus-jakarta-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02FF, U+1E00-1E9F, U+2020, U+20A0-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/plus-jakarta-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --ink: #171411;
  --ink-soft: #6d655e;
  --paper: #ffffff;
  --surface: #ffffff;
  --surface-soft: #ffffff;
  --forest: #171411;
  --forest-deep: #171411;
  --forest-soft: #f5f5f4;
  --gold: #171411;
  --gold-light: #ffffff;
  --line: #e7e1db;
  --line-strong: #d8cec4;
  --notice-brown: #87552b;
  --notice-bg: #fbf6f0;
  --danger: #9a372e;
  --shadow-sm: 0 12px 35px rgba(68, 44, 25, .07);
  --shadow-lg: 0 30px 80px rgba(68, 44, 25, .12);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --shell: 1180px;
  --arabic-size: 2.875rem;
  --transition-fast: 160ms cubic-bezier(.2, 0, 0, 1);
  --transition: 200ms cubic-bezier(.2, 0, 0, 1);
  --transition-slow: 400ms cubic-bezier(.2, 0, 0, 1);
}

html[data-theme="kitab"] {
  color-scheme: light;
  --ink: #1b1812;
  --ink-soft: #625a49;
  --paper: #f4edd6;
  --surface: #fbf7e9;
  --surface-soft: #ece0bd;
  --forest: #59451c;
  --forest-deep: #2c2211;
  --forest-soft: #e5d5a8;
  --gold: #9b7528;
  --gold-light: #d8bb72;
  --line: #dac99a;
  --line-strong: #bda465;
  --notice-brown: #7c581d;
  --notice-bg: #efe0b6;
  --danger: #94392f;
  --shadow-sm: 0 12px 35px rgba(77, 57, 22, .09);
  --shadow-lg: 0 30px 80px rgba(77, 57, 22, .14);
}

html[data-theme="kitab"] body {
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 15% 5%, rgba(255, 255, 255, .38), transparent 31%),
    radial-gradient(circle at 86% 38%, rgba(154, 111, 35, .035), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, .11), rgba(164, 120, 39, .018));
}

html[data-theme="night"] {
  color-scheme: dark;
  --ink: #e8e5de;
  --ink-soft: #aaa69d;
  --paper: #10100f;
  --surface: #181816;
  --surface-soft: #201f1c;
  --forest: #e8e5de;
  --forest-deep: #e8e5de;
  --forest-soft: #25231f;
  --gold: #ded8ca;
  --gold-light: #eee9df;
  --line: #34322e;
  --line-strong: #4a4741;
  --notice-brown: #ddd7cb;
  --notice-bg: #201f1c;
  --danger: #ff9188;
  --shadow-sm: 0 12px 35px rgba(0, 0, 0, .48);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, .72);
}

html[data-theme="night"] body {
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  scroll-behavior: auto;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Figtree", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  font-optical-sizing: auto;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
svg { width: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.desktop-nav a,
.search-result,
.popular-card,
.surah-card,
.continue-reading,
.continue-reading-button,
.segmented-control button,
.toolbar-button,
.verse-action,
.chapter-link,
.reader-neighbour,
.reader-settings-button,
.reader-selectors select,
.source-toc a,
.footer-links a {
  transition:
    color var(--transition-fast),
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition),
    transform var(--transition-fast),
    opacity var(--transition-fast);
}

button:active,
.continue-reading:active,
.surah-card:active,
.popular-card:active,
.chapter-link:active,
.reader-neighbour:active {
  transform: translateY(1px);
}

:focus-visible {
  outline: 3px solid var(--notice-brown);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 999;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  color: #fff;
  background: var(--forest-deep);
  border-radius: 8px;
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }
.shell { width: min(calc(100% - 48px), var(--shell)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.header-inner { min-height: 78px; display: flex; align-items: center; gap: 30px; }
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: max-content; }
.brand-mark { display: grid; width: 44px; aspect-ratio: 1; place-items: center; border: 1px solid color-mix(in srgb, var(--gold) 64%, transparent); border-radius: 50%; color: var(--gold); background: color-mix(in srgb, var(--gold) 7%, transparent); font-family: "Noto Naskh Arabic", serif; font-size: 24px; line-height: 1; }
.brand-copy { display: grid; line-height: 1.2; }
.brand-copy strong { font-size: .93rem; letter-spacing: -.025em; }
.brand-copy small { margin-top: 4px; color: var(--ink-soft); font-size: .75rem; font-weight: 400; letter-spacing: .01em; }
.desktop-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.desktop-nav a { position: relative; padding: 11px 15px; color: var(--ink-soft); font-size: .84rem; font-weight: 700; }
.desktop-nav a:hover, .desktop-nav a.is-active { color: var(--ink); }
.desktop-nav a.is-active::after { position: absolute; right: 15px; bottom: 5px; left: 15px; height: 2px; content: ""; background: var(--gold); }
.icon-button { display: grid; width: 44px; height: 44px; padding: 0; place-items: center; color: var(--ink); border: 1px solid var(--line); border-radius: 50%; background: var(--surface); cursor: pointer; transition: color var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast); }
.icon-button:hover { border-color: var(--gold); transform: translateY(-1px); }
.theme-picker { position: relative; }
.theme-menu { position: absolute; z-index: 140; top: calc(100% + 10px); right: 0; width: 180px; overflow: hidden; padding: 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-lg); }
.theme-menu button { display: flex; width: 100%; min-height: 44px; align-items: center; gap: 10px; padding: 0 12px; color: var(--ink-soft); border: 0; border-radius: 9px; background: transparent; cursor: pointer; font-size: .8rem; font-weight: 700; text-align: left; }
.theme-menu button::before { width: 8px; height: 8px; flex: 0 0 auto; content: ""; border: 1px solid var(--line-strong); border-radius: 50%; }
.theme-menu button:hover { color: var(--ink); background: var(--surface-soft); }
.theme-menu button.is-active { color: var(--ink); background: color-mix(in srgb, var(--gold) 10%, var(--surface)); }
.theme-menu button.is-active::before { border-color: var(--gold); background: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 14%, transparent); }
.app-toast { position: fixed; z-index: 300; bottom: 24px; left: 50%; min-width: 180px; max-width: calc(100% - 32px); padding: 12px 18px; color: #fff; border: 1px solid rgba(255, 255, 255, .15); border-radius: 999px; background: #171411; box-shadow: 0 14px 40px rgba(0, 0, 0, .24); opacity: 0; transform: translate(-50%, 12px); transition: opacity 180ms ease, transform 180ms ease; font-size: .82rem; font-weight: 700; text-align: center; }
.app-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.home-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(76px, 9vw, 126px) 0 clamp(80px, 10vw, 140px);
  background:
    radial-gradient(circle at 84% 5%, color-mix(in srgb, var(--gold) 15%, transparent), transparent 28%),
    linear-gradient(180deg, color-mix(in srgb, var(--forest-soft) 42%, var(--paper)), var(--paper));
}

.home-hero::before { position: absolute; top: 0; right: max(-160px, calc((100vw - var(--shell)) / 2 - 330px)); width: 600px; height: 600px; content: ""; opacity: .12; border: 1px solid var(--gold); border-radius: 50%; box-shadow: inset 0 0 0 90px transparent, inset 0 0 0 91px var(--gold), inset 0 0 0 180px transparent, inset 0 0 0 181px var(--gold); pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.16fr) minmax(360px, .84fr); gap: clamp(50px, 8vw, 112px); align-items: center; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 20px; color: var(--forest); font-size: .7rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow span { width: 24px; height: 1px; background: var(--gold); }
.hero-copy h1, .section-heading h2, .trust-section h2, .reader-title h1, .source-hero h1 { margin: 0; font-size: clamp(2.75rem, 5.8vw, 5.2rem); line-height: 1.02; letter-spacing: -.062em; }
.hero-copy h1 em { color: var(--forest); font-family: Georgia, "Times New Roman", serif; font-weight: 400; }
.hero-lead { max-width: 680px; margin: 28px 0 30px; color: var(--ink-soft); font-size: clamp(1rem, 1.35vw, 1.14rem); line-height: 1.8; }

.quran-search { display: flex; max-width: 610px; min-height: 60px; align-items: center; gap: 13px; padding: 0 18px; border: 1px solid var(--line-strong); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); transition: border var(--transition), box-shadow var(--transition); }
.quran-search:focus-within { border-color: var(--gold); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 15%, transparent), var(--shadow-sm); }
.quran-search svg, .filter-field svg { color: var(--forest); }
.quran-search input, .filter-field input { min-width: 0; flex: 1; color: var(--ink); border: 0; outline: 0; background: transparent; }
.quran-search input::placeholder, .filter-field input::placeholder { color: color-mix(in srgb, var(--ink-soft) 76%, transparent); }
.quran-search kbd { padding: 2px 8px; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 6px; background: var(--surface-soft); font-size: .72rem; }
.search-results { position: absolute; z-index: 20; width: min(610px, 100%); max-height: 330px; margin-top: 8px; overflow: auto; padding: 8px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-lg); }
.search-result { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 11px 12px; border-radius: 10px; }
.search-result:hover, .search-result:focus-visible { background: var(--surface-soft); }
.search-result .number { color: var(--gold); font-size: .74rem; font-weight: 800; }
.search-result strong { font-size: .88rem; }
.search-result small { color: var(--ink-soft); font-size: .72rem; }
.search-result .arabic-mini { font-family: "Noto Naskh Arabic", serif; font-size: 1.15rem; }

.hero-actions { display: flex; align-items: center; gap: 24px; margin-top: 26px; }
.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: 10px; padding: 0 20px; border: 1px solid transparent; border-radius: 12px; font-size: .82rem; font-weight: 800; transition: transform var(--transition), background var(--transition), border var(--transition); }
.button:hover { transform: translateY(-2px); }
.button svg { width: 16px; }
.button-primary { color: #fff; background: var(--forest-deep); box-shadow: 0 12px 25px rgba(9, 43, 36, .18); }
html[data-theme="kitab"] .button-primary { color: #24180d; background: var(--gold-light); }
.button-light { color: var(--forest-deep); background: #f7f2e6; }
.text-link { padding: 8px 0; border-bottom: 1px solid var(--line-strong); font-size: .82rem; font-weight: 800; }

.continue-card { position: relative; overflow: hidden; padding: clamp(30px, 4vw, 46px); color: #f4f8f6; border: 1px solid rgba(255, 255, 255, .1); border-radius: var(--radius-lg); background: linear-gradient(145deg, #174d40, #092b24); box-shadow: var(--shadow-lg); }
.continue-ornament { position: absolute; top: -110px; right: -95px; width: 270px; height: 270px; opacity: .24; border: 1px solid var(--gold-light); border-radius: 50%; box-shadow: inset 0 0 0 42px transparent, inset 0 0 0 43px var(--gold-light), inset 0 0 0 84px transparent, inset 0 0 0 85px var(--gold-light); }
.continue-topline { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 14px; color: rgba(255, 255, 255, .66); font-size: .64rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.source-chip { padding: 6px 9px; color: var(--gold-light); border: 1px solid rgba(229, 202, 138, .3); border-radius: 999px; letter-spacing: .03em; text-transform: none; }
.arabic-display { position: relative; margin: 56px 0 42px; font-family: "Noto Naskh Arabic", serif; font-size: clamp(2.25rem, 4.5vw, 3.8rem); font-weight: 500; line-height: 1.8; text-align: center; }
.continue-card h2 { margin: 0; font-size: 1.8rem; letter-spacing: -.04em; }
.continue-card > p:not(.arabic-display, .translation-preview) { margin: 4px 0 0; color: rgba(255, 255, 255, .62); font-size: .8rem; }
.continue-divider { height: 1px; margin: 24px 0 20px; background: rgba(255, 255, 255, .12); }
.translation-preview { margin: 0; color: rgba(255, 255, 255, .78); font-family: Georgia, serif; font-size: 1rem; line-height: 1.7; }
.continue-link { display: flex; align-items: center; justify-content: space-between; margin-top: 28px; padding-top: 17px; color: var(--gold-light); border-top: 1px solid rgba(229, 202, 138, .24); font-size: .78rem; font-weight: 800; }

.quick-section, .surah-section { padding: clamp(82px, 9vw, 128px) 0; }
.quick-section { background: var(--surface); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 50px; margin-bottom: 42px; }
.section-heading h2, .trust-section h2, .source-hero h1 { max-width: 760px; font-size: clamp(2.15rem, 4vw, 3.8rem); }
.section-heading > p { max-width: 480px; margin: 0; color: var(--ink-soft); font-size: .92rem; line-height: 1.8; }
.popular-grid { display: grid; grid-template-columns: repeat(6, 1fr); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--line); gap: 1px; overflow: hidden; }
.popular-card { min-height: 180px; padding: 22px; background: var(--surface); transition: background var(--transition), transform var(--transition); }
.popular-card:hover { position: relative; z-index: 1; background: var(--surface-soft); box-shadow: 0 0 0 1px var(--gold); }
.popular-card .popular-number { display: flex; align-items: center; justify-content: space-between; color: var(--ink-soft); font-size: .67rem; font-weight: 800; }
.popular-card .popular-arrow { color: var(--gold); font-size: 1rem; }
.popular-card .arabic-name { display: block; margin: 26px 0 14px; color: var(--forest); font-family: "Noto Naskh Arabic", serif; font-size: 1.7rem; line-height: 1; }
.popular-card strong { display: block; font-size: .88rem; }
.popular-card small { color: var(--ink-soft); font-size: .68rem; }

.surah-section { border-top: 1px solid var(--line); background: var(--paper); }
.surah-tools { display: flex; align-items: center; gap: 12px; }
.filter-field { display: flex; min-width: 240px; height: 44px; align-items: center; gap: 10px; padding: 0 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.filter-field svg { width: 16px; }
.segmented-control { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.segmented-control button { min-height: 44px; padding: 0 14px; color: var(--ink-soft); border: 0; border-radius: 7px; background: transparent; cursor: pointer; font-size: .82rem; font-weight: 600; }
.segmented-control button.is-active { color: #fff; background: var(--forest-deep); }
.result-count { margin: -22px 0 20px; color: var(--ink-soft); font-size: .74rem; }
.surah-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.surah-card { display: grid; grid-template-columns: 42px 1fr auto; min-height: 112px; gap: 16px; align-items: center; padding: 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); transition: background var(--transition); }
.surah-card:hover { background: var(--surface-soft); }
.surah-number { display: grid; width: 38px; height: 38px; place-items: center; color: var(--forest); border: 1px solid var(--line-strong); border-radius: 50%; font-size: .68rem; font-weight: 800; }
.surah-meta { min-width: 0; }
.surah-meta strong { display: block; overflow: hidden; font-size: .86rem; text-overflow: ellipsis; white-space: nowrap; }
.surah-meta small { color: var(--ink-soft); font-size: .68rem; }
.surah-arabic { color: var(--forest); font-family: "Noto Naskh Arabic", serif; font-size: 1.42rem; }
.empty-state { padding: 36px; text-align: center; color: var(--ink-soft); border: 1px solid var(--line); background: var(--surface); }

.trust-section { padding: clamp(84px, 10vw, 140px) 0; color: #f2f6f4; background: var(--forest-deep); }
.trust-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 62px 100px; }
.eyebrow-light { color: var(--gold-light); }
.trust-copy p { max-width: 570px; margin: 2px 0 26px; color: rgba(255, 255, 255, .68); font-size: .96rem; line-height: 1.9; }
.trust-stat { display: grid; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .14); }
.trust-stat:nth-of-type(3) { grid-column: span 1; }
.trust-grid { grid-template-columns: repeat(3, 1fr); }
.trust-grid > div:first-child { grid-column: 1 / 2; }
.trust-copy { grid-column: 2 / 4; }
.trust-stat strong { color: var(--gold-light); font-family: Georgia, serif; font-size: 2.35rem; font-weight: 400; }
.trust-stat span { color: rgba(255, 255, 255, .55); font-size: .72rem; }

/* Ayat tersimpan */
.bookmarks-main { min-height: calc(100vh - 144px); background: var(--paper); }
.bookmarks-hero { padding: clamp(70px, 9vw, 120px) 0 clamp(52px, 7vw, 84px); border-bottom: 1px solid var(--line); background: linear-gradient(180deg, color-mix(in srgb, var(--forest-soft) 44%, var(--paper)), var(--paper)); }
.bookmarks-hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: clamp(50px, 8vw, 110px); align-items: end; }
.bookmarks-hero h1 { margin: 0; max-width: 780px; font-size: clamp(2.6rem, 5vw, 4.8rem); line-height: 1.02; letter-spacing: -.06em; }
.bookmarks-hero-grid > div:last-child { padding-bottom: 5px; }
.bookmarks-hero-grid > div:last-child p { margin: 0 0 22px; color: var(--ink-soft); line-height: 1.8; }
.bookmarks-hero-grid > div:last-child strong { color: var(--notice-brown); font-size: .78rem; }
.bookmarks-content { padding: clamp(54px, 7vw, 92px) 0 110px; }
.bookmark-list { display: grid; gap: 18px; }
.bookmark-card { padding: clamp(24px, 4vw, 42px); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.bookmark-card-heading { display: flex; align-items: start; justify-content: space-between; gap: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.bookmark-card-heading a { display: grid; }
.bookmark-card-heading a span { color: var(--notice-brown); font-size: .67rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.bookmark-card-heading a strong { margin-top: 3px; font-size: 1rem; }
.bookmark-remove { display: inline-flex; min-height: 44px; align-items: center; gap: 8px; padding: 0 13px; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; font-size: .76rem; font-weight: 700; }
.bookmark-remove:hover { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
.bookmark-remove svg { width: 17px; }
.bookmark-arabic { margin: 28px 0 20px; font-family: "Noto Naskh Arabic", serif; font-size: clamp(2rem, 4vw, 3rem); line-height: 2; text-align: right; }
.bookmark-translation { max-width: 900px; margin: 0; color: var(--ink-soft); font-size: 1.04rem; line-height: 1.82; }
.bookmark-open { display: inline-block; margin-top: 24px; color: var(--notice-brown); border-bottom: 1px solid color-mix(in srgb, var(--notice-brown) 45%, transparent); font-size: .8rem; font-weight: 800; }
.bookmark-empty { padding: clamp(46px, 8vw, 90px) 24px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); text-align: center; }
.bookmark-empty > span { display: block; color: var(--notice-brown); font-size: 2.4rem; }
.bookmark-empty h2 { margin: 12px 0 6px; font-size: 1.6rem; }
.bookmark-empty p { margin: 0 0 22px; color: var(--ink-soft); }

.site-footer { color: #e6eeea; background: #061b16; }
.footer-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 90px; padding: 78px 0 64px; }
.brand-footer .brand-copy small { color: rgba(255, 255, 255, .48); }
.footer-brand > p { max-width: 500px; margin: 22px 0 0; color: rgba(255, 255, 255, .52); font-size: .82rem; line-height: 1.85; }
.footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.footer-links > div { display: grid; align-content: start; gap: 9px; }
.footer-links strong { margin-bottom: 7px; color: var(--gold-light); font-size: .68rem; letter-spacing: .11em; text-transform: uppercase; }
.footer-links a { color: rgba(255, 255, 255, .66); font-size: .78rem; }
.footer-links a:hover { color: #fff; }
.footer-bottom { display: flex; min-height: 66px; align-items: center; justify-content: space-between; color: rgba(255, 255, 255, .36); border-top: 1px solid rgba(255, 255, 255, .1); font-size: .66rem; }
.footer-credit a { color: inherit; border-bottom: 1px solid currentColor; font-weight: 750; transition: color var(--transition-fast), border-color var(--transition-fast); }
.footer-credit a:hover, .footer-credit a:focus-visible { color: var(--ink); border-color: var(--ink); }

/* Reader */
.reader-page { background: var(--surface-soft); }
.reader-main { padding: 36px 0 100px; }
.breadcrumb { display: flex; align-items: center; gap: 9px; margin-bottom: 22px; color: var(--ink-soft); font-size: .72rem; }
.breadcrumb span { opacity: .55; }
.reader-hero { position: relative; overflow: hidden; padding: clamp(32px, 5vw, 56px); color: #f4f7f5; border-radius: var(--radius-lg); background: linear-gradient(135deg, #174d40, #092b24); box-shadow: var(--shadow-lg); }
.reader-hero::after { position: absolute; top: -180px; right: -90px; width: 430px; height: 430px; content: ""; opacity: .18; border: 1px solid var(--gold-light); border-radius: 50%; box-shadow: inset 0 0 0 70px transparent, inset 0 0 0 71px var(--gold-light), inset 0 0 0 140px transparent, inset 0 0 0 141px var(--gold-light); }
.reader-title { position: relative; z-index: 1; display: flex; align-items: end; justify-content: space-between; gap: 40px; }
.reader-kicker { margin: 0 0 12px; color: var(--gold-light); font-size: .67rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.reader-title h1 { font-size: clamp(2.6rem, 6vw, 5rem); }
.reader-subtitle { margin: 13px 0 0; color: rgba(255, 255, 255, .62); font-size: .78rem; }
.reader-arabic-title { margin: 0; font-family: "Noto Naskh Arabic", serif; font-size: clamp(3rem, 6vw, 5rem); font-weight: 500; line-height: 1.15; }
.reader-toolbar { position: sticky; z-index: 60; top: 92px; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 22px 0; padding: 10px 12px 10px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); }
.reader-toolbar p { margin: 0; color: var(--ink-soft); font-size: .7rem; }
.toolbar-actions { display: flex; gap: 7px; }
.toolbar-button { display: inline-flex; min-height: 38px; align-items: center; gap: 7px; padding: 0 11px; color: var(--ink); border: 1px solid var(--line); border-radius: 9px; background: var(--surface); cursor: pointer; font-size: .68rem; font-weight: 700; }
.toolbar-button:hover { border-color: var(--gold); }
.toolbar-button svg { width: 15px; }
.bismillah { padding: 42px 20px 30px; color: var(--forest); font-family: "Noto Naskh Arabic", serif; font-size: clamp(2rem, 4vw, 3.4rem); text-align: center; }
.verse-list { display: grid; gap: 14px; }
.verse-card { scroll-margin-top: 168px; padding: clamp(24px, 4vw, 42px); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); transition: border var(--transition), box-shadow var(--transition); }
.verse-card:target { border-color: var(--gold); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 14%, transparent); }
.verse-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.verse-number { display: inline-grid; min-width: 42px; height: 42px; place-items: center; color: var(--forest); border: 1px solid var(--line-strong); border-radius: 50%; font-size: .68rem; font-weight: 800; }
.verse-actions { display: flex; gap: 7px; }
.verse-action { display: grid; width: 38px; height: 38px; padding: 0; place-items: center; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 50%; background: var(--surface-soft); cursor: pointer; }
.verse-action:hover, .verse-action.is-saved { color: var(--forest); border-color: var(--gold); }
.verse-action svg { width: 15px; }
.verse-arabic { margin: clamp(30px, 5vw, 52px) 0 30px; font-family: "Noto Naskh Arabic", serif; font-size: var(--arabic-size); font-weight: 500; line-height: 2.05; text-align: right; }
.verse-translation { max-width: 850px; margin: 0; color: var(--ink-soft); font-size: .95rem; line-height: 1.9; }
.hide-translation .verse-translation, .hide-translation .footnote-list { display: none; }
.footnote-list { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.footnote-list summary { color: var(--forest); cursor: pointer; font-size: .7rem; font-weight: 800; }
.footnote-list ol { margin: 12px 0 0; padding-left: 20px; color: var(--ink-soft); font-size: .78rem; }
.reader-pagination { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 24px; }
.chapter-link { display: flex; min-height: 92px; align-items: center; justify-content: space-between; gap: 18px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.chapter-link:hover { border-color: var(--gold); }
.chapter-link small { display: block; color: var(--ink-soft); font-size: .65rem; }
.chapter-link strong { font-size: .84rem; }
.chapter-link .arabic-name { color: var(--forest); font-family: "Noto Naskh Arabic", serif; font-size: 1.35rem; }
.reader-status { padding: 14px 18px; color: #705317; border: 1px solid #e5cc8d; border-radius: 12px; background: #fff8e7; font-size: .72rem; }
html[data-theme="kitab"] .reader-status { color: var(--notice-brown); border-color: var(--line-strong); background: var(--notice-bg); }

.settings-panel { position: fixed; z-index: 300; inset: 0; display: grid; justify-items: end; opacity: 0; background: rgba(2, 16, 13, .46); transition: opacity var(--transition); }
.settings-panel[hidden] { display: none; }
.settings-panel.is-open { opacity: 1; }
.settings-sheet { width: min(420px, 100%); height: 100%; padding: 28px; overflow: auto; background: var(--surface); box-shadow: -20px 0 60px rgba(0, 0, 0, .18); transform: translateX(100%); transition: transform var(--transition-slow); }
.settings-panel.is-open .settings-sheet { transform: translateX(0); }
.settings-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 34px; }
.settings-header h2 { margin: 0; font-size: 1.3rem; }
.setting-group { padding: 22px 0; border-top: 1px solid var(--line); }
.setting-group > label, .setting-label { display: block; margin-bottom: 13px; font-size: .75rem; font-weight: 800; }
.setting-section-label { padding: 24px 0 10px; color: var(--notice-brown); font-size: .65rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.range-row { display: flex; align-items: center; gap: 15px; }
.range-row input { width: 100%; accent-color: var(--forest); }
.range-row span { color: var(--ink-soft); font-family: "Noto Naskh Arabic", serif; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.switch { position: relative; width: 46px; height: 26px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--line-strong); transition: background var(--transition); }
.switch span::after { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; content: ""; border-radius: 50%; background: #fff; transition: transform var(--transition); }
.switch input:checked + span { background: var(--forest); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:disabled + span { background: var(--line); cursor: not-allowed; }
.setting-unavailable .setting-label::after { display: inline-block; padding: 2px 6px; margin-left: 7px; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 999px; content: "Belum tersedia"; font-size: .52rem; font-weight: 700; vertical-align: 1px; }
.language-options { display: flex; flex-wrap: wrap; gap: 7px; }
.language-options button { min-width: 44px; min-height: 44px; padding: 0 12px; color: var(--ink-soft); border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); cursor: pointer; font-size: .72rem; font-weight: 750; }
.language-options button[aria-pressed="true"] { color: #fff; border-color: var(--notice-brown); background: var(--notice-brown); }
html[data-theme="kitab"] .language-options button[aria-pressed="true"] { color: #24180d; }
.language-options button:disabled { opacity: .48; cursor: not-allowed; }
.setting-select { width: 100%; min-height: 48px; padding: 0 38px 0 13px; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.setting-select:disabled { opacity: .72; cursor: not-allowed; }

/* Sources */
.source-main { padding-bottom: 110px; }
.source-hero { padding: clamp(72px, 9vw, 125px) 0 72px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--forest-soft), var(--paper)); }
.source-hero p:not(.eyebrow) { max-width: 720px; margin: 24px 0 0; color: var(--ink-soft); font-size: 1rem; line-height: 1.85; }
.source-content { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 70px; padding-top: 70px; }
.source-toc { position: sticky; top: 110px; align-self: start; display: grid; gap: 7px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.source-toc strong { margin-bottom: 6px; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; }
.source-toc a { color: var(--ink-soft); font-size: .75rem; }
.source-toc a:hover { color: var(--forest); }
.source-article { min-width: 0; }
.source-block { scroll-margin-top: 110px; padding: 0 0 55px; margin-bottom: 55px; border-bottom: 1px solid var(--line); }
.source-block:last-child { border-bottom: 0; }
.source-block h2 { margin: 0 0 18px; font-size: clamp(1.7rem, 3vw, 2.5rem); letter-spacing: -.04em; }
.source-block p, .source-block li { color: var(--ink-soft); font-size: .9rem; line-height: 1.85; }
.source-table { width: 100%; border-collapse: collapse; margin-top: 24px; background: var(--surface); }
.source-table th, .source-table td { padding: 16px; text-align: left; vertical-align: top; border: 1px solid var(--line); font-size: .74rem; }
.source-table th { color: var(--forest); background: var(--surface-soft); }
.checksum { overflow-wrap: anywhere; font-family: ui-monospace, monospace; font-size: .68rem; }

@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr .82fr; gap: 45px; }
  .popular-grid { grid-template-columns: repeat(3, 1fr); }
  .surah-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .shell { width: min(calc(100% - 32px), var(--shell)); }
  .desktop-nav { display: none; }
  .theme-toggle { margin-left: auto; }
  .home-hero { padding-top: 70px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy h1 { font-size: clamp(2.75rem, 11vw, 4.6rem); }
  .continue-card { max-width: 580px; }
  .section-heading { display: grid; align-items: start; }
  .surah-tools { flex-wrap: wrap; }
  .filter-field { flex: 1 1 100%; }
  .trust-grid { grid-template-columns: 1fr 1fr; gap: 45px 30px; }
  .trust-grid > div:first-child, .trust-copy { grid-column: 1 / -1; }
  .trust-stat:last-child { grid-column: 1 / -1; }
  .footer-grid { grid-template-columns: 1fr; gap: 50px; }
  .source-content { grid-template-columns: 1fr; }
  .source-toc { position: static; }
  .reader-toolbar { top: 88px; }
}

@media (max-width: 580px) {
  .shell { width: min(calc(100% - 24px), var(--shell)); }
  .header-inner { min-height: 70px; }
  .brand-mark { width: 39px; }
  .brand-copy strong { font-size: .82rem; }
  .brand-copy small { font-size: .58rem; }
  .hero-copy h1 { letter-spacing: -.055em; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 13px; }
  .quran-search { min-height: 56px; }
  .quran-search kbd { display: none; }
  .continue-card { padding: 27px; border-radius: 24px; }
  .continue-topline { align-items: flex-start; flex-direction: column; }
  .arabic-display { margin: 38px 0 32px; font-size: 2.45rem; }
  .popular-grid { grid-template-columns: repeat(2, 1fr); }
  .popular-card { min-height: 162px; padding: 18px; }
  .surah-tools { display: grid; width: 100%; }
  .segmented-control { width: 100%; }
  .segmented-control button { flex: 1; }
  .surah-grid { grid-template-columns: 1fr; }
  .surah-card { min-height: 98px; }
  .trust-grid { grid-template-columns: 1fr; }
  .trust-stat, .trust-stat:last-child { grid-column: 1; }
  .footer-links { gap: 24px; }
  .footer-bottom { align-items: flex-start; flex-direction: column; justify-content: center; gap: 3px; }
  .reader-main { padding-top: 20px; }
  .reader-hero { padding: 26px 22px; border-radius: 22px; }
  .reader-title { align-items: flex-start; flex-direction: column-reverse; gap: 24px; }
  .reader-arabic-title { font-size: 3.5rem; }
  .reader-toolbar { top: 79px; align-items: flex-start; flex-direction: column; padding: 11px; }
  .reader-toolbar p { padding-left: 4px; }
  .toolbar-actions { width: 100%; }
  .toolbar-button { flex: 1; justify-content: center; }
  .verse-card { padding: 22px 18px; border-radius: 16px; }
  .verse-arabic { font-size: min(var(--arabic-size), 2.35rem); line-height: 1.95; }
  .reader-pagination { grid-template-columns: 1fr; }
  .settings-sheet { padding: 22px; }
  .source-hero { padding-top: 64px; }
  .source-content { padding-top: 45px; }
  .source-table { display: block; overflow-x: auto; }
}

/* Quran application redesign — reading-first, Manbaul Huda identity */
.quran-app-home { background: var(--surface); }
.quran-app-home .app-header { background: color-mix(in srgb, var(--surface) 94%, transparent); }
.quran-directory { min-height: 80vh; }
.directory-intro { padding: 56px 0 46px; border-bottom: 1px solid var(--line); background: var(--surface); }
.directory-intro-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; align-items: end; gap: 70px; }
.directory-kicker { margin: 0 0 9px; color: var(--forest); font-size: .75rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.directory-intro h1 { max-width: 700px; margin: 0; font-size: clamp(2.15rem, 3.45vw, 3.35rem); line-height: 1.08; letter-spacing: -.042em; font-weight: 700; }
.directory-intro h1 span { color: var(--forest); font-weight: 500; }
.directory-intro-grid > div > p:last-child { max-width: 640px; margin: 18px 0 0; color: var(--ink-soft); font-size: 1rem; line-height: 1.65; }
.continue-reading { position: relative; display: grid; min-height: 132px; align-content: center; padding: 24px 60px 24px 25px; color: var(--ink); border: 1px solid var(--line-strong); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sm); }
.continue-reading-label { margin-bottom: 9px; color: var(--forest); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.continue-reading strong { font-size: 1.2rem; font-weight: 700; }
.continue-reading small { margin-top: 3px; color: var(--ink-soft); }
.continue-reading-arrow { position: absolute; right: 23px; bottom: 23px; color: var(--forest); font-size: 1.35rem; }
.directory-content { padding: 44px 0 88px; }
.reading-shortcuts { display: flex; align-items: center; gap: 18px; margin-bottom: 48px; }
.reading-shortcuts > span { flex: 0 0 auto; color: var(--ink-soft); font-size: .75rem; font-weight: 600; }
.quran-app-home .popular-grid { display: flex; flex-wrap: wrap; gap: 9px; overflow: visible; border: 0; background: transparent; }
.quran-app-home .popular-card { display: inline-flex; min-height: 44px; align-items: center; padding: 0 17px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.quran-app-home .popular-card:hover { background: var(--forest-soft); box-shadow: none; }
.quran-app-home .popular-card .popular-number,
.quran-app-home .popular-card .arabic-name,
.quran-app-home .popular-card small { display: none; }
.quran-app-home .popular-card strong { font-size: .8rem; font-weight: 600; }
.directory-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 22px; }
.directory-heading h2 { margin: 0; font-size: clamp(1.75rem, 2.1vw, 2rem); letter-spacing: -.03em; font-weight: 700; }
.directory-tools { position: relative; width: min(410px, 100%); }
.quran-app-home .quran-search { width: 100%; min-height: 50px; border-radius: 12px; box-shadow: none; }
.quran-app-home .search-results { right: 0; width: 100%; }
.surah-filterbar { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.surah-filterbar .filter-field { width: 220px; min-width: 0; }
.surah-filterbar .result-count { margin: 0 0 0 auto; }
.quran-app-home .surah-grid { gap: 12px; border: 0; }
.quran-app-home .surah-card { min-height: 78px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 3px 12px rgba(20,50,40,.025); }
.quran-app-home .surah-card:hover { border-color: color-mix(in srgb, var(--forest) 45%, var(--line)); background: var(--surface); transform: translateY(-1px); }
.quran-app-home .surah-number { width: auto; height: auto; border: 0; border-radius: 0; font-size: .76rem; }
.quran-app-home .surah-meta strong { font-size: 1rem; font-weight: 600; }
.quran-app-home .surah-meta small { font-size: .875rem; font-weight: 400; line-height: 1.45; }
.quran-app-home .surah-arabic { font-size: 1.35rem; }
.source-notice { padding: 31px 0; color: var(--ink); border-top: 1px solid var(--line); background: var(--surface); }
.source-notice-inner, .source-notice-inner > div { display: flex; align-items: center; gap: 14px; }
.source-notice-inner { justify-content: space-between; }
.source-notice-inner > div > span { display: grid; width: 36px; height: 36px; place-items: center; color: #fff; border-radius: 50%; background: var(--forest); font-weight: 900; }
.source-notice strong { display: block; font-size: .82rem; }
.source-notice p { margin: 2px 0 0; color: var(--ink-soft); font-size: .69rem; }
.source-notice a { color: var(--forest); font-size: .72rem; font-weight: 800; }
.compact-footer .footer-bottom { min-height: 58px; }
.compact-footer { color: var(--ink-soft); border-top: 1px solid var(--line); background: var(--surface); }
.compact-footer .footer-bottom { color: var(--ink-soft); border-top: 0; }

/* Search-first homepage, adapted from mature Quran application patterns */
.quran-search-hero { padding: 54px 0 58px; }
.search-landing { display: grid; justify-items: center; text-align: center; }
.search-landing .directory-kicker { margin-bottom: 7px; }
.search-landing h1 { margin: 0; color: var(--ink); font-size: clamp(2.5rem, 3.2vw, 2.8rem); line-height: 1.12; letter-spacing: -.035em; }
.search-landing-copy { max-width: 630px; margin: 13px 0 26px; color: var(--ink-soft); font-size: 1rem; }
.hero-search-wrap { position: relative; width: min(680px, 100%); }
.hero-search-wrap .quran-search { width: 100%; max-width: none; min-height: 58px; border-color: var(--line-strong); border-radius: 12px; box-shadow: 0 8px 28px rgba(18, 16, 14, .06); }
.hero-search-wrap .search-results { width: 100%; text-align: left; }
.search-landing-actions { display: flex; gap: 9px; margin-top: 14px; }
.search-landing-actions a { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: 9px 17px; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: .86rem; font-weight: 600; }
.search-landing-actions a:first-child { color: #fff; border-color: var(--ink); background: var(--ink); }
html[data-theme="kitab"] .search-landing-actions a:first-child { color: #24180d; border-color: #ead7a5; background: #ead7a5; }
.start-reading-section { padding: 42px 0 46px; border-bottom: 1px solid var(--line); }
.start-reading-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.start-reading-heading h2 { margin: 0; color: var(--ink); font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; }
.start-reading-heading a { color: var(--ink-soft); font-size: .78rem; font-weight: 600; }
.start-reading-section .continue-reading { display: grid; min-height: 150px; grid-template-columns: 150px minmax(0, 1fr) auto; align-items: center; align-content: initial; gap: 28px; padding: 24px 28px; }
.continue-reading-arabic { color: var(--ink); font-family: "Noto Naskh Arabic", serif; font-size: 2.65rem; line-height: 1.25; text-align: center; }
.continue-reading-copy { display: grid; }
.continue-reading-copy strong { color: var(--ink); font-size: 1.25rem; font-weight: 600; }
.continue-reading-copy strong small { color: var(--ink-soft); font-size: 1rem; font-weight: 400; }
.continue-reading-copy > span:last-child { margin-top: 6px; color: var(--ink-soft); font-size: .78rem; }
.continue-reading-button { display: inline-flex; min-width: 78px; min-height: 44px; align-items: center; justify-content: center; padding: 8px 17px; color: #fff; border-radius: 999px; background: var(--ink); text-align: center; font-size: .86rem; font-weight: 600; }
html[data-theme="kitab"] .continue-reading-button { color: #24180d; background: #ead7a5; }
.quran-dotcom-direction .directory-content { padding-top: 42px; }
.quran-dotcom-direction .reading-shortcuts { padding-bottom: 32px; margin-bottom: 38px; border-bottom: 1px solid var(--line); }
.quran-dotcom-direction .directory-heading { margin-bottom: 20px; }
.quran-dotcom-direction .source-notice { color: var(--ink); border-color: #ead8c7; background: var(--notice-bg); }
.quran-dotcom-direction .source-notice-inner > div > span { color: #fff; background: var(--notice-brown); }
.quran-dotcom-direction .source-notice strong,
.quran-dotcom-direction .source-notice a { color: var(--notice-brown); }

/* Reading screen */
.reader-app { --reader-width: 1024px; background: var(--surface); }
.reader-appbar { position: sticky; z-index: 100; top: 0; border-bottom: 1px solid var(--line); background: var(--surface); }
.reader-appbar-grid { display: grid; grid-template-columns: 180px minmax(420px, 1fr) 180px; min-height: 118px; align-items: center; gap: 24px; }
.reader-back { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; gap: 10px; color: var(--ink); font-size: .86rem; font-weight: 600; }
.reader-back > span:first-child { color: var(--forest); font-size: 1.15rem; }
.reader-switcher { display: grid; justify-items: center; gap: 10px; }
.reader-neighbours { display: grid; width: min(420px, 100%); grid-template-columns: 1fr 1fr; gap: 8px; }
.reader-neighbour { display: flex; min-height: 44px; align-items: center; gap: 10px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.reader-neighbour-next { justify-content: flex-end; text-align: right; }
.reader-neighbour > span:first-child:last-child, .reader-neighbour > span:last-child:first-child { color: var(--forest); font-size: 1.15rem; }
.reader-neighbour-copy { display: grid; line-height: 1.15; }
.reader-neighbour-copy small { color: var(--ink-soft); font-size: .52rem; }
.reader-neighbour-copy strong { font-size: .75rem; font-weight: 600; }
.reader-selectors { display: flex; gap: 8px; }
.reader-selectors select { min-height: 44px; padding: 0 32px 0 12px; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: .84rem; }
.reader-app-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.reader-settings-button { display: inline-flex; min-height: 44px; align-items: center; gap: 8px; padding: 0 12px; color: var(--ink); border: 0; background: transparent; cursor: pointer; font-size: .84rem; font-weight: 600; }
.reader-settings-button svg { width: 16px; color: var(--forest); }
.reader-app .reader-main { padding: 0 0 90px; background: var(--surface); }
.reader-shell { width: min(calc(100% - 48px), var(--reader-width)); margin-inline: auto; }
.reader-chapter-heading { padding: 48px 0 35px; text-align: center; }
.reader-chapter-heading .reader-arabic-title { margin: 0 0 5px; color: var(--forest); font-size: clamp(2.4rem, 5vw, 3.8rem); line-height: 1.35; }
.reader-chapter-heading h1 { margin: 0; font-size: clamp(1.625rem, 2vw, 1.75rem); letter-spacing: -.02em; font-weight: 600; }
.reader-chapter-heading > p:last-child { margin: 4px 0 0; color: var(--ink-soft); font-size: .78rem; }
.reader-app .reader-status { width: fit-content; max-width: 100%; margin: 0 auto 20px; padding: 9px 14px; border-radius: 999px; text-align: center; font-size: .78rem; line-height: 1.45; }
.reader-app .bismillah { padding: 28px 20px 45px; font-size: clamp(2rem, 4vw, 3.15rem); }
.reader-app .verse-list { gap: 0; border-top: 1px solid var(--line); }
.reader-app .verse-card { position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 24px; padding: 36px 4px 40px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; content-visibility: auto; contain-intrinsic-block-size: auto 330px; }
.reader-app .verse-card:target { border-color: var(--gold); box-shadow: inset 3px 0 0 var(--gold); }
.reader-app .verse-top { display: flex; align-items: flex-start; flex-direction: column; justify-content: flex-start; gap: 12px; grid-column: 1; grid-row: 1 / span 3; }
.reader-app .verse-number { width: 44px; min-width: 44px; height: 44px; color: var(--forest); border-color: var(--gold); font-size: .82rem; }
.reader-app .verse-actions { flex-direction: column; }
.reader-app .verse-action { width: 44px; height: 44px; border: 0; background: transparent; }
.reader-app .verse-arabic { grid-column: 2; margin: 0 0 18px; line-height: 2.15; }
.reader-app .verse-translation { grid-column: 2; max-width: 920px; color: var(--ink); font-size: 1.125rem; line-height: 1.78; }
.reader-app .footnote-list { grid-column: 2; }
.reader-app .reader-pagination { margin-top: 32px; }
.reader-footer { color: var(--ink-soft); border-top: 1px solid var(--line); background: var(--surface-soft); }
.reader-footer .reader-shell { display: flex; min-height: 60px; align-items: center; justify-content: space-between; font-size: .65rem; }
.setting-note { margin: 0; color: var(--ink-soft); font-size: .76rem; }

@media (max-width: 900px) {
  .directory-intro-grid { grid-template-columns: 1fr; gap: 30px; }
  .continue-reading { max-width: 440px; }
  .reader-appbar-grid { grid-template-columns: auto 1fr auto; min-height: 92px; gap: 12px; }
  .reader-back span:last-child, .reader-settings-button { font-size: 0; }
  .reader-settings-button svg { width: 20px; }
  .reader-neighbour-copy small { display: none; }
}

@media (max-width: 680px) {
  body { font-size: 16px; }
  .directory-intro { padding: 38px 0 32px; }
  .directory-intro h1 { font-size: clamp(2rem, 10vw, 3rem); }
  .directory-heading { align-items: stretch; flex-direction: column; }
  .directory-tools { width: 100%; }
  .surah-filterbar { align-items: stretch; flex-direction: column; }
  .surah-filterbar .filter-field { width: 100%; }
  .surah-filterbar .result-count { margin: 0; }
  .quran-app-home .surah-grid { grid-template-columns: 1fr; }
  .reading-shortcuts { align-items: flex-start; flex-direction: column; }
  .source-notice-inner { align-items: flex-start; flex-direction: column; }
  .reader-appbar-grid { grid-template-columns: 44px 1fr 96px; grid-template-rows: 44px auto; min-height: 142px; gap: 8px 12px; padding-block: 10px; }
  .reader-back { grid-column: 1; grid-row: 1; }
  .reader-switcher { width: 100%; grid-column: 1 / -1; grid-row: 2; }
  .reader-app-actions { grid-column: 3; grid-row: 1; }
  .reader-back span:last-child { display: none; }
  .reader-neighbours { width: 100%; }
  .reader-neighbour { padding: 4px 8px; }
  .reader-neighbour-copy strong { max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .reader-selectors { display: grid; width: 100%; grid-template-columns: 1fr 1fr; }
  .reader-selectors label:first-child { min-width: 0; }
  .reader-selectors select { width: 100%; }
  .reader-app-actions .icon-button { width: 44px; height: 44px; flex: 0 0 44px; }
  .reader-shell { width: min(calc(100% - 28px), var(--reader-width)); }
  .reader-chapter-heading { padding-top: 35px; }
  .reader-app .reader-status { border-radius: 10px; }
  .reader-app .verse-card { grid-template-columns: 44px minmax(0,1fr); gap: 14px; padding: 30px 0 34px; }
  .reader-app .verse-number { width: 44px; min-width: 44px; height: 44px; }
  .reader-app .verse-action { width: 44px; height: 44px; }
  .reader-app .verse-arabic { font-size: min(var(--arabic-size), 2.875rem); line-height: 2; }
  .reader-app .verse-translation { font-size: 1.0625rem; line-height: 1.75; }
  .reader-app .reader-pagination { grid-template-columns: 1fr; }
  .quran-search-hero { padding: 38px 0 42px; }
  .search-landing h1 { font-size: 2.25rem; }
  .search-landing-copy { font-size: .94rem; }
  .search-landing-actions { width: 100%; }
  .search-landing-actions a { flex: 1; }
  .start-reading-section .continue-reading { min-height: 145px; grid-template-columns: 74px minmax(0, 1fr); gap: 16px; padding: 20px; }
  .continue-reading-arabic { font-size: 1.9rem; }
  .continue-reading-button { grid-column: 1 / -1; width: 100%; }
}

/* Quran product parity pass — measured from Quran.com and Quran NU, rebuilt locally. */
:root {
  --shell: 1148px;
  --reader-width: 1160px;
  --line: #e8e6e3;
  --line-strong: #d8d3ce;
  --ink-soft: #67625d;
  --shadow-sm: 0 8px 24px rgba(23, 20, 17, .055);
}

.quran-app-home .site-header { min-height: 64px; }
.quran-app-home .header-inner { min-height: 64px; }
.quran-app-home .quran-search-hero { padding: 30px 0 26px; }
.quran-app-home .search-landing { max-width: 820px; }
.quran-app-home .directory-kicker { margin-bottom: 8px; font-size: .72rem; letter-spacing: .11em; }
.quran-app-home .search-landing h1 { font-size: 2.5rem; line-height: 1.2; letter-spacing: -.035em; }
.quran-app-home .search-landing-copy { margin-top: 10px; font-size: 1rem; line-height: 1.55; }
.quran-app-home .hero-search-wrap { max-width: 750px; margin-top: 20px; }
.quran-app-home .hero-search-wrap .quran-search { min-height: 56px; border-radius: 14px; box-shadow: 0 8px 22px rgba(23, 20, 17, .06); }
.quran-app-home .search-landing-actions { margin-top: 12px; }
.quran-app-home .search-landing-actions a { min-height: 40px; padding-inline: 18px; border-radius: 14px; font-size: .875rem; }

.start-reading-section { padding: 40px 0 44px; background: #fafafa; }
.start-reading-heading { margin-bottom: 22px; }
.start-reading-heading h2 { font-size: 2rem; line-height: 1.35; letter-spacing: -.025em; }
.start-reading-heading > a { font-size: .875rem; text-decoration: underline; text-underline-offset: 3px; }
.start-reading-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.start-reading-section .continue-reading { min-height: 174px; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 1fr auto; gap: 12px 20px; padding: 22px 24px; border-color: transparent; border-radius: 15px; background: #fff; box-shadow: 0 4px 16px rgba(23, 20, 17, .07); }
.start-reading-section .continue-reading:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(23, 20, 17, .09); }
.start-reading-section .continue-reading-arabic { grid-column: 1 / -1; align-self: center; font-size: 3.2rem; text-align: left; }
.start-reading-section .continue-reading-copy { grid-column: 1; grid-row: 2; }
.start-reading-section .continue-reading-button { grid-column: 2; grid-row: 2; align-self: end; }
.start-reading-section .continue-reading-copy strong { font-size: 1.375rem; line-height: 1.3; }
.start-reading-section .continue-reading-copy > span:last-child { font-size: .875rem; }
.start-reading-section .continue-reading-button { min-width: 68px; min-height: 36px; padding-inline: 16px; }
.reading-companions { display: grid; gap: 14px; }
.reading-companions > a { display: grid; min-height: 80px; grid-template-columns: 42px minmax(0, 1fr) 18px; align-items: center; gap: 14px; padding: 15px 18px; border: 1px solid transparent; border-radius: 15px; background: #fff; box-shadow: 0 4px 16px rgba(23, 20, 17, .055); transition: border-color var(--transition-fast), box-shadow var(--transition), transform var(--transition-fast); }
.reading-companions > a:hover { border-color: var(--line-strong); transform: translateY(-1px); box-shadow: 0 8px 22px rgba(23, 20, 17, .08); }
.reading-companions .companion-icon { display: grid; width: 40px; height: 40px; place-items: center; color: #fff; border-radius: 50%; background: var(--notice-brown); font-size: .76rem; font-weight: 700; }
.reading-companions > a > span:nth-child(2) { display: grid; gap: 3px; }
.reading-companions strong { font-size: 1rem; line-height: 1.3; letter-spacing: -.01em; }
.reading-companions small { color: var(--ink-soft); font-size: .8rem; line-height: 1.45; }
.reading-companions > a > span:last-child { color: var(--ink-soft); font-size: 1.5rem; }
.khatam-planner { margin-top: 16px; padding: clamp(22px, 4vw, 34px); border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: 0 4px 16px rgba(23, 20, 17, .055); }
.khatam-heading { display: flex; align-items: end; justify-content: space-between; gap: 40px; }
.khatam-heading h3 { margin: 4px 0 7px; font-size: clamp(1.3rem, 2.2vw, 1.8rem); line-height: 1.25; letter-spacing: -.035em; }
.khatam-heading p { max-width: 620px; margin: 0; color: var(--ink-soft); font-size: .83rem; }
.khatam-options { display: flex; flex: 0 0 auto; gap: 7px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.khatam-options button { min-height: 44px; padding: 0 16px; color: var(--ink-soft); border: 0; border-radius: 8px; background: transparent; cursor: pointer; font-size: .78rem; font-weight: 750; }
.khatam-options button:hover { color: var(--ink); }
.khatam-options button[aria-pressed="true"] { color: #fff; background: var(--notice-brown); }
html[data-theme="kitab"] .khatam-options button[aria-pressed="true"] { color: #24180d; background: var(--gold); }
.khatam-state { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding-top: 22px; margin-top: 22px; border-top: 1px solid var(--line); }
.khatam-state > div { display: grid; gap: 3px; }
.khatam-state strong { font-size: .9rem; }
.khatam-state span { color: var(--ink-soft); font-size: .75rem; }
.khatam-reset { min-height: 44px; padding: 0 12px; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 9px; background: transparent; cursor: pointer; font-size: .72rem; font-weight: 700; }
.khatam-reset:hover { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
.khatam-track { height: 5px; margin-top: 18px; overflow: hidden; border-radius: 99px; background: var(--line); }
.khatam-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--notice-brown); transition: width var(--transition-slow); }
html[data-theme="kitab"] .start-reading-section { background: var(--surface-soft); }
html[data-theme="kitab"] .start-reading-section .continue-reading,
html[data-theme="kitab"] .reading-companions > a,
html[data-theme="kitab"] .khatam-planner { background: var(--surface); }
html[data-theme="kitab"] .quran-search-hero { background-image: radial-gradient(circle at 50% -30%, rgba(216, 180, 111, .12), transparent 52%); }
html[data-theme="kitab"] .segmented-control button.is-active,
html[data-theme="kitab"] .reading-companions .companion-icon,
html[data-theme="kitab"] .quran-dotcom-direction .source-notice-inner > div > span { color: #24180d; background: var(--gold); }
html[data-theme="kitab"] .reader-app .reader-main { background-image: linear-gradient(90deg, transparent, rgba(240, 217, 155, .018) 50%, transparent); }

.quran-app-home .directory-content { padding-top: 34px; }
.quran-app-home .reading-shortcuts { align-items: center; padding: 0 0 30px; margin-bottom: 34px; }
.reading-shortcuts-copy { display: grid; min-width: 160px; gap: 2px; }
.reading-shortcuts-copy strong { font-size: 1rem; }
.reading-shortcuts-copy span { color: var(--ink-soft); font-size: .75rem; }
.quran-app-home .popular-card strong { font-size: .875rem; }
.quran-app-home .directory-heading h2 { font-size: 2rem; line-height: 1.35; }
.quran-app-home .surah-filterbar { padding: 16px 0 20px; }
.quran-app-home .surah-grid { gap: 12px; }
.quran-app-home .surah-card { min-height: 104px; padding: 16px 18px; border-radius: 12px; box-shadow: none; }
.quran-app-home .surah-card:hover { border-color: var(--notice-brown); box-shadow: 0 7px 20px rgba(23, 20, 17, .055); }
.quran-app-home .surah-card .surah-number,
.quran-app-home .surah-card .surah-arrow { color: var(--notice-brown); }
.segmented-control button.is-active { background: var(--notice-brown); }
.quran-search:focus-within,
.filter-field:focus-within { border-color: var(--notice-brown); box-shadow: 0 0 0 3px color-mix(in srgb, var(--notice-brown) 14%, transparent); }
.search-results:not([hidden]) { animation: quran-pop var(--transition-fast) both; transform-origin: top center; }
@keyframes quran-pop {
  from { opacity: 0; transform: translateY(-4px) scale(.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
body,
.site-header,
.reader-appbar,
.reader-brandbar,
.reader-footer,
.verse-card,
.surah-card { transition: color var(--transition), background-color var(--transition), border-color var(--transition-fast); }

.reader-app { --reader-width: 1160px; }
.reader-appbar { position: sticky; top: 0; background: var(--surface); }
.reader-brandbar { border-bottom: 1px solid var(--line); background: var(--surface); }
.reader-brandbar-inner { display: flex; min-height: 62px; align-items: center; justify-content: space-between; gap: 24px; }
.reader-brandbar-inner nav { display: flex; align-items: center; gap: 18px; }
.reader-brandbar-inner nav > a { color: var(--ink-soft); font-size: .8rem; font-weight: 600; }
.reader-brandbar-inner nav > a:hover { color: var(--ink); }
.reader-brandbar-inner .brand-mark { width: 38px; font-size: 21px; }
.reader-brandbar-inner .brand-copy strong { font-size: .84rem; }
.reader-brandbar-inner .brand-copy small { font-size: .66rem; }
.reader-controlbar { min-height: 84px; }
.reader-appbar-grid { grid-template-columns: 190px minmax(420px, 1fr) 190px; }
.reader-neighbour { border-radius: 12px; }
.reader-selectors select { border-radius: 10px; }
.reader-context { display: flex; min-height: 18px; align-items: center; justify-content: center; gap: 9px; color: var(--ink-soft); font-size: .66rem; white-space: nowrap; }
.reader-context span + span::before, .reader-context strong::before { margin-right: 9px; color: var(--line-strong); content: "·"; }
.reader-context strong { color: var(--notice-brown); font-size: inherit; }
.reader-progress-track { display: block; width: min(100%, 430px); height: 2px; overflow: hidden; border-radius: 999px; background: var(--line); }
.reader-progress-track > span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--notice-brown); transition: width 180ms linear; }
.reader-app .reader-main { padding-bottom: 80px; }
.reader-chapter-heading { padding: 20px 0 10px; }
.reader-chapter-heading .reader-arabic-title { margin-bottom: 0; font-size: 2.35rem; line-height: 1.3; }
.reader-chapter-heading h1 { font-size: 1.45rem; line-height: 1.3; }
html[data-theme="kitab"] .reader-chapter-heading .reader-arabic-title,
html[data-theme="kitab"] .reader-chapter-heading h1 { color: var(--ink); }
html[data-theme="kitab"] .reader-app .bismillah { color: var(--ink); }
.reader-chapter-heading > p:last-child { margin-top: 2px; font-size: .8rem; }
.reader-app .reader-status { margin-bottom: 10px; color: var(--notice-brown); border-color: #e5c9ac; background: var(--notice-bg); }
.reader-app .bismillah { padding: 16px 20px 22px; font-size: 2.65rem; line-height: 1.55; }
.reader-loading { display: grid; min-height: 70vh; grid-template-columns: 52px minmax(0, 1fr); align-content: start; gap: 26px 28px; padding: 30px 8px; }
.reader-loading-number { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface-soft); }
.reader-loading-copy { display: grid; align-content: start; gap: 14px; padding-top: 7px; }
.reader-loading-copy i { display: block; height: 13px; border-radius: 999px; background: linear-gradient(90deg, var(--surface-soft), var(--line), var(--surface-soft)); background-size: 220% 100%; animation: reader-loading 1.4s ease-in-out infinite; }
.reader-loading-copy i:nth-child(1) { width: 92%; height: 22px; justify-self: end; }
.reader-loading-copy i:nth-child(2) { width: 78%; }
.reader-loading-copy i:nth-child(3) { width: 54%; }
@keyframes reader-loading { 0%, 100% { background-position: 100% 0; opacity: .65; } 50% { background-position: 0 0; opacity: 1; } }
.reader-app .verse-card { grid-template-columns: 52px minmax(0, 1fr); gap: 28px; padding: 16px 8px 32px; contain-intrinsic-block-size: auto 280px; }
.reader-app .verse-number { width: 42px; min-width: 42px; height: 42px; color: var(--notice-brown); border-color: #cba884; }
.reader-app .verse-action { color: #77716b; }
html[data-theme="kitab"] .reader-app .verse-number { color: var(--ink); border-color: var(--ink); }
html[data-theme="kitab"] .reader-app .verse-action,
html[data-theme="kitab"] .reader-app .verse-action:hover,
html[data-theme="kitab"] .reader-app .verse-action.is-saved { color: var(--ink); }
.reader-app .verse-arabic { margin-bottom: 20px; font-size: var(--arabic-size); line-height: 2.05; }
.reader-app .verse-translation { max-width: 940px; font-size: 1.125rem; line-height: 1.78; }

/* Mode Malam: hitam pekat dengan hierarki putih dan abu-abu netral. */
html[data-theme="night"] .quran-app-home,
html[data-theme="night"] .reader-app,
html[data-theme="night"] .reader-app .reader-main,
html[data-theme="night"] .bookmarks-main { background: var(--paper); }
html[data-theme="night"] .quran-search-hero { background: var(--paper); background-image: none; }
html[data-theme="night"] .start-reading-section { background: #141412; }
html[data-theme="night"] .start-reading-section .continue-reading,
html[data-theme="night"] .reading-companions > a,
html[data-theme="night"] .khatam-planner { background: var(--surface); }
html[data-theme="night"] .continue-card,
html[data-theme="night"] .reader-hero { color: var(--ink); border-color: var(--line); background: var(--surface); }
html[data-theme="night"] .button-primary,
html[data-theme="night"] .continue-reading-button,
html[data-theme="night"] .search-landing-actions a:first-child,
html[data-theme="night"] .segmented-control button.is-active,
html[data-theme="night"] .language-options button[aria-pressed="true"],
html[data-theme="night"] .khatam-options button[aria-pressed="true"] { color: var(--paper); border-color: var(--ink); background: var(--ink); }
html[data-theme="night"] .reader-status,
html[data-theme="night"] .reader-app .reader-status { color: var(--ink); border-color: var(--line-strong); background: var(--notice-bg); }
html[data-theme="night"] .reader-chapter-heading .reader-arabic-title,
html[data-theme="night"] .reader-chapter-heading h1,
html[data-theme="night"] .reader-app .bismillah,
html[data-theme="night"] .reader-app .verse-arabic,
html[data-theme="night"] .reader-app .verse-translation { color: var(--ink); }
html[data-theme="night"] .reader-app .verse-number { color: var(--ink); border-color: var(--ink); }
html[data-theme="night"] .reader-app .verse-action,
html[data-theme="night"] .reader-app .verse-action:hover,
html[data-theme="night"] .reader-app .verse-action.is-saved { color: var(--ink); }
html[data-theme="night"] .reading-companions .companion-icon,
html[data-theme="night"] .quran-dotcom-direction .source-notice-inner > div > span { color: var(--paper); background: var(--ink); }
html[data-theme="night"] .site-footer { color: var(--ink); background: #0b0b0a; border-top: 1px solid var(--line); }
.setting-help { display: block; max-width: 250px; color: var(--ink-soft); font-size: .7rem; font-weight: 400; line-height: 1.45; }
.toggle-row .setting-label { margin-bottom: 4px; }
.ngaji-mode .reader-brandbar,
.ngaji-mode .reader-chapter-heading,
.ngaji-mode .reader-status,
.ngaji-mode .reader-footer,
.ngaji-mode .reader-pagination { display: none; }
.ngaji-mode .reader-main { padding-top: 18px; }
.ngaji-mode .reader-controlbar { min-height: 70px; }
.ngaji-mode .verse-card { scroll-margin-top: 88px; }

@media (max-width: 900px) {
  .start-reading-grid { grid-template-columns: 1fr; }
  .start-reading-section .continue-reading { max-width: none; }
  .reader-appbar-grid { grid-template-columns: auto 1fr auto; }
  .bookmarks-hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .khatam-heading { align-items: stretch; flex-direction: column; gap: 20px; }
  .khatam-options { align-self: start; }
}

@media (max-width: 680px) {
  html { scroll-padding-top: 0; }
  .quran-app-home .site-header, .quran-app-home .header-inner { min-height: 58px; }
  .quran-app-home .quran-search-hero { padding: 27px 0 25px; }
  .quran-app-home .search-landing h1 { font-size: 2.125rem; }
  .quran-app-home .hero-search-wrap { margin-top: 18px; }
  .start-reading-section { padding: 30px 0 34px; }
  .start-reading-heading h2, .quran-app-home .directory-heading h2 { font-size: 1.625rem; }
  .start-reading-section .continue-reading { min-height: 166px; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 1fr auto; gap: 10px 14px; padding: 18px; }
  .start-reading-section .continue-reading-arabic { grid-column: 1 / -1; font-size: 2.45rem; }
  .start-reading-section .continue-reading-button { grid-column: 2; grid-row: 2; width: auto; }
  .reading-companions > a { min-height: 78px; padding: 14px; }
  .khatam-planner { padding: 20px; }
  .khatam-options { display: grid; width: 100%; grid-template-columns: repeat(3, 1fr); }
  .khatam-options button { padding-inline: 8px; }
  .khatam-state { align-items: start; flex-direction: column; }
  .reading-shortcuts-copy { min-width: 0; }
  .reader-brandbar-inner { min-height: 58px; }
  .reader-brandbar { overflow: hidden; }
  .reader-brandbar-inner .brand-copy small, .reader-brandbar-inner nav > a { display: none; }
  .reader-brandbar-inner nav { gap: 0; }
  .theme-menu { position: fixed; top: 64px; right: 16px; }
  .bookmarks-hero { padding: 48px 0 40px; }
  .bookmarks-hero h1 { font-size: 2.45rem; }
  .bookmarks-content { padding: 34px 0 70px; }
  .bookmark-card { padding: 20px; }
  .bookmark-card-heading { gap: 12px; }
  .bookmark-remove span { display: none; }
  .bookmark-arabic { font-size: 2.15rem; line-height: 1.9; }
  .bookmark-translation { font-size: 1rem; }
  .reader-controlbar { min-height: 110px; }
  .reader-appbar-grid { grid-template-columns: 44px 1fr 44px; grid-template-rows: 36px auto; padding-block: 7px; }
  .reader-app-actions { grid-column: 3; }
  .reader-chapter-heading { padding: 18px 0 9px; }
  .reader-chapter-heading .reader-arabic-title { font-size: 2.15rem; }
  .reader-app .bismillah { padding: 15px 8px 20px; font-size: 2.25rem; line-height: 1.55; }
  .reader-app .verse-card { grid-template-columns: 42px minmax(0,1fr); gap: 10px; padding: 14px 0 28px; }
  .reader-app .verse-card { scroll-margin-top: 182px; }
  .reader-app .verse-arabic { font-size: min(var(--arabic-size), 2.7rem); line-height: 2; }
  .reader-app .verse-translation { font-size: 1.125rem; line-height: 1.76; }
  .reader-loading { grid-template-columns: 42px minmax(0, 1fr); gap: 24px 10px; padding: 28px 0; }
  .reader-loading-number { width: 40px; height: 40px; }
  .reader-appbar.is-compact .reader-brandbar { display: none; }
  .reader-appbar.is-compact .reader-controlbar { min-height: 58px; grid-template-columns: 44px minmax(0, 1fr) 44px; grid-template-rows: 44px; gap: 8px; padding-block: 7px; }
  .reader-appbar.is-compact .reader-back { grid-column: 1; grid-row: 1; }
  .reader-appbar.is-compact .reader-switcher { grid-column: 2; grid-row: 1; }
  .reader-appbar.is-compact .reader-neighbours { display: none; }
  .reader-appbar.is-compact .reader-selectors { grid-template-columns: minmax(0, 1fr) 90px; gap: 6px; }
  .reader-appbar.is-compact .reader-selectors select { padding-inline: 8px 24px; font-size: .78rem; }
  .reader-appbar.is-compact .reader-context { display: none; }
  .reader-appbar.is-compact .reader-progress-track { position: absolute; right: 0; bottom: 0; left: 0; width: 100%; }
  .reader-appbar.is-compact .reader-app-actions { grid-column: 3; grid-row: 1; }
  .reader-appbar.is-compact + .reader-main .verse-card { scroll-margin-top: 72px; }
  .ngaji-mode .reader-controlbar { min-height: 58px; }
}

/* Yasin and Tahlil — calm devotional reading */
.tahlil-page { --tahlil-arabic-size: 2.75rem; background: var(--paper); }
.tahlil-main { min-height: calc(100vh - 150px); }
.tahlil-reader-controlbar { grid-template-columns: 190px minmax(420px, 1fr) 190px; }
.tahlil-reader-switcher { display: grid; min-width: 0; justify-items: center; gap: 8px; }
.tahlil-reader-title { display: flex; align-items: center; justify-content: center; gap: 9px; color: var(--ink-soft); font-size: .72rem; }
.tahlil-reader-title strong { color: var(--ink); font-size: .86rem; }
.tahlil-reader-title span::before { margin-right: 9px; color: var(--line-strong); content: "·"; }
.tahlil-reader-switcher .reader-progress-track { width: min(100%, 430px); }
.tahlil-reader-main { min-height: calc(100vh - 146px); }
.tahlil-hero { padding: clamp(54px, 7vw, 92px) 0; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, color-mix(in srgb, var(--notice-bg) 64%, var(--paper)), var(--paper)); }
.tahlil-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 470px); align-items: end; gap: clamp(40px, 7vw, 96px); }
.tahlil-hero h1 { max-width: 720px; margin: 7px 0 16px; font-size: clamp(2.7rem, 5.8vw, 5.2rem); line-height: .98; letter-spacing: -.065em; }
.tahlil-hero p:not(.directory-kicker) { max-width: 680px; margin: 0; color: var(--ink-soft); font-size: clamp(.94rem, 1.4vw, 1.08rem); line-height: 1.75; }
.tahlil-primary-links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tahlil-primary-links a { display: grid; min-height: 165px; align-content: space-between; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); transition: border-color var(--transition-fast), box-shadow var(--transition), transform var(--transition-fast); }
.tahlil-primary-links a:hover { border-color: var(--notice-brown); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.tahlil-primary-links a.is-active { color: var(--paper); border-color: var(--ink); background: var(--ink); }
.tahlil-primary-links a > span { font-family: "Noto Naskh Arabic", serif; font-size: 2.15rem; line-height: 1; }
.tahlil-primary-links strong { margin-top: 20px; font-size: .92rem; line-height: 1.3; }
.tahlil-primary-links small { margin-top: 4px; color: var(--ink-soft); font-size: .68rem; }
.tahlil-primary-links a.is-active small { color: color-mix(in srgb, var(--paper) 68%, transparent); }
.tahlil-toolbar { position: sticky; z-index: 80; top: 78px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(16px); }
.tahlil-toolbar-inner { display: flex; min-height: 66px; align-items: center; justify-content: space-between; gap: 24px; }
.tahlil-section-nav { display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tahlil-section-nav::-webkit-scrollbar { display: none; }
.tahlil-section-nav a { min-height: 40px; padding: 9px 12px; color: var(--ink-soft); border-radius: 9px; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.tahlil-section-nav a:hover { color: var(--ink); background: var(--surface-soft); }
.tahlil-view-controls { display: flex; flex: 0 0 auto; align-items: center; gap: 6px; }
.tahlil-view-controls > button { min-height: 44px; padding: 0 13px; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 9px; background: var(--surface); cursor: pointer; font-size: .72rem; font-weight: 750; }
.tahlil-view-controls > button[aria-pressed="true"] { color: var(--paper); border-color: var(--ink); background: var(--ink); }
.tahlil-view-controls label { display: flex; min-height: 40px; align-items: center; gap: 7px; padding: 0 10px; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 9px; background: var(--surface); font-size: .65rem; font-weight: 700; }
.tahlil-view-controls input { width: 82px; accent-color: var(--notice-brown); }
.tahlil-progress { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; overflow: hidden; background: transparent; }
.tahlil-progress > span { display: block; width: 0; height: 100%; background: var(--notice-brown); transition: width 120ms linear; }
.tahlil-content { padding: 12px 0 110px; }
.tahlil-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; align-items: start; gap: clamp(44px, 7vw, 86px); }
.tahlil-list { min-width: 0; }
.tahlil-group { scroll-margin-top: 168px; margin-bottom: 64px; }
.tahlil-group:last-child { margin-bottom: 0; }
.tahlil-group-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding-bottom: 17px; border-bottom: 2px solid var(--ink); }
.tahlil-group-heading span { color: var(--notice-brown); font-size: .66rem; font-weight: 800; letter-spacing: .12em; }
.tahlil-group-heading h2 { margin: 0; font-size: clamp(1.35rem, 2.7vw, 2rem); line-height: 1.2; letter-spacing: -.035em; }
.tahlil-item { display: grid; scroll-margin-top: 168px; grid-template-columns: 52px minmax(0, 1fr); gap: 28px; padding: 16px 8px 32px; border-bottom: 1px solid var(--line); }
.tahlil-item-content { min-width: 0; }
.tahlil-item-heading { display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: center; gap: 12px; }
.tahlil-number { display: grid; width: 42px; height: 42px; place-items: center; color: var(--notice-brown); border: 1px solid #cba884; border-radius: 50%; font-size: .68rem; font-weight: 800; letter-spacing: .04em; }
.tahlil-item-heading h3 { margin: 0; font-size: .91rem; line-height: 1.35; letter-spacing: -.01em; }
.tahlil-copy { display: grid; width: 44px; height: 44px; padding: 0; place-items: center; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 50%; background: var(--surface); cursor: pointer; }
.tahlil-copy:hover { color: var(--ink); border-color: var(--notice-brown); }
.tahlil-copy svg { width: 17px; }
.tahlil-arabic { margin: 26px 0 20px; color: var(--ink); font-family: "Noto Naskh Arabic", serif; font-size: var(--tahlil-arabic-size); font-weight: 500; line-height: 2; text-align: right; text-wrap: pretty; }
.tahlil-transliteration { margin: 0 0 14px; color: var(--notice-brown); font-size: 1rem; line-height: 1.75; }
.tahlil-meaning { max-width: 880px; margin: 0; color: var(--ink-soft); font-size: 1rem; line-height: 1.78; }
.hide-tahlil-transliteration .tahlil-transliteration, .hide-tahlil-meaning .tahlil-meaning { display: none; }
.tahlil-note { position: sticky; top: 174px; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--notice-bg); }
.tahlil-note strong { display: block; margin-bottom: 8px; font-size: .85rem; }
.tahlil-note p { margin: 0; color: var(--ink-soft); font-size: .75rem; line-height: 1.65; }
.tahlil-loading { display: grid; gap: 18px; padding: 30px 0; }
.tahlil-loading i { display: block; height: 120px; border-radius: 16px; background: linear-gradient(90deg, var(--surface-soft), var(--line), var(--surface-soft)); background-size: 220% 100%; animation: reader-loading 1.4s ease-in-out infinite; }
html[data-theme="kitab"] .tahlil-hero { background: linear-gradient(180deg, var(--surface-soft), var(--paper)); }
html[data-theme="kitab"] .tahlil-number,
html[data-theme="night"] .tahlil-number { color: var(--ink); border-color: var(--ink); }
html[data-theme="night"] .tahlil-primary-links a.is-active,
html[data-theme="night"] .tahlil-view-controls > button[aria-pressed="true"] { color: var(--paper); border-color: var(--ink); background: var(--ink); }
html[data-theme="night"] .tahlil-note { background: var(--surface); }

@media (max-width: 900px) {
  .tahlil-reader-controlbar { grid-template-columns: auto 1fr auto; }
  .tahlil-hero-grid, .tahlil-layout { grid-template-columns: 1fr; }
  .tahlil-primary-links { max-width: 620px; }
  .tahlil-note { position: static; order: -1; }
  .tahlil-toolbar-inner { align-items: stretch; flex-direction: column; gap: 6px; padding-block: 8px; }
  .tahlil-section-nav { order: 2; }
  .tahlil-view-controls { justify-content: space-between; }
  .tahlil-group, .tahlil-item { scroll-margin-top: 212px; }
}

@media (max-width: 680px) {
  .tahlil-reader-controlbar { min-height: 110px; grid-template-columns: 44px 1fr 44px; grid-template-rows: 36px auto; padding-block: 7px; }
  .tahlil-reader-switcher { grid-column: 1 / -1; grid-row: 2; gap: 6px; }
  .tahlil-reader-title span { display: none; }
  .tahlil-page .reader-appbar.is-compact .tahlil-reader-switcher { grid-column: 2; grid-row: 1; }
  .tahlil-page .reader-appbar.is-compact .tahlil-section-nav { display: none; }
  .tahlil-page .reader-appbar.is-compact .tahlil-reader-title { height: 42px; }
  .tahlil-page .header-inner { min-height: 58px; }
  .tahlil-hero { padding: 38px 0 42px; }
  .tahlil-hero h1 { font-size: 2.45rem; line-height: 1.05; }
  .tahlil-primary-links { grid-template-columns: 1fr 1fr; gap: 8px; }
  .tahlil-primary-links a { min-height: 142px; padding: 16px; }
  .tahlil-primary-links a > span { font-size: 1.8rem; }
  .tahlil-toolbar { top: 58px; }
  .tahlil-view-controls > button { flex: 1; }
  .tahlil-view-controls label { flex: 1.5; justify-content: center; }
  .tahlil-view-controls input { min-width: 0; width: 62px; }
  .tahlil-section-nav a { flex: 0 0 auto; }
  .tahlil-content { padding-top: 4px; }
  .tahlil-layout { gap: 28px; }
  .tahlil-group { margin-bottom: 44px; }
  .tahlil-group-heading { align-items: start; flex-direction: column-reverse; gap: 5px; }
  .tahlil-item { grid-template-columns: 42px minmax(0, 1fr); gap: 10px; padding: 14px 0 28px; }
  .tahlil-number { width: 40px; height: 40px; }
  .tahlil-item-heading { grid-template-columns: minmax(0, 1fr) 40px; gap: 8px; }
  .tahlil-arabic { margin-top: 20px; font-size: min(var(--tahlil-arabic-size), 2.35rem); line-height: 1.9; }
  .tahlil-transliteration, .tahlil-meaning { font-size: .95rem; line-height: 1.7; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Module: components */
/*
 * Quran Manbaul Huda — UIUX Pro Max design layer
 * Server staging only. Religious datasets are not modified.
 */

:root {
  --ui-font: "Figtree", "Helvetica Neue", Arial, sans-serif;
  --arabic-font: "Noto Naskh Arabic", "Amiri", serif;
  --page: #fcfbf8;
  --panel: #ffffff;
  --panel-muted: #f6f3ef;
  --text: #181614;
  --text-muted: #625d57;
  --border: #e4e0da;
  --border-strong: #cec7be;
  --brand: #7a4d2a;
  --brand-strong: #5e371c;
  --brand-soft: #f3eae2;
  --focus: #9b5e2f;
  --danger-ui: #a13d34;
  --reading-width: 920px;
  --app-width: 1180px;
  --radius-control: 8px;
  --radius-panel: 14px;
  --elevation-menu: 0 16px 48px rgba(39, 30, 22, .12);
  --motion-fast: 160ms cubic-bezier(.2, 0, 0, 1);
  --motion: 220ms cubic-bezier(.2, 0, 0, 1);

  --paper: var(--page);
  --surface: var(--panel);
  --surface-soft: var(--panel-muted);
  --ink: var(--text);
  --ink-soft: var(--text-muted);
  --line: var(--border);
  --line-strong: var(--border-strong);
  --forest: var(--brand);
  --forest-deep: var(--brand-strong);
  --forest-soft: var(--brand-soft);
  --gold: var(--brand);
  --gold-light: #d8b88f;
  --notice-brown: var(--brand);
  --notice-bg: var(--brand-soft);
  --shadow-sm: none;
  --shadow-lg: var(--elevation-menu);
  --radius-sm: var(--radius-control);
  --radius-md: var(--radius-panel);
  --radius-lg: 18px;
  --shell: var(--app-width);
}

html[data-theme="kitab"] {
  --page: #f4edd6;
  --panel: #fbf7e9;
  --panel-muted: #eee3bf;
  --text: #1b1812;
  --text-muted: #5f584a;
  --border: #d4c392;
  --border-strong: #bba365;
  --brand: #72501d;
  --brand-strong: #513713;
  --brand-soft: #e9ddb9;
  --focus: #72501d;
  --gold-light: #d3b66d;
}

html[data-theme="night"] {
  --page: #121210;
  --panel: #1a1916;
  --panel-muted: #23211d;
  --text: #ece8df;
  --text-muted: #b8b1a7;
  --border: #38352f;
  --border-strong: #504b42;
  --brand: #c9a36b;
  --brand-strong: #e2b976;
  --brand-soft: #2c251d;
  --focus: #e2b976;
  --gold-light: #d9b77f;
  --danger-ui: #ff9d93;
  --elevation-menu: 0 18px 56px rgba(0, 0, 0, .5);
}

html {
  color-scheme: light;
  scroll-padding-top: 164px;
  background: var(--page);
}

html[data-theme="night"] { color-scheme: dark; }

body {
  min-width: 320px;
  color: var(--text);
  background: var(--page);
  font-family: var(--ui-font);
  font-size: 16px;
  line-height: 1.65;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

html[data-theme="kitab"] body {
  background-color: var(--page);
  background-image: radial-gradient(circle at 10% 6%, rgba(255,255,255,.24), transparent 30%);
}

button, input, select, textarea { font: inherit; }
button, a, select { cursor: pointer; }
svg { stroke-width: 1.8; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.shell { width: min(calc(100% - 48px), var(--app-width)); }
.reader-shell { width: min(calc(100% - 48px), var(--reading-width)); margin-inline: auto; }

.site-header,
.reader-brandbar {
  color: var(--text);
  border-color: var(--border);
  background: color-mix(in srgb, var(--page) 94%, transparent);
  backdrop-filter: blur(14px);
}

.site-header { min-height: 72px; }
.header-inner { min-height: 72px; gap: 22px; }
.brand { gap: 11px; }
.brand-mark {
  width: 42px;
  min-width: 42px;
  color: var(--brand);
  border-color: color-mix(in srgb, var(--brand) 46%, var(--border));
  background: var(--panel);
  font-family: var(--arabic-font);
  font-size: 23px;
}
.brand-copy strong { color: var(--text); font-size: .93rem; font-weight: 720; }
.brand-copy small { color: var(--text-muted); font-size: .7rem; }

.desktop-nav { gap: 0; }
.desktop-nav a,
.reader-brandbar-inner nav > a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  color: var(--text-muted);
  border-radius: var(--radius-control);
  font-size: .82rem;
  font-weight: 650;
  white-space: nowrap;
}
.desktop-nav a:hover,
.desktop-nav a.is-active,
.reader-brandbar-inner nav > a:hover,
.reader-brandbar-inner nav > a[aria-current="page"] {
  color: var(--brand-strong);
  background: var(--brand-soft);
}
.desktop-nav a.is-active::after { display: none; }

.icon-button,
.theme-toggle,
.reader-settings-button,
.verse-action,
.tahlil-copy {
  min-width: 44px;
  min-height: 44px;
  color: var(--text);
  border-color: var(--border);
  background: var(--panel);
}
.icon-button:hover,
.theme-toggle:hover,
.reader-settings-button:hover,
.verse-action:hover,
.tahlil-copy:hover {
  color: var(--brand-strong);
  border-color: var(--brand);
  background: var(--brand-soft);
  transform: none;
}

.theme-menu {
  border-color: var(--border);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--elevation-menu);
}
.theme-menu button { color: var(--text-muted); }
.theme-menu button:hover,
.theme-menu button[aria-checked="true"],
.theme-menu button.is-active {
  color: var(--brand-strong);
  background: var(--brand-soft);
}

/* Home: reading entry, not a marketing landing page */
.quran-directory { background: var(--page); }
.quran-search-hero {
  padding: clamp(54px, 7vw, 84px) 0 58px;
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--brand-soft) 70%, var(--page)), var(--page));
}
.search-landing { display: grid; justify-items: center; text-align: center; }
.directory-kicker {
  margin: 0 0 12px;
  color: var(--brand);
  font-size: .72rem;
  font-weight: 780;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.search-landing h1 {
  max-width: 760px;
  margin: 0;
  color: var(--text);
  font-size: clamp(2.15rem, 4.4vw, 3.75rem);
  font-weight: 620;
  letter-spacing: -.045em;
  line-height: 1.08;
  text-wrap: balance;
}
.search-landing-copy {
  max-width: 650px;
  margin: 16px 0 0;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.75;
}
.hero-search-wrap { width: min(760px, 100%); margin-top: 30px; }
.quran-search {
  max-width: none;
  min-height: 58px;
  padding: 0 17px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: none;
}
.quran-search:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent);
}
.quran-search input { min-height: 54px; color: var(--text); font-size: 1rem; }
.quran-search kbd { color: var(--text-muted); border-color: var(--border); background: var(--panel-muted); }
.search-results { border-color: var(--border); border-radius: 12px; background: var(--panel); box-shadow: var(--elevation-menu); text-align: left; }
.search-result { min-height: 52px; }
.search-landing-actions { display: flex; gap: 8px; margin-top: 14px; }
.search-landing-actions a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  color: var(--text-muted);
  border-radius: var(--radius-control);
  font-size: .82rem;
  font-weight: 680;
}
.search-landing-actions a:hover { color: var(--brand-strong); background: var(--brand-soft); }

.start-reading-section { padding: 58px 0 64px; background: var(--page); }
.start-reading-heading { margin-bottom: 22px; }
.start-reading-heading h2,
.directory-heading h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  font-weight: 650;
  letter-spacing: -.035em;
}
.start-reading-grid { gap: 16px; }
.continue-reading {
  min-height: 252px;
  padding: 30px;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  background: var(--panel);
  box-shadow: none;
}
.continue-reading:hover { border-color: var(--brand); background: var(--panel); transform: none; }
.continue-reading-arabic {
  color: var(--text);
  font-family: var(--arabic-font);
  font-size: 3.25rem;
  line-height: 1.35;
}
.continue-reading-label { color: var(--brand); }
.continue-reading-copy strong { color: var(--text); font-size: 1.2rem; }
.continue-reading-copy small,
.continue-reading-copy > span:last-child { color: var(--text-muted); }
.continue-reading-button {
  min-width: 92px;
  min-height: 44px;
  color: #fff;
  border-radius: var(--radius-control);
  background: var(--brand-strong);
}
html[data-theme="night"] .continue-reading-button { color: #18130e; background: var(--brand-strong); }

.reading-companions { gap: 8px; }
.reading-companions > a {
  min-height: 74px;
  padding: 13px 15px;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: none;
}
.reading-companions > a:hover { border-color: var(--brand); background: var(--brand-soft); transform: none; }
.companion-icon {
  width: 42px;
  height: 42px;
  color: var(--brand);
  border: 0;
  background: var(--brand-soft);
}
.companion-icon svg { width: 19px; }
.reading-companions strong { color: var(--text); font-size: .91rem; }
.reading-companions small { color: var(--text-muted); font-size: .74rem; }

.khatam-planner {
  margin-top: 18px;
  padding: 26px;
  border-color: var(--border);
  border-radius: var(--radius-panel);
  background: var(--panel);
  box-shadow: none;
}
.khatam-heading h3 { color: var(--text); font-size: 1.35rem; }
.khatam-heading p,
.khatam-state span { color: var(--text-muted); }
.khatam-options { border-color: var(--border); background: var(--panel-muted); }
.khatam-options button { min-height: 44px; color: var(--text-muted); }
.khatam-options button[aria-pressed="true"] { color: #fff; background: var(--brand-strong); }
.khatam-track { background: var(--border); }
.khatam-track span { background: var(--brand); }

.directory-content {
  padding: 58px 0 88px;
  border-top: 1px solid var(--border);
  background: var(--panel);
}
.reading-shortcuts {
  margin-bottom: 54px;
  padding: 0 0 38px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
}
.reading-shortcuts-copy strong { color: var(--text); }
.reading-shortcuts-copy span { color: var(--text-muted); }
.popular-grid {
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--border);
}
.popular-card {
  min-height: 154px;
  padding: 18px;
  background: var(--panel);
}
.popular-card:hover { color: var(--text); background: var(--brand-soft); box-shadow: none; }
.popular-card .arabic-name { color: var(--text); font-family: var(--arabic-font); }
.popular-card .popular-arrow,
.popular-card .popular-number { color: var(--brand); }
.popular-card small { color: var(--text-muted); }

.directory-heading { margin-bottom: 18px; }
.surah-filterbar {
  padding: 14px 0;
  border-block: 1px solid var(--border);
  background: var(--panel);
}
.filter-field { min-height: 46px; border-color: var(--border); background: var(--page); }
.filter-field input { min-height: 44px; color: var(--text); }
.segmented-control { border-color: var(--border); background: var(--page); }
.segmented-control button { min-height: 44px; color: var(--text-muted); }
.segmented-control button.is-active { color: #fff; background: var(--brand-strong); }
.result-count { color: var(--text-muted); }

.surah-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-color: var(--border);
  background: var(--panel);
}
.surah-card {
  min-height: 96px;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 13px;
  padding: 14px 16px;
  color: var(--text);
  border-color: var(--border);
  background: var(--panel);
}
.surah-card:hover { background: var(--brand-soft); }
.surah-number {
  width: 44px;
  height: 44px;
  color: var(--brand);
  border-color: var(--border-strong);
  background: transparent;
}
.surah-meta strong { color: var(--text); font-size: .9rem; }
.surah-meta small { color: var(--text-muted); font-size: .71rem; }
.surah-arabic { color: var(--text); font-family: var(--arabic-font); font-size: 1.55rem; }

/* Reader */
.reader-page { background: var(--page); }
.reader-appbar {
  position: sticky;
  z-index: 100;
  top: 0;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--page) 96%, transparent);
  backdrop-filter: blur(14px);
}
.reader-brandbar-inner { min-height: 60px; }
.reader-brandbar-inner nav { gap: 2px; }
.reader-brandbar-inner .brand-mark { width: 40px; min-width: 40px; }
.reader-controlbar {
  min-height: 88px;
  grid-template-columns: 180px minmax(420px, 1fr) 180px;
  gap: 18px;
}
.reader-back,
.reader-settings-button { min-height: 44px; color: var(--text-muted); }
.reader-back:hover { color: var(--brand-strong); }
.reader-neighbours { gap: 8px; }
.reader-neighbour {
  min-height: 44px;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--panel);
}
.reader-neighbour:hover { border-color: var(--brand); background: var(--brand-soft); transform: none; }
.reader-selectors { gap: 8px; }
.reader-selectors select {
  min-height: 44px;
  color: var(--text);
  border-color: var(--border);
  border-radius: var(--radius-control);
  background: var(--panel);
}
.reader-context { color: var(--text-muted); }
.reader-context strong { color: var(--brand); }
.reader-progress-track { background: var(--border); }
.reader-progress-track span { background: var(--brand); }

.reader-main { min-height: 70vh; padding: 0 0 88px; background: var(--page); }
.reader-chapter-heading {
  padding: 34px 0 20px;
  border-bottom: 1px solid var(--border);
}
.reader-chapter-heading .reader-arabic-title {
  margin: 0;
  color: var(--text);
  font-family: var(--arabic-font);
  font-size: 2.5rem;
  line-height: 1.3;
}
.reader-chapter-heading h1 {
  margin: 2px 0 3px;
  color: var(--text);
  font-size: 1.65rem;
  font-weight: 680;
  letter-spacing: -.025em;
}
.reader-chapter-heading > p:last-child { color: var(--text-muted); font-size: .85rem; }
.reader-status { display: none !important; }
.bismillah {
  padding: 34px 0 42px;
  margin: 0;
  color: var(--text);
  font-family: var(--arabic-font);
  font-size: 2.9rem;
  line-height: 1.8;
  text-align: center;
}
.verse-list { display: grid; }
.verse-card {
  display: grid;
  scroll-margin-top: 170px;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 0 28px;
  padding: 38px 0 46px;
  color: var(--text);
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.verse-card:target {
  border-color: var(--brand);
  box-shadow: inset 4px 0 0 var(--brand);
}
.verse-top {
  position: static;
  grid-column: 1;
  grid-row: 1 / span 3;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: flex-start;
  gap: 10px;
}
.verse-number {
  width: 44px;
  min-width: 44px;
  height: 44px;
  color: var(--brand);
  border-color: var(--border-strong);
  background: var(--panel);
  font-size: .72rem;
}
.verse-actions { display: grid; gap: 8px; }
.verse-action {
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--text-muted);
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
}
.verse-action.is-saved { color: var(--brand-strong); border-color: var(--brand); background: var(--brand-soft); }
.verse-action svg { width: 18px; }
.verse-arabic {
  grid-column: 2;
  margin: 0 0 24px;
  color: var(--text);
  font-family: var(--arabic-font);
  font-size: var(--arabic-size);
  font-weight: 500;
  line-height: 2.05;
  text-align: right;
  overflow-wrap: anywhere;
}
.verse-translation {
  grid-column: 2;
  max-width: 72ch;
  margin: 0;
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1.85;
}
.footnote-list {
  grid-column: 2;
  margin-top: 18px;
  color: var(--text-muted);
  font-size: .88rem;
}
.footnote-list summary {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--brand-strong);
  font-weight: 680;
}
.reader-pagination { padding-top: 30px; }
.chapter-link {
  min-height: 76px;
  color: var(--text);
  border-color: var(--border);
  border-radius: 10px;
  background: var(--panel);
}
.chapter-link:hover { border-color: var(--brand); background: var(--brand-soft); transform: none; }

.settings-panel { background: rgba(18, 15, 12, .52); backdrop-filter: blur(4px); }
.settings-sheet {
  width: min(420px, 100%);
  padding: 28px;
  color: var(--text);
  background: var(--panel);
  box-shadow: -20px 0 60px rgba(0,0,0,.18);
}
.settings-header { border-color: var(--border); }
.settings-header h2 { color: var(--text); font-size: 1.25rem; }
.setting-group { border-color: var(--border); }
.setting-label,
.setting-group > label { color: var(--text); }
.setting-help,
.setting-note { color: var(--text-muted); }
.setting-unavailable { opacity: .72; }
.switch span { border-color: var(--border-strong); background: var(--panel-muted); }
.switch input:checked + span { background: var(--brand); }
.language-options button,
.setting-select {
  min-width: 44px;
  min-height: 44px;
  color: var(--text);
  border-color: var(--border);
  background: var(--panel);
}
.language-options button[aria-pressed="true"] { color: #fff; border-color: var(--brand-strong); background: var(--brand-strong); }

/* Tahlil shares the reading system */
.tahlil-page { --tahlil-arabic-size: 2.75rem; background: var(--page); }
.tahlil-reader-controlbar { grid-template-columns: 180px minmax(440px, 1fr) 180px; }
.tahlil-reader-title,
.tahlil-reader-title strong { color: var(--text); }
.tahlil-section-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--text-muted);
  border-radius: var(--radius-control);
}
.tahlil-section-nav a:hover { color: var(--brand-strong); background: var(--brand-soft); }
.tahlil-content { padding: 16px 0 80px; }
.tahlil-group { margin-bottom: 54px; }
.tahlil-group-heading { padding-bottom: 14px; border-color: var(--text); }
.tahlil-group-heading span { color: var(--brand); }
.tahlil-group-heading h2 { color: var(--text); font-size: clamp(1.35rem, 2.5vw, 1.85rem); }
.tahlil-item {
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 26px;
  padding: 20px 0 38px;
  border-color: var(--border);
}
.tahlil-number {
  width: 44px;
  height: 44px;
  color: var(--brand);
  border-color: var(--border-strong);
}
.tahlil-item-heading { grid-template-columns: minmax(0, 1fr) 44px; }
.tahlil-item-heading h3 { color: var(--text); font-size: .98rem; }
.tahlil-arabic {
  margin: 28px 0 20px;
  color: var(--text);
  font-family: var(--arabic-font);
  font-size: var(--tahlil-arabic-size);
  line-height: 2.05;
}
.tahlil-transliteration { max-width: 72ch; color: var(--brand-strong); font-size: 1rem; line-height: 1.8; }
.tahlil-meaning { max-width: 72ch; color: var(--text); font-size: 1rem; line-height: 1.8; }

/* Bookmarks and footer */
.bookmarks-main { background: var(--page); }
.bookmarks-hero {
  padding: 52px 0 46px;
  border-color: var(--border);
  background: color-mix(in srgb, var(--brand-soft) 55%, var(--page));
}
.bookmarks-hero-grid { align-items: center; }
.bookmarks-hero h1 {
  max-width: 700px;
  color: var(--text);
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.08;
}
.bookmarks-hero-grid > div:last-child p { color: var(--text-muted); }
.bookmarks-hero-grid > div:last-child strong { color: var(--brand); }
.bookmarks-content { padding: 46px 0 80px; }
.bookmark-card {
  color: var(--text);
  border-color: var(--border);
  border-radius: var(--radius-panel);
  background: var(--panel);
  box-shadow: none;
}
.bookmark-card-heading { border-color: var(--border); }
.bookmark-arabic { color: var(--text); font-family: var(--arabic-font); }
.bookmark-translation { max-width: 72ch; color: var(--text); font-size: 1.04rem; }
.bookmark-remove { min-height: 44px; color: var(--text-muted); border-color: var(--border); background: var(--panel); }
.bookmark-open { min-height: 44px; display: inline-flex; align-items: center; color: var(--brand-strong); }
.bookmark-empty {
  color: var(--text);
  border-color: var(--border);
  border-radius: var(--radius-panel);
  background: var(--panel);
}
.bookmark-empty > span { color: var(--brand); }
.bookmark-empty > span svg { width: 32px; height: 32px; }

.site-footer,
.reader-footer {
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  background: var(--page);
}
.footer-bottom,
.reader-footer .reader-shell {
  min-height: 72px;
  color: var(--text-muted);
  border: 0;
}
.footer-credit a { color: var(--brand-strong); }
.footer-credit a:hover,
.footer-credit a:focus-visible { color: var(--text); border-color: currentColor; }
.app-toast { color: #fff; border-radius: 9px; background: var(--brand-strong); }

@media (max-width: 1024px) {
  .desktop-nav a { padding-inline: 10px; font-size: .78rem; }
  .surah-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .popular-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .reader-controlbar,
  .tahlil-reader-controlbar { grid-template-columns: 120px minmax(0, 1fr) 120px; }
}

@media (max-width: 820px) {
  html { scroll-padding-top: 144px; }
  .shell,
  .reader-shell { width: min(calc(100% - 32px), var(--app-width)); }
  .header-inner { min-height: 108px; flex-wrap: wrap; align-content: center; gap: 0 12px; padding-block: 8px; }
  .desktop-nav {
    order: 3;
    width: 100%;
    display: flex;
    gap: 2px;
    margin: 4px -4px 0;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .desktop-nav::-webkit-scrollbar { display: none; }
  .desktop-nav a { flex: 0 0 auto; padding-inline: 12px; }
  .header-inner > .theme-picker { margin-left: auto; }
  .start-reading-grid { grid-template-columns: 1fr; }
  .continue-reading { min-height: 220px; }
  .reading-companions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .khatam-heading { align-items: stretch; flex-direction: column; }
  .khatam-options { width: 100%; }
  .reading-shortcuts { display: block; }
  .reading-shortcuts-copy { margin-bottom: 16px; }
  .surah-filterbar { align-items: stretch; flex-direction: column; }
  .filter-field { width: 100%; }
  .result-count { margin: 0; }
  .reader-controlbar,
  .tahlil-reader-controlbar { grid-template-columns: 52px minmax(0, 1fr) 52px; }
  .reader-back span:last-child,
  .reader-settings-button { font-size: 0; }
  .reader-settings-button svg { margin: 0; }
  .bookmarks-hero-grid { grid-template-columns: 1fr; gap: 22px; }
}

@media (max-width: 680px) {
  html { scroll-padding-top: 126px; }
  .shell,
  .reader-shell { width: min(calc(100% - 28px), var(--app-width)); }
  .brand-copy small { display: none; }
  .brand-copy strong { font-size: .86rem; }
  .quran-search-hero { padding: 38px 0 34px; }
  .search-landing h1 { font-size: 2.05rem; line-height: 1.12; }
  .search-landing-copy { font-size: .94rem; }
  .hero-search-wrap { margin-top: 22px; }
  .search-landing-actions { width: 100%; }
  .search-landing-actions a { flex: 1; justify-content: center; }
  .start-reading-section { padding: 36px 0 42px; }
  .start-reading-grid { gap: 10px; }
  .continue-reading { min-height: 176px; padding: 20px; }
  .continue-reading-arabic { font-size: 2.45rem; }
  .continue-reading-copy strong { font-size: 1.02rem; }
  .reading-companions { grid-template-columns: 1fr; gap: 7px; }
  .reading-companions > a { min-height: 68px; }
  .reading-companions small { display: block; }
  .khatam-planner { padding: 18px; }
  .khatam-heading h3 { font-size: 1.18rem; }
  .directory-content { padding: 38px 0 64px; }
  .reading-shortcuts { margin-bottom: 36px; padding-bottom: 30px; }
  .popular-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .popular-card { min-height: 136px; padding: 15px; }
  .surah-grid { grid-template-columns: 1fr; }
  .surah-card { min-height: 86px; padding: 12px 10px; }
  .surah-meta small { white-space: normal; }

  .reader-brandbar-inner { min-height: 56px; }
  .reader-brandbar-inner .brand-copy { display: none; }
  .reader-brandbar-inner nav { margin-left: auto; gap: 0; }
  .reader-brandbar-inner nav > a { display: inline-flex; min-width: 44px; justify-content: center; padding-inline: 8px; font-size: .7rem; }
  .reader-brandbar-inner nav > a:nth-of-type(n+4) { display: none; }
  .reader-controlbar,
  .tahlil-reader-controlbar {
    min-height: 104px;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    grid-template-rows: 44px auto;
    gap: 6px 8px;
    padding-block: 7px;
  }
  .reader-back { grid-column: 1; grid-row: 1; justify-content: center; }
  .reader-switcher,
  .tahlil-reader-switcher { grid-column: 1 / -1; grid-row: 2; }
  .reader-app-actions { grid-column: 3; grid-row: 1; }
  .reader-neighbours { display: none; }
  .reader-selectors { grid-template-columns: minmax(0, 1fr) 96px; }
  .reader-context { display: none; }
  .reader-progress-track { position: absolute; right: 0; bottom: 0; left: 0; width: 100%; }
  .reader-chapter-heading { padding: 22px 0 14px; }
  .reader-chapter-heading .reader-arabic-title { font-size: 2rem; }
  .reader-chapter-heading h1 { font-size: 1.35rem; }
  .bismillah { padding: 24px 0 28px; font-size: 2.15rem; }
  .verse-card {
    scroll-margin-top: 124px;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 0 12px;
    padding: 26px 0 34px;
  }
  .verse-top { gap: 6px; }
  .verse-arabic {
    font-size: min(var(--arabic-size), 2.55rem);
    line-height: 2;
    overflow-wrap: normal;
  }
  .verse-translation { font-size: 1rem; line-height: 1.78; }
  .footnote-list { font-size: .84rem; }
  .settings-sheet {
    top: auto;
    right: 0;
    bottom: 0;
    width: 100%;
    height: min(86vh, 720px);
    padding: 22px 18px max(22px, env(safe-area-inset-bottom));
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -18px 50px rgba(0,0,0,.22);
  }

  .tahlil-reader-title span,
  .tahlil-section-nav { display: none; }
  .tahlil-content { padding-bottom: 64px; }
  .tahlil-group { margin-bottom: 38px; }
  .tahlil-item { grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 18px 0 30px; }
  .tahlil-arabic { font-size: min(var(--tahlil-arabic-size), 2.35rem); line-height: 1.95; }
  .tahlil-transliteration,
  .tahlil-meaning { font-size: .96rem; line-height: 1.72; }

  .bookmarks-hero { padding: 36px 0 32px; }
  .bookmarks-hero h1 { font-size: 2rem; }
  .bookmarks-content { padding: 34px 0 60px; }
  .bookmark-card { padding: 18px; }
  .bookmark-arabic { font-size: 2rem; line-height: 1.9; }
  .footer-bottom,
  .reader-footer .reader-shell {
    min-height: 88px;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    padding-block: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}


/* Accessibility corrections from measured browser QA */
.brand { min-height: 44px; }
.quran-app-home .search-landing-actions a { min-height: 44px; }
.reader-app .verse-number { width: 44px; min-width: 44px; height: 44px; }
.footer-credit a, .reader-footer a { min-height: 44px; display: inline-flex; align-items: center; }
.reader-settings-button svg { width: 19px; height: 19px; flex: 0 0 19px; }
.tahlil-page .reader-chapter-heading { display: grid; justify-items: center; }

@media (max-width: 680px) {
  .reader-settings-button { width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 50%; }
}

@media (max-width: 680px) {
  .reader-brandbar .brand { width: 44px; min-width: 44px; }
}

/* Measured contrast corrections */
.skip-link { color: #fff !important; background: #3f2818 !important; }
html[data-theme="kitab"] .companion-icon { color: #513713; }
html[data-theme="kitab"] .segmented-control button.is-active {
  color: #fff; background: #513713;
}
html[data-theme="kitab"] .quran-app-home .companion-icon { color: #3f2b0f; }

/* Contrast and bottom-sheet corrections */
html[data-theme="kitab"] .segmented-control button.is-active,
html[data-theme="kitab"] .reading-companions .companion-icon { color: #fff; background: #5e3d10; }
.settings-sheet { transition: transform var(--motion); }
@media (max-width: 680px) {
  .settings-panel { align-items: end; }
}

/* Tahlil heading follows the shared reader hierarchy */
.tahlil-page .reader-chapter-heading {
  grid-template-columns: 1fr; gap: 0; text-align: center;
}

/* Responsive typography calibration — measured at 390, 768, and 1440px */
.quran-app-home .search-landing h1 {
  font-size: clamp(2.25rem, 3.1vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -.03em;
}
.quran-app-home .start-reading-heading h2,
.quran-app-home .directory-heading h2 {
  font-size: clamp(1.75rem, 2.3vw, 2rem);
  line-height: 1.2;
}
.quran-app-home .continue-reading-arabic {
  font-size: 3rem;
  line-height: 1.35;
}
.quran-app-home .khatam-heading h3 {
  font-size: 1.25rem;
  line-height: 1.35;
}

.reader-app .verse-arabic {
  font-size: var(--arabic-size);
  line-height: 1.95;
}
.reader-app .verse-translation {
  font-size: 1.125rem;
  line-height: 1.75;
}
.tahlil-page .tahlil-arabic {
  font-size: var(--tahlil-arabic-size);
  line-height: 1.9;
}
.tahlil-page .tahlil-meaning,
.tahlil-page .tahlil-transliteration {
  font-size: 1rem;
  line-height: 1.75;
}
.bookmarks-page .bookmarks-hero h1 {
  font-size: clamp(2.5rem, 3.4vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -.035em;
}
.bookmarks-page .bookmark-empty h2 {
  font-size: 1.5rem;
  line-height: 1.45;
}

@media (max-width: 1024px) {
  .quran-app-home .search-landing h1 { font-size: 2.5rem; }
  .bookmarks-page .bookmarks-hero h1 { font-size: 2.375rem; }
}

@media (max-width: 680px) {
  .quran-app-home .search-landing h1 {
    font-size: 2rem;
    line-height: 1.16;
  }
  .quran-app-home .search-landing-copy {
    font-size: 1rem;
    line-height: 1.6;
  }
  .quran-app-home .start-reading-heading h2,
  .quran-app-home .directory-heading h2 {
    font-size: 1.625rem;
    line-height: 1.25;
  }
  .quran-app-home .continue-reading-arabic { font-size: 2.25rem; }
  .quran-app-home .khatam-heading h3 { font-size: 1.125rem; }

  .reader-app .reader-chapter-heading .reader-arabic-title { font-size: 1.875rem; }
  .reader-app .reader-chapter-heading h1 { font-size: 1.3125rem; }
  .reader-app .bismillah { font-size: 2.0625rem; line-height: 1.55; }
  .reader-app .verse-arabic {
    font-size: min(var(--arabic-size), 2.45rem);
    line-height: 1.9;
  }
  .reader-app .verse-translation {
    font-size: 1.03125rem;
    line-height: 1.7;
  }
  .tahlil-page .tahlil-arabic {
    font-size: min(var(--tahlil-arabic-size), 2.25rem);
    line-height: 1.82;
  }
  .tahlil-page .tahlil-meaning,
  .tahlil-page .tahlil-transliteration {
    font-size: 1rem;
    line-height: 1.7;
  }
  .bookmarks-page .bookmarks-hero h1 {
    font-size: 1.875rem;
    line-height: 1.14;
  }
  .bookmarks-page .bookmark-empty h2 { font-size: 1.375rem; }
}

/* Reader previous/next hierarchy — labels must remain legible at a glance */
.reader-app .reader-neighbour {
  min-height: 52px;
  padding-block: 6px;
}
.reader-app .reader-neighbour-copy {
  gap: 2px;
  line-height: 1.25;
}
.reader-app .reader-neighbour-copy small {
  color: var(--text-muted);
  font-size: .8125rem;
  font-weight: 520;
  line-height: 1.25;
}
.reader-app .reader-neighbour-copy strong {
  font-size: .9375rem;
  font-weight: 650;
  line-height: 1.25;
}
.reader-app .reader-neighbour > span[aria-hidden="true"] {
  color: var(--brand);
  font-size: 1.375rem;
  line-height: 1;
}

/* Arabic reading density — compact, calm, and responsive */
.quran-app-home .continue-reading-arabic { font-size: 2.625rem; line-height: 1.3; }
.reader-app .reader-chapter-heading .reader-arabic-title { font-size: 2.125rem; }
.reader-app .bismillah { font-size: 2.25rem; line-height: 1.6; }
.reader-app .verse-arabic { font-size: min(var(--arabic-size), 2.5rem); line-height: 1.85; }
.tahlil-page .tahlil-arabic { font-size: min(var(--tahlil-arabic-size), 2.375rem); line-height: 1.82; }

@media (max-width: 680px) {
  .quran-app-home .continue-reading-arabic { font-size: 2rem; }
  .reader-app .reader-chapter-heading .reader-arabic-title { font-size: 1.6875rem; }
  .reader-app .bismillah { font-size: 1.875rem; line-height: 1.55; }
  .reader-app .verse-arabic { font-size: min(var(--arabic-size), 2.125rem); line-height: 1.8; }
  .tahlil-page .tahlil-arabic { font-size: min(var(--tahlil-arabic-size), 2rem); line-height: 1.78; }
}

/* Complete reader UI type system — header, controls, translation, settings, footer */
.quran-app-home .brand-copy strong, .reader-app .brand-copy strong { font-size: .9375rem; line-height: 1.25; }
.quran-app-home .brand-copy small, .reader-app .brand-copy small { font-size: .75rem; line-height: 1.35; }
.quran-app-home .desktop-nav a { font-size: .875rem; line-height: 1.4; }
.reader-app .reader-brandbar-inner nav > a { font-size: .875rem; line-height: 1.4; }
.reader-app .theme-menu button { font-size: .875rem; line-height: 1.4; }
.reader-app .reader-back, .reader-app .reader-settings-button { font-size: .875rem; line-height: 1.4; }
.reader-app .reader-selectors select { font-size: .875rem; line-height: 1.4; }
.reader-app .reader-context { font-size: .78125rem; line-height: 1.4; }
.reader-app .reader-chapter-heading h1 { font-size: 1.75rem; line-height: 1.3; }
.reader-app .reader-chapter-heading > p:last-child { font-size: .875rem; line-height: 1.5; }
.reader-app .verse-translation { font-size: 1.0625rem; line-height: 1.75; }
.reader-app .footnote-list { font-size: .875rem; line-height: 1.65; }
.reader-app .settings-header h2 { font-size: 1.375rem; line-height: 1.35; }
.reader-app .setting-label, .reader-app .setting-group > label { font-size: .9375rem; font-weight: 650; line-height: 1.45; }
.reader-app .setting-section-label { font-size: .75rem; font-weight: 750; line-height: 1.4; letter-spacing: .08em; }
.reader-app .setting-help { font-size: .84375rem; line-height: 1.5; }
.reader-app .language-options button { font-size: .8125rem; line-height: 1.4; }
.reader-app .setting-select { font-size: .9375rem; line-height: 1.4; }
.reader-app .setting-note { font-size: .84375rem; line-height: 1.55; }
.reader-app .reader-footer .reader-shell { font-size: .8125rem; line-height: 1.5; }
.reader-app .app-toast { font-size: .875rem; line-height: 1.45; }

@media (max-width: 680px) {
  .reader-app .brand-copy strong { font-size: .875rem; }
  .reader-app .reader-brandbar-inner nav > a { font-size: .8125rem; }
  .reader-app .reader-selectors select { font-size: .875rem; }
  .reader-app .reader-chapter-heading h1 { font-size: 1.375rem; line-height: 1.3; }
  .reader-app .reader-chapter-heading > p:last-child { font-size: .875rem; }
  .reader-app .verse-translation { font-size: 1rem; line-height: 1.72; }
  .reader-app .footnote-list { font-size: .84375rem; line-height: 1.6; }
  .reader-app .settings-header h2 { font-size: 1.3125rem; }
  .reader-app .setting-label, .reader-app .setting-group > label { font-size: .9375rem; }
  .reader-app .setting-section-label { font-size: .75rem; }
  .reader-app .setting-help { font-size: .84375rem; }
  .reader-app .language-options button { font-size: .8125rem; }
  .reader-app .setting-select { font-size: .9375rem; }
  .reader-app .setting-note { font-size: .84375rem; }
  .reader-app .reader-footer .reader-shell { font-size: .78125rem; }
}

/* Compact toolbar keeps the settings action icon-only below desktop. */
@media (max-width: 900px) { .reader-app .reader-settings-button { font-size: 0; line-height: 0; } }

/* R1 reliability, disclosure, search, and device-data surfaces */
.load-error {
  margin: 2rem 0;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.load-error h2 { margin: 0 0 .5rem; font-size: 1.25rem; }
.load-error p { max-width: 62ch; margin: 0 0 1rem; color: var(--ink-soft); line-height: 1.65; }
.load-error:focus { outline: 3px solid color-mix(in srgb, var(--forest) 30%, transparent); outline-offset: 3px; }
.editorial-status {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: .45rem;
  margin-top: .7rem;
  color: var(--ink-soft);
  font-size: .8125rem;
  font-weight: 650;
  text-decoration: none;
}
.editorial-status:hover { color: var(--ink); }
.verse-card.is-active { border-color: var(--line-strong); box-shadow: inset 3px 0 0 var(--forest); }
.footer-bottom nav, .reader-footer nav { display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
.footer-bottom nav a, .reader-footer nav a { display: inline-flex; min-height: 44px; align-items: center; color: inherit; text-underline-offset: 3px; }

.info-page { min-height: 100vh; display: flex; flex-direction: column; background: var(--paper); color: var(--ink); }
.info-main, .search-main { flex: 1; padding: clamp(4rem, 9vw, 8rem) 0; }
.narrow-shell { max-width: 860px; }
.info-main h1, .search-main h1 {
  max-width: 760px;
  margin: .4rem 0 1rem;
  font-size: clamp(2.25rem, 6vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -.045em;
}
.info-lead {
  max-width: 68ch;
  margin: 0 0 2.5rem;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.7;
}
.status-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  margin: 2.5rem 0;
  padding: clamp(1.4rem, 4vw, 2.4rem);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.status-dot { width: 11px; height: 11px; margin-top: .45rem; border-radius: 50%; background: var(--notice-brown); box-shadow: 0 0 0 6px var(--notice-bg); }
.status-card h2, .info-grid h2, .device-data-list h2 { margin: .15rem 0 .55rem; font-size: 1.2rem; }
.status-card p, .info-grid p, .device-data-list p { margin: 0; color: var(--ink-soft); line-height: 1.65; }
.status-card small, .device-data-list small { display: block; margin-top: .75rem; color: var(--ink-soft); }
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 2rem 0; border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; background: var(--line); }
.info-grid section { padding: clamp(1.35rem, 3vw, 2rem); background: var(--surface); }
.info-grid a { color: inherit; text-underline-offset: 3px; }
.info-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.info-actions .button, .full-search-form button, .device-data-list button { min-height: 44px; }
.error-page .narrow-shell { padding-top: 4vh; }

.device-data-status, .search-status { margin: 1.5rem 0; color: var(--ink-soft); }
.device-data-list { border-top: 1px solid var(--line); }
.device-data-list section {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1.5rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--line);
}
.device-data-list button {
  padding: .7rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
  background: var(--surface);
  cursor: pointer;
  font: inherit;
  font-weight: 650;
}
.device-data-list button:hover { border-color: var(--ink-soft); }
.device-data-list .button-danger { color: var(--danger); }

.full-search-form { margin: 2.2rem 0 1rem; }
.full-search-form > label { display: block; margin-bottom: .6rem; font-weight: 700; }
.full-search-form > div { display: grid; grid-template-columns: 1fr auto; gap: .65rem; }
.full-search-form input {
  width: 100%;
  min-height: 52px;
  padding: .8rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  color: var(--ink);
  background: var(--surface);
  font: inherit;
}
.full-search-form button {
  padding: .75rem 1.3rem;
  border: 1px solid var(--forest);
  border-radius: 14px;
  color: var(--paper);
  background: var(--forest);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}
.full-search-results { display: grid; gap: .75rem; }
.full-search-result {
  display: grid;
  gap: .35rem;
  padding: 1.2rem 1.3rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: inherit;
  background: var(--surface);
  text-decoration: none;
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}
.full-search-result:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.search-result-meta { color: var(--ink-soft); font-size: .8rem; font-weight: 750; letter-spacing: .04em; }
.full-search-result p { max-width: 70ch; margin: 0; color: var(--ink-soft); line-height: 1.6; }

@media (max-width: 680px) {
  .info-grid { grid-template-columns: 1fr; }
  .device-data-list section { grid-template-columns: 1fr; gap: .9rem; }
  .device-data-list button { justify-self: start; }
  .full-search-form > div { grid-template-columns: 1fr; }
  .full-search-form button { width: 100%; }
  .footer-bottom, .reader-footer .reader-shell { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .full-search-result { transition: none; }
}
.size-sample-large { font-size: 1.7rem; }

/* Module: reader */
/* Manbaul Huda: mobile-first reading, not a marketing page. Religious text unchanged. */
body.mh-reader-v2 .reader-brandbar{overflow:visible!important;position:relative;z-index:5}
body.mh-reader-v2 .mh-navigation nav{max-height:calc(100dvh - 86px);overflow-y:auto;overscroll-behavior:contain}
body.mh-reader-v2 .mh-navigation nav a,body.mh-reader-v2 .reader-brandbar .mh-navigation nav>a{display:flex!important}
:root{--page:#f7faf8;--panel:#fff;--panel-muted:#edf5f0;--text:#142d23;--text-muted:#53645c;--border:#dce7df;--border-strong:#7d9589;--brand:#047857;--brand-strong:#065f46;--brand-soft:#e8f4ed;--focus:#047857;--on-brand:#fff;--reading-width:820px;--app-width:1160px;--gold-light:#d5b970;--elevation-menu:0 16px 48px #123d2520;--translation-size:1.0625rem}
html[data-theme=night]{--page:#0e1c17;--panel:#14271f;--panel-muted:#1c342a;--text:#e9f3ed;--text-muted:#b3cabc;--border:#365347;--border-strong:#729984;--brand:#92d9b3;--brand-strong:#b4ebc9;--brand-soft:#203f30;--focus:#b4ebc9;--on-brand:#10261b;--elevation-menu:0 16px 48px #0008}
html[data-theme=kitab]{--on-brand:#fff}
html{scroll-padding-top:132px}body{background:var(--page);color:var(--text)}
body,body.mh-reader-v2 a,body.mh-reader-v2 button,body.mh-reader-v2 input,body.mh-reader-v2 select{ -webkit-tap-highlight-color:transparent }
body.mh-reader-v2 button,body.mh-reader-v2 input,body.mh-reader-v2 select,body.mh-reader-v2 a{touch-action:manipulation}body.mh-reader-v2 button,body.mh-reader-v2 input,body.mh-reader-v2 select{font:inherit}
body.mh-reader-v2 :focus-visible{outline:3px solid var(--focus);outline-offset:4px}
::selection{background:var(--brand-soft);color:var(--text)}
body.mh-reader-v2 .shell{width:min(calc(100% - 48px),1160px)}
body.mh-reader-v2 .brand{gap:11px;flex-shrink:1;min-width:0}body.mh-reader-v2 .brand-copy{display:flex!important;flex-direction:column;gap:2px}body.mh-reader-v2 .brand-copy strong{font-size:1.05rem;line-height:1.25;color:var(--text)}body.mh-reader-v2 .brand-copy small{font-size:.75rem;line-height:1.4;color:var(--text-muted)}
body.mh-reader-v2 .brand .brand-mark{width:43px;height:43px;flex:0 0 43px;border:0;border-radius:0;background:transparent;box-shadow:none}body.mh-reader-v2 .brand-mark img{width:100%;height:100%;object-fit:contain}
body.mh-reader-v2 .site-header,body.mh-reader-v2 .reader-brandbar{background:var(--panel);border-bottom:1px solid var(--border)}
body.mh-reader-v2 .header-inner,body.mh-reader-v2 .reader-brandbar-inner{min-height:76px;gap:18px}body.mh-reader-v2 .desktop-nav{gap:8px}body.mh-reader-v2 .desktop-nav a,body.mh-reader-v2 .reader-brandbar nav>a{font-size:.875rem;padding:10px 12px;border-radius:10px;color:var(--text-muted)}body.mh-reader-v2 .desktop-nav a.is-active,body.mh-reader-v2 .desktop-nav a:hover,body.mh-reader-v2 .reader-brandbar nav>a:hover{background:var(--brand-soft);color:var(--brand-strong)}
body.mh-reader-v2 .icon-button,body.mh-reader-v2 .theme-toggle{width:44px;height:44px;min-width:44px;border:1px solid var(--border);border-radius:12px;background:var(--panel);color:var(--text)}
body.mh-reader-v2 .theme-menu{border:1px solid var(--border);border-radius:16px;box-shadow:var(--elevation-menu);padding:8px;z-index:80}body.mh-reader-v2 .theme-menu button{font-size:.9375rem;min-height:44px;border-radius:9px}
body.mh-reader-v2 .mh-navigation{position:relative;display:none}body.mh-reader-v2 .mh-navigation summary{display:flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:0 12px;border:1px solid var(--border);border-radius:12px;font-size:.875rem;font-weight:650;cursor:pointer;list-style:none}body.mh-reader-v2 .mh-navigation summary::-webkit-details-marker{display:none}body.mh-reader-v2 .mh-navigation summary svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.8}body.mh-reader-v2 .mh-navigation nav{position:absolute;right:0;top:calc(100% + 8px);width:220px;padding:8px;display:grid!important;background:var(--panel);border:1px solid var(--border);border-radius:16px;box-shadow:var(--elevation-menu);z-index:90}body.mh-reader-v2 .mh-navigation nav a{display:flex;align-items:center;min-height:46px;padding:8px 12px!important;color:var(--text);text-decoration:none;border-radius:8px}body.mh-reader-v2 .mh-navigation nav a:hover{background:var(--brand-soft)}
/* Home: find / resume / read, before optional planning. */
body.mh-reader-v2 .quran-search-hero{padding:40px 0 26px;background:var(--page);border:0}body.mh-reader-v2 .search-landing{max-width:1160px;text-align:left;padding:34px 40px!important;border:1px solid #1c775b;border-radius:24px;color:#fff;background:radial-gradient(ellipse at 100% 0%,#249d7740,transparent 55%),linear-gradient(120deg,#083f2e,#096448);position:relative;overflow:visible}body.mh-reader-v2 .search-landing::before,body.mh-reader-v2 .search-landing::after{display:none}
body.mh-reader-v2 .search-landing .directory-kicker{color:#c9e7d8;font-size:.75rem;letter-spacing:.14em;margin:0 0 10px}body.mh-reader-v2 .quran-search-hero h1{font-size:clamp(2rem,4vw,3rem);line-height:1.15;letter-spacing:-.04em;color:#fff;margin:0 0 12px;max-width:none}body.mh-reader-v2 .search-landing-copy{font-size:1rem;line-height:1.6;color:#daeee3;margin:0 0 22px;max-width:52ch}body.mh-reader-v2 .hero-search-wrap{max-width:700px;margin:0}body.mh-reader-v2 .quran-search{min-height:58px;border:1px solid #fff9;border-radius:14px;background:#fff;box-shadow:0 8px 28px #01231818;color:#174531}body.mh-reader-v2 .quran-search input{font-size:1rem;color:#142d23;min-height:56px;padding-left:0}body.mh-reader-v2 .quran-search input::placeholder{color:#53645c}body.mh-reader-v2 .quran-search svg{color:#047857}body.mh-reader-v2 .quran-search kbd{color:#53645c;background:#f2f6f3;border:1px solid #c4d2ca}body.mh-reader-v2 .search-landing-actions{justify-content:flex-start;gap:20px;margin-top:13px}body.mh-reader-v2 .search-landing-actions a{color:#fff!important;min-height:36px;font-size:.875rem;text-underline-offset:5px}body.mh-reader-v2 .search-results{color:var(--text);z-index:50}
body.mh-reader-v2 .start-reading-section{padding:4px 0 26px;background:var(--page)}body.mh-reader-v2 .start-reading-heading{margin-bottom:13px}body.mh-reader-v2 .start-reading-heading h2{font-size:1.125rem;letter-spacing:-.015em}body.mh-reader-v2 .start-reading-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;align-items:stretch}body.mh-reader-v2 .continue-reading{padding:24px!important;border:1px solid var(--border)!important;border-radius:18px!important;background:var(--panel)!important;min-height:140px;display:grid!important;grid-template-columns:auto 1fr auto;gap:20px;align-items:center;color:var(--text)!important;box-shadow:0 3px 10px #164c2404}body.mh-reader-v2 .continue-reading-arabic{font-size:2.1rem!important;color:var(--brand-strong)!important;writing-mode:initial!important}body.mh-reader-v2 .continue-reading-label,body.mh-reader-v2 .continue-reading-copy>span{font-size:.8125rem;color:var(--text-muted)!important}body.mh-reader-v2 .continue-reading-copy strong{font-size:1.125rem!important;color:var(--text)!important}body.mh-reader-v2 .continue-reading-copy strong small{display:block;font-size:.875rem;margin-top:3px;color:var(--text-muted)}body.mh-reader-v2 .continue-reading-button{background:var(--brand)!important;color:var(--on-brand)!important;border:0!important;border-radius:10px;min-height:44px;display:grid;place-items:center;font-size:.875rem;padding:0 15px}
body.mh-reader-v2 .reading-companions{display:grid;grid-template-columns:1fr 1fr;gap:8px}body.mh-reader-v2 .reading-companions>a{display:flex;gap:10px;padding:12px;border:1px solid var(--border);border-radius:13px;background:var(--panel)}body.mh-reader-v2 .reading-companions strong{font-size:.875rem}body.mh-reader-v2 .reading-companions small{display:none}body.mh-reader-v2 .reading-companions .companion-icon{width:36px;height:36px;background:var(--brand-soft);color:var(--brand);border:0;border-radius:10px;flex:0 0 36px;font-size:1.3rem}body.mh-reader-v2 .companion-icon svg{width:18px;height:18px}body.mh-reader-v2 .reading-companions>a>span:last-child{margin-left:auto}
body.mh-reader-v2 .directory-content{padding:0 0 50px;background:var(--page)}body.mh-reader-v2 .reading-shortcuts{margin:0 0 24px;padding:17px 0;border-block:1px solid var(--border);gap:12px}body.mh-reader-v2 .reading-shortcuts-copy{display:none}body.mh-reader-v2 .popular-grid{gap:8px;display:flex;flex-wrap:wrap}body.mh-reader-v2 .popular-grid a{min-height:44px;border:1px solid var(--border);border-radius:10px;background:var(--panel);padding:7px 15px;color:var(--text);font-size:.875rem}body.mh-reader-v2 .directory-heading{margin-bottom:16px}body.mh-reader-v2 .directory-heading h2{font-size:1.6rem;letter-spacing:-.025em}body.mh-reader-v2 .directory-kicker{color:var(--brand-strong)}body.mh-reader-v2 .surah-filterbar{padding:0 0 20px;gap:12px}body.mh-reader-v2 .filter-field{border-color:var(--border-strong);border-radius:12px;background:var(--panel);min-height:48px}body.mh-reader-v2 .filter-field input{font-size:1rem}body.mh-reader-v2 .segmented-control{padding:4px;border-radius:12px;background:var(--panel-muted)}body.mh-reader-v2 .segmented-control button{font-size:.875rem;min-height:40px;border-radius:9px}body.mh-reader-v2 .segmented-control button.is-active{background:var(--panel);color:var(--brand-strong);box-shadow:0 1px 5px #163d2010}body.mh-reader-v2 .result-count{font-size:.875rem;color:var(--text-muted)}body.mh-reader-v2 .surah-grid{gap:12px;grid-template-columns:repeat(3,minmax(0,1fr))}body.mh-reader-v2 .surah-card{border:1px solid var(--border);border-radius:14px!important;background:var(--panel);padding:17px!important;gap:13px;transition:background .16s,border-color .16s;min-height:92px}body.mh-reader-v2 .surah-card:hover{background:var(--brand-soft);border-color:var(--brand);transform:none}body.mh-reader-v2 .surah-number{border:0!important;background:var(--panel-muted);border-radius:10px!important;color:var(--brand-strong);width:38px;height:38px;transform:none!important;min-width:38px;font-size:.875rem}body.mh-reader-v2 .surah-number span{transform:none!important}body.mh-reader-v2 .surah-name{font-size:1.0625rem}body.mh-reader-v2 .surah-translation,body.mh-reader-v2 .surah-meta{font-size:.8125rem;color:var(--text-muted)}body.mh-reader-v2 .surah-arabic{font-size:1.4rem;color:var(--brand-strong)}
body.mh-reader-v2 .mh-planner{margin:0 0 28px;border:1px solid var(--border);border-radius:14px;background:var(--panel)}body.mh-reader-v2 .mh-planner>summary{min-height:52px;padding:14px 18px;font-size:.9375rem;font-weight:650;cursor:pointer;list-style-position:inside}body.mh-reader-v2 .mh-planner .khatam-planner{margin:0;border:0;border-top:1px solid var(--border);border-radius:0 0 14px 14px;padding:20px;background:var(--panel)}body.mh-reader-v2 .khatam-heading h3{font-size:1.125rem}body.mh-reader-v2 .khatam-heading p{font-size:.9375rem}body.mh-reader-v2 .khatam-options button{min-height:44px;font-size:.875rem}body.mh-reader-v2 .khatam-options button[aria-pressed=true]{background:var(--brand);color:var(--on-brand)}
/* Reading canvas: one clear control row, full-width Arabic on phones. */
body.mh-reader-v2 .reader-appbar{background:var(--panel);box-shadow:0 2px 12px #132b1f06;border-bottom:1px solid var(--border)}body.mh-reader-v2 .reader-brandbar-inner{min-height:64px}body.mh-reader-v2 .reader-controlbar{display:grid;grid-template-columns:160px minmax(0,1fr) 150px;gap:18px;align-items:center;padding-block:12px!important;min-height:70px}body.mh-reader-v2 .reader-switcher{display:flex;align-items:center;gap:10px;position:relative;min-width:0}body.mh-reader-v2 .reader-neighbours{display:none!important}body.mh-reader-v2 .reader-selectors{display:flex;gap:8px;flex:1}body.mh-reader-v2 .reader-selectors label:first-child{flex:1}body.mh-reader-v2 .reader-selectors select{width:100%;font-size:.9375rem;min-height:46px;border:1px solid var(--border-strong);border-radius:10px;background:var(--panel);color:var(--text)}body.mh-reader-v2 .reader-context{display:none}body.mh-reader-v2 .reader-progress-track{position:absolute!important;left:0;right:0;bottom:-13px;height:2px!important;background:transparent}body.mh-reader-v2 .reader-progress-track>span{background:var(--brand)!important}body.mh-reader-v2 .reader-back{font-size:.875rem;min-height:44px;align-items:center;gap:8px;color:var(--brand-strong)}body.mh-reader-v2 .reader-settings-button{height:46px;min-height:46px;gap:8px;padding:10px 13px!important;border:1px solid var(--border)!important;border-radius:10px!important;background:var(--panel-muted)!important;color:var(--brand-strong)!important;font-size:.875rem}body.mh-reader-v2 .reader-app-actions{display:flex;justify-content:flex-end}
body.mh-reader-v2 .reader-main{background:var(--panel);padding-top:0!important}body.mh-reader-v2 .reader-shell{width:min(calc(100% - 48px),820px);max-width:820px}body.mh-reader-v2 .reader-chapter-heading{padding:28px 0 22px!important;margin:0!important;text-align:center;border:0}body.mh-reader-v2 .reader-arabic-title{font-size:1.7rem!important;line-height:1.55!important;margin:0 0 2px!important;color:var(--brand-strong)}body.mh-reader-v2 .reader-chapter-heading h1{font-size:1.5rem!important;margin:0 0 7px!important;letter-spacing:-.025em}body.mh-reader-v2 .reader-chapter-heading [data-chapter-meta]{font-size:.9375rem!important;margin:0!important;color:var(--text-muted)}body.mh-reader-v2 .editorial-status{display:inline-flex;font-size:.8125rem!important;min-height:32px;align-items:center;gap:6px;padding:3px 11px;margin-top:10px!important;border-radius:20px;background:var(--panel-muted);color:var(--text-muted)!important;line-height:1.5}body.mh-reader-v2 .bismillah{font-size:1.85rem!important;line-height:1.9;margin:8px 0 24px;color:var(--brand-strong)}
body.mh-reader-v2.reader-app .verse-card{display:block!important;padding:18px 0 26px!important;margin:0!important;border:0!important;border-bottom:1px solid var(--border)!important;border-radius:0;background:transparent;box-shadow:none!important;scroll-margin-top:140px}body.mh-reader-v2.reader-app .verse-card.is-active{background:transparent!important}body.mh-reader-v2 .verse-top{display:flex!important;align-items:center;justify-content:space-between;gap:12px;position:static!important;width:auto!important;margin:0 0 10px!important}body.mh-reader-v2 .verse-number{width:40px!important;height:40px!important;border:1px solid var(--border)!important;border-radius:12px!important;font-size:.875rem;color:var(--brand-strong);background:var(--panel-muted)}body.mh-reader-v2 .verse-card.is-active .verse-number{background:var(--brand)!important;color:var(--on-brand)!important;border-color:var(--brand)!important}body.mh-reader-v2 .verse-actions{display:flex!important;flex-direction:row!important;gap:4px}body.mh-reader-v2 .verse-action{width:44px!important;height:44px!important;min-width:44px!important;border:1px solid transparent;border-radius:10px;color:var(--text-muted);background:transparent}body.mh-reader-v2 .verse-action svg{width:19px;height:19px}body.mh-reader-v2 .verse-action:hover,body.mh-reader-v2 .verse-action.is-saved{background:var(--brand-soft);color:var(--brand-strong)}
body.mh-reader-v2.reader-app .verse-arabic{font-size:var(--arabic-size,2.25rem)!important;line-height:2!important;margin:8px 0 20px!important;padding:0!important;text-align:right;letter-spacing:normal;word-break:normal;overflow:visible;overflow-wrap:normal;max-height:none;color:var(--text)}body.mh-reader-v2 .verse-translation{font-size:var(--translation-size)!important;line-height:1.8!important;max-width:70ch;color:var(--text);margin:0!important;padding:0!important}body.mh-reader-v2 .footnote-list{margin-top:15px!important;border-color:var(--border)}body.mh-reader-v2 .footnote-list summary{font-size:.875rem!important;min-height:44px;display:flex;align-items:center;color:var(--brand-strong);line-height:1.5}body.mh-reader-v2 .footnote-list summary::before{content:'+';margin-right:8px}body.mh-reader-v2 .footnote-list[open] summary::before{content:'−'}body.mh-reader-v2 .footnote-list li{font-size:.9375rem;line-height:1.75}body.mh-reader-v2 .reader-pagination{gap:14px;padding:24px 0 40px}body.mh-reader-v2 .reader-pagination a{min-height:76px;border-radius:14px;background:var(--panel-muted);border:1px solid var(--border)}
body.mh-reader-v2 .settings-panel{background:#071d1699;backdrop-filter:blur(4px);z-index:200}body.mh-reader-v2 .settings-sheet{width:min(430px,100%);background:var(--panel);color:var(--text);padding:24px;box-shadow:-16px 0 60px #082f1c15;max-height:100dvh;overflow-y:auto;overscroll-behavior:contain}body.mh-reader-v2 .settings-header{padding:0 0 20px;position:sticky;top:-24px;background:var(--panel);z-index:2}body.mh-reader-v2 .settings-header h2{font-size:1.25rem}body.mh-reader-v2 .setting-group{padding:20px 0;border-color:var(--border)}body.mh-reader-v2 .setting-group>label,body.mh-reader-v2 .setting-label{font-size:1rem!important}body.mh-reader-v2 .setting-help,body.mh-reader-v2 .setting-note{font-size:.875rem!important;line-height:1.65}body.mh-reader-v2 .setting-section-label{font-size:.8125rem;letter-spacing:.04em;color:var(--brand-strong)}body.mh-reader-v2 .range-row{min-height:48px;gap:16px}body.mh-reader-v2 .range-row input{accent-color:var(--brand);min-height:44px;flex:1;width:100%}body.mh-reader-v2 .size-output{font:600 .875rem var(--ui-font);color:var(--brand-strong)}body.mh-reader-v2 .switch{width:50px;height:44px;display:flex;align-items:center}body.mh-reader-v2 .switch span[aria-hidden]{height:28px!important;width:48px!important;border:1.5px solid var(--border-strong)!important;background:var(--panel-muted)!important}body.mh-reader-v2 .switch span[aria-hidden]::before{background:var(--text-muted)!important;width:20px!important;height:20px!important;top:2.5px!important;left:3px!important}body.mh-reader-v2 .switch input:checked+span[aria-hidden]{background:var(--brand)!important;border-color:var(--brand)!important}body.mh-reader-v2 .switch input:checked+span[aria-hidden]::before{background:var(--on-brand)!important;transform:translateX(19px)!important}body.mh-reader-v2 .switch input:focus-visible+span{outline:3px solid var(--focus);outline-offset:4px}
body.mh-reader-v2 .app-toast{font-size:.9375rem!important;line-height:1.5;background:var(--text)!important;color:var(--panel)!important;padding:13px 18px;border-radius:12px;max-width:calc(100% - 32px);z-index:300}body.mh-reader-v2 .site-footer,body.mh-reader-v2 .reader-footer{background:var(--panel-muted)!important;border-top:1px solid var(--border);color:var(--text-muted);padding:26px 0!important}body.mh-reader-v2 .footer-bottom,body.mh-reader-v2 .reader-footer .reader-shell{gap:10px;font-size:.8125rem;line-height:1.65}body.mh-reader-v2 .footer-credit{font-size:.8125rem!important}body.mh-reader-v2 .footer-bottom nav a,body.mh-reader-v2 .reader-footer nav a{font-size:.875rem}body.mh-reader-v2 .mh-origin{color:var(--text-muted);font-size:.8125rem}
body.mh-reader-v2 .bookmark-main,body.mh-reader-v2 .info-main,body.mh-reader-v2 .search-main{padding:36px 0!important}body.mh-reader-v2 .info-main h1,body.mh-reader-v2 .search-main h1,body.mh-reader-v2 .bookmark-heading h1{font-size:clamp(1.8rem,4vw,2.7rem);line-height:1.2;letter-spacing:-.03em}body.mh-reader-v2 .info-lead{font-size:1rem;line-height:1.75}body.mh-reader-v2 .bookmark-card{border:1px solid var(--border);background:var(--panel);border-radius:16px}body.mh-reader-v2 .bookmark-arabic{line-height:2;letter-spacing:normal}body.mh-reader-v2 .full-search-form input{border-color:var(--border-strong)}body.mh-reader-v2 .full-search-form button{color:var(--on-brand)}body.mh-reader-v2 .full-search-result p{font-size:1rem}body.mh-reader-v2 .search-result-meta{font-size:.875rem}
body.mh-reader-v2 .tahlil-main{background:var(--panel)}body.mh-reader-v2 .tahlil-group-heading{margin:20px 0 12px;padding:12px 0;border-color:var(--border)!important}body.mh-reader-v2 .tahlil-group-heading h2{font-size:1.125rem;color:var(--brand-strong)}body.mh-reader-v2 .tahlil-group-heading span{font-size:.875rem}body.mh-reader-v2 .tahlil-item{display:block!important;padding:20px 0!important}body.mh-reader-v2 .tahlil-number{display:none}body.mh-reader-v2 .tahlil-item-heading{display:flex;justify-content:space-between;gap:12px;align-items:center}body.mh-reader-v2 .tahlil-item-heading h3{font-size:1rem;line-height:1.5}body.mh-reader-v2.reader-app .tahlil-arabic{font-size:var(--tahlil-arabic-size,2.125rem)!important;line-height:2!important;padding:0!important;margin:18px 0!important;letter-spacing:normal;overflow:visible}body.mh-reader-v2 .tahlil-transliteration,body.mh-reader-v2 .tahlil-meaning{font-size:1rem!important;line-height:1.8!important}body.mh-reader-v2 .tahlil-transliteration{color:var(--brand-strong)}
@media(min-width:681px){body.mh-reader-v2.ngaji-mode .reader-controlbar{padding-block:10px!important}body.mh-reader-v2.ngaji-mode .reader-shell{max-width:820px}}
@media(max-width:900px){body.mh-reader-v2 .surah-grid{grid-template-columns:repeat(2,minmax(0,1fr))}body.mh-reader-v2 .start-reading-grid{grid-template-columns:1fr}body.mh-reader-v2 .desktop-nav a{padding-inline:7px}}
@media(max-width:680px){
 body.mh-reader-v2 .shell{width:calc(100% - 32px)}body.mh-reader-v2 .header-inner,body.mh-reader-v2 .reader-brandbar-inner{min-height:66px!important;gap:8px;flex-wrap:nowrap!important}body.mh-reader-v2 .brand .brand-mark{width:36px;height:36px;flex-basis:36px}body.mh-reader-v2 .brand{gap:8px}body.mh-reader-v2 .brand-copy strong{font-size:.9375rem}body.mh-reader-v2 .brand-copy small{font-size:.6875rem;display:block!important;letter-spacing:0}body.mh-reader-v2 .desktop-nav,body.mh-reader-v2 .reader-brandbar nav>a{display:none!important}body.mh-reader-v2 .mh-navigation{display:block;margin-left:auto}body.mh-reader-v2 .reader-brandbar-inner>nav{display:flex!important;gap:6px!important}body.mh-reader-v2 .reader-brandbar-inner>.mh-navigation{margin-left:auto}body.mh-reader-v2 .theme-picker{flex:0 0 auto}body.mh-reader-v2 .theme-toggle{width:42px;min-width:42px;height:44px}body.mh-reader-v2 .mh-navigation summary{padding:0 9px}body.mh-reader-v2 .mh-navigation nav{right:-48px;max-width:calc(100vw - 32px)}
 body.mh-reader-v2 .quran-search-hero{padding:16px 0 20px}body.mh-reader-v2 .search-landing{width:calc(100% - 24px);padding:24px 20px!important;border-radius:20px}body.mh-reader-v2 .quran-search-hero h1{font-size:1.9rem;margin-bottom:9px}body.mh-reader-v2 .search-landing .directory-kicker{font-size:.6875rem;letter-spacing:.1em}body.mh-reader-v2 .search-landing-copy{font-size:.9375rem;line-height:1.6;margin-bottom:20px}body.mh-reader-v2 .quran-search{min-height:52px;gap:10px;padding:0 12px;border-radius:12px}body.mh-reader-v2 .quran-search input{min-height:52px;font-size:1rem;width:100%;padding-right:0}body.mh-reader-v2 .quran-search kbd{display:none}body.mh-reader-v2 .search-landing-actions{gap:16px;margin-top:10px;flex-wrap:wrap}body.mh-reader-v2 .search-landing-actions a{font-size:.8125rem;min-height:32px}body.mh-reader-v2 .search-landing-actions a:first-child{font-weight:650}
 body.mh-reader-v2 .start-reading-section{padding:0 0 20px}body.mh-reader-v2 .start-reading-heading h2{font-size:1rem}body.mh-reader-v2 .continue-reading{padding:17px!important;gap:12px;min-height:108px}body.mh-reader-v2 .continue-reading-arabic{font-size:1.6rem!important}body.mh-reader-v2 .continue-reading-copy strong{font-size:1rem!important}body.mh-reader-v2 .continue-reading-button{padding:0 12px}body.mh-reader-v2 .reading-companions{gap:8px}body.mh-reader-v2 .reading-companions>a{padding:10px;min-height:62px}body.mh-reader-v2 .reading-companions .companion-icon{width:30px;height:34px;flex-basis:30px}body.mh-reader-v2 .reading-companions strong{font-size:.8125rem}body.mh-reader-v2 .reading-shortcuts{padding-block:12px;margin-bottom:22px}body.mh-reader-v2 .popular-grid{flex-wrap:nowrap;overflow:auto;scrollbar-width:thin;width:100%;padding-bottom:4px}body.mh-reader-v2 .popular-grid a{white-space:nowrap;flex-shrink:0}body.mh-reader-v2 .directory-heading h2{font-size:1.45rem}body.mh-reader-v2 .directory-heading .directory-kicker{margin:0 0 4px}body.mh-reader-v2 .surah-filterbar{display:flex;flex-wrap:wrap;gap:10px}body.mh-reader-v2 .filter-field{flex-basis:100%;width:100%;min-height:48px}body.mh-reader-v2 .segmented-control{display:flex;flex:1;gap:0}body.mh-reader-v2 .segmented-control button{padding:8px 10px;flex:1;font-size:.8125rem}body.mh-reader-v2 .result-count{font-size:.8125rem;margin:0}body.mh-reader-v2 .surah-grid{grid-template-columns:1fr;gap:9px}body.mh-reader-v2 .surah-card{min-height:88px;padding:14px!important;gap:13px}body.mh-reader-v2 .surah-name{font-size:1.05rem}body.mh-reader-v2 .surah-arabic{font-size:1.45rem}body.mh-reader-v2 .surah-meta,body.mh-reader-v2 .surah-translation{font-size:.8125rem}body.mh-reader-v2 .mh-planner{margin-bottom:24px}body.mh-reader-v2 .mh-planner .khatam-heading{display:block}body.mh-reader-v2 .khatam-options{margin-top:14px;display:flex;gap:8px}body.mh-reader-v2 .khatam-options button{flex:1}body.mh-reader-v2 .khatam-state{gap:12px}body.mh-reader-v2 .khatam-state strong{font-size:.9375rem}body.mh-reader-v2 .khatam-state span{font-size:.875rem}
 body.mh-reader-v2 .reader-appbar .reader-brandbar,body.mh-reader-v2 .reader-appbar.is-compact .reader-brandbar{display:block!important;max-height:none!important;opacity:1!important;visibility:visible!important}body.mh-reader-v2 .reader-controlbar,body.mh-reader-v2 .reader-appbar.is-compact .reader-controlbar{grid-template-columns:36px minmax(0,1fr) 44px!important;gap:8px!important;min-height:62px!important;padding-block:8px!important}body.mh-reader-v2 .reader-back{padding:0;width:36px;height:44px;justify-content:center}body.mh-reader-v2 .reader-back>span:not([aria-hidden]){display:none}body.mh-reader-v2 .reader-back>span[aria-hidden]{font-size:1.25rem}body.mh-reader-v2 .reader-switcher{display:block;width:auto;min-width:0}body.mh-reader-v2 .reader-selectors{gap:6px}body.mh-reader-v2 .reader-selectors label{min-width:0}body.mh-reader-v2 .reader-selectors label:last-child{flex:0 0 88px}body.mh-reader-v2 .reader-selectors select{font-size:.875rem;min-height:44px;padding:8px 5px}body.mh-reader-v2 .reader-app-actions{width:44px}body.mh-reader-v2 .reader-settings-button{width:44px!important;height:44px!important;padding:0!important;font-size:0!important;justify-content:center}body.mh-reader-v2 .reader-settings-button svg{width:20px;height:20px;margin:0!important}body.mh-reader-v2 .reader-context{display:none!important}body.mh-reader-v2 .reader-progress-track{bottom:-9px;left:-52px;right:-52px}body.mh-reader-v2 .reader-shell{width:calc(100% - 36px);max-width:none}body.mh-reader-v2 .reader-chapter-heading{padding:18px 0 15px!important}body.mh-reader-v2 .reader-arabic-title{font-size:1.5rem!important;line-height:1.4!important}body.mh-reader-v2 .reader-chapter-heading h1{font-size:1.3rem!important;margin-bottom:5px!important}body.mh-reader-v2 .reader-chapter-heading [data-chapter-meta]{font-size:.8125rem!important}body.mh-reader-v2 .editorial-status{margin-top:7px!important;font-size:.75rem!important;min-height:28px;padding:2px 10px}body.mh-reader-v2.reader-app .verse-card{padding:13px 0 22px!important}body.mh-reader-v2 .verse-top{margin-bottom:4px!important}body.mh-reader-v2 .verse-number{width:36px!important;height:36px!important;border-radius:10px!important}body.mh-reader-v2.reader-app .verse-arabic{margin:5px 0 17px!important;line-height:1.95!important}body.mh-reader-v2 .verse-translation{line-height:1.8!important}body.mh-reader-v2 .reader-pagination{display:grid;grid-template-columns:1fr;gap:10px}body.mh-reader-v2 .reader-pagination a{min-height:70px}body.mh-reader-v2 .reader-footer .reader-shell,body.mh-reader-v2 .footer-bottom{display:flex;flex-direction:column;align-items:flex-start;gap:8px}body.mh-reader-v2 .footer-bottom nav,body.mh-reader-v2 .reader-footer nav{gap:16px}body.mh-reader-v2 .settings-panel{align-items:flex-end}body.mh-reader-v2 .settings-sheet{width:100%!important;max-height:88dvh;height:auto!important;border-radius:24px 24px 0 0;padding:22px 22px calc(22px + env(safe-area-inset-bottom));transform:translateY(100%)}body.mh-reader-v2 .settings-panel.is-open .settings-sheet{transform:translateY(0)}body.mh-reader-v2 .settings-header{top:-22px;padding:0 0 15px}body.mh-reader-v2 .settings-header h2{font-size:1.125rem}body.mh-reader-v2 .setting-group{padding:16px 0}body.mh-reader-v2 .setting-help{max-width:26ch}body.mh-reader-v2 .toggle-row{gap:18px}body.mh-reader-v2 .size-output{font-size:.8125rem}body.mh-reader-v2 .app-toast{bottom:calc(20px + env(safe-area-inset-bottom))!important}body.mh-reader-v2 .bismillah{font-size:1.7rem!important;margin:8px 0 18px}body.mh-reader-v2 .tahlil-main .reader-chapter-heading{padding-bottom:10px!important}body.mh-reader-v2 .tahlil-controlbar .reader-switcher{display:none}body.mh-reader-v2 .tahlil-controlbar{grid-template-columns:1fr auto!important}body.mh-reader-v2.reader-app .tahlil-arabic{margin:16px 0!important;line-height:1.95!important}body.mh-reader-v2 .tahlil-group-heading{margin-top:10px}body.mh-reader-v2 .bookmark-main,body.mh-reader-v2 .info-main,body.mh-reader-v2 .search-main{padding:26px 0!important}
}
@media(max-width:360px){body.mh-reader-v2 .brand-copy strong{font-size:.875rem}body.mh-reader-v2 .brand-copy small{font-size:.625rem}body.mh-reader-v2 .brand .brand-mark{width:30px;height:34px;flex-basis:30px}body.mh-reader-v2 .mh-navigation summary{font-size:.8125rem}body.mh-reader-v2 .reader-brandbar-inner,body.mh-reader-v2 .header-inner{gap:6px}body.mh-reader-v2 .continue-reading-arabic{display:none!important}body.mh-reader-v2 .continue-reading{grid-template-columns:1fr auto}body.mh-reader-v2 .search-landing{padding:22px 16px!important}body.mh-reader-v2 .reader-selectors label:last-child{flex-basis:78px}body.mh-reader-v2 .reader-selectors select{font-size:.8125rem}body.mh-reader-v2 .reader-controlbar{gap:5px!important}body.mh-reader-v2 .reader-shell{width:calc(100% - 32px)}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
body.mh-reader-v2 .translation-preview{font-size:var(--translation-size)!important}
body.mh-reader-v2 .translation-preview{font-family:var(--ui-font)!important;font-style:normal!important}
body.mh-reader-v2 .verse-top{flex-direction:row!important;grid-template-columns:none!important}
body.mh-reader-v2 .continue-reading>*{grid-column:auto!important;grid-row:auto!important;position:static!important;transform:none!important;justify-self:auto!important}
body.mh-reader-v2 .continue-reading-copy{display:flex;flex-direction:column;gap:5px}body.mh-reader-v2 .continue-reading-arabic{align-self:center!important}body.mh-reader-v2 .continue-reading-button{align-self:center!important;justify-self:end!important}
body.mh-reader-v2 .search-landing-actions a{background:transparent!important;border:0!important;padding:0!important;flex:none!important;text-decoration:underline!important;color:#fff!important}
body.mh-reader-v2 .search-landing{text-align:left!important;max-width:1160px!important}body.mh-reader-v2 .search-landing h1{text-align:left!important}body.mh-reader-v2 .search-landing-copy{margin:0 0 20px!important}body.mh-reader-v2 .hero-search-wrap{margin:0!important}body.mh-reader-v2 .search-landing-actions{justify-content:flex-start!important}
body.mh-reader-v2 .start-reading-heading h2{font-size:1.125rem!important}body.mh-reader-v2 .surah-meta strong{font-size:1.0625rem}body.mh-reader-v2 .surah-meta small{font-size:.8125rem}
body.mh-reader-v2 .switch span[aria-hidden]::before{display:none!important}body.mh-reader-v2 .switch span[aria-hidden]::after{width:20px!important;height:20px!important;top:2.5px!important;left:3px!important;background:var(--text-muted)!important}body.mh-reader-v2 .switch input:checked+span[aria-hidden]::after{background:var(--on-brand)!important;transform:translateX(19px)!important}
body.mh-reader-v2.tahlil-page{--tahlil-arabic-size:inherit}
@media(max-width:680px){body.mh-reader-v2 .reader-brandbar-inner{display:flex!important;justify-content:space-between!important;gap:8px!important}body.mh-reader-v2 .reader-brandbar-inner .brand{flex:1 1 auto!important;max-width:none!important;width:auto!important}body.mh-reader-v2 .reader-brandbar-inner>nav{flex:0 0 auto!important;margin:0!important;width:44px!important;min-width:44px!important}body.mh-reader-v2 .reader-brandbar-inner .mh-navigation{flex:0 0 auto!important;margin:0!important}body.mh-reader-v2 .reader-brandbar-inner .brand-copy{white-space:nowrap}body.mh-reader-v2 .reader-switcher{grid-column:2!important;grid-row:1!important}body.mh-reader-v2 .reader-controlbar{grid-template-rows:auto!important}body.mh-reader-v2 .reader-back{grid-column:1!important;grid-row:1!important}body.mh-reader-v2 .reader-app-actions{grid-column:3!important;grid-row:1!important}body.mh-reader-v2 .reader-appbar .reader-controlbar .reader-selectors{display:flex!important}body.mh-reader-v2 .reader-appbar .reader-controlbar .reader-selectors label{grid-column:auto!important;grid-row:auto!important}body.mh-reader-v2.ngaji-mode .reader-appbar .reader-brandbar{display:none!important}body.mh-reader-v2 .tahlil-reader-switcher{overflow:hidden!important}body.mh-reader-v2 .continue-reading-arabic{display:none!important}body.mh-reader-v2 .continue-reading{grid-template-columns:1fr auto!important;min-height:110px!important}body.mh-reader-v2 .search-landing{padding:23px 20px!important}body.mh-reader-v2.reader-app .verse-arabic{margin-top:4px!important}body.mh-reader-v2 .tahlil-chapter-heading{padding-bottom:12px!important}}
html[data-theme=night] .brand-mark{background:#e9f3ed;border-radius:9px;padding:3px}
@media(max-width:680px){body.mh-reader-v2 .tahlil-reader-controlbar{grid-template-rows:auto!important}body.mh-reader-v2 .tahlil-reader-switcher{grid-row:auto!important;grid-column:2!important;display:block!important}body.mh-reader-v2 .tahlil-reader-title{display:none!important}body.mh-reader-v2 .tahlil-section-nav{display:flex!important;overflow-x:auto;gap:5px}body.mh-reader-v2 .tahlil-section-nav a{font-size:.8125rem;min-height:44px;display:flex;align-items:center;padding:6px 9px;white-space:nowrap;border:1px solid var(--border);border-radius:8px}body.mh-reader-v2 .tahlil-reader-controlbar .reader-app-actions{grid-column:3;grid-row:1}body.mh-reader-v2.tahlil-page .tahlil-arabic{font-size:var(--tahlil-arabic-size,2.125rem)!important;line-height:1.95!important}}

/* Module: mobile */
/* Refine existing Quran identity, with mobile reading as the primary surface. */
body.mh-reader-v2 .search-results { text-align:left!important; }
body.mh-reader-v2 .search-results a { min-height:48px; }
body.mh-reader-v2 .mh-navigation summary:focus-visible { outline:3px solid var(--focus); outline-offset:3px; }
body.mh-reader-v2 .reader-settings-button:active,body.mh-reader-v2 .icon-button:active { background:var(--brand-soft); }
body.mh-reader-v2 .reader-footer a,body.mh-reader-v2 .footer-bottom nav a { min-height:44px; display:inline-flex; align-items:center; }
body.mh-reader-v2 .settings-sheet .settings-header { margin-top:-24px; padding-top:24px; }
body.mh-reader-v2 .surah-card:focus-visible { outline:3px solid var(--focus); outline-offset:3px; }
@media(max-width:680px) {
  body.mh-reader-v2.quran-dotcom-direction .search-landing { display:block!important; text-align:left!important; width:calc(100% - 32px)!important; padding:22px 20px!important; border-radius:18px!important; }
  body.mh-reader-v2.quran-dotcom-direction .search-landing h1 { text-align:left!important; font-size:1.875rem!important; line-height:1.2!important; }
  body.mh-reader-v2.quran-dotcom-direction .search-landing .directory-kicker { text-align:left!important; font-size:.6875rem!important; letter-spacing:.08em!important; margin-bottom:10px!important; }
  body.mh-reader-v2.quran-dotcom-direction .search-landing-copy { text-align:left!important; font-size:.9375rem!important; line-height:1.6!important; margin:10px 0 18px!important; }
  body.mh-reader-v2.quran-dotcom-direction .hero-search-wrap { margin:0!important; }
  body.mh-reader-v2.quran-dotcom-direction .search-landing-actions { justify-content:flex-start!important; gap:4px 16px!important; margin-top:8px!important; flex-wrap:wrap!important; }
  body.mh-reader-v2.quran-dotcom-direction .search-landing-actions a { min-height:44px!important; display:inline-flex!important; align-items:center!important; font-size:.8125rem!important; }
  body.mh-reader-v2.quran-dotcom-direction .quran-search { min-height:52px!important; border-radius:12px!important; }
  body.mh-reader-v2.quran-dotcom-direction .continue-reading { grid-template-rows:auto!important; min-height:112px!important; padding:16px!important; gap:12px!important; border-radius:14px!important; }
  body.mh-reader-v2.quran-dotcom-direction .continue-reading-copy { gap:4px!important; }
  body.mh-reader-v2.quran-dotcom-direction .continue-reading-copy strong { font-size:1rem!important; }
  body.mh-reader-v2.quran-dotcom-direction .continue-reading-label { font-size:.75rem!important; letter-spacing:.06em!important; margin:0!important; }
  body.mh-reader-v2 .start-reading-heading { margin-bottom:10px!important; }
  body.mh-reader-v2 .start-reading-section { padding-bottom:18px!important; }
  body.mh-reader-v2 .reading-companions>a { min-height:64px!important; }
  body.mh-reader-v2 .reading-shortcuts { margin-bottom:18px!important; }
  body.mh-reader-v2 .segmented-control button { min-height:44px; }
  body.mh-reader-v2 .reader-chapter-heading { padding:16px 0 12px!important; }
  body.mh-reader-v2 .reader-chapter-heading h1 { font-size:1.25rem!important; }
  body.mh-reader-v2 .reader-chapter-heading .reader-arabic-title { font-size:1.4375rem!important; }
  body.mh-reader-v2 .verse-actions .icon-button { min-width:44px!important; min-height:44px!important; }
  body.mh-reader-v2 .settings-sheet { padding-top:20px!important; padding-inline:20px!important; max-height:90dvh!important; }
  body.mh-reader-v2 .settings-sheet .settings-header { top:-20px; margin-top:-20px; padding-top:20px; padding-bottom:14px; }
  body.mh-reader-v2 .settings-header h2 { font-size:1.0625rem!important; }
  body.mh-reader-v2 .toggle-row>div { min-width:0; }
  body.mh-reader-v2 .switch { flex:0 0 50px; }
  body.mh-reader-v2 .tahlil-section-nav a { font-size:.875rem!important; }
}
@media(max-width:360px) {
  body.mh-reader-v2.quran-dotcom-direction .search-landing { padding:20px 16px!important; }
  body.mh-reader-v2 .mh-navigation summary { padding-inline:8px; }
}
@media(max-height:450px) { body.mh-reader-v2 .settings-sheet { max-height:100dvh!important; } }

/* Module: parity */
/* Shared finishing rules; brand tokens are independent from reading behaviour. */
html[data-site="kahmi"]:not([data-theme="night"]):not([data-theme="kitab"]) {
  --brand:#08783f; --brand-strong:#07512f; --brand-soft:#e7f4ec;
  --focus:#08783f;
}
html[data-site="setra"]:not([data-theme="night"]):not([data-theme="kitab"]) {
  --page:#f7f9fc; --panel:#fff; --panel-muted:#eef3f8;
  --text:#10243c; --text-muted:#5c6d80; --border:#dce3eb;
  --border-strong:#8b99aa; --brand:#0a4970; --brand-strong:#0a2b52;
  --brand-soft:#e8f0f7; --focus:#b78735; --on-brand:#fff;
}
html[data-site="setra"][data-theme="night"] {
  --page:#091725; --panel:#102236; --panel-muted:#172d44;
  --text:#f2f5f8; --text-muted:#b7c2ce; --border:#2d4257;
  --border-strong:#8191a2; --brand:#d2a85d; --brand-strong:#ebc77f;
  --brand-soft:#24384c; --focus:#ebc77f; --on-brand:#10243c;
}
html[data-site="setra"] body.mh-reader-v2 .search-landing {
  background:linear-gradient(122deg,#071d38 0%,#0b3c62 62%,#0c5a72 100%)!important;
  border-color:#315b78!important;
}
html[data-site="setra"] body.mh-reader-v2 .search-landing .directory-kicker { color:#efc36e; }
html[data-site="setra"] body.mh-reader-v2 .search-landing-copy { color:#e9f1f8; }
html[data-site="setra"] .setra-brand-lockup {
  position:relative; display:block; width:clamp(188px,21vw,254px); height:42px; flex:0 0 auto;
}
html[data-site="setra"] .setra-brand-image {
  position:absolute; top:50%; left:0; display:block; width:100%; height:auto;
  max-height:42px; object-fit:contain; object-position:left center; transform:translateY(-50%);
}
html[data-site="setra"] .setra-brand-image-dark { display:none; }
html[data-site="setra"][data-theme="night"] .setra-brand-image-light { display:none; }
html[data-site="setra"][data-theme="night"] .setra-brand-image-dark { display:block; }
html[data-site="viva"]:not([data-theme="night"]):not([data-theme="kitab"]) {
  --page:#f6f8fc; --panel:#fff; --panel-muted:#eef2f8;
  --text:#132741; --text-muted:#52647b; --border:#dce3ee;
  --border-strong:#8192aa; --brand:#244d83; --brand-strong:#15365f;
  --brand-soft:#eaf0f8; --focus:#244d83; --on-brand:#fff;
}
html[data-site="viva"][data-theme="night"] {
  --page:#101a2a; --panel:#162238; --panel-muted:#21334e;
  --text:#edf3ff; --text-muted:#b5c5de; --border:#354862;
  --border-strong:#8097b6; --brand:#a3c7fb; --brand-strong:#c3dbff;
  --brand-soft:#263e61; --focus:#c3dbff; --on-brand:#10233e;
}
html[data-site="viva"] body.mh-reader-v2 .search-landing {
  background:linear-gradient(120deg,#152b4b,#244d78)!important;
  border-color:#395d88!important;
}
html[data-site="viva"] body.mh-reader-v2 .search-landing .directory-kicker { color:#e7cf94; }
html[data-site="viva"] body.mh-reader-v2 .search-landing-copy { color:#e1eafa; }
html[data-site="kahmi"] body.mh-reader-v2 .search-landing {
  background:linear-gradient(120deg,#0a4732,#09744b)!important;
}
html[data-site="kahmi"] body.mh-reader-v2 .brand-mark {
  display:block; overflow:hidden; border:1px solid var(--border);
  border-radius:8px; background:#fff;
}
html[data-site="kahmi"] body.mh-reader-v2 .brand-mark img {
  width:auto; max-width:none; height:100%; object-position:left center;
}
body.mh-reader-v2 .quran-search svg { color:var(--brand-strong); }
body.mh-reader-v2 .surah-filterbar { background:transparent; border:0; }
body.mh-reader-v2 .reader-appbar .reader-controlbar { padding-bottom:28px!important; }
body.mh-reader-v2 .reader-switcher .reader-context {
  display:flex!important; position:absolute; left:0; bottom:-19px;
  gap:12px; font-size:.75rem; line-height:1.4; margin:0;
  color:var(--text-muted);
}
body.mh-reader-v2 #reader-page-range,body.mh-reader-v2 #reader-juz { display:none; }
body.mh-reader-v2 .reader-switcher .reader-progress-track { bottom:-27px!important; }
body.mh-reader-v2 .reader-switcher .reader-context strong { color:var(--brand-strong); }
body.mh-reader-v2 .brand-copy { min-width:0; }
body.mh-reader-v2 .full-search-result:focus-visible { outline:3px solid var(--focus); outline-offset:3px; }
body.mh-reader-v2 .info-main input[type="search"] { font-size:1rem; }
@media(max-width:680px) {
  html { scroll-padding-top:158px; }
  html[data-site="viva"] body.mh-reader-v2 .brand-copy strong { font-size:.8125rem; }
  html[data-site="viva"] body.mh-reader-v2 .brand-copy small { font-size:.6875rem; }
  body.mh-reader-v2 .reader-switcher .reader-context { font-size:.6875rem; }
  html[data-site="setra"] .setra-brand-lockup { width:184px; height:34px; }
  html[data-site="setra"] .setra-brand-image { max-height:34px; }
}
@media(prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto!important; }
  *,*::before,*::after { animation-duration:.01ms!important; transition-duration:.01ms!important; }
}
